Index: trunk/web/addons/job_monarch/lib/extjs-30/INCLUDE_ORDER.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/INCLUDE_ORDER.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/INCLUDE_ORDER.txt	(revision 625)
@@ -0,0 +1,35 @@
+All adapter related files below are located in 
+/adapters/<lib name>/ of this zip file.
+
+Your include order should be:
+
+Ext Stand-alone
+-------------------------------------------------------------------
+ext-base.js
+ext-all.js (or your choice of files)
+
+
+Yahoo! UI (.12+)
+-------------------------------------------------------------------
+yui-utilities.js
+ext-yui-adapter.js
+ext-all.js (or your choice of files)
+
+
+jQuery (1.1+)
+-------------------------------------------------------------------
+jquery.js
+ext-jquery-adapter.js
+ext-all.js (or your choice of files)
+
+
+Prototype (1.5+) / Scriptaculous (1.7+)
+-------------------------------------------------------------------
+prototype.js
+scriptaculous.js?load=effects  (or whatever you want to load)
+ext-prototype-adapter.js
+ext-all.js (or your choice of files)
+
+
+
+See the examples folders for more examples.
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base-debug.js	(revision 625)
@@ -0,0 +1,3589 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// for old browsers
+window.undefined = window.undefined;
+
+/**
+ * @class Ext
+ * Ext core utilities and functions.
+ * @singleton
+ */
+
+Ext = {
+    /**
+     * The version of the framework
+     * @type String
+     */
+    version : '3.0'
+};
+
+/**
+ * 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){
+    // no "this" reference for friendly out of scope calls
+    if(defaults){
+        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,
+        toString = Object.prototype.toString,
+        //assume it's not null and not an array
+        isIterable = function(v){
+            //check for array or arguments
+            if(Ext.isArray(v) || v.callee){
+                return true;
+            }
+            //check for node list type
+            if(/NodeList|HTMLCollection/.test(toString.call(v))){
+                return true;
+            }
+            //NodeList has an item and length property
+            //IXMLDOMNodeList has nextNode method, needs to be checked first.
+            return ((v.nextNode || v.item) && Ext.isNumber(v.length));
+        },
+        ua = navigator.userAgent.toLowerCase(),
+        check = function(r){
+            return r.test(ua);
+        },
+        DOC = document,
+        isStrict = DOC.compatMode == "CSS1Compat",
+        isOpera = check(/opera/),
+        isChrome = check(/chrome/),
+        isWebKit = check(/webkit/),
+        isSafari = !isChrome && check(/safari/),
+        isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
+        isSafari3 = isSafari && check(/version\/3/),
+        isSafari4 = isSafari && check(/version\/4/),
+        isIE = !isOpera && check(/msie/),
+        isIE7 = isIE && check(/msie 7/),
+        isIE8 = isIE && check(/msie 8/),
+        isIE6 = isIE && !isIE7 && !isIE8,
+        isGecko = !isWebKit && check(/gecko/),
+        isGecko2 = isGecko && check(/rv:1\.8/),
+        isGecko3 = isGecko && check(/rv:1\.9/),
+        isBorderBox = isIE && !isStrict,
+        isWindows = check(/windows|win32/),
+        isMac = check(/macintosh|mac os x/),
+        isAir = check(/adobeair/),
+        isLinux = check(/linux/),
+        isSecure = /^https/i.test(window.location.protocol);
+
+    // remove css image flicker
+    if(isIE6){
+        try{
+            DOC.execCommand("BackgroundImageCache", false, true);
+        }catch(e){}
+    }
+
+    Ext.apply(Ext, {
+        /**
+         * 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',
+        /**
+         * 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 if the {@link Ext.Fx} Class is available
+         * @type Boolean
+         * @property enableFx
+         */
+
+        /**
+         * 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 {@link #enableGarbageCollector} is true.
+         * @type Boolean
+         */
+        enableListenerCollection : false,
+
+        /**
+         * Indicates whether to use native browser parsing for JSON methods.
+         * This option is ignored if the browser does not support native JSON methods.
+         * <b>Note: Native JSON methods will not work with objects that have functions.
+         * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
+         * @type Boolean
+         */
+        USE_NATIVE_JSON : false,
+
+        /**
+         * 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){
+                for(var p in c){
+                    if(Ext.isEmpty(o[p])){
+                        o[p] = c[p];
+                    }
+                }
+            }
+            return o;
+        },
+
+        /**
+         * 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){
+            return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed);
+        },
+
+        /**
+         * 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(Ext.isObject(sp)){
+                    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.superclass = sbp.supr = (function(){
+                    return spp;
+                });
+                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;
+                Ext.apply(p, overrides);
+                if(Ext.isIE && overrides.toString != origclass.toString){
+                    p.toString = overrides.toString;
+                }
+            }
+        },
+
+        /**
+         * Creates namespaces to be used for scoping variables and classes so that they are not global.
+         * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+         * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+         * @param {String} namespace1
+         * @param {String} namespace2
+         * @param {String} etc
+         * @method namespace
+         */
+        namespace : function(){
+            var o, d;
+            Ext.each(arguments, function(v) {
+                d = v.split(".");
+                o = window[d[0]] = window[d[0]] || {};
+                Ext.each(d.slice(1), function(v2){
+                    o = o[v2] = o[v2] || {};
+                });
+            });
+            return o;
+        },
+
+        /**
+         * 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
+         * @param {String} pre (optional) A prefix to add to the url encoded string
+         * @return {String}
+         */
+        urlEncode: function(o, pre){
+            var undef, buf = [], key, e = encodeURIComponent;
+
+            for(key in o){
+                undef = !Ext.isDefined(o[key]);
+                Ext.each(undef ? key : o[key], function(val, i){
+                    buf.push("&", e(key), "=", (val != key || !undef) ? e(val) : "");
+                });
+            }
+            if(!pre){
+                buf.shift();
+                pre = "";
+            }
+            return pre + buf.join('');
+        },
+
+        /**
+         * Takes an encoded URL and and converts it to an object. Example: <pre><code>
+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+</code></pre>
+         * @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){
+            var obj = {},
+                pairs = string.split('&'),
+                d = decodeURIComponent,
+                name,
+                value;
+            Ext.each(pairs, function(pair) {
+                pair = pair.split('=');
+                name = d(pair[0]);
+                value = d(pair[1]);
+                obj[name] = overwrite || !obj[name] ? value :
+                            [].concat(obj[name]).concat(value);
+            });
+            return obj;
+        },
+
+        /**
+         * Appends content to the query string of a URL, which handles logic for whether to place
+         * a question mark or ampersand.
+         * @param {String} url The url to append to.
+         * @@param {String} s The content to append to the url.
+         * @return (String) The appended string
+         */
+        urlAppend : function(url, s){
+            if(!Ext.isEmpty(s)){
+                return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
+            }
+            return url;
+        },
+
+        /**
+         * Converts any iterable (numeric indices and a length property) into a true array
+         * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on.
+         * For strings, use this instead: "abc".match(/./g) => [a,b,c];
+         * @param {Iterable} the iterable object to be turned into a true Array.
+         * @return (Array) array
+         */
+        toArray : function(){
+            return isIE ?
+                function(a, i, j, res){
+                    res = [];
+                    Ext.each(a, function(v) {
+                        res.push(v);
+                    });
+                    return res.slice(i || 0, j || res.length);
+                } :
+                function(a, i, j){
+                    return Array.prototype.slice.call(a, i || 0, j || a.length);
+                }
+        }(),
+
+        /**
+         * 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(Ext.isEmpty(array, true)){
+                return;
+            }
+            if(!isIterable(array) || Ext.isPrimitive(array)){
+                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;
+                };
+            }
+        },
+
+        /**
+         * Iterates either the elements in an array, or each of the properties in an object.
+         * <b>Note</b>: If you are only iterating arrays, it is better to call {@link #each}.
+         * @param {Object/Array} object The object or array to be iterated
+         * @param {Function} fn The function to be called for each iteration.
+         * The iteration will stop if the supplied function returns false, or
+         * all array elements / object properties have been covered. The signature
+         * varies depending on the type of object being interated:
+         * <div class="mdetail-params"><ul>
+         * <li>Arrays : <tt>(Object item, Number index, Array allItems)</tt>
+         * <div class="sub-desc">
+         * When iterating an array, the supplied function is called with each item.</div></li>
+         * <li>Objects : <tt>(String key, Object value)</tt>
+         * <div class="sub-desc">
+         * When iterating an object, the supplied function is called with each key-value pair in
+         * the object.</div></li>
+         * </ul></div>
+         * @param {Object} scope The scope to call the supplied function with, defaults to
+         * the specified <tt>object</tt>
+         */
+        iterate : function(obj, fn, scope){
+            if(isIterable(obj)){
+                Ext.each(obj, fn, scope);
+                return;
+            }else if(Ext.isObject(obj)){
+                for(var prop in obj){
+                    if(obj.hasOwnProperty(prop)){
+                        if(fn.call(scope || obj, prop, obj[prop]) === false){
+                            return;
+                        };
+                    }
+                }
+            }
+        },
+
+        /**
+         * Return the dom node for the passed String (id), dom node, or Ext.Element.
+         * Here are some examples:
+         * <pre><code>
+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don&#39;t know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * </code></pre>
+         * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
+         * when this method is called to be successful.
+         * @param {Mixed} el
+         * @return HTMLElement
+         */
+        getDom : function(el){
+            if(!el || !DOC){
+                return null;
+            }
+            return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el);
+        },
+
+        /**
+         * Returns the current document body as an {@link Ext.Element}.
+         * @return Ext.Element The document body
+         */
+        getBody : function(){
+            return Ext.get(DOC.body || DOC.documentElement);
+        },
+
+        /**
+         * 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 || DOC.createElement('div');
+                    d.appendChild(n);
+                    d.innerHTML = '';
+                }
+            }
+        }() : function(n){
+            if(n && n.parentNode && n.tagName != 'BODY'){
+                n.parentNode.removeChild(n);
+            }
+        },
+
+        /**
+         * <p>Returns true if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
+         * @return {Boolean}
+         */
+        isEmpty : function(v, allowBlank){
+            return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript array, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isArray : function(v){
+            return toString.apply(v) === '[object Array]';
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isObject : function(v){
+            return v && typeof v == "object";
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript 'primitive', a string, number or boolean.
+         * @param {Mixed} value The value to test
+         * @return {Boolean}
+         */
+        isPrimitive : function(v){
+            return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Function, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isFunction : function(v){
+            return toString.apply(v) === '[object Function]';
+        },
+
+        /**
+         * Returns true if the passed object is a number. Returns false for non-finite numbers.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isNumber: function(v){
+            return typeof v === 'number' && isFinite(v);
+        },
+
+        /**
+         * Returns true if the passed object is a string.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isString: function(v){
+            return typeof v === 'string';
+        },
+
+        /**
+         * Returns true if the passed object is a boolean.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isBoolean: function(v){
+            return typeof v === 'boolean';
+        },
+
+        /**
+         * Returns true if the passed object is not undefined.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isDefined: function(v){
+            return typeof v !== 'undefined';
+        },
+
+        /**
+         * True if the detected browser is Opera.
+         * @type Boolean
+         */
+        isOpera : isOpera,
+        /**
+         * True if the detected browser uses WebKit.
+         * @type Boolean
+         */
+        isWebKit: isWebKit,
+        /**
+         * True if the detected browser is Chrome.
+         * @type Boolean
+         */
+        isChrome : isChrome,
+        /**
+         * 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 4.x.
+         * @type Boolean
+         */
+        isSafari4 : isSafari4,
+        /**
+         * True if the detected browser is Safari 2.x.
+         * @type Boolean
+         */
+        isSafari2 : isSafari2,
+        /**
+         * 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 : isIE6,
+        /**
+         * True if the detected browser is Internet Explorer 7.x.
+         * @type Boolean
+         */
+        isIE7 : isIE7,
+        /**
+         * True if the detected browser is Internet Explorer 8.x.
+         * @type Boolean
+         */
+        isIE8 : isIE8,
+        /**
+         * 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 : isGecko2,
+        /**
+         * 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
+    });
+
+    /**
+     * Creates namespaces to be used for scoping variables and classes so that they are not global.
+     * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+     * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+     * @param {String} namespace1
+     * @param {String} namespace2
+     * @param {String} etc
+     * @method namespace
+     */
+    Ext.ns = Ext.namespace;
+})();
+
+Ext.ns("Ext", "Ext.util", "Ext.lib", "Ext.data");
+
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+     /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function() {
+                    var me = this,
+                        args = arguments;
+                    fcn.target = me;
+                    fcn.method = method;
+                    return (fcn.apply(scope || me || window, args) !== false) ?
+                            method.apply(me || window, args) :
+                            null;
+                };
+    },
+
+     /**
+     * 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,
+            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 (Ext.isNumber(appendArgs)){
+                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 less than or equal to 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 > 0){
+            return setTimeout(fn, millis);
+        }
+        fn();
+        return 0;
+    }
+});
+
+/**
+ * @class String
+ * These functions are available on every String object.
+ */
+Ext.applyIf(String, {
+    /**
+     * 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 = Ext.toArray(arguments, 1);
+        return format.replace(/\{(\d+)\}/g, function(m, i){
+            return args[i];
+        });
+    }
+});
+
+/**
+ * @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;
+    }
+});
+/**
+ * @class Ext
+ */
+
+Ext.ns("Ext.grid", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
+       "Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
+    /**
+     * Namespace alloted for extensions to the framework.
+     * @property ux
+     * @type Object
+     */
+
+Ext.apply(Ext, function(){
+    var E = Ext, idSeed = 0;
+
+    return {
+        /**
+        * A reusable empty function
+        * @property
+        * @type Function
+        */
+        emptyFn : function(){},
+
+        /**
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
+         * For other browsers it uses an inline data URL.
+         * @type String
+         */
+        BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 ?
+                            'http:/' + '/extjs.com/s.gif' :
+                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
+
+        extendX : function(supr, fn){
+            return Ext.extend(supr, fn(supr.prototype));
+        },
+
+        /**
+         * Returns the current HTML document object as an {@link Ext.Element}.
+         * @return Ext.Element The document
+         */
+        getDoc : function(){
+            return Ext.get(document);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript date object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isDate : function(v){
+            return Object.prototype.toString.apply(v) === '[object Date]';
+        },
+
+        /**
+         * 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){
+            v = Number(v === null || typeof v == 'boolean'? NaN : v);
+            return isNaN(v)? defaultValue : v;
+        },
+
+        /**
+         * <p>Utility method for returning a default value if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Mixed} defaultValue The value to return if the original value is empty
+         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
+         * @return {Mixed} value, if non-empty, else defaultValue
+         */
+        value : function(v, defaultValue, allowBlank){
+            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
+        },
+
+        /**
+         * Escapes the passed string for use in a regular expression
+         * @param {String} str
+         * @return {String}
+         */
+        escapeRe : function(s) {
+            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
+        },
+
+        sequence : function(o, name, fn, scope){
+            o[name] = o[name].createSequence(fn, scope);
+        },
+
+        /**
+         * Applies event listeners to elements by selectors when the document is ready.
+         * The event name is specified with an <tt>&#64;</tt> suffix.
+         * <pre><code>
+Ext.addBehaviors({
+    // add a listener for click on all anchors in element with id foo
+    '#foo a&#64;click' : function(e, t){
+        // do something
+    },
+    
+    // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
+    '#foo a, #bar span.some-class&#64;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);
+                });
+            } else {
+                var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
+                    parts,
+                    b,
+                    s;
+                for (b in o) {
+                    if ((parts = b.split('@'))[1]) { // for Object prototype breakers
+                        s = parts[0];
+                        if(!cache[s]){
+                            cache[s] = Ext.select(s);
+                        }
+                        cache[s].on(parts[1], o[b]);
+                    }
+                }
+                cache = null;
+            }
+        },
+
+
+        // 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;
+        },
+
+        /**
+         * Copies a set of named properties fom the source object to the destination object.
+         * <p>example:<pre><code>
+ImageComponent = Ext.extend(Ext.BoxComponent, {
+    initComponent: function() {
+        this.autoEl = { tag: 'img' };
+        MyComponent.superclass.initComponent.apply(this, arguments);
+        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
+    }
+});
+         * </code></pre> 
+         * @param {Object} The destination object.
+         * @param {Object} The source object.
+         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * of property names to copy.
+         * @return {Object} The modified object.
+        */
+        copyTo : function(dest, source, names){
+            if(typeof names == 'string'){
+                names = names.split(/[,;\s]/);
+            }
+            Ext.each(names, function(name){
+                if(source.hasOwnProperty(name)){
+                    dest[name] = source[name];
+                }
+            }, this);
+            return dest;
+        },
+
+        /**
+         * 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}, {@link Ext.Component}, or an Array of either of these to destroy
+         * @param {Mixed} arg2 (optional)
+         * @param {Mixed} etc... (optional)
+         */
+        destroy : function(){
+            Ext.each(arguments, function(arg){
+                if(arg){
+                    if(Ext.isArray(arg)){
+                        this.destroy.apply(this, arg);
+                    }else if(Ext.isFunction(arg.destroy)){
+                        arg.destroy();
+                    }else if(arg.dom){
+                        arg.remove();
+                    }    
+                }
+            }, this);
+        },
+
+        /**
+         * Attempts to destroy and then remove a set of named properties of the passed object.
+         * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
+         * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
+         * @param {Mixed} etc... More property names to destroy and remove.
+         */
+        destroyMembers : function(o, arg1, arg2, etc){
+            for(var i = 1, a = arguments, len = a.length; i < len; i++) {
+                Ext.destroy(o[a[i]]);
+                delete o[a[i]];
+            }
+        },
+
+        /**
+         * Creates a copy of the passed Array with falsy values removed.
+         * @param {Array/NodeList} arr The Array from which to remove falsy values.
+         * @return {Array} The new, compressed Array.
+         */
+        clean : function(arr){
+            var ret = [];
+            Ext.each(arr, function(v){
+                if(!!v){
+                    ret.push(v);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Creates a copy of the passed Array, filtered to contain only unique values.
+         * @param {Array} arr The Array to filter
+         * @return {Array} The new Array containing unique values.
+         */
+        unique : function(arr){
+            var ret = [],
+                collect = {};
+
+            Ext.each(arr, function(v) {
+                if(!collect[v]){
+                    ret.push(v);
+                }
+                collect[v] = true;
+            });
+            return ret;
+        },
+
+        /**
+         * Recursively flattens into 1-d Array. Injects Arrays inline.
+         * @param {Array} arr The array to flatten
+         * @return {Array} The new, flattened array.
+         */
+        flatten : function(arr){
+            var worker = [];
+            function rFlatten(a) {
+                Ext.each(a, function(v) {
+                    if(Ext.isArray(v)){
+                        rFlatten(v);
+                    }else{
+                        worker.push(v);
+                    }
+                });
+                return worker;
+            }
+            return rFlatten(arr);
+        },
+
+        /**
+         * Returns the minimum value in the Array.
+         * @param {Array|NodeList} arr The Array from which to select the minimum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines minimization.
+         *                   If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The minimum value in the Array.
+         */
+        min : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a < b ? -1 : 1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == -1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Returns the maximum value in the Array
+         * @param {Array|NodeList} arr The Array from which to select the maximum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines maximization.
+         *                   If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The maximum value in the Array.
+         */
+        max : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a > b ? 1 : -1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == 1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Calculates the mean of the Array
+         * @param {Array} arr The Array to calculate the mean value of.
+         * @return {Number} The mean.
+         */
+        mean : function(arr){
+           return Ext.sum(arr) / arr.length;
+        },
+
+        /**
+         * Calculates the sum of the Array
+         * @param {Array} arr The Array to calculate the sum value of.
+         * @return {Number} The sum.
+         */
+        sum : function(arr){
+           var ret = 0;
+           Ext.each(arr, function(v) {
+               ret += v;
+           });
+           return ret;
+        },
+
+        /**
+         * Partitions the set into two sets: a true set and a false set.
+         * Example: 
+         * Example2: 
+         * <pre><code>
+// Example 1:
+Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
+
+// Example 2:
+Ext.partition(
+    Ext.query("p"),
+    function(val){
+        return val.className == "class1"
+    }
+);
+// true are those paragraph elements with a className of "class1",
+// false set are those that do not have that className.
+         * </code></pre>
+         * @param {Array|NodeList} arr The array to partition
+         * @param {Function} truth (optional) a function to determine truth.  If this is omitted the element
+         *                   itself must be able to be evaluated for its truthfulness.
+         * @return {Array} [true<Array>,false<Array>]
+         */
+        partition : function(arr, truth){
+            var ret = [[],[]];
+            Ext.each(arr, function(v, i, a) {
+                ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
+            });
+            return ret;
+        },
+
+        /**
+         * Invokes a method on each item in an Array.
+         * <pre><code>
+// Example:
+Ext.invoke(Ext.query("p"), "getAttribute", "id");
+// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to invoke the method on.
+         * @param {String} methodName The method name to invoke.
+         * @param {Anything} ... Arguments to send into the method invocation.
+         * @return {Array} The results of invoking the method on each item in the array.
+         */
+        invoke : function(arr, methodName){
+            var ret = [],
+                args = Array.prototype.slice.call(arguments, 2);
+            Ext.each(arr, function(v,i) {
+                if (v && typeof v[methodName] == "function") {
+                    ret.push(v[methodName].apply(v, args));
+                } else {
+                    ret.push(undefined);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Plucks the value of a property from each item in the Array
+         * <pre><code>
+// Example:
+Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to pluck the value from.
+         * @param {String} prop The property name to pluck from each element.
+         * @return {Array} The value from each item in the Array.
+         */
+        pluck : function(arr, prop){
+            var ret = [];
+            Ext.each(arr, function(v) {
+                ret.push( v[prop] );
+            });
+            return ret;
+        },
+
+        /**
+         * <p>Zips N sets together.</p>
+         * <pre><code>
+// Example 1:
+Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
+// Example 2:
+Ext.zip(
+    [ "+", "-", "+"],
+    [  12,  10,  22],
+    [  43,  15,  96],
+    function(a, b, c){
+        return "$" + a + "" + b + "." + c
+    }
+); // ["$+12.43", "$-10.15", "$+22.96"]
+         * </code></pre>
+         * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
+         * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
+         * @return {Array} The zipped set.
+         */
+        zip : function(){
+            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+                arrs = parts[0],
+                fn = parts[1][0],
+                len = Ext.max(Ext.pluck(arrs, "length")),
+                ret = [];
+
+            for (var i = 0; i < len; i++) {
+                ret[i] = [];
+                if(fn){
+                    ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
+                }else{
+                    for (var j = 0, aLen = arrs.length; j < aLen; j++){
+                        ret[i].push( arrs[j][i] );
+                    }
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * This is shorthand reference to {@link Ext.ComponentMgr#get}.
+         * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+        */
+        getCmp : function(id){
+            return Ext.ComponentMgr.get(id);
+        },
+
+        /**
+         * 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: E.isIE6 || (E.isMac && E.isGecko2),
+
+        // 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:<div class="mdetail-params"><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>date</b>: If the object passed is a Date object</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>
+         * </ul></div>
+         * @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';
+                    case Date: return 'date';
+                }
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
+                    return 'nodelist';
+                }
+            }
+            return t;
+        },
+
+        intercept : function(o, name, fn, scope){
+            o[name] = o[name].createInterceptor(fn, scope);
+        },
+
+        // internal
+        callback : function(cb, scope, args, delay){
+            if(Ext.isFunction(cb)){
+                if(delay){
+                    cb.defer(delay, scope, args || []);
+                }else{
+                    cb.apply(scope, args || []);
+                }
+            }
+        }
+    };
+}());
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+    /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function(){
+                    var retval = method.apply(this || window, arguments);
+                    fcn.apply(scope || this || window, arguments);
+                    return retval;
+                };
+    }
+});
+
+
+/**
+ * @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 = String(val);
+        if(!ch) {
+            ch = " ";
+        }
+        while (result.length < size) {
+            result = ch + result;
+        }
+        return result;
+    }
+});
+
+/**
+ * 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, ""); };
+}();
+
+// here to prevent dependency on Date.js
+/**
+ 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());
+};
+
+
+/**
+ * @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 Ext.util.TaskRunner
+ * Provides the ability to execute one or more arbitrary tasks in a multithreaded
+ * manner.  Generally, you can use the singleton {@link Ext.TaskMgr} instead, but
+ * if needed, you can create separate instances of TaskRunner.  Any number of
+ * separate tasks can be started at any time and will run independently of each
+ * other. Example usage:
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * </code></pre>
+ * Also see {@link Ext.util.DelayedTask}. 
+ * 
+ * @constructor
+ * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance
+ * (defaults to 10)
+ */
+Ext.util.TaskRunner = function(interval){
+    interval = interval || 10;
+    var tasks = [], 
+    	removeQueue = [],
+    	id = 0,
+    	running = false,
+
+    	// private
+    	stopThread = function(){
+	        running = false;
+	        clearInterval(id);
+	        id = 0;
+	    },
+
+    	// private
+    	startThread = function(){
+	        if(!running){
+	            running = true;
+	            id = setInterval(runTasks, interval);
+	        }
+	    },
+
+    	// private
+    	removeTask = function(t){
+	        removeQueue.push(t);
+	        if(t.onStop){
+	            t.onStop.apply(t.scope || t);
+	        }
+	    },
+	    
+    	// private
+    	runTasks = function(){
+	    	var rqLen = removeQueue.length,
+	    		now = new Date().getTime();	    			    		
+	    
+	        if(rqLen > 0){
+	            for(var i = 0; i < rqLen; i++){
+	                tasks.remove(removeQueue[i]);
+	            }
+	            removeQueue = [];
+	            if(tasks.length < 1){
+	                stopThread();
+	                return;
+	            }
+	        }	        
+	        for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){
+	            t = tasks[i];
+	            itime = now - t.taskRunTime;
+	            if(t.interval <= itime){
+	                rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]);
+	                t.taskRunTime = now;
+	                if(rt === false || t.taskRunCount === t.repeat){
+	                    removeTask(t);
+	                    return;
+	                }
+	            }
+	            if(t.duration && t.duration <= (now - t.taskStartTime)){
+	                removeTask(t);
+	            }
+	        }
+	    };
+
+    /**
+     * Starts a new task.
+     * @method start
+     * @param {Object} task A config object that supports the following properties:<ul>
+     * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
+     * function will be called at each interval and passed the <code>args</code> argument if specified.  If a
+     * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+     * <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
+     * should be executed.</div></li>
+     * <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
+     * specified by <code>run</code>.</div></li>
+     * <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
+     * <code>run</code> function. Defaults to the task config object.</div></li>
+     * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+     * the task before stopping automatically (defaults to indefinite).</div></li>
+     * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+     * stopping automatically (defaults to indefinite).</div></li>
+     * </ul>
+     * @return {Object} The task
+     */
+    this.start = function(task){
+        tasks.push(task);
+        task.taskStartTime = new Date().getTime();
+        task.taskRunTime = 0;
+        task.taskRunCount = 0;
+        startThread();
+        return task;
+    };
+
+    /**
+     * Stops an existing running task.
+     * @method stop
+     * @param {Object} task The task to stop
+     * @return {Object} The task
+     */
+    this.stop = function(task){
+        removeTask(task);
+        return task;
+    };
+
+    /**
+     * Stops all tasks that are currently running.
+     * @method stopAll
+     */
+    this.stopAll = function(){
+        stopThread();
+        for(var i = 0, len = tasks.length; i < len; i++){
+            if(tasks[i].onStop){
+                tasks[i].onStop();
+            }
+        }
+        tasks = [];
+        removeQueue = [];
+    };
+};
+
+/**
+ * @class Ext.TaskMgr
+ * @extends Ext.util.TaskRunner
+ * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks.  See
+ * {@link Ext.util.TaskRunner} for supported methods and task config properties.
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+</code></pre>
+ * @singleton
+ */
+Ext.TaskMgr = new Ext.util.TaskRunner();(function(){
+	var libFlyweight;
+	
+	function fly(el) {
+        if (!libFlyweight) {
+            libFlyweight = new Ext.Element.Flyweight();
+        }
+        libFlyweight.dom = el;
+        return libFlyweight;
+    }
+    
+    (function(){
+	var doc = document,
+		isCSS1 = doc.compatMode == "CSS1Compat",
+		MAX = Math.max,		
+		PARSEINT = parseInt;
+		
+	Ext.lib.Dom = {
+	    isAncestor : function(p, c) {
+		    var ret = false;
+			
+			p = Ext.getDom(p);
+			c = Ext.getDom(c);
+			if (p && c) {
+				if (p.contains) {
+					return p.contains(c);
+				} else if (p.compareDocumentPosition) {
+					return !!(p.compareDocumentPosition(c) & 16);
+				} else {
+					while (c = c.parentNode) {
+						ret = c == p || ret;	        			
+					}
+				}	            
+			}	
+			return ret;
+		},
+		
+        getViewWidth : function(full) {
+            return full ? this.getDocumentWidth() : this.getViewportWidth();
+        },
+
+        getViewHeight : function(full) {
+            return full ? this.getDocumentHeight() : this.getViewportHeight();
+        },
+
+        getDocumentHeight: function() {            
+            return MAX(!isCSS1 ? doc.body.scrollHeight : doc.documentElement.scrollHeight, this.getViewportHeight());
+        },
+
+        getDocumentWidth: function() {            
+            return MAX(!isCSS1 ? doc.body.scrollWidth : doc.documentElement.scrollWidth, this.getViewportWidth());
+        },
+
+        getViewportHeight: function(){
+	        return Ext.isIE ? 
+	        	   (Ext.isStrict ? doc.documentElement.clientHeight : doc.body.clientHeight) :
+	        	   self.innerHeight;
+        },
+
+        getViewportWidth : function() {
+	        return !Ext.isStrict && !Ext.isOpera ? doc.body.clientWidth :
+	        	   Ext.isIE ? doc.documentElement.clientWidth : self.innerWidth;
+        },
+        
+        getY : function(el) {
+            return this.getXY(el)[1];
+        },
+
+        getX : function(el) {
+            return this.getXY(el)[0];
+        },
+
+        getXY : function(el) {
+            var p, 
+            	pe, 
+            	b,
+            	bt, 
+            	bl,     
+            	dbd,       	
+            	x = 0,
+            	y = 0, 
+            	scroll,
+            	hasAbsolute, 
+            	bd = (doc.body || doc.documentElement),
+            	ret = [0,0];
+            	
+            el = Ext.getDom(el);
+
+            if(el != bd){
+	            if (el.getBoundingClientRect) {
+	                b = el.getBoundingClientRect();
+	                scroll = fly(document).getScroll();
+	                ret = [b.left + scroll.left, b.top + scroll.top];
+	            } else {  
+		            p = el;		
+		            hasAbsolute = fly(el).isStyle("position", "absolute");
+		
+		            while (p) {
+			            pe = fly(p);		
+		                x += p.offsetLeft;
+		                y += p.offsetTop;
+		
+		                hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute");
+		                		
+		                if (Ext.isGecko) {		                    
+		                    y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0;
+		                    x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0;	
+		
+		                    if (p != el && !pe.isStyle('overflow','visible')) {
+		                        x += bl;
+		                        y += bt;
+		                    }
+		                }
+		                p = p.offsetParent;
+		            }
+		
+		            if (Ext.isSafari && hasAbsolute) {
+		                x -= bd.offsetLeft;
+		                y -= bd.offsetTop;
+		            }
+		
+		            if (Ext.isGecko && !hasAbsolute) {
+		                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).isStyle("display", "inline"))) {
+		                    x -= p.scrollLeft;
+		                    y -= p.scrollTop;
+		                }
+		                p = p.parentNode;
+		            }
+		            ret = [x,y];
+	            }
+         	}
+            return ret
+        },
+
+        setXY : function(el, xy) {
+            (el = Ext.fly(el, '_setXY')).position();
+            
+            var pts = el.translatePoints(xy),
+            	style = el.dom.style,
+            	pos;            	
+            
+            for (pos in pts) {	            
+	            if(!isNaN(pts[pos])) style[pos] = pts[pos] + "px"
+            }
+        },
+
+        setX : function(el, x) {
+            this.setXY(el, [x, false]);
+        },
+
+        setY : function(el, y) {
+            this.setXY(el, [false, y]);
+        }
+    };
+})();Ext.lib.Dom.getRegion = function(el) {
+    return Ext.lib.Region.getRegion(el);
+};Ext.lib.Event = function() {
+    var loadComplete = false,
+        listeners = [],
+        unloadListeners = [],
+        retryCount = 0,
+        onAvailStack = [],
+        _interval,
+        locked = false,
+        win = window,
+        doc = document,
+        
+        // constants            
+        POLL_RETRYS = 200,
+        POLL_INTERVAL = 20,
+        EL = 0,
+        TYPE = 1,
+        FN = 2,
+        WFN = 3,
+        OBJ = 3,
+        ADJ_SCOPE = 4,   
+        SCROLLLEFT = 'scrollLeft',
+        SCROLLTOP = 'scrollTop',
+        UNLOAD = 'unload',
+        MOUSEOVER = 'mouseover',
+        MOUSEOUT = 'mouseout',
+        // private
+        doAdd = function() {
+            var ret;
+            if (win.addEventListener) {
+                ret = function(el, eventName, fn, capture) {
+                    if (eventName == 'mouseenter') {
+                        fn = fn.createInterceptor(checkRelatedTarget);
+                        el.addEventListener(MOUSEOVER, fn, (capture));
+                    } else if (eventName == 'mouseleave') {
+                        fn = fn.createInterceptor(checkRelatedTarget);
+                        el.addEventListener(MOUSEOUT, fn, (capture));
+                    } else {
+                        el.addEventListener(eventName, fn, (capture));
+                    }
+                    return fn;
+                };
+            } else if (win.attachEvent) {
+                ret = function(el, eventName, fn, capture) {
+                    el.attachEvent("on" + eventName, fn);
+                    return fn;
+                };
+            } else {
+                ret = function(){};
+            }
+            return ret;
+        }(),    
+        // private
+        doRemove = function(){
+            var ret;
+            if (win.removeEventListener) {
+                ret = function (el, eventName, fn, capture) {
+                    if (eventName == 'mouseenter') {
+                        eventName = MOUSEOVER;
+                    } else if (eventName == 'mouseleave') {
+                        eventName = MOUSEOUT;
+                    }                        
+                    el.removeEventListener(eventName, fn, (capture));
+                };
+            } else if (win.detachEvent) {
+                ret = function (el, eventName, fn) {
+                    el.detachEvent("on" + eventName, fn);
+                };
+            } else {
+                ret = function(){};
+            }
+            return ret;
+        }();        
+
+    var isXUL = Ext.isGecko ? function(node){ 
+        return Object.prototype.toString.call(node) == '[object XULElement]';
+    } : function(){};
+        
+    var isTextNode = Ext.isGecko ? function(node){
+        try{
+            return node.nodeType == 3;
+        }catch(e) {
+            return false;
+        }
+
+    } : function(node){
+        return node.nodeType == 3;
+    };
+        
+    function checkRelatedTarget(e) {
+        var related = pub.getRelatedTarget(e);
+        return !(isXUL(related) || elContains(e.currentTarget,related));
+    }
+
+    function elContains(parent, child) {
+       if(parent && parent.firstChild){  
+         while(child) {
+            if(child === parent) {
+                return true;
+            }
+            try {
+                child = child.parentNode;
+            } catch(e) {
+                // In FF if you mouseout an text input element
+                // thats inside a div sometimes it randomly throws
+                // Permission denied to get property HTMLDivElement.parentNode
+                // See https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+                
+                return false;
+            }                
+            if(child && (child.nodeType != 1)) {
+                child = null;
+            }
+          }
+        }
+        return false;
+    }
+
+        
+    // private  
+    function _getCacheIndex(el, eventName, fn) {
+        var index = -1;
+        Ext.each(listeners, function (v,i) {
+            if(v && v[FN] == fn && v[EL] == el && v[TYPE] == eventName) {
+                index = i;
+            }
+        });
+        return index;
+    }
+                    
+    // private
+    function _tryPreloadAttach() {
+        var ret = false,                
+            notAvail = [],
+            element,
+            tryAgain = !loadComplete || (retryCount > 0);                       
+        
+        if (!locked) {
+            locked = true;
+            
+            Ext.each(onAvailStack, function (v,i,a){
+                if(v && (element = doc.getElementById(v.id))){
+                    if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) {
+                        element = v.override ? (v.override === true ? v.obj : v.override) : element;
+                        v.fn.call(element, v.obj);
+                        onAvailStack[i] = null;
+                    } else {
+                        notAvail.push(v);
+                    }
+                }   
+            });
+
+            retryCount = (notAvail.length === 0) ? 0 : retryCount - 1;
+
+            if (tryAgain) { 
+                startInterval();
+            } else {
+                clearInterval(_interval);
+                _interval = null;
+            }
+
+            ret = !(locked = false);
+        }
+        return ret;
+    }
+    
+    // private              
+    function startInterval() {            
+        if(!_interval){                    
+            var callback = function() {
+                _tryPreloadAttach();
+            };
+            _interval = setInterval(callback, POLL_INTERVAL);
+        }
+    }
+    
+    // private 
+    function getScroll() {
+        var dd = doc.documentElement, 
+            db = doc.body;
+        if(dd && (dd[SCROLLTOP] || dd[SCROLLLEFT])){
+            return [dd[SCROLLLEFT], dd[SCROLLTOP]];
+        }else if(db){
+            return [db[SCROLLLEFT], db[SCROLLTOP]];
+        }else{
+            return [0, 0];
+        }
+    }
+        
+    // private
+    function getPageCoord (ev, xy) {
+        ev = ev.browserEvent || ev;
+        var coord  = ev['page' + xy];
+        if (!coord && coord !== 0) {
+            coord = ev['client' + xy] || 0;
+
+            if (Ext.isIE) {
+                coord += getScroll()[xy == "X" ? 0 : 1];
+            }
+        }
+
+        return coord;
+    }
+
+    var pub =  {
+        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 = POLL_RETRYS;
+            startInterval();
+        },
+
+
+        addListener: function(el, eventName, fn) {
+            var ret;                
+            el = Ext.getDom(el);                
+            if (el && fn) {
+                if (UNLOAD == eventName) {
+                    ret = !!(unloadListeners[unloadListeners.length] = [el, eventName, fn]);                    
+                } else {
+                    listeners.push([el, eventName, fn, ret = doAdd(el, eventName, fn, false)]);
+                }
+            }
+            return !!ret;
+        },
+
+        removeListener: function(el, eventName, fn) {
+            var ret = false,
+                index, 
+                cacheItem;
+
+            el = Ext.getDom(el);
+
+            if(!fn) {                   
+                ret = this.purgeElement(el, false, eventName);
+            } else if (UNLOAD == eventName) {   
+                Ext.each(unloadListeners, function(v, i, a) {
+                    if( v && v[0] == el && v[1] == eventName && v[2] == fn) {
+                        unloadListeners.splice(i, 1);
+                        ret = true;
+                    }
+                });
+            } else {    
+                index = arguments[3] || _getCacheIndex(el, eventName, fn);
+                cacheItem = listeners[index];
+                
+                if (el && cacheItem) {
+                    doRemove(el, eventName, cacheItem[WFN], false);     
+                    cacheItem[WFN] = cacheItem[FN] = null;                       
+                    listeners.splice(index, 1);     
+                    ret = true;
+                }
+            }
+            return ret;
+        },
+
+        getTarget : function(ev) {
+            ev = ev.browserEvent || ev;                
+            return this.resolveTextNode(ev.target || ev.srcElement);
+        },
+
+        resolveTextNode : function(node) {
+            return node && !isXUL(node) && isTextNode(node) ? node.parentNode : node;
+        },
+
+        getRelatedTarget : function(ev) {
+            ev = ev.browserEvent || ev;
+            return this.resolveTextNode(ev.relatedTarget || 
+                    (ev.type == MOUSEOUT ? ev.toElement :
+                     ev.type == MOUSEOVER ? ev.fromElement : null));
+        },
+        
+        getPageX : function(ev) {
+            return getPageCoord(ev, "X");
+        },
+
+        getPageY : function(ev) {
+            return getPageCoord(ev, "Y");
+        },
+
+
+        getXY : function(ev) {                             
+            return [this.getPageX(ev), this.getPageY(ev)];
+        },
+
+// Is this useful?  Removing to save space unless use case exists.
+//             getTime: function(ev) {
+//                 ev = ev.browserEvent || ev;
+//                 if (!ev.time) {
+//                     var t = new Date().getTime();
+//                     try {
+//                         ev.time = t;
+//                     } catch(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) {
+            e = e || win.event;
+            if (!e) {
+                var c = this.getEvent.caller;
+                while (c) {
+                    e = c.arguments[0];
+                    if (e && Event == e.constructor) {
+                        break;
+                    }
+                    c = c.caller;
+                }
+            }
+            return e;
+        },
+
+        getCharCode : function(ev) {
+            ev = ev.browserEvent || ev;
+            return ev.charCode || ev.keyCode || 0;
+        },
+
+        //clearCache: function() {},
+
+        _load : function(e) {
+            loadComplete = true;
+            var EU = Ext.lib.Event;    
+            if (Ext.isIE && e !== true) {
+        // IE8 complains that _load is null or not an object
+        // so lets remove self via arguments.callee
+                doRemove(win, "load", arguments.callee);
+            }
+        },            
+        
+        purgeElement : function(el, recurse, eventName) {
+            var me = this;
+            Ext.each( me.getListeners(el, eventName), function(v){
+                if(v){
+                    me.removeListener(el, v.type, v.fn);
+                }
+            });
+
+            if (recurse && el && el.childNodes) {
+                Ext.each(el.childNodes, function(v){
+                    me.purgeElement(v, recurse, eventName);
+                });
+            }
+        },
+
+        getListeners : function(el, eventName) {
+            var me = this,
+                results = [], 
+                searchLists;
+
+            if (eventName){  
+                searchLists = eventName == UNLOAD ? unloadListeners : listeners;
+            }else{
+                searchLists = listeners.concat(unloadListeners);
+            }
+
+            Ext.each(searchLists, function(v, i){
+                if (v && v[EL] == el && (!eventName || eventName == v[TYPE])) {
+                    results.push({
+                                type:   v[TYPE],
+                                fn:     v[FN],
+                                obj:    v[OBJ],
+                                adjust: v[ADJ_SCOPE],
+                                index:  i
+                            });
+                }   
+            });                
+
+            return results.length ? results : null;
+        },
+
+        _unload : function(e) {
+             var EU = Ext.lib.Event, 
+                i, 
+                j, 
+                l, 
+                len, 
+                index,
+                scope;
+                
+
+            Ext.each(unloadListeners, function(v) {
+                if (v) {
+                    try{
+                        scope =  v[ADJ_SCOPE] ? (v[ADJ_SCOPE] === true ? v[OBJ] : v[ADJ_SCOPE]) :  win; 
+                        v[FN].call(scope, EU.getEvent(e), v[OBJ]);
+                    }catch(ex){}
+                }   
+            });     
+
+            unloadListeners = null;
+
+            if(listeners && (j = listeners.length)){                    
+                while(j){                        
+                    if((l = listeners[index = --j])){
+                        EU.removeListener(l[EL], l[TYPE], l[FN], index);
+                    }                        
+                }
+                //EU.clearCache();
+            }
+
+            doRemove(win, UNLOAD, EU._unload);
+        }            
+    };        
+    
+    // Initialize stuff.
+    pub.on = pub.addListener;
+    pub.un = pub.removeListener;
+    if (doc && doc.body) {
+        pub._load(true);
+    } else {
+        doAdd(win, "load", pub._load);
+    }
+    doAdd(win, UNLOAD, pub._unload);    
+    _tryPreloadAttach();
+    
+    return pub;
+}();/*
+ * 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.Ajax = function() {	    
+	    var activeX = ['MSXML2.XMLHTTP.3.0',
+			           'MSXML2.XMLHTTP',
+			           'Microsoft.XMLHTTP'],
+            CONTENTTYPE = 'Content-Type';
+			           
+		// private
+		function setHeader(o) {
+	        var conn = o.conn,
+	        	prop;
+	        
+	        function setTheHeaders(conn, headers){
+		     	for (prop in headers) {
+                    if (headers.hasOwnProperty(prop)) {
+                        conn.setRequestHeader(prop, headers[prop]);
+                    }
+                }   
+	        }		
+	        
+            if (pub.defaultHeaders) {
+	            setTheHeaders(conn, pub.defaultHeaders);
+            }
+
+            if (pub.headers) {
+				setTheHeaders(conn, pub.headers);
+                pub.headers = null;                
+            }
+        }    
+        
+        // private
+        function createExceptionObject(tId, callbackArg, isAbort, isTimeout) {	        
+            return {
+	            tId : tId,
+	            status : isAbort ? -1 : 0,
+	            statusText : isAbort ? 'transaction aborted' : 'communication failure',
+                    isAbort: true,
+                    isTimeout: true,
+	            argument : callbackArg
+            };
+        }  
+        
+        // private 
+        function initHeader(label, value) {         
+			(pub.headers = pub.headers || {})[label] = value;			            
+        }
+	    
+        // private
+        function createResponseObject(o, callbackArg) {
+            var headerObj = {},
+                headerStr,              
+                conn = o.conn,
+                t,
+                s;
+
+            try {
+                headerStr = o.conn.getAllResponseHeaders();   
+                Ext.each(headerStr.replace(/\r\n/g, '\n').split('\n'), function(v){
+                    t = v.indexOf(':');
+                    if(t >= 0){
+                        s = v.substr(0, t).toLowerCase();
+                        if(v.charAt(t + 1) == ' '){
+                            ++t;
+                        }
+                        headerObj[s] = v.substr(t + 1);
+                    }
+                });
+            } catch(e) {}
+                        
+            return {
+                tId : o.tId,
+                status : conn.status,
+                statusText : conn.statusText,
+                getResponseHeader : function(header){return headerObj[header.toLowerCase()];},
+                getAllResponseHeaders : function(){return headerStr},
+                responseText : conn.responseText,
+                responseXML : conn.responseXML,
+                argument : callbackArg
+            };
+        }
+        
+        // private
+        function releaseObject(o) {
+            o.conn = null;
+            o = null;
+        }        
+	    
+        // private
+        function handleTransactionResponse(o, callback, isAbort, isTimeout) {
+            if (!callback) {
+                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) || (Ext.isIE && httpStatus == 1223)) {
+                responseObject = 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 = createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false), isTimeout);
+                        if (callback.failure) {
+                            if (!callback.scope) {
+                                callback.failure(responseObject);
+                            }
+                            else {
+                                callback.failure.apply(callback.scope, [responseObject]);
+                            }
+                        }
+                        break;
+                    default:
+                        responseObject = createResponseObject(o, callback.argument);
+                        if (callback.failure) {
+                            if (!callback.scope) {
+                                callback.failure(responseObject);
+                            }
+                            else {
+                                callback.failure.apply(callback.scope, [responseObject]);
+                            }
+                        }
+                }
+            }
+
+            releaseObject(o);
+            responseObject = null;
+        }  
+        
+        // private
+        function handleReadyState(o, callback){
+	    callback = callback || {};
+            var conn = o.conn,
+            	tId = o.tId,
+            	poll = pub.poll,
+		cbTimeout = callback.timeout || null;
+
+            if (cbTimeout) {
+                pub.timeout[tId] = setTimeout(function() {
+                    pub.abort(o, callback, true);
+                }, cbTimeout);
+            }
+
+            poll[tId] = setInterval(
+                function() {
+                    if (conn && conn.readyState == 4) {
+                        clearInterval(poll[tId]);
+                        poll[tId] = null;
+
+                        if (cbTimeout) {
+                            clearTimeout(pub.timeout[tId]);
+                            pub.timeout[tId] = null;
+                        }
+
+                        handleTransactionResponse(o, callback);
+                    }
+                },
+                pub.pollInterval);
+        }
+        
+        // private
+        function asyncRequest(method, uri, callback, postData) {
+            var o = getConnectionObject() || null;
+
+            if (o) {
+                o.conn.open(method, uri, true);
+
+                if (pub.useDefaultXhrHeader) {                    
+                	initHeader('X-Requested-With', pub.defaultXhrHeader);
+                }
+
+                if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])){
+                    initHeader(CONTENTTYPE, pub.defaultPostHeader);
+                }
+
+                if (pub.defaultHeaders || pub.headers) {
+                    setHeader(o);
+                }
+
+                handleReadyState(o, callback);
+                o.conn.send(postData || null);
+            }
+            return o;
+        }
+        
+        // private
+        function getConnectionObject() {
+            var o;      	
+
+            try {
+                if (o = createXhrObject(pub.transactionId)) {
+                    pub.transactionId++;
+                }
+            } catch(e) {
+            } finally {
+                return o;
+            }
+        }
+	       
+        // private
+        function createXhrObject(transactionId) {
+            var http;
+            	
+            try {
+                http = new XMLHttpRequest();                
+            } catch(e) {
+                for (var i = 0; i < activeX.length; ++i) {	            
+                    try {
+                        http = new ActiveXObject(activeX[i]);                        
+                        break;
+                    } catch(e) {}
+                }
+            } finally {
+                return {conn : http, tId : transactionId};
+            }
+        }
+	         
+	    var pub = {
+	        request : function(method, uri, cb, data, options) {
+			    if(options){
+			        var me = this,		        
+			        	xmlData = options.xmlData,
+			        	jsonData = options.jsonData,
+                        hs;
+			        	
+			        Ext.applyIf(me, options);	        
+		            
+		            if(xmlData || jsonData){
+                        hs = me.headers;
+                        if(!hs || !hs[CONTENTTYPE]){
+			                initHeader(CONTENTTYPE, xmlData ? 'text/xml' : 'application/json');
+                        }
+			            data = xmlData || (Ext.isObject(jsonData) ? Ext.encode(jsonData) : jsonData);
+			        }
+			    }		    		    
+			    return asyncRequest(method || options.method || "POST", uri, cb, data);
+	        },
+	
+	        serializeForm : function(form) {
+		        var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements,
+	            	hasSubmit = false,
+	            	encoder = encodeURIComponent,
+		        	element,
+	            	options, 
+	            	name, 
+	            	val,             	
+	            	data = '',
+	            	type;
+	            	
+		        Ext.each(fElements, function(element) {		            
+	                name = element.name;	             
+					type = element.type;
+					
+	                if (!element.disabled && name){
+		                if(/select-(one|multiple)/i.test(type)){			                
+				            Ext.each(element.options, function(opt) {
+					            if (opt.selected) {
+						            data += String.format("{0}={1}&", 						            					  
+						            					 encoder(name),						            					 
+						            					  (opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified) ? opt.value : opt.text);
+                                }								
+                            });
+		                } else if(!/file|undefined|reset|button/i.test(type)) {
+			                if(!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)){
+                                    
+                                data += encoder(name) + '=' + encoder(element.value) + '&';                     
+                                hasSubmit = /submit/i.test(type);    
+                            } 		                
+		                } 
+	                }
+	            });            
+	            return data.substr(0, data.length - 1);
+	        },
+	        
+	        useDefaultHeader : true,
+	        defaultPostHeader : 'application/x-www-form-urlencoded; charset=UTF-8',
+	        useDefaultXhrHeader : true,
+	        defaultXhrHeader : 'XMLHttpRequest',        
+	        poll : {},
+	        timeout : {},
+	        pollInterval : 50,
+	        transactionId : 0,
+	        
+//	This is never called - Is it worth exposing this?  		        
+// 	        setProgId : function(id) {
+// 	            activeX.unshift(id);
+// 	        },
+
+//	This is never called - Is it worth exposing this?  	
+// 	        setDefaultPostHeader : function(b) {
+// 	            this.useDefaultHeader = b;
+// 	        },
+	        
+//	This is never called - Is it worth exposing this?  	
+// 	        setDefaultXhrHeader : function(b) {
+// 	            this.useDefaultXhrHeader = b;
+// 	        },
+
+//	This is never called - Is it worth exposing this?        	
+// 	        setPollingInterval : function(i) {
+// 	            if (typeof i == 'number' && isFinite(i)) {
+// 	                this.pollInterval = i;
+// 	            }
+// 	        },
+	        
+//	This is never called - Is it worth exposing this?
+// 	        resetDefaultHeaders : function() {
+// 	            this.defaultHeaders = null;
+// 	        },
+	
+	        abort : function(o, callback, isTimeout) {
+		        var me = this,
+		        	tId = o.tId,
+		        	isAbort = false;
+		        
+	            if (me.isCallInProgress(o)) {
+	                o.conn.abort();
+	                clearInterval(me.poll[tId]);
+	               	me.poll[tId] = null;
+	                if (isTimeout) {
+	                    me.timeout[tId] = null;
+	                }
+					
+	                handleTransactionResponse(o, callback, (isAbort = true), isTimeout);                
+	            }
+	            return isAbort;
+	        },
+	
+	        isCallInProgress : function(o) {
+	            // if there is a connection and readyState is not 0 or 4
+	            return o.conn && !{0:true,4:true}[o.conn.readyState];	        
+	        }
+	    };
+	    return pub;
+    }();	Ext.lib.Region = function(t, r, b, l) {
+		var me = this;
+        me.top = t;
+        me[1] = t;
+        me.right = r;
+        me.bottom = b;
+        me.left = l;
+        me[0] = l;
+    };
+
+    Ext.lib.Region.prototype = {
+        contains : function(region) {
+	        var me = this;
+            return ( region.left >= me.left &&
+                     region.right <= me.right &&
+                     region.top >= me.top &&
+                     region.bottom <= me.bottom );
+
+        },
+
+        getArea : function() {
+	        var me = this;
+            return ( (me.bottom - me.top) * (me.right - me.left) );
+        },
+
+        intersect : function(region) {
+            var me = this,
+            	t = Math.max(me.top, region.top),
+            	r = Math.min(me.right, region.right),
+            	b = Math.min(me.bottom, region.bottom),
+            	l = Math.max(me.left, region.left);
+
+            if (b >= t && r >= l) {
+                return new Ext.lib.Region(t, r, b, l);
+            }
+        },
+        
+        union : function(region) {
+	        var me = this,
+            	t = Math.min(me.top, region.top),
+            	r = Math.max(me.right, region.right),
+            	b = Math.max(me.bottom, region.bottom),
+            	l = Math.min(me.left, region.left);
+
+            return new Ext.lib.Region(t, r, b, l);
+        },
+
+        constrainTo : function(r) {
+	        var me = this;
+            me.top = me.top.constrain(r.top, r.bottom);
+            me.bottom = me.bottom.constrain(r.top, r.bottom);
+            me.left = me.left.constrain(r.left, r.right);
+            me.right = me.right.constrain(r.left, r.right);
+            return me;
+        },
+
+        adjust : function(t, l, b, r) {
+	        var me = this;
+            me.top += t;
+            me.left += l;
+            me.right += r;
+            me.bottom += b;
+            return me;
+        }
+    };
+
+    Ext.lib.Region.getRegion = function(el) {
+        var p = Ext.lib.Dom.getXY(el),
+        	t = p[1],
+        	r = p[0] + el.offsetWidth,
+        	b = p[1] + el.offsetHeight,
+        	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];
+        }
+        var me = this;
+        me.x = me.right = me.left = me[0] = x;
+        me.y = me.top = me.bottom = me[1] = y;
+    };
+
+    Ext.lib.Point.prototype = new Ext.lib.Region();
+(function(){    
+    var EXTLIB = Ext.lib,
+        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,
+        isset = function(v){
+            return typeof v !== 'undefined';
+        },
+        now = function(){
+            return new Date();    
+        };
+        
+    EXTLIB.Anim = {
+        motion : function(el, args, duration, easing, cb, scope) {
+            return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion);
+        },
+
+        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() {
+                if(Ext.isFunction(cb)){
+                    cb.call(scope);
+                }
+            });
+            return anim;
+        }
+    };
+    
+    EXTLIB.AnimBase = function(el, attributes, duration, method) {
+        if (el) {
+            this.init(el, attributes, duration, method);
+        }
+    };
+
+    EXTLIB.AnimBase.prototype = {
+        doMethod: function(attr, start, end) {
+            var me = this;
+            return me.method(me.curFrame, start, end - start, me.totalFrames);
+        },
+
+
+        setAttr: function(attr, val, unit) {
+            if (noNegatives.test(attr) && val < 0) {
+                val = 0;
+            }
+            Ext.fly(this.el, '_anim').setStyle(attr, val + unit);
+        },
+
+
+        getAttr: function(attr) {
+            var el = Ext.fly(this.el),
+                val = el.getStyle(attr),
+                a = offsetAttribute.exec(attr) || []
+
+            if (val !== 'auto' && !offsetUnit.test(val)) {
+                return parseFloat(val);
+            }
+
+            return (!!(a[2]) || (el.getStyle('position') == 'absolute' && !!(a[3]))) ? el.dom['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)] : 0;
+        },
+
+
+        getDefaultUnit: function(attr) {
+            return defaultUnit.test(attr) ? 'px' : '';
+        },
+
+        animateX : function(callback, scope) {
+            var me = this,
+                f = function() {
+                me.onComplete.removeListener(f);
+                if (Ext.isFunction(callback)) {
+                    callback.call(scope || me, me);
+                }
+            };
+            me.onComplete.addListener(f, me);
+            me.animate();
+        },
+
+
+        setRunAttr: function(attr) {            
+            var me = this,
+                a = this.attributes[attr],
+                to = a.to,
+                by = a.by,
+                from = a.from,
+                unit = a.unit,
+                ra = (this.runAttrs[attr] = {}),
+                end;
+
+            if (!isset(to) && !isset(by)){
+                return false;
+            }
+
+            var start = isset(from) ? from : me.getAttr(attr);
+            if (isset(to)) {
+                end = to;
+            }else if(isset(by)) {
+                if (Ext.isArray(start)){
+                    end = [];
+                    Ext.each(start, function(v, i){
+                        end[i] = v + by[i];
+                    });
+                }else{
+                    end = start + by;
+                }
+            }
+
+            Ext.apply(ra, {
+                start: start,
+                end: end,
+                unit: isset(unit) ? unit : me.getDefaultUnit(attr)
+            });
+        },
+
+
+        init: function(el, attributes, duration, method) {
+            var me = this,
+                actualFrames = 0,
+                mgr = EXTLIB.AnimMgr;
+                
+            Ext.apply(me, {
+                isAnimated: false,
+                startTime: null,
+                el: Ext.getDom(el),
+                attributes: attributes || {},
+                duration: duration || 1,
+                method: method || EXTLIB.Easing.easeNone,
+                useSec: true,
+                curFrame: 0,
+                totalFrames: mgr.fps,
+                runAttrs: {},
+                animate: function(){
+                    var me = this,
+                        d = me.duration;
+                    
+                    if(me.isAnimated){
+                        return false;
+                    }
+
+                    me.curFrame = 0;
+                    me.totalFrames = me.useSec ? Math.ceil(mgr.fps * d) : d;
+                    mgr.registerElement(me); 
+                },
+                
+                stop: function(finish){
+                    var me = this;
+                
+                    if(finish){
+                        me.curFrame = me.totalFrames;
+                        me._onTween.fire();
+                    }
+                    mgr.stop(me);
+                }
+            });
+
+            var onStart = function(){
+                var me = this,
+                    attr;
+                
+                me.onStart.fire();
+                me.runAttrs = {};
+                for(attr in this.attributes){
+                    this.setRunAttr(attr);
+                }
+
+                me.isAnimated = true;
+                me.startTime = now();
+                actualFrames = 0;
+            };
+
+
+            var onTween = function(){
+                var me = this;
+
+                me.onTween.fire({
+                    duration: now() - me.startTime,
+                    curFrame: me.curFrame
+                });
+
+                var ra = me.runAttrs;
+                for (var attr in ra) {
+                    this.setAttr(attr, me.doMethod(attr, ra[attr].start, ra[attr].end), ra[attr].unit);
+                }
+
+                ++actualFrames;
+            };
+
+            var onComplete = function() {
+                var me = this,
+                    actual = (now() - me.startTime) / 1000,
+                    data = {
+                        duration: actual,
+                        frames: actualFrames,
+                        fps: actualFrames / actual
+                    };
+
+                me.isAnimated = false;
+                actualFrames = 0;
+                me.onComplete.fire(data);
+            };
+
+            me.onStart = new Ext.util.Event(me);
+            me.onTween = new Ext.util.Event(me);            
+            me.onComplete = new Ext.util.Event(me);
+            (me._onStart = new Ext.util.Event(me)).addListener(onStart);
+            (me._onTween = new Ext.util.Event(me)).addListener(onTween);
+            (me._onComplete = new Ext.util.Event(me)).addListener(onComplete); 
+        }
+    };
+
+
+    Ext.lib.AnimMgr = new function() {
+        var me = this,
+            thread = null,
+            queue = [],
+            tweenCount = 0;
+
+
+        Ext.apply(me, {
+            fps: 1000,
+            delay: 1,
+            registerElement: function(tween){
+                queue.push(tween);
+                ++tweenCount;
+                tween._onStart.fire();
+                me.start();
+            },
+            
+            unRegister: function(tween, index){
+                tween._onComplete.fire();
+                index = index || getIndex(tween);
+                if (index != -1) {
+                    queue.splice(index, 1);
+                }
+
+                if (--tweenCount <= 0) {
+                    me.stop();
+                }
+            },
+            
+            start: function(){
+                if(thread === null){
+                    thread = setInterval(me.run, me.delay);
+                }
+            },
+            
+            stop: function(tween){
+                if(!tween){
+                    clearInterval(thread);
+                    for(var i = 0, len = queue.length; i < len; ++i){
+                        if(queue[0].isAnimated){
+                            me.unRegister(queue[0], 0);
+                        }
+                    }
+
+                    queue = [];
+                    thread = null;
+                    tweenCount = 0;
+                }else{
+                    me.unRegister(tween);
+                }
+            },
+            
+            run: function(){
+                var tf;
+                Ext.each(queue, function(tween){
+                    if(tween && tween.isAnimated){
+                        tf = tween.totalFrames;
+                        if(tween.curFrame < tf || tf === null){
+                            ++tween.curFrame;
+                            if(tween.useSec){
+                                correctFrame(tween);
+                            }
+                            tween._onTween.fire();
+                        }else{
+                            me.stop(tween);
+                        }
+                    }
+                }, me);
+            }
+        });
+
+        var getIndex = function(anim) {
+            var out = -1;
+            Ext.each(queue, function(item, idx){
+                if(item == anim){
+                    out = idx;
+                    return false;
+                }
+            });
+            return out;
+        };
+
+
+        var correctFrame = function(tween) {
+            var frames = tween.totalFrames,
+                frame = tween.curFrame,
+                duration = tween.duration,
+                expected = (frame * duration * 1000 / frames),
+                elapsed = (now() - tween.startTime),
+                tweak = 0;
+
+            if(elapsed < duration * 1000){
+                tweak = Math.round((elapsed / expected - 1) * frame);
+            }else{
+                tweak = frames - (frame + 1);
+            }
+            if(tweak > 0 && isFinite(tweak)){
+                if(tween.curFrame + tweak >= frames){
+                    tweak = frames - (frame + 1);
+                }
+                tween.curFrame += tweak;
+            }
+        };
+    };
+
+    EXTLIB.Bezier = new function() {
+
+        this.getPosition = function(points, t) {
+            var n = points.length,
+                tmp = [],
+                c = 1 - t, 
+                i,
+                j;
+
+            for (i = 0; i < n; ++i) {
+                tmp[i] = [points[i][0], points[i][1]];
+            }
+
+            for (j = 1; j < n; ++j) {
+                for (i = 0; i < n - j; ++i) {
+                    tmp[i][0] = c * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];
+                    tmp[i][1] = c * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1];
+                }
+            }
+
+            return [ tmp[0][0], tmp[0][1] ];
+
+        };
+    };
+
+
+    EXTLIB.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;
+        }
+    };
+
+    (function() {
+        EXTLIB.Motion = function(el, attributes, duration, method) {
+            if (el) {
+                EXTLIB.Motion.superclass.constructor.call(this, el, attributes, duration, method);
+            }
+        };
+
+        Ext.extend(EXTLIB.Motion, Ext.lib.AnimBase);
+
+        var superclass = EXTLIB.Motion.superclass,
+            proto = EXTLIB.Motion.prototype,
+            pointsRe = /^points$/i;
+
+        Ext.apply(EXTLIB.Motion.prototype, {
+            setAttr: function(attr, val, unit){
+                var me = this,
+                    setAttr = superclass.setAttr;
+                    
+                if (pointsRe.test(attr)) {
+                    unit = unit || 'px';
+                    setAttr.call(me, 'left', val[0], unit);
+                    setAttr.call(me, 'top', val[1], unit);
+                } else {
+                    setAttr.call(me, attr, val, unit);
+                }
+            },
+            
+            getAttr: function(attr){
+                var me = this,
+                    getAttr = superclass.getAttr;
+                    
+                return pointsRe.test(attr) ? [getAttr.call(me, 'left'), getAttr.call(me, 'top')] : getAttr.call(me, attr);
+            },
+            
+            doMethod: function(attr, start, end){
+                var me = this;
+                
+                return pointsRe.test(attr)
+                        ? EXTLIB.Bezier.getPosition(me.runAttrs[attr], me.method(me.curFrame, 0, 100, me.totalFrames) / 100)
+                        : superclass.doMethod.call(me, attr, start, end);
+            },
+            
+            setRunAttr: function(attr){
+                if(pointsRe.test(attr)){
+                    
+                    var me = this,
+                        el = this.el,
+                        points = this.attributes.points,
+                        control = points.control || [],
+                        from = points.from,
+                        to = points.to,
+                        by = points.by,
+                        DOM = EXTLIB.Dom,
+                        start,
+                        i,
+                        end,
+                        len,
+                        ra;
+                  
+
+                    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();
+                    DOM.setXY(el, isset(from) ? from : DOM.getXY(el));
+                    start = me.getAttr('points');
+
+
+                    if(isset(to)){
+                        end = translateValues.call(me, to, start);
+                        for (i = 0,len = control.length; i < len; ++i) {
+                            control[i] = translateValues.call(me, control[i], start);
+                        }
+                    } else if (isset(by)) {
+                        end = [start[0] + by[0], start[1] + by[1]];
+
+                        for (i = 0,len = control.length; i < len; ++i) {
+                            control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ];
+                        }
+                    }
+
+                    ra = this.runAttrs[attr] = [start];
+                    if (control.length > 0) {
+                        ra = ra.concat(control);
+                    }
+
+                    ra[ra.length] = end;
+                }else{
+                    superclass.setRunAttr.call(this, attr);
+                }
+            }
+        });
+
+        var translateValues = function(val, start) {
+            var pageXY = EXTLIB.Dom.getXY(this.el);
+            return [val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1]];
+        };
+    })();
+})();// Easing functions
+(function(){
+	// shortcuts to aid compression
+	var abs = Math.abs,
+	 	pi = Math.PI,
+	 	asin = Math.asin,
+	 	pow = Math.pow,
+	 	sin = Math.sin,
+		EXTLIB = Ext.lib;
+	 	
+    Ext.apply(EXTLIB.Easing, {
+        
+        easeBoth: function (t, b, c, d) {
+	        return ((t /= d / 2) < 1)  ?  c / 2 * t * t + b  :  -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) {
+            return ((t /= d / 2) < 1)  ?  c / 2 * t * t * t * t + b  :  -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+        },
+
+        elasticIn: function (t, b, c, d, a, p) {
+	        if (t == 0 || (t /= d) == 1) {
+                return t == 0 ? b : b + c;
+            }	            
+            p = p || (d * .3);	            
+
+			var s;
+			if (a >= abs(c)) {
+				s = p / (2 * pi) * asin(c / a);
+			} else {
+				a = c;
+				s = p / 4;
+			}
+	
+            return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b;
+            	      
+        }, 	
+	
+		elasticOut: function (t, b, c, d, a, p) {
+	        if (t == 0 || (t /= d) == 1) {
+                return t == 0 ? b : b + c;
+            }	            
+            p = p || (d * .3);	            
+
+			var s;
+			if (a >= abs(c)) {
+				s = p / (2 * pi) * asin(c / a);
+			} else {
+				a = c;
+				s = p / 4;
+			}
+	
+            return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b;	 
+        }, 	
+	
+        elasticBoth: function (t, b, c, d, a, p) {
+            if (t == 0 || (t /= d / 2) == 2) {
+                return t == 0 ? b : b + c;
+            }		         	
+	            
+            p = p || (d * (.3 * 1.5)); 	            
+
+            var s;
+            if (a >= abs(c)) {
+	            s = p / (2 * pi) * asin(c / a);
+            } else {
+	            a = c;
+                s = p / 4;
+            }
+
+            return t < 1 ?
+            	   	-.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b :
+                    a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b;
+        },
+
+        backIn: function (t, b, c, d, s) {
+            s = s ||  1.70158; 	            
+            return c * (t /= d) * t * ((s + 1) * t - s) + b;
+        },
+
+
+        backOut: function (t, b, c, d, s) {
+            if (!s) {
+                s = 1.70158;
+            }
+            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
+        },
+
+
+        backBoth: function (t, b, c, d, s) {
+            s = s || 1.70158; 	            
+
+            return ((t /= d / 2 ) < 1) ?
+                    c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : 	            
+            		c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
+        },
+
+
+        bounceIn: function (t, b, c, d) {
+            return c - EXTLIB.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) {
+            return (t < d / 2) ?
+                   EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : 
+            	   EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
+        }
+    });
+})();
+
+(function() {
+    var EXTLIB = Ext.lib;
+	// Color Animation
+	EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) {
+	    return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim);
+	}
+	
+    EXTLIB.ColorAnim = function(el, attributes, duration, method) {
+        EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+    };
+
+    Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase);
+
+    var superclass = EXTLIB.ColorAnim.superclass,
+    	colorRE = /color$/i,
+    	transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/,
+        rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,
+        hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,
+        hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,
+        isset = function(v){
+            return typeof v !== 'undefined';
+        }
+         	
+   	// private	
+    function parseColor(s) {	
+        var pi = parseInt,
+            base,
+            out = null,
+            c;
+        
+	    if (s.length == 3) {
+            return s;
+        }
+        
+        Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){
+            base = (idx % 2 == 0) ? 16 : 10;
+            c = re.exec(s);
+            if(c && c.length == 4){
+                out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)];
+                return false;
+            }
+        });
+        return out;
+    }	
+
+    Ext.apply(EXTLIB.ColorAnim.prototype, {
+        getAttr : function(attr) {
+            var me = this,
+                el = me.el,
+                val;                
+            if(colorRE.test(attr)){
+                while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){
+                    el = el.parentNode;
+                    val = "fff";
+                }
+            }else{
+                val = superclass.getAttr.call(me, attr);
+            }
+            return val;
+        },
+
+        doMethod : function(attr, start, end) {
+            var me = this,
+            	val,
+            	floor = Math.floor;            
+
+            if(colorRE.test(attr)){
+                val = [];
+             
+	            Ext.each(start, function(v, i) {
+                    val[i] = superclass.doMethod.call(me, attr, v, end[i]);
+                });
+
+                val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')';
+            }else{
+                val = superclass.doMethod.call(me, attr, start, end);
+            }
+            return val;
+        },
+
+        setRunAttr : function(attr) {
+            var me = this,
+                a = me.attributes[attr],
+                to = a.to,
+                by = a.by,
+                ra;
+                
+            superclass.setRunAttr.call(me, attr);
+            ra = me.runAttrs[attr];
+            if(colorRE.test(attr)){
+                var start = parseColor(ra.start),
+                    end = parseColor(ra.end);
+
+                if(!isset(to) && isset(by)){
+                    end = parseColor(by);
+                    Ext.each(start, function(item, i){
+                        end[i] = item + end[i];
+                    });
+                }
+                ra.start = start;
+                ra.end = end;
+            }
+        }
+	});
+})();	
+
+	
+(function() {
+	    // Scroll Animation	
+    var EXTLIB = Ext.lib;
+	EXTLIB.Anim.scroll = function(el, args, duration, easing, cb, scope) {	        
+	    return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.Scroll);
+	}
+	
+    EXTLIB.Scroll = function(el, attributes, duration, method) {
+        if(el){
+            EXTLIB.Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+    Ext.extend(EXTLIB.Scroll, EXTLIB.ColorAnim);
+
+    var superclass = EXTLIB.Scroll.superclass,
+    	SCROLL = 'scroll';
+
+    Ext.apply(EXTLIB.Scroll.prototype, {
+
+        doMethod : function(attr, start, end) {
+            var val,
+            	me = this,
+            	curFrame = me.curFrame,
+            	totalFrames = me.totalFrames;
+
+            if(attr == SCROLL){
+                val = [me.method(curFrame, start[0], end[0] - start[0], totalFrames),
+                       me.method(curFrame, start[1], end[1] - start[1], totalFrames)];
+            }else{
+                val = superclass.doMethod.call(me, attr, start, end);
+            }
+            return val;
+        },
+
+        getAttr : function(attr) {
+            var me = this;
+
+            if (attr == SCROLL) {
+                return [me.el.scrollLeft, me.el.scrollTop];
+            }else{
+                return superclass.getAttr.call(me, attr);
+            }
+        },
+
+        setAttr : function(attr, val, unit) {
+            var me = this;
+
+            if(attr == SCROLL){
+                me.el.scrollLeft = val[0];
+                me.el.scrollTop = val[1];
+            }else{
+                superclass.setAttr.call(me, attr, val, unit);
+            }
+        }
+    });
+})();	
+	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);
+    }
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/ext/ext-base.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,t=Object.prototype.toString,s=function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(t.call(e))){return true}return((e.nextNode||e.item)&&Ext.isNumber(e.length))},u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u)},i=document,l=i.compatMode=="CSS1Compat",B=z(/opera/),h=z(/chrome/),v=z(/webkit/),y=!h&&z(/safari/),f=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),r=!B&&z(/msie/),p=r&&z(/msie 7/),o=r&&z(/msie 8/),q=r&&!p&&!o,n=!v&&z(/gecko/),d=n&&z(/rv:1\.8/),a=n&&z(/rv:1\.9/),w=r&&!l,A=z(/windows|win32/),k=z(/macintosh|mac os x/),j=z(/adobeair/),m=z(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:"javascript:false",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(Ext.isEmpty(D[e])){D[e]=E[e]}}}return D},id:function(e,D){return(e=Ext.getDom(e)||{}).id=e.id||(D||"ext-gen")+(++g)},extend:function(){var D=function(F){for(var E in F){this[E]=F[E]}};var e=Object.prototype.constructor;return function(K,H,J){if(Ext.isObject(H)){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments)}}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H}K.override=function(F){Ext.override(K,F)};I.superclass=I.supr=(function(){return E});I.override=D;Ext.override(K,J);K.extend=function(F){Ext.extend(K,F)};return K}}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.toString!=e.toString){D.toString=E.toString}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{}})});return D},urlEncode:function(I,H){var F,D=[],E,G=encodeURIComponent;for(E in I){F=!Ext.isDefined(I[E]);Ext.each(F?E:I[E],function(J,e){D.push("&",G(E),"=",(J!=E||!F)?G(J):"")})}if(!H){D.shift();H=""}return H+D.join("")},urlDecode:function(E,D){var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F)});return H},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D}return e},toArray:function(){return r?function(e,F,D,E){E=[];Ext.each(e,function(G){E.push(G)});return E.slice(F||0,D||E.length)}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length)}}(),each:function(G,F,E){if(Ext.isEmpty(G,true)){return}if(!s(G)||Ext.isPrimitive(G)){G=[G]}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D}}},iterate:function(E,D,e){if(s(E)){Ext.each(E,D,e);return}else{if(Ext.isObject(E)){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F])===false){return}}}}}},getDom:function(e){if(!e||!i){return null}return e.dom?e.dom:(Ext.isString(e)?i.getElementById(e):e)},getBody:function(){return Ext.get(i.body||i.documentElement)},removeNode:r?function(){var e;return function(D){if(D&&D.tagName!="BODY"){e=e||i.createElement("div");e.appendChild(D);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false)},isArray:function(e){return t.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return t.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isDefined:function(e){return typeof e!=="undefined"},isOpera:B,isWebKit:v,isChrome:h,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:f,isIE:r,isIE6:q,isIE7:p,isIE8:o,isGecko:n,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:m,isWindows:A,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.ns("Ext.grid","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var b=Ext,a=0;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7?"http://extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(c,d){return Ext.extend(c,d(c.prototype))},getDoc:function(){return Ext.get(document)},isDate:function(c){return Object.prototype.toString.apply(c)==="[object Date]"},num:function(d,c){d=Number(d===null||typeof d=="boolean"?NaN:d);return isNaN(d)?c:d},value:function(e,c,d){return Ext.isEmpty(e,d)?c:e},escapeRe:function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(f,c,e,d){f[c]=f[c].createSequence(e,d)},addBehaviors:function(g){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(g)})}else{var d={},f,c,e;for(c in g){if((f=c.split("@"))[1]){e=f[0];if(!d[e]){d[e]=Ext.select(e)}d[e].on(f[1],g[c])}}d=null}},combine:function(){var e=arguments,d=e.length,g=[];for(var f=0;f<d;f++){var c=e[f];if(Ext.isArray(c)){g=g.concat(c)}else{if(c.length!==undefined&&!c.substr){g=g.concat(Array.prototype.slice.call(c,0))}else{g.push(c)}}}return g},copyTo:function(c,d,e){if(typeof e=="string"){e=e.split(/[,;\s]/)}Ext.each(e,function(f){if(d.hasOwnProperty(f)){c[f]=d[f]}},this);return c},destroy:function(){Ext.each(arguments,function(c){if(c){if(Ext.isArray(c)){this.destroy.apply(this,c)}else{if(Ext.isFunction(c.destroy)){c.destroy()}else{if(c.dom){c.remove()}}}}},this)},destroyMembers:function(j,g,e,f){for(var h=1,d=arguments,c=d.length;h<c;h++){Ext.destroy(j[d[h]]);delete j[d[h]]}},clean:function(c){var d=[];Ext.each(c,function(e){if(!!e){d.push(e)}});return d},unique:function(c){var d=[],e={};Ext.each(c,function(f){if(!e[f]){d.push(f)}e[f]=true});return d},flatten:function(c){var e=[];function d(f){Ext.each(f,function(g){if(Ext.isArray(g)){d(g)}else{e.push(g)}});return e}return d(c)},min:function(c,d){var e=c[0];d=d||function(g,f){return g<f?-1:1};Ext.each(c,function(f){e=d(e,f)==-1?e:f});return e},max:function(c,d){var e=c[0];d=d||function(g,f){return g>f?1:-1};Ext.each(c,function(f){e=d(e,f)==1?e:f});return e},mean:function(c){return Ext.sum(c)/c.length},sum:function(c){var d=0;Ext.each(c,function(e){d+=e});return d},partition:function(c,d){var e=[[],[]];Ext.each(c,function(g,h,f){e[(d&&d(g,h,f))||(!d&&g)?0:1].push(g)});return e},invoke:function(c,d){var f=[],e=Array.prototype.slice.call(arguments,2);Ext.each(c,function(g,h){if(g&&typeof g[d]=="function"){f.push(g[d].apply(g,e))}else{f.push(undefined)}});return f},pluck:function(c,e){var d=[];Ext.each(c,function(f){d.push(f[e])});return d},zip:function(){var l=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),g=l[0],k=l[1][0],c=Ext.max(Ext.pluck(g,"length")),f=[];for(var h=0;h<c;h++){f[h]=[];if(k){f[h]=k.apply(k,Ext.pluck(g,h))}else{for(var e=0,d=g.length;e<d;e++){f[h].push(g[e][h])}}}return f},getCmp:function(c){return Ext.ComponentMgr.get(c)},useShims:b.isIE6||(b.isMac&&b.isGecko2),type:function(d){if(d===undefined||d===null){return false}if(d.htmlElement){return"element"}var c=typeof d;if(c=="object"&&d.nodeName){switch(d.nodeType){case 1:return"element";case 3:return(/\S/).test(d.nodeValue)?"textnode":"whitespace"}}if(c=="object"||c=="function"){switch(d.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if(typeof d.length=="number"&&typeof d.item=="function"){return"nodelist"}}return c},intercept:function(f,c,e,d){f[c]=f[c].createInterceptor(e,d)},callback:function(c,f,e,d){if(Ext.isFunction(c)){if(d){c.defer(d,f,e||[])}else{c.apply(f,e||[])}}}}}());Ext.apply(Function.prototype,{createSequence:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});String.prototype.toggle=function(b,a){return this==b?a:b};String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}();Date.prototype.getElapsed=function(a){return Math.abs((a||new Date()).getTime()-this.getTime())};Ext.applyIf(Number.prototype,{constrain:function(b,a){return Math.min(Math.max(this,b),a)}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();(function(){var b;function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}(function(){var f=document,d=f.compatMode=="CSS1Compat",e=Math.max,g=parseInt;Ext.lib.Dom={isAncestor:function(i,j){var h=false;i=Ext.getDom(i);j=Ext.getDom(j);if(i&&j){if(i.contains){return i.contains(j)}else{if(i.compareDocumentPosition){return !!(i.compareDocumentPosition(j)&16)}else{while(j=j.parentNode){h=j==i||h}}}}return h},getViewWidth:function(h){return h?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(h){return h?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){return e(!d?f.body.scrollHeight:f.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return e(!d?f.body.scrollWidth:f.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?f.documentElement.clientHeight:f.body.clientHeight):self.innerHeight},getViewportWidth:function(){return !Ext.isStrict&&!Ext.isOpera?f.body.clientWidth:Ext.isIE?f.documentElement.clientWidth:self.innerWidth},getY:function(h){return this.getXY(h)[1]},getX:function(h){return this.getXY(h)[0]},getXY:function(j){var i,o,r,u,k,l,t=0,q=0,s,h,m=(f.body||f.documentElement),n=[0,0];j=Ext.getDom(j);if(j!=m){if(j.getBoundingClientRect){r=j.getBoundingClientRect();s=c(document).getScroll();n=[r.left+s.left,r.top+s.top]}else{i=j;h=c(j).isStyle("position","absolute");while(i){o=c(i);t+=i.offsetLeft;q+=i.offsetTop;h=h||o.isStyle("position","absolute");if(Ext.isGecko){q+=u=g(o.getStyle("borderTopWidth"),10)||0;t+=k=g(o.getStyle("borderLeftWidth"),10)||0;if(i!=j&&!o.isStyle("overflow","visible")){t+=k;q+=u}}i=i.offsetParent}if(Ext.isSafari&&h){t-=m.offsetLeft;q-=m.offsetTop}if(Ext.isGecko&&!h){l=c(m);t+=g(l.getStyle("borderLeftWidth"),10)||0;q+=g(l.getStyle("borderTopWidth"),10)||0}i=j.parentNode;while(i&&i!=m){if(!Ext.isOpera||(i.tagName!="TR"&&!c(i).isStyle("display","inline"))){t-=i.scrollLeft;q-=i.scrollTop}i=i.parentNode}n=[t,q]}}return n},setXY:function(i,j){(i=Ext.fly(i,"_setXY")).position();var k=i.translatePoints(j),h=i.dom.style,l;for(l in k){if(!isNaN(k[l])){h[l]=k[l]+"px"}}},setX:function(i,h){this.setXY(i,[h,false])},setY:function(h,i){this.setXY(h,[false,i])}}})();Ext.lib.Dom.getRegion=function(d){return Ext.lib.Region.getRegion(d)};Ext.lib.Event=function(){var y=false,w=[],g=[],D=0,q=[],d,G=false,k=window,K=document,l=200,t=20,E=0,s=1,i=2,m=3,u=3,z=4,v="scrollLeft",r="scrollTop",f="unload",B="mouseover",J="mouseout",e=function(){var L;if(k.addEventListener){L=function(P,N,O,M){if(N=="mouseenter"){O=O.createInterceptor(o);P.addEventListener(B,O,(M))}else{if(N=="mouseleave"){O=O.createInterceptor(o);P.addEventListener(J,O,(M))}else{P.addEventListener(N,O,(M))}}return O}}else{if(k.attachEvent){L=function(P,N,O,M){P.attachEvent("on"+N,O);return O}}else{L=function(){}}}return L}(),h=function(){var L;if(k.removeEventListener){L=function(P,N,O,M){if(N=="mouseenter"){N=B}else{if(N=="mouseleave"){N=J}}P.removeEventListener(N,O,(M))}}else{if(k.detachEvent){L=function(O,M,N){O.detachEvent("on"+M,N)}}else{L=function(){}}}return L}();var F=Ext.isGecko?function(L){return Object.prototype.toString.call(L)=="[object XULElement]"}:function(){};var p=Ext.isGecko?function(L){try{return L.nodeType==3}catch(M){return false}}:function(L){return L.nodeType==3};function o(M){var L=A.getRelatedTarget(M);return !(F(L)||x(M.currentTarget,L))}function x(L,N){if(L&&L.firstChild){while(N){if(N===L){return true}try{N=N.parentNode}catch(M){return false}if(N&&(N.nodeType!=1)){N=null}}}return false}function C(O,L,N){var M=-1;Ext.each(w,function(P,Q){if(P&&P[i]==N&&P[E]==O&&P[s]==L){M=Q}});return M}function H(){var L=false,O=[],M,N=!y||(D>0);if(!G){G=true;Ext.each(q,function(Q,R,P){if(Q&&(M=K.getElementById(Q.id))){if(!Q.checkReady||y||M.nextSibling||(K&&K.body)){M=Q.override?(Q.override===true?Q.obj:Q.override):M;Q.fn.call(M,Q.obj);q[R]=null}else{O.push(Q)}}});D=(O.length===0)?0:D-1;if(N){n()}else{clearInterval(d);d=null}L=!(G=false)}return L}function n(){if(!d){var L=function(){H()};d=setInterval(L,t)}}function I(){var L=K.documentElement,M=K.body;if(L&&(L[r]||L[v])){return[L[v],L[r]]}else{if(M){return[M[v],M[r]]}else{return[0,0]}}}function j(L,M){L=L.browserEvent||L;var N=L["page"+M];if(!N&&N!==0){N=L["client"+M]||0;if(Ext.isIE){N+=I()[M=="X"?0:1]}}return N}var A={onAvailable:function(N,L,O,M){q.push({id:N,fn:L,obj:O,override:M,checkReady:false});D=l;n()},addListener:function(O,L,N){var M;O=Ext.getDom(O);if(O&&N){if(f==L){M=!!(g[g.length]=[O,L,N])}else{w.push([O,L,N,M=e(O,L,N,false)])}}return !!M},removeListener:function(Q,M,P){var O=false,N,L;Q=Ext.getDom(Q);if(!P){O=this.purgeElement(Q,false,M)}else{if(f==M){Ext.each(g,function(S,T,R){if(S&&S[0]==Q&&S[1]==M&&S[2]==P){g.splice(T,1);O=true}})}else{N=arguments[3]||C(Q,M,P);L=w[N];if(Q&&L){h(Q,M,L[m],false);L[m]=L[i]=null;w.splice(N,1);O=true}}}return O},getTarget:function(L){L=L.browserEvent||L;return this.resolveTextNode(L.target||L.srcElement)},resolveTextNode:function(L){return L&&!F(L)&&p(L)?L.parentNode:L},getRelatedTarget:function(L){L=L.browserEvent||L;return this.resolveTextNode(L.relatedTarget||(L.type==J?L.toElement:L.type==B?L.fromElement:null))},getPageX:function(L){return j(L,"X")},getPageY:function(L){return j(L,"Y")},getXY:function(L){return[this.getPageX(L),this.getPageY(L)]},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L)},stopPropagation:function(L){L=L.browserEvent||L;if(L.stopPropagation){L.stopPropagation()}else{L.cancelBubble=true}},preventDefault:function(L){L=L.browserEvent||L;if(L.preventDefault){L.preventDefault()}else{L.returnValue=false}},getEvent:function(L){L=L||k.event;if(!L){var M=this.getEvent.caller;while(M){L=M.arguments[0];if(L&&Event==L.constructor){break}M=M.caller}}return L},getCharCode:function(L){L=L.browserEvent||L;return L.charCode||L.keyCode||0},_load:function(M){y=true;var L=Ext.lib.Event;if(Ext.isIE&&M!==true){h(k,"load",arguments.callee)}},purgeElement:function(M,O,L){var N=this;Ext.each(N.getListeners(M,L),function(P){if(P){N.removeListener(M,P.type,P.fn)}});if(O&&M&&M.childNodes){Ext.each(M.childNodes,function(P){N.purgeElement(P,O,L)})}},getListeners:function(O,M){var P=this,N=[],L;if(M){L=M==f?g:w}else{L=w.concat(g)}Ext.each(L,function(Q,R){if(Q&&Q[E]==O&&(!M||M==Q[s])){N.push({type:Q[s],fn:Q[i],obj:Q[u],adjust:Q[z],index:R})}});return N.length?N:null},_unload:function(S){var R=Ext.lib.Event,P,O,M,L,N,Q;Ext.each(g,function(T){if(T){try{Q=T[z]?(T[z]===true?T[u]:T[z]):k;T[i].call(Q,R.getEvent(S),T[u])}catch(U){}}});g=null;if(w&&(O=w.length)){while(O){if((M=w[N=--O])){R.removeListener(M[E],M[s],M[i],N)}}}h(k,f,R._unload)}};A.on=A.addListener;A.un=A.removeListener;if(K&&K.body){A._load(true)}else{e(k,"load",A._load)}e(k,f,A._unload);H();return A}();Ext.lib.Ajax=function(){var g=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d="Content-Type";function h(s){var r=s.conn,t;function q(u,v){for(t in v){if(v.hasOwnProperty(t)){u.setRequestHeader(t,v[t])}}}if(k.defaultHeaders){q(r,k.defaultHeaders)}if(k.headers){q(r,k.headers);k.headers=null}}function e(t,s,r,q){return{tId:t,status:r?-1:0,statusText:r?"transaction aborted":"communication failure",isAbort:true,isTimeout:true,argument:s}}function j(q,r){(k.headers=k.headers||{})[q]=r}function o(z,x){var r={},v,w=z.conn,q,u;try{v=z.conn.getAllResponseHeaders();Ext.each(v.replace(/\r\n/g,"\n").split("\n"),function(s){q=s.indexOf(":");if(q>=0){u=s.substr(0,q).toLowerCase();if(s.charAt(q+1)==" "){++q}r[u]=s.substr(q+1)}})}catch(y){}return{tId:z.tId,status:w.status,statusText:w.statusText,getResponseHeader:function(s){return r[s.toLowerCase()]},getAllResponseHeaders:function(){return v},responseText:w.responseText,responseXML:w.responseXML,argument:x}}function n(q){q.conn=null;q=null}function f(v,w,r,q){if(!w){n(v);return}var t,s;try{if(v.conn.status!==undefined&&v.conn.status!=0){t=v.conn.status}else{t=13030}}catch(u){t=13030}if((t>=200&&t<300)||(Ext.isIE&&t==1223)){s=o(v,w.argument);if(w.success){if(!w.scope){w.success(s)}else{w.success.apply(w.scope,[s])}}}else{switch(t){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:s=e(v.tId,w.argument,(r?r:false),q);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}break;default:s=o(v,w.argument);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}}}n(v);s=null}function m(s,v){v=v||{};var q=s.conn,u=s.tId,r=k.poll,t=v.timeout||null;if(t){k.timeout[u]=setTimeout(function(){k.abort(s,v,true)},t)}r[u]=setInterval(function(){if(q&&q.readyState==4){clearInterval(r[u]);r[u]=null;if(t){clearTimeout(k.timeout[u]);k.timeout[u]=null}f(s,v)}},k.pollInterval)}function i(u,r,t,q){var s=l()||null;if(s){s.conn.open(u,r,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(q&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(s)}m(s,t);s.conn.send(q||null)}return s}function l(){var r;try{if(r=p(k.transactionId)){k.transactionId++}}catch(q){}finally{return r}}function p(t){var q;try{q=new XMLHttpRequest()}catch(s){for(var r=0;r<g.length;++r){try{q=new ActiveXObject(g[r]);break}catch(s){}}}finally{return{conn:q,tId:t}}}var k={request:function(q,s,t,u,y){if(y){var v=this,r=y.xmlData,w=y.jsonData,x;Ext.applyIf(v,y);if(r||w){x=v.headers;if(!x||!x[d]){j(d,r?"text/xml":"application/json")}u=r||(Ext.isObject(w)?Ext.encode(w):w)}}return i(q||y.method||"POST",s,t,u)},serializeForm:function(r){var s=r.elements||(document.forms[r]||Ext.getDom(r)).elements,y=false,x=encodeURIComponent,v,z,q,t,u="",w;Ext.each(s,function(A){q=A.name;w=A.type;if(!A.disabled&&q){if(/select-(one|multiple)/i.test(w)){Ext.each(A.options,function(B){if(B.selected){u+=String.format("{0}={1}&",x(q),(B.hasAttribute?B.hasAttribute("value"):B.getAttributeNode("value").specified)?B.value:B.text)}})}else{if(!/file|undefined|reset|button/i.test(w)){if(!(/radio|checkbox/i.test(w)&&!A.checked)&&!(w=="submit"&&y)){u+=x(q)+"="+x(A.value)+"&";y=/submit/i.test(w)}}}}});return u.substr(0,u.length-1)},useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",poll:{},timeout:{},pollInterval:50,transactionId:0,abort:function(t,v,q){var s=this,u=t.tId,r=false;if(s.isCallInProgress(t)){t.conn.abort();clearInterval(s.poll[u]);s.poll[u]=null;if(q){s.timeout[u]=null}f(t,v,(r=true),q)}return r},isCallInProgress:function(q){return q.conn&&!{0:true,4:true}[q.conn.readyState]}};return k}();Ext.lib.Region=function(f,h,d,e){var g=this;g.top=f;g[1]=f;g.right=h;g.bottom=d;g.left=e;g[0]=e};Ext.lib.Region.prototype={contains:function(e){var d=this;return(e.left>=d.left&&e.right<=d.right&&e.top>=d.top&&e.bottom<=d.bottom)},getArea:function(){var d=this;return((d.bottom-d.top)*(d.right-d.left))},intersect:function(i){var h=this,f=Math.max(h.top,i.top),g=Math.min(h.right,i.right),d=Math.min(h.bottom,i.bottom),e=Math.max(h.left,i.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}},union:function(i){var h=this,f=Math.min(h.top,i.top),g=Math.max(h.right,i.right),d=Math.max(h.bottom,i.bottom),e=Math.min(h.left,i.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(e){var d=this;d.top=d.top.constrain(e.top,e.bottom);d.bottom=d.bottom.constrain(e.top,e.bottom);d.left=d.left.constrain(e.left,e.right);d.right=d.right.constrain(e.left,e.right);return d},adjust:function(f,e,d,h){var g=this;g.top+=f;g.left+=e;g.right+=h;g.bottom+=d;return g}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g),f=i[1],h=i[0]+g.offsetWidth,d=i[1]+g.offsetHeight,e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,f){if(Ext.isArray(d)){f=d[1];d=d[0]}var e=this;e.x=e.right=e.left=e[0]=d;e.y=e.top=e.bottom=e[1]=f};Ext.lib.Point.prototype=new Ext.lib.Region();(function(){var g=Ext.lib,i=/width|height|opacity|padding/i,f=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,h=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,j=function(k){return typeof k!=="undefined"},e=function(){return new Date()};g.Anim={motion:function(n,l,o,p,k,m){return this.run(n,l,o,p,k,m,Ext.lib.Motion)},run:function(o,l,q,r,k,n,m){m=m||Ext.lib.AnimBase;if(typeof r=="string"){r=Ext.lib.Easing[r]}var p=new m(o,l,q,r);p.animateX(function(){if(Ext.isFunction(k)){k.call(n)}});return p}};g.AnimBase=function(l,k,m,n){if(l){this.init(l,k,m,n)}};g.AnimBase.prototype={doMethod:function(k,n,l){var m=this;return m.method(m.curFrame,n,l-n,m.totalFrames)},setAttr:function(k,m,l){if(i.test(k)&&m<0){m=0}Ext.fly(this.el,"_anim").setStyle(k,m+l)},getAttr:function(k){var m=Ext.fly(this.el),n=m.getStyle(k),l=f.exec(k)||[];if(n!=="auto"&&!h.test(n)){return parseFloat(n)}return(!!(l[2])||(m.getStyle("position")=="absolute"&&!!(l[3])))?m.dom["offset"+l[0].charAt(0).toUpperCase()+l[0].substr(1)]:0},getDefaultUnit:function(k){return d.test(k)?"px":""},animateX:function(n,k){var l=this,m=function(){l.onComplete.removeListener(m);if(Ext.isFunction(n)){n.call(k||l,l)}};l.onComplete.addListener(m,l);l.animate()},setRunAttr:function(n){var p=this,q=this.attributes[n],r=q.to,o=q.by,s=q.from,t=q.unit,l=(this.runAttrs[n]={}),m;if(!j(r)&&!j(o)){return false}var k=j(s)?s:p.getAttr(n);if(j(r)){m=r}else{if(j(o)){if(Ext.isArray(k)){m=[];Ext.each(k,function(u,w){m[w]=u+o[w]})}else{m=k+o}}}Ext.apply(l,{start:k,end:m,unit:j(t)?t:p.getDefaultUnit(n)})},init:function(l,p,o,k){var r=this,n=0,s=g.AnimMgr;Ext.apply(r,{isAnimated:false,startTime:null,el:Ext.getDom(l),attributes:p||{},duration:o||1,method:k||g.Easing.easeNone,useSec:true,curFrame:0,totalFrames:s.fps,runAttrs:{},animate:function(){var u=this,v=u.duration;if(u.isAnimated){return false}u.curFrame=0;u.totalFrames=u.useSec?Math.ceil(s.fps*v):v;s.registerElement(u)},stop:function(u){var v=this;if(u){v.curFrame=v.totalFrames;v._onTween.fire()}s.stop(v)}});var t=function(){var v=this,u;v.onStart.fire();v.runAttrs={};for(u in this.attributes){this.setRunAttr(u)}v.isAnimated=true;v.startTime=e();n=0};var q=function(){var v=this;v.onTween.fire({duration:e()-v.startTime,curFrame:v.curFrame});var w=v.runAttrs;for(var u in w){this.setAttr(u,v.doMethod(u,w[u].start,w[u].end),w[u].unit)}++n};var m=function(){var u=this,w=(e()-u.startTime)/1000,v={duration:w,frames:n,fps:n/w};u.isAnimated=false;n=0;u.onComplete.fire(v)};r.onStart=new Ext.util.Event(r);r.onTween=new Ext.util.Event(r);r.onComplete=new Ext.util.Event(r);(r._onStart=new Ext.util.Event(r)).addListener(t);(r._onTween=new Ext.util.Event(r)).addListener(q);(r._onComplete=new Ext.util.Event(r)).addListener(m)}};Ext.lib.AnimMgr=new function(){var o=this,m=null,l=[],k=0;Ext.apply(o,{fps:1000,delay:1,registerElement:function(q){l.push(q);++k;q._onStart.fire();o.start()},unRegister:function(r,q){r._onComplete.fire();q=q||p(r);if(q!=-1){l.splice(q,1)}if(--k<=0){o.stop()}},start:function(){if(m===null){m=setInterval(o.run,o.delay)}},stop:function(s){if(!s){clearInterval(m);for(var r=0,q=l.length;r<q;++r){if(l[0].isAnimated){o.unRegister(l[0],0)}}l=[];m=null;k=0}else{o.unRegister(s)}},run:function(){var q;Ext.each(l,function(r){if(r&&r.isAnimated){q=r.totalFrames;if(r.curFrame<q||q===null){++r.curFrame;if(r.useSec){n(r)}r._onTween.fire()}else{o.stop(r)}}},o)}});var p=function(r){var q=-1;Ext.each(l,function(t,s){if(t==r){q=s;return false}});return q};var n=function(r){var v=r.totalFrames,u=r.curFrame,t=r.duration,s=(u*t*1000/v),q=(e()-r.startTime),w=0;if(q<t*1000){w=Math.round((q/s-1)*u)}else{w=v-(u+1)}if(w>0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l<r;++l){m[l]=[p[l][0],p[l][1]]}for(k=1;k<r;++k){for(l=0;l<r-k;++l){m[l][0]=q*m[l][0]+o*m[parseInt(l+1,10)][0];m[l][1]=q*m[l][1]+o*m[parseInt(l+1,10)][1]}}return[m[0][0],m[0][1]]}};g.Easing={easeNone:function(l,k,n,m){return n*l/m+k},easeIn:function(l,k,n,m){return n*(l/=m)*l+k},easeOut:function(l,k,n,m){return -n*(l/=m)*(l-2)+k}};(function(){g.Motion=function(p,o,q,r){if(p){g.Motion.superclass.constructor.call(this,p,o,q,r)}};Ext.extend(g.Motion,Ext.lib.AnimBase);var n=g.Motion.superclass,m=g.Motion.prototype,l=/^points$/i;Ext.apply(g.Motion.prototype,{setAttr:function(o,s,r){var q=this,p=n.setAttr;if(l.test(o)){r=r||"px";p.call(q,"left",s[0],r);p.call(q,"top",s[1],r)}else{p.call(q,o,s,r)}},getAttr:function(o){var q=this,p=n.getAttr;return l.test(o)?[p.call(q,"left"),p.call(q,"top")]:p.call(q,o)},doMethod:function(o,r,p){var q=this;return l.test(o)?g.Bezier.getPosition(q.runAttrs[o],q.method(q.curFrame,0,100,q.totalFrames)/100):n.doMethod.call(q,o,r,p)},setRunAttr:function(v){if(l.test(v)){var x=this,q=this.el,A=this.attributes.points,t=A.control||[],y=A.from,z=A.to,w=A.by,B=g.Dom,p,s,r,u,o;if(t.length>0&&!Ext.isArray(t[0])){t=[t]}else{}Ext.fly(q,"_anim").position();B.setXY(q,j(y)?y:B.getXY(q));p=x.getAttr("points");if(j(z)){r=k.call(x,z,p);for(s=0,u=t.length;s<u;++s){t[s]=k.call(x,t[s],p)}}else{if(j(w)){r=[p[0]+w[0],p[1]+w[1]];for(s=0,u=t.length;s<u;++s){t[s]=[p[0]+t[s][0],p[1]+t[s][1]]}}}o=this.runAttrs[v]=[p];if(t.length>0){o=o.concat(t)}o[o.length]=r}else{n.setRunAttr.call(this,v)}}});var k=function(o,q){var p=g.Dom.getXY(this.el);return[o[0]-p[0]+q[0],o[1]-p[1]+q[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k<l/2)?f.Easing.bounceIn(k*2,0,m,l)*0.5+j:f.Easing.bounceOut(k*2-l,0,m,l)*0.5+m*0.5+j}})})();(function(){var h=Ext.lib;h.Anim.color=function(p,n,q,r,m,o){return h.Anim.run(p,n,q,r,m,o,h.ColorAnim)};h.ColorAnim=function(n,m,o,p){h.ColorAnim.superclass.constructor.call(this,n,m,o,p)};Ext.extend(h.ColorAnim,h.AnimBase);var j=h.ColorAnim.superclass,i=/color$/i,f=/^transparent|rgba\(0, 0, 0, 0\)$/,l=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,d=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,e=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,g=function(m){return typeof m!=="undefined"};function k(n){var p=parseInt,o,m=null,q;if(n.length==3){return n}Ext.each([d,l,e],function(s,r){o=(r%2==0)?16:10;q=s.exec(n);if(q&&q.length==4){m=[p(q[1],o),p(q[2],o),p(q[3],o)];return false}});return m}Ext.apply(h.ColorAnim.prototype,{getAttr:function(m){var o=this,n=o.el,p;if(i.test(m)){while(n&&f.test(p=Ext.fly(n).getStyle(m))){n=n.parentNode;p="fff"}}else{p=j.getAttr.call(o,m)}return p},doMethod:function(m,r,n){var p=this,q,o=Math.floor;if(i.test(m)){q=[];Ext.each(r,function(s,t){q[t]=j.doMethod.call(p,m,s,n[t])});q="rgb("+o(q[0])+","+o(q[1])+","+o(q[2])+")"}else{q=j.doMethod.call(p,m,r,n)}return q},setRunAttr:function(m){var p=this,o=p.attributes[m],t=o.to,q=o.by,r;j.setRunAttr.call(p,m);r=p.runAttrs[m];if(i.test(m)){var s=k(r.start),n=k(r.end);if(!g(t)&&g(q)){n=k(q);Ext.each(s,function(v,u){n[u]=v+n[u]})}r.start=s;r.end=n}}})})();(function(){var d=Ext.lib;d.Anim.scroll=function(j,h,k,l,g,i){return d.Anim.run(j,h,k,l,g,i,d.Scroll)};d.Scroll=function(h,g,i,j){if(h){d.Scroll.superclass.constructor.call(this,h,g,i,j)}};Ext.extend(d.Scroll,d.ColorAnim);var f=d.Scroll.superclass,e="scroll";Ext.apply(d.Scroll.prototype,{doMethod:function(g,m,h){var k,j=this,l=j.curFrame,i=j.totalFrames;if(g==e){k=[j.method(l,m[0],h[0]-m[0],i),j.method(l,m[1],h[1]-m[1],i)]}else{k=f.doMethod.call(j,g,m,h)}return k},getAttr:function(g){var h=this;if(g==e){return[h.el.scrollLeft,h.el.scrollTop]}else{return f.getAttr.call(h,g)}},setAttr:function(g,j,i){var h=this;if(g==e){h.el.scrollLeft=j[0];h.el.scrollTop=j[1]}else{f.setAttr.call(h,g,j,i)}}})})();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter-debug.js	(revision 625)
@@ -0,0 +1,2292 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// for old browsers
+window.undefined = window.undefined;
+
+/**
+ * @class Ext
+ * Ext core utilities and functions.
+ * @singleton
+ */
+
+Ext = {
+    /**
+     * The version of the framework
+     * @type String
+     */
+    version : '3.0'
+};
+
+/**
+ * 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){
+    // no "this" reference for friendly out of scope calls
+    if(defaults){
+        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,
+        toString = Object.prototype.toString,
+        //assume it's not null and not an array
+        isIterable = function(v){
+            //check for array or arguments
+            if(Ext.isArray(v) || v.callee){
+                return true;
+            }
+            //check for node list type
+            if(/NodeList|HTMLCollection/.test(toString.call(v))){
+                return true;
+            }
+            //NodeList has an item and length property
+            //IXMLDOMNodeList has nextNode method, needs to be checked first.
+            return ((v.nextNode || v.item) && Ext.isNumber(v.length));
+        },
+        ua = navigator.userAgent.toLowerCase(),
+        check = function(r){
+            return r.test(ua);
+        },
+        DOC = document,
+        isStrict = DOC.compatMode == "CSS1Compat",
+        isOpera = check(/opera/),
+        isChrome = check(/chrome/),
+        isWebKit = check(/webkit/),
+        isSafari = !isChrome && check(/safari/),
+        isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
+        isSafari3 = isSafari && check(/version\/3/),
+        isSafari4 = isSafari && check(/version\/4/),
+        isIE = !isOpera && check(/msie/),
+        isIE7 = isIE && check(/msie 7/),
+        isIE8 = isIE && check(/msie 8/),
+        isIE6 = isIE && !isIE7 && !isIE8,
+        isGecko = !isWebKit && check(/gecko/),
+        isGecko2 = isGecko && check(/rv:1\.8/),
+        isGecko3 = isGecko && check(/rv:1\.9/),
+        isBorderBox = isIE && !isStrict,
+        isWindows = check(/windows|win32/),
+        isMac = check(/macintosh|mac os x/),
+        isAir = check(/adobeair/),
+        isLinux = check(/linux/),
+        isSecure = /^https/i.test(window.location.protocol);
+
+    // remove css image flicker
+    if(isIE6){
+        try{
+            DOC.execCommand("BackgroundImageCache", false, true);
+        }catch(e){}
+    }
+
+    Ext.apply(Ext, {
+        /**
+         * 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',
+        /**
+         * 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 if the {@link Ext.Fx} Class is available
+         * @type Boolean
+         * @property enableFx
+         */
+
+        /**
+         * 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 {@link #enableGarbageCollector} is true.
+         * @type Boolean
+         */
+        enableListenerCollection : false,
+
+        /**
+         * Indicates whether to use native browser parsing for JSON methods.
+         * This option is ignored if the browser does not support native JSON methods.
+         * <b>Note: Native JSON methods will not work with objects that have functions.
+         * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
+         * @type Boolean
+         */
+        USE_NATIVE_JSON : false,
+
+        /**
+         * 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){
+                for(var p in c){
+                    if(Ext.isEmpty(o[p])){
+                        o[p] = c[p];
+                    }
+                }
+            }
+            return o;
+        },
+
+        /**
+         * 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){
+            return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed);
+        },
+
+        /**
+         * 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(Ext.isObject(sp)){
+                    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.superclass = sbp.supr = (function(){
+                    return spp;
+                });
+                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;
+                Ext.apply(p, overrides);
+                if(Ext.isIE && overrides.toString != origclass.toString){
+                    p.toString = overrides.toString;
+                }
+            }
+        },
+
+        /**
+         * Creates namespaces to be used for scoping variables and classes so that they are not global.
+         * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+         * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+         * @param {String} namespace1
+         * @param {String} namespace2
+         * @param {String} etc
+         * @method namespace
+         */
+        namespace : function(){
+            var o, d;
+            Ext.each(arguments, function(v) {
+                d = v.split(".");
+                o = window[d[0]] = window[d[0]] || {};
+                Ext.each(d.slice(1), function(v2){
+                    o = o[v2] = o[v2] || {};
+                });
+            });
+            return o;
+        },
+
+        /**
+         * 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
+         * @param {String} pre (optional) A prefix to add to the url encoded string
+         * @return {String}
+         */
+        urlEncode: function(o, pre){
+            var undef, buf = [], key, e = encodeURIComponent;
+
+            for(key in o){
+                undef = !Ext.isDefined(o[key]);
+                Ext.each(undef ? key : o[key], function(val, i){
+                    buf.push("&", e(key), "=", (val != key || !undef) ? e(val) : "");
+                });
+            }
+            if(!pre){
+                buf.shift();
+                pre = "";
+            }
+            return pre + buf.join('');
+        },
+
+        /**
+         * Takes an encoded URL and and converts it to an object. Example: <pre><code>
+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+</code></pre>
+         * @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){
+            var obj = {},
+                pairs = string.split('&'),
+                d = decodeURIComponent,
+                name,
+                value;
+            Ext.each(pairs, function(pair) {
+                pair = pair.split('=');
+                name = d(pair[0]);
+                value = d(pair[1]);
+                obj[name] = overwrite || !obj[name] ? value :
+                            [].concat(obj[name]).concat(value);
+            });
+            return obj;
+        },
+
+        /**
+         * Appends content to the query string of a URL, which handles logic for whether to place
+         * a question mark or ampersand.
+         * @param {String} url The url to append to.
+         * @@param {String} s The content to append to the url.
+         * @return (String) The appended string
+         */
+        urlAppend : function(url, s){
+            if(!Ext.isEmpty(s)){
+                return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
+            }
+            return url;
+        },
+
+        /**
+         * Converts any iterable (numeric indices and a length property) into a true array
+         * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on.
+         * For strings, use this instead: "abc".match(/./g) => [a,b,c];
+         * @param {Iterable} the iterable object to be turned into a true Array.
+         * @return (Array) array
+         */
+        toArray : function(){
+            return isIE ?
+                function(a, i, j, res){
+                    res = [];
+                    Ext.each(a, function(v) {
+                        res.push(v);
+                    });
+                    return res.slice(i || 0, j || res.length);
+                } :
+                function(a, i, j){
+                    return Array.prototype.slice.call(a, i || 0, j || a.length);
+                }
+        }(),
+
+        /**
+         * 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(Ext.isEmpty(array, true)){
+                return;
+            }
+            if(!isIterable(array) || Ext.isPrimitive(array)){
+                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;
+                };
+            }
+        },
+
+        /**
+         * Iterates either the elements in an array, or each of the properties in an object.
+         * <b>Note</b>: If you are only iterating arrays, it is better to call {@link #each}.
+         * @param {Object/Array} object The object or array to be iterated
+         * @param {Function} fn The function to be called for each iteration.
+         * The iteration will stop if the supplied function returns false, or
+         * all array elements / object properties have been covered. The signature
+         * varies depending on the type of object being interated:
+         * <div class="mdetail-params"><ul>
+         * <li>Arrays : <tt>(Object item, Number index, Array allItems)</tt>
+         * <div class="sub-desc">
+         * When iterating an array, the supplied function is called with each item.</div></li>
+         * <li>Objects : <tt>(String key, Object value)</tt>
+         * <div class="sub-desc">
+         * When iterating an object, the supplied function is called with each key-value pair in
+         * the object.</div></li>
+         * </ul></div>
+         * @param {Object} scope The scope to call the supplied function with, defaults to
+         * the specified <tt>object</tt>
+         */
+        iterate : function(obj, fn, scope){
+            if(isIterable(obj)){
+                Ext.each(obj, fn, scope);
+                return;
+            }else if(Ext.isObject(obj)){
+                for(var prop in obj){
+                    if(obj.hasOwnProperty(prop)){
+                        if(fn.call(scope || obj, prop, obj[prop]) === false){
+                            return;
+                        };
+                    }
+                }
+            }
+        },
+
+        /**
+         * Return the dom node for the passed String (id), dom node, or Ext.Element.
+         * Here are some examples:
+         * <pre><code>
+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don&#39;t know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * </code></pre>
+         * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
+         * when this method is called to be successful.
+         * @param {Mixed} el
+         * @return HTMLElement
+         */
+        getDom : function(el){
+            if(!el || !DOC){
+                return null;
+            }
+            return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el);
+        },
+
+        /**
+         * Returns the current document body as an {@link Ext.Element}.
+         * @return Ext.Element The document body
+         */
+        getBody : function(){
+            return Ext.get(DOC.body || DOC.documentElement);
+        },
+
+        /**
+         * 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 || DOC.createElement('div');
+                    d.appendChild(n);
+                    d.innerHTML = '';
+                }
+            }
+        }() : function(n){
+            if(n && n.parentNode && n.tagName != 'BODY'){
+                n.parentNode.removeChild(n);
+            }
+        },
+
+        /**
+         * <p>Returns true if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
+         * @return {Boolean}
+         */
+        isEmpty : function(v, allowBlank){
+            return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript array, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isArray : function(v){
+            return toString.apply(v) === '[object Array]';
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isObject : function(v){
+            return v && typeof v == "object";
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript 'primitive', a string, number or boolean.
+         * @param {Mixed} value The value to test
+         * @return {Boolean}
+         */
+        isPrimitive : function(v){
+            return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Function, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isFunction : function(v){
+            return toString.apply(v) === '[object Function]';
+        },
+
+        /**
+         * Returns true if the passed object is a number. Returns false for non-finite numbers.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isNumber: function(v){
+            return typeof v === 'number' && isFinite(v);
+        },
+
+        /**
+         * Returns true if the passed object is a string.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isString: function(v){
+            return typeof v === 'string';
+        },
+
+        /**
+         * Returns true if the passed object is a boolean.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isBoolean: function(v){
+            return typeof v === 'boolean';
+        },
+
+        /**
+         * Returns true if the passed object is not undefined.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isDefined: function(v){
+            return typeof v !== 'undefined';
+        },
+
+        /**
+         * True if the detected browser is Opera.
+         * @type Boolean
+         */
+        isOpera : isOpera,
+        /**
+         * True if the detected browser uses WebKit.
+         * @type Boolean
+         */
+        isWebKit: isWebKit,
+        /**
+         * True if the detected browser is Chrome.
+         * @type Boolean
+         */
+        isChrome : isChrome,
+        /**
+         * 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 4.x.
+         * @type Boolean
+         */
+        isSafari4 : isSafari4,
+        /**
+         * True if the detected browser is Safari 2.x.
+         * @type Boolean
+         */
+        isSafari2 : isSafari2,
+        /**
+         * 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 : isIE6,
+        /**
+         * True if the detected browser is Internet Explorer 7.x.
+         * @type Boolean
+         */
+        isIE7 : isIE7,
+        /**
+         * True if the detected browser is Internet Explorer 8.x.
+         * @type Boolean
+         */
+        isIE8 : isIE8,
+        /**
+         * 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 : isGecko2,
+        /**
+         * 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
+    });
+
+    /**
+     * Creates namespaces to be used for scoping variables and classes so that they are not global.
+     * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+     * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+     * @param {String} namespace1
+     * @param {String} namespace2
+     * @param {String} etc
+     * @method namespace
+     */
+    Ext.ns = Ext.namespace;
+})();
+
+Ext.ns("Ext", "Ext.util", "Ext.lib", "Ext.data");
+
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+     /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function() {
+                    var me = this,
+                        args = arguments;
+                    fcn.target = me;
+                    fcn.method = method;
+                    return (fcn.apply(scope || me || window, args) !== false) ?
+                            method.apply(me || window, args) :
+                            null;
+                };
+    },
+
+     /**
+     * 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,
+            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 (Ext.isNumber(appendArgs)){
+                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 less than or equal to 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 > 0){
+            return setTimeout(fn, millis);
+        }
+        fn();
+        return 0;
+    }
+});
+
+/**
+ * @class String
+ * These functions are available on every String object.
+ */
+Ext.applyIf(String, {
+    /**
+     * 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 = Ext.toArray(arguments, 1);
+        return format.replace(/\{(\d+)\}/g, function(m, i){
+            return args[i];
+        });
+    }
+});
+
+/**
+ * @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;
+    }
+});
+/**
+ * @class Ext
+ */
+
+Ext.ns("Ext.grid", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
+       "Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
+    /**
+     * Namespace alloted for extensions to the framework.
+     * @property ux
+     * @type Object
+     */
+
+Ext.apply(Ext, function(){
+    var E = Ext, idSeed = 0;
+
+    return {
+        /**
+        * A reusable empty function
+        * @property
+        * @type Function
+        */
+        emptyFn : function(){},
+
+        /**
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
+         * For other browsers it uses an inline data URL.
+         * @type String
+         */
+        BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 ?
+                            'http:/' + '/extjs.com/s.gif' :
+                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
+
+        extendX : function(supr, fn){
+            return Ext.extend(supr, fn(supr.prototype));
+        },
+
+        /**
+         * Returns the current HTML document object as an {@link Ext.Element}.
+         * @return Ext.Element The document
+         */
+        getDoc : function(){
+            return Ext.get(document);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript date object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isDate : function(v){
+            return Object.prototype.toString.apply(v) === '[object Date]';
+        },
+
+        /**
+         * 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){
+            v = Number(v === null || typeof v == 'boolean'? NaN : v);
+            return isNaN(v)? defaultValue : v;
+        },
+
+        /**
+         * <p>Utility method for returning a default value if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Mixed} defaultValue The value to return if the original value is empty
+         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
+         * @return {Mixed} value, if non-empty, else defaultValue
+         */
+        value : function(v, defaultValue, allowBlank){
+            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
+        },
+
+        /**
+         * Escapes the passed string for use in a regular expression
+         * @param {String} str
+         * @return {String}
+         */
+        escapeRe : function(s) {
+            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
+        },
+
+        sequence : function(o, name, fn, scope){
+            o[name] = o[name].createSequence(fn, scope);
+        },
+
+        /**
+         * Applies event listeners to elements by selectors when the document is ready.
+         * The event name is specified with an <tt>&#64;</tt> suffix.
+         * <pre><code>
+Ext.addBehaviors({
+    // add a listener for click on all anchors in element with id foo
+    '#foo a&#64;click' : function(e, t){
+        // do something
+    },
+    
+    // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
+    '#foo a, #bar span.some-class&#64;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);
+                });
+            } else {
+                var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
+                    parts,
+                    b,
+                    s;
+                for (b in o) {
+                    if ((parts = b.split('@'))[1]) { // for Object prototype breakers
+                        s = parts[0];
+                        if(!cache[s]){
+                            cache[s] = Ext.select(s);
+                        }
+                        cache[s].on(parts[1], o[b]);
+                    }
+                }
+                cache = null;
+            }
+        },
+
+
+        // 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;
+        },
+
+        /**
+         * Copies a set of named properties fom the source object to the destination object.
+         * <p>example:<pre><code>
+ImageComponent = Ext.extend(Ext.BoxComponent, {
+    initComponent: function() {
+        this.autoEl = { tag: 'img' };
+        MyComponent.superclass.initComponent.apply(this, arguments);
+        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
+    }
+});
+         * </code></pre> 
+         * @param {Object} The destination object.
+         * @param {Object} The source object.
+         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * of property names to copy.
+         * @return {Object} The modified object.
+        */
+        copyTo : function(dest, source, names){
+            if(typeof names == 'string'){
+                names = names.split(/[,;\s]/);
+            }
+            Ext.each(names, function(name){
+                if(source.hasOwnProperty(name)){
+                    dest[name] = source[name];
+                }
+            }, this);
+            return dest;
+        },
+
+        /**
+         * 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}, {@link Ext.Component}, or an Array of either of these to destroy
+         * @param {Mixed} arg2 (optional)
+         * @param {Mixed} etc... (optional)
+         */
+        destroy : function(){
+            Ext.each(arguments, function(arg){
+                if(arg){
+                    if(Ext.isArray(arg)){
+                        this.destroy.apply(this, arg);
+                    }else if(Ext.isFunction(arg.destroy)){
+                        arg.destroy();
+                    }else if(arg.dom){
+                        arg.remove();
+                    }    
+                }
+            }, this);
+        },
+
+        /**
+         * Attempts to destroy and then remove a set of named properties of the passed object.
+         * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
+         * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
+         * @param {Mixed} etc... More property names to destroy and remove.
+         */
+        destroyMembers : function(o, arg1, arg2, etc){
+            for(var i = 1, a = arguments, len = a.length; i < len; i++) {
+                Ext.destroy(o[a[i]]);
+                delete o[a[i]];
+            }
+        },
+
+        /**
+         * Creates a copy of the passed Array with falsy values removed.
+         * @param {Array/NodeList} arr The Array from which to remove falsy values.
+         * @return {Array} The new, compressed Array.
+         */
+        clean : function(arr){
+            var ret = [];
+            Ext.each(arr, function(v){
+                if(!!v){
+                    ret.push(v);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Creates a copy of the passed Array, filtered to contain only unique values.
+         * @param {Array} arr The Array to filter
+         * @return {Array} The new Array containing unique values.
+         */
+        unique : function(arr){
+            var ret = [],
+                collect = {};
+
+            Ext.each(arr, function(v) {
+                if(!collect[v]){
+                    ret.push(v);
+                }
+                collect[v] = true;
+            });
+            return ret;
+        },
+
+        /**
+         * Recursively flattens into 1-d Array. Injects Arrays inline.
+         * @param {Array} arr The array to flatten
+         * @return {Array} The new, flattened array.
+         */
+        flatten : function(arr){
+            var worker = [];
+            function rFlatten(a) {
+                Ext.each(a, function(v) {
+                    if(Ext.isArray(v)){
+                        rFlatten(v);
+                    }else{
+                        worker.push(v);
+                    }
+                });
+                return worker;
+            }
+            return rFlatten(arr);
+        },
+
+        /**
+         * Returns the minimum value in the Array.
+         * @param {Array|NodeList} arr The Array from which to select the minimum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines minimization.
+         *                   If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The minimum value in the Array.
+         */
+        min : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a < b ? -1 : 1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == -1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Returns the maximum value in the Array
+         * @param {Array|NodeList} arr The Array from which to select the maximum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines maximization.
+         *                   If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The maximum value in the Array.
+         */
+        max : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a > b ? 1 : -1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == 1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Calculates the mean of the Array
+         * @param {Array} arr The Array to calculate the mean value of.
+         * @return {Number} The mean.
+         */
+        mean : function(arr){
+           return Ext.sum(arr) / arr.length;
+        },
+
+        /**
+         * Calculates the sum of the Array
+         * @param {Array} arr The Array to calculate the sum value of.
+         * @return {Number} The sum.
+         */
+        sum : function(arr){
+           var ret = 0;
+           Ext.each(arr, function(v) {
+               ret += v;
+           });
+           return ret;
+        },
+
+        /**
+         * Partitions the set into two sets: a true set and a false set.
+         * Example: 
+         * Example2: 
+         * <pre><code>
+// Example 1:
+Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
+
+// Example 2:
+Ext.partition(
+    Ext.query("p"),
+    function(val){
+        return val.className == "class1"
+    }
+);
+// true are those paragraph elements with a className of "class1",
+// false set are those that do not have that className.
+         * </code></pre>
+         * @param {Array|NodeList} arr The array to partition
+         * @param {Function} truth (optional) a function to determine truth.  If this is omitted the element
+         *                   itself must be able to be evaluated for its truthfulness.
+         * @return {Array} [true<Array>,false<Array>]
+         */
+        partition : function(arr, truth){
+            var ret = [[],[]];
+            Ext.each(arr, function(v, i, a) {
+                ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
+            });
+            return ret;
+        },
+
+        /**
+         * Invokes a method on each item in an Array.
+         * <pre><code>
+// Example:
+Ext.invoke(Ext.query("p"), "getAttribute", "id");
+// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to invoke the method on.
+         * @param {String} methodName The method name to invoke.
+         * @param {Anything} ... Arguments to send into the method invocation.
+         * @return {Array} The results of invoking the method on each item in the array.
+         */
+        invoke : function(arr, methodName){
+            var ret = [],
+                args = Array.prototype.slice.call(arguments, 2);
+            Ext.each(arr, function(v,i) {
+                if (v && typeof v[methodName] == "function") {
+                    ret.push(v[methodName].apply(v, args));
+                } else {
+                    ret.push(undefined);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Plucks the value of a property from each item in the Array
+         * <pre><code>
+// Example:
+Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to pluck the value from.
+         * @param {String} prop The property name to pluck from each element.
+         * @return {Array} The value from each item in the Array.
+         */
+        pluck : function(arr, prop){
+            var ret = [];
+            Ext.each(arr, function(v) {
+                ret.push( v[prop] );
+            });
+            return ret;
+        },
+
+        /**
+         * <p>Zips N sets together.</p>
+         * <pre><code>
+// Example 1:
+Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
+// Example 2:
+Ext.zip(
+    [ "+", "-", "+"],
+    [  12,  10,  22],
+    [  43,  15,  96],
+    function(a, b, c){
+        return "$" + a + "" + b + "." + c
+    }
+); // ["$+12.43", "$-10.15", "$+22.96"]
+         * </code></pre>
+         * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
+         * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
+         * @return {Array} The zipped set.
+         */
+        zip : function(){
+            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+                arrs = parts[0],
+                fn = parts[1][0],
+                len = Ext.max(Ext.pluck(arrs, "length")),
+                ret = [];
+
+            for (var i = 0; i < len; i++) {
+                ret[i] = [];
+                if(fn){
+                    ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
+                }else{
+                    for (var j = 0, aLen = arrs.length; j < aLen; j++){
+                        ret[i].push( arrs[j][i] );
+                    }
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * This is shorthand reference to {@link Ext.ComponentMgr#get}.
+         * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+        */
+        getCmp : function(id){
+            return Ext.ComponentMgr.get(id);
+        },
+
+        /**
+         * 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: E.isIE6 || (E.isMac && E.isGecko2),
+
+        // 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:<div class="mdetail-params"><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>date</b>: If the object passed is a Date object</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>
+         * </ul></div>
+         * @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';
+                    case Date: return 'date';
+                }
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
+                    return 'nodelist';
+                }
+            }
+            return t;
+        },
+
+        intercept : function(o, name, fn, scope){
+            o[name] = o[name].createInterceptor(fn, scope);
+        },
+
+        // internal
+        callback : function(cb, scope, args, delay){
+            if(Ext.isFunction(cb)){
+                if(delay){
+                    cb.defer(delay, scope, args || []);
+                }else{
+                    cb.apply(scope, args || []);
+                }
+            }
+        }
+    };
+}());
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+    /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function(){
+                    var retval = method.apply(this || window, arguments);
+                    fcn.apply(scope || this || window, arguments);
+                    return retval;
+                };
+    }
+});
+
+
+/**
+ * @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 = String(val);
+        if(!ch) {
+            ch = " ";
+        }
+        while (result.length < size) {
+            result = ch + result;
+        }
+        return result;
+    }
+});
+
+/**
+ * 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, ""); };
+}();
+
+// here to prevent dependency on Date.js
+/**
+ 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());
+};
+
+
+/**
+ * @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 Ext.util.TaskRunner
+ * Provides the ability to execute one or more arbitrary tasks in a multithreaded
+ * manner.  Generally, you can use the singleton {@link Ext.TaskMgr} instead, but
+ * if needed, you can create separate instances of TaskRunner.  Any number of
+ * separate tasks can be started at any time and will run independently of each
+ * other. Example usage:
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * </code></pre>
+ * Also see {@link Ext.util.DelayedTask}. 
+ * 
+ * @constructor
+ * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance
+ * (defaults to 10)
+ */
+Ext.util.TaskRunner = function(interval){
+    interval = interval || 10;
+    var tasks = [], 
+    	removeQueue = [],
+    	id = 0,
+    	running = false,
+
+    	// private
+    	stopThread = function(){
+	        running = false;
+	        clearInterval(id);
+	        id = 0;
+	    },
+
+    	// private
+    	startThread = function(){
+	        if(!running){
+	            running = true;
+	            id = setInterval(runTasks, interval);
+	        }
+	    },
+
+    	// private
+    	removeTask = function(t){
+	        removeQueue.push(t);
+	        if(t.onStop){
+	            t.onStop.apply(t.scope || t);
+	        }
+	    },
+	    
+    	// private
+    	runTasks = function(){
+	    	var rqLen = removeQueue.length,
+	    		now = new Date().getTime();	    			    		
+	    
+	        if(rqLen > 0){
+	            for(var i = 0; i < rqLen; i++){
+	                tasks.remove(removeQueue[i]);
+	            }
+	            removeQueue = [];
+	            if(tasks.length < 1){
+	                stopThread();
+	                return;
+	            }
+	        }	        
+	        for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){
+	            t = tasks[i];
+	            itime = now - t.taskRunTime;
+	            if(t.interval <= itime){
+	                rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]);
+	                t.taskRunTime = now;
+	                if(rt === false || t.taskRunCount === t.repeat){
+	                    removeTask(t);
+	                    return;
+	                }
+	            }
+	            if(t.duration && t.duration <= (now - t.taskStartTime)){
+	                removeTask(t);
+	            }
+	        }
+	    };
+
+    /**
+     * Starts a new task.
+     * @method start
+     * @param {Object} task A config object that supports the following properties:<ul>
+     * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
+     * function will be called at each interval and passed the <code>args</code> argument if specified.  If a
+     * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+     * <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
+     * should be executed.</div></li>
+     * <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
+     * specified by <code>run</code>.</div></li>
+     * <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
+     * <code>run</code> function. Defaults to the task config object.</div></li>
+     * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+     * the task before stopping automatically (defaults to indefinite).</div></li>
+     * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+     * stopping automatically (defaults to indefinite).</div></li>
+     * </ul>
+     * @return {Object} The task
+     */
+    this.start = function(task){
+        tasks.push(task);
+        task.taskStartTime = new Date().getTime();
+        task.taskRunTime = 0;
+        task.taskRunCount = 0;
+        startThread();
+        return task;
+    };
+
+    /**
+     * Stops an existing running task.
+     * @method stop
+     * @param {Object} task The task to stop
+     * @return {Object} The task
+     */
+    this.stop = function(task){
+        removeTask(task);
+        return task;
+    };
+
+    /**
+     * Stops all tasks that are currently running.
+     * @method stopAll
+     */
+    this.stopAll = function(){
+        stopThread();
+        for(var i = 0, len = tasks.length; i < len; i++){
+            if(tasks[i].onStop){
+                tasks[i].onStop();
+            }
+        }
+        tasks = [];
+        removeQueue = [];
+    };
+};
+
+/**
+ * @class Ext.TaskMgr
+ * @extends Ext.util.TaskRunner
+ * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks.  See
+ * {@link Ext.util.TaskRunner} for supported methods and task config properties.
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+</code></pre>
+ * @singleton
+ */
+Ext.TaskMgr = new Ext.util.TaskRunner();if(typeof jQuery == "undefined"){
+    throw "Unable to load Ext, jQuery not found.";
+}
+
+(function(){
+var libFlyweight;
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        // jQuery doesn't report full window size on document query, so max both
+        return full ? Math.max(jQuery(document).width(),jQuery(window).width()) : jQuery(window).width();
+    },
+
+    getViewHeight : function(full){
+        // jQuery doesn't report full window size on document query, so max both
+        return full ? Math.max(jQuery(document).height(),jQuery(window).height()) : jQuery(window).height();
+    },
+
+    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);
+    },
+
+    //////////////////////////////////////////////////////////////////////////////////////
+    // Use of jQuery.offset() removed to promote consistent behavior across libs.
+    // JVS 05/23/07
+    //////////////////////////////////////////////////////////////////////////////////////
+
+    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 [Math.round(b.left + scroll.left), Math.round(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]);
+    }
+};
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+Ext.lib.Event = {
+    getPageX : function(e){
+        e = e.browserEvent || e;
+        return e.pageX;
+    },
+
+    getPageY : function(e){
+        e = e.browserEvent || e;
+        return e.pageY;
+    },
+
+    getXY : function(e){
+        e = e.browserEvent || e;
+        return [e.pageX, e.pageY];
+    },
+
+    getTarget : function(e){
+        return e.target;
+    },
+
+    // all Ext events will go through event manager which provides scoping
+    on : function(el, eventName, fn, scope, override){
+        jQuery(el).bind(eventName, fn);
+    },
+
+    un : function(el, eventName, fn){
+        jQuery(el).unbind(eventName, fn);
+    },
+
+    purgeElement : function(el){
+        jQuery(el).unbind();
+    },
+
+    preventDefault : function(e){
+        e = e.browserEvent || e;
+        if(e.preventDefault){
+            e.preventDefault();
+        }else{
+            e.returnValue = false;
+        }
+    },
+
+    stopPropagation : function(e){
+        e = e.browserEvent || e;
+        if(e.stopPropagation){
+            e.stopPropagation();
+        }else{
+            e.cancelBubble = true;
+        }
+    },
+
+    stopEvent : function(e){
+        this.preventDefault(e);
+        this.stopPropagation(e);
+    },
+
+    onAvailable : function(id, fn, scope){
+        var start = new Date();
+        var f = function(){
+            if(start.getElapsed() > 10000){
+                clearInterval(iid);
+            }
+            var el = document.getElementById(id);
+            if(el){
+                clearInterval(iid);
+                fn.call(scope||window, el);
+            }
+        };
+        var iid = setInterval(f, 50);
+    },
+
+    resolveTextNode: function(node) {
+        if (node && 3 == node.nodeType) {
+            return node.parentNode;
+        } else {
+            return node;
+        }
+    },
+
+    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);
+    }
+};
+
+Ext.lib.Ajax = function(){
+    var createComplete = function(cb){
+         return function(xhr, status){
+            if((status == 'error' || status == 'timeout') && cb.failure){
+                cb.failure.call(cb.scope||window, {
+                    responseText: xhr.responseText,
+                    responseXML : xhr.responseXML,
+                    argument: cb.argument
+                });
+            }else if(cb.success){
+                cb.success.call(cb.scope||window, {
+                    responseText: xhr.responseText,
+                    responseXML : xhr.responseXML,
+                    argument: cb.argument
+                });
+            }
+         };
+    };
+    return {
+        request : function(method, uri, cb, data, options){
+            var o = {
+                type: method,
+                url: uri,
+                data: data,
+                timeout: cb.timeout,
+                complete: createComplete(cb)
+            };
+
+            if(options){
+                var hs = options.headers;
+                if(options.xmlData){
+                    o.data = options.xmlData;
+                    o.processData = false;
+                    o.type = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'text/xml';
+                    }
+                }else if(options.jsonData){
+                    o.data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData;
+                    o.processData = false;
+                    o.type = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'application/json';
+                    }
+                }
+                if(hs){
+                    o.beforeSend = function(xhr){
+                        for(var h in hs){
+                            if(hs.hasOwnProperty(h)){
+                                xhr.setRequestHeader(h, hs[h]);
+                            }
+                        }
+                    }
+                }
+            }
+            jQuery.ajax(o);
+        },
+
+        formRequest : function(form, uri, cb, data, isUpload, sslUri){
+            jQuery.ajax({
+                type: Ext.getDom(form).method ||'POST',
+                url: uri,
+                data: jQuery(form).serialize()+(data?'&'+data:''),
+                timeout: cb.timeout,
+                complete: createComplete(cb)
+            });
+        },
+
+        isCallInProgress : function(trans){
+            return false;
+        },
+
+        abort : function(trans){
+            return false;
+        },
+
+        serializeForm : function(form){
+            return jQuery(form.dom||form).serialize();
+        }
+    };
+}();
+
+Ext.lib.Anim = function(){
+    var createAnim = function(cb, scope){
+        var animated = true;
+        return {
+            stop : function(skipToLast){
+                // do nothing
+            },
+
+            isAnimated : function(){
+                return animated;
+            },
+
+            proxyCallback : function(){
+                animated = false;
+                Ext.callback(cb, scope);
+            }
+        };
+    };
+    return {
+        scroll : function(el, args, duration, easing, cb, scope){
+            // scroll anim not supported so just scroll immediately
+            var anim = createAnim(cb, scope);
+            el = Ext.getDom(el);
+            if(typeof args.scroll.to[0] == 'number'){
+                el.scrollLeft = args.scroll.to[0];
+            }
+            if(typeof args.scroll.to[1] == 'number'){
+                el.scrollTop = args.scroll.to[1];
+            }
+            anim.proxyCallback();
+            return anim;
+        },
+
+        motion : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        color : function(el, args, duration, easing, cb, scope){
+            // color anim not supported, so execute callback immediately
+            var anim = createAnim(cb, scope);
+            anim.proxyCallback();
+            return anim;
+        },
+
+        run : function(el, args, duration, easing, cb, scope, type){
+            var anim = createAnim(cb, scope), e = Ext.fly(el, '_animrun');
+            var o = {};
+            for(var k in args){
+                switch(k){   // jquery doesn't support, so convert
+                    case 'points':
+                        var by, pts;
+                        e.position();
+                        if(by = args.points.by){
+                            var xy = e.getXY();
+                            pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]);
+                        }else{
+                            pts = e.translatePoints(args.points.to);
+                        }
+                        o.left = pts.left;
+                        o.top = pts.top;
+                        if(!parseInt(e.getStyle('left'), 10)){ // auto bug
+                            e.setLeft(0);
+                        }
+                        if(!parseInt(e.getStyle('top'), 10)){
+                            e.setTop(0);
+                        }
+                        if(args.points.from){
+                            e.setXY(args.points.from);
+                        }
+                    break;
+                    case 'width':
+                        o.width = args.width.to;
+                        if (args.width.from)
+                            e.setWidth(args.width.from);
+                    break;
+                    case 'height':
+                        o.height = args.height.to;
+                        if (args.height.from)
+                            e.setHeight(args.height.from);
+                    break;
+                    case 'opacity':
+                        o.opacity = args.opacity.to;
+                        if (args.opacity.from)
+                            e.setOpacity(args.opacity.from);
+                    break;
+                    case 'left':
+                        o.left = args.left.to;
+                        if (args.left.from)
+                            e.setLeft(args.left.from);
+                    break;
+                    case 'top':
+                        o.top = args.top.to;
+                        if (args.top.from)
+                            e.setTop(args.top.from);
+                    break;
+                    default:
+                        o[k] = args[k].to;
+                        if (args[k].from)
+                            e.setStyle(k, args[k].from);
+                    break;
+                }
+            }
+            // TODO: find out about easing plug in?
+            jQuery(el).animate(o, duration*1000, undefined, anim.proxyCallback);
+            return anim;
+        }
+    };
+}();
+
+
+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();
+
+// prevent IE leaks
+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);
+}
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/jquery/ext-jquery-adapter.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,t=Object.prototype.toString,s=function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(t.call(e))){return true}return((e.nextNode||e.item)&&Ext.isNumber(e.length))},u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u)},i=document,l=i.compatMode=="CSS1Compat",B=z(/opera/),h=z(/chrome/),v=z(/webkit/),y=!h&&z(/safari/),f=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),r=!B&&z(/msie/),p=r&&z(/msie 7/),o=r&&z(/msie 8/),q=r&&!p&&!o,n=!v&&z(/gecko/),d=n&&z(/rv:1\.8/),a=n&&z(/rv:1\.9/),w=r&&!l,A=z(/windows|win32/),k=z(/macintosh|mac os x/),j=z(/adobeair/),m=z(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:"javascript:false",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(Ext.isEmpty(D[e])){D[e]=E[e]}}}return D},id:function(e,D){return(e=Ext.getDom(e)||{}).id=e.id||(D||"ext-gen")+(++g)},extend:function(){var D=function(F){for(var E in F){this[E]=F[E]}};var e=Object.prototype.constructor;return function(K,H,J){if(Ext.isObject(H)){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments)}}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H}K.override=function(F){Ext.override(K,F)};I.superclass=I.supr=(function(){return E});I.override=D;Ext.override(K,J);K.extend=function(F){Ext.extend(K,F)};return K}}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.toString!=e.toString){D.toString=E.toString}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{}})});return D},urlEncode:function(I,H){var F,D=[],E,G=encodeURIComponent;for(E in I){F=!Ext.isDefined(I[E]);Ext.each(F?E:I[E],function(J,e){D.push("&",G(E),"=",(J!=E||!F)?G(J):"")})}if(!H){D.shift();H=""}return H+D.join("")},urlDecode:function(E,D){var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F)});return H},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D}return e},toArray:function(){return r?function(e,F,D,E){E=[];Ext.each(e,function(G){E.push(G)});return E.slice(F||0,D||E.length)}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length)}}(),each:function(G,F,E){if(Ext.isEmpty(G,true)){return}if(!s(G)||Ext.isPrimitive(G)){G=[G]}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D}}},iterate:function(E,D,e){if(s(E)){Ext.each(E,D,e);return}else{if(Ext.isObject(E)){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F])===false){return}}}}}},getDom:function(e){if(!e||!i){return null}return e.dom?e.dom:(Ext.isString(e)?i.getElementById(e):e)},getBody:function(){return Ext.get(i.body||i.documentElement)},removeNode:r?function(){var e;return function(D){if(D&&D.tagName!="BODY"){e=e||i.createElement("div");e.appendChild(D);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false)},isArray:function(e){return t.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return t.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isDefined:function(e){return typeof e!=="undefined"},isOpera:B,isWebKit:v,isChrome:h,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:f,isIE:r,isIE6:q,isIE7:p,isIE8:o,isGecko:n,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:m,isWindows:A,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.ns("Ext.grid","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var b=Ext,a=0;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7?"http://extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(c,d){return Ext.extend(c,d(c.prototype))},getDoc:function(){return Ext.get(document)},isDate:function(c){return Object.prototype.toString.apply(c)==="[object Date]"},num:function(d,c){d=Number(d===null||typeof d=="boolean"?NaN:d);return isNaN(d)?c:d},value:function(e,c,d){return Ext.isEmpty(e,d)?c:e},escapeRe:function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(f,c,e,d){f[c]=f[c].createSequence(e,d)},addBehaviors:function(g){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(g)})}else{var d={},f,c,e;for(c in g){if((f=c.split("@"))[1]){e=f[0];if(!d[e]){d[e]=Ext.select(e)}d[e].on(f[1],g[c])}}d=null}},combine:function(){var e=arguments,d=e.length,g=[];for(var f=0;f<d;f++){var c=e[f];if(Ext.isArray(c)){g=g.concat(c)}else{if(c.length!==undefined&&!c.substr){g=g.concat(Array.prototype.slice.call(c,0))}else{g.push(c)}}}return g},copyTo:function(c,d,e){if(typeof e=="string"){e=e.split(/[,;\s]/)}Ext.each(e,function(f){if(d.hasOwnProperty(f)){c[f]=d[f]}},this);return c},destroy:function(){Ext.each(arguments,function(c){if(c){if(Ext.isArray(c)){this.destroy.apply(this,c)}else{if(Ext.isFunction(c.destroy)){c.destroy()}else{if(c.dom){c.remove()}}}}},this)},destroyMembers:function(j,g,e,f){for(var h=1,d=arguments,c=d.length;h<c;h++){Ext.destroy(j[d[h]]);delete j[d[h]]}},clean:function(c){var d=[];Ext.each(c,function(e){if(!!e){d.push(e)}});return d},unique:function(c){var d=[],e={};Ext.each(c,function(f){if(!e[f]){d.push(f)}e[f]=true});return d},flatten:function(c){var e=[];function d(f){Ext.each(f,function(g){if(Ext.isArray(g)){d(g)}else{e.push(g)}});return e}return d(c)},min:function(c,d){var e=c[0];d=d||function(g,f){return g<f?-1:1};Ext.each(c,function(f){e=d(e,f)==-1?e:f});return e},max:function(c,d){var e=c[0];d=d||function(g,f){return g>f?1:-1};Ext.each(c,function(f){e=d(e,f)==1?e:f});return e},mean:function(c){return Ext.sum(c)/c.length},sum:function(c){var d=0;Ext.each(c,function(e){d+=e});return d},partition:function(c,d){var e=[[],[]];Ext.each(c,function(g,h,f){e[(d&&d(g,h,f))||(!d&&g)?0:1].push(g)});return e},invoke:function(c,d){var f=[],e=Array.prototype.slice.call(arguments,2);Ext.each(c,function(g,h){if(g&&typeof g[d]=="function"){f.push(g[d].apply(g,e))}else{f.push(undefined)}});return f},pluck:function(c,e){var d=[];Ext.each(c,function(f){d.push(f[e])});return d},zip:function(){var l=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),g=l[0],k=l[1][0],c=Ext.max(Ext.pluck(g,"length")),f=[];for(var h=0;h<c;h++){f[h]=[];if(k){f[h]=k.apply(k,Ext.pluck(g,h))}else{for(var e=0,d=g.length;e<d;e++){f[h].push(g[e][h])}}}return f},getCmp:function(c){return Ext.ComponentMgr.get(c)},useShims:b.isIE6||(b.isMac&&b.isGecko2),type:function(d){if(d===undefined||d===null){return false}if(d.htmlElement){return"element"}var c=typeof d;if(c=="object"&&d.nodeName){switch(d.nodeType){case 1:return"element";case 3:return(/\S/).test(d.nodeValue)?"textnode":"whitespace"}}if(c=="object"||c=="function"){switch(d.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if(typeof d.length=="number"&&typeof d.item=="function"){return"nodelist"}}return c},intercept:function(f,c,e,d){f[c]=f[c].createInterceptor(e,d)},callback:function(c,f,e,d){if(Ext.isFunction(c)){if(d){c.defer(d,f,e||[])}else{c.apply(f,e||[])}}}}}());Ext.apply(Function.prototype,{createSequence:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});String.prototype.toggle=function(b,a){return this==b?a:b};String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}();Date.prototype.getElapsed=function(a){return Math.abs((a||new Date()).getTime()-this.getTime())};Ext.applyIf(Number.prototype,{constrain:function(b,a){return Math.min(Math.max(this,b),a)}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();if(typeof jQuery=="undefined"){throw"Unable to load Ext, jQuery not found."}(function(){var b;Ext.lib.Dom={getViewWidth:function(d){return d?Math.max(jQuery(document).width(),jQuery(window).width()):jQuery(window).width()},getViewHeight:function(d){return d?Math.max(jQuery(document).height(),jQuery(window).height()):jQuery(window).height()},isAncestor:function(e,f){e=Ext.getDom(e);f=Ext.getDom(f);if(!e||!f){return false}if(e.contains&&!Ext.isSafari){return e.contains(f)}else{if(e.compareDocumentPosition){return !!(e.compareDocumentPosition(f)&16)}else{var d=f.parentNode;while(d){if(d==e){return true}else{if(!d.tagName||d.tagName.toUpperCase()=="HTML"){return false}}d=d.parentNode}return false}}},getRegion:function(d){return Ext.lib.Region.getRegion(d)},getY:function(d){return this.getXY(d)[1]},getX:function(d){return this.getXY(d)[0]},getXY:function(f){var e,j,l,m,i=(document.body||document.documentElement);f=Ext.getDom(f);if(f==i){return[0,0]}if(f.getBoundingClientRect){l=f.getBoundingClientRect();m=c(document).getScroll();return[Math.round(l.left+m.left),Math.round(l.top+m.top)]}var n=0,k=0;e=f;var d=c(f).getStyle("position")=="absolute";while(e){n+=e.offsetLeft;k+=e.offsetTop;if(!d&&c(e).getStyle("position")=="absolute"){d=true}if(Ext.isGecko){j=c(e);var o=parseInt(j.getStyle("borderTopWidth"),10)||0;var g=parseInt(j.getStyle("borderLeftWidth"),10)||0;n+=g;k+=o;if(e!=f&&j.getStyle("overflow")!="visible"){n+=g;k+=o}}e=e.offsetParent}if(Ext.isSafari&&d){n-=i.offsetLeft;k-=i.offsetTop}if(Ext.isGecko&&!d){var h=c(i);n+=parseInt(h.getStyle("borderLeftWidth"),10)||0;k+=parseInt(h.getStyle("borderTopWidth"),10)||0}e=f.parentNode;while(e&&e!=i){if(!Ext.isOpera||(e.tagName!="TR"&&c(e).getStyle("display")!="inline")){n-=e.scrollLeft;k-=e.scrollTop}e=e.parentNode}return[n,k]},setXY:function(d,e){d=Ext.fly(d,"_setXY");d.position();var f=d.translatePoints(e);if(e[0]!==false){d.dom.style.left=f.left+"px"}if(e[1]!==false){d.dom.style.top=f.top+"px"}},setX:function(e,d){this.setXY(e,[d,false])},setY:function(d,e){this.setXY(d,[false,e])}};function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}Ext.lib.Event={getPageX:function(d){d=d.browserEvent||d;return d.pageX},getPageY:function(d){d=d.browserEvent||d;return d.pageY},getXY:function(d){d=d.browserEvent||d;return[d.pageX,d.pageY]},getTarget:function(d){return d.target},on:function(h,d,g,f,e){jQuery(h).bind(d,g)},un:function(f,d,e){jQuery(f).unbind(d,e)},purgeElement:function(d){jQuery(d).unbind()},preventDefault:function(d){d=d.browserEvent||d;if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}},stopPropagation:function(d){d=d.browserEvent||d;if(d.stopPropagation){d.stopPropagation()}else{d.cancelBubble=true}},stopEvent:function(d){this.preventDefault(d);this.stopPropagation(d)},onAvailable:function(j,e,d){var i=new Date();var g=function(){if(i.getElapsed()>10000){clearInterval(h)}var f=document.getElementById(j);if(f){clearInterval(h);e.call(d||window,f)}};var h=setInterval(g,50)},resolveTextNode:function(d){if(d&&3==d.nodeType){return d.parentNode}else{return d}},getRelatedTarget:function(e){e=e.browserEvent||e;var d=e.relatedTarget;if(!d){if(e.type=="mouseout"){d=e.toElement}else{if(e.type=="mouseover"){d=e.fromElement}}}return this.resolveTextNode(d)}};Ext.lib.Ajax=function(){var d=function(e){return function(g,f){if((f=="error"||f=="timeout")&&e.failure){e.failure.call(e.scope||window,{responseText:g.responseText,responseXML:g.responseXML,argument:e.argument})}else{if(e.success){e.success.call(e.scope||window,{responseText:g.responseText,responseXML:g.responseXML,argument:e.argument})}}}};return{request:function(k,h,e,i,f){var j={type:k,url:h,data:i,timeout:e.timeout,complete:d(e)};if(f){var g=f.headers;if(f.xmlData){j.data=f.xmlData;j.processData=false;j.type=(k?k:(f.method?f.method:"POST"));if(!g||!g["Content-Type"]){j.contentType="text/xml"}}else{if(f.jsonData){j.data=typeof f.jsonData=="object"?Ext.encode(f.jsonData):f.jsonData;j.processData=false;j.type=(k?k:(f.method?f.method:"POST"));if(!g||!g["Content-Type"]){j.contentType="application/json"}}}if(g){j.beforeSend=function(m){for(var l in g){if(g.hasOwnProperty(l)){m.setRequestHeader(l,g[l])}}}}}jQuery.ajax(j)},formRequest:function(i,h,f,j,e,g){jQuery.ajax({type:Ext.getDom(i).method||"POST",url:h,data:jQuery(i).serialize()+(j?"&"+j:""),timeout:f.timeout,complete:d(f)})},isCallInProgress:function(e){return false},abort:function(e){return false},serializeForm:function(e){return jQuery(e.dom||e).serialize()}}}();Ext.lib.Anim=function(){var d=function(e,f){var g=true;return{stop:function(h){},isAnimated:function(){return g},proxyCallback:function(){g=false;Ext.callback(e,f)}}};return{scroll:function(h,f,j,k,e,g){var i=d(e,g);h=Ext.getDom(h);if(typeof f.scroll.to[0]=="number"){h.scrollLeft=f.scroll.to[0]}if(typeof f.scroll.to[1]=="number"){h.scrollTop=f.scroll.to[1]}i.proxyCallback();return i},motion:function(h,f,i,j,e,g){return this.run(h,f,i,j,e,g)},color:function(h,f,j,k,e,g){var i=d(e,g);i.proxyCallback();return i},run:function(g,q,j,p,h,s,r){var l=d(h,s),m=Ext.fly(g,"_animrun");var f={};for(var i in q){switch(i){case"points":var n,u;m.position();if(n=q.points.by){var t=m.getXY();u=m.translatePoints([t[0]+n[0],t[1]+n[1]])}else{u=m.translatePoints(q.points.to)}f.left=u.left;f.top=u.top;if(!parseInt(m.getStyle("left"),10)){m.setLeft(0)}if(!parseInt(m.getStyle("top"),10)){m.setTop(0)}if(q.points.from){m.setXY(q.points.from)}break;case"width":f.width=q.width.to;if(q.width.from){m.setWidth(q.width.from)}break;case"height":f.height=q.height.to;if(q.height.from){m.setHeight(q.height.from)}break;case"opacity":f.opacity=q.opacity.to;if(q.opacity.from){m.setOpacity(q.opacity.from)}break;case"left":f.left=q.left.to;if(q.left.from){m.setLeft(q.left.from)}break;case"top":f.top=q.top.to;if(q.top.from){m.setTop(q.top.from)}break;default:f[i]=q[i].to;if(q[i].from){m.setStyle(i,q[i].from)}break}}jQuery(g).animate(f,j*1000,undefined,l.proxyCallback);return l}}}();Ext.lib.Region=function(f,g,d,e){this.top=f;this[1]=f;this.right=g;this.bottom=d;this.left=e;this[0]=e};Ext.lib.Region.prototype={contains:function(d){return(d.left>=this.left&&d.right<=this.right&&d.top>=this.top&&d.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(h){var f=Math.max(this.top,h.top);var g=Math.min(this.right,h.right);var d=Math.min(this.bottom,h.bottom);var e=Math.max(this.left,h.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}else{return null}},union:function(h){var f=Math.min(this.top,h.top);var g=Math.max(this.right,h.right);var d=Math.max(this.bottom,h.bottom);var e=Math.min(this.left,h.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(d){this.top=this.top.constrain(d.top,d.bottom);this.bottom=this.bottom.constrain(d.top,d.bottom);this.left=this.left.constrain(d.left,d.right);this.right=this.right.constrain(d.left,d.right);return this},adjust:function(f,e,d,g){this.top+=f;this.left+=e;this.right+=g;this.bottom+=d;return this}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g);var f=i[1];var h=i[0]+g.offsetWidth;var d=i[1]+g.offsetHeight;var e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,e){if(Ext.isArray(d)){e=d[1];d=d[0]}this.x=this.right=this.left=this[0]=d;this.y=this.top=this.bottom=this[1]=e};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter-debug.js	(revision 625)
@@ -0,0 +1,2346 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// for old browsers
+window.undefined = window.undefined;
+
+/**
+ * @class Ext
+ * Ext core utilities and functions.
+ * @singleton
+ */
+
+Ext = {
+    /**
+     * The version of the framework
+     * @type String
+     */
+    version : '3.0'
+};
+
+/**
+ * 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){
+    // no "this" reference for friendly out of scope calls
+    if(defaults){
+        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,
+        toString = Object.prototype.toString,
+        //assume it's not null and not an array
+        isIterable = function(v){
+            //check for array or arguments
+            if(Ext.isArray(v) || v.callee){
+                return true;
+            }
+            //check for node list type
+            if(/NodeList|HTMLCollection/.test(toString.call(v))){
+                return true;
+            }
+            //NodeList has an item and length property
+            //IXMLDOMNodeList has nextNode method, needs to be checked first.
+            return ((v.nextNode || v.item) && Ext.isNumber(v.length));
+        },
+        ua = navigator.userAgent.toLowerCase(),
+        check = function(r){
+            return r.test(ua);
+        },
+        DOC = document,
+        isStrict = DOC.compatMode == "CSS1Compat",
+        isOpera = check(/opera/),
+        isChrome = check(/chrome/),
+        isWebKit = check(/webkit/),
+        isSafari = !isChrome && check(/safari/),
+        isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
+        isSafari3 = isSafari && check(/version\/3/),
+        isSafari4 = isSafari && check(/version\/4/),
+        isIE = !isOpera && check(/msie/),
+        isIE7 = isIE && check(/msie 7/),
+        isIE8 = isIE && check(/msie 8/),
+        isIE6 = isIE && !isIE7 && !isIE8,
+        isGecko = !isWebKit && check(/gecko/),
+        isGecko2 = isGecko && check(/rv:1\.8/),
+        isGecko3 = isGecko && check(/rv:1\.9/),
+        isBorderBox = isIE && !isStrict,
+        isWindows = check(/windows|win32/),
+        isMac = check(/macintosh|mac os x/),
+        isAir = check(/adobeair/),
+        isLinux = check(/linux/),
+        isSecure = /^https/i.test(window.location.protocol);
+
+    // remove css image flicker
+    if(isIE6){
+        try{
+            DOC.execCommand("BackgroundImageCache", false, true);
+        }catch(e){}
+    }
+
+    Ext.apply(Ext, {
+        /**
+         * 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',
+        /**
+         * 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 if the {@link Ext.Fx} Class is available
+         * @type Boolean
+         * @property enableFx
+         */
+
+        /**
+         * 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 {@link #enableGarbageCollector} is true.
+         * @type Boolean
+         */
+        enableListenerCollection : false,
+
+        /**
+         * Indicates whether to use native browser parsing for JSON methods.
+         * This option is ignored if the browser does not support native JSON methods.
+         * <b>Note: Native JSON methods will not work with objects that have functions.
+         * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
+         * @type Boolean
+         */
+        USE_NATIVE_JSON : false,
+
+        /**
+         * 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){
+                for(var p in c){
+                    if(Ext.isEmpty(o[p])){
+                        o[p] = c[p];
+                    }
+                }
+            }
+            return o;
+        },
+
+        /**
+         * 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){
+            return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed);
+        },
+
+        /**
+         * 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(Ext.isObject(sp)){
+                    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.superclass = sbp.supr = (function(){
+                    return spp;
+                });
+                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;
+                Ext.apply(p, overrides);
+                if(Ext.isIE && overrides.toString != origclass.toString){
+                    p.toString = overrides.toString;
+                }
+            }
+        },
+
+        /**
+         * Creates namespaces to be used for scoping variables and classes so that they are not global.
+         * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+         * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+         * @param {String} namespace1
+         * @param {String} namespace2
+         * @param {String} etc
+         * @method namespace
+         */
+        namespace : function(){
+            var o, d;
+            Ext.each(arguments, function(v) {
+                d = v.split(".");
+                o = window[d[0]] = window[d[0]] || {};
+                Ext.each(d.slice(1), function(v2){
+                    o = o[v2] = o[v2] || {};
+                });
+            });
+            return o;
+        },
+
+        /**
+         * 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
+         * @param {String} pre (optional) A prefix to add to the url encoded string
+         * @return {String}
+         */
+        urlEncode: function(o, pre){
+            var undef, buf = [], key, e = encodeURIComponent;
+
+            for(key in o){
+                undef = !Ext.isDefined(o[key]);
+                Ext.each(undef ? key : o[key], function(val, i){
+                    buf.push("&", e(key), "=", (val != key || !undef) ? e(val) : "");
+                });
+            }
+            if(!pre){
+                buf.shift();
+                pre = "";
+            }
+            return pre + buf.join('');
+        },
+
+        /**
+         * Takes an encoded URL and and converts it to an object. Example: <pre><code>
+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+</code></pre>
+         * @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){
+            var obj = {},
+                pairs = string.split('&'),
+                d = decodeURIComponent,
+                name,
+                value;
+            Ext.each(pairs, function(pair) {
+                pair = pair.split('=');
+                name = d(pair[0]);
+                value = d(pair[1]);
+                obj[name] = overwrite || !obj[name] ? value :
+                            [].concat(obj[name]).concat(value);
+            });
+            return obj;
+        },
+
+        /**
+         * Appends content to the query string of a URL, which handles logic for whether to place
+         * a question mark or ampersand.
+         * @param {String} url The url to append to.
+         * @@param {String} s The content to append to the url.
+         * @return (String) The appended string
+         */
+        urlAppend : function(url, s){
+            if(!Ext.isEmpty(s)){
+                return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
+            }
+            return url;
+        },
+
+        /**
+         * Converts any iterable (numeric indices and a length property) into a true array
+         * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on.
+         * For strings, use this instead: "abc".match(/./g) => [a,b,c];
+         * @param {Iterable} the iterable object to be turned into a true Array.
+         * @return (Array) array
+         */
+        toArray : function(){
+            return isIE ?
+                function(a, i, j, res){
+                    res = [];
+                    Ext.each(a, function(v) {
+                        res.push(v);
+                    });
+                    return res.slice(i || 0, j || res.length);
+                } :
+                function(a, i, j){
+                    return Array.prototype.slice.call(a, i || 0, j || a.length);
+                }
+        }(),
+
+        /**
+         * 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(Ext.isEmpty(array, true)){
+                return;
+            }
+            if(!isIterable(array) || Ext.isPrimitive(array)){
+                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;
+                };
+            }
+        },
+
+        /**
+         * Iterates either the elements in an array, or each of the properties in an object.
+         * <b>Note</b>: If you are only iterating arrays, it is better to call {@link #each}.
+         * @param {Object/Array} object The object or array to be iterated
+         * @param {Function} fn The function to be called for each iteration.
+         * The iteration will stop if the supplied function returns false, or
+         * all array elements / object properties have been covered. The signature
+         * varies depending on the type of object being interated:
+         * <div class="mdetail-params"><ul>
+         * <li>Arrays : <tt>(Object item, Number index, Array allItems)</tt>
+         * <div class="sub-desc">
+         * When iterating an array, the supplied function is called with each item.</div></li>
+         * <li>Objects : <tt>(String key, Object value)</tt>
+         * <div class="sub-desc">
+         * When iterating an object, the supplied function is called with each key-value pair in
+         * the object.</div></li>
+         * </ul></div>
+         * @param {Object} scope The scope to call the supplied function with, defaults to
+         * the specified <tt>object</tt>
+         */
+        iterate : function(obj, fn, scope){
+            if(isIterable(obj)){
+                Ext.each(obj, fn, scope);
+                return;
+            }else if(Ext.isObject(obj)){
+                for(var prop in obj){
+                    if(obj.hasOwnProperty(prop)){
+                        if(fn.call(scope || obj, prop, obj[prop]) === false){
+                            return;
+                        };
+                    }
+                }
+            }
+        },
+
+        /**
+         * Return the dom node for the passed String (id), dom node, or Ext.Element.
+         * Here are some examples:
+         * <pre><code>
+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don&#39;t know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * </code></pre>
+         * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
+         * when this method is called to be successful.
+         * @param {Mixed} el
+         * @return HTMLElement
+         */
+        getDom : function(el){
+            if(!el || !DOC){
+                return null;
+            }
+            return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el);
+        },
+
+        /**
+         * Returns the current document body as an {@link Ext.Element}.
+         * @return Ext.Element The document body
+         */
+        getBody : function(){
+            return Ext.get(DOC.body || DOC.documentElement);
+        },
+
+        /**
+         * 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 || DOC.createElement('div');
+                    d.appendChild(n);
+                    d.innerHTML = '';
+                }
+            }
+        }() : function(n){
+            if(n && n.parentNode && n.tagName != 'BODY'){
+                n.parentNode.removeChild(n);
+            }
+        },
+
+        /**
+         * <p>Returns true if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
+         * @return {Boolean}
+         */
+        isEmpty : function(v, allowBlank){
+            return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript array, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isArray : function(v){
+            return toString.apply(v) === '[object Array]';
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isObject : function(v){
+            return v && typeof v == "object";
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript 'primitive', a string, number or boolean.
+         * @param {Mixed} value The value to test
+         * @return {Boolean}
+         */
+        isPrimitive : function(v){
+            return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Function, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isFunction : function(v){
+            return toString.apply(v) === '[object Function]';
+        },
+
+        /**
+         * Returns true if the passed object is a number. Returns false for non-finite numbers.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isNumber: function(v){
+            return typeof v === 'number' && isFinite(v);
+        },
+
+        /**
+         * Returns true if the passed object is a string.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isString: function(v){
+            return typeof v === 'string';
+        },
+
+        /**
+         * Returns true if the passed object is a boolean.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isBoolean: function(v){
+            return typeof v === 'boolean';
+        },
+
+        /**
+         * Returns true if the passed object is not undefined.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isDefined: function(v){
+            return typeof v !== 'undefined';
+        },
+
+        /**
+         * True if the detected browser is Opera.
+         * @type Boolean
+         */
+        isOpera : isOpera,
+        /**
+         * True if the detected browser uses WebKit.
+         * @type Boolean
+         */
+        isWebKit: isWebKit,
+        /**
+         * True if the detected browser is Chrome.
+         * @type Boolean
+         */
+        isChrome : isChrome,
+        /**
+         * 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 4.x.
+         * @type Boolean
+         */
+        isSafari4 : isSafari4,
+        /**
+         * True if the detected browser is Safari 2.x.
+         * @type Boolean
+         */
+        isSafari2 : isSafari2,
+        /**
+         * 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 : isIE6,
+        /**
+         * True if the detected browser is Internet Explorer 7.x.
+         * @type Boolean
+         */
+        isIE7 : isIE7,
+        /**
+         * True if the detected browser is Internet Explorer 8.x.
+         * @type Boolean
+         */
+        isIE8 : isIE8,
+        /**
+         * 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 : isGecko2,
+        /**
+         * 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
+    });
+
+    /**
+     * Creates namespaces to be used for scoping variables and classes so that they are not global.
+     * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+     * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+     * @param {String} namespace1
+     * @param {String} namespace2
+     * @param {String} etc
+     * @method namespace
+     */
+    Ext.ns = Ext.namespace;
+})();
+
+Ext.ns("Ext", "Ext.util", "Ext.lib", "Ext.data");
+
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+     /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function() {
+                    var me = this,
+                        args = arguments;
+                    fcn.target = me;
+                    fcn.method = method;
+                    return (fcn.apply(scope || me || window, args) !== false) ?
+                            method.apply(me || window, args) :
+                            null;
+                };
+    },
+
+     /**
+     * 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,
+            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 (Ext.isNumber(appendArgs)){
+                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 less than or equal to 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 > 0){
+            return setTimeout(fn, millis);
+        }
+        fn();
+        return 0;
+    }
+});
+
+/**
+ * @class String
+ * These functions are available on every String object.
+ */
+Ext.applyIf(String, {
+    /**
+     * 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 = Ext.toArray(arguments, 1);
+        return format.replace(/\{(\d+)\}/g, function(m, i){
+            return args[i];
+        });
+    }
+});
+
+/**
+ * @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;
+    }
+});
+/**
+ * @class Ext
+ */
+
+Ext.ns("Ext.grid", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
+       "Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
+    /**
+     * Namespace alloted for extensions to the framework.
+     * @property ux
+     * @type Object
+     */
+
+Ext.apply(Ext, function(){
+    var E = Ext, idSeed = 0;
+
+    return {
+        /**
+        * A reusable empty function
+        * @property
+        * @type Function
+        */
+        emptyFn : function(){},
+
+        /**
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
+         * For other browsers it uses an inline data URL.
+         * @type String
+         */
+        BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 ?
+                            'http:/' + '/extjs.com/s.gif' :
+                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
+
+        extendX : function(supr, fn){
+            return Ext.extend(supr, fn(supr.prototype));
+        },
+
+        /**
+         * Returns the current HTML document object as an {@link Ext.Element}.
+         * @return Ext.Element The document
+         */
+        getDoc : function(){
+            return Ext.get(document);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript date object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isDate : function(v){
+            return Object.prototype.toString.apply(v) === '[object Date]';
+        },
+
+        /**
+         * 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){
+            v = Number(v === null || typeof v == 'boolean'? NaN : v);
+            return isNaN(v)? defaultValue : v;
+        },
+
+        /**
+         * <p>Utility method for returning a default value if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Mixed} defaultValue The value to return if the original value is empty
+         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
+         * @return {Mixed} value, if non-empty, else defaultValue
+         */
+        value : function(v, defaultValue, allowBlank){
+            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
+        },
+
+        /**
+         * Escapes the passed string for use in a regular expression
+         * @param {String} str
+         * @return {String}
+         */
+        escapeRe : function(s) {
+            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
+        },
+
+        sequence : function(o, name, fn, scope){
+            o[name] = o[name].createSequence(fn, scope);
+        },
+
+        /**
+         * Applies event listeners to elements by selectors when the document is ready.
+         * The event name is specified with an <tt>&#64;</tt> suffix.
+         * <pre><code>
+Ext.addBehaviors({
+    // add a listener for click on all anchors in element with id foo
+    '#foo a&#64;click' : function(e, t){
+        // do something
+    },
+    
+    // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
+    '#foo a, #bar span.some-class&#64;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);
+                });
+            } else {
+                var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
+                    parts,
+                    b,
+                    s;
+                for (b in o) {
+                    if ((parts = b.split('@'))[1]) { // for Object prototype breakers
+                        s = parts[0];
+                        if(!cache[s]){
+                            cache[s] = Ext.select(s);
+                        }
+                        cache[s].on(parts[1], o[b]);
+                    }
+                }
+                cache = null;
+            }
+        },
+
+
+        // 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;
+        },
+
+        /**
+         * Copies a set of named properties fom the source object to the destination object.
+         * <p>example:<pre><code>
+ImageComponent = Ext.extend(Ext.BoxComponent, {
+    initComponent: function() {
+        this.autoEl = { tag: 'img' };
+        MyComponent.superclass.initComponent.apply(this, arguments);
+        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
+    }
+});
+         * </code></pre> 
+         * @param {Object} The destination object.
+         * @param {Object} The source object.
+         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * of property names to copy.
+         * @return {Object} The modified object.
+        */
+        copyTo : function(dest, source, names){
+            if(typeof names == 'string'){
+                names = names.split(/[,;\s]/);
+            }
+            Ext.each(names, function(name){
+                if(source.hasOwnProperty(name)){
+                    dest[name] = source[name];
+                }
+            }, this);
+            return dest;
+        },
+
+        /**
+         * 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}, {@link Ext.Component}, or an Array of either of these to destroy
+         * @param {Mixed} arg2 (optional)
+         * @param {Mixed} etc... (optional)
+         */
+        destroy : function(){
+            Ext.each(arguments, function(arg){
+                if(arg){
+                    if(Ext.isArray(arg)){
+                        this.destroy.apply(this, arg);
+                    }else if(Ext.isFunction(arg.destroy)){
+                        arg.destroy();
+                    }else if(arg.dom){
+                        arg.remove();
+                    }    
+                }
+            }, this);
+        },
+
+        /**
+         * Attempts to destroy and then remove a set of named properties of the passed object.
+         * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
+         * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
+         * @param {Mixed} etc... More property names to destroy and remove.
+         */
+        destroyMembers : function(o, arg1, arg2, etc){
+            for(var i = 1, a = arguments, len = a.length; i < len; i++) {
+                Ext.destroy(o[a[i]]);
+                delete o[a[i]];
+            }
+        },
+
+        /**
+         * Creates a copy of the passed Array with falsy values removed.
+         * @param {Array/NodeList} arr The Array from which to remove falsy values.
+         * @return {Array} The new, compressed Array.
+         */
+        clean : function(arr){
+            var ret = [];
+            Ext.each(arr, function(v){
+                if(!!v){
+                    ret.push(v);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Creates a copy of the passed Array, filtered to contain only unique values.
+         * @param {Array} arr The Array to filter
+         * @return {Array} The new Array containing unique values.
+         */
+        unique : function(arr){
+            var ret = [],
+                collect = {};
+
+            Ext.each(arr, function(v) {
+                if(!collect[v]){
+                    ret.push(v);
+                }
+                collect[v] = true;
+            });
+            return ret;
+        },
+
+        /**
+         * Recursively flattens into 1-d Array. Injects Arrays inline.
+         * @param {Array} arr The array to flatten
+         * @return {Array} The new, flattened array.
+         */
+        flatten : function(arr){
+            var worker = [];
+            function rFlatten(a) {
+                Ext.each(a, function(v) {
+                    if(Ext.isArray(v)){
+                        rFlatten(v);
+                    }else{
+                        worker.push(v);
+                    }
+                });
+                return worker;
+            }
+            return rFlatten(arr);
+        },
+
+        /**
+         * Returns the minimum value in the Array.
+         * @param {Array|NodeList} arr The Array from which to select the minimum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines minimization.
+         *                   If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The minimum value in the Array.
+         */
+        min : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a < b ? -1 : 1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == -1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Returns the maximum value in the Array
+         * @param {Array|NodeList} arr The Array from which to select the maximum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines maximization.
+         *                   If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The maximum value in the Array.
+         */
+        max : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a > b ? 1 : -1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == 1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Calculates the mean of the Array
+         * @param {Array} arr The Array to calculate the mean value of.
+         * @return {Number} The mean.
+         */
+        mean : function(arr){
+           return Ext.sum(arr) / arr.length;
+        },
+
+        /**
+         * Calculates the sum of the Array
+         * @param {Array} arr The Array to calculate the sum value of.
+         * @return {Number} The sum.
+         */
+        sum : function(arr){
+           var ret = 0;
+           Ext.each(arr, function(v) {
+               ret += v;
+           });
+           return ret;
+        },
+
+        /**
+         * Partitions the set into two sets: a true set and a false set.
+         * Example: 
+         * Example2: 
+         * <pre><code>
+// Example 1:
+Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
+
+// Example 2:
+Ext.partition(
+    Ext.query("p"),
+    function(val){
+        return val.className == "class1"
+    }
+);
+// true are those paragraph elements with a className of "class1",
+// false set are those that do not have that className.
+         * </code></pre>
+         * @param {Array|NodeList} arr The array to partition
+         * @param {Function} truth (optional) a function to determine truth.  If this is omitted the element
+         *                   itself must be able to be evaluated for its truthfulness.
+         * @return {Array} [true<Array>,false<Array>]
+         */
+        partition : function(arr, truth){
+            var ret = [[],[]];
+            Ext.each(arr, function(v, i, a) {
+                ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
+            });
+            return ret;
+        },
+
+        /**
+         * Invokes a method on each item in an Array.
+         * <pre><code>
+// Example:
+Ext.invoke(Ext.query("p"), "getAttribute", "id");
+// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to invoke the method on.
+         * @param {String} methodName The method name to invoke.
+         * @param {Anything} ... Arguments to send into the method invocation.
+         * @return {Array} The results of invoking the method on each item in the array.
+         */
+        invoke : function(arr, methodName){
+            var ret = [],
+                args = Array.prototype.slice.call(arguments, 2);
+            Ext.each(arr, function(v,i) {
+                if (v && typeof v[methodName] == "function") {
+                    ret.push(v[methodName].apply(v, args));
+                } else {
+                    ret.push(undefined);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Plucks the value of a property from each item in the Array
+         * <pre><code>
+// Example:
+Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to pluck the value from.
+         * @param {String} prop The property name to pluck from each element.
+         * @return {Array} The value from each item in the Array.
+         */
+        pluck : function(arr, prop){
+            var ret = [];
+            Ext.each(arr, function(v) {
+                ret.push( v[prop] );
+            });
+            return ret;
+        },
+
+        /**
+         * <p>Zips N sets together.</p>
+         * <pre><code>
+// Example 1:
+Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
+// Example 2:
+Ext.zip(
+    [ "+", "-", "+"],
+    [  12,  10,  22],
+    [  43,  15,  96],
+    function(a, b, c){
+        return "$" + a + "" + b + "." + c
+    }
+); // ["$+12.43", "$-10.15", "$+22.96"]
+         * </code></pre>
+         * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
+         * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
+         * @return {Array} The zipped set.
+         */
+        zip : function(){
+            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+                arrs = parts[0],
+                fn = parts[1][0],
+                len = Ext.max(Ext.pluck(arrs, "length")),
+                ret = [];
+
+            for (var i = 0; i < len; i++) {
+                ret[i] = [];
+                if(fn){
+                    ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
+                }else{
+                    for (var j = 0, aLen = arrs.length; j < aLen; j++){
+                        ret[i].push( arrs[j][i] );
+                    }
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * This is shorthand reference to {@link Ext.ComponentMgr#get}.
+         * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+        */
+        getCmp : function(id){
+            return Ext.ComponentMgr.get(id);
+        },
+
+        /**
+         * 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: E.isIE6 || (E.isMac && E.isGecko2),
+
+        // 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:<div class="mdetail-params"><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>date</b>: If the object passed is a Date object</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>
+         * </ul></div>
+         * @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';
+                    case Date: return 'date';
+                }
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
+                    return 'nodelist';
+                }
+            }
+            return t;
+        },
+
+        intercept : function(o, name, fn, scope){
+            o[name] = o[name].createInterceptor(fn, scope);
+        },
+
+        // internal
+        callback : function(cb, scope, args, delay){
+            if(Ext.isFunction(cb)){
+                if(delay){
+                    cb.defer(delay, scope, args || []);
+                }else{
+                    cb.apply(scope, args || []);
+                }
+            }
+        }
+    };
+}());
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+    /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function(){
+                    var retval = method.apply(this || window, arguments);
+                    fcn.apply(scope || this || window, arguments);
+                    return retval;
+                };
+    }
+});
+
+
+/**
+ * @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 = String(val);
+        if(!ch) {
+            ch = " ";
+        }
+        while (result.length < size) {
+            result = ch + result;
+        }
+        return result;
+    }
+});
+
+/**
+ * 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, ""); };
+}();
+
+// here to prevent dependency on Date.js
+/**
+ 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());
+};
+
+
+/**
+ * @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 Ext.util.TaskRunner
+ * Provides the ability to execute one or more arbitrary tasks in a multithreaded
+ * manner.  Generally, you can use the singleton {@link Ext.TaskMgr} instead, but
+ * if needed, you can create separate instances of TaskRunner.  Any number of
+ * separate tasks can be started at any time and will run independently of each
+ * other. Example usage:
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * </code></pre>
+ * Also see {@link Ext.util.DelayedTask}. 
+ * 
+ * @constructor
+ * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance
+ * (defaults to 10)
+ */
+Ext.util.TaskRunner = function(interval){
+    interval = interval || 10;
+    var tasks = [], 
+    	removeQueue = [],
+    	id = 0,
+    	running = false,
+
+    	// private
+    	stopThread = function(){
+	        running = false;
+	        clearInterval(id);
+	        id = 0;
+	    },
+
+    	// private
+    	startThread = function(){
+	        if(!running){
+	            running = true;
+	            id = setInterval(runTasks, interval);
+	        }
+	    },
+
+    	// private
+    	removeTask = function(t){
+	        removeQueue.push(t);
+	        if(t.onStop){
+	            t.onStop.apply(t.scope || t);
+	        }
+	    },
+	    
+    	// private
+    	runTasks = function(){
+	    	var rqLen = removeQueue.length,
+	    		now = new Date().getTime();	    			    		
+	    
+	        if(rqLen > 0){
+	            for(var i = 0; i < rqLen; i++){
+	                tasks.remove(removeQueue[i]);
+	            }
+	            removeQueue = [];
+	            if(tasks.length < 1){
+	                stopThread();
+	                return;
+	            }
+	        }	        
+	        for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){
+	            t = tasks[i];
+	            itime = now - t.taskRunTime;
+	            if(t.interval <= itime){
+	                rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]);
+	                t.taskRunTime = now;
+	                if(rt === false || t.taskRunCount === t.repeat){
+	                    removeTask(t);
+	                    return;
+	                }
+	            }
+	            if(t.duration && t.duration <= (now - t.taskStartTime)){
+	                removeTask(t);
+	            }
+	        }
+	    };
+
+    /**
+     * Starts a new task.
+     * @method start
+     * @param {Object} task A config object that supports the following properties:<ul>
+     * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
+     * function will be called at each interval and passed the <code>args</code> argument if specified.  If a
+     * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+     * <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
+     * should be executed.</div></li>
+     * <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
+     * specified by <code>run</code>.</div></li>
+     * <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
+     * <code>run</code> function. Defaults to the task config object.</div></li>
+     * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+     * the task before stopping automatically (defaults to indefinite).</div></li>
+     * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+     * stopping automatically (defaults to indefinite).</div></li>
+     * </ul>
+     * @return {Object} The task
+     */
+    this.start = function(task){
+        tasks.push(task);
+        task.taskStartTime = new Date().getTime();
+        task.taskRunTime = 0;
+        task.taskRunCount = 0;
+        startThread();
+        return task;
+    };
+
+    /**
+     * Stops an existing running task.
+     * @method stop
+     * @param {Object} task The task to stop
+     * @return {Object} The task
+     */
+    this.stop = function(task){
+        removeTask(task);
+        return task;
+    };
+
+    /**
+     * Stops all tasks that are currently running.
+     * @method stopAll
+     */
+    this.stopAll = function(){
+        stopThread();
+        for(var i = 0, len = tasks.length; i < len; i++){
+            if(tasks[i].onStop){
+                tasks[i].onStop();
+            }
+        }
+        tasks = [];
+        removeQueue = [];
+    };
+};
+
+/**
+ * @class Ext.TaskMgr
+ * @extends Ext.util.TaskRunner
+ * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks.  See
+ * {@link Ext.util.TaskRunner} for supported methods and task config properties.
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+</code></pre>
+ * @singleton
+ */
+Ext.TaskMgr = new Ext.util.TaskRunner();(function(){
+
+var libFlyweight,
+    version = Prototype.Version.split('.'),
+    mouseEnterSupported = (parseInt(version[0]) >= 2) || (parseInt(version[1]) >= 7) || (parseInt(version[2]) >= 1),
+    mouseCache = {},
+    isXUL = Ext.isGecko ? function(node){ 
+        return Object.prototype.toString.call(node) == '[object XULElement]';
+    } : function(){},
+    isTextNode = Ext.isGecko ? function(node){
+        try{
+            return node.nodeType == 3;
+        }catch(e) {
+            return false;
+        }
+
+    } : function(node){
+        return node.nodeType == 3;
+    },
+    elContains = function(parent, child) {
+       if(parent && parent.firstChild){  
+         while(child) {
+            if(child === parent) {
+                return true;
+            }
+            try {
+                child = child.parentNode;
+            } catch(e) {
+                // In FF if you mouseout an text input element
+                // thats inside a div sometimes it randomly throws
+                // Permission denied to get property HTMLDivElement.parentNode
+                // See https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+                return false;
+            }                
+            if(child && (child.nodeType != 1)) {
+                child = null;
+            }
+          }
+        }
+        return false;
+    },
+    checkRelatedTarget = function(e) {
+        var related = Ext.lib.Event.getRelatedTarget(e);
+        return !(isXUL(related) || elContains(e.currentTarget,related));
+    };
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        return full ? this.getDocumentWidth() : this.getViewportWidth();
+    },
+
+    getViewHeight : function(full){
+        return full ? this.getDocumentHeight() : this.getViewportHeight();
+    },
+
+    getDocumentHeight: function() { // missing from prototype?
+        var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight;
+        return Math.max(scrollHeight, this.getViewportHeight());
+    },
+
+    getDocumentWidth: function() { // missing from prototype?
+        var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth;
+        return Math.max(scrollWidth, this.getViewportWidth());
+    },
+
+    getViewportHeight: function() { // missing from prototype?
+        var height = self.innerHeight;
+        var mode = document.compatMode;
+
+        if ( (mode || Ext.isIE) && !Ext.isOpera ) {
+            height = (mode == "CSS1Compat") ?
+                    document.documentElement.clientHeight : // Standards
+                    document.body.clientHeight; // Quirks
+        }
+
+        return height;
+    },
+
+    getViewportWidth: function() { // missing from prototype?
+        var width = self.innerWidth;  // Safari
+        var mode = document.compatMode;
+
+        if (mode || Ext.isIE) { // IE, Gecko, Opera
+            width = (mode == "CSS1Compat") ?
+                    document.documentElement.clientWidth : // Standards
+                    document.body.clientWidth; // Quirks
+        }
+        return width;
+    },
+
+    isAncestor : function(p, c){ // missing from prototype?
+        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){ // this initially used Position.cumulativeOffset but it is not accurate enough
+        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 [Math.round(b.left + scroll.left), Math.round(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){ // this initially used Position.cumulativeOffset but it is not accurate enough
+        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]);
+    }
+};
+
+Ext.lib.Event = {
+    getPageX : function(e){
+        return Event.pointerX(e.browserEvent || e);
+    },
+
+    getPageY : function(e){
+        return Event.pointerY(e.browserEvent || e);
+    },
+
+    getXY : function(e){
+        e = e.browserEvent || e;
+        return [Event.pointerX(e), Event.pointerY(e)];
+    },
+
+    getTarget : function(e){
+        return Event.element(e.browserEvent || e);
+    },
+
+    resolveTextNode: function(node) {
+        return node && !isXUL(node) && isTextNode(node) ? node.parentNode : node;
+    },
+
+    getRelatedTarget: function(ev) { // missing from prototype?
+        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);
+    },
+
+    on : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id] || (mouseCache[el.id] = {});
+            item[eventName] = fn;
+            fn = fn.createInterceptor(checkRelatedTarget);
+            eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+        }
+        Event.observe(el, eventName, fn, false);
+    },
+
+    un : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id], 
+                ev = item && item[eventName];
+
+            if(ev){
+                fn = ev.fn;
+                delete item[eventName];
+                eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+            }
+        }
+        Event.stopObserving(el, eventName, fn, false);
+    },
+
+    purgeElement : function(el){
+        // no equiv?
+    },
+
+    preventDefault : function(e){   // missing from prototype?
+        e = e.browserEvent || e;
+        if(e.preventDefault) {
+            e.preventDefault();
+        } else {
+            e.returnValue = false;
+        }
+    },
+
+    stopPropagation : function(e){   // missing from prototype?
+        e = e.browserEvent || e;
+        if(e.stopPropagation) {
+            e.stopPropagation();
+        } else {
+            e.cancelBubble = true;
+        }
+    },
+
+    stopEvent : function(e){
+        Event.stop(e.browserEvent || e);
+    },
+
+    onAvailable : function(id, fn, scope){  // no equiv
+        var start = new Date(), iid;
+        var f = function(){
+            if(start.getElapsed() > 10000){
+                clearInterval(iid);
+            }
+            var el = document.getElementById(id);
+            if(el){
+                clearInterval(iid);
+                fn.call(scope||window, el);
+            }
+        };
+        iid = setInterval(f, 50);
+    }
+};
+
+Ext.lib.Ajax = function(){
+    var createSuccess = function(cb){
+         return cb.success ? function(xhr){
+            cb.success.call(cb.scope||window, {
+                responseText: xhr.responseText,
+                responseXML : xhr.responseXML,
+                argument: cb.argument
+            });
+         } : Ext.emptyFn;
+    };
+    var createFailure = function(cb){
+         return cb.failure ? function(xhr){
+            cb.failure.call(cb.scope||window, {
+                responseText: xhr.responseText,
+                responseXML : xhr.responseXML,
+                argument: cb.argument
+            });
+         } : Ext.emptyFn;
+    };
+    return {
+        request : function(method, uri, cb, data, options){
+            var o = {
+                method: method,
+                parameters: data || '',
+                timeout: cb.timeout,
+                onSuccess: createSuccess(cb),
+                onFailure: createFailure(cb)
+            };
+            if(options){
+                var hs = options.headers;
+                if(hs){
+                    o.requestHeaders = hs;
+                }
+                if(options.xmlData){
+                    method = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'text/xml';
+                    }
+                    o.postBody = options.xmlData;
+                    delete o.parameters;
+                }
+                if(options.jsonData){
+                    method = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'application/json';
+                    }
+                    o.postBody = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData;
+                    delete o.parameters;
+                }
+            }
+            new Ajax.Request(uri, o);
+        },
+
+        formRequest : function(form, uri, cb, data, isUpload, sslUri){
+            new Ajax.Request(uri, {
+                method: Ext.getDom(form).method ||'POST',
+                parameters: Form.serialize(form)+(data?'&'+data:''),
+                timeout: cb.timeout,
+                onSuccess: createSuccess(cb),
+                onFailure: createFailure(cb)
+            });
+        },
+
+        isCallInProgress : function(trans){
+            return false;
+        },
+
+        abort : function(trans){
+            return false;
+        },
+        
+        serializeForm : function(form){
+            return Form.serialize(form.dom||form);
+        }
+    };
+}();
+
+
+Ext.lib.Anim = function(){
+    
+    var easings = {
+        easeOut: function(pos) {
+            return 1-Math.pow(1-pos,2);
+        },
+        easeIn: function(pos) {
+            return 1-Math.pow(1-pos,2);
+        }
+    };
+    var createAnim = function(cb, scope){
+        return {
+            stop : function(skipToLast){
+                this.effect.cancel();
+            },
+
+            isAnimated : function(){
+                return this.effect.state == 'running';
+            },
+
+            proxyCallback : function(){
+                Ext.callback(cb, scope);
+            }
+        };
+    };
+    return {
+        scroll : function(el, args, duration, easing, cb, scope){
+            // not supported so scroll immediately?
+            var anim = createAnim(cb, scope);
+            el = Ext.getDom(el);
+            if(typeof args.scroll.to[0] == 'number'){
+                el.scrollLeft = args.scroll.to[0];
+            }
+            if(typeof args.scroll.to[1] == 'number'){
+                el.scrollTop = args.scroll.to[1];
+            }
+            anim.proxyCallback();
+            return anim;
+        },
+
+        motion : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        color : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        run : function(el, args, duration, easing, cb, scope, type){
+            var o = {};
+            for(var k in args){
+                switch(k){   // scriptaculous doesn't support, so convert these
+                    case 'points':
+                        var by, pts, e = Ext.fly(el, '_animrun');
+                        e.position();
+                        if(by = args.points.by){
+                            var xy = e.getXY();
+                            pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]);
+                        }else{
+                            pts = e.translatePoints(args.points.to);
+                        }
+                        o.left = pts.left+'px';
+                        o.top = pts.top+'px';
+                    break;
+                    case 'width':
+                        o.width = args.width.to+'px';
+                    break;
+                    case 'height':
+                        o.height = args.height.to+'px';
+                    break;
+                    case 'opacity':
+                        o.opacity = String(args.opacity.to);
+                    break;
+                    default:
+                        o[k] = String(args[k].to);
+                    break;
+                }
+            }
+            var anim = createAnim(cb, scope);
+            anim.effect = new Effect.Morph(Ext.id(el), {
+                duration: duration,
+                afterFinish: anim.proxyCallback,
+                transition: easings[easing] || Effect.Transitions.linear,
+                style: o
+            });
+            return anim;
+        }
+    };
+}();
+
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+    
+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();
+
+
+// prevent IE leaks
+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);
+}
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/prototype/ext-prototype-adapter.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,t=Object.prototype.toString,s=function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(t.call(e))){return true}return((e.nextNode||e.item)&&Ext.isNumber(e.length))},u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u)},i=document,l=i.compatMode=="CSS1Compat",B=z(/opera/),h=z(/chrome/),v=z(/webkit/),y=!h&&z(/safari/),f=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),r=!B&&z(/msie/),p=r&&z(/msie 7/),o=r&&z(/msie 8/),q=r&&!p&&!o,n=!v&&z(/gecko/),d=n&&z(/rv:1\.8/),a=n&&z(/rv:1\.9/),w=r&&!l,A=z(/windows|win32/),k=z(/macintosh|mac os x/),j=z(/adobeair/),m=z(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:"javascript:false",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(Ext.isEmpty(D[e])){D[e]=E[e]}}}return D},id:function(e,D){return(e=Ext.getDom(e)||{}).id=e.id||(D||"ext-gen")+(++g)},extend:function(){var D=function(F){for(var E in F){this[E]=F[E]}};var e=Object.prototype.constructor;return function(K,H,J){if(Ext.isObject(H)){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments)}}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H}K.override=function(F){Ext.override(K,F)};I.superclass=I.supr=(function(){return E});I.override=D;Ext.override(K,J);K.extend=function(F){Ext.extend(K,F)};return K}}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.toString!=e.toString){D.toString=E.toString}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{}})});return D},urlEncode:function(I,H){var F,D=[],E,G=encodeURIComponent;for(E in I){F=!Ext.isDefined(I[E]);Ext.each(F?E:I[E],function(J,e){D.push("&",G(E),"=",(J!=E||!F)?G(J):"")})}if(!H){D.shift();H=""}return H+D.join("")},urlDecode:function(E,D){var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F)});return H},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D}return e},toArray:function(){return r?function(e,F,D,E){E=[];Ext.each(e,function(G){E.push(G)});return E.slice(F||0,D||E.length)}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length)}}(),each:function(G,F,E){if(Ext.isEmpty(G,true)){return}if(!s(G)||Ext.isPrimitive(G)){G=[G]}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D}}},iterate:function(E,D,e){if(s(E)){Ext.each(E,D,e);return}else{if(Ext.isObject(E)){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F])===false){return}}}}}},getDom:function(e){if(!e||!i){return null}return e.dom?e.dom:(Ext.isString(e)?i.getElementById(e):e)},getBody:function(){return Ext.get(i.body||i.documentElement)},removeNode:r?function(){var e;return function(D){if(D&&D.tagName!="BODY"){e=e||i.createElement("div");e.appendChild(D);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false)},isArray:function(e){return t.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return t.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isDefined:function(e){return typeof e!=="undefined"},isOpera:B,isWebKit:v,isChrome:h,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:f,isIE:r,isIE6:q,isIE7:p,isIE8:o,isGecko:n,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:m,isWindows:A,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.ns("Ext.grid","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var b=Ext,a=0;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7?"http://extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(c,d){return Ext.extend(c,d(c.prototype))},getDoc:function(){return Ext.get(document)},isDate:function(c){return Object.prototype.toString.apply(c)==="[object Date]"},num:function(d,c){d=Number(d===null||typeof d=="boolean"?NaN:d);return isNaN(d)?c:d},value:function(e,c,d){return Ext.isEmpty(e,d)?c:e},escapeRe:function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(f,c,e,d){f[c]=f[c].createSequence(e,d)},addBehaviors:function(g){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(g)})}else{var d={},f,c,e;for(c in g){if((f=c.split("@"))[1]){e=f[0];if(!d[e]){d[e]=Ext.select(e)}d[e].on(f[1],g[c])}}d=null}},combine:function(){var e=arguments,d=e.length,g=[];for(var f=0;f<d;f++){var c=e[f];if(Ext.isArray(c)){g=g.concat(c)}else{if(c.length!==undefined&&!c.substr){g=g.concat(Array.prototype.slice.call(c,0))}else{g.push(c)}}}return g},copyTo:function(c,d,e){if(typeof e=="string"){e=e.split(/[,;\s]/)}Ext.each(e,function(f){if(d.hasOwnProperty(f)){c[f]=d[f]}},this);return c},destroy:function(){Ext.each(arguments,function(c){if(c){if(Ext.isArray(c)){this.destroy.apply(this,c)}else{if(Ext.isFunction(c.destroy)){c.destroy()}else{if(c.dom){c.remove()}}}}},this)},destroyMembers:function(j,g,e,f){for(var h=1,d=arguments,c=d.length;h<c;h++){Ext.destroy(j[d[h]]);delete j[d[h]]}},clean:function(c){var d=[];Ext.each(c,function(e){if(!!e){d.push(e)}});return d},unique:function(c){var d=[],e={};Ext.each(c,function(f){if(!e[f]){d.push(f)}e[f]=true});return d},flatten:function(c){var e=[];function d(f){Ext.each(f,function(g){if(Ext.isArray(g)){d(g)}else{e.push(g)}});return e}return d(c)},min:function(c,d){var e=c[0];d=d||function(g,f){return g<f?-1:1};Ext.each(c,function(f){e=d(e,f)==-1?e:f});return e},max:function(c,d){var e=c[0];d=d||function(g,f){return g>f?1:-1};Ext.each(c,function(f){e=d(e,f)==1?e:f});return e},mean:function(c){return Ext.sum(c)/c.length},sum:function(c){var d=0;Ext.each(c,function(e){d+=e});return d},partition:function(c,d){var e=[[],[]];Ext.each(c,function(g,h,f){e[(d&&d(g,h,f))||(!d&&g)?0:1].push(g)});return e},invoke:function(c,d){var f=[],e=Array.prototype.slice.call(arguments,2);Ext.each(c,function(g,h){if(g&&typeof g[d]=="function"){f.push(g[d].apply(g,e))}else{f.push(undefined)}});return f},pluck:function(c,e){var d=[];Ext.each(c,function(f){d.push(f[e])});return d},zip:function(){var l=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),g=l[0],k=l[1][0],c=Ext.max(Ext.pluck(g,"length")),f=[];for(var h=0;h<c;h++){f[h]=[];if(k){f[h]=k.apply(k,Ext.pluck(g,h))}else{for(var e=0,d=g.length;e<d;e++){f[h].push(g[e][h])}}}return f},getCmp:function(c){return Ext.ComponentMgr.get(c)},useShims:b.isIE6||(b.isMac&&b.isGecko2),type:function(d){if(d===undefined||d===null){return false}if(d.htmlElement){return"element"}var c=typeof d;if(c=="object"&&d.nodeName){switch(d.nodeType){case 1:return"element";case 3:return(/\S/).test(d.nodeValue)?"textnode":"whitespace"}}if(c=="object"||c=="function"){switch(d.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if(typeof d.length=="number"&&typeof d.item=="function"){return"nodelist"}}return c},intercept:function(f,c,e,d){f[c]=f[c].createInterceptor(e,d)},callback:function(c,f,e,d){if(Ext.isFunction(c)){if(d){c.defer(d,f,e||[])}else{c.apply(f,e||[])}}}}}());Ext.apply(Function.prototype,{createSequence:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});String.prototype.toggle=function(b,a){return this==b?a:b};String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}();Date.prototype.getElapsed=function(a){return Math.abs((a||new Date()).getTime()-this.getTime())};Ext.applyIf(Number.prototype,{constrain:function(b,a){return Math.min(Math.max(this,b),a)}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();(function(){var h,i=Prototype.Version.split("."),a=(parseInt(i[0])>=2)||(parseInt(i[1])>=7)||(parseInt(i[2])>=1),j={},c=Ext.isGecko?function(k){return Object.prototype.toString.call(k)=="[object XULElement]"}:function(){},b=Ext.isGecko?function(k){try{return k.nodeType==3}catch(l){return false}}:function(k){return k.nodeType==3},e=function(k,m){if(k&&k.firstChild){while(m){if(m===k){return true}try{m=m.parentNode}catch(l){return false}if(m&&(m.nodeType!=1)){m=null}}}return false},g=function(l){var k=Ext.lib.Event.getRelatedTarget(l);return !(c(k)||e(l.currentTarget,k))};Ext.lib.Dom={getViewWidth:function(k){return k?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(k){return k?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var k=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(k,this.getViewportHeight())},getDocumentWidth:function(){var k=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(k,this.getViewportWidth())},getViewportHeight:function(){var k=self.innerHeight;var l=document.compatMode;if((l||Ext.isIE)&&!Ext.isOpera){k=(l=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return k},getViewportWidth:function(){var k=self.innerWidth;var l=document.compatMode;if(l||Ext.isIE){k=(l=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth}return k},isAncestor:function(l,m){l=Ext.getDom(l);m=Ext.getDom(m);if(!l||!m){return false}if(l.contains&&!Ext.isSafari){return l.contains(m)}else{if(l.compareDocumentPosition){return !!(l.compareDocumentPosition(m)&16)}else{var k=m.parentNode;while(k){if(k==l){return true}else{if(!k.tagName||k.tagName.toUpperCase()=="HTML"){return false}}k=k.parentNode}return false}}},getRegion:function(k){return Ext.lib.Region.getRegion(k)},getY:function(k){return this.getXY(k)[1]},getX:function(k){return this.getXY(k)[0]},getXY:function(m){var l,r,t,u,q=(document.body||document.documentElement);m=Ext.getDom(m);if(m==q){return[0,0]}if(m.getBoundingClientRect){t=m.getBoundingClientRect();u=f(document).getScroll();return[Math.round(t.left+u.left),Math.round(t.top+u.top)]}var v=0,s=0;l=m;var k=f(m).getStyle("position")=="absolute";while(l){v+=l.offsetLeft;s+=l.offsetTop;if(!k&&f(l).getStyle("position")=="absolute"){k=true}if(Ext.isGecko){r=f(l);var w=parseInt(r.getStyle("borderTopWidth"),10)||0;var n=parseInt(r.getStyle("borderLeftWidth"),10)||0;v+=n;s+=w;if(l!=m&&r.getStyle("overflow")!="visible"){v+=n;s+=w}}l=l.offsetParent}if(Ext.isSafari&&k){v-=q.offsetLeft;s-=q.offsetTop}if(Ext.isGecko&&!k){var o=f(q);v+=parseInt(o.getStyle("borderLeftWidth"),10)||0;s+=parseInt(o.getStyle("borderTopWidth"),10)||0}l=m.parentNode;while(l&&l!=q){if(!Ext.isOpera||(l.tagName!="TR"&&f(l).getStyle("display")!="inline")){v-=l.scrollLeft;s-=l.scrollTop}l=l.parentNode}return[v,s]},setXY:function(k,l){k=Ext.fly(k,"_setXY");k.position();var m=k.translatePoints(l);if(l[0]!==false){k.dom.style.left=m.left+"px"}if(l[1]!==false){k.dom.style.top=m.top+"px"}},setX:function(l,k){this.setXY(l,[k,false])},setY:function(k,l){this.setXY(k,[false,l])}};Ext.lib.Event={getPageX:function(k){return Event.pointerX(k.browserEvent||k)},getPageY:function(k){return Event.pointerY(k.browserEvent||k)},getXY:function(k){k=k.browserEvent||k;return[Event.pointerX(k),Event.pointerY(k)]},getTarget:function(k){return Event.element(k.browserEvent||k)},resolveTextNode:function(k){return k&&!c(k)&&b(k)?k.parentNode:k},getRelatedTarget:function(l){l=l.browserEvent||l;var k=l.relatedTarget;if(!k){if(l.type=="mouseout"){k=l.toElement}else{if(l.type=="mouseover"){k=l.fromElement}}}return this.resolveTextNode(k)},on:function(m,k,l){if((k=="mouseenter"||k=="mouseleave")&&!a){var n=j[m.id]||(j[m.id]={});n[k]=l;l=l.createInterceptor(g);k=(k=="mouseenter")?"mouseover":"mouseout"}Event.observe(m,k,l,false)},un:function(m,k,l){if((k=="mouseenter"||k=="mouseleave")&&!a){var o=j[m.id],n=o&&o[k];if(n){l=n.fn;delete o[k];k=(k=="mouseenter")?"mouseover":"mouseout"}}Event.stopObserving(m,k,l,false)},purgeElement:function(k){},preventDefault:function(k){k=k.browserEvent||k;if(k.preventDefault){k.preventDefault()}else{k.returnValue=false}},stopPropagation:function(k){k=k.browserEvent||k;if(k.stopPropagation){k.stopPropagation()}else{k.cancelBubble=true}},stopEvent:function(k){Event.stop(k.browserEvent||k)},onAvailable:function(p,l,k){var o=new Date(),n;var m=function(){if(o.getElapsed()>10000){clearInterval(n)}var q=document.getElementById(p);if(q){clearInterval(n);l.call(k||window,q)}};n=setInterval(m,50)}};Ext.lib.Ajax=function(){var l=function(m){return m.success?function(n){m.success.call(m.scope||window,{responseText:n.responseText,responseXML:n.responseXML,argument:m.argument})}:Ext.emptyFn};var k=function(m){return m.failure?function(n){m.failure.call(m.scope||window,{responseText:n.responseText,responseXML:n.responseXML,argument:m.argument})}:Ext.emptyFn};return{request:function(t,q,m,r,n){var s={method:t,parameters:r||"",timeout:m.timeout,onSuccess:l(m),onFailure:k(m)};if(n){var p=n.headers;if(p){s.requestHeaders=p}if(n.xmlData){t=(t?t:(n.method?n.method:"POST"));if(!p||!p["Content-Type"]){s.contentType="text/xml"}s.postBody=n.xmlData;delete s.parameters}if(n.jsonData){t=(t?t:(n.method?n.method:"POST"));if(!p||!p["Content-Type"]){s.contentType="application/json"}s.postBody=typeof n.jsonData=="object"?Ext.encode(n.jsonData):n.jsonData;delete s.parameters}}new Ajax.Request(q,s)},formRequest:function(q,p,n,r,m,o){new Ajax.Request(p,{method:Ext.getDom(q).method||"POST",parameters:Form.serialize(q)+(r?"&"+r:""),timeout:n.timeout,onSuccess:l(n),onFailure:k(n)})},isCallInProgress:function(m){return false},abort:function(m){return false},serializeForm:function(m){return Form.serialize(m.dom||m)}}}();Ext.lib.Anim=function(){var k={easeOut:function(m){return 1-Math.pow(1-m,2)},easeIn:function(m){return 1-Math.pow(1-m,2)}};var l=function(m,n){return{stop:function(o){this.effect.cancel()},isAnimated:function(){return this.effect.state=="running"},proxyCallback:function(){Ext.callback(m,n)}}};return{scroll:function(p,n,r,s,m,o){var q=l(m,o);p=Ext.getDom(p);if(typeof n.scroll.to[0]=="number"){p.scrollLeft=n.scroll.to[0]}if(typeof n.scroll.to[1]=="number"){p.scrollTop=n.scroll.to[1]}q.proxyCallback();return q},motion:function(p,n,q,r,m,o){return this.run(p,n,q,r,m,o)},color:function(p,n,q,r,m,o){return this.run(p,n,q,r,m,o)},run:function(n,w,s,v,p,y,x){var m={};for(var r in w){switch(r){case"points":var u,A,t=Ext.fly(n,"_animrun");t.position();if(u=w.points.by){var z=t.getXY();A=t.translatePoints([z[0]+u[0],z[1]+u[1]])}else{A=t.translatePoints(w.points.to)}m.left=A.left+"px";m.top=A.top+"px";break;case"width":m.width=w.width.to+"px";break;case"height":m.height=w.height.to+"px";break;case"opacity":m.opacity=String(w.opacity.to);break;default:m[r]=String(w[r].to);break}}var q=l(p,y);q.effect=new Effect.Morph(Ext.id(n),{duration:s,afterFinish:q.proxyCallback,transition:k[v]||Effect.Transitions.linear,style:m});return q}}}();function f(k){if(!h){h=new Ext.Element.Flyweight()}h.dom=k;return h}Ext.lib.Region=function(n,o,k,m){this.top=n;this[1]=n;this.right=o;this.bottom=k;this.left=m;this[0]=m};Ext.lib.Region.prototype={contains:function(k){return(k.left>=this.left&&k.right<=this.right&&k.top>=this.top&&k.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(p){var n=Math.max(this.top,p.top);var o=Math.min(this.right,p.right);var k=Math.min(this.bottom,p.bottom);var m=Math.max(this.left,p.left);if(k>=n&&o>=m){return new Ext.lib.Region(n,o,k,m)}else{return null}},union:function(p){var n=Math.min(this.top,p.top);var o=Math.max(this.right,p.right);var k=Math.max(this.bottom,p.bottom);var m=Math.min(this.left,p.left);return new Ext.lib.Region(n,o,k,m)},constrainTo:function(k){this.top=this.top.constrain(k.top,k.bottom);this.bottom=this.bottom.constrain(k.top,k.bottom);this.left=this.left.constrain(k.left,k.right);this.right=this.right.constrain(k.left,k.right);return this},adjust:function(n,m,k,o){this.top+=n;this.left+=m;this.right+=o;this.bottom+=k;return this}};Ext.lib.Region.getRegion=function(o){var s=Ext.lib.Dom.getXY(o);var n=s[1];var q=s[0]+o.offsetWidth;var k=s[1]+o.offsetHeight;var m=s[0];return new Ext.lib.Region(n,q,k,m)};Ext.lib.Point=function(k,l){if(Ext.isArray(k)){l=k[1];k=k[0]}this.x=this.right=this.left=this[0]=k;this.y=this.top=this.bottom=this[1]=l};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function d(){var k=Function.prototype;delete k.createSequence;delete k.defer;delete k.createDelegate;delete k.createCallback;delete k.createInterceptor;window.detachEvent("onunload",d)}window.attachEvent("onunload",d)}})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter-debug.js	(revision 625)
@@ -0,0 +1,2136 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// for old browsers
+window.undefined = window.undefined;
+
+/**
+ * @class Ext
+ * Ext core utilities and functions.
+ * @singleton
+ */
+
+Ext = {
+    /**
+     * The version of the framework
+     * @type String
+     */
+    version : '3.0'
+};
+
+/**
+ * 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){
+    // no "this" reference for friendly out of scope calls
+    if(defaults){
+        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,
+        toString = Object.prototype.toString,
+        //assume it's not null and not an array
+        isIterable = function(v){
+            //check for array or arguments
+            if(Ext.isArray(v) || v.callee){
+                return true;
+            }
+            //check for node list type
+            if(/NodeList|HTMLCollection/.test(toString.call(v))){
+                return true;
+            }
+            //NodeList has an item and length property
+            //IXMLDOMNodeList has nextNode method, needs to be checked first.
+            return ((v.nextNode || v.item) && Ext.isNumber(v.length));
+        },
+        ua = navigator.userAgent.toLowerCase(),
+        check = function(r){
+            return r.test(ua);
+        },
+        DOC = document,
+        isStrict = DOC.compatMode == "CSS1Compat",
+        isOpera = check(/opera/),
+        isChrome = check(/chrome/),
+        isWebKit = check(/webkit/),
+        isSafari = !isChrome && check(/safari/),
+        isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
+        isSafari3 = isSafari && check(/version\/3/),
+        isSafari4 = isSafari && check(/version\/4/),
+        isIE = !isOpera && check(/msie/),
+        isIE7 = isIE && check(/msie 7/),
+        isIE8 = isIE && check(/msie 8/),
+        isIE6 = isIE && !isIE7 && !isIE8,
+        isGecko = !isWebKit && check(/gecko/),
+        isGecko2 = isGecko && check(/rv:1\.8/),
+        isGecko3 = isGecko && check(/rv:1\.9/),
+        isBorderBox = isIE && !isStrict,
+        isWindows = check(/windows|win32/),
+        isMac = check(/macintosh|mac os x/),
+        isAir = check(/adobeair/),
+        isLinux = check(/linux/),
+        isSecure = /^https/i.test(window.location.protocol);
+
+    // remove css image flicker
+    if(isIE6){
+        try{
+            DOC.execCommand("BackgroundImageCache", false, true);
+        }catch(e){}
+    }
+
+    Ext.apply(Ext, {
+        /**
+         * 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',
+        /**
+         * 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 if the {@link Ext.Fx} Class is available
+         * @type Boolean
+         * @property enableFx
+         */
+
+        /**
+         * 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 {@link #enableGarbageCollector} is true.
+         * @type Boolean
+         */
+        enableListenerCollection : false,
+
+        /**
+         * Indicates whether to use native browser parsing for JSON methods.
+         * This option is ignored if the browser does not support native JSON methods.
+         * <b>Note: Native JSON methods will not work with objects that have functions.
+         * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
+         * @type Boolean
+         */
+        USE_NATIVE_JSON : false,
+
+        /**
+         * 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){
+                for(var p in c){
+                    if(Ext.isEmpty(o[p])){
+                        o[p] = c[p];
+                    }
+                }
+            }
+            return o;
+        },
+
+        /**
+         * 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){
+            return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed);
+        },
+
+        /**
+         * 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(Ext.isObject(sp)){
+                    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.superclass = sbp.supr = (function(){
+                    return spp;
+                });
+                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;
+                Ext.apply(p, overrides);
+                if(Ext.isIE && overrides.toString != origclass.toString){
+                    p.toString = overrides.toString;
+                }
+            }
+        },
+
+        /**
+         * Creates namespaces to be used for scoping variables and classes so that they are not global.
+         * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+         * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+         * @param {String} namespace1
+         * @param {String} namespace2
+         * @param {String} etc
+         * @method namespace
+         */
+        namespace : function(){
+            var o, d;
+            Ext.each(arguments, function(v) {
+                d = v.split(".");
+                o = window[d[0]] = window[d[0]] || {};
+                Ext.each(d.slice(1), function(v2){
+                    o = o[v2] = o[v2] || {};
+                });
+            });
+            return o;
+        },
+
+        /**
+         * 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
+         * @param {String} pre (optional) A prefix to add to the url encoded string
+         * @return {String}
+         */
+        urlEncode: function(o, pre){
+            var undef, buf = [], key, e = encodeURIComponent;
+
+            for(key in o){
+                undef = !Ext.isDefined(o[key]);
+                Ext.each(undef ? key : o[key], function(val, i){
+                    buf.push("&", e(key), "=", (val != key || !undef) ? e(val) : "");
+                });
+            }
+            if(!pre){
+                buf.shift();
+                pre = "";
+            }
+            return pre + buf.join('');
+        },
+
+        /**
+         * Takes an encoded URL and and converts it to an object. Example: <pre><code>
+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+</code></pre>
+         * @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){
+            var obj = {},
+                pairs = string.split('&'),
+                d = decodeURIComponent,
+                name,
+                value;
+            Ext.each(pairs, function(pair) {
+                pair = pair.split('=');
+                name = d(pair[0]);
+                value = d(pair[1]);
+                obj[name] = overwrite || !obj[name] ? value :
+                            [].concat(obj[name]).concat(value);
+            });
+            return obj;
+        },
+
+        /**
+         * Appends content to the query string of a URL, which handles logic for whether to place
+         * a question mark or ampersand.
+         * @param {String} url The url to append to.
+         * @@param {String} s The content to append to the url.
+         * @return (String) The appended string
+         */
+        urlAppend : function(url, s){
+            if(!Ext.isEmpty(s)){
+                return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
+            }
+            return url;
+        },
+
+        /**
+         * Converts any iterable (numeric indices and a length property) into a true array
+         * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on.
+         * For strings, use this instead: "abc".match(/./g) => [a,b,c];
+         * @param {Iterable} the iterable object to be turned into a true Array.
+         * @return (Array) array
+         */
+        toArray : function(){
+            return isIE ?
+                function(a, i, j, res){
+                    res = [];
+                    Ext.each(a, function(v) {
+                        res.push(v);
+                    });
+                    return res.slice(i || 0, j || res.length);
+                } :
+                function(a, i, j){
+                    return Array.prototype.slice.call(a, i || 0, j || a.length);
+                }
+        }(),
+
+        /**
+         * 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(Ext.isEmpty(array, true)){
+                return;
+            }
+            if(!isIterable(array) || Ext.isPrimitive(array)){
+                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;
+                };
+            }
+        },
+
+        /**
+         * Iterates either the elements in an array, or each of the properties in an object.
+         * <b>Note</b>: If you are only iterating arrays, it is better to call {@link #each}.
+         * @param {Object/Array} object The object or array to be iterated
+         * @param {Function} fn The function to be called for each iteration.
+         * The iteration will stop if the supplied function returns false, or
+         * all array elements / object properties have been covered. The signature
+         * varies depending on the type of object being interated:
+         * <div class="mdetail-params"><ul>
+         * <li>Arrays : <tt>(Object item, Number index, Array allItems)</tt>
+         * <div class="sub-desc">
+         * When iterating an array, the supplied function is called with each item.</div></li>
+         * <li>Objects : <tt>(String key, Object value)</tt>
+         * <div class="sub-desc">
+         * When iterating an object, the supplied function is called with each key-value pair in
+         * the object.</div></li>
+         * </ul></div>
+         * @param {Object} scope The scope to call the supplied function with, defaults to
+         * the specified <tt>object</tt>
+         */
+        iterate : function(obj, fn, scope){
+            if(isIterable(obj)){
+                Ext.each(obj, fn, scope);
+                return;
+            }else if(Ext.isObject(obj)){
+                for(var prop in obj){
+                    if(obj.hasOwnProperty(prop)){
+                        if(fn.call(scope || obj, prop, obj[prop]) === false){
+                            return;
+                        };
+                    }
+                }
+            }
+        },
+
+        /**
+         * Return the dom node for the passed String (id), dom node, or Ext.Element.
+         * Here are some examples:
+         * <pre><code>
+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don&#39;t know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * </code></pre>
+         * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
+         * when this method is called to be successful.
+         * @param {Mixed} el
+         * @return HTMLElement
+         */
+        getDom : function(el){
+            if(!el || !DOC){
+                return null;
+            }
+            return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el);
+        },
+
+        /**
+         * Returns the current document body as an {@link Ext.Element}.
+         * @return Ext.Element The document body
+         */
+        getBody : function(){
+            return Ext.get(DOC.body || DOC.documentElement);
+        },
+
+        /**
+         * 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 || DOC.createElement('div');
+                    d.appendChild(n);
+                    d.innerHTML = '';
+                }
+            }
+        }() : function(n){
+            if(n && n.parentNode && n.tagName != 'BODY'){
+                n.parentNode.removeChild(n);
+            }
+        },
+
+        /**
+         * <p>Returns true if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
+         * @return {Boolean}
+         */
+        isEmpty : function(v, allowBlank){
+            return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript array, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isArray : function(v){
+            return toString.apply(v) === '[object Array]';
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isObject : function(v){
+            return v && typeof v == "object";
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript 'primitive', a string, number or boolean.
+         * @param {Mixed} value The value to test
+         * @return {Boolean}
+         */
+        isPrimitive : function(v){
+            return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Function, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isFunction : function(v){
+            return toString.apply(v) === '[object Function]';
+        },
+
+        /**
+         * Returns true if the passed object is a number. Returns false for non-finite numbers.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isNumber: function(v){
+            return typeof v === 'number' && isFinite(v);
+        },
+
+        /**
+         * Returns true if the passed object is a string.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isString: function(v){
+            return typeof v === 'string';
+        },
+
+        /**
+         * Returns true if the passed object is a boolean.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isBoolean: function(v){
+            return typeof v === 'boolean';
+        },
+
+        /**
+         * Returns true if the passed object is not undefined.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isDefined: function(v){
+            return typeof v !== 'undefined';
+        },
+
+        /**
+         * True if the detected browser is Opera.
+         * @type Boolean
+         */
+        isOpera : isOpera,
+        /**
+         * True if the detected browser uses WebKit.
+         * @type Boolean
+         */
+        isWebKit: isWebKit,
+        /**
+         * True if the detected browser is Chrome.
+         * @type Boolean
+         */
+        isChrome : isChrome,
+        /**
+         * 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 4.x.
+         * @type Boolean
+         */
+        isSafari4 : isSafari4,
+        /**
+         * True if the detected browser is Safari 2.x.
+         * @type Boolean
+         */
+        isSafari2 : isSafari2,
+        /**
+         * 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 : isIE6,
+        /**
+         * True if the detected browser is Internet Explorer 7.x.
+         * @type Boolean
+         */
+        isIE7 : isIE7,
+        /**
+         * True if the detected browser is Internet Explorer 8.x.
+         * @type Boolean
+         */
+        isIE8 : isIE8,
+        /**
+         * 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 : isGecko2,
+        /**
+         * 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
+    });
+
+    /**
+     * Creates namespaces to be used for scoping variables and classes so that they are not global.
+     * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+     * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+     * @param {String} namespace1
+     * @param {String} namespace2
+     * @param {String} etc
+     * @method namespace
+     */
+    Ext.ns = Ext.namespace;
+})();
+
+Ext.ns("Ext", "Ext.util", "Ext.lib", "Ext.data");
+
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+     /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function() {
+                    var me = this,
+                        args = arguments;
+                    fcn.target = me;
+                    fcn.method = method;
+                    return (fcn.apply(scope || me || window, args) !== false) ?
+                            method.apply(me || window, args) :
+                            null;
+                };
+    },
+
+     /**
+     * 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,
+            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 (Ext.isNumber(appendArgs)){
+                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 less than or equal to 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 > 0){
+            return setTimeout(fn, millis);
+        }
+        fn();
+        return 0;
+    }
+});
+
+/**
+ * @class String
+ * These functions are available on every String object.
+ */
+Ext.applyIf(String, {
+    /**
+     * 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 = Ext.toArray(arguments, 1);
+        return format.replace(/\{(\d+)\}/g, function(m, i){
+            return args[i];
+        });
+    }
+});
+
+/**
+ * @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;
+    }
+});
+/**
+ * @class Ext
+ */
+
+Ext.ns("Ext.grid", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
+       "Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
+    /**
+     * Namespace alloted for extensions to the framework.
+     * @property ux
+     * @type Object
+     */
+
+Ext.apply(Ext, function(){
+    var E = Ext, idSeed = 0;
+
+    return {
+        /**
+        * A reusable empty function
+        * @property
+        * @type Function
+        */
+        emptyFn : function(){},
+
+        /**
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
+         * For other browsers it uses an inline data URL.
+         * @type String
+         */
+        BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 ?
+                            'http:/' + '/extjs.com/s.gif' :
+                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
+
+        extendX : function(supr, fn){
+            return Ext.extend(supr, fn(supr.prototype));
+        },
+
+        /**
+         * Returns the current HTML document object as an {@link Ext.Element}.
+         * @return Ext.Element The document
+         */
+        getDoc : function(){
+            return Ext.get(document);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript date object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isDate : function(v){
+            return Object.prototype.toString.apply(v) === '[object Date]';
+        },
+
+        /**
+         * 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){
+            v = Number(v === null || typeof v == 'boolean'? NaN : v);
+            return isNaN(v)? defaultValue : v;
+        },
+
+        /**
+         * <p>Utility method for returning a default value if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Mixed} defaultValue The value to return if the original value is empty
+         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
+         * @return {Mixed} value, if non-empty, else defaultValue
+         */
+        value : function(v, defaultValue, allowBlank){
+            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
+        },
+
+        /**
+         * Escapes the passed string for use in a regular expression
+         * @param {String} str
+         * @return {String}
+         */
+        escapeRe : function(s) {
+            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
+        },
+
+        sequence : function(o, name, fn, scope){
+            o[name] = o[name].createSequence(fn, scope);
+        },
+
+        /**
+         * Applies event listeners to elements by selectors when the document is ready.
+         * The event name is specified with an <tt>&#64;</tt> suffix.
+         * <pre><code>
+Ext.addBehaviors({
+    // add a listener for click on all anchors in element with id foo
+    '#foo a&#64;click' : function(e, t){
+        // do something
+    },
+    
+    // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
+    '#foo a, #bar span.some-class&#64;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);
+                });
+            } else {
+                var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
+                    parts,
+                    b,
+                    s;
+                for (b in o) {
+                    if ((parts = b.split('@'))[1]) { // for Object prototype breakers
+                        s = parts[0];
+                        if(!cache[s]){
+                            cache[s] = Ext.select(s);
+                        }
+                        cache[s].on(parts[1], o[b]);
+                    }
+                }
+                cache = null;
+            }
+        },
+
+
+        // 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;
+        },
+
+        /**
+         * Copies a set of named properties fom the source object to the destination object.
+         * <p>example:<pre><code>
+ImageComponent = Ext.extend(Ext.BoxComponent, {
+    initComponent: function() {
+        this.autoEl = { tag: 'img' };
+        MyComponent.superclass.initComponent.apply(this, arguments);
+        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
+    }
+});
+         * </code></pre> 
+         * @param {Object} The destination object.
+         * @param {Object} The source object.
+         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * of property names to copy.
+         * @return {Object} The modified object.
+        */
+        copyTo : function(dest, source, names){
+            if(typeof names == 'string'){
+                names = names.split(/[,;\s]/);
+            }
+            Ext.each(names, function(name){
+                if(source.hasOwnProperty(name)){
+                    dest[name] = source[name];
+                }
+            }, this);
+            return dest;
+        },
+
+        /**
+         * 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}, {@link Ext.Component}, or an Array of either of these to destroy
+         * @param {Mixed} arg2 (optional)
+         * @param {Mixed} etc... (optional)
+         */
+        destroy : function(){
+            Ext.each(arguments, function(arg){
+                if(arg){
+                    if(Ext.isArray(arg)){
+                        this.destroy.apply(this, arg);
+                    }else if(Ext.isFunction(arg.destroy)){
+                        arg.destroy();
+                    }else if(arg.dom){
+                        arg.remove();
+                    }    
+                }
+            }, this);
+        },
+
+        /**
+         * Attempts to destroy and then remove a set of named properties of the passed object.
+         * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
+         * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
+         * @param {Mixed} etc... More property names to destroy and remove.
+         */
+        destroyMembers : function(o, arg1, arg2, etc){
+            for(var i = 1, a = arguments, len = a.length; i < len; i++) {
+                Ext.destroy(o[a[i]]);
+                delete o[a[i]];
+            }
+        },
+
+        /**
+         * Creates a copy of the passed Array with falsy values removed.
+         * @param {Array/NodeList} arr The Array from which to remove falsy values.
+         * @return {Array} The new, compressed Array.
+         */
+        clean : function(arr){
+            var ret = [];
+            Ext.each(arr, function(v){
+                if(!!v){
+                    ret.push(v);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Creates a copy of the passed Array, filtered to contain only unique values.
+         * @param {Array} arr The Array to filter
+         * @return {Array} The new Array containing unique values.
+         */
+        unique : function(arr){
+            var ret = [],
+                collect = {};
+
+            Ext.each(arr, function(v) {
+                if(!collect[v]){
+                    ret.push(v);
+                }
+                collect[v] = true;
+            });
+            return ret;
+        },
+
+        /**
+         * Recursively flattens into 1-d Array. Injects Arrays inline.
+         * @param {Array} arr The array to flatten
+         * @return {Array} The new, flattened array.
+         */
+        flatten : function(arr){
+            var worker = [];
+            function rFlatten(a) {
+                Ext.each(a, function(v) {
+                    if(Ext.isArray(v)){
+                        rFlatten(v);
+                    }else{
+                        worker.push(v);
+                    }
+                });
+                return worker;
+            }
+            return rFlatten(arr);
+        },
+
+        /**
+         * Returns the minimum value in the Array.
+         * @param {Array|NodeList} arr The Array from which to select the minimum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines minimization.
+         *                   If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The minimum value in the Array.
+         */
+        min : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a < b ? -1 : 1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == -1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Returns the maximum value in the Array
+         * @param {Array|NodeList} arr The Array from which to select the maximum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines maximization.
+         *                   If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The maximum value in the Array.
+         */
+        max : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a > b ? 1 : -1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == 1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Calculates the mean of the Array
+         * @param {Array} arr The Array to calculate the mean value of.
+         * @return {Number} The mean.
+         */
+        mean : function(arr){
+           return Ext.sum(arr) / arr.length;
+        },
+
+        /**
+         * Calculates the sum of the Array
+         * @param {Array} arr The Array to calculate the sum value of.
+         * @return {Number} The sum.
+         */
+        sum : function(arr){
+           var ret = 0;
+           Ext.each(arr, function(v) {
+               ret += v;
+           });
+           return ret;
+        },
+
+        /**
+         * Partitions the set into two sets: a true set and a false set.
+         * Example: 
+         * Example2: 
+         * <pre><code>
+// Example 1:
+Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
+
+// Example 2:
+Ext.partition(
+    Ext.query("p"),
+    function(val){
+        return val.className == "class1"
+    }
+);
+// true are those paragraph elements with a className of "class1",
+// false set are those that do not have that className.
+         * </code></pre>
+         * @param {Array|NodeList} arr The array to partition
+         * @param {Function} truth (optional) a function to determine truth.  If this is omitted the element
+         *                   itself must be able to be evaluated for its truthfulness.
+         * @return {Array} [true<Array>,false<Array>]
+         */
+        partition : function(arr, truth){
+            var ret = [[],[]];
+            Ext.each(arr, function(v, i, a) {
+                ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
+            });
+            return ret;
+        },
+
+        /**
+         * Invokes a method on each item in an Array.
+         * <pre><code>
+// Example:
+Ext.invoke(Ext.query("p"), "getAttribute", "id");
+// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to invoke the method on.
+         * @param {String} methodName The method name to invoke.
+         * @param {Anything} ... Arguments to send into the method invocation.
+         * @return {Array} The results of invoking the method on each item in the array.
+         */
+        invoke : function(arr, methodName){
+            var ret = [],
+                args = Array.prototype.slice.call(arguments, 2);
+            Ext.each(arr, function(v,i) {
+                if (v && typeof v[methodName] == "function") {
+                    ret.push(v[methodName].apply(v, args));
+                } else {
+                    ret.push(undefined);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Plucks the value of a property from each item in the Array
+         * <pre><code>
+// Example:
+Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to pluck the value from.
+         * @param {String} prop The property name to pluck from each element.
+         * @return {Array} The value from each item in the Array.
+         */
+        pluck : function(arr, prop){
+            var ret = [];
+            Ext.each(arr, function(v) {
+                ret.push( v[prop] );
+            });
+            return ret;
+        },
+
+        /**
+         * <p>Zips N sets together.</p>
+         * <pre><code>
+// Example 1:
+Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
+// Example 2:
+Ext.zip(
+    [ "+", "-", "+"],
+    [  12,  10,  22],
+    [  43,  15,  96],
+    function(a, b, c){
+        return "$" + a + "" + b + "." + c
+    }
+); // ["$+12.43", "$-10.15", "$+22.96"]
+         * </code></pre>
+         * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
+         * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
+         * @return {Array} The zipped set.
+         */
+        zip : function(){
+            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+                arrs = parts[0],
+                fn = parts[1][0],
+                len = Ext.max(Ext.pluck(arrs, "length")),
+                ret = [];
+
+            for (var i = 0; i < len; i++) {
+                ret[i] = [];
+                if(fn){
+                    ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
+                }else{
+                    for (var j = 0, aLen = arrs.length; j < aLen; j++){
+                        ret[i].push( arrs[j][i] );
+                    }
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * This is shorthand reference to {@link Ext.ComponentMgr#get}.
+         * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+        */
+        getCmp : function(id){
+            return Ext.ComponentMgr.get(id);
+        },
+
+        /**
+         * 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: E.isIE6 || (E.isMac && E.isGecko2),
+
+        // 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:<div class="mdetail-params"><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>date</b>: If the object passed is a Date object</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>
+         * </ul></div>
+         * @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';
+                    case Date: return 'date';
+                }
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
+                    return 'nodelist';
+                }
+            }
+            return t;
+        },
+
+        intercept : function(o, name, fn, scope){
+            o[name] = o[name].createInterceptor(fn, scope);
+        },
+
+        // internal
+        callback : function(cb, scope, args, delay){
+            if(Ext.isFunction(cb)){
+                if(delay){
+                    cb.defer(delay, scope, args || []);
+                }else{
+                    cb.apply(scope, args || []);
+                }
+            }
+        }
+    };
+}());
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+    /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function(){
+                    var retval = method.apply(this || window, arguments);
+                    fcn.apply(scope || this || window, arguments);
+                    return retval;
+                };
+    }
+});
+
+
+/**
+ * @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 = String(val);
+        if(!ch) {
+            ch = " ";
+        }
+        while (result.length < size) {
+            result = ch + result;
+        }
+        return result;
+    }
+});
+
+/**
+ * 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, ""); };
+}();
+
+// here to prevent dependency on Date.js
+/**
+ 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());
+};
+
+
+/**
+ * @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 Ext.util.TaskRunner
+ * Provides the ability to execute one or more arbitrary tasks in a multithreaded
+ * manner.  Generally, you can use the singleton {@link Ext.TaskMgr} instead, but
+ * if needed, you can create separate instances of TaskRunner.  Any number of
+ * separate tasks can be started at any time and will run independently of each
+ * other. Example usage:
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * </code></pre>
+ * Also see {@link Ext.util.DelayedTask}. 
+ * 
+ * @constructor
+ * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance
+ * (defaults to 10)
+ */
+Ext.util.TaskRunner = function(interval){
+    interval = interval || 10;
+    var tasks = [], 
+    	removeQueue = [],
+    	id = 0,
+    	running = false,
+
+    	// private
+    	stopThread = function(){
+	        running = false;
+	        clearInterval(id);
+	        id = 0;
+	    },
+
+    	// private
+    	startThread = function(){
+	        if(!running){
+	            running = true;
+	            id = setInterval(runTasks, interval);
+	        }
+	    },
+
+    	// private
+    	removeTask = function(t){
+	        removeQueue.push(t);
+	        if(t.onStop){
+	            t.onStop.apply(t.scope || t);
+	        }
+	    },
+	    
+    	// private
+    	runTasks = function(){
+	    	var rqLen = removeQueue.length,
+	    		now = new Date().getTime();	    			    		
+	    
+	        if(rqLen > 0){
+	            for(var i = 0; i < rqLen; i++){
+	                tasks.remove(removeQueue[i]);
+	            }
+	            removeQueue = [];
+	            if(tasks.length < 1){
+	                stopThread();
+	                return;
+	            }
+	        }	        
+	        for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){
+	            t = tasks[i];
+	            itime = now - t.taskRunTime;
+	            if(t.interval <= itime){
+	                rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]);
+	                t.taskRunTime = now;
+	                if(rt === false || t.taskRunCount === t.repeat){
+	                    removeTask(t);
+	                    return;
+	                }
+	            }
+	            if(t.duration && t.duration <= (now - t.taskStartTime)){
+	                removeTask(t);
+	            }
+	        }
+	    };
+
+    /**
+     * Starts a new task.
+     * @method start
+     * @param {Object} task A config object that supports the following properties:<ul>
+     * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
+     * function will be called at each interval and passed the <code>args</code> argument if specified.  If a
+     * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+     * <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
+     * should be executed.</div></li>
+     * <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
+     * specified by <code>run</code>.</div></li>
+     * <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
+     * <code>run</code> function. Defaults to the task config object.</div></li>
+     * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+     * the task before stopping automatically (defaults to indefinite).</div></li>
+     * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+     * stopping automatically (defaults to indefinite).</div></li>
+     * </ul>
+     * @return {Object} The task
+     */
+    this.start = function(task){
+        tasks.push(task);
+        task.taskStartTime = new Date().getTime();
+        task.taskRunTime = 0;
+        task.taskRunCount = 0;
+        startThread();
+        return task;
+    };
+
+    /**
+     * Stops an existing running task.
+     * @method stop
+     * @param {Object} task The task to stop
+     * @return {Object} The task
+     */
+    this.stop = function(task){
+        removeTask(task);
+        return task;
+    };
+
+    /**
+     * Stops all tasks that are currently running.
+     * @method stopAll
+     */
+    this.stopAll = function(){
+        stopThread();
+        for(var i = 0, len = tasks.length; i < len; i++){
+            if(tasks[i].onStop){
+                tasks[i].onStop();
+            }
+        }
+        tasks = [];
+        removeQueue = [];
+    };
+};
+
+/**
+ * @class Ext.TaskMgr
+ * @extends Ext.util.TaskRunner
+ * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks.  See
+ * {@link Ext.util.TaskRunner} for supported methods and task config properties.
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+</code></pre>
+ * @singleton
+ */
+Ext.TaskMgr = new Ext.util.TaskRunner();if(typeof YAHOO == "undefined"){
+    throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found.";
+}
+
+(function(){
+    var E = YAHOO.util.Event,
+        D = YAHOO.util.Dom,
+        CN = YAHOO.util.Connect,
+        ES = YAHOO.util.Easing,
+        A = YAHOO.util.Anim,
+        libFlyweight,
+        version = YAHOO.env.getVersion('yahoo').version.split('.'),
+        mouseEnterSupported = parseInt(version[0]) >= 3,
+        mouseCache = {},
+        isXUL = Ext.isGecko ? function(node){
+            return Object.prototype.toString.call(node) == '[object XULElement]';
+        } : function(){
+        }, isTextNode = Ext.isGecko ? function(node){
+            try{
+                return node.nodeType == 3;
+            }catch (e){
+                return false;
+            }
+        } : function(node){
+            return node.nodeType == 3;
+        }, elContains = function(parent, child){
+            if(parent && parent.firstChild){
+                while(child){
+                    if(child === parent){
+                        return true;
+                    }
+                    try{
+                        child = child.parentNode;
+                    }catch (e){
+                        return false;
+                    }
+                    if(child && (child.nodeType != 1)){
+                        child = null;
+                    }
+                }
+            }
+            return false;
+        }, checkRelatedTarget = function(e){
+            var related = Ext.lib.Event.getRelatedTarget(e);
+            return !(isXUL(related) || elContains(e.currentTarget, related));
+        };
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        return full ? D.getDocumentWidth() : D.getViewportWidth();
+    },
+
+    getViewHeight : function(full){
+        return full ? D.getDocumentHeight() : D.getViewportHeight();
+    },
+
+    isAncestor : function(haystack, needle){
+        return D.isAncestor(haystack, needle);
+    },
+
+    getRegion : function(el){
+        return D.getRegion(el);
+    },
+
+    getY : function(el){
+        return this.getXY(el)[1];
+    },
+
+    getX : function(el){
+        return this.getXY(el)[0];
+    },
+
+    // original version based on YahooUI getXY
+    // this version fixes several issues in Safari and FF
+    // and boosts performance by removing the batch overhead, repetitive dom lookups and array index calls
+    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 [Math.round(b.left + scroll.left), Math.round(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]);
+    }
+};
+
+Ext.lib.Event = {
+    getPageX : function(e){
+        return E.getPageX(e.browserEvent || e);
+    },
+
+    getPageY : function(e){
+        return E.getPageY(e.browserEvent || e);
+    },
+
+    getXY : function(e){
+        return E.getXY(e.browserEvent || e);
+    },
+
+    getTarget : function(e){
+        return E.getTarget(e.browserEvent || e);
+    },
+
+    getRelatedTarget : function(e){
+        return E.getRelatedTarget(e.browserEvent || e);
+    },
+
+    on : function(el, eventName, fn, scope, override){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id] || (mouseCache[el.id] = {});
+            item[eventName] = fn;
+            fn = fn.createInterceptor(checkRelatedTarget);
+            eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+        }
+        E.on(el, eventName, fn, scope, override);
+    },
+
+    un : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id], 
+                ev = item && item[eventName];
+
+            if(ev){
+                fn = ev.fn;
+                delete item[eventName];
+                eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+            }
+        }
+        E.removeListener(el, eventName, fn);;
+    },
+
+    purgeElement : function(el){
+        E.purgeElement(el);
+    },
+
+    preventDefault : function(e){
+        E.preventDefault(e.browserEvent || e);
+    },
+
+    stopPropagation : function(e){
+        E.stopPropagation(e.browserEvent || e);
+    },
+
+    stopEvent : function(e){
+        E.stopEvent(e.browserEvent || e);
+    },
+
+    onAvailable : function(el, fn, scope, override){
+        return E.onAvailable(el, fn, scope, override);
+    }
+};
+
+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)){
+                        CN.initHeader(h, hs[h], false);
+                    }
+                }
+            }
+            if(options.xmlData){
+                if (!hs || !hs['Content-Type']){
+                    CN.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']){
+                    CN.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 CN.asyncRequest(method, uri, cb, data);
+    },
+
+    formRequest : function(form, uri, cb, data, isUpload, sslUri){
+        CN.setForm(form, isUpload, sslUri);
+        return CN.asyncRequest(Ext.getDom(form).method ||'POST', uri, cb, data);
+    },
+
+    isCallInProgress : function(trans){
+        return CN.isCallInProgress(trans);
+    },
+
+    abort : function(trans){
+        return CN.abort(trans);
+    },
+
+    serializeForm : function(form){
+        var d = CN.setForm(form.dom || form);
+        CN.resetFormState();
+        return d;
+    }
+};
+
+Ext.lib.Region = YAHOO.util.Region;
+Ext.lib.Point = YAHOO.util.Point;
+
+
+Ext.lib.Anim = {
+    scroll : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.Scroll);
+    },
+
+    motion : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.Motion);
+    },
+
+    color : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.ColorAnim);
+    },
+
+    run : function(el, args, duration, easing, cb, scope, type){
+        type = type || YAHOO.util.Anim;
+        if(typeof easing == "string"){
+            easing = YAHOO.util.Easing[easing];
+        }
+        var anim = new type(el, args, duration, easing);
+        anim.animateX(function(){
+            Ext.callback(cb, scope);
+        });
+        return anim;
+    }
+};
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+
+// prevent IE leaks
+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);
+}
+// various overrides
+
+// add ability for callbacks with animations
+if(YAHOO.util.Anim){
+    YAHOO.util.Anim.prototype.animateX = function(callback, scope){
+        var f = function(){
+            this.onComplete.unsubscribe(f);
+            if(typeof callback == "function"){
+                callback.call(scope || this, this);
+            }
+        };
+        this.onComplete.subscribe(f, this, true);
+        this.animate();
+    };
+}
+
+if(YAHOO.util.DragDrop && Ext.dd.DragDrop){
+    YAHOO.util.DragDrop.defaultPadding = Ext.dd.DragDrop.defaultPadding;
+    YAHOO.util.DragDrop.constrainTo = Ext.dd.DragDrop.constrainTo;
+}
+
+YAHOO.util.Dom.getXY = function(el) {
+    var f = function(el) {
+        return Ext.lib.Dom.getXY(el);
+    };
+    return YAHOO.util.Dom.batch(el, f, YAHOO.util.Dom, true);
+};
+
+
+// workaround for Safari anim duration speed problems
+if(YAHOO.util.AnimMgr){
+    YAHOO.util.AnimMgr.fps = 1000;
+}
+
+YAHOO.util.Region.prototype.adjust = function(t, l, b, r){
+    this.top += t;
+    this.left += l;
+    this.right += r;
+    this.bottom += b;
+    return this;
+};
+    
+YAHOO.util.Region.prototype.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;
+};
+
+
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/adapter/yui/ext-yui-adapter.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,t=Object.prototype.toString,s=function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(t.call(e))){return true}return((e.nextNode||e.item)&&Ext.isNumber(e.length))},u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u)},i=document,l=i.compatMode=="CSS1Compat",B=z(/opera/),h=z(/chrome/),v=z(/webkit/),y=!h&&z(/safari/),f=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),r=!B&&z(/msie/),p=r&&z(/msie 7/),o=r&&z(/msie 8/),q=r&&!p&&!o,n=!v&&z(/gecko/),d=n&&z(/rv:1\.8/),a=n&&z(/rv:1\.9/),w=r&&!l,A=z(/windows|win32/),k=z(/macintosh|mac os x/),j=z(/adobeair/),m=z(/linux/),c=/^https/i.test(window.location.protocol);if(q){try{i.execCommand("BackgroundImageCache",false,true)}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:"javascript:false",isStrict:l,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(Ext.isEmpty(D[e])){D[e]=E[e]}}}return D},id:function(e,D){return(e=Ext.getDom(e)||{}).id=e.id||(D||"ext-gen")+(++g)},extend:function(){var D=function(F){for(var E in F){this[E]=F[E]}};var e=Object.prototype.constructor;return function(K,H,J){if(Ext.isObject(H)){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments)}}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H}K.override=function(F){Ext.override(K,F)};I.superclass=I.supr=(function(){return E});I.override=D;Ext.override(K,J);K.extend=function(F){Ext.extend(K,F)};return K}}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.toString!=e.toString){D.toString=E.toString}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{}})});return D},urlEncode:function(I,H){var F,D=[],E,G=encodeURIComponent;for(E in I){F=!Ext.isDefined(I[E]);Ext.each(F?E:I[E],function(J,e){D.push("&",G(E),"=",(J!=E||!F)?G(J):"")})}if(!H){D.shift();H=""}return H+D.join("")},urlDecode:function(E,D){var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F)});return H},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D}return e},toArray:function(){return r?function(e,F,D,E){E=[];Ext.each(e,function(G){E.push(G)});return E.slice(F||0,D||E.length)}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length)}}(),each:function(G,F,E){if(Ext.isEmpty(G,true)){return}if(!s(G)||Ext.isPrimitive(G)){G=[G]}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D}}},iterate:function(E,D,e){if(s(E)){Ext.each(E,D,e);return}else{if(Ext.isObject(E)){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F])===false){return}}}}}},getDom:function(e){if(!e||!i){return null}return e.dom?e.dom:(Ext.isString(e)?i.getElementById(e):e)},getBody:function(){return Ext.get(i.body||i.documentElement)},removeNode:r?function(){var e;return function(D){if(D&&D.tagName!="BODY"){e=e||i.createElement("div");e.appendChild(D);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false)},isArray:function(e){return t.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return t.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isDefined:function(e){return typeof e!=="undefined"},isOpera:B,isWebKit:v,isChrome:h,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:f,isIE:r,isIE6:q,isIE7:p,isIE8:o,isGecko:n,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:m,isWindows:A,isMac:k,isAir:j});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.ns("Ext.grid","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var b=Ext,a=0;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7?"http://extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(c,d){return Ext.extend(c,d(c.prototype))},getDoc:function(){return Ext.get(document)},isDate:function(c){return Object.prototype.toString.apply(c)==="[object Date]"},num:function(d,c){d=Number(d===null||typeof d=="boolean"?NaN:d);return isNaN(d)?c:d},value:function(e,c,d){return Ext.isEmpty(e,d)?c:e},escapeRe:function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(f,c,e,d){f[c]=f[c].createSequence(e,d)},addBehaviors:function(g){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(g)})}else{var d={},f,c,e;for(c in g){if((f=c.split("@"))[1]){e=f[0];if(!d[e]){d[e]=Ext.select(e)}d[e].on(f[1],g[c])}}d=null}},combine:function(){var e=arguments,d=e.length,g=[];for(var f=0;f<d;f++){var c=e[f];if(Ext.isArray(c)){g=g.concat(c)}else{if(c.length!==undefined&&!c.substr){g=g.concat(Array.prototype.slice.call(c,0))}else{g.push(c)}}}return g},copyTo:function(c,d,e){if(typeof e=="string"){e=e.split(/[,;\s]/)}Ext.each(e,function(f){if(d.hasOwnProperty(f)){c[f]=d[f]}},this);return c},destroy:function(){Ext.each(arguments,function(c){if(c){if(Ext.isArray(c)){this.destroy.apply(this,c)}else{if(Ext.isFunction(c.destroy)){c.destroy()}else{if(c.dom){c.remove()}}}}},this)},destroyMembers:function(j,g,e,f){for(var h=1,d=arguments,c=d.length;h<c;h++){Ext.destroy(j[d[h]]);delete j[d[h]]}},clean:function(c){var d=[];Ext.each(c,function(e){if(!!e){d.push(e)}});return d},unique:function(c){var d=[],e={};Ext.each(c,function(f){if(!e[f]){d.push(f)}e[f]=true});return d},flatten:function(c){var e=[];function d(f){Ext.each(f,function(g){if(Ext.isArray(g)){d(g)}else{e.push(g)}});return e}return d(c)},min:function(c,d){var e=c[0];d=d||function(g,f){return g<f?-1:1};Ext.each(c,function(f){e=d(e,f)==-1?e:f});return e},max:function(c,d){var e=c[0];d=d||function(g,f){return g>f?1:-1};Ext.each(c,function(f){e=d(e,f)==1?e:f});return e},mean:function(c){return Ext.sum(c)/c.length},sum:function(c){var d=0;Ext.each(c,function(e){d+=e});return d},partition:function(c,d){var e=[[],[]];Ext.each(c,function(g,h,f){e[(d&&d(g,h,f))||(!d&&g)?0:1].push(g)});return e},invoke:function(c,d){var f=[],e=Array.prototype.slice.call(arguments,2);Ext.each(c,function(g,h){if(g&&typeof g[d]=="function"){f.push(g[d].apply(g,e))}else{f.push(undefined)}});return f},pluck:function(c,e){var d=[];Ext.each(c,function(f){d.push(f[e])});return d},zip:function(){var l=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),g=l[0],k=l[1][0],c=Ext.max(Ext.pluck(g,"length")),f=[];for(var h=0;h<c;h++){f[h]=[];if(k){f[h]=k.apply(k,Ext.pluck(g,h))}else{for(var e=0,d=g.length;e<d;e++){f[h].push(g[e][h])}}}return f},getCmp:function(c){return Ext.ComponentMgr.get(c)},useShims:b.isIE6||(b.isMac&&b.isGecko2),type:function(d){if(d===undefined||d===null){return false}if(d.htmlElement){return"element"}var c=typeof d;if(c=="object"&&d.nodeName){switch(d.nodeType){case 1:return"element";case 3:return(/\S/).test(d.nodeValue)?"textnode":"whitespace"}}if(c=="object"||c=="function"){switch(d.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if(typeof d.length=="number"&&typeof d.item=="function"){return"nodelist"}}return c},intercept:function(f,c,e,d){f[c]=f[c].createInterceptor(e,d)},callback:function(c,f,e,d){if(Ext.isFunction(c)){if(d){c.defer(d,f,e||[])}else{c.apply(f,e||[])}}}}}());Ext.apply(Function.prototype,{createSequence:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});String.prototype.toggle=function(b,a){return this==b?a:b};String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}();Date.prototype.getElapsed=function(a){return Math.abs((a||new Date()).getTime()-this.getTime())};Ext.applyIf(Number.prototype,{constrain:function(b,a){return Math.min(Math.max(this,b),a)}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();if(typeof YAHOO=="undefined"){throw"Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."}(function(){var o=YAHOO.util.Event,c=YAHOO.util.Dom,h=YAHOO.util.Connect,j=YAHOO.util.Easing,e=YAHOO.util.Anim,l,m=YAHOO.env.getVersion("yahoo").version.split("."),b=parseInt(m[0])>=3,n={},d=Ext.isGecko?function(p){return Object.prototype.toString.call(p)=="[object XULElement]"}:function(){},a=Ext.isGecko?function(p){try{return p.nodeType==3}catch(q){return false}}:function(p){return p.nodeType==3},g=function(p,r){if(p&&p.firstChild){while(r){if(r===p){return true}try{r=r.parentNode}catch(q){return false}if(r&&(r.nodeType!=1)){r=null}}}return false},k=function(q){var p=Ext.lib.Event.getRelatedTarget(q);return !(d(p)||g(q.currentTarget,p))};Ext.lib.Dom={getViewWidth:function(p){return p?c.getDocumentWidth():c.getViewportWidth()},getViewHeight:function(p){return p?c.getDocumentHeight():c.getViewportHeight()},isAncestor:function(p,q){return c.isAncestor(p,q)},getRegion:function(p){return c.getRegion(p)},getY:function(p){return this.getXY(p)[1]},getX:function(p){return this.getXY(p)[0]},getXY:function(s){var r,w,A,B,v=(document.body||document.documentElement);s=Ext.getDom(s);if(s==v){return[0,0]}if(s.getBoundingClientRect){A=s.getBoundingClientRect();B=i(document).getScroll();return[Math.round(A.left+B.left),Math.round(A.top+B.top)]}var C=0,z=0;r=s;var q=i(s).getStyle("position")=="absolute";while(r){C+=r.offsetLeft;z+=r.offsetTop;if(!q&&i(r).getStyle("position")=="absolute"){q=true}if(Ext.isGecko){w=i(r);var D=parseInt(w.getStyle("borderTopWidth"),10)||0;var t=parseInt(w.getStyle("borderLeftWidth"),10)||0;C+=t;z+=D;if(r!=s&&w.getStyle("overflow")!="visible"){C+=t;z+=D}}r=r.offsetParent}if(Ext.isSafari&&q){C-=v.offsetLeft;z-=v.offsetTop}if(Ext.isGecko&&!q){var u=i(v);C+=parseInt(u.getStyle("borderLeftWidth"),10)||0;z+=parseInt(u.getStyle("borderTopWidth"),10)||0}r=s.parentNode;while(r&&r!=v){if(!Ext.isOpera||(r.tagName!="TR"&&i(r).getStyle("display")!="inline")){C-=r.scrollLeft;z-=r.scrollTop}r=r.parentNode}return[C,z]},setXY:function(p,q){p=Ext.fly(p,"_setXY");p.position();var r=p.translatePoints(q);if(q[0]!==false){p.dom.style.left=r.left+"px"}if(q[1]!==false){p.dom.style.top=r.top+"px"}},setX:function(q,p){this.setXY(q,[p,false])},setY:function(p,q){this.setXY(p,[false,q])}};Ext.lib.Event={getPageX:function(p){return o.getPageX(p.browserEvent||p)},getPageY:function(p){return o.getPageY(p.browserEvent||p)},getXY:function(p){return o.getXY(p.browserEvent||p)},getTarget:function(p){return o.getTarget(p.browserEvent||p)},getRelatedTarget:function(p){return o.getRelatedTarget(p.browserEvent||p)},on:function(t,p,s,r,q){if((p=="mouseenter"||p=="mouseleave")&&!b){var u=n[t.id]||(n[t.id]={});u[p]=s;s=s.createInterceptor(k);p=(p=="mouseenter")?"mouseover":"mouseout"}o.on(t,p,s,r,q)},un:function(r,p,q){if((p=="mouseenter"||p=="mouseleave")&&!b){var t=n[r.id],s=t&&t[p];if(s){q=s.fn;delete t[p];p=(p=="mouseenter")?"mouseover":"mouseout"}}o.removeListener(r,p,q)},purgeElement:function(p){o.purgeElement(p)},preventDefault:function(p){o.preventDefault(p.browserEvent||p)},stopPropagation:function(p){o.stopPropagation(p.browserEvent||p)},stopEvent:function(p){o.stopEvent(p.browserEvent||p)},onAvailable:function(s,r,q,p){return o.onAvailable(s,r,q,p)}};Ext.lib.Ajax={request:function(v,t,p,u,q){if(q){var r=q.headers;if(r){for(var s in r){if(r.hasOwnProperty(s)){h.initHeader(s,r[s],false)}}}if(q.xmlData){if(!r||!r["Content-Type"]){h.initHeader("Content-Type","text/xml",false)}v=(v?v:(q.method?q.method:"POST"));u=q.xmlData}else{if(q.jsonData){if(!r||!r["Content-Type"]){h.initHeader("Content-Type","application/json",false)}v=(v?v:(q.method?q.method:"POST"));u=typeof q.jsonData=="object"?Ext.encode(q.jsonData):q.jsonData}}}return h.asyncRequest(v,t,p,u)},formRequest:function(t,s,q,u,p,r){h.setForm(t,p,r);return h.asyncRequest(Ext.getDom(t).method||"POST",s,q,u)},isCallInProgress:function(p){return h.isCallInProgress(p)},abort:function(p){return h.abort(p)},serializeForm:function(p){var q=h.setForm(p.dom||p);h.resetFormState();return q}};Ext.lib.Region=YAHOO.util.Region;Ext.lib.Point=YAHOO.util.Point;Ext.lib.Anim={scroll:function(s,q,t,u,p,r){this.run(s,q,t,u,p,r,YAHOO.util.Scroll)},motion:function(s,q,t,u,p,r){this.run(s,q,t,u,p,r,YAHOO.util.Motion)},color:function(s,q,t,u,p,r){this.run(s,q,t,u,p,r,YAHOO.util.ColorAnim)},run:function(t,q,v,w,p,s,r){r=r||YAHOO.util.Anim;if(typeof w=="string"){w=YAHOO.util.Easing[w]}var u=new r(t,q,v,w);u.animateX(function(){Ext.callback(p,s)});return u}};function i(p){if(!l){l=new Ext.Element.Flyweight()}l.dom=p;return l}if(Ext.isIE){function f(){var q=Function.prototype;delete q.createSequence;delete q.defer;delete q.createDelegate;delete q.createCallback;delete q.createInterceptor;window.detachEvent("onunload",f)}window.attachEvent("onunload",f)}if(YAHOO.util.Anim){YAHOO.util.Anim.prototype.animateX=function(r,p){var q=function(){this.onComplete.unsubscribe(q);if(typeof r=="function"){r.call(p||this,this)}};this.onComplete.subscribe(q,this,true);this.animate()}}if(YAHOO.util.DragDrop&&Ext.dd.DragDrop){YAHOO.util.DragDrop.defaultPadding=Ext.dd.DragDrop.defaultPadding;YAHOO.util.DragDrop.constrainTo=Ext.dd.DragDrop.constrainTo}YAHOO.util.Dom.getXY=function(p){var q=function(r){return Ext.lib.Dom.getXY(r)};return YAHOO.util.Dom.batch(p,q,YAHOO.util.Dom,true)};if(YAHOO.util.AnimMgr){YAHOO.util.AnimMgr.fps=1000}YAHOO.util.Region.prototype.adjust=function(s,q,p,u){this.top+=s;this.left+=q;this.right+=u;this.bottom+=p;return this};YAHOO.util.Region.prototype.constrainTo=function(p){this.top=this.top.constrain(p.top,p.bottom);this.bottom=this.bottom.constrain(p.top,p.bottom);this.left=this.left.constrain(p.left,p.right);this.right=this.right.constrain(p.left,p.right);return this}})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/README.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/README.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/README.txt	(revision 625)
@@ -0,0 +1,4 @@
+The samples can be browsed by opening the examples folder in a web browser.
+
+The samples home page (samples.html) along with some of the individual sample pages use XHR to load data. 
+Those samples will need to be on a webserver (http://) to run since XHR can't access the local file system.
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.css	(revision 625)
@@ -0,0 +1,31 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.add {
+    background-image: url(images/add.gif) !important;
+}
+.add16 {
+    background-image: url(images/add16.gif) !important;
+}
+.add24 {
+    background-image: url(images/add24.gif) !important;
+}
+
+.btn-panel td {
+    padding-left:5px;
+}
+
+h2 {
+    color:#083772 !important;
+    margin: 20px 0 0 !important;
+    padding: 5px;
+    background:#eee;
+    width:400px;
+}
+
+h3 {
+    font-weight:normal !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.html	(revision 625)
@@ -0,0 +1,30 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Ext Buttons</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="../form/states.js"></script>
+    <script type="text/javascript" src="buttons.js"></script>
+    <link rel="stylesheet" type="text/css" href="buttons.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body id="docbody">
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Ext Buttons</h1>
+
+<p>The js is not minified so it is readable. See <a href="buttons.js">buttons.js</a>.</p>
+
+<p>For a demo of buttons in toolbars, see <a href="../toolbar/toolbars.html">the toolbar sample</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/button/buttons.js	(revision 625)
@@ -0,0 +1,184 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    // This function renders a block of buttons
+    function renderButtons(title){
+
+        Ext.getBody().createChild({tag: 'h2', html: title});
+
+        new ButtonPanel(
+            'Text Only',
+            [{
+                text: 'Add User'
+            },{
+                text: 'Add User',
+                scale: 'medium'
+            },{
+                text: 'Add User',
+                scale: 'large'
+            }]
+        );
+
+        new ButtonPanel(
+            'Icon Only',
+            [{
+                iconCls: 'add16'
+            },{
+                iconCls: 'add24',
+                scale: 'medium'
+            },{
+                iconCls: 'add',
+                scale: 'large'
+            }]
+        );
+
+        new ButtonPanel(
+            'Icon and Text (left)',
+            [{
+                text: 'Add User',
+                iconCls: 'add16'
+            },{
+                text: 'Add User',
+                iconCls: 'add24',
+                scale: 'medium'
+            },{
+                text: 'Add User',
+                iconCls: 'add',
+                scale: 'large'
+            }]
+        );
+
+        new ButtonPanel(
+            'Icon and Text (top)',
+            [{
+                text: 'Add User',
+                iconCls: 'add16',
+                iconAlign: 'top'
+            },{
+                text: 'Add User',
+                iconCls: 'add24',
+                scale: 'medium',
+                iconAlign: 'top'
+            },{
+                text: 'Add User',
+                iconCls: 'add',
+                scale: 'large',
+                iconAlign: 'top'
+            }]
+        );
+
+        new ButtonPanel(
+            'Icon and Text (right)',
+            [{
+                text: 'Add User',
+                iconCls: 'add16',
+                iconAlign: 'right'
+            },{
+                text: 'Add User',
+                iconCls: 'add24',
+                scale: 'medium',
+                iconAlign: 'right'
+            },{
+                text: 'Add User',
+                iconCls: 'add',
+                scale: 'large',
+                iconAlign: 'right'
+            }]
+        );
+
+        new ButtonPanel(
+            'Icon and Text (bottom)',
+            [{
+                text: 'Add User',
+                iconCls: 'add16',
+                iconAlign: 'bottom'
+            },{
+                text: 'Add User',
+                iconCls: 'add24',
+                scale: 'medium',
+                iconAlign: 'bottom'
+            },{
+                text: 'Add User',
+                iconCls: 'add',
+                scale: 'large',
+                iconAlign: 'bottom'
+            }]
+        );
+    }
+
+    renderButtons('Normal Buttons');
+
+    ButtonPanel.override({
+        enableToggle: true
+    });
+
+    renderButtons('Toggle Buttons');
+
+    ButtonPanel.override({
+        enableToggle : undefined,
+        menu : {items: [{text:'Menu Item 1'},{text:'Menu Item 2'},{text:'Menu Item 3'}]}
+    });
+
+    renderButtons('Menu Buttons');
+
+    ButtonPanel.override({
+        split: true,
+        defaultType: 'splitbutton'
+    });
+
+    renderButtons('Split Buttons');
+
+    ButtonPanel.override({
+        split: false,
+        defaultType: 'button',
+        arrowAlign: 'bottom'
+    });
+
+    renderButtons('Menu Buttons (Arrow on bottom)');
+
+    ButtonPanel.override({
+        split: true,
+        defaultType: 'splitbutton'
+    });
+
+    renderButtons('Split Buttons (Arrow on bottom)');
+});
+
+// Helper class for organizing the buttons
+ButtonPanel = Ext.extend(Ext.Panel, {
+    layout:'table',
+    defaultType: 'button',
+    baseCls: 'x-plain',
+    cls: 'btn-panel',
+    renderTo : 'docbody',
+    menu: undefined,
+    split: false,
+
+    layoutConfig: {
+        columns:3
+    },
+
+    constructor: function(desc, buttons){
+        // apply test configs
+        for(var i = 0, b; b = buttons[i]; i++){
+            b.menu = this.menu;
+            b.enableToggle = this.enableToggle;
+            b.split = this.split;
+            b.arrowAlign = this.arrowAlign;
+        }
+        var items = [{
+            xtype: 'box',
+            autoEl: {tag: 'h3', html: desc, style:"padding:15px 0 3px;"},
+            colspan: 3
+        }].concat(buttons);
+
+        ButtonPanel.superclass.constructor.call(this, {
+            items: items
+        });
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.html	(revision 625)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Charts</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="charts.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+    #container {
+        padding:10px;
+    }
+    #container .x-panel {
+        margin:10px;
+    }
+    #container .x-panel-ml {
+        padding-left:1px;
+    }
+    #container .x-panel-mr {
+        padding-right:1px;
+    }
+    #container .x-panel-bl {
+        padding-left:2px;
+    }
+
+    #container .x-panel-br {
+        padding-right:2px;
+    }
+    #container .x-panel-body {
+
+    }
+    #container .x-panel-mc {
+        padding-top:0;
+    }
+    #container .x-panel-bc .x-panel-footer {
+        padding-bottom:2px;
+    }
+    #container .x-panel-nofooter .x-panel-bc {
+        height:2px;
+    }
+    #container .x-toolbar {
+        border:1px solid #99BBE8;
+        border-width: 0 0 1px 0;
+    }
+    .chart {
+        background-image: url(chart.gif) !important;
+    }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Charts</h1>
+<p>The js is not minified so it is readable. See <a href="charts.js">charts.js</a>.</p>
+
+<div id="container">
+    
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/charts.js	(revision 625)
@@ -0,0 +1,156 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
+
+Ext.onReady(function(){
+
+    var store = new Ext.data.JsonStore({
+        fields:['name', 'visits', 'views'],
+        data: [
+            {name:'Jul 07', visits: 245000, views: 3000000},
+            {name:'Aug 07', visits: 240000, views: 3500000},
+            {name:'Sep 07', visits: 355000, views: 4000000},
+            {name:'Oct 07', visits: 375000, views: 4200000},
+            {name:'Nov 07', visits: 490000, views: 4500000},
+            {name:'Dec 07', visits: 495000, views: 5800000},
+            {name:'Jan 08', visits: 520000, views: 6000000},
+            {name:'Feb 08', visits: 620000, views: 7500000}
+        ]
+    });
+
+    // extra extra simple
+    new Ext.Panel({
+        title: 'ExtJS.com Visits Trend, 2007/2008 (No styling)',
+        renderTo: 'container',
+        width:500,
+        height:300,
+        layout:'fit',
+
+        items: {
+            xtype: 'linechart',
+            store: store,
+            xField: 'name',
+            yField: 'visits',
+			listeners: {
+				itemclick: function(o){
+					var rec = store.getAt(o.index);
+					Ext.example.msg('Item Selected', 'You chose {0}.', rec.get('name'));
+				}
+			}
+        }
+    });
+
+    // extra simple
+    new Ext.Panel({
+        iconCls:'chart',
+        title: 'ExtJS.com Visits Trend, 2007/2008 (Simple styling)',
+        frame:true,
+        renderTo: 'container',
+        width:500,
+        height:300,
+        layout:'fit',
+
+        items: {
+            xtype: 'linechart',
+            store: store,
+            url: '../../resources/charts.swf',
+            xField: 'name',
+            yField: 'visits',
+            yAxis: new Ext.chart.NumericAxis({
+                displayName: 'Visits',
+                labelRenderer : Ext.util.Format.numberRenderer('0,0')
+            }),
+            tipRenderer : function(chart, record){
+                return Ext.util.Format.number(record.data.visits, '0,0') + ' visits in ' + record.data.name;
+            }
+        }
+    });
+
+    // more complex with a custom look
+    new Ext.Panel({
+        iconCls:'chart',
+        title: 'ExtJS.com Visits and Pageviews, 2007/2008 (Full styling)',
+        frame:true,
+        renderTo: 'container',
+        width:500,
+        height:300,
+        layout:'fit',
+
+        items: {
+            xtype: 'columnchart',
+            store: store,
+            url:'../../resources/charts.swf',
+            xField: 'name',
+            yAxis: new Ext.chart.NumericAxis({
+                displayName: 'Visits',
+                labelRenderer : Ext.util.Format.numberRenderer('0,0')
+            }),
+            tipRenderer : function(chart, record, index, series){
+                if(series.yField == 'visits'){
+                    return Ext.util.Format.number(record.data.visits, '0,0') + ' visits in ' + record.data.name;
+                }else{
+                    return Ext.util.Format.number(record.data.views, '0,0') + ' page views in ' + record.data.name;
+                }
+            },
+            chartStyle: {
+                padding: 10,
+                animationEnabled: true,
+                font: {
+                    name: 'Tahoma',
+                    color: 0x444444,
+                    size: 11
+                },
+                dataTip: {
+                    padding: 5,
+                    border: {
+                        color: 0x99bbe8,
+                        size:1
+                    },
+                    background: {
+                        color: 0xDAE7F6,
+                        alpha: .9
+                    },
+                    font: {
+                        name: 'Tahoma',
+                        color: 0x15428B,
+                        size: 10,
+                        bold: true
+                    }
+                },
+                xAxis: {
+                    color: 0x69aBc8,
+                    majorTicks: {color: 0x69aBc8, length: 4},
+                    minorTicks: {color: 0x69aBc8, length: 2},
+                    majorGridLines: {size: 1, color: 0xeeeeee}
+                },
+                yAxis: {
+                    color: 0x69aBc8,
+                    majorTicks: {color: 0x69aBc8, length: 4},
+                    minorTicks: {color: 0x69aBc8, length: 2},
+                    majorGridLines: {size: 1, color: 0xdfe8f6}
+                }
+            },
+            series: [{
+                type: 'column',
+                displayName: 'Page Views',
+                yField: 'views',
+                style: {
+                    image:'bar.gif',
+                    mode: 'stretch',
+                    color:0x99BBE8
+                }
+            },{
+                type:'line',
+                displayName: 'Visits',
+                yField: 'visits',
+                style: {
+                    color: 0x15428B
+                }
+            }]
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.html	(revision 625)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Charts</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="pie-chart.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Pie Chart Sample</h1>
+<p>The js is not minified so it is readable. See <a href="pie-chart.js">pie-chart.js</a>.</p>
+
+<div id="container">
+    
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.js	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
+
+Ext.onReady(function(){
+    var store = new Ext.data.JsonStore({
+        fields: ['season', 'total'],
+        data: [{
+            season: 'Summer',
+            total: 150
+        },{
+            season: 'Fall',
+            total: 245
+        },{
+            season: 'Winter',
+            total: 117
+        },{
+            season: 'Spring',
+            total: 184
+        }]
+    });
+    
+    new Ext.Panel({
+        width: 400,
+        height: 400,
+        title: 'Pie Chart with Legend - Favorite Season',
+        renderTo: 'container',
+        items: {
+            store: store,
+            xtype: 'piechart',
+            dataField: 'total',
+            categoryField: 'season',
+            //extra styles get applied to the chart defaults
+            extraStyle:
+            {
+                legend:
+                {
+                    display: 'bottom',
+                    padding: 5,
+                    font:
+                    {
+                        family: 'Tahoma',
+                        size: 13
+                    }
+                }
+            }
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.html	(revision 625)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Charts</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="reload-chart.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Reload Column Chart Sample</h1>
+<p>The js is not minified so it is readable. See <a href="reload-chart.js">reload-chart.js</a>.</p>
+
+<div id="container">
+    
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/reload-chart.js	(revision 625)
@@ -0,0 +1,50 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+function generateData(){
+    var data = [];
+    for(var i = 0; i < 12; ++i){
+        data.push([Date.monthNames[i], (Math.floor(Math.random() *  11) + 1) * 100]);
+    }
+    return data;
+}
+
+Ext.onReady(function(){
+    var store = new Ext.data.ArrayStore({
+        fields: ['month', 'hits'],
+        data: generateData()
+    });
+    
+    new Ext.Panel({
+        width: 700,
+        height: 400,
+        renderTo: document.body,
+        title: 'Column Chart with Reload - Hits per Month',
+        tbar: [{
+            text: 'Load new data set',
+            handler: function(){
+                store.loadData(generateData());
+            }
+        }],
+        items: {
+            xtype: 'columnchart',
+            store: store,
+            yField: 'hits',
+            xField: 'month',
+            xAxis: new Ext.chart.CategoryAxis({
+                title: 'Month'
+            }),
+            yAxis: new Ext.chart.NumericAxis({
+                title: 'Hits'
+            }),
+            extraStyle: {
+               xAxis: {
+                    labelRotation: -90
+                }
+            }
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.html	(revision 625)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Charts</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="stacked-bar-chart.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Stacked Bar Chart Sample</h1>
+<p>The js is not minified so it is readable. See <a href="stacked-bar-chart.js">stacked-bar-chart.js</a>.</p>
+
+<div id="container">
+    
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/stacked-bar-chart.js	(revision 625)
@@ -0,0 +1,48 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
+
+Ext.onReady(function(){
+    var store = new Ext.data.JsonStore({
+        fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
+        data: [
+                {year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
+                {year: 2006, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
+                {year: 2007, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
+                {year: 2008, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
+              ]
+    });
+    
+    new Ext.Panel({
+        width: 600,
+        height: 400,
+        renderTo: 'container',
+        title: 'Stacked Bar Chart - Movie Takings by Genre',
+        items: {
+            xtype: 'stackedbarchart',
+            store: store,
+            yField: 'year',
+            xAxis: new Ext.chart.NumericAxis({
+                stackingEnabled: true,
+                labelRenderer: Ext.util.Format.usMoney
+            }),
+            series: [{
+                xField: 'comedy',
+                displayName: 'Comedy'
+            },{
+                xField: 'action',
+                displayName: 'Action'
+            },{
+                xField: 'drama',
+                displayName: 'Drama'
+            },{
+                xField: 'thriller',
+                displayName: 'Thriller'
+            }]
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight-example.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight-example.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight-example.js	(revision 625)
@@ -0,0 +1,77 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var spot = new Ext.ux.Spotlight({
+        easing: 'easeOut',
+        duration: .3
+    });
+
+    var DemoPanel = Ext.extend(Ext.Panel, {
+        title: 'Demo Panel',
+        frame: true,
+        width: 200,
+        height: 150,
+        html: 'Some panel content goes here!',
+        bodyStyle: 'padding:10px 15px;',
+
+        toggle: function(on){
+            this.buttons[0].setDisabled(!on);
+        }
+    });
+
+    var p1, p2, p3;
+    var updateSpot = function(id){
+        if(typeof id == 'string'){
+            spot.show(id);
+        }else if (!id && spot.active){
+            spot.hide();
+        }
+        p1.toggle(id==p1.id);
+        p2.toggle(id==p2.id);
+        p3.toggle(id==p3.id);
+    };
+
+    new Ext.Panel({
+        renderTo: Ext.getBody(),
+        layout: 'table',
+        id: 'demo-ct',
+        border: false,
+        layoutConfig: {
+            columns: 3
+        },
+        items: [p1 = new DemoPanel({
+            id: 'panel1',
+            buttons: [{
+                text: 'Next Panel',
+                handler: updateSpot.createDelegate(this, ['panel2'])
+            }]
+        }),
+        p2 = new DemoPanel({
+            id: 'panel2',
+            buttons: [{
+                text: 'Next Panel',
+                handler: updateSpot.createDelegate(this, ['panel3'])
+            }]
+        }),
+        p3 = new DemoPanel({
+            id: 'panel3',
+            buttons: [{
+                text: 'Done',
+                handler: updateSpot.createDelegate(this, [false])
+            }]
+        })]
+    });
+
+    new Ext.Button({
+        text: 'Start',
+        renderTo: 'start-ct',
+        handler: updateSpot.createDelegate(this, ['panel1'])
+    });
+
+    updateSpot(false);
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/core/spotlight.html	(revision 625)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Spotlight Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="../ux/Spotlight.js"></script>
+    <script language="javascript" src="spotlight-example.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        #demo-ct .x-table-layout-cell {
+            padding: 20px;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Spotlight</h1>
+
+<p>This utility allows you to restrict input to a particular element by masking all other page content.</p>
+<p>The js is not minified so it is readable. See <a href="spotlight-example.js">spotlight-example.js</a>.</p>
+
+<div id="start-ct"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.html	(revision 625)
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Templates Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="templates.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+    .x-panel {
+        margin:15px;
+    }
+    .x-panel-body p {
+        margin:5px;
+        font-size:11px;
+    }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Templates</h1>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/core/templates.js	(revision 625)
@@ -0,0 +1,75 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var data = {
+        name: 'Jack Slocum',
+        company: 'Ext JS, LLC',
+        address: '4 Red Bulls Drive',
+        city: 'Cleveland',
+        state: 'Ohio',
+        zip: '44102',
+        kids: [{
+            name: 'Sara Grace',
+            age:3
+        },{
+            name: 'Zachary',
+            age:2
+        },{
+            name: 'John James',
+            age:0
+        }]
+    };
+
+    var p = new Ext.Panel({
+        title: 'Basic Template',
+        width: 300,
+        html: '<p><i>Apply the template to see results here</i></p>',
+        tbar: [{
+            text: 'Apply Template',
+            handler: function(){
+
+                var tpl = new Ext.Template(
+                    '<p>Name: {name}</p>',
+                    '<p>Company: {company}</p>',
+                    '<p>Location: {city}, {state}</p>'
+                );
+
+                tpl.overwrite(p.body, data);
+                p.body.highlight('#c3daf9', {block:true});
+            }
+        }],
+
+        renderTo: document.body
+    });
+
+
+    var p2 = new Ext.Panel({
+        title: 'XTemplate',
+        width: 300,
+        html: '<p><i>Apply the template to see results here</i></p>',
+        tbar: [{
+            text: 'Apply Template',
+            handler: function(){
+
+                var tpl = new Ext.XTemplate(
+                    '<p>Name: {name}</p>',
+                    '<p>Company: {company}</p>',
+                    '<p>Location: {city}, {state}</p>',
+                    '<p>Kids: ',
+                    '<tpl for="kids" if="name==\'Jack Slocum\'">',
+                        '<tpl if="age &gt; 1"><p>{#}. {parent.name}\'s kid - {name}</p></tpl>',
+                    '</tpl></p>'
+                );
+                tpl.overwrite(p2.body, data);
+                p2.body.highlight('#c3daf9', {block:true});
+            }
+        }],
+
+        renderTo: document.body
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/data.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/data.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/data.js	(revision 625)
@@ -0,0 +1,578 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.samples');
+
+Ext.samples.samplesCatalog = [{
+    title: 'Combination Samples',
+    samples: [{
+        text: 'Feed Viewer',
+        url:  'feed-viewer/view.html',
+        icon: 'feeds.gif',
+        desc: 'RSS feed reader sample application that features a swappable reader panel layout.'
+    },{
+        text: 'Simple Tasks',
+        url:  'http://extjs.com/blog/2008/02/24/tasks2/',
+        icon: 'air.gif',
+        desc: 'Complete personal task management application sample that runs on <a href="http://labs.adobe.com/technologies/air/" target="_blank">Adobe AIR</a>.'
+    },{
+        text: 'Simple Tasks',
+        url:  'tasks/tasks.html',
+        icon: 'tasks.gif',
+        desc: 'Personal task management application sample that uses <a href="http://gears.google.com" target="_blank">Google Gears</a> for data storage.'
+    },{
+        text: 'Image Viewer',
+        url:  'organizer/organizer.html',
+        icon: 'organizer.gif',
+        desc: 'DataView and TreePanel sample that demonstrates dragging data items from a DataView into a TreePanel.'
+    }/*,{
+        text: 'Image Organizer',
+        url:  'image-organizer/index.html',
+        icon: 'image-organizer.gif',
+        desc: 'Image management application sample utilizing MySQL lite and Ext.Direct.',
+        status: 'new'
+    }*/,{
+        text: 'Ext JS API Documentation',
+        url:  '../docs/index.html',
+        icon: 'docs.gif',
+        desc: 'API Documentation application.',
+        status: 'modified'
+    },{
+        text: 'Ext JS Forum Browser',
+        url:  'forum/forum.html',
+        icon: 'forum.gif',
+        desc: 'Ext JS online forums browser application.',
+        status: 'modified'
+    },{
+        text: 'Web Desktop',
+        url:  'desktop/desktop.html',
+        icon: 'desktop.gif',
+        desc: 'Demonstrates how one could build a desktop in the browser using Ext components including a module plugin system.'
+    }]
+},{
+    title: 'Accessibility',
+    samples: [{
+        text: 'Key Feed Viewer',
+        url:  'key-feed-viewer/view.html',
+        icon: 'keyboard.gif',
+        desc: 'Keyboard navigation within a complex layout',
+        status: 'experimental'
+    },{
+        text: 'ARIA Tree',
+        url:  'tree/aria-tree.html',
+        icon: 'acc-tree.gif',
+        desc: 'Demonstrating ARIA with a TreePanel',
+        status: 'experimental'
+    }]
+},{
+    title: 'Grids',
+    samples: [{
+        text: 'Basic Array Grid',
+        url:  'grid/array-grid.html',
+        icon: 'grid-array.gif',
+        desc: 'A basic read-only grid loaded from local array data that demonstrates the use of custom column renderer functions.'
+    },{
+        text: 'Property Grid',
+        url:  'grid/property-grid.html',
+        icon: 'grid-property.gif',
+        desc: 'An example of a traditional property grid as typically seen in development IDEs.'
+    },{
+        text: 'Editable Grid',
+        url:  'grid/edit-grid.html',
+        icon: 'grid-edit.gif',
+        desc: 'An editable grid loaded from XML that shows multiple types of grid editors as well as defining custom data records.'
+    },{
+        text: 'Row Editor Grid',
+        url:  'grid/row-editor.html',
+        icon: 'grid-row-editor.gif',
+        desc: 'An editable grid which allows the user to make modifications to an entire record at once. Also demonstrates the Ext.chart package. ',
+        status: 'new'
+    },{
+        text: 'XML Grid',
+        url:  'grid/xml-grid.html',
+        icon: 'grid-xml.gif',
+        desc: 'A simple read-only grid loaded from XML data.'
+    },{
+        text: 'Paging',
+        url:  'grid/paging.html',
+        icon: 'grid-paging.gif',
+        desc: 'A grid with paging, cross-domain data loading and custom- rendered expandable row bodies.'
+    },{
+        text: 'Progress Bar Pager',
+        url:  'grid/progress-bar-pager.html',
+        icon: 'progress-bar-pager.gif',
+        desc: 'An example of how to integrate the Progress Bar with the Paging Toolbar using a custom plugin.',
+        status: 'new'
+    },{
+        text: 'Sliding Pager',
+        url: 'grid/sliding-pager.html',
+        icon: 'slider-pager.gif',
+        desc: 'A demonstration on the integration of the Slider with the Paging Toolbar using a custom plugin.',
+        status: 'new'
+    },{
+        text: 'Grouping',
+        url: 'grid/grouping.html',
+        icon: 'grid-grouping.gif',
+        desc: 'A basic grouping grid showing collapsible data groups that can be customized via the "Group By" header menu option.'
+    },{
+        text: 'Grouping with Dynamic Summary',
+        url: 'grid/totals.html',
+        icon: 'grid-summary.gif',
+        desc: 'Advanced grouping grid that allows cell editing and includes custom dynamic summary calculations.',
+        status: 'new'
+    },{
+        text: 'Grouping with Remote Summary',
+        url: 'grid/totals-hybrid.html',
+        icon: 'grid-summary.gif',
+        desc: 'Advanced grouping grid that allows cell editing and includes remotely loaded dynamic summary calculations.'
+    },{
+        text: 'Grid Plugins',
+        url: 'grid/grid-plugins.html',
+        icon: 'grid-plugins.gif',
+        desc: 'Multiple grids customized via plugins: expander rows, checkbox selection and row numbering.'
+    }/*,{
+        text: 'Grid Filtering',
+        url: 'grid-filtering/grid-filter.html',
+        icon: 'grid-filter.gif',
+        desc: 'Grid plugins providing custom data filtering menus that support various data types.'
+    }*/,{
+        text: 'Grid From Markup',
+        url: 'grid/from-markup.html',
+        icon: 'grid-from-markup.gif',
+        desc: 'Custom GridPanel extension that can convert a plain HTML table into a dynamic grid at runtime.'
+    },{
+        text: 'Grid Data Binding (basic)',
+        url: 'grid/binding.html',
+        icon: 'grid-data-binding.gif',
+        desc: 'Data binding a grid to a detail preview panel via the grid\'s RowSelectionModel.'
+    },{
+        text: 'Grid Data Binding (advanced)',
+        url: 'grid/binding-with-classes.html',
+        icon: 'grid-data-binding.gif',
+        desc: 'Refactoring the basic data binding example to use a class-based application design model.'
+    },{
+        text: 'Buffered GridView',
+        url: 'grid/buffer.html',
+        icon: 'grid-buffer.gif',
+        desc: 'GridView optimized for performance by rendering only visible rows.',
+        status: 'new'
+    }, {
+        text: 'Editable Grid with Writable Store',
+        url: 'writer/writer.html',
+        icon: 'writer-thumb.gif',
+        desc: 'This Store uses JsonWriter to automatically generate CRUD requests to the server through a standard HttpProxy.',
+        status: 'new'
+    }, {
+        text: 'RESTful Store with GridPanel and RowEditor',
+        url: 'restful/restful.html',
+        icon: 'restful-thumb.gif',
+        desc: 'A RESTful Store with JsonWriter which automatically generates CRUD requests to the server.',
+        status: 'new'
+    }]
+},{
+    title: 'Tabs',
+    samples: [{
+        text: 'Basic Tabs',
+        url: 'tabs/tabs.html',
+        icon: 'tabs.gif',
+        desc: 'Basic tab functionality including autoHeight, tabs from markup, Ajax loading and tab events.'
+    },{
+        text: 'TabPanel Scroller Menu',
+        url: 'tabs/tab-scroller-menu.html',
+        icon: 'tab-panel-scroller-menu.gif',
+        desc: 'An example of an overflow menu that appears to the right of the TabPanel tab strip',
+        status: 'new'
+    },{
+        text: 'Advanced Tabs',
+        url: 'tabs/tabs-adv.html',
+        icon: 'tabs-adv.gif',
+        desc: 'Advanced tab features including tab scrolling, adding tabs programmatically and a context menu plugin.'
+    },{
+        text: 'Group Tabs',
+        url: 'grouptabs/grouptabs.html',
+        icon: 'group-tabs.gif',
+        desc: 'A custom example on how to setup tab grouping using vertical tabs.',
+        status: 'new'
+    }]
+},{
+    title: 'Charts',
+    samples: [{
+        text: 'Charts',
+        url: 'chart/charts.html',
+        icon: 'charts.gif',
+        desc: 'A sampling of several chart styles',
+        status: 'new'
+    },{
+        text: 'Pie Chart',
+        url: 'chart/pie-chart.html',
+        icon: 'chart-pie.gif',
+        desc: 'An example of a pie chart',
+        status: 'new'
+    },{
+        text: 'Stacked Bar Chart',
+        url: 'chart/stacked-bar-chart.html',
+        icon: 'chart-stacked.gif',
+        desc: 'An example of a stacked bar chart',
+        status: 'new'
+    },{
+        text: 'Reloaded Chart',
+        url: 'chart/reload-chart.html',
+        icon: 'chart-reload.gif',
+        desc: 'An example demonstrating chart data reloading',
+        status: 'new'
+    }]
+},{
+    title: 'Windows',
+    samples: [{
+        text: 'Hello World',
+        url: 'window/hello.html',
+        icon: 'window.gif',
+        desc: 'Simple "Hello World" window that contains a basic TabPanel.'
+    },{
+        text: 'MessageBox',
+        url: 'message-box/msg-box.html',
+        icon: 'msg-box.gif',
+        desc: 'Different styles include confirm, alert, prompt, progress and wait and also support custom icons.'
+    },{
+        text: 'Layout Window',
+        url: 'window/layout.html',
+        icon: 'window-layout.gif',
+        desc: 'A window containing a basic BorderLayout with nested TabPanel.'
+    }]
+},{
+    title: 'Trees',
+    samples: [{
+        text: 'Drag and Drop Reordering',
+        url: 'tree/reorder.html',
+        icon: 'tree-reorder.gif',
+        desc: 'A TreePanel loaded asynchronously via a JSON TreeLoader that shows drag and drop with container scroll.'
+    },{
+        text: 'Multiple trees',
+        url: 'tree/two-trees.html',
+        icon: 'tree-two.gif',
+        desc: 'Drag and drop between two different sorted TreePanels.'
+    },{
+        text: 'Column Tree',
+        url: 'tree/column-tree.html',
+        icon: 'tree-columns.gif',
+        desc: 'A custom TreePanel implementation that demonstrates extending an existing component.'
+    },{
+        text: 'Check Tree',
+        url: 'tree/check-tree.html',
+        icon: 'tree-check.gif',
+        desc: 'An example showing simple checkbox selection in a tree.',
+        status: 'new'
+    },{
+        text: 'XML Tree Loader',
+        url: 'tree/xml-tree-loader.html',
+        icon: 'tree-xml-loader.gif',
+        desc: 'A custom TreeLoader implementation that demonstrates loading a tree from an XML document.'
+    }]
+},{
+    title: 'Layout Managers',
+    samples: [{
+        text: 'Layout Browser',
+        url:  'layout-browser/layout-browser.html',
+        icon: 'layout-browser.gif',
+        desc: 'Comprehensive showcase of the standard layout managers as well as several custom and combination layouts and combination examples.',
+        status: 'updated'
+    },{
+        text: 'Border Layout',
+        url:  'layout/complex.html',
+        icon: 'border-layout.gif',
+        desc: 'A complex BorderLayout implementation that shows nesting multiple components and sub-layouts.'
+    },{
+        text: 'Accordion Layout',
+        url:  'layout/accordion.html',
+        icon: 'layout-accordion.gif',
+        desc: 'A basic accordion layout within a border layout.'
+    },{
+        text: 'Absolute Layout (Form)',
+        url:  'form/absform.html',
+        icon: 'layout-absolute.gif',
+        desc: 'A simple example of form fields utilizing an absolute layout in a window for flexible form resizing.'
+    },{
+        text: 'Anchor Layout (Form)',
+        url:  'form/anchoring.html',
+        icon: 'layout-form.gif',
+        desc: 'A simple example of form fields utilizing an anchor layout in a window for flexible form resizing.'
+    },{
+        text: 'Anchor Layout (Panel)',
+        url:  'layout/anchor.html',
+        icon: 'layout-anchor.gif',
+        desc: 'An example of Panels anchored in the browser window.'
+    },{
+        text: 'Column Layout',
+        url:  'layout/column.html',
+        icon: 'layout-column.gif',
+        desc: 'An example of Panels managed by a column layout.'
+    },{
+        text: 'Table Layout',
+        url:  'layout/table.html',
+        icon: 'layout-table.gif',
+        desc: 'An example of Panels managed by a table layout.'
+    },{
+        text: 'HBox Layout',
+        url:  'layout/hbox.html',
+        icon: 'layout-column.gif',
+        desc: 'Interactive layout illustrating the capabilities of the HBox Layout.',
+        status: 'new'
+    },{
+        text: 'VBox Layout',
+        url:  'layout/vbox.html',
+        icon: 'blank.gif',
+        desc: 'Interactive layout illustrating the capabilities of the VBox Layout.',
+        status: 'new'
+    },{
+        text: 'Portal Demo',
+        url:  'portal/portal.html',
+        icon: 'portal.gif',
+        desc: 'A page layout using several custom extensions to provide a web portal interface.'
+    }]
+},{
+    title: 'ComboBox',
+    samples: [{
+        text: 'Basic ComboBox',
+        url: 'form/combos.html',
+        icon: 'combo.gif',
+        desc: 'Basic combos, combos rendered from markup and customized list layout to provide item tooltips.'
+    },{
+        text: 'ComboBox Templates',
+        url: 'form/forum-search.html',
+        icon: 'combo-custom.gif',
+        desc: 'Customized combo with template-based list rendering, remote loading and paging.'
+    }]
+},{
+    title: 'Forms',
+    samples: [{
+        text: 'Dynamic Forms',
+        url: 'form/dynamic.html',
+        icon: 'form-dynamic.gif',
+        desc: 'Various example forms showing collapsible fieldsets, column layout, nested TabPanels and more.'
+    },{
+        text: 'Ajax with XML Forms',
+        url: 'form/xml-form.html',
+        icon: 'form-xml.gif',
+        desc: 'Ajax-loaded form fields from remote XML data and remote field validation on submit.'
+    },{
+        text: 'Custom Search Fields',
+        url: 'form/custom.html',
+        icon: 'form-custom.gif',
+        desc: 'A TriggerField search extension combined with an XTemplate for custom results rendering.'
+    },{
+        text: 'Binding a Grid to a Form',
+        url:  'form/form-grid.html',
+        icon: 'form-grid-binding.gif',
+        desc: 'A grid embedded within a FormPanel that automatically loads records into the form on row selection.'
+    },{
+        text: 'Advanced Validation',
+        url:  'form/adv-vtypes.html',
+        icon: 'form-adv-vtypes.gif',
+        desc: 'Relational form field validation using custom vtypes.'
+    },{
+        text: 'Checkbox/Radio Groups',
+        url:  'form/check-radio.html',
+        icon: 'form-check-radio.gif',
+        desc: 'Many examples showing different checkbox and radio group configurations.'
+    },{
+        text: 'File Upload Field',
+        url:  'form/file-upload.html',
+        icon: 'form-file-upload.gif',
+        desc: 'A demo of how to give standard file upload fields a bit of Ext style using a custom class.'
+    },{
+        text: 'Spinner Field',
+        url:  'spinner/spinner.html',
+        icon: 'form-spinner.gif',
+        desc: 'An example of a custom spinner widget.',
+        status: 'new'
+    },{
+        text: 'MultiSelect and ItemSelector',
+        url:  'multiselect/multiselect-demo.html',
+        icon: 'form-multiselect.gif',
+        desc: 'Example controls for selecting a list of items in forms.'
+    }]
+},{
+    title: 'Toolbars and Menus',
+    samples: [{
+        text: 'Basic Toolbar',
+        url:  'menu/menus.html',
+        icon: 'toolbar.gif',
+        desc: 'Toolbar and menus that contain various components like date pickers, color pickers, sub-menus and more.',
+        status: 'updated'
+    },{
+        text: 'Toolbar Overflow',
+        url:  'toolbar/overflow.html',
+        icon: 'toolbar-overflow.gif',
+        desc: 'Dynamic overflow of toolbar buttons into an Ext.menu.',
+        status: 'new'
+    },{
+        text: 'Toolbar Button Groups',
+        url:  'toolbar/toolbars.html',
+        icon: 'toolbar-button-groups.gif',
+        desc: 'Group buttons together in the toolbar.',
+        status: 'new'
+    },{
+        text: 'Ext Actions',
+        url:  'menu/actions.html',
+        icon: 'toolbar-actions.gif',
+        desc: 'Bind the same behavior to multiple buttons, toolbar and menu items using the Ext.Action class.'
+    },{
+        text: 'Status Bar',
+        url:  'statusbar/statusbar-demo.html',
+        icon: 'statusbar-demo.gif',
+        desc: 'A simple StatusBar that can be dropped into the bottom of any panel to display status text and icons.',
+        status: 'modified'
+    },{
+        text: 'Status Bar (Advanced)',
+        url:  'statusbar/statusbar-advanced.html',
+        icon: 'statusbar-adv.gif',
+        desc: 'Customizing the StatusBar via a plugin to provide automatic form validation monitoring and error linking.',
+        status: 'modified'
+    }]
+},{
+    title: 'Templates and DataView',
+    samples: [{
+        text: 'Templates',
+        url: 'core/templates.html',
+        icon: 'templates.gif',
+        desc: 'A simple example of rendering views from templates bound to data objects.'
+    },{
+        text: 'DataView',
+        url: 'view/data-view.html',
+        icon: 'data-view.gif',
+        desc: 'A basic DataView with custom plugins for editable labels and drag selection of items.'
+    },{
+        text: 'DataView (advanced)',
+        url: 'view/chooser.html',
+        icon: 'chooser.gif',
+        desc: 'A more customized DataView supporting sorting and filtering with multiple templates.'
+    },{
+        text: 'ListView',
+        url: 'view/list-view.html',
+        icon: 'list-view.gif',
+        desc: 'A high performance tabular DataView to be used as a lightweight grid.',
+        status: 'new'
+    }]
+},{
+    title   : 'Drag and Drop',
+    samples :  [{
+        text : 'Grid to Grid Drag and Drop',
+        url  : 'dd/dnd_grid_to_grid.html',
+        icon : 'dd-gridtogrid.gif',
+        desc : 'A simple drag and drop from grid to grid implementation.'
+    },{
+        text : 'Grid to FormPanel Drag and Drop',
+        url  : 'dd/dnd_grid_to_formpanel.html',
+        icon : 'dd-gridtoformpanel.gif',
+        desc : 'A basic drag and drop from grid to formpanel.'
+    },{
+        text : 'Field to Grid Drag and Drop',
+        url  : 'dd/field-to-grid-dd.html',
+        icon : 'dd-fieldtogrid.gif',
+        desc : 'Drag from a form field and drop on a grid.',
+        status: 'new'
+    },{
+        text : 'Custom Drag and Drop',
+        url  : 'dd/dragdropzones.html',
+        icon : 'dd-zones.gif',
+        desc : 'Enabling drag and drop between a DataView and a grid using DragZone and DropZone extensions.'
+    }]
+},{
+    title: 'Direct',
+    samples: [{
+        text: 'Direct',
+        url:  'direct/direct.php',
+        icon: 'direct.gif',
+        desc: 'An example demonstrating Remoting and Polling the server',
+        status: 'new'
+    },{
+        text: 'Direct Form',
+        url:  'direct/direct-form.php',
+        icon: 'direct.gif',
+        desc: 'Ext.Direct Remoting with a Form',
+        status: 'new'
+    },{
+        text: 'Direct TreeLoader',
+        url:  'direct/direct-tree.php',
+        icon: 'direct.gif',
+        desc: 'Ext.Direct Remoting with a Tree',
+        status: 'new'
+    }]
+},{
+    title: 'Miscellaneous',
+    samples: [{
+        text: 'History',
+        url: 'history/history.html',
+        icon: 'history.gif',
+        desc: 'A History manager that allows the user to navigate an Ext UI via browser back/forward.'
+    },{
+        text: 'Google Maps',
+        url: 'window/gmap.html',
+        icon: 'gmap-panel.gif',
+        desc: 'A Google Maps wrapper class that enables easy display of dynamic maps in Ext panels and windows.'
+    },{
+        text: 'Slider',
+        url: 'slider/slider.html',
+        icon: 'slider.gif',
+        desc: 'A slider component that supports vertical mode, snapping, tooltips, customized styles and more.'
+    },{
+        text: 'QuickTips',
+        url: 'simple-widgets/qtips.html',
+        icon: 'qtips.gif',
+        desc: 'Various tooltip and quick tip configuration options including Ajax loading and mouse tracking.',
+        status: 'updated'
+    },{
+        text: 'Progress Bar',
+        url: 'simple-widgets/progress-bar.html',
+        icon: 'progress.gif',
+        desc: 'A basic progress bar component shown in various configurations and with custom styles.'
+    },{
+        text: 'Panels',
+        url: 'panel/panels.html',
+        icon: 'panel.gif',
+        desc: 'A basic collapsible panel example.',
+        status: 'updated'
+    },{
+        text: 'Bubble Panel',
+        url: 'panel/bubble-panel.html',
+        icon: 'panel-bubble.gif',
+        desc: 'An example illustrating customization of a standard panel.',
+        status: 'new'
+    },{
+        text: 'Resizable',
+        url: 'resizable/basic.html',
+        icon: 'resizable.gif',
+        desc: 'Examples of making any element resizable with various configuration options.'
+    },{
+        text: 'Spotlight',
+        url: 'core/spotlight.html',
+        icon: 'spotlight.gif',
+        desc: 'A utility for masking everything except a single element on the page to visually highlight it.',
+        status: 'new'
+    },{
+        text: 'Buttons',
+        url: 'button/buttons.html',
+        icon: 'buttons.gif',
+        desc: '',
+        status: 'new'
+    },{
+        text: 'Debugging Console',
+        url: 'debug/debug-console.html',
+        icon: 'debug-console.gif',
+        desc: '',
+        status: 'new'
+    },{
+        text: 'Localization (static)',
+        url: 'locale/dutch-form.html',
+        icon: 'locale-dutch.gif',
+        desc: 'Demonstrates fully localizing a form by including a custom locale script.'
+    },{
+        text: 'Localization (dynamic)',
+        url: 'locale/multi-lang.html',
+        icon: 'locale-switch.gif',
+        desc: 'Dynamically render various Ext components in different locales by selecting from a locale list.'
+    }]
+}];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.html	(revision 625)
@@ -0,0 +1,25 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Grid to FormPanel Drag and Drop Example</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+<script type="text/javascript" src="../../ext-all-debug.js"></script>
+<script type="text/javascript" src="../shared/code-display.js"></script>
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+<script type="text/javascript" src="dnd_grid_to_formpanel.js"></script>
+
+    
+<body>
+
+
+<h1>Drag and Drop from a Data Grid to a Form Panel</h1>
+<p>This example shows how to setup a one way drag and drop from a grid to an instance of an Ext.form.FormPanel.</p>    
+<p>Note that the js is not minified so it is readable. See <a href="dnd_grid_to_formpanel.js">dnd_grid_to_formpanel.js</a>.</p>
+<div id="panel"></div>
+
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_formpanel.js	(revision 625)
@@ -0,0 +1,159 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var myData = {
+		records : [
+			{ name : "Record 0", column1 : "0", column2 : "0" },
+			{ name : "Record 1", column1 : "1", column2 : "1" },
+			{ name : "Record 2", column1 : "2", column2 : "2" },
+			{ name : "Record 3", column1 : "3", column2 : "3" },
+			{ name : "Record 4", column1 : "4", column2 : "4" },
+			{ name : "Record 5", column1 : "5", column2 : "5" },
+			{ name : "Record 6", column1 : "6", column2 : "6" },
+			{ name : "Record 7", column1 : "7", column2 : "7" },
+			{ name : "Record 8", column1 : "8", column2 : "8" },
+			{ name : "Record 9", column1 : "9", column2 : "9" }
+		]
+	};
+
+
+	// Generic fields array to use in both store defs.
+	var fields = [
+	   {name: 'name', mapping : 'name'},
+	   {name: 'column1', mapping : 'column1'},
+	   {name: 'column2', mapping : 'column2'}
+	];
+
+    // create the data store
+    var gridStore = new Ext.data.JsonStore({
+        fields : fields,
+		data   : myData,
+		root   : 'records'
+    });
+
+
+	// Column Model shortcut array
+	var cols = [
+		{ id : 'name', header: "Record Name", width: 160, sortable: true, dataIndex: 'name'},
+		{header: "column1", width: 50, sortable: true, dataIndex: 'column1'},
+		{header: "column2", width: 50, sortable: true, dataIndex: 'column2'}
+	];
+
+	// declare the source Grid
+    var grid = new Ext.grid.GridPanel({
+		ddGroup          : 'gridDDGroup',
+        store            : gridStore,
+        columns          : cols,
+		enableDragDrop   : true,
+        stripeRows       : true,
+        autoExpandColumn : 'name',
+        width            : 325,
+		region           : 'west',
+        title            : 'Data Grid',
+		selModel         : new Ext.grid.RowSelectionModel({singleSelect : true})
+    });
+
+
+
+	// Declare the text fields.  This could have been done inline, is easier to read
+	// for folks learning :)
+	var textField1 = new Ext.form.TextField({
+		fieldLabel : 'Record Name',
+		name       : 'name'
+	});
+
+
+	var textField2 = new Ext.form.TextField({
+		fieldLabel : 'Column 1',
+		name       : 'column1'
+	});
+
+
+	var textField3 = new Ext.form.TextField({
+		fieldLabel : 'Column 2',
+		name       : 'column2'
+	});
+
+
+	// Setup the form panel
+	var formPanel = new Ext.form.FormPanel({
+		region     : 'center',
+		title      : 'Generic Form Panel',
+		bodyStyle  : 'padding: 10px; background-color: #DFE8F6',
+		labelWidth : 100,
+		width      : 325,
+		items      : [
+			textField1,
+			textField2,
+			textField3
+		]
+	});
+
+
+
+	//Simple 'border layout' panel to house both grids
+	var displayPanel = new Ext.Panel({
+		width    : 650,
+		height   : 300,
+		layout   : 'border',
+		renderTo : 'panel',
+		items    : [
+			grid,
+			formPanel
+		],
+		bbar    : [
+			'->', // Fill
+			{
+				text    : 'Reset Example',
+				handler : function() {
+					//refresh source grid
+					gridStore.loadData(myData);
+					formPanel.getForm().reset();
+				}
+			}
+		]
+	});
+
+
+	// used to add records to the destination stores
+	var blankRecord =  Ext.data.Record.create(fields);
+
+	/****
+	* Setup Drop Targets
+	***/
+
+	// This will make sure we only drop to the view container
+	var formPanelDropTargetEl =  formPanel.body.dom;
+
+	var formPanelDropTarget = new Ext.dd.DropTarget(formPanelDropTargetEl, {
+		ddGroup     : 'gridDDGroup',
+		notifyEnter : function(ddSource, e, data) {
+
+			//Add some flare to invite drop.
+			formPanel.body.stopFx();
+			formPanel.body.highlight();
+		},
+		notifyDrop  : function(ddSource, e, data){
+
+			// Reference the record (single selection) for readability
+			var selectedRecord = ddSource.dragData.selections[0];
+
+
+			// Load the record into the form
+			formPanel.getForm().loadRecord(selectedRecord);
+
+
+			// Delete record from the grid.  not really required.
+			ddSource.grid.store.remove(selectedRecord);
+
+			return(true);
+		}
+	});
+
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.html	(revision 625)
@@ -0,0 +1,22 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Grid to Grid Drag and Drop Example</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+<script type="text/javascript" src="../../ext-all-debug.js"></script>
+<script type="text/javascript" src="../shared/code-display.js"></script>
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+<script type="text/javascript" src="dnd_grid_to_grid.js"></script>
+
+</head>
+<body>
+
+<h1>Drag and Drop from Grid to Grid Example</h1>
+<p>This example shows how to setup two way drag and drop from one GridPanel to another.</p>    
+<p>Note that the js is not minified so it is readable. See <a href="dnd_grid_to_grid.js">dnd_grid_to_grid.js</a>.</p>
+<div id="panel"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dnd_grid_to_grid.js	(revision 625)
@@ -0,0 +1,169 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var myData = {
+		records : [
+			{ name : "Rec 0", column1 : "0", column2 : "0" },
+			{ name : "Rec 1", column1 : "1", column2 : "1" },
+			{ name : "Rec 2", column1 : "2", column2 : "2" },
+			{ name : "Rec 3", column1 : "3", column2 : "3" },
+			{ name : "Rec 4", column1 : "4", column2 : "4" },
+			{ name : "Rec 5", column1 : "5", column2 : "5" },
+			{ name : "Rec 6", column1 : "6", column2 : "6" },
+			{ name : "Rec 7", column1 : "7", column2 : "7" },
+			{ name : "Rec 8", column1 : "8", column2 : "8" },
+			{ name : "Rec 9", column1 : "9", column2 : "9" }
+		]
+	};
+
+
+	// Generic fields array to use in both store defs.
+	var fields = [
+	   {name: 'name', mapping : 'name'},
+	   {name: 'column1', mapping : 'column1'},
+	   {name: 'column2', mapping : 'column2'}
+	];
+
+    // create the data store
+    var firstGridStore = new Ext.data.JsonStore({
+        fields : fields,
+		data   : myData,
+		root   : 'records'
+    });
+
+
+	// Column Model shortcut array
+	var cols = [
+		{ id : 'name', header: "Record Name", width: 160, sortable: true, dataIndex: 'name'},
+		{header: "column1", width: 50, sortable: true, dataIndex: 'column1'},
+		{header: "column2", width: 50, sortable: true, dataIndex: 'column2'}
+	];
+
+	// declare the source Grid
+    var firstGrid = new Ext.grid.GridPanel({
+	ddGroup          : 'secondGridDDGroup',
+        store            : firstGridStore,
+        columns          : cols,
+	enableDragDrop   : true,
+        stripeRows       : true,
+        autoExpandColumn : 'name',
+        width            : 325,
+	region           : 'west',
+        title            : 'First Grid'
+    });
+
+    var secondGridStore = new Ext.data.JsonStore({
+        fields : fields,
+		root   : 'records'
+    });
+
+    // create the destination Grid
+    var secondGrid = new Ext.grid.GridPanel({
+	ddGroup          : 'firstGridDDGroup',
+        store            : secondGridStore,
+        columns          : cols,
+	enableDragDrop   : true,
+        stripeRows       : true,
+        autoExpandColumn : 'name',
+        width            : 325,
+	region           : 'center',
+        title            : 'Second Grid'
+    });
+
+
+	//Simple 'border layout' panel to house both grids
+	var displayPanel = new Ext.Panel({
+		width    : 650,
+		height   : 300,
+		layout   : 'border',
+		renderTo : 'panel',
+		items    : [
+			firstGrid,
+			secondGrid
+		],
+		bbar    : [
+			'->', // Fill
+			{
+				text    : 'Reset both grids',
+				handler : function() {
+					//refresh source grid
+					firstGridStore.loadData(myData);
+
+					//purge destination grid
+					secondGridStore.removeAll();
+				}
+			}
+		]
+	});
+
+	// used to add records to the destination stores
+	var blankRecord =  Ext.data.Record.create(fields);
+
+	/****
+	* Setup Drop Targets
+	***/
+	// This will make sure we only drop to the view container
+	var firstGridDropTargetEl =  firstGrid.getView().el.dom.childNodes[0].childNodes[1];
+	var firstGridDropTarget = new Ext.dd.DropTarget(firstGridDropTargetEl, {
+		ddGroup    : 'firstGridDDGroup',
+		copy       : true,
+		notifyDrop : function(ddSource, e, data){
+
+			// Generic function to add records.
+			function addRow(record, index, allItems) {
+
+				// Search for duplicates
+				var foundItem = firstGridStore.findExact('name', record.data.name);
+				// if not found
+				if (foundItem  == -1) {
+					firstGridStore.add(record);
+
+					// Call a sort dynamically
+					firstGridStore.sort('name', 'ASC');
+
+					//Remove Record from the source
+					ddSource.grid.store.remove(record);
+				}
+			}
+
+			// Loop through the selections
+			Ext.each(ddSource.dragData.selections ,addRow);
+			return(true);
+		}
+	});
+
+
+	// This will make sure we only drop to the view container
+	var secondGridDropTargetEl = secondGrid.getView().el.dom.childNodes[0].childNodes[1]
+
+	var destGridDropTarget = new Ext.dd.DropTarget(secondGridDropTargetEl, {
+		ddGroup    : 'secondGridDDGroup',
+		copy       : false,
+		notifyDrop : function(ddSource, e, data){
+
+			// Generic function to add records.
+			function addRow(record, index, allItems) {
+
+				// Search for duplicates
+				var foundItem = secondGridStore.findExact('name', record.data.name);
+				// if not found
+				if (foundItem  == -1) {
+					secondGridStore.add(record);
+					// Call a sort dynamically
+					secondGridStore.sort('name', 'ASC');
+
+					//Remove Record from the source
+					ddSource.grid.store.remove(record);
+				}
+			}
+			// Loop through the selections
+			Ext.each(ddSource.dragData.selections ,addRow);
+			return(true);
+		}
+	});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.html	(revision 625)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+<script type="text/javascript" src="../../ext-all-debug.js"></script>
+<script type="text/javascript" src="../code-display.js"></script>
+<script type="text/javascript" src="dragdropzones.js"></script>
+<style type="text/css">
+.app-header .x-panel-body {
+    background-color: #99BBE8;
+}
+
+.app-header h1 {
+    font-family: verdana,arial,sans-serif;
+    font-size: 20px;
+}
+
+.hospital-target {
+    border: 1px solid red;
+    width: 400ps;
+    height: 30px;
+}
+
+.hospital-target.hospital-target-hover {
+    background-color: #D88;
+}
+
+.patient-source {
+    cursor: pointer;
+}
+
+.patient-view td {
+    font-family: verdana,arial,sans-serif;
+    font-size: 12px;
+}
+
+td.patient-label {
+    background-color: #ddd;
+    border: 1px solid #bbb;
+    font-weight: bold;
+    text-align: right;
+    width: 100px;
+    padding: 0px 3px 0px 0px;
+}
+</style>
+<title>Ext Drag/Drop</title>
+</head>
+<body>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/dragdropzones.js	(revision 625)
@@ -0,0 +1,280 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function() {
+
+    var patients = [{
+        insuranceCode: '11111',
+        name: 'Fred Bloggs',
+        address: 'Main Street',
+        telephone: '555 1234 123'
+    }, {
+        insuranceCode: '22222',
+        name: 'Fred West',
+        address: 'Cromwell Street',
+        telephone: '666 666 666'
+    }, {
+        insuranceCode: '33333',
+        name: 'Fred Mercury',
+        address: 'Over The Rainbow',
+        telephone: '555 321 0987'
+    }, {
+        insuranceCode: '44444',
+        name: 'Fred Forsyth',
+        address: 'Blimp Street',
+        telephone: '555 111 2222'
+    }, {
+        insuranceCode: '55555',
+        name: 'Fred Douglass',
+        address: 'Talbot County, Maryland',
+        telephone: 'N/A'
+    }];
+
+    var PatientRecord = Ext.data.Record.create([{
+        name: 'name'
+    }, {
+        name: 'address'
+    }, {
+        name: 'telephone'
+    }]);
+
+    var patientStore = new Ext.data.Store({
+        data: patients,
+        reader: new Ext.data.JsonReader({
+            id: 'insuranceCode'
+        }, PatientRecord)
+    });
+
+    var hospitals = [{
+        code: 'AAAAA',
+        name: 'Saint Thomas',
+        address: 'Westminster Bridge Road, SE1 7EH',
+        telephone: '020 7188 7188'
+    }, {
+        code: 'BBBBB',
+        name: 'Queen\'s Medical Centre',
+        address: 'Derby Road, NG7 2UH',
+        telephone: '0115 924 9924'
+    }, {
+        code: 'CCCCC',
+        name: 'Saint Bartholomew',
+        address: 'West Smithfield, EC1A 7BE',
+        telephone: '020 7377 7000'
+    }, {
+        code: 'DDDDD',
+        name: 'Royal London',
+        address: 'Whitechapel, E1 1BB',
+        telephone: '020 7377 7000'
+    }];
+    
+    var HospitalRecord = Ext.data.Record.create([{
+        name: 'name'
+    }, {
+        name: 'address'
+    }, {
+        name: 'telephone'
+    }]);
+
+    var hospitalStore = new Ext.data.Store({
+        data: hospitals,
+        reader: new Ext.data.JsonReader({
+            id: 'code'
+        }, HospitalRecord)
+    });
+    
+    var patientView = new Ext.DataView({
+        cls: 'patient-view',
+        tpl: '<tpl for=".">' +
+                '<div class="patient-source"><table><tbody>' +
+                    '<tr><td class="patient-label">Name</td><td class="patient-name">{name}</td></tr>' +
+                    '<tr><td class="patient-label">Address</td><td class="patient-name">{address}</td></tr>' +
+                    '<tr><td class="patient-label">Telephone</td><td class="patient-name">{telephone}</td></tr>' +
+                '</tbody></table></div>' +
+             '</tpl>',
+        itemSelector: 'div.patient-source',
+        store: patientStore,
+        listeners: {
+            render: initializePatientDragZone
+        }
+    });
+
+    var helpWindow = new Ext.Window({
+        title: 'Source code',
+        width: 920,
+        height: 500,
+        closeAction: 'hide',
+        bodyCfg: {tag: 'textarea', readonly: true},
+        bodyStyle: {
+            backgroundColor: 'white',
+            margin: '0px',
+            border: '0px none'
+        },
+        listeners: {
+            render: function(w) {
+                Ext.Ajax.request({
+                    url: 'dragdropzones.js',
+                    success: function(r) {
+                        w.body.dom.value = r.responseText;
+                    }
+                });
+            }
+        }
+    });
+
+    var hospitalGrid = new Ext.grid.GridPanel({
+        title: 'Hospitals',
+        region: 'center',
+        margins: '0 5 5 0',
+        bbar: [{
+            text: 'View Source',
+            handler: function() {
+                helpWindow.show();
+            }
+        }],
+        columns: [{
+            dataIndex: 'name',
+            header: 'Name',
+            width: 200
+        }, {
+            dataIndex: 'address',
+            header: 'Address',
+            width: 300
+        }, {
+            dataIndex: 'telephone',
+            header: 'Telephone',
+            width: 100
+        }],
+        viewConfig: {
+            tpl: new Ext.XTemplate('<div class="hospital-target"></div>'),
+            enableRowBody: true,
+            getRowClass: function(rec, idx, p, store) {
+                p.body = this.tpl.apply(rec.data);
+            }
+        },
+        store: hospitalStore,
+        listeners: {
+            render: initializeHospitalDropZone
+        }
+    });
+
+    new Ext.Viewport({
+        layout: 'border',
+        items: [{
+            cls: 'app-header',
+            region: 'north',
+            height: 100,
+            html: '<h1>Patient Hospital Assignment</h1>',
+            margins: '5 5 5 5'
+        }, {
+            title: 'Patients',
+            region: 'west',
+            width: 300,
+            margins: '0 5 5 5',
+            items: patientView
+        }, hospitalGrid ]
+    });
+});
+
+/*
+ * Here is where we "activate" the DataView.
+ * We have decided that each node with the class "patient-source" encapsulates a single draggable
+ * object.
+ *
+ * So we inject code into the DragZone which, when passed a mousedown event, interrogates
+ * the event to see if it was within an element with the class "patient-source". If so, we
+ * return non-null drag data.
+ *
+ * Returning non-null drag data indicates that the mousedown event has begun a dragging process.
+ * The data must contain a property called "ddel" which is a DOM element which provides an image
+ * of the data being dragged. The actual node clicked on is not dragged, a proxy element is dragged.
+ * We can insert any other data into the data object, and this will be used by a cooperating DropZone
+ * to perform the drop operation.
+ */
+function initializePatientDragZone(v) {
+    v.dragZone = new Ext.dd.DragZone(v.getEl(), {
+
+//      On receipt of a mousedown event, see if it is within a draggable element.
+//      Return a drag data object if so. The data object can contain arbitrary application
+//      data, but it should also contain a DOM element in the ddel property to provide
+//      a proxy to drag.
+        getDragData: function(e) {
+            var sourceEl = e.getTarget(v.itemSelector, 10);
+            if (sourceEl) {
+                d = sourceEl.cloneNode(true);
+                d.id = Ext.id();
+                return v.dragData = {
+                    sourceEl: sourceEl,
+                    repairXY: Ext.fly(sourceEl).getXY(),
+                    ddel: d,
+                    patientData: v.getRecord(sourceEl).data
+                }
+            }
+        },
+
+//      Provide coordinates for the proxy to slide back to on failed drag.
+//      This is the original XY coordinates of the draggable element.
+        getRepairXY: function() {
+            return this.dragData.repairXY;
+        }
+    });
+}
+
+/*
+ * Here is where we "activate" the GridPanel.
+ * We have decided that the element with class "hospital-target" is the element which can receieve
+ * drop gestures. So we inject a method "getTargetFromEvent" into the DropZone. This is constantly called
+ * while the mouse is moving over the DropZone, and it returns the target DOM element if it detects that
+ * the mouse if over an element which can receieve drop gestures.
+ *
+ * Once the DropZone has been informed by getTargetFromEvent that it is over a target, it will then
+ * call several "onNodeXXXX" methods at various points. These include:
+ *
+ * onNodeEnter
+ * onNodeOut
+ * onNodeOver
+ * onNodeDrop
+ *
+ * We provide implementations of each of these to provide behaviour for these events.
+ */
+function initializeHospitalDropZone(g) {
+    g.dropZone = new Ext.dd.DropZone(g.getView().scroller, {
+
+//      If the mouse is over a target node, return that node. This is
+//      provided as the "target" parameter in all "onNodeXXXX" node event handling functions
+        getTargetFromEvent: function(e) {
+            return e.getTarget('.hospital-target');
+        },
+
+//      On entry into a target node, highlight that node.
+        onNodeEnter : function(target, dd, e, data){ 
+            Ext.fly(target).addClass('hospital-target-hover');
+        },
+
+//      On exit from a target node, unhighlight that node.
+        onNodeOut : function(target, dd, e, data){ 
+            Ext.fly(target).removeClass('hospital-target-hover');
+        },
+
+//      While over a target node, return the default drop allowed class which
+//      places a "tick" icon into the drag proxy.
+        onNodeOver : function(target, dd, e, data){ 
+            return Ext.dd.DropZone.prototype.dropAllowed;
+        },
+
+//      On node drop, we can interrogate the target node to find the underlying
+//      application object that is the real target of the dragged data.
+//      In this case, it is a Record in the GridPanel's Store.
+//      We can use the data set up by the DragZone's getDragData method to read
+//      any data we decided to attach.
+        onNodeDrop : function(target, dd, e, data){
+            var rowIndex = g.getView().findRowIndex(target);
+            var h = g.getStore().getAt(rowIndex);
+            Ext.Msg.alert('Drop gesture', 'Dropped patient ' + data.patientData.name +
+                ' on hospital ' + h.data.name);
+            return true;
+        }
+    });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.html	(revision 625)
@@ -0,0 +1,34 @@
+<html>
+<head>
+<title>Array Grid DropZone Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+
+    <script type="text/javascript" src="field-to-grid-dd.js"></script>
+    <script type="text/javascript" src="../code-display.js"></script>
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+<style type="text/css">
+.x-drop-target-active {
+	background-color: #D88;
+}
+</style>
+</head>
+<body>
+<h1>Using a GridPanel as a DropZone managing each grid cell as a target</h1>
+<p>This example assumes prior knowledge of using a GridPanel.</p>
+<p>This illustrates how a DragZone can manage an arbitrary number of drag sources, and
+how a DropZone can manage an arbitrary number of targets.</p>
+<p>Note that the js is not minified so it is readable. See <a href="field-to-grid-dd.js">field-to-grid-dd.js</a>.</p>
+<div id="grid-example"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/dd/field-to-grid-dd.js	(revision 625)
@@ -0,0 +1,316 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// A DropZone which cooperates with DragZones whose dragData contains
+// a "field" property representing a form Field. Fields may be dropped onto
+// grid data cells containing a matching data type.
+Ext.ux.CellFieldDropZone = Ext.extend(Ext.dd.DropZone, {
+    constructor: function(){},
+
+//  Call the DropZone constructor using the View's scrolling element
+//  only after the grid has been rendered.
+    init: function(grid) {
+        if (grid.rendered) {
+            this.grid = grid;
+            this.view = grid.getView();
+            this.store = grid.getStore();
+            Ext.ux.CellFieldDropZone.superclass.constructor.call(this, this.view.scroller);
+        } else {
+            grid.on('render', this.init, this);
+        }
+    },
+
+//  Scroll the main configured Element when we drag close to the edge
+    containerScroll: true,
+
+    getTargetFromEvent: function(e) {
+//      Ascertain whether the mousemove is within a grid cell
+        var t = e.getTarget(this.view.cellSelector);
+        if (t) {
+
+//          We *are* within a grid cell, so ask the View exactly which one,
+//          Extract data from the Model to create a target object for
+//          processing in subsequent onNodeXXXX methods. Note that the target does
+//          not have to be a DOM element. It can be whatever the noNodeXXX methods are
+//          programmed to expect.
+            var rowIndex = this.view.findRowIndex(t);
+            var columnIndex = this.view.findCellIndex(t);
+            if ((rowIndex !== false) && (columnIndex !== false)) {
+                return {
+                    node: t,
+                    record: this.store.getAt(rowIndex),
+                    fieldName: this.grid.getColumnModel().getDataIndex(columnIndex)
+                }
+            }
+        }
+    },
+
+//  On Node enter, see if it is valid for us to drop the field on that type of column.
+    onNodeEnter: function(target, dd, e, dragData) {
+        delete this.dropOK;
+        if (!target) {
+            return;
+        }
+
+//      Check that a field is being dragged.
+        var f = dragData.field;
+        if (!f) {
+            return;
+        }
+
+//      Check whether the data type of the column being dropped on accepts the
+//      dragged field type. If so, set dropOK flag, and highlight the target node.
+        var type = target.record.fields.get(target.fieldName).type;
+        switch (type) {
+            case 'float':
+            case 'int':
+                if (!f.isXType('numberfield')) {
+                    return;
+                }
+                break;
+            case 'date':
+                if (!f.isXType('datefield')) {
+                    return;
+                }
+                break;
+            case 'boolean':
+                if (!f.isXType('checkbox')) {
+                    return;
+                }
+        }
+        this.dropOK = true;
+        Ext.fly(target.node).addClass('x-drop-target-active');
+    },
+
+//  Return the class name to add to the drag proxy. This provides a visual indication
+//  of drop allowed or not allowed.
+    onNodeOver: function(target, dd, e, dragData) {
+        return this.dropOK ? this.dropAllowed : this.dropNotAllowed;
+    },
+
+//   nhighlight the target node.
+    onNodeOut: function(target, dd, e, dragData) {
+        Ext.fly(target.node).removeClass('x-drop-target-active');
+    },
+
+//  Process the drop event if we have previously ascertained that a drop is OK.
+    onNodeDrop: function(target, dd, e, dragData) {
+        if (this.dropOK) {
+            target.record.set(target.fieldName, dragData.field.getValue());
+            return true;
+        }
+    }
+});
+
+//  A class which makes Fields within a Panel draggable.
+//  the dragData delivered to a coooperating DropZone's methods contains
+//  the dragged Field in the property "field".
+Ext.ux.PanelFieldDragZone = Ext.extend(Ext.dd.DragZone, {
+    constructor: function(){},
+
+//  Call the DRagZone's constructor. The Panel must have been rendered.
+    init: function(panel) {
+        if (panel.nodeType) {
+            Ext.ux.PanelFieldDragZone.superclass.init.apply(this, arguments);
+        } else {
+            if (panel.rendered) {
+                Ext.ux.PanelFieldDragZone.superclass.constructor.call(this, panel.getEl());
+                var i = Ext.fly(panel.getEl()).select('input');
+                i.unselectable();
+            } else {
+                panel.on('afterlayout', this.init, this, {single: true});
+            }
+        }
+    },
+
+    scroll: false,
+
+//  On mousedown, we ascertain whether it is on one of our draggable Fields.
+//  If so, we collect data about the draggable object, and return a drag data
+//  object which contains our own data, plus a "ddel" property which is a DOM
+//  node which provides a "view" of the dragged data.
+    getDragData: function(e) {
+        var t = e.getTarget('input');
+        if (t) {
+            e.stopEvent();
+
+//          Ugly code to "detach" the drag gesture from the input field.
+//          Without this, Opera never changes the mouseover target from the input field
+//          even when dragging outside of the field - it just keeps selecting.
+            if (Ext.isOpera) {
+                Ext.fly(t).on('mousemove', function(e1){
+                    t.style.visibility = 'hidden';
+                    (function(){
+                        t.style.visibility = '';
+                    }).defer(1);
+                }, null, {single:true});
+            }
+
+//          Get the data we are dragging: the Field
+//          create a ddel for the drag proxy to display
+            var f = Ext.getCmp(t.id);
+            var d = document.createElement('div');
+            d.className = 'x-form-text';
+            d.appendChild(document.createTextNode(t.value));
+            Ext.fly(d).setWidth(f.getEl().getWidth());
+            return {
+                field: f,
+                ddel: d
+            };
+        }
+    },
+
+//  The coordinates to slide the drag proxy back to on failed drop.
+    getRepairXY: function() {
+        return this.dragData.field.getEl().getXY();
+    }
+});
+
+Ext.onReady(function(){
+
+    var myData = [
+        ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+        ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+        ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+        ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+        ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+        ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+        ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+        ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+        ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+        ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+        ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+        ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+        ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+        ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+        ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+        ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+        ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+        ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+        ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+        ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+        ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+        ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+        ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+        ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+        ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+        ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+        ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+        ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+        ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+    ];
+
+    // example of custom renderer function
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+
+    // example of custom renderer function
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+
+    // create the data store
+    var store = new Ext.data.ArrayStore({
+        fields: [
+           {name: 'company'},
+           {name: 'price', type: 'float'},
+           {name: 'change', type: 'float'},
+           {name: 'pctChange', type: 'float'},
+           {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+        ]
+    });
+    store.loadData(myData);
+    
+    var helpWindow = new Ext.Window({
+        title: 'Source code',
+        width: 920,
+        height: 500,
+        closeAction: 'hide',
+        bodyCfg: {tag: 'textarea', readonly: true},
+        bodyStyle: {
+            backgroundColor: 'white',
+            margin: '0px',
+            border: '0px none'
+        },
+        listeners: {
+            render: function(w) {
+                Ext.Ajax.request({
+                    url: 'field-to-grid-dd.js',
+                    success: function(r) {
+                        w.body.dom.value = r.responseText;
+                    }
+                });
+            }
+        }
+    });
+
+    // create the Grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
+            {header: "Change", width: 75, sortable: true, renderer: change, dataIndex: 'change'},
+            {header: "% Change", width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        plugins: new Ext.ux.CellFieldDropZone(),
+        stripeRows: true,
+        autoExpandColumn: 'company',
+        height:350,
+        width:600,
+        title:'Array Grid',
+        bbar: new Ext.PagingToolbar({
+            buttons: [{
+                text: 'View Source',
+                handler: function() {
+                    helpWindow.show();
+                }
+            }],
+            store: store,
+            pageSize: 25
+        })
+    });
+
+    grid.render('grid-example');
+    grid.getSelectionModel().selectFirstRow();
+
+    var f = new Ext.Panel({
+        frame: true,
+        layout: 'form',
+        width: 600,
+        plugins: new Ext.ux.PanelFieldDragZone(),
+        style: {
+            'margin-top': '10px'
+        },
+        labelWidth: 150,
+        items: [{
+            xtype: 'textfield',
+            fieldLabel: 'Drag this text',
+            value: 'test'
+        },{
+            xtype: 'numberfield',
+            fieldLabel: 'Drag this number',
+            value: '1.2'
+        },{
+            xtype: 'datefield',
+            fieldLabel: 'Drag this date',
+            value: new Date()
+        }],
+        renderTo: Ext.getBody()
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug-console.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug-console.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug-console.html	(revision 625)
@@ -0,0 +1,364 @@
+<html>
+<head>
+  <title>Debug Console</title>
+	<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+	<link rel="stylesheet" type="text/css" href="debug.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="debug.js"></script>
+
+	<style type="text/css">
+	html, body {
+        font:normal 12px verdana;
+        margin:0;
+        padding:0;
+        border:0 none;
+        overflow:hidden;
+        height:100%;
+    }
+	p {
+	    margin:5px;
+	}
+    .settings {
+        background-image:url(../shared/icons/fam/folder_wrench.png);
+    }
+    .nav {
+        background-image:url(../shared/icons/fam/folder_go.png);
+    }
+    </style>
+	<script type="text/javascript">
+    Ext.onReady(function(){
+
+        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+
+Ext.ns('App');
+
+App.BookStore = function(config) {
+	var config = config || {};
+	Ext.applyIf(config, {
+		reader: new Ext.data.XmlReader({
+           // records will have an "Item" tag
+           record: 'Item',
+           id: 'ASIN',
+           totalRecords: '@total'
+       }, [
+           // set up the fields mapping into the xml doc
+           // The first needs mapping, the others are very basic
+           {name: 'Author', mapping: 'ItemAttributes > Author'},
+           'Title',
+		   'Manufacturer',
+		   'ProductGroup',
+		   // Detail URL is not part of the column model of the grid
+		   'DetailPageURL'
+       ])
+	});
+	// call the superclass's constructor
+	App.BookStore.superclass.constructor.call(this, config);
+};
+Ext.extend(App.BookStore, Ext.data.Store);
+
+
+
+App.BookGrid = Ext.extend(Ext.grid.GridPanel, {
+	// override
+	initComponent : function() {
+		Ext.apply(this, {
+			// Pass in a column model definition
+			// Note that the DetailPageURL was defined in the record definition but is not used
+			// here. That is okay.
+	        columns: [
+	            {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
+	            {header: "Title", dataIndex: 'Title', sortable: true},
+	            {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
+	            {header: "Product Group", dataIndex: 'ProductGroup', sortable: true}
+	        ],
+			sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
+			// Note the use of a storeId, this will register thisStore
+			// with the StoreMgr and allow us to retrieve it very easily.
+			store: new App.BookStore({
+				storeId: 'gridBookStore',
+				url: 'sheldon.xml'
+			}),
+			// force the grid to fit the space which is available
+			viewConfig: {
+				forceFit: true
+			}
+		});
+		// finally call the superclasses implementation
+		App.BookGrid.superclass.initComponent.call(this);
+	}
+});
+Ext.reg('bookgrid', App.BookGrid);
+
+
+/**
+ * App.BookDetail
+ * @extends Ext.Panel
+ * This is a specialized Panel which is used to show information about
+ * a book.
+ *
+ * This demonstrates adding 2 custom properties (tplMarkup and
+ * startingMarkup) to the class. It also overrides the initComponent
+ * method and adds a new method called updateDetail.
+ *
+ * The class will be registered with an xtype of 'bookdetail'
+ */
+App.BookDetail = Ext.extend(Ext.Panel, {
+	// add tplMarkup as a new property
+	tplMarkup: [
+		'Title: <a href="{DetailPageURL}" target="_blank">{Title}</a><br/>',
+		'Author: {Author}<br/>',
+		'Manufacturer: {Manufacturer}<br/>',
+		'Product Group: {ProductGroup}<br/>'
+	],
+	// startingMarup as a new property
+	startingMarkup: 'Please select a book to see additional details',
+	// override initComponent to create and compile the template
+	// apply styles to the body of the panel and initialize
+	// html to startingMarkup
+	initComponent: function() {
+		this.tpl = new Ext.Template(this.tplMarkup);
+		Ext.apply(this, {
+			bodyStyle: {
+				background: '#ffffff',
+				padding: '7px'
+			},
+			html: this.startingMarkup
+		});
+		// call the superclass's initComponent implementation
+		App.BookDetail.superclass.initComponent.call(this);
+	},
+	// add a method which updates the details
+	updateDetail: function(data) {
+		this.tpl.overwrite(this.body, data);
+	}
+});
+// register the App.BookDetail class with an xtype of bookdetail
+Ext.reg('bookdetail', App.BookDetail);
+
+
+/**
+ * App.BookMasterDetail
+ * @extends Ext.Panel
+ *
+ * This is a specialized panel which is composed of both a bookgrid
+ * and a bookdetail panel. It provides the glue between the two
+ * components to allow them to communicate. You could consider this
+ * the actual application.
+ *
+ */
+App.BookMasterDetail = Ext.extend(Ext.Panel, {
+	// override initComponent
+	initComponent: function() {
+		// used applyIf rather than apply so user could
+		// override the defaults
+		Ext.applyIf(this, {
+			frame: true,
+			title: 'Book List',
+			width: 540,
+			height: 400,
+			layout: 'border',
+			items: [{
+				xtype: 'bookgrid',
+				itemId: 'gridPanel',
+				region: 'north',
+				height: 210,
+				split: true
+			},{
+				xtype: 'bookdetail',
+				itemId: 'detailPanel',
+				region: 'center'
+			}]
+		})
+		// call the superclass's initComponent implementation
+		App.BookMasterDetail.superclass.initComponent.call(this);
+	},
+	// override initEvents
+	initEvents: function() {
+		// call the superclass's initEvents implementation
+		App.BookMasterDetail.superclass.initEvents.call(this);
+
+		// now add application specific events
+		// notice we use the selectionmodel's rowselect event rather
+		// than a click event from the grid to provide key navigation
+		// as well as mouse navigation
+		var bookGridSm = this.getComponent('gridPanel').getSelectionModel();
+		bookGridSm.on('rowselect', this.onRowSelect, this);
+	},
+	// add a method called onRowSelect
+	// This matches the method signature as defined by the 'rowselect'
+	// event defined in Ext.grid.RowSelectionModel
+	onRowSelect: function(sm, rowIdx, r) {
+		// getComponent will retrieve itemId's or id's. Note that itemId's
+		// are scoped locally to this instance of a component to avoid
+		// conflicts with the ComponentMgr
+		var detailPanel = this.getComponent('detailPanel');
+		detailPanel.updateDetail(r.data);
+	}
+});
+// register an xtype with this class
+Ext.reg('bookmasterdetail', App.BookMasterDetail);
+
+
+// Finally now that we've defined all of our classes we can instantiate
+// an instance of the app and renderTo an existing div called 'binding-example'
+// Note now that classes have encapsulated this behavior we can easily create
+// an instance of this app to be used in many different contexts, you could
+// easily place this application in an Ext.Window for example
+	// create an instance of the app
+	var bookApp = new App.BookMasterDetail({
+		renderTo: 'center2'
+	});
+	// We can retrieve a reference to the data store
+	// via the StoreMgr by its storeId
+	Ext.StoreMgr.get('gridBookStore').load();
+
+
+
+
+       var viewport = new Ext.Viewport({
+            id: 'viewport-component',
+            layout:'border',
+            items:[
+                new Ext.BoxComponent({ // raw
+                    id:'north-panel',
+                    region:'north',
+                    el: 'north',
+                    height:32
+                }),{
+                    id:'south-panel',
+                    region:'south',
+                    contentEl: 'south',
+                    split:true,
+                    height: 100,
+                    minSize: 100,
+                    maxSize: 200,
+                    collapsible: true,
+                    title:'South',
+                    margins:'0 0 0 0'
+                }, {
+                    id:'east-panel',
+                    region:'east',
+                    title: 'East Side',
+                    collapsible: true,
+                    split:true,
+                    width: 225,
+                    minSize: 175,
+                    maxSize: 400,
+                    layout:'fit',
+                    margins:'0 5 0 0',
+                    items:
+                        new Ext.TabPanel({
+                            border:false,
+                            activeTab:1,
+                            tabPosition:'bottom',
+                            items:[{
+                                html:'<p>A TabPanel component can be a region.</p>',
+                                title: 'A Tab',
+                                autoScroll:true
+                            },
+                            new Ext.grid.PropertyGrid({
+                                id:'propGrid',
+                                title: 'Property Grid',
+                                closable: true,
+                                source: {
+                                    "(name)": "Properties Grid",
+                                    "grouping": false,
+                                    "autoFitColumns": true,
+                                    "productionQuality": false,
+                                    "created": new Date(Date.parse('10/15/2006')),
+                                    "tested": false,
+                                    "version": .01,
+                                    "borderWidth": 1
+                                }
+                            })]
+                        })
+                 },{
+                    region:'west',
+                    id:'west-panel',
+                    title:'West',
+                    split:true,
+                    width: 200,
+                    minSize: 175,
+                    maxSize: 400,
+                    collapsible: true,
+                    margins:'0 0 0 5',
+                    layout:'accordion',
+                    layoutConfig:{
+                        animate:true
+                    },
+                    items: [{
+                        id:'west-nav',
+                        contentEl: 'west',
+                        title:'Navigation',
+                        border:false,
+                        iconCls:'nav'
+                    },{
+                        id:'west-settings',
+                        title:'Settings',
+                        html:'<p>Some settings in here.</p>',
+                        border:false,
+                        iconCls:'settings'
+                    }]
+                },
+                new Ext.TabPanel({
+                    id:'center-region',
+                    region:'center',
+                    deferredRender:false,
+                    activeTab:0,
+                    items:[{
+                        id:'first-tab',
+                        contentEl:'center1',
+                        title: 'Close Me',
+                        closable:true,
+                        autoScroll:true
+                    },{
+                        id:'second-tab',
+                        contentEl:'center2',
+                        title: 'Center Panel',
+                        autoScroll:true
+                    }]
+                })
+             ]
+        });
+    });
+	</script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+  <div id="west">
+    <p>Hi. I'm the west panel.</p>
+  </div>
+  <div id="north">
+    <p>north - generally for menus, toolbars and/or advertisements</p>
+  </div>
+  <div id="center2">
+  </div>
+  <div id="center1">
+        <p>Included in ext-all-debug.js is the Ext Debug Console. It offers a limited amount of <a href="http://getfirebug.com">FireBug</a>
+        functionality cross browser. The most important feature is the "DOM Inspector" and CSS and DOM attribute editing. In any browser where "console"
+        is not already defined, the Ext console will handle console.log(), time() and other calls.
+    </p>
+   <p>
+       <b>Try It</b><br/>
+       This page includes ext-all-debug.js and some test markup so you can try it out. Click on the image below to bring up the console.
+   </p>
+   <a href="#" onclick="Ext.log('Hello from the Ext console. This is logged using the Ext.log function.');return false;"><img src="debug.png" style="margin:15px;"/></a>
+
+    <p>
+        The full source is available in the "source" directory of the Ext download.
+    </p>
+  </div>
+  <div id="props-panel" style="width:200px;height:200px;overflow:hidden;">
+  </div>
+  <div id="south">
+    <p>south - generally for informational stuff, also could be for status bar</p>
+  </div>
+
+ </body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.css	(revision 625)
@@ -0,0 +1,74 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-debug-node {
+    background-image: none;
+}
+.x-column-tree .x-panel-header {
+	padding: 3px 0px 0px 0px;
+	border-bottom-width: 0px;
+}
+
+.x-column-tree .x-panel-header .x-panel-header-text {
+	margin-left: 3px
+}
+
+.x-column-tree .x-tree-node {
+    zoom:1;
+}
+.x-column-tree .x-tree-node-el {
+    /*border-bottom:1px solid #eee; borders? */
+    zoom:1;
+}
+.x-column-tree .x-tree-selected {
+    background: #d9e8fb;
+}
+.x-column-tree  .x-tree-node a {
+    line-height:18px;
+    vertical-align:middle;
+}
+.x-column-tree  .x-tree-node a span{
+
+}
+.x-column-tree  .x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#000;
+}
+.x-tree-col {
+    float:left;
+    overflow:hidden;
+    padding:0 1px;
+    zoom:1;
+}
+
+.x-tree-col-text, .x-tree-hd-text {
+    overflow:hidden;
+    -o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-headers {
+	background: #f9f9f9 url(../../resources/images/default/grid/grid3-hrow.gif) repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+}
+
+.x-tree-hd {
+    float:left;
+    overflow:hidden;
+    border-left:1px solid #eee;
+    border-right:1px solid #d0d0d0;
+}
+
+.task {
+    background-image:url(../shared/icons/fam/cog.png) !important;
+}
+.task-folder {
+    background-image:url(../shared/icons/fam/folder_go.png) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/debug.js	(revision 625)
@@ -0,0 +1,904 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.debug = {};
+
+(function(){
+
+var cp;
+
+function createConsole(){
+
+    var scriptPanel = new Ext.debug.ScriptsPanel();
+    var logView = new Ext.debug.LogPanel();
+    var tree = new Ext.debug.DomTree();
+    var compInspector = new Ext.debug.ComponentInspector();
+    var compInfoPanel = new Ext.debug.ComponentInfoPanel();
+    var storeInspector = new Ext.debug.StoreInspector();
+    var objInspector = new Ext.debug.ObjectInspector();
+
+    var tabs = new Ext.TabPanel({
+        activeTab: 0,
+        border: false,
+        tabPosition: 'bottom',
+        items: [{
+            title: 'Debug Console',
+            layout:'border',
+            items: [logView, scriptPanel]
+        },{
+            title: 'HTML Inspector',
+            layout:'border',
+            items: [tree]
+        },{
+            title: 'Component Inspector',
+            layout: 'border',
+            items: [compInspector,compInfoPanel]
+        },{
+            title: 'Object Inspector',
+            layout: 'border',
+            items: [objInspector]
+        },{
+            title: 'Data Stores',
+            layout: 'border',
+            items: [storeInspector]
+        }]
+    });
+
+    cp = new Ext.Panel({
+        id: 'x-debug-browser',
+        title: 'Console',
+        collapsible: true,
+        animCollapse: false,
+        style: 'position:absolute;left:0;bottom:0;z-index:101',
+        height:200,
+        logView: logView,
+        layout: 'fit',
+
+        tools:[{
+            id: 'close',
+            handler: function(){
+                cp.destroy();
+                cp = null;
+                Ext.EventManager.removeResizeListener(handleResize);
+            }
+        }],
+
+        items: tabs
+    });
+
+    cp.render(Ext.getBody());
+
+    cp.resizer = new Ext.Resizable(cp.el, {
+        minHeight:50,
+        handles: "n",
+        pinned: true,
+        transparent:true,
+        resizeElement : function(){
+            var box = this.proxy.getBox();
+            this.proxy.hide();
+            cp.setHeight(box.height);
+            return box;
+        }
+    });
+
+//     function handleResize(){
+//         cp.setWidth(Ext.getBody().getViewSize().width);
+//     }
+//     Ext.EventManager.onWindowResize(handleResize);
+//
+//     handleResize();
+
+    function handleResize(){
+        var b = Ext.getBody()
+        var size = b.getViewSize();
+        if(size.height < b.dom.scrollHeight) {
+            size.width -= 18;
+        }
+        cp.setWidth(size.width);
+    }
+    Ext.EventManager.onWindowResize(handleResize);
+    handleResize();
+}
+
+
+Ext.apply(Ext, {
+    log : function(){
+        if(!cp){
+            createConsole();
+        }
+        cp.logView.log.apply(cp.logView, arguments);
+    },
+
+    logf : function(format, arg1, arg2, etc){
+        Ext.log(String.format.apply(String, arguments));
+    },
+
+    dump : function(o){
+        if(typeof o == 'string' || typeof o == 'number' || typeof o == 'undefined' || Ext.isDate(o)){
+            Ext.log(o);
+        }else if(!o){
+            Ext.log("null");
+        }else if(typeof o != "object"){
+            Ext.log('Unknown return type');
+        }else if(Ext.isArray(o)){
+            Ext.log('['+o.join(',')+']');
+        }else{
+            var b = ["{\n"];
+            for(var key in o){
+                var to = typeof o[key];
+                if(to != "function" && to != "object"){
+                    b.push(String.format("  {0}: {1},\n", key, o[key]));
+                }
+            }
+            var s = b.join("");
+            if(s.length > 3){
+                s = s.substr(0, s.length-2);
+            }
+            Ext.log(s + "\n}");
+        }
+    },
+
+    _timers : {},
+
+    time : function(name){
+        name = name || "def";
+        Ext._timers[name] = new Date().getTime();
+    },
+
+    timeEnd : function(name, printResults){
+        var t = new Date().getTime();
+        name = name || "def";
+        var v = String.format("{0} ms", t-Ext._timers[name]);
+        Ext._timers[name] = new Date().getTime();
+        if(printResults !== false){
+            Ext.log('Timer ' + (name == "def" ? v : name + ": " + v));
+        }
+        return v;
+    }
+});
+
+})();
+
+
+Ext.debug.ScriptsPanel = Ext.extend(Ext.Panel, {
+    id:'x-debug-scripts',
+    region: 'east',
+    minWidth: 200,
+    split: true,
+    width: 350,
+    border: false,
+    layout:'anchor',
+    style:'border-width:0 0 0 1px;',
+
+    initComponent : function(){
+
+        this.scriptField = new Ext.form.TextArea({
+            anchor: '100% -26',
+            style:'border-width:0;'
+        });
+
+        this.trapBox = new Ext.form.Checkbox({
+            id: 'console-trap',
+            boxLabel: 'Trap Errors',
+            checked: true
+        });
+
+        this.toolbar = new Ext.Toolbar([{
+                text: 'Run',
+                scope: this,
+                handler: this.evalScript
+            },{
+                text: 'Clear',
+                scope: this,
+                handler: this.clear
+            },
+            '->',
+            this.trapBox,
+            ' ', ' '
+        ]);
+
+        this.items = [this.toolbar, this.scriptField];
+
+        Ext.debug.ScriptsPanel.superclass.initComponent.call(this);
+    },
+
+    evalScript : function(){
+        var s = this.scriptField.getValue();
+        if(this.trapBox.getValue()){
+            try{
+                var rt = eval(s);
+                Ext.dump(rt === undefined? '(no return)' : rt);
+            }catch(e){
+                Ext.log(e.message || e.descript);
+            }
+        }else{
+            var rt = eval(s);
+            Ext.dump(rt === undefined? '(no return)' : rt);
+        }
+    },
+
+    clear : function(){
+        this.scriptField.setValue('');
+        this.scriptField.focus();
+    }
+
+});
+
+Ext.debug.LogPanel = Ext.extend(Ext.Panel, {
+    autoScroll: true,
+    region: 'center',
+    border: false,
+    style:'border-width:0 1px 0 0',
+
+    log : function(){
+        var markup = [  '<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '<br />').replace(/\s/g, '&#160;'),
+                    '</div>'].join('');
+
+        this.body.insertHtml('beforeend', markup);
+        this.body.scrollTo('top', 100000);
+    },
+
+    clear : function(){
+        this.body.update('');
+        this.body.dom.scrollTop = 0;
+    }
+});
+
+Ext.debug.DomTree = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent : function(){
+
+
+        Ext.debug.DomTree.superclass.initComponent.call(this);
+
+        // tree related stuff
+        var styles = false, hnode;
+        var nonSpace = /^\s*$/;
+        var html = Ext.util.Format.htmlEncode;
+        var ellipsis = Ext.util.Format.ellipsis;
+        var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;
+
+        function findNode(n){
+            if(!n || n.nodeType != 1 || n == document.body || n == document){
+                return false;
+            }
+            var pn = [n], p = n;
+            while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){
+                pn.unshift(p);
+            }
+            var cn = hnode;
+            for(var i = 0, len = pn.length; i < len; i++){
+                cn.expand();
+                cn = cn.findChild('htmlNode', pn[i]);
+                if(!cn){ // in this dialog?
+                    return false;
+                }
+            }
+            cn.select();
+            var a = cn.ui.anchor;
+            treeEl.dom.scrollTop = Math.max(0 ,a.offsetTop-10);
+            //treeEl.dom.scrollLeft = Math.max(0 ,a.offsetLeft-10); no likey
+            cn.highlight();
+            return true;
+        }
+
+        function nodeTitle(n){
+            var s = n.tagName;
+            if(n.id){
+                s += '#'+n.id;
+            }else if(n.className){
+                s += '.'+n.className;
+            }
+            return s;
+        }
+
+        function onNodeSelect(t, n, last){
+            return;
+            if(last && last.unframe){
+                last.unframe();
+            }
+            var props = {};
+            if(n && n.htmlNode){
+                if(frameEl.pressed){
+                    n.frame();
+                }
+                if(inspecting){
+                    return;
+                }
+                addStyle.enable();
+                reload.setDisabled(n.leaf);
+                var dom = n.htmlNode;
+                stylePanel.setTitle(nodeTitle(dom));
+                if(styles && !showAll.pressed){
+                    var s = dom.style ? dom.style.cssText : '';
+                    if(s){
+                        var m;
+                        while ((m = styleRe.exec(s)) != null){
+                            props[m[1].toLowerCase()] = m[2];
+                        }
+                    }
+                }else if(styles){
+                    var cl = Ext.debug.cssList;
+                    var s = dom.style, fly = Ext.fly(dom);
+                    if(s){
+                        for(var i = 0, len = cl.length; i<len; i++){
+                            var st = cl[i];
+                            var v = s[st] || fly.getStyle(st);
+                            if(v != undefined && v !== null && v !== ''){
+                                props[st] = v;
+                            }
+                        }
+                    }
+                }else{
+                    for(var a in dom){
+                        var v = dom[a];
+                        if((isNaN(a+10)) && v != undefined && v !== null && v !== '' && !(Ext.isGecko && a[0] == a[0].toUpperCase())){
+                            props[a] = v;
+                        }
+                    }
+                }
+            }else{
+                if(inspecting){
+                    return;
+                }
+                addStyle.disable();
+                reload.disabled();
+            }
+            stylesGrid.setSource(props);
+            stylesGrid.treeNode = n;
+            stylesGrid.view.fitColumns();
+        }
+
+        this.loader = new Ext.tree.TreeLoader();
+        this.loader.load = function(n, cb){
+            var isBody = n.htmlNode == document.body;
+            var cn = n.htmlNode.childNodes;
+            for(var i = 0, c; c = cn[i]; i++){
+                if(isBody && c.id == 'x-debug-browser'){
+                    continue;
+                }
+                if(c.nodeType == 1){
+                    n.appendChild(new Ext.debug.HtmlNode(c));
+                }else if(c.nodeType == 3 && !nonSpace.test(c.nodeValue)){
+                    n.appendChild(new Ext.tree.TreeNode({
+                        text:'<em>' + ellipsis(html(String(c.nodeValue)), 35) + '</em>',
+                        cls: 'x-tree-noicon'
+                    }));
+                }
+            }
+            cb();
+        };
+
+        //tree.getSelectionModel().on('selectionchange', onNodeSelect, null, {buffer:250});
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode('Ext'));
+
+        hnode = this.root.appendChild(new Ext.debug.HtmlNode(
+                document.getElementsByTagName('html')[0]
+        ));
+
+    }
+});
+
+Ext.debug.ComponentNodeUI = Ext.extend(Ext.tree.TreeNodeUI,{
+    onOver : function(e){
+        Ext.debug.ComponentNodeUI.superclass.onOver.call(this);
+        var cmp = this.node.attributes.component;
+        if (cmp.el && cmp.el.mask && cmp.id !='x-debug-browser') {
+            try { // Oddly bombs on some elements in IE, gets any we care about though
+                cmp.el.mask();
+            } catch(e) {}
+        }
+    },
+
+    onOut : function(e){
+        Ext.debug.ComponentNodeUI.superclass.onOut.call(this);
+        var cmp = this.node.attributes.component;
+        if (cmp.el && cmp.el.unmask && cmp.id !='x-debug-browser') {
+            try {
+                cmp.el.unmask();
+            } catch(e) {}
+        }
+    }
+});
+
+Ext.debug.ComponentInspector = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent : function(){
+        this.loader = new Ext.tree.TreeLoader();
+        this.bbar = new Ext.Toolbar([{
+            text: 'Refresh',
+            handler: this.refresh,
+            scope: this
+        }]);
+        Ext.debug.ComponentInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Ext Components',
+            component: Ext.ComponentMgr.all,
+            leaf: false
+        }));
+        this.parseRootNode();
+
+        this.on('click', this.onClick, this);
+    },
+
+    createNode: function(n,c) {
+        var leaf = (c.items && c.items.length > 0);
+        return n.appendChild(new Ext.tree.TreeNode({
+            text: c.id + (c.getXType() ? ' [ ' + c.getXType() + ' ]': '' ),
+            component: c,
+            uiProvider:Ext.debug.ComponentNodeUI,
+            leaf: !leaf
+        }));
+    },
+
+    parseChildItems: function(n) {
+        var cn = n.attributes.component.items;
+        if (cn) {
+            for (var i = 0;i < cn.length; i++) {
+                var c = cn.get(i);
+                if (c.id != this.id && c.id != this.bottomToolbar.id) {
+                    var newNode = this.createNode(n,c);
+                    if (!newNode.leaf) {
+                        this.parseChildItems(newNode)
+                    }
+                }
+            }
+        }
+    },
+
+    parseRootNode: function() {
+        var n = this.root;
+        var cn = n.attributes.component.items;
+        for (var i = 0,c;c = cn[i];i++) {
+            if (c.id != this.id && c.id != this.bottomToolbar.id) {
+                if (!c.ownerCt) {
+                    var newNode = this.createNode(n,c);
+                    if (!newNode.leaf) {
+                        this.parseChildItems(newNode);
+                    }
+                }
+            }
+        }
+    },
+
+    onClick: function(node, e) {
+        var oi = Ext.getCmp('x-debug-objinspector');
+        oi.refreshNodes(node.attributes.component);
+        oi.ownerCt.show();
+    },
+
+    refresh: function() {
+        while (this.root.firstChild) {
+            this.root.removeChild(this.root.firstChild);
+        }
+        this.parseRootNode();
+        var ci = Ext.getCmp('x-debug-compinfo');
+        if (ci) {
+            ci.message('refreshed component tree - '+Ext.ComponentMgr.all.length)
+        }
+    }
+});
+
+Ext.debug.ComponentInfoPanel = Ext.extend(Ext.Panel,{
+    id:'x-debug-compinfo',
+    region: 'east',
+    minWidth: 200,
+    split: true,
+    width: 350,
+    border: false,
+    autoScroll: true,
+    layout:'anchor',
+    style:'border-width:0 0 0 1px;',
+
+    initComponent: function() {
+        this.watchBox = new Ext.form.Checkbox({
+            id: 'x-debug-watchcomp',
+            boxLabel: 'Watch ComponentMgr',
+            listeners: {
+                check: function(cb, val) {
+                    if (val) {
+                        Ext.ComponentMgr.all.on('add', this.onAdd, this);
+                        Ext.ComponentMgr.all.on('remove', this.onRemove, this);
+                    } else {
+                        Ext.ComponentMgr.all.un('add', this.onAdd, this);
+                        Ext.ComponentMgr.all.un('remove', this.onRemove, this);
+                    }
+                },
+                scope: this
+            }
+        });
+
+        this.tbar = new Ext.Toolbar([{
+            text: 'Clear',
+            handler: this.clear,
+            scope: this
+        },'->',this.watchBox
+        ]);
+        Ext.debug.ComponentInfoPanel.superclass.initComponent.call(this);
+    },
+
+    onAdd: function(i, o, key) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    'Added: '+o.id,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+
+    onRemove: function(o, key) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    'Removed: '+o.id,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+
+    message: function(msg) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    msg,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+    insertMarkup: function(markup) {
+        this.body.insertHtml('beforeend', markup);
+        this.body.scrollTo('top', 100000);
+    },
+    clear : function(){
+        this.body.update('');
+        this.body.dom.scrollTop = 0;
+    }
+});
+
+Ext.debug.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    focus: Ext.emptyFn, // prevent odd scrolling behavior
+
+    renderElements : function(n, a, targetNode, bulkRender){
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var t = n.getOwnerTree();
+        var cols = t.columns;
+        var bw = t.borderWidth;
+        var c = cols[0];
+
+        var buf = [
+             '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf ', a.cls,'">',
+                '<div class="x-tree-col" style="width:',c.width-bw,'px;">',
+                    '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
+                    '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow">',
+                    '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on">',
+                    '<a hidefocus="on" class="x-tree-node-anchor" href="',a.href ? a.href : "#",'" tabIndex="1" ',
+                    a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
+                    '<span unselectable="on">', n.text || (c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",
+                "</div>"];
+         for(var i = 1, len = cols.length; i < len; i++){
+             c = cols[i];
+
+             buf.push('<div class="x-tree-col ',(c.cls?c.cls:''),'" style="width:',c.width-bw,'px;">',
+                        '<div class="x-tree-col-text">',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</div>",
+                      "</div>");
+         }
+         buf.push(
+            '<div class="x-clear"></div></div>',
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>");
+
+        if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin",
+                                n.nextSibling.ui.getEl(), buf.join(""));
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join(""));
+        }
+
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.firstChild.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        this.anchor = cs[3];
+        this.textNode = cs[3].firstChild;
+    }
+});
+
+Ext.debug.ObjectInspector = Ext.extend(Ext.tree.TreePanel, {
+    id: 'x-debug-objinspector',
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+    lines:false,
+    borderWidth: Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell
+    cls:'x-column-tree',
+
+    initComponent : function(){
+        this.showFunc = false;
+        this.toggleFunc = function() {
+            this.showFunc = !this.showFunc;
+            this.refreshNodes(this.currentObject);
+        }
+        this.bbar = new Ext.Toolbar([{
+            text: 'Show Functions',
+            enableToggle: true,
+            pressed: false,
+            handler: this.toggleFunc,
+            scope: this
+        }]);
+
+        Ext.apply(this,{
+            title: ' ',
+            loader: new Ext.tree.TreeLoader(),
+            columns:[{
+                header:'Property',
+                width: 300,
+                dataIndex:'name'
+            },{
+                header:'Value',
+                width: 900,
+                dataIndex:'value'
+            }]
+        });
+
+        Ext.debug.ObjectInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Dummy Node',
+            leaf: false
+        }));
+
+        if (this.currentObject) {
+            this.parseNodes();
+        }
+    },
+
+    refreshNodes: function(newObj) {
+        this.currentObject = newObj;
+        var node = this.root;
+        while(node.firstChild){
+            node.removeChild(node.firstChild);
+        }
+        this.parseNodes();
+    },
+
+    parseNodes: function() {
+        for (var o in this.currentObject) {
+            if (!this.showFunc) {
+                if (Ext.isFunction(this.currentObject[o])) {
+                    continue;
+                }
+            }
+            this.createNode(o);
+        }
+    },
+
+    createNode: function(o) {
+        return this.root.appendChild(new Ext.tree.TreeNode({
+            name: o,
+            value: this.currentObject[o],
+            uiProvider:Ext.debug.ColumnNodeUI,
+            iconCls: 'x-debug-node',
+            leaf: true
+        }));
+    },
+
+    onRender : function(){
+        Ext.debug.ObjectInspector.superclass.onRender.apply(this, arguments);
+        this.headers = this.header.createChild({cls:'x-tree-headers'});
+
+        var cols = this.columns, c;
+        var totalWidth = 0;
+
+        for(var i = 0, len = cols.length; i < len; i++){
+             c = cols[i];
+             totalWidth += c.width;
+             this.headers.createChild({
+                 cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''),
+                 cn: {
+                     cls:'x-tree-hd-text',
+                     html: c.header
+                 },
+                 style:'width:'+(c.width-this.borderWidth)+'px;'
+             });
+        }
+        this.headers.createChild({cls:'x-clear'});
+        // prevent floats from wrapping when clipped
+        this.headers.setWidth(totalWidth);
+        this.innerCt.setWidth(totalWidth);
+    }
+});
+
+
+Ext.debug.StoreInspector = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent: function() {
+        this.bbar = new Ext.Toolbar([{
+            text: 'Refresh',
+            handler: this.refresh,
+            scope: this
+        }]);
+        Ext.debug.StoreInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Data Stores',
+            leaf: false
+        }));
+        this.on('click', this.onClick, this);
+
+        this.parseStores();
+    },
+
+    parseStores: function() {
+        var cn = Ext.StoreMgr.items;
+        for (var i = 0,c;c = cn[i];i++) {
+            this.root.appendChild({
+                text: c.storeId + ' - ' + c.totalLength + ' records',
+                component: c,
+                leaf: true
+            });
+        }
+    },
+
+    onClick: function(node, e) {
+        var oi = Ext.getCmp('x-debug-objinspector');
+        oi.refreshNodes(node.attributes.component);
+        oi.ownerCt.show();
+    },
+
+    refresh: function() {
+        while (this.root.firstChild) {
+            this.root.removeChild(this.root.firstChild);
+        }
+        this.parseStores();
+    }
+});
+
+// highly unusual class declaration
+Ext.debug.HtmlNode = function(){
+    var html = Ext.util.Format.htmlEncode;
+    var ellipsis = Ext.util.Format.ellipsis;
+    var nonSpace = /^\s*$/;
+
+    var attrs = [
+        {n: 'id', v: 'id'},
+        {n: 'className', v: 'class'},
+        {n: 'name', v: 'name'},
+        {n: 'type', v: 'type'},
+        {n: 'src', v: 'src'},
+        {n: 'href', v: 'href'}
+    ];
+
+    function hasChild(n){
+        for(var i = 0, c; c = n.childNodes[i]; i++){
+            if(c.nodeType == 1){
+                return true;
+            }
+        }
+        return false;
+    }
+
+    function renderNode(n, leaf){
+        var tag = n.tagName.toLowerCase();
+        var s = '&lt;' + tag;
+        for(var i = 0, len = attrs.length; i < len; i++){
+            var a = attrs[i];
+            var v = n[a.n];
+            if(v && !nonSpace.test(v)){
+                s += ' ' + a.v + '=&quot;<i>' + html(v) +'</i>&quot;';
+            }
+        }
+        var style = n.style ? n.style.cssText : '';
+        if(style){
+            s += ' style=&quot;<i>' + html(style.toLowerCase()) +'</i>&quot;';
+        }
+        if(leaf && n.childNodes.length > 0){
+            s+='&gt;<em>' + ellipsis(html(String(n.innerHTML)), 35) + '</em>&lt;/'+tag+'&gt;';
+        }else if(leaf){
+            s += ' /&gt;';
+        }else{
+            s += '&gt;';
+        }
+        return s;
+    }
+
+    var HtmlNode = function(n){
+        var leaf = !hasChild(n);
+        this.htmlNode = n;
+        this.tagName = n.tagName.toLowerCase();
+        var attr = {
+            text : renderNode(n, leaf),
+            leaf : leaf,
+            cls: 'x-tree-noicon'
+        };
+        HtmlNode.superclass.constructor.call(this, attr);
+        this.attributes.htmlNode = n; // for searching
+        if(!leaf){
+            this.on('expand', this.onExpand,  this);
+            this.on('collapse', this.onCollapse,  this);
+        }
+    };
+
+
+    Ext.extend(HtmlNode, Ext.tree.AsyncTreeNode, {
+        cls: 'x-tree-noicon',
+        preventHScroll: true,
+        refresh : function(highlight){
+            var leaf = !hasChild(this.htmlNode);
+            this.setText(renderNode(this.htmlNode, leaf));
+            if(highlight){
+                Ext.fly(this.ui.textNode).highlight();
+            }
+        },
+
+        onExpand : function(){
+            if(!this.closeNode && this.parentNode){
+                this.closeNode = this.parentNode.insertBefore(new Ext.tree.TreeNode({
+                    text:'&lt;/' + this.tagName + '&gt;',
+                    cls: 'x-tree-noicon'
+                }), this.nextSibling);
+            }else if(this.closeNode){
+                this.closeNode.ui.show();
+            }
+        },
+
+        onCollapse : function(){
+            if(this.closeNode){
+                this.closeNode.ui.hide();
+            }
+        },
+
+        render : function(bulkRender){
+            HtmlNode.superclass.render.call(this, bulkRender);
+        },
+
+        highlightNode : function(){
+            //Ext.fly(this.htmlNode).highlight();
+        },
+
+        highlight : function(){
+            //Ext.fly(this.ui.textNode).highlight();
+        },
+
+        frame : function(){
+            this.htmlNode.style.border = '1px solid #0000ff';
+            //this.highlightNode();
+        },
+
+        unframe : function(){
+            //Ext.fly(this.htmlNode).removeClass('x-debug-frame');
+            this.htmlNode.style.border = '';
+        }
+    });
+
+    return HtmlNode;
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/sheldon.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/sheldon.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/debug/sheldon.xml	(revision 625)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2006-06-28">
+    <OperationRequest>
+        <HTTPHeaders>
+            <Header Name="UserAgent"
+                    Value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser; Avant Browser; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR 1.1.4322; Media Center PC 4.0; InfoPath.2)"></Header>
+        </HTTPHeaders>
+        <RequestId>18CZWZFXKSV8F601AGMF</RequestId>
+        <Arguments>
+            <Argument Name="Service" Value="AWSECommerceService"></Argument>
+            <Argument Name="AssociateTag" Value="ws"></Argument>
+            <Argument Name="SearchIndex" Value="Books"></Argument>
+            <Argument Name="Author" Value="Sidney Sheldon"></Argument>
+            <Argument Name="SubscriptionId" Value="1A7XKHR5BYD0WPJVQEG2"></Argument>
+            <Argument Name="Version" Value="2006-06-28"></Argument>
+            <Argument Name="Operation" Value="ItemSearch"></Argument>
+        </Arguments>
+        <RequestProcessingTime>1.05041599273682</RequestProcessingTime>
+    </OperationRequest>
+    <Items>
+        <Request>
+            <IsValid>True</IsValid>
+            <ItemSearchRequest>
+                <Author>Sidney Sheldon</Author>
+                <SearchIndex>Books</SearchIndex>
+            </ItemSearchRequest>
+        </Request>
+        <TotalResults>203</TotalResults>
+        <TotalPages>21</TotalPages>
+        <Item>
+            <ASIN>0446355453</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446355453%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446355453%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Master of the Game</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446613657</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446613657%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446613657%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Are You Afraid of the Dark?</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446357421</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446357421%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446357421%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>If Tomorrow Comes</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446607207</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446607207%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446607207%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Vision</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Tell Me Your Dreams</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446357448</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446357448%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446357448%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Bloodline</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446532673</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446532673%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446532673%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Other Side of Me</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446356573</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446356573%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446356573%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>A Stranger in the Mirror</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0060198346</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0060198346%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0060198346%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>William Morrow &amp; Company</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Sky Is Falling</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446354732</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446354732%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446354732%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Nothing Lasts Forever</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446341916</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446341916%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446341916%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Naked Face</Title>
+            </ItemAttributes>
+        </Item>
+    </Items>
+</ItemSearchResponse>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/credits.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/credits.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/credits.txt	(revision 625)
@@ -0,0 +1,7 @@
+This desktop example is a work in progress.
+
+Several great contributions were made by Todd Murdock (mxracer), including the
+TaskBar and StartMenu UX components. More information can be found in
+this thread on the ext js forums:
+
+http://extjs.com/forum/showthread.php?t=10950
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/css/desktop.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/css/desktop.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/css/desktop.css	(revision 625)
@@ -0,0 +1,660 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html, body {
+	background:#3d71b8 url(../wallpapers/desktop.jpg) no-repeat left top;
+    font: normal 12px tahoma, arial, verdana, sans-serif;
+	margin: 0;
+	padding: 0;
+	border: 0 none;
+	overflow: hidden;
+	height: 100%;
+}
+
+.start {
+	background-image: url( ../images/taskbar/black/startbutton-icon.gif ) !important;
+}
+
+.bogus {
+	background-image: url( ../images/bogus.png ) !important;
+}
+
+.logout {
+	background-image: url( ../images/logout.gif ) !important;
+}
+
+.settings {
+	background-image: url( ../images/gears.gif ) !important;
+}
+
+#dpanels {
+	width: 250px;
+	float: right;
+}
+
+#dpanels .x-panel {
+	margin: 15px;
+}
+
+#dpanels .x-date-picker {
+	border: 0 none;
+	border-top: 0 none;
+	background: transparent;
+}
+
+#dpanels .x-date-picker td.x-date-active {
+	background: #ffffff;
+}
+
+#dpanels .x-date-picker {
+	width: 100% !important;
+}
+
+#x-desktop {
+	width: 100%;
+	height: 100%;
+	border: 0 none;
+	position: relative;
+    overflow:hidden;
+    zoom:1;
+}
+
+#ux-taskbar .x-btn {
+	margin: 1px 0 0 1px;
+}
+
+#ux-taskbar-start .x-btn {
+	margin: 0;
+}
+
+#ux-taskbar button {
+	/* width: 150px;
+	overflow: hidden; */
+	text-align: left;
+	color: #ffffff;
+}
+#title-bar-wrapper {
+	height:35px;
+}
+
+#title-bar {
+	color: #225599;
+	padding: 9px 7px;
+	font: bold 16px tahoma,arial,verdana,sans-serif;
+	float:left;
+}
+
+#x-logout {
+	float:right;
+	padding:6px 7px;
+}
+
+.x-btn-text-icon .x-btn-center .logout {
+	background-position:0pt 3px;
+	background-repeat:no-repeat;
+	padding:3px 0pt 3px 18px;
+}
+
+#ux-taskbar {
+	background:transparent none;
+	height:30px;
+	margin:0;
+	padding:0;
+	position:relative;
+	z-index:12001;
+}
+
+.x-btn-icon .ux-taskbutton-center .x-btn-text{
+	background-position: center;
+	background-repeat: no-repeat;
+	height: 16px;
+	width: 16px;
+	cursor:pointer;
+	white-space: nowrap;
+    padding:0;
+}
+.x-btn-icon .ux-taskbutton-center{
+	padding:1px;
+}
+
+.x-btn-text-icon .ux-taskbutton-center .x-btn-text{
+	background-position: 0 6px;
+	background-repeat: no-repeat;
+	padding:7px 0px 7px 20px;
+}
+
+.x-btn-text-icon .ux-startbutton-center .x-btn-text{
+	background-position: 0 4px;
+	background-repeat: no-repeat;
+	color:#000000 !important;
+	font-weight:bold;
+	padding:7px 0px 7px 28px;
+}
+
+.ux-taskbutton-left, .ux-taskbutton-right{
+	font-size:1px;
+    line-height:1px;
+}
+.ux-taskbutton-left{
+	width:4px;
+	height:28px;
+	background:url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 0;
+}
+.ux-taskbutton-right{
+	width:4px;
+	height:28px;
+	background:url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -28px;
+}
+.ux-taskbutton-left i, .ux-taskbutton-right i{
+	display:block;
+    width:4px;
+    overflow:hidden;
+    font-size:1px;
+    line-height:1px;
+}
+.ux-taskbutton-center{
+	background:url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -56px;
+	vertical-align: middle;
+	text-align:center;
+	padding:0 5px;
+	cursor:pointer;
+	white-space:nowrap;
+}
+
+#ux-taskbar .ux-taskbutton-left{
+	background-position:0 0;
+}
+#ux-taskbar .ux-taskbutton-right{
+	background-position:0 -28px;
+}
+#ux-taskbar .ux-taskbutton-center{
+	background-position:0 -56px;
+}
+
+#ux-taskbar .x-btn-over .ux-taskbutton-left{
+	background-position:0 -252px;
+}
+#ux-taskbar .x-btn-over  .ux-taskbutton-right{
+	background-position:0 -280px;
+}
+#ux-taskbar .x-btn-over .ux-taskbutton-center{
+	background-position:0 -308px;
+}
+
+#ux-taskbar .x-btn-click .ux-taskbutton-left{
+	background-position:0 -168px;
+}
+#ux-taskbar .x-btn-click  .ux-taskbutton-right{
+	background-position:0 -196px;
+}
+#ux-taskbar .x-btn-click .ux-taskbutton-center{
+	background-position:0 -224px;
+}
+
+#ux-taskbar .active-win .ux-taskbutton-left{
+	background-position:0 -84px;
+}
+#ux-taskbar .active-win  .ux-taskbutton-right{
+	background:url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -112px;
+}
+#ux-taskbar .active-win .ux-taskbutton-center{
+	background:url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -140px;
+}
+#ux-taskbar .active-win .ux-taskbutton-center button {
+    color:#fff;
+}
+
+#spacer {
+	height: 25px;
+	float: left;
+	width: 0;
+	overflow: hidden;
+	margin-top: 2px;
+}
+
+.x-window-body p,.x-panel-body p {
+	padding: 10px;
+	margin: 0;
+}
+
+.x-window-maximized .x-window-bc {
+	height:0;
+}
+
+.icon-grid {
+    background-image:url( ../images/grid.png ) !important;
+}
+.add {
+    background-image:url(../../shared/icons/fam/add.gif) !important;
+}
+.option {
+    background-image:url(../../shared/icons/fam/plugin.gif) !important;
+}
+.remove {
+    background-image:url(../../shared/icons/fam/delete.gif) !important;
+}
+.save {
+    background-image:url(../../shared/icons/save.gif) !important;
+}
+.accordion {
+    background-image:url(../images/accordian.gif) !important;
+}
+.tabs {
+    background-image:url(../images/tabs.gif) !important;
+}
+
+/* IM window icons */
+
+.user {
+    background-image:url( ../../shared/icons/fam/user.gif ) !important;
+}
+
+.user-add {
+    background-image:url(../../shared/icons/fam/user_add.gif) !important;
+}
+
+.user-delete {
+    background-image:url(../../shared/icons/fam/user_delete.gif) !important;
+}
+
+.connect {
+    background-image:url(../../shared/icons/fam/connect.gif) !important;
+}
+
+.user-girl {
+    background-image:url(../../shared/icons/fam/user_female.gif) !important;
+}
+
+.user-kid {
+    background-image:url(../../shared/icons/fam/user_green.gif) !important;
+}
+
+.user-suit {
+    background-image:url(../../shared/icons/fam/user_suit.gif) !important;
+}
+
+.ux-start-menu {
+	background:transparent none;
+	border:0px none;
+	padding:0;
+}
+
+.ux-start-menu-tl .x-window-header {
+	color:#f1f1f1;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+    padding:5px 0 4px 0;
+}
+
+.x-panel-tl .x-panel-icon, .ux-start-menu-tl .x-panel-icon {
+	background-position:0pt 4px;
+	background-repeat:no-repeat;
+	padding-left:20px !important;
+}
+
+.ux-start-menu-tl {
+	background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    z-index:1;
+    position:relative;
+}
+
+.ux-start-menu-tr {
+	background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right 0;
+	padding-right:6px;
+}
+
+.ux-start-menu-tc {
+	background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 0;
+	overflow:hidden;
+    zoom:1;
+}
+
+.ux-start-menu-ml {
+	background: transparent url( ../images/taskbar/black/start-menu-left-right.png ) repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.ux-start-menu-bc {
+	background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 bottom;
+    zoom:1;
+}
+
+.ux-start-menu-bc .x-window-footer {
+    padding-bottom:6px;
+    zoom:1;
+    font-size:0;
+    line-height:0;
+}
+
+.ux-start-menu-bl {
+	background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.ux-start-menu-br {
+	background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-nofooter .ux-start-menu-bc {
+	height:6px;
+}
+
+.ux-start-menu-splitbar-h {
+	background-color:#d0d0d0;
+}
+
+
+.ux-start-menu-bwrap {
+	background:transparent none;
+	border:0px none;
+}
+
+.ux-start-menu-body {
+	background:transparent none;
+	border:0px none;
+}
+
+.ux-start-menu-apps-panel {
+	background:#ffffff none;
+	border:1px solid #1e2124;
+}
+
+.ux-start-menu-tools-panel {
+	border:0px none;
+	background:transparent url( ../images/taskbar/black/start-menu-right.png ) repeat-y scroll right 0pt;
+}
+
+#ux-taskbar-start {
+	background:#000000 url( ../images/taskbar/black/taskbar-start-panel-bg.gif ) repeat-x left top;
+	left:0px;
+	padding:0;
+	position:absolute;
+}
+
+#ux-taskbar-start .x-toolbar {
+	background: none;
+	padding:0px;
+	border:0px none;
+}
+
+#ux-taskbuttons-panel {
+	background:#000000 url( ../images/taskbar/black/taskbuttons-panel-bg.gif ) repeat-x left top;
+	padding-top:0;
+	position:relative;
+}
+
+.ux-taskbuttons-strip-wrap {
+	/* overflow:hidden;
+	position:relative;
+	width:100%; */
+
+	width:100%;
+    overflow:hidden;
+    position:relative;
+    zoom:1;
+}
+
+ul.ux-taskbuttons-strip {
+	display:block;
+	width:5000px;
+    zoom:1;
+}
+
+ul.ux-taskbuttons-strip li {
+    float:left;
+    margin-left:2px;
+}
+
+
+ul.ux-taskbuttons-strip li.ux-taskbuttons-edge {
+    float:left;
+    margin:0 !important;
+    padding:0 !important;
+    border:0 none !important;
+    font-size:1px !important;
+    line-height:1px !important;
+    overflow:hidden;
+    zoom:1;
+    background:transparent !important;
+    width:1px;
+}
+
+.x-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-taskbuttons-scrolling {
+	position:relative;
+}
+
+.x-taskbuttons-scrolling .ux-taskbuttons-strip-wrap {
+	margin-left:18px;
+	margin-right:18px;
+}
+
+td.ux-taskButtons-edge {
+    /*float:left;*/
+    margin:0 !important;
+    padding:0 !important;
+    border:0 none !important;
+    font-size:1px !important;
+    line-height:1px !important;
+    overflow:hidden;
+    zoom:1;
+    background:transparent !important;
+    width:1px;
+}
+
+.ux-taskbuttons-scroller-left {
+    background: transparent url( ../images/taskbar/black/scroll-left.gif ) no-repeat -18px 0;
+    width:18px;
+    position:absolute;
+    left:1px;
+    top:0px;
+    z-index:10;
+    cursor:pointer;
+}
+.ux-taskbuttons-scroller-left-over {
+    background-position: 0 0;
+}
+.ux-taskbuttons-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+.ux-taskbuttons-scroller-right {
+    background: transparent url( ../images/taskbar/black/scroll-right.gif ) no-repeat 0 0;
+    width:18px;
+    position:absolute;
+    right:0;
+    top:0px;
+    z-index:10;
+    cursor:pointer;
+}
+.ux-taskbuttons-scroller-right-over {
+    background-position: -18px 0;
+}
+.ux-taskbuttons-scroller-right-disabled {
+    background-position: 0 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.ux-toolmenu-sep {
+	background-color:#18191a;
+	border-bottom:1px solid #858789;
+	display:block;
+	font-size:1px;
+	line-height:1px;
+	margin:2px 3px;
+}
+
+.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item a.x-menu-item {
+	color:#ffffff;
+}
+
+.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item .x-menu-item-active a.x-menu-item {
+	color:#000000;
+}
+
+.ux-start-menu-tools-panel .x-menu-item-active {
+	background: #525456 url( ../images/taskbar/black/item-over.gif ) repeat-x left bottom;
+	border:1px solid #000000;
+	padding: 0;
+}
+
+#ux-taskbar .x-splitbar-h {
+	background:#000000 url( ../images/taskbar/black/taskbar-split-h.gif ) no-repeat 0 0;
+	width:8px;
+}
+
+.x-window-header-text {
+	cursor:default;
+}
+
+/*
+ * Begin Start button
+ */
+.ux-startbutton-left, .ux-startbutton-right{
+	font-size:1px;
+    line-height:1px;
+}
+.ux-startbutton-left{
+	width:10px;
+	height:28px;
+	background:url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 0;
+}
+.ux-startbutton-right{
+	width:10px;
+	height:30px;
+	background:url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -28px;
+}
+.ux-startbutton-left i, .ux-startbutton-right i{
+	display:block;
+    width:10px;
+    overflow:hidden;
+    font-size:1px;
+    line-height:1px;
+}
+.ux-startbutton-center{
+	background:url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -56px;
+	vertical-align: middle;
+	text-align:center;
+	padding:0;
+	cursor:pointer;
+	white-space:nowrap;
+}
+
+#ux-taskbar .ux-startbutton-left{
+	background-position:0 0;
+}
+#ux-taskbar .ux-startbutton-right{
+	background-position:0 -30px;
+}
+#ux-taskbar .ux-startbutton-center{
+	background-position:0 -60px;
+}
+
+#ux-taskbar .x-btn-over .ux-startbutton-left{
+	background-position:0 -270px;
+}
+#ux-taskbar .x-btn-over  .ux-startbutton-right{
+	background-position:0 -300px;
+}
+#ux-taskbar .x-btn-over .ux-startbutton-center{
+	background-position:0 -330px;
+}
+
+#ux-taskbar .x-btn-click .ux-startbutton-left{
+	background-position:0 -180px;
+}
+#ux-taskbar .x-btn-click  .ux-startbutton-right{
+	background-position:0 -210px;
+}
+#ux-taskbar .x-btn-click .ux-startbutton-center{
+	background-position:0 -240px;
+}
+
+#ux-taskbar .active-win .ux-startbutton-left{
+	background-position:0 -90px;
+}
+#ux-taskbar .active-win  .ux-startbutton-right{
+	background:url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -120px;
+}
+#ux-taskbar .active-win .ux-startbutton-center{
+	background:url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -150px;
+}
+#ux-taskbar .active-win .ux-startbutton-center button {
+    color:#fff;
+}
+/*
+ * End Start button
+ */
+
+.x-resizable-proxy{
+    background:#C7DFFC;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    border: 1px solid #3b5a82;
+}
+
+/* Desktop Shortcuts */
+#x-shortcuts dt {
+    float:left;
+    margin:15px 0 0 15px;
+    clear:left;
+    width:64px;
+    font:normal 10px tahoma,arial,verdana,sans-serif;
+    text-align:center;
+    zoom:1;
+    display:block;
+}
+#x-shortcuts dt a {
+    width:64px;
+    display:block;
+    color:white;
+    text-decoration:none;
+}
+#x-shortcuts dt div {
+    width:100%;
+    color:white;
+    overflow:hidden;
+    text-overflow:ellipsis;
+    cursor:pointer;
+}
+.ext-ie #x-shortcuts dt img {
+    background:transparent !important;
+}
+#x-shortcuts dt a:hover {
+    text-decoration:underline;
+}
+/* shortcuts */
+#grid-win-shortcut img {
+    width:48px;
+    height:48px;
+    background-image: url(../images/grid48x48.png);
+    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/grid48x48.png', sizingMethod='scale');
+}
+#acc-win-shortcut img {
+    width:48px;
+    height:48px;
+    background-image: url(../images/im48x48.png);
+    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/im48x48.png', sizingMethod='scale');
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/desktop.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/desktop.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/desktop.html	(revision 625)
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>ExtTop - Desktop Sample App</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="css/desktop.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+
+    <!-- DESKTOP -->
+    <script type="text/javascript" src="js/StartMenu.js"></script>
+    <script type="text/javascript" src="js/TaskBar.js"></script>
+    <script type="text/javascript" src="js/Desktop.js"></script>
+    <script type="text/javascript" src="js/App.js"></script>
+    <script type="text/javascript" src="js/Module.js"></script>
+    <script type="text/javascript" src="sample.js"></script>
+</head>
+<body scroll="no">
+
+<div id="x-desktop">
+    <a href="http://extjs.com" target="_blank" style="margin:5px; float:right;"><img src="images/powered.gif" /></a>
+
+    <dl id="x-shortcuts">
+        <dt id="grid-win-shortcut">
+            <a href="#"><img src="images/s.gif" />
+            <div>Grid Window</div></a>
+        </dt>
+        <dt id="acc-win-shortcut">
+            <a href="#"><img src="images/s.gif" />
+            <div>Accordion Window</div></a>
+        </dt>
+    </dl>
+</div>
+
+<div id="ux-taskbar">
+	<div id="ux-taskbar-start"></div>
+	<div id="ux-taskbuttons-panel"></div>
+	<div class="x-clear"></div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/App.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/App.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/App.js	(revision 625)
@@ -0,0 +1,83 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.app.App = function(cfg){
+    Ext.apply(this, cfg);
+    this.addEvents({
+        'ready' : true,
+        'beforeunload' : true
+    });
+
+    Ext.onReady(this.initApp, this);
+};
+
+Ext.extend(Ext.app.App, Ext.util.Observable, {
+    isReady: false,
+    startMenu: null,
+    modules: null,
+
+    getStartConfig : function(){
+
+    },
+
+    initApp : function(){
+    	this.startConfig = this.startConfig || this.getStartConfig();
+
+        this.desktop = new Ext.Desktop(this);
+
+		this.launcher = this.desktop.taskbar.startMenu;
+
+		this.modules = this.getModules();
+        if(this.modules){
+            this.initModules(this.modules);
+        }
+
+        this.init();
+
+        Ext.EventManager.on(window, 'beforeunload', this.onUnload, this);
+		this.fireEvent('ready', this);
+        this.isReady = true;
+    },
+
+    getModules : Ext.emptyFn,
+    init : Ext.emptyFn,
+
+    initModules : function(ms){
+		for(var i = 0, len = ms.length; i < len; i++){
+            var m = ms[i];
+            this.launcher.add(m.launcher);
+            m.app = this;
+        }
+    },
+
+    getModule : function(name){
+    	var ms = this.modules;
+    	for(var i = 0, len = ms.length; i < len; i++){
+    		if(ms[i].id == name || ms[i].appType == name){
+    			return ms[i];
+			}
+        }
+        return '';
+    },
+
+    onReady : function(fn, scope){
+        if(!this.isReady){
+            this.on('ready', fn, scope);
+        }else{
+            fn.call(scope, this);
+        }
+    },
+
+    getDesktop : function(){
+        return this.desktop;
+    },
+
+    onUnload : function(e){
+        if(this.fireEvent('beforeunload', this) === false){
+            e.stopEvent();
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Desktop.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Desktop.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Desktop.js	(revision 625)
@@ -0,0 +1,132 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.Desktop = function(app){
+	this.taskbar = new Ext.ux.TaskBar(app);
+	var taskbar = this.taskbar;
+	
+	var desktopEl = Ext.get('x-desktop');
+    var taskbarEl = Ext.get('ux-taskbar');
+    var shortcuts = Ext.get('x-shortcuts');
+
+    var windows = new Ext.WindowGroup();
+    var activeWindow;
+		
+    function minimizeWin(win){
+        win.minimized = true;
+        win.hide();
+    }
+
+    function markActive(win){
+        if(activeWindow && activeWindow != win){
+            markInactive(activeWindow);
+        }
+        taskbar.setActiveButton(win.taskButton);
+        activeWindow = win;
+        Ext.fly(win.taskButton.el).addClass('active-win');
+        win.minimized = false;
+    }
+
+    function markInactive(win){
+        if(win == activeWindow){
+            activeWindow = null;
+            Ext.fly(win.taskButton.el).removeClass('active-win');
+        }
+    }
+
+    function removeWin(win){
+    	taskbar.removeTaskButton(win.taskButton);
+        layout();
+    }
+
+    function layout(){
+        desktopEl.setHeight(Ext.lib.Dom.getViewHeight()-taskbarEl.getHeight());
+    }
+    Ext.EventManager.onWindowResize(layout);
+
+    this.layout = layout;
+
+    this.createWindow = function(config, cls){
+    	var win = new (cls||Ext.Window)(
+            Ext.applyIf(config||{}, {
+                manager: windows,
+                minimizable: true,
+                maximizable: true
+            })
+        );
+        win.render(desktopEl);
+        win.taskButton = taskbar.addTaskButton(win);
+
+        win.cmenu = new Ext.menu.Menu({
+            items: [
+
+            ]
+        });
+
+        win.animateTarget = win.taskButton.el;
+        
+        win.on({
+        	'activate': {
+        		fn: markActive
+        	},
+        	'beforeshow': {
+        		fn: markActive
+        	},
+        	'deactivate': {
+        		fn: markInactive
+        	},
+        	'minimize': {
+        		fn: minimizeWin
+        	},
+        	'close': {
+        		fn: removeWin
+        	}
+        });
+        
+        layout();
+        return win;
+    };
+
+    this.getManager = function(){
+        return windows;
+    };
+
+    this.getWindow = function(id){
+        return windows.get(id);
+    }
+    
+    this.getWinWidth = function(){
+		var width = Ext.lib.Dom.getViewWidth();
+		return width < 200 ? 200 : width;
+	}
+		
+	this.getWinHeight = function(){
+		var height = (Ext.lib.Dom.getViewHeight()-taskbarEl.getHeight());
+		return height < 100 ? 100 : height;
+	}
+		
+	this.getWinX = function(width){
+		return (Ext.lib.Dom.getViewWidth() - width) / 2
+	}
+		
+	this.getWinY = function(height){
+		return (Ext.lib.Dom.getViewHeight()-taskbarEl.getHeight() - height) / 2;
+	}
+
+    layout();
+
+    if(shortcuts){
+        shortcuts.on('click', function(e, t){
+            if(t = e.getTarget('dt', shortcuts)){
+                e.stopEvent();
+                var module = app.getModule(t.id.replace('-shortcut', ''));
+                if(module){
+                    module.createWindow();
+                }
+            }
+        });
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Module.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Module.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/Module.js	(revision 625)
@@ -0,0 +1,15 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.app.Module = function(config){
+    Ext.apply(this, config);
+    Ext.app.Module.superclass.constructor.call(this);
+    this.init();
+}
+
+Ext.extend(Ext.app.Module, Ext.util.Observable, {
+    init : Ext.emptyFn
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/StartMenu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/StartMenu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/StartMenu.js	(revision 625)
@@ -0,0 +1,249 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.StartMenu
+ * @extends Ext.menu.Menu
+ * A start menu object.
+ * @constructor
+ * Creates a new StartMenu
+ * @param {Object} config Configuration options
+ *
+ * SAMPLE USAGE:
+ *
+ * this.startMenu = new Ext.ux.StartMenu({
+ *		iconCls: 'user',
+ *		height: 300,
+ *		shadow: true,
+ *		title: get_cookie('memberName'),
+ *		width: 300
+ *	});
+ *
+ * this.startMenu.add({
+ *		text: 'Grid Window',
+ *		iconCls:'icon-grid',
+ *		handler : this.createWindow,
+ *		scope: this
+ *	});
+ *
+ * this.startMenu.addTool({
+ *		text:'Logout',
+ *		iconCls:'logout',
+ *		handler:function(){ window.location = "logout.php"; },
+ *		scope:this
+ *	});
+ */
+
+Ext.namespace("Ext.ux");
+
+Ext.ux.StartMenu = Ext.extend(Ext.menu.Menu, {
+    initComponent: function(config) {
+    	Ext.ux.StartMenu.superclass.initComponent.call(this, config);
+
+        var tools = this.toolItems;
+        this.toolItems = new Ext.util.MixedCollection();
+        if(tools){
+            this.addTool.apply(this, tools);
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ux.StartMenu.superclass.onRender.call(this, ct, position);
+        var el = this.el.addClass('ux-start-menu');
+
+        var header = el.createChild({
+        	tag: "div",
+        	cls: "x-window-header x-unselectable x-panel-icon "+this.iconCls
+        });
+
+		this.header = header;
+
+		var headerText = header.createChild({
+			tag: "span",
+			cls: "x-window-header-text"
+		});
+		var tl = header.wrap({
+			cls: "ux-start-menu-tl"
+		});
+		var tr = header.wrap({
+			cls: "ux-start-menu-tr"
+		});
+		var tc = header.wrap({
+			cls: "ux-start-menu-tc"
+		});
+
+		this.menuBWrap = el.createChild({
+			tag: "div",
+			cls: "x-window-body x-border-layout-ct ux-start-menu-body"
+		});
+		var ml = this.menuBWrap.wrap({
+			cls: "ux-start-menu-ml"
+		});
+		var mc = this.menuBWrap.wrap({
+			cls: "x-window-mc ux-start-menu-bwrap"
+		});
+
+		this.menuPanel = this.menuBWrap.createChild({
+			tag: "div",
+			cls: "x-panel x-border-panel ux-start-menu-apps-panel"
+		});
+		this.toolsPanel = this.menuBWrap.createChild({
+			tag: "div",
+			cls: "x-panel x-border-panel ux-start-menu-tools-panel"
+		});
+
+		var bwrap = ml.wrap({cls: "x-window-bwrap"});
+		var bc = bwrap.createChild({
+			tag: "div",
+			cls: "ux-start-menu-bc"
+		});
+		var bl = bc.wrap({
+			cls: "ux-start-menu-bl x-panel-nofooter"
+		});
+		var br = bc.wrap({
+			cls: "ux-start-menu-br"
+		});
+
+        this.ul.appendTo(this.menuPanel);
+
+        var toolsUl = this.toolsPanel.createChild({
+        	tag: "ul",
+        	cls: "x-menu-list"
+        });
+
+        this.mon(toolsUl, 'click', this.onClick, this);
+        this.mon(toolsUl, 'mouseover', this.onMouseOver, this);
+        this.mon(toolsUl, 'mouseout', this.onMouseOut, this);
+
+        this.items.each(function(item){
+            item.parentMenu = this;
+        }, this);
+
+        this.toolItems.each(
+        	function(item){
+	            var li = document.createElement("li");
+	            li.className = "x-menu-list-item";
+	            toolsUl.dom.appendChild(li);
+	            item.render(li);
+                item.parentMenu = this;
+	        }, this);
+
+        this.toolsUl = toolsUl;
+
+        this.menuBWrap.setStyle('position', 'relative');
+        this.menuBWrap.setHeight(this.height - 28);
+
+        this.menuPanel.setStyle({
+        	padding: '2px',
+        	position: 'absolute',
+        	overflow: 'auto'
+        });
+
+        this.toolsPanel.setStyle({
+        	padding: '2px 4px 2px 2px',
+        	position: 'absolute',
+        	overflow: 'auto'
+        });
+
+        this.setTitle(this.title);
+    },
+
+    // private
+    findTargetItem : function(e){
+        var t = e.getTarget(".x-menu-list-item", this.ul,  true);
+        if(t && t.menuItemId){
+        	if(this.items.get(t.menuItemId)){
+            	return this.items.get(t.menuItemId);
+            }else{
+            	return this.toolItems.get(t.menuItemId);
+            }
+        }
+    },
+
+    /**
+     * Displays this menu relative to another element
+     * @param {Mixed} element The element to align to
+     * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to
+     * the element (defaults to this.defaultAlign)
+     * @param {Ext.ux.StartMenu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    show : function(el, pos, parentMenu){
+        this.parentMenu = parentMenu;
+        if(!this.el){
+            this.render();
+        }
+
+        this.fireEvent("beforeshow", this);
+        this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign), parentMenu, false);
+        var tPanelWidth = 100;
+        var box = this.menuBWrap.getBox();
+        this.menuPanel.setWidth(box.width-tPanelWidth);
+        this.menuPanel.setHeight(box.height);
+
+        this.toolsPanel.setWidth(tPanelWidth);
+        this.toolsPanel.setX(box.x+box.width-tPanelWidth);
+        this.toolsPanel.setHeight(box.height);
+    },
+
+    addTool : function(){
+        var a = arguments, l = a.length, item;
+        for(var i = 0; i < l; i++){
+            var el = a[i];
+            if(el.render){ // some kind of Item
+                item = this.addToolItem(el);
+            }else if(typeof el == "string"){ // string
+                if(el == "separator" || el == "-"){
+                    item = this.addToolSeparator();
+                }else{
+                    item = this.addText(el);
+                }
+            }else if(el.tagName || el.el){ // element
+                item = this.addElement(el);
+            }else if(typeof el == "object"){ // must be menu item config?
+                item = this.addToolMenuItem(el);
+            }
+        }
+        return item;
+    },
+
+    /**
+     * Adds a separator bar to the Tools
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addToolSeparator : function(){
+        return this.addToolItem(new Ext.menu.Separator({itemCls: 'ux-toolmenu-sep'}));
+    },
+
+    addToolItem : function(item){
+        this.toolItems.add(item);
+        if(this.ul){
+            var li = document.createElement("li");
+            li.className = "x-menu-list-item";
+            this.ul.dom.appendChild(li);
+            item.render(li, this);
+            this.delayAutoWidth();
+        }
+        return item;
+    },
+
+    addToolMenuItem : function(config){
+        if(!(config instanceof Ext.menu.Item)){
+            if(typeof config.checked == "boolean"){ // must be check menu item config?
+                config = new Ext.menu.CheckItem(config);
+            }else{
+                config = new Ext.menu.Item(config);
+            }
+        }
+        return this.addToolItem(config);
+    },
+
+    setTitle : function(title, iconCls){
+        this.title = title;
+        this.header.child('span').update(title);
+        return this;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/TaskBar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/TaskBar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/js/TaskBar.js	(revision 625)
@@ -0,0 +1,472 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.TaskBar
+ * @extends Ext.util.Observable
+ */
+Ext.ux.TaskBar = function(app){
+    this.app = app;
+    this.init();
+}
+
+Ext.extend(Ext.ux.TaskBar, Ext.util.Observable, {
+    init : function(){
+		this.startMenu = new Ext.ux.StartMenu(Ext.apply({
+			iconCls: 'user',
+			height: 300,
+			shadow: true,
+			title: 'Jack Slocum',
+			width: 300
+		}, this.app.startConfig));
+		
+		this.startBtn = new Ext.Button({
+            text: 'Start',
+            id: 'ux-startbutton',
+            iconCls:'start',
+            menu: this.startMenu,
+            menuAlign: 'bl-tl',
+            renderTo: 'ux-taskbar-start',
+            clickEvent: 'mousedown',
+            template: new Ext.Template(
+				'<table cellspacing="0" class="x-btn {3}"><tbody><tr>',
+				'<td class="ux-startbutton-left"><i>&#160;</i></td>',
+                '<td class="ux-startbutton-center"><em class="{5} unselectable="on">',
+                    '<button class="x-btn-text {2}" type="{1}" style="height:30px;">{0}</button>',
+                '</em></td>',
+                '<td class="ux-startbutton-right"><i>&#160;</i></td>',
+				"</tr></tbody></table>")
+        });
+
+        var width = this.startBtn.getEl().getWidth()+10;
+        
+        var sbBox = new Ext.BoxComponent({
+			el: 'ux-taskbar-start',
+	        id: 'TaskBarStart',
+	        minWidth: width,
+			region:'west',
+			split: true,
+			width: width
+		});
+		
+		this.tbPanel = new Ext.ux.TaskButtonsPanel({
+			el: 'ux-taskbuttons-panel',
+			id: 'TaskBarButtons',
+			region:'center'
+		});
+				
+        var container = new Ext.ux.TaskBarContainer({
+			el: 'ux-taskbar',
+			layout: 'border',
+			items: [sbBox,this.tbPanel]
+		});
+		
+		return this;
+    },
+    
+    addTaskButton : function(win){
+		return this.tbPanel.addButton(win, 'ux-taskbuttons-panel');
+	},
+	
+	removeTaskButton : function(btn){
+		this.tbPanel.removeButton(btn);
+	},
+	
+	setActiveButton : function(btn){
+		this.tbPanel.setActiveButton(btn);
+	}
+});
+
+
+
+/**
+ * @class Ext.ux.TaskBarContainer
+ * @extends Ext.Container
+ */
+Ext.ux.TaskBarContainer = Ext.extend(Ext.Container, {
+    initComponent : function() {
+        Ext.ux.TaskBarContainer.superclass.initComponent.call(this);
+        
+        this.el = Ext.get(this.el) || Ext.getBody();
+        this.el.setHeight = Ext.emptyFn;
+        this.el.setWidth = Ext.emptyFn;
+        this.el.setSize = Ext.emptyFn;
+        this.el.setStyle({
+            overflow:'hidden',
+            margin:'0',
+            border:'0 none'
+        });
+        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(w, h){
+        this.fireEvent('resize', this, w, h, w, h);
+    }
+});
+
+
+
+/**
+ * @class Ext.ux.TaskButtonsPanel
+ * @extends Ext.BoxComponent
+ */
+Ext.ux.TaskButtonsPanel = Ext.extend(Ext.BoxComponent, {
+	activeButton: null,
+	enableScroll: true,
+	scrollIncrement: 0,
+    scrollRepeatInterval: 400,
+    scrollDuration: .35,
+    animScroll: true,
+    resizeButtons: true,
+    buttonWidth: 168,
+    minButtonWidth: 118,
+    buttonMargin: 2,
+    buttonWidthSet: false,
+	
+	initComponent : function() {
+        Ext.ux.TaskButtonsPanel.superclass.initComponent.call(this);
+        this.on('resize', this.delegateUpdates);
+        this.items = [];
+        
+        this.stripWrap = Ext.get(this.el).createChild({
+        	cls: 'ux-taskbuttons-strip-wrap',
+        	cn: {
+            	tag:'ul', cls:'ux-taskbuttons-strip'
+            }
+		});
+        this.stripSpacer = Ext.get(this.el).createChild({
+        	cls:'ux-taskbuttons-strip-spacer'
+        });
+        this.strip = new Ext.Element(this.stripWrap.dom.firstChild);
+        
+        this.edge = this.strip.createChild({
+        	tag:'li',
+        	cls:'ux-taskbuttons-edge'
+        });
+        this.strip.createChild({
+        	cls:'x-clear'
+        });
+	},
+	
+	addButton : function(win){
+		var li = this.strip.createChild({tag:'li'}, this.edge); // insert before the edge
+        var btn = new Ext.ux.TaskBar.TaskButton(win, li);
+		
+		this.items.push(btn);
+		
+		if(!this.buttonWidthSet){
+			this.lastButtonWidth = btn.container.getWidth();
+		}
+		
+		this.setActiveButton(btn);
+		return btn;
+	},
+	
+	removeButton : function(btn){
+		var li = document.getElementById(btn.container.id);
+		btn.destroy();
+		li.parentNode.removeChild(li);
+		
+		var s = [];
+		for(var i = 0, len = this.items.length; i < len; i++) {
+			if(this.items[i] != btn){
+				s.push(this.items[i]);
+			}
+		}
+		this.items = s;
+		
+		this.delegateUpdates();
+	},
+	
+	setActiveButton : function(btn){
+		this.activeButton = btn;
+		this.delegateUpdates();
+	},
+	
+	delegateUpdates : function(){
+		/*if(this.suspendUpdates){
+            return;
+        }*/
+        if(this.resizeButtons && this.rendered){
+            this.autoSize();
+        }
+        if(this.enableScroll && this.rendered){
+            this.autoScroll();
+        }
+    },
+    
+    autoSize : function(){
+        var count = this.items.length;
+        var ow = this.el.dom.offsetWidth;
+        var aw = this.el.dom.clientWidth;
+
+        if(!this.resizeButtons || count < 1 || !aw){ // !aw for display:none
+            return;
+        }
+        
+        var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.buttonMargin, this.buttonWidth), this.minButtonWidth); // -4 for float errors in IE
+        var btns = this.stripWrap.dom.getElementsByTagName('button');
+        
+        this.lastButtonWidth = Ext.get(btns[0].id).findParent('li').offsetWidth;
+        
+        for(var i = 0, len = btns.length; i < len; i++) {            
+            var btn = btns[i];
+            
+            var tw = Ext.get(btns[i].id).findParent('li').offsetWidth;
+            var iw = btn.offsetWidth;
+            
+            btn.style.width = (each - (tw-iw)) + 'px';
+        }
+    },
+    
+    autoScroll : function(){
+    	var count = this.items.length;
+        var ow = this.el.dom.offsetWidth;
+        var tw = this.el.dom.clientWidth;
+        
+        var wrap = this.stripWrap;
+        var cw = wrap.dom.offsetWidth;
+        var pos = this.getScrollPos();
+        var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos;
+        
+        if(!this.enableScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues
+            return;
+        }
+        
+        wrap.setWidth(tw); // moved to here because of problem in Safari
+        
+        if(l <= tw){
+            wrap.dom.scrollLeft = 0;
+            //wrap.setWidth(tw); moved from here because of problem in Safari
+            if(this.scrolling){
+                this.scrolling = false;
+                this.el.removeClass('x-taskbuttons-scrolling');
+                this.scrollLeft.hide();
+                this.scrollRight.hide();
+            }
+        }else{
+            if(!this.scrolling){
+                this.el.addClass('x-taskbuttons-scrolling');
+            }
+            tw -= wrap.getMargins('lr');
+            wrap.setWidth(tw > 20 ? tw : 20);
+            if(!this.scrolling){
+                if(!this.scrollLeft){
+                    this.createScrollers();
+                }else{
+                    this.scrollLeft.show();
+                    this.scrollRight.show();
+                }
+            }
+            this.scrolling = true;
+            if(pos > (l-tw)){ // ensure it stays within bounds
+                wrap.dom.scrollLeft = l-tw;
+            }else{ // otherwise, make sure the active button is still visible
+				this.scrollToButton(this.activeButton, true); // true to animate
+            }
+            this.updateScrollButtons();
+        }
+    },
+
+    createScrollers : function(){
+        var h = this.el.dom.offsetHeight; //var h = this.stripWrap.dom.offsetHeight;
+		
+        // left
+        var sl = this.el.insertFirst({
+            cls:'ux-taskbuttons-scroller-left'
+        });
+        sl.setHeight(h);
+        sl.addClassOnOver('ux-taskbuttons-scroller-left-over');
+        this.leftRepeater = new Ext.util.ClickRepeater(sl, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollLeft,
+            scope: this
+        });
+        this.scrollLeft = sl;
+
+        // right
+        var sr = this.el.insertFirst({
+            cls:'ux-taskbuttons-scroller-right'
+        });
+        sr.setHeight(h);
+        sr.addClassOnOver('ux-taskbuttons-scroller-right-over');
+        this.rightRepeater = new Ext.util.ClickRepeater(sr, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollRight,
+            scope: this
+        });
+        this.scrollRight = sr;
+    },
+    
+    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.lastButtonWidth+2);
+    },
+    
+    /* getBtnEl : function(item){
+        return document.getElementById(item.id);
+    }, */
+    
+    scrollToButton : function(item, animate){
+    	item = item.el.dom.parentNode; // li
+        if(!item){ return; }
+        var el = item; //this.getBtnEl(item);
+        var pos = this.getScrollPos(), area = this.getScrollArea();
+        var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos;
+        var right = left + el.offsetWidth;
+        if(left < pos){
+            this.scrollTo(left, animate);
+        }else if(right > (pos + area)){
+            this.scrollTo(right - area, animate);
+        }
+    },
+    
+    scrollTo : function(pos, animate){
+        this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false);
+        if(!animate){
+            this.updateScrollButtons();
+        }
+    },
+    
+    onScrollRight : function(){
+        var sw = this.getScrollWidth()-this.getScrollArea();
+        var pos = this.getScrollPos();
+        var s = Math.min(sw, pos + this.getScrollIncrement());
+        if(s != pos){
+        	this.scrollTo(s, this.animScroll);
+        }        
+    },
+
+    onScrollLeft : function(){
+        var pos = this.getScrollPos();
+        var s = Math.max(0, pos - this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+    
+    updateScrollButtons : function(){
+        var pos = this.getScrollPos();
+        this.scrollLeft[pos == 0 ? 'addClass' : 'removeClass']('ux-taskbuttons-scroller-left-disabled');
+        this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('ux-taskbuttons-scroller-right-disabled');
+    }
+});
+
+
+
+/**
+ * @class Ext.ux.TaskBar.TaskButton
+ * @extends Ext.Button
+ */
+Ext.ux.TaskBar.TaskButton = function(win, el){
+	this.win = win;
+    Ext.ux.TaskBar.TaskButton.superclass.constructor.call(this, {
+        iconCls: win.iconCls,
+        text: Ext.util.Format.ellipsis(win.title, 12),
+        renderTo: el,
+        handler : function(){
+            if(win.minimized || win.hidden){
+                win.show();
+            }else if(win == win.manager.getActive()){
+                win.minimize();
+            }else{
+                win.toFront();
+            }
+        },
+        clickEvent:'mousedown',
+        template: new Ext.Template(
+			'<table cellspacing="0" class="x-btn {3}"><tbody><tr>',
+			'<td class="ux-taskbutton-left"><i>&#160;</i></td>',
+            '<td class="ux-taskbutton-center"><em class="{5} unselectable="on">',
+                '<button class="x-btn-text {2}" type="{1}" style="height:28px;">{0}</button>',
+            '</em></td>',
+            '<td class="ux-taskbutton-right"><i>&#160;</i></td>',
+			"</tr></tbody></table>")            
+    });
+};
+
+Ext.extend(Ext.ux.TaskBar.TaskButton, Ext.Button, {
+    onRender : function(){
+        Ext.ux.TaskBar.TaskButton.superclass.onRender.apply(this, arguments);
+
+        this.cmenu = new Ext.menu.Menu({
+            items: [{
+                text: 'Restore',
+                handler: function(){
+                    if(!this.win.isVisible()){
+                        this.win.show();
+                    }else{
+                        this.win.restore();
+                    }
+                },
+                scope: this
+            },{
+                text: 'Minimize',
+                handler: this.win.minimize,
+                scope: this.win
+            },{
+                text: 'Maximize',
+                handler: this.win.maximize,
+                scope: this.win
+            }, '-', {
+                text: 'Close',
+                handler: this.closeWin.createDelegate(this, this.win, true),
+                scope: this.win
+            }]
+        });
+
+        this.cmenu.on('beforeshow', function(){
+            var items = this.cmenu.items.items;
+            var w = this.win;
+            items[0].setDisabled(w.maximized !== true && w.hidden !== true);
+            items[1].setDisabled(w.minimized === true);
+            items[2].setDisabled(w.maximized === true || w.hidden === true);
+        }, this);
+
+        this.el.on('contextmenu', function(e){
+            e.stopEvent();
+            if(!this.cmenu.el){
+                this.cmenu.render();
+            }
+            var xy = e.getXY();
+            xy[1] -= this.cmenu.el.getHeight();
+            this.cmenu.showAt(xy);
+        }, this);
+    },
+    
+    closeWin : function(cMenu, e, win){
+		if(!win.isVisible()){
+			win.show();
+		}else{
+			win.restore();
+		}
+		win.close();
+	}
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/sample.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/sample.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/desktop/sample.js	(revision 625)
@@ -0,0 +1,423 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// Sample desktop configuration
+MyDesktop = new Ext.app.App({
+	init :function(){
+		Ext.QuickTips.init();
+	},
+
+	getModules : function(){
+		return [
+			new MyDesktop.GridWindow(),
+            new MyDesktop.TabWindow(),
+            new MyDesktop.AccordionWindow(),
+            new MyDesktop.BogusMenuModule(),
+            new MyDesktop.BogusModule()
+		];
+	},
+
+    // config for the start menu
+    getStartConfig : function(){
+        return {
+            title: 'Jack Slocum',
+            iconCls: 'user',
+            toolItems: [{
+                text:'Settings',
+                iconCls:'settings',
+                scope:this
+            },'-',{
+                text:'Logout',
+                iconCls:'logout',
+                scope:this
+            }]
+        };
+    }
+});
+
+
+
+/*
+ * Example windows
+ */
+MyDesktop.GridWindow = Ext.extend(Ext.app.Module, {
+    id:'grid-win',
+    init : function(){
+        this.launcher = {
+            text: 'Grid Window',
+            iconCls:'icon-grid',
+            handler : this.createWindow,
+            scope: this
+        }
+    },
+
+    createWindow : function(){
+        var desktop = this.app.getDesktop();
+        var win = desktop.getWindow('grid-win');
+        if(!win){
+            win = desktop.createWindow({
+                id: 'grid-win',
+                title:'Grid Window',
+                width:740,
+                height:480,
+                iconCls: 'icon-grid',
+                shim:false,
+                animCollapse:false,
+                constrainHeader:true,
+
+                layout: 'fit',
+                items:
+                    new Ext.grid.GridPanel({
+                        border:false,
+                        ds: new Ext.data.Store({
+                            reader: new Ext.data.ArrayReader({}, [
+                               {name: 'company'},
+                               {name: 'price', type: 'float'},
+                               {name: 'change', type: 'float'},
+                               {name: 'pctChange', type: 'float'}
+                            ]),
+                            data: Ext.grid.dummyData
+                        }),
+                        cm: new Ext.grid.ColumnModel([
+                            new Ext.grid.RowNumberer(),
+                            {header: "Company", width: 120, sortable: true, dataIndex: 'company'},
+                            {header: "Price", width: 70, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+                            {header: "Change", width: 70, sortable: true, dataIndex: 'change'},
+                            {header: "% Change", width: 70, sortable: true, dataIndex: 'pctChange'}
+                        ]),
+
+                        viewConfig: {
+                            forceFit:true
+                        },
+                        //autoExpandColumn:'company',
+
+                        tbar:[{
+                            text:'Add Something',
+                            tooltip:'Add a new row',
+                            iconCls:'add'
+                        }, '-', {
+                            text:'Options',
+                            tooltip:'Blah blah blah blaht',
+                            iconCls:'option'
+                        },'-',{
+                            text:'Remove Something',
+                            tooltip:'Remove the selected item',
+                            iconCls:'remove'
+                        }]
+                    })
+            });
+        }
+        win.show();
+    }
+});
+
+
+
+MyDesktop.TabWindow = Ext.extend(Ext.app.Module, {
+    id:'tab-win',
+    init : function(){
+        this.launcher = {
+            text: 'Tab Window',
+            iconCls:'tabs',
+            handler : this.createWindow,
+            scope: this
+        }
+    },
+
+    createWindow : function(){
+        var desktop = this.app.getDesktop();
+        var win = desktop.getWindow('tab-win');
+        if(!win){
+            win = desktop.createWindow({
+                id: 'tab-win',
+                title:'Tab Window',
+                width:740,
+                height:480,
+                iconCls: 'tabs',
+                shim:false,
+                animCollapse:false,
+                border:false,
+                constrainHeader:true,
+
+                layout: 'fit',
+                items:
+                    new Ext.TabPanel({
+                        activeTab:0,
+
+                        items: [{
+                            title: 'Tab Text 1',
+                            header:false,
+                            html : '<p>Something useful would be in here.</p>',
+                            border:false
+                        },{
+                            title: 'Tab Text 2',
+                            header:false,
+                            html : '<p>Something useful would be in here.</p>',
+                            border:false
+                        },{
+                            title: 'Tab Text 3',
+                            header:false,
+                            html : '<p>Something useful would be in here.</p>',
+                            border:false
+                        },{
+                            title: 'Tab Text 4',
+                            header:false,
+                            html : '<p>Something useful would be in here.</p>',
+                            border:false
+                        }]
+                    })
+            });
+        }
+        win.show();
+    }
+});
+
+
+
+MyDesktop.AccordionWindow = Ext.extend(Ext.app.Module, {
+    id:'acc-win',
+    init : function(){
+        this.launcher = {
+            text: 'Accordion Window',
+            iconCls:'accordion',
+            handler : this.createWindow,
+            scope: this
+        }
+    },
+
+    createWindow : function(){
+        var desktop = this.app.getDesktop();
+        var win = desktop.getWindow('acc-win');
+        if(!win){
+            win = desktop.createWindow({
+                id: 'acc-win',
+                title: 'Accordion Window',
+                width:250,
+                height:400,
+                iconCls: 'accordion',
+                shim:false,
+                animCollapse:false,
+                constrainHeader:true,
+
+                tbar:[{
+                    tooltip:{title:'Rich Tooltips', text:'Let your users know what they can do!'},
+                    iconCls:'connect'
+                },'-',{
+                    tooltip:'Add a new user',
+                    iconCls:'user-add'
+                },' ',{
+                    tooltip:'Remove the selected user',
+                    iconCls:'user-delete'
+                }],
+
+                layout:'accordion',
+                border:false,
+                layoutConfig: {
+                    animate:false
+                },
+
+                items: [
+                    new Ext.tree.TreePanel({
+                        id:'im-tree',
+                        title: 'Online Users',
+                        loader: new Ext.tree.TreeLoader(),
+                        rootVisible:false,
+                        lines:false,
+                        autoScroll:true,
+                        tools:[{
+                            id:'refresh',
+                            on:{
+                                click: function(){
+                                    var tree = Ext.getCmp('im-tree');
+                                    tree.body.mask('Loading', 'x-mask-loading');
+                                    tree.root.reload();
+                                    tree.root.collapse(true, false);
+                                    setTimeout(function(){ // mimic a server call
+                                        tree.body.unmask();
+                                        tree.root.expand(true, true);
+                                    }, 1000);
+                                }
+                            }
+                        }],
+                        root: new Ext.tree.AsyncTreeNode({
+                            text:'Online',
+                            children:[{
+                                text:'Friends',
+                                expanded:true,
+                                children:[{
+                                    text:'Jack',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Brian',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Jon',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Tim',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Nige',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Fred',
+                                    iconCls:'user',
+                                    leaf:true
+                                },{
+                                    text:'Bob',
+                                    iconCls:'user',
+                                    leaf:true
+                                }]
+                            },{
+                                text:'Family',
+                                expanded:true,
+                                children:[{
+                                    text:'Kelly',
+                                    iconCls:'user-girl',
+                                    leaf:true
+                                },{
+                                    text:'Sara',
+                                    iconCls:'user-girl',
+                                    leaf:true
+                                },{
+                                    text:'Zack',
+                                    iconCls:'user-kid',
+                                    leaf:true
+                                },{
+                                    text:'John',
+                                    iconCls:'user-kid',
+                                    leaf:true
+                                }]
+                            }]
+                        })
+                    }), {
+                        title: 'Settings',
+                        html:'<p>Something useful would be in here.</p>',
+                        autoScroll:true
+                    },{
+                        title: 'Even More Stuff',
+                        html : '<p>Something useful would be in here.</p>'
+                    },{
+                        title: 'My Stuff',
+                        html : '<p>Something useful would be in here.</p>'
+                    }
+                ]
+            });
+        }
+        win.show();
+    }
+});
+
+// for example purposes
+var windowIndex = 0;
+
+MyDesktop.BogusModule = Ext.extend(Ext.app.Module, {
+    init : function(){
+        this.launcher = {
+            text: 'Window '+(++windowIndex),
+            iconCls:'bogus',
+            handler : this.createWindow,
+            scope: this,
+            windowId:windowIndex
+        }
+    },
+
+    createWindow : function(src){
+        var desktop = this.app.getDesktop();
+        var win = desktop.getWindow('bogus'+src.windowId);
+        if(!win){
+            win = desktop.createWindow({
+                id: 'bogus'+src.windowId,
+                title:src.text,
+                width:640,
+                height:480,
+                html : '<p>Something useful would be in here.</p>',
+                iconCls: 'bogus',
+                shim:false,
+                animCollapse:false,
+                constrainHeader:true
+            });
+        }
+        win.show();
+    }
+});
+
+
+MyDesktop.BogusMenuModule = Ext.extend(MyDesktop.BogusModule, {
+    init : function(){
+        this.launcher = {
+            text: 'Bogus Submenu',
+            iconCls: 'bogus',
+            handler: function() {
+				return false;
+			},
+            menu: {
+                items:[{
+                    text: 'Bogus Window '+(++windowIndex),
+                    iconCls:'bogus',
+                    handler : this.createWindow,
+                    scope: this,
+                    windowId: windowIndex
+                    },{
+                    text: 'Bogus Window '+(++windowIndex),
+                    iconCls:'bogus',
+                    handler : this.createWindow,
+                    scope: this,
+                    windowId: windowIndex
+                    },{
+                    text: 'Bogus Window '+(++windowIndex),
+                    iconCls:'bogus',
+                    handler : this.createWindow,
+                    scope: this,
+                    windowId: windowIndex
+                    },{
+                    text: 'Bogus Window '+(++windowIndex),
+                    iconCls:'bogus',
+                    handler : this.createWindow,
+                    scope: this,
+                    windowId: windowIndex
+                    },{
+                    text: 'Bogus Window '+(++windowIndex),
+                    iconCls:'bogus',
+                    handler : this.createWindow,
+                    scope: this,
+                    windowId: windowIndex
+                }]
+            }
+        }
+    }
+});
+
+
+// Array data for the grid
+Ext.grid.dummyData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+    ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+    ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+    ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+    ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+    ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+    ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+    ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+    ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+    ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+    ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+    ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+    ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+    ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+    ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+    ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am'],
+    ['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am']
+];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.js	(revision 625)
@@ -0,0 +1,146 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// This example illustrates how to load a FormPanel or BasicForm through Ext.Direct.
+
+Ext.onReady(function(){
+    // Notice that Direct requests will batch together if they occur
+    // within the enableBuffer delay period (in milliseconds).
+    // Slow the buffering down from the default of 10ms to 100ms
+    Ext.app.REMOTING_API.enableBuffer = 100;
+    Ext.Direct.addProvider(Ext.app.REMOTING_API);
+    
+    // provide feedback for any errors
+    Ext.QuickTips.init();
+    
+    var basicInfo = new Ext.form.FormPanel({
+        // configs for FormPanel
+        title: 'Basic Information',
+        border: false,
+        padding: 10,
+        buttons:[{
+            text: 'Submit',
+            handler: function(){
+                basicInfo.getForm().submit({
+                    params: {
+                        foo: 'bar',
+                        uid: 34 
+                    }
+                });
+            }
+        }],
+
+        // configs apply to child items
+        defaults: {anchor: '-20'}, // provide some room on right for validation errors
+        defaultType: 'textfield',
+        items: [{
+            fieldLabel: 'Name',
+            name: 'name'
+        },{
+            fieldLabel: 'Email',
+            msgTarget: 'side',
+            name: 'email'        
+        },{
+            fieldLabel: 'Company',
+            name: 'company'
+        }],
+        
+        // configs for BasicForm
+        api: {
+            // The server-side method to call for load() requests
+            load: Profile.getBasicInfo,
+            // The server-side must mark the submit handler as a 'formHandler'
+            submit: Profile.updateBasicInfo
+        },
+        // specify the order for the passed params    
+        paramOrder: ['uid', 'foo']
+    });
+    
+    var phoneInfo = new Ext.form.FormPanel({
+        title: 'Phone Numbers',
+        border: false,
+        api: {
+            load: Profile.getPhoneInfo
+        },    
+        padding: 10,
+        paramOrder: ['uid'],
+        defaultType: 'textfield',
+        defaults: {anchor: '100%'},
+        items: [{
+            fieldLabel: 'Office',
+            name: 'office'
+        },{
+            fieldLabel: 'Cell',
+            name: 'cell'        
+        },{
+            fieldLabel: 'Home',
+            name: 'home'
+        }]
+    });
+    
+     var locationInfo = new Ext.form.FormPanel({
+        title: 'Location Information',
+        border: false,
+        padding: 10,
+        api: {
+            load: Profile.getLocationInfo
+        },    
+        paramOrder: ['uid'],
+        defaultType: 'textfield',
+        defaults: {anchor: '100%'},
+        items: [{
+            fieldLabel: 'Street',
+            name: 'street'
+        },{
+            fieldLabel: 'City',
+            name: 'city'            
+        },{
+            fieldLabel: 'State',
+            name: 'state'
+        },{
+            fieldLabel: 'Zip',
+            name: 'zip'
+        }]
+    });    
+
+     var accordion = new Ext.Panel({
+        layout: 'accordion',
+        renderTo: Ext.getBody(),
+        title: 'My Profile',
+        width: 300,
+        height: 240,    
+        items: [basicInfo, phoneInfo, locationInfo]
+    });
+        
+    // load the forms (notice the load requests will get batched together)
+    basicInfo.getForm().load({
+        // pass 2 arguments to server side getBasicInfo method (len=2)
+        params: {
+            foo: 'bar',
+            uid: 34 
+        }
+    });
+
+    phoneInfo.getForm().load({
+        params: {
+            uid: 5
+        }
+    });    
+
+    // defer this request just to simulate the request not getting batched
+    // since it exceeds to configured buffer
+    (function(){
+        locationInfo.getForm().load({
+            params: {
+                uid: 5
+            }
+        });
+    }).defer(200);    
+    
+    // rpc call
+    TestAction.doEcho('sample');
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-form.php	(revision 625)
@@ -0,0 +1,29 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Ext.Direct Form Integration</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script language="javascript" src="direct-form.js"></script>
+	<script type="text/javascript" src="php/api.php"></script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Ext.Direct Form Integration</h1>
+
+<p>The js is not minified so it is readable. See <a href="direct-form.js">direct-form.js</a>.</p>
+
+<p>The following example illustrates how to load a FormPanel or BasicForm through Ext.Direct.</p>
+<p>Notice that Direct requests will batch together if they occur within the enableBuffer delay period (in milliseconds).</p>
+<p>The Ext.Direct Form api also supports submit in addition to load. The server-side must mark the submit handler as a 'formHandler' and will not be batched.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.js	(revision 625)
@@ -0,0 +1,29 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.Direct.addProvider(Ext.app.REMOTING_API);
+
+    var tree = new Ext.tree.TreePanel({
+        width: 400,
+        height: 400,
+        autoScroll: true,
+        renderTo: document.body,
+        root: {
+            id: 'root',
+            text: 'Root'
+        },
+        loader: new Ext.tree.TreeLoader({
+            directFn: TestAction.getTree
+        }),
+        fbar: [{
+            text: 'Reload root',
+            handler: function(){
+                tree.getRootNode().reload();
+            }
+        }]
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct-tree.php	(revision 625)
@@ -0,0 +1,30 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Ext.Direct TreeLoader</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="direct-tree.js"></script>
+
+	<script type="text/javascript" src="php/api.php"></script>
+	
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Ext.Direct Remoting With Tree</h1>
+
+<p>The js is not minified so it is readable. See <a href="direct-tree.js">direct-tree.js</a>.</p>
+
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.js	(revision 625)
@@ -0,0 +1,88 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.Direct.addProvider(
+        Ext.app.REMOTING_API,
+        {
+            type:'polling',
+            url: 'php/poll.php'
+        }
+    );
+
+    var out = new Ext.form.DisplayField({
+        cls: 'x-form-text',
+        id: 'out'
+    });
+
+    var text = new Ext.form.TextField({
+        width: 300,
+        emptyText: 'Echo input'
+    });
+
+    var call = new Ext.Button({
+        text: 'Echo',
+        handler: function(){
+            TestAction.doEcho(text.getValue(), function(result, e){
+                var t = e.getTransaction();
+                out.append(String.format('<p><b>Successful call to {0}.{1} with response:</b><xmp>{2}</xmp></p>',
+                       t.action, t.method, Ext.encode(result)));
+                out.el.scroll('b', 100000, true);
+            });
+        }
+    });
+
+    var num = new Ext.form.TextField({
+        width: 80,
+        emptyText: 'Multiply x 8',
+        style:  'text-align:left;'
+    });
+
+    var multiply = new Ext.Button({
+        text: 'Multiply',
+        handler: function(){
+            TestAction.multiply(num.getValue(), function(result, e){
+                var t = e.getTransaction();
+                if(e.status){
+                    out.append(String.format('<p><b>Successful call to {0}.{1} with response:</b><xmp>{2}</xmp></p>',
+                        t.action, t.method, Ext.encode(result)));
+                }else{
+                    out.append(String.format('<p><b>Call to {0}.{1} failed with message:</b><xmp>{2}</xmp></p>',
+                        t.action, t.method, e.message));
+                }
+                out.el.scroll('b', 100000, true);
+            });
+        }
+    });
+
+    text.on('specialkey', function(t, e){
+        if(e.getKey() == e.ENTER){
+            call.handler();
+        }
+    });
+
+	num.on('specialkey', function(t, e){
+        if(e.getKey() == e.ENTER){
+            multiply.handler();
+        }
+    });
+
+	var p = new Ext.Panel({
+        title: 'Remote Call Log',
+        //frame:true,
+		width: 600,
+		height: 300,
+		layout:'fit',
+		
+		items: [out],
+        bbar: [text, call, '-', num, multiply]
+	}).render(Ext.getBody());
+
+    Ext.Direct.on('message', function(e){
+        out.append(String.format('<p><i>{0}</i></p>', e.data));
+                out.el.scroll('b', 100000, true);
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/direct.php	(revision 625)
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Ext.Direct</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="direct.js"></script>
+
+	<script type="text/javascript" src="php/api.php"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        #out {
+            padding: 5px;
+            overflow:auto;
+            border-width:0;
+        }
+        #out b {
+            color:#555;
+        }
+        #out xmp {
+            margin: 5px;
+        }
+        #out p {
+            margin:0;
+        }
+}
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Ext.Direct Generic Remoting</h1>
+
+<p>The js is not minified so it is readable. See <a href="direct.js">direct.js</a>.</p>
+
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/api.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/api.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/api.php	(revision 625)
@@ -0,0 +1,31 @@
+<?php
+require('config.php');
+header('Content-Type: text/javascript');
+
+// convert API config to Ext.Direct spec
+$actions = array();
+foreach($API as $aname=>&$a){
+	$methods = array();
+	foreach($a['methods'] as $mname=>&$m){
+		$md = array(
+			'name'=>$mname,
+			'len'=>$m['len']
+		);
+		if(isset($m['formHandler']) && $m['formHandler']){
+			$md['formHandler'] = true;
+		}
+		$methods[] = $md;
+	}
+	$actions[$aname] = $methods;
+}
+
+$cfg = array(
+    'url'=>'php/router.php',
+    'type'=>'remoting',
+	'actions'=>$actions
+);
+
+echo 'Ext.app.REMOTING_API = ';
+
+echo json_encode($cfg);
+echo ';';
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/Profile.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/Profile.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/Profile.php	(revision 625)
@@ -0,0 +1,68 @@
+<?php
+class Profile {
+
+    /**
+    * Handler for client side form sumbit
+    * @param Array $formPacket Collection of form items along with direct data
+    * @return Array response packet
+    */
+    function updateBasicInfo($formPacket){
+        $response = array();
+        $email = $formPacket['email'];
+        if ($email == 'aaron@extjs.com') {
+            $success = false;
+            $response['errors'] = array(
+                'email'=>'already taken'
+            );
+        } else {
+            $success = true;
+        }
+        $response['success'] = $success;
+        // return form packet for demonstration/testing purposes
+        $response['debug_formPacket'] = $formPacket;
+        return $response;
+    }
+
+    /**
+    * put your comment there...
+    * This method configured with len=2, so 2 arguments will be sent
+    * in the order according to the client side specified paramOrder
+    * @param Number $userId
+    * @param String $foo
+    * @return Array response packet
+    */
+    function getBasicInfo($userId, $foo){
+        return array(
+            'success'=>true,
+            'data'=>array(
+                'foo'=>$foo,
+                'name'=>'Aaron Conran',
+                'company'=>'Ext JS, LLC',
+                'email'=>'aaron@extjs.com'
+             )
+        );
+    }
+
+    function getPhoneInfo($userId) {
+        return array(
+            'success'=>true,
+            'data'=>array(
+                'cell'=>'443-555-1234',
+                'office'=>'1-800-CALLEXT',
+                'home'=>''
+            )
+        );
+    }
+
+    function getLocationInfo($userId) {
+        return array(
+            'success'=>true,
+            'data'=>array(
+                'street'=>'1234 Red Dog Rd.',
+                'city'=>'Seminole',
+                'state'=>'FL',
+                'zip'=>33776
+            )
+        );
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/TestAction.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/TestAction.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/classes/TestAction.php	(revision 625)
@@ -0,0 +1,36 @@
+<?php
+class TestAction {
+    function doEcho($data){
+        return $data;
+    }
+
+    function multiply($num){
+        if(!is_numeric($num)){
+            throw new Exception('Call to multiply with a value that is not a number');
+        }
+        return $num*8;
+    }
+
+    function getTree($id){
+        $out = array();
+        if($id == "root"){
+        	for($i = 1; $i <= 5; ++$i){
+        	    array_push($out, array(
+        	    	'id'=>'n' . $i,
+        	    	'text'=>'Node ' . $i,
+        	    	'leaf'=>false
+        	    ));
+        	}
+        }else if(strlen($id) == 2){
+        	$num = substr($id, 1);
+        	for($i = 1; $i <= 5; ++$i){
+        	    array_push($out, array(
+        	    	'id'=>$id . $i,
+        	    	'text'=>'Node ' . $num . '.' . $i,
+        	    	'leaf'=>true
+        	    ));
+        	}
+        }
+        return $out;
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/config.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/config.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/config.php	(revision 625)
@@ -0,0 +1,34 @@
+<?php
+$API = array(
+    'TestAction'=>array(
+        'methods'=>array(
+            'doEcho'=>array(
+                'len'=>1
+            ),
+            'multiply'=>array(
+                'len'=>1
+            ),
+            'getTree'=>array(
+                    'len'=>1
+            )
+        )
+    ),
+
+    'Profile'=>array(
+        'methods'=>array(
+            'getBasicInfo'=>array(
+                'len'=>2
+            ),
+            'getPhoneInfo'=>array(
+                'len'=>1
+            ),
+            'getLocationInfo'=>array(
+                'len'=>1
+            ),
+            'updateBasicInfo'=>array(
+                'len'=>2,
+                'formHandler'=>true
+            )
+        )
+    )
+);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/poll.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/poll.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/poll.php	(revision 625)
@@ -0,0 +1,6 @@
+<?php
+echo json_encode(array(
+    'type'=>'event',
+    'name'=>'message',
+    'data'=>'Successfully polled at: '. date('g:i:s a')
+));
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/router.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/router.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/direct/php/router.php	(revision 625)
@@ -0,0 +1,101 @@
+<?php
+require('config.php');
+
+class BogusAction {
+	public $action;
+	public $method;
+	public $data;
+	public $tid;
+}
+
+$isForm = false;
+$isUpload = false;
+if(isset($HTTP_RAW_POST_DATA)){
+	header('Content-Type: text/javascript');
+	$data = json_decode($HTTP_RAW_POST_DATA);
+}else if(isset($_POST['extAction'])){ // form post
+	$isForm = true;
+	$isUpload = $_POST['extUpload'] == 'true';
+	$data = new BogusAction();
+	$data->action = $_POST['extAction'];
+	$data->method = $_POST['extMethod'];
+    $data->tid = isset($_POST['extTID']) ? $_POST['extTID'] : null; // not set for upload
+	$data->data = array($_POST, $_FILES);
+}else{
+	die('Invalid request.');
+}
+
+function doRpc($cdata){
+    global $API;
+	try {
+		if(!isset($API[$cdata->action])){
+			throw new Exception('Call to undefined action: ' . $cdata->action);
+		}
+
+		$action = $cdata->action;
+		$a = $API[$action];
+
+		doAroundCalls($a['before'], $cdata);
+
+		$method = $cdata->method;
+		$mdef = $a['methods'][$method];
+		if(!$mdef){
+			throw new Exception("Call to undefined method: $method on action $action");
+		}
+		doAroundCalls($mdef['before'], $cdata);
+
+		$r = array(
+			'type'=>'rpc',
+			'tid'=>$cdata->tid,
+			'action'=>$action,
+			'method'=>$method
+		);
+
+		require_once("classes/$action.php");
+		$o = new $action();
+
+		$params = isset($cdata->data) && is_array($cdata->data) ? $cdata->data : array();
+
+		$r['result'] = call_user_func_array(array($o, $method), $params);
+
+		doAroundCalls($mdef['after'], $cdata, $r);
+		doAroundCalls($a['after'], $cdata, $r);
+	}
+	catch(Exception $e){
+		$r['type'] = 'exception';
+		$r['message'] = $e->getMessage();
+		$r['where'] = $e->getTraceAsString();
+	}
+	return $r;
+}
+
+
+function doAroundCalls(&$fns, &$cdata, &$returnData=null){
+	if(!$fns){
+		return;
+	}
+	if(is_array($fns)){
+		foreach($fns as $f){
+			$f($cdata, $returnData);
+		}
+	}else{
+		$fns($cdata, $returnData);
+	}
+}
+
+$response = null;
+if(is_array($data)){
+	$response = array();
+	foreach($data as $d){
+		$response[] = doRpc($d);
+	}
+}else{
+	$response = doRpc($data);
+}
+if($isForm && $isUpload){
+	echo '<html><body><textarea>';
+	echo json_encode($response);
+	echo '</textarea></body></html>';
+}else{
+	echo json_encode($response);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedGrid.js	(revision 625)
@@ -0,0 +1,162 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedGrid = function(viewer, config) {
+    this.viewer = viewer;
+    Ext.apply(this, config);
+
+    this.store = new Ext.data.Store({
+        proxy: new Ext.data.HttpProxy({
+            url: 'feed-proxy.php'
+        }),
+
+        reader: new Ext.data.XmlReader(
+            {record: 'item'},
+            ['title', 'author', {name:'pubDate', type:'date'}, 'link', 'description', 'content']
+        )
+    });
+    this.store.setDefaultSort('pubDate', "DESC");
+
+    this.columns = [{
+        id: 'title',
+        header: "Title",
+        dataIndex: 'title',
+        sortable:true,
+        width: 420,
+        renderer: this.formatTitle
+      },{
+        header: "Author",
+        dataIndex: 'author',
+        width: 100,
+        hidden: true,
+        sortable:true
+      },{
+        id: 'last',
+        header: "Date",
+        dataIndex: 'pubDate',
+        width: 150,
+        renderer:  this.formatDate,
+        sortable:true
+    }];
+
+    FeedGrid.superclass.constructor.call(this, {
+        region: 'center',
+        id: 'topic-grid',
+        loadMask: {msg:'Loading Feed...'},
+
+        sm: new Ext.grid.RowSelectionModel({
+            singleSelect:true
+        }),
+
+        viewConfig: {
+            forceFit:true,
+            enableRowBody:true,
+            showPreview:true,
+            getRowClass : this.applyRowClass
+        }
+    });
+
+    this.on('rowcontextmenu', this.onContextClick, this);
+};
+
+Ext.extend(FeedGrid, Ext.grid.GridPanel, {
+
+    onContextClick : function(grid, index, e){
+        if(!this.menu){ // create context menu on first right click
+            this.menu = new Ext.menu.Menu({
+                id:'grid-ctx',
+                items: [{
+                    text: 'View in new tab',
+                    iconCls: 'new-tab',
+                    scope:this,
+                    handler: function(){
+                        this.viewer.openTab(this.ctxRecord);
+                    }
+                },{
+                    iconCls: 'new-win',
+                    text: 'Go to Post',
+                    scope:this,
+                    handler: function(){
+                        window.open(this.ctxRecord.data.link);
+                    }
+                },'-',{
+                    iconCls: 'refresh-icon',
+                    text:'Refresh',
+                    scope:this,
+                    handler: function(){
+                        this.ctxRow = null;
+                        this.store.reload();
+                    }
+                }]
+            });
+            this.menu.on('hide', this.onContextHide, this);
+        }
+        e.stopEvent();
+        if(this.ctxRow){
+            Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+            this.ctxRow = null;
+        }
+        this.ctxRow = this.view.getRow(index);
+        this.ctxRecord = this.store.getAt(index);
+        Ext.fly(this.ctxRow).addClass('x-node-ctx');
+        this.menu.showAt(e.getXY());
+    },
+
+    onContextHide : function(){
+        if(this.ctxRow){
+            Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+            this.ctxRow = null;
+        }
+    },
+
+    loadFeed : function(url) {
+        this.store.baseParams = {
+            feed: url
+        };
+        this.store.load();
+    },
+
+    togglePreview : function(show){
+        this.view.showPreview = show;
+        this.view.refresh();
+    },
+
+    // within this function "this" is actually the GridView
+    applyRowClass: function(record, rowIndex, p, ds) {
+        if (this.showPreview) {
+            var xf = Ext.util.Format;
+            p.body = '<p>' + xf.ellipsis(xf.stripTags(record.data.description), 200) + '</p>';
+            return 'x-grid3-row-expanded';
+        }
+        return 'x-grid3-row-collapsed';
+    },
+
+    formatDate : function(date) {
+        if (!date) {
+            return '';
+        }
+        var now = new Date();
+        var d = now.clearTime(true);
+        var notime = date.clearTime(true).getTime();
+        if (notime == d.getTime()) {
+            return 'Today ' + date.dateFormat('g:i a');
+        }
+        d = d.add('d', -6);
+        if (d.getTime() <= notime) {
+            return date.dateFormat('D g:i a');
+        }
+        return date.dateFormat('n/j g:i a');
+    },
+
+    formatTitle: function(value, p, record) {
+        return String.format(
+                '<div class="topic"><b>{0}</b><span class="author">{1}</span></div>',
+                value, record.data.author, record.id, record.data.forumid
+                );
+    }
+});
+
+Ext.reg('appfeedgrid', FeedGrid);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedPanel.js	(revision 625)
@@ -0,0 +1,180 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedPanel = function() {
+    FeedPanel.superclass.constructor.call(this, {
+        id:'feed-tree',
+        region:'west',
+        title:'Feeds',
+        split:true,
+        width: 225,
+        minSize: 175,
+        maxSize: 400,
+        collapsible: true,
+        margins:'0 0 5 5',
+        cmargins:'0 5 5 5',
+        rootVisible:false,
+        lines:false,
+        autoScroll:true,
+        root: new Ext.tree.TreeNode('My Feeds'),
+        collapseFirst:false,
+        tbar: [{
+            iconCls:'add-feed',
+            text:'Add Feed',
+            handler: this.showWindow,
+            scope: this
+        },{
+            id:'delete',
+            iconCls:'delete-icon',
+            text:'Remove',
+            handler: function(){
+                var s = this.getSelectionModel().getSelectedNode();
+                if(s){
+                    this.removeFeed(s.attributes.url);
+                }
+            },
+            scope: this
+        }]
+    });
+
+    this.feeds = this.root.appendChild(
+        new Ext.tree.TreeNode({
+            text:'My Feeds',
+            cls:'feeds-node',
+            expanded:true
+        })
+    );
+
+    this.getSelectionModel().on({
+        'beforeselect' : function(sm, node){
+             return node.isLeaf();
+        },
+        'selectionchange' : function(sm, node){
+            if(node){
+                this.fireEvent('feedselect', node.attributes);
+            }
+            this.getTopToolbar().items.get('delete').setDisabled(!node);
+        },
+        scope:this
+    });
+
+    this.addEvents({feedselect:true});
+
+    this.on('contextmenu', this.onContextMenu, this);
+};
+
+Ext.extend(FeedPanel, Ext.tree.TreePanel, {
+
+    onContextMenu : function(node, e){
+        if(!this.menu){ // create context menu on first right click
+            this.menu = new Ext.menu.Menu({
+                id:'feeds-ctx',
+                items: [{
+                    id:'load',
+                    iconCls:'load-icon',
+                    text:'Load Feed',
+                    scope: this,
+                    handler:function(){
+                        this.ctxNode.select();
+                    }
+                },{
+                    text:'Remove',
+                    iconCls:'delete-icon',
+                    scope: this,
+                    handler:function(){
+                        this.ctxNode.ui.removeClass('x-node-ctx');
+                        this.removeFeed(this.ctxNode.attributes.url);
+                        this.ctxNode = null;
+                    }
+                },'-',{
+                    iconCls:'add-feed',
+                    text:'Add Feed',
+                    handler: this.showWindow,
+                    scope: this
+                }]
+            });
+            this.menu.on('hide', this.onContextHide, this);
+        }
+        if(this.ctxNode){
+            this.ctxNode.ui.removeClass('x-node-ctx');
+            this.ctxNode = null;
+        }
+        if(node.isLeaf()){
+            this.ctxNode = node;
+            this.ctxNode.ui.addClass('x-node-ctx');
+            this.menu.items.get('load').setDisabled(node.isSelected());
+            this.menu.showAt(e.getXY());
+        }
+    },
+
+    onContextHide : function(){
+        if(this.ctxNode){
+            this.ctxNode.ui.removeClass('x-node-ctx');
+            this.ctxNode = null;
+        }
+    },
+
+    showWindow : function(btn){
+        if(!this.win){
+            this.win = new FeedWindow();
+            this.win.on('validfeed', this.addFeed, this);
+        }
+        this.win.show(btn);
+    },
+
+    selectFeed: function(url){
+        this.getNodeById(url).select();
+    },
+
+    removeFeed: function(url){
+        var node = this.getNodeById(url);
+        if(node){
+            node.unselect();
+            Ext.fly(node.ui.elNode).ghost('l', {
+                callback: node.remove, scope: node, duration: .4
+            });
+        }
+    },
+
+    addFeed : function(attrs, inactive, preventAnim){
+        var exists = this.getNodeById(attrs.url);
+        if(exists){
+            if(!inactive){
+                exists.select();
+                exists.ui.highlight();
+            }
+            return;
+        }
+        Ext.apply(attrs, {
+            iconCls: 'feed-icon',
+            leaf:true,
+            cls:'feed',
+            id: attrs.url
+        });
+        var node = new Ext.tree.TreeNode(attrs);
+        this.feeds.appendChild(node);
+        if(!inactive){
+            if(!preventAnim){
+                Ext.fly(node.ui.elNode).slideIn('l', {
+                    callback: node.select, scope: node, duration: .4
+                });
+            }else{
+                node.select();
+            }
+        }
+        return node;
+    },
+
+    // prevent the default context menu when you miss the node
+    afterRender : function(){
+        FeedPanel.superclass.afterRender.call(this);
+        this.el.on('contextmenu', function(e){
+            e.preventDefault();
+        });
+    }
+});
+
+Ext.reg('appfeedpanel', FeedPanel); 
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedViewer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedViewer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedViewer.js	(revision 625)
@@ -0,0 +1,83 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedViewer = {};
+
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));
+
+    var tpl = Ext.Template.from('preview-tpl', {
+        compiled:true,
+        getBody : function(v, all){
+            return Ext.util.Format.stripScripts(v || all.description);
+        }
+    });
+    FeedViewer.getTemplate = function(){
+        return tpl;
+    }
+
+    var feeds = new FeedPanel();
+    var mainPanel = new MainPanel();
+
+    feeds.on('feedselect', function(feed){
+        mainPanel.loadFeed(feed);
+    });
+    
+    var viewport = new Ext.Viewport({
+        layout:'border',
+        items:[
+            new Ext.BoxComponent({ // raw element
+                region:'north',
+                el: 'header',
+                height:32
+            }),
+            feeds,
+            mainPanel
+         ]
+    });
+
+    // add some default feeds
+    feeds.addFeed({
+        url:'http://feeds.feedburner.com/extblog',
+        text: 'ExtJS.com Blog'
+    }, false, true);
+
+    feeds.addFeed({
+        url:'http://extjs.com/forum/external.php?type=RSS2',
+        text: 'ExtJS.com Forums'
+    }, true);
+
+    feeds.addFeed({
+        url:'http://feeds.feedburner.com/ajaxian',
+        text: 'Ajaxian'
+    }, true);
+    
+    Ext.get('header').on('click', function() {
+        viewport.focus();
+    });
+    
+    feeds.focus();
+});
+
+// This is a custom event handler passed to preview panels so link open in a new windw
+FeedViewer.LinkInterceptor = {
+    render: function(p){
+        p.body.on({
+            'mousedown': function(e, t){ // try to intercept the easy way
+                t.target = '_blank';
+            },
+            'click': function(e, t){ // if they tab + enter a link, need to do it old fashioned way
+                if(String(t.target).toLowerCase() != '_blank'){
+                    e.stopEvent();
+                    window.open(t.href);
+                }
+            },
+            delegate:'a'
+        });
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedWindow.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedWindow.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/FeedWindow.js	(revision 625)
@@ -0,0 +1,128 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedWindow = function() {
+    this.feedUrl = new Ext.form.ComboBox({
+        id: 'feed-url',
+        fieldLabel: 'Enter the URL of the feed to add',
+        emptyText: 'http://example.com/blog/feed',
+        width: 450,
+        validationEvent: false,
+        validateOnBlur: false,
+        msgTarget: 'under',
+        triggerAction: 'all',
+        displayField: 'url',
+        mode: 'local',
+
+        listeners:{
+            valid: this.syncShadow,
+            invalid: this.syncShadow,
+            scope: this
+        },
+        tpl: new Ext.XTemplate(
+                '<tpl for="."><div class="x-combo-list-item">',
+                '<em>{url}</em><strong>{text}</strong>',
+                '<div class="x-clear"></div>',
+                '</div></tpl>'),
+        store: new Ext.data.ArrayStore({
+            fields: ['url', 'text'],
+            data : this.defaultFeeds
+        })
+    });
+
+    this.form = new Ext.FormPanel({
+        labelAlign:'top',
+        items:this.feedUrl,
+        border: false,
+        bodyStyle:'background:transparent;padding:10px;'
+    });
+
+    FeedWindow.superclass.constructor.call(this, {
+        title: 'Add Feed',
+        iconCls: 'feed-icon',
+        id: 'add-feed-win',
+        autoHeight: true,
+        width: 500,
+        resizable: false,
+        plain:true,
+        modal: true,
+        y: 100,
+        autoScroll: true,
+        closeAction: 'hide',
+
+        buttons:[{
+            text: 'Add Feed!',
+            handler: this.onAdd,
+            scope: this
+        },{
+            text: 'Cancel',
+            handler: this.hide.createDelegate(this, [])
+        }],
+
+        items: this.form
+    });
+
+    this.addEvents({add:true});
+}
+
+Ext.extend(FeedWindow, Ext.Window, {
+    defaultFeeds : [
+        ['http://www.divergingpath.com/rss.cfm?mode=full', 'Aaron Conran\'s Blog'],
+        ['http://feeds.yuiblog.com/YahooUserInterfaceBlog',  'Yahoo! UI Blog'],
+        ['http://feeds.feedburner.com/jquery/', 'jQuery Blog'],
+        ['http://sports.yahoo.com/nba/rss.xml', 'NBA News'],
+        ['http://feeds.dzone.com/dzone/frontpage', 'DZone.com']
+    ],
+
+    show : function(){
+        if(this.rendered){
+            this.feedUrl.setValue('');
+        }
+        FeedWindow.superclass.show.apply(this, arguments);
+    },
+
+    onAdd: function() {
+        this.el.mask('Validating Feed...', 'x-mask-loading');
+        var url = this.feedUrl.getValue();
+        Ext.Ajax.request({
+            url: 'feed-proxy.php',
+            params: {feed: url},
+            success: this.validateFeed,
+            failure: this.markInvalid,
+            scope: this,
+            feedUrl: url
+        });
+    },
+
+    markInvalid : function(){
+        this.feedUrl.markInvalid('The URL specified is not a valid RSS2 feed.');
+        this.el.unmask();
+    },
+
+    validateFeed : function(response, options){
+        var dq = Ext.DomQuery;
+        var url = options.feedUrl;
+
+        try{
+            var xml = response.responseXML;
+            var channel = xml.getElementsByTagName('channel')[0];
+            if(channel){
+                var text = dq.selectValue('title', channel, url);
+                var description = dq.selectValue('description', channel, 'No description available.');
+                this.el.unmask();
+                this.hide();
+
+                return this.fireEvent('validfeed', {
+                    url: url,
+                    text: text,
+                    description: description
+                });
+            }
+        }catch(e){
+        }
+        this.markInvalid();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/MainPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/MainPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/MainPanel.js	(revision 625)
@@ -0,0 +1,237 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+MainPanel = function(){
+    this.preview = new Ext.Panel({
+        id: 'preview',
+        region: 'south',
+        cls:'preview',
+        autoScroll: true,
+        listeners: FeedViewer.LinkInterceptor,
+
+        tbar: [{
+            id:'tab',
+            text: 'View in New Tab',
+            iconCls: 'new-tab',
+            disabled:true,
+            handler : this.openTab,
+            scope: this
+        },
+        '-',
+        {
+            id:'win',
+            text: 'Go to Post',
+            iconCls: 'new-win',
+            disabled:true,
+            scope: this,
+            handler : function(){
+                window.open(this.gsm.getSelected().data.link);
+            }
+        }],
+
+        clear: function(){
+            this.body.update('');
+            var items = this.topToolbar.items;
+            items.get('tab').disable();
+            items.get('win').disable();
+        }
+    });
+
+    this.grid = new FeedGrid(this, {
+        tbar:[{
+            text:'Open All',
+            tooltip: {title:'Open All',text:'Opens all item in tabs'},
+            iconCls: 'tabs',
+            handler: this.openAll,
+            scope:this
+        },
+        '-',
+        {
+            split:true,
+            text:'Reading Pane',
+            tooltip: {title:'Reading Pane',text:'Show, move or hide the Reading Pane'},
+            iconCls: 'preview-bottom',
+            handler: this.movePreview.createDelegate(this, []),
+            menu:{
+                id:'reading-menu',
+                cls:'reading-menu',
+                width:100,
+                items: [{
+                    text:'Bottom',
+                    checked:true,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-bottom'
+                },{
+                    text:'Right',
+                    checked:false,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-right'
+                },{
+                    text:'Hide',
+                    checked:false,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-hide'
+                }]
+            }
+        },
+        '-',
+        {
+            pressed: true,
+            enableToggle:true,
+            text:'Summary',
+            tooltip: {title:'Post Summary',text:'View a short summary of each item in the list'},
+            iconCls: 'summary',
+            scope:this,
+            toggleHandler: function(btn, pressed){
+                this.grid.togglePreview(pressed);
+            }
+        }]
+    });
+
+    MainPanel.superclass.constructor.call(this, {
+        id:'main-tabs',
+        activeTab:0,
+        region:'center',
+        margins:'0 5 5 0',
+        resizeTabs:true,
+        tabWidth:150,
+        minTabWidth: 120,
+        enableTabScroll: true,
+        plugins: new Ext.ux.TabCloseMenu(),
+        items: {
+            id:'main-view',
+            layout:'border',
+            title:'Loading...',
+            hideMode:'offsets',
+            items:[
+                this.grid, {
+                id:'bottom-preview',
+                layout:'fit',
+                items:this.preview,
+                height: 250,
+                split: true,
+                border:false,
+                region:'south'
+            }, {
+                id:'right-preview',
+                layout:'fit',
+                border:false,
+                region:'east',
+                width:350,
+                split: true,
+                hidden:true
+            }]
+        }
+    });
+
+    this.gsm = this.grid.getSelectionModel();
+
+    this.gsm.on('rowselect', function(sm, index, record){
+        FeedViewer.getTemplate().overwrite(this.preview.body, record.data);
+        var items = this.preview.topToolbar.items;
+        items.get('tab').enable();
+        items.get('win').enable();
+    }, this, {buffer:250});
+
+    this.grid.store.on('beforeload', this.preview.clear, this.preview);
+    this.grid.store.on('load', this.gsm.selectFirstRow, this.gsm);
+
+    this.grid.on('rowdblclick', this.openTab, this);
+};
+
+Ext.extend(MainPanel, Ext.TabPanel, {
+
+    loadFeed : function(feed){
+        this.grid.loadFeed(feed.url);
+        Ext.getCmp('main-view').setTitle(feed.text);
+    },
+
+    movePreview : function(m, pressed){
+        if(!m){ // cycle if not a menu item click
+            var items = Ext.menu.MenuMgr.get('reading-menu').items.items;
+            var b = items[0], r = items[1], h = items[2];
+            if(b.checked){
+                r.setChecked(true);
+            }else if(r.checked){
+                h.setChecked(true);
+            }else if(h.checked){
+                b.setChecked(true);
+            }
+            return;
+        }
+        if(pressed){
+            var preview = this.preview;
+            var right = Ext.getCmp('right-preview');
+            var bot = Ext.getCmp('bottom-preview');
+            var btn = this.grid.getTopToolbar().items.get(2);
+            switch(m.text){
+                case 'Bottom':
+                    right.hide();
+                    bot.add(preview);
+                    bot.show();
+                    bot.ownerCt.doLayout();
+                    btn.setIconClass('preview-bottom');
+                    break;
+                case 'Right':
+                    bot.hide();
+                    right.add(preview);
+                    right.show();
+                    right.ownerCt.doLayout();
+                    btn.setIconClass('preview-right');
+                    break;
+                case 'Hide':
+                    preview.ownerCt.hide();
+                    preview.ownerCt.ownerCt.doLayout();
+                    btn.setIconClass('preview-hide');
+                    break;
+            }
+        }
+    },
+
+    openTab : function(record){
+        record = (record && record.data) ? record : this.gsm.getSelected();
+        var d = record.data;
+        var id = !d.link ? Ext.id() : d.link.replace(/[^A-Z0-9-_]/gi, '');
+        var tab;
+        if(!(tab = this.getItem(id))){
+            tab = new Ext.Panel({
+                id: id,
+                cls:'preview single-preview',
+                title: d.title,
+                tabTip: d.title,
+                html: FeedViewer.getTemplate().apply(d),
+                closable:true,
+                listeners: FeedViewer.LinkInterceptor,
+                autoScroll:true,
+                border:true,
+
+                tbar: [{
+                    text: 'Go to Post',
+                    iconCls: 'new-win',
+                    handler : function(){
+                        window.open(d.link);
+                    }
+                }]
+            });
+            this.add(tab);
+        }
+        this.setActiveTab(tab);
+    },
+
+    openAll : function(){
+        this.beginUpdate();
+        this.grid.store.data.each(this.openTab, this);
+        this.endUpdate();
+    }
+});
+
+Ext.reg('appmainpanel', MainPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-proxy.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-proxy.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-proxy.php	(revision 625)
@@ -0,0 +1,12 @@
+<?php
+// this is an example server-side proxy to load feeds
+$feed = $_REQUEST['feed'];
+if($feed != '' && strpos($feed, 'http') === 0){
+	header('Content-Type: text/xml');
+	$xml = file_get_contents($feed);
+	$xml = str_replace('<content:encoded>', '<content>', $xml);
+	$xml = str_replace('</content:encoded>', '</content>', $xml);
+	$xml = str_replace('</dc:creator>', '</author>', $xml);
+	echo str_replace('<dc:creator', '<author', $xml);
+	return;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-viewer.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-viewer.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/feed-viewer.css	(revision 625)
@@ -0,0 +1,252 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html, body {
+	font: normal 12px tahoma, arial, verdana, sans-serif;
+	margin: 0;
+	padding: 0;
+	border: 0 none;
+	overflow: hidden;
+	height: 100%;
+}
+
+.ext-el-mask {
+    background:#dadadb;
+}
+.x-grid3-td-title b {
+    font-family:tahoma, verdana;
+    display:block;
+    color:#333;
+}
+.x-grid3-td-title b i {
+    font-weight:normal;
+    font-style: normal;
+    color:#000;
+}
+.x-grid3-td-title .topic {
+    padding-left:20px;
+    background:transparent url(images/post.gif) no-repeat 0 2px;
+}
+.x-grid3-td-title .x-grid3-cell-inner {
+    white-space:normal;
+}
+.x-grid3-td-title a {
+    color: #385F95;
+    text-decoration:none;
+}
+.x-grid3-td-title a:hover {
+    text-decoration:underline;
+}
+.details .x-btn-text {
+    background-image: url(images/details.gif);
+}
+.msg-view {
+    background-image: url(../shared/icons/fam/application_view_list.png) !important;
+}
+.add-feed {
+    background-image: url(images/rss_add.gif) !important;
+}
+
+.preview-bottom {
+    background-image: url(images/preview-bottom.gif) !important;
+}
+.preview-right {
+    background-image: url(images/preview-right.gif) !important;
+}
+.preview-hide {
+    background-image: url(images/preview-hide.gif) !important;
+}
+
+.tabs {
+    background-image: url( ../desktop/images/tabs.gif ) !important;
+}
+.summary {
+    background-image: url(images/details.gif) !important;
+}
+.x-grid3-row-body p {
+    margin:5px 20px 10px 25px !important;
+    color:#555;
+}
+
+.post-date {
+    font-weight:bold;
+    color:#333;
+}
+
+.author {
+    color:#333;
+}
+
+.x-tree {
+    background:#fff !important;
+}
+.x-border-layout-ct {
+    background:transparent;
+}
+body.x-border-layout-ct {
+    background:#c3d5ed url(images/bg.gif) repeat-x left top !important;
+}
+.x-layout-split {
+    background-color:transparent !important;
+}
+
+.x-tree-node div.feeds-node{
+    background:#eee url(images/cmp-bg.gif) repeat-x;
+    margin-top:1px;
+    border-top:1px solid #ddd;
+    border-bottom:1px solid #ccc;
+    padding-top:2px;
+    padding-bottom:1px;
+}
+.feeds-node .x-tree-node-icon {
+    display:none;
+}
+.forum-ct a span {
+    font-weight:bold;
+    color:#222;
+}
+.feed {
+    border:1px solid #fff;
+    margin:3px;
+}
+.feed .x-tree-ec-icon {
+    display:none;
+}
+.feed-icon {
+    background-image:url(images/rss.gif) !important;
+}
+.new-tab {
+    background-image:url(images/new_tab.gif) !important;
+}
+.new-win {
+    background-image:url(images/go-to-post.gif) !important;
+}
+.delete-icon {
+    background-image:url(images/rss_delete.gif) !important;
+}
+.load-icon {
+    background-image:url(images/rss_load.gif) !important;
+}
+.refresh-icon {
+    background-image:url(../shared/icons/fam/table_refresh.png) !important;
+}
+.x-tree-selected {
+    border:1px dotted #a3bae9;
+    background:#DFE8F6;
+}
+.x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#15428b;
+    font-weight:bold;
+}
+
+#topic-grid .x-panel-tbar .x-toolbar {
+   /* border-top:0 none; */
+}
+
+
+#main-tabs .x-tab-panel-body {
+    background:transparent;
+    border:0 none;
+}
+
+/* Preview classes */
+
+.preview .x-panel-body {
+    background:#fff;
+    color:#222;
+    font:normal 12px tahoma,verdana,arial,sans-serif;
+}
+
+.preview .x-panel-body p {
+    line-height:18px;
+    margin:8px 0;
+}
+
+.preview .x-panel-body ul {
+    margin-left:18px;
+}
+
+.preview .x-panel-body ul li {
+    display:list-item;
+    list-style-image:none !important;
+    list-style-position:outside !important;
+    list-style-type:disc !important;
+    margin-left:18px;
+}
+
+.preview .x-panel-body pre, #preview .x-panel-body code {
+    background:#f1f1f1;
+    display:block;
+}
+
+.preview .x-panel-body h4.post-author {
+    font-weight:normal;
+    color:#555;
+    font-size:11px;
+}
+.preview .x-panel-body span.post-date {
+    font-weight:normal;
+    color:#555;
+    float:right;
+    font-size:11px;
+}
+.preview .x-panel-body div.post-data {
+    background:#f1f2f4;
+    padding:5px;
+    border-bottom:1px solid #dadadb;
+}
+.preview .x-panel-body div.post-body {
+    padding:10px;
+}
+/*.single-preview .x-toolbar, #right-preview .preview .x-toolbar {
+    border-top:0 none;
+}*/
+.reading-menu .x-menu-item-checked {
+    border:1px dotted #a3bae9 !important;
+    background:#DFE8F6;
+    padding:0;
+    margin: 0;
+}
+.x-tab-panel-header {
+    border-bottom-width:0 !important;
+}
+#suggested {
+    border-top:0 none;
+}
+#suggested a {
+    text-decoration:none;
+    font-size:11px;
+    color:#15428B;
+    display:block;
+    padding:3px;
+    float:right;
+    margin-right:4px;
+}
+#suggested a:hover {
+    text-decoration:underline;
+    color:#15428B;
+}
+.x-combo-list-item {
+    zoom:1;
+}
+.x-combo-list-item strong {
+    color:#777;
+    font-size:11px;
+    font-style: normal;
+    float:left;
+}
+.x-combo-list-item em {
+    color:#222;
+    font-size:12px;
+    font-style: normal;
+    float:left;
+    width:325px;
+}
+.x-node-ctx {
+    background:#eee !important;
+    border:1px solid #ccc !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/view.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/view.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/feed-viewer/view.html	(revision 625)
@@ -0,0 +1,37 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Feed Viewer 3</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="feed-viewer.css" />
+	    
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<script type="text/javascript" src="../../ext-all.js"></script>
+    
+    <script type="text/javascript" src="../state/save-state.php"></script>
+    <script type="text/javascript" src="../state/get-state.php"></script>
+    <script type="text/javascript" src="../state/SessionProvider.js"></script>
+    <script type="text/javascript" src="../ux/TabCloseMenu.js"></script>
+    <script type="text/javascript" src="FeedViewer.js"></script>
+    <script type="text/javascript" src="FeedWindow.js"></script>
+    <script type="text/javascript" src="FeedGrid.js"></script>
+    <script type="text/javascript" src="MainPanel.js"></script>
+    <script type="text/javascript" src="FeedPanel.js"></script>
+
+</head>
+<body>
+<div id="header"><div style="float:right;margin:5px;" class="x-small-editor"></div></div>
+
+<!-- Template used for Feed Items -->
+<div id="preview-tpl" style="display:none;">
+    <div class="post-data">
+        <span class="post-date">{pubDate:date("M j, Y, g:i a")}</span>
+        <h3 class="post-title">{title}</h3>
+        <h4 class="post-author">by {author:defaultValue("Unknown")}</h4>
+    </div>
+    <div class="post-body">{content:this.getBody}</div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.html	(revision 625)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <title>Absolute Forms</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="absform.js"></script>
+    <link rel="stylesheet" type="text/css" href="forms.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Absolute Layout with Forms</h1>
+
+<p>The js is not minified so it is readable. See <a href="absform.js">absform.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.js	(revision 625)
@@ -0,0 +1,63 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function() {
+    var form = new Ext.form.FormPanel({
+        baseCls: 'x-plain',
+        layout:'absolute',
+        url:'save-form.php',
+        defaultType: 'textfield',
+
+        items: [{
+            x: 0,
+            y: 5,
+            xtype:'label',
+            text: 'Send To:'
+        },{
+            x: 60,
+            y: 0,
+            name: 'to',
+            anchor:'100%'  // anchor width by percentage
+        },{
+            x: 0,
+            y: 35,
+            xtype:'label',
+            text: 'Subject:'
+        },{
+            x: 60,
+            y: 30,
+            name: 'subject',
+            anchor: '100%'  // anchor width by percentage
+        },{
+            x:0,
+            y: 60,
+            xtype: 'textarea',
+            name: 'msg',
+            anchor: '100% 100%'  // anchor width and height
+        }]
+    });
+
+    var window = new Ext.Window({
+        title: 'Resize Me',
+        width: 500,
+        height:300,
+        minWidth: 300,
+        minHeight: 200,
+        layout: 'fit',
+        plain:true,
+        bodyStyle:'padding:5px;',
+        buttonAlign:'center',
+        items: form,
+
+        buttons: [{
+            text: 'Send'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    window.show();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.html	(revision 625)
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Advanced VType Examples</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+  <script type="text/javascript" src="../../ext-all-debug.js"></script>
+  
+  <script type="text/javascript" src="adv-vtypes.js"></script>
+  <script type="text/javascript" src="states.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+
+<body>
+<h1>Advanced Validation Examples Using VTypes</h1>
+
+<div id="dr"><p>The first example shows two date fields acting as a date range.  Selecting an initial date
+sets the minimum value for the end field.  Selecting an ending date sets a maximum value for the
+start field.</p></div>
+
+<div id="pw" style="padding-top:20px"><p>This second example shows a password verification,
+ the second value must be equivalent to the first to validate.</p></div><br/>
+
+<p>The js is not minified so it is readable. See <a href="adv-vtypes.js">adv-vtypes.js</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/adv-vtypes.js	(revision 625)
@@ -0,0 +1,112 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Add the additional 'advanced' VTypes
+Ext.apply(Ext.form.VTypes, {
+    daterange : function(val, field) {
+        var date = field.parseDate(val);
+
+        if(!date){
+            return;
+        }
+        if (field.startDateField && (!this.dateRangeMax || (date.getTime() != this.dateRangeMax.getTime()))) {
+            var start = Ext.getCmp(field.startDateField);
+            start.setMaxValue(date);
+            start.validate();
+            this.dateRangeMax = date;
+        } 
+        else if (field.endDateField && (!this.dateRangeMin || (date.getTime() != this.dateRangeMin.getTime()))) {
+            var end = Ext.getCmp(field.endDateField);
+            end.setMinValue(date);
+            end.validate();
+            this.dateRangeMin = date;
+        }
+        /*
+         * Always return true since we're only using this vtype to set the
+         * min/max allowed values (these are tested for after the vtype test)
+         */
+        return true;
+    },
+
+    password : function(val, field) {
+        if (field.initialPassField) {
+            var pwd = Ext.getCmp(field.initialPassField);
+            return (val == pwd.getValue());
+        }
+        return true;
+    },
+
+    passwordText : 'Passwords do not match'
+});
+
+
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    var bd = Ext.getBody();
+
+		/*
+		 * ================  Date Range  =======================
+		 */
+    
+    var dr = new Ext.FormPanel({
+      labelWidth: 125,
+      frame: true,
+      title: 'Date Range',
+	  bodyStyle:'padding:5px 5px 0',
+	  width: 350,
+      defaults: {width: 175},
+      defaultType: 'datefield',
+      items: [{
+        fieldLabel: 'Start Date',
+        name: 'startdt',
+        id: 'startdt',
+        vtype: 'daterange',
+        endDateField: 'enddt' // id of the end date field
+      },{
+        fieldLabel: 'End Date',
+        name: 'enddt',
+        id: 'enddt',
+        vtype: 'daterange',
+        startDateField: 'startdt' // id of the start date field
+      }]
+    });
+
+    dr.render('dr');
+    
+    /*
+     * ================  Password Verification =======================
+     */
+        
+    var pwd = new Ext.FormPanel({
+      labelWidth: 125,
+      frame: true,
+      title: 'Password Verification',
+      bodyStyle:'padding:5px 5px 0',
+      width: 350,
+      defaults: {
+        width: 175,
+        inputType: 'password'
+      },
+      defaultType: 'textfield',
+      items: [{
+        fieldLabel: 'Password',
+        name: 'pass',
+        id: 'pass'
+      },{
+        fieldLabel: 'Confirm Password',
+        name: 'pass-cfrm',
+        vtype: 'password',
+        initialPassField: 'pass' // id of the initial password field
+      }]
+    });
+
+    pwd.render('pw');
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.html	(revision 625)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <title>Anchoring</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="anchoring.js"></script>
+    <link rel="stylesheet" type="text/css" href="forms.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Anchor Layout with Forms</h1>
+
+<p>The js is not minified so it is readable. See <a href="anchoring.js">anchoring.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/anchoring.js	(revision 625)
@@ -0,0 +1,50 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function() {
+    var form = new Ext.form.FormPanel({
+        baseCls: 'x-plain',
+        labelWidth: 55,
+        url:'save-form.php',
+        defaultType: 'textfield',
+
+        items: [{
+            fieldLabel: 'Send To',
+            name: 'to',
+            anchor:'100%'  // anchor width by percentage
+        },{
+            fieldLabel: 'Subject',
+            name: 'subject',
+            anchor: '100%'  // anchor width by percentage
+        }, {
+            xtype: 'textarea',
+            hideLabel: true,
+            name: 'msg',
+            anchor: '100% -53'  // anchor width by percentage and height by raw adjustment
+        }]
+    });
+
+    var window = new Ext.Window({
+        title: 'Resize Me',
+        width: 500,
+        height:300,
+        minWidth: 300,
+        minHeight: 200,
+        layout: 'fit',
+        plain:true,
+        bodyStyle:'padding:5px;',
+        buttonAlign:'center',
+        items: form,
+
+        buttons: [{
+            text: 'Send'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    window.show();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.html	(revision 625)
@@ -0,0 +1,28 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>Checkbox / Radio Groups</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
+    <script type="text/javascript" src="../../ext-all-debug.js"> </script>
+
+    <script type="text/javascript" src="check-radio.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        .x-check-group-alt {
+            background: #D1DDEF;
+            border-top:1px dotted #B5B8C8;
+            border-bottom:1px dotted #B5B8C8;
+        }
+    </style>
+</head>
+<body>
+    <h1>Checkbox / Radio Groups</h1>
+    <p>This demonstrates the flexible layout capabilities of the CheckboxGroup and RadioGroup classes. It also
+    shows that you can validate checkboxes/radios as a group &mdash; try submitting the form before changing
+    any values to see this.</p>
+    <p>The js is not minified so it is readable. See <a href="check-radio.js">check-radio.js</a>.</p>
+    <div id="form-ct"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/check-radio.js	(revision 625)
@@ -0,0 +1,338 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+    
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+
+    /*====================================================================
+     * Individual checkbox/radio examples
+     *====================================================================*/
+    
+    // Using checkbox/radio groups will generally be easier and more flexible than
+    // using individual checkbox and radio controls, but this shows that you can
+    // certainly do so if you only need a single control, or if you want to control  
+    // exactly where each check/radio goes within your layout.
+    var individual = [{
+        bodyStyle: 'padding-right:5px;',
+        items: {
+            xtype: 'fieldset',
+            title: 'Individual Checkboxes',
+            autoHeight: true,
+            defaultType: 'checkbox', // each item will be a checkbox
+            items: [{
+                xtype: 'textfield',
+                name: 'txt-test1',
+                fieldLabel: 'Alignment Test'
+            }, {
+                fieldLabel: 'Favorite Animals',
+                boxLabel: 'Dog',
+                name: 'fav-animal-dog'
+            }, {
+                fieldLabel: '',
+                labelSeparator: '',
+                boxLabel: 'Cat',
+                name: 'fav-animal-cat'
+            }, {
+                checked: true,
+                fieldLabel: '',
+                labelSeparator: '',
+                boxLabel: 'Monkey',
+                name: 'fav-animal-monkey'
+            }]
+        }
+    }, {
+        bodyStyle: 'padding-left:5px;',
+        items: {
+            xtype: 'fieldset',
+            title: 'Individual Radios',
+            autoHeight: true,
+            defaultType: 'radio', // each item will be a radio button
+            items: [{
+                xtype: 'textfield',
+                name: 'txt-test2',
+                fieldLabel: 'Alignment Test'
+            }, {
+                checked: true,
+                fieldLabel: 'Favorite Color',
+                boxLabel: 'Red',
+                name: 'fav-color',
+                inputValue: 'red'
+            }, {
+                fieldLabel: '',
+                labelSeparator: '',
+                boxLabel: 'Blue',
+                name: 'fav-color',
+                inputValue: 'blue'
+            }, {
+                fieldLabel: '',
+                labelSeparator: '',
+                boxLabel: 'Green',
+                name: 'fav-color',
+                inputValue: 'green'
+            }]
+        }
+    }];
+    
+    /*====================================================================
+     * CheckGroup example
+     *====================================================================*/
+    var checkGroup = {
+        xtype: 'fieldset',
+        title: 'Checkbox Groups (initially collapsed)',
+        autoHeight: true,
+        layout: 'form',
+        collapsed: true,   // initially collapse the group
+        collapsible: true,
+        items: [{
+            xtype: 'textfield',
+            name: 'txt-test3',
+            fieldLabel: 'Alignment Test',
+            anchor: '95%'
+        },{
+            // Use the default, automatic layout to distribute the controls evenly
+            // across a single row
+            xtype: 'checkboxgroup',
+            fieldLabel: 'Auto Layout',
+            items: [
+                {boxLabel: 'Item 1', name: 'cb-auto-1'},
+                {boxLabel: 'Item 2', name: 'cb-auto-2', checked: true},
+                {boxLabel: 'Item 3', name: 'cb-auto-3'},
+                {boxLabel: 'Item 4', name: 'cb-auto-4'},
+                {boxLabel: 'Item 5', name: 'cb-auto-5'}
+            ]
+        },{
+            xtype: 'checkboxgroup',
+            fieldLabel: 'Single Column',
+            itemCls: 'x-check-group-alt',
+            // Put all controls in a single column with width 100%
+            columns: 1,
+            items: [
+                {boxLabel: 'Item 1', name: 'cb-col-1'},
+                {boxLabel: 'Item 2', name: 'cb-col-2', checked: true},
+                {boxLabel: 'Item 3', name: 'cb-col-3'}
+            ]
+        },{
+            xtype: 'checkboxgroup',
+            fieldLabel: 'Multi-Column (horizontal)',
+            // Distribute controls across 3 even columns, filling each row
+            // from left to right before starting the next row
+            columns: 3,
+            items: [
+                {boxLabel: 'Item 1', name: 'cb-horiz-1'},
+                {boxLabel: 'Item 2', name: 'cb-horiz-2', checked: true},
+                {boxLabel: 'Item 3', name: 'cb-horiz-3'},
+                {boxLabel: 'Item 4', name: 'cb-horiz-4'},
+                {boxLabel: 'Item 5', name: 'cb-horiz-5'}
+            ]
+        },{
+            xtype: 'checkboxgroup',
+            fieldLabel: 'Multi-Column (vertical)',
+            itemCls: 'x-check-group-alt',
+            // Distribute controls across 3 even columns, filling each column
+            // from top to bottom before starting the next column
+            columns: 3,
+            vertical: true,
+            items: [
+                {boxLabel: 'Item 1', name: 'cb-vert-1'},
+                {boxLabel: 'Item 2', name: 'cb-vert-2', checked: true},
+                {boxLabel: 'Item 3', name: 'cb-vert-3'},
+                {boxLabel: 'Item 4', name: 'cb-vert-4'},
+                {boxLabel: 'Item 5', name: 'cb-vert-5'}
+            ]
+        },{
+            xtype: 'checkboxgroup',
+            fieldLabel: 'Multi-Column<br />(custom widths)',
+            // Specify exact column widths (could also include float values for %)
+            columns: [100, 100],
+            vertical: true,
+            items: [
+                {boxLabel: 'Item 1', name: 'cb-custwidth', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'cb-custwidth', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'cb-custwidth', inputValue: 3},
+                {boxLabel: 'Item 4', name: 'cb-custwidth', inputValue: 4},
+                {boxLabel: 'Item 5', name: 'cb-custwidth', inputValue: 5}
+            ]
+        },{
+            xtype: 'checkboxgroup',
+            itemCls: 'x-check-group-alt',
+            fieldLabel: 'Custom Layout<br />(w/ validation)',
+            allowBlank: false,
+            anchor: '95%',
+            items: [{
+                // You can pass sub-item arrays along with width/columnWidth configs 
+                // ColumnLayout-style for complete layout control.  In this example we
+                // only want one item in the middle column, which would not be possible
+                // using the columns config.  We also want to make sure that our headings
+                // end up at the top of each column as expected.
+                columnWidth: '.25',
+                items: [
+                    {xtype: 'label', text: 'Heading 1', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'Item 1', name: 'cb-cust-1'},
+                    {boxLabel: 'Item 2', name: 'cb-cust-2'}
+                ]
+            },{
+                columnWidth: '.5',
+                items: [
+                    {xtype: 'label', text: 'Heading 2', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'A long item just for fun', name: 'cb-cust-3'}
+                ]
+            },{
+                columnWidth: '.25',
+                items: [
+                    {xtype: 'label', text: 'Heading 3', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'Item 4', name: 'cb-cust-4'},
+                    {boxLabel: 'Item 5', name: 'cb-cust-5'}
+                ]
+            }]
+        }]
+    };
+    
+    /*====================================================================
+     * RadioGroup examples
+     *====================================================================*/
+    // NOTE: These radio examples use the exact same options as the checkbox ones
+    // above, so the comments will not be repeated.  Please see comments above for
+    // additional explanation on some config options.
+    
+    var radioGroup = {
+        
+        xtype: 'fieldset',
+        title: 'Radio Groups',
+        autoHeight: true,
+        items: [{
+            xtype: 'textfield',
+            name: 'txt-test4',
+            fieldLabel: 'Alignment Test',
+            anchor: '95%'
+        },{
+            xtype: 'radiogroup',
+            fieldLabel: 'Auto Layout',
+            items: [
+                {boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
+                {boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
+                {boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
+            ]
+        },{
+            xtype: 'radiogroup',
+            fieldLabel: 'Single Column',
+            itemCls: 'x-check-group-alt',
+            columns: 1,
+            items: [
+                {boxLabel: 'Item 1', name: 'rb-col', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'rb-col', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'rb-col', inputValue: 3}
+            ]
+        },{
+            xtype: 'radiogroup',
+            fieldLabel: 'Multi-Column<br />(horiz. auto-width)',
+            columns: 3,
+            items: [
+                {boxLabel: 'Item 1', name: 'rb-horiz', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'rb-horiz', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'rb-horiz', inputValue: 3},
+                {boxLabel: 'Item 4', name: 'rb-horiz', inputValue: 4},
+                {boxLabel: 'Item 5', name: 'rb-horiz', inputValue: 5}
+            ]
+        },{
+            xtype: 'radiogroup',
+            fieldLabel: 'Multi-Column<br />(vert. auto-width)',
+            itemCls: 'x-check-group-alt',
+            columns: 3,
+            vertical: true,
+            items: [
+                {boxLabel: 'Item 1', name: 'rb-vert', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'rb-vert', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'rb-vert', inputValue: 3},
+                {boxLabel: 'Item 4', name: 'rb-vert', inputValue: 4},
+                {boxLabel: 'Item 5', name: 'rb-vert', inputValue: 5}
+            ]
+        },{
+            xtype: 'radiogroup',
+            fieldLabel: 'Multi-Column<br />(custom widths)',
+            columns: [100, 100],
+            vertical: true,
+            items: [
+                {boxLabel: 'Item 1', name: 'rb-custwidth', inputValue: 1},
+                {boxLabel: 'Item 2', name: 'rb-custwidth', inputValue: 2, checked: true},
+                {boxLabel: 'Item 3', name: 'rb-custwidth', inputValue: 3},
+                {boxLabel: 'Item 4', name: 'rb-custwidth', inputValue: 4},
+                {boxLabel: 'Item 5', name: 'rb-custwidth', inputValue: 5}
+            ]
+        },{
+            xtype: 'radiogroup',
+            itemCls: 'x-check-group-alt',
+            fieldLabel: 'Custom Layout<br />(w/ validation)',
+            allowBlank: false,
+            anchor: '95%',
+            items: [{
+                columnWidth: '.25',
+                items: [
+                    {xtype: 'label', text: 'Heading 1', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'Item 1', name: 'rb-cust', inputValue: 1},
+                    {boxLabel: 'Item 2', name: 'rb-cust', inputValue: 2}
+                ]
+            },{
+                columnWidth: '.5',
+                items: [
+                    {xtype: 'label', text: 'Heading 2', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'A long item just for fun', name: 'rb-cust', inputValue: 3}
+                ]
+            },{
+                columnWidth: '.25',
+                items: [
+                    {xtype: 'label', text: 'Heading 3', cls:'x-form-check-group-label', anchor:'-15'},
+                    {boxLabel: 'Item 4', name: 'rb-cust', inputValue: 4},
+                    {boxLabel: 'Item 5', name: 'rb-cust', inputValue: 5}
+                ]
+            }]
+        }]
+    };
+    
+    // combine all that into one huge form
+    var fp = new Ext.FormPanel({
+        title: 'Check/Radio Groups Example',
+        frame: true,
+        labelWidth: 110,
+        width: 600,
+        renderTo:'form-ct',
+        bodyStyle: 'padding:0 10px 0;',
+        items: [
+            {
+                layout: 'column',
+                border: false,
+                // defaults are applied to all child items unless otherwise specified by child item
+                defaults: {
+                    columnWidth: '.5',
+                    border: false
+                },            
+                items: individual
+            },
+            checkGroup,
+            radioGroup
+        ],
+        buttons: [{
+            text: 'Save',
+            handler: function(){
+               if(fp.getForm().isValid()){
+                    Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+ 
+                        fp.getForm().getValues(true).replace(/&/g,', '));
+                }
+            }
+        },{
+            text: 'Reset',
+            handler: function(){
+                fp.getForm().reset();
+            }
+        }]
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.css	(revision 625)
@@ -0,0 +1,30 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+.search-item {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    padding:3px 10px 3px 10px;
+    border:1px solid #fff;
+    border-bottom:1px solid #eeeeee;
+    white-space:normal;
+    color:#555;
+}
+.search-item h3 {
+    display:block;
+    font:inherit;
+    font-weight:bold;
+    color:#222;
+}
+
+.search-item h3 span {
+    float: right;
+    font-weight:normal;
+    margin:0 0 5px 5px;
+    width:100px;
+    display:block;
+    clear:none;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.html	(revision 625)
@@ -0,0 +1,237 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Combo Boxes</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="../../resources/css/xtheme-gray.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="states.js"></script>
+    <script type="text/javascript" src="combos.js"></script>
+    <link rel="stylesheet" type="text/css" href="combos.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        p { width:650px; }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Combo Boxes</h1>
+<p>The js is not minified so it is readable. See <a href="combos.js">combos.js</a>.</p>
+
+<p>
+<b>Data Sources</b><br />
+The combo box can use any type of Ext.data.Store as its data source.
+    This means your data can be XML, JSON, arrays or any other supported format. It can be loaded using 
+    Ajax, via script tags or locally. This combo uses local data from a JS array:</p>
+<div>
+    <input type="text" id="local-states" size="20"/>
+</div>
+<div id="state-combo-code-panel" style="margin-top:10px">
+<pre id="state-combo-code" class="code"><code>// simple array store
+var store = new Ext.data.ArrayStore({
+    fields: ['abbr', 'state'],
+    data : exampleData
+});
+var combo = new Ext.form.ComboBox({
+    store: store,
+    displayField:'state',
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all',
+    emptyText:'Select a state...',
+    selectOnFocus:true,
+    applyTo: 'local-states'
+});
+</code></pre></div>
+<br />
+
+<p>
+	The combo below uses the same data, but also illustrates how to use an optional
+	custom template to create custom UI renditions for list items. In this case,
+	each item has a popup QuickTip which displays the state's nickname when hovered over.
+</p>
+<div>
+    <input type="text" id="local-states-with-qtip" size="20"/>
+</div>
+<div id="state-combo-qtip-code-panel" style="margin-top:10px">
+<pre id="state-combo-qtip-code" class="code"><code>// simple array store
+var store = new Ext.data.ArrayStore({
+    fields: ['abbr', 'state', 'nick'],
+    data : exampleData
+});
+var comboWithTooltip = new Ext.form.ComboBox({
+    tpl: '&lt;tpl for=".">&lt;div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}&lt;/div>&lt;/tpl>',
+    store: store,
+    displayField:'state',
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all',
+    emptyText:'Select a state...',
+    selectOnFocus:true,
+    applyTo: 'local-states-with-qtip'
+});
+</code></pre></div>
+<br />
+
+<p>
+The combo box can also use plain array data directly as its data source, wrapping the array internally
+with a ArrayStore as needed.  You can pass a 1-dimensional or multi-dimensional array as the store config:</p>
+<div>
+    <input type="text" id="array-states" size="20"/>
+</div>
+<div id="array-combo-code-panel" style="margin-top:10px">
+<pre id="array-combo-code" class="code"><code>var comboFromArray = new Ext.form.ComboBox({
+    store: exampleData, //direct array data
+    typeAhead: true,
+    triggerAction: 'all',
+    emptyText:'Select a state...',
+    selectOnFocus:true,
+    applyTo: 'array-states'
+});
+</code></pre></div>
+<br />
+
+<p>
+<b>Unobtrusive</b><br />
+The combo box can very easily be used to convert existing select elements into auto-completing, filtering combos.
+</p>
+<div>
+Transformed select:<br/> <select name="state" id="state">
+<option value="AL">Alabama</option>
+<option value="AK">Alaska</option>
+<option value="AZ">Arizona</option>
+<option value="AR">Arkansas</option>
+<option value="CA">California</option>
+<option value="CO">Colorado</option>
+<option value="CT">Connecticut</option>
+<option value="DE">Delaware</option>
+<option value="FL">Florida</option>
+<option value="GA">Georgia</option>
+<option value="HI">Hawaii</option>
+<option value="ID">Idaho</option>
+<option value="IL">Illinois</option>
+<option value="IN">Indiana</option>
+<option value="IA">Iowa</option>
+<option value="KS">Kansas</option>
+<option value="KY">Kentucky</option>
+<option value="LA">Louisiana</option>
+<option value="ME">Maine</option>
+<option value="MD">Maryland</option>
+<option value="MA">Massachusetts</option>
+<option value="MI">Michigan</option>
+<option value="MN">Minnesota</option>
+<option value="MS">Mississippi</option>
+<option value="MO">Missouri</option>
+<option value="MT">Montana</option>
+<option value="NE">Nebraska</option>
+<option value="NV">Nevada</option>
+<option value="NH">New Hampshire</option>
+<option value="NJ">New Jersey</option>
+<option value="NM">New Mexico</option>
+<option value="NY">New York</option>
+<option value="NC">North Carolina</option>
+<option value="ND">North Dakota</option>
+<option value="OH" selected>Ohio</option>
+<option value="OK">Oklahoma</option>
+<option value="OR">Oregon</option>
+<option value="PA">Pennsylvania</option>
+<option value="RI">Rhode Island</option>
+<option value="SC">South Carolina</option>
+<option value="SD">South Dakota</option>
+<option value="TN">Tennessee</option>
+<option value="TX">Texas</option>
+<option value="UT">Utah</option>
+<option value="VT">Vermont</option>
+<option value="VA">Virginia</option>
+<option value="WA">Washington</option>
+<option value="WV">West Virginia</option>
+<option value="WI">Wisconsin</option>
+<option value="WY">Wyoming</option>
+</select>
+</div><br />
+<p>
+Originally looked like:<br/> <select name="state-orig">
+<option value="AL">Alabama</option>
+<option value="AK">Alaska</option>
+<option value="AZ">Arizona</option>
+<option value="AR">Arkansas</option>
+<option value="CA">California</option>
+<option value="CO">Colorado</option>
+<option value="CT">Connecticut</option>
+<option value="DE">Delaware</option>
+<option value="FL">Florida</option>
+<option value="GA">Georgia</option>
+<option value="HI">Hawaii</option>
+<option value="ID">Idaho</option>
+<option value="IL">Illinois</option>
+<option value="IN">Indiana</option>
+<option value="IA">Iowa</option>
+<option value="KS">Kansas</option>
+<option value="KY">Kentucky</option>
+<option value="LA">Louisiana</option>
+<option value="ME">Maine</option>
+<option value="MD">Maryland</option>
+<option value="MA">Massachusetts</option>
+<option value="MI">Michigan</option>
+<option value="MN">Minnesota</option>
+<option value="MS">Mississippi</option>
+<option value="MO">Missouri</option>
+<option value="MT">Montana</option>
+<option value="NE">Nebraska</option>
+<option value="NV">Nevada</option>
+<option value="NH">New Hampshire</option>
+<option value="NJ">New Jersey</option>
+<option value="NM">New Mexico</option>
+<option value="NY">New York</option>
+<option value="NC">North Carolina</option>
+<option value="ND">North Dakota</option>
+<option value="OH" selected>Ohio</option>
+<option value="OK">Oklahoma</option>
+<option value="OR">Oregon</option>
+<option value="PA">Pennsylvania</option>
+<option value="RI">Rhode Island</option>
+<option value="SC">South Carolina</option>
+<option value="SD">South Dakota</option>
+<option value="TN">Tennessee</option>
+<option value="TX">Texas</option>
+<option value="UT">Utah</option>
+<option value="VT">Vermont</option>
+<option value="VA">Virginia</option>
+<option value="WA">Washington</option>
+<option value="WV">West Virginia</option>
+<option value="WI">Wisconsin</option>
+<option value="WY">Wyoming</option>
+</select>
+</p>
+<div id="transformed-combo-code-panel" style="margin-top:10px">
+<pre id="transformed-combo-code" class="code"><code>var converted = new Ext.form.ComboBox({
+    typeAhead: true,
+    triggerAction: 'all',
+    transform:'state',
+    width:135,
+    forceSelection:true
+});
+</code></pre></div>
+<br />
+<p>
+    <b>Grid Editor</b><br />
+    <a href="../grid/edit-grid.html">Click here</a> to see the combo as a grid editor.
+</p>
+<br />
+<p>
+    <b>Templates and Ajax</b><br />
+    <a href="forum-search.html">Click here</a> for a more advanced example.
+</p>
+<br /><br /><br /><br />
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/combos.js	(revision 625)
@@ -0,0 +1,109 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    // simple array store
+    var store = new Ext.data.ArrayStore({
+        fields: ['abbr', 'state', 'nick'],
+        data : Ext.exampledata.states // from states.js
+    });
+    var combo = new Ext.form.ComboBox({
+        store: store,
+        displayField:'state',
+        typeAhead: true,
+        mode: 'local',
+        forceSelection: true,
+        triggerAction: 'all',
+        emptyText:'Select a state...',
+        selectOnFocus:true,
+        applyTo: 'local-states'
+    });
+    
+    //Simple arrays can be used directly as the store config.  1-dimensional arrays
+    //will automatically be expanded (each array item will be the combo value and text)
+    //and for multi-dimensional arrays, the value in index 0 of each item will be assumed
+    //to be the value, while the value at index 1 is assumed to be the text.  For example,
+    //[['AL', 'Alabama'],['AK', 'Alaska'], etc.]. Any other values beyond index 1 within
+    //each item will be ignored using this approach.
+    var comboFromArray = new Ext.form.ComboBox({
+        store: Ext.exampledata.states,
+        typeAhead: true,
+        forceSelection: true,
+        triggerAction: 'all',
+        emptyText:'Select a state...',
+        selectOnFocus:true,
+        applyTo: 'array-states'
+    });
+
+    var comboWithTooltip = new Ext.form.ComboBox({
+        tpl: '<tpl for="."><div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}</div></tpl>',
+        store: store,
+        displayField:'state',
+        typeAhead: true,
+        forceSelection: true,
+        mode: 'local',
+        triggerAction: 'all',
+        emptyText:'Select a state...',
+        selectOnFocus:true,
+        applyTo: 'local-states-with-qtip'
+    });
+
+    var converted = new Ext.form.ComboBox({
+        typeAhead: true,
+        triggerAction: 'all',
+        transform:'state',
+        width:135,
+        forceSelection:true
+    });
+    
+//  Create code view Panels. Ignore.
+    new Ext.Panel({
+    	contentEl: 'state-combo-code',
+    	width: Ext.getBody().child('p').getWidth(),
+    	title: 'View code to create this combo',
+    	hideCollapseTool: true,
+    	titleCollapse: true,
+    	collapsible: true,
+    	collapsed: true,
+    	renderTo: 'state-combo-code-panel'
+    });
+    new Ext.Panel({
+    	contentEl: 'state-combo-qtip-code',
+    	autoScroll: true,
+    	width: Ext.getBody().child('p').getWidth(),
+    	title: 'View code to create this combo',
+    	hideCollapseTool: true,
+    	titleCollapse: true,
+    	collapsible: true,
+    	collapsed: true,
+    	renderTo: 'state-combo-qtip-code-panel'
+    });
+    new Ext.Panel({
+    	contentEl: 'array-combo-code',
+    	autoScroll: true,
+    	width: Ext.getBody().child('p').getWidth(),
+    	title: 'View code to create this combo',
+    	hideCollapseTool: true,
+    	titleCollapse: true,
+    	collapsible: true,
+    	collapsed: true,
+    	renderTo: 'array-combo-code-panel'
+    });
+    new Ext.Panel({
+    	contentEl: 'transformed-combo-code',
+    	autoScroll: true,
+    	width: Ext.getBody().child('p').getWidth(),
+    	title: 'View code to create this combo',
+    	hideCollapseTool: true,
+    	titleCollapse: true,
+    	collapsible: true,
+    	collapsed: true,
+    	renderTo: 'transformed-combo-code-panel'
+    });
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.html	(revision 625)
@@ -0,0 +1,61 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Custom Fields</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="../ux/SearchField.js"></script>
+    <script type="text/javascript" src="custom.js"></script>
+    <link rel="stylesheet" type="text/css" href="combos.css" />
+
+    <style type="text/css">
+        #search-results a {
+            color: #385F95;
+            font:bold 11px tahoma, arial, helvetica, sans-serif;
+            text-decoration:none;
+        }
+        #search-results a:hover {
+            text-decoration:underline;
+        }
+        #search-results .search-item {
+            padding:5px;
+        }
+        #search-results p {
+            margin:3px !important;
+        }
+        #search-results {
+            border-bottom:1px solid #ddd;
+            margin: 0 1px;
+            height:300px;
+            overflow:auto;
+        }
+        #search-results .x-toolbar {
+            border:0 none;
+        }
+    </style>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<p>
+    <b>Custom Form Fields</b><br />
+    Ext provides many types of form fields to build interactive and rich forms. However, it also
+    provides a complete framework for building new types of fields quickly. The search field below
+    is an example.
+</p>
+<p>The js is not minified so it is readable. See <a href="custom.js">custom.js</a>.</p>
+
+<div style="width:600px;" id="search-panel">
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/custom.js	(revision 625)
@@ -0,0 +1,68 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var ds = new Ext.data.Store({
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-remote.php'
+        }),
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            id: 'post_id'
+        }, [
+            {name: 'postId', mapping: 'post_id'},
+            {name: 'title', mapping: 'topic_title'},
+            {name: 'topicId', mapping: 'topic_id'},
+            {name: 'author', mapping: 'author'},
+            {name: 'lastPost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp'},
+            {name: 'excerpt', mapping: 'post_text'}
+        ]),
+
+        baseParams: {limit:20, forumId: 4}
+    });
+
+    // Custom rendering Template for the View
+    var resultTpl = new Ext.XTemplate(
+        '<tpl for=".">',
+        '<div class="search-item">',
+            '<h3><span>{lastPost:date("M j, Y")}<br />by {author}</span>',
+            '<a href="http://extjs.com/forum/showthread.php?t={topicId}&p={postId}" target="_blank">{title}</a></h3>',
+            '<p>{excerpt}</p>',
+        '</div></tpl>'
+    );
+
+    var panel = new Ext.Panel({
+        applyTo: 'search-panel',
+        title:'Forum Search',
+        height:300,
+        autoScroll:true,
+
+        items: new Ext.DataView({
+            tpl: resultTpl,
+            store: ds,
+            itemSelector: 'div.search-item'
+        }),
+
+        tbar: [
+            'Search: ', ' ',
+            new Ext.ux.form.SearchField({
+                store: ds,
+                width:320
+            })
+        ],
+
+        bbar: new Ext.PagingToolbar({
+            store: ds,
+            pageSize: 20,
+            displayInfo: true,
+            displayMsg: 'Topics {0} - {1} of {2}',
+            emptyMsg: "No topics to display"
+        })
+    });
+
+    ds.load({params:{start:0, limit:20, forumId: 4}});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.html	(revision 625)
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Forms</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="states.js"></script>
+    <script type="text/javascript" src="dynamic.js"></script>
+    <link rel="stylesheet" type="text/css" href="forms.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Dynamic Forms built with JavaScript</h1>
+
+<p>
+    These forms do not do anything and have very little validation. They solely demonstrate
+    how you can use Ext Forms to build and layout forms on the fly.
+</p>
+
+<p>The js is not minified so it is readable. See <a href="dynamic.js">dynamic.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/dynamic.js	(revision 625)
@@ -0,0 +1,385 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    var bd = Ext.getBody();
+
+    /*
+     * ================  Simple form  =======================
+     */
+    bd.createChild({tag: 'h2', html: 'Form 1 - Very Simple'});
+
+
+    var simple = new Ext.FormPanel({
+        labelWidth: 75, // label settings here cascade unless overridden
+        url:'save-form.php',
+        frame:true,
+        title: 'Simple Form',
+        bodyStyle:'padding:5px 5px 0',
+        width: 350,
+        defaults: {width: 230},
+        defaultType: 'textfield',
+
+        items: [{
+                fieldLabel: 'First Name',
+                name: 'first',
+                allowBlank:false
+            },{
+                fieldLabel: 'Last Name',
+                name: 'last'
+            },{
+                fieldLabel: 'Company',
+                name: 'company'
+            }, {
+                fieldLabel: 'Email',
+                name: 'email',
+                vtype:'email'
+            }, new Ext.form.TimeField({
+                fieldLabel: 'Time',
+                name: 'time',
+                minValue: '8:00am',
+                maxValue: '6:00pm'
+            })
+        ],
+
+        buttons: [{
+            text: 'Save'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    simple.render(document.body);
+
+    
+    /*
+     * ================  Form 2  =======================
+     */
+    bd.createChild({tag: 'h2', html: 'Form 2 - Adding fieldsets'});
+
+    var fsf = new Ext.FormPanel({
+        labelWidth: 75, // label settings here cascade unless overridden
+        url:'save-form.php',
+        frame:true,
+        title: 'Simple Form with FieldSets',
+        bodyStyle:'padding:5px 5px 0',
+        width: 350,
+
+        items: [{
+            xtype:'fieldset',
+            checkboxToggle:true,
+            title: 'User Information',
+            autoHeight:true,
+            defaults: {width: 210},
+            defaultType: 'textfield',
+            collapsed: true,
+            items :[{
+                    fieldLabel: 'First Name',
+                    name: 'first',
+                    allowBlank:false
+                },{
+                    fieldLabel: 'Last Name',
+                    name: 'last'
+                },{
+                    fieldLabel: 'Company',
+                    name: 'company'
+                }, {
+                    fieldLabel: 'Email',
+                    name: 'email',
+                    vtype:'email'
+                }
+            ]
+        },{
+            xtype:'fieldset',
+            title: 'Phone Number',
+            collapsible: true,
+            autoHeight:true,
+            defaults: {width: 210},
+            defaultType: 'textfield',
+            items :[{
+                    fieldLabel: 'Home',
+                    name: 'home',
+                    value: '(888) 555-1212'
+                },{
+                    fieldLabel: 'Business',
+                    name: 'business'
+                },{
+                    fieldLabel: 'Mobile',
+                    name: 'mobile'
+                },{
+                    fieldLabel: 'Fax',
+                    name: 'fax'
+                }
+            ]
+        }],
+
+        buttons: [{
+            text: 'Save'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    fsf.render(document.body);
+
+    /*
+     * ================  Form 3  =======================
+     */
+    bd.createChild({tag: 'h2', html: 'Form 3 - A little more complex'});
+
+
+    var top = new Ext.FormPanel({
+        labelAlign: 'top',
+        frame:true,
+        title: 'Multi Column, Nested Layouts and Anchoring',
+        bodyStyle:'padding:5px 5px 0',
+        width: 600,
+        items: [{
+            layout:'column',
+            items:[{
+                columnWidth:.5,
+                layout: 'form',
+                items: [{
+                    xtype:'textfield',
+                    fieldLabel: 'First Name',
+                    name: 'first',
+                    anchor:'95%'
+                }, {
+                    xtype:'textfield',
+                    fieldLabel: 'Company',
+                    name: 'company',
+                    anchor:'95%'
+                }]
+            },{
+                columnWidth:.5,
+                layout: 'form',
+                items: [{
+                    xtype:'textfield',
+                    fieldLabel: 'Last Name',
+                    name: 'last',
+                    anchor:'95%'
+                },{
+                    xtype:'textfield',
+                    fieldLabel: 'Email',
+                    name: 'email',
+                    vtype:'email',
+                    anchor:'95%'
+                }]
+            }]
+        },{
+            xtype:'htmleditor',
+            id:'bio',
+            fieldLabel:'Biography',
+            height:200,
+            anchor:'98%'
+        }],
+
+        buttons: [{
+            text: 'Save'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    top.render(document.body);
+
+
+    /*
+     * ================  Form 4  =======================
+     */
+    bd.createChild({tag: 'h2', html: 'Form 4 - Forms can be a TabPanel...'});
+
+
+
+    var tabs = new Ext.FormPanel({
+        labelWidth: 75,
+        border:false,
+        width: 350,
+
+        items: {
+            xtype:'tabpanel',
+            activeTab: 0,
+            defaults:{autoHeight:true, bodyStyle:'padding:10px'}, 
+            items:[{
+                title:'Personal Details',
+                layout:'form',
+                defaults: {width: 230},
+                defaultType: 'textfield',
+
+                items: [{
+                    fieldLabel: 'First Name',
+                    name: 'first',
+                    allowBlank:false,
+                    value: 'Jack'
+                },{
+                    fieldLabel: 'Last Name',
+                    name: 'last',
+                    value: 'Slocum'
+                },{
+                    fieldLabel: 'Company',
+                    name: 'company',
+                    value: 'Ext JS'
+                }, {
+                    fieldLabel: 'Email',
+                    name: 'email',
+                    vtype:'email'
+                }]
+            },{
+                title:'Phone Numbers',
+                layout:'form',
+                defaults: {width: 230},
+                defaultType: 'textfield',
+
+                items: [{
+                    fieldLabel: 'Home',
+                    name: 'home',
+                    value: '(888) 555-1212'
+                },{
+                    fieldLabel: 'Business',
+                    name: 'business'
+                },{
+                    fieldLabel: 'Mobile',
+                    name: 'mobile'
+                },{
+                    fieldLabel: 'Fax',
+                    name: 'fax'
+                }]
+            }]
+        },
+
+        buttons: [{
+            text: 'Save'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    tabs.render(document.body);
+
+
+
+    /*
+     * ================  Form 5  =======================
+     */
+    bd.createChild({tag: 'h2', html: 'Form 5 - ... and forms can contain TabPanel(s)'});
+
+    var tab2 = new Ext.FormPanel({
+        labelAlign: 'top',
+        title: 'Inner Tabs',
+        bodyStyle:'padding:5px',
+        width: 600,
+        items: [{
+            layout:'column',
+            border:false,
+            items:[{
+                columnWidth:.5,
+                layout: 'form',
+                border:false,
+                items: [{
+                    xtype:'textfield',
+                    fieldLabel: 'First Name',
+                    name: 'first',
+                    anchor:'95%'
+                }, {
+                    xtype:'textfield',
+                    fieldLabel: 'Company',
+                    name: 'company',
+                    anchor:'95%'
+                }]
+            },{
+                columnWidth:.5,
+                layout: 'form',
+                border:false,
+                items: [{
+                    xtype:'textfield',
+                    fieldLabel: 'Last Name',
+                    name: 'last',
+                    anchor:'95%'
+                },{
+                    xtype:'textfield',
+                    fieldLabel: 'Email',
+                    name: 'email',
+                    vtype:'email',
+                    anchor:'95%'
+                }]
+            }]
+        },{
+            xtype:'tabpanel',
+            plain:true,
+            activeTab: 0,
+            height:235,
+            defaults:{bodyStyle:'padding:10px'},
+            items:[{
+                title:'Personal Details',
+                layout:'form',
+                defaults: {width: 230},
+                defaultType: 'textfield',
+
+                items: [{
+                    fieldLabel: 'First Name',
+                    name: 'first',
+                    allowBlank:false,
+                    value: 'Jack'
+                },{
+                    fieldLabel: 'Last Name',
+                    name: 'last',
+                    value: 'Slocum'
+                },{
+                    fieldLabel: 'Company',
+                    name: 'company',
+                    value: 'Ext JS'
+                }, {
+                    fieldLabel: 'Email',
+                    name: 'email',
+                    vtype:'email'
+                }]
+            },{
+                title:'Phone Numbers',
+                layout:'form',
+                defaults: {width: 230},
+                defaultType: 'textfield',
+
+                items: [{
+                    fieldLabel: 'Home',
+                    name: 'home',
+                    value: '(888) 555-1212'
+                },{
+                    fieldLabel: 'Business',
+                    name: 'business'
+                },{
+                    fieldLabel: 'Mobile',
+                    name: 'mobile'
+                },{
+                    fieldLabel: 'Fax',
+                    name: 'fax'
+                }]
+            },{
+                cls:'x-plain',
+                title:'Biography',
+                layout:'fit',
+                items: {
+                    xtype:'htmleditor',
+                    id:'bio2',
+                    fieldLabel:'Biography'
+                }
+            }]
+        }],
+
+        buttons: [{
+            text: 'Save'
+        },{
+            text: 'Cancel'
+        }]
+    });
+
+    tab2.render(document.body);
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.css	(revision 625)
@@ -0,0 +1,33 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * FileUploadField component styles
+ */
+.x-form-file-wrap {
+    position: relative;
+    height: 22px;
+}
+.x-form-file-wrap .x-form-file {
+	position: absolute;
+	right: 0;
+	-moz-opacity: 0;
+	filter:alpha(opacity: 0);
+	opacity: 0;
+	z-index: 2;
+    height: 22px;
+}
+.x-form-file-wrap .x-form-file-btn {
+	position: absolute;
+	right: 0;
+	z-index: 1;
+}
+.x-form-file-wrap .x-form-file-text {
+    position: absolute;
+    left: 0;
+    z-index: 3;
+    color: #777;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.html	(revision 625)
@@ -0,0 +1,56 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>File Upload Field Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
+    <script type="text/javascript" src="../../ext-all-debug.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="file-upload.css"/>
+    <script type="text/javascript" src="../ux/FileUploadField.js"></script>
+    <script type="text/javascript" src="file-upload.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        .upload-icon {
+            background: url('../shared/icons/fam/image_add.png') no-repeat 0 0 !important;
+        }
+        #fi-button-msg {
+            border: 2px solid #ccc;
+            padding: 5px 10px;
+            background: #eee;
+            margin: 5px;
+            float: left;
+        }
+    </style>
+</head>
+<body>
+    <h1>File Upload Field</h1>
+    <p>The js is not minified so it is readable. See <a href="file-upload.js">file-input.js</a>.</p>
+
+    <p>
+        <b>Basic FileUpload</b><br />
+        A typical file upload field with Ext style.  Direct editing of the text field cannot be done in a
+        consistent, cross-browser way, so it is always read-only in this implementation.
+        <div id="fi-basic"></div>
+        <div id="fi-basic-btn"></div>
+    </p>
+
+    <p>
+        <b>Basic FileUpload (Button-only)</b><br />
+        You can also render the file input as a button without the text field, with access to the field's value via the
+        standard <tt>Ext.form.TextField</tt> interface or by handling the <tt>fileselected</tt> event (as in this example).
+        <div id="fi-button"></div>
+        <div id="fi-button-msg" style="display:none;"></div>
+        <div class="x-clear"></div>
+    </p>
+
+    <p>
+        <b>Form Example</b><br />
+        The FileUploadField can also be used in standard form layouts, with support for anchoring, validation (the
+        field is required in this example), empty text, etc.  This example also demonstrates using the
+        <tt>buttonCfg</tt> option to provide a customized icon upload button.
+        <div id="fi-form"></div>
+    </p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.js	(revision 625)
@@ -0,0 +1,108 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    var msg = function(title, msg){
+        Ext.Msg.show({
+            title: title,
+            msg: msg,
+            minWidth: 200,
+            modal: true,
+            icon: Ext.Msg.INFO,
+            buttons: Ext.Msg.OK
+        });
+    };
+
+    var fibasic = new Ext.ux.form.FileUploadField({
+        renderTo: 'fi-basic',
+        width: 400
+    });
+
+    new Ext.Button({
+        text: 'Get File Path',
+        renderTo: 'fi-basic-btn',
+        handler: function(){
+            var v = fibasic.getValue();
+            msg('Selected File', v && v != '' ? v : 'None');
+        }
+    });
+
+    var fbutton = new Ext.ux.form.FileUploadField({
+        renderTo: 'fi-button',
+        buttonOnly: true,
+        listeners: {
+            'fileselected': function(fb, v){
+                var el = Ext.fly('fi-button-msg');
+                el.update('<b>Selected:</b> '+v);
+                if(!el.isVisible()){
+                    el.slideIn('t', {
+                        duration: .2,
+                        easing: 'easeIn',
+                        callback: function(){
+                            el.highlight();
+                        }
+                    });
+                }else{
+                    el.highlight();
+                }
+            }
+        }
+    });
+
+    var fp = new Ext.FormPanel({
+        renderTo: 'fi-form',
+        fileUpload: true,
+        width: 500,
+        frame: true,
+        title: 'File Upload Form',
+        autoHeight: true,
+        bodyStyle: 'padding: 10px 10px 0 10px;',
+        labelWidth: 50,
+        defaults: {
+            anchor: '95%',
+            allowBlank: false,
+            msgTarget: 'side'
+        },
+        items: [{
+            xtype: 'textfield',
+            fieldLabel: 'Name'
+        },{
+            xtype: 'fileuploadfield',
+            id: 'form-file',
+            emptyText: 'Select an image',
+            fieldLabel: 'Photo',
+            name: 'photo-path',
+            buttonText: '',
+            buttonCfg: {
+                iconCls: 'upload-icon'
+            }
+        }],
+        buttons: [{
+            text: 'Save',
+            handler: function(){
+                if(fp.getForm().isValid()){
+	                fp.getForm().submit({
+	                    url: 'file-upload.php',
+	                    waitMsg: 'Uploading your photo...',
+	                    success: function(fp, o){
+	                        msg('Success', 'Processed file "'+o.result.file+'" on the server');
+	                    }
+	                });
+                }
+            }
+        },{
+            text: 'Reset',
+            handler: function(){
+                fp.getForm().reset();
+            }
+        }]
+    });
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/file-upload.php	(revision 625)
@@ -0,0 +1,3 @@
+<?php
+    sleep(1);
+    echo '{success:true, file:'.json_encode($_FILES['photo-path']['name']).'}';
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.html	(revision 625)
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Form with embedded Grid</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+
+    <script type="text/javascript" src="../shared/code-display.js"></script>
+    <script type="text/javascript" src="form-grid.js"></script>
+    <link rel="stylesheet" type="text/css" href="forms.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+    <style type="text/css">
+        p {
+            width: 750px;
+        }
+        .ext-ie .x-form-check-wrap, .ext-gecko .x-form-check-wrap {
+            padding-top: 3px;
+        }
+        fieldset legend {
+            white-space: nowrap;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Dynamic Form interacting with an embedded Grid</h1>
+
+<p>
+    This Form demonstrates the fact that by virtue of inheriting from the Ext <b><tt>Container</tt></b>
+    class, an Ext.form.FormPanel can contain any Ext <b><tt>Component</tt></b>. This includes all the
+    subclasses of Ext.Panel, including the GridPanel.
+</p>
+<p>
+    The Grid demonstrates the use of creation of derived fields in a Record created using a custom
+    <b><tt>convert</tt></b> function, and the use of column renderers.
+</p>
+<p>
+    The Form demonstrates the use of radio buttons grouped by name being set by the value of the derived
+    'rating' field.
+</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/form-grid.js	(revision 625)
@@ -0,0 +1,228 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    var bd = Ext.getBody();
+
+//   Define the Grid data and create the Grid
+    var myData = [
+        ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+        ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+        ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+        ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+        ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+        ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+        ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+        ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+        ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+        ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+        ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+        ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+        ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+        ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+        ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+        ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+        ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+        ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+        ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+        ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+        ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+        ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+        ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+        ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+        ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+        ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+        ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+        ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+        ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+    ];
+
+    var ds = new Ext.data.Store({
+        reader: new Ext.data.ArrayReader({}, [
+            {name: 'company'},
+            {name: 'price', type: 'float'},
+            {name: 'change', type: 'float'},
+            {name: 'pctChange', type: 'float'},
+            {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
+
+//          Rating dependent upon performance 0 = best, 2 = worst
+            {name: 'rating', type: 'int', convert: function(v, rec) {
+                   if (rec[3] < 0) return 2;
+                   if (rec[3] < 1) return 1;
+                   return 0;
+               }
+            }
+        ])
+    });
+    ds.loadData(myData);
+
+    // example of custom renderer function
+    function italic(value){
+        return '<i>' + value + '</i>';
+    }
+
+    // example of custom renderer function
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+    // example of custom renderer function
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+    
+    // render rating as "A", "B" or "C" depending upon numeric value.
+    function rating(v) {
+        if (v == 0) return "A"
+        if (v == 1) return "B"
+        if (v == 2) return "C"
+    }
+
+    // the DefaultColumnModel expects this blob to define columns. It can be extended to provide
+    // custom or reusable ColumnModels
+    var colModel = new Ext.grid.ColumnModel([
+        {id:'company',header: "Company", width: 160, sortable: true, locked:false, dataIndex: 'company'},
+        {header: "Price", width: 55, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+        {header: "Change", width: 55, sortable: true, renderer: change, dataIndex: 'change'},
+        {header: "% Change", width: 65, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+        {header: "Last Updated", width: 80, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'},
+        {header: "Rating", width: 40, sortable: true, renderer: rating, dataIndex: 'rating'}
+    ]);
+
+    bd.createChild({tag: 'h2', html: 'Using a Grid with a Form'});
+
+/*
+ *    Here is where we create the Form
+ */
+    var gridForm = new Ext.FormPanel({
+        id: 'company-form',
+        frame: true,
+        labelAlign: 'left',
+        title: 'Company data',
+        bodyStyle:'padding:5px',
+        width: 750,
+        layout: 'column',    // Specifies that the items will now be arranged in columns
+        items: [{
+            columnWidth: 0.60,
+            layout: 'fit',
+            items: {
+                xtype: 'grid',
+                ds: ds,
+                cm: colModel,
+                sm: new Ext.grid.RowSelectionModel({
+                    singleSelect: true,
+                    listeners: {
+                        rowselect: function(sm, row, rec) {
+                            Ext.getCmp("company-form").getForm().loadRecord(rec);
+                        }
+                    }
+                }),
+                autoExpandColumn: 'company',
+                height: 350,
+                title:'Company Data',
+                border: true,
+                listeners: {
+                    render: function(g) {
+                        g.getSelectionModel().selectRow(0);
+                    },
+                    delay: 10 // Allow rows to be rendered.
+                }
+            }
+        },{
+            columnWidth: 0.4,
+            xtype: 'fieldset',
+            labelWidth: 90,
+            title:'Company details',
+            defaults: {width: 140, border:false},    // Default config options for child items
+            defaultType: 'textfield',
+            autoHeight: true,
+            bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;',
+            border: false,
+            style: {
+                "margin-left": "10px", // when you add custom margin in IE 6...
+                "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0"  // you have to adjust for it somewhere else
+            },
+            items: [{
+                fieldLabel: 'Name',
+                name: 'company'
+            },{
+                fieldLabel: 'Price',
+                name: 'price'
+            },{
+                fieldLabel: '% Change',
+                name: 'pctChange'
+            },{
+                xtype: 'datefield',
+                fieldLabel: 'Last Updated',
+                name: 'lastChange'
+            }, {
+                xtype: 'panel',
+                layout: 'table',
+                layoutConfig: {
+                    columns: 4
+                },
+                anchor: '100%',
+                defaults: {
+                    border: false,
+                    layout: 'form',
+                    labelWidth: 15,
+                    style: {
+                        paddingRight: '10px'
+                    }
+                },
+
+// A radio group: A setValue on any of the following 'radio' inputs using the numeric
+// 'rating' field checks the radio instance which has the matching inputValue.
+                items: [{
+                    cellCls: 'x-form-item',
+                    xtype: 'label',
+                    text: 'Rating',
+                       width: 98
+                }, {
+                    items: {    
+                        xtype: 'radio',
+                        name: 'rating',
+                        inputValue: '0',
+                        fieldLabel: 'A'
+                    }
+                }, {
+                    items: {
+                        xtype: 'radio',
+                        name: 'rating',
+                        inputValue: '1',
+                        fieldLabel: 'B'
+                    }
+                }, {
+                    items: {
+                        xtype: 'radio',
+                        name: 'rating',
+                        inputValue: '2',
+                        fieldLabel: 'C'
+                    }
+                }]
+            }]
+        }],
+        renderTo: bd
+    });
+    
+    //  Create Panel view code. Ignore.
+    createCodePanel('form-grid.js', 'View code to create this Form');
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forms.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forms.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forms.css	(revision 625)
@@ -0,0 +1,29 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.calendar .x-menu-item-icon {
+    background-image:url(../../resources/images/default/shared/calendar.gif);
+}
+
+.search-item {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    padding:3px 10px 3px 10px;
+    border-bottom:1px solid #eeeeee;
+}
+.search-item h3 {
+    display:block;
+    font:inherit;
+    font-weight:bold;
+}
+
+.search-item h3 span {
+    float: right;
+    font-weight:normal;
+    margin:0 0 5px 5px;
+    width:100px;
+    display:block;
+    clear:none;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.html	(revision 625)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>ComboBox - Live Search</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="forum-search.js"></script>
+    <link rel="stylesheet" type="text/css" href="combos.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+        p { width:650px; }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<p>
+    <b>Combo with Templates and Ajax</b><br />
+    This is a more advanced example that shows how you can combine paging, Ext.Template and a remote data store
+    to create a "live search" feature.
+</p>
+<p>The js is not minified so it is readable. See <a href="forum-search.js">forum-search.js</a>.</p>
+
+<!-- The box wrap markup embedded instead of using Element.boxWrap() -->
+<div style="width:600px;">
+    <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
+    <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
+        <h3 style="margin-bottom:5px;">Search the Ext Forums</h3>
+        <input type="text" size="40" name="search" id="search" />
+        <div style="padding-top:4px;">
+            Live search requires a minimum of 4 characters.
+        </div>
+    </div></div></div>
+    <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
+</div>
+        
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/forum-search.js	(revision 625)
@@ -0,0 +1,50 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var ds = new Ext.data.Store({
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-remote.php'
+        }),
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            id: 'post_id'
+        }, [
+            {name: 'title', mapping: 'topic_title'},
+            {name: 'topicId', mapping: 'topic_id'},
+            {name: 'author', mapping: 'author'},
+            {name: 'lastPost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp'},
+            {name: 'excerpt', mapping: 'post_text'}
+        ])
+    });
+
+    // Custom rendering Template
+    var resultTpl = new Ext.XTemplate(
+        '<tpl for="."><div class="search-item">',
+            '<h3><span>{lastPost:date("M j, Y")}<br />by {author}</span>{title}</h3>',
+            '{excerpt}',
+        '</div></tpl>'
+    );
+    
+    var search = new Ext.form.ComboBox({
+        store: ds,
+        displayField:'title',
+        typeAhead: false,
+        loadingText: 'Searching...',
+        width: 570,
+        pageSize:10,
+        hideTrigger:true,
+        tpl: resultTpl,
+        applyTo: 'search',
+        itemSelector: 'div.search-item',
+        onSelect: function(record){ // override default onSelect to do redirect
+            window.location =
+                String.format('http://extjs.com/forum/showthread.php?t={0}&p={1}', record.data.topicId, record.id);
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/states.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/states.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/states.js	(revision 625)
@@ -0,0 +1,62 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// some data used in the examples
+Ext.namespace('Ext.exampledata');
+
+Ext.exampledata.states = [
+        ['AL', 'Alabama', 'The Heart of Dixie'],
+        ['AK', 'Alaska', 'The Land of the Midnight Sun'],
+        ['AZ', 'Arizona', 'The Grand Canyon State'],
+        ['AR', 'Arkansas', 'The Natural State'],
+        ['CA', 'California', 'The Golden State'],
+        ['CO', 'Colorado', 'The Mountain State'],
+        ['CT', 'Connecticut', 'The Constitution State'],
+        ['DE', 'Delaware', 'The First State'],
+        ['DC', 'District of Columbia', "The Nation's Capital"],
+        ['FL', 'Florida', 'The Sunshine State'],
+        ['GA', 'Georgia', 'The Peach State'],
+        ['HI', 'Hawaii', 'The Aloha State'],
+        ['ID', 'Idaho', 'Famous Potatoes'],
+        ['IL', 'Illinois', 'The Prairie State'],
+        ['IN', 'Indiana', 'The Hospitality State'],
+        ['IA', 'Iowa', 'The Corn State'],
+        ['KS', 'Kansas', 'The Sunflower State'],
+        ['KY', 'Kentucky', 'The Bluegrass State'],
+        ['LA', 'Louisiana', 'The Bayou State'],
+        ['ME', 'Maine', 'The Pine Tree State'],
+        ['MD', 'Maryland', 'Chesapeake State'],
+        ['MA', 'Massachusetts', 'The Spirit of America'],
+        ['MI', 'Michigan', 'Great Lakes State'],
+        ['MN', 'Minnesota', 'North Star State'],
+        ['MS', 'Mississippi', 'Magnolia State'],
+        ['MO', 'Missouri', 'Show Me State'],
+        ['MT', 'Montana', 'Big Sky Country'],
+        ['NE', 'Nebraska', 'Beef State'],
+        ['NV', 'Nevada', 'Silver State'],
+        ['NH', 'New Hampshire', 'Granite State'],
+        ['NJ', 'New Jersey', 'Garden State'],
+        ['NM', 'New Mexico', 'Land of Enchantment'],
+        ['NY', 'New York', 'Empire State'],
+        ['NC', 'North Carolina', 'First in Freedom'],
+        ['ND', 'North Dakota', 'Peace Garden State'],
+        ['OH', 'Ohio', 'The Heart of it All'],
+        ['OK', 'Oklahoma', 'Oklahoma is OK'],
+        ['OR', 'Oregon', 'Pacific Wonderland'],
+        ['PA', 'Pennsylvania', 'Keystone State'],
+        ['RI', 'Rhode Island', 'Ocean State'],
+        ['SC', 'South Carolina', 'Nothing Could be Finer'],
+        ['SD', 'South Dakota', 'Great Faces, Great Places'],
+        ['TN', 'Tennessee', 'Volunteer State'],
+        ['TX', 'Texas', 'Lone Star State'],
+        ['UT', 'Utah', 'Salt Lake State'],
+        ['VT', 'Vermont', 'Green Mountain State'],
+        ['VA', 'Virginia', 'Mother of States'],
+        ['WA', 'Washington', 'Green Tree State'],
+        ['WV', 'West Virginia', 'Mountain State'],
+        ['WI', 'Wisconsin', "America's Dairyland"],
+        ['WY', 'Wyoming', 'Like No Place on Earth']
+    ];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-errors.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-errors.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-errors.xml	(revision 625)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<message success="false">
+<errors>
+    <field>
+        <id>first</id>
+        <msg><![CDATA[
+            Invalid name. <br /><i>This is a test validation message from the server </i>
+         ]]></msg>
+    </field>
+    <field>
+        <id>dob</id>
+        <msg><![CDATA[
+            Invalid Date of Birth. <br /><i>This is a test validation message from the server </i>
+         ]]></msg>
+    </field>
+</errors>
+</message>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.html	(revision 625)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>XML Form</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+<script type="text/javascript" src="states.js"></script>
+<script type="text/javascript" src="xml-form.js"></script>
+<link rel="stylesheet" type="text/css" href="forms.css" />
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Loading/Saving a Dynamic Form using XML</h1>
+<p>
+    This is a very simple example of using XML for load and submit of data with an Ext dynamic form.
+</p>
+<p>
+    Click "Load" to load the <a href="xml-form.xml">dummy XML data</a> from the server using an XmlReader.
+</p>
+<p>
+    After loading the form, you will be able to hit submit. The submit action will make a post to the server,
+    and the <a href="xml-errors.xml">dummy XML file</a> on the server with test server-side validation failure messages will be sent back.
+    Those messages will be applied to the appropriate fields in the form.
+</p>
+<p>
+    Note: The built-in JSON support does not require any special readers for mapping. However, If you don't like the Form's built-in JSON format, you could also use a JsonReader for reading data into a form.
+</p>
+<p>The js is not minified so it is readable. See <a href="xml-form.js">xml-form.js</a>.</p>
+
+<div id="form-ct"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.js	(revision 625)
@@ -0,0 +1,124 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    var fs = new Ext.FormPanel({
+        frame: true,
+        title:'XML Form',
+        labelAlign: 'right',
+        labelWidth: 85,
+        width:340,
+        waitMsgTarget: true,
+
+        // configure how to read the XML Data
+        reader : new Ext.data.XmlReader({
+            record : 'contact',
+            success: '@success'
+        }, [
+            {name: 'first', mapping:'name/first'}, // custom mapping
+            {name: 'last', mapping:'name/last'},
+            'company', 'email', 'state',
+            {name: 'dob', type:'date', dateFormat:'m/d/Y'} // custom data types
+        ]),
+
+        // reusable eror reader class defined at the end of this file
+        errorReader: new Ext.form.XmlErrorReader(),
+
+        items: [
+            new Ext.form.FieldSet({
+                title: 'Contact Information',
+                autoHeight: true,
+                defaultType: 'textfield',
+                items: [{
+                        fieldLabel: 'First Name',
+                        name: 'first',
+                        width:190
+                    }, {
+                        fieldLabel: 'Last Name',
+                        name: 'last',
+                        width:190
+                    }, {
+                        fieldLabel: 'Company',
+                        name: 'company',
+                        width:190
+                    }, {
+                        fieldLabel: 'Email',
+                        name: 'email',
+                        vtype:'email',
+                        width:190
+                    },
+
+                    new Ext.form.ComboBox({
+                        fieldLabel: 'State',
+                        hiddenName:'state',
+                        store: new Ext.data.ArrayStore({
+                            fields: ['abbr', 'state'],
+                            data : Ext.exampledata.states // from states.js
+                        }),
+                        valueField:'abbr',
+                        displayField:'state',
+                        typeAhead: true,
+                        mode: 'local',
+                        triggerAction: 'all',
+                        emptyText:'Select a state...',
+                        selectOnFocus:true,
+                        width:190
+                    }),
+
+                    new Ext.form.DateField({
+                        fieldLabel: 'Date of Birth',
+                        name: 'dob',
+                        width:190,
+                        allowBlank:false
+                    })
+                ]
+            })
+        ]
+    });
+
+    // simple button add
+    fs.addButton('Load', function(){
+        fs.getForm().load({url:'xml-form.xml', waitMsg:'Loading'});
+    });
+
+    // explicit add
+    var submit = fs.addButton({
+        text: 'Submit',
+        disabled:true,
+        handler: function(){
+            fs.getForm().submit({url:'xml-errors.xml', waitMsg:'Saving Data...'});
+        }
+    });
+
+    fs.render('form-ct');
+
+    fs.on({
+        actioncomplete: function(form, action){
+            if(action.type == 'load'){
+                submit.enable();
+            }
+        }
+    });
+
+});
+
+// A reusable error reader class for XML forms
+Ext.form.XmlErrorReader = function(){
+    Ext.form.XmlErrorReader.superclass.constructor.call(this, {
+            record : 'field',
+            success: '@success'
+        }, [
+            'id', 'msg'
+        ]
+    );
+};
+Ext.extend(Ext.form.XmlErrorReader, Ext.data.XmlReader);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/form/xml-form.xml	(revision 625)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<message success="true">
+<contact>
+    <name>
+        <first>Jack</first>
+        <last>Slocum</last>
+    </name>
+    <company>Ext JS</company>
+    <email>support@extjs.com</email>
+    <state>OH</state>
+    <dob>04/15/2007</dob>
+</contact>
+</message>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.css	(revision 625)
@@ -0,0 +1,139 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-grid3-td-topic b {
+    font-family:tahoma, verdana;
+    display:block;
+    color:#333;
+}
+.x-grid3-td-topic b i {
+    font-weight:normal;
+    font-style: normal;
+    color:#000;
+}
+.x-grid3-td-topic .topic {
+    padding-left:20px;
+    background:transparent url(message.png) no-repeat 0 2px;
+}
+.x-grid3-td-topic .x-grid3-cell-inner {
+    white-space:normal;
+}
+.x-grid3-td-topic a {
+    color: #385F95;
+    text-decoration:none;
+}
+.x-grid3-td-topic a:hover {
+    text-decoration:underline;
+}
+.details .x-btn-text {
+    background-image: url(details.gif);
+}
+.msg-view {
+    background-image: url(../shared/icons/fam/application_view_list.png) !important;
+}
+.preview {
+    background-image: url(preview.png) !important;
+}
+.new-topic {
+    background-image: url(message_edit.png) !important;
+}
+.summary {
+    background-image: url(details.gif) !important;
+}
+.x-grid3-row-body p {
+    margin:5px 20px 10px 25px !important;
+    color:#555;
+}
+
+.post-date {
+    font-weight:bold;
+    color:#333;
+}
+
+.author {
+    color:#333;
+}
+
+.x-tree {
+    background:#fff !important;
+}
+.x-border-layout-ct {
+    background:transparent;
+}
+body.x-border-layout-ct {
+    background:#c3d5ed url(bg.gif) repeat-x left top !important;
+}
+.x-layout-split {
+    background-color:transparent !important;
+}
+
+.x-tree-node div.forum-ct{
+    background:#eee url(cmp-bg.gif) repeat-x;
+    margin-top:1px;
+    border-top:1px solid #ddd;
+    border-bottom:1px solid #ccc;
+    padding-top:2px;
+    padding-bottom:1px;
+}
+.forum-ct .x-tree-node-icon {
+    display:none;
+}
+.forum-ct a span {
+    font-weight:bold;
+    color:#222;
+}
+.forum {
+    border:1px solid #fff;
+}
+.forum .x-tree-ec-icon {
+    display:none;
+}
+.icon-forum {
+    background-image:url(forum.gif) !important;
+}
+.x-tree-selected {
+    border:1px dotted #a3bae9;
+    background:#DFE8F6;
+}
+.x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#15428b;
+    font-weight:bold;
+}
+
+#main-tabs .x-tab-panel-body {
+    background:transparent;
+    border:0 none;
+}
+
+#topic-grid .x-panel-tbar .x-toolbar {
+    border-top:0 none;
+}
+
+
+.search-item {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    padding:3px 10px 3px 10px;
+    border:1px solid #fff;
+    border-bottom:1px solid #eeeeee;
+    white-space:normal;
+    color:#555;
+}
+.search-item h3 {
+    display:block;
+    font:inherit;
+    font-weight:bold;
+    color:#222;
+}
+
+.search-item h3 span {
+    float: right;
+    font-weight:normal;
+    margin:0 0 5px 5px;
+    width:100px;
+    display:block;
+    clear:none;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.html	(revision 625)
@@ -0,0 +1,22 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>ExtJS.com Forums</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    
+    <script type="text/javascript" src="forum.js"></script>
+    <link rel="stylesheet" type="text/css" href="forum.css" />
+
+</head>
+<body>
+<div id="header"><div style="float:right;margin:5px;" class="x-small-editor"><input type="text" id="search" /></div></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/forum/forum.js	(revision 625)
@@ -0,0 +1,406 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+var Forum = {};
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+// The data store for topics
+Forum.TopicStore = function(){
+    Forum.TopicStore.superclass.constructor.call(this, {
+        remoteSort: true,
+
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-browse-remote.php'
+        }),
+
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            id: 'threadid'
+        }, [
+            'title', 'forumtitle', 'forumid', 'author',
+            {name: 'replycount', type: 'int'},
+            {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
+            'lastposter', 'excerpt'
+        ])
+    });
+
+    this.setDefaultSort('lastpost', 'desc');
+};
+Ext.extend(Forum.TopicStore, Ext.data.Store, {
+    loadForum : function(forumId){
+        this.baseParams = {
+            forumId: forumId
+        };
+        this.load({
+            params: {
+                start:0,
+                limit:25
+            }
+        });
+    }
+});
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+// some renderers
+Forum.Renderers = {
+    topic : function(value, p, record){
+        return String.format(
+                '<div class="topic"><b>{0}</b><span class="author">{1}</span></div>',
+                value, record.data.author, record.id, record.data.forumid);
+    },
+
+    lastPost : function(value, p, r){
+        return String.format('<span class="post-date">{0}</span><br/>by {1}', value.dateFormat('M j, Y, g:i a'), r.data['lastposter']);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+Forum.SearchView = function(search){
+
+    this.preview = new Ext.Panel({
+        region:'south',
+        height:250,
+        title:'View Message',
+        split:true
+    });
+
+    this.store = new Ext.data.Store({
+        remoteSort: true,
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-browse-remote.php'
+        }),
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            id: 'post_id'
+        }, [
+            {name: 'postId', mapping: 'post_id'},
+            {name: 'title', mapping: 'topic_title'},
+            {name: 'topicId', mapping: 'topic_id'},
+            {name: 'author', mapping: 'author'},
+            {name: 'lastPost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp'},
+            {name: 'excerpt', mapping: 'post_text'}
+        ])
+    });
+    this.store.setDefaultSort('lastpost', 'desc');
+
+
+    this.grid = new Ext.grid.GridPanel({
+        region:'center',
+
+        store: this.store,
+
+        cm: new Ext.grid.ColumnModel([{
+           id: 'topic',
+           header: "Post Title",
+           dataIndex: 'title',
+           width: 420,
+           renderer: Forum.Renderers.topic
+        },{
+           id: 'last',
+           header: "Date Posted",
+           dataIndex: 'lastpost',
+           width: 150,
+           renderer: Ext.util.Format.dateRenderer('M j, Y, g:i a')
+        }]),
+
+        sm: new Ext.grid.RowSelectionModel({
+            singleSelect:true
+        }),
+
+        trackMouseOver:false,
+
+        loadMask: {msg:'Searching...'},
+
+        viewConfig: {
+            forceFit:true,
+            enableRowBody:true,
+            showPreview:true,
+            getRowClass : function(record, rowIndex, p, ds){
+                if(this.showPreview){
+                    p.body = '<p>'+record.data.excerpt+'</p>';
+                    return 'x-grid3-row-expanded';
+                }
+                return 'x-grid3-row-collapsed';
+            }
+        },
+
+        bbar: new Ext.PagingToolbar({
+            pageSize: 25,
+            store: ds,
+            displayInfo: true,
+            displayMsg: 'Displaying results {0} - {1} of {2}',
+            emptyMsg: "No results to display"
+        })
+    });
+
+    Forum.SearchView.superclass.constructor.call(this, {
+        layout:'border',
+        title:'Search: '+Ext.util.Format.htmlEncode('"'+search+'"'),
+        items:[ this.grid, this.preview ]
+     });
+
+    this.store.baseParams = {
+        query: search
+    };
+
+    this.store.load({params:{start:0, limit: 25}});
+};
+
+Ext.extend(Forum.SearchView, Ext.Panel);
+
+
+
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    var ds = new Forum.TopicStore();
+
+    var cm = new Ext.grid.ColumnModel([{
+           id: 'topic',
+           header: "Topic",
+           dataIndex: 'title',
+           width: 420,
+           renderer: Forum.Renderers.topic
+        },{
+           header: "Author",
+           dataIndex: 'author',
+           width: 100,
+           hidden: true
+        },{
+           header: "Replies",
+           dataIndex: 'replycount',
+           width: 70,
+           align: 'right'
+        },{
+           id: 'last',
+           header: "Last Post",
+           dataIndex: 'lastpost',
+           width: 150,
+           renderer: Forum.Renderers.lastPost
+        }]);
+
+    cm.defaultSortable = true;
+
+    var viewport = new Ext.Viewport({
+        layout:'border',
+        items:[
+            new Ext.BoxComponent({ // raw
+                region:'north',
+                el: 'header',
+                height:32
+            }),
+            new Ext.tree.TreePanel({
+                id:'forum-tree',
+                region:'west',
+                title:'Forums',
+                split:true,
+                width: 325,
+                minSize: 175,
+                maxSize: 400,
+                collapsible: true,
+                margins:'0 0 5 5',
+                loader: new Forum.TreeLoader(),
+                rootVisible:false,
+                lines:false,
+                autoScroll:true,
+                root: new Ext.tree.AsyncTreeNode({
+                          text: 'Forums',
+                          expanded:true
+                      })
+            }),
+            new Ext.TabPanel({
+                id:'main-tabs',
+                activeTab:0,
+                region:'center',
+                margins:'0 5 5 0',
+                resizeTabs:true,
+                tabWidth:150,
+                items: {
+                    id:'main-view',
+                    layout:'border',
+                    title:'Loading...',
+                    items:[
+                        new Ext.grid.GridPanel({
+                            region:'center',
+                            id:'topic-grid',
+                            store: ds,
+                            cm: cm,
+                            sm:new Ext.grid.RowSelectionModel({
+                                singleSelect:true,
+                                listeners: {
+                                    selectionchange: function(sel){
+                                        var rec = sel.getSelected();
+                                        if(rec){
+                                            Ext.getCmp('preview').body.update('<b><u>' + rec.get('title') + '</u></b><br /><br />Post details here.');
+                                        }
+                                    }
+                                }
+                            }),
+                            trackMouseOver:false,
+                            loadMask: {msg:'Loading Topics...'},
+                            viewConfig: {
+                                forceFit:true,
+                                enableRowBody:true,
+                                showPreview:true,
+                                getRowClass : function(record, rowIndex, p, ds){
+                                    if(this.showPreview){
+                                        p.body = '<p>'+record.data.excerpt+'</p>';
+                                        return 'x-grid3-row-expanded';
+                                    }
+                                    return 'x-grid3-row-collapsed';
+                                }
+                            },
+                            tbar:[
+                                {
+                                    text:'New Topic',
+                                    iconCls: 'new-topic',
+                                    handler:function(){alert('Not implemented.');}
+                                },
+                                '-',
+                                {
+                                    pressed: true,
+                                    enableToggle:true,
+                                    text:'Preview Pane',
+                                    tooltip: {title:'Preview Pane',text:'Show or hide the Preview Pane'},
+                                    iconCls: 'preview',
+                                    toggleHandler: togglePreview
+                                },
+                                ' ',
+                                {
+                                    pressed: true,
+                                    enableToggle:true,
+                                    text:'Summary',
+                                    tooltip: {title:'Post Summary',text:'View a short summary of each post in the list'},
+                                    iconCls: 'summary',
+                                    toggleHandler: toggleDetails
+                                }
+                            ],
+                            bbar: new Ext.PagingToolbar({
+                                pageSize: 25,
+                                store: ds,
+                                displayInfo: true,
+                                displayMsg: 'Displaying topics {0} - {1} of {2}',
+                                emptyMsg: "No topics to display"
+                            })
+                        }), {
+                            id:'preview',
+                            region:'south',
+                            height:250,
+                            title:'View Topic',
+                            split:true,
+                            bodyStyle: 'padding: 10px; font-family: Arial; font-size: 12px;'
+                        }
+                     ]
+                 }
+              })
+         ]
+    });
+
+    var tree = Ext.getCmp('forum-tree');
+    tree.on('append', function(tree, p, node){
+       if(node.id == 40){
+           node.select.defer(100, node);
+       }
+    });
+    var sm = tree.getSelectionModel();
+    sm.on('beforeselect', function(sm, node){
+         return node.isLeaf();
+    });
+    sm.on('selectionchange', function(sm, node){
+        ds.loadForum(node.id);
+        Ext.getCmp('main-view').setTitle(node.text);
+    });
+
+
+     var searchStore = new Ext.data.Store({
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-browse-remote.php'
+        }),
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            id: 'threadid'
+        }, [
+            'title', 'author',
+            {name: 'lastpost', type: 'date', dateFormat: 'timestamp'}
+        ])
+    });
+
+    // Custom rendering Template
+    var resultTpl = new Ext.XTemplate(
+        '<tpl for=".">',
+            '<div class="x-combo-list-item search-item">{title} by <b>{author}</b></div>',
+        '</tpl>'
+    );
+
+    var search = new Ext.form.ComboBox({
+        store: searchStore,
+        applyTo: 'search',
+        displayField:'title',
+        typeAhead: false,
+        loadingText: 'Searching...',
+        width: 200,
+        pageSize:10,
+        listWidth:550,
+        hideTrigger:true,
+        tpl: resultTpl,
+        minChars:3,
+        emptyText:'Quick Search',
+        onSelect: function(record){ // override default onSelect to do redirect
+            window.location =
+                String.format('http://extjs.com/forum/showthread.php?t={0}&p={1}', record.data.topicId, record.id);
+        }
+    });
+    // apply it to the exsting input element
+    //search.applyTo('search');
+
+
+
+    function toggleDetails(btn, pressed){
+        var view = Ext.getCmp('topic-grid').getView();
+        view.showPreview = pressed;
+        view.refresh();
+    }
+
+    function togglePreview(btn, pressed){
+        var preview = Ext.getCmp('preview');
+        preview[pressed ? 'show' : 'hide']();
+        preview.ownerCt.doLayout();
+    }
+});
+
+Forum.TreeLoader = function(){
+    Forum.TreeLoader.superclass.constructor.call(this);
+    this.proxy = new Ext.data.ScriptTagProxy({
+        url : this.dataUrl
+    });
+};
+Ext.extend(Forum.TreeLoader, Ext.tree.TreeLoader, {
+    dataUrl: 'http://extjs.com/forum/forums-remote.php',
+    requestData : function(node, cb){
+        this.proxy.request('read', null, {}, {
+            readRecords : function(o){
+                return o;
+            }
+        }, this.addNodes, this, {node:node, cb:cb});
+    },
+
+    addNodes : function(o, arg){
+        var node = arg.node;
+        for(var i = 0, len = o.length; i < len; i++){
+            var n = this.createNode(o[i]);
+            if(n){
+                node.appendChild(n);
+            }
+        }
+        arg.cb(this, node);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.html	(revision 625)
@@ -0,0 +1,27 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Array Grid Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="array-grid.js"></script>
+
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Array Grid Example</h1>
+<p>This example shows how to create a grid from Array data.</p>
+<p>Note that the js is not minified so it is readable. See <a href="array-grid.js">array-grid.js</a>.</p>
+
+<div id="grid-example"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/array-grid.js	(revision 625)
@@ -0,0 +1,96 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    // NOTE: This is an example showing simple state management. During development,
+    // it is generally best to disable state management as dynamically-generated ids
+    // can change across page loads, leading to unpredictable results.  The developer
+    // should ensure that stable state ids are set for stateful components in real apps.    
+    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+
+    var myData = [
+        ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+        ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+        ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+        ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+        ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+        ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+        ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+        ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+        ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+        ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+        ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+        ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+        ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+        ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+        ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+        ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+        ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+        ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+        ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+        ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+        ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+        ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+        ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+        ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+        ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+        ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+        ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+        ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],            
+        ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+    ];
+
+    // example of custom renderer function
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+
+    // example of custom renderer function
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+
+    // create the data store
+    var store = new Ext.data.ArrayStore({
+        fields: [
+           {name: 'company'},
+           {name: 'price', type: 'float'},
+           {name: 'change', type: 'float'},
+           {name: 'pctChange', type: 'float'},
+           {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+        ]
+    });
+    store.loadData(myData);
+
+    // create the Grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
+            {header: "Change", width: 75, sortable: true, renderer: change, dataIndex: 'change'},
+            {header: "% Change", width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        stripeRows: true,
+        autoExpandColumn: 'company',
+        height:350,
+        width:600,
+        title:'Array Grid'
+    });
+    grid.render('grid-example');
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.html	(revision 625)
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+		<title>Data Binding Example - Implemented with classes</title>
+	    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+	 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+	    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+	    <script type="text/javascript" src="binding-with-classes.js"></script>
+		<style type="text/css">
+			.x-panel-mc {
+				font-size: 12px;
+				line-height: 18px;
+			}
+		</style>
+    	<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+	</head>
+	<body>
+		<h1>Data Binding Example - Implemented with classes</h1>
+		<p>This example expands upon the <a href="binding.html">Binding example</a>. It shows how to implement the same functionality but in a more organized and object-oriented fashion</p>
+		<p>Note that the js is not minified so it is readable. See <a href="binding-with-classes.js">binding-with-classes.js</a>.</p>
+		<div id="binding-example"></div>
+	</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding-with-classes.js	(revision 625)
@@ -0,0 +1,219 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// setup an App namespace
+// This is done to prevent collisions in the global namespace
+Ext.ns('App');
+
+/**
+ * App.BookStore
+ * @extends Ext.data.Store
+ * @cfg {String} url This will be a url of a location to load the BookStore
+ * This is a specialized Store which maintains books.
+ * It already knows about Amazon's XML definition and will expose the following
+ * Record defintion:
+ *  - Author
+ *  - Manufacturer
+ *  - ProductGroup
+ *  - DetailPageURL
+ */
+App.BookStore = function(config) {
+	var config = config || {};
+	Ext.applyIf(config, {
+		reader: new Ext.data.XmlReader({
+           // records will have an "Item" tag
+           record: 'Item',
+           id: 'ASIN',
+           totalRecords: '@total'
+       }, [
+           // set up the fields mapping into the xml doc
+           // The first needs mapping, the others are very basic
+           {name: 'Author', mapping: 'ItemAttributes > Author'},
+           'Title',
+		   'Manufacturer',
+		   'ProductGroup',
+		   // Detail URL is not part of the column model of the grid
+		   'DetailPageURL'
+       ])
+	});
+	// call the superclass's constructor
+	App.BookStore.superclass.constructor.call(this, config);
+};
+Ext.extend(App.BookStore, Ext.data.Store);
+
+
+
+/**
+ * App.BookGrid
+ * @extends Ext.grid.GridPanel
+ * This is a custom grid which will display book information. It is tied to
+ * a specific record definition by the dataIndex properties.
+ *
+ * It follows a very custom pattern used only when extending Ext.Components
+ * in which you can omit the constructor.
+ *
+ * It also registers the class with the Component Manager with an xtype of
+ * bookgrid. This allows the application to take care of the lazy-instatiation
+ * facilities provided in Ext's Component Model.
+ */
+App.BookGrid = Ext.extend(Ext.grid.GridPanel, {
+	// override
+	initComponent : function() {
+		Ext.apply(this, {
+			// Pass in a column model definition
+			// Note that the DetailPageURL was defined in the record definition but is not used
+			// here. That is okay.
+	        columns: [
+	            {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
+	            {header: "Title", dataIndex: 'Title', sortable: true},
+	            {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
+	            {header: "Product Group", dataIndex: 'ProductGroup', sortable: true}
+	        ],
+			sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
+			// Note the use of a storeId, this will register thisStore
+			// with the StoreMgr and allow us to retrieve it very easily.
+			store: new App.BookStore({
+				storeId: 'gridBookStore',
+				url: 'sheldon.xml'
+			}),
+			// force the grid to fit the space which is available
+			viewConfig: {
+				forceFit: true
+			}
+		});
+		// finally call the superclasses implementation
+		App.BookGrid.superclass.initComponent.call(this);
+	}
+});
+// This will associate an string representation of a class
+// (called an xtype) with the Component Manager
+// It allows you to support lazy instantiation of your components
+Ext.reg('bookgrid', App.BookGrid);
+
+
+/**
+ * App.BookDetail
+ * @extends Ext.Panel
+ * This is a specialized Panel which is used to show information about
+ * a book.
+ *
+ * This demonstrates adding 2 custom properties (tplMarkup and
+ * startingMarkup) to the class. It also overrides the initComponent
+ * method and adds a new method called updateDetail.
+ *
+ * The class will be registered with an xtype of 'bookdetail'
+ */
+App.BookDetail = Ext.extend(Ext.Panel, {
+	// add tplMarkup as a new property
+	tplMarkup: [
+		'Title: <a href="{DetailPageURL}" target="_blank">{Title}</a><br/>',
+		'Author: {Author}<br/>',
+		'Manufacturer: {Manufacturer}<br/>',
+		'Product Group: {ProductGroup}<br/>'
+	],
+	// startingMarup as a new property
+	startingMarkup: 'Please select a book to see additional details',
+	// override initComponent to create and compile the template
+	// apply styles to the body of the panel and initialize
+	// html to startingMarkup
+	initComponent: function() {
+		this.tpl = new Ext.Template(this.tplMarkup);
+		Ext.apply(this, {
+			bodyStyle: {
+				background: '#ffffff',
+				padding: '7px'
+			},
+			html: this.startingMarkup
+		});
+		// call the superclass's initComponent implementation
+		App.BookDetail.superclass.initComponent.call(this);
+	},
+	// add a method which updates the details
+	updateDetail: function(data) {
+		this.tpl.overwrite(this.body, data);
+	}
+});
+// register the App.BookDetail class with an xtype of bookdetail
+Ext.reg('bookdetail', App.BookDetail);
+
+
+/**
+ * App.BookMasterDetail
+ * @extends Ext.Panel
+ *
+ * This is a specialized panel which is composed of both a bookgrid
+ * and a bookdetail panel. It provides the glue between the two
+ * components to allow them to communicate. You could consider this
+ * the actual application.
+ *
+ */
+App.BookMasterDetail = Ext.extend(Ext.Panel, {
+	// override initComponent
+	initComponent: function() {
+		// used applyIf rather than apply so user could
+		// override the defaults
+		Ext.applyIf(this, {
+			frame: true,
+			title: 'Book List',
+			width: 540,
+			height: 400,
+			layout: 'border',
+			items: [{
+				xtype: 'bookgrid',
+				itemId: 'gridPanel',
+				region: 'north',
+				height: 210,
+				split: true
+			},{
+				xtype: 'bookdetail',
+				itemId: 'detailPanel',
+				region: 'center'
+			}]
+		})
+		// call the superclass's initComponent implementation
+		App.BookMasterDetail.superclass.initComponent.call(this);
+	},
+	// override initEvents
+	initEvents: function() {
+		// call the superclass's initEvents implementation
+		App.BookMasterDetail.superclass.initEvents.call(this);
+
+		// now add application specific events
+		// notice we use the selectionmodel's rowselect event rather
+		// than a click event from the grid to provide key navigation
+		// as well as mouse navigation
+		var bookGridSm = this.getComponent('gridPanel').getSelectionModel();
+		bookGridSm.on('rowselect', this.onRowSelect, this);
+	},
+	// add a method called onRowSelect
+	// This matches the method signature as defined by the 'rowselect'
+	// event defined in Ext.grid.RowSelectionModel
+	onRowSelect: function(sm, rowIdx, r) {
+		// getComponent will retrieve itemId's or id's. Note that itemId's
+		// are scoped locally to this instance of a component to avoid
+		// conflicts with the ComponentMgr
+		var detailPanel = this.getComponent('detailPanel');
+		detailPanel.updateDetail(r.data);
+	}
+});
+// register an xtype with this class
+Ext.reg('bookmasterdetail', App.BookMasterDetail);
+
+
+// Finally now that we've defined all of our classes we can instantiate
+// an instance of the app and renderTo an existing div called 'binding-example'
+// Note now that classes have encapsulated this behavior we can easily create
+// an instance of this app to be used in many different contexts, you could
+// easily place this application in an Ext.Window for example
+Ext.onReady(function() {
+	// create an instance of the app
+	var bookApp = new App.BookMasterDetail({
+		renderTo: 'binding-example'
+	});
+	// We can retrieve a reference to the data store
+	// via the StoreMgr by its storeId
+	Ext.StoreMgr.get('gridBookStore').load();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.html	(revision 625)
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+		<title>Data Binding Example</title>
+	    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+	 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+	    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+	    <script type="text/javascript" src="binding.js"></script>
+		<style type="text/css">
+			body {
+				padding: 15px;
+			}
+			.x-panel-mc {
+				font-size: 12px;
+				line-height: 18px;
+			}
+		</style>
+    	<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+	</head>
+<body>
+	<h1>Data Binding Example</h1>
+	<p>This example expands upon the <a href="xml-grid.html">XML Grid example</a> and shows how to implement data binding for a master-detail view.</p>
+	<p>Note that the js is not minified so it is readable. See <a href="binding.js">binding.js</a>.</p>
+	<p>You can find a more advanced example of the same code which abstracts each piece of this simple application into multiple classes in <a href="binding-with-classes.html">Data Binding Example - Implemented with classes</a>.</p>
+	<body>
+		<div id="binding-example"></div>
+	</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/binding.js	(revision 625)
@@ -0,0 +1,84 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+	
+    // create the Data Store
+    var store = new Ext.data.Store({
+        // load using HTTP
+        url: 'sheldon.xml',
+
+        // the return will be XML, so lets set up a reader
+        reader: new Ext.data.XmlReader({
+               // records will have an "Item" tag
+               record: 'Item',
+               id: 'ASIN',
+               totalRecords: '@total'
+           }, [
+               // set up the fields mapping into the xml doc
+               // The first needs mapping, the others are very basic
+               {name: 'Author', mapping: 'ItemAttributes > Author'},
+               'Title',
+			   'Manufacturer',
+			   'ProductGroup',
+			   // Detail URL is not part of the column model of the grid
+			   'DetailPageURL'
+           ])
+    });
+
+    // create the grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
+            {header: "Title", width: 180, dataIndex: 'Title', sortable: true},
+            {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
+            {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
+        ],
+		sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
+		viewConfig: {
+			forceFit: true
+		},
+        height:210,
+		split: true,
+		region: 'north'
+    });
+	
+	// define a template to use for the detail view
+	var bookTplMarkup = [
+		'Title: <a href="{DetailPageURL}" target="_blank">{Title}</a><br/>',
+		'Author: {Author}<br/>',
+		'Manufacturer: {Manufacturer}<br/>',
+		'Product Group: {ProductGroup}<br/>'
+	];
+	var bookTpl = new Ext.Template(bookTplMarkup);
+
+	var ct = new Ext.Panel({
+		renderTo: 'binding-example',
+		frame: true,
+		title: 'Book List',
+		width: 540,
+		height: 400,
+		layout: 'border',
+		items: [
+			grid,
+			{
+				id: 'detailPanel',
+				region: 'center',
+				bodyStyle: {
+					background: '#ffffff',
+					padding: '7px'
+				},
+				html: 'Please select a book to see additional details.'
+			}
+		]
+	})
+	grid.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
+		var detailPanel = Ext.getCmp('detailPanel');
+		bookTpl.overwrite(detailPanel.body, r.data);
+	});
+    store.load();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.html	(revision 625)
@@ -0,0 +1,52 @@
+<html>
+<head>
+	<title>Buffer Grid Example</title>
+	<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+	<!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+	<script type="text/javascript" src="../../ext-all.js"></script>
+
+	<script type="text/javascript" src="../ux/BufferView.js"></script>
+	<script type="text/javascript" src="buffer.js"></script>
+	<link rel="stylesheet" type="text/css" href="grid-examples.css" />
+	
+	<!-- Common Styles for the examples -->
+	<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+	<style type="text/css">
+	.x-grid3-td-topic b {
+	    font-family:tahoma, verdana;
+	    display:block;
+		overflow:hidden;
+		width:98%;
+		text-overflow:ellipsis;
+	}
+	.x-grid3-td-topic b i {
+	    font-weight:normal;
+	    font-style: normal;
+	    color:#000;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.x-grid3-td-topic .x-grid3-cell-inner {
+	    white-space: nowrap;
+	}
+	</style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Buffer Grid Example</h1>
+<p>This example customizes the grid view to do bufferred rendering of the cells of just the visible rows in the grid. 
+This results in a much smaller DOM structure and substantially improves performance of resizing, forceFit, autoExpandColumn and other layout and DOM manipulation features in a large grid. The smaller DOM structure 
+can also help to improve the overall performance of your Ext application.<br/><br/>
+<b>While this example works perfectly, this is completely experimental and only a subset of standard grid features are available. It might need slight customizing for your application needs.</b></p>
+<p>To use this example, be sure to add the following JS file: 	<a href="BufferView.js">BufferView.js</a></p>
+<p>This grid uses a ScriptTagProxy to fetch cross-domain remote data (from the Ext forums).</p>
+<p>Note that the js is not minified so it is readable. See <a href="buffer.js">buffer.js</a>.</p>
+
+<div id="topic-grid"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/buffer.js	(revision 625)
@@ -0,0 +1,89 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var store = new Ext.data.Store({
+        remoteSort: true,
+        baseParams: {lightWeight:true,ext: 'js'},
+        sortInfo: {field:'lastpost', direction:'DESC'},
+        autoLoad: {params:{start:0, limit:500}},
+
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-browse-remote.php'
+        }),
+
+        reader: new Ext.data.JsonReader({
+            root: 'topics',
+            totalProperty: 'totalCount',
+            idProperty: 'threadid',
+            fields: [
+                'title', 'forumtitle', 'forumid', 'author',
+                {name: 'replycount', type: 'int'},
+                {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
+                'lastposter', 'excerpt'
+            ]
+        })
+    });
+
+    var grid = new Ext.grid.GridPanel({
+        renderTo: 'topic-grid',
+        width:700,
+        height:500,
+        frame:true,
+        title:'ExtJS.com - Browse Forums',
+        trackMouseOver:false,
+		autoExpandColumn: 'topic',
+        store: store,
+
+        columns: [new Ext.grid.RowNumberer({width: 30}),{
+            id: 'topic',
+            header: "Topic",
+            dataIndex: 'title',
+            width: 420,
+            renderer: renderTopic,
+            sortable:true
+        },{
+            header: "Replies",
+            dataIndex: 'replycount',
+            width: 70,
+            align: 'right',
+            sortable:true
+        },{
+            id: 'last',
+            header: "Last Post",
+            dataIndex: 'lastpost',
+            width: 150,
+            renderer: renderLast,
+            sortable:true
+        }],
+
+	    bbar: new Ext.PagingToolbar({
+		    store: store,
+		    pageSize:500,
+		    displayInfo:true
+	    }),
+
+	    view: new Ext.ux.grid.BufferView({
+		    // custom row height
+		    rowHeight: 34,
+		    // render rows as they come into viewable area.
+		    scrollDelay: false
+	    })
+    });
+
+
+    // render functions
+    function renderTopic(value, p, record){
+        return String.format(
+                '<b><a href="http://extjs.com/forum/showthread.php?t={2}" target="_blank">{0}</a></b><a href="http://extjs.com/forum/forumdisplay.php?f={3}" target="_blank">{1} Forum</a>',
+                value, record.data.forumtitle, record.id, record.data.forumid);
+    }
+    function renderLast(value, p, r){
+        return String.format('{0}<br/>by {1}', value.dateFormat('M j, Y, g:i a'), r.data['lastposter']);
+    }
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.html	(revision 625)
@@ -0,0 +1,55 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Editor Grid Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <style type="text/css">
+
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/CheckColumn.js"></script>
+
+    <!-- page specific -->
+    <script type="text/javascript" src="../shared/examples.js"></script>
+    <script type="text/javascript" src="edit-grid.js"></script>
+
+</head>
+<body>
+    <h1>Editor Grid Example</h1>
+    <p>This example shows how to create a grid with inline editing.</p>
+    <p>Note that the js is not minified so it is readable. See <a href="edit-grid.js">edit-grid.js</a>.</p>
+    
+    <p>The data in the grid is loaded from <a href="plants.xml">plants.xml</a>.</p>
+    
+    <!-- the custom editor for the 'Light' column references the id="light" -->
+    <select name="light" id="light" style="display: none;">
+    	<option value="Shade">Shade</option>
+    	<option value="Mostly Shady">Mostly Shady</option>
+    	<option value="Sun or Shade">Sun or Shade</option>
+    	<option value="Mostly Sunny">Mostly Sunny</option>
+    	<option value="Sunny">Sunny</option>
+    </select>
+    
+    <div id="editor-grid"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/edit-grid.js	(revision 625)
@@ -0,0 +1,136 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    function formatDate(value){
+        return value ? value.dateFormat('M d, Y') : '';
+    }
+    // shorthand alias
+    var fm = Ext.form;
+
+    // custom column plugin example
+    var checkColumn = new Ext.grid.CheckColumn({
+       header: 'Indoor?',
+       dataIndex: 'indoor',
+       width: 55
+    });
+
+    // the column model has information about grid columns
+    // dataIndex maps the column to the specific data field in
+    // the data store (created below)
+    var cm = new Ext.grid.ColumnModel([{
+           id: 'common',
+           header: 'Common Name',
+           dataIndex: 'common',
+           width: 220,
+           // use shorthand alias defined above
+           editor: new fm.TextField({
+               allowBlank: false
+           })
+        },{
+           header: 'Light',
+           dataIndex: 'light',
+           width: 130,
+           editor: new fm.ComboBox({
+               typeAhead: true,
+               triggerAction: 'all',
+               transform:'light',
+               lazyRender: true,
+               listClass: 'x-combo-list-small'
+            })
+        },{
+           header: 'Price',
+           dataIndex: 'price',
+           width: 70,
+           align: 'right',
+           renderer: 'usMoney',
+           editor: new fm.NumberField({
+               allowBlank: false,
+               allowNegative: false,
+               maxValue: 100000
+           })
+        },{
+           header: 'Available',
+           dataIndex: 'availDate',
+           width: 95,
+           renderer: formatDate,
+           editor: new fm.DateField({
+                format: 'm/d/y',
+                minValue: '01/01/06',
+                disabledDays: [0, 6],
+                disabledDaysText: 'Plants are not available on the weekends'
+            })
+        },
+        checkColumn
+    ]);
+
+    // by default columns are sortable
+    cm.defaultSortable = true;
+
+    // create the Data Store
+    var store = new Ext.data.Store({
+        // load remote data using HTTP
+        url: 'plants.xml',
+
+        // specify a XmlReader (coincides with the XML format of the returned data)
+        reader: new Ext.data.XmlReader(
+            {
+                // records will have a 'plant' tag
+                record: 'plant'
+            },
+            // use an Array of field definition objects to implicitly create a Record constructor
+            [
+                // the 'name' below matches the tag name to read, except 'availDate'
+                // which is mapped to the tag 'availability'
+                {name: 'common', type: 'string'},
+                {name: 'botanical', type: 'string'},
+                {name: 'light'},
+                {name: 'price', type: 'float'},             
+                // dates can be automatically converted by specifying dateFormat
+                {name: 'availDate', mapping: 'availability', type: 'date', dateFormat: 'm/d/Y'},
+                {name: 'indoor', type: 'bool'}
+            ]
+        ),
+
+        sortInfo: {field:'common', direction:'ASC'}
+    });
+
+    // create the editor grid
+    var grid = new Ext.grid.EditorGridPanel({
+        store: store,
+        cm: cm,
+        renderTo: 'editor-grid',
+        width: 600,
+        height: 300,
+        autoExpandColumn: 'common',
+        title: 'Edit Plants?',
+        frame: true,
+        plugins: checkColumn,
+        clicksToEdit: 1,
+        tbar: [{
+            text: 'Add Plant',
+            handler : function(){
+                // access the Record constructor through the grid's store
+                var Plant = grid.getStore().recordType;
+                var p = new Plant({
+                    common: 'New Plant 1',
+                    light: 'Mostly Shade',
+                    price: 0,
+                    availDate: (new Date()).clearTime(),
+                    indoor: false
+                });
+                grid.stopEditing();
+                store.insert(0, p);
+                grid.startEditing(0, 0);
+            }
+        }]
+    });
+
+    // trigger the data store load
+    store.load();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.html	(revision 625)
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>From Markup Grid Example</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+        <script type="text/javascript" src="../../ext-all.js"></script>
+        
+        <script type="text/javascript" src="../ux/TableGrid.js"></script>
+        <script type="text/javascript" src="from-markup.js"></script>
+        <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+        <!-- Common Styles for the examples -->
+        <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+        <style type="text/css">
+        #the-table { border:1px solid #bbb;border-collapse:collapse; }
+        #the-table td,#the-table th { border:1px solid #ccc;border-collapse:collapse;padding:5px; }
+        </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>From Markup Grid Example</h1>
+<p>This example shows how to create a grid with from an existing, unformatted HTML table.</p>
+<p>Note that the js is not minified so it is readable. See <a href="from-markup.js">from-markup.js</a>.</p>
+<button id="create-grid" type="button">Create grid</button>
+<br />
+<br />
+<table cellspacing="0" id="the-table">
+        <thead>
+            <tr style="background:#eeeeee;">
+                <th>Name</th>
+                <th style="width: 40px;">Age</th>
+                <th>Sex</th>
+            </tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td>Barney Rubble</td>
+                <td>32</td>
+                <td>Male</td>
+            </tr>
+            <tr>
+                <td>Fred Flintstone</td>
+                <td>33</td>
+                <td>Male</td>
+            </tr>
+            <tr>
+                <td>Betty Rubble</td>
+                <td>32</td>
+                <td>Female</td>
+            </tr>
+            <tr>
+                <td>Pebbles</td>
+                <td>1</td>
+                <td>Female</td>
+            </tr>
+            <tr>
+                <td>Bamm Bamm</td>
+                <td>2</td>
+                <td>Male</td>
+            </tr>
+        </tbody>
+    </table>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/from-markup.js	(revision 625)
@@ -0,0 +1,20 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var btn = Ext.get("create-grid");
+    btn.on("click", function(){
+        btn.dom.disabled = true;
+        
+        // create the grid
+        var grid = new Ext.ux.grid.TableGrid("the-table", {
+            stripeRows: true // stripe alternate rows
+        });
+        grid.render();
+    }, false, {
+        single: true
+    }); // run once
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/gen-names.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/gen-names.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/gen-names.js	(revision 625)
@@ -0,0 +1,26 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+    var lasts = ['Jones', 'Smith', 'Lee', 'Wilson', 'Black', 'Williams', 'Lewis', 'Johnson', 'Foot', 'Little', 'Vee', 'Train', 'Hot', 'Mutt'];
+    var firsts = ['Fred', 'Julie', 'Bill', 'Ted', 'Jack', 'John', 'Mark', 'Mike', 'Chris', 'Bob', 'Travis', 'Kelly', 'Sara'];
+    var lastLen = lasts.length, firstLen = firsts.length;
+
+    Ext.ux.getRandomInt = function(min, max){
+        return Math.floor(Math.random() * (max - min + 1)) + min;
+    }
+
+    Ext.ux.generateName = function(){
+        var name = firsts[Ext.ux.getRandomInt(0, firstLen-1)] + ' ' + lasts[Ext.ux.getRandomInt(0, lastLen-1)];
+        if(Ext.ux.generateName.usedNames[name]){
+            return Ext.ux.generateName();
+        }
+        Ext.ux.generateName.usedNames[name] = true;
+        return name;
+    }
+    Ext.ux.generateName.usedNames = {};
+
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-examples.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-examples.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-examples.css	(revision 625)
@@ -0,0 +1,59 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#grid-example .x-grid-col-1 {
+	text-align: right;
+}
+#grid-example .x-grid-col-2{
+	text-align: right;
+}
+#grid-example .x-grid-col-3 {
+	text-align: right;
+}
+#grid-example .x-grid-col-4 {
+	text-align: right;
+}
+#grid-example.x-grid-mso{
+	border: 1px solid #6593cf;
+}
+#grid-example.x-grid-vista{
+	border: 1px solid #b3bcc0;
+}
+#xml-grid-example{
+	border: 1px solid #cbc7b8;
+	left: 0;
+	position: relative;
+	top: 0;
+}
+#editor-grid .x-grid-col-2{
+    text-align:right;
+}
+.x-grid3-td-topic b {
+    font-family:tahoma, verdana;
+    display:block;
+}
+.x-grid3-td-topic b i {
+    font-weight:normal;
+    font-style: normal;
+    color:#000;
+}
+.x-grid3-td-topic .x-grid3-cell-inner {
+    white-space:normal;
+}
+.x-grid3-td-topic a {
+    color: #385F95;
+    text-decoration:none;
+}
+.x-grid3-td-topic a:hover {
+    text-decoration:underline;
+}
+.details .x-btn-text {
+    background-image: url(details.gif);
+}
+.x-resizable-pinned .x-resizable-handle-south{
+    background:url(../../resources/images/default/sizer/s-handle-dark.gif);
+    background-position: top;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.html	(revision 625)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Grid Plugins Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+
+    <script type="text/javascript" src="../ux/RowExpander.js"></script>
+    <script type="text/javascript" src="grid-plugins.js"></script>
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+        body .x-panel {
+            margin-bottom:20px;
+        }
+        .icon-grid {
+            background-image:url(../shared/icons/fam/grid.png) !important;
+        }
+        #button-grid .x-panel-body {
+            border:1px solid #99bbe8;
+            border-top:0 none;
+        }
+        .add {
+            background-image:url(../shared/icons/fam/add.gif) !important;
+        }
+        .option {
+            background-image:url(../shared/icons/fam/plugin.gif) !important;
+        }
+        .remove {
+            background-image:url(../shared/icons/fam/delete.gif) !important;
+        }
+        .save {
+            background-image:url(../shared/icons/save.gif) !important;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Grid Plugins Examples</h1>
+<p>This example demonstrates several plugins.  Note that the js is not minified so it is readable.
+See <a href="grid-plugins.js">grid-plugins.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grid-plugins.js	(revision 625)
@@ -0,0 +1,237 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    var xg = Ext.grid;
+
+    // shared reader
+    var reader = new Ext.data.ArrayReader({}, [
+       {name: 'company'},
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
+       {name: 'industry'},
+       {name: 'desc'}
+    ]);
+
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // Grid 1
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // row expander
+    var expander = new Ext.ux.grid.RowExpander({
+        tpl : new Ext.Template(
+            '<p><b>Company:</b> {company}</p><br>',
+            '<p><b>Summary:</b> {desc}</p>'
+        )
+    });
+
+    var grid1 = new xg.GridPanel({
+        store: new Ext.data.Store({
+            reader: reader,
+            data: xg.dummyData
+        }),
+        cm: new xg.ColumnModel({
+            defaults: {
+                width: 20,
+                sortable: true
+            },
+            columns: [
+                expander,
+                {id:'company',header: "Company", width: 40, dataIndex: 'company'},
+                {header: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+                {header: "Change", dataIndex: 'change'},
+                {header: "% Change", dataIndex: 'pctChange'},
+                {header: "Last Updated", renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+            ]
+        }),
+        viewConfig: {
+            forceFit:true
+        },
+        columnLines: true,
+        width: 600,
+        height: 300,
+        plugins: expander,
+        collapsible: true,
+        animCollapse: false,
+        title: 'Expander Rows, Collapse and Force Fit',
+        iconCls: 'icon-grid',
+        renderTo: document.body
+    });
+
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // Grid 2
+    ////////////////////////////////////////////////////////////////////////////////////////
+    var sm = new xg.CheckboxSelectionModel();
+    var grid2 = new xg.GridPanel({
+        store: new Ext.data.Store({
+            reader: reader,
+            data: xg.dummyData
+        }),
+        cm: new xg.ColumnModel({
+            defaults: {
+                width: 120,
+                sortable: true
+            },
+            columns: [
+                sm,
+                {id:'company',header: "Company", width: 200, dataIndex: 'company'},
+                {header: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+                {header: "Change", dataIndex: 'change'},
+                {header: "% Change", dataIndex: 'pctChange'},
+                {header: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+            ]
+        }),
+        sm: sm,
+        columnLines: true,
+        width:600,
+        height:300,
+        frame:true,
+        title:'Framed with Checkbox Selection and Horizontal Scrolling',
+        iconCls:'icon-grid',
+        renderTo: document.body
+    });
+
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // Grid 3
+    ////////////////////////////////////////////////////////////////////////////////////////
+    var grid3 = new xg.GridPanel({
+        store: new Ext.data.Store({
+            reader: reader,
+            data: xg.dummyData
+        }),
+        cm: new xg.ColumnModel([
+            new xg.RowNumberer(),
+            {id:'company',header: "Company", width: 40, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+            {header: "Change", width: 20, sortable: true, dataIndex: 'change'},
+            {header: "% Change", width: 20, sortable: true, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ]),
+        viewConfig: {
+            forceFit:true
+        },
+        columnLines: true,
+        width:600,
+        height:300,
+        title:'Grid with Numbered Rows and Force Fit',
+        iconCls:'icon-grid',
+        renderTo: document.body
+    });
+
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // Grid 4
+    ////////////////////////////////////////////////////////////////////////////////////////
+    var sm2 = new xg.CheckboxSelectionModel({
+        listeners: {
+            // On selection change, set enabled state of the removeButton
+            // which was placed into the GridPanel using the ref config
+            selectionchange: function(sm) {
+                if (sm.getCount()) {
+                    grid4.removeButton.enable();
+                } else {
+                    grid4.removeButton.disable();
+                }
+            }
+        }
+    });
+    var grid4 = new xg.GridPanel({
+        id:'button-grid',
+        store: new Ext.data.Store({
+            reader: reader,
+            data: xg.dummyData
+        }),
+        cm: new xg.ColumnModel([
+            sm2,
+            {id:'company',header: "Company", width: 40, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+            {header: "Change", width: 20, sortable: true, dataIndex: 'change'},
+            {header: "% Change", width: 20, sortable: true, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ]),
+        sm: sm2,
+
+        viewConfig: {
+            forceFit:true
+        },
+        columnLines: true,
+
+        // inline buttons
+        buttons: [{text:'Save'},{text:'Cancel'}],
+        buttonAlign:'center',
+
+        // inline toolbars
+        tbar:[{
+            text:'Add Something',
+            tooltip:'Add a new row',
+            iconCls:'add'
+        }, '-', {
+            text:'Options',
+            tooltip:'Blah blah blah blaht',
+            iconCls:'option'
+        },'-',{
+            text:'Remove Something',
+            tooltip:'Remove the selected item',
+            iconCls:'remove',
+
+            // Place a reference in the GridPanel
+            ref: '../removeButton',
+            disabled: true
+        }],
+
+        width:600,
+        height:300,
+        frame:true,
+        title:'Support for standard Panel features such as framing, buttons and toolbars',
+        iconCls:'icon-grid',
+        renderTo: document.body
+    });
+});
+
+
+
+// Array data for the grids
+Ext.grid.dummyData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am', 'Manufacturing'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am', 'Manufacturing'],
+    ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am', 'Manufacturing'],
+    ['American Express Company',52.55,0.01,0.02,'9/1 12:00am', 'Finance'],
+    ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am', 'Services'],
+    ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am', 'Services'],
+    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am', 'Manufacturing'],
+    ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am', 'Services'],
+    ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am', 'Finance'],
+    ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am', 'Manufacturing'],
+    ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am', 'Manufacturing'],
+    ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am', 'Manufacturing'],
+    ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am', 'Automotive'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am', 'Computer'],
+    ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am', 'Manufacturing'],
+    ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am', 'Computer'],
+    ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am', 'Computer'],
+    ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am', 'Medical'],
+    ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am', 'Finance'],
+    ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am', 'Food'],
+    ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am', 'Medical'],
+    ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am', 'Computer'],
+    ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am', 'Services', 'Medical'],
+    ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am', 'Food'],
+    ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am', 'Retail'],
+    ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am', 'Manufacturing'],
+    ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am', 'Computer'],
+    ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am', 'Services'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am', 'Retail'],
+    ['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am', 'Services']
+];
+
+// add in some dummy descriptions
+for(var i = 0; i < Ext.grid.dummyData.length; i++){
+    Ext.grid.dummyData[i].push('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.<br/><br/>Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.');
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.css	(revision 625)
@@ -0,0 +1,6 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.html	(revision 625)
@@ -0,0 +1,53 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Grid3 Grouping Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+
+    <script type="text/javascript" src="grouping.js"></script>
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+        body .x-panel {
+            margin-bottom:20px;
+        }
+        .icon-grid {
+            background-image:url(../shared/icons/fam/grid.png) !important;
+        }
+        #button-grid .x-panel-body {
+            border:1px solid #99bbe8;
+            border-top:0 none;
+        }
+        .add {
+            background-image:url(../shared/icons/fam/add.gif) !important;
+        }
+        .option {
+            background-image:url(../shared/icons/fam/plugin.gif) !important;
+        }
+        .remove {
+            background-image:url(../shared/icons/fam/delete.gif) !important;
+        }
+        .save {
+            background-image:url(../shared/icons/save.gif) !important;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>GridView3 Grouping</h1>
+<p>Note that the js is not minified so it is readable. See <a href="grouping.js">grouping.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/grouping.js	(revision 625)
@@ -0,0 +1,95 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+    
+    var xg = Ext.grid;
+
+    // shared reader
+    var reader = new Ext.data.ArrayReader({}, [
+       {name: 'company'},
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
+       {name: 'industry'},
+       {name: 'desc'}
+    ]);
+
+    var grid = new xg.GridPanel({
+        store: new Ext.data.GroupingStore({
+            reader: reader,
+            data: xg.dummyData,
+            sortInfo:{field: 'company', direction: "ASC"},
+            groupField:'industry'
+        }),
+
+        columns: [
+            {id:'company',header: "Company", width: 60, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+            {header: "Change", width: 20, sortable: true, dataIndex: 'change', renderer: Ext.util.Format.usMoney},
+            {header: "Industry", width: 20, sortable: true, dataIndex: 'industry'},
+            {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+
+        view: new Ext.grid.GroupingView({
+            forceFit:true,
+            groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+        }),
+
+        frame:true,
+        width: 700,
+        height: 450,
+        collapsible: true,
+        animCollapse: false,
+        title: 'Grouping Example',
+        iconCls: 'icon-grid',
+        renderTo: document.body
+    });
+});
+
+
+
+// Array data for the grids
+Ext.grid.dummyData = [
+    ['3m Co',71.72,0.02,0.03,'4/2 12:00am', 'Manufacturing'],
+    ['Alcoa Inc',29.01,0.42,1.47,'4/1 12:00am', 'Manufacturing'],
+    ['Altria Group Inc',83.81,0.28,0.34,'4/3 12:00am', 'Manufacturing'],
+    ['American Express Company',52.55,0.01,0.02,'4/8 12:00am', 'Finance'],
+    ['American International Group, Inc.',64.13,0.31,0.49,'4/1 12:00am', 'Services'],
+    ['AT&T Inc.',31.61,-0.48,-1.54,'4/8 12:00am', 'Services'],
+    ['Boeing Co.',75.43,0.53,0.71,'4/8 12:00am', 'Manufacturing'],
+    ['Caterpillar Inc.',67.27,0.92,1.39,'4/1 12:00am', 'Services'],
+    ['Citigroup, Inc.',49.37,0.02,0.04,'4/4 12:00am', 'Finance'],
+    ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'4/1 12:00am', 'Manufacturing'],
+    ['Exxon Mobil Corp',68.1,-0.43,-0.64,'4/3 12:00am', 'Manufacturing'],
+    ['General Electric Company',34.14,-0.08,-0.23,'4/3 12:00am', 'Manufacturing'],
+    ['General Motors Corporation',30.27,1.09,3.74,'4/3 12:00am', 'Automotive'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'4/3 12:00am', 'Computer'],
+    ['Honeywell Intl Inc',38.77,0.05,0.13,'4/3 12:00am', 'Manufacturing'],
+    ['Intel Corporation',19.88,0.31,1.58,'4/2 12:00am', 'Computer'],
+    ['International Business Machines',81.41,0.44,0.54,'4/1 12:00am', 'Computer'],
+    ['Johnson & Johnson',64.72,0.06,0.09,'4/2 12:00am', 'Medical'],
+    ['JP Morgan & Chase & Co',45.73,0.07,0.15,'4/2 12:00am', 'Finance'],
+    ['McDonald\'s Corporation',36.76,0.86,2.40,'4/2 12:00am', 'Food'],
+    ['Merck & Co., Inc.',40.96,0.41,1.01,'4/2 12:00am', 'Medical'],
+    ['Microsoft Corporation',25.84,0.14,0.54,'4/2 12:00am', 'Computer'],
+    ['Pfizer Inc',27.96,0.4,1.45,'4/8 12:00am', 'Services', 'Medical'],
+    ['The Coca-Cola Company',45.07,0.26,0.58,'4/1 12:00am', 'Food'],
+    ['The Home Depot, Inc.',34.64,0.35,1.02,'4/8 12:00am', 'Retail'],
+    ['The Procter & Gamble Company',61.91,0.01,0.02,'4/1 12:00am', 'Manufacturing'],
+    ['United Technologies Corporation',63.26,0.55,0.88,'4/1 12:00am', 'Computer'],
+    ['Verizon Communications',35.57,0.39,1.11,'4/3 12:00am', 'Services'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'4/3 12:00am', 'Retail'],
+    ['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'4/1 12:00am', 'Services']
+];
+
+// add in some dummy descriptions
+for(var i = 0; i < Ext.grid.dummyData.length; i++){
+    Ext.grid.dummyData[i].push('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.<br/><br/>Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.');
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.html	(revision 625)
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Paging Grid Example</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    
+<script type="text/javascript" src="paging.js"></script>
+<link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Paging Grid Example</h1>
+<p>This example shows how to create a grid with paging. This grid uses a ScriptTagProxy to fetch cross-domain
+    remote data (from the Ext forums).</p>
+<p>Note that the js is not minified so it is readable. See <a href="paging.js">paging.js</a>.</p>
+
+<div id="topic-grid"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/paging.js	(revision 625)
@@ -0,0 +1,121 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    // create the Data Store
+    var store = new Ext.data.JsonStore({
+        root: 'topics',
+        totalProperty: 'totalCount',
+        idProperty: 'threadid',
+        remoteSort: true,
+
+        fields: [
+            'title', 'forumtitle', 'forumid', 'author',
+            {name: 'replycount', type: 'int'},
+            {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
+            'lastposter', 'excerpt'
+        ],
+
+        // load using script tags for cross domain, if the data in on the same domain as
+        // this page, an HttpProxy would be better
+        proxy: new Ext.data.ScriptTagProxy({
+            url: 'http://extjs.com/forum/topics-browse-remote.php'
+        })
+    });
+    store.setDefaultSort('lastpost', 'desc');
+
+
+    // pluggable renders
+    function renderTopic(value, p, record){
+        return String.format(
+                '<b><a href="http://extjs.com/forum/showthread.php?t={2}" target="_blank">{0}</a></b><a href="http://extjs.com/forum/forumdisplay.php?f={3}" target="_blank">{1} Forum</a>',
+                value, record.data.forumtitle, record.id, record.data.forumid);
+    }
+    function renderLast(value, p, r){
+        return String.format('{0}<br/>by {1}', value.dateFormat('M j, Y, g:i a'), r.data['lastposter']);
+    }
+
+    var grid = new Ext.grid.GridPanel({
+        width:700,
+        height:500,
+        title:'ExtJS.com - Browse Forums',
+        store: store,
+        trackMouseOver:false,
+        disableSelection:true,
+        loadMask: true,
+
+        // grid columns
+        columns:[{
+            id: 'topic', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
+            header: "Topic",
+            dataIndex: 'title',
+            width: 420,
+            renderer: renderTopic,
+            sortable: true
+        },{
+            header: "Author",
+            dataIndex: 'author',
+            width: 100,
+            hidden: true,
+            sortable: true
+        },{
+            header: "Replies",
+            dataIndex: 'replycount',
+            width: 70,
+            align: 'right',
+            sortable: true
+        },{
+            id: 'last',
+            header: "Last Post",
+            dataIndex: 'lastpost',
+            width: 150,
+            renderer: renderLast,
+            sortable: true
+        }],
+
+        // customize view config
+        viewConfig: {
+            forceFit:true,
+            enableRowBody:true,
+            showPreview:true,
+            getRowClass : function(record, rowIndex, p, store){
+                if(this.showPreview){
+                    p.body = '<p>'+record.data.excerpt+'</p>';
+                    return 'x-grid3-row-expanded';
+                }
+                return 'x-grid3-row-collapsed';
+            }
+        },
+
+        // paging bar on the bottom
+        bbar: new Ext.PagingToolbar({
+            pageSize: 25,
+            store: store,
+            displayInfo: true,
+            displayMsg: 'Displaying topics {0} - {1} of {2}',
+            emptyMsg: "No topics to display",
+            items:[
+                '-', {
+                pressed: true,
+                enableToggle:true,
+                text: 'Show Preview',
+                cls: 'x-btn-text-icon details',
+                toggleHandler: function(btn, pressed){
+                    var view = grid.getView();
+                    view.showPreview = pressed;
+                    view.refresh();
+                }
+            }]
+        })
+    });
+
+    // render it
+    grid.render('topic-grid');
+
+    // trigger the data store load
+    store.load({params:{start:0, limit:25}});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/plants.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/plants.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/plants.xml	(revision 625)
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<catalog>
+  <plant>
+    <common>Bloodroot</common>
+    <botanical>Sanguinaria canadensis</botanical>
+    <zone>4</zone>
+    <light>Mostly Shady</light>
+    <price>2.44</price>
+    <availability>03/15/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Columbine</common>
+    <botanical>Aquilegia canadensis</botanical>
+    <zone>3</zone>
+    <light>Mostly Shady</light>
+    <price>9.37</price>
+    <availability>03/06/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Marsh Marigold</common>
+    <botanical>Caltha palustris</botanical>
+    <zone>4</zone>
+    <light>Mostly Sunny</light>
+    <price>6.81</price>
+    <availability>05/17/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Cowslip</common>
+    <botanical>Caltha palustris</botanical>
+    <zone>4</zone>
+    <light>Mostly Shady</light>
+    <price>9.90</price>
+    <availability>03/06/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Dutchman's-Breeches</common>
+    <botanical>Dicentra cucullaria</botanical>
+    <zone>3</zone>
+    <light>Mostly Shady</light>
+    <price>6.44</price>
+    <availability>01/20/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Ginger, Wild</common>
+    <botanical>Asarum canadense</botanical>
+    <zone>3</zone>
+    <light>Mostly Shady</light>
+    <price>9.03</price>
+    <availability>04/18/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Hepatica</common>
+    <botanical>Hepatica americana</botanical>
+    <zone>4</zone>
+    <light>Mostly Shady</light>
+    <price>4.45</price>
+    <availability>01/26/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Liverleaf</common>
+    <botanical>Hepatica americana</botanical>
+    <zone>4</zone>
+    <light>Mostly Shady</light>
+    <price>3.99</price>
+    <availability>01/02/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Jack-In-The-Pulpit</common>
+    <botanical>Arisaema triphyllum</botanical>
+    <zone>4</zone>
+    <light>Mostly Shady</light>
+    <price>3.23</price>
+    <availability>02/01/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Mayapple</common>
+    <botanical>Podophyllum peltatum</botanical>
+    <zone>3</zone>
+    <light>Mostly Shady</light>
+    <price>2.98</price>
+    <availability>06/05/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Phlox, Woodland</common>
+    <botanical>Phlox divaricata</botanical>
+    <zone>3</zone>
+    <light>Sun or Shade</light>
+    <price>2.80</price>
+    <availability>01/22/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Phlox, Blue</common>
+    <botanical>Phlox divaricata</botanical>
+    <zone>3</zone>
+    <light>Sun or Shade</light>
+    <price>5.59</price>
+    <availability>02/16/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Spring-Beauty</common>
+    <botanical>Claytonia Virginica</botanical>
+    <zone>7</zone>
+    <light>Mostly Shady</light>
+    <price>6.59</price>
+    <availability>02/01/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Trillium</common>
+    <botanical>Trillium grandiflorum</botanical>
+    <zone>5</zone>
+    <light>Sun or Shade</light>
+    <price>3.90</price>
+    <availability>04/29/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Wake Robin</common>
+    <botanical>Trillium grandiflorum</botanical>
+    <zone>5</zone>
+    <light>Sun or Shade</light>
+    <price>3.20</price>
+    <availability>02/21/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Violet, Dog-Tooth</common>
+    <botanical>Erythronium americanum</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>9.04</price>
+    <availability>02/01/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Trout Lily</common>
+    <botanical>Erythronium americanum</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>6.94</price>
+    <availability>03/24/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Adder's-Tongue</common>
+    <botanical>Erythronium americanum</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>9.58</price>
+    <availability>04/13/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Anemone</common>
+    <botanical>Anemone blanda</botanical>
+    <zone>6</zone>
+    <light>Mostly Shady</light>
+    <price>8.86</price>
+    <availability>12/26/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Grecian Windflower</common>
+    <botanical>Anemone blanda</botanical>
+    <zone>6</zone>
+    <light>Mostly Shady</light>
+    <price>9.16</price>
+    <availability>07/10/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Bee Balm</common>
+    <botanical>Monarda didyma</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>4.59</price>
+    <availability>05/03/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Bergamot</common>
+    <botanical>Monarda didyma</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>7.16</price>
+    <availability>04/27/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Black-Eyed Susan</common>
+    <botanical>Rudbeckia hirta</botanical>
+    <zone>Annual</zone>
+    <light>Sunny</light>
+    <price>9.80</price>
+    <availability>06/18/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Buttercup</common>
+    <botanical>Ranunculus</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>2.57</price>
+    <availability>06/10/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Crowfoot</common>
+    <botanical>Ranunculus</botanical>
+    <zone>4</zone>
+    <light>Shade</light>
+    <price>9.34</price>
+    <availability>04/03/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Butterfly Weed</common>
+    <botanical>Asclepias tuberosa</botanical>
+    <zone>Annual</zone>
+    <light>Sunny</light>
+    <price>2.78</price>
+    <availability>06/30/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Cinquefoil</common>
+    <botanical>Potentilla</botanical>
+    <zone>Annual</zone>
+    <light>Shade</light>
+    <price>7.06</price>
+    <availability>05/25/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Primrose</common>
+    <botanical>Oenothera</botanical>
+    <zone>3 - 5</zone>
+    <light>Sunny</light>
+    <price>6.56</price>
+    <availability>01/30/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Gentian</common>
+    <botanical>Gentiana</botanical>
+    <zone>4</zone>
+    <light>Sun or Shade</light>
+    <price>7.81</price>
+    <availability>05/18/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Blue Gentian</common>
+    <botanical>Gentiana</botanical>
+    <zone>4</zone>
+    <light>Sun or Shade</light>
+    <price>8.56</price>
+    <availability>05/02/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Jacob's Ladder</common>
+    <botanical>Polemonium caeruleum</botanical>
+    <zone>Annual</zone>
+    <light>Shade</light>
+    <price>9.26</price>
+    <availability>02/21/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Greek Valerian</common>
+    <botanical>Polemonium caeruleum</botanical>
+    <zone>Annual</zone>
+    <light>Shade</light>
+    <price>4.36</price>
+    <availability>07/14/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>California Poppy</common>
+    <botanical>Eschscholzia californica</botanical>
+    <zone>Annual</zone>
+    <light>Sunny</light>
+    <price>7.89</price>
+    <availability>03/27/2006</availability>
+    <indoor>false</indoor>
+  </plant>
+  <plant>
+    <common>Shooting Star</common>
+    <botanical>Dodecatheon</botanical>
+    <zone>Annual</zone>
+    <light>Mostly Shady</light>
+    <price>8.60</price>
+    <availability>05/13/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Snakeroot</common>
+    <botanical>Cimicifuga</botanical>
+    <zone>Annual</zone>
+    <light>Shade</light>
+    <price>5.63</price>
+    <availability>07/11/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+  <plant>
+    <common>Cardinal Flower</common>
+    <botanical>Lobelia cardinalis</botanical>
+    <zone>2</zone>
+    <light>Shade</light>
+    <price>3.02</price>
+    <availability>02/22/2006</availability>
+    <indoor>true</indoor>
+  </plant>
+</catalog>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.html	(revision 625)
@@ -0,0 +1,36 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>ProgressBarPager Extension Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/PanelResizer.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+    <!-- Common Styles for the examples -->
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <style type="text/css">
+
+    </style>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="../ux/ProgressBarPager.js"></script>
+    <script type="text/javascript" src="../ux/PanelResizer.js"></script>
+    <script type="text/javascript" src="../ux/PagingMemoryProxy.js"></script>
+    <script type="text/javascript" src="progress-bar-pager.js"></script>
+
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Progress Bar Pager Extension</h1>
+<p>Note that the js is not minified so it is readable. See <a href="progress-bar-pager.js">progress-bar-pager.js</a>.</p>
+
+<div id="grid-example"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/progress-bar-pager.js	(revision 625)
@@ -0,0 +1,111 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+
+    var myData = [
+        ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+        ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+        ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+        ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+        ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+        ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+        ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+        ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+        ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+        ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+        ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+        ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+        ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+        ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+        ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+        ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+        ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+        ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+        ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+        ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+        ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+        ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+        ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+        ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+        ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+        ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+        ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+        ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+        ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+    ];
+
+    // example of custom renderer function
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+
+    // example of custom renderer function
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+
+    // create the data store
+    var store = new Ext.data.Store({
+        proxy: new Ext.ux.data.PagingMemoryProxy(myData),
+        remoteSort:true,
+        sortInfo: {field:'price', direction:'ASC'},
+        reader: new Ext.data.ArrayReader({
+            fields: [
+               {name: 'company'},
+               {name: 'price', type: 'float'},
+               {name: 'change', type: 'float'},
+               {name: 'pctChange', type: 'float'},
+               {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+            ]
+        })
+    });
+
+    // create the Grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
+            {header: "Change", width: 75, sortable: true, renderer: change, dataIndex: 'change'},
+            {header: "% Change", width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        stripeRows: true,
+        autoExpandColumn: 'company',
+        height:320,
+        width:600,
+        frame:true,
+        title:'Sliding Pager',
+
+        plugins: new Ext.ux.PanelResizer({
+            minHeight: 100
+        }),
+
+        bbar: new Ext.PagingToolbar({
+            pageSize: 10,
+            store: store,
+            displayInfo: true,
+
+            plugins: new Ext.ux.ProgressBarPager()
+        })
+    });
+
+    grid.render('grid-example');
+
+    store.load({params:{start:0, limit:10}});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.html	(revision 625)
@@ -0,0 +1,43 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Property Grid Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+
+    <!-- page specific -->
+    <script type="text/javascript" src="../shared/examples.js"></script>
+    <script type="text/javascript" src="property-grid.js"></script>
+
+</head>
+<body>
+    <h1>Property Grid Example</h1>
+    <p>This example shows how to create a <a href="http://extjs.com/deploy/dev/docs/?class=Ext.grid.PropertyGrid">Property Grid</a>.</p>
+    <p>Note that the js is not minified so it is readable. See <a href="property-grid.js">property-grid.js</a>.</p>
+    
+    <p id="button-container"></p>
+    <div id="prop-grid"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.js	(revision 625)
@@ -0,0 +1,50 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    
+    var propsGrid = new Ext.grid.PropertyGrid({
+        renderTo: 'prop-grid',
+        width: 300,
+        autoHeight: true,
+        propertyNames: {
+            tested: 'QA',
+            borderWidth: 'Border Width'
+        },
+        source: {
+            '(name)': 'Properties Grid',
+            grouping: false,
+            autoFitColumns: true,
+            productionQuality: false,
+            created: new Date(Date.parse('10/15/2006')),
+            tested: false,
+            version: 0.01,
+            borderWidth: 1
+        },
+        viewConfig : {
+            forceFit: true,
+            scrollOffset: 2 // the grid will never have scrollbars
+        }
+    });
+
+    // simulate updating the grid data via a button click
+    new Ext.Button({
+        renderTo: 'button-container',
+        text: 'Update source',
+        handler: function(){
+            propsGrid.setSource({
+                '(name)': 'Property Grid',
+                grouping: false,
+                autoFitColumns: true,
+                productionQuality: true,
+                created: new Date(),
+                tested: false,
+                version: 0.8,
+                borderWidth: 2
+            });
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor-data.json
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor-data.json	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor-data.json	(revision 625)
@@ -0,0 +1,61 @@
+[{
+    'name': 'Billy Bob',
+    'email': 'billy@exttest.com',
+    'start': '01/16/2007',
+    'active': true
+},{
+    'name': 'Frisco Jones',
+    'email': 'frisco@exttest.com',
+    'start': '02/01/2007',
+    'active': true
+},{
+    'name': 'Mikey M',
+    'email': 'mikey@exttest.com',
+    'start': '04/02/2007',
+    'active': true
+},{
+    'name': 'Davey D',
+    'email': 'davey@exttest.com',
+    'start': '04/02/2007',
+    'active': true
+},{
+    'name': 'Freddie F',
+    'email': 'freddie@exttest.com',
+    'start': '04/15/2007',
+    'active': true
+},{
+    'name': 'Susie S',
+    'email': 'susie@exttest.com',
+    'start': '06/21/2007',
+    'active': true
+},{
+    'name': 'Julie J',
+    'email': 'julie@exttest.com',
+    'start': '06/28/2007',
+    'active': true
+},{
+    'name': 'Martin M',
+    'email': 'freddie@exttest.com',
+    'start': '07/01/2007',
+    'active': true
+},{
+    'name': 'Bill B',
+    'email': 'bill@exttest.com',
+    'start': '10/07/2007',
+    'active': true
+},{
+    'name': 'Jill J',
+    'email': 'jill@exttest.com',
+    'start': '10/07/2007',
+    'active': true
+},{
+    'name': 'Chris C',
+    'email': 'chris@exttest.com',
+    'start': '12/01/2007',
+    'active': true
+},{
+    'name': 'Kelly K',
+    'email': 'kelly@exttest.com',
+    'start': '01/01/2008',
+    'active': true
+}]
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.html	(revision 625)
@@ -0,0 +1,74 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Grid with RowEditor Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/RowEditor.css" />
+	<style type="text/css">
+		.x-grid3 .x-window-ml{
+			padding-left: 0;	
+		} 
+		.x-grid3 .x-window-mr {
+			padding-right: 0;
+		} 
+		.x-grid3 .x-window-tl {
+			padding-left: 0;
+		} 
+		.x-grid3 .x-window-tr {
+			padding-right: 0;
+		} 
+		.x-grid3 .x-window-tc .x-window-header {
+			height: 3px;
+			padding:0;
+			overflow:hidden;
+		} 
+		.x-grid3 .x-window-mc {
+			border-width: 0;
+			background: #cdd9e8;
+		} 
+		.x-grid3 .x-window-bl {
+			padding-left: 0;
+		} 
+		.x-grid3 .x-window-br {
+			padding-right: 0;
+		}
+		.x-grid3 .x-panel-btns {
+			padding:0;
+		}
+		.x-grid3 .x-panel-btns td.x-toolbar-cell {
+			padding:3px 3px 0;
+		}
+		.x-box-inner {
+			zoom:1;
+		}
+        .icon-user-add {
+            background-image: url(../shared/icons/fam/user_add.gif) !important;
+        }
+        .icon-user-delete {
+            background-image: url(../shared/icons/fam/user_delete.gif) !important;
+        }        
+    </style>
+    
+    <!-- GC --><!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="gen-names.js"></script>
+    <script type="text/javascript" src="../ux/RowEditor.js"></script>
+    <script type="text/javascript" src="row-editor.js"></script>
+</head>
+<body>
+    <h1>Row Editor Grid Example</h1>
+    <p>
+        This example shows how to create a grid with inline row based editing using a custom row-editor.
+   	The example code <a href="row-editor.js">row-editor.js</a> is not minified, so it's readable.
+	</p> 
+	<p>
+        To use this example, be sure to include the <a href="RowEditor.js">RowEditor.js</a> file.
+   	</p> 
+
+    </p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/row-editor.js	(revision 625)
@@ -0,0 +1,295 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    var Employee = Ext.data.Record.create([{
+        name: 'name',
+        type: 'string'
+    }, {
+        name: 'email',
+        type: 'string'
+    }, {
+        name: 'start',
+        type: 'date',
+        dateFormat: 'n/j/Y'
+    },{
+        name: 'salary',
+        type: 'float'
+    },{
+        name: 'active',
+        type: 'bool'
+    }]);
+
+
+    // hideous function to generate employee data
+    var genData = function(){
+        var data = [];
+        var s = new Date(2007, 0, 1);
+        var now = new Date(), i = -1;
+        while(s.getTime() < now.getTime()){
+            var ecount = Ext.ux.getRandomInt(0, 3);
+            for(var i = 0; i < ecount; i++){
+                var name = Ext.ux.generateName();
+                data.push({
+                    start : s.clearTime(true).add(Date.DAY, Ext.ux.getRandomInt(0, 27)),
+                    name : name,
+                    email: name.toLowerCase().replace(' ', '.') + '@exttest.com',
+                    active: true,
+                    salary: Math.floor(Ext.ux.getRandomInt(35000, 85000)/1000)*1000
+                });
+            }
+            s = s.add(Date.MONTH, 1);
+        }
+        return data;
+    }
+
+
+    var store = new Ext.data.GroupingStore({
+        reader: new Ext.data.JsonReader({fields: Employee}),
+        data: genData(),
+        sortInfo: {field: 'start', direction: 'ASC'}
+    });
+
+    var editor = new Ext.ux.grid.RowEditor({
+        saveText: 'Update'
+    });
+
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        width: 600,
+        region:'center',
+        margins: '0 5 5 5',
+        autoExpandColumn: 'name',
+        plugins: [editor],
+        view: new Ext.grid.GroupingView({
+            markDirty: false
+        }),
+        tbar: [{
+            iconCls: 'icon-user-add',
+            text: 'Add Employee',
+            handler: function(){
+                var e = new Employee({
+                    name: 'New Guy',
+                    email: 'new@exttest.com',
+                    start: (new Date()).clearTime(),
+                    salary: 50000,
+                    active: true
+                });
+                editor.stopEditing();
+                store.insert(0, e);
+                grid.getView().refresh();
+                grid.getSelectionModel().selectRow(0);
+                editor.startEditing(0);
+            }
+        },{
+            ref: '../removeBtn',
+            iconCls: 'icon-user-delete',
+            text: 'Remove Employee',
+            disabled: true,
+            handler: function(){
+                editor.stopEditing();
+                var s = grid.getSelectionModel().getSelections();
+                for(var i = 0, r; r = s[i]; i++){
+                    store.remove(r);
+                }
+            }
+        }],
+
+        columns: [
+        new Ext.grid.RowNumberer(),
+        {
+            id: 'name',
+            header: 'First Name',
+            dataIndex: 'name',
+            width: 220,
+            sortable: true,
+            editor: {
+                xtype: 'textfield',
+                allowBlank: false
+            }
+        },{
+            header: 'Email',
+            dataIndex: 'email',
+            width: 150,
+            sortable: true,
+            editor: {
+                xtype: 'textfield',
+                allowBlank: false,
+                vtype: 'email'
+            }
+        },{
+            xtype: 'datecolumn',
+            header: 'Start Date',
+            dataIndex: 'start',
+            format: 'm/d/Y',
+            width: 100,
+            sortable: true,
+            groupRenderer: Ext.util.Format.dateRenderer('M y'),
+            editor: {
+                xtype: 'datefield',
+                allowBlank: false,
+                minValue: '01/01/2006',
+                minText: 'Can\'t have a start date before the company existed!',
+                maxValue: (new Date()).format('m/d/Y')
+            }
+        },{
+            xtype: 'numbercolumn',
+            header: 'Salary',
+            dataIndex: 'salary',
+            format: '$0,0.00',
+            width: 100,
+            sortable: true,
+            editor: {
+                xtype: 'numberfield',
+                allowBlank: false,
+                minValue: 1,
+                maxValue: 150000
+            }
+        },{
+            xtype: 'booleancolumn',
+            header: 'Active',
+            dataIndex: 'active',
+            align: 'center',
+            width: 50,
+            trueText: 'Yes',
+            falseText: 'No',
+            editor: {
+                xtype: 'checkbox'
+            }
+        }]
+    });
+
+    var cstore = new Ext.data.JsonStore({
+        fields:['month', 'employees', 'salary'],
+        data:[],
+        refreshData: function(){
+            var o = {}, data = [];
+            var s = new Date(2007, 0, 1);
+            var now = new Date(), i = -1;
+            while(s.getTime() < now.getTime()){
+                var m = {
+                    month: s.format('M y'),
+                    employees: 0,
+                    salary: 0,
+                    index: ++i
+                }
+                data.push(m);
+                o[m.month] = m;
+                s = s.add(Date.MONTH, 1);
+            }
+            store.each(function(r){
+                var m = o[r.data.start.format('M y')];
+                for(var i = m.index, mo; mo = data[i]; i++){
+                    mo.employees += 10000;
+                    mo.salary += r.data.salary;
+                }
+            });
+            this.loadData(data);
+        }
+    });
+    cstore.refreshData();
+    store.on('add', cstore.refreshData, cstore);
+    store.on('remove', cstore.refreshData, cstore);
+    store.on('update', cstore.refreshData, cstore);
+
+    var chart = new Ext.Panel({
+        width:600,
+        height:200,
+        layout:'fit',
+        margins: '5 5 0',
+        region: 'north',
+        split: true,
+        minHeight: 100,
+        maxHeight: 500,
+
+        items: {
+            xtype: 'columnchart',
+            store: cstore,
+            url:'../../resources/charts.swf',
+            xField: 'month',
+            yAxis: new Ext.chart.NumericAxis({
+                displayName: 'Employees',
+                labelRenderer : Ext.util.Format.numberRenderer('0,0')
+            }),
+            tipRenderer : function(chart, record, index, series){
+                if(series.yField == 'salary'){
+                    return Ext.util.Format.number(record.data.salary, '$0,0') + ' total salary in ' + record.data.month;
+                }else{
+                    return Ext.util.Format.number(Math.floor(record.data.employees/10000), '0,0') + ' total employees in ' + record.data.month;
+                }
+            },
+
+            // style chart so it looks pretty
+            chartStyle: {
+                padding: 10,
+                animationEnabled: true,
+                font: {
+                    name: 'Tahoma',
+                    color: 0x444444,
+                    size: 11
+                },
+                dataTip: {
+                    padding: 5,
+                    border: {
+                        color: 0x99bbe8,
+                        size:1
+                    },
+                    background: {
+                        color: 0xDAE7F6,
+                        alpha: .9
+                    },
+                    font: {
+                        name: 'Tahoma',
+                        color: 0x15428B,
+                        size: 10,
+                        bold: true
+                    }
+                },
+                xAxis: {
+                    color: 0x69aBc8,
+                    majorTicks: {color: 0x69aBc8, length: 4},
+                    minorTicks: {color: 0x69aBc8, length: 2},
+                    majorGridLines: {size: 1, color: 0xeeeeee}
+                },
+                yAxis: {
+                    color: 0x69aBc8,
+                    majorTicks: {color: 0x69aBc8, length: 4},
+                    minorTicks: {color: 0x69aBc8, length: 2},
+                    majorGridLines: {size: 1, color: 0xdfe8f6}
+                }
+            },
+            series: [{
+                type: 'column',
+                displayName: 'Salary',
+                yField: 'salary',
+                style: {
+                    image:'../chart/bar.gif',
+                    mode: 'stretch',
+                    color:0x99BBE8
+                }
+            }]
+        }
+    });
+
+
+    var layout = new Ext.Panel({
+        title: 'Employee Salary by Month',
+        layout: 'border',
+        layoutConfig: {
+            columns: 1
+        },
+        width:600,
+        height: 600,
+        items: [chart, grid]
+    });
+    layout.render(Ext.getBody());
+
+    grid.getSelectionModel().on('selectionchange', function(sm){
+        grid.removeBtn.setDisabled(sm.getCount() < 1);
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sheldon.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sheldon.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sheldon.xml	(revision 625)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2006-06-28">
+    <OperationRequest>
+        <HTTPHeaders>
+            <Header Name="UserAgent"
+                    Value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser; Avant Browser; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR 1.1.4322; Media Center PC 4.0; InfoPath.2)"></Header>
+        </HTTPHeaders>
+        <RequestId>18CZWZFXKSV8F601AGMF</RequestId>
+        <Arguments>
+            <Argument Name="Service" Value="AWSECommerceService"></Argument>
+            <Argument Name="AssociateTag" Value="ws"></Argument>
+            <Argument Name="SearchIndex" Value="Books"></Argument>
+            <Argument Name="Author" Value="Sidney Sheldon"></Argument>
+            <Argument Name="SubscriptionId" Value="1A7XKHR5BYD0WPJVQEG2"></Argument>
+            <Argument Name="Version" Value="2006-06-28"></Argument>
+            <Argument Name="Operation" Value="ItemSearch"></Argument>
+        </Arguments>
+        <RequestProcessingTime>1.05041599273682</RequestProcessingTime>
+    </OperationRequest>
+    <Items>
+        <Request>
+            <IsValid>True</IsValid>
+            <ItemSearchRequest>
+                <Author>Sidney Sheldon</Author>
+                <SearchIndex>Books</SearchIndex>
+            </ItemSearchRequest>
+        </Request>
+        <TotalResults>203</TotalResults>
+        <TotalPages>21</TotalPages>
+        <Item>
+            <ASIN>0446355453</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446355453%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446355453%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Master of the Game</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446613657</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446613657%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446613657%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Are You Afraid of the Dark?</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446357421</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446357421%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446357421%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>If Tomorrow Comes</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446607207</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446607207%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446607207%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Vision</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Tell Me Your Dreams</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446357448</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446357448%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446357448%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Bloodline</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446532673</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446532673%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446532673%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Other Side of Me</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446356573</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446356573%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446356573%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>A Stranger in the Mirror</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0060198346</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0060198346%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0060198346%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>William Morrow &amp; Company</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Sky Is Falling</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446354732</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446354732%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446354732%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>Nothing Lasts Forever</Title>
+            </ItemAttributes>
+        </Item>
+        <Item>
+            <ASIN>0446341916</ASIN>
+            <DetailPageURL>
+                http://www.amazon.com/gp/redirect.html%3FASIN=0446341916%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446341916%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
+            </DetailPageURL>
+            <ItemAttributes>
+                <Author>Sidney Sheldon</Author>
+                <Manufacturer>Warner Books</Manufacturer>
+                <ProductGroup>Book</ProductGroup>
+                <Title>The Naked Face</Title>
+            </ItemAttributes>
+        </Item>
+    </Items>
+</ItemSearchResponse>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.html	(revision 625)
@@ -0,0 +1,33 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sliding Pager Extension Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/PanelResizer.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+
+    <script type="text/javascript" src="../ux/SlidingPager.js"></script>
+    <script type="text/javascript" src="../ux/SliderTip.js"></script>
+    <script type="text/javascript" src="../ux/PanelResizer.js"></script>
+    <script type="text/javascript" src="../ux/PagingMemoryProxy.js"></script>
+    <script type="text/javascript" src="sliding-pager.js"></script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Sliding Pager Extension</h1>
+<p>Note that the js is not minified so it is readable. See <a href="sliding-pager.js">sliding-pager.js</a>.</p>
+
+<div id="grid-example"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/sliding-pager.js	(revision 625)
@@ -0,0 +1,110 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var myData = [
+        ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+        ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+        ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+        ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+        ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+        ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+        ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+        ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+        ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+        ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+        ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+        ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+        ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+        ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+        ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+        ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+        ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+        ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+        ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+        ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+        ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+        ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+        ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+        ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+        ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+        ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+        ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+        ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+        ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+    ];
+
+    // example of custom renderer function
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+
+    // example of custom renderer function
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+
+    // create the data store
+    var store = new Ext.data.Store({
+        proxy: new Ext.ux.data.PagingMemoryProxy(myData),
+        remoteSort:true,
+        sortInfo: {field:'price', direction:'ASC'},
+        reader: new Ext.data.ArrayReader({
+            fields: [
+               {name: 'company'},
+               {name: 'price', type: 'float'},
+               {name: 'change', type: 'float'},
+               {name: 'pctChange', type: 'float'},
+               {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+            ]
+        })
+    });
+
+    // create the Grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
+            {header: "Price", width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
+            {header: "Change", width: 75, sortable: true, renderer: change, dataIndex: 'change'},
+            {header: "% Change", width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+            {header: "Last Updated", width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        stripeRows: true,
+        autoExpandColumn: 'company',
+        height:320,
+        width:600,
+        frame:true,
+        title:'Sliding Pager',
+
+        plugins: new Ext.ux.PanelResizer({
+            minHeight: 100
+        }),
+
+        bbar: new Ext.PagingToolbar({
+            pageSize: 10,
+            store: store,
+            displayInfo: true,
+
+            plugins: new Ext.ux.SlidingPager()
+        })
+    });
+
+    grid.render('grid-example');
+
+    store.load({params:{start:0, limit:10}});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.html	(revision 625)
@@ -0,0 +1,65 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Custom Hybrid Summary Plugin Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/GroupSummary.css" />
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <style type="text/css">
+        .x-grid3-cell-inner {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+        }
+        .x-grid-group-hd div {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+        }
+        .x-grid3-hd-inner {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+            font-size:12px;
+        }
+        .x-grid3-body .x-grid3-td-cost {
+            background-color:#f1f2f4;
+        }
+        .x-grid3-summary-row .x-grid3-td-cost {
+            background-color:#e1e2e4;
+        }
+        .icon-grid {
+            background-image:url(../shared/icons/fam/grid.png) !important;
+        }
+        .x-grid3-dirty-cell {
+            background-image:none;
+        }
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/GroupSummary.js"></script>
+
+    <!-- page specific -->
+    <script type="text/javascript" src="totals-hybrid.js"></script>
+
+</head>
+<body>
+    <h1>Custom Hybrid Summary Plugin Example</h1>
+    <p>This example demonstrates the use of the
+    <a href="../ux/GroupSummary.js">Ext.ux.grid.HybridSummary</a> class which extends the 
+    <a href="../ux/GroupSummary.js">Ext.ux.grid.GroupSummary</a> class to use remote data. 
+    <p>Note that the js is not minified so it is readable. See <a href="totals-hybrid.js">totals-hybrid.js</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.js	(revision 625)
@@ -0,0 +1,165 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    var xg = Ext.grid;
+
+    var reader = new Ext.data.JsonReader({
+        idProperty:'taskId',
+        fields: [
+            {name: 'projectId', type: 'int'},
+            {name: 'project', type: 'string'},
+            {name: 'taskId', type: 'int'},
+            {name: 'description', type: 'string'},
+            {name: 'estimate', type: 'float'},
+            {name: 'rate', type: 'float'},
+            {name: 'cost', type: 'float'},
+            {name: 'due', type: 'date', dateFormat:'m/d/Y'}
+        ],
+		// additional configuration for remote
+        root:'data',
+        remoteGroup:true,
+        remoteSort: true
+    });
+
+    // define a custom summary function
+    Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
+        return v + (record.data.estimate * record.data.rate);
+    };
+
+	// utilize custom extension for Hybrid Summary
+    var summary = new Ext.ux.grid.HybridSummary();
+
+    var grid = new xg.EditorGridPanel({
+        ds: new Ext.data.GroupingStore({
+            reader: reader,
+			// use remote data
+            proxy : new Ext.data.HttpProxy({
+                url: 'totals-hybrid.json',
+                method: 'GET'
+            }),
+            sortInfo: {field: 'due', direction: 'ASC'},
+            groupField: 'project'
+        }),
+
+        columns: [
+            {
+                id: 'description',
+                header: 'Task',
+                width: 80,
+                sortable: true,
+                dataIndex: 'description',
+                summaryType: 'count',
+                hideable: false,
+                summaryRenderer: function(v, params, data){
+                    return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
+                },
+                editor: new Ext.form.TextField({
+                   allowBlank: false
+                })
+            },{
+                header: 'Project',
+                width: 20,
+                sortable: true,
+                dataIndex: 'project'
+            },{
+                header: 'Due Date',
+                width: 25,
+                sortable: true,
+                dataIndex: 'due',
+                summaryType:'max',
+                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+                editor: new Ext.form.DateField({
+                    format: 'm/d/Y'
+                })
+            },{
+                header: 'Estimate',
+                width: 20,
+                sortable: true,
+                dataIndex: 'estimate',
+                summaryType:'sum',
+                renderer : function(v){
+                    return v +' hours';
+                },
+                editor: new Ext.form.NumberField({
+                   allowBlank: false,
+                   allowNegative: false,
+                    style: 'text-align:left'
+                })
+            },{
+                header: 'Rate',
+                width: 20,
+                sortable: true,
+                renderer: Ext.util.Format.usMoney,
+                dataIndex: 'rate',
+                summaryType:'average',
+                editor: new Ext.form.NumberField({
+                    allowBlank: false,
+                    allowNegative: false,
+                    style: 'text-align:left'
+                })
+            },{
+                id: 'cost',
+                header: 'Cost',
+                width: 20,
+                sortable: false,
+                groupable: false,
+                renderer: function(v, params, record){
+                    return Ext.util.Format.usMoney(record.data.estimate * record.data.rate);
+                },
+                dataIndex: 'cost',
+                summaryType: 'totalCost',
+                summaryRenderer: Ext.util.Format.usMoney
+            }
+        ],
+
+        view: new Ext.grid.GroupingView({
+            forceFit:true,
+            showGroupName: false,
+            enableNoGroups:false,
+			enableGroupingMenu:false,
+            hideGroupedColumn: true
+        }),
+
+        plugins: summary,
+
+        tbar : [{
+            text: 'Toggle',
+            tooltip: 'Toggle the visibility of summary row',
+            handler: function(){summary.toggleSummaries();}
+        }],
+
+        frame: true,
+        width: 800,
+        height: 450,
+        clicksToEdit: 1,
+        collapsible: true,
+        animCollapse: false,
+        trackMouseOver: false,
+        //enableColumnMove: false,
+        title: 'Sponsored Projects',
+        iconCls: 'icon-grid',
+        renderTo: document.body
+    });
+
+    grid.on('afteredit', function(){
+        var groupValue = 'Ext Forms: Field Anchoring';
+        summary.showSummaryMsg(groupValue, 'Updating Summary...');
+        setTimeout(function(){ // simulate server call
+            // HybridSummary class implements updateSummaryData
+            summary.updateSummaryData(groupValue,
+                // create data object based on configured dataIndex
+                {description: 22, estimate: 888, rate: 888, due: new Date(), cost: 8});
+        }, 2000);
+    });
+
+	// load the remote data
+    grid.store.load();
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.json
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.json	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals-hybrid.json	(revision 625)
@@ -0,0 +1,24 @@
+{
+	data: [
+	    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 112, description: 'Integrate 2.0 Forms with 2.0 Layouts', estimate: 6, rate: 150, due:'06/24/2007'},
+	    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 113, description: 'Implement AnchorLayout', estimate: 4, rate: 150, due:'06/25/2007'},
+	    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 114, description: 'Add support for multiple types of anchors', estimate: 4, rate: 150, due:'06/27/2007'},
+	    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 115, description: 'Testing and debugging', estimate: 8, rate: 0, due:'06/29/2007'},
+	    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 101, description: 'Add required rendering "hooks" to GridView', estimate: 6, rate: 100, due:'07/01/2007'},
+	    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 102, description: 'Extend GridView and override rendering functions', estimate: 6, rate: 100, due:'07/03/2007'},
+	    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 103, description: 'Extend Store with grouping functionality', estimate: 4, rate: 100, due:'07/04/2007'},
+	    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 121, description: 'Default CSS Styling', estimate: 2, rate: 100, due:'07/05/2007'},
+	    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 104, description: 'Testing and debugging', estimate: 6, rate: 100, due:'07/06/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 105, description: 'Ext Grid plugin integration', estimate: 4, rate: 125, due:'07/01/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 106, description: 'Summary creation during rendering phase', estimate: 4, rate: 125, due:'07/02/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 107, description: 'Dynamic summary updates in editor grids', estimate: 6, rate: 125, due:'07/05/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 108, description: 'Remote summary integration', estimate: 4, rate: 125, due:'07/05/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 109, description: 'Summary renderers and calculators', estimate: 4, rate: 125, due:'07/06/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 110, description: 'Integrate summaries with GroupingView', estimate: 10, rate: 125, due:'07/11/2007'},
+	    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 111, description: 'Testing and debugging', estimate: 8, rate: 125, due:'07/15/2007'}
+	],
+	
+	summaryData: {
+	    'Ext Forms: Field Anchoring': {description: 14, estimate: 9, rate: 99, due: new Date(2009, 6, 29), cost: 999}
+	}
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.html	(revision 625)
@@ -0,0 +1,63 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Custom Group Summary Plugin Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/GroupSummary.css" />
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+    <style type="text/css">
+        .x-grid3-cell-inner {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+        }
+        .x-grid-group-hd div {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+        }
+        .x-grid3-hd-inner {
+            font-family:"segoe ui",tahoma, arial, sans-serif;
+            font-size:12px;
+        }
+        .x-grid3-body .x-grid3-td-cost {
+            background-color:#f1f2f4;
+        }
+        .x-grid3-summary-row .x-grid3-td-cost {
+            background-color:#e1e2e4;
+        }
+        .icon-grid {
+            background-image:url(../shared/icons/fam/grid.png) !important;
+        }
+        .x-grid3-dirty-cell {
+            background-image:none;
+        }
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/GroupSummary.js"></script>
+
+    <!-- page specific -->
+    <script type="text/javascript" src="totals.js"></script>
+
+</head>
+<body>
+    <h1>Custom Group Summary Plugin Example</h1>
+    <p>Demonstrates the custom <a href="../ux/GroupSummary.js">Ext.ux.grid.GroupSummary</a> class.</p>
+    <p>Note that the js is not minified so it is readable. See <a href="totals.js">totals.js</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/totals.js	(revision 625)
@@ -0,0 +1,166 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+
+    var xg = Ext.grid;
+
+    var reader = new Ext.data.JsonReader({
+        idProperty: 'taskId',
+        fields: [
+            {name: 'projectId', type: 'int'},
+            {name: 'project', type: 'string'},
+            {name: 'taskId', type: 'int'},
+            {name: 'description', type: 'string'},
+            {name: 'estimate', type: 'float'},
+            {name: 'rate', type: 'float'},
+            {name: 'cost', type: 'float'},
+            {name: 'due', type: 'date', dateFormat:'m/d/Y'}
+        ]
+
+    });
+
+    // define a custom summary function
+    Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
+        return v + (record.data.estimate * record.data.rate);
+    };
+
+	// utilize custom extension for Group Summary
+    var summary = new Ext.ux.grid.GroupSummary();
+
+    var grid = new xg.EditorGridPanel({
+        ds: new Ext.data.GroupingStore({
+            reader: reader,
+			// use local data
+            data: app.grid.dummyData,
+            sortInfo: {field: 'due', direction: 'ASC'},
+            groupField: 'project'
+        }),
+        columns: [
+            {
+                id: 'description',
+                header: 'Task',
+                width: 80,
+                sortable: true,
+                dataIndex: 'description',
+                summaryType: 'count',
+                hideable: false,
+                summaryRenderer: function(v, params, data){
+                    return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
+                },
+                editor: new Ext.form.TextField({
+                   allowBlank: false
+                })
+            },{
+                header: 'Project',
+                width: 20,
+                sortable: true,
+                dataIndex: 'project'
+            },{
+                header: 'Due Date',
+                width: 25,
+                sortable: true,
+                dataIndex: 'due',
+                summaryType: 'max',
+                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+                editor: new Ext.form.DateField({
+                    format: 'm/d/Y'
+                })
+            },{
+                header: 'Estimate',
+                width: 20,
+                sortable: true,
+                dataIndex: 'estimate',
+                summaryType: 'sum',
+                renderer : function(v){
+                    return v +' hours';
+                },
+                editor: new Ext.form.NumberField({
+                   allowBlank: false,
+                   allowNegative: false,
+                   style: 'text-align:left'
+                })
+            },{
+                header: 'Rate',
+                width: 20,
+                sortable: true,
+                renderer: Ext.util.Format.usMoney,
+                dataIndex: 'rate',
+                summaryType: 'average',
+                editor: new Ext.form.NumberField({
+                    allowBlank: false,
+                    allowNegative: false,
+                    style: 'text-align:left'
+                })
+            },{
+                id: 'cost',
+                header: 'Cost',
+                width: 20,
+                sortable: false,
+                groupable: false,
+                renderer: function(v, params, record){
+                    return Ext.util.Format.usMoney(record.data.estimate * record.data.rate);
+                },
+                dataIndex: 'cost',
+                summaryType: 'totalCost',
+                summaryRenderer: Ext.util.Format.usMoney
+            }
+        ],
+
+        view: new Ext.grid.GroupingView({
+            forceFit: true,
+            showGroupName: false,
+            enableNoGroups: false,
+			enableGroupingMenu: false,
+            hideGroupedColumn: true
+        }),
+
+        plugins: summary,
+
+        tbar : [{
+            text: 'Toggle',
+            tooltip: 'Toggle the visibility of summary row',
+            handler: function(){summary.toggleSummaries();}
+        }],
+
+        frame: true,
+        width: 800,
+        height: 450,
+        clicksToEdit: 1,
+        collapsible: true,
+        animCollapse: false,
+        trackMouseOver: false,
+        //enableColumnMove: false,
+        title: 'Sponsored Projects',
+        iconCls: 'icon-grid',
+        renderTo: document.body
+    });
+
+});
+
+// set up namespace for application
+Ext.ns('app.grid');
+// store dummy data in the app namespace
+app.grid.dummyData = [
+    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 112, description: 'Integrate 2.0 Forms with 2.0 Layouts', estimate: 6, rate: 150, due:'06/24/2007'},
+    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 113, description: 'Implement AnchorLayout', estimate: 4, rate: 150, due:'06/25/2007'},
+    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 114, description: 'Add support for multiple types of anchors', estimate: 4, rate: 150, due:'06/27/2007'},
+    {projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 115, description: 'Testing and debugging', estimate: 8, rate: 0, due:'06/29/2007'},
+    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 101, description: 'Add required rendering "hooks" to GridView', estimate: 6, rate: 100, due:'07/01/2007'},
+    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 102, description: 'Extend GridView and override rendering functions', estimate: 6, rate: 100, due:'07/03/2007'},
+    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 103, description: 'Extend Store with grouping functionality', estimate: 4, rate: 100, due:'07/04/2007'},
+    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 121, description: 'Default CSS Styling', estimate: 2, rate: 100, due:'07/05/2007'},
+    {projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 104, description: 'Testing and debugging', estimate: 6, rate: 100, due:'07/06/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 105, description: 'Ext Grid plugin integration', estimate: 4, rate: 125, due:'07/01/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 106, description: 'Summary creation during rendering phase', estimate: 4, rate: 125, due:'07/02/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 107, description: 'Dynamic summary updates in editor grids', estimate: 6, rate: 125, due:'07/05/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 108, description: 'Remote summary integration', estimate: 4, rate: 125, due:'07/05/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 109, description: 'Summary renderers and calculators', estimate: 4, rate: 125, due:'07/06/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 110, description: 'Integrate summaries with GroupingView', estimate: 10, rate: 125, due:'07/11/2007'},
+    {projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 111, description: 'Testing and debugging', estimate: 8, rate: 125, due:'07/15/2007'}
+];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.html	(revision 625)
@@ -0,0 +1,35 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>XML Grid Example</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    
+<script type="text/javascript" src="xml-grid.js"></script>
+<link rel="stylesheet" type="text/css" href="grid-examples.css" />
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>XML Grid Example</h1>
+<p>This example shows how to load a grid with XML data.</p>
+
+<p>This grid also uses autoHeight and autoWidth to dynamically size to fit it's data and columns.</p>
+
+<p>Note that the js is not minified so it is readable. See <a href="xml-grid.js">xml-grid.js</a>.</p>
+
+<p>The data in the grid is loaded from <a href="sheldon.xml">sheldon.xml</a>, which is directly from an Amazon.com search.</p>
+
+<!-- a place holder for the grid. requires the unique id to be passed in the javascript function, and width and height ! -->
+<div id="example-grid"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/xml-grid.js	(revision 625)
@@ -0,0 +1,43 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    // create the Data Store
+    var store = new Ext.data.Store({
+        // load using HTTP
+        url: 'sheldon.xml',
+
+        // the return will be XML, so lets set up a reader
+        reader: new Ext.data.XmlReader({
+               // records will have an "Item" tag
+               record: 'Item',
+               id: 'ASIN',
+               totalRecords: '@total'
+           }, [
+               // set up the fields mapping into the xml doc
+               // The first needs mapping, the others are very basic
+               {name: 'Author', mapping: 'ItemAttributes > Author'},
+               'Title', 'Manufacturer', 'ProductGroup'
+           ])
+    });
+
+    // create the grid
+    var grid = new Ext.grid.GridPanel({
+        store: store,
+        columns: [
+            {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
+            {header: "Title", width: 180, dataIndex: 'Title', sortable: true},
+            {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
+            {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
+        ],
+        renderTo:'example-grid',
+        width:540,
+        height:200
+    });
+
+    store.load();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.html	(revision 625)
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>GroupTabs Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/Portal.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/GroupTab.css" />
+
+    <!-- page specific -->
+    <style type="text/css">
+        /* styles for iconCls */
+        .x-icon-tickets {
+            background-image: url('images/tickets.png');
+        }
+        .x-icon-subscriptions {
+            background-image: url('images/subscriptions.png');
+        }
+        .x-icon-users {
+            background-image: url('images/group.png');
+        }
+        .x-icon-templates {
+            background-image: url('images/templates.png');
+        }
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/GroupTabPanel.js"></script>
+    <script type="text/javascript" src="../ux/GroupTab.js"></script>
+
+    <script type="text/javascript" src="../ux/Portal.js"></script>
+    <script type="text/javascript" src="../ux/PortalColumn.js"></script>
+    <script type="text/javascript" src="../ux/Portlet.js"></script>
+
+    <!-- page specific -->
+    <script type="text/javascript" src="../shared/examples.js"></script>
+    <script type="text/javascript" src="../portal/sample-grid.js"></script>
+
+    <script type="text/javascript" src="grouptabs.js"></script>
+
+</head>
+<body></body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/grouptabs/grouptabs.js	(revision 625)
@@ -0,0 +1,120 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function() {
+	Ext.QuickTips.init();
+    
+    // create some portlet tools using built in Ext tool ids
+    var tools = [{
+        id:'gear',
+        handler: function(){
+            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
+        }
+    },{
+        id:'close',
+        handler: function(e, target, panel){
+            panel.ownerCt.remove(panel, true);
+        }
+    }];
+
+    var viewport = new Ext.Viewport({
+        layout:'fit',
+        items:[{
+            xtype: 'grouptabpanel',
+    		tabWidth: 130,
+    		activeGroup: 0,
+    		items: [{
+    			mainItem: 1,
+    			items: [{
+    				title: 'Tickets',
+                    layout: 'fit',
+                    iconCls: 'x-icon-tickets',
+                    tabTip: 'Tickets tabtip',
+                    style: 'padding: 10px;',
+    				items: [new SampleGrid([0,1,2,3,4])]
+    			}, 
+                {
+                    xtype: 'portal',
+                    title: 'Dashboard',
+                    tabTip: 'Dashboard tabtip',
+                    items:[{
+                        columnWidth:.33,
+                        style:'padding:10px 0 10px 10px',
+                        items:[{
+                            title: 'Grid in a Portlet',
+                            layout:'fit',
+                            tools: tools,
+                            items: new SampleGrid([0, 2, 3])
+                        },{
+                            title: 'Another Panel 1',
+                            tools: tools,
+                            html: Ext.example.shortBogusMarkup
+                        }]
+                    },{
+                        columnWidth:.33,
+                        style:'padding:10px 0 10px 10px',
+                        items:[{
+                            title: 'Panel 2',
+                            tools: tools,
+                            html: Ext.example.shortBogusMarkup
+                        },{
+                            title: 'Another Panel 2',
+                            tools: tools,
+                            html: Ext.example.shortBogusMarkup
+                        }]
+                    },{
+                        columnWidth:.33,
+                        style:'padding:10px',
+                        items:[{
+                            title: 'Panel 3',
+                            tools: tools,
+                            html: Ext.example.shortBogusMarkup
+                        },{
+                            title: 'Another Panel 3',
+                            tools: tools,
+                            html: Ext.example.shortBogusMarkup
+                        }]
+                    }]                    
+                }, {
+    				title: 'Subscriptions',
+                    iconCls: 'x-icon-subscriptions',
+                    tabTip: 'Subscriptions tabtip',
+                    style: 'padding: 10px;',
+					layout: 'fit',
+    				items: [{
+						xtype: 'tabpanel',
+						activeTab: 1,
+						items: [{
+							title: 'Nested Tabs',
+							html: Ext.example.shortBogusMarkup
+						}]	
+					}]	
+    			}, {
+    				title: 'Users',
+                    iconCls: 'x-icon-users',
+                    tabTip: 'Users tabtip',
+                    style: 'padding: 10px;',
+    				html: Ext.example.shortBogusMarkup			
+    			}]
+            }, {
+                expanded: true,
+                items: [{
+                    title: 'Configuration',
+                    iconCls: 'x-icon-configuration',
+                    tabTip: 'Configuration tabtip',
+                    style: 'padding: 10px;',
+                    html: Ext.example.shortBogusMarkup 
+                }, {
+                    title: 'Email Templates',
+                    iconCls: 'x-icon-templates',
+                    tabTip: 'Templates tabtip',
+                    style: 'padding: 10px;',
+                    html: Ext.example.shortBogusMarkup
+                }]
+            }]
+		}]
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.html	(revision 625)
@@ -0,0 +1,32 @@
+<html>
+<head>
+    <title>History Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="history.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+
+<h1>History Example</h1>
+
+<p>This is a simple implmenetation of the <tt>Ext.History</tt> component for managing browser back/forward navigation within a single page.</p>
+
+<p>It demonstrates managing history for multiple components within the page. Simply change tabs and use the browser Back
+and Forward buttons to navigate them.</p>
+
+<p>The js is not minified so it is readable. See <a href="history.js">history.js</a>.</p>
+
+<!-- Fields required for history management -->
+<form id="history-form" class="x-hidden">
+    <input type="hidden" id="x-history-field" />
+    <iframe id="x-history-frame"></iframe>
+</form>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/history/history.js	(revision 625)
@@ -0,0 +1,91 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function() {
+    
+    // The only requirement for this to work is that you must have a hidden field and
+    // an iframe available in the page with ids corresponding to Ext.History.fieldId
+    // and Ext.History.iframeId.  See history.html for an example.
+    Ext.History.init();
+    
+    // Needed if you want to handle history for multiple components in the same page.
+    // Should be something that won't be in component ids.
+    var tokenDelimiter = ':';
+    
+    var tp = new Ext.TabPanel({
+        renderTo: Ext.getBody(),
+        id: 'main-tabs',
+        height: 300,
+        width: 600,
+        activeTab: 0,
+        
+        items: [{
+            xtype: 'tabpanel',
+            title: 'Tab 1',
+            id: 'tab1',
+            activeTab: 0,
+            tabPosition: 'bottom',
+            
+            items: [{
+                title: 'Sub-tab 1',
+                id: 'subtab1'
+            },{
+                title: 'Sub-tab 2',
+                id: 'subtab2'
+            },{
+                title: 'Sub-tab 3',
+                id: 'subtab3'
+            }],
+            
+            listeners: {
+                'tabchange': function(tabPanel, tab){
+                    Ext.History.add(tabPanel.id + tokenDelimiter + tab.id);
+                }
+            }
+        },{
+            title: 'Tab 2',
+            id: 'tab2'
+        },{
+            title: 'Tab 3',
+            id: 'tab3'
+        },{
+            title: 'Tab 4',
+            id: 'tab4'
+        },{
+            title: 'Tab 5',
+            id: 'tab5'
+        }],
+        
+        listeners: {
+            'tabchange': function(tabPanel, tab){
+                // Ignore tab1 since it is a separate tab panel and we're managing history for it also.
+                // We'll use its handler instead in that case so we don't get duplicate nav events for sub tabs.
+                if(tab.id != 'tab1'){
+                    Ext.History.add(tabPanel.id + tokenDelimiter + tab.id);
+                }
+            }
+        }
+    });
+    
+    // Handle this change event in order to restore the UI to the appropriate history state
+    Ext.History.on('change', function(token){
+        if(token){
+            var parts = token.split(tokenDelimiter);
+            var tabPanel = Ext.getCmp(parts[0]);
+            var tabId = parts[1];
+            
+            tabPanel.show();
+            tabPanel.setActiveTab(tabId);
+        }else{
+            // This is the initial default state.  Necessary if you navigate starting from the
+            // page without any existing history token params and go back to the start state.
+            tp.setActiveTab(0);
+            tp.getItem(0).setActiveTab(0);
+        }
+    });
+    
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/SWFObject License.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/SWFObject License.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/SWFObject License.txt	(revision 625)
@@ -0,0 +1,4 @@
+/*	SWFObject v2.0 rc4 <http://code.google.com/p/swfobject/>
+	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js	(revision 625)
@@ -0,0 +1,59 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+	Cookie Plug-in
+	
+	This plug in automatically gets all the cookies for this site and adds them to the post_params.
+	Cookies are loaded only on initialization.  The refreshCookies function can be called to update the post_params.
+	The cookies will override any other post params with the same name.
+*/
+
+var SWFUpload;
+if (typeof(SWFUpload) === "function") {
+	SWFUpload.prototype.initSettings = function (oldInitSettings) {
+		return function () {
+			if (typeof(oldInitSettings) === "function") {
+				oldInitSettings.call(this);
+			}
+			
+			this.refreshCookies(false);	// The false parameter must be sent since SWFUpload has not initialzed at this point
+		};
+	}(SWFUpload.prototype.initSettings);
+	
+	// refreshes the post_params and updates SWFUpload.  The sendToFlash parameters is optional and defaults to True
+	SWFUpload.prototype.refreshCookies = function (sendToFlash) {
+		if (sendToFlash === undefined) {
+			sendToFlash = true;
+		}
+		sendToFlash = !!sendToFlash;
+		
+		// Get the post_params object
+		var postParams = this.settings.post_params;
+		
+		// Get the cookies
+		var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value;
+		for (i = 0; i < caLength; i++) {
+			c = cookieArray[i];
+			
+			// Left Trim spaces
+			while (c.charAt(0) === " ") {
+				c = c.substring(1, c.length);
+			}
+			eqIndex = c.indexOf("=");
+			if (eqIndex > 0) {
+				name = c.substring(0, eqIndex);
+				value = c.substring(eqIndex + 1);
+				postParams[name] = value;
+			}
+		}
+		
+		if (sendToFlash) {
+			this.setPostParams(postParams);
+		}
+	};
+
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js	(revision 625)
@@ -0,0 +1,104 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+	Queue Plug-in
+	
+	Features:
+		*Adds a cancelQueue() method for cancelling the entire queue.
+		*All queued files are uploaded when startUpload() is called.
+		*If false is returned from uploadComplete then the queue upload is stopped.
+		 If false is not returned (strict comparison) then the queue upload is continued.
+		*Adds a QueueComplete event that is fired when all the queued files have finished uploading.
+		 Set the event handler with the queue_complete_handler setting.
+		
+	*/
+
+var SWFUpload;
+if (typeof(SWFUpload) === "function") {
+	SWFUpload.queue = {};
+	
+	SWFUpload.prototype.initSettings = (function (oldInitSettings) {
+		return function () {
+			if (typeof(oldInitSettings) === "function") {
+				oldInitSettings.call(this);
+			}
+			
+			this.queueSettings = {};
+			
+			this.queueSettings.queue_cancelled_flag = false;
+			this.queueSettings.queue_upload_count = 0;
+			
+			this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
+			this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
+			this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
+			this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
+			
+			this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
+		};
+	})(SWFUpload.prototype.initSettings);
+
+	SWFUpload.prototype.startUpload = function (fileID) {
+		this.queueSettings.queue_cancelled_flag = false;
+		this.callFlash("StartUpload", [fileID]);
+	};
+
+	SWFUpload.prototype.cancelQueue = function () {
+		this.queueSettings.queue_cancelled_flag = true;
+		this.stopUpload();
+		
+		var stats = this.getStats();
+		while (stats.files_queued > 0) {
+			this.cancelUpload();
+			stats = this.getStats();
+		}
+	};
+	
+	SWFUpload.queue.uploadStartHandler = function (file) {
+		var returnValue;
+		if (typeof(this.queueSettings.user_upload_start_handler) === "function") {
+			returnValue = this.queueSettings.user_upload_start_handler.call(this, file);
+		}
+		
+		// To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value.
+		returnValue = (returnValue === false) ? false : true;
+		
+		this.queueSettings.queue_cancelled_flag = !returnValue;
+
+		return returnValue;
+	};
+	
+	SWFUpload.queue.uploadCompleteHandler = function (file) {
+		var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
+		var continueUpload;
+		
+		if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
+			this.queueSettings.queue_upload_count++;
+		}
+
+		if (typeof(user_upload_complete_handler) === "function") {
+			continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
+		} else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
+			// If the file was stopped and re-queued don't restart the upload
+			continueUpload = false;
+		} else {
+			continueUpload = true;
+		}
+		
+		if (continueUpload) {
+			var stats = this.getStats();
+			if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) {
+				this.startUpload();
+			} else if (this.queueSettings.queue_cancelled_flag === false) {
+				this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
+				this.queueSettings.queue_upload_count = 0;
+			} else {
+				this.queueSettings.queue_cancelled_flag = false;
+				this.queueSettings.queue_upload_count = 0;
+			}
+		}
+	};
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js	(revision 625)
@@ -0,0 +1,348 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+	Speed Plug-in
+	
+	Features:
+		*Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc.
+			- currentSpeed -- String indicating the upload speed, bytes per second
+			- averageSpeed -- Overall average upload speed, bytes per second
+			- movingAverageSpeed -- Speed over averaged over the last several measurements, bytes per second
+			- timeRemaining -- Estimated remaining upload time in seconds
+			- timeElapsed -- Number of seconds passed for this upload
+			- percentUploaded -- Percentage of the file uploaded (0 to 100)
+			- sizeUploaded -- Formatted size uploaded so far, bytes
+		
+		*Adds setting 'moving_average_history_size' for defining the window size used to calculate the moving average speed.
+		
+		*Adds several Formatting functions for formatting that values provided on the file object.
+			- SWFUpload.speed.formatBPS(bps) -- outputs string formatted in the best units (Gbps, Mbps, Kbps, bps)
+			- SWFUpload.speed.formatTime(seconds) -- outputs string formatted in the best units (x Hr y M z S)
+			- SWFUpload.speed.formatSize(bytes) -- outputs string formatted in the best units (w GB x MB y KB z B )
+			- SWFUpload.speed.formatPercent(percent) -- outputs string formatted with a percent sign (x.xx %)
+			- SWFUpload.speed.formatUnits(baseNumber, divisionArray, unitLabelArray, fractionalBoolean)
+				- Formats a number using the division array to determine how to apply the labels in the Label Array
+				- factionalBoolean indicates whether the number should be returned as a single fractional number with a unit (speed)
+				    or as several numbers labeled with units (time)
+	*/
+
+var SWFUpload;
+if (typeof(SWFUpload) === "function") {
+	SWFUpload.speed = {};
+	
+	SWFUpload.prototype.initSettings = (function (oldInitSettings) {
+		return function () {
+			if (typeof(oldInitSettings) === "function") {
+				oldInitSettings.call(this);
+			}
+			
+			this.ensureDefault = function (settingName, defaultValue) {
+				this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
+			};
+
+			// List used to keep the speed stats for the files we are tracking
+			this.fileSpeedStats = {};
+			this.speedSettings = {};
+
+			this.ensureDefault("moving_average_history_size", "10");
+			
+			this.speedSettings.user_file_queued_handler = this.settings.file_queued_handler;
+			this.speedSettings.user_file_queue_error_handler = this.settings.file_queue_error_handler;
+			this.speedSettings.user_upload_start_handler = this.settings.upload_start_handler;
+			this.speedSettings.user_upload_error_handler = this.settings.upload_error_handler;
+			this.speedSettings.user_upload_progress_handler = this.settings.upload_progress_handler;
+			this.speedSettings.user_upload_success_handler = this.settings.upload_success_handler;
+			this.speedSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
+			
+			this.settings.file_queued_handler = SWFUpload.speed.fileQueuedHandler;
+			this.settings.file_queue_error_handler = SWFUpload.speed.fileQueueErrorHandler;
+			this.settings.upload_start_handler = SWFUpload.speed.uploadStartHandler;
+			this.settings.upload_error_handler = SWFUpload.speed.uploadErrorHandler;
+			this.settings.upload_progress_handler = SWFUpload.speed.uploadProgressHandler;
+			this.settings.upload_success_handler = SWFUpload.speed.uploadSuccessHandler;
+			this.settings.upload_complete_handler = SWFUpload.speed.uploadCompleteHandler;
+			
+			delete this.ensureDefault;
+		};
+	})(SWFUpload.prototype.initSettings);
+
+	
+	SWFUpload.speed.fileQueuedHandler = function (file) {
+		if (typeof this.speedSettings.user_file_queued_handler === "function") {
+			file = SWFUpload.speed.extendFile(file);
+			
+			return this.speedSettings.user_file_queued_handler.call(this, file);
+		}
+	};
+	
+	SWFUpload.speed.fileQueueErrorHandler = function (file, errorCode, message) {
+		if (typeof this.speedSettings.user_file_queue_error_handler === "function") {
+			file = SWFUpload.speed.extendFile(file);
+			
+			return this.speedSettings.user_file_queue_error_handler.call(this, file, errorCode, message);
+		}
+	};
+
+	SWFUpload.speed.uploadStartHandler = function (file) {
+		if (typeof this.speedSettings.user_upload_start_handler === "function") {
+			file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
+			return this.speedSettings.user_upload_start_handler.call(this, file);
+		}
+	};
+	
+	SWFUpload.speed.uploadErrorHandler = function (file, errorCode, message) {
+		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
+		SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
+
+		if (typeof this.speedSettings.user_upload_error_handler === "function") {
+			return this.speedSettings.user_upload_error_handler.call(this, file, errorCode, message);
+		}
+	};
+	SWFUpload.speed.uploadProgressHandler = function (file, bytesComplete, bytesTotal) {
+		this.updateTracking(file, bytesComplete);
+		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
+
+		if (typeof this.speedSettings.user_upload_progress_handler === "function") {
+			return this.speedSettings.user_upload_progress_handler.call(this, file, bytesComplete, bytesTotal);
+		}
+	};
+	
+	SWFUpload.speed.uploadSuccessHandler = function (file, serverData) {
+		if (typeof this.speedSettings.user_upload_success_handler === "function") {
+			file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
+			return this.speedSettings.user_upload_success_handler.call(this, file, serverData);
+		}
+	};
+	SWFUpload.speed.uploadCompleteHandler = function (file) {
+		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
+		SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
+
+		if (typeof this.speedSettings.user_upload_complete_handler === "function") {
+			return this.speedSettings.user_upload_complete_handler.call(this, file);
+		}
+	};
+	
+	// Private: extends the file object with the speed plugin values
+	SWFUpload.speed.extendFile = function (file, trackingList) {
+		var tracking;
+		
+		if (trackingList) {
+			tracking = trackingList[file.id];
+		}
+		
+		if (tracking) {
+			file.currentSpeed = tracking.currentSpeed;
+			file.averageSpeed = tracking.averageSpeed;
+			file.movingAverageSpeed = tracking.movingAverageSpeed;
+			file.timeRemaining = tracking.timeRemaining;
+			file.timeElapsed = tracking.timeElapsed;
+			file.percentUploaded = tracking.percentUploaded;
+			file.sizeUploaded = tracking.bytesUploaded;
+
+		} else {
+			file.currentSpeed = 0;
+			file.averageSpeed = 0;
+			file.movingAverageSpeed = 0;
+			file.timeRemaining = 0;
+			file.timeElapsed = 0;
+			file.percentUploaded = 0;
+			file.sizeUploaded = 0;
+		}
+		
+		return file;
+	};
+	
+	// Private: Updates the speed tracking object, or creates it if necessary
+	SWFUpload.prototype.updateTracking = function (file, bytesUploaded) {
+		var tracking = this.fileSpeedStats[file.id];
+		if (!tracking) {
+			this.fileSpeedStats[file.id] = tracking = {};
+		}
+		
+		// Sanity check inputs
+		bytesUploaded = bytesUploaded || tracking.bytesUploaded || 0;
+		if (bytesUploaded < 0) {
+			bytesUploaded = 0;
+		}
+		if (bytesUploaded > file.size) {
+			bytesUploaded = file.size;
+		}
+		
+		var tickTime = (new Date()).getTime();
+		if (!tracking.startTime) {
+			tracking.startTime = (new Date()).getTime();
+			tracking.lastTime = tracking.startTime;
+			tracking.currentSpeed = 0;
+			tracking.averageSpeed = 0;
+			tracking.movingAverageSpeed = 0;
+			tracking.movingAverageHistory = [];
+			tracking.timeRemaining = 0;
+			tracking.timeElapsed = 0;
+			tracking.percentUploaded = bytesUploaded / file.size;
+			tracking.bytesUploaded = bytesUploaded;
+		} else if (tracking.startTime > tickTime) {
+			this.debug("When backwards in time");
+		} else {
+			// Get time and deltas
+			var now = (new Date()).getTime();
+			var lastTime = tracking.lastTime;
+			var deltaTime = now - lastTime;
+			var deltaBytes = bytesUploaded - tracking.bytesUploaded;
+			
+			if (deltaBytes === 0 || deltaTime === 0) {
+				return tracking;
+			}
+			
+			// Update tracking object
+			tracking.lastTime = now;
+			tracking.bytesUploaded = bytesUploaded;
+			
+			// Calculate speeds
+			tracking.currentSpeed = (deltaBytes * 8 ) / (deltaTime / 1000);
+			tracking.averageSpeed = (tracking.bytesUploaded * 8) / ((now - tracking.startTime) / 1000);
+
+			// Calculate moving average
+			tracking.movingAverageHistory.push(tracking.currentSpeed);
+			if (tracking.movingAverageHistory.length > this.settings.moving_average_history_size) {
+				tracking.movingAverageHistory.shift();
+			}
+			
+			tracking.movingAverageSpeed = SWFUpload.speed.calculateMovingAverage(tracking.movingAverageHistory);
+			
+			// Update times
+			tracking.timeRemaining = (file.size - tracking.bytesUploaded) * 8 / tracking.movingAverageSpeed;
+			tracking.timeElapsed = (now - tracking.startTime) / 1000;
+			
+			// Update percent
+			tracking.percentUploaded = (tracking.bytesUploaded / file.size * 100);
+		}
+		
+		return tracking;
+	};
+	SWFUpload.speed.removeTracking = function (file, trackingList) {
+		try {
+			trackingList[file.id] = null;
+			delete trackingList[file.id];
+		} catch (ex) {
+		}
+	};
+	
+	SWFUpload.speed.formatUnits = function (baseNumber, unitDivisors, unitLabels, singleFractional) {
+		var i, unit, unitDivisor, unitLabel;
+
+		if (baseNumber === 0) {
+			return "0 " + unitLabels[unitLabels.length - 1];
+		}
+		
+		if (singleFractional) {
+			unit = baseNumber;
+			unitLabel = unitLabels.length >= unitDivisors.length ? unitLabels[unitDivisors.length - 1] : "";
+			for (i = 0; i < unitDivisors.length; i++) {
+				if (baseNumber >= unitDivisors[i]) {
+					unit = (baseNumber / unitDivisors[i]).toFixed(2);
+					unitLabel = unitLabels.length >= i ? " " + unitLabels[i] : "";
+					break;
+				}
+			}
+			
+			return unit + unitLabel;
+		} else {
+			var formattedStrings = [];
+			var remainder = baseNumber;
+			
+			for (i = 0; i < unitDivisors.length; i++) {
+				unitDivisor = unitDivisors[i];
+				unitLabel = unitLabels.length > i ? " " + unitLabels[i] : "";
+				
+				unit = remainder / unitDivisor;
+				if (i < unitDivisors.length -1) {
+					unit = Math.floor(unit);
+				} else {
+					unit = unit.toFixed(2);
+				}
+				if (unit > 0) {
+					remainder = remainder % unitDivisor;
+					
+					formattedStrings.push(unit + unitLabel);
+				}
+			}
+			
+			return formattedStrings.join(" ");
+		}
+	};
+	
+	SWFUpload.speed.formatBPS = function (baseNumber) {
+		var bpsUnits = [1073741824, 1048576, 1024, 1], bpsUnitLabels = ["Gbps", "Mbps", "Kbps", "bps"];
+		return SWFUpload.speed.formatUnits(baseNumber, bpsUnits, bpsUnitLabels, true);
+	
+	};
+	SWFUpload.speed.formatTime = function (baseNumber) {
+		var timeUnits = [86400, 3600, 60, 1], timeUnitLabels = ["d", "h", "m", "s"];
+		return SWFUpload.speed.formatUnits(baseNumber, timeUnits, timeUnitLabels, false);
+	
+	};
+	SWFUpload.speed.formatBytes = function (baseNumber) {
+		var sizeUnits = [1073741824, 1048576, 1024, 1], sizeUnitLabels = ["GB", "MB", "KB", "bytes"];
+		return SWFUpload.speed.formatUnits(baseNumber, sizeUnits, sizeUnitLabels, true);
+	
+	};
+	SWFUpload.speed.formatPercent = function (baseNumber) {
+		return baseNumber.toFixed(2) + " %";
+	};
+	
+	SWFUpload.speed.calculateMovingAverage = function (history) {
+		var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
+		var i;
+		var mSum = 0, mCount = 0;
+		
+		size = history.length;
+		
+		// Check for sufficient data
+		if (size >= 8) {
+			// Clone the array and Calculate sum of the values 
+			for (i = 0; i < size; i++) {
+				vals[i] = history[i];
+				sum += vals[i];
+			}
+
+			mean = sum / size;
+
+			// Calculate variance for the set
+			for (i = 0; i < size; i++) {
+				varianceTemp += Math.pow((vals[i] - mean), 2);
+			}
+
+			variance = varianceTemp / size;
+			standardDev = Math.sqrt(variance);
+			
+			//Standardize the Data
+			for (i = 0; i < size; i++) {
+				vals[i] = (vals[i] - mean) / standardDev;
+			}
+
+			// Calculate the average excluding outliers
+			var deviationRange = 2.0;
+			for (i = 0; i < size; i++) {
+				
+				if (vals[i] <= deviationRange && vals[i] >= -deviationRange) {
+					mCount++;
+					mSum += history[i];
+				}
+			}
+			
+		} else {
+			// Calculate the average (not enough data points to remove outliers)
+			mCount = size;
+			for (i = 0; i < size; i++) {
+				mSum += history[i];
+			}
+		}
+
+		return mSum / mCount;
+	};
+	
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js	(revision 625)
@@ -0,0 +1,117 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+	SWFUpload.SWFObject Plugin
+
+	Summary:
+		This plugin uses SWFObject to embed SWFUpload dynamically in the page.  SWFObject provides accurate Flash Player detection and DOM Ready loading.
+		This plugin replaces the Graceful Degradation plugin.
+
+	Features:
+		* swfupload_load_failed_hander event
+		* swfupload_pre_load_handler event
+		* minimum_flash_version setting (default: "9.0.28")
+		* SWFUpload.onload event for early loading
+
+	Usage:
+		Provide handlers and settings as needed.  When using the SWFUpload.SWFObject plugin you should initialize SWFUploading
+		in SWFUpload.onload rather than in window.onload.  When initialized this way SWFUpload can load earlier preventing the UI flicker
+		that was seen using the Graceful Degradation plugin.
+
+		<script type="text/javascript">
+			var swfu;
+			SWFUpload.onload = function () {
+				swfu = new SWFUpload({
+					minimum_flash_version: "9.0.28",
+					swfupload_pre_load_handler: swfuploadPreLoad,
+					swfupload_load_failed_handler: swfuploadLoadFailed
+				});
+			};
+		</script>
+		
+	Notes:
+		You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8.
+		The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met.  Other issues such as missing SWF files, browser bugs
+		 or corrupt Flash Player installations will not trigger this event.
+		The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found.  It does not wait for SWFUpload to load and can
+		 be used to prepare the SWFUploadUI and hide alternate content.
+		swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser.
+		 Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made.
+*/
+
+
+/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
+	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
+
+
+	
+var SWFUpload;
+if (typeof(SWFUpload) === "function") {
+	SWFUpload.onload = function () {};
+	
+	swfobject.addDomLoadEvent(function () {
+		if (typeof(SWFUpload.onload) === "function") {
+			SWFUpload.onload.call(window);
+		}
+	});
+	
+	SWFUpload.prototype.initSettings = (function (oldInitSettings) {
+		return function () {
+			if (typeof(oldInitSettings) === "function") {
+				oldInitSettings.call(this);
+			}
+
+			this.ensureDefault = function (settingName, defaultValue) {
+				this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
+			};
+
+			this.ensureDefault("minimum_flash_version", "9.0.28");
+			this.ensureDefault("swfupload_pre_load_handler", null);
+			this.ensureDefault("swfupload_load_failed_handler", null);
+
+			delete this.ensureDefault;
+
+		};
+	})(SWFUpload.prototype.initSettings);
+
+
+	SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
+		return function () {
+			var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
+			
+			if (hasFlash) {
+				this.queueEvent("swfupload_pre_load_handler");
+				if (typeof(oldLoadFlash) === "function") {
+					oldLoadFlash.call(this);
+				}
+			} else {
+				this.queueEvent("swfupload_load_failed_handler");
+			}
+		};
+		
+	}(SWFUpload.prototype.loadFlash);
+			
+	SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) {
+		return function () {
+			if (typeof(oldDisplayDebugInfo) === "function") {
+				oldDisplayDebugInfo.call(this);
+			}
+			
+			this.debug(
+				[
+					"SWFUpload.SWFObject Plugin settings:", "\n",
+					"\t", "minimum_flash_version:                      ", this.settings.minimum_flash_version, "\n",
+					"\t", "swfupload_pre_load_handler assigned:     ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n",
+					"\t", "swfupload_load_failed_handler assigned:     ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n",
+				].join("")
+			);
+		};	
+	}(SWFUpload.prototype.displayDebugInfo);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload license.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload license.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload license.txt	(revision 625)
@@ -0,0 +1,12 @@
+/**
+ * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
+ *
+ * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
+ *
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/SWFUpload/swfupload.js	(revision 625)
@@ -0,0 +1,986 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
+ *
+ * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
+ *
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz�n and Mammon Media and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+
+
+/* ******************* */
+/* Constructor & Init  */
+/* ******************* */
+var SWFUpload;
+
+if (SWFUpload == undefined) {
+	SWFUpload = function (settings) {
+		this.initSWFUpload(settings);
+	};
+}
+
+SWFUpload.prototype.initSWFUpload = function (settings) {
+	try {
+		this.customSettings = {};	// A container where developers can place their own settings associated with this instance.
+		this.settings = settings;
+		this.eventQueue = [];
+		this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
+		this.movieElement = null;
+
+
+		// Setup global control tracking
+		SWFUpload.instances[this.movieName] = this;
+
+		// Load the settings.  Load the Flash movie.
+		this.initSettings();
+		this.loadFlash();
+		this.displayDebugInfo();
+	} catch (ex) {
+		delete SWFUpload.instances[this.movieName];
+		throw ex;
+	}
+};
+
+/* *************** */
+/* Static Members  */
+/* *************** */
+SWFUpload.instances = {};
+SWFUpload.movieCount = 0;
+SWFUpload.version = "2.2.0 2009-03-25";
+SWFUpload.QUEUE_ERROR = {
+	QUEUE_LIMIT_EXCEEDED	  		: -100,
+	FILE_EXCEEDS_SIZE_LIMIT  		: -110,
+	ZERO_BYTE_FILE			  		: -120,
+	INVALID_FILETYPE		  		: -130
+};
+SWFUpload.UPLOAD_ERROR = {
+	HTTP_ERROR				  		: -200,
+	MISSING_UPLOAD_URL	      		: -210,
+	IO_ERROR				  		: -220,
+	SECURITY_ERROR			  		: -230,
+	UPLOAD_LIMIT_EXCEEDED	  		: -240,
+	UPLOAD_FAILED			  		: -250,
+	SPECIFIED_FILE_ID_NOT_FOUND		: -260,
+	FILE_VALIDATION_FAILED	  		: -270,
+	FILE_CANCELLED			  		: -280,
+	UPLOAD_STOPPED					: -290
+};
+SWFUpload.FILE_STATUS = {
+	QUEUED		 : -1,
+	IN_PROGRESS	 : -2,
+	ERROR		 : -3,
+	COMPLETE	 : -4,
+	CANCELLED	 : -5
+};
+SWFUpload.BUTTON_ACTION = {
+	SELECT_FILE  : -100,
+	SELECT_FILES : -110,
+	START_UPLOAD : -120
+};
+SWFUpload.CURSOR = {
+	ARROW : -1,
+	HAND : -2
+};
+SWFUpload.WINDOW_MODE = {
+	WINDOW : "window",
+	TRANSPARENT : "transparent",
+	OPAQUE : "opaque"
+};
+
+// Private: takes a URL, determines if it is relative and converts to an absolute URL
+// using the current site. Only processes the URL if it can, otherwise returns the URL untouched
+SWFUpload.completeURL = function(url) {
+	if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//)) {
+		return url;
+	}
+	
+	var currentURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
+	
+	var indexSlash = window.location.pathname.lastIndexOf("/");
+	if (indexSlash <= 0) {
+		path = "/";
+	} else {
+		path = window.location.pathname.substr(0, indexSlash) + "/";
+	}
+	
+	return /*currentURL +*/ path + url;
+	
+};
+
+
+/* ******************** */
+/* Instance Members  */
+/* ******************** */
+
+// Private: initSettings ensures that all the
+// settings are set, getting a default value if one was not assigned.
+SWFUpload.prototype.initSettings = function () {
+	this.ensureDefault = function (settingName, defaultValue) {
+		this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
+	};
+	
+	// Upload backend settings
+	this.ensureDefault("upload_url", "");
+	this.ensureDefault("preserve_relative_urls", false);
+	this.ensureDefault("file_post_name", "Filedata");
+	this.ensureDefault("post_params", {});
+	this.ensureDefault("use_query_string", false);
+	this.ensureDefault("requeue_on_error", false);
+	this.ensureDefault("http_success", []);
+	this.ensureDefault("assume_success_timeout", 0);
+	
+	// File Settings
+	this.ensureDefault("file_types", "*.*");
+	this.ensureDefault("file_types_description", "All Files");
+	this.ensureDefault("file_size_limit", 0);	// Default zero means "unlimited"
+	this.ensureDefault("file_upload_limit", 0);
+	this.ensureDefault("file_queue_limit", 0);
+
+	// Flash Settings
+	this.ensureDefault("flash_url", "swfupload.swf");
+	this.ensureDefault("prevent_swf_caching", true);
+	
+	// Button Settings
+	this.ensureDefault("button_image_url", "");
+	this.ensureDefault("button_width", 1);
+	this.ensureDefault("button_height", 1);
+	this.ensureDefault("button_text", "");
+	this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
+	this.ensureDefault("button_text_top_padding", 0);
+	this.ensureDefault("button_text_left_padding", 0);
+	this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
+	this.ensureDefault("button_disabled", false);
+	this.ensureDefault("button_placeholder_id", "");
+	this.ensureDefault("button_placeholder", null);
+	this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
+	this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
+	
+	// Debug Settings
+	this.ensureDefault("debug", false);
+	this.settings.debug_enabled = this.settings.debug;	// Here to maintain v2 API
+	
+	// Event Handlers
+	this.settings.return_upload_start_handler = this.returnUploadStart;
+	this.ensureDefault("swfupload_loaded_handler", null);
+	this.ensureDefault("file_dialog_start_handler", null);
+	this.ensureDefault("file_queued_handler", null);
+	this.ensureDefault("file_queue_error_handler", null);
+	this.ensureDefault("file_dialog_complete_handler", null);
+	
+	this.ensureDefault("upload_start_handler", null);
+	this.ensureDefault("upload_progress_handler", null);
+	this.ensureDefault("upload_error_handler", null);
+	this.ensureDefault("upload_success_handler", null);
+	this.ensureDefault("upload_complete_handler", null);
+	
+	this.ensureDefault("debug_handler", this.debugMessage);
+
+	this.ensureDefault("custom_settings", {});
+
+	// Other settings
+	this.customSettings = this.settings.custom_settings;
+	
+	// Update the flash url if needed
+	if (!!this.settings.prevent_swf_caching) {
+		this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
+	}
+	
+	if (!this.settings.preserve_relative_urls) {
+		//this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url);	// Don't need to do this one since flash doesn't look at it
+		this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
+		this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
+	}
+	
+	delete this.ensureDefault;
+};
+
+// Private: loadFlash replaces the button_placeholder element with the flash movie.
+SWFUpload.prototype.loadFlash = function () {
+	var targetElement, tempParent;
+
+	// Make sure an element with the ID we are going to use doesn't already exist
+	if (document.getElementById(this.movieName) !== null) {
+		throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
+	}
+
+	// Get the element where we will be placing the flash movie
+	targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
+
+	if (targetElement == undefined) {
+		throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
+	}
+
+	// Append the container and load the flash
+	tempParent = document.createElement("div");
+	tempParent.innerHTML = this.getFlashHTML();	// Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
+	targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
+
+	// Fix IE Flash/Form bug
+	if (window[this.movieName] == undefined) {
+		window[this.movieName] = this.getMovieElement();
+	}
+	
+};
+
+// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
+SWFUpload.prototype.getFlashHTML = function () {
+	// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
+	return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
+				'<param name="wmode" value="', this.settings.button_window_mode, '" />',
+				'<param name="movie" value="', this.settings.flash_url, '" />',
+				'<param name="quality" value="high" />',
+				'<param name="menu" value="false" />',
+				'<param name="allowScriptAccess" value="always" />',
+				'<param name="flashvars" value="' + this.getFlashVars() + '" />',
+				'</object>'].join("");
+};
+
+// Private: getFlashVars builds the parameter string that will be passed
+// to flash in the flashvars param.
+SWFUpload.prototype.getFlashVars = function () {
+	// Build a string from the post param object
+	var paramString = this.buildParamString();
+	var httpSuccessString = this.settings.http_success.join(",");
+	
+	// Build the parameter string
+	return ["movieName=", encodeURIComponent(this.movieName),
+			"&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
+			"&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
+			"&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
+			"&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
+			"&amp;assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
+			"&amp;params=", encodeURIComponent(paramString),
+			"&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
+			"&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
+			"&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
+			"&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
+			"&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
+			"&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
+			"&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
+			"&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
+			"&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
+			"&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
+			"&amp;buttonText=", encodeURIComponent(this.settings.button_text),
+			"&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
+			"&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
+			"&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
+			"&amp;buttonAction=", encodeURIComponent(this.settings.button_action),
+			"&amp;buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
+			"&amp;buttonCursor=", encodeURIComponent(this.settings.button_cursor)
+		].join("");
+};
+
+// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload
+// The element is cached after the first lookup
+SWFUpload.prototype.getMovieElement = function () {
+	if (this.movieElement == undefined) {
+		this.movieElement = document.getElementById(this.movieName);
+	}
+
+	if (this.movieElement === null) {
+		throw "Could not find Flash element";
+	}
+	
+	return this.movieElement;
+};
+
+// Private: buildParamString takes the name/value pairs in the post_params setting object
+// and joins them up in to a string formatted "name=value&amp;name=value"
+SWFUpload.prototype.buildParamString = function () {
+	var postParams = this.settings.post_params; 
+	var paramStringPairs = [];
+
+	if (typeof(postParams) === "object") {
+		for (var name in postParams) {
+			if (postParams.hasOwnProperty(name)) {
+				paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
+			}
+		}
+	}
+
+	return paramStringPairs.join("&amp;");
+};
+
+// Public: Used to remove a SWFUpload instance from the page. This method strives to remove
+// all references to the SWF, and other objects so memory is properly freed.
+// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
+// Credits: Major improvements provided by steffen
+SWFUpload.prototype.destroy = function () {
+	try {
+		// Make sure Flash is done before we try to remove it
+		this.cancelUpload(null, false);
+		
+
+		// Remove the SWFUpload DOM nodes
+		var movieElement = null;
+		movieElement = this.getMovieElement();
+		
+		if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
+			// Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround)
+			for (var i in movieElement) {
+				try {
+					if (typeof(movieElement[i]) === "function") {
+						movieElement[i] = null;
+					}
+				} catch (ex1) {}
+			}
+
+			// Remove the Movie Element from the page
+			try {
+				movieElement.parentNode.removeChild(movieElement);
+			} catch (ex) {}
+		}
+		
+		// Remove IE form fix reference
+		window[this.movieName] = null;
+
+		// Destroy other references
+		SWFUpload.instances[this.movieName] = null;
+		delete SWFUpload.instances[this.movieName];
+
+		this.movieElement = null;
+		this.settings = null;
+		this.customSettings = null;
+		this.eventQueue = null;
+		this.movieName = null;
+		
+		
+		return true;
+	} catch (ex2) {
+		return false;
+	}
+};
+
+
+// Public: displayDebugInfo prints out settings and configuration
+// information about this SWFUpload instance.
+// This function (and any references to it) can be deleted when placing
+// SWFUpload in production.
+SWFUpload.prototype.displayDebugInfo = function () {
+	this.debug(
+		[
+			"---SWFUpload Instance Info---\n",
+			"Version: ", SWFUpload.version, "\n",
+			"Movie Name: ", this.movieName, "\n",
+			"Settings:\n",
+			"\t", "upload_url:               ", this.settings.upload_url, "\n",
+			"\t", "flash_url:                ", this.settings.flash_url, "\n",
+			"\t", "use_query_string:         ", this.settings.use_query_string.toString(), "\n",
+			"\t", "requeue_on_error:         ", this.settings.requeue_on_error.toString(), "\n",
+			"\t", "http_success:             ", this.settings.http_success.join(", "), "\n",
+			"\t", "assume_success_timeout:   ", this.settings.assume_success_timeout, "\n",
+			"\t", "file_post_name:           ", this.settings.file_post_name, "\n",
+			"\t", "post_params:              ", this.settings.post_params.toString(), "\n",
+			"\t", "file_types:               ", this.settings.file_types, "\n",
+			"\t", "file_types_description:   ", this.settings.file_types_description, "\n",
+			"\t", "file_size_limit:          ", this.settings.file_size_limit, "\n",
+			"\t", "file_upload_limit:        ", this.settings.file_upload_limit, "\n",
+			"\t", "file_queue_limit:         ", this.settings.file_queue_limit, "\n",
+			"\t", "debug:                    ", this.settings.debug.toString(), "\n",
+
+			"\t", "prevent_swf_caching:      ", this.settings.prevent_swf_caching.toString(), "\n",
+
+			"\t", "button_placeholder_id:    ", this.settings.button_placeholder_id.toString(), "\n",
+			"\t", "button_placeholder:       ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
+			"\t", "button_image_url:         ", this.settings.button_image_url.toString(), "\n",
+			"\t", "button_width:             ", this.settings.button_width.toString(), "\n",
+			"\t", "button_height:            ", this.settings.button_height.toString(), "\n",
+			"\t", "button_text:              ", this.settings.button_text.toString(), "\n",
+			"\t", "button_text_style:        ", this.settings.button_text_style.toString(), "\n",
+			"\t", "button_text_top_padding:  ", this.settings.button_text_top_padding.toString(), "\n",
+			"\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
+			"\t", "button_action:            ", this.settings.button_action.toString(), "\n",
+			"\t", "button_disabled:          ", this.settings.button_disabled.toString(), "\n",
+
+			"\t", "custom_settings:          ", this.settings.custom_settings.toString(), "\n",
+			"Event Handlers:\n",
+			"\t", "swfupload_loaded_handler assigned:  ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
+			"\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
+			"\t", "file_queued_handler assigned:       ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
+			"\t", "file_queue_error_handler assigned:  ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
+			"\t", "upload_start_handler assigned:      ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
+			"\t", "upload_progress_handler assigned:   ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
+			"\t", "upload_error_handler assigned:      ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
+			"\t", "upload_success_handler assigned:    ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
+			"\t", "upload_complete_handler assigned:   ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
+			"\t", "debug_handler assigned:             ", (typeof this.settings.debug_handler === "function").toString(), "\n"
+		].join("")
+	);
+};
+
+/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
+	the maintain v2 API compatibility
+*/
+// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
+SWFUpload.prototype.addSetting = function (name, value, default_value) {
+    if (value == undefined) {
+        return (this.settings[name] = default_value);
+    } else {
+        return (this.settings[name] = value);
+	}
+};
+
+// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
+SWFUpload.prototype.getSetting = function (name) {
+    if (this.settings[name] != undefined) {
+        return this.settings[name];
+	}
+
+    return "";
+};
+
+
+
+// Private: callFlash handles function calls made to the Flash element.
+// Calls are made with a setTimeout for some functions to work around
+// bugs in the ExternalInterface library.
+SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
+	argumentArray = argumentArray || [];
+	
+	var movieElement = this.getMovieElement();
+	var returnValue, returnString;
+
+	// Flash's method if calling ExternalInterface methods (code adapted from MooTools).
+	try {
+		returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
+		returnValue = eval(returnString);
+	} catch (ex) {
+		throw "Call to " + functionName + " failed";
+	}
+	
+	// Unescape file post param values
+	if (returnValue != undefined && typeof returnValue.post === "object") {
+		returnValue = this.unescapeFilePostParams(returnValue);
+	}
+
+	return returnValue;
+};
+
+/* *****************************
+	-- Flash control methods --
+	Your UI should use these
+	to operate SWFUpload
+   ***************************** */
+
+// WARNING: this function does not work in Flash Player 10
+// Public: selectFile causes a File Selection Dialog window to appear.  This
+// dialog only allows 1 file to be selected.
+SWFUpload.prototype.selectFile = function () {
+	this.callFlash("SelectFile");
+};
+
+// WARNING: this function does not work in Flash Player 10
+// Public: selectFiles causes a File Selection Dialog window to appear/ This
+// dialog allows the user to select any number of files
+// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
+// If the selection name length is too long the dialog will fail in an unpredictable manner.  There is no work-around
+// for this bug.
+SWFUpload.prototype.selectFiles = function () {
+	this.callFlash("SelectFiles");
+};
+
+
+// Public: startUpload starts uploading the first file in the queue unless
+// the optional parameter 'fileID' specifies the ID 
+SWFUpload.prototype.startUpload = function (fileID) {
+	this.callFlash("StartUpload", [fileID]);
+};
+
+// Public: cancelUpload cancels any queued file.  The fileID parameter may be the file ID or index.
+// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
+// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
+SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
+	if (triggerErrorEvent !== false) {
+		triggerErrorEvent = true;
+	}
+	this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
+};
+
+// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
+// If nothing is currently uploading then nothing happens.
+SWFUpload.prototype.stopUpload = function () {
+	this.callFlash("StopUpload");
+};
+
+/* ************************
+ * Settings methods
+ *   These methods change the SWFUpload settings.
+ *   SWFUpload settings should not be changed directly on the settings object
+ *   since many of the settings need to be passed to Flash in order to take
+ *   effect.
+ * *********************** */
+
+// Public: getStats gets the file statistics object.
+SWFUpload.prototype.getStats = function () {
+	return this.callFlash("GetStats");
+};
+
+// Public: setStats changes the SWFUpload statistics.  You shouldn't need to 
+// change the statistics but you can.  Changing the statistics does not
+// affect SWFUpload accept for the successful_uploads count which is used
+// by the upload_limit setting to determine how many files the user may upload.
+SWFUpload.prototype.setStats = function (statsObject) {
+	this.callFlash("SetStats", [statsObject]);
+};
+
+// Public: getFile retrieves a File object by ID or Index.  If the file is
+// not found then 'null' is returned.
+SWFUpload.prototype.getFile = function (fileID) {
+	if (typeof(fileID) === "number") {
+		return this.callFlash("GetFileByIndex", [fileID]);
+	} else {
+		return this.callFlash("GetFile", [fileID]);
+	}
+};
+
+// Public: addFileParam sets a name/value pair that will be posted with the
+// file specified by the Files ID.  If the name already exists then the
+// exiting value will be overwritten.
+SWFUpload.prototype.addFileParam = function (fileID, name, value) {
+	return this.callFlash("AddFileParam", [fileID, name, value]);
+};
+
+// Public: removeFileParam removes a previously set (by addFileParam) name/value
+// pair from the specified file.
+SWFUpload.prototype.removeFileParam = function (fileID, name) {
+	this.callFlash("RemoveFileParam", [fileID, name]);
+};
+
+// Public: setUploadUrl changes the upload_url setting.
+SWFUpload.prototype.setUploadURL = function (url) {
+	this.settings.upload_url = url.toString();
+	this.callFlash("SetUploadURL", [url]);
+};
+
+// Public: setPostParams changes the post_params setting
+SWFUpload.prototype.setPostParams = function (paramsObject) {
+	this.settings.post_params = paramsObject;
+	this.callFlash("SetPostParams", [paramsObject]);
+};
+
+// Public: addPostParam adds post name/value pair.  Each name can have only one value.
+SWFUpload.prototype.addPostParam = function (name, value) {
+	this.settings.post_params[name] = value;
+	this.callFlash("SetPostParams", [this.settings.post_params]);
+};
+
+// Public: removePostParam deletes post name/value pair.
+SWFUpload.prototype.removePostParam = function (name) {
+	delete this.settings.post_params[name];
+	this.callFlash("SetPostParams", [this.settings.post_params]);
+};
+
+// Public: setFileTypes changes the file_types setting and the file_types_description setting
+SWFUpload.prototype.setFileTypes = function (types, description) {
+	this.settings.file_types = types;
+	this.settings.file_types_description = description;
+	this.callFlash("SetFileTypes", [types, description]);
+};
+
+// Public: setFileSizeLimit changes the file_size_limit setting
+SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
+	this.settings.file_size_limit = fileSizeLimit;
+	this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
+};
+
+// Public: setFileUploadLimit changes the file_upload_limit setting
+SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
+	this.settings.file_upload_limit = fileUploadLimit;
+	this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
+};
+
+// Public: setFileQueueLimit changes the file_queue_limit setting
+SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
+	this.settings.file_queue_limit = fileQueueLimit;
+	this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
+};
+
+// Public: setFilePostName changes the file_post_name setting
+SWFUpload.prototype.setFilePostName = function (filePostName) {
+	this.settings.file_post_name = filePostName;
+	this.callFlash("SetFilePostName", [filePostName]);
+};
+
+// Public: setUseQueryString changes the use_query_string setting
+SWFUpload.prototype.setUseQueryString = function (useQueryString) {
+	this.settings.use_query_string = useQueryString;
+	this.callFlash("SetUseQueryString", [useQueryString]);
+};
+
+// Public: setRequeueOnError changes the requeue_on_error setting
+SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
+	this.settings.requeue_on_error = requeueOnError;
+	this.callFlash("SetRequeueOnError", [requeueOnError]);
+};
+
+// Public: setHTTPSuccess changes the http_success setting
+SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
+	if (typeof http_status_codes === "string") {
+		http_status_codes = http_status_codes.replace(" ", "").split(",");
+	}
+	
+	this.settings.http_success = http_status_codes;
+	this.callFlash("SetHTTPSuccess", [http_status_codes]);
+};
+
+// Public: setHTTPSuccess changes the http_success setting
+SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) {
+	this.settings.assume_success_timeout = timeout_seconds;
+	this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]);
+};
+
+// Public: setDebugEnabled changes the debug_enabled setting
+SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
+	this.settings.debug_enabled = debugEnabled;
+	this.callFlash("SetDebugEnabled", [debugEnabled]);
+};
+
+// Public: setButtonImageURL loads a button image sprite
+SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
+	if (buttonImageURL == undefined) {
+		buttonImageURL = "";
+	}
+	
+	this.settings.button_image_url = buttonImageURL;
+	this.callFlash("SetButtonImageURL", [buttonImageURL]);
+};
+
+// Public: setButtonDimensions resizes the Flash Movie and button
+SWFUpload.prototype.setButtonDimensions = function (width, height) {
+	this.settings.button_width = width;
+	this.settings.button_height = height;
+	
+	var movie = this.getMovieElement();
+	if (movie != undefined) {
+		movie.style.width = width + "px";
+		movie.style.height = height + "px";
+	}
+	
+	this.callFlash("SetButtonDimensions", [width, height]);
+};
+// Public: setButtonText Changes the text overlaid on the button
+SWFUpload.prototype.setButtonText = function (html) {
+	this.settings.button_text = html;
+	this.callFlash("SetButtonText", [html]);
+};
+// Public: setButtonTextPadding changes the top and left padding of the text overlay
+SWFUpload.prototype.setButtonTextPadding = function (left, top) {
+	this.settings.button_text_top_padding = top;
+	this.settings.button_text_left_padding = left;
+	this.callFlash("SetButtonTextPadding", [left, top]);
+};
+
+// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
+SWFUpload.prototype.setButtonTextStyle = function (css) {
+	this.settings.button_text_style = css;
+	this.callFlash("SetButtonTextStyle", [css]);
+};
+// Public: setButtonDisabled disables/enables the button
+SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
+	this.settings.button_disabled = isDisabled;
+	this.callFlash("SetButtonDisabled", [isDisabled]);
+};
+// Public: setButtonAction sets the action that occurs when the button is clicked
+SWFUpload.prototype.setButtonAction = function (buttonAction) {
+	this.settings.button_action = buttonAction;
+	this.callFlash("SetButtonAction", [buttonAction]);
+};
+
+// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
+SWFUpload.prototype.setButtonCursor = function (cursor) {
+	this.settings.button_cursor = cursor;
+	this.callFlash("SetButtonCursor", [cursor]);
+};
+
+/* *******************************
+	Flash Event Interfaces
+	These functions are used by Flash to trigger the various
+	events.
+	
+	All these functions a Private.
+	
+	Because the ExternalInterface library is buggy the event calls
+	are added to a queue and the queue then executed by a setTimeout.
+	This ensures that events are executed in a determinate order and that
+	the ExternalInterface bugs are avoided.
+******************************* */
+
+SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
+	// Warning: Don't call this.debug inside here or you'll create an infinite loop
+	
+	if (argumentArray == undefined) {
+		argumentArray = [];
+	} else if (!(argumentArray instanceof Array)) {
+		argumentArray = [argumentArray];
+	}
+	
+	var self = this;
+	if (typeof this.settings[handlerName] === "function") {
+		// Queue the event
+		this.eventQueue.push(function () {
+			this.settings[handlerName].apply(this, argumentArray);
+		});
+		
+		// Execute the next queued event
+		setTimeout(function () {
+			self.executeNextEvent();
+		}, 0);
+		
+	} else if (this.settings[handlerName] !== null) {
+		throw "Event handler " + handlerName + " is unknown or is not a function";
+	}
+};
+
+// Private: Causes the next event in the queue to be executed.  Since events are queued using a setTimeout
+// we must queue them in order to garentee that they are executed in order.
+SWFUpload.prototype.executeNextEvent = function () {
+	// Warning: Don't call this.debug inside here or you'll create an infinite loop
+
+	var  f = this.eventQueue ? this.eventQueue.shift() : null;
+	if (typeof(f) === "function") {
+		f.apply(this);
+	}
+};
+
+// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
+// properties that contain characters that are not valid for JavaScript identifiers. To work around this
+// the Flash Component escapes the parameter names and we must unescape again before passing them along.
+SWFUpload.prototype.unescapeFilePostParams = function (file) {
+	var reg = /[$]([0-9a-f]{4})/i;
+	var unescapedPost = {};
+	var uk;
+
+	if (file != undefined) {
+		for (var k in file.post) {
+			if (file.post.hasOwnProperty(k)) {
+				uk = k;
+				var match;
+				while ((match = reg.exec(uk)) !== null) {
+					uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
+				}
+				unescapedPost[uk] = file.post[k];
+			}
+		}
+
+		file.post = unescapedPost;
+	}
+
+	return file;
+};
+
+// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
+SWFUpload.prototype.testExternalInterface = function () {
+	try {
+		return this.callFlash("TestExternalInterface");
+	} catch (ex) {
+		return false;
+	}
+};
+
+// Private: This event is called by Flash when it has finished loading. Don't modify this.
+// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
+SWFUpload.prototype.flashReady = function () {
+	// Check that the movie element is loaded correctly with its ExternalInterface methods defined
+	var movieElement = this.getMovieElement();
+
+	if (!movieElement) {
+		this.debug("Flash called back ready but the flash movie can't be found.");
+		return;
+	}
+
+	this.cleanUp(movieElement);
+	
+	this.queueEvent("swfupload_loaded_handler");
+};
+
+// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
+// This function is called by Flash each time the ExternalInterface functions are created.
+SWFUpload.prototype.cleanUp = function (movieElement) {
+	// Pro-actively unhook all the Flash functions
+	try {
+		if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
+			this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
+			for (var key in movieElement) {
+				try {
+					if (typeof(movieElement[key]) === "function") {
+						movieElement[key] = null;
+					}
+				} catch (ex) {
+				}
+			}
+		}
+	} catch (ex1) {
+	
+	}
+
+	// Fix Flashes own cleanup code so if the SWFMovie was removed from the page
+	// it doesn't display errors.
+	window["__flash__removeCallback"] = function (instance, name) {
+		try {
+			if (instance) {
+				instance[name] = null;
+			}
+		} catch (flashEx) {
+		
+		}
+	};
+
+};
+
+
+/* This is a chance to do something before the browse window opens */
+SWFUpload.prototype.fileDialogStart = function () {
+	this.queueEvent("file_dialog_start_handler");
+};
+
+
+/* Called when a file is successfully added to the queue. */
+SWFUpload.prototype.fileQueued = function (file) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("file_queued_handler", file);
+};
+
+
+/* Handle errors that occur when an attempt to queue a file fails. */
+SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
+};
+
+/* Called after the file dialog has closed and the selected files have been queued.
+	You could call startUpload here if you want the queued files to begin uploading immediately. */
+SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
+	this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
+};
+
+SWFUpload.prototype.uploadStart = function (file) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("return_upload_start_handler", file);
+};
+
+SWFUpload.prototype.returnUploadStart = function (file) {
+	var returnValue;
+	if (typeof this.settings.upload_start_handler === "function") {
+		file = this.unescapeFilePostParams(file);
+		returnValue = this.settings.upload_start_handler.call(this, file);
+	} else if (this.settings.upload_start_handler != undefined) {
+		throw "upload_start_handler must be a function";
+	}
+
+	// Convert undefined to true so if nothing is returned from the upload_start_handler it is
+	// interpretted as 'true'.
+	if (returnValue === undefined) {
+		returnValue = true;
+	}
+	
+	returnValue = !!returnValue;
+	
+	this.callFlash("ReturnUploadStart", [returnValue]);
+};
+
+
+
+SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
+};
+
+SWFUpload.prototype.uploadError = function (file, errorCode, message) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("upload_error_handler", [file, errorCode, message]);
+};
+
+SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
+};
+
+SWFUpload.prototype.uploadComplete = function (file) {
+	file = this.unescapeFilePostParams(file);
+	this.queueEvent("upload_complete_handler", file);
+};
+
+/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
+   internal debug console.  You can override this event and have messages written where you want. */
+SWFUpload.prototype.debug = function (message) {
+	this.queueEvent("debug_handler", message);
+};
+
+
+/* **********************************
+	Debug Console
+	The debug console is a self contained, in page location
+	for debug message to be sent.  The Debug Console adds
+	itself to the body if necessary.
+
+	The console is automatically scrolled as messages appear.
+	
+	If you are using your own debug handler or when you deploy to production and
+	have debug disabled you can remove these functions to reduce the file size
+	and complexity.
+********************************** */
+   
+// Private: debugMessage is the default debug_handler.  If you want to print debug messages
+// call the debug() function.  When overriding the function your own function should
+// check to see if the debug setting is true before outputting debug information.
+SWFUpload.prototype.debugMessage = function (message) {
+	if (this.settings.debug) {
+		var exceptionMessage, exceptionValues = [];
+
+		// Check for an exception object and print it nicely
+		if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
+			for (var key in message) {
+				if (message.hasOwnProperty(key)) {
+					exceptionValues.push(key + ": " + message[key]);
+				}
+			}
+			exceptionMessage = exceptionValues.join("\n") || "";
+			exceptionValues = exceptionMessage.split("\n");
+			exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
+			SWFUpload.Console.writeLine(exceptionMessage);
+		} else {
+			SWFUpload.Console.writeLine(message);
+		}
+	}
+};
+
+SWFUpload.Console = {};
+SWFUpload.Console.writeLine = function (message) {
+	var console, documentForm;
+
+	try {
+		console = document.getElementById("SWFUpload_Console");
+
+		if (!console) {
+			documentForm = document.createElement("form");
+			document.getElementsByTagName("body")[0].appendChild(documentForm);
+
+			console = document.createElement("textarea");
+			console.id = "SWFUpload_Console";
+			console.style.fontFamily = "monospace";
+			console.setAttribute("wrap", "off");
+			console.wrap = "off";
+			console.style.overflow = "auto";
+			console.style.width = "700px";
+			console.style.height = "350px";
+			console.style.margin = "5px";
+			documentForm.appendChild(console);
+		}
+
+		console.value += message + "\n";
+
+		console.scrollTop = console.scrollHeight - console.clientHeight;
+	} catch (ex) {
+		alert("Exception: " + ex.name + " Message: " + ex.message);
+	}
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/img-org.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/img-org.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/img-org.css	(revision 625)
@@ -0,0 +1,102 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-dd-drag-proxy .multi-proxy .thumb-img{
+    height: auto;
+	width: 40px;
+	margin:1px;
+}
+.x-dd-drag-proxy .thumb-img{
+	height: 60px;
+	width: 80px;
+}
+
+.images-view .x-panel-body {
+    font: 11px Arial, Helvetica, sans-serif;
+}
+.images-view .thumb img {
+    height: 60px;
+    width: auto;
+}
+.images-view .thumb-wrap {
+    float: left;
+    margin: 5px 0 5px 5px;
+    background: #EFF5FB;
+    border: 1px solid #99BBE8;
+    padding: 15px;
+}
+.images-view .thumb-wrap span {
+    display: block;
+    overflow: hidden;
+    text-align: center;
+}
+
+.images-view div.x-view-selected {
+    background-color: #99BBE8;
+}
+
+.album-node .x-tree-node-icon, .album-btn{
+    background-image:url( ../tree/album.gif ) !important;
+}
+div.upload-file {
+    border-bottom: 1px solid #99BBE8;
+    padding: 10px;
+}
+div.upload-file-selected {
+    background:#EFF5FB url(../view/images/selected.gif) repeat-x;
+}
+div.upload-name {
+    width: 300px;
+    float: left;
+}
+div.upload-pb {
+    width: 300px;
+    float: left;
+}
+div.upload-info, div.album-details {
+    color: gray;
+    font-size: smaller;
+}
+
+.image-prop-header {
+    padding-left: 10px;
+    padding-top: 10px;
+    border-bottom: 1px solid #99BBE8;
+}
+
+.image-prop {
+    padding-left: 20px;
+    padding-top: 3px;
+}
+
+div.album-wrap {
+    background-color: #EFF5FB;
+    padding: 1em;
+    text-align: center;
+    margin:3px;
+    border: 1px solid #99BBE8;
+    height: 150px;
+}
+
+/* Toolbar Icons */
+.upload {
+    background-image: url(images/icons/box_upload.png) !important;
+}
+.add {
+    background-image: url(images/icons/folder_add.png) !important;
+}
+.start-upload {
+    background-image: url(images/icons/arrow_up.png) !important;
+}
+.cancel {
+    background-image: url(images/icons/cancel.png) !important;
+}
+.album-add {
+    background-image: url(images/icons/folder_add_sm.png) !important;
+}
+.tag {
+    background-image: url(images/icons/tag_blue_add.png) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumTree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumTree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumTree.js	(revision 625)
@@ -0,0 +1,147 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.AlbumTree = Ext.extend(Ext.tree.TreePanel,{
+    initComponent: function() {
+        Ext.apply(this,{
+            loader: new Ext.ux.tree.DirectTreeLoader({
+                api: Imgorg.ss.Albums
+            }),
+            root: new Ext.tree.TreeNode({
+                text:'dummynode',
+                expanded: true,
+                leaf: false,
+                cls:'album-node'
+            }),
+            rootVisible: false,
+            clearOnLoad: false,
+            autoScroll: true,
+            containerScroll: true,
+            enableDrop: true,
+            dropConfig: {
+                ddGroup: 'organizerDD',
+                notifyDrop: this.onNotifyDrop.createDelegate(this)
+            }
+        });
+        Imgorg.AlbumTree.superclass.initComponent.call(this);
+        this.loader.load(this.root);
+        
+        this.editor = new Ext.tree.TreeEditor(this, {
+            allowBlank: false,
+            blankText: 'A name is required',
+            selectOnFocus: true
+        });
+        this.editor.on('complete', this.onEditComplete, this);
+        this.on('contextmenu', this.onContextMenu, this);
+    },
+    
+    onContextMenu: function(node, e) {
+        e.stopEvent();
+        if(!this.contMenu) {
+            this.contMenu = new Ext.menu.Menu({
+                items: [{
+                    text: 'Remove',
+                    handler: function() {
+                        var node = this.currentNode;
+                        node.unselect();
+                        Ext.fly(node.ui.elNode).ghost('l', {
+                            callback: function() {
+                                Imgorg.ss.Albums.remove({
+                                    album: node.id
+                                });
+                                node.remove();
+                            }, scope: node, duration: 0.4
+                        });
+                    },
+                    scope: this
+                }]
+            });
+        }
+        this.currentNode = node;
+        this.contMenu.showAt(e.getXY());
+    },
+    
+    onNotifyDrop: function(src, e, data) {
+        var nodes = data.nodes;
+        var nodeIds = [];
+        for (var i = 0;i < nodes.length;i++) {
+            nodeIds.push(nodes[i].id);
+        }
+        this.addToAlbum(nodeIds, this.dropZone.dragOverData.target.attributes.id);
+        return true; // cancell repair anim
+    },
+    
+    addToAlbum: function(nodes, album) {
+        Imgorg.ss.Images.addToAlbum({
+            images: nodes, 
+            album: album
+        });
+    },
+    
+    addAlbum: function() {
+        var root = this.root;
+        var node = root.appendChild(new Ext.tree.TreeNode({
+            text:'Album',
+            cls:'album-node',
+            allowDrag:false
+        }));
+        this.getSelectionModel().select(node);
+        var ge = this.editor;
+        setTimeout(function(){
+            ge.editNode = node;
+            ge.startEdit(node.ui.textNode);
+        }, 10);
+    },
+    
+    onEditComplete: function(editor, newVal, oldVal) {
+        var n = editor.editNode;
+        Imgorg.ss.Albums.addOrUpdate({node: n.id, text: newVal, id: n.attributes.id});
+    }
+});
+Ext.reg('img-albumtree', Imgorg.AlbumTree);
+
+Ext.ns('Ext.ux.tree');
+Ext.ux.tree.DirectTreeLoader = Ext.extend(Ext.tree.TreeLoader,{
+    baseAttrs: {
+        cls:'album-node'
+    },
+    
+    load : function(node, callback){
+        this.requestData(node, callback);
+    },
+    
+    requestData : function(node, callback){
+        if(this.fireEvent("beforeload", this, node, callback) !== false){
+            this.api.loadtree({
+                node: node.id
+            }, this.processResponse.createDelegate(this, [node, callback], true));
+        }else{
+            // if the load is cancelled, make sure we notify
+            // the node that we are done
+            if(typeof callback == "function"){
+                callback();
+            }
+        }
+    },
+    
+    processResponse : function(res, trans, node, callback){
+        try {
+            node.beginUpdate();
+            for(var i = 0, len = res.length; i < len; i++){
+                var n = this.createNode(res[i]);
+                if(n){
+                    node.appendChild(n);
+                }
+            }
+            node.endUpdate();
+            if(typeof callback == "function"){
+                callback(this, node);
+            }
+        }catch(e){
+            this.handleFailure(res);
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumWin.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumWin.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumWin.js	(revision 625)
@@ -0,0 +1,65 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.AlbumWin = Ext.extend(Ext.Window, {
+    title: 'Choose Album',
+    layout: 'fit',
+    closeAction: 'hide',
+    width: 300,
+    modal: true,
+    
+    initComponent: function() {
+        Ext.apply(this, {
+            items: [{
+                autoHeight: true,
+                xtype: 'form',
+                id: 'album-select',
+                bodyStyle: 'padding:15px',
+                labelWidth: 50,
+                items: [{
+                    anchor: '95%',
+                    fieldLabel: 'Album',
+                    xtype: 'img-albumcombo',
+                    name: 'album',
+                    allowBlank: false
+                }]
+            }],
+            buttons: [{
+                text: 'Add to Album',
+                handler: this.addToAlbum,
+                scope: this
+            },{
+                text: 'Cancel',
+                handler: function() {
+                    this.hide();
+                },
+                scope: this
+            }]
+        });
+        Imgorg.AlbumWin.superclass.initComponent.call(this);
+    },
+    
+    addToAlbum: function() {
+        var af = this.getComponent('album-select').getForm();
+        if (af.isValid()) {
+            if (this.selectedRecords) {
+                var imageIds = [];
+                for (var i = 0; i < this.selectedRecords.length; i++) {
+                    var r = this.selectedRecords[i];
+                    imageIds.push(r.data.dbid || r.data.id);
+                }
+                var fld = af.findField('album');
+                var album = fld.getValue();
+                
+                Imgorg.ss.Images.addToAlbum({
+                    images: imageIds,
+                    album: album
+                });
+            }
+            this.hide();
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumsPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumsPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/AlbumsPanel.js	(revision 625)
@@ -0,0 +1,96 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.AlbumsPanel = Ext.extend(Ext.Panel,{
+    initComponent: function() {
+        Ext.apply(this, {
+            layout: 'column',
+            defaults: {
+                border: false
+            },
+            autoScroll: true,
+            defaultType: 'img-album',
+            items: [{
+                columnWidth: 0.33
+            },{
+                columnWidth: 0.33
+            },{
+                columnWidth: 0.34
+            }]
+        });
+        Imgorg.AlbumsPanel.superclass.initComponent.call(this);
+        this.loadAlbums();
+        this.on('activate', this.loadAlbums, this);
+    },
+    
+    afterRender: function() {
+        Imgorg.AlbumsPanel.superclass.afterRender.call(this);
+        this.body.on('click', this.onClick, this, {delegate: 'div.album-wrap'});
+    },
+    
+    loadAlbums: function() {
+        Imgorg.ss.Albums.getAllInfo({}, this.setupAlbums, this);
+    },
+    
+    setupAlbums: function(data, resp) {
+        var cols = [[],[],[]];
+        var idx = 0;
+        for (var i = 0;i < data.length;i++) {
+            var a = data[i];
+            cols[idx].push(a);
+            if (++idx >= 3) {
+                idx = 0;
+            }
+        }
+        for (var i = 0; i < 3; i++) {
+            this.items.get(i).generateAlbums(cols[i]);
+        }
+    },
+    
+    onClick: function(e, n) {
+        var album = n.attributes.album_id.value;
+        var album_name = n.attributes.album_name.value;
+        this.fireEvent('openalbum', this, album, album_name);
+    }
+});
+Ext.reg('img-albumspanel', Imgorg.AlbumsPanel);
+
+Imgorg.Album = Ext.extend(Ext.Panel,{
+    maxWidth: 150,
+    maxHeight: 100,
+    tpl: new Ext.XTemplate(
+        '<tpl for=".">',
+            '<div class="album-wrap" album_id="{id}" album_name="{text}">',
+                '<div class="album-wrap-inner">',
+                    '{filename:this.imageFormat}',
+                    '<h3>Album: {text}</h3>',
+                    '<div class="album-details">',
+                        '<p>Date: {date}</p>',
+                        '<p>Size: {size} images</p>',
+                    '</div>',
+                '</div>',
+            '</div>',
+        '</tpl>',{
+            imageFormat: function(filename, data) {
+                if (filename) {
+                    return String.format('<img src="images/thumbs/{0}" height="{1}" width="{2}" />',filename, data.height, data.width);
+                } else {
+                    return '<p>No Images in Album</p>';
+                }
+            }
+        }
+    ),
+    generateAlbums: function(albums) {
+        for(var i = 0; i < albums.length;i++) {
+            if (albums[i].exif) {
+                albums[i].height = Math.min(this.maxHeight, albums[i].exif.COMPUTED.Height);
+                albums[i].width = Math.min(this.maxWidth, albums[i].exif.COMPUTED.Width);
+            }
+        }
+        this.tpl.overwrite(this.body, albums);
+    }
+});
+Ext.reg('img-album', Imgorg.Album);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/App.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/App.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/App.js	(revision 625)
@@ -0,0 +1,222 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Sample Image Organizer utilizing Ext.Direct
+ * Tagging/Organizing into galleries
+ * Image uploading
+ */
+
+Ext.ns('Imgorg','Imgorg.App');
+Imgorg.App = function() {
+    var swfu;
+    SWFUpload.onload = function() {
+        var settings = {
+            flash_url: "SWFUpload/Flash/swfupload.swf",
+            upload_url: "php/router.php",
+            file_size_limit: "100 MB",
+            file_types: "*.*",
+            file_types_description: "Image Files",
+            file_upload_limit: 100,
+            file_queue_limit: 100, 
+            debug: false,
+            button_placeholder_id: "btnUploadHolder",
+            button_cursor: SWFUpload.CURSOR.HAND,
+            button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
+            file_queued_handler: function(file) {
+                Ext.ux.SwfuMgr.fireEvent('filequeued', this, file);
+            },
+            upload_start_handler: function(file) {
+                Ext.ux.SwfuMgr.fireEvent('uploadstart', this, file);
+            },
+            upload_progress_handler: function(file, complete, total) {
+                Ext.ux.SwfuMgr.fireEvent('uploadprogress', this, file, complete, total);
+            },
+            upload_error_handler: function(file, error, message) {
+                Ext.ux.SwfuMgr.fireEvent('uploaderror', this, file, error, message);
+            },
+            upload_success_handler: function(file, data, response) {
+                Ext.ux.SwfuMgr.fireEvent('uploadsuccess', this, file, data);
+            },
+            minimum_flash_version: "9.0.28",
+            post_params: {
+                extAction: 'Images', // The class to use
+                extUpload: true,      
+                extMethod: 'upload'  // The method to execute
+                //needs extTID – Transaction ID to associate with this request.
+            }
+        };
+        swfu = new SWFUpload(settings);
+    };
+    var view, thumbPanel, uploadPanel, tabPanel;
+    return {
+        debugSWF: false,
+        
+        init: function() {
+            Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+            Ext.QuickTips.init();
+            Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';
+            Ext.Direct.addProvider(Imgorg.REMOTING_API);
+            
+            Ext.ux.SwfuMgr.on('filequeued', this.onFileQueued, this);
+            
+            new Ext.Viewport({
+                layout: 'border',
+                items: [{
+                    xtype: 'img-albumtree',
+                    id: 'album-tree',
+                    region: 'west',
+                    width: 180,
+                    minWidth: 180,
+                    maxWidth: 180,
+                    collapsible: true,
+                    split: true,
+                    collapseMode: 'mini',
+                    margins: '5 0 5 5',
+                    cmargins: '0 0 0 0',
+                    tbar: [{
+                        text: 'Add Album',
+                        iconCls: 'add',
+                        scale: 'large',
+                        handler: function() {
+                            Ext.getCmp('album-tree').addAlbum();
+                        }
+                    },{
+                        text: 'Upload',
+                        iconCls: 'upload',
+                        scale: 'large',
+                        handler: function() {
+                            swfu.selectFiles();
+                        }
+                    }],
+                    listeners: {
+                        click: this.onAlbumClick,
+                        scope: this
+                    }
+                },{
+                    xtype: 'tabpanel',
+                    region: 'center',
+                    id: 'img-tabpanel',
+                    margins: '5 5 5 0',
+                    activeItem: 0,
+                    enableTabScroll: true,
+                    items: this.getTabs()
+                }]
+            });
+            
+            tabPanel = Ext.getCmp('img-tabpanel');
+            thumbPanel = tabPanel.getComponent('images-view');
+            Imgorg.TagWin = new Imgorg.TagWindow();
+        },
+        
+        getTabs: function() {
+            var tabs = [{
+                xtype: 'img-albumspanel',
+                title: 'Albums',
+                listeners: {
+                    openalbum: this.onOpenAlbum,
+                    scope: this
+                }
+            },Ext.apply({
+                xtype: 'img-thumbpanel',
+                itemId:'images-view'
+            },this.getImageThumbConfig())];
+            
+            if (this.debugSWF) {
+                tabs.push({
+                    title: 'debug',
+                    contentEl: 'SWFUpload_Console',
+                    listeners: {
+                        render: function() {
+                            Ext.fly('SWFUpload_Console').applyStyles({height: '100%', width: '100%'});
+                        }
+                    }
+                });
+            }
+            return tabs;
+        },
+        
+        getImageThumbConfig: function() {
+            return {
+                dvConfig: {
+                    listeners: {
+                        dblclick: function(view, idx, node, e) {
+                            var p = this.openImage(view.getStore().getAt(idx));
+                            p.show();
+                        },
+                        viewitem: function(view, node) {
+                            var recs = view.getSelectedRecords();
+                            for (var i = 0; i < recs.length; i++) {
+                                this.openImage(recs[i]);
+                            }
+                        },
+                        scope: this
+                    }
+                }
+            };
+        },
+        
+        openImage: function(rec) {
+            return tabPanel.add({
+                xtype: 'img-panel',
+                title: Ext.util.Format.ellipsis(rec.data.filename,15),
+                url: rec.data.url,
+                imageData: rec.data
+            });
+        },
+        
+        onOpenAlbum: function(ap, album, name) {
+            var tab = tabPanel.add(Ext.apply({
+                xtype: 'img-thumbpanel',
+                closable: true,
+                title: 'Album: '+name
+            },this.getImageThumbConfig()));
+            tab.albumFilter({
+                id: album,
+                text: name
+            });
+            tab.show();
+        },
+        
+        onAlbumClick: function(node, e) {
+            this.onOpenAlbum(null, node.attributes.id, node.attributes.text);
+        },
+        
+        onFileQueued: function(swfu, file) {
+            if (!uploadPanel) {
+                uploadPanel = Ext.getCmp('img-tabpanel').add({
+                    title: 'Upload Queue',
+                    xtype: 'img-uploadqueue',
+                    swfu: swfu
+                });
+                uploadPanel.show();
+                uploadPanel.addFile(swfu, file);
+            } else {
+                uploadPanel.show();
+            }
+        },
+        
+        getSwf: function() {
+            return swfu;
+        }
+    }
+}();
+
+Ext.onReady(Imgorg.App.init,Imgorg.App);
+
+Ext.override(Ext.CompositeElementLite,{
+    removeElement : function(keys, removeDom){
+        var me = this, els = this.elements, el;	    	
+	    Ext.each(keys, function(val){
+		    if (el = (els[val] || els[val = me.indexOf(val)])) {
+		    	if(removeDom) 
+		    		el.dom ? el.remove() : Ext.removeNode(el);
+		    	els.splice(val, 1);		    	
+			}
+	    });
+        return this;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/Checkable.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/Checkable.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/Checkable.js	(revision 625)
@@ -0,0 +1,193 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.ns('Ext.ux.MultiCombo');
+/**
+ * Checkable
+ * @plugin
+ */
+Ext.ux.MultiCombo.Checkable = function(cfg) {
+	Ext.apply(this, cfg);
+};
+Ext.ux.MultiCombo.Checkable.prototype = {
+	/**
+	 * @cfg {String} checkSelector DomQuery config for locating checkbox
+	 */
+	checkSelector: 'input[type=checkbox]',
+	/**
+	 * @cfg {String} itemSelector The itemSelector used with Combo's internal DataView [x-combo-list]
+	 */
+	itemSelector : 'x-combo-list',
+	/**
+	 * @cfg {String} cls
+	 */
+	cls: 'combo-checkable',
+	/**
+	 * @cfg {String} selectAllText The "SELECT ALL" phrase [Select All]
+	 */
+	selectAllText: 'Select All',
+	/**
+	 * @cfg {String} clearAllText the text to display for "clear all" link
+	 */
+	clearAllText : 'clear all',
+
+	/**
+	 * @cfg {String} separatorHtml arbitrary html rendered after Checkable controls.  Can be used to add an
+	 * html separator markup.
+	 */
+	separatorHtml : '',
+
+	// private {Boolean} checked
+	checked : null,
+
+	init : function(combo) {
+		this.combo = combo;
+		var checkable = this;
+		var id = Ext.id();
+		var cls = combo.itemSelector || this.itemSelector;
+
+		if (!combo.tpl) {
+			combo.tpl =['<tpl for=".">','<div class="'+cls+'-item">{'+combo.displayField+'}</div>','</tpl>']       .  join('');
+		}
+		combo.tpl = [
+			'<div class="plugin ' + this.cls + '">',
+				'<span class="' + this.cls + '-select-all">',
+					'<input id="'+id+'" type="checkbox" />&nbsp;<label>'+this.selectAllText+'</label>',
+				'</span>',
+				'&nbsp;<span class="'+this.cls+'-clear-all">(<a href="#">' + this.clearAllText + '</a>)</span>',
+			'</div>',
+			this.separatorHtml
+		].join('') + combo.tpl.replace(new RegExp('({'+combo.displayField+'})'), "<input type=\"checkbox\" <tpl if=\"values._checked\">checked</tpl> />&nbsp;<label>$1</label>");
+
+		combo.on('initview', function(c, dv) {
+			dv.on('containerclick', this.onContainerClick.createDelegate(this));
+			dv.on('selectionchange', this.onSelectionChange.createDelegate(this));
+			dv.el.on('mouseover', this.onViewOver, this);
+		},this);
+		combo.on('select', this.onSelect.createDelegate(this));
+	},
+
+    onViewOver : function(ev, node){
+		var target = ev.getTarget('.' + this.cls, 5);
+		if (target) {
+			this.combo.clearHighlight();
+			Ext.fly(target).addClass(this.combo.highlightClass);
+		}
+        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
+            return;
+        }
+        return;
+    },
+
+	onSelect : function(rec, index) {
+		// anything?
+	},
+
+	/**
+	 * getCheckbox
+	 * @return {DomNode}
+	 */
+	getCheckbox : function() {
+		return this.combo.view.el.child('.'+this.cls+' '+this.checkSelector, true);
+	},
+
+	/**
+	 * onSelectChange Fired by MultiCombo
+	 * @param {Object} dv
+	 * @param {Object} rs
+	 */
+	onSelectionChange : function(dv, rs) {
+		this.checked = (rs.length > 0 && rs.length == this.combo.store.getCount()) ? true : false;
+		this.getCheckbox().checked = this.checked;
+
+		var selector = this.checkSelector;
+		setTimeout(function() {
+			dv.el.select(dv.itemSelector + ' ' + selector).each(function(f) {
+				f.dom.checked = false;
+			});
+			dv.el.select('.' + dv.selectedClass + ' ' + selector).each(function(f) {
+				f.dom.checked = true;
+			});
+		},1);
+	},
+
+	/**
+	 * selectNext Called by MultiCombo.  use this to apply hover-class to this row.
+	 * @param {Object} sender
+	 */
+	selectNext: function(sender) {
+		sender.view.el.child('.' + this.cls).addClass(sender.highlightClass);
+	},
+
+	/**
+	 * selectPrev Called by MultiCombo, use this to apply hover class to row.
+	 * @param {Object} sender
+	 */
+	selectPrev : function(sender) {
+		sender.view.el.child('.' + this.cls).addClass(sender.highlightClass);
+	},
+
+	/**
+	 * onEnter Called by MultiCombo
+	 * @param {Object} sender
+	 */
+	onEnter : function(sender) {
+		this.setChecked(!this.checked);
+	},
+
+	/**
+	 * onContainerClick Fired by MultiCombo
+	 * @param {Object} dv
+	 * @param {Object} ev
+	 */
+	onContainerClick : function(dv, ev) {
+		var btnClearAll = ev.getTarget('.'+this.cls+'-clear-all');
+		if (btnClearAll) {
+			this.clearAll();
+		}
+		else {
+			this.setChecked(!this.checked);
+		}
+		return false;
+	},
+
+	// private selectAll
+	selectAll : function() {
+		var value = [];
+		this.combo.store.each(function(r) { value.push(r.data[this.combo.valueField]); },this);
+		this.combo.setValue(value);
+		this.combo.selectByValue(this.combo.getValue());
+		this.combo.focus();
+	},
+
+	// private clearAll
+	clearAll : function() {
+		this.combo.updateValue([]);
+		this.combo.selectByValue([]);
+		this.combo.view.clearSelections();
+		this.combo.focus();
+        this.combo.fireEvent('clearall', this.combo);
+	},
+
+	/**
+	 * setChecked
+	 * @param {Object} v
+	 */
+	setChecked : function(v) {
+		if (v == this.checked) {
+			return;
+		}
+		this.checked = v;
+		this.getCheckbox().checked = this.checked;
+		if (this.checked == true) {
+			this.selectAll();
+		}
+		else {
+			this.clearAll();
+		}
+	}
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/DirectCombo.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/DirectCombo.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/DirectCombo.js	(revision 625)
@@ -0,0 +1,69 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.DirectCombo = Ext.extend(Ext.form.ComboBox, {
+    displayField: 'text',
+    valueField: 'id',
+    triggerAction: 'all',
+    queryAction: 'name',
+    forceSelection: true,
+    mode: 'remote',
+    
+    initComponent: function() {
+        this.store = new Ext.data.DirectStore(Ext.apply({
+            api: this.api,
+            root: '',
+            fields: this.fields || ['text', 'id']
+        }, this.storeConfig));
+        
+        Imgorg.DirectCombo.superclass.initComponent.call(this);
+    }
+});
+
+Imgorg.TagCombo = Ext.extend(Imgorg.DirectCombo,{
+    forceSelection: false,
+    storeConfig: {
+        id: 'tag-store'
+    },
+    initComponent: function() {
+        Ext.apply(this.storeConfig, {
+            directFn: Imgorg.ss.Tags.load
+        });
+        Imgorg.TagCombo.superclass.initComponent.call(this);
+    }
+});
+Ext.reg('img-tagcombo', Imgorg.TagCombo);
+
+Imgorg.TagMultiCombo = Ext.extend(Ext.ux.MultiCombo,{
+    listClass: 'label-combo',
+    displayField: 'text',
+    valueField: 'id',
+    
+    initComponent: function() {
+        this.store = new Ext.data.DirectStore(Ext.apply({
+            directFn: Imgorg.ss.Tags.load,
+            root: '',
+            autoLoad: true,
+            fields: this.fields || ['text', 'id']
+        }, this.storeConfig));
+        this.plugins =new Ext.ux.MultiCombo.Checkable({});
+        Imgorg.DirectCombo.superclass.initComponent.call(this);
+    }
+});
+Ext.reg('img-tagmulticombo', Imgorg.TagMultiCombo);
+
+Imgorg.AlbumCombo = Ext.extend(Imgorg.DirectCombo, {
+    storeConfig: {
+        id: 'album-store'
+    },
+    initComponent: function() {
+        Ext.apply(this.storeConfig, {
+            directFn: Imgorg.ss.Albums.getAllInfo
+        });
+        Imgorg.AlbumCombo.superclass.initComponent.call(this);
+    }
+});
+Ext.reg('img-albumcombo', Imgorg.AlbumCombo);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageDv.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageDv.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageDv.js	(revision 625)
@@ -0,0 +1,116 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.ImageDv = Ext.extend(Ext.DataView,{
+    tpl: new Ext.XTemplate(
+        '<tpl for=".">',
+        '<div class="thumb-wrap" id="{id}">',
+        '<div class="thumb"><img src="images/thumbs/{filename}" class="thumb-img"></div>',
+        '<span class="x-editable">{filename:ellipsis(15)}</span></div>',
+        '</tpl>'
+    ),
+    
+    initComponent: function() {
+        Ext.apply(this, {
+            itemSelector: 'div.thumb-wrap',
+            style: 'overflow:auto',
+            multiSelect: true,
+            overClass: 'x-view-over',
+            emptyText: 'No images to display',
+            plugins: [new Ext.DataView.DragSelector({
+                dragSafe: true
+            }), new Ext.DataView.LabelEditor({
+                allowBlank: false,
+                alignment: 'c-c',
+                dataIndex: 'filename'
+            })],
+            store: new Ext.data.DirectStore({
+                directFn: Imgorg.ss.Images.load,
+                root: '',
+                fields: ['filename', 'url', 'id', 'size']
+            })
+        });
+        
+        this.addEvents('viewitem');
+        Imgorg.ImageDv.superclass.initComponent.call(this);
+        this.on({// hacks to force the labeleditor to stop editing when we get a click elsewhere
+            click: function() {
+                this.plugins[1].completeEdit();
+            },
+            containerclick: function(dv, e) {
+                this.plugins[1].completeEdit();
+            },
+            contextmenu: this.onContextMenu,
+            containercontextmenu: this.onContextMenu,
+            scope: this
+        });
+        this.store.on('update', this.syncRename, this);
+    },
+    
+    afterRender: function() {
+        Imgorg.ImageDv.superclass.afterRender.call(this);
+        this.el.unselectable(); // messy if they can select the text of the file names
+    },
+    
+    onContextMenu: function(e, node) {
+        e.stopEvent();
+        if(!this.contMenu) {
+            this.contMenu = new Ext.menu.Menu({
+                items: [{
+                    text: 'View in Tab(s)',
+                    handler: function() {
+                        this.fireEvent('viewitem', this, node);
+                    },
+                    scope: this
+                },{
+                    text: 'Add to Album',
+                    handler: this.selectAlbum,
+                    scope: this
+                },{
+                    text: 'Tag',
+                    handler: this.tag,
+                    scope: this
+                },{
+                    text: 'Remove',
+                    handler: this.removeImages,
+                    scope: this
+                }]
+            });
+        }
+        this.currentNode = node;
+        this.contMenu.showAt(e.getXY());
+    },
+    
+    selectAlbum: function() {
+        if (!this.albumWin) {
+            this.albumWin = new Imgorg.AlbumWin();
+        }
+        this.albumWin.selectedRecords = this.getSelectedRecords();
+        this.albumWin.show(this.currentNode);
+    },
+    
+    tag: function() {
+        Imgorg.TagWin.selectedRecords = this.getSelectedRecords();
+        Imgorg.TagWin.show(this.currentNode);
+    },
+    
+    syncRename: function(store, rec, op) {
+        if (op == 'edit') {
+            Imgorg.ss.Images.rename({image: rec.data.id, name: rec.data.filename, url: rec.data.url});
+        }
+    },
+    
+    removeImages: function() {
+        var recs = this.getSelectedRecords();
+        var imageIds = [];
+        for (var i = 0;i < recs.length;i++) {
+            imageIds.push(recs[i].data.id);
+            this.store.remove(recs[i]);
+        }
+        Imgorg.ss.Images.remove({images: imageIds});
+    }
+});
+Ext.reg('img-dv', Imgorg.ImageDv);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImagePanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImagePanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImagePanel.js	(revision 625)
@@ -0,0 +1,72 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.ImagePanel = Ext.extend(Ext.Panel,{
+    closable: true,
+    border: false,
+    tagTpl: new Ext.XTemplate(
+        '<h3 class="image-prop-header">Tags</h3>',
+        '<tpl for=".">',
+            '<div class="image-prop">{text}</div>',
+        '</tpl>'
+    ),
+    albumTpl: new Ext.XTemplate(
+        '<h3 class="image-prop-header">Album</h3>',
+        '<tpl for=".">',
+            '<div class="image-prop">{text}</div>',
+        '</tpl>'
+    ),
+    infoTpl: new Ext.XTemplate(
+        '<h3 class="image-prop-header">File Info</h3>',
+        '<div class="image-prop">Filename: {FileName}</div>',
+        '<div class="image-prop">Size: {FileSize:fileSize}</div>',
+        '<div class="image-prop">Height: {[values["COMPUTED"].Height]}</div>',
+        '<div class="image-prop">Width: {[values["COMPUTED"].Width]}</div>'
+    ),
+    initComponent: function() {
+        Ext.apply(this,{
+            layout: 'border',
+            items: [{
+                border: false,
+                region: 'center',
+                html: '<div style="text-align:center;"><img src="'+this.url+'"/></div>',
+                autoScroll: true
+            },{
+                border: false,
+                region: 'east',
+                itemId: 'image-properties',
+                width: 250,
+                title: 'Properties',
+                collapsible: true,
+                style: 'border-left: 1px solid #99BBE8'
+            }]
+        });
+        Imgorg.ImagePanel.superclass.initComponent.call(this);
+    },
+    
+    afterRender: function() {
+        Imgorg.ImagePanel.superclass.afterRender.call(this);
+        Imgorg.ss.Images.getInfo({image: this.imageData.id}, this.onGetInfo, this);
+        Imgorg.ss.Albums.getAlbums({image: this.imageData.id}, this.onGetAlbums,this);
+        Imgorg.ss.Tags.getTags({image: this.imageData.id}, this.onGetTags, this);
+    },
+    
+    onGetInfo: function(data, resp) {
+        var prop = this.getComponent('image-properties');
+        this.infoTpl.append(prop.body, data)
+    },
+    
+    onGetTags: function(data, resp) {
+        var prop = this.getComponent('image-properties');
+        this.tagTpl.append(prop.body, data);
+    },
+    
+    onGetAlbums: function(data, resp) {
+        var prop = this.getComponent('image-properties');
+        this.albumTpl.append(prop.body, data);
+    }
+});
+Ext.reg('img-panel',Imgorg.ImagePanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageThumbPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageThumbPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/ImageThumbPanel.js	(revision 625)
@@ -0,0 +1,209 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.ImageThumbPanel = Ext.extend(Ext.Panel, {
+    minWidth: 80,
+    title: 'All Photos',
+    
+    initComponent: function() {
+        this.tfId = 'tag-filter-'+Ext.id();
+        
+        var sliderValue = 0;
+        var p = Ext.state.Manager.getProvider();
+        if (p) {
+            sliderValue = Ext.num(p.get('sliderValue'), 0);
+        }
+        
+        Ext.apply(this,{
+            layout:'fit',
+            cls: 'images-view',
+            items:Ext.apply({
+                xtype: 'img-dv',
+                itemId: 'imgorg-dv'
+            },this.dvConfig||{}),
+            bbar:['Tags:',{
+                xtype: 'img-tagmulticombo',
+                id: this.tfId,
+                listeners: {
+                    select: function(combo, record, idx) {
+                        var vals = combo.getValue();
+                        this.tagFilter(vals);
+                        return true;
+                    },
+                    clearall: function(combo) {
+                        this.clearFilter();
+                    },
+                    scope: this
+                }
+            },'->',{
+                xtype: 'slider',
+                itemId: 'size-slider',
+                width: 200,
+                style: 'margin-right:20px;',
+                value: sliderValue,
+                plugins: new Ext.ux.SliderTip({
+                    getText: function(slider){
+                        return String.format('<b>{0}%</b>', 100+slider.getValue()*3);
+                    }
+                }),
+                listeners: {
+                    change: this.onChange,
+                    scope: this
+                }
+            }]
+        });
+        Imgorg.ImageThumbPanel.superclass.initComponent.call(this);
+        this.on('activate', this.onActivate, this);
+    },
+    
+    afterRender: function() {
+        Imgorg.ImageThumbPanel.superclass.afterRender.call(this);
+        this.view = this.getComponent('imgorg-dv');
+        (function() {
+            this.dragZone = new ImageDragZone(this.view, {
+                containerScroll:true,
+                ddGroup: 'organizerDD'
+            });
+        }).defer(100, this);
+    },
+    
+    onActivate: function() {
+        this.reload();
+        var p = Ext.state.Manager.getProvider();
+        if (p) {
+            sliderValue = Ext.num(p.get('sliderValue'), 0);
+            var slider = this.getBottomToolbar().getComponent('size-slider');
+            slider.setValue(sliderValue);
+            this.onChange(slider);
+        }
+    },
+    
+    onChange: function(slider, e) {
+        var p = Ext.state.Manager.getProvider();
+        if (p) {
+            p.set('sliderValue', slider.getValue());
+        }
+        Ext.util.CSS.updateRule('.images-view .thumb img','height',this.minWidth+slider.getValue()*3);
+    },
+    
+    tagFilter: function(vals) {
+        if (this.view.store.lastOptions.params) {
+            var album = this.view.store.lastOptions.params.album;
+        }
+        
+        this.view.store.load({
+            params: {
+                tags: vals,
+                album: album
+            }
+        });
+    },
+    
+    clearFilter: function() {
+        var album = this.view.store.lastOptions.params.album;
+        this.view.store.load({
+            params: {
+                album: album
+            }
+        });
+        Ext.getCmp(this.tfId).reset();
+    },
+    
+    albumFilter: function(album) {
+        this.getComponent('imgorg-dv').store.load({
+            params: {
+                album: album.id
+            }
+        });
+    },
+    
+    reload: function() {
+        this.view.store.reload();
+    }
+});
+Ext.reg('img-thumbpanel', Imgorg.ImageThumbPanel);
+
+
+ImageDragZone = function(view, config){
+    this.view = view;
+    ImageDragZone.superclass.constructor.call(this, view.getEl(), config);
+};
+Ext.extend(ImageDragZone, Ext.dd.DragZone, {
+    // We don't want to register our image elements, so let's 
+    // override the default registry lookup to fetch the image 
+    // from the event instead
+    getDragData : function(e){
+        var target = e.getTarget('.thumb-wrap');
+        if(target){
+            var view = this.view;
+            if(!view.isSelected(target)){
+                view.onClick(e);
+            }
+            var selNodes = view.getSelectedNodes();
+            var dragData = {
+                nodes: selNodes
+            };
+            if(selNodes.length == 1){
+                dragData.ddel = target;
+                dragData.single = true;
+            }else{
+                var div = document.createElement('div'); // create the multi element drag "ghost"
+                div.className = 'multi-proxy';
+                for(var i = 0, len = selNodes.length; i < len; i++){
+                    div.appendChild(selNodes[i].firstChild.firstChild.cloneNode(true)); // image nodes only
+                    if((i+1) % 3 == 0){
+                        div.appendChild(document.createElement('br'));
+                    }
+                }
+                var count = document.createElement('div'); // selected image count
+                count.innerHTML = i + ' images selected';
+                div.appendChild(count);
+                
+                dragData.ddel = div;
+                dragData.multi = true;
+            }
+            return dragData;
+        }
+        return false;
+    },
+
+    // this method is called by the TreeDropZone after a node drop
+    // to get the new tree node (there are also other way, but this is easiest)
+    getTreeNode : function(){
+        var treeNodes = [];
+        var nodeData = this.view.getRecords(this.dragData.nodes);
+        for(var i = 0, len = nodeData.length; i < len; i++){
+            var data = nodeData[i].data;
+            treeNodes.push(new Ext.tree.TreeNode({
+                text: data.name,
+                icon: '../view/'+data.url,
+                data: data,
+                leaf:true,
+                cls: 'image-node'
+            }));
+        }
+        return treeNodes;
+    },
+    
+    // the default action is to "highlight" after a bad drop
+    // but since an image can't be highlighted, let's frame it 
+    afterRepair:function(){
+        for(var i = 0, len = this.dragData.nodes.length; i < len; i++){
+            Ext.fly(this.dragData.nodes[i]).frame('#8db2e3', 1);
+        }
+        this.dragging = false;    
+    },
+    
+    // override the default repairXY with one offset for the margins and padding
+    getRepairXY : function(e){
+        if(!this.dragData.multi){
+            var xy = Ext.Element.fly(this.dragData.ddel).getXY();
+            xy[0]+=3;xy[1]+=3;
+            return xy;
+        }
+        return false;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/MultiCombo.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/MultiCombo.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/MultiCombo.js	(revision 625)
@@ -0,0 +1,919 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux');
+
+/**
+ * Ext.ux.MultiCombo
+ */
+Ext.ux.MultiCombo = Ext.extend(Ext.form.ComboBox, {
+
+	/**
+	 * @cfg {String} overClass [x-grid3-row-over]
+	 */
+	overClass : 'x-grid3-row-over',
+	/**
+	 * @cfg {Boolean} enableKeyEvents for typeAhead
+	 */
+	enableKeyEvents: true,
+	/**
+	 * @cfg {String} selectedClass [x-grid3-row-selected]
+	 */
+	selectedClass: 'x-grid3-row-selected',
+	/**
+	 * @cfg {String} highlightClass The css class applied to rows which are hovered with mouse
+	 * selected via key-nav, or highlighted when a text-query matches a single item.
+	 */
+	highlightClass: 'x-grid3-row-over',
+	/**
+	 * @cfg {Number} autoSelectKey [44] COMMA Sets the key used to auto-select an auto-suggest
+	 * highlighted query.  When pressed, the highlighted text-item will be selected as if the user
+	 * selected the row with a mouse click.
+	 */
+	autoSelectKey : 44,
+	/**
+	 * @cfg {String} allSelectedText Text to display when all items are selected
+	 */
+	allSelectedText : 'All selected',
+	/**
+	 * @cfg {Number} maxDisplayRows The maximum number of rows to show before applying vscroll
+	 */
+	maxDisplayRows: null,
+
+	mode: 'local',
+	triggerAction: 'all',
+	typeAhead: true,
+
+	// private
+	highlightIndex : null,
+	highlightIndexPrev : null,
+
+	query : null,
+
+
+	/**
+	 * @cfg {Array} value CheckboxCombo expresses its value as an array.
+	 */
+	value: [],
+
+	/**
+	 * @cfg {Integer} minChars [0]
+	 */
+	minChars: 0,
+
+	initComponent : function() {
+		var cls = 'x-combo-list';
+
+		// when blurring out of field, ensure that rawValue contains ONLY items contained in Store.
+		this.on('blur', this.validateSelections.createDelegate(this));
+
+		// create an auto-select key handler, like *nix-based console [tab] key behaviour
+		this.on('keypress', function(field, ev) {
+			if (ev.getKey() == this.autoSelectKey) {	// COMMA
+				this.onAutoSelect();
+			}
+		},this);
+
+		this.addEvents(
+			/**
+			 * @event initview Fires when Combo#initView is called.
+			 * gives plugins a chance to interact with DataView
+			 * @author Chris Scott
+			 * @param {Combo} this
+			 * @param {DataView} dv
+			 */
+			'initview',
+            'clearall'
+		);
+
+		// when list expands, constrain the height with @cfg maxDisplayRows
+		if (this.maxDisplayRows) {
+			this.on('expand', function(){
+				var cnt = this.store.getCount();
+				if (cnt > this.maxDisplayRows) {
+					var children = this.view.getNodes();
+					var h = 0;
+					for (var n = 0; n < this.maxDisplayRows; n++) {
+						h += Ext.fly(children[n]).getHeight();
+					}
+					this.maxHeight = h;
+				}
+			}, this, {
+				single: true
+			});
+		}
+
+		this.on('beforequery', this.onQuery, this);
+
+		// Enforce that plugins is an Array.
+		if (typeof(this.plugins) == 'undefined'){
+			this.plugins = [];
+		}
+		else if (!Ext.isArray(this.plugins)) {
+			this.plugins = [this.plugins];
+		}
+
+		var tmp = this.value;	// for case where transform is set.
+		Ext.ux.MultiCombo.superclass.initComponent.call(this);
+		if (this.transform) {
+			if (typeof(tmp) == 'undefined') {
+				tmp = [];
+			}
+			this.setValue(tmp);
+		}
+	},
+
+	// private
+    onViewClick : function(dv, index, node, ev){
+		var rec = this.store.getAt(index);
+		this.onSelect(rec, index);
+		this.el.focus();
+		/*
+        if(doFocus !== false){
+            this.el.focus();
+        }
+        */
+    },
+
+	// onTriggerClick, overrides Ext.form.ComboBox#onTriggerClick
+	onTriggerClick: function() {
+		if (this.highlightIndex != -1) {
+			this.clearHighlight();
+		}
+		this.highlightIndex = -1;
+
+		if(this.disabled){
+            return;
+        }
+		if(this.isExpanded()){
+            this.collapse();
+            this.el.focus();
+        }else {
+            this.onFocus({});
+			if(this.triggerAction == 'all') {
+				this.doQuery(this.getRawValue(), true);
+				var vlen = this.getValue().length, slen = this.view.getSelectedRecords().length;
+				if (vlen != slen || vlen == 0) {
+					this.selectByValue(this.value, true);
+				}
+            } else {
+                this.expand();
+				this.doQuery(this.getRawValue());
+            }
+
+			this.highlightIndex = -1
+			this.highlightIndexPrev = null;
+			this.selectNext();
+			this.scrollIntoView();
+            this.el.focus();
+        }
+	},
+
+	// onQuery, beforequery listener, @return false
+	onQuery : function(qe) {
+		q = qe.query;
+        forceAll = qe.forceAll;
+        if(forceAll === true || (q.length >= this.minChars)){
+            if(this.lastQuery !== q){
+				if (typeof(this.lastQuery) != 'undefined') {
+					if (q.match(new RegExp('^'+this.allSelectedText))) {
+						this.query = this.store.data;
+					}
+					else if (this.lastQuery.length > q.length) {
+						var items = q.replace(/\s+/g, '').split(',');
+						if (items[items.length-1].length == 0) {
+							items.pop();
+						}
+						this.query = this.store.data.filterBy(this.store.createFilterFn(this.displayField, new RegExp('^'+items.join('$|^')+'$', "i"), false, false));
+					}
+					else {
+						this.query = null;
+					}
+				}
+                this.lastQuery = q;
+                if(this.mode == 'local'){
+					var raw = this.getRawValue();
+					if (raw == this.allSelectedText) {
+
+					}
+					var items = raw.replace(/\s+/g, '').split(',');
+					var last = items.pop();
+					this.matches = this.store.data.filterBy(this.store.createFilterFn(this.displayField, new RegExp('^'+last, "i"), false, false)).filterBy(this.createTypeAheadFilterFn(items));
+					if (this.matches.getCount() == 0) {
+						this.clearHighlight();
+					}
+					if (q.length == 0) {
+						this.view.clearSelections();
+						this.updateValue([]);
+					}
+
+                    this.onLoad();
+                } else {
+                    this.store.baseParams[this.queryParam] = q;
+                    this.store.load({
+                        params: this.getParams(q)
+                    });
+                    this.expand();
+                }
+            }else{
+                this.selectedIndex = -1;
+                this.onLoad();
+            }
+        }
+
+		return false;
+	},
+
+	// onLoad, overrides Ext.form.ComboBox#onLoad
+	onLoad : function(){
+
+        if(!this.hasFocus){
+            return;
+        }
+        if(this.store.getCount() > 0){
+            if (!this.isExpanded()) {
+				this.expand();
+				this.restrictHeight();
+			}
+            if(this.lastQuery == this.allQuery){
+                if(this.editable){
+                    this.el.dom.select();
+                }
+            }else{
+				if (this.query != null) {
+					var values = [], indexes = [];
+					this.query.each(function(r){
+						values.push(r.data[this.valueField]);
+						indexes.push(this.store.indexOf(r));
+					}, this);
+					this.view.clearSelections();
+					this.updateValue(values, this.getRawValue());
+					this.view.select(indexes);
+				}
+				if (this.matches != null) {
+					if (this.matches.getCount() == 1) {
+						this.highlight(this.store.indexOf(this.matches.first()));
+						this.scrollIntoView();
+					}
+				}
+				else {
+					// @HACK: If store was configured with a proxy, set its mode to local now that its populated with data.
+					// Re-execute the query now.
+					this.mode = 'local';
+					this.lastQuery = undefined;
+					this.doQuery(this.getRawValue(), true);
+				}
+                if(this.typeAhead && this.lastKey != Ext.EventObject.DOWN && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){
+					this.taTask.delay(this.typeAheadDelay);
+                }
+            }
+        }else{
+            this.onEmptyResults();
+        }
+    },
+
+	onSelect : function(record, index) {
+		if (index == -1) {
+			throw new Error('MultiCombo#onSelect did not receive a valid index');
+		}
+
+		// select only when user clicks [apply] button
+		if (this.selectOnApply == true) {
+			return;
+		}
+
+		if (this.fireEvent('beforeselect', this, record, index) !== false) {
+			var text = [];
+			var value = [];
+			var rs = this.view.getSelectedRecords();
+			for (var n = 0, len = rs.length; n < len; n++) {
+				text.push(rs[n].data[this.displayField]);
+				value.push(rs[n].data[this.valueField]);
+			}
+			this.updateValue(value, (value.length != this.store.getCount()) ? text.join(', ') : this.allSelectedText);
+			var node = this.view.getNode(index);
+			this.innerList.scrollChildIntoView(node, false);
+			this.fireEvent('select', this, record, index);
+		}
+	},
+
+	// private
+    onViewOver : function(ev, node){
+		var t = ev.getTarget(this.view.itemSelector);
+		if (t == null) {
+			return;
+		}
+		this.highlightIndex = this.store.indexOf(this.view.getRecord(t));
+		this.clearHighlight();
+		this.highlight(this.highlightIndex);
+        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
+            return;null
+        }
+        return;
+    },
+
+	// private
+    onTypeAhead : function(){
+		if(this.store.getCount() > 0){
+			this.inKeyMode = false;
+            var raw = this.getRawValue();
+			var pos = this.getCaretPosition(raw);
+			var items = [];
+			var query = '';
+			if (pos !== false && pos < raw.length) {
+				items = raw.substr(0, pos).replace(/\s+/g, '').split(',');
+				query = items.pop();
+			} else {
+				items = raw.replace(/\s+/g, '').split(',');
+				query = items.pop();
+			}
+			var rs = this.store.data.filterBy(this.store.createFilterFn(this.displayField, new RegExp(query, "i"), false, false)).filterBy(this.createTypeAheadFilterFn(items));
+
+			if (rs.getCount() == 1) {
+				var r = rs.first();
+				var rindex = this.store.indexOf(r)
+				if (!this.view.isSelected(rindex)) {
+		            this.typeAheadSelected = true;
+					var selStart = raw.length;
+					var len = items.join(',').length;
+					var selEnd = null;
+					var newValue = r.data[this.displayField];
+					if (pos !== false && pos < raw.length) {
+						var insertIdx = items.length;
+						var selStart = pos;
+						items = raw.replace(/\s+/g, '').split(',');
+						items.splice(insertIdx, 1, newValue);
+						selEnd = items.slice(0, insertIdx+1).join(', ').length;
+						this.highlight(rindex);
+						this.scrollIntoView();
+
+					}
+					else {
+						items.push(newValue);
+					}
+					var len = items.join(',').length;
+		            if(selStart != len){
+						var lastWord = raw.split(',').pop();
+						if (items.length >1 && lastWord.match(/^\s+/) == null) {
+							selStart++;
+						}
+						this.setRawValue(items.join(', '));
+		                this.selectText(selStart, (selEnd!=null) ? selEnd : this.getRawValue().length);
+		            }
+				}
+			}
+        }
+    },
+
+	apply : function() {
+		var selected = 	this.view.getSelectedRecords();
+		var value = [];
+		for (var n=0,len=selected.length;n<len;n++) {
+			value.push(selected[n].data[this.valueField]);
+		}
+		this.setValue(value);
+	},
+
+	getCaretPosition : function(raw) {
+		raw = raw || this.getRawValue();
+		if(document.selection) {	// <-- IE, ugh:  http://parentnode.org/javascript/working-with-the-cursor-position/
+        	var range = document.selection.createRange();
+			//Save the current value. We will need this value later to find out, where the text has been changed
+			var orig = obj.value.replace(/rn/g, "n");
+			// replace the text
+			range.text = text;
+			// Now get the new content and save it into a temporary variable
+			var actual = tmp = obj.value.replace(/rn/g, "n");
+			/* Find the first occurance, where the original differs
+			   from the actual content. This could be the startposition
+			   of our text selection, but it has not to be. Think of the
+			   selection "ab" and replacing it with "ac". The first
+			   difference would be the "c", while the start position
+			   is the "a"
+			*/
+			for(var diff = 0; diff < orig.length; diff++) {
+			    if(orig.charAt(diff) != actual.charAt(diff)) break;
+			}
+
+			/* To get the real start position, we iterate through
+			   the string searching for the whole replacement
+			   text - "abc", as long as the first difference is not
+			   reached. If you do not understand that logic - no
+			   blame to you, just copy & paste it ;)
+			*/
+			for(var index = 0, start = 0; tmp.match(text) && (tmp = tmp.replace(text, "")) && index <= diff; index = start + text.length) {
+			    start = actual.indexOf(text, index);
+			}
+	    } else if(this.el.dom.selectionStart) {	// <-- Go the Gecko way
+			return this.el.dom.selectionStart;
+	    } else {
+	        // Fallback for any other browser
+			return false;
+	    }
+	},
+
+	onAutoSelect : function() {
+		if (!this.isExpanded()) {
+			var vlen = this.getValue().length, slen = this.view.getSelectedRecords().length;
+			if (vlen != slen || vlen == 0) {
+				this.selectByValue(this.value, true);
+			}
+		}
+		var raw = this.getRawValue();
+		this.selectText(raw.length, raw.length);
+
+		var pos = this.getCaretPosition(raw);
+		var word = '';
+		if (pos !== false && pos < raw.length) {
+			word = Ext.util.Format.trim(raw.substr(0, pos).split(',').pop());
+		} else {
+			word = Ext.util.Format.trim(raw.split(',').pop());
+		}
+		var idx = this.store.find(this.displayField, word);
+		if (idx > -1 && !this.view.isSelected(idx)) {
+			var rec = this.store.getAt(idx);
+			this.select(idx);
+		}
+	},
+	// filters-out already-selected items from type-ahead queries.
+	// e.g.: if store contains: "betty, barney, bart" and betty is already selected,
+	// when user types "b", only "bart" and "barney" should be returned as possible matches,
+	// since betty is *already* selected
+	createTypeAheadFilterFn : function(items) {
+		var key = this.displayField;
+		return function(rec) {
+			var re = new RegExp(rec.data[key], "i");
+			var add = true;
+			for (var n=0,len=items.length;n<len;n++) {
+				if (re.test(items[n])) {
+					add = false;
+					break;
+				}
+			}
+			return add;
+		}
+	},
+
+	updateValue : function(value, text) {
+		this.value = value;
+		if(this.hiddenField){
+			this.hiddenField.value = value.join(',');
+		}
+		if (typeof(text) == 'string') {
+			this.setRawValue(text);
+		}
+
+	},
+
+	/**
+	 * setValue
+	 * Accepts a comma-separated list of ids or an array.  if given a string, will conver to Array.
+	 * @param {Array, String} v
+	 */
+	setValue : function(v) {
+		var text = [];
+		var value = [];
+
+		if (typeof(v) == 'string') {	// <-- "1,2,3"
+			value = v.match(/\d+/g); // <-- strip multiple spaces and split on ","
+            if(value){
+			    for (var n=0,len=value.length;n<len;n++) {
+				    value[n] = parseInt(value[n]);
+			    }
+            }
+		}
+		else if (Ext.isArray(v)) {			// <-- [1,2,3]
+			value = v;
+		}
+		if (value && value.length) {
+			if (this.mode == 'local') {
+				this.updateValue(value);
+				this.setRawValue(this.getTextValue());
+			}
+			else {
+				this.updateValue(value);
+				this.store.load({
+					callback: function() {
+						this.setRawValue(this.getTextValue());
+					},
+					scope: this
+				});
+				this.mode = 'local';
+			}
+		}
+	},
+
+	getTextValue : function() {
+		if (this.value.length == this.store.getCount()) {
+			return this.allSelectedText;
+		}
+		else {
+			var text = [];
+			this.store.data.filterBy(this.store.createFilterFn(this.valueField, new RegExp(this.value.join('|'), "i"), false, false)).each(function(r){
+				text.push(r.data[this.displayField]);
+			}, this);
+			return text.join(', ');
+		}
+	},
+
+	/**
+     * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {Number} index The zero-based index of the list item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     */
+    select : function(index, scrollIntoView){
+		if (!typeof(index) == 'number') {
+			throw new Error('MultiCombo#select expected @param {Number} index but got: ' + typeof(index));
+		}
+        this.view.isSelected(index) ? this.view.deselect(index, true) : this.view.select(index, true);
+		this.onSelect(this.store.getAt(index), index);
+
+		this.matches = null;
+        if(scrollIntoView !== false){
+            var el = this.view.getNode(index);
+            if(el){
+                this.innerList.scrollChildIntoView(el, false);
+            }
+        }
+
+    },
+
+	getLastValue : function() {
+		return Ext.util.Format.trim(this.getRawValue().split(',').pop());
+	},
+
+	/**
+     * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {String} value The data value of the item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     * @return {Boolean} True if the value matched an item in the list, else false
+     */
+    selectByValue : function(v, scrollIntoView){
+		if (v.length) {
+			var indexes = [];
+			var rs = this.store.data.filterBy(this.store.createFilterFn(this.valueField, new RegExp(v.join('|'), "i"))).each(function(r){
+				indexes.push(this.store.indexOf(r));
+			}, this);
+			if (indexes.length) {
+				this.view.select(indexes);
+				return true;
+			}
+		}
+		else {
+			this.view.clearSelections();
+			this.setRawValue('');
+			return false;
+		}
+    },
+
+	// private
+    initEvents : function(){
+        Ext.form.ComboBox.superclass.initEvents.call(this);
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up" : function(e){
+				this.lastKey = Ext.EventObject.UP;
+                this.inKeyMode = true;
+                this.selectPrev();
+				this.scrollIntoView();
+            },
+
+            "down" : function(e){
+                this.inKeyMode = true;
+				if(!this.isExpanded()){
+					this.lastKey = Ext.EventObject.DOWN;
+                    this.onTriggerClick();
+                }else{
+                    this.selectNext();
+					this.scrollIntoView();
+                }
+
+            },
+
+            "enter" : function(e){
+				var idx = this.highlightIndex;
+				if (this.inKeyMode === true) {
+					if (this.plugins.length && (idx <= -1)) {
+						if (this.plugins[idx + 1]) {
+							this.plugins[idx + 1].onEnter(this);
+						}
+					}
+					else
+						if (this.plugins.length && this.highlightIndex == 0 && this.highlightIndexPrev == -1) {
+							if (this.plugins[idx]) {
+								this.plugins[idx].onEnter(this);
+							}
+						}
+						else {
+							var idx = this.getHighlightedIndex() || 0;
+							if (this.highlightIndex != null && idx != null) {
+								this.select(idx, true);
+								//this.delayedCheck = true;
+								//this.unsetDelayCheck.defer(10, this);
+
+							}
+						}
+				}
+				else {
+					var v = this.getLastValue();
+					var raw = this.getRawValue();
+
+					/** this block should be moved to method getCurrentWord
+					 *
+					 */
+					var pos = this.getCaretPosition(raw);
+					var word = '';
+					if (pos !== false && pos < raw.length) {
+						word = Ext.util.Format.trim(raw.substr(0, pos).split(',').pop());
+					} else {
+						word = Ext.util.Format.trim(raw.split(',').pop());
+					}
+					/*******************************************************/
+
+					var idx = this.store.find(this.displayField, word);
+					if (idx != -1) {
+						var rec = this.store.getAt(idx);
+						this.select(idx, true);
+					}
+					raw = this.getRawValue();
+					this.selectText(raw.length, raw.length);
+					this.collapse();
+				}
+            },
+
+            "esc" : function(e){
+                this.collapse();
+            },
+
+            "tab" : function(e){
+				if (this.matches != null && this.matches.getCount() == 1) {
+					var idx = this.store.indexOf(this.matches.first());
+					if (!this.view.isSelected(idx)) {
+						this.select(this.store.indexOf(this.matches.first()), true);
+					}
+				}
+				else if (this.value.length == 0 && this.getRawValue().length > 0) {
+					this.setRawValue('');
+				}
+				this.collapse();
+                return true;
+            },
+
+            scope : this,
+
+            doRelay : function(foo, bar, hname){
+                if(hname == 'down' || this.scope.isExpanded()){
+                   return Ext.KeyNav.prototype.doRelay.apply(this, arguments);
+                }
+                return true;
+            },
+
+            forceKeyDown : true
+        });
+        this.queryDelay = Math.max(this.queryDelay || 10,
+                this.mode == 'local' ? 10 : 250);
+        this.dqTask = new Ext.util.DelayedTask(this.initQuery, this);
+        if(this.typeAhead){
+            this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this);
+        }
+        if(this.editable !== false){
+            this.el.on("keyup", this.onKeyUp, this);
+        }
+        if(this.forceSelection){
+            this.on('blur', this.doForce, this);
+        }
+    },
+
+	// private, blur-handler to ensure that rawValue contains only values from selections, in the same order as selected
+	validateSelections : function(field) {
+		var v = this.getValue();
+		var text = [];
+		for (var i=0,len=v.length;i<len;i++) {
+			var idx = this.store.find(this.valueField, v[i]);
+			if (idx >=0) {
+				text.push(this.store.getAt(idx).data[this.displayField]);
+			}
+		}
+		this.setRawValue(text.join(', '));
+	},
+
+	scrollIntoView : function() {
+		var el = this.getHighlightedNode();
+		if (el) {
+			this.innerList.scrollChildIntoView(el);
+		}
+	},
+
+	// private
+    selectNext : function(){
+		this.clearHighlight();
+		if (this.highlightIndex == null) {
+			this.highlightIndex = -1;
+		}
+		if (this.highlightIndex <= -1 && this.highlightIndexPrev != -1) {
+			if (this.plugins.length > 0) {
+				var idx = Math.abs(this.highlightIndex)-1;
+				if (this.plugins.length >= Math.abs(this.highlightIndex)) {
+					this.plugins[idx].selectNext(this);
+					this.highlightIndexPrev = this.highlightIndex;
+					this.highlightIndex++;
+					return false;
+				}
+			}
+		}
+		if (this.highlightIndexPrev == -1 && this.highlightIndex == 0) {
+			this.highlightIndex = -1;
+		}
+		var ct = this.store.getCount();
+		if(ct > 0){
+            if (this.highlightIndex == -1 || this.highlightIndex+1 < ct) {
+				if (this.highlightIndex == -1) {
+					this.highlightIndexPrev = 0;
+				}
+				else {
+					this.highlightIndexPrev = this.highlightIndex -1;
+				}
+				this.highlight(++this.highlightIndex);
+
+			}
+			else {
+				this.highlight(ct-1);
+			}
+        }
+    },
+
+    // private
+    selectPrev : function(){
+		this.clearHighlight();
+		if (this.highlightIndex <= 0) {
+			var idx = Math.abs(this.highlightIndex);
+			if (this.plugins.length >= idx+1 && this.highlightIndexPrev >= 0) {
+				this.clearHighlight();
+				this.plugins[idx].selectPrev(this);
+				this.highlightIndexPrev = this.highlightIndex;
+				this.highlightIndex--;
+				if (this.highlightIndex == -1) {
+					this.highlightIndexPrev = -1;
+				}
+				return false;
+			}
+			else {
+				this.highlightIndex = -1;
+				this.highlightIndexPrev = -1;
+				this.collapse();
+				return;
+			}
+		}
+
+		this.highlightIndexPrev = this.highlightIndex;
+        var ct = this.store.getCount();
+        if(ct > 0){
+			if (this.highlighIndex == -1) {
+				this.highlightIndex = 0;
+			}
+			else if (this.highlightIndex != 0) {
+				this.highlightIndex--;
+			}
+			else if (this.highlightIndex == 0) {
+				this.collapse();
+			}
+			this.highlight(this.highlightIndex);
+        }
+    },
+
+	collapse : function() {
+		if (this.isExpanded()) {
+			this.highlightIndex = null;
+			this.highlightIndexPrev = null;
+		}
+		Ext.ux.MultiCombo.superclass.collapse.call(this);
+	},
+
+	highlight : function(index) {
+		this.view.el.select('.'+this.highlightClass).removeClass(this.highlightClass);
+		var node = Ext.fly(this.view.getNode(index));
+		if (node) {
+			node.addClass(this.highlightClass);
+		}
+	},
+
+	getHighlightedIndex : function() {
+		var node = this.view.el.child('.' + this.highlightClass, true);
+		return (node) ? this.store.indexOf(this.view.getRecord(node)) : this.highlightIndex;
+	},
+	getHighlightedNode : function() {
+		return this.view.el.child('.'+this.highlightClass, true);
+	},
+
+	clearHighlight : function() {
+		if (typeof(this.view) != 'object') { return false; }
+		var el = this.view.el.select('.'+this.highlightClass);
+		if (el) {
+			el.removeClass(this.highlightClass);
+		}
+	},
+
+    // private
+    initList : function(){
+        if(!this.list){
+            var cls = 'x-combo-list';
+
+            this.list = new Ext.Layer({
+                shadow: this.shadow, cls: [cls, this.listClass].join(' '), constrain:false
+            });
+
+            var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth);
+            this.list.setWidth(lw);
+            this.list.swallowEvent('mousewheel');
+            this.assetHeight = 0;
+            if(this.syncFont !== false){
+                this.list.setStyle('font-size', this.el.getStyle('font-size'));
+            }
+            if(this.title){
+                this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
+                this.assetHeight += this.header.getHeight();
+            }
+
+            this.innerList = this.list.createChild({cls:cls+'-inner'});
+            this.innerList.on('mouseover', this.onViewOver, this);
+            this.innerList.on('mousemove', this.onViewMove, this);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+
+            if(this.pageSize){
+                this.footer = this.list.createChild({cls:cls+'-ft'});
+                this.pageTb = new Ext.PagingToolbar({
+                    store:this.store,
+                    pageSize: this.pageSize,
+                    renderTo:this.footer
+                });
+                this.assetHeight += this.footer.getHeight();
+            }
+
+            if(!this.tpl){
+                /**
+                * @cfg {String/Ext.XTemplate} tpl The template string, or {@link Ext.XTemplate}
+                * instance to use to display each item in the dropdown list. Use
+                * this to create custom UI layouts for items in the list.
+                * <p>
+                * If you wish to preserve the default visual look of list items, add the CSS
+                * class name <pre>x-combo-list-item</pre> to the template's container element.
+                * <p>
+                * <b>The template must contain one or more substitution parameters using field
+                * names from the Combo's</b> {@link #store Store}. An example of a custom template
+                * would be adding an <pre>ext:qtip</pre> attribute which might display other fields
+                * from the Store.
+                * <p>
+                * The dropdown list is displayed in a DataView. See {@link Ext.DataView} for details.
+                */
+                this.tpl = '<tpl for="."><div class="'+cls+'-item">{' + this.displayField + '}</div></tpl>';
+                /**
+                 * @cfg {String} itemSelector
+                 * <b>This setting is required if a custom XTemplate has been specified in {@link #tpl}
+                 * which assigns a class other than <pre>'x-combo-list-item'</pre> to dropdown list items</b>.
+                 * A simple CSS selector (e.g. div.some-class or span:first-child) that will be
+                 * used to determine what nodes the DataView which handles the dropdown display will
+                 * be working with.
+                 */
+            }
+
+            /**
+            * The {@link Ext.DataView DataView} used to display the ComboBox's options.
+            * @type Ext.DataView
+            */
+            this.view = new Ext.DataView({
+                applyTo: this.innerList,
+                tpl: this.tpl,
+				simpleSelect: true,
+                multiSelect: true,
+				overClass: this.overClass,
+                selectedClass: this.selectedClass,
+                itemSelector: this.itemSelector || '.' + cls + '-item'
+            });
+            this.view.on('click', this.onViewClick, this);
+			this.fireEvent('initview', this, this.view);
+            this.bindStore(this.store, true);
+
+            if(this.resizable){
+                this.resizer = new Ext.Resizable(this.list,  {
+                   pinned:true, handles:'se'
+                });
+                this.resizer.on('resize', function(r, w, h){
+                    this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight;
+                    this.listWidth = w;
+                    this.innerList.setWidth(w - this.list.getFrameWidth('lr'));
+                    this.restrictHeight();
+                }, this);
+                this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px');
+            }
+        }
+    }
+});
+
+
+Ext.reg('multicombo', Ext.ux.MultiCombo);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/TagWin.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/TagWin.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/TagWin.js	(revision 625)
@@ -0,0 +1,71 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.TagWindow = Ext.extend(Ext.Window, {
+    title: 'Choose Tag',
+    layout: 'fit',
+    closeAction: 'hide',
+    width: 300,
+    modal: true,
+    
+    initComponent: function() {
+        Ext.apply(this, {
+            items: [{
+                autoHeight: true,
+                xtype: 'form',
+                id: 'tag-select',
+                bodyStyle: 'padding:15px',
+                labelWidth: 50,
+                items: [{
+                    anchor: '95%',
+                    fieldLabel: 'Tag',
+                    xtype: 'img-tagcombo',
+                    name: 'tag',
+                    allowBlank: false
+                }]
+            }],
+            buttons: [{
+                text: 'Tag Images',
+                handler: this.tagImages,
+                scope: this
+            },{
+                text: 'Cancel',
+                handler: function() {
+                    this.hide();
+                },
+                scope: this
+            }]
+        });
+        Imgorg.TagWindow.superclass.initComponent.call(this);
+    },
+    
+        
+    tagImages: function() {
+        var af = this.getComponent('tag-select').getForm();
+        if (af.isValid()) {
+            if (this.selectedRecords) {
+                var imageIds = [];
+                for (var i = 0; i < this.selectedRecords.length; i++) {
+                    var r = this.selectedRecords[i];
+                    imageIds.push(r.data.dbid || r.data.id);
+                }
+                var fld = af.findField('tag');
+                var tag = fld.getRawValue();
+                var idx = fld.store.find('text', tag);
+                if (idx != -1) {
+                    rec = fld.store.getAt(idx);
+                    tag = rec.data.id;
+                }
+                Imgorg.ss.Images.tagImage({
+                    images: imageIds,
+                    tag: tag
+                });
+            }
+            this.hide();
+        }
+    }
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/UploadQueue.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/UploadQueue.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/imgorg/UploadQueue.js	(revision 625)
@@ -0,0 +1,173 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Imgorg.UploadQueue = Ext.extend(Ext.Panel,{
+    swfu: '',
+    autoRemove: false,
+    uploaded: false,
+    
+    initComponent: function() {
+        Ext.apply(this,{
+            layout: 'fit',
+            autoScroll: true,
+            items: [{
+                xtype: 'dataview',
+                id: 'img-uploaddv',
+                autoWidth: true,
+                tpl: new Ext.XTemplate(
+                    '<tpl for=".">',
+                        '<div class="upload-file" id="{id}">',
+                            '<div class="upload-name">{name}</div>',
+                            '<div id="{id}-pb" class="upload-pb"></div>',
+                            '<div class="x-clear"></div>',
+                            '<div class="upload-info">{size:fileSize}</div>',
+                        '</div>',
+                    '</tpl>'
+                ),
+                store: new Ext.data.JsonStore({
+                    root: '',
+                    id: 'id',
+                    fields: [
+                        {name: 'creationdate', type: 'date'},
+                        {name: 'modificationdate', type: 'date'},
+                        'filestatus','id','index','name','size','type','dbid'
+                    ]
+                }),
+                itemSelector: 'div.upload-file',
+                selectedClass: 'upload-file-selected',
+                singleSelect: true
+            }],
+            tbar:[{
+                text: 'Start Upload',
+                handler: this.startUpload,
+                scope: this,
+                iconCls: 'start-upload'
+            },{
+                text: 'Clear',
+                handler: this.cancelUpload,
+                scope: this,
+                iconCls: 'cancel'
+            },'-',{
+                text: 'Add to Album',
+                handler: this.addAllAlbum,
+                scope: this,
+                iconCls: 'album-add'
+            },{
+                text: 'Tag',
+                handler: this.tagAll,
+                scope: this,
+                iconCls: 'tag'
+            },
+            '->',{
+                xtype: 'checkbox',
+                checked: this.autoRemove,
+                listeners: {
+                    check: function(cb, checked) {
+                        this.autoRemove = checked;
+                    },
+                    scope: this
+                }
+            },'Auto-Remove Uploaded']
+        });
+        Imgorg.UploadQueue.superclass.initComponent.call(this);
+        
+        this.progressBars = {};
+        
+        Ext.ux.SwfuMgr.on('filequeued', this.addFile, this);
+        Ext.ux.SwfuMgr.on('uploadprogress', this.updateProgress, this);
+        Ext.ux.SwfuMgr.on('uploadsuccess', this.uploadSuccess, this);
+    },
+    
+    getDv: function() {
+        if (!this.imgUplDv) {
+            this.imgUplDv = this.getComponent('img-uploaddv');
+        }
+        return this.imgUplDv;
+    },
+    
+    startUpload: function() {
+        this.swfu.startUpload();
+    },
+    
+    cancelUpload: function() {
+        this.swfu.cancelUpload();
+        for (var pb in this.progressBars) {
+            this.progressBars[pb].destroy();
+        }
+        this.getDv().store.removeAll();
+        this.uploaded = false;
+    },
+    
+    addFile: function(swfu, file) {
+        this.getDv().store.loadData([file], true);
+    },
+    
+    addAllAlbum: function(btn) {
+        if (!this.uploaded) {
+            Ext.Msg.alert('Warning', 'You must upload files before you can add them to an Album');
+            return;
+        }
+        var dv = this.getDv();
+        var recs = dv.getRecords(dv.getNodes());
+        if (!this.albumWin) {
+            this.albumWin = new Imgorg.AlbumWin();
+        }
+        this.albumWin.selectedRecords = recs;
+        this.albumWin.show(btn.btnEl.dom);
+    },
+    
+    tagAll: function(btn) {
+        if (!this.uploaded) {
+            Ext.Msg.alert('Warning', 'You must upload files before you can Tag them');
+            return;
+        }
+        var dv = this.getDv();
+        var recs = dv.getRecords(dv.getNodes());
+        Imgorg.TagWin.selectedRecords = recs;
+        Imgorg.TagWin.show(btn.btnEl.dom);
+    },
+    
+    updateProgress: function(swfu, file, complete, total) {
+        if (this.progressBars[file.id]) {
+            this.progressBars[file.id].updateProgress(file.percentUploaded/100,Math.round(file.percentUploaded)+'% Completed... '+Ext.util.Format.fileSize(file.currentSpeed)+'s');
+        } else {
+            this.progressBars[file.id] = new Ext.ProgressBar({
+                text:'0% Completed...',
+                renderTo: file.id+'-pb'
+            });
+        }
+    },
+    
+    uploadSuccess: function(swfu, file, data) {
+        var store = this.getDv().store;
+        var rec = store.getById(file.id);
+        if (this.progressBars[file.id]) {
+            this.progressBars[file.id].updateProgress(1, '100% Completed...');
+        }
+        if (this.autoRemove) {
+            store.remove(rec);
+        }
+        var data = Ext.decode(Ext.util.Format.stripTags(data));
+        rec.data.dbid = data.result.res.id;
+        this.uploaded = true;
+    }
+});
+Ext.reg('img-uploadqueue', Imgorg.UploadQueue);
+
+Ext.ux.SwfuManager = Ext.extend(Ext.util.Observable, {
+    constructor: function(config) {
+        Ext.ux.SwfuManager.superclass.constructor.call(this, config);
+        this.addEvents(
+            'filequeued',
+            'uploadstart',
+            'uploadprogress',
+            'uploaderror',
+            'uploadsuccess'
+        );
+    }
+});
+
+Ext.ux.SwfuMgr = new Ext.ux.SwfuManager();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/index.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/index.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/index.html	(revision 625)
@@ -0,0 +1,42 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>ExtJS Image Organizer - utilizing Ext.Direct</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- Extra's & Plugins -->
+    <script type="text/javascript" src="../ux/DataView-more.js"></script>
+    <script type="text/javascript" src="../ux/SliderTip.js"></script>
+    <script type="text/javascript" src="imgorg/MultiCombo.js"></script>
+    <script type="text/javascript" src="imgorg/Checkable.js"></script>
+
+    <!-- SWFUpload -->
+    <script type="text/javascript" src="SWFUpload/swfupload.js"></script>
+    <script type="text/javascript" src="SWFUpload/plugins/swfupload.swfobject.js"></script>
+    <script type="text/javascript" src="SWFUpload/plugins/swfupload.queue.js"></script>
+    <script type="text/javascript" src="SWFUpload/plugins/swfupload.speed.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="img-org.css" />
+    <script type="text/javascript" src="imgorg/App.js"></script>
+    <script type="text/javascript" src="imgorg/ImageDv.js"></script>
+    <script type="text/javascript" src="imgorg/AlbumTree.js"></script>
+    <script type="text/javascript" src="imgorg/ImageThumbPanel.js"></script>
+    <script type="text/javascript" src="imgorg/ImagePanel.js"></script>
+    <script type="text/javascript" src="imgorg/DirectCombo.js"></script>
+    <script type="text/javascript" src="imgorg/AlbumWin.js"></script>
+    <script type="text/javascript" src="imgorg/TagWin.js"></script>
+    <script type="text/javascript" src="imgorg/UploadQueue.js"></script>
+    <script type="text/javascript" src="imgorg/AlbumsPanel.js"></script>
+    <script type="text/javascript" src="php/api.php"></script>
+
+</head>
+<body>
+    <div id="btnContainer">
+        <span id="btnUploadHolder"></span>
+    </div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/api.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/api.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/api.php	(revision 625)
@@ -0,0 +1,32 @@
+<?php
+require('config.php');
+header('Content-Type: text/javascript');
+
+// convert API config to Ext.Direct spec
+$actions = array();
+foreach($API as $aname=>&$a){
+	$methods = array();
+	foreach($a['methods'] as $mname=>&$m){
+		$md = array(
+			'name'=>$mname,
+			'len'=>$m['len']
+		);
+		if(isset($m['formHandler'])){
+			$md['formHandler'] = true;
+		}
+		$methods[] = $md;
+	}
+	$actions[$aname] = $methods;
+}
+
+$cfg = array(
+    'url'=>'php/router.php',
+    'type'=>'remoting',
+	'actions'=>$actions,
+    'namespace'=>'Imgorg.ss'
+);
+
+echo 'Imgorg.REMOTING_API = ';
+
+echo json_encode($cfg);
+echo ';';
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Albums.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Albums.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Albums.php	(revision 625)
@@ -0,0 +1,72 @@
+<?php
+class Albums {
+    function loadtree(){
+        $db = new SQLiteDatabase("sql/imgorg.db");
+
+        $res = $db->query('select * from Albums');
+        $json = array();
+        while ($o = $res->fetchObject()) {
+            $o->leaf = true;
+            array_push($json,$o);
+        }
+        return $json;
+    }
+
+    function addOrUpdate($data){
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $q = $db->query('SELECT * FROM Albums where id = "'.$data->id.'"');
+        if (sizeof($q) == 0) {
+            $res = $db->query('INSERT INTO Albums (text) VALUES ("'.$data->text.'")');
+        } else {
+            $res = $db->query('UPDATE Albums SET text ="'.$data->text.'" WHERE id = "'.$data->id.'"');
+        }
+        return array(success => true);
+    }
+
+    function remove($data) {
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $q = $db->queryExec('DELETE FROM Albums where id ="'.$data->album.'"');
+        return array(success=>true, album => $data->album);
+    }
+
+    function load($data){
+        // use $query for type-ahead
+        $query = $data->query;
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $qryStr = 'SELECT * FROM Albums';
+        if ($query) {
+            $qryStr .= ' where text like "'.$query.'%"';
+        }
+        $q = $db->query($qryStr);
+        return $q->fetchAll();
+    }
+
+    function getAlbums($data) {
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $image = $data->image;
+
+        $q = $db->query('SELECT a.text as text, a.id as id FROM Albums a INNER JOIN Images i ON a.id = i.album_id WHERE i.id = "'.$image.'"');
+        return $q->fetchAll();
+    }
+
+    function getAllInfo($data) {
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $res = $db->query('select * from Albums');
+        $json = array();
+        while ($o = $res->fetchObject()) {
+            $q = $db->query('SELECT * FROM Images WHERE album_id = "'.$o->id.'"');
+            $qres = $q->fetchObject();
+            if ($qres) {
+                $path = $qres->url;
+                $filename = '../'.$path;
+                if (file_exists($filename)) {
+                    $o->exif = exif_read_data($filename);
+                }
+                $o->filename = $qres->filename;
+            }
+            $o->size = sizeof($q->fetchAll());
+            array_push($json,$o);
+        }
+        return $json;
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Images.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Images.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Images.php	(revision 625)
@@ -0,0 +1,104 @@
+<?php
+class Images {
+    function load($data){
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        $tags = $data->tags;
+        $album = $data->album;
+        $qry = 'select i.filename as filename, i.url as url, i.id as id from Images i';
+        $where = array();
+        if ($tags) {
+            for ($i = 0;$i < sizeof($tags);$i++) {
+                $qry .= ' INNER JOIN Images_Tags it'.$i.' ON i.id = it'.$i.'.image_id';
+                array_push($where,' it'.$i.'.tag_id = "'.$tags[$i].'"');
+            }
+        }
+        if ($album) {
+            $qry .= ' INNER JOIN Albums a ON i.album_id = a.id';
+            array_push($where, ' a.id ="'.$album.'"');
+        }
+        if ($where) {
+            $qry .= ' WHERE'.join(" AND", $where);
+        }
+        $res = $db->query($qry);
+        return $res->fetchAll();
+//        return $qry;
+    }
+
+    function upload($data, $files){
+        $name = $files["Filedata"]["name"];
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        $db->queryExec('INSERT INTO Images (filename, url) VALUES("'.$name.'","images/'.$name.'")');
+        $q = $db->query('SELECT * FROM Images WHERE filename = "'.$name.'"');
+        move_uploaded_file($files["Filedata"]["tmp_name"],"../images/".$name);
+
+        return array(
+            'data' => $files["Filedata"],
+            'res'  => $q->fetchObject()
+            //,
+            //'test' => $phm->getImageQuality()
+            );
+    }
+
+    function addToAlbum($data) {
+        $images = $data->images;
+        $album = $data->album;
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        for ($i = 0;$i < sizeof($images);$i++) {
+//            $db->queryExec('INSERT INTO Albums_Images (image_id, album_id) VALUES ("'.$images[$i].'","'.$album.'")');
+            $db->queryExec('UPDATE Images SET album_id = "'.$album.'" WHERE id ="'.$images[$i].'"');
+        }
+        return array('success' => true, 'images' => $images, 'album' => $album);
+    }
+
+    function tagImage($data) {
+        $images = $data->images;
+        $tag = $data->tag;
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        // if it is a known tag the id is sent, otherwise a new string is, so we need to insert
+        if (!is_numeric($tag)) {
+            $db->queryExec('INSERT INTO Tags (text) VALUES ("'.$tag.'")');
+            $q = $db->query('SELECT id FROM Tags WHERE text = "'.$tag.'"');
+            $tag = $q->fetchObject()->id;
+        }
+        for ($i = 0;$i < sizeof($images);$i++) {
+            $db->queryExec('INSERT INTO Images_Tags (image_id, tag_id) VALUES ("'.$images[$i].'","'.$tag.'")');
+        }
+        return array('success' => true, 'images' => $images, 'tag' => $tag);
+    }
+
+    function rename($data) {
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        $image = $data->image;
+        $name = $data->name;
+        $url = $data->url;
+        $urls = split('/',$url);
+        array_pop($urls);
+        $newUrl = (join('/',$urls)).'/'.$name;
+
+        $db->queryExec('UPDATE Images SET url = "'.$newUrl.'", filename = "'.$name.'" WHERE id = "'.$image.'"');
+        rename('../'.$url, '../'.$newUrl);
+
+        return array('image' => $image, 'name' => $name, 'url' => $newUrl);
+    }
+
+    function remove($data) {
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        $images = $data->images;
+        for ($i = 0;$i < sizeof($images);$i++) {
+            $res = $db->query('SELECT url FROM Images where id ="'.$images[$i].'"');
+            $url = $res->fetchObject()->url;
+            unlink('../'.$url);
+            $db->queryExec('DELETE FROM Images WHERE id ="'.$images[$i].'"');
+            $db->queryExec('DELETE FROM Images_Tags WHERE image_id ="'.$images[$i].'"');
+        }
+    }
+
+    function getInfo($data) {
+        $db = new SQLiteDatabase("sql/imgorg.db");
+        $image = $data->image;
+        $q = $db->query('SELECT url FROM Images WHERE id = "'.$image.'"');
+        $path = $q->fetchObject()->url;
+        $ret = exif_read_data('../'.$path);
+        return $ret;
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Tags.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Tags.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/classes/Tags.php	(revision 625)
@@ -0,0 +1,23 @@
+<?php
+class Tags {
+    function load($data){
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        // use $query for type-ahead
+        $query = $data->query;
+
+        $qryStr = 'SELECT * FROM Tags';
+        if ($query) {
+            $qryStr .= ' where text like "'.$query.'%"';
+        }
+        $q = $db->query($qryStr);
+        return $q->fetchAll();
+    }
+
+    function getTags($data) {
+        $db = new SQLiteDatabase('sql/imgorg.db');
+        $image = $data->image;
+
+        $q = $db->query('SELECT t.text as text, t.id as id FROM Tags t INNER JOIN Images_Tags it ON t.id = it.tag_id WHERE it.image_id = "'.$image.'"');
+        return $q->fetchAll();
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/config.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/config.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/config.php	(revision 625)
@@ -0,0 +1,60 @@
+<?php
+$API = array(
+	'Tags'=>array(
+	    'methods'=>array(
+	        'load'=>array(
+	            'len'=>1
+	        ),
+	        'getTags'=>array(
+	            'len'=>1
+	        )
+	    )
+	),
+    'Albums' => array(
+        'methods' => array(
+            'loadtree' => array(
+                'len' => 1
+            ),
+            'addOrUpdate' => array(
+                'len' => 1
+            ),
+            'remove' => array(
+                'len' => 1
+            ),
+	        'load'=>array(
+	            'len'=>1
+	        ),
+	        'getAlbums'=>array(
+	            'len'=>1
+	        ),
+	        'getAllInfo'=>array(
+	            'len'=>1
+	        )
+        )
+    ),
+    'Images' => array(
+        'methods' => array(
+            'load' => array(
+                'len' => 1
+            ),
+            'upload' => array(
+                'len' => 1
+            ),
+            'addToAlbum' => array(
+                'len' => 1
+            ),
+            'tagImage' => array(
+                'len' => 1
+            ),
+            'rename' => array(
+                'len' => 1
+            ),
+            'remove' => array(
+                'len' => 1
+            ),
+            'getInfo' => array(
+                'len' => 1
+            )
+        )
+    )
+);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/poll.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/poll.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/poll.php	(revision 625)
@@ -0,0 +1,6 @@
+<?php
+echo json_encode(array(
+    'type'=>'event',
+    'name'=>'message',
+    'data'=>'Successfully polled at: '. date('g:i:s a')
+));
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/router.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/router.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/router.php	(revision 625)
@@ -0,0 +1,101 @@
+<?php
+require('config.php');
+
+class BogusAction {
+	public $action;
+	public $method;
+	public $data;
+	public $tid;
+}
+
+$isForm = false;
+$isUpload = false;
+if(isset($HTTP_RAW_POST_DATA)){
+	header('Content-Type: text/javascript');
+	$data = json_decode($HTTP_RAW_POST_DATA);
+}else if(isset($_POST['extAction'])){ // form post
+	$isForm = true;
+	$isUpload = $_POST['extUpload'] == 'true';
+	$data = new BogusAction();
+	$data->action = $_POST['extAction'];
+	$data->method = $_POST['extMethod'];
+    $data->tid = isset($_POST['extTID']) ? $_POST['extTID'] : null; // not set for upload
+	$data->data = array($_POST, $_FILES);
+}else{
+	die('Invalid request.');
+}
+
+function doRpc($cdata){
+    global $API;
+	try {
+		if(!isset($API[$cdata->action])){
+			throw new Exception('Call to undefined action: ' . $cdata->action);
+		}
+
+		$action = $cdata->action;
+		$a = $API[$action];
+
+		doAroundCalls($a['before'], $cdata);
+
+		$method = $cdata->method;
+		$mdef = $a['methods'][$method];
+		if(!$mdef){
+			throw new Exception("Call to undefined method: $method on action $action");
+		}
+		doAroundCalls($mdef['before'], $cdata);
+
+		$r = array(
+			'type'=>'rpc',
+			'tid'=>$cdata->tid,
+			'action'=>$action,
+			'method'=>$method
+		);
+
+		require_once("classes/$action.php");
+		$o = new $action();
+
+		$params = isset($cdata->data) && is_array($cdata->data) ? $cdata->data : array();
+
+		$r['result'] = call_user_func_array(array($o, $method), $params);
+
+		doAroundCalls($mdef['after'], $cdata, $r);
+		doAroundCalls($a['after'], $cdata, $r);
+	}
+	catch(Exception $e){
+		$r['type'] = 'exception';
+		$r['message'] = $e->getMessage();
+		$r['where'] = $e->getTraceAsString();
+	}
+	return $r;
+}
+
+
+function doAroundCalls(&$fns, &$cdata, &$returnData=null){
+	if(!$fns){
+		return;
+	}
+	if(is_array($fns)){
+		foreach($fns as $f){
+			$f($cdata, $returnData);
+		}
+	}else{
+		$fns($cdata, $returnData);
+	}
+}
+
+$response = null;
+if(is_array($data)){
+	$response = array();
+	foreach($data as $d){
+		$response[] = doRpc($d);
+	}
+}else{
+	$response = doRpc($data);
+}
+if($isForm && $isUpload){
+	echo '<html><body><textarea>';
+	echo json_encode($response);
+	echo '</textarea></body></html>';
+}else{
+	echo json_encode($response);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/sql/setup.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/sql/setup.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/sql/setup.php	(revision 625)
@@ -0,0 +1,72 @@
+<?php
+/* The SQLite extension is enabled by default as of PHP 5.
+ * Before that time the SQLite library is needed.
+ *
+ * For more info on setting up SQLite See:
+ * http://www.php.net/manual/en/sqlite.installation.php
+ *
+ */
+    if ($db = new SQLiteDatabase('imgorg.db')) {
+        // Albums
+//        $db->queryExec('DROP TABLE Albums');
+        $db->queryExec('CREATE TABLE Albums (
+            id INTEGER PRIMARY KEY,
+            text STRING,
+            created STRING,
+            description TEXT
+        );
+        INSERT INTO Albums (text) VALUES ("Test");
+        INSERT INTO Albums (text) VALUES ("Album2");');
+
+        // Albums_Images
+//        $db->queryExec('DROP TABLE Albums_Images');
+        $db->queryExec('CREATE TABLE Albums_Images (
+            album_id INTEGER,
+            image_id INTEGER
+        )');
+
+        // Images_Tags
+        $db->queryExec('CREATE TABLE Images_Tags (
+            tag_id INTEGER,
+            image_id INTEGER
+        )');
+
+        // Tags
+//        $db->queryExec('DROP Table Tags');
+        $db->queryExec('CREATE TABLE Tags (
+            id INTEGER PRIMARY KEY,
+            text STRING
+        );
+        INSERT INTO Tags (text) VALUES("Family");
+        INSERT INTO Tags (text) VALUES("Friends");
+        INSERT INTO Tags (text) VALUES("Other")');
+
+        // Images
+//        $db->queryExec('DROP TABLE Images');
+        $db->queryExec('CREATE TABLE Images (
+            id INTEGER PRIMARY KEY,
+            filename STRING,
+            url STRING,
+            album_id INTEGER,
+            description TEXT
+        )');
+
+//        $dir = "../../images/thumbs/";
+//        $images = array();
+//        $d = dir($dir);
+//        $i = 0;
+//        while($name = $d->read()){
+//            if(!preg_match('/\.(jpg|gif|png)$/', $name)) continue;
+//            $size = filesize($dir.$name);
+//            $lastmod = filemtime($dir.$name)*1000;
+//            $db->queryExec('INSERT INTO Images (filename, url) VALUES
+//                ("'.$name.'","images/thumbs/'.$name.'")');
+//        }
+//        $d->close();
+
+
+        echo json_encode($db->query('select * from Images')->fetchAll());
+    } else {
+        die($err);
+    }
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/readme.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/readme.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/readme.txt	(revision 625)
@@ -0,0 +1,20 @@
+-------------------------------------------------------------------------------
+1. This example utilizes SQLite.  You may need to enable these extensions in php.ini:
+
+extension=php_pdo.dll
+extension=php_sqlite.dll
+
+-------------------------------------------------------------------------------
+2. Also make sure these are enabled for exif module:
+
+extension=php_mbstring.dll 
+extension=php_exif.dll
+
+-------------------------------------------------------------------------------
+
+3. Do not forget to restart your webserver if you made changes.
+
+-------------------------------------------------------------------------------
+
+4. A sample database is included, to recreate the database navigate to this file in your browser:
+/examples/image-organizer/php/sql/setup.php
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/index.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/index.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/index.html	(revision 625)
@@ -0,0 +1,283 @@
+<html>
+<head>
+    <title>Ext JS 3.0 Samples</title>
+
+    <style type="text/css">
+    #all-demos {
+
+    }
+    #all-demos dd {
+        float:left;
+        width:300px;
+        height:100px;
+        margin:5px 5px 5px 10px;
+        cursor:pointer;
+        zoom:1;
+    }
+    #all-demos dd img {
+        width:120px;
+        height:90px;
+        margin:5px 0 0 5px;
+        float:left;
+    }
+
+    #all-demos dd div {
+        float:left;
+        width:160px;
+        margin-left:10px;
+    }
+
+    #all-demos dd h4 {
+        font-family:tahoma,arial,san-serif;
+        color:#555;
+        font-size:11px;
+        font-weight:bold;
+    }
+    #all-demos dd p {
+        color:#777;
+    }
+    #all-demos dd.over {
+        background: #F5FDE3 url(shared/extjs/images/sample-over.gif) no-repeat;
+    }
+    #loading-mask{
+        position:absolute;
+        left:0;
+        top:0;
+        width:100%;
+        height:100%;
+        z-index:20000;
+        background-color:white;
+    }
+    #loading{
+        position:absolute;
+        left:45%;
+        top:40%;
+        padding:2px;
+        z-index:20001;
+        height:auto;
+    }
+    #loading a {
+        color:#225588;
+    }
+    #loading .loading-indicator{
+        background:white;
+        color:#444;
+        font:bold 13px tahoma,arial,helvetica;
+        padding:10px;
+        margin:0;
+        height:auto;
+    }
+    #loading-msg {
+        font: normal 10px arial,tahoma,sans-serif;
+    }
+
+    #all-demos .x-panel-body {
+        background-color:#fff;
+        border:1px solid;
+        border-color:#fafafa #fafafa #fafafa #fafafa;
+    }
+    #sample-ct {
+        border:1px solid;
+        border-color:#dadada #ebebeb #ebebeb #dadada;
+        padding:2px;
+    }
+
+    #all-demos h2 {
+        border-bottom: 2px solid #99bbe8;
+        cursor:pointer;
+        padding-top:6px;
+    }
+    #all-demos h2 div {
+        background:transparent url(../resources/images/default/grid/group-expand-sprite.gif) no-repeat 3px -47px;
+        padding:4px 4px 4px 17px;
+        color:#3764a0;
+        font:bold 11px tahoma, arial, helvetica, sans-serif;
+    }
+    #all-demos .collapsed h2 div {
+        background-position: 3px 3px;
+    }
+    #all-demos .collapsed dl {
+        display:none;
+    }
+    .x-window {
+        text-align:left;
+    }
+    #all-demos dd h4 span.new-sample{
+        color: red;
+    }
+
+    #all-demos dd h4 span.updated-sample{
+        color: blue;
+    }
+    </style>
+</head>
+<body>
+<div id="loading-mask" style=""></div>
+<div id="loading">
+    <div class="loading-indicator"><img src="shared/extjs/images/extanim32.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>Ext 3.0 - <a href="http://extjs.com">extjs.com</a><br /><span id="loading-msg">Loading styles and images...</span></div>
+</div>
+
+<div id="viewport">
+
+<div id="hd">
+    <h1><a href="http://extjs.com/" title="Home"><span>Ext</span></a></h1>
+
+    <table cellspacing="0" class="nav main-nav">
+        <tr>
+        <td><a id="home-link" href="http://extjs.com/"><span>Home</span></a></td><td class="active"><a id="products-link" href="http://extjs.com/products"><span>Products</span></a></td><td><a id="support-link" href="http://extjs.com/support"><span>Support</span></a></td><td><a id="jobs-link" href="http://jobs.extjs.com"><span>Jobs</span></a></td><td><a id="company-link" href="http://extjs.com/company"><span>Company</span></a></td><td><a id="blog-link" href="http://extjs.com/blog"><span>Blog</span></a></td><td><a id="store-link" href="http://extjs.com/store"><span>Store</span></a></td>		</tr>
+    </table>
+
+
+    <table cellspacing="0" class="sub-nav">
+        <tr>
+        <td><a href="http://extjs.com/">Home</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td><a href="http://extjs.com/products">Products</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td><a href="http://extjs.com/products/extjs/">Ext JS</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td>3.0 Samples</td></tr>
+    </table>
+</div>
+
+<div id="bd">
+    <div class="left-column">
+        <h3>Ext JS 3.0 Samples</h3>
+        <br/>
+        <div id="sample-spacer" style="height:800px;"></div>
+
+        <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
+        <!--link rel="stylesheet" type="text/css" href="../resources/css/xtheme-gray.css" /-->
+        <link rel="stylesheet" type="text/css" href="shared/extjs/css/extjs.css" />
+
+        <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading Core API...';</script>
+        <script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
+        <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
+        <script type="text/javascript" src="../ext-all.js"></script>
+        <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
+
+        <!-- App.js contains Ext.App, a simple, re-usable Application component -->
+        <script type="text/javascript" src="shared/extjs/App.js"></script>
+        <script type="text/javascript" src="shared/extjs/site.js"></script>
+        <script type="text/javascript" src="data.js"></script>
+        <script type="text/javascript" src="init.js"></script>
+
+        <div id="all-demos">
+        </div>
+
+    </div>
+
+    <div class="right-column" style="padding-top:45px;">
+
+        <div class="side-box"><div class="side-box-inner">
+            <ul id="sample-menu" class="features"></ul>
+        </div></div>
+    </div>
+
+    <div style="clear:both"></div>
+</div><!-- end bd -->
+
+<div id="ft">
+    <table cellspacing="0" class="nav">
+        <tr>
+        <td><a id="home-foot-link" href="http://extjs.com/">Home</a></td><td class="active"><a id="products-foot-link" href="http://extjs.com/products">Products</a></td><td><a id="support-foot-link" href="http://extjs.com/support">Support</a></td><td><a id="jobs-foot-link" href="http://jobs.extjs.com">Jobs</a></td><td><a id="company-foot-link" href="http://extjs.com/company">Company</a></td><td><a id="blog-foot-link" href="http://extjs.com/blog">Blog</a></td><td><a id="store-foot-link" href="http://extjs.com/store">Store</a></td>		</tr>
+
+    </table>
+    <div class="copy">&copy; 2006-2009 Ext, LLC</div>
+</div>
+
+</div><!-- end viewport -->
+
+<div class="flyout-menu" id="products-menu" style="display:none;">
+    <div style="width:200px;">
+    <h3><a href="http://extjs.com/products/extjs">Ext JS</a></h3>
+    <p>Cross-browser JavaScript library for building rich internet applications</p>
+
+    <ul>
+        <li><a href="http://extjs.com/products/extjs">Overview</a></li>
+        <li><a href="http://extjs.com/products/extjs/download.php">Download</a></li>
+        <li><a href="http://extjs.com/deploy/dev/examples/samples.html">Samples &amp; Demos</a></li>
+        <li><a href="http://extjs.com/deploy/dev/docs/">API Documentation</a></li>
+        <li><a href="http://extjs.com/products/license.php">Licensing &amp; Open Source</a></li>
+
+        <li><a href="http://extjs.com/store/extjs/">Purchase</a></li>
+    </ul>
+    <br/>
+    <h3><a href="http://extjs.com/products/gxt">Ext GWT</a></h3>
+    <p>Java library for building rich internet applications with GWT</p>
+    <ul>
+        <li><a href="http://extjs.com/products/gxt">Overview</a></li>
+
+        <li><a href="http://extjs.com/products/gxt/download.php">Download</a></li>
+        <li><a href="http://extjs.com/explorer/" target="_blank">Samples &amp; Demos</a></li>
+        <li><a href="http://extjs.com/products/license.php">Licensing &amp; Open Source</a></li>
+        <li><a href="http://extjs.com/store/gxt/">Purchase</a></li>
+    </ul>
+    <br/>
+    <h3><a href="/products/extcore">Ext Core</a></h3>
+    <p>Cross-browser JavaScript library for enhancing web pages</p>
+    <ul>
+        <li><a href="http://extjs.com/products/extcore">Overview</a></li>
+        <li><a href="http://extjs.com/products/extcore/download.php">Download</a></li>
+        <li><a href="http://extjs.com/products/extcore/manual/">Manual</a></li>
+        <li><a href="http://extjs.com/products/extcore/docs/">API Documentation</a></li>
+    </ul>
+    </div>
+</div>
+
+<div class="flyout-menu" id="support-menu" style="display:none;">
+    <div style="width:200px;">
+
+    <h3><a href="http://extjs.com/support">Support Subscriptions</a></h3>
+    <p>With 1-on-1 email and phone support, we solve your Ext JS, GWT, CSS and JavaScript issues</p>
+    <ul>
+        <li><a href="http://extjs.com/store/extjs/#support-table">Ext JS Subscriptions</a></li>
+        <li><a href="http://extjs.com/store/gxt/#support-table">Ext GWT Subscriptions</a></li>
+    </ul>
+    <br/>
+
+    <h3><a href="http://extjs.com/support/training">Training</a></h3>
+    <p>Get up to speed quickly with on-site training provided by Ext</p>
+    <ul>
+        <li><a href="http://extjs.com/support/training/extjs/">Ext JS Training</a></li>
+        <li><a href="http://extjs.com/support/training/gxt/">Ext GWT Training</a></li>
+    </ul>
+    <br/>
+
+    <h3><a href="http://extjs.com/forum">Community</a></h3>
+    <p>The Ext community forums and wiki</p>
+    <ul>
+        <li><a href="http://extjs.com/forum">Forums</a></li>
+        <li><a href="http://extjs.com/learn">Learning Center</a></li>
+
+    </ul>
+    <br/>
+    <h3><a href="http://extjs.com/forum">Ext Solutions</a></h3>
+    <p>Enterprise consulting and custom development</p>
+    <ul>
+        <li><a href="http://extjs.com/support/services/">Find out more &raquo;</a></li>
+    </ul>
+    </div>
+
+</div>
+
+
+<div class="flyout-menu" id="store-menu" style="display:none;">
+    <div style="width:200px;">
+    <h3><a href="http://extjs.com/store/extjs/">Ext JS</a></h3>
+    <ul>
+        <li><a href="http://extjs.com/store/extjs/">Licenses</a></li>
+        <li><a href="http://extjs.com/store/extjs/#support-table">Support Subscriptions</a></li>
+
+    </ul>
+    <br/>
+    <h3><a href="http://extjs.com/store/gxt/">Ext GWT</a></h3>
+    <ul>
+        <li><a href="http://extjs.com/store/gxt/">Licenses</a></li>
+        <li><a href="http://extjs.com/store/gxt/#support-table">Support Subscriptions</a></li>
+    </ul>
+
+    <br/>
+    <h3><a href="http://extjs.com/store/faq.php">Help</a></h3>
+    <ul>
+        <li><a href="http://extjs.com/store/faq.php">Ordering FAQ</a></li>
+    </ul>
+    </div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/init.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/init.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/init.js	(revision 625)
@@ -0,0 +1,161 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.samples');
+
+(function() {
+
+SamplePanel = Ext.extend(Ext.DataView, {
+    autoHeight   : true,
+    frame        : true,
+    cls          : 'demos',
+    itemSelector : 'dd',
+    overClass    : 'over',
+    tpl          : new Ext.XTemplate(
+        '<div id="sample-ct">',
+            '<tpl for=".">',
+            '<div><a name="{id}"></a><h2><div>{title}</div></h2>',
+            '<dl>',
+                '<tpl for="samples">',
+                    '<dd ext:url="{url}"><img src="shared/screens/{icon}"/>',
+                        '<div><h4>{text}',
+                            '<tpl if="this.isNew(values.status)">',
+                                '<span class="new-sample"> (New)</span>',
+                            '</tpl>',
+                            '<tpl if="this.isUpdated(values.status)">',
+                                '<span class="updated-sample"> (Updated)</span>',
+                            '</tpl>',
+                            '<tpl if="this.isExperimental(values.status)">',
+                                '<span class="new-sample"> (Experimental)</span>',
+                            '</tpl>',
+                        '</h4><p>{desc}</p></div>',
+                    '</dd>',
+                '</tpl>',
+            '<div style="clear:left"></div></dl></div>',
+            '</tpl>',
+        '</div>', {
+         isExperimental: function(status){
+             return status == 'experimental';
+         },
+         isNew: function(status){
+             return status == 'new';
+         },
+         isUpdated: function(status){
+             return status == 'updated';
+         }
+    }),
+
+
+    onClick : function(e){
+        var group = e.getTarget('h2', 3, true);
+        if(group){
+            group.up('div').toggleClass('collapsed');
+        }else {
+            var t = e.getTarget('dd', 5, true);
+            if(t && !e.getTarget('a', 2)){
+                var url = t.getAttributeNS('ext', 'url');
+                window.open(url);
+            }
+        }
+        return SamplePanel.superclass.onClick.apply(this, arguments);
+    }
+});
+Ext.samples.SamplePanel = SamplePanel;
+Ext.reg('samplespanel', Ext.samples.SamplePanel);
+})();
+
+Ext.onReady(function(){
+
+
+// Instantiate Ext.App instance
+    App = new Ext.App({});
+
+    var catalog = Ext.samples.samplesCatalog;
+
+    for(var i = 0, c; c = catalog[i]; i++){
+        c.id = 'sample-' + i;
+    }
+
+    var store = new Ext.data.JsonStore({
+        idProperty : 'id',
+        fields     : ['id', 'title', 'samples'],
+        data       : catalog
+    });
+
+    var panel = new Ext.Panel({
+        frame      : true,
+        renderTo   : 'all-demos',
+        height     : 300,
+        autoScroll : true,
+        items      : new SamplePanel({
+            store : store
+        })
+    });
+
+    var tpl = new Ext.XTemplate(
+        '<tpl for="."><li><a href="#{id}">{title:stripTags}</a></li></tpl>'
+    );
+    tpl.overwrite('sample-menu', catalog);
+
+    Ext.select('#sample-spacer').remove();
+
+    var headerEl  = Ext.get('hd'),
+        footerEl  = Ext.get('ft'),
+        bodyEl    = Ext.get('bd'),
+        sideBoxEl = bodyEl.child('div[class=side-box]'),
+        titleEl   = bodyEl.child('h3:first-child');
+
+    var doResize = function() {
+        var windowHeight = Ext.getDoc().getViewSize().height;
+
+        var footerHeight  = footerEl.getHeight() + footerEl.getMargins().top,
+            titleElHeight = titleEl.getHeight() + titleEl.getMargins().top,
+            brElHeight    = bodyEl.child('br').getHeight(),
+            headerHeight  = headerEl.getHeight() + titleElHeight + brElHeight;
+
+        var warnEl = Ext.get('fb');
+        var warnHeight = warnEl ? warnEl.getHeight() : 0;
+
+        var availHeight = windowHeight - ( footerHeight + headerHeight + 14) - warnHeight;
+        var sideBoxHeight = sideBoxEl.getHeight();
+
+        panel.setHeight((availHeight > sideBoxHeight) ? availHeight : sideBoxHeight);
+    }
+
+    // Resize on demand
+    Ext.EventManager.onWindowResize(doResize);
+
+    var firebugWarning = function () {
+        var cp = new Ext.state.CookieProvider();
+
+        if(window.console && window.console.firebug && ! cp.get('hideFBWarning')){
+            var tpl = new Ext.Template(
+                '<div id="fb" style="border: 1px solid #FF0000; background-color:#FFAAAA; display:none; padding:15px; color:#000000;"><b>Warning: </b> Firebug is known to cause performance issues with Ext JS. <a href="#" id="hideWarning">[ Hide ]</a></div>'
+            );
+            var newEl = tpl.insertFirst('all-demos');
+
+            Ext.fly('hideWarning').on('click', function() {
+                Ext.fly(newEl).slideOut('t',{remove:true});
+                cp.set('hideFBWarning', true);
+                doResize();
+            });
+            Ext.fly(newEl).slideIn();
+            doResize();
+        }
+    }
+
+    var hideMask = function () {
+        Ext.get('loading').remove();
+        Ext.fly('loading-mask').fadeOut({
+            remove:true,
+            callback : firebugWarning
+        });
+    }
+
+    hideMask.defer(250);
+    doResize();
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedGrid.js	(revision 625)
@@ -0,0 +1,162 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedGrid = function(viewer, config) {
+    this.viewer = viewer;
+    Ext.apply(this, config);
+
+    this.store = new Ext.data.Store({
+        proxy: new Ext.data.HttpProxy({
+            url: 'feed-proxy.php'
+        }),
+
+        reader: new Ext.data.XmlReader(
+            {record: 'item'},
+            ['title', 'author', {name:'pubDate', type:'date'}, 'link', 'description', 'content']
+        )
+    });
+    this.store.setDefaultSort('pubDate', "DESC");
+
+    this.columns = [{
+        id: 'title',
+        header: "Title",
+        dataIndex: 'title',
+        sortable:true,
+        width: 420,
+        renderer: this.formatTitle
+      },{
+        header: "Author",
+        dataIndex: 'author',
+        width: 100,
+        hidden: true,
+        sortable:true
+      },{
+        id: 'last',
+        header: "Date",
+        dataIndex: 'pubDate',
+        width: 150,
+        renderer:  this.formatDate,
+        sortable:true
+    }];
+
+    FeedGrid.superclass.constructor.call(this, {
+        region: 'center',
+        id: 'topic-grid',
+        loadMask: {msg:'Loading Feed...'},
+
+        sm: new Ext.grid.RowSelectionModel({
+            singleSelect:true
+        }),
+
+        viewConfig: {
+            forceFit:true,
+            enableRowBody:true,
+            showPreview:true,
+            getRowClass : this.applyRowClass
+        }
+    });
+
+    this.on('rowcontextmenu', this.onContextClick, this);
+};
+
+Ext.extend(FeedGrid, Ext.grid.GridPanel, {
+
+    onContextClick : function(grid, index, e){
+        if(!this.menu){ // create context menu on first right click
+            this.menu = new Ext.menu.Menu({
+                id:'grid-ctx',
+                items: [{
+                    text: 'View in new tab',
+                    iconCls: 'new-tab',
+                    scope:this,
+                    handler: function(){
+                        this.viewer.openTab(this.ctxRecord);
+                    }
+                },{
+                    iconCls: 'new-win',
+                    text: 'Go to Post',
+                    scope:this,
+                    handler: function(){
+                        window.open(this.ctxRecord.data.link);
+                    }
+                },'-',{
+                    iconCls: 'refresh-icon',
+                    text:'Refresh',
+                    scope:this,
+                    handler: function(){
+                        this.ctxRow = null;
+                        this.store.reload();
+                    }
+                }]
+            });
+            this.menu.on('hide', this.onContextHide, this);
+        }
+        e.stopEvent();
+        if(this.ctxRow){
+            Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+            this.ctxRow = null;
+        }
+        this.ctxRow = this.view.getRow(index);
+        this.ctxRecord = this.store.getAt(index);
+        Ext.fly(this.ctxRow).addClass('x-node-ctx');
+        this.menu.showAt(e.getXY());
+    },
+
+    onContextHide : function(){
+        if(this.ctxRow){
+            Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+            this.ctxRow = null;
+        }
+    },
+
+    loadFeed : function(url) {
+        this.store.baseParams = {
+            feed: url
+        };
+        this.store.load();
+    },
+
+    togglePreview : function(show){
+        this.view.showPreview = show;
+        this.view.refresh();
+    },
+
+    // within this function "this" is actually the GridView
+    applyRowClass: function(record, rowIndex, p, ds) {
+        if (this.showPreview) {
+            var xf = Ext.util.Format;
+            p.body = '<p>' + xf.ellipsis(xf.stripTags(record.data.description), 200) + '</p>';
+            return 'x-grid3-row-expanded';
+        }
+        return 'x-grid3-row-collapsed';
+    },
+
+    formatDate : function(date) {
+        if (!date) {
+            return '';
+        }
+        var now = new Date();
+        var d = now.clearTime(true);
+        var notime = date.clearTime(true).getTime();
+        if (notime == d.getTime()) {
+            return 'Today ' + date.dateFormat('g:i a');
+        }
+        d = d.add('d', -6);
+        if (d.getTime() <= notime) {
+            return date.dateFormat('D g:i a');
+        }
+        return date.dateFormat('n/j g:i a');
+    },
+
+    formatTitle: function(value, p, record) {
+        return String.format(
+                '<div class="topic"><b>{0}</b><span class="author">{1}</span></div>',
+                value, record.data.author, record.id, record.data.forumid
+                );
+    }
+});
+
+Ext.reg('appfeedgrid', FeedGrid);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedPanel.js	(revision 625)
@@ -0,0 +1,180 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedPanel = function() {
+    FeedPanel.superclass.constructor.call(this, {
+        id:'feed-tree',
+        region:'west',
+        title:'Feeds',
+        split:true,
+        width: 225,
+        minSize: 175,
+        maxSize: 400,
+        collapsible: true,
+        margins:'0 0 5 5',
+        cmargins:'0 5 5 5',
+        rootVisible:false,
+        lines:false,
+        autoScroll:true,
+        root: new Ext.tree.TreeNode('My Feeds'),
+        collapseFirst:false,
+        tbar: [{
+            iconCls:'add-feed',
+            text:'Add Feed',
+            handler: this.showWindow,
+            scope: this
+        },{
+            id:'delete',
+            iconCls:'delete-icon',
+            text:'Remove',
+            handler: function(){
+                var s = this.getSelectionModel().getSelectedNode();
+                if(s){
+                    this.removeFeed(s.attributes.url);
+                }
+            },
+            scope: this
+        }]
+    });
+
+    this.feeds = this.root.appendChild(
+        new Ext.tree.TreeNode({
+            text:'My Feeds',
+            cls:'feeds-node',
+            expanded:true
+        })
+    );
+
+    this.getSelectionModel().on({
+        'beforeselect' : function(sm, node){
+             return node.isLeaf();
+        },
+        'selectionchange' : function(sm, node){
+            if(node){
+                this.fireEvent('feedselect', node.attributes);
+            }
+            this.getTopToolbar().items.get('delete').setDisabled(!node);
+        },
+        scope:this
+    });
+
+    this.addEvents({feedselect:true});
+
+    this.on('contextmenu', this.onContextMenu, this);
+};
+
+Ext.extend(FeedPanel, Ext.tree.TreePanel, {
+
+    onContextMenu : function(node, e){
+        if(!this.menu){ // create context menu on first right click
+            this.menu = new Ext.menu.Menu({
+                id:'feeds-ctx',
+                items: [{
+                    id:'load',
+                    iconCls:'load-icon',
+                    text:'Load Feed',
+                    scope: this,
+                    handler:function(){
+                        this.ctxNode.select();
+                    }
+                },{
+                    text:'Remove',
+                    iconCls:'delete-icon',
+                    scope: this,
+                    handler:function(){
+                        this.ctxNode.ui.removeClass('x-node-ctx');
+                        this.removeFeed(this.ctxNode.attributes.url);
+                        this.ctxNode = null;
+                    }
+                },'-',{
+                    iconCls:'add-feed',
+                    text:'Add Feed',
+                    handler: this.showWindow,
+                    scope: this
+                }]
+            });
+            this.menu.on('hide', this.onContextHide, this);
+        }
+        if(this.ctxNode){
+            this.ctxNode.ui.removeClass('x-node-ctx');
+            this.ctxNode = null;
+        }
+        if(node.isLeaf()){
+            this.ctxNode = node;
+            this.ctxNode.ui.addClass('x-node-ctx');
+            this.menu.items.get('load').setDisabled(node.isSelected());
+            this.menu.showAt(e.getXY());
+        }
+    },
+
+    onContextHide : function(){
+        if(this.ctxNode){
+            this.ctxNode.ui.removeClass('x-node-ctx');
+            this.ctxNode = null;
+        }
+    },
+
+    showWindow : function(btn){
+        if(!this.win){
+            this.win = new FeedWindow();
+            this.win.on('validfeed', this.addFeed, this);
+        }
+        this.win.show(btn);
+    },
+
+    selectFeed: function(url){
+        this.getNodeById(url).select();
+    },
+
+    removeFeed: function(url){
+        var node = this.getNodeById(url);
+        if(node){
+            node.unselect();
+            Ext.fly(node.ui.elNode).ghost('l', {
+                callback: node.remove, scope: node, duration: .4
+            });
+        }
+    },
+
+    addFeed : function(attrs, inactive, preventAnim){
+        var exists = this.getNodeById(attrs.url);
+        if(exists){
+            if(!inactive){
+                exists.select();
+                exists.ui.highlight();
+            }
+            return;
+        }
+        Ext.apply(attrs, {
+            iconCls: 'feed-icon',
+            leaf:true,
+            cls:'feed',
+            id: attrs.url
+        });
+        var node = new Ext.tree.TreeNode(attrs);
+        this.feeds.appendChild(node);
+        if(!inactive){
+            if(!preventAnim){
+                Ext.fly(node.ui.elNode).slideIn('l', {
+                    callback: node.select, scope: node, duration: .4
+                });
+            }else{
+                node.select();
+            }
+        }
+        return node;
+    },
+
+    // prevent the default context menu when you miss the node
+    afterRender : function(){
+        FeedPanel.superclass.afterRender.call(this);
+        this.el.on('contextmenu', function(e){
+            e.preventDefault();
+        });
+    }
+});
+
+Ext.reg('appfeedpanel', FeedPanel); 
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedViewer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedViewer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedViewer.js	(revision 625)
@@ -0,0 +1,83 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedViewer = {};
+
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));
+
+    var tpl = Ext.Template.from('preview-tpl', {
+        compiled:true,
+        getBody : function(v, all){
+            return Ext.util.Format.stripScripts(v || all.description);
+        }
+    });
+    FeedViewer.getTemplate = function(){
+        return tpl;
+    }
+
+    var feeds = new FeedPanel();
+    var mainPanel = new MainPanel();
+
+    feeds.on('feedselect', function(feed){
+        mainPanel.loadFeed(feed);
+    });
+    
+    var viewport = new Ext.Viewport({
+        layout:'border',
+        items:[
+            new Ext.BoxComponent({ // raw element
+                region:'north',
+                el: 'header',
+                height:32
+            }),
+            feeds,
+            mainPanel
+         ]
+    });
+    
+    // add some default feeds
+    feeds.addFeed({
+        url:'http://feeds.feedburner.com/extblog',
+        text: 'ExtJS.com Blog'
+    }, false, true);
+
+    feeds.addFeed({
+        url:'http://extjs.com/forum/external.php?type=RSS2',
+        text: 'ExtJS.com Forums'
+    }, true);
+
+    feeds.addFeed({
+        url:'http://feeds.feedburner.com/ajaxian',
+        text: 'Ajaxian'
+    }, true);
+    
+    Ext.get('header').on('click', function() {
+        viewport.focus();
+    });
+    
+    feeds.focus();
+});
+
+// This is a custom event handler passed to preview panels so link open in a new windw
+FeedViewer.LinkInterceptor = {
+    render: function(p){
+        p.body.on({
+            'mousedown': function(e, t){ // try to intercept the easy way
+                t.target = '_blank';
+            },
+            'click': function(e, t){ // if they tab + enter a link, need to do it old fashioned way
+                if(String(t.target).toLowerCase() != '_blank'){
+                    e.stopEvent();
+                    window.open(t.href);
+                }
+            },
+            delegate:'a'
+        });
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedWindow.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedWindow.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/FeedWindow.js	(revision 625)
@@ -0,0 +1,128 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+FeedWindow = function() {
+    this.feedUrl = new Ext.form.ComboBox({
+        id: 'feed-url',
+        fieldLabel: 'Enter the URL of the feed to add',
+        emptyText: 'http://example.com/blog/feed',
+        width: 450,
+        validationEvent: false,
+        validateOnBlur: false,
+        msgTarget: 'under',
+        triggerAction: 'all',
+        displayField: 'url',
+        mode: 'local',
+
+        listeners:{
+            valid: this.syncShadow,
+            invalid: this.syncShadow,
+            scope: this
+        },
+        tpl: new Ext.XTemplate(
+                '<tpl for="."><div class="x-combo-list-item">',
+                '<em>{url}</em><strong>{text}</strong>',
+                '<div class="x-clear"></div>',
+                '</div></tpl>'),
+        store: new Ext.data.ArrayStore({
+            fields: ['url', 'text'],
+            data : this.defaultFeeds
+        })
+    });
+
+    this.form = new Ext.FormPanel({
+        labelAlign:'top',
+        items:this.feedUrl,
+        border: false,
+        bodyStyle:'background:transparent;padding:10px;'
+    });
+
+    FeedWindow.superclass.constructor.call(this, {
+        title: 'Add Feed',
+        iconCls: 'feed-icon',
+        id: 'add-feed-win',
+        autoHeight: true,
+        width: 500,
+        resizable: false,
+        plain:true,
+        modal: true,
+        y: 100,
+        autoScroll: true,
+        closeAction: 'hide',
+
+        buttons:[{
+            text: 'Add Feed!',
+            handler: this.onAdd,
+            scope: this
+        },{
+            text: 'Cancel',
+            handler: this.hide.createDelegate(this, [])
+        }],
+
+        items: this.form
+    });
+
+    this.addEvents({add:true});
+}
+
+Ext.extend(FeedWindow, Ext.Window, {
+    defaultFeeds : [
+        ['http://www.divergingpath.com/rss.cfm?mode=full', 'Aaron Conran\'s Blog'],
+        ['http://feeds.yuiblog.com/YahooUserInterfaceBlog',  'Yahoo! UI Blog'],
+        ['http://feeds.feedburner.com/jquery/', 'jQuery Blog'],
+        ['http://sports.yahoo.com/nba/rss.xml', 'NBA News'],
+        ['http://feeds.dzone.com/dzone/frontpage', 'DZone.com']
+    ],
+
+    show : function(){
+        if(this.rendered){
+            this.feedUrl.setValue('');
+        }
+        FeedWindow.superclass.show.apply(this, arguments);
+    },
+
+    onAdd: function() {
+        this.el.mask('Validating Feed...', 'x-mask-loading');
+        var url = this.feedUrl.getValue();
+        Ext.Ajax.request({
+            url: 'feed-proxy.php',
+            params: {feed: url},
+            success: this.validateFeed,
+            failure: this.markInvalid,
+            scope: this,
+            feedUrl: url
+        });
+    },
+
+    markInvalid : function(){
+        this.feedUrl.markInvalid('The URL specified is not a valid RSS2 feed.');
+        this.el.unmask();
+    },
+
+    validateFeed : function(response, options){
+        var dq = Ext.DomQuery;
+        var url = options.feedUrl;
+
+        try{
+            var xml = response.responseXML;
+            var channel = xml.getElementsByTagName('channel')[0];
+            if(channel){
+                var text = dq.selectValue('title', channel, url);
+                var description = dq.selectValue('description', channel, 'No description available.');
+                this.el.unmask();
+                this.hide();
+
+                return this.fireEvent('validfeed', {
+                    url: url,
+                    text: text,
+                    description: description
+                });
+            }
+        }catch(e){
+        }
+        this.markInvalid();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/MainPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/MainPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/MainPanel.js	(revision 625)
@@ -0,0 +1,245 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+MainPanel = function(){
+    this.preview = new Ext.Panel({
+        id: 'preview',
+        region: 'south',
+        cls:'preview',
+        autoScroll: true,
+        listeners: FeedViewer.LinkInterceptor,
+        enableTabbing: true,
+        tbar: [{
+            id:'tab',
+            text: 'View in New Tab',
+            iconCls: 'new-tab',
+            disabled:true,
+            handler : this.openTab,
+            scope: this
+        },
+        '-',
+        {
+            id:'win',
+            text: 'Go to Post',
+            iconCls: 'new-win',
+            disabled:true,
+            scope: this,
+            handler : function(){
+                window.open(this.gsm.getSelected().data.link);
+            }
+        }],
+
+        clear: function(){
+            this.body.update('');
+            var items = this.topToolbar.items;
+            items.get('tab').disable();
+            items.get('win').disable();
+        }
+    });
+
+    this.grid = new FeedGrid(this, {
+        tbar:[{
+            text:'Open All',
+            tooltip: {title:'Open All',text:'Opens all item in tabs'},
+            iconCls: 'tabs',
+            handler: this.openAll,
+            scope:this
+        },
+        '-',
+        {
+            split:true,
+            text:'Reading Pane',
+            tooltip: {title:'Reading Pane',text:'Show, move or hide the Reading Pane'},
+            iconCls: 'preview-bottom',
+            handler: this.movePreview.createDelegate(this, []),
+            menu:{
+                id:'reading-menu',
+                cls:'reading-menu',
+                width:100,
+                items: [{
+                    text:'Bottom',
+                    checked:true,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-bottom'
+                },{
+                    text:'Right',
+                    checked:false,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-right'
+                },{
+                    text:'Hide',
+                    checked:false,
+                    group:'rp-group',
+                    checkHandler:this.movePreview,
+                    scope:this,
+                    iconCls:'preview-hide'
+                }]
+            }
+        },
+        '-',
+        {
+            pressed: true,
+            enableToggle:true,
+            text:'Summary',
+            tooltip: {title:'Post Summary',text:'View a short summary of each item in the list'},
+            iconCls: 'summary',
+            scope:this,
+            toggleHandler: function(btn, pressed){
+                this.grid.togglePreview(pressed);
+            }
+        }]
+    });
+    
+    this.grid.on('afterrender', function() {
+        //var fe = Ext.aria.FocusMgr.getByContainer(this.grid.body);
+        //fe.on('enter', this.openTab, this);
+    }, this);
+
+    MainPanel.superclass.constructor.call(this, {
+        id:'main-tabs',
+        activeTab:0,
+        region:'center',
+        margins:'0 5 5 0',
+        resizeTabs:true,
+        tabWidth:150,
+        minTabWidth: 120,
+        enableTabScroll: true,
+        plugins: new Ext.ux.TabCloseMenu(),
+        items: {
+            id:'main-view',
+            layout:'border',
+            title:'Loading...',
+            hideMode:'offsets',
+            items:[
+                this.grid, {
+                id:'bottom-preview',
+                layout:'fit',
+                items:this.preview,
+                height: 250,
+                split: true,
+                border:false,
+                region:'south'
+            }, {
+                id:'right-preview',
+                layout:'fit',
+                border:false,
+                region:'east',
+                width:350,
+                split: true,
+                hidden:true
+            }]
+        }
+    });
+
+    this.gsm = this.grid.getSelectionModel();
+
+    this.gsm.on('rowselect', function(sm, index, record){
+        FeedViewer.getTemplate().overwrite(this.preview.body, record.data);
+        var items = this.preview.topToolbar.items;
+        items.get('tab').enable();
+        items.get('win').enable();
+    }, this, {buffer:250});
+
+    this.grid.store.on('beforeload', this.preview.clear, this.preview);
+    this.grid.store.on('load', this.gsm.selectFirstRow, this.gsm);
+
+    this.grid.on('rowdblclick', this.openTab, this);
+};
+
+Ext.extend(MainPanel, Ext.TabPanel, {
+
+    loadFeed : function(feed){
+        this.grid.loadFeed(feed.url);
+        Ext.getCmp('main-view').setTitle(feed.text);
+    },
+
+    movePreview : function(m, pressed){
+        if(!m){ // cycle if not a menu item click
+            var readMenu = Ext.menu.MenuMgr.get('reading-menu');
+            readMenu.render();
+            var items = readMenu.items.items;
+            var b = items[0], r = items[1], h = items[2];
+            if(b.checked){
+                r.setChecked(true);
+            }else if(r.checked){
+                h.setChecked(true);
+            }else if(h.checked){
+                b.setChecked(true);
+            }
+            return;
+        }
+        if(pressed){
+            var preview = this.preview;
+            var right = Ext.getCmp('right-preview');
+            var bot = Ext.getCmp('bottom-preview');
+            var btn = this.grid.getTopToolbar().items.get(2);
+            switch(m.text){
+                case 'Bottom':
+                    right.hide();
+                    bot.add(preview);
+                    bot.show();
+                    bot.ownerCt.doLayout();
+                    btn.setIconClass('preview-bottom');
+                    break;
+                case 'Right':
+                    bot.hide();
+                    right.add(preview);
+                    right.show();
+                    right.ownerCt.doLayout();
+                    btn.setIconClass('preview-right');
+                    break;
+                case 'Hide':
+                    preview.ownerCt.hide();
+                    preview.ownerCt.ownerCt.doLayout();
+                    btn.setIconClass('preview-hide');
+                    break;
+            }
+        }
+    },
+
+    openTab : function(record){
+        record = (record && record.data) ? record : this.gsm.getSelected();
+        var d = record.data;
+        var id = !d.link ? Ext.id() : d.link.replace(/[^A-Z0-9-_]/gi, '');
+        var tab;
+        if(!(tab = this.getItem(id))){
+            tab = new Ext.Panel({
+                id: id,
+                cls:'preview single-preview',
+                title: d.title,
+                tabTip: d.title,
+                html: FeedViewer.getTemplate().apply(d),
+                enableTabbing: true,
+                closable:true,
+                listeners: FeedViewer.LinkInterceptor,
+                autoScroll:true,
+                border:true,
+                tbar: [{
+                    text: 'Go to Post',
+                    iconCls: 'new-win',
+                    handler : function(){
+                        window.open(d.link);
+                    }
+                }]
+            });
+            this.add(tab);
+        }
+        this.setActiveTab(tab);
+        tab.enter();
+    },
+
+    openAll : function(){
+        this.beginUpdate();
+        this.grid.store.data.each(this.openTab, this);
+        this.endUpdate();
+    }
+});
+
+Ext.reg('appmainpanel', MainPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-proxy.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-proxy.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-proxy.php	(revision 625)
@@ -0,0 +1,12 @@
+<?php
+// this is an example server-side proxy to load feeds
+$feed = $_REQUEST['feed'];
+if($feed != '' && strpos($feed, 'http') === 0){
+	header('Content-Type: text/xml');
+	$xml = file_get_contents($feed);
+	$xml = str_replace('<content:encoded>', '<content>', $xml);
+	$xml = str_replace('</content:encoded>', '</content>', $xml);
+	$xml = str_replace('</dc:creator>', '</author>', $xml);
+	echo str_replace('<dc:creator', '<author', $xml);
+	return;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-viewer.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-viewer.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/feed-viewer.css	(revision 625)
@@ -0,0 +1,259 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html, body {
+	font: normal 12px tahoma, arial, verdana, sans-serif;
+	margin: 0;
+	padding: 0;
+	border: 0 none;
+	overflow: hidden;
+	height: 100%;
+}
+
+.ext-el-mask {
+    background:#dadadb;
+}
+.x-grid3-td-title b {
+    font-family:tahoma, verdana;
+    display:block;
+    color:#333;
+}
+.x-grid3-td-title b i {
+    font-weight:normal;
+    font-style: normal;
+    color:#000;
+}
+.x-grid3-td-title .topic {
+    padding-left:20px;
+    background:transparent url(images/post.gif) no-repeat 0 2px;
+}
+.x-grid3-td-title .x-grid3-cell-inner {
+    white-space:normal;
+}
+.x-grid3-td-title a {
+    color: #385F95;
+    text-decoration:none;
+}
+.x-grid3-td-title a:hover {
+    text-decoration:underline;
+}
+.details .x-btn-text {
+    background-image: url(images/details.gif);
+}
+.msg-view {
+    background-image: url(../shared/icons/fam/application_view_list.png) !important;
+}
+.add-feed {
+    background-image: url(images/rss_add.gif) !important;
+}
+
+.preview-bottom {
+    background-image: url(images/preview-bottom.gif) !important;
+}
+.preview-right {
+    background-image: url(images/preview-right.gif) !important;
+}
+.preview-hide {
+    background-image: url(images/preview-hide.gif) !important;
+}
+
+.tabs {
+    background-image: url( ../desktop/images/tabs.gif ) !important;
+}
+.summary {
+    background-image: url(images/details.gif) !important;
+}
+.x-grid3-row-body p {
+    margin:5px 20px 10px 25px !important;
+    color:#555;
+}
+
+.post-date {
+    font-weight:bold;
+    color:#333;
+}
+
+.author {
+    color:#333;
+}
+
+.x-tree {
+    background:#fff !important;
+}
+.x-border-layout-ct {
+    background:transparent;
+}
+body.x-border-layout-ct {
+    background:#c3d5ed url(images/bg.gif) repeat-x left top !important;
+}
+.x-layout-split {
+    background-color:transparent !important;
+}
+
+.x-tree-node div.feeds-node{
+    background:#eee url(images/cmp-bg.gif) repeat-x;
+    margin-top:1px;
+    border-top:1px solid #ddd;
+    border-bottom:1px solid #ccc;
+    padding-top:2px;
+    padding-bottom:1px;
+}
+.feeds-node .x-tree-node-icon {
+    display:none;
+}
+.forum-ct a span {
+    font-weight:bold;
+    color:#222;
+}
+.feed {
+    border:1px solid #fff;
+    margin:3px;
+}
+.feed .x-tree-ec-icon {
+    display:none;
+}
+.feed-icon {
+    background-image:url(images/rss.gif) !important;
+}
+.new-tab {
+    background-image:url(images/new_tab.gif) !important;
+}
+.new-win {
+    background-image:url(images/go-to-post.gif) !important;
+}
+.delete-icon {
+    background-image:url(images/rss_delete.gif) !important;
+}
+.load-icon {
+    background-image:url(images/rss_load.gif) !important;
+}
+.refresh-icon {
+    background-image:url(../shared/icons/fam/table_refresh.png) !important;
+}
+.x-tree-selected {
+    border:1px dotted #a3bae9;
+    background:#DFE8F6;
+}
+.x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#15428b;
+    font-weight:bold;
+}
+
+#topic-grid .x-panel-tbar .x-toolbar {
+   /* border-top:0 none; */
+}
+
+
+#main-tabs .x-tab-panel-body {
+    background:transparent;
+    border:0 none;
+}
+
+/* Preview classes */
+
+.preview .x-panel-body {
+    background:#fff;
+    color:#222;
+    font:normal 12px tahoma,verdana,arial,sans-serif;
+}
+
+.preview .x-panel-body p {
+    line-height:18px;
+    margin:8px 0;
+}
+
+.preview .x-panel-body ul {
+    margin-left:18px;
+}
+
+.preview .x-panel-body ul li {
+    display:list-item;
+    list-style-image:none !important;
+    list-style-position:outside !important;
+    list-style-type:disc !important;
+    margin-left:18px;
+}
+
+.preview .x-panel-body pre, #preview .x-panel-body code {
+    background:#f1f1f1;
+    display:block;
+}
+
+.preview .x-panel-body h4.post-author {
+    font-weight:normal;
+    color:#555;
+    font-size:11px;
+}
+.preview .x-panel-body span.post-date {
+    font-weight:normal;
+    color:#555;
+    float:right;
+    font-size:11px;
+}
+.preview .x-panel-body div.post-data {
+    background:#f1f2f4;
+    padding:5px;
+    border-bottom:1px solid #dadadb;
+}
+.preview .x-panel-body div.post-body {
+    padding:10px;
+}
+/*.single-preview .x-toolbar, #right-preview .preview .x-toolbar {
+    border-top:0 none;
+}*/
+.reading-menu .x-menu-item-checked {
+   border:1px dotted #a3bae9 !important;
+    background:#DFE8F6;
+	padding:0;
+}
+.x-tab-panel-header {
+    border-bottom-width:0 !important;
+}
+#suggested {
+    border-top:0 none;
+}
+#suggested a {
+    text-decoration:none;
+    font-size:11px;
+    color:#15428B;
+    display:block;
+    padding:3px;
+    float:right;
+    margin-right:4px;
+}
+#suggested a:hover {
+    text-decoration:underline;
+    color:#15428B;
+}
+.x-combo-list-item {
+    zoom:1;
+}
+.x-combo-list-item strong {
+    color:#777;
+    font-size:11px;
+    font-style: normal;
+    float:left;
+}
+.x-combo-list-item em {
+    color:#222;
+    font-size:12px;
+    font-style: normal;
+    float:left;
+    width:325px;
+}
+.x-node-ctx {
+    background:#eee !important;
+    border:1px solid #ccc !important;
+}
+/*
+.x-panel.x-aria-focused .x-panel-header,
+.x-panel.x-aria-focused .x-panel-bwrap,
+.x-tab-panel.x-aria-focused .x-tab-panel-header,
+.x-tab-panel.x-aria-focused .x-panel-body,
+.x-toolbar.x-aria-focused {
+    border-color: red;
+}*/
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/view.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/view.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/key-feed-viewer/view.html	(revision 625)
@@ -0,0 +1,59 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Feed Viewer 3 (ARIA)</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="feed-viewer.css" />
+
+    <style type="text/css">
+        .x-a11y-focusframe {
+            position: absolute;
+            top: 0;
+            left: 0;
+            z-index: 10000000;
+            width: 0;
+            height: 0;
+            font-size: 0;
+        }
+        .x-a11y-focusframe-side {
+            position: absolute;
+            font-size: 0;
+            overflow: hidden;
+        }
+        .x-a11y-focusable:focus {
+            outline: none
+        }
+        button.x-a11y-focusable::-moz-focus-inner{border:none}
+    </style>
+
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<script type="text/javascript" src="../../ext-all-debug.js"></script>
+    <script type="text/javascript" src="../ux/Focus.js"></script>
+
+    <script type="text/javascript" src="../state/save-state.php"></script>
+    <script type="text/javascript" src="../state/get-state.php"></script>
+    <script type="text/javascript" src="../state/SessionProvider.js"></script>
+    <script type="text/javascript" src="../ux/TabCloseMenu.js"></script>
+    <script type="text/javascript" src="FeedViewer.js"></script>
+    <script type="text/javascript" src="FeedWindow.js"></script>
+    <script type="text/javascript" src="FeedGrid.js"></script>
+    <script type="text/javascript" src="MainPanel.js"></script>
+    <script type="text/javascript" src="FeedPanel.js"></script>
+
+</head>
+<body role="">
+<div id="header"><div style="float:right;margin:5px;" class="x-small-editor"></div></div>
+
+<!-- Template used for Feed Items -->
+<div id="preview-tpl" style="display:none;">
+    <div class="post-data">
+        <span class="post-date">{pubDate:date("M j, Y, g:i a")}</span>
+        <h3 class="post-title">{title}</h3>
+        <h4 class="post-author">by {author:defaultValue("Unknown")}</h4>
+    </div>
+    <div class="post-body">{content:this.getBody}</div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.css	(revision 625)
@@ -0,0 +1,113 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+body {
+    font-family:'lucida grande',tahoma,arial,sans-serif;
+    font-size:11px;
+}
+a {
+    color:#15428B;
+}
+a:link, a:visited {
+    text-decoration: none;
+}
+a:hover {
+    text-decoration: underline;
+}
+#header {
+    background: #7F99BE url(images/layout-browser-hd-bg.gif) repeat-x center;
+}
+#header h1 {
+    font-size: 16px;
+    color: #fff;
+    font-weight: normal;
+    padding: 5px 10px;
+}
+#start-div h2 {
+    font-size: 12px;
+    color: #555;
+    padding-bottom:5px;
+    border-bottom:1px solid #C3D0DF;
+}
+#start-div p {
+    margin: 10px 0;
+}
+#details-panel h2 {
+    padding:10px 10px 0;
+    font-size:12px;
+    color:#15428B;
+}
+#details-panel p {
+    padding:10px 10px 0;
+}
+#details-panel pre {
+    border-top:1px dotted #ddd;
+    border-bottom:1px dotted #ddd;
+    margin-top:10px;
+    padding:0 5px;
+    background:#f5f5f5;
+}
+#details-panel .details-info {
+    margin:15px;
+    padding:15px;
+    border:1px dotted #999;
+    color:#555;
+    background: #f9f9f9;
+}
+.x-tab-panel-header-plain .x-tab-strip-top {
+    background: #DFE8F6 url(../images/default/tabs/tab-strip-bg.gif) repeat-x scroll center bottom !important;
+}
+.custom-accordion .x-panel-body {
+    font-family:georgia,serif;
+    padding:20px 80px !important;
+    background:#ffe;
+    font-size:18px;
+    text-align:center;
+    color:#15428B;
+}
+.custom-accordion .x-panel-header-text {
+    font-weight:bold;
+    font-style:italic;
+    color:#555;
+}
+#form-panel .x-panel-footer {
+    background:#DFE8F6;
+    border-color:#99BBE8;
+    border-style:none solid solid;
+    border-width:0pt 1px 1px;
+}
+#table-panel .x-table-layout {
+    padding:5px;
+}
+#table-panel .x-table-layout td {
+    vertical-align:top;
+    padding:5px;
+    font-size: 11px;
+}
+.icon-send {
+    background-image:url(images/email_go.png) !important;
+}
+.icon-save {
+    background-image:url(images/disk.png) !important;
+}
+.icon-print {
+    background-image:url(images/printer.png) !important;
+}
+.icon-spell {
+    background-image:url(images/spellcheck.png) !important;
+}
+.icon-attach {
+    background-image:url(images/page_attach.png) !important;
+}
+.email-form .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top:1px solid #C2D6EF;
+    border-left:1px solid #C2D6EF;
+    border-bottom:1px solid #99BBE8;
+    margin:-5px -4px 0;
+}
+.inner-tab-custom .x-border-layout-ct {
+    background: #fff;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.html	(revision 625)
@@ -0,0 +1,426 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>ExtJS Layout Examples</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/CenterLayout.css" />
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="layout-browser.css">
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/CenterLayout.js"></script>
+    <script type="text/javascript" src="../ux/RowLayout.js"></script>
+
+    <!-- page specific -->
+    <script type="text/javascript" src="layouts/basic.js"></script>
+    <script type="text/javascript" src="layouts/custom.js"></script>
+    <script type="text/javascript" src="layouts/combination.js"></script>
+    <script type="text/javascript" src="layout-browser.js"></script>
+
+</head>
+<body>
+    <div id="header"><h1>Ext Layout Browser</h1></div>
+    <div style="display:none;">
+
+        <!-- Start page content -->
+        <div id="start-div">
+            <div style="float:left;" ><img src="images/layout-icon.gif" /></div>
+            <div style="margin-left:100px;">
+                <h2>Welcome!</h2>
+                <p>There are many sample layouts to choose from that should give you a good head start in building your own
+                application layout.  Just like the combination examples, you can mix and match most layouts as
+                needed, so don't be afraid to experiment!</p>
+                <p>Select a layout from the tree to the left to begin.</p>
+            </div>
+        </div>
+
+        <!-- Basic layouts -->
+        <div id="absolute-details">
+            <h2>Ext.layout.AbsoluteLayout</h2>
+            <p>This is a simple layout style that allows you to position items within a container using
+            CSS-style absolute positioning via XY coordinates.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout: 'absolute',
+items:[{
+    title: 'Panel 1',
+    x: 50,
+    y: 50,
+    html: 'Positioned at x:50, y:50'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.AbsoluteLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="accordion-details">
+            <h2>Ext.layout.Accordion</h2>
+            <p>Displays one panel at a time in a stacked layout.  No special config properties are required other
+            than the layout &mdash; all panels added to the container will be converted to accordion panels.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout: 'accordion',
+items:[{
+    title: 'Panel 1',
+    html: 'Content'
+},{
+    title: 'Panel 2',
+    id: 'panel2',
+    html: 'Content'
+}]
+            </code></pre>
+            <p>You can easily customize individual accordion panels by adding styles scoped to the panel by class or id.
+            For example, to style the panel with id 'panel2' above you could add rules like this:</p>
+            <pre><code>
+#panel2 .x-panel-body {
+    background:#ffe;
+    color:#15428B;
+}
+#panel2 .x-panel-header-text {
+    color:#555;
+}
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.Accordion" target="_blank">API Reference</a></p>
+        </div>
+        <div id="anchor-details">
+            <h2>Ext.layout.AnchorLayout</h2>
+            <p>Provides anchoring of contained items to the container's edges.  This type of layout is most commonly
+            seen within FormPanels (or any container with a FormLayout) where fields are sized relative to the
+            container without hard-coding their dimensions.</p>
+            <p>In this example, panels are anchored for example purposes so that you can easily see the effect.
+            If you resize the browser window, the anchored panels will automatically resize to maintain the
+            same relative dimensions.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout: 'anchor',
+items: [{
+    title: 'Panel 1',
+    height: 100,
+    anchor: '50%'
+},{
+    title: 'Panel 2',
+    height: 100,
+    anchor: '-100'
+},{
+    title: 'Panel 3',
+    anchor: '-10, -262'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.AnchorLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="border-details">
+            <h2>Ext.layout.BorderLayout</h2>
+            <p>This Layout Browser page is already a border layout, and this example shows a separate border layout
+            nested within a region of the page's border layout.  Border layouts can be nested with just about any
+            level of complexity that you might need.</p>
+            <p>Every border layout <b>must</b> at least have a center region.  All other regions are optional.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'border',
+defaults: {
+    collapsible: true,
+    split: true,
+    bodyStyle: 'padding:15px'
+},
+items: [{
+    title: 'Footer',
+    region: 'south',
+    height: 150,
+    minSize: 75,
+    maxSize: 250,
+    cmargins: '5 0 0 0'
+},{
+    title: 'Navigation',
+    region:'west',
+    margins: '5 0 0 0',
+    cmargins: '5 5 0 0',
+    width: 175,
+    minSize: 100,
+    maxSize: 250
+},{
+    title: 'Main Content',
+    collapsible: false,
+    region:'center',
+    margins: '5 0 0 0'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.BorderLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="card-tabs-details">
+            <h2>Ext.layout.CardLayout (TabPanel)</h2>
+            <p>The TabPanel component is an excellent example of a sophisticated card layout.  Each tab is just
+            a panel managed by the card layout such that only one is visible at a time.  In this case, configuration
+            is simple since we aren't actually building a card layout from scratch.  Don't forget to set the
+            activeItem config in order to default to the tab that should display first.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+xtype: 'tabpanel',
+activeItem: 0, // index or id
+items:[{
+    title: 'Tab 1',
+    html: 'This is tab 1 content.'
+},{
+    title: 'Tab 2',
+    html: 'This is tab 2 content.'
+},{
+    title: 'Tab 3',
+    html: 'This is tab 3 content.'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.CardLayout" target="_blank">CardLayout API Reference</a></p>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.TabPanel" target="_blank">TabPanel API Reference</a></p>
+        </div>
+        <div id="card-wizard-details">
+            <h2>Ext.layout.CardLayout (Wizard)</h2>
+            <p>You can use a CardLayout to create your own custom wizard-style screen.  The layout is a standard
+            CardLayout with a Toolbar at the bottom, and the developer must supply the navigation function
+            that implements the wizard's business logic (see the code in basic.js for details).</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'card',
+activeItem: 0, // index or id
+bbar: ['->', {
+    id: 'card-prev',
+    text: '&amp;laquo; Previous'
+},{
+    id: 'card-next',
+    text: 'Next &amp;raquo;'
+}],
+items: [{
+    id: 'card-0',
+    html: 'Step 1'
+},{
+    id: 'card-1',
+    html: 'Step 2'
+},{
+    id: 'card-2',
+    html: 'Step 3'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.CardLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="column-details">
+            <h2>Ext.layout.ColumnLayout</h2>
+            <p>This is a useful layout style when you need multiple columns that can have varying content height.
+            Any fixed-width column widths are calculated first, then any percentage-width columns specified using
+            the <tt>columnWidth</tt> config will be calculated based on remaining container width.  Percentages
+            should add up to 1 (100%) in order to fill the container.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'column',
+items: [{
+    title: 'Width = 25%',
+    columnWidth: .25,
+    html: 'Content'
+},{
+    title: 'Width = 75%',
+    columnWidth: .75,
+    html: 'Content'
+},{
+    title: 'Width = 250px',
+    width: 250,
+    html: 'Content'
+}]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.ColumnLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="fit-details">
+            <h2>Ext.layout.FitLayout</h2>
+            <p>A very simple layout that simply fills the container with a single panel.  This is usually the best default
+            layout choice when you have no other specific layout requirements.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'fit',
+items: {
+    title: 'Fit Panel',
+    html: 'Content',
+    border: false
+}
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.FitLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="form-details">
+            <h2>Ext.layout.FormLayout</h2>
+            <p>FormLayout has specific logic to deal with form fields, labels, etc.  While you can use a FormLayout in
+            a standard panel, you will normally want to use a FormPanel directly in order to get form-specific functionality
+            like validation, submission, etc.  FormPanels use a FormLayout internally so the layout config is not needed
+            (and the layout may not render correctly if overridden).</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+xtype: 'form', // FormPanel
+labelWidth: 75,
+width: 350,
+defaultType: 'textfield',
+items: [{
+        fieldLabel: 'First Name',
+        name: 'first',
+        allowBlank:false
+    },{
+        fieldLabel: 'Last Name',
+        name: 'last'
+    },{
+        fieldLabel: 'Company',
+        name: 'company'
+    },{
+        fieldLabel: 'Email',
+        name: 'email',
+        vtype:'email'
+    }
+],
+buttons: [
+    {text: 'Save'},
+    {text: 'Cancel'}
+]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.FormLayout" target="_blank">API Reference</a></p>
+        </div>
+        <div id="table-details">
+            <h2>Ext.layout.TableLayout</h2>
+            <p>Outputs a standard HTML table as the layout container.  This is sometimes useful for complex layouts
+            where cell spanning is required, or when you want to allow the contents to flow naturally based on standard
+            browser table layout rules.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'table',
+layoutConfig: {
+    columns: 3
+},
+items: [
+    {html:'1,1',rowspan:3},
+    {html:'1,2'},
+    {html:'1,3'},
+    {html:'2,2',colspan:2},
+    {html:'3,2'},
+    {html:'3,3'}
+]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.TableLayout" target="_blank">API Reference</a></p>
+        </div>
+
+        <div id="vbox-details">
+            <h2>Ext.layout.VBoxLayout</h2>
+            <p>A layout that allows for the vertical and horizontal stretching of child items, much like the container
+            layout with size management.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'vbox',
+layoutConfig: {
+    align : 'stretch',
+    pack  : 'start',
+},
+items: [
+    {html:'panel 1', flex:1},
+    {html:'panel 2', height:150},
+    {html:'panel 3', flex:2'}
+]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.VBoxLayout" target="_blank">API Reference</a></p>
+        </div>
+
+        <div id="hbox-details">
+            <h2>Ext.layout.HBoxLayout</h2>
+            <p>A layout that allows for the vertical and horizontal stretching of child items, much like the column
+            layout but can stretch items vertically.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'hbox',
+layoutConfig: {
+    align : 'stretch',
+    pack  : 'start',
+},
+items: [
+    {html:'panel 1', flex:1},
+    {html:'panel 2', width:150},
+    {html:'panel 3', flex:2'}
+]
+            </code></pre>
+            <p><a href="http://extjs.com/deploy/dev/docs/?class=Ext.layout.HBoxLayout" target="_blank">API Reference</a></p>
+        </div>
+
+
+        <!-- Custom layouts -->
+        <div id="row-details">
+            <h2>Ext.ux.layout.RowLayout</h2>
+            <p>This is a custom layout that is useful when you need a layout style with multiple rows of content.
+            Any fixed-height rows are calculated first, then any percentage-height rows specified using the
+            <tt>rowHeight</tt> config will be calculated based on remaining container height.  Percentages
+            should add up to 1 (100%) in order to fill the container. Standard panel widths (fixed or
+            percentage) are also supported.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'ux.row',
+items: [{
+    title: 'Height = 25%',
+    rowHeight: .25,
+    width: '50%'
+},{
+    title: 'Height = 100px',
+    height: 100,
+    width: 300
+},{
+    title: 'Height = 75%',
+    rowHeight: .75
+}]
+            </code></pre>
+        </div>
+        <div id="center-details">
+            <h2>Ext.ux.layout.CenterLayout</h2>
+            <p>This is a custom layout for centering contents within a container.  The only requirement is
+            that the container have a single child panel with a width specified (fixed or percentage).
+            The child panel can then contain  any content, including other components, that will display
+            centered within the main container. To make the centered panel non-visual, remove the title
+            and add <tt>border:false</tt> to the child config.</p>
+            <p><b>Sample Config:</b></p>
+            <pre><code>
+layout:'ux.center',
+items: {
+    title: 'Centered Panel',
+    width: '75%',
+    html: 'Some content'
+}
+            </code></pre>
+        </div>
+
+
+        <!-- Combination layouts -->
+        <div id="tabs-nested-layouts-details">
+            <h2>Tabs With Nested Layouts</h2>
+            <p>There are multiple levels of layout nesting within three different TabPanels in this example.
+            Each tab in a TabPanel can have its own separate layout.  As we can see, some have plain content,
+            while others contain full BorderLayouts.  There is also a fully-loaded grid nested down inside
+            the inner-most tab, showing that there is no limit to how complex your layout can be.</p>
+            <p>One of the trickiest aspects of deeply nested layouts is dealing with borders on all the
+            different panels used in the layout.  In this example, body padding and region margins are used
+            extensively to provide space between components so that borders can be displayed naturally in
+            most cases. A different approach would be to minimize padding and use the config properties
+            related to borders to turn borders on and off selectively to achieve a slightly different look
+            and feel.</p>
+        </div>
+        <div id="complex-details">
+            <h2>Complex Layout</h2>
+            <p></p>
+        </div>
+
+        <!-- Form layouts -->
+        <div id="abs-form-details">
+            <h2>Absolute Layout Form</h2>
+            <p>FormLayout supports absolute positioning in addition to standard anchoring for flexible control over
+            positioning of fields and labels in containers.  In this example, the top and left positions of the labels
+            and fields are positioned absolute, while the field widths are anchored to the right and/or bottom of the container.</p>
+        </div>
+    </div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layout-browser.js	(revision 625)
@@ -0,0 +1,113 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+//
+// This is the main layout definition.
+//
+Ext.onReady(function(){
+	
+	Ext.QuickTips.init();
+	
+	// This is an inner body element within the Details panel created to provide a "slide in" effect
+	// on the panel body without affecting the body's box itself.  This element is created on
+	// initial use and cached in this var for subsequent access.
+	var detailEl;
+	
+	// This is the main content center region that will contain each example layout panel.
+	// It will be implemented as a CardLayout since it will contain multiple panels with
+	// only one being visible at any given time.
+	var contentPanel = {
+		id: 'content-panel',
+		region: 'center', // this is what makes this panel into a region within the containing layout
+		layout: 'card',
+		margins: '2 5 5 0',
+		activeItem: 0,
+		border: false,
+		items: [
+			// from basic.js:
+			start, absolute, accordion, anchor, border, cardTabs, cardWizard, column, fit, form, table, vbox, hbox,
+			// from custom.js:
+			rowLayout, centerLayout,
+			// from combination.js:
+			absoluteForm, tabsNestedLayouts
+		]
+	};
+    
+	// Go ahead and create the TreePanel now so that we can use it below
+    var treePanel = new Ext.tree.TreePanel({
+    	id: 'tree-panel',
+    	title: 'Sample Layouts',
+        region:'north',
+        split: true,
+        height: 300,
+        minSize: 150,
+        autoScroll: true,
+        
+        // tree-specific configs:
+        rootVisible: false,
+        lines: false,
+        singleExpand: true,
+        useArrows: true,
+        
+        loader: new Ext.tree.TreeLoader({
+            dataUrl:'tree-data.json'
+        }),
+        
+        root: new Ext.tree.AsyncTreeNode()
+    });
+    
+	// Assign the changeLayout function to be called on tree node click.
+    treePanel.on('click', function(n){
+    	var sn = this.selModel.selNode || {}; // selNode is null on initial selection
+    	if(n.leaf && n.id != sn.id){  // ignore clicks on folders and currently selected node 
+    		Ext.getCmp('content-panel').layout.setActiveItem(n.id + '-panel');
+    		if(!detailEl){
+    			var bd = Ext.getCmp('details-panel').body;
+    			bd.update('').setStyle('background','#fff');
+    			detailEl = bd.createChild(); //create default empty div
+    		}
+    		detailEl.hide().update(Ext.getDom(n.id+'-details').innerHTML).slideIn('l', {stopFx:true,duration:.2});
+    	}
+    });
+    
+	// This is the Details panel that contains the description for each example layout.
+	var detailsPanel = {
+		id: 'details-panel',
+        title: 'Details',
+        region: 'center',
+        bodyStyle: 'padding-bottom:15px;background:#eee;',
+		autoScroll: true,
+		html: '<p class="details-info">When you select a layout from the tree, additional details will display here.</p>'
+    };
+	
+	// Finally, build the main layout once all the pieces are ready.  This is also a good
+	// example of putting together a full-screen BorderLayout within a Viewport.
+    new Ext.Viewport({
+		layout: 'border',
+		title: 'Ext Layout Browser',
+		items: [{
+			xtype: 'box',
+			region: 'north',
+			applyTo: 'header',
+			height: 30
+		},{
+			layout: 'border',
+	    	id: 'layout-browser',
+	        region:'west',
+	        border: false,
+	        split:true,
+			margins: '2 0 5 5',
+	        width: 275,
+	        minSize: 100,
+	        maxSize: 500,
+			items: [treePanel, detailsPanel]
+		},
+			contentPanel
+		],
+        renderTo: Ext.getBody()
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/basic.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/basic.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/basic.js	(revision 625)
@@ -0,0 +1,409 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+//
+// Note that these are all defined as panel configs, rather than instantiated
+// as panel objects.  You could just as easily do this instead:
+//
+// var absolute = new Ext.Panel({ ... });
+//
+// However, by passing configs into the main container instead of objects, we can defer
+// layout AND object instantiation until absolutely needed.  Since most of these panels
+// won't be shown by default until requested, this will save us some processing
+// time up front when initially rendering the page.
+//
+// Since all of these configs are being added into a layout container, they are
+// automatically assumed to be panel configs, and so the xtype of 'panel' is
+// implicit.  To define a config of some other type of component to be added into
+// the layout, simply provide the appropriate xtype config explicitly.
+//
+/*
+ * ================  Start page config  =======================
+ */
+// The default start page, also a simple example of a FitLayout.
+var start = {
+	id: 'start-panel',
+	title: 'Start Page',
+	layout: 'fit',
+	bodyStyle: 'padding:25px',
+	contentEl: 'start-div'  // pull existing content from the page
+};
+
+/*
+ * ================  AbsoluteLayout config  =======================
+ */
+var absolute = {
+	id: 'absolute-panel',
+	title: 'Absolute Layout',
+	layout: 'absolute',
+	defaults: {
+		bodyStyle: 'padding:15px;',
+		width: 200,
+		height: 100,
+		frame: true
+	},
+	items:[{
+		title: 'Panel 1',
+		x: 50,
+		y: 50,
+		html: 'Positioned at x:50, y:50'
+	},{
+		title: 'Panel 2',
+		x: 125,
+		y: 125,
+		html: 'Positioned at x:125, y:125'
+	}]
+};
+
+/*
+ * ================  AccordionLayout config  =======================
+ */
+var accordion = {
+    id: 'accordion-panel',
+	title: 'Accordion Layout',
+    layout: 'accordion',
+    bodyBorder: false,  // useful for accordion containers since the inner panels have borders already
+    bodyStyle: 'background-color:#DFE8F6',  // if all accordion panels are collapsed, this looks better in this layout
+	defaults: {bodyStyle: 'padding:15px'},
+    items: [{
+        title: 'Introduction',
+		tools: [{id:'gear'},{id:'refresh'}],
+		html: '<p>Here is some accordion content.  Click on one of the other bars below for more.</p>'
+    },{
+        title: 'Basic Content',
+		html: '<br /><p>More content.  Open the third panel for a customized look and feel example.</p>',
+		items: {
+			xtype: 'button',
+			text: 'Show Next Panel',
+			handler: function(){
+				Ext.getCmp('acc-custom').expand(true);
+			}
+		}
+    },{
+		id: 'acc-custom',
+        title: 'Custom Panel Look and Feel',
+		cls: 'custom-accordion', // look in layout-browser.css to see the CSS rules for this class
+		html: '<p>Here is an example of how easy it is to completely customize the look and feel of an individual panel simply by adding a CSS class in the config.</p>'
+    }]
+};
+
+/*
+ * ================  AnchorLayout config  =======================
+ */
+var anchor = {
+	id:'anchor-panel',
+	title: 'Anchor Layout',
+    layout:'anchor',
+	defaults: {bodyStyle: 'padding:15px'},
+    items: [{
+        title: 'Panel 1',
+        height: 100,
+		anchor: '50%',
+		html: '<p>Width = 50% of the container</p>'
+    },{
+        title: 'Panel 2',
+        height: 100,
+		anchor: '-100',
+		html: '<p>Width = container width - 100 pixels</p>'
+    },{
+        title: 'Panel 3',
+		anchor: '-10, -262',
+		html: '<p>Width = container width - 10 pixels</p><p>Height = container height - 262 pixels</p>'
+    }]
+};
+
+/*
+ * ================  BorderLayout config  =======================
+ */
+var border = {
+	id:'border-panel',
+	title: 'Border Layout',
+    layout: 'border',
+    bodyBorder: false,
+	defaults: {
+		collapsible: true,
+        split: true,
+		animFloat: false,
+		autoHide: false,
+		useSplitTips: true,
+		bodyStyle: 'padding:15px'
+	},
+    items: [{
+        title: 'Footer',
+		region: 'south',
+        height: 150,
+        minSize: 75,
+        maxSize: 250,
+		cmargins: '5 0 0 0',
+		html: '<p>Footer content</p>'
+    },{
+		title: 'Navigation',
+        region:'west',
+		floatable: false,
+		margins: '5 0 0 0',
+		cmargins: '5 5 0 0',
+        width: 175,
+        minSize: 100,
+        maxSize: 250,
+		html: '<p>Secondary content like navigation links could go here</p>'
+	},{
+		title: 'Main Content',
+		collapsible: false,
+        region: 'center',
+		margins: '5 0 0 0',
+		html: '<h1>Main Page</h1><p>This is where the main content would go</p>'
+	}]
+};
+
+/*
+ * ================  CardLayout config (TabPanel)  =======================
+ */
+// Note that the TabPanel component uses an internal CardLayout -- it is not
+// something you have to explicitly configure.  However, it is still a perfect
+// example of how this layout style can be used in a complex component.
+var cardTabs = {
+	xtype: 'tabpanel',
+	id: 'card-tabs-panel',
+	plain: true,  //remove the header border
+	activeItem: 0,
+	defaults: {bodyStyle: 'padding:15px'},
+	items:[{
+		title: 'Tab 1',
+		html: 'This is tab 1 content.'
+	},{
+		title: 'Tab 2',
+		html: 'This is tab 2 content.'
+	},{
+		title: 'Tab 3',
+		html: 'This is tab 3 content.'
+	}]
+};
+
+// This is a fake CardLayout navigation function.  A real implementation would
+// likely be more sophisticated, with logic to validate navigation flow.  It will
+// be assigned next as the handling function for the buttons in the CardLayout example.
+var cardNav = function(incr){
+	var l = Ext.getCmp('card-wizard-panel').getLayout();
+	var i = l.activeItem.id.split('card-')[1];
+	var next = parseInt(i) + incr;
+	l.setActiveItem(next);
+	Ext.getCmp('card-prev').setDisabled(next==0);
+	Ext.getCmp('card-next').setDisabled(next==2);
+};
+
+/*
+ * ================  CardLayout config (Wizard)  =======================
+ */
+var cardWizard = {
+	id:'card-wizard-panel',
+	title: 'Card Layout (Wizard)',
+    layout:'card',
+	activeItem: 0,
+	bodyStyle: 'padding:15px',
+	defaults: {border:false},
+	bbar: ['->', {
+		id: 'card-prev',
+		text: '&laquo; Previous',
+		handler: cardNav.createDelegate(this, [-1]),
+		disabled: true
+	},{
+		id: 'card-next',
+		text: 'Next &raquo;',
+		handler: cardNav.createDelegate(this, [1])
+	}],
+	items: [{
+		id: 'card-0',
+		html: '<h1>Welcome to the Demo Wizard!</h1><p>Step 1 of 3</p><p>Please click the "Next" button to continue...</p>'
+    },{
+		id: 'card-1',
+		html: '<p>Step 2 of 3</p><p>Almost there.  Please click the "Next" button to continue...</p>'
+    },{
+		id: 'card-2',
+		html: '<h1>Congratulations!</h1><p>Step 3 of 3 - Complete</p>'
+    }]
+};
+
+/*
+ * ================  ColumnLayout config  =======================
+ */
+var column = {
+	id:'column-panel',
+	title: 'Column Layout',
+    layout: 'column',
+    bodyStyle: 'padding:5px',
+	defaults: {bodyStyle:'padding:15px'},
+    items: [{
+        title: 'Width = 0.25',
+		columnWidth: 0.25,
+		html: '<p>This is some short content.</p>'
+    },{
+        title: 'Width = 0.75',
+		columnWidth: 0.75,
+		html: '<p>This is some longer content.</p><p>This is some longer content.</p><p>This is some longer content.</p><p>This is some longer content.</p><p>This is some longer content.</p><p>This is some longer content.</p>'
+    },{
+        title: 'Width = 250px',
+		width: 250,
+		html: 'Not much here!'
+	}]
+};
+
+/*
+ * ================  FitLayout config  =======================
+ */
+var fit = {
+	id: 'fit-panel',
+	title: 'Fit Layout',
+    layout: 'fit',
+    items: {
+		title: 'Inner Panel',
+		html: '<p>This panel is fit within its container.</p>',
+		bodyStyle: 'margin:15px',
+		border: false
+    }
+};
+
+/*
+ * ================  FormLayout config  =======================
+ */
+// NOTE: While you can create a basic Panel with layout:'form', practically
+// you should usually use a FormPanel to also get its form-specific functionality.
+// Note that the layout config is not required on FormPanels.
+var form = {
+	xtype: 'form', // since we are not using the default 'panel' xtype, we must specify it
+	id: 'form-panel',
+    labelWidth: 75,
+    title: 'Form Layout',
+    bodyStyle: 'padding:15px',
+    width: 350,
+	labelPad: 20,
+	layoutConfig: {
+		labelSeparator: ''
+	},
+    defaults: {
+		width: 230,
+		msgTarget: 'side'
+	},
+    defaultType: 'textfield',
+    items: [{
+            fieldLabel: 'First Name',
+            name: 'first',
+            allowBlank:false
+        },{
+            fieldLabel: 'Last Name',
+            name: 'last'
+        },{
+            fieldLabel: 'Company',
+            name: 'company'
+        },{
+            fieldLabel: 'Email',
+            name: 'email',
+            vtype:'email'
+        }
+    ],
+    buttons: [{text: 'Save'},{text: 'Cancel'}]
+};
+
+/*
+ * ================  TableLayout config  =======================
+ */
+var table = {
+	id: 'table-panel',
+	title: 'Table Layout',
+    layout: 'table',
+	layoutConfig: {
+		columns: 4
+	},
+	defaults: {
+		bodyStyle:'padding:15px 20px'
+	},
+    items: [{
+        title: 'Lots of Spanning',
+		html: '<p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p>',
+		rowspan: 3
+    },{
+        title: 'Basic Table Cell',
+		html: '<p>Basic panel in a table cell.</p>',
+		cellId: 'basic-cell',
+		cellCls: 'custom-cls'
+    },{
+		html: '<p>Plain panel</p>'
+	},{
+        title: 'Another Cell',
+		html: '<p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p><br /><p>Row spanning.</p>',
+		width: 300,
+		rowspan: 2
+    },{
+		html: 'Plain cell spanning two columns',
+		colspan: 2
+    },{
+		title: 'More Column Spanning',
+		html: '<p>Spanning three columns.</p>',
+		colspan: 3
+	},{
+		title: 'Spanning All Columns',
+		html: '<p>Spanning all columns.</p>',
+		colspan: 4
+	}]
+};
+
+
+/*
+ * ================  VBoxLayout config  =======================
+ */
+var vbox = {
+    id: 'vbox-panel',
+    title: 'vBox Layout',
+    layout: {
+        type: 'vbox',
+        pack: 'start',
+        align: 'stretch'
+    },
+    defaults: {
+        frame: true
+    },
+    items: [{
+        title: 'Panel 1',
+        flex: 1,
+        html: 'flex : 1'
+    }, {
+        title: 'Panel 2',
+        height: 100,
+        html: 'height: 100'
+    }, {
+        title: 'Panel 3',
+        flex: 2,
+        html: 'flex : 2'
+    }]
+};
+
+/*
+ * ================  HBoxLayout config  =======================
+ */
+var hbox = {
+    id: 'hbox-panel',
+    title: 'hBox Layout',
+    layout: {
+        type: 'hbox',
+        pack: 'start',
+        align: 'stretch'
+    },
+    defaults: {
+        frame: true
+    },
+    items: [{
+        title: 'Panel 1',
+        flex: 1,
+        html: 'flex : 1'
+    }, {
+        title: 'Panel 2',
+        width: 100,
+        html: 'width : 100'
+    }, {
+        title: 'Panel 3',
+        flex: 2,
+        html: 'flex : 2'
+    }]
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/combination.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/combination.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/combination.js	(revision 625)
@@ -0,0 +1,242 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * ================  TabPanel with nested layouts  =======================
+ */
+// fake grid data used below in the tabsNestedLayouts config
+var myData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+    ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+    ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+    ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+    ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+    ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+    ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+    ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+    ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+    ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+    ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+    ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+    ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+    ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+    ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+    ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+    ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+    ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+    ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+    ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+    ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+    ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+    ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+    ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+    ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+];
+
+var tabsNestedLayouts = {
+	xtype: 'tabpanel',
+	id: 'tabs-nested-layouts-panel',
+	title: 'TabPanel with Nested Layouts',
+	activeTab: 0,
+	items:[{
+		title: 'Foo',
+		layout: 'border',
+		items: [{
+			region: 'north',
+			title: 'North',
+			height: 75,
+			maxSize: 150,
+			margins: '5 5 0 5',
+			bodyStyle: 'padding:10px;',
+			split: true,
+			html: 'Some content'
+		},{
+			xtype: 'tabpanel',
+			plain: true,
+			region: 'center',
+			margins: '0 5 5 5',
+			activeTab: 0,
+			items: [{
+				title: 'Inner Tab 1',
+				bodyStyle: 'padding:10px;',
+				html: 'See Inner Tab 2 for another nested BorderLayout.'
+			},{
+				title: 'Inner Tab 2',
+				cls: 'inner-tab-custom', // custom styles in layout-browser.css
+				layout: 'border',
+                // Make sure IE can still calculate dimensions after a resize when the tab is not active.
+                // With display mode, if the tab is rendered but hidden, IE will mess up the layout on show:
+                hideMode: Ext.isIE ? 'offsets' : 'display',
+				items: [{
+					title: 'West',
+					region: 'west',
+					collapsible: true,
+					width: 150,
+					minSize: 100,
+					maxSize: 350,
+					margins: '5 0 5 5',
+					cmargins: '5 5 5 5',
+					html: 'Hello',
+					bodyStyle:'padding:10px;',
+					split: true
+				},{
+					xtype: 'tabpanel',
+					region: 'center',
+					margins: '5 5 5 0',
+					tabPosition: 'bottom',
+					activeTab: 0,
+					items: [{
+						// Panels that are used as tabs do not have title bars since the tab
+						// itself is the title container.  If you want to have a full title
+						// bar within a tab, you can easily nest another panel within the tab
+						// with layout:'fit' to acheive that:
+						title: 'Bottom Tab',
+						layout: 'fit',
+						items: {
+							title: 'Interior Content',
+							bodyStyle:'padding:10px;',
+							border: false,
+							html: 'See the next tab for a nested grid. The grid is not rendered until its tab is first accessed.'
+						}
+					},{
+						// A common mistake when adding grids to a layout is creating a panel first,
+						// then adding the grid to it.  GridPanel (xtype:'grid') is a Panel subclass,
+						// so you can add it directly as an item into a container.  Typically you will
+						// want to specify layout:'fit' on GridPanels so that they'll size along with
+						// their container and take up the available space.
+						title: 'Nested Grid',
+						xtype: 'grid',
+						layout: 'fit',
+				        store: new Ext.data.ArrayStore({
+					        fields: [
+					           {name: 'company'},
+					           {name: 'price', type: 'float'},
+					           {name: 'change', type: 'float'},
+					           {name: 'pctChange', type: 'float'},
+					           {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+					        ]
+					    }),
+				        columns: [
+				            {id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
+				            {header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
+				            {header: 'Change', width: 75, sortable: true, dataIndex: 'change'},
+				            {header: '% Change', width: 75, sortable: true, dataIndex: 'pctChange'},
+				            {header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+				        ],
+				        stripeRows: true,
+				        autoExpandColumn: 'company',
+
+				        // Add a listener to load the data only after the grid is rendered:
+				        listeners: {
+				        	render: function(){
+				        		this.store.loadData(myData);
+				        	}
+				        }
+					}]
+				}]
+			}]
+		}]
+	},{
+		title: 'Bar',
+		bodyStyle: 'padding:10px;',
+		html: 'Nothing to see here.'
+	}]
+};
+
+/*
+ * ================  Absolute Layout Form  =======================
+ */
+var absform = new Ext.form.FormPanel({
+    baseCls: 'x-plain',
+    layout:'absolute',
+    url:'save-form.php',
+    border: true,
+    defaultType: 'textfield',
+
+    items: [{
+        x: 0,
+        y: 5,
+        xtype: 'label',
+        text: 'From:'
+    },{
+        x: 55,
+        y: 0,
+        name: 'from',
+        anchor:'100%'  // anchor width by %
+    },{
+        x: 0,
+        y: 32,
+        xtype: 'label',
+        text: 'To:'
+    },{
+    	// The button is not a Field subclass, so it must be
+    	// wrapped in a panel for proper positioning to work
+    	xtype: 'panel',
+    	x: 55,
+    	y: 27,
+    	items: {
+	    	xtype: 'button',
+	    	text: 'Contacts...'
+    	}
+    },{
+        x: 135,
+        y: 27,
+        name: 'to',
+        anchor: '100%'  // anchor width by %
+    },{
+        x: 0,
+        y: 59,
+        xtype: 'label',
+        text: 'Subject:'
+    },{
+        x: 55,
+        y: 54,
+        name: 'subject',
+        anchor: '100%'  // anchor width by %
+    },{
+        x:0,
+        y: 81,
+        xtype: 'textarea',
+        name: 'msg',
+        anchor: '100% 100%'  // anchor width and height
+    }]
+});
+
+var absoluteForm = {
+    title: 'Absolute Layout Form',
+    id: 'abs-form-panel',
+    layout: 'fit',
+    bodyStyle: 'padding:15px;',
+    items: {
+    	title: 'New Email',
+    	cls: 'email-form',
+	    layout: 'fit',
+	    frame: true,
+	    bodyStyle: 'padding:10px 5px 5px;',
+	    items: absform,
+
+	    tbar: [{
+	    	text: 'Send',
+	    	iconCls: 'icon-send'
+	    },'-',{
+	    	text: 'Save',
+	    	iconCls: 'icon-save'
+	    },{
+	    	text: 'Check Spelling',
+	    	iconCls: 'icon-spell'
+	    },'-',{
+	    	text: 'Print',
+	    	iconCls: 'icon-print'
+	    },'->',{
+	    	text: 'Attach a File',
+	    	iconCls: 'icon-attach'
+	    }]
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/custom.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/custom.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/layouts/custom.js	(revision 625)
@@ -0,0 +1,50 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * CenterLayout demo panel
+ */
+var centerLayout = {
+	id: 'center-panel',
+    layout: 'ux.center',
+    items: {
+        title: 'Centered Panel: 75% of container width and fit height',
+        layout: 'ux.center',
+        autoScroll: true,
+        width: '75%',
+        bodyStyle: 'padding:20px 0;',
+        items: [{
+        	title: 'Inner Centered Panel',
+        	html: 'Fixed 300px wide and auto height. The container panel will also autoscroll if narrower than 300px.',
+        	width: 300,
+        	frame: true,
+        	autoHeight: true,
+        	bodyStyle: 'padding:10px 20px;'
+        }]
+    }
+};
+
+/*
+ * RowLayout demo panel
+ */
+var rowLayout = {
+	id: 'row-panel',
+	bodyStyle: 'padding:5px',
+	layout: 'ux.row',
+    title: 'Row Layout',
+    items: [{
+        title: 'Height = 25%, Width = 50%',
+        rowHeight: 0.25,
+        width: '50%'
+    },{
+        title: 'Height = 100px, Width = 300px',
+        height: 100,
+        width: 300
+    },{
+    	title: 'Height = 75%, Width = fit',
+    	rowHeight: 0.75
+    }]
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/tree-data.json
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/tree-data.json	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout-browser/tree-data.json	(revision 625)
@@ -0,0 +1,75 @@
+[{
+    text:'Basic Ext Layouts',
+    expanded: true,
+    children:[{
+        text:'Absolute',
+        id:'absolute',
+        leaf:true
+    },{
+        text:'Accordion',
+        id:'accordion',
+        leaf:true
+    },{
+        text:'Anchor',
+        id:'anchor',
+        leaf:true
+    },{
+        text:'Border',
+        id:'border',
+        leaf:true
+    },{
+        text:'Card (TabPanel)',
+        id:'card-tabs',
+        leaf:true
+    },{
+        text:'Card (Wizard)',
+        id:'card-wizard',
+        leaf:true
+    },{
+        text:'Column',
+        id:'column',
+        leaf:true
+    },{
+        text:'Fit',
+        id:'fit',
+        leaf:true
+    },{
+        text:'Form',
+        id:'form',
+        leaf:true
+    },{
+        text:'Table',
+        id:'table',
+        leaf:true
+    },{
+        text:'vBox',
+        id:'vbox',
+        leaf:true
+    },{
+        text:'hBox',
+        id:'hbox',
+        leaf:true
+    }]
+},{
+    text:'Custom Layouts',
+    children:[{
+        text:'Row',
+        id:'row',
+        leaf:true
+    },{
+        text:'Center',
+        id:'center',
+        leaf:true
+    }]
+},{
+    text:'Combination Examples',
+    children:[{
+        text:'Absolute Layout Form',
+        id:'abs-form',
+        leaf:true
+    },{
+        text:'Tabs with Nested Layouts',
+        id:'tabs-nested-layouts',
+        leaf:true
+    }]
+}]
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/accordion.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/accordion.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/accordion.html	(revision 625)
@@ -0,0 +1,89 @@
+<html>
+<head>
+    <title>Accordion Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <style type="text/css">
+        html, body {
+            font: normal 12px verdana;
+            margin: 0;
+            padding: 0;
+            border: 0 none;
+            overflow: hidden;
+            height: 100%;
+        }
+        .empty .x-panel-body {
+            padding-top:20px;
+            text-align:center;
+            font-style:italic;
+            color: gray;
+            font-size:11px;
+        }
+    </style>
+    <script type="text/javascript">
+        Ext.onReady(function() {
+
+            var item1 = new Ext.Panel({
+                title: 'Accordion Item 1',
+                html: '&lt;empty panel&gt;',
+                cls:'empty'
+            });
+
+            var item2 = new Ext.Panel({
+                title: 'Accordion Item 2',
+                html: '&lt;empty panel&gt;',
+                cls:'empty'
+            });
+
+            var item3 = new Ext.Panel({
+                title: 'Accordion Item 3',
+                html: '&lt;empty panel&gt;',
+                cls:'empty'
+            });
+
+            var item4 = new Ext.Panel({
+                title: 'Accordion Item 4',
+                html: '&lt;empty panel&gt;',
+                cls:'empty'
+            });
+
+            var item5 = new Ext.Panel({
+                title: 'Accordion Item 5',
+                html: '&lt;empty panel&gt;',
+                cls:'empty'
+            });
+
+            var accordion = new Ext.Panel({
+                region:'west',
+                margins:'5 0 5 5',
+                split:true,
+                width: 210,
+                layout:'accordion',
+                items: [item1, item2, item3, item4, item5]
+            });
+
+            var viewport = new Ext.Viewport({
+                layout:'border',
+                items:[
+                    accordion, {
+                    region:'center',
+                    margins:'5 5 5 0',
+                    cls:'empty',
+                    bodyStyle:'background:#f1f1f1',
+                    html:'<br/><br/>&lt;empty center panel&gt;'
+                }]
+            });
+        });
+    </script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/anchor.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/anchor.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/anchor.html	(revision 625)
@@ -0,0 +1,51 @@
+<html>
+<head>
+    <title>Anchor Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <style type="text/css">
+        html, body {
+            font: normal 12px verdana;
+            margin: 0;
+            padding: 0;
+            border: 0 none;
+            overflow: hidden;
+            height: 100%;
+        }
+    </style>
+    <script type="text/javascript">
+        Ext.onReady(function() {
+            var viewport = new Ext.Viewport({
+                layout:'anchor',
+                anchorSize: {width:800, height:600},
+                items:[{
+                    title:'Item 1',
+                    html:'Content 1',
+                    width:800,
+                    anchor:'right 20%'
+                },{
+                    title:'Item 2',
+                    html:'Content 2',
+                    width:300,
+                    anchor:'50% 30%'
+                },{
+                    title:'Item 3',
+                    html:'Content 3',
+                    width:600,
+                    anchor:'-100 50%'
+                }]
+            });
+        });
+    </script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/column.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/column.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/column.html	(revision 625)
@@ -0,0 +1,120 @@
+<html>
+<head>
+  <title>Column Layout</title>
+	<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!--<script language="javascript" src="../grid/PropsGrid.js"></script>-->
+	<style type="text/css">
+	html, body {
+        font:normal 12px verdana;
+        margin:0;
+        padding:0;
+        border:0 none;
+        overflow:hidden;
+        height:100%;
+    }
+	.x-panel-body p {
+	    margin:5px;
+	}
+    .x-column-layout-ct .x-panel {
+        margin-bottom:5px;
+    }
+    .x-column-layout-ct .x-panel-dd-spacer {
+        margin-bottom:5px;
+    }
+    .settings {
+        background-image:url(../shared/icons/fam/folder_wrench.png) !important;
+    }
+    .nav {
+        background-image:url(../shared/icons/fam/folder_go.png) !important;
+    }
+    </style>
+	<script type="text/javascript">
+
+    Ext.onReady(function(){
+
+       // NOTE: This is an example showing simple state management. During development,
+       // it is generally best to disable state management as dynamically-generated ids
+       // can change across page loads, leading to unpredictable results.  The developer
+       // should ensure that stable state ids are set for stateful components in real apps.
+       Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+
+       var viewport = new Ext.Viewport({
+            layout:'border',
+            items:[{
+                region:'west',
+                id:'west-panel',
+                title:'West',
+                split:true,
+                width: 200,
+                minSize: 175,
+                maxSize: 400,
+                collapsible: true,
+                margins:'35 0 5 5',
+                cmargins:'35 5 5 5',
+                layout:'accordion',
+                layoutConfig:{
+                    animate:true
+                },
+                items: [{
+                    html: Ext.example.shortBogusMarkup,
+                    title:'Navigation',
+                    autoScroll:true,
+                    border:false,
+                    iconCls:'nav'
+                },{
+                    title:'Settings',
+                    html: Ext.example.shortBogusMarkup,
+                    border:false,
+                    autoScroll:true,
+                    iconCls:'settings'
+                }]
+            },{
+                region:'center',
+                margins:'35 5 5 0',
+                layout:'column',
+                autoScroll:true,
+                items:[{
+                    columnWidth:.33,
+                    baseCls:'x-plain',
+                    bodyStyle:'padding:5px 0 5px 5px',
+                    items:[{
+                        title: 'A Panel',
+                        html: Ext.example.shortBogusMarkup
+                    }]
+                },{
+                    columnWidth:.33, 
+                    baseCls:'x-plain',
+                    bodyStyle:'padding:5px 0 5px 5px',
+                    items:[{
+                        title: 'A Panel',
+                        html: Ext.example.shortBogusMarkup
+                    }]
+                },{
+                    columnWidth:.33,
+                    baseCls:'x-plain',
+                    bodyStyle:'padding:5px',
+                    items:[{
+                        title: 'A Panel',
+                        html: Ext.example.shortBogusMarkup
+                    },{
+                        title: 'Another Panel',
+                        html: Ext.example.shortBogusMarkup
+                    }]
+                }]
+            }]
+        });
+    });
+	</script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+  </body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/complex.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/complex.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/complex.html	(revision 625)
@@ -0,0 +1,188 @@
+<html>
+<head>
+  <title>Complex Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    
+    <style type="text/css">
+    html, body {
+        font:normal 12px verdana;
+        margin:0;
+        padding:0;
+        border:0 none;
+        overflow:hidden;
+        height:100%;
+    }
+    p {
+        margin:5px;
+    }
+    .settings {
+        background-image:url(../shared/icons/fam/folder_wrench.png);
+    }
+    .nav {
+        background-image:url(../shared/icons/fam/folder_go.png);
+    }
+    </style>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- EXAMPLES -->
+    <script type="text/javascript" src="../shared/examples.js"></script>
+  
+    <script type="text/javascript">
+    Ext.onReady(function(){
+    
+        // NOTE: This is an example showing simple state management. During development,
+        // it is generally best to disable state management as dynamically-generated ids
+        // can change across page loads, leading to unpredictable results.  The developer
+        // should ensure that stable state ids are set for stateful components in real apps.
+        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+        
+        var viewport = new Ext.Viewport({
+            layout: 'border',
+            items: [
+            // create instance immediately
+            new Ext.BoxComponent({
+                region: 'north',
+                height: 32, // give north and south regions a height
+                autoEl: {
+                    tag: 'div',
+                    html:'<p>north - generally for menus, toolbars and/or advertisements</p>'
+                }
+            }), {
+                // lazily created panel (xtype:'panel' is default)
+                region: 'south',
+                contentEl: 'south',
+                split: true,
+                height: 100,
+                minSize: 100,
+                maxSize: 200,
+                collapsible: true,
+                title: 'South',
+                margins: '0 0 0 0'
+            }, {
+                region: 'east',
+                title: 'East Side',
+                collapsible: true,
+                split: true,
+                width: 225, // give east and west regions a width
+                minSize: 175,
+                maxSize: 400,
+                margins: '0 5 0 0',
+                layout: 'fit', // specify layout manager for items
+                items:            // this TabPanel is wrapped by another Panel so the title will be applied
+                new Ext.TabPanel({
+                    border: false, // already wrapped so don't add another border
+                    activeTab: 1, // second tab initially active
+                    tabPosition: 'bottom',
+                    items: [{
+                        html: '<p>A TabPanel component can be a region.</p>',
+                        title: 'A Tab',
+                        autoScroll: true
+                    }, new Ext.grid.PropertyGrid({
+                        title: 'Property Grid',
+                        closable: true,
+                        source: {
+                            "(name)": "Properties Grid",
+                            "grouping": false,
+                            "autoFitColumns": true,
+                            "productionQuality": false,
+                            "created": new Date(Date.parse('10/15/2006')),
+                            "tested": false,
+                            "version": 0.01,
+                            "borderWidth": 1
+                        }
+                    })]
+                })
+            }, {
+                region: 'west',
+                id: 'west-panel', // see Ext.getCmp() below
+                title: 'West',
+                split: true,
+                width: 200,
+                minSize: 175,
+                maxSize: 400,
+                collapsible: true,
+                margins: '0 0 0 5',
+                layout: {
+                    type: 'accordion',
+                    animate: true
+                },
+                items: [{
+                    contentEl: 'west',
+                    title: 'Navigation',
+                    border: false,
+                    iconCls: 'nav' // see the HEAD section for style used
+                }, {
+                    title: 'Settings',
+                    html: '<p>Some settings in here.</p>',
+                    border: false,
+                    iconCls: 'settings'
+                }]
+            },
+            // in this instance the TabPanel is not wrapped by another panel
+            // since no title is needed, this Panel is added directly
+            // as a Container
+            new Ext.TabPanel({
+                region: 'center', // a center region is ALWAYS required for border layout
+                deferredRender: false,
+                activeTab: 0,     // first tab initially active
+                items: [{
+                    contentEl: 'center1',
+                    title: 'Close Me',
+                    closable: true,
+                    autoScroll: true
+                }, {
+                    contentEl: 'center2',
+                    title: 'Center Panel',
+                    autoScroll: true
+                }]
+            })]
+        });
+        // get a reference to the HTML element with id "hideit" and add a click listener to it 
+        Ext.get("hideit").on('click', function(){
+            // get a reference to the Panel that was created with id = 'west-panel' 
+            var w = Ext.getCmp('west-panel');
+            // expand or collapse that Panel based on its collapsed property state
+            w.collapsed ? w.expand() : w.collapse();
+        });
+    });
+    </script>
+</head>
+<body>
+    <!-- use class="x-hide-display" to prevent a brief flicker of the content -->
+    <div id="west" class="x-hide-display">
+        <p>Hi. I'm the west panel.</p>
+    </div>
+    <div id="center2" class="x-hide-display">
+        <a id="hideit" href="#">Toggle the west region</a>
+        <p>My closable attribute is set to false so you can't close me. The other center panels can be closed.</p>
+        <p>The center panel automatically grows to fit the remaining space in the container that isn't taken up by the border regions.</p>
+        <hr>
+        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna. Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit. Quisque dolor magna, ornare sed, elementum porta, luctus in, leo.</p>
+        <p>Donec quis dui. Sed imperdiet. Nunc consequat, est eu sollicitudin gravida, mauris ligula lacinia mauris, eu porta dui nisl in velit. Nam congue, odio id auctor nonummy, augue lectus euismod nunc, in tristique turpis dolor sed urna. Donec sit amet quam eget diam fermentum pharetra. Integer tincidunt arcu ut purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla blandit malesuada odio. Nam augue. Aenean molestie sapien in mi. Suspendisse tincidunt. Pellentesque tempus dui vitae sapien. Donec aliquam ipsum sit amet pede. Sed scelerisque mi a erat. Curabitur rutrum ullamcorper risus. Maecenas et lorem ut felis dictum viverra. Fusce sem. Donec pharetra nibh sit amet sapien.</p>
+        <p>Aenean ut orci sed ligula consectetuer pretium. Aliquam odio. Nam pellentesque enim. Nam tincidunt condimentum nisi. Maecenas convallis luctus ligula. Donec accumsan ornare risus. Vestibulum id magna a nunc posuere laoreet. Integer iaculis leo vitae nibh. Nam vulputate, mauris vitae luctus pharetra, pede neque bibendum tellus, facilisis commodo diam nisi eget lacus. Duis consectetuer pulvinar nisi. Cras interdum ultricies sem. Nullam tristique. Suspendisse elementum purus eu nisl. Nulla facilisi. Phasellus ultricies ullamcorper lorem. Sed euismod ante vitae lacus. Nam nunc leo, congue vehicula, luctus ac, tempus non, ante. Morbi suscipit purus a nulla. Sed eu diam.</p>
+        <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras imperdiet felis id velit. Ut non quam at sem dictum ullamcorper. Vestibulum pharetra purus sed pede. Aliquam ultrices, nunc in varius mattis, felis justo pretium magna, eget laoreet justo eros id eros. Aliquam elementum diam fringilla nulla. Praesent laoreet sapien vel metus. Cras tempus, sapien condimentum dictum dapibus, lorem augue fringilla orci, ut tincidunt eros nisi eget turpis. Nullam nunc nunc, eleifend et, dictum et, pharetra a, neque. Ut feugiat. Aliquam erat volutpat. Donec pretium odio nec felis. Phasellus sagittis lacus eget sapien. Donec est. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;</p>
+        <p>Vestibulum semper. Nullam non odio. Aliquam quam. Mauris eu lectus non nunc auctor ullamcorper. Sed tincidunt molestie enim. Phasellus lobortis justo sit amet quam. Duis nulla erat, varius a, cursus in, tempor sollicitudin, mauris. Aliquam mi velit, consectetuer mattis, consequat tristique, pulvinar ac, nisl. Aliquam mattis vehicula elit. Proin quis leo sed tellus scelerisque molestie. Quisque luctus. Integer mattis. Donec id augue sed leo aliquam egestas. Quisque in sem. Donec dictum enim in dolor. Praesent non erat. Nulla ultrices vestibulum quam.</p>
+        <p>Duis hendrerit, est vel lobortis sagittis, tortor erat scelerisque tortor, sed pellentesque sem enim id metus. Maecenas at pede. Nulla velit libero, dictum at, mattis quis, sagittis vel, ante. Phasellus faucibus rutrum dui. Cras mauris elit, bibendum at, feugiat non, porta id, neque. Nulla et felis nec odio mollis vehicula. Donec elementum tincidunt mauris. Duis vel dui. Fusce iaculis enim ac nulla. In risus.</p>
+        <p>Donec gravida. Donec et enim. Morbi sollicitudin, lacus a facilisis pulvinar, odio turpis dapibus elit, in tincidunt turpis felis nec libero. Nam vestibulum tempus ipsum. In hac habitasse platea dictumst. Nulla facilisi. Donec semper ligula. Donec commodo tortor in quam. Etiam massa. Ut tempus ligula eget tellus. Curabitur id velit ut velit varius commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Fusce ornare pellentesque libero. Nunc rhoncus. Suspendisse potenti. Ut consequat, leo eu accumsan vehicula, justo sem lobortis elit, ac sollicitudin ipsum neque nec ante.</p>
+        <p>Aliquam elementum mauris id sem. Vivamus varius, est ut nonummy consectetuer, nulla quam bibendum velit, ac gravida nisi felis sit amet urna. Aliquam nec risus. Maecenas lacinia purus ut velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse sit amet dui vitae lacus fermentum sodales. Donec varius dapibus nisl. Praesent at velit id risus convallis bibendum. Aliquam felis nibh, rutrum nec, blandit non, mattis sit amet, magna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam varius dignissim nibh. Quisque id orci ac ante hendrerit molestie. Aliquam malesuada enim non neque.</p>
+    </div>
+    <div id="center1" class="x-hide-display">
+        <p><b>Done reading me? Close me by clicking the X in the top right corner.</b></p>
+        <p>Vestibulum semper. Nullam non odio. Aliquam quam. Mauris eu lectus non nunc auctor ullamcorper. Sed tincidunt molestie enim. Phasellus lobortis justo sit amet quam. Duis nulla erat, varius a, cursus in, tempor sollicitudin, mauris. Aliquam mi velit, consectetuer mattis, consequat tristique, pulvinar ac, nisl. Aliquam mattis vehicula elit. Proin quis leo sed tellus scelerisque molestie. Quisque luctus. Integer mattis. Donec id augue sed leo aliquam egestas. Quisque in sem. Donec dictum enim in dolor. Praesent non erat. Nulla ultrices vestibulum quam.</p>
+        <p>Duis hendrerit, est vel lobortis sagittis, tortor erat scelerisque tortor, sed pellentesque sem enim id metus. Maecenas at pede. Nulla velit libero, dictum at, mattis quis, sagittis vel, ante. Phasellus faucibus rutrum dui. Cras mauris elit, bibendum at, feugiat non, porta id, neque. Nulla et felis nec odio mollis vehicula. Donec elementum tincidunt mauris. Duis vel dui. Fusce iaculis enim ac nulla. In risus.</p>
+        <p>Donec gravida. Donec et enim. Morbi sollicitudin, lacus a facilisis pulvinar, odio turpis dapibus elit, in tincidunt turpis felis nec libero. Nam vestibulum tempus ipsum. In hac habitasse platea dictumst. Nulla facilisi. Donec semper ligula. Donec commodo tortor in quam. Etiam massa. Ut tempus ligula eget tellus. Curabitur id velit ut velit varius commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Fusce ornare pellentesque libero. Nunc rhoncus. Suspendisse potenti. Ut consequat, leo eu accumsan vehicula, justo sem lobortis elit, ac sollicitudin ipsum neque nec ante.</p>
+        <p>Aliquam elementum mauris id sem. Vivamus varius, est ut nonummy consectetuer, nulla quam bibendum velit, ac gravida nisi felis sit amet urna. Aliquam nec risus. Maecenas lacinia purus ut velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse sit amet dui vitae lacus fermentum sodales. Donec varius dapibus nisl. Praesent at velit id risus convallis bibendum. Aliquam felis nibh, rutrum nec, blandit non, mattis sit amet, magna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam varius dignissim nibh. Quisque id orci ac ante hendrerit molestie. Aliquam malesuada enim non neque.</p>
+    </div>
+    <div id="props-panel" class="x-hide-display" style="width:200px;height:200px;overflow:hidden;">
+    </div>
+    <div id="south" class="x-hide-display">
+        <p>south - generally for informational stuff, also could be for status bar</p>
+    </div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/hbox.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/hbox.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/hbox.html	(revision 625)
@@ -0,0 +1,365 @@
+<html>
+<head>
+    <title>HBox Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <style type="text/css">
+        html, body {
+            font: normal 12px verdana;
+            margin: 0;
+            padding: 0;
+            border: 0 none;
+        }
+    </style>
+    <script type="text/javascript">
+       
+        Ext.onReady(function() {
+
+            var replace = function(config){
+                var btns = Ext.getCmp('btns');
+
+                btns.remove(0);
+
+                btns.add(Ext.apply(config, {
+                    layout:'hbox'
+                }));
+
+                btns.doLayout();
+            }
+
+
+            var viewport = new Ext.Viewport({
+                layout:'border',
+
+                items: [{
+                    id:'btns',
+                    region:'north',
+                    baseCls:'x-plain',
+                    split:true,
+                    height:50,
+                    minHeight: 40,
+                    maxHeight: 85,
+                    layout:'fit',
+                    margins: '5 5 0 5',
+                    items: {
+                        baseCls: 'x-plain',
+                        html: '<p style="padding:10px;color:#556677;">Select a configuration below:</p>'
+                    }
+               }, {
+                    region:'center',
+                    margins: '0 5 5 5',
+                    layout:'anchor',
+
+                    items:[{
+                        anchor:'100%',
+                        baseCls:'x-plain',
+                        layout:'hbox',
+                        layoutConfig: {
+                            padding: 10
+                        },
+                        defaults:{
+                            margins:'0 5 0 0',
+                            pressed: false,
+                            toggleGroup:'btns',
+                            allowDepress: false
+                        },
+                        items: [{
+                            xtype:'button',
+                            text: 'Spaced',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'top'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'spacer',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: top',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'top'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: middle',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: stretch',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'stretch'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: stretchmax',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'stretchmax'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        }]
+                    },{
+                        anchor:'100%',
+                        baseCls:'x-plain',
+                        layout:'hbox',
+                        layoutConfig: {
+                            padding: '0 10 10'
+                        },
+                        defaults:{
+                            margins:'0 5 0 0',
+                            pressed: false,
+                            toggleGroup:'btns',
+                            allowDepress: false
+                        },
+                        items: [{
+                            xtype:'button',
+                            text: 'Flex: All even',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        flex:1,
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Flex: Ratio',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        flex:3,
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: start',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        pack:'start',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: center',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        pack:'center',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: end',
+                            handler: function(){
+                                replace({
+                                    layoutConfig: {
+                                        padding:'5',
+                                        pack:'end',
+                                        align:'middle'
+                                    },
+                                    defaults:{margins:'0 5 0 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        }]
+                    }]
+                }]
+            });
+        });
+    </script>
+</head>
+<body>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/table.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/table.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/table.html	(revision 625)
@@ -0,0 +1,59 @@
+<html>
+<head>
+    <title>Table Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <style type="text/css">
+        html, body {
+            font: normal 11px verdana;
+        }
+        #main-panel td {
+            padding:5px;
+        }
+    </style>
+    <script type="text/javascript">
+        Ext.onReady(function() {
+            var panel = new Ext.Panel({
+                id:'main-panel',
+                baseCls:'x-plain',
+                renderTo: Ext.getBody(),
+                layout:'table',
+                layoutConfig: {columns:3},
+                // applied to child components
+                defaults: {frame:true, width:200, height: 200},
+                items:[{
+                    title:'Item 1'
+                },{
+                    title:'Item 2'
+                },{
+                    title:'Item 3'
+                },{
+                    title:'Item 4',
+                    width:410,
+                    colspan:2
+                },{
+                    title:'Item 5'
+                },{
+                    title:'Item 6'
+                },{
+                    title:'Item 7',
+                    width:410,
+                    colspan:2
+                },{
+                    title:'Item 8'
+                }]
+            });
+        });
+    </script>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/vbox.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/vbox.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/layout/vbox.html	(revision 625)
@@ -0,0 +1,438 @@
+<html>
+<head>
+    <title>VBox Layout</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <style type="text/css">
+        html, body {
+            font: normal 12px verdana;
+            margin: 0;
+            padding: 0;
+            border: 0 none;
+        }
+    </style>
+    <script type="text/javascript">
+
+        Ext.onReady(function() {
+
+            var replace = function(config){
+                var btns = Ext.getCmp('btns');
+                btns.remove(0);
+                btns.add(config);
+
+                btns.doLayout();
+            }
+
+
+            var viewport = new Ext.Viewport({
+                layout:'border',
+
+                items: [{
+                    id:'btns',
+                    region:'west',
+                    baseCls:'x-plain',
+                    split:true,
+                    width:150,
+                    minWidth: 100,
+                    maxWidth: 250,
+                    layout:'fit',
+                    margins: '5 0 5 5',
+                    items: {
+                        baseCls: 'x-plain',
+                        html: '<p style="padding:10px;color:#556677;font-size:11px;">Select a configuration to the right &raquo;</p>'
+                    }
+               }, {
+                    region:'center',
+                    margins: '5 5 5 0',
+                    layout:{
+                        type:'vbox',
+                        align:'stretch'
+                    },
+                    items:[{
+                        baseCls:'x-plain',
+                        layout: {
+                            type:'hbox',
+                            padding: 10
+                        },
+                        defaults:{
+                            margins:'0 5 0 0',
+                            pressed: false,
+                            toggleGroup:'btns',
+                            allowDepress: false
+                        },
+                        items: [{
+                            xtype:'button',
+                            text: 'Spaced',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'left'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'spacer',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Multi-Spaced',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'left'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'spacer',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'spacer',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'spacer',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: top',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'left'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: middle',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: stretch',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'stretch'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Align: stretchmax',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'stretchmax'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        }]
+                    },{
+                        baseCls:'x-plain',
+                        layout: {
+                            type:'hbox',
+                            padding: '0 10 10'
+                        },
+                        defaults:{
+                            margins:'0 5 0 0',
+                            pressed: false,
+                            toggleGroup:'btns',
+                            allowDepress: false
+                        },
+                        items: [{
+                            xtype:'button',
+                            text: 'Flex: All even',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        flex:1,
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Flex: Ratio',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        flex:3,
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Flex + Stretch',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        align:'stretch'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3',
+                                        flex:1
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        flex:3,
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: start',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        pack:'start',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: center',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        pack:'center',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        },{
+                            xtype:'button',
+                            text: 'Pack: end',
+                            handler: function(){
+                                replace({
+                                    layout: {
+                                        type:'vbox',
+                                        padding:'5',
+                                        pack:'end',
+                                        align:'center'
+                                    },
+                                    defaults:{margins:'0 0 5 0'},
+                                    items:[{
+                                        xtype:'button',
+                                        text: 'Button 1'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 2'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 3'
+                                    },{
+                                        xtype:'button',
+                                        text: 'Button 4',
+                                        margins:'0'
+                                    }]
+                                });
+                            }
+                        }]
+                    }]
+                }]
+            });
+        });
+    </script>
+</head>
+<body>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm-nl.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm-nl.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm-nl.js	(revision 625)
@@ -0,0 +1,21 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+if(Ext.app.ContactForm) {
+    Ext.apply(Ext.app.ContactForm.prototype, {
+        formTitle: 'Contact Informatie (Dutch)',
+        firstName: 'Voornaam',
+        lastName: 'Achternaam',
+        surnamePrefix: 'Tussenvoegsel',
+        company: 'Bedrijf',
+        state: 'Provincie',
+        stateEmptyText: 'Kies een provincie...',
+        email: 'E-mail',
+        birth: 'Geb. Datum',
+        save: 'Opslaan',
+        cancel: 'Annuleren'
+    });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/ContactForm.js	(revision 625)
@@ -0,0 +1,95 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.app');
+
+Ext.app.ContactForm = Ext.extend(Ext.FormPanel, {
+    formTitle: 'Contact Information (English)',
+    firstName: 'First Name',
+    lastName: 'Surname',
+    surnamePrefix: 'Surname Prefix',
+    company: 'Company',
+    state: 'State',
+    stateEmptyText: 'Choose a state...',
+    email: 'E-mail',
+    birth: 'Date of Birth',
+    save: 'Save',
+    cancel: 'Cancel',
+    
+    initComponent : function(config) {
+        Ext.apply(this, {
+            labelWidth: 100, // label settings here cascade unless overridden
+            url:'save-form.php',
+            frame:true,
+            title: this.formTitle,
+            bodyStyle:'padding:5px 5px 0',
+            width: 370,
+            defaults: {width: 220},
+            defaultType: 'textfield',
+    
+            items: [{
+                    fieldLabel: this.firstName,
+                    name: 'firstname',
+                    allowBlank:false
+                },{
+                    fieldLabel: this.lastName,
+                    name: 'lastName'
+                },{
+                    fieldLabel: this.surnamePrefix,
+                    width: 50,
+                    name: 'surnamePrefix'
+                },{
+                    fieldLabel: this.company,
+                    name: 'company'
+                },  new Ext.form.ComboBox({
+                    fieldLabel: this.province,
+                    hiddenName: 'state',
+                    store: new Ext.data.ArrayStore({
+                        fields: ['provincie'],
+                        data : Ext.exampledata.dutch_provinces // from dutch-provinces.js
+                    }),
+                    displayField: 'provincie',
+                    typeAhead: true,
+                    mode: 'local',
+                    triggerAction: 'all',
+                    emptyText: this.stateEmtyText,
+                    selectOnFocus:true,
+                    width:190
+                }), {
+                    fieldLabel: this.email,
+                    name: 'email',
+                    vtype:'email'
+                }, new Ext.form.DateField({
+                    fieldLabel: this.birth,
+                    name: 'birth'
+                })
+            ],
+    
+            buttons: [{
+                text: this.save
+            },{
+                text: this.cancel
+            }]
+        });
+        
+        Ext.app.ContactForm.superclass.initComponent.apply(this, arguments);
+    }
+});
+
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    // turn on validation errors beside the field globally
+    Ext.form.Field.prototype.msgTarget = 'side';
+    
+    var bd = Ext.getBody();
+    
+    bd.createChild({tag: 'h2', html: 'Localized Contact Form'});
+        
+    // simple form
+    var simple = new Ext.app.ContactForm();
+    simple.render(document.body);
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-form.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-form.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-form.html	(revision 625)
@@ -0,0 +1,41 @@
+<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">-->
+<html lang="nl">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Dutch Form</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- include the locale file -->
+    <script type="text/javascript" src="../../source/locale/ext-lang-nl.js"></script>
+
+    <script type="text/javascript" src="dutch-provinces.js"></script>
+    <script type="text/javascript" src="ContactForm.js"></script>
+    <script type="text/javascript" src="ContactForm-nl.js"></script>
+    
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Localization with Ext</h1>
+<p>
+    This demonstrates a dutch location of Ext using the form component. It includes the localization
+    file "ext-lang-nl.js" from the source/locale folder of the Ext download. By placing all language 
+    text such as field labels and button labels and date formats in the prototype, we can easily 
+    localize our components by overriding these values. View 
+    <a href="ContactForm.js" target="_blank">ContactForm.js</a>and 
+    <a href="ContactForm-nl.js" target="_blank">ContactForm-nl.js</a> to learn how Ext applies 
+    internationalization to JavaScript.
+</p>
+
+<p>The js is not minified so it is readable. See <a href="ContactForm.js">ContactForm.js</a> and <a href="ContactForm-nl.js">ContactForm-nl.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-provinces.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-provinces.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/dutch-provinces.js	(revision 625)
@@ -0,0 +1,23 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// some data used in the examples
+Ext.namespace('Ext.exampledata');
+
+Ext.exampledata.dutch_provinces = [
+	['Drenthe'],
+	['Flevoland'],
+	['Friesland'],
+	['Gelderland'],
+	['Groningen'],
+	['Limburg'],
+	['Noord-Brabant'],
+	['Noord-Holland'],
+	['Overijsel'],
+	['Utrecht'],
+	['Zeeland'],
+	['Zuid-Holland']
+    ];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/languages.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/languages.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/languages.js	(revision 625)
@@ -0,0 +1,55 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/* This file is automaticly generated by create_language_js.py */
+
+// some data used in the examples
+Ext.namespace('Ext.exampledata');
+
+// TODO: complete and sort the list
+Ext.exampledata.languages = [
+	['af', 'Afrikaans', 'ISO-8859-2'],
+	['bg', 'Bulgarian', 'utf-8'],
+	['ca', 'Catalonian', 'ascii'],
+	['hr', 'Croatian', 'utf-8'],
+	['cs', 'Czech', 'utf-8'],
+	['da', 'Danish', 'utf-8'],
+	['nl', 'Dutch', 'ascii'],
+	['en', 'English', 'ascii'],
+	['en_UK', 'English (UK)', 'ascii'],
+	['fa', 'Farsi (Persian)', 'utf-8'],
+	['fr_CA', 'France (Canadian)', 'UTF-8'],
+	['fr', 'France (France)', 'UTF-8'],
+	['de', 'German', 'utf-8'],
+	['el_GR', 'Greek', 'utf-8'],
+	['gr', 'Greek (Old Version)', 'utf-8'],
+	['he', 'Hebrew', 'windows-1255'],
+	['hu', 'Hungarian', 'utf-8'],
+	['id', 'Indonesian', 'ascii'],
+	['it', 'Italian', 'ascii'],
+	['ja', 'Japanese', 'utf-8'],
+	['ko', 'Korean', 'utf-8'],
+	['lv', 'Latvian', 'utf-8'],
+	['lt', 'Lithuanian', 'utf-8'],
+	['mk', 'Macedonia', 'utf-8'],
+	['no', 'Norwegian', 'utf-8'],
+	['pl', 'Polish', 'utf-8'],
+	['pt_BR', 'Portuguese/Brazil', 'ascii'],
+	['ro', 'Romanian', 'utf-8'],
+	['ru', 'Russian', 'UTF-8'],
+	['sr_RS', 'Serbian Cyrillic', 'UTF-8'],
+	['sr', 'Serbian Latin', 'utf-8'],
+	['zh_CN', 'Simplified Chinese', 'utf-8'],
+	['sk', 'Slovak', 'utf-8'],
+	['sl', 'Slovenian', 'utf-8'],
+	['es', 'Spanish/Latin American', 'utf-8'],
+	['sv_SE', 'Swedish', 'utf-8'],
+	['th', 'Thailand', 'utf-8'],
+	['zh_TW', 'Traditional Chinese', 'UTF-8'],
+	['tr', 'Turkish', 'utf-8'],
+	['ukr', 'Ukrainian', 'UTF-8'],
+	['vn', 'Vietnamese', 'UTF-8']
+];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.html	(revision 625)
@@ -0,0 +1,53 @@
+<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf8">
+<title>Multiple Languages</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+<script type="text/javascript" src="../../ext-all.js"></script>
+<script type="text/javascript" src="languages.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body class="x-gray">
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<script type="text/javascript">
+var params = Ext.urlDecode(window.location.search.substring(1));
+if (params.lang) {
+    var s = document.createElement("script");
+    s.type = 'text/javascript';
+    s.src = "../../source/locale/ext-lang-"+params.lang+".js";
+    s.charset = params.charset;
+    document.getElementsByTagName("head")[0].appendChild(s);
+}
+</script>
+<script type="text/javascript" src="../ux/PagingMemoryProxy.js"></script>
+<script type="text/javascript" src="multi-lang.js"></script>
+
+<h1>Localization with Extjs</h1>
+<p>
+This demonstrates multiple language with some of the Ext components.<br/>
+Select a language from the combobox below (default is english) and try out the components in different languages.
+</p>
+
+<p>The js is not minified so it is readable. See <a href="multi-lang.js">multi-lang.js</a>.</p>
+
+<div>
+  <div style="float:left;padding:3px 5px 0 0;">Language selector:&nbsp;</div>
+  <div id="languages" style="float:left;"></div>
+</div>
+<br/><br/>
+<h2>Email Field</h2>
+<div id="emailfield"></div>
+<br/>
+<h2>Datepicker</h2>
+<br/>
+<div id="datefield"></div>
+<br/>
+<h2>Grid</h2>
+<br/>
+<div id="grid"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/locale/multi-lang.js	(revision 625)
@@ -0,0 +1,127 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    /* Language chooser combobox  */
+    var store = new Ext.data.ArrayStore({
+        fields: ['code', 'language', 'charset'],
+        data : Ext.exampledata.languages // from languages.js
+    });
+    var combo = new Ext.form.ComboBox({
+        store: store,
+        displayField:'language',
+        typeAhead: true,
+        mode: 'local',
+        triggerAction: 'all',
+        emptyText: 'Select a language...',
+        selectOnFocus: true,
+        onSelect: function(record) {
+            window.location.search = Ext.urlEncode({"lang":record.get("code"),"charset":record.get("charset")});
+        }
+    });
+    combo.render('languages');
+
+    // get the selected language code parameter from url (if exists)
+    var params = Ext.urlDecode(window.location.search.substring(1));
+    
+    if (params.lang) {
+        // check if there's really a language with that language code
+        record = store.data.find(function(item, key){
+            if (item.data.code == params.lang) {
+                return true;
+            }
+            return false;
+        });
+        // if language was found in store assign it as current value in combobox
+        if (record) {
+            combo.setValue(record.data.language);
+        }
+    }
+
+    /* Email field */
+    var emailfield = new Ext.FormPanel({
+        labelWidth: 100, // label settings here cascade unless overridden
+        frame: true,
+        title: 'Email Field',
+        bodyStyle: 'padding:5px 5px 0',
+        width: 360,
+        defaults: {width: 220},
+        defaultType: 'textfield',
+
+        items: [
+            {
+                fieldLabel: 'Email',
+                name: 'email',
+                vtype: 'email'
+            }
+        ]
+    });
+    emailfield.render('emailfield');
+
+    /* Datepicker */
+    var datefield = new Ext.FormPanel({
+        labelWidth: 100, // label settings here cascade unless overridden
+        frame: true,
+        title: 'Datepicker',
+        bodyStyle: 'padding:5px 5px 0',
+        width: 360,
+        defaults: {width: 220},
+        defaultType: 'datefield',
+        items: [
+            {
+                fieldLabel: 'Date',
+                name: 'date'
+            }
+        ]
+    });
+    datefield.render('datefield');
+
+    // shorthand alias
+    var fm = Ext.form, Ed = Ext.grid.GridEditor;
+
+    var monthArray = Date.monthNames.map(function (e) { return [e]; });
+
+    var ds = new Ext.data.Store({
+        proxy: new Ext.ux.data.PagingMemoryProxy(monthArray),
+        reader: new Ext.data.ArrayReader({}, [
+            {name: 'month'}
+        ])
+    });
+
+    var cm = new Ext.grid.ColumnModel([{
+           header: "Months of the year",
+           dataIndex: 'month',
+           editor: new Ed(new fm.TextField({
+               allowBlank: false
+           })),
+           width: 240
+        }]);
+
+    cm.defaultSortable = true;
+
+    var grid = new Ext.grid.GridPanel({
+    width: 360,
+    height: 203,
+    title:'Month Browser',
+    store: ds,
+    cm: cm,
+    sm: new Ext.grid.RowSelectionModel({selectRow:Ext.emptyFn}),
+
+    bbar: new Ext.PagingToolbar({
+            pageSize: 6,
+            store: ds,
+            displayInfo: true
+        })
+    });
+    
+    grid.render('grid');
+
+    // trigger the data store load
+    ds.load({params:{start:0, limit:6}});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.html	(revision 625)
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Actions</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="actions.js"></script>
+    <link rel="stylesheet" type="text/css" href="menus.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Using Ext.Action</h1>
+<p>Actions let you share handlers, configuration and updates across Toolbar, Button and Menu components.</p>
+<p>The js is not minified so it is readable. See <a href="actions.js">actions.js</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/actions.js	(revision 625)
@@ -0,0 +1,66 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    // The action
+    var action = new Ext.Action({
+        text: 'Action 1',
+        handler: function(){
+            Ext.example.msg('Click','You clicked on "Action 1".');
+        },
+        iconCls: 'blist'
+    });
+
+
+    var panel = new Ext.Panel({
+        title: 'Actions',
+        width:600,
+        height:300,
+        bodyStyle: 'padding:10px;',     // lazy inline style
+
+        tbar: [
+            action, {                   // <-- Add the action directly to a toolbar
+                text: 'Action Menu',
+                menu: [action]          // <-- Add the action directly to a menu
+            }
+        ],
+
+        items: [
+           new Ext.Button(action)       // <-- Add the action as a button
+        ],
+
+        renderTo: Ext.getBody()
+    });
+
+    var tb = panel.getTopToolbar();
+    // Buttons added to the toolbar of the Panel above
+    // to test/demo doing group operations with an action
+    tb.add('->', {
+        text: 'Disable',
+        handler: function(){
+            action.setDisabled(!action.isDisabled());
+            this.setText(action.isDisabled() ? 'Enable' : 'Disable');
+        }
+    }, {
+        text: 'Change Text',
+        handler: function(){
+            Ext.Msg.prompt('Enter Text', 'Enter new text for Action 1:', function(btn, text){
+                if(btn == 'ok' && text){
+                    action.setText(text);
+                    action.setHandler(function(){
+                        Ext.example.msg('Click','You clicked on "'+text+'".');
+                    });
+                }
+            });
+        }
+    }, {
+        text: 'Change Icon',
+        handler: function(){
+            action.setIconClass(action.getIconClass() == 'blist' ? 'bmenu' : 'blist');
+        }
+    });
+    tb.doLayout();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.css	(revision 625)
@@ -0,0 +1,35 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#container {
+    width:600px;
+    height:300px;
+    border:3px solid #c3daf9;
+}
+
+.calendar {
+    background-image:url(../../resources/images/default/shared/calendar.gif) !important;
+}
+
+.blist {
+    background-image: url(list-items.gif) !important;
+}
+
+.bmenu {
+    background-image: url(menu-show.gif) !important;
+}
+
+.menu-title{
+    background: #D6E3F2;
+    border-style: solid;
+    border-color:#DAE6F4 #99bbe8 #99bbe8 #DAE6F4;
+    border-width: 1px;
+    margin:-2px -2px 0;
+    color:#15428b;
+    font:bold 10px tahoma,arial,verdana,sans-serif;
+    display:block;
+    padding:3px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.html	(revision 625)
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Toolbar with Menus</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+<script type="text/javascript" src="../form/states.js"></script>
+<script type="text/javascript" src="menus.js"></script>
+<link rel="stylesheet" type="text/css" href="menus.css" />
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Toolbar with Menus</h1>
+<p>The js is not minified so it is readable. See <a href="menus.js">menus.js</a>.</p>
+
+<div id="container">
+    <div id="toolbar"></div>
+</div>
+
+<br /><br /><br /><br /><br />
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/menu/menus.js	(revision 625)
@@ -0,0 +1,216 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    // Menus can be prebuilt and passed by reference
+    var dateMenu = new Ext.menu.DateMenu({
+        handler: function(dp, date){
+            Ext.example.msg('Date Selected', 'You chose {0}.', date.format('M j, Y'));
+        }
+    });
+
+    var colorMenu = new Ext.menu.ColorMenu({
+        handler: function(cm, color){
+            Ext.example.msg('Color Selected', 'You chose {0}.', color);
+        }
+    });
+    
+    var store = new Ext.data.ArrayStore({
+        fields: ['abbr', 'state'],
+        data : Ext.exampledata.states // from states.js
+    });
+
+    var combo = new Ext.form.ComboBox({
+        store: store,
+        displayField: 'state',
+        typeAhead: true,
+        mode: 'local',
+        triggerAction: 'all',
+        emptyText: 'Select a state...',
+        selectOnFocus: true,
+        width: 135,
+        getListParent: function() {
+            return this.el.up('.x-menu');
+        },
+        iconCls: 'no-icon'
+    });
+
+    var menu = new Ext.menu.Menu({
+        id: 'mainMenu',
+        style: {
+            overflow: 'visible'     // For the Combo popup
+        },
+        items: [
+            combo,                  // A Field in a Menu
+            {
+                text: 'I like Ext',
+                checked: true,       // when checked has a boolean value, it is assumed to be a CheckItem
+                checkHandler: onItemCheck
+            }, '-', {
+                text: 'Radio Options',
+                menu: {        // <-- submenu by nested config object
+                    items: [
+                        // stick any markup in a menu
+                        '<b class="menu-title">Choose a Theme</b>',
+                        {
+                            text: 'Aero Glass',
+                            checked: true,
+                            group: 'theme',
+                            checkHandler: onItemCheck
+                        }, {
+                            text: 'Vista Black',
+                            checked: false,
+                            group: 'theme',
+                            checkHandler: onItemCheck
+                        }, {
+                            text: 'Gray Theme',
+                            checked: false,
+                            group: 'theme',
+                            checkHandler: onItemCheck
+                        }, {
+                            text: 'Default Theme',
+                            checked: false,
+                            group: 'theme',
+                            checkHandler: onItemCheck
+                        }
+                    ]
+                }
+            },{
+                text: 'Choose a Date',
+                iconCls: 'calendar',
+                menu: dateMenu // <-- submenu by reference
+            },{
+                text: 'Choose a Color',
+                menu: colorMenu // <-- submenu by reference
+            }
+        ]
+    });
+
+    var tb = new Ext.Toolbar();
+    tb.render('toolbar');
+
+    tb.add({
+            text:'Button w/ Menu',
+            iconCls: 'bmenu',  // <-- icon
+            menu: menu  // assign menu by instance
+        }, 
+        new Ext.Toolbar.SplitButton({
+            text: 'Split Button',
+            handler: onButtonClick,
+            tooltip: {text:'This is a an example QuickTip for a toolbar item', title:'Tip Title'},
+            iconCls: 'blist',
+            // Menus can be built/referenced by using nested menu config objects
+            menu : {
+                items: [{
+                    text: '<b>Bold</b>', handler: onItemClick
+                }, {
+                    text: '<i>Italic</i>', handler: onItemClick
+                }, {
+                    text: '<u>Underline</u>', handler: onItemClick
+                }, '-', {
+                    text: 'Pick a Color',
+                    handler: onItemClick,
+                    menu: {
+                        items: [
+                            new Ext.ColorPalette({
+                                listeners: {
+                                    select: function(cp, color){
+                                        Ext.example.msg('Color Selected', 'You chose {0}.', color);
+                                    }
+                                }
+                            }), '-',
+                            {
+                                text: 'More Colors...',
+                                handler: onItemClick
+                            }
+                        ]
+                    }
+                }, {
+                    text: 'Extellent!',
+                    handler: onItemClick
+                }]
+            }
+        }), '-', {
+        text: 'Toggle Me',
+        enableToggle: true,
+        toggleHandler: onItemToggle,
+        pressed: true
+    });
+
+    menu.addSeparator();
+    // Menus have a rich api for
+    // adding and removing elements dynamically
+    var item = menu.add({
+        text: 'Dynamically added Item'
+    });
+    // items support full Observable API
+    item.on('click', onItemClick);
+
+    // items can easily be looked up
+    menu.add({
+        text: 'Disabled Item',
+        id: 'disableMe'  // <-- Items can also have an id for easy lookup
+        // disabled: true   <-- allowed but for sake of example we use long way below
+    });
+    // access items by id or index
+    menu.items.get('disableMe').disable();
+
+    // They can also be referenced by id in or components
+    tb.add('-', {
+        icon: 'list-items.gif', // icons can also be specified inline
+        cls: 'x-btn-icon',
+        tooltip: '<b>Quick Tips</b><br/>Icon only button with tooltip'
+    }, '-');
+    
+    var scrollMenu = new Ext.menu.Menu();
+    for (var i = 0; i < 50; ++i){
+        scrollMenu.add({
+            text: 'Item ' + (i + 1)
+        });
+    }
+    // scrollable menu
+    tb.add({
+        icon: 'preview.png',
+        cls: 'x-btn-text-icon',
+        text: 'Scrolling Menu',
+        menu: scrollMenu
+    });
+
+    // add a combobox to the toolbar
+    var combo = new Ext.form.ComboBox({
+        store: store,
+        displayField: 'state',
+        typeAhead: true,
+        mode: 'local',
+        triggerAction: 'all',
+        emptyText:'Select a state...',
+        selectOnFocus:true,
+        width:135
+    });
+    tb.addField(combo);
+
+    tb.doLayout();
+
+    // functions to display feedback
+    function onButtonClick(btn){
+        Ext.example.msg('Button Click','You clicked the "{0}" button.', btn.text);
+    }
+
+    function onItemClick(item){
+        Ext.example.msg('Menu Click', 'You clicked the "{0}" menu item.', item.text);
+    }
+
+    function onItemCheck(item, checked){
+        Ext.example.msg('Item Check', 'You {1} the "{0}" menu item.', item.text, checked ? 'checked' : 'unchecked');
+    }
+
+    function onItemToggle(item, pressed){
+        Ext.example.msg('Button Toggled', 'Button "{0}" was toggled to {1}.', item.text, pressed);
+    }
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.html	(revision 625)
@@ -0,0 +1,85 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>MessageBox</title>
+
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <!-- GC -->
+        <!-- LIBS -->
+        <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+        <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="msg-box.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+        .x-window-dlg .ext-mb-download {
+            background:transparent url(images/download.gif) no-repeat top left;
+            height:46px;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>MessageBox Dialogs</h1>
+<p>The example shows how to use the MessageBox class. Some of the buttons have animations, some are normal.</p>
+<p>The js is not minified so it is readable. See <a href="msg-box.js">msg-box.js</a>.</p>
+
+<p>
+    <b>Confirm</b><br />
+    Standard Yes/No dialog.
+    <button id="mb1">Show</button>
+</p>
+
+<p>
+    <b>Prompt</b><br />
+    Standard prompt dialog.
+    <button id="mb2">Show</button>
+</p>
+
+<p>
+    <b>Multi-line Prompt</b><br />
+    A multi-line prompt dialog.
+    <button id="mb3">Show</button>
+</p>
+
+<p>
+    <b>Yes/No/Cancel</b><br />
+    Standard Yes/No/Cancel dialog.
+    <button id="mb4">Show</button>
+</p>
+
+<p>
+    <b>Progress Dialog</b><br />
+    Dialog with measured progress bar.
+    <button id="mb6">Show</button>
+</p>
+
+<p>
+    <b>Wait Dialog</b><br />
+    Dialog with indefinite progress bar and custom icon (will close after 8 sec).
+    <button id="mb7">Show</button>
+</p>
+
+<p>
+    <b>Alert</b><br />
+    Standard alert message dialog.
+    <button id="mb8">Show</button>
+</p>
+
+<p>
+    <b>Icons</b><br />
+    Standard alert with optional icon.
+    <select id="icons">
+        <option id="error" selected="selected">Error</option>
+        <option id="info">Informational</option>
+        <option id="question">Question</option>
+        <option id="warning">Warning</option>
+    </select>
+    <button id="mb9">Show</button>
+</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/message-box/msg-box.js	(revision 625)
@@ -0,0 +1,113 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.get('mb1').on('click', function(e){
+        Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?', showResult);
+    });
+
+    Ext.get('mb2').on('click', function(e){
+        Ext.MessageBox.prompt('Name', 'Please enter your name:', showResultText);
+    });
+
+    Ext.get('mb3').on('click', function(e){
+        Ext.MessageBox.show({
+           title: 'Address',
+           msg: 'Please enter your address:',
+           width:300,
+           buttons: Ext.MessageBox.OKCANCEL,
+           multiline: true,
+           fn: showResultText,
+           animEl: 'mb3'
+       });
+    });
+
+    Ext.get('mb4').on('click', function(e){
+        Ext.MessageBox.show({
+           title:'Save Changes?',
+           msg: 'You are closing a tab that has unsaved changes. <br />Would you like to save your changes?',
+           buttons: Ext.MessageBox.YESNOCANCEL,
+           fn: showResult,
+           animEl: 'mb4',
+           icon: Ext.MessageBox.QUESTION
+       });
+    });
+
+    Ext.get('mb6').on('click', function(){
+        Ext.MessageBox.show({
+           title: 'Please wait',
+           msg: 'Loading items...',
+           progressText: 'Initializing...',
+           width:300,
+           progress:true,
+           closable:false,
+           animEl: 'mb6'
+       });
+
+       // this hideous block creates the bogus progress
+       var f = function(v){
+            return function(){
+                if(v == 12){
+                    Ext.MessageBox.hide();
+                    Ext.example.msg('Done', 'Your fake items were loaded!');
+                }else{
+                    var i = v/11;
+                    Ext.MessageBox.updateProgress(i, Math.round(100*i)+'% completed');
+                }
+           };
+       };
+       for(var i = 1; i < 13; i++){
+           setTimeout(f(i), i*500);
+       }
+    });
+
+    Ext.get('mb7').on('click', function(){
+        Ext.MessageBox.show({
+           msg: 'Saving your data, please wait...',
+           progressText: 'Saving...',
+           width:300,
+           wait:true,
+           waitConfig: {interval:200},
+           icon:'ext-mb-download', //custom class in msg-box.html
+           animEl: 'mb7'
+       });
+        setTimeout(function(){
+            //This simulates a long-running operation like a database save or XHR call.
+            //In real code, this would be in a callback function.
+            Ext.MessageBox.hide();
+            Ext.example.msg('Done', 'Your fake data was saved!');
+        }, 8000);
+    });
+
+    Ext.get('mb8').on('click', function(){
+        Ext.MessageBox.alert('Status', 'Changes saved successfully.', showResult);
+    });
+
+    //Add these values dynamically so they aren't hard-coded in the html
+    Ext.fly('info').dom.value = Ext.MessageBox.INFO;
+    Ext.fly('question').dom.value = Ext.MessageBox.QUESTION;
+    Ext.fly('warning').dom.value = Ext.MessageBox.WARNING;
+    Ext.fly('error').dom.value = Ext.MessageBox.ERROR;
+
+    Ext.get('mb9').on('click', function(){
+        Ext.MessageBox.show({
+           title: 'Icon Support',
+           msg: 'Here is a message with an icon!',
+           buttons: Ext.MessageBox.OK,
+           animEl: 'mb9',
+           fn: showResult,
+           icon: Ext.get('icons').dom.value
+       });
+    });
+
+    function showResult(btn){
+        Ext.example.msg('Button Click', 'You clicked the {0} button', btn);
+    };
+
+    function showResultText(btn, text){
+        Ext.example.msg('Button Click', 'You clicked the {0} button and entered the text "{1}".', btn, text);
+    };
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.html	(revision 625)
@@ -0,0 +1,32 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>MultiSelect &amp; ItemSelector</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/MultiSelect.css"/>
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
+    <script type="text/javascript" src="../../ext-all.js"> </script>
+
+    <script type="text/javascript" src="../ux/MultiSelect.js"></script>
+    <script type="text/javascript" src="../ux/ItemSelector.js"></script>
+    
+    <script type="text/javascript" src="multiselect-demo.js"></script>
+    <script type="text/javascript" src="../shared/examples.js"></script>
+
+</head>
+<body>
+    <h1>MultiSelect &amp; ItemSelector</h1>
+    <p>The js is not minified so it is readable. See <a href="multiselect-demo.js">multiselect-demo.js</a>.</p>
+    
+    <b>MultiSelect</b><br />
+
+    <p>Press Save with no items selected to see an example of validation applied.</p>
+    <div id="multiselect" class="demo-ct" style="margin-bottom:15px;"></div>
+    
+    <b>ItemSelector</b><br />
+    <p>Supports drag and drop, double-click, button move/reorder, etc.
+    <div id="itemselector" class="demo-ct"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/multiselect/multiselect-demo.js	(revision 625)
@@ -0,0 +1,124 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+    Ext.form.Field.prototype.msgTarget = 'side';
+
+    /*
+     * Ext.ux.form.MultiSelect Example Code
+     */
+    var msForm = new Ext.form.FormPanel({
+        title: 'MultiSelect Test',
+        width: 700,
+        bodyStyle: 'padding:10px;',
+        renderTo: 'multiselect',
+        items:[{
+            xtype: 'multiselect',
+            fieldLabel: 'Multiselect<br />(Required)',
+            name: 'multiselect',
+            width: 250,
+            height: 200,
+            allowBlank:false,
+            store: [[123,'One Hundred Twenty Three'],
+                    ['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
+                    ['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
+            tbar:[{
+                text: 'clear',
+                handler: function(){
+	                msForm.getForm().findField('multiselect').reset();
+	            }
+            }],
+            ddReorder: true
+        }],
+        tbar:[{
+            text: 'Options',
+            menu: [{
+	            text: 'Set Value (2,3)',
+	            handler: function(){
+	                msForm.getForm().findField('multiselect').setValue('2,3');
+	            }
+	        },{
+	            text: 'Toggle Enabled',
+	            handler: function(){
+	                var m = msForm.getForm().findField('multiselect');
+	                if (!m.disabled) {
+	                    m.disable();
+	                } else {
+	                    m.enable();
+	                }
+	            }
+            }]
+        }],
+
+        buttons: [{
+            text: 'Save',
+            handler: function(){
+                if(msForm.getForm().isValid()){
+	                Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+
+	                    msForm.getForm().getValues(true));
+                }
+            }
+        }]
+    });
+
+
+    var ds = new Ext.data.ArrayStore({
+        data: [[123,'One Hundred Twenty Three'],
+            ['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
+            ['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
+        fields: ['value','text'],
+        sortInfo: {
+            field: 'value',
+            direction: 'ASC'
+        }
+    });
+
+    /*
+     * Ext.ux.form.ItemSelector Example Code
+     */
+    var isForm = new Ext.form.FormPanel({
+        title: 'ItemSelector Test',
+        width:700,
+        bodyStyle: 'padding:10px;',
+        renderTo: 'itemselector',
+        items:[{
+            xtype: 'itemselector',
+            name: 'itemselector',
+            fieldLabel: 'ItemSelector',
+	        imagePath: '../ux/images/',
+            multiselects: [{
+                width: 250,
+                height: 200,
+                store: ds,
+                displayField: 'text',
+                valueField: 'value'
+            },{
+                width: 250,
+                height: 200,
+                store: [['10','Ten']],
+                tbar:[{
+                    text: 'clear',
+                    handler:function(){
+	                    isForm.getForm().findField('itemselector').reset();
+	                }
+                }]
+            }]
+        }],
+
+        buttons: [{
+            text: 'Save',
+            handler: function(){
+                if(isForm.getForm().isValid()){
+                    Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+
+                        isForm.getForm().getValues(true));
+                }
+            }
+        }]
+    });
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.css	(revision 625)
@@ -0,0 +1,82 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+select{
+	font-size:11px;
+}
+.image-tip{
+	padding:4px;
+	height:98px;
+	white-space:nowrap;
+}
+.image-tip img {
+	margin-right:10px;
+	border:2px solid #083772;
+}
+.image-tip b{
+	color: #083772;
+	display: block;
+	margin-bottom: 4px;
+}
+.image-tip span{
+	display: block;
+	margin-bottom: 5px;
+	margin-left: 5px;
+}
+#images{
+	background: #fff url( ../tree/center-bg.gif ) repeat-x top left;
+	font: 11px Arial, Helvetica, sans-serif;
+}
+#images .thumb{
+	background: #dddddd;
+	padding:3px;
+}
+#images .thumb img{
+	border:1px solid white;
+	height: 60px;
+	width: 80px;
+}
+#images .thumb-wrap{
+	float: left;
+	margin: 4px;
+	margin-right: 0;
+	padding: 5px;
+}
+#images .thumb-wrap span{
+	display: block;
+	overflow: hidden;
+	text-align: center;
+}
+#images .x-view-selected .thumb{
+	background:#8db2e3;
+}
+#images .loading-indicator {
+	font-size:8pt;
+	background-image:url(../../resources/images/default/grid/loading.gif);
+	background-repeat: no-repeat;
+	background-position: left;
+	padding-left:20px;
+	margin:10px;
+}
+.x-dd-drag-proxy .multi-proxy .thumb-img{
+	height: 20px;
+	width: 30px;
+	margin:1px;
+}
+.x-dd-drag-proxy .thumb-img{
+	height: 60px;
+	width: 80px;
+}
+.image-node .x-tree-node-icon{
+    margin-bottom:1px;
+    height:15px;
+}
+.album-node .x-tree-node-icon, .album-btn{
+    background-image:url( ../tree/album.gif ) !important;
+}
+#folders{
+	position:relative;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.html	(revision 625)
@@ -0,0 +1,36 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Organizing Images into Albums</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+     <script type="text/javascript" src="../ux/DataView-more.js"></script>
+<script type="text/javascript" src="organizer.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+<link rel="stylesheet" type="text/css" href="organizer.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Organizing Images into Albums</h1>
+<p>This example shows demonstrates how you can drop anything into the tree.</p>
+<p>This example also shows how a customized DragZone can be
+applied to a JsonView to get automatic lightweight drag and drop of asynchronously loaded data.</p>
+<p>The js is not minified so it is readable. See <a href="organizer.js">organizer.js</a>. The multi image drag drop added a little complexity to the code, but hopefully it is still easy to follow.
+<p>For simplicity, there is no validation on the names you enter in the tree node editor and you can drag the same picture
+into an album as many times as you want.</p>
+<p>Hold shift/control to select multiple images in the main images view. You can drag those images into the tree.</b>
+
+<div id="layout"></div>
+<br /><br /><br /><br /><br />
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/organizer/organizer.js	(revision 625)
@@ -0,0 +1,212 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    Ext.QuickTips.init();
+    // Album toolbar
+    var newIndex = 3;
+    var tb = new Ext.Toolbar({
+        items:[{
+            text: 'New Album',
+            iconCls: 'album-btn',
+            handler: function(){
+                var node = root.appendChild(new Ext.tree.TreeNode({
+                    text:'Album ' + (++newIndex),
+                    cls:'album-node',
+                    allowDrag:false
+                }));
+                tree.getSelectionModel().select(node);
+                setTimeout(function(){
+                    ge.editNode = node;
+                    ge.startEdit(node.ui.textNode);
+                }, 10);
+            }
+        }]
+    });
+
+    // set up the Album tree
+    var tree = new Ext.tree.TreePanel({
+         // tree
+         animate:true,
+         enableDD:true,
+         containerScroll: true,
+         ddGroup: 'organizerDD',
+         rootVisible:false,
+         // layout
+         region:'west',
+         width:200,
+         split:true,
+         // panel
+         title:'My Albums',
+         autoScroll:true,
+         tbar: tb,
+         margins: '5 0 5 5'
+    });
+
+    var root = new Ext.tree.TreeNode({
+        text: 'Albums',
+        allowDrag:false,
+        allowDrop:false
+    });
+    tree.setRootNode(root);
+
+    root.appendChild(
+        new Ext.tree.TreeNode({text:'Album 1', cls:'album-node', allowDrag:false}),
+        new Ext.tree.TreeNode({text:'Album 2', cls:'album-node', allowDrag:false}),
+        new Ext.tree.TreeNode({text:'Album 3', cls:'album-node', allowDrag:false})
+    );
+
+    // add an inline editor for the nodes
+    var ge = new Ext.tree.TreeEditor(tree, {/* fieldconfig here */ }, {
+        allowBlank:false,
+        blankText:'A name is required',
+        selectOnFocus:true
+    });
+
+    // Set up images view
+
+    var view = new Ext.DataView({
+        itemSelector: 'div.thumb-wrap',
+        style:'overflow:auto',
+        multiSelect: true,
+        plugins: new Ext.DataView.DragSelector({dragSafe:true}),
+        store: new Ext.data.JsonStore({
+            url: '../view/get-images.php',
+            autoLoad: true,
+            root: 'images',
+            id:'name',
+            fields:[
+                'name', 'url',
+                {name: 'shortName', mapping: 'name', convert: shortName}
+            ]
+        }),
+        tpl: new Ext.XTemplate(
+            '<tpl for=".">',
+            '<div class="thumb-wrap" id="{name}">',
+            '<div class="thumb"><img src="../view/{url}" class="thumb-img"></div>',
+            '<span>{shortName}</span></div>',
+            '</tpl>'
+        )
+    });
+
+    var images = new Ext.Panel({
+        id:'images',
+        title:'My Images',
+        region:'center',
+        margins: '5 5 5 0',
+        layout:'fit',
+        
+        items: view
+    });
+
+    var layout = new Ext.Panel({
+        layout: 'border',
+        width:650,
+        height:400,
+        items: [tree, images]
+    });
+
+    layout.render('layout');
+
+    var dragZone = new ImageDragZone(view, {containerScroll:true,
+        ddGroup: 'organizerDD'});
+});
+
+
+
+/**
+ * Create a DragZone instance for our JsonView
+ */
+ImageDragZone = function(view, config){
+    this.view = view;
+    ImageDragZone.superclass.constructor.call(this, view.getEl(), config);
+};
+Ext.extend(ImageDragZone, Ext.dd.DragZone, {
+    // We don't want to register our image elements, so let's 
+    // override the default registry lookup to fetch the image 
+    // from the event instead
+    getDragData : function(e){
+        var target = e.getTarget('.thumb-wrap');
+        if(target){
+            var view = this.view;
+            if(!view.isSelected(target)){
+                view.onClick(e);
+            }
+            var selNodes = view.getSelectedNodes();
+            var dragData = {
+                nodes: selNodes
+            };
+            if(selNodes.length == 1){
+                dragData.ddel = target;
+                dragData.single = true;
+            }else{
+                var div = document.createElement('div'); // create the multi element drag "ghost"
+                div.className = 'multi-proxy';
+                for(var i = 0, len = selNodes.length; i < len; i++){
+                    div.appendChild(selNodes[i].firstChild.firstChild.cloneNode(true)); // image nodes only
+                    if((i+1) % 3 == 0){
+                        div.appendChild(document.createElement('br'));
+                    }
+                }
+                var count = document.createElement('div'); // selected image count
+                count.innerHTML = i + ' images selected';
+                div.appendChild(count);
+                
+                dragData.ddel = div;
+                dragData.multi = true;
+            }
+            return dragData;
+        }
+        return false;
+    },
+
+    // this method is called by the TreeDropZone after a node drop
+    // to get the new tree node (there are also other way, but this is easiest)
+    getTreeNode : function(){
+        var treeNodes = [];
+        var nodeData = this.view.getRecords(this.dragData.nodes);
+        for(var i = 0, len = nodeData.length; i < len; i++){
+            var data = nodeData[i].data;
+            treeNodes.push(new Ext.tree.TreeNode({
+                text: data.name,
+                icon: '../view/'+data.url,
+                data: data,
+                leaf:true,
+                cls: 'image-node'
+            }));
+        }
+        return treeNodes;
+    },
+    
+    // the default action is to "highlight" after a bad drop
+    // but since an image can't be highlighted, let's frame it 
+    afterRepair:function(){
+        for(var i = 0, len = this.dragData.nodes.length; i < len; i++){
+            Ext.fly(this.dragData.nodes[i]).frame('#8db2e3', 1);
+        }
+        this.dragging = false;    
+    },
+    
+    // override the default repairXY with one offset for the margins and padding
+    getRepairXY : function(e){
+        if(!this.dragData.multi){
+            var xy = Ext.Element.fly(this.dragData.ddel).getXY();
+            xy[0]+=3;xy[1]+=3;
+            return xy;
+        }
+        return false;
+    }
+});
+
+// Utility functions
+
+function shortName(name){
+    if(name.length > 15){
+        return name.substr(0, 12) + '...';
+    }
+    return name;
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/BubblePanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/BubblePanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/BubblePanel.js	(revision 625)
@@ -0,0 +1,10 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.BubblePanel = Ext.extend(Ext.Panel, {
+    baseCls: 'x-bubble',
+    frame: true
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.html	(revision 625)
@@ -0,0 +1,45 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>BubblePanel</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<link rel="stylesheet" type="text/css" href="css/bubble.css" />
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="BubblePanel.js"></script>
+    <script type="text/javascript" src="bubble-panel.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+	body {
+	    background-color: #4E79B2 !important;
+	}
+	#bubble-markup em {
+		font-style: italic
+	}
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<div id="bubble-markup" class="x-hidden">
+<p>This is a custom panel subclass to achieve a different look and feel while not changing the default appearance of an Ext.Panel. </p>
+
+<p>The js is not minified so it is readable. See <a href="BubblePanel.js">BubblePanel.js</a> and <a href="bubble-panel.js">bubble-panel.js</a>.</p>
+
+<p>The majority of the work is actually done in <a href="css/bubble.css">bubble.css</a>. Ext.ux.BubblePanel defines a custom baseCls ('x-bubble') which will generate unique CSS classes for the markup in a Panel such as <em>'x-bubble-tl'</em>, <em>'x-bubble-tr'</em> and <em>'x-bubble-tc'</em>.</p>
+
+</div>
+
+<div id="bubbleCt" style="padding-top: 5px;"></div>
+<div id="panelCt" style="padding-top: 5px;"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/bubble-panel.js	(revision 625)
@@ -0,0 +1,35 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){   
+    var title = new Ext.ux.BubblePanel({
+	bodyStyle: 'padding-left: 8px;color: #0d2a59',
+	renderTo: 'bubbleCt',
+	html: '<h3>Ext.ux.BubblePanel</h3',
+	width: 200,
+	autoHeight: true
+    });
+    var cp = new Ext.ux.BubblePanel({
+	renderTo: 'bubbleCt',
+	padding: 5,
+	width: 400,
+	autoHeight: true,
+	contentEl: 'bubble-markup'
+    });
+
+    var plainOldPanel = new Ext.Panel({
+        renderTo: 'panelCt',
+	padding: 5,
+	frame: true,
+	width: 400,
+	autoHeight: true,
+	title: 'Plain Old Panel',
+	html: Ext.example.bogusMarkup
+    });
+
+});
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/css/bubble.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/css/bubble.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/css/bubble.css	(revision 625)
@@ -0,0 +1,69 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+.x-bubble-ml {
+    padding-left:4px;
+	background:transparent url(../images/bubble-lr.gif) repeat-y 0 0;
+	zoom:1;
+}
+
+.x-bubble-mr {
+    padding-right:4px;
+	background:transparent url(../images/bubble-lr.gif) repeat-y right 0;
+	zoom:1;
+}
+.x-bubble-mc {
+	background:#fff;
+	overflow:hidden;
+}
+
+.x-bubble-tl {
+    
+    background: #fff url(../images/bubble-cs.gif) no-repeat 0 0;
+    padding-left:11px;
+    zoom:1;
+}
+.x-bubble-tr {
+    background: transparent url(../images/bubble-cs.gif) no-repeat right top;
+    padding-right:11px;
+    zoom:1;
+}
+.x-bubble-tc {
+    height: 9px;
+    overflow: hidden;
+    padding-top: 4px;
+    background: #fff url(../images/bubble-tb.gif) repeat-x 0 0;
+}
+
+.x-bubble-bl {
+	background: #fff url(../images/bubble-cs.gif) no-repeat 0 bottom;
+	padding-left:11px;
+    zoom:1;
+}
+.x-bubble-br {
+	background: transparent url(../images/bubble-cs.gif) no-repeat right bottom;
+	padding-right:11px;
+    zoom:1;
+}
+.x-bubble-bc {
+	height:11px;
+	font-size:1px;
+	line-height:1px;
+	overflow:hidden;
+	background: #fff url(../images/bubble-tb.gif) repeat-x 0 bottom;
+}
+.x-bubble-bwrap {	
+	background: #fff url(../images/bubble-tb.gif) repeat-x 0 0;
+	overflow:hidden;
+	zoom:1;
+
+}
+.x-bubble-body {
+	background: #fff;
+	overflow:hidden;
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.html	(revision 625)
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Panel</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="panels.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+    .x-panel-body p {
+        margin:10px;
+    }
+    .container {
+        padding:10px;
+    }
+	em.cfg { font-style: italic; font-weight: bold;}
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Ext.Panel</h1>
+<p>The js is not minified so it is readable. See <a href="panels.js">panels.js</a>.</p>
+
+<div id="panel-basic" class="container">
+</div>
+
+<div id="panel-reset-true" class="container">
+	<p>Setting the Ext.Panel configuration-option <em class="cfg">preventBodyReset: true</em> will ensure your Panel <b>body</b>'s structural html is isolated from the Ext theme.</p>
+</div>
+
+<div id="panel-reset-false" class="container">
+	<p>Compare the same panel rendered with <em class="cfg">preventBodyReset: false</em></p>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/panel/panels.js	(revision 625)
@@ -0,0 +1,55 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var p = new Ext.Panel({
+        title: 'My Panel',
+        collapsible:true,
+        renderTo: 'panel-basic',
+        width:400,
+        html: Ext.example.bogusMarkup
+    });
+
+	// preventBodyReset: true
+	new Ext.Panel({
+		title: 'A Panel with W3C-suggested body-html styling',
+		preventBodyReset: true,
+		renderTo: 'panel-reset-true',
+		width: 400,
+		html: html.join('')
+	});
+
+	// preventBodyReset: false
+	new Ext.Panel({
+		title: 'Same panel as above with preventBodyReset: false',
+		normal: false,
+		renderTo: 'panel-reset-false',
+		width: 400,
+		html: html.join('')
+	});
+});
+
+// Some sample html
+var html = [
+	'<h1>Heading One</h1>',
+	'<h2>Heading Two</h2>',
+	'<p>This is a paragraph with <strong>STRONG</strong>, <em>EMPHASIS</em> and a <a href="#">Link</a></p>',
+	'<table>',
+		'<tr>',
+			'<td>Table Column One</td>',
+			'<td>Table Column Two</td>',
+		'</tr>',
+	'</table>',
+	'<ul>',
+		'<li>Un-ordered List-item One</li>',
+		'<li>Un-ordered List-item One</li>',
+	'</ul>',
+	'<ol>',
+		'<li>Ordered List-item One</li>',
+		'<li>Ordered List-item Two</li>',
+	'</ol>',
+	'<blockquote>This is a blockquote</blockquote>'
+];
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.html	(revision 625)
@@ -0,0 +1,41 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Custom Layouts and Containers - Portal Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/Portal.css" />
+
+    <!-- page specific -->
+    <link rel="stylesheet" type="text/css" href="sample.css" />
+    <style type="text/css">
+
+    </style>
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/Portal.js"></script>
+    <script type="text/javascript" src="../ux/PortalColumn.js"></script>
+    <script type="text/javascript" src="../ux/Portlet.js"></script>
+
+    <!-- page specific -->
+	<script type="text/javascript" src="sample-grid.js"></script>
+    <script type="text/javascript" src="../shared/examples.js"></script>
+
+	<script type="text/javascript" src="portal.js"></script>
+
+</head>
+<body></body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/portal.js	(revision 625)
@@ -0,0 +1,115 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    // NOTE: This is an example showing simple state management. During development,
+    // it is generally best to disable state management as dynamically-generated ids
+    // can change across page loads, leading to unpredictable results.  The developer
+    // should ensure that stable state ids are set for stateful components in real apps.
+    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+
+    // create some portlet tools using built in Ext tool ids
+    var tools = [{
+        id:'gear',
+        handler: function(){
+            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
+        }
+    },{
+        id:'close',
+        handler: function(e, target, panel){
+            panel.ownerCt.remove(panel, true);
+        }
+    }];
+
+    var viewport = new Ext.Viewport({
+        layout:'border',
+        items:[{
+            region:'west',
+            id:'west-panel',
+            title:'West',
+            split:true,
+            width: 200,
+            minSize: 175,
+            maxSize: 400,
+            collapsible: true,
+            margins:'35 0 5 5',
+            cmargins:'35 5 5 5',
+            layout:'accordion',
+            layoutConfig:{
+                animate:true
+            },
+            items: [{
+                html: Ext.example.shortBogusMarkup,
+                title:'Navigation',
+                autoScroll:true,
+                border:false,
+                iconCls:'nav'
+            },{
+                title:'Settings',
+                html: Ext.example.shortBogusMarkup,
+                border:false,
+                autoScroll:true,
+                iconCls:'settings'
+            }]
+        },{
+            xtype:'portal',
+            region:'center',
+            margins:'35 5 5 0',
+            items:[{
+                columnWidth:.33,
+                style:'padding:10px 0 10px 10px',
+                items:[{
+                    title: 'Grid in a Portlet',
+                    layout:'fit',
+                    tools: tools,
+                    items: new SampleGrid([0, 2, 3])
+                },{
+                    title: 'Another Panel 1',
+                    tools: tools,
+                    html: Ext.example.shortBogusMarkup
+                }]
+            },{
+                columnWidth:.33,
+                style:'padding:10px 0 10px 10px',
+                items:[{
+                    title: 'Panel 2',
+                    tools: tools,
+                    html: Ext.example.shortBogusMarkup
+                },{
+                    title: 'Another Panel 2',
+                    tools: tools,
+                    html: Ext.example.shortBogusMarkup
+                }]
+            },{
+                columnWidth:.33,
+                style:'padding:10px',
+                items:[{
+                    title: 'Panel 3',
+                    tools: tools,
+                    html: Ext.example.shortBogusMarkup
+                },{
+                    title: 'Another Panel 3',
+                    tools: tools,
+                    html: Ext.example.shortBogusMarkup
+                }]
+            }]
+            
+            /*
+             * Uncomment this block to test handling of the drop event. You could use this
+             * to save portlet position state for example. The event arg e is the custom 
+             * event defined in Ext.ux.Portal.DropZone.
+             */
+//            ,listeners: {
+//                'drop': function(e){
+//                    Ext.Msg.alert('Portlet Dropped', e.panel.title + '<br />Column: ' + 
+//                        e.columnIndex + '<br />Position: ' + e.position);
+//                }
+//            }
+        }]
+    });
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample-grid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample-grid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample-grid.js	(revision 625)
@@ -0,0 +1,99 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+SampleGrid = function(limitColumns){
+
+    function italic(value){
+        return '<i>' + value + '</i>';
+    }
+
+    function change(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '</span>';
+        }
+        return val;
+    }
+
+    function pctChange(val){
+        if(val > 0){
+            return '<span style="color:green;">' + val + '%</span>';
+        }else if(val < 0){
+            return '<span style="color:red;">' + val + '%</span>';
+        }
+        return val;
+    }
+
+
+    var columns = [
+        {id:'company',header: "Company", width: 160, sortable: true, dataIndex: 'company'},
+        {header: "Price", width: 75, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+        {header: "Change", width: 75, sortable: true, renderer: change, dataIndex: 'change'},
+        {header: "% Change", width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
+        {header: "Last Updated", width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+    ];
+
+    // allow samples to limit columns
+    if(limitColumns){
+        var cs = [];
+        for(var i = 0, len = limitColumns.length; i < len; i++){
+            cs.push(columns[limitColumns[i]]);
+        }
+        columns = cs;
+    }
+
+    SampleGrid.superclass.constructor.call(this, {
+        store: new Ext.data.Store({
+            reader: new Ext.data.ArrayReader({}, [
+                   {name: 'company'},
+                   {name: 'price', type: 'float'},
+                   {name: 'change', type: 'float'},
+                   {name: 'pctChange', type: 'float'},
+                   {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+              ]),
+            data: [
+                ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+                ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+                ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
+                ['American Express Company',52.55,0.01,0.02,'9/1 12:00am'],
+                ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am'],
+                ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am'],
+                ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+                ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am'],
+                ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am'],
+                ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am'],
+                ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am'],
+                ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am'],
+                ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am'],
+                ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+                ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am'],
+                ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am'],
+                ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am'],
+                ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am'],
+                ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am'],
+                ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am'],
+                ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am'],
+                ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am'],
+                ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am'],
+                ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am'],
+                ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am'],
+                ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am'],
+                ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am'],
+                ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am'],
+                ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+            ]
+        }),
+        columns: columns,
+        autoExpandColumn: 'company',
+        height:250,
+        width:600
+    });
+
+
+}
+
+Ext.extend(SampleGrid, Ext.grid.GridPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/portal/sample.css	(revision 625)
@@ -0,0 +1,25 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html, body {
+    font:normal 12px verdana;
+    margin:0;
+    padding:0;
+    border:0 none;
+    overflow:hidden;
+    height:100%;
+}
+
+.x-panel-body p {
+    margin:5px;
+}
+    
+.settings {
+    background-image:url( ../shared/icons/fam/folder_wrench.png ) !important;
+}
+.nav {
+    background-image:url( ../shared/icons/fam/folder_go.png ) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.css	(revision 625)
@@ -0,0 +1,38 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#basic, #animated {
+    border:1px solid #c3daf9;
+    color:#1e4e8f;
+    font:bold 14px tahoma,verdana,helvetica;
+    text-align:center;
+    padding-top:20px;
+	 width:200px;
+	 height:80px;
+}
+#snap {
+    border:1px solid #c3daf9;
+    overflow:hidden;
+}
+#custom {
+    cursor:move;
+}
+#custom-rzwrap{
+    z-index: 10000;
+}
+#custom-rzwrap .x-resizable-handle{
+    width:11px;
+    height:11px;
+    background:transparent url(../../resources/images/sizer/square.gif) no-repeat;
+    margin:0px;
+	 line-height:11px;
+}
+#custom-rzwrap .x-resizable-handle-east, #custom-rzwrap .x-resizable-handle-west{
+    top:45%;
+}
+#custom-rzwrap .x-resizable-handle-north, #custom-rzwrap .x-resizable-handle-south{
+    left:45%;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.html	(revision 625)
@@ -0,0 +1,184 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Resizable Examples</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+   <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+<script language="javascript" src="basic.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+<style type="text/css">
+#basic, #animated {
+    border:1px solid #c3daf9;
+    color:#1e4e8f;
+    font:bold 14px tahoma,verdana,helvetica;
+    text-align:center;
+    padding-top:20px;
+}
+#snap {
+    border:1px solid #c3daf9;
+    overflow:hidden;
+}
+#custom {
+    cursor:move;
+}
+#custom-rzwrap{
+    z-index: 100;
+}
+#custom-rzwrap .x-resizable-handle{
+    width:11px;
+    height:11px;
+    background:transparent url(../../resources/images/default/sizer/square.gif) no-repeat;
+    margin:0px;
+}
+#custom-rzwrap .x-resizable-handle-east, #custom-rzwrap .x-resizable-handle-west{
+    top:45%;
+}
+#custom-rzwrap .x-resizable-handle-north, #custom-rzwrap .x-resizable-handle-south{
+    left:45%;
+}
+</style>
+</head>
+
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Resizable Examples</h1>
+<p>These examples show how to apply a floating (default) and pinned Resizable component to a standard element.</p>
+<p>Note that the js is not minified so it is readable. See <a href="basic.js">basic.js</a> for the full source code.</p>
+
+<p>
+    <b>Basic Example</b><br />
+    This is a basic as you get. To resize the box, position your mouse anywhere near the bottom,
+    right or border right edge of the box. This example uses the default "floating" handles.
+</p>
+<div id="basic">Resize Me!</div>
+<pre class="code"><code>var basic = new Ext.Resizable('basic', {
+        width: 200,
+        height: 100,
+        minWidth:100,
+        minHeight:50
+});</code></pre>
+<hr>
+<p>
+    <b>Wrapped Elements</b><br />
+    Some elements such as images and textareas don't allow child elements. In the past, you had
+    to wrap these elements and set up a Resizable with resize child. Resizable will
+    wrap the element, calculate adjustments for borders/padding and offset the handles for you. All you have to
+    do is set "wrap:true". The manual way of specifying a "resizeChild" is still supported as well.
+</p><p>
+    <b>Pinned Handles</b><br />
+    Notice this example has the resize handles "pinned". This is done by setting "pinned:true".
+</p><p>
+    <b>Dynamic Sizing</b><br />
+    If you don't like the proxy resizing, you can also turn on dynamic sizing. Just set "dynamic:true".
+</p>
+<p>
+    Here's a textarea that is wrapped, has pinned handles and has dynamic sizing turned on.
+</p>
+<textarea id="dwrapped">
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna. Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa.
+Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit. Quisque dolor magna, ornare sed, elementum porta, luctus in, leo.
+</textarea><br /><br />
+And look how simple the code is, even my grandma could write it.
+<pre class="code"><code>var dwrapped = new Ext.Resizable('dwrapped', {
+    wrap:true,
+    pinned:true,
+    width:450,
+    height:150,
+    minWidth:200,
+    minHeight: 50,
+    dynamic: true
+});</code></pre>
+<hr>
+<p>
+<b>Preserve Ratio</b><br />
+    For some things like images, you will probably want to preserve the ratio of width to height. Just set preserveRatio:true.
+</p>
+<img id="wrapped" src="sara.jpg" width="200" height="250"/>
+<pre class="code"><code>var wrapped = new Ext.Resizable('wrapped', {
+    wrap:true,
+    pinned:true,
+    minWidth:50,
+    minHeight: 50,
+    preserveRatio: true
+});</code></pre>
+<hr>
+<p>
+<b>Transparent Handles</b><br />
+    If you just want the element to be resizable without any fancy handles, set transparent to true.
+</p>
+<img id="transparent" src="zack.jpg" width="100" height="176"/>
+<pre class="code"><code>var transparent = new Ext.Resizable('transparent', {
+    wrap:true,
+    minWidth:50,
+    minHeight: 50,
+    preserveRatio: true,
+    transparent:true
+});</code></pre>
+<hr>
+<p>
+    <b>Customizable Handles</b><br />
+    Resizable elements are resizable 8 ways. 8 way resizing for a static positioned element will cause the element to be positioned relative and taken out of the document flow. For resizing which adjusts the
+    x and y of the element, the element should be positioned absolute. You can also control which handles are displayed by setting the "handles" attribute.
+    The handles are styled using CSS so they can be customized to look however you would like them to. 
+</p>
+<p>
+    This image has 8 way resizing, custom handles, is draggable and 8 way preserved ratio (that wasn't easy!).<br />
+    <b>Double click anywhere on the image to hide it when you are done.</b>
+</p>
+<img id="custom" src="sara_and_zack.jpg" width="200" height="152" style="position:absolute;left:0;top:0;"/>
+<div style="padding:8px;border:1px solid #c3daf9;background:#d9e8fb;width:150px;text-align:center;"><button id="showMe">Show Me</button></div>
+<pre class="code"><code>var custom = new Ext.Resizable('custom', {
+    wrap:true,
+    pinned:true,
+    minWidth:50,
+    minHeight: 50,
+    preserveRatio: true,
+    dynamic:true,
+    handles: 'all', // shorthand for 'n s e w ne nw se sw'
+    draggable:true
+});</code></pre>
+<hr>
+<p>
+    <b>Snapping</b><br />
+    Resizable also supports basic snapping in increments. 
+</p>
+<div id="snap"></div>
+<pre class="code"><code>var snap = new Ext.Resizable('snap', {
+    pinned:true,
+    width:250,
+    height:100,
+    handles: 'e',
+    widthIncrement:50,
+    minWidth: 50,
+    dynamic: true
+});
+</code></pre>
+Warning: Snapping and preserveRatio conflict and can not be used together.
+<hr>
+<p>
+    <b>Animated Transitions</b><br />
+    Resize operations can also be animated. Animations support configurable easing and duration.
+    Here's a very basic clone of the first element, but with animation turned on. I used a "backIn"
+    easing and made it a little slower than default.
+</p>
+<div id="animated">Animate Me!</div>
+<pre class="code"><code>var animated = new Ext.Resizable('animated', {
+    width: 200,
+    height: 100,
+    minWidth:100,
+    minHeight:50,
+    animate:true,
+    easing: 'backIn',
+    duration:.6
+});</code></pre>
+Warning: for obvious reasons animate and dynamic resizing can not be used together.
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/resizable/basic.js	(revision 625)
@@ -0,0 +1,90 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+var ResizableExample = {
+    init : function(){
+        
+        var basic = new Ext.Resizable('basic', {
+                width: 200,
+                height: 100,
+                minWidth:100,
+                minHeight:50
+        });
+        
+        var animated = new Ext.Resizable('animated', {
+                width: 200,
+                pinned: true,
+                height: 100,
+                minWidth:100,
+                minHeight:50,
+                animate:true,
+                easing: 'backIn',
+                duration:.6
+        });
+        
+        var wrapped = new Ext.Resizable('wrapped', {
+            wrap:true,
+            pinned:true,
+            minWidth:50,
+            minHeight: 50,
+            preserveRatio: true
+        });
+        
+        var transparent = new Ext.Resizable('transparent', {
+            wrap:true,
+            minWidth:50,
+            minHeight: 50,
+            preserveRatio: true,
+            transparent:true
+        });
+        
+        var custom = new Ext.Resizable('custom', {
+            wrap:true,
+            pinned:true,
+            minWidth:50,
+            minHeight: 50,
+            preserveRatio: true,
+            handles: 'all',
+            draggable:true,
+            dynamic:true
+        });
+        var customEl = custom.getEl();
+        // move to the body to prevent overlap on my blog
+        document.body.insertBefore(customEl.dom, document.body.firstChild);
+        
+        customEl.on('dblclick', function(){
+            customEl.hide(true);
+        });
+        customEl.hide();
+        
+        Ext.get('showMe').on('click', function(){
+            customEl.center();
+            customEl.show(true);
+        });
+        
+        var dwrapped = new Ext.Resizable('dwrapped', {
+            wrap:true,
+            pinned:true,
+            width:450,
+            height:150,
+            minWidth:200,
+            minHeight: 50,
+            dynamic: true
+        });
+        
+        var snap = new Ext.Resizable('snap', {
+            pinned:true,
+            width:250,
+            height:100,
+            handles: 'e',
+            widthIncrement:50,
+            minWidth: 50,
+            dynamic: true
+        });
+    }
+};
+
+Ext.EventManager.onDocumentReady(ResizableExample.init, ResizableExample, true);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/app.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/app.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/app.php	(revision 625)
@@ -0,0 +1,14 @@
+<?php
+    require('remote/init.php');
+
+    // Get Request
+    $request = new Request(array('restful' => true));
+
+    // Get Controller
+    require('remote/app/controllers/' . $request->controller . '.php');
+    $controller_name = ucfirst($request->controller);
+    $controller = new $controller_name;
+
+    // Dispatch request
+    echo $controller->dispatch($request);
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/controllers/users.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/controllers/users.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/controllers/users.php	(revision 625)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * @class Users
+ * A simple application controller extension
+ */
+class Users extends ApplicationController {
+    /**
+     * view
+     * Retrieves rows from database.
+     */
+    public function view() {
+        $res = new Response();
+        $res->success = true;
+        $res->message = "Loaded data";
+        $res->data = User::all();
+        return $res->to_json();
+    }
+    /**
+     * create
+     */
+    public function create() {
+        $res = new Response();
+        $rec = User::create($this->params);
+        if ($rec) {
+            $res->success = true;
+            $res->message = "Created new User" . $rec->id;
+            $res->data = $rec->to_hash();
+        } else {
+            $res->message = "Failed to create User";
+        }
+        return $res->to_json();
+    }
+    /**
+     * update
+     */
+    public function update() {
+        $res = new Response();
+        $rec = User::update($this->id, $this->params);
+        if ($rec) {
+            $res->data = $rec->to_hash();
+            $res->success = true;
+            $res->message = 'Updated User ' . $this->id;
+        } else {
+            $res->message = "Failed to find that User";
+        }
+        return $res->to_json();
+    }
+    /**
+     * destroy
+     */
+    public function destroy() {
+        $res = new Response();
+        if (User::destroy($this->id)) {
+            $res->success = true;
+            $res->message = 'Destroyed User ' . $this->id;
+        } else {
+            $res->message = "Failed to destroy User";
+        }
+        return $res->to_json();
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/models/user.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/models/user.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/app/models/user.php	(revision 625)
@@ -0,0 +1,7 @@
+<?php
+/**
+ * @class User
+ */
+class User extends Model {
+
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/init.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/init.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/init.php	(revision 625)
@@ -0,0 +1,17 @@
+<?php
+    session_start();
+
+    // base framework
+    require(dirname(__FILE__).'/lib/session_db.php');
+    require(dirname(__FILE__).'/lib/application_controller.php');
+    require(dirname(__FILE__).'/lib/model.php');
+    require(dirname(__FILE__).'/lib/request.php');
+    require(dirname(__FILE__).'/lib/response.php');
+
+    // require /models (Should iterate app/models and auto-include all files there)
+    require(dirname(__FILE__).'/app/models/user.php');
+
+    // Fake a database connection using _SESSION
+    $dbh = new SessionDB();
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/application_controller.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/application_controller.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/application_controller.php	(revision 625)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * @class ApplicationController
+ */
+class ApplicationController {
+    public $request, $id, $params;
+
+    /**
+     * dispatch
+     * Dispatch request to appropriate controller-action by convention according to the HTTP method.
+     */
+    public function dispatch($request) {
+        $this->request = $request;
+        $this->id = $request->id;
+        $this->params = $request->params;
+
+        if ($request->isRestful()) {
+            return $this->dispatchRestful();
+        }
+        if ($request->action) {
+            return $this->{$request->action}();
+        }
+    }
+
+    protected function dispatchRestful() {
+        switch ($this->request->method) {
+            case 'GET':
+                return $this->view();
+                break;
+            case 'POST':
+                return $this->create();
+                break;
+            case 'PUT':
+                return $this->update();
+                break;
+            case 'DELETE':
+                return $this->destroy();
+                break;
+        }
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/model.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/model.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/model.php	(revision 625)
@@ -0,0 +1,70 @@
+<?php
+/**
+ * @class Model
+ * Baseclass for Models in this imaginary ORM
+ */
+class Model {
+    public $id, $attributes;
+    static function create($params) {
+        $obj = new self($params);
+        $obj->save();
+        return $obj;
+    }
+    static function find($id) {
+        global $dbh;
+        $found = null;
+        foreach ($dbh->rs() as $rec) {
+            if ($rec['id'] == $id) {
+                $found = new self($rec);
+                break;
+            }
+        }
+        return $found;
+    }
+    static function update($id, $params) {
+        global $dbh;
+        $rec = self::find($id);
+        if ($rec == null) {
+            return $rec;
+        }
+        $rs = $dbh->rs();
+        foreach ($rs as $idx => $row) {
+            if ($row['id'] == $id) {
+                $rec->attributes = array_merge($rec->attributes, $params);
+                $dbh->update($idx, $rec->attributes);
+                break;
+            }
+        }
+        return $rec;
+    }
+    static function destroy($id) {
+        global $dbh;
+        $rec = null;
+        $rs = $dbh->rs();
+        foreach ($rs as $idx => $row) {
+            if ($row['id'] == $id) {
+                $rec = new self($dbh->destroy($idx));
+                break;
+            }
+        }
+        return $rec;
+    }
+    static function all() {
+        global $dbh;
+        return $dbh->rs();
+    }
+
+    public function __construct($params) {
+        $this->id = $params["id"] || null;
+        $this->attributes = $params;
+    }
+    public function save() {
+        global $dbh;
+        $this->attributes['id'] = $dbh->pk();
+        $dbh->insert($this->attributes);
+    }
+    public function to_hash() {
+        return $this->attributes;
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/request.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/request.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/request.php	(revision 625)
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @class Request
+ */
+class Request {
+    public $restful, $method, $controller, $action, $id, $params;
+
+    public function __construct($params) {
+        $this->restful = (isset($params["restful"])) ? $params["restful"] : false;
+        $this->method = $_SERVER["REQUEST_METHOD"];
+        $this->parseRequest();
+    }
+    public function isRestful() {
+        return $this->restful;
+    }
+    protected function parseRequest() {
+        if ($this->method == 'PUT') {   // <-- Have to jump through hoops to get PUT data
+            $raw  = '';
+            $httpContent = fopen('php://input', 'r');
+            while ($kb = fread($httpContent, 1024)) {
+                $raw .= $kb;
+            }
+            fclose($httpContent);
+            $params = array();
+            parse_str($raw, $params);
+            $this->id = (isset($params['id'])) ? $params['id'] : null;
+            $this->params = (isset($params['data'])) ? json_decode(stripslashes($params['data']), true) : null;
+        } else {
+            // grab JSON data if there...
+            $this->params = (isset($_REQUEST['data'])) ? json_decode(stripslashes($_REQUEST['data']), true) : null;
+            $this->id = (isset($_REQUEST['id'])) ? json_decode(stripslashes($_REQUEST['id']), true) : null;
+        }
+        // Quickndirty PATH_INFO parser
+        if (isset($_SERVER["PATH_INFO"])){
+            $cai = '/^\/([a-z]+\w)\/([a-z]+\w)\/([0-9]+)$/';  // /controller/action/id
+            $ca =  '/^\/([a-z]+\w)\/([a-z]+)$/';              // /controller/action
+            $ci = '/^\/([a-z]+\w)\/([0-9]+)$/';               // /controller/id
+            $c =  '/^\/([a-z]+\w)$/';                             // /controller
+            $i =  '/^\/([0-9]+)$/';                             // /id
+            $matches = array();
+            if (preg_match($cai, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->action = $matches[2];
+                $this->id = $matches[3];
+            } else if (preg_match($ca, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->action = $matches[2];
+            } else if (preg_match($ci, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->id = $matches[2];
+            } else if (preg_match($c, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+            } else if (preg_match($i, $_SERVER["PATH_INFO"], $matches)) {
+                $this->id = $matches[1];
+            }
+        }
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/response.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/response.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/response.php	(revision 625)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @class Response
+ * A simple JSON Response class.
+ */
+class Response {
+    public $success, $data, $message, $errors, $tid, $trace;
+
+    public function __construct($params = array()) {
+        $this->success  = isset($params["success"]) ? $params["success"] : false;
+        $this->message  = isset($params["message"]) ? $params["message"] : '';
+        $this->data     = isset($params["data"])    ? $params["data"]    : array();
+    }
+
+    public function to_json() {
+        return json_encode(array(
+            'success'   => $this->success,
+            'message'   => $this->message,
+            'data'      => $this->data
+        ));
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/session_db.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/session_db.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/remote/lib/session_db.php	(revision 625)
@@ -0,0 +1,42 @@
+<?php
+ /**
+ * @class SessionDB
+ * Fake Database.  Stores records in $_SESSION
+ */
+class SessionDB {
+    public function __construct() {
+        if (!isset($_SESSION['pk'])) {
+            $_SESSION['pk'] = 10;           // <-- start fake pks at 10
+            $_SESSION['rs'] = getData();    // <-- populate $_SESSION with data.
+        }
+    }
+    // fake a database pk
+    public function pk() {
+        return $_SESSION['pk']++;
+    }
+    // fake a resultset
+    public function rs() {
+        return $_SESSION['rs'];
+    }
+    public function insert($rec) {
+        array_push($_SESSION['rs'], $rec);
+    }
+    public function update($idx, $attributes) {
+        $_SESSION['rs'][$idx] = $attributes;
+    }
+    public function destroy($idx) {
+        return array_shift(array_splice($_SESSION['rs'], $idx, 1));
+    }
+}
+
+// Sample data.
+function getData() {
+    return array(
+        array('id' => 1, 'first' => "Fred", 'last' => 'Flintstone', 'email' => 'fred@flintstone.com'),
+        array('id' => 2, 'first' => "Wilma", 'last' => 'Flintstone', 'email' => 'wilma@flintstone.com'),
+        array('id' => 3, 'first' => "Pebbles", 'last' => 'Flintstone', 'email' => 'pebbles@flintstone.com'),
+        array('id' => 4, 'first' => "Barney", 'last' => 'Rubble', 'email' => 'barney@rubble.com'),
+        array('id' => 5, 'first' => "Betty", 'last' => 'Rubble', 'email' => 'betty@rubble.com'),
+        array('id' => 6, 'first' => "BamBam", 'last' => 'Rubble', 'email' => 'bambam@rubble.com')
+    );
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.css	(revision 625)
@@ -0,0 +1,97 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+strong {
+    font-weight: bold;
+}
+.x-grid3 .x-window-ml{
+    padding-left: 0;
+}
+.x-grid3 .x-window-mr {
+    padding-right: 0;
+}
+.x-grid3 .x-window-tl {
+    padding-left: 0;
+}
+.x-grid3 .x-window-tr {
+    padding-right: 0;
+}
+.x-grid3 .x-window-tc .x-window-header {
+    height: 3px;
+    padding:0;
+    overflow:hidden;
+}
+.x-grid3 .x-window-mc {
+    border-width: 0;
+    background: #cdd9e8;
+}
+.x-grid3 .x-window-bl {
+    padding-left: 0;
+}
+.x-grid3 .x-window-br {
+    padding-right: 0;
+}
+.x-grid3 .x-panel-btns {
+    padding:0;
+}
+.x-grid3 .x-panel-btns td.x-toolbar-cell {
+    padding:3px 3px 0;
+}
+.x-box-inner {
+    zoom:1;
+}
+.ext-ie .x-row-editor .x-form-text {
+    margin:0 !important;
+}
+.x-row-editor-header {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(images/row-editor-bg.gif) repeat-x 0 0;
+}
+.x-row-editor-footer {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(images/row-editor-bg.gif) repeat-x 0 -2px;
+}
+.ext-ie .x-row-editor-footer {
+    margin-top:-1px;
+}
+
+.x-row-editor-body {
+    overflow:hidden;
+    zoom:1;
+    background: #ebf2fb;
+    padding-top:2px;
+}
+.x-row-editor .x-btns {
+    position:absolute;
+    top:28px;
+    left:20px;
+    padding-left:5px;
+    background: transparent url(images/row-editor-btns.gif) no-repeat 0 0;
+}
+.x-row-editor .x-btns .x-plain-bwrap {
+    padding-right:5px;
+    background: transparent url(images/row-editor-btns.gif) no-repeat right -31px;
+}
+.x-row-editor .x-btns .x-plain-body {
+    background: transparent url(images/row-editor-btns.gif) repeat-x 0 -62px;
+    height:31px;
+}
+.x-row-editor .x-btns .x-table-layout-cell {
+    padding:3px;
+}
+.icon-user-add {
+    background-image: url(../shared/icons/fam/user_add.gif) !important;
+}
+.icon-user-delete {
+    background-image: url(../shared/icons/fam/user_delete.gif) !important;
+}
+
+.errorTip .x-tip-body ul{
+    list-style-type:disc;
+    margin-left:15px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.html	(revision 625)
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>RESTful Store Example</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+     <!-- LIBS -->
+     <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+     <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../shared/extjs/App.js"></script>
+    <script type="text/javascript" src="restful.js"></script>
+    <script type="text/javascript" src="../ux/RowEditor.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="restful.css" />
+    <link rel="stylesheet" href="../ux/css/RowEditor.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="../shared/icons/silk.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>RESTful Store Example</h1>
+<p>This example shows how to implement a RESTful Store.  A Store is made RESTful by simply setting the new configuration-property <strong><i>restful: true</i></strong>
+and plugging a suitable <strong>Ext.data.DataWriter</strong> into your Store.  This example uses <strong>Ext.data.JsonWriter</strong>.</p>
+
+<p>Note that the js is not minified so it is readable. See <a href="restful.js">restful.js</a></p>
+
+<p>Take note of the requests being generated in Firebug as you interact with the Grid.</p>
+
+<p>The HttpProxy in this example points to a single url <strong>app.php/users</strong>.  You may have to edit your web-server's configuration to allow the
+php back-end to be executable.  app.php implements a simple RESTful backend controller and simulates a database by storing records in the $_SESSION.</p>
+<code><pre>
+var proxy = new Ext.data.HttpProxy({
+    url: 'app.php/users'
+});
+
+</pre></code>
+<div class="container" style="width:500px">
+    <div id="user-grid"></div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/restful/restful.js	(revision 625)
@@ -0,0 +1,113 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Application instance for showing user-feedback messages.
+var App = new Ext.App({});
+
+// Create a standard HttpProxy instance.
+var proxy = new Ext.data.HttpProxy({
+    url: 'app.php/users'
+});
+
+// Typical JsonReader.  Notice additional meta-data params for defining the core attributes of your json-response
+var reader = new Ext.data.JsonReader({
+    totalProperty: 'total',
+    successProperty: 'success',
+    idProperty: 'id',
+    root: 'data'
+}, [
+    {name: 'id'},
+    {name: 'email', allowBlank: false},
+    {name: 'first', allowBlank: false},
+    {name: 'last', allowBlank: false}
+]);
+
+// The new DataWriter component.
+var writer = new Ext.data.JsonWriter();
+
+// Typical Store collecting the Proxy, Reader and Writer together.
+var store = new Ext.data.Store({
+    id: 'user',
+    restful: true,     // <-- This Store is RESTful
+    proxy: proxy,
+    reader: reader,
+    writer: writer,    // <-- plug a DataWriter into the store just as you would a Reader
+    listeners: {
+        write : function(store, action, result, response, rs) {
+            App.setAlert(response.success, response.message);
+        }
+    }
+});
+
+// Let's pretend we rendered our grid-columns with meta-data from our ORM framework.
+var userColumns =  [
+    {header: "ID", width: 40, sortable: true, dataIndex: 'id'},
+    {header: "Email", width: 100, sortable: true, dataIndex: 'email', editor: new Ext.form.TextField({})},
+    {header: "First", width: 50, sortable: true, dataIndex: 'first', editor: new Ext.form.TextField({})},
+    {header: "Last", width: 50, sortable: true, dataIndex: 'last', editor: new Ext.form.TextField({})}
+];
+
+// load the store immeditately
+store.load();
+
+Ext.onReady(function() {
+    Ext.QuickTips.init();
+
+    // use RowEditor for editing
+    var editor = new Ext.ux.grid.RowEditor({
+        saveText: 'Update'
+    });
+
+    // Create a typical GridPanel with RowEditor plugin
+    var userGrid = new Ext.grid.GridPanel({
+        renderTo: 'user-grid',
+        iconCls: 'icon-grid',
+        frame: true,
+        title: 'Users',
+        autoScroll: true,
+        height: 300,
+        store: store,
+        plugins: [editor],
+        columns : userColumns,
+        tbar: [{
+            text: 'Add',
+            iconCls: 'silk-add',
+            handler: onAdd
+        }, '-', {
+            text: 'Delete',
+            iconCls: 'silk-delete',
+            handler: onDelete
+        }, '-'],
+        viewConfig: {
+            forceFit: true
+        }
+    });
+
+    /**
+     * onAdd
+     */
+    function onAdd(btn, ev) {
+        var u = new userGrid.store.recordType({
+            first : '',
+            last: '',
+            email : ''
+        });
+        editor.stopEditing();
+        userGrid.store.insert(0, u);
+        editor.startEditing(0);
+    }
+    /**
+     * onDelete
+     */
+    function onDelete() {
+        var rec = userGrid.getSelectionModel().getSelected();
+        if (!rec) {
+            return false;
+        }
+        userGrid.store.remove(rec);
+    }
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/samples.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/samples.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/samples.css	(revision 625)
@@ -0,0 +1,48 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel-tl .x-panel-header {
+    color:#fff;
+}
+.x-panel-tc {
+	background-image:url(shared/extjs/images/top-bottom.gif);
+}
+.x-panel-tl {
+	background-image:url(shared/extjs/images/corners-sprite.gif);
+    border-color:#d0d0d0;
+}
+.x-panel-tr {
+	background-image:url(shared/extjs/images/corners-sprite.gif);
+}
+.x-panel-bc {
+	background-image:url(shared/extjs/images/top-bottom.gif);
+}
+.x-panel-bl {
+	background-image:url(shared/extjs/images/corners-sprite.gif);
+}
+.x-panel-br {
+	background-image:url(shared/extjs/images/corners-sprite.gif);
+}
+.x-panel-mc {
+    background:#f1f1f1;
+}
+.x-panel-mc .x-panel-body {
+    background:transparent;
+    border: 0 none;
+}
+.x-panel-mc {
+    background:#f1f1f1;
+}
+.x-panel-mc .x-panel-body {
+    background:transparent;
+    border: 0 none;
+}
+.x-panel-ml {
+	background-image:url(shared/extjs/images/left-right.gif);
+}
+.x-panel-mr {
+	background-image:url(shared/extjs/images/left-right.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/code-display.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/code-display.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/code-display.js	(revision 625)
@@ -0,0 +1,375 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Create and append to the body, a Panel containing a block of code from the passed URL
+function createCodePanel(url, title) {
+	var panel = new Ext.Panel({
+		hideMode: 'visibility',
+		title: title,
+    	width: 750,
+    	style: {
+    		'margin-top': '10px'
+    	},
+    	hideCollapseTool: true,
+    	titleCollapse: true,
+    	collapsible: true,
+    	collapsed: true,
+		autoScroll: true,
+		renderTo: Ext.getBody(),
+		listeners: {
+			render: function(p) {
+				p.getUpdater().setRenderer({
+					render: Ext.isIE ? function(el, response, scripts, callback) {
+						el.update('');
+						var np = el.createChild({
+							tag: 'pre',
+							cls: 'code',
+							cn: {
+								tag: 'code'
+							}
+						});
+						var t = response.responseText.split("\n");
+						var c = np.child('code', true);
+						for (var i = 0, l = t.length; i < l; i++) {
+							var pre = document.createElement('pre');
+							if (t[i].length) {
+								pre.appendChild(document.createTextNode(t[i]));
+								c.appendChild(pre);
+							} else if (i < (l - 1)) {
+								c.appendChild(document.createElement("br"));
+							}
+							
+						}
+					} : function(el, response, scripts, callback) {
+						el.update('');
+						el.createChild({
+							tag: 'pre',
+							cls: 'code',
+							cn: {
+								tag: 'code',
+								html: response.responseText
+							}
+						});
+					}
+				});
+			},
+			beforeexpand: function(p) {
+				p.load(url);
+			},
+			single: true
+		}
+	});
+}
+
+// Patch to allow XHR to local files. From hendricd: http://extjs.com/forum/member.php?u=8730
+Ext.apply( Ext.lib.Ajax ,
+{ forceActiveX:false,
+  createXhrObject:function(transactionId)
+        {
+            var obj={  status:{isError:false}
+            	     , tId:transactionId}, http;
+            try
+            {
+            	
+		if(Ext.isIE7 && !!this.forceActiveX){throw("IE7forceActiveX");}
+                
+		obj.conn= new XMLHttpRequest();
+		
+            }
+            catch(e)
+            {
+                for (var i = 0; i < this.activeX.length; ++i) {
+                    try
+                    {
+                        obj.conn= new ActiveXObject(this.activeX[i]);
+			
+                        break;
+                    }
+                    catch(e) { 
+                    }
+                }
+            }
+            finally
+            {
+            	obj.status.isError = typeof(obj.conn) === undefined;
+            }	
+            return obj;
+            
+        },
+        
+        getHttpStatus: function(reqObj){
+        
+        	var statObj = {  status:0
+        			,statusText:''
+        			,isError:false
+        			,isLocal:false
+        			,isOK:false
+        			,error:null};
+        	
+        	try {
+        		if(!reqObj)throw('noobj');
+		        statObj.status = reqObj.status;
+		        
+		        statObj.isLocal = !reqObj.status && location.protocol == "file:" || 
+		        		   Ext.isSafari && reqObj.status === undefined;
+		        
+		        statObj.isOK = (statObj.isLocal || (statObj.status > 199 && statObj.status < 300));
+		        statObj.statusText = reqObj.statusText || '';
+		    } catch(e){ //status may not avail/valid yet (or called too early).
+		      } 
+		    
+    		return statObj; 
+        
+        },
+        handleTransactionResponse:function(o, callback, isAbort)
+		{
+	
+		
+		callback = callback || {};
+		var responseObject=null;
+		
+		 if(!o.status.isError){
+			o.status = this.getHttpStatus(o.conn);	 	
+		 	/* create and enhance the response with proper status and XMLDOM if necessary */
+		 	responseObject = this.createResponseObject(o, callback.argument);
+		 }
+		
+ 		 if(o.status.isError){ /* checked again in case exception was raised - ActiveX was disabled during XML-DOM creation? */
+ 		     // And mixin everything the XHR object had to offer as well
+		   responseObject = Ext.applyIf(responseObject||{},this.createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false)));
+		   
+		 }
+		
+		 responseObject.options = o.options;
+		 responseObject.stat = o.status;
+		 
+		 if (o.status.isOK && !o.status.isError) {
+			if (callback.success) {
+				if (!callback.scope) {
+					callback.success(responseObject);
+				}
+				else {
+					callback.success.apply(callback.scope, [responseObject]);
+				}
+			}
+		  } else {
+
+			if (callback.failure) {
+				if (!callback.scope) {
+					callback.failure(responseObject);
+				}
+				else {
+					callback.failure.apply(callback.scope, [responseObject]);
+				}
+			}
+
+		 }
+		
+		if(o.options.async){
+			this.releaseObject(o);	
+			responseObject = null;
+		}else{ 
+			this.releaseObject(o);
+			return responseObject; 
+		}
+			
+	},
+	createResponseObject:function(o, callbackArg)
+	{
+	    var obj = {};
+	    var headerObj = {},headerStr='';
+
+	    try{  //to catch bad encoding problems here
+		obj.responseText = o.conn.responseText;
+	    }catch(e){obj.responseText ='';}
+
+	    obj.responseXML = o.conn.responseXML;
+
+	    try{
+		headerStr = o.conn.getAllResponseHeaders()||'';
+	    } catch(e){}
+
+	    if(o.status.isLocal){
+
+		   o.status.isOK = ((o.status.status = (!!obj.responseText.length)?200:404) == 200);
+
+		   if(o.status.isOK && (!obj.responseXML || obj.responseXML.childNodes.length == 0)){
+
+			var xdoc=null;
+			try{   //ActiveX may be disabled
+				if(typeof(DOMParser) == 'undefined'){ 
+					xdoc=new ActiveXObject("Microsoft.XMLDOM"); 
+					xdoc.async="false";
+					xdoc.loadXML(obj.responseText); 
+
+				}else{ 
+					try{  //Opera 9 will fail parsing non-XML content, so trap here.
+						var domParser = new DOMParser(); 
+						xdoc = domParser.parseFromString(obj.responseText, 'application\/xml'); 
+					}catch(ex){}
+					finally{domParser = null;}
+
+				}
+			} catch(ex){ 
+				o.status.isError = true; 
+				o.status.error = ex;
+
+				}
+
+			obj.responseXML = xdoc;
+		    }
+
+		    if(obj.responseXML){
+
+			var parseBad = (obj.responseXML.parseError || 0) != 0 || obj.responseXML.childNodes.length == 0;
+			if(!parseBad){
+				headerStr = 'Content-Type: ' + (obj.responseXML.contentType || 'text\/xml') + '\n' + headerStr ;
+				}			    
+		    }		
+
+
+	    }	
+
+	   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);
+	    	}
+	    }
+
+	    obj.tId = o.tId;
+	    obj.status = o.status.status;
+	    obj.statusText = o.status.statusText;
+	    obj.getResponseHeader = headerObj;
+	    obj.getAllResponseHeaders = headerStr;
+	    obj.stat = o.status
+
+	    if (typeof callbackArg !== undefined) {
+		obj.argument = callbackArg;
+	    }
+
+	    return obj;
+        },
+        
+	request : function(method, uri, cb, data, options) {
+	            
+	             options = Ext.apply({async:true,
+			   headers:false,
+			   userId:null,
+			   password:null,
+			   xmlData:null }, 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){
+	                    this.initHeader('Content-Type', 'text/xml', false);
+	                    method = 'POST';
+	                    data = options.xmlData;
+	                }
+	            	            
+		    return this.makeRequest(method, uri, cb, data, options);
+		    
+        },
+        asyncRequest:function(method, uri, callback, postData)
+        {
+            var o = this.getConnectionObject();
+
+            if (!o || o.status.isError) {
+                return null;
+            }
+            else {
+            	o.options = options;
+                try{
+			o.conn.open(method, uri, true);
+		} catch(ex){
+			o.status.isError = true;
+			o.status.error = ex;
+			return Ext.apply(o,this.handleTransactionResponse(o, callback));
+			
+		}
+		
+		
+		if (this.useDefaultXhrHeader) {
+		    if (!this.defaultHeaders['X-Requested-With']) {
+			this.initHeader('X-Requested-With', this.defaultXhrHeader, true);
+		    }
+		}
+
+		if(postData && this.useDefaultHeader){
+		    this.initHeader('Content-Type', this.defaultPostHeader);
+		}
+
+		 if (this.hasDefaultHeaders || this.hasHeaders) {
+		    this.setHeader(o);
+		}
+
+		this.handleReadyState(o, callback);
+		
+		try{ o.conn.send(postData || null);
+		} catch(ex){ 
+			o.status.isError=true;
+			o.status.error = ex;
+			return Ext.apply(o,this.handleTransactionResponse(o, callback));
+		}
+			
+					
+		return o;
+            }
+        },
+        
+        makeRequest:function(method, uri, callback, postData, options)
+        {
+            var o = this.getConnectionObject();
+            	     
+            if (!o || o.status.isError) {
+                return null;
+            }
+            else {
+            	o.options = options;	
+                try{
+			o.conn.open(method, uri, options.async, options.userId, options.password);
+		} catch(ex){
+			o.status.isError = true;
+			o.status.error = ex;
+			var r=this.handleTransactionResponse(o, callback);
+			return Ext.apply(o,r);
+		}
+
+		if (this.useDefaultXhrHeader) {
+		    if (!this.defaultHeaders['X-Requested-With']) {
+			this.initHeader('X-Requested-With', this.defaultXhrHeader, true);
+		    }
+		}
+
+		if(postData && this.useDefaultHeader){
+		    this.initHeader('Content-Type', this.defaultPostHeader);
+		}
+
+		 if (this.hasDefaultHeaders || this.hasHeaders) {
+		    this.setHeader(o);
+		}
+
+		if(o.options.async){ //Timers won't work here as it's a blocking call
+			this.handleReadyState(o, callback);
+		}
+		
+		try{ o.conn.send(postData || null);
+		} catch(ex){ 
+			//Ext.apply(o,this.handleTransactionResponse(o, callback));
+		}
+				
+		return options.async?o:Ext.apply(o,this.handleTransactionResponse(o, callback));
+            }
+   }});
+	
+Ext.lib.Ajax.forceActiveX = (document.location.protocol == 'file:');/* or other true/false mechanism */
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.css	(revision 625)
@@ -0,0 +1,58 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+body {
+	font-family:helvetica,tahoma,verdana,sans-serif;
+	padding:20px;
+    padding-top:32px;
+    font-size:13px;
+	background-color:#fff !important;
+}
+p {
+	margin-bottom:15px;
+}
+h1 {
+	font-size:large;
+	margin-bottom:20px;
+}
+h2 {
+	font-size:14px;
+    color:#333;
+    font-weight:bold;
+    margin:10px 0;
+}
+.example-info{
+	width:150px;
+	border:1px solid #c3daf9;
+	border-top:1px solid #DCEAFB;
+	border-left:1px solid #DCEAFB;
+	background:#ecf5fe url( info-bg.gif ) repeat-x;
+	font-size:10px;
+	padding:8px;
+}
+pre.code{
+	background: #F8F8F8;
+	border: 1px solid #e8e8e8;
+	padding:10px;
+	margin:10px;
+	margin-left:0px;
+	border-left:5px solid #e8e8e8;
+	font-size: 12px !important;
+	line-height:14px !important;
+}
+.msg .x-box-mc {
+    font-size:14px;
+}
+#msg-div {
+    position:absolute;
+    left:35%;
+    top:10px;
+    width:250px;
+    z-index:20000;
+}
+.x-grid3-row-body p {
+    margin:5px 5px 10px 5px !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/examples.js	(revision 625)
@@ -0,0 +1,108 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';
+
+Ext.example = function(){
+    var msgCt;
+
+    function createBox(t, s){
+        return ['<div class="msg">',
+                '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
+                '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',
+                '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
+                '</div>'].join('');
+    }
+    return {
+        msg : function(title, format){
+            if(!msgCt){
+                msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
+            }
+            msgCt.alignTo(document, 't-t');
+            var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
+            var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
+            m.slideIn('t').pause(1).ghost("t", {remove:true});
+        },
+
+        init : function(){
+            /*
+            var t = Ext.get('exttheme');
+            if(!t){ // run locally?
+                return;
+            }
+            var theme = Cookies.get('exttheme') || 'aero';
+            if(theme){
+                t.dom.value = theme;
+                Ext.getBody().addClass('x-'+theme);
+            }
+            t.on('change', function(){
+                Cookies.set('exttheme', t.getValue());
+                setTimeout(function(){
+                    window.location.reload();
+                }, 250);
+            });*/
+
+            var lb = Ext.get('lib-bar');
+            if(lb){
+                lb.show();
+            }
+        }
+    };
+}();
+
+Ext.example.shortBogusMarkup = '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.';
+Ext.example.bogusMarkup = '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.<br/><br/>Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.</p>';
+
+Ext.onReady(Ext.example.init, Ext.example);
+
+
+// old school cookie functions
+var Cookies = {};
+Cookies.set = function(name, value){
+     var argv = arguments;
+     var argc = arguments.length;
+     var expires = (argc > 2) ? argv[2] : null;
+     var path = (argc > 3) ? argv[3] : '/';
+     var domain = (argc > 4) ? argv[4] : null;
+     var secure = (argc > 5) ? argv[5] : false;
+     document.cookie = name + "=" + escape (value) +
+       ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
+       ((path == null) ? "" : ("; path=" + path)) +
+       ((domain == null) ? "" : ("; domain=" + domain)) +
+       ((secure == true) ? "; secure" : "");
+};
+
+Cookies.get = function(name){
+	var arg = name + "=";
+	var alen = arg.length;
+	var clen = document.cookie.length;
+	var i = 0;
+	var j = 0;
+	while(i < clen){
+		j = i + alen;
+		if (document.cookie.substring(i, j) == arg)
+			return Cookies.getCookieVal(j);
+		i = document.cookie.indexOf(" ", i) + 1;
+		if(i == 0)
+			break;
+	}
+	return null;
+};
+
+Cookies.clear = function(name) {
+  if(Cookies.get(name)){
+    document.cookie = name + "=" +
+    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
+  }
+};
+
+Cookies.getCookieVal = function(offset){
+   var endstr = document.cookie.indexOf(";", offset);
+   if(endstr == -1){
+       endstr = document.cookie.length;
+   }
+   return unescape(document.cookie.substring(offset, endstr));
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/App.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/App.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/App.js	(revision 625)
@@ -0,0 +1,236 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Ext.App
+ * @extends Ext.util.Observable
+ * @author Chris Scott
+ */
+Ext.App = function(config) {
+
+    // set up StateProvider
+    this.initStateProvider();
+
+    // array of views
+    this.views = [];
+
+    Ext.apply(this, config);
+    if (!this.api.actions) { this.api.actions = {}; }
+
+    // init when onReady fires.
+    Ext.onReady(this.onReady, this);
+
+    Ext.App.superclass.constructor.apply(this, arguments);
+}
+Ext.extend(Ext.App, Ext.util.Observable, {
+
+    /***
+     * response status codes.
+     */
+    STATUS_EXCEPTION :          'exception',
+    STATUS_VALIDATION_ERROR :   "validation",
+    STATUS_ERROR:               "error",
+    STATUS_NOTICE:              "notice",
+    STATUS_OK:                  "ok",
+    STATUS_HELP:                "help",
+
+    /**
+     * @cfg {Object} api
+     * remoting api.  should be defined in your own config js.
+     */
+    api: {
+        url: null,
+        type: null,
+        actions: {}
+    },
+
+    // private, ref to message-box Element.
+    msgCt : null,
+
+    // @protected, onReady, executes when Ext.onReady fires.
+    onReady : function() {
+        // create the msgBox container.  used for App.setAlert
+        this.msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
+        this.msgCt.setStyle('position', 'absolute');
+        this.msgCt.setStyle('z-index', 9999);
+        this.msgCt.setWidth(300);
+    },
+
+    initStateProvider : function() {
+        /*
+         * set days to be however long you think cookies should last
+         */
+        var days = '';        // expires when browser closes
+        if(days){
+            var date = new Date();
+            date.setTime(date.getTime()+(days*24*60*60*1000));
+            var exptime = "; expires="+date.toGMTString();
+        } else {
+            var exptime = null;
+        }
+
+        // register provider with state manager.
+        Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
+            path: '/',
+            expires: exptime,
+            domain: null,
+            secure: false
+        }));
+    },
+
+    /**
+     * registerView
+     * register an application view component.
+     * @param {Object} view
+     */
+    registerView : function(view) {
+        this.views.push(view);
+    },
+
+    /**
+     * getViews
+     * return list of registered views
+     */
+    getViews : function() {
+        return this.views;
+    },
+
+    /**
+     * registerActions
+     * registers new actions for API
+     * @param {Object} actions
+     */
+    registerActions : function(actions) {
+        Ext.apply(this.api.actions, actions);
+    },
+
+    /**
+     * getAPI
+     * return Ext Remoting api
+     */
+    getAPI : function() {
+        return this.api;
+    },
+
+    /***
+     * setAlert
+     * show the message box.  Aliased to addMessage
+     * @param {String} msg
+     * @param {Bool} status
+     */
+    setAlert : function(status, msg) {
+        this.addMessage(status, msg);
+    },
+
+    /***
+     * adds a message to queue.
+     * @param {String} msg
+     * @param {Bool} status
+     */
+    addMessage : function(status, msg) {
+        var delay = 3;    // <-- default delay of msg box is 1 second.
+        if (status == false) {
+            delay = 5;    // <-- when status is error, msg box delay is 3 seconds.
+        }
+        // add some smarts to msg's duration (div by 13.3 between 3 & 9 seconds)
+        delay = msg.length / 13.3;
+        if (delay < 3) {
+            delay = 3;
+        }
+        else if (delay > 9) {
+            delay = 9;
+        }
+
+        this.msgCt.alignTo(document, 't-t');
+        Ext.DomHelper.append(this.msgCt, {html:this.buildMessageBox(status, String.format.apply(String, Array.prototype.slice.call(arguments, 1)))}, true).slideIn('t').pause(delay).ghost("t", {remove:true});
+    },
+
+    /***
+     * buildMessageBox
+     */
+    buildMessageBox : function(title, msg) {
+        switch (title) {
+            case true:
+                title = this.STATUS_OK;
+                break;
+            case false:
+                title = this.STATUS_ERROR;
+                break;
+        }
+        return [
+            '<div class="app-msg">',
+            '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
+            '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3 class="x-icon-text icon-status-' + title + '">', title, '</h3>', msg, '</div></div></div>',
+            '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
+            '</div>'
+        ].join('');
+    },
+
+    /**
+     * decodeStatusIcon
+     * @param {Object} status
+     */
+    decodeStatusIcon : function(status) {
+        iconCls = '';
+        switch (status) {
+            case true:
+            case this.STATUS_OK:
+                iconCls = this.ICON_OK;
+                break;
+            case this.STATUS_NOTICE:
+                iconCls = this.ICON_NOTICE;
+                break;
+            case false:
+            case this.STATUS_ERROR:
+                iconCls = this.ICON_ERROR;
+                break;
+            case this.STATUS_HELP:
+                iconCls = this.ICON_HELP;
+                break;
+        }
+        return iconCls;
+    },
+
+    /***
+     * setViewState, alias for Ext.state.Manager.set
+     * @param {Object} key
+     * @param {Object} value
+     */
+    setViewState : function(key, value) {
+        Ext.state.Manager.set(key, value);
+    },
+
+    /***
+     * getViewState, aliaz for Ext.state.Manager.get
+     * @param {Object} cmd
+     */
+    getViewState : function(key) {
+        return Ext.state.Manager.get(key);
+    },
+
+    /**
+     * t
+     * translation function.  needs to be implemented.  simply echos supplied word back currently.
+     * @param {String} to translate
+     * @return {String} translated.
+     */
+    t : function(words) {
+        return words;
+    },
+
+    handleResponse : function(res) {
+        if (res.type == this.STATUS_EXCEPTION) {
+            return this.handleException(res);
+        }
+        if (res.message.length > 0) {
+            this.setAlert(res.status, res.message);
+        }
+    },
+
+    handleException : function(res) {
+        Ext.MessageBox.alert(res.type.toUpperCase(), res.message);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/css/extjs.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/css/extjs.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/css/extjs.css	(revision 625)
@@ -0,0 +1,604 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote{margin:0;padding:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}
+
+body {
+    /*font-family: helvetica,arial,tahoma,sans-serif;*/
+    font-family:verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
+    font-size:13px;
+    color:#555;
+    line-height:20px;
+    background-color:#fff;
+    text-align:center;
+    margin:0;padding:0;border:0;
+}
+
+td {
+    font-size:13px;
+}
+
+a:link, a:visited, a:active {
+    color: #0464BB;
+    text-decoration:none;
+}
+a:hover {
+    color: #1C417C;
+    text-decoration: underline;
+}
+
+/* main document center */
+#viewport {
+    margin:auto;
+    text-align:left;
+    width:960px;
+}
+
+/* header styles */
+#hd {
+    background:transparent url(../images/topbar.png) no-repeat 10px bottom;
+       height:95px;
+       position:relative;
+}
+
+#hd table.nav {
+    position:absolute;
+    margin-left:0;
+}
+#hd table.nav tr {
+}
+#hd table.nav tr td {
+    padding-top:1px;
+    padding-left:0;
+    padding-right:0;
+}
+#hd table.nav a, #hd table.main-nav a:hover, #hd table.main-nav a:visited {
+    color: #fff;
+}
+
+#hd table.nav a, #hd table.main-nav a span {
+    color: #fff;
+    display:block;
+}
+#hd table.nav a {
+    line-height:14px;
+}
+#hd table.nav a span {
+    padding:6px 15px 7px 15px;
+}
+#hd table.nav a span {
+    font-family:tahoma,helvetica,arial,sans-serif;
+    font-size:12px;
+}
+
+/* Main nav */
+
+
+#hd table.main-nav {
+    left:15px;
+    top:40px;
+}
+#hd table.main-nav tr {
+    height:28px;
+}
+
+#hd table.main-nav a:hover {
+    text-decoration:underline;
+}
+
+#hd table.main-nav a:hover span {
+    text-decoration:underline;
+}
+
+#hd table.main-nav td.active a {
+    background:transparent url(../images/nav-left.png) repeat-x;
+    text-decoration:none;
+}
+
+#hd table.main-nav td.active a span {
+    background:transparent url(../images/nav-right.png) no-repeat right 0;
+    font-weight:bold;
+    padding:7px 15px 6px 15px;
+    text-decoration:none;
+}
+
+/* Sub nav */
+
+#hd .sub-nav {
+    position:absolute;
+    left:25px;
+    top:72px;
+    height:21px;
+}
+#hd .sub-nav td {
+    font-size:11px;
+    color:#777;
+    font-family:tahoma,helvetica,arial,sans-serif;
+}
+#hd .sub-nav td span {
+    color:#777;
+}
+#hd .sub-nav td a {
+    color:#046BCA;
+    font-family:tahoma,helvetica,arial,sans-serif;
+}
+#hd .sub-nav td.spacer {
+    padding:0 5px;
+}
+/* Main header image */
+
+#hd h1 a {
+    background:transparent url(../images/extjs2.png) no-repeat;
+    position:relative;
+    float:left;
+    top: 12px;
+    left: 20px;
+    height:18px;
+    width:227px;
+}
+#hd h1 a span {
+    display:none;
+}
+
+/* body styles */
+
+#bd {
+    margin:5px 15px 0;
+    zoom:1;
+}
+
+#bd p {
+    margin-top:8px;
+    margin-bottom:8px;
+}
+
+#bd br {
+    font-size:10px;
+    line-height:10px;
+}
+
+#bd .left-column {
+    width:700px;
+    float:left;
+}
+#bd .right-column {
+    width:200px;
+    float:left;
+    margin-left:20px;
+}
+#bd .right-column p {
+    margin:5px;
+    font-size:12px;
+}
+
+#bd h3 {
+    font-family: "Trebuchet MS", Tahoma,arial,sans-serif;
+    font-size:18px;
+    font-weight:normal;
+    color: #385F95;
+    margin:7px 0;
+}
+#bd h4 {
+    font-family: "Trebuchet MS", Tahoma,arial,sans-serif;
+    font-size:14px;
+    font-weight:bold;
+    color: #555;
+    margin:5px 0;
+}
+#bd h5 {
+    font-family: "Trebuchet MS", Tahoma,arial,sans-serif;
+    background-color:#F1F1F1;
+    padding:3px;
+    color:#789030;
+    font-size:11px;
+    font-weight:bold;
+    text-transform:uppercase;
+}
+
+#bd .big-box h5.alt {
+    text-align:center;
+    font-size:13px;
+    border-bottom:1px solid #eee;
+    color:#385F95;
+}
+
+#bd .box {
+    padding: 3px 5px 15px;
+}
+
+/* footer */
+#ft {
+    margin-top:25px;
+    text-align:center;
+    background: transparent url(../images/ft-bg.png) no-repeat center 0;
+    padding-top:5px;
+}
+#ft table.nav {
+    margin: 0 auto;
+}
+
+#ft table.nav a, #ft table.nav a:hover, #ft table.nav a:visited {
+    color:#789030;
+    font-size:12px;
+    display:block;
+    padding:5px 15px 0;
+}
+
+#ft div.copy {
+    margin: 0 auto;
+    padding:10px 0 25px;
+    color:gray;
+}
+
+/* feature list */
+ul.features, .content-box ul, .side-box ul {
+    margin-left:15px;
+    list-style-image: url(../images/c-sep-l.gif);
+}
+ul.features li,  .content-box ul li, .side-box ul li {
+    margin-top:5px;
+    margin-bottom:5px;
+}
+/* flyout menus */
+.flyout-menu {
+    position:absolute;
+    left:-200px;
+    top:-200px;
+    background:#fff;
+    padding:10px 15px;
+    text-align:left;
+    border:1px solid #aaa;
+    font-family: helvetica,arial,tahoma,sans-serif;
+}
+.flyout-menu a {
+    color:#046BCA;
+}
+.flyout-menu p {
+    margin:4px 0;
+    font-size:11px;
+    color:#555;
+    line-height:16px;
+}
+.flyout-menu br {
+    line-height:10px;
+}
+.flyout-menu h3 {
+    font-size:12px;
+    font-weight:bold;
+    line-height:16px;
+}
+.flyout-menu ul {
+    font-size:11px;
+    list-style-type: square;
+    margin-left:15px;
+}
+.flyout-menu li {
+    color:#ccc;
+    line-height:16px;
+}
+
+/* rss feeds */
+
+.rss {
+    float:right;
+    margin: 3px 3px 0 0;
+}
+.rss a {
+    display:block;
+    width:14px;
+    height:14px;
+    background: transparent url(../images/home/rss.gif) no-repeat 0 -14px;
+}
+.rss a:hover {
+    background-position: 0 0;
+}
+
+/* side boxes */
+
+div.side-box {
+    background: transparent url(../images/side-box.png) no-repeat;
+    padding-top:9px;
+    width:200px;
+    margin-bottom:20px;
+    zoom:1;
+}
+div.side-box-inner {
+    background: transparent url(../images/side-box.png) no-repeat 0 bottom;
+    padding:0 15px 5px;
+    font-size:12px;
+    zoom:1;
+}
+#bd div.side-box-inner h5 {
+    background:transparent !important;
+    padding-top:0;
+}
+
+
+div.big-box {
+    background: transparent url(../images/big-box.png) no-repeat;
+    padding-top:12px;
+    width:700px;
+    margin-bottom:20px;
+}
+div.big-box-inner {
+    background: transparent url(../images/big-box.png) no-repeat 0 bottom;
+    padding:0 15px 12px;
+    font-size:12px;
+}
+#bd div.big-box-inner h5 {
+    background:transparent !important;
+    padding-top:0;
+}
+
+div.full-box {
+    background: transparent url(../images/full-box.png) no-repeat;
+    padding-top:12px;
+    width:920px;
+}
+div.full-box-inner {
+    background: transparent url(../images/full-box.png) no-repeat 0 bottom;
+    padding:0 15px 10px;
+    font-size:12px;
+}
+
+
+div.content-box {
+    width:700px;
+}
+div.content-box p {
+    margin-left:5px;
+    margin-right:5px;
+}
+#bd div.content-box ul.features {
+    margin-left:20px;
+}
+#bd .content-box h5 {
+    background-image: url(../images/med-shd.png);
+    padding-left:10px;
+}
+
+/* Store */
+
+#commercial strong {
+    font-size: 12px;
+    margin: 0 0 0 0;
+    font-family:tahoma,verdana,helvetica,sans-serif;
+    color: #083772;
+    font-weight:bold;
+}
+table.license {
+   margin-left:5px;
+}
+table.license, table.license td {
+   border-collapse: separate;
+   border: 0 none !important;
+   font-size:12px;
+}
+table.license td {
+   padding:0 5px 5px;
+}
+
+.order-type {
+   float:left;
+   width:300px;
+   margin:10px;
+   font-size:11px;
+}
+
+#bd .order-complete {
+
+}
+#bd .order-complete p {
+   margin-left:0;
+}
+
+#commercial table.order-review {
+   border-collapse: separate;
+   margin-left:10px;
+   font-size:12px;
+}
+#commercial table.order-review td {
+   padding:5px 20px 5px 5px;
+   vertical-align:top;
+}
+#commercial table.order-review tr.tsep td {
+   border-top:1px dotted #ddd;
+}
+#commercial h3 {
+    margin:0 0 5px;
+    font-size:16px;
+}
+#store .big-box h4 {
+    font-size:12px;
+    font-weight:bold;
+    color: #222;
+    padding:4px;
+    background:#efefef url(../images/inner-hd.png) repeat-x;
+    border: 1px solid #efefef;
+}
+
+
+a.buynow {
+    text-decoration:none;
+    padding:4px 7px;
+    border:1px solid;
+    border-color:#ddd #bbb #bbb #ddd;
+    background:#eee;
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#333 !important;
+    cursor:pointer;
+    margin:0 2px;
+    display:block;
+    float:right;
+}
+
+a.buynow:hover, a.buynow:hover {
+    text-decoration:none;
+    border-color:#ccc #bbb #bbb #ccc;
+    background-position:0 2px;
+    background-color:#fafafa;
+}
+
+.saleprice, b.sale, .sale-msg strong{
+    color: #c33;
+}
+
+/* comparison table */
+
+.compare {
+
+}
+.compare th {
+    padding:5px 12px;
+    font-weight:bold;
+    text-align:center;
+    border:1px solid #dddddd;
+    color:#fff;
+    background:#083772;
+    font-size:12px;
+}
+.compare td {
+    padding:5px;
+    text-align:center;
+    border:1px solid #dddddd;
+    font-size:12px;
+}
+.compare th.cfirst {
+    padding-left:8px;
+}
+.compare td.cfirst, .compare th.cfirst {
+    text-align:left;
+}
+.compare td.cfirst {
+    padding-left:20px;
+}
+.compare td.ctitle {
+    text-align:left;
+    font-weight:bold;
+    background:#ececec;
+    padding-left:12px;
+    font-size:12px;
+}
+
+.compare tr.cprice td,.compare tr.cfoot td {
+    padding:5px 12px;
+    font-weight:bold;
+    border:1px solid #dddddd;
+    border-collapse:collapse;
+    color:#083772;
+    background:#c3daf9 url(/themes/ext/resources/images/grid-hrow.gif) repeat-x;
+    vertical-align:top;
+}
+.compare tr.cfoot td {
+    background:#fff;
+    padding-left:2px;
+    padding-right:2px;
+    border-color:#fff;
+}
+.compare tr.cfoot td a {
+    margin-top:0;
+    margin-right:25px;
+}
+.compare tr.corder-note td {
+    background: #eee;
+}
+
+.compare sup {
+    margin-left:3px;
+    font-size:10px;
+}
+.compare-info {
+    font-size:11px;
+    padding:10px;
+}
+
+/* downloads */
+
+table.dl {
+    width:650px;
+}
+
+table.dl td {
+    padding:5px;
+    vertical-align:top;
+}
+
+.expandable {
+    background:#F7F7F7;
+    padding:4px;
+    border:1px solid #DEDEDE;
+}
+
+.expandable-body{
+    background:#fff;
+    padding:5px;
+    zoom:1;
+}
+.expandable-body-inner{
+    zoom:1;
+}
+
+.expandable-body dd {
+    float:left;
+    width:300px;
+    padding:5px;
+}
+
+.training-info {
+    font-size:11px;
+}
+
+a.link {
+    font-family:tahoma,helvetica,arial,sans-serif;
+    font-size:12px;
+    font-weight:bold;
+    line-height:19px;
+}
+
+#msg-ct {
+    position:absolute;
+    left:680px;
+    top:17px;
+    width:217px;
+    height:22px;
+}
+
+#msg {
+    width:217px;
+    height:22px;
+    background-image:url(../images/msg-bg.png);
+    color:#777;
+    font-family:tahoma,helvetica,arial,sans-serif;
+    font-size:11px;
+    cursor:pointer;
+    visibility:hidden;
+}
+#msg-inner {
+    padding:5px 10px 0;
+    zoom:1;
+    line-height:12px;
+    text-align:center;
+}
+.msg-over {
+    color:#789030 !important;
+}
+
+#msg img {
+    width:19px;
+    height:19px;
+}
+
+/**
+ * Ext.App#setAlert message-box styles.
+ */
+.app-msg .x-box-mc {
+    text-align: left;
+}
+.x-icon-text { background-repeat: no-repeat; padding-left: 20px; }
+.icon-status-ok { background-image: url(../../icons/fam/accept.png) !important; }
+.icon-status-error { background-image: url(../../icons/fam/error.png) !important; }
+.icon-status-notice { background-image: url(../../icons/fam/information.png) !important; }
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/site.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/site.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/extjs/site.js	(revision 625)
@@ -0,0 +1,101 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+	var activeMenu;
+
+	function createMenu(name){
+		var el = Ext.get(name+'-link');
+		var tid = 0, menu, doc = Ext.getDoc();
+
+		var handleOver = function(e, t){
+			if(t != el.dom && t != menu.dom && !e.within(el) && !e.within(menu)){
+				hideMenu();
+			}
+		};
+
+		var hideMenu = function(){
+			if(menu){
+				menu.hide();
+				el.setStyle('text-decoration', '');
+				doc.un('mouseover', handleOver);
+				doc.un('mousedown', handleDown);
+			}
+		};
+
+		var handleDown = function(e){
+			if(!e.within(menu)){
+				hideMenu();
+			}
+		};
+
+		var showMenu = function(){
+			clearTimeout(tid);
+			tid = 0;
+
+			if (!menu) {
+				menu = new Ext.Layer({shadow:'sides',hideMode: 'display'}, name+'-menu');
+			}
+			menu.hideMenu = hideMenu;
+
+			menu.el = el;
+			if(activeMenu && menu != activeMenu){
+				activeMenu.hideMenu();
+			}
+			activeMenu = menu;
+
+			if (!menu.isVisible()) {
+				menu.show();
+				menu.alignTo(el, 'tl-bl?');
+				menu.sync();
+				el.setStyle('text-decoration', 'underline');
+
+				doc.on('mouseover', handleOver, null, {buffer:150});
+				doc.on('mousedown', handleDown);
+			}
+		};
+
+		el.on('mouseover', function(e){
+			if(!tid){
+				tid = showMenu.defer(150);
+			}
+		});
+
+		el.on('mouseout', function(e){
+			if(tid && !e.within(el, true)){
+				clearTimeout(tid);
+				tid = 0;
+			}
+		});
+	}
+
+	createMenu('products');
+	createMenu('support');
+	createMenu('store');
+
+	// expanders
+	Ext.getBody().on('click', function(e, t){
+		t = Ext.get(t);
+		e.stopEvent();
+
+		var bd = t.next('div.expandable-body');
+		bd.enableDisplayMode();
+		var bdi = bd.first();
+		var expanded = bd.isVisible();
+
+		if(expanded){
+			bd.hide();
+		}else{
+			bdi.hide();
+			bd.show();
+			bdi.slideIn('l', {duration:0.2, stopFx: true, easing:'easeOut'});
+		}
+
+		t.update(!expanded ? 'Hide details' : 'Show details');
+
+	}, null, {delegate:'a.expander'});
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/fam/SILK.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/fam/SILK.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/fam/SILK.txt	(revision 625)
@@ -0,0 +1,3 @@
+The icons in this folder are direct gif conversions of the fam fam fam silk icons.
+
+Please see http://www.famfamfam.com/lab/icons/silk/ for more details.
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/silk.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/silk.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/shared/icons/silk.css	(revision 625)
@@ -0,0 +1,185 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+* this css is for the free "silk" icon library
+* http://www.fanfanfan.com
+*
+*/
+.icon-32 { height:32px; width:32px}
+.icon-24 { height:24px; width:24px}
+
+.icon-arrow-up { background-image: url(arrow-up.gif) !important; background-repeat: no-repeat; }
+.icon-arrow-down { background-image: url(arrow-down.gif) !important; background-repeat: no-repeat; }
+.icon-save { background-image: url(save.gif) !important; background-repeat: no-repeat; }
+
+.silk-accept { background-image: url(fam/accept.png) !important; background-repeat: no-repeat; }
+.silk-add { background-image: url(fam/add.gif) !important; background-repeat: no-repeat; }
+.silk-arrow-join { background-image: url(fam/arrow_join.png) !important; background-repeat: no-repeat; }
+.silk-arrow-right { background-image: url(fam/arrow_right.png) !important; background-repeat: no-repeat; }
+.silk-arrow-redo { background-image: url(fam/arrow_redo.png) !important; background-repeat: no-repeat; }
+.silk-arrow-right-medium { background-image: url(fam/other/iconRightMedium.gif) !important; background-repeat: no-repeat; }
+.silk-asterisk-orange { background-image: url(fam/asterisk_orange.png) !important; background-repeat: no-repeat; }
+.silk-bell { background-image: url(fam/bell.png) !important; background-repeat: no-repeat; }
+.silk-book { background-image: url(fam/book.png) !important; background-repeat: no-repeat; }
+.silk-book-open { background-image: url(fam/book_open.png) !important; background-repeat: no-repeat; }
+.silk-building-go { background-image: url(fam/building_go.png) !important; background-repeat: no-repeat; }
+.silk-building { background-image: url(fam/building.png) !important; background-repeat: no-repeat; }
+.silk-cancel { background-image: url(fam/cancel.png) !important; background-repeat: no-repeat; }
+.silk-application { background-image: url(fam/application.png) !important; background-repeat: no-repeat; }
+.silk-application-add { background-image: url(fam/application_add.png) !important; background-repeat: no-repeat; }
+.silk-application-cascade { background-image: url(fam/application_cascade.png) !important; background-repeat: no-repeat; }
+.silk-application-delete { background-image:  url(fam/application_delete.png) !important; background-repeat: no-repeat; }
+.silk-application-double { background-image: url(fam/application_double.png) !important; background-repeat: no-repeat; }
+.silk-application-edit { background-image: url(fam/application_edit.png) !important; background-repeat: no-repeat; }
+.silk-application-error { background-image: url(fam/application_error.png) !important; background-repeat: no-repeat; }
+.silk-application-form { background-image: url(fam/application_form.png) !important; background-repeat: no-repeat; }
+.silk-application-lightning { background-image: url(fam/application_lightning.png) !important; background-repeat: no-repeat; }
+.silk-application-side-boxes { background-image: url(fam/application_side_boxes.png) !important; background-repeat: no-repeat; }
+.silk-application-split { background-image: url(fam/application_split.png) !important; background-repeat: no-repeat; }
+.silk-application-view_columns { background-image: url(fam/application_view_columns.png) !important; background-repeat: no-repeat; }
+.silk-application-view-gallery { background-image: url(fam/application_view_gallery.png) !important; background-repeat: no-repeat; }
+.silk-application-view-list { background-image: url(fam/application_view_list.png) !important; background-repeat: no-repeat; }
+.silk-application-view-tile { background-image: url(fam/application_view_tile.png) !important; background-repeat: no-repeat; }
+.silk-application-xp { background-image: url(fam/application_xp.png) !important; background-repeat: no-repeat; }
+.silk-arrow-down { background-image: url(fam/arrow_down.png) !important; background-repeat: no-repeat; }
+.silk-arrow-redo { background-image: url(fam/arrow_redo.png) !important; background-repeat: no-repeat; }
+.silk-arrow-refresh { background-image: url(fam/arrow_refresh.png) !important; background-repeat: no-repeat; }
+.silk-arrow-undo { background-image: url(fam/arrow_undo.png) !important; background-repeat: no-repeat; }
+.silk-arrow-up { background-image: url(fam/arrow_up.png) !important; background-repeat: no-repeat; }
+.silk-attach { background-image: url(fam/attach.png) !important; background-repeat: no-repeat; }
+.silk-award-gold {background-image: url(fam/award_star_gold_2.png) !important}
+.silk-building { background-image: url(fam/building.png) !important; background-repeat: no-repeat; }
+.silk-box { background-image: url(fam/box.png) !important; background-repeat: no-repeat; }
+.silk-bricks { background-image: url(fam/bricks.png) !important; background-repeat: no-repeat; }
+.silk-brick { background-image: url(fam/brick.png) !important; background-repeat: no-repeat; }
+.silk-cog { background-image: url(fam/cog.png) !important; background-repeat: no-repeat; }
+.silk-calendar { background-image: url(fam/calendar.png) !important; background-repeat: no-repeat; }
+.silk-calculator { background-image: url(fam/calculator.png) !important; background-repeat: no-repeat; }
+.silk-calculator-edit { background-image: url(fam/calculator_edit.png) !important; background-repeat: no-repeat; }
+.silk-calendar-day { background-image: url(fam/calendar_view_day.png) !important; background-repeat: no-repeat; }
+.silk-calendar-week { background-image: url(fam/calendar_view_week.png) !important; background-repeat: no-repeat; }
+.silk-calendar-month { background-image: url(fam/calendar_view_month.png) !important; background-repeat: no-repeat; }
+.silk-calendar-edit { background-image: url(fam/calendar_edit.png) !important; background-repeat: no-repeat; }
+.silk-clock-red { background-image: url(fam/clock_red.png) !important; background-repeat: no-repeat; }
+.silk-chart-line{ background-image: url(fam/chart_line.png) !important; background-repeat: no-repeat; }
+.silk-chart-organisation{ background-image: url(fam/chart_organisation.png) !important; background-repeat: no-repeat; }
+.silk-cog { background-image: url(fam/cog.png) !important; background-repeat: no-repeat; }
+
+.silk-comment { background-image: url(fam/comment.png) !important; background-repeat: no-repeat; }
+.silk-comment-add { background-image: url(fam/comment_add.png) !important; background-repeat: no-repeat; }
+.silk-comments { background-image: url(fam/comments.png) !important; background-repeat: no-repeat; }
+.silk-creditcards { background-image: url(fam/creditcards.png) !important; background-repeat: no-repeat; }
+.silk-cross { background-image: url(fam/cross.png) !important; background-repeat: no-repeat; }
+.silk-database { background-image: url(fam/database.png) !important; background-repeat: no-repeat; }
+.silk-database-go { background-image: url(fam/database_go.png) !important; background-repeat: no-repeat; }
+.silk-date { background-image: url(fam/date.png) !important; background-repeat: no-repeat; }
+.silk-delete { background-image: url(fam/delete.gif) !important; background-repeat: no-repeat; }
+.silk-disconnect { background-image: url(fam/disconnect.png) !important; background-repeat: no-repeat; }
+.silk-disk { background-image: url(fam/disk.png) !important; background-repeat: no-repeat; }
+.silk-door-out { background-image: url(fam/door_out.png) !important; background-repeat: no-repeat; }
+.silk-door-in { background-image: url(fam/door_in.png) !important; background-repeat: no-repeat; }
+.silk-email { background-image: url(fam/email.png) !important; background-repeat: no-repeat; }
+.silk-email-add { background-image: url(fam/email_add.png) !important; background-repeat: no-repeat; }
+.silk-email-edit { background-image: url(fam/email_edit.png) !important; background-repeat: no-repeat; }
+.silk-email-go { background-image: url(fam/email_go.png) !important; background-repeat: no-repeat; }
+.silk-email-open { background-image: url(fam/email_open.png) !important; background-repeat: no-repeat; }
+.silk-error { background-image: url(fam/error.png) !important; background-repeat: no-repeat; }
+.silk-exclamation { background-image: url(fam/exclamation.png) !important; background-repeat: no-repeat; }
+.silk-feed { background-image: url(fam/feed.png) !important; background-repeat: no-repeat; }
+.silk-film { background-image: url(fam/film.png) !important; background-repeat: no-repeat; }
+.silk-film-add { background-image: url(fam/film_add.png) !important; background-repeat: no-repeat; }
+.silk-flag-red { background-image: url(fam/flag_red.png) !important; background-repeat: no-repeat; }
+.silk-flag-green { background-image: url(fam/flag_green.png) !important; background-repeat: no-repeat; }
+.silk-folder-edit { background-image: url(fam/folder_edit.png) !important; background-repeat: no-repeat; }
+.silk-folder-table { background-image: url(fam/folder_table.png) !important; background-repeat: no-repeat; }
+.silk-flag-blue { background-image: url(fam/flag_blue.png) !important; background-repeat: no-repeat; }
+.silk-lorry-flatbed { background-image: url(fam/lorry_flatbed.png) !important; background-repeat: no-repeat; }
+.silk-folder { background-image: url(fam/folder.png) !important; background-repeat: no-repeat; }
+.silk-folder-add { background-image: url(fam/folder_add.png) !important; background-repeat: no-repeat; }
+.silk-folder-delete { background-image: url(fam/folder_delete.png) !important; background-repeat: no-repeat; }
+.silk-grid { background-image: url(fam/grid.png) !important; background-repeat: no-repeat; }
+.silk-group { background-image: url(fam/group.png) !important; background-repeat: no-repeat; }
+.silk-group-add { background-image: url(fam/group_add.png) !important; background-repeat: no-repeat; }
+.silk-group-delete { background-image: url(fam/group_delete.png) !important; background-repeat: no-repeat; }
+.silk-group-key { background-image: url(fam/group_key.png) !important; background-repeat: no-repeat; }
+.silk-help { background-image: url(fam/help.png) !important; background-repeat: no-repeat; }
+.silk-image { background-image: url(fam/image.png) !important; background-repeat: no-repeat; }
+.silk-information { background-image: url(fam/information.png) !important; background-repeat: no-repeat; }
+.silk-ipod { background-image: url(fam/ipod.png) !important; background-repeat: no-repeat; }
+.silk-key { background-image: url(fam/key.png) !important; background-repeat: no-repeat; }
+.silk-key-add { background-image: url(fam/key_add.png) !important; background-repeat: no-repeat; }
+.silk-key-delete { background-image: url(fam/key_delete.png) !important; background-repeat: no-repeat; }
+.silk-layout { background-image: url(fam/layout.png) !important; background-repeat: no-repeat; }
+.silk-layout-add { background-image: url(fam/layout_add.png) !important; background-repeat: no-repeat; }
+.silk-layout-content { background-image: url(fam/layout_content.png) !important; background-repeat: no-repeat; }
+.silk-lock { background-image: url(fam/lock.png) !important; background-repeat: no-repeat; }
+.silk-lock-open { background-image: url(fam/lock_open.png) !important; background-repeat: no-repeat; }
+.silk-lorry { background-image: url(fam/lorry.png) !important; background-repeat: no-repeat; }
+.silk-lorry-go { background-image: url(fam/lorry_go.png) !important; background-repeat: no-repeat; }
+.silk-lorry-add { background-image: url(fam/lorry_add.png) !important; background-repeat: no-repeat; }
+.silk-lorry-delete { background-image: url(fam/lorry_delete.png) !important; background-repeat: no-repeat; }
+.silk-lorry-error { background-image: url(fam/lorry_error.png) !important; background-repeat: no-repeat; }
+.silk-magnifier { background-image: url(fam/magnifier.png) !important; background-repeat: no-repeat; }
+.silk-map { background-image: url(fam/map.png) !important; background-repeat: no-repeat; }
+.silk-money { background-image: url(fam/money.png) !important; background-repeat: no-repeat; }
+.silk-money-add { background-image: url(fam/money_add.png) !important; background-repeat: no-repeat; }
+.silk-money-delete { background-image: url(fam/money_delete.png) !important; background-repeat: no-repeat; }
+.silk-new { background-image: url(fam/new.png) !important; background-repeat: no-repeat; }
+.silk-package { background-image: url(fam/package.png) !important; background-repeat: no-repeat; }
+.silk-package-add { background-image: url(fam/package_add.png) !important; background-repeat: no-repeat; }
+.silk-package-delete { background-image: url(fam/package_delete.png) !important; background-repeat: no-repeat; }
+.silk-package-go { background-image: url(fam/package_go.png) !important; background-repeat: no-repeat; }
+.silk-page { background-image: url(fam/page.png) !important; background-repeat: no-repeat; }
+.silk-page-go { background-image: url(fam/page_go.png) !important; background-repeat: no-repeat; }
+.silk-page-edit { background-image: url(fam/page_edit.png) !important; background-repeat: no-repeat; }
+.silk-page-code { background-image: url(fam/page_code.png) !important; background-repeat: no-repeat; }
+.silk-page-white { background-image: url(fam/page_white.png) !important; background-repeat: no-repeat; }
+.silk-page-white-edit { background-image: url(fam/page_white_edit.png) !important; background-repeat: no-repeat; }
+.silk-page-white-stack { background-image: url(fam/page_white_stack.png) !important; background-repeat: no-repeat; }
+.silk-page-white-code { background-image: url(fam/page_white_code.png) !important; background-repeat: no-repeat; }
+.silk-page-white-code-red { background-image: url(fam/page_white_code_red.png) !important; background-repeat: no-repeat; }
+.silk-pencil { background-image: url(fam/pencil.png) !important; background-repeat: no-repeat; }
+.silk-phone { background-image: url(fam/phone.png) !important; background-repeat: no-repeat; }
+.silk-picture { background-image: url(fam/picture.png) !important; background-repeat: no-repeat; }
+.silk-pictures { background-image: url(fam/pictures.png) !important; background-repeat: no-repeat; }
+.silk-photos { background-image: url(fam/photos.png) !important; background-repeat: no-repeat; }
+.silk-plugin { background-image: url(fam/plugin.png) !important; background-repeat: no-repeat; }
+.silk-plugin-add { background-image: url(fam/plugin_add.png) !important; background-repeat: no-repeat; }
+.silk-plugin-delete { background-image: url(fam/plugin_delete.png) !important; background-repeat: no-repeat; }
+.silk-plugin-disabled { background-image: url(fam/plugin_disabled.png) !important; background-repeat: no-repeat; }
+.silk-printer { background-image: url(fam/printer.png) !important; background-repeat: no-repeat; }
+.silk-report { background-image: url(fam/report.png) !important; background-repeat: no-repeat; }
+.silk-resultset-first { background-image: url(fam/resultset_first.png) !important; background-repeat: no-repeat; }
+.silk-resultset-last { background-image: url(fam/resultset_last.png) !important; background-repeat: no-repeat; }
+.silk-resultset-next { background-image: url(fam/resultset_next.png) !important; background-repeat: no-repeat; }
+.silk-resultset-previous { background-image: url(fam/resultset_previous.png) !important; background-repeat: no-repeat; }
+.silk-script { background-image: url(fam/script.png) !important; background-repeat: no-repeat; }
+.silk-shield { background-image: url(fam/shield.png) !important; background-repeat: no-repeat; }
+.silk-sitemap { background-image: url(fam/sitemap.png) !important; background-repeat: no-repeat; }
+.silk-shape-handles { background-image: url(fam/shape_handles.png) !important; background-repeat: no-repeat; }
+.silk-shape-align-bottom { background-image: url(fam/shape_align_bottom.png) !important; background-repeat: no-repeat; }
+.silk-stop { background-image: url(fam/stop.png) !important; background-repeat: no-repeat; }
+.silk-table { background-image: url(fam/table.png) !important; background-repeat: no-repeat; }
+.silk-table-edit { background-image: url(fam/table_edit.png) !important; background-repeat: no-repeat; }
+.silk-table-multiple { background-image: url(fam/table_multiple.png) !important; background-repeat: no-repeat; }
+.silk-table-refresh { background-image: url(fam/table_refresh.png) !important; background-repeat: no-repeat; }
+.silk-tag-blue-edit { background-image: url(fam/tag_blue_edit.png) !important; background-repeat: no-repeat; }
+.silk-tag { background-image: url(fam/tag.png) !important; background-repeat: no-repeat; }
+.silk-telephone { background-image: url(fam/telephone.png) !important; background-repeat: no-repeat; }
+.silk-text-signature { background-image: url(fam/text_signature.png) !important; background-repeat: no-repeat; }
+.silk-tick { background-image: url(fam/tick.png) !important; background-repeat: no-repeat; }
+.silk-user { background-image: url(fam/user.png) !important; background-repeat: no-repeat; }
+.silk-user-add { background-image: url(fam/user_add.gif) !important; background-repeat: no-repeat; }
+.silk-user-comment { background-image: url(fam/user_comment.png) !important; background-repeat: no-repeat; }
+.silk-user-delete { background-image: url(fam/user_delete.png) !important; background-repeat: no-repeat; }
+.silk-user-edit { background-image: url(fam/user_edit.png) !important; background-repeat: no-repeat; }
+.silk-user-go { background-image: url(fam/user_go.png) !important; background-repeat: no-repeat; }
+.silk-vcard { background-image: url(fam/vcard.png) !important; background-repeat: no-repeat; }
+.silk-vector { background-image: url(fam/vector.png) !important; background-repeat: no-repeat; }
+.silk-wrench { background-image: url(fam/wrench.png) !important; background-repeat: no-repeat; }
+.silk-world { background-image: url(fam/world.png) !important; background-repeat: no-repeat; }
+.silk-zoom { background-image: url(fam/zoom.png) !important; background-repeat: no-repeat; }
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/ajax-tip.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/ajax-tip.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/ajax-tip.html	(revision 625)
@@ -0,0 +1,3 @@
+<b>Ajax Tooltip</b><br />
+The ToolTip class extends from the core Ext.Panel class
+ which exposes extra configuration options such as <i>autoLoad</i>.
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.css	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.status {
+    color:#555;
+}
+.x-progress-wrap.left-align .x-progress-text {
+    text-align:left;
+}
+.x-progress-wrap.custom {
+    height:17px;
+    border:1px solid #686868;
+    overflow:hidden;
+    padding:0 2px;
+}
+.ext-ie .x-progress-wrap.custom {
+    height:19px;
+}
+.custom .x-progress-inner {
+    height:17px;
+    background: #fff;
+}
+.custom .x-progress-bar {
+    height:15px;
+    background:transparent url(images/custom-bar.gif) repeat-x 0 0;
+    border-top:1px solid #BEBEBE;
+    border-bottom:1px solid #EFEFEF;
+    border-right:0;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.html	(revision 625)
@@ -0,0 +1,57 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>ProgressBar</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+<!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+<script type="text/javascript" src="../../ext-all.js"></script>
+<script type="text/javascript" src="progress-bar.js"></script>
+<link rel="stylesheet" type="text/css" href="progress-bar.css" />
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Progress Bar</h1>
+<p>The example shows how to use the ProgressBar class. The js is not minified so it is readable.
+See <a href="progress-bar.js">progress-bar.js</a>.</p>
+
+<p>
+    <b>Basic Progress Bar</b><br />
+    Deferred rendering, dynamic show/hide and built-in progress text:
+    <button id="btn1">Show</button><br />
+    <div class="status" id="p1text">Nothing to see here.</div>
+    <div id="p1" style="width:300px;"></div>
+</p>
+
+<p>
+    <b>Additional Options</b><br />
+    Rendered on page load, left-aligned text and % width:
+    <button id="btn2">Show</button><br />
+    <div id="p2" style="width:50%;"></div>
+</p>
+
+<p>
+    <b>Waiting Bar</b><br />
+    Wait for a long operation to complete (example will stop after 5 secs):
+    <button id="btn3">Show</button><br />
+    <div id="p3"></div>
+    <span class="status" id="p3text">Ready</span>
+</p>
+
+<p>
+    <b>Custom Styles</b><br />
+    Rendered like Windows XP with custom progress text element:
+    <button id="btn4">Show</button><br />
+    <div id="p4" style="width:300px;"></div>
+    <div class="status"><b>Status:</b> <span id="p4text"></span></div>
+</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/progress-bar.js	(revision 625)
@@ -0,0 +1,111 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    //==== Progress bar 1 ====
+    var pbar1 = new Ext.ProgressBar({
+       text:'Initializing...'
+    });
+    var btn1 = Ext.get('btn1');
+    btn1.on('click', function(){
+        Ext.fly('p1text').update('Working');
+        if (!pbar1.rendered){
+            pbar1.render('p1');
+        }else{
+            pbar1.text = 'Initializing...';
+            pbar1.show();
+        }
+        Runner.run(pbar1, Ext.get('btn1'), 10, function(){
+            pbar1.reset(true);
+            Ext.fly('p1text').update('Done.').show();
+        });
+    });
+
+    //==== Progress bar 2 ====
+    var pbar2 = new Ext.ProgressBar({
+        text:'Ready',
+        id:'pbar2',
+        cls:'left-align',
+        renderTo:'p2'
+    });
+    var btn2 = Ext.get('btn2');
+    btn2.on('click', function(){
+        Runner.run(pbar2, btn2, 12, function(){
+            pbar2.reset();
+            pbar2.updateText('Done.');
+        });
+    });
+
+    //==== Progress bar 3 ====
+    var pbar3 = new Ext.ProgressBar({
+        id:'pbar3',
+        width:300,
+        renderTo:'p3'
+    });
+    pbar3.on('update', function(val){
+        //You can handle this event at each progress interval if
+        //needed to perform some other action
+        Ext.fly('p3text').dom.innerHTML += '.';
+    });
+    var btn3 = Ext.get('btn3');
+    btn3.on('click', function(){
+        Ext.fly('p3text').update('Working');
+        btn3.dom.disabled = true;
+        pbar3.wait({
+            interval:200,
+            duration:5000,
+            increment:15,
+            fn:function(){
+                btn3.dom.disabled = false;
+                Ext.fly('p3text').update('Done');
+            }
+        });
+    });
+
+    //==== Progress bar 4 ====
+    var pbar4 = new Ext.ProgressBar({
+        text:'Waiting on you...',
+        id:'pbar4',
+        textEl:'p4text',
+        cls:'custom',
+        renderTo:'p4'
+    });
+    var btn4 = Ext.get('btn4');
+    btn4.on('click', function(){
+        Runner.run(pbar4, btn4, 19, function(){
+            pbar4.updateText('All finished!');
+        });
+    });
+});
+
+//Please do not use the following code as a best practice! :)
+var Runner = function(){
+    var f = function(v, pbar, btn, count, cb){
+        return function(){
+            if(v > count){
+                btn.dom.disabled = false;
+                cb();
+            }else{
+                if(pbar.id=='pbar4'){
+                    //give this one a different count style for fun
+                    var i = v/count;
+                    pbar.updateProgress(i, Math.round(100*i)+'% completed...');
+                }else{
+                    pbar.updateProgress(v/count, 'Loading item ' + v + ' of '+count+'...');
+                }
+            }
+       };
+    };
+    return {
+        run : function(pbar, btn, count, cb){
+            btn.dom.disabled = true;
+            var ms = 5000/count;
+            for(var i = 1; i < (count+2); i++){
+               setTimeout(f(i, pbar, btn, count, cb), i*ms);
+            }
+        }
+    }
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.css	(revision 625)
@@ -0,0 +1,33 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#content-anchor-tip ul {
+    float: left;
+    width: 200px;
+    list-style-type: disc;
+    margin-left: 15px;
+} 
+
+.ext-ie #content-anchor-tip ul {
+    margin: 0;
+    padding-left: 15px;
+} 
+
+#content-anchor-tip .thumb {
+    float: right;
+} 
+
+#content-anchor-tip .status-icon {
+    position: absolute;
+    top: 4px;
+    right: 50px;
+    padding: 0;
+    line-height: 0;
+} 
+
+#content-anchor-tip a:link, #content-anchor-tip a:visited {
+    color: #339;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.html	(revision 625)
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Tips Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="qtips.css" />
+    <script type="text/javascript" src="qtips.js"></script>
+
+    <style type="text/css">
+        .tip-target {
+            width: 100px;
+            text-align:center;
+            padding: 5px 0;
+            border:1px dotted #99bbe8;
+            background:#dfe8f6;
+            color: #15428b;
+            cursor:default;
+            margin:10px;
+            font:bold 11px tahoma,arial,sans-serif;
+            float:left;
+        }
+    </style>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+    <h1>Tips examples</h1>
+    <p>Note that the js and css is not minified so it is readable. See <a href="qtips.js">qtips.js</a> for the tip creation code
+    and <a href="qtips.css">qtips.css</a> for the css.</p>
+
+    <h3>Easiest Tip</h3>
+    <div id="tip1" class="tip-target">Basic ToolTip</div>
+    <div id="tip2" class="tip-target">autoHide disabled</div>
+    <div id="ajax-tip" class="tip-target">Ajax ToolTip</div>
+    <div id="track-tip" class="tip-target">Mouse Track</div>
+    <div id="tip4" class="tip-target" ext:qtip="My QuickTip">QuickTip</div>
+    
+    <div class="x-clear"></div>
+    <h3>Callout Tip</h3>
+    <div id="leftCallout" class="tip-target" style="width: 150px;">Anchor right, rich content</div>
+    <div id="bottomCallout" class="tip-target" style="width: 200px;">Anchor below</div>
+    <div id="trackCallout" class="tip-target" style="width: 150px;">Anchor with tracking</div>
+
+    <div style="display:none;">
+        <div id="content-tip">
+            <ul>
+                <li>5 bedrooms</li>
+                <li>2 bathrooms</li>
+                <li>Large backyard</li>
+                <li>Close to transport</li>
+            </ul>
+            <div class="x-clear"></div>
+            <img src="images/house.jpg" alt="Website Thumbnail" />
+        </div>
+    </div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/simple-widgets/qtips.js	(revision 625)
@@ -0,0 +1,75 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    new Ext.ToolTip({
+        target: 'tip1',
+        html: 'A very simple tooltip'
+    });
+
+    new Ext.ToolTip({
+        target: 'ajax-tip',
+        width: 200,
+        autoLoad: {url: 'ajax-tip.html'},
+        dismissDelay: 15000 // auto hide after 15 seconds
+    });
+
+    new Ext.ToolTip({
+        target: 'tip2',
+        html: 'Click the X to close me',
+        title: 'My Tip Title',
+        autoHide: false,
+        closable: true,
+        draggable:true
+    });
+
+    new Ext.ToolTip({
+        target: 'track-tip',
+        title: 'Mouse Track',
+        width:200,
+        html: 'This tip will follow the mouse while it is over the element',
+        trackMouse:true
+    });
+    
+    new Ext.ToolTip({        
+        title: '<a href="#">Rich Content Tooltip</a>',
+        id: 'content-anchor-tip',
+        target: 'leftCallout',
+        anchor: 'left',
+        html: null,
+        width: 415,
+        autoHide: false,
+        closable: true,
+        contentEl: 'content-tip', // load content from the page
+        listeners: {
+            'render': function(){
+                this.header.on('click', function(e){
+                    e.stopEvent();
+                    Ext.Msg.alert('Link', 'Link to something interesting.');
+                    Ext.getCmp('content-anchor-tip').hide();
+                }, this, {delegate:'a'});
+            }
+        }
+    });
+    
+    new Ext.ToolTip({
+        target: 'bottomCallout',
+        anchor: 'top',
+        anchorOffset: 85, // center the anchor on the tooltip
+        html: 'This tip\'s anchor is centered'
+    });
+    
+    new Ext.ToolTip({
+        target: 'trackCallout',
+        anchor: 'right',
+        trackMouse: true,
+        html: 'Tracking while you move the mouse'
+    });
+
+
+    Ext.QuickTips.init();
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.css	(revision 625)
@@ -0,0 +1,18 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#custom-slider {
+    width:214px;
+    padding-top:6px;
+    background-image:url(images/ticks.gif);
+}
+#custom-slider .x-slider-thumb {
+    background-image:url(images/slider-thumb.png);
+}
+
+h3 {
+    padding:15px 0 5px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.html	(revision 625)
@@ -0,0 +1,46 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>Ext Slider Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css">
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../ux/SliderTip.js"></script>
+    <script type="text/javascript" src="slider.js"></script>
+    <link rel="stylesheet" type="text/css" href="slider.css">
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css">
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Ext Slider Example</h1>
+<p>Sliders support keyboard adjustments, configurable snapping, axis clicking and animation.</p>
+<h3>Basic Slider</h3>
+<div id="basic-slider"></div>
+<br/>
+<h3>Snapping Slider</h3>
+<div id="increment-slider"></div>
+<br/>
+<h3>Vertical Slider</h3>
+<div id="vertical-slider"></div>
+<br/>
+<h3>Slider with tip</h3>
+<div id="tip-slider"></div>
+<br/>
+<h3>Slider with custom tip</h3>
+<div id="custom-tip-slider"></div>
+<br/>
+<h3>CSS Customized Slider</h3>
+<div id="custom-slider"></div>
+
+<!-- extra space for scrolling -->
+<div style="height:150px;"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/slider/slider.js	(revision 625)
@@ -0,0 +1,64 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    new Ext.Slider({
+        renderTo: 'basic-slider',
+        width: 214,
+        minValue: 0,
+        maxValue: 100
+    });
+
+    new Ext.Slider({
+        renderTo: 'increment-slider',
+        width: 214,
+        value:50,
+        increment: 10,
+        minValue: 0,
+        maxValue: 100
+    });
+
+    new Ext.Slider({
+        renderTo: 'vertical-slider',
+        height: 214,
+        vertical: true,
+        minValue: 0,
+        maxValue: 100
+    });
+
+    new Ext.Slider({
+        renderTo: 'tip-slider',
+        width: 214,
+        minValue: 0,
+        maxValue: 100,
+        plugins: new Ext.ux.SliderTip()
+    });
+
+    var tip = new Ext.ux.SliderTip({
+        getText: function(slider){
+            return String.format('<b>{0}% complete</b>', slider.getValue());
+        }
+    });
+
+    new Ext.Slider({
+        renderTo: 'custom-tip-slider',
+        width: 214,
+        increment: 10,
+        minValue: 0,
+        maxValue: 100,
+        plugins: tip
+    });
+
+    new Ext.Slider({
+        renderTo: 'custom-slider',
+        width: 214,
+        increment: 10,
+        minValue: 0,
+        maxValue: 100,
+        plugins: new Ext.ux.SliderTip()
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.html	(revision 625)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Custom Spinner Widget Example</title>
+
+    <!-- ** CSS ** -->
+    <!-- base library -->
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- overrides to base library -->
+    <link rel="stylesheet" type="text/css" href="../ux/css/Spinner.css" />
+
+    <!-- page specific -->
+    <style type="text/css">
+
+    /* global css */
+    body {
+        padding:0 2em 3em;
+    	font: normal 12px arial, helvetica, sans-serif;
+    	color: #282828;
+    }
+
+    </style>
+
+
+    <!-- ** Javascript ** -->
+    <!-- ExtJS library: base/adapter -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <!-- ExtJS library: all widgets -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- overrides to base library -->
+
+    <!-- extensions -->
+    <script type="text/javascript" src="../ux/Spinner.js"></script>
+    <script type="text/javascript" src="../ux/SpinnerField.js"></script>
+    
+
+    <!-- page specific -->
+    <script type="text/javascript" src="spinner.js"></script>
+
+</head>
+<body>
+
+    <h1>Custom Spinner Widget Example</h1>
+
+    <p>This example demonstrates a Custom Spinner Widget</p> 
+
+    <p>The Custom Spinner Widget utilizes the 
+    <a href="../ux/Spinner.js">Ext.ux.Spinner</a>
+    and
+    <a href="../ux/SpinnerField.js">Ext.ux.form.SpinnerField</a>
+    classes.</p>
+    <p>The js is not minified so it is readable. See <a href="spinner.js">spinner.js</a>.</p>
+
+	<div id="form-ct" style="margin-top:1em"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/spinner/spinner.js	(revision 625)
@@ -0,0 +1,38 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var simple = new Ext.FormPanel({
+        labelWidth: 40, // label settings here cascade unless overridden
+        frame: true,
+        title: 'Simple Form',
+        bodyStyle: 'padding:5px 5px 0',
+        width: 210,
+        defaults: {width: 135},
+        defaultType: 'textfield',
+
+        items: [
+            new Ext.ux.form.SpinnerField({
+                fieldLabel: 'Age',
+                name: 'age'
+            }),
+            {
+            	xtype: 'spinnerfield',
+            	fieldLabel: 'Test',
+            	name: 'test',
+            	minValue: 0,
+            	maxValue: 100,
+            	allowDecimals: true,
+            	decimalPrecision: 1,
+            	incrementValue: 0.4,
+            	alternateIncrementValue: 2.1,
+            	accelerate: true
+            }
+        ]
+    });
+
+    simple.render('form-ct');
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/state/README.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/state/README.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/state/README.txt	(revision 625)
@@ -0,0 +1,16 @@
+This session scope state provider is in use in window/layout.html.
+
+Usage:
+
+get-state.php is included as JS file in the header of any page that needs state information. For a single
+page application, that would be the main page of the application. It is NOT loaded via XHR/Ajax.
+
+save-state.php is included in every page of the application, including pages loaded via ajax.
+
+Inilialization of the SessionProvider looks like:
+Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));
+
+The way the session provider works is when a state change occurs, a cookie is set on the client 
+with the new state data. The next time any page is requested on the server, save-state.php
+will see that cookie, save it in the application state and CLEAR THE COOKIE. This way your application
+doesn't have cookies creating unneccessary network latency.
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/state/SessionProvider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/state/SessionProvider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/state/SessionProvider.js	(revision 625)
@@ -0,0 +1,18 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.state.SessionProvider = Ext.extend(Ext.state.CookieProvider, {
+    readCookies : function(){
+        if(this.state){
+            for(var k in this.state){
+                if(typeof this.state[k] == 'string'){
+                    this.state[k] = this.decodeValue(this.state[k]);
+                }
+            }
+        }
+        return Ext.apply(this.state || {}, Ext.state.SessionProvider.superclass.readCookies.call(this));
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/state/get-state.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/state/get-state.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/state/get-state.php	(revision 625)
@@ -0,0 +1,10 @@
+<?php
+session_start();
+if(!isset($_SESSION['state'])){
+    $_SESSION['state'] = array(
+        'sessionId'=>session_id()
+    );
+}
+echo 'Ext.appState = ';
+echo json_encode($_SESSION['state']);
+echo ';';
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/state/save-state.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/state/save-state.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/state/save-state.php	(revision 625)
@@ -0,0 +1,16 @@
+<?php
+session_start();
+if(!isset($_SESSION['state'])){
+    $_SESSION['state'] = array(
+        'sessionId'=>session_id()
+    );
+}
+foreach($_COOKIE as $name=>$value){
+    // look for state cookies
+    if(strpos($name, 'ys-') === 0){
+        // store in session
+        $_SESSION['state'][substr($name, 3)] = $value;
+        // remove cookie
+        setCookie($name, '', time()-10000, '/');
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/ValidationStatus.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/ValidationStatus.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/ValidationStatus.js	(revision 625)
@@ -0,0 +1,169 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Ext JS Library 2.2
+ * Copyright(c) 2006-2008, Ext JS, LLC.
+ * licensing@extjs.com
+ * 
+ * http://extjs.com/license
+ */
+
+/**
+ * @class Ext.ux.ValidationStatus
+ * A {@link Ext.StatusBar} plugin that provides automatic error notification when the
+ * associated form contains validation errors.
+ * @extends Ext.Component
+ * @constructor
+ * Creates a new ValiationStatus plugin
+ * @param {Object} config A config object
+ */
+Ext.ux.ValidationStatus = Ext.extend(Ext.Component, {
+    
+    errorIconCls : 'x-status-error',
+    
+    errorListCls : 'x-status-error-list',
+    
+    validIconCls : 'x-status-valid',
+    
+    showText : 'The form has errors (click for details...)',
+    
+    hideText : 'Click again to hide the error list',
+    
+    submitText : 'Saving...',
+    
+    // private
+    init : function(sb){
+        sb.on('render', function(){
+            this.statusBar = sb;
+            this.monitor = true;
+            this.errors = new Ext.util.MixedCollection();
+            this.listAlign = (sb.statusAlign=='right' ? 'br-tr?' : 'bl-tl?');
+            
+            if(this.form){
+                this.form = Ext.getCmp(this.form).getForm();
+                this.startMonitoring();
+                this.form.on('beforeaction', function(f, action){
+                    if(action.type == 'submit'){
+                        // Ignore monitoring while submitting otherwise the field validation
+                        // events cause the status message to reset too early
+                        this.monitor = false;
+                    }
+                }, this);
+                var startMonitor = function(){
+                    this.monitor = true;
+                }
+                this.form.on('actioncomplete', startMonitor, this);
+                this.form.on('actionfailed', startMonitor, this);
+            }
+        }, this, {single:true});
+        sb.on('afterlayout', function(){
+            // Grab the statusEl after the first layout.
+            sb.statusEl.getEl().on('click', this.onStatusClick, this, {buffer:200});
+        }, this, {single: true});
+    },
+    
+    // private
+    startMonitoring : function(){
+        this.form.items.each(function(f){
+            f.on('invalid', this.onFieldValidation, this);
+            f.on('valid', this.onFieldValidation, this);
+        }, this);
+    },
+    
+    // private
+    stopMonitoring : function(){
+        this.form.items.each(function(f){
+            f.un('invalid', this.onFieldValidation, this);
+            f.un('valid', this.onFieldValidation, this);
+        }, this);
+    },
+    
+    // private
+    onDestroy : function(){
+        this.stopMonitoring();
+        this.statusBar.statusEl.un('click', this.onStatusClick, this);
+        Ext.ux.ValidationStatus.superclass.onDestroy.call(this);
+    },
+    
+    // private
+    onFieldValidation : function(f, msg){
+        if(!this.monitor){
+            return false;
+        }
+        if(msg){
+            this.errors.add(f.id, {field:f, msg:msg});
+        }else{
+            this.errors.removeKey(f.id);
+        }
+        this.updateErrorList();
+        if(this.errors.getCount() > 0){
+            if(this.statusBar.getText() != this.showText){
+                this.statusBar.setStatus({text:this.showText, iconCls:this.errorIconCls});
+            }
+        }else{
+            this.statusBar.clearStatus().setIcon(this.validIconCls);
+        }
+    },
+    
+    // private
+    updateErrorList : function(){
+        if(this.errors.getCount() > 0){
+	        var msg = '<ul>';
+	        this.errors.each(function(err){
+	            msg += ('<li id="x-err-'+ err.field.id +'"><a href="#">' + err.msg + '</a></li>');
+	        }, this);
+	        this.getMsgEl().update(msg+'</ul>');
+        }else{
+            this.getMsgEl().update('');
+        }
+    },
+    
+    // private
+    getMsgEl : function(){
+        if(!this.msgEl){
+            this.msgEl = Ext.DomHelper.append(Ext.getBody(), {
+                cls: this.errorListCls+' x-hide-offsets'
+            }, true);
+            
+            this.msgEl.on('click', function(e){
+                var t = e.getTarget('li', 10, true);
+                if(t){
+                    Ext.getCmp(t.id.split('x-err-')[1]).focus();
+                    this.hideErrors();
+                }
+            }, this, {stopEvent:true}); // prevent anchor click navigation
+        }
+        return this.msgEl;
+    },
+    
+    // private
+    showErrors : function(){
+        this.updateErrorList();
+        this.getMsgEl().alignTo(this.statusBar.getEl(), this.listAlign).slideIn('b', {duration:.3, easing:'easeOut'});
+        this.statusBar.setText(this.hideText);
+        this.form.getEl().on('click', this.hideErrors, this, {single:true}); // hide if the user clicks directly into the form
+    },
+    
+    // private
+    hideErrors : function(){
+        var el = this.getMsgEl();
+        if(el.isVisible()){
+	        el.slideOut('b', {duration:.2, easing:'easeIn'});
+	        this.statusBar.setText(this.showText);
+        }
+        this.form.getEl().un('click', this.hideErrors, this);
+    },
+    
+    // private
+    onStatusClick : function(){
+        if(this.getMsgEl().isVisible()){
+            this.hideErrors();
+        }else if(this.errors.getCount() > 0){
+            this.showErrors();
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/fake.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/fake.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/fake.php	(revision 625)
@@ -0,0 +1,4 @@
+<?php
+    // fake form save
+    sleep(2);
+    echo '{success:true}';
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.html	(revision 625)
@@ -0,0 +1,46 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>Advanced Ext.ux.StatusBar Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
+    <script type="text/javascript" src="../../ext-all.js"> </script>
+    <script type="text/javascript" src="../ux/StatusBar.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="../ux/css/StatusBar.css" />
+    <script type="text/javascript" src="ValidationStatus.js"> </script>
+    <script type="text/javascript" src="statusbar-advanced.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style>
+        .list {
+            list-style-image:none;
+            list-style-position:outside;
+            list-style-type:square;
+            padding-left:16px;
+        }
+        .list li {
+            font-size:11px;
+            padding:3px;
+        }
+    </style>
+</head>
+<body>
+    <h1>Advanced StatusBar Example</h1>
+    <p>This is an advanced example of customizing a Ext.ux.StatusBar via a plugin.</p>
+    <p>Note that the js is not minified so it is readable. See <a href="statusbar-advanced.js">statusbar-advanced.js</a>.</p>
+
+    <h2>Customizing the StatusBar</h2>
+    <p>The <a href="ValidationStatus.js">ValidationStatus</a> plugin hooks into the StatusBar and automatically
+    monitors the validation status of any fields in the associated FormPanel.  Items of interest:</p>
+    <ul class="list">
+        <li>The StatusBar syncs in real-time with the valid state of the form as you type</li>
+        <li>When the form is invalid, the error status message can be clicked to hide/show a custom error list</li>
+        <li>The error list items can be clicked to focus the associated fields</li>
+        <li>After submitting successfully, note that the confirmation status message will fade out after 5
+        seconds and return to the default status (this is a config option)</li>
+    </ul><br>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-advanced.js	(revision 625)
@@ -0,0 +1,80 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Ext JS Library 2.2
+ * Copyright(c) 2006-2008, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://extjs.com/license
+ */
+
+
+Ext.QuickTips.init();
+
+Ext.onReady(function(){
+
+    var fp = new Ext.FormPanel({
+        id: 'status-form',
+        renderTo: Ext.getBody(),
+        labelWidth: 75,
+        width: 350,
+        buttonAlign: 'right',
+        border: false,
+        bodyStyle: 'padding:10px 10px 0;',
+        defaults: {
+            anchor: '95%',
+            allowBlank: false,
+            selectOnFocus: true,
+            msgTarget: 'side'
+        },
+        items:[{
+            xtype: 'textfield',
+            fieldLabel: 'Name',
+            blankText: 'Name is required'
+        },{
+            xtype: 'datefield',
+            fieldLabel: 'Birthdate',
+            blankText: 'Birthdate is required'
+        }],
+        buttons: [{
+            text: 'Save',
+            handler: function(){
+                if(fp.getForm().isValid()){
+                    var sb = Ext.getCmp('form-statusbar');
+                    sb.showBusy('Saving form...');
+                    fp.getEl().mask();
+                    fp.getForm().submit({
+                        url: 'fake.php',
+                        success: function(){
+                            sb.setStatus({
+                                text:'Form saved!',
+                                iconCls:'',
+                                clear: true
+                            });
+                            fp.getEl().unmask();
+                        }
+                    });
+                }
+            }
+        }]
+    });
+
+    new Ext.Panel({
+        title: 'StatusBar with Integrated Form Validation',
+        renderTo: Ext.getBody(),
+        width: 350,
+        autoHeight: true,
+        layout: 'fit',
+        items: fp,
+        bbar: new Ext.ux.StatusBar({
+            id: 'form-statusbar',
+            defaultText: 'Ready',
+            plugins: new Ext.ux.ValidationStatus({form:'status-form'})
+        })
+    });
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.html	(revision 625)
@@ -0,0 +1,46 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>Ext.ux.StatusBar Examples</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
+    <script type="text/javascript" src="../../ext-all.js"> </script>
+    <script type="text/javascript" src="../ux/StatusBar.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="../ux/css/StatusBar.css" />
+    <script type="text/javascript" src="statusbar-demo.js"> </script>
+
+    <link rel="stylesheet" type="text/css" href="../../examples/shared/examples.css" />
+
+    <style>
+        body .x-panel {
+            margin-bottom:20px;
+        }
+    </style>
+</head>
+<body>
+    <h1>StatusBar Examples</h1>
+    <p>Here are several examples of using and customizing the Ext.ux.StatusBar component.</p>
+    <p>Note that the js is not minified so it is readable. See <a href="statusbar-demo.js">statusbar-demo.js</a>.</p>
+
+    <h2>Basic StatusBar</h2>
+    <p>This is a simple StatusBar with a few standard Toolbar items included.</p>
+    <div id="basic"></div>
+    <p>
+
+    <h2>Right-Aligned StatusBar</h2>
+    <p>This is a simple StatusBar that has the status element right-aligned.  Any StatusBar items will be added in
+    exactly the same order on the left side of the bar.</p>
+    <div id="right-aligned"></div>
+
+    <h2>Status Window</h2>
+    <p>You can add a StatusBar to a window in exactly the same way.</p>
+    <div id="window" style="margin-bottom:20px;"></div>
+
+    <h2>Customizing the Look and Feel</h2>
+    <p>This is a standard StatusBar with some custom CSS styles applied and some event handling in place to
+    handle the TextArea's keypress events.  Notice that after you've stopped typing for a few seconds a
+    simulated auto-save process will begin.</p>
+    <div id="word-proc"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/statusbar/statusbar-demo.js	(revision 625)
@@ -0,0 +1,215 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Ext JS Library 2.2
+ * Copyright(c) 2006-2008, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://extjs.com/license
+ */
+
+
+Ext.onReady(function(){
+
+    // This is a shared function that simulates a load action on a StatusBar.
+    // It is reused by most of the example panels.
+    var loadFn = function(btn, statusBar){
+        btn = Ext.getCmp(btn);
+        statusBar = Ext.getCmp(statusBar);
+
+        btn.disable();
+        statusBar.showBusy();
+
+        (function(){
+            statusBar.clearStatus({useDefaults:true});
+            btn.enable();
+        }).defer(2000);
+    };
+
+/*
+ * ================  Basic StatusBar example  =======================
+ */
+    new Ext.Panel({
+        title: 'Basic StatusBar',
+        renderTo: 'basic',
+        width: 350,
+        height: 100,
+        bodyStyle: 'padding:10px;',
+        items:[{
+            xtype: 'button',
+            id: 'basic-button',
+            text: 'Do Loading',
+            handler: loadFn.createCallback('basic-button', 'basic-statusbar')
+        }],
+        bbar: new Ext.ux.StatusBar({
+            defaultText: 'Default status',
+            id: 'basic-statusbar',
+	        items: [{
+	            text: 'A Button'
+	        }, '-', 'Plain Text', ' ', ' ']
+        })
+    });
+
+/*
+ * ================  Right-aligned StatusBar example  =======================
+ */
+    new Ext.Panel({
+        title: 'Right-aligned StatusBar',
+        renderTo: 'right-aligned',
+        width: 350,
+        height: 100,
+        bodyStyle: 'padding:10px;',
+        items:[{
+            xtype: 'button',
+            id: 'right-button',
+            text: 'Do Loading',
+            handler: loadFn.createCallback('right-button', 'right-statusbar')
+        }],
+        bbar: new Ext.ux.StatusBar({
+            defaultText: 'Default status',
+            id: 'right-statusbar',
+            statusAlign: 'right', // the magic config
+            items: [{
+                text: 'A Button'
+            }, '-', 'Plain Text', ' ', ' ']
+        })
+    });
+
+/*
+ * ================  StatusBar Window example  =======================
+ */
+    var win = new Ext.Window({
+        title: 'StatusBar Window',
+        width: 400,
+        minWidth: 350,
+        height: 150,
+        modal: true,
+        closeAction: 'hide',
+        bodyStyle: 'padding:10px;',
+        items:[{
+            xtype: 'button',
+            id: 'win-button',
+            text: 'Do Loading',
+            handler: loadFn.createCallback('win-button', 'win-statusbar')
+        }],
+        bbar: new Ext.ux.StatusBar({
+            id: 'win-statusbar',
+            defaultText: 'Ready',
+            items: [{
+                text: 'A Button'
+            }, '-',
+            new Date().format('n/d/Y'), ' ', ' ', '-', {
+                xtype:'tbsplit',
+                text:'Status Menu',
+                menuAlign: 'br-tr?',
+                menu: new Ext.menu.Menu({
+                    items: [{text: 'Item 1'}, {text: 'Item 2'}]
+                })
+            }]
+        })
+    });
+
+    new Ext.Button({
+        text: 'Show Window',
+        renderTo: 'window',
+        handler: function(){
+            win.show();
+        }
+    });
+
+/*
+ * ================  Ext Word Processor example  =======================
+ *
+ * The StatusBar used in this example is completely standard.  What is
+ * customized are the styles and event handling to make the example a
+ * lot more dynamic and application-oriented.
+ *
+ */
+    // Create these explicitly so we can manipulate them later
+    var wordCount = new Ext.Toolbar.TextItem('Words: 0');
+    var charCount = new Ext.Toolbar.TextItem('Chars: 0');
+    var clock = new Ext.Toolbar.TextItem('');
+
+    new Ext.Panel({
+        title: 'Ext Word Processor',
+        renderTo: 'word-proc',
+        width: 500,
+        autoHeight: true,
+        bodyStyle: 'padding:5px;',
+        layout: 'fit',
+        bbar: new Ext.ux.StatusBar({
+            id: 'word-status',
+            // These are just the standard toolbar TextItems we created above.  They get
+            // custom classes below in the render handler which is what gives them their
+            // customized inset appearance.
+            items: [wordCount, ' ', charCount, ' ', clock, ' ']
+        }),
+        items: {
+            xtype: 'textarea',
+            id: 'word-textarea',
+            enableKeyEvents: true,
+            grow: true,
+            growMin: 100,
+            growMax: 200,
+            listeners: {
+                // After each keypress update the word and character count text items
+                'keypress': {
+                    fn: function(t){
+                        var v = t.getValue(),
+                            wc = 0, cc = v.length ? v.length : 0;
+
+                        if(cc > 0){
+                            wc = v.match(/\b/g);
+                            wc = wc ? wc.length / 2 : 0;
+                        }
+	                    Ext.fly(wordCount.getEl()).update('Words: '+wc);
+                        Ext.fly(charCount.getEl()).update('Chars: '+cc);
+	                },
+                    buffer: 1 // buffer to allow the value to update first
+                }
+            }
+        },
+        listeners: {
+            render: {
+                fn: function(){
+                    // Add a class to the parent TD of each text item so we can give them some custom inset box
+                    // styling. Also, since we are using a greedy spacer, we have to add a block level element
+                    // into each text TD in order to give them a fixed width (TextItems are spans).  Insert a
+                    // spacer div into each TD using createChild() so that we can give it a width in CSS.
+                    Ext.fly(wordCount.getEl().parent()).addClass('x-status-text-panel').createChild({cls:'spacer'});
+                    Ext.fly(charCount.getEl().parent()).addClass('x-status-text-panel').createChild({cls:'spacer'});
+                    Ext.fly(clock.getEl().parent()).addClass('x-status-text-panel').createChild({cls:'spacer'});
+
+                    // Kick off the clock timer that updates the clock el every second:
+				    Ext.TaskMgr.start({
+				        run: function(){
+				            Ext.fly(clock.getEl()).update(new Date().format('g:i:s A'));
+				        },
+				        interval: 1000
+				    });
+                },
+                delay: 100
+            }
+        }
+    });
+
+    // This sets up a fake auto-save function.  It monitors keyboard activity and after no typing
+    // has occurred for 1.5 seconds, it updates the status message to indicate that it's saving.
+    // After a fake delay so that you can see the save activity it will update again to indicate
+    // that the action succeeded.
+    Ext.fly('word-textarea').on('keypress', function(){
+        var sb = Ext.getCmp('word-status');
+        sb.showBusy('Saving draft...');
+        (function(){
+            sb.setStatus({
+                iconCls: 'x-status-saved',
+                text: 'Draft auto-saved at ' + new Date().format('g:i:s A')
+            });
+        }).defer(4000);
+    }, this, {buffer:1500});
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax1.htm
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax1.htm	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax1.htm	(revision 625)
@@ -0,0 +1,3 @@
+<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
+<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
+<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax2.htm
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax2.htm	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/ajax2.htm	(revision 625)
@@ -0,0 +1,7 @@
+I'm am content loaded via AJAX. I was set up using the setUrl() method on my Ext.TabPanelItem object:
+<div style="padding:10px;background:#f1f1f1;"><pre><code>var tab3 = jtabs.addTab('jtabs-3', "Ajax Tab 2");
+tab3.setUrl('ajax2.htm', null, true);
+</code></pre></div>
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.css	(revision 625)
@@ -0,0 +1,30 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tab-scroller-right-over {
+    background-position: -18px 0;
+}
+
+.x-tab-tabmenu-right {
+    background: transparent url(tab-scroller-menu.gif) no-repeat 0 0;
+    border-bottom: 1px solid #8db2e3;
+    width:18px;
+    position:absolute;
+    right:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+.x-tab-tabmenu-over {
+    background-position: -18px 0;
+}
+.x-tab-tabmenu-disabled {
+    background-position: 0 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.html	(revision 625)
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Advanced Tabs</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all-debug.js"></script>
+
+
+    <link rel="stylesheet" type="text/css" href="tab-scroller-menu.css" />
+
+    <script type="text/javascript" src="../ux/TabScrollerMenu.js"></script>
+    <script type="text/javascript" src="tab-scroller-menu.js"></script>
+    <!-- Common Styles for the examples -->
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+</head>
+<body>
+    <p>
+    An Example of a "Tab Scroller Menu" plugin.  <p>The js is not minified so it is readable. See <a href="tab-scroller-menu.js">tab-scroller-menu.js</a>.</p>
+
+    In order to use this plugin in your code, you need the following files:
+    </p>
+    <ul>
+        <li> <a href="tab-scroller-menu.css">tab-scroller-menu.css</a> : Required CSS file. </li>
+        <li> <a href="tab-scroller-menu.gif">tab-scroller-menu.gif</a> : Required GIF Sprite.</li>
+        <li> <a href="../ux/TabScrollerMenu.js">TabScrollerMenu.js</a> : The actual plugin code. </li>
+    </ul>
+
+</body>
+</html>
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tab-scroller-menu.js	(revision 625)
@@ -0,0 +1,51 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function() {
+	Ext.QuickTips.init();
+	// Create our instance of tabScrollerMenu
+	var scrollerMenu = new Ext.ux.TabScrollerMenu({
+		maxText  : 15,
+		pageSize : 5
+	});
+	new Ext.Window({
+		height : 200,
+		width  : 400,
+		layout : 'fit',
+		title  : 'Exercising scrollable tabs with a tabscroller menu',
+		items  : {
+			xtype           : 'tabpanel',
+			activeTab       : 0,
+			id              : 'myTPanel',
+			enableTabScroll : true,
+			resizeTabs      : true,
+			minTabWidth     : 75,
+			border          : false,
+			plugins         : [ scrollerMenu ],
+			items           : [
+				{
+					title : 'our first tab'
+				}
+			]
+		}
+	}).show();
+	
+	// Add a bunch of tabs dynamically
+	var tabLimit = 22;
+	(function (num) {
+		for (var i = 1; i <= tabLimit; i++) {
+			var title = 'Tab # ' + i;
+			Ext.getCmp('myTPanel').add({
+				title    : title,
+				html     : 'Hi, i am tab ' + i,
+				tabTip   : title,
+				closable : true
+			});
+		}
+	}).defer(1000);
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.html	(revision 625)
@@ -0,0 +1,37 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Advanced Tabs</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="tabs-example.css" />
+    <script type="text/javascript" src="../ux/TabCloseMenu.js"></script>
+    <script type="text/javascript" src="tabs-adv.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+    <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+    <h1>Advanced Tabs</h1>
+    <p>Note that the js and css is not minified so it is readable. See <a href="tabs-adv.js">tabs-adv.js</a> for the tab creation code.</p>
+
+    <p>This TabPanel is built entirely with javascript and demonstrates:</p>
+    <ul class="list">
+        <li>Auto tab resizing</li>
+        <li>Tab scrolling</li>
+        <li>Tabs with icons</li>
+        <li>Tab plugins (context menu)</li>
+        <li>Adding tabs with JS</li>
+    </ul><br>
+
+    <div id="tabs" style="margin:15px 0;"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-adv.js	(revision 625)
@@ -0,0 +1,41 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var tabs = new Ext.TabPanel({
+        renderTo:'tabs',
+        resizeTabs:true, // turn on tab resizing
+        minTabWidth: 115,
+        tabWidth:135,
+        enableTabScroll:true,
+        width:600,
+        height:250,
+        defaults: {autoScroll:true},
+        plugins: new Ext.ux.TabCloseMenu()
+    });
+
+    // tab generation code
+    var index = 0;
+    while(index < 7){
+        addTab();
+    }
+    function addTab(){
+        tabs.add({
+            title: 'New Tab ' + (++index),
+            iconCls: 'tabs',
+            html: 'Tab Body ' + (index) + '<br/><br/>'
+                    + Ext.example.bogusMarkup,
+            closable:true
+        }).show();
+    }
+
+    new Ext.Button({
+        text: 'Add Tab',
+        handler: addTab,
+        iconCls:'new-tab'
+    }).render(document.body, 'tabs');
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.css	(revision 625)
@@ -0,0 +1,34 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.list {list-style:square;width:500px;padding-left:16px;}
+.list li{padding:2px;font-size:8pt;}
+
+pre {
+   font-size:11px; 
+}
+
+.x-tab-panel-body .x-panel-body {
+    padding:10px;
+}
+
+/* default loading indicator for ajax calls */
+.loading-indicator {
+	font-size:8pt;
+	background-image:url('../../resources/images/default/grid/loading.gif');
+	background-repeat: no-repeat;
+	background-position: left;
+	padding-left:20px;
+}
+
+.new-tab {
+    background-image:url(../feed-viewer/images/new_tab.gif) !important;
+}
+
+
+.tabs {
+    background-image:url( ../desktop/images/tabs.gif ) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs-example.js	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    // basic tabs 1, built from existing content
+    var tabs = new Ext.TabPanel({
+        renderTo: 'tabs1',
+        width:450,
+        activeTab: 0,
+        frame:true,
+        defaults:{autoHeight: true},
+        items:[
+            {contentEl:'script', title: 'Short Text'},
+            {contentEl:'markup', title: 'Long Text'}
+        ]
+    });
+
+    // second tabs built from JS
+    var tabs2 = new Ext.TabPanel({
+        renderTo: document.body,
+        activeTab: 0,
+        width:600,
+        height:250,
+        plain:true,
+        defaults:{autoScroll: true},
+        items:[{
+                title: 'Normal Tab',
+                html: "My content was added during construction."
+            },{
+                title: 'Ajax Tab 1',
+                autoLoad:'ajax1.htm'
+            },{
+                title: 'Ajax Tab 2',
+                autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
+            },{
+                title: 'Event Tab',
+                listeners: {activate: handleActivate},
+                html: "I am tab 4's content. I also have an event listener attached."
+            },{
+                title: 'Disabled Tab',
+                disabled:true,
+                html: "Can't see me cause I'm disabled"
+            }
+        ]
+    });
+
+    function handleActivate(tab){
+        alert(tab.title + ' was activated.');
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tabs/tabs.html	(revision 625)
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Tabs Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <!-- Tabs Example Files -->
+    <link rel="stylesheet" type="text/css" href="tabs-example.css" />
+    <script type="text/javascript" src="tabs-example.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Tab Panel Examples</h1>
+<p>Note that the js and css is not minified so it is readable. See <a href="tabs-example.js">tabs-example.js</a> for the tab creation code
+and <a href="tabs-example.css">tabs-example.css</a> for the css.</p>
+
+    <h3>Tabs with auto height that resize to the content. Built from existing markup.</h3><br>
+
+    <!-- container for the existing markup tabs -->
+    <div id="tabs1">
+        <div id="script" class="x-hide-display">
+            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus.<br/><br/> Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.</p>
+        </div>
+        <div id="markup" class="x-hide-display">
+            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.<br/><br/>Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.</p>
+        </div>
+    </div>
+
+    <br>
+    <h3>Tabs with no tab strip and a fixed height that scroll the content. Built entirely with javascript.</h3>
+    <ul class="list">
+    <li>Tab 1 is a normal tab with content passed when adding it.</li>
+    <li>Tab 2 is loaded via Ajax.</li>
+    <li>Tab 3 is loaded via Ajax too. It was set up to pass parameters when loaded.</li>
+    <li>Tab 4 has an event listener attached.</li>
+    <li>Tab 5 is disabled.</li>
+    </ul><br>
+
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/classes.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/classes.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/classes.js	(revision 625)
@@ -0,0 +1,162 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.BLANK_IMAGE_URL = 'images/s.gif';
+    
+Task = Ext.data.Record.create([
+    {name: 'taskId', type:'string'},
+    {name: 'title', type:'string'},
+    {name: 'category', type:'string'},
+    {name: 'description', type:'string'},
+    {name: 'dueDate', type:'date', dateFormat: 'Y-m-d H:i:s'},
+    {name: 'completed', type:'boolean'}
+]);
+
+Task.nextId = function(){
+	// if the time isn't unique enough, the addition 
+	// of random chars should be
+	var t = String(new Date().getTime()).substr(4);
+	var s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+	for(var i = 0; i < 4; i++){
+		t += s.charAt(Math.floor(Math.random()*26));
+	}
+	return t;
+}
+
+// The main grid's store
+TaskStore = function(conn){
+	TaskStore.superclass.constructor.call(this, {
+        sortInfo:{field: 'dueDate', direction: "ASC"},
+        groupField:'dueDate',
+        taskFilter: 'all',
+        reader: new Ext.data.JsonReader({
+            idProperty: 'taskId'
+        }, Task)
+    });
+
+    this.proxy = new Ext.data.SqlDB.Proxy(conn, 'task', 'taskId', this);
+
+    if(window.google){ // google needs the table created
+        this.proxy.on('beforeload', this.prepareTable, conn);
+    }
+
+    this.addEvents({newcategory: true});
+};
+
+Ext.extend(TaskStore, Ext.data.GroupingStore, {
+    applyFilter : function(filter){
+    	if(filter !== undefined){
+    		this.taskFilter = filter;
+    	}
+        var value = this.taskFilter;
+        if(value == 'all'){
+            return this.clearFilter();
+        }
+        return this.filterBy(function(item){
+            return item.data.completed === value;
+        });
+    },
+
+    addTask : function(data){
+        this.suspendEvents();
+        this.clearFilter();
+        this.resumeEvents();
+        this.loadData([data], true);
+        this.suspendEvents();
+        this.applyFilter();
+        this.applyGrouping(true);
+        this.resumeEvents();
+        this.fireEvent('datachanged', this);
+        this.fireEvent('newcategory', data.category);
+    },
+
+    prepareTable : function(){
+        try{
+        this.createTable({
+            name: 'task',
+            key: 'taskId',
+            fields: Task.prototype.fields
+        });
+        }catch(e){console.log(e)}
+    }
+});
+
+// The store for Categories
+CategoryStore = function(){
+    CategoryStore.superclass.constructor.call(this, {
+        expandData: true,
+        data: [],
+        fields:[{name: 'text', type:'string'}],
+        sortInfo:{field:'text', direction:'ASC'},
+        id: 0
+    });
+}
+
+Ext.extend(CategoryStore, Ext.data.ArrayStore, {
+    init : function(store){
+        var cats = store.collect('category', false, true);
+        this.loadData(cats);
+    },
+
+    addCategory : function(cat){
+        if(cat && this.indexOfId(cat) === -1){
+            this.clearFilter(true);
+            this.loadData([cat], true);
+            this.applySort();
+        }
+    }
+});
+
+// Grid column plugin that does the complete/active button in the left-most column
+CompleteColumn = function(){
+    var grid;
+
+    function getRecord(t){
+        var index = grid.getView().findRowIndex(t);
+        return grid.store.getAt(index);
+    }
+
+    function onMouseDown(e, t){
+        if(Ext.fly(t).hasClass('task-check')){
+            e.stopEvent();
+            var record = getRecord(t);
+            record.set('completed', !record.data.completed);
+            grid.store.applyFilter();
+        }
+    }
+
+    function onMouseOver(e, t){
+        if(Ext.fly(t).hasClass('task-check')){
+            Ext.fly(t.parentNode).addClass('task-check-over');
+        }
+    }
+
+    function onMouseOut(e, t){
+        if(Ext.fly(t).hasClass('task-check')){
+            Ext.fly(t.parentNode).removeClass('task-check-over');
+        }
+    }
+
+    Ext.apply(this, {
+        width: 22,
+        header: '<div class="task-col-hd"></div>',
+        menuDisabled:true,
+        fixed: true,
+        id: 'task-col',
+        renderer: function(){
+            return '<div class="task-check"></div>';
+        },
+        init : function(xg){
+            grid = xg;
+            grid.on('render', function(){
+                var view = grid.getView();
+                view.mainBody.on('mousedown', onMouseDown);
+                view.mainBody.on('mouseover', onMouseOver);
+                view.mainBody.on('mouseout', onMouseOut);
+            });
+        }
+    });
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-air-db.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-air-db.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-air-db.js	(revision 625)
@@ -0,0 +1,103 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+ Ext.data.AirDB = Ext.extend(Ext.data.SqlDB, {
+	open : function(db, cb, scope){
+		this.conn = new air.SQLConnection();
+
+		var file = air.File.applicationResourceDirectory.resolve(db);
+
+		this.conn.addEventListener(air.SQLEvent.OPEN, this.onOpen.createDelegate(this, [cb, scope]));
+		this.conn.addEventListener(air.SQLEvent.CLOSE, this.onClose.createDelegate(this));
+		this.conn.open(file, true);
+	},
+
+	close : function(){
+		this.conn.close();
+	},
+
+	onOpen : function(cb, scope){
+		this.openState = true;
+		Ext.callback(cb, scope, [this]);
+		this.fireEvent('open', this);
+	},
+
+	onClose : function(){
+		this.fireEvent('close', this);
+	},
+
+	onError : function(e, stmt, type, cb, scope){
+		Ext.callback(cb, scope, [false, e, stmt]);
+	},
+
+	onResult : function(e, stmt, type, cb, scope){
+		if(type == 'exec'){
+			Ext.callback(cb, scope, [true, e, stmt]);
+		}else{
+			var r = [];
+			var result = stmt.getResult();
+			if(result && result.data){
+		        var len = result.data.length;
+		        for(var i = 0; i < len; i++) {
+		            r[r.length] = result.data[i];
+		        }
+		    }
+			Ext.callback(cb, scope, [r, e, stmt]);
+		}
+	},
+
+	createStatement : function(type, cb, scope){
+
+		var stmt = new air.SQLStatement();
+
+		stmt.addEventListener(air.SQLErrorEvent.ERROR, this.onError.createDelegate(this, [stmt, type, cb, scope], true));
+		stmt.addEventListener(air.SQLEvent.RESULT, this.onResult.createDelegate(this, [stmt, type, cb, scope], true));
+
+		stmt.sqlConnection = this.conn;
+
+		return stmt;
+	},
+
+	exec : function(sql, cb, scope){
+		var stmt = this.createStatement('exec', cb, scope);
+		stmt.text = sql;
+		stmt.execute();
+	},
+
+	execBy : function(sql, args, cb, scope){
+		var stmt = this.createStatement('exec', cb, scope);
+		stmt.text = sql;
+		this.addParams(stmt, args);
+		stmt.execute();
+	},
+
+	query : function(sql, cb, scope){
+		var stmt = this.createStatement('query', cb, scope);
+		stmt.text = sql;
+		stmt.execute(this.maxResults);
+	},
+
+	queryBy : function(sql, args, cb, scope){
+		var stmt = this.createStatement('query', cb, scope);
+		stmt.text = sql;
+		this.addParams(stmt, args);
+		stmt.execute(this.maxResults);
+	},
+
+    addParams : function(stmt, args){
+		if(!args){ return; }
+		for(var key in args){
+			if(args.hasOwnProperty(key)){
+				if(!isNaN(key)){
+					stmt.parameters[parseInt(key)+1] = args[key];
+				}else{
+					stmt.parameters[':' + key] = args[key];
+				}
+			}
+		}
+		return stmt;
+	}
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-db.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-db.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-db.js	(revision 625)
@@ -0,0 +1,260 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// Asbtract base class for SqlDB classes
+Ext.data.SqlDB = function(config){
+	Ext.apply(this, config);
+	Ext.data.SqlDB.superclass.constructor.call(this);
+
+	this.addEvents({
+		open : true,
+		close: true
+	});
+};
+
+Ext.extend(Ext.data.SqlDB, Ext.util.Observable, {
+	maxResults: 10000,
+	openState : false,
+
+    // abstract methods
+    open : function(file, cb, scope){
+	},
+
+	close : function(){
+	},
+
+    exec : function(sql, cb, scope){
+	},
+
+	execBy : function(sql, args, cb, scope){
+	},
+
+	query : function(sql, cb, scope){
+	},
+
+	queryBy : function(sql, args, cb, scope){
+	},
+
+    // protected/inherited method
+    isOpen : function(){
+		return this.openState;
+	},
+
+	getTable : function(name, keyName){
+		return new Ext.data.SqlDB.Table(this, name, keyName);
+	},
+
+	createTable : function(o){
+		var tableName = o.name;
+		var keyName = o.key;
+		var fs = o.fields;
+		var cb = o.callback;
+		var scope = o.scope;
+		if(!(fs instanceof Array)){ // Ext fields collection
+			fs = fs.items;
+		}
+		var buf = [];
+		for(var i = 0, len = fs.length; i < len; i++){
+			var f = fs[i], s = f.name;
+			switch(f.type){
+	            case "int":
+	            case "bool":
+	            case "boolean":
+	                s += ' INTEGER';
+	                break;
+	            case "float":
+	                s += ' REAL';
+	                break;
+	            default:
+	            	s += ' TEXT';
+	        }
+	        if(f.allowNull === false || f.name == keyName){
+	        	s += ' NOT NULL';
+	        }
+	        if(f.name == keyName){
+	        	s += ' PRIMARY KEY';
+	        }
+	        if(f.unique === true){
+	        	s += ' UNIQUE';
+	        }
+
+	        buf[buf.length] = s;
+	    }
+	    var sql = ['CREATE TABLE IF NOT EXISTS ', tableName, ' (', buf.join(','), ')'].join('');
+        this.exec(sql, cb, scope);
+	}
+});
+
+
+Ext.data.SqlDB.getInstance = function(db, config){
+    if(window.htmlControl){ // air
+        return new Ext.data.AirDB(config);
+    } else { // gears
+        return new Ext.data.GearsDB(config);
+    }
+};
+
+
+Ext.data.SqlDB.Table = function(conn, name, keyName){
+	this.conn = conn;
+	this.name = name;
+	this.keyName = keyName;
+};
+
+Ext.data.SqlDB.Table.prototype = {
+	update : function(o, cb, scope){
+		var clause = this.keyName + " = :" + this.keyName;
+		this.updateBy(o, clause, {}, cb, scope);
+	},
+
+	updateBy : function(o, clause, args, cb, scope){
+		var sql = "UPDATE " + this.name + " set ";
+		var fs = [], a = [];
+		for(var key in o){
+			if(o.hasOwnProperty(key)){
+				fs[fs.length] = key + ' = ?';
+				a[a.length] = o[key];
+			}
+		}
+		for(var key in args){
+			if(args.hasOwnProperty(key)){
+				a[a.length] = args[key];
+			}
+		}
+		sql = [sql, fs.join(','), ' WHERE ', clause].join('');
+		this.conn.execBy(sql, a, cb, scope);
+	},
+
+	insert : function(o, cb, scope){
+		var sql = "INSERT into " + this.name + " ";
+		var fs = [], vs = [], a = [];
+		for(var key in o){
+			if(o.hasOwnProperty(key)){
+				fs[fs.length] = key;
+				vs[vs.length] = '?';
+				a[a.length] = o[key];
+			}
+		}
+		sql = [sql, '(', fs.join(','), ') VALUES (', vs.join(','), ')'].join('');
+        this.conn.execBy(sql, a, cb, scope);
+    },
+
+	select : function(clause, cb, scope){
+		this.selectBy(clause, null, cb, scope);
+	},
+
+	selectBy : function(clause, args, cb, scope){
+		var sql = "select * from " + this.name;
+		if(clause){
+			sql += ' ' + clause;
+		}
+		args = args || {};
+		this.conn.queryBy(sql, args, cb, scope);
+	},
+
+	remove : function(clause, cb, scope){
+		this.deleteBy(clause, null, cb, scope);
+	},
+
+	removeBy : function(clause, args, cb, scope){
+		var sql = "delete from " + this.name;
+		if(clause){
+			sql += ' where ' + clause;
+		}
+		args = args || {};
+		this.conn.execBy(sql, args, cb, scope);
+	}
+};
+
+Ext.data.SqlDB.Proxy = function(conn, table, keyName, store){
+    Ext.data.SqlDB.Proxy.superclass.constructor.call(this);
+    this.conn = conn;
+    this.table = this.conn.getTable(table, keyName);
+    this.store = store;
+
+    this.store.on('add', this.onAdd, this);
+    this.store.on('update', this.onUpdate, this);
+    this.store.on('remove', this.onRemove, this);
+};
+
+Ext.extend(Ext.data.SqlDB.Proxy, Ext.data.DataProxy, {
+    load : function(params, reader, callback, scope, arg){
+    	if(!this.conn.isOpen()){ // assume that the connection is in the process of opening
+    		this.conn.on('open', function(){
+    			this.load(params, reader, callback, scope, arg);
+    		}, this, {single:true});
+    		return;
+    	};
+    	if(this.fireEvent("beforeload", this, params, reader, callback, scope, arg) !== false){
+			var clause = params.where || '';
+			var args = params.args || [];
+			var group = params.groupBy;
+			var sort = params.sort;
+			var dir = params.dir;
+
+			if(group || sort){
+				clause += ' ORDER BY ';
+				if(group && group != sort){
+					clause += group + ' ASC, ';
+				}
+				clause += sort + ' ' + (dir || 'ASC');
+			}
+
+			this.table.selectBy(clause, args,
+					this.onLoad.createDelegate(this, [{callback:callback, scope:scope, arg:arg, reader: reader}], 0));
+        }else{
+            callback.call(scope||this, null, arg, false);
+        }
+    },
+
+    onLoad : function(trans, rs, e, stmt){
+        if(rs === false){
+    		this.fireEvent("loadexception", this, null, trans.arg, e);
+            trans.callback.call(trans.scope||window, null, trans.arg, false);
+            return;
+    	}
+    	var result = trans.reader.readRecords(rs);
+        this.fireEvent("load", this, rs, trans.arg);
+        trans.callback.call(trans.scope||window, result, trans.arg, true);
+    },
+
+    processData : function(o){
+    	var fs = this.store.fields;
+    	var r = {};
+    	for(var key in o){
+    		var f = fs.key(key), v = o[key];
+			if(f){
+				if(f.type == 'date'){
+					r[key] = v ? v.format('Y-m-d H:i:s') : '';
+				}else if(f.type == 'boolean'){
+					r[key] = v ? 1 : 0;
+				}else{
+					r[key] = v;
+				}
+			}
+		}
+		return r;
+    },
+
+    onUpdate : function(ds, record){
+    	var changes = record.getChanges();
+    	var kn = this.table.keyName;
+    	this.table.updateBy(this.processData(changes), kn + ' = ?', [record.data[kn]]);
+    	record.commit(true);
+    },
+
+    onAdd : function(ds, records, index){
+    	for(var i = 0, len = records.length; i < len; i++){
+        	this.table.insert(this.processData(records[i].data));
+    	}
+    },
+
+    onRemove : function(ds, record, index){
+        var kn = this.table.keyName;
+    	this.table.removeBy(kn + ' = ?', [record.data[kn]]);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-gears-db.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-gears-db.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/db/ext-gears-db.js	(revision 625)
@@ -0,0 +1,77 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.GearsDB = Ext.extend(Ext.data.SqlDB, {
+	// abstract methods
+    open : function(db, cb, scope){
+        this.conn = google.gears.factory.create('beta.database', '1.0');
+        this.conn.open(db);
+        this.openState = true;
+		Ext.callback(cb, scope, [this]);
+		this.fireEvent('open', this);
+    },
+
+	close : function(){
+        this.conn.close();
+        this.fireEvent('close', this);
+    },
+
+    exec : function(sql, cb, scope){
+        this.conn.execute(sql).close();
+        Ext.callback(cb, scope, [true]);
+    },
+
+	execBy : function(sql, args, cb, scope){
+	    this.conn.execute(sql, args).close();
+        Ext.callback(cb, scope, [true]);
+    },
+
+	query : function(sql, cb, scope){
+        var rs = this.conn.execute(sql);
+        var r = this.readResults(rs);
+        Ext.callback(cb, scope, [r]);
+        return r;
+    },
+
+	queryBy : function(sql, args, cb, scope){
+        var rs = this.conn.execute(sql, args);
+        var r = this.readResults(rs);
+        Ext.callback(cb, scope, [r]);
+        return r;
+    },
+
+    readResults : function(rs){
+        var r = [];
+        if(rs){
+            var c = rs.fieldCount();
+            // precache field names
+            var fs = [];
+            for(var i = 0; i < c; i++){
+                fs[i] = rs.fieldName(i);
+            }
+            // read the data
+            while(rs.isValidRow()){
+                var o = {};
+                for(var i = 0; i < c; i++){
+                    o[fs[i]] = rs.field(i);
+                }
+                r[r.length] = o;
+                rs.next();
+            }
+            rs.close();
+        }
+        return r;
+    },
+
+    // protected/inherited method
+    isOpen : function(){
+		return this.openState;
+	},
+
+	getTable : function(name, keyName){
+		return new Ext.data.SqlDB.Table(this, name, keyName);
+	}
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/gears.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/gears.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/gears.js	(revision 625)
@@ -0,0 +1,65 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Copyright 2007 Google Inc. All Rights Reserved.
+//
+// Sets up google.gears.*, which is *the only* supported way to access Gears.
+//
+// Circumvent this file at your own risk!
+//
+// In the future, Gears may automatically define google.gears.* without this
+// file. Gears may use these objects to transparently fix bugs and compatibility
+// issues. Applications that use the code below will continue to work seamlessly
+// when that happens.
+
+(function() {
+  // We are already defined. Hooray!
+  if (window.google && google.gears) {
+    return;
+  }
+
+  var factory = null;
+
+  // Firefox
+  if (typeof GearsFactory != 'undefined') {
+    factory = new GearsFactory();
+  } else {
+    // IE
+    try {
+      factory = new ActiveXObject('Gears.Factory');
+    } catch (e) {
+      // Safari
+      if (navigator.mimeTypes["application/x-googlegears"]) {
+        factory = document.createElement("object");
+        factory.style.display = "none";
+        factory.width = 0;
+        factory.height = 0;
+        factory.type = "application/x-googlegears";
+        document.documentElement.appendChild(factory);
+      }
+    }
+  }
+
+  // *Do not* define any objects if Gears is not installed. This mimics the
+  // behavior of Gears defining the objects in the future.
+  if (!factory) {
+    return;
+  }
+
+  // Now set up the objects, being careful not to overwrite anything.
+  if (!window.google) {
+    window.google = {};
+  }
+
+  if (!google.gears) {
+    google.gears = {factory: factory};
+  }
+})();
+
+if (!window.google || !google.gears) {
+    location.href = "http://gears.google.com/?action=install&message=Google%20Gears%20is%20required%20for%20this%20application" +
+                "&return="+window.location.href;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.css	(revision 625)
@@ -0,0 +1,150 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#tasks-grid .x-grid3-header {
+    background: #f9f9f9 url(images/hrow.gif) repeat-x left top;
+}
+#tasks-grid .new-task-row {
+    height:24px;
+}
+#tasks-grid .new-task-row .x-small-editor {
+    overflow:hidden;
+    width:100%;
+}
+#tasks-grid .new-task-row .x-small-editor input {
+    font-size:11px;
+}
+#new-task-icon {
+    width:16px;
+    height:16px;
+    margin-left:3px;
+    background: transparent url(images/edit.gif) no-repeat;
+}
+.x-grid3-body .x-grid3-td-task-col .x-grid3-cell-inner {
+    padding: 1px 0 0 0 !important;
+}
+
+.task-check {
+    width:98%;
+    height:16px;
+    background: transparent url(images/check.gif) no-repeat center 0;
+    cursor:pointer;
+}
+
+.task-completed .task-check {
+    background: transparent url(images/check.gif) no-repeat center -16px;
+}
+
+.task-check-over {
+    background: transparent url(images/check.gif) no-repeat center -32px;
+}
+
+
+.task-overdue .x-grid3-cell-inner {
+    color:#fb223a;
+}
+
+.task-completed .x-grid3-cell-inner {
+    text-decoration:line-through;
+    color:gray;
+}
+
+.task-col-hd {
+    width:98%;
+    height:12px;
+    background: transparent url(images/hd-check.gif) no-repeat center center;
+    cursor:default;
+}
+
+.x-grid3-td-task-title .x-grid3-cell-inner {
+    white-space:normal;
+}
+
+
+.icon-show-active {
+    background-image:url(images/icon-show-active.gif) !important;
+}
+.icon-show-complete {
+    background-image:url(images/icon-show-complete.gif) !important;
+}
+.icon-show-all {
+    background-image:url(images/icon-show-all.gif) !important;
+}
+.x-grid3-dirty-cell {
+    background:transparent;
+}
+
+.icon-active {
+    background-image:url(images/icon-active.gif) !important;
+}
+.icon-complete {
+    background-image:url(images/icon-complete.gif) !important;
+}
+.icon-delete {
+    background-image:url(images/delete.gif) !important;
+}
+.icon-edit {
+	background-image:url(images/edit.gif) !important;
+}
+
+
+.icon-by-date {
+    background-image:url(images/icon-by-date.gif) !important;
+}
+.icon-by-category {
+    background-image:url(images/icon-by-category.gif) !important;
+}
+.icon-no-group {
+    background-image:url(images/icon-no-group.gif) !important;
+}
+
+#action-panel .x-panel {
+	margin-bottom:3px;
+	margin-right:0;
+}
+#action-panel .x-panel-body {
+	border:0 none;
+}
+#action-panel .x-panel-body li {
+	margin:3px;
+}
+#action-panel .x-panel-body li img {
+	width:16px;
+	height:16px;
+	vertical-align:middle;
+	margin-right:2px;
+	margin-bottom:2px;
+}
+#action-panel .x-panel-body li a {
+	text-decoration:none;
+	color:#3764A0;
+}
+#action-panel .x-plain-body {
+	background-color:#cad9ec;
+    padding:3px 0 0 5px;
+}
+.x-air #action-panel .x-plain-body {
+	padding-left:3px;
+}
+#action-panel .x-panel-body li a:hover {
+	text-decoration:underline;
+	color:#15428b;
+}
+
+.x-panel-trans {
+	background:transparent;
+}
+
+.x-layout-split-west {
+	cursor:move;
+    background-color:#cad9ec;
+}
+.x-panel-header-text {
+	color:#3764A0;
+}
+#tasks-grid {
+	border-left:1px solid #99bbe8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.html	(revision 625)
@@ -0,0 +1,66 @@
+<html>
+	<head>
+		<title>Simple Tasks</title>
+	    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+	    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+	    <script type="text/javascript" src="../../ext-all.js"></script>
+		
+		<script type="text/javascript" src="db/ext-db.js"></script>
+		<script type="text/javascript" src="gears.js"></script>
+		<script type="text/javascript" src="db/ext-gears-db.js"></script>
+	    
+		<script type="text/javascript" src="classes.js"></script>
+    	<script type="text/javascript" src="tasks.js"></script>
+		
+    	<link rel="stylesheet" type="text/css" href="tasks.css" />
+</head>
+<body>
+<span></span>
+<ul id="task-views" class="x-hidden">
+	<li>
+		<img src="images/s.gif" class="icon-show-all"/>
+		<a id="view-all" href="#">All tasks</a>
+	</li>
+	<li>
+		<img src="images/s.gif" class="icon-show-active"/>
+		<a id="view-active" href="#">Active tasks</a>
+	</li>
+	<li>
+		<img src="images/s.gif" class="icon-show-complete"/>
+		<a id="view-complete" href="#">Completed tasks</a>
+	</li>
+</ul>
+<ul id="task-actions" class="x-hidden">
+	<li id="new-task">
+		<img src="images/s.gif" class="icon-edit"/>
+		<a id="action-new" href="#">Add a new task</a>
+	</li>
+	<li style="display:none;">
+		<img src="images/s.gif" class="icon-complete"/>
+		<a id="action-complete" href="#">Mark selected task<span class="s">s</span> completed</a>
+	</li>
+	<li style="display:none;">
+		<img src="images/s.gif" class="icon-active"/>
+		<a id="action-active" href="#">Mark selected task<span class="s">s</span> active</a>
+	</li>
+	<li style="display:none;">
+		<img src="images/s.gif" class="icon-delete"/>
+		<a id="action-delete" href="#">Delete selected task<span class="s">s</span></a>
+	</li>
+</ul>
+<ul id="task-grouping" class="x-hidden">
+	<li>
+		<img src="images/s.gif" class="icon-by-date"/>
+		<a id="group-date" href="#">By Date</a>
+	</li>
+	<li>
+		<img src="images/s.gif" class="icon-by-category"/>
+		<a id="group-cat" href="#">By Category</a>
+	</li>
+	<li>
+		<img src="images/s.gif" class="icon-no-group"/>
+		<a id="no-group" href="#">No Grouping</a>
+	</li>
+</ul>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tasks/tasks.js	(revision 625)
@@ -0,0 +1,440 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    Ext.QuickTips.init();
+
+    var xg = Ext.grid;
+    // turn off default shadows which look funky in air
+    xg.GridEditor.prototype.shadow = false;
+    
+    var conn = Ext.data.SqlDB.getInstance();
+	conn.open('tasks.db');
+    
+    // the main grid store
+    var taskStore = new TaskStore(conn);
+    
+    // Category store shared by category combos
+    var catStore = new CategoryStore();
+    
+	taskStore.load({
+		callback: function(){
+			// first time?
+			if(taskStore.getCount() < 1){
+				Ext.Msg.confirm('Create Tasks?', 'Your database is currently empty. Would you like to insert some demo data?', 
+					function(btn){
+						if(btn == 'yes'){
+							loadDemoTasks(taskStore);	
+						}
+						catStore.init(taskStore);
+					});
+			}else{
+				catStore.init(taskStore);
+			}
+		}
+	});
+
+    // custom event to notify when a new category is available
+    taskStore.on('newcategory', catStore.addCategory, catStore);
+
+    // set of event handlers shared by combos to allow them to share
+    // the same local store
+    var comboEvents = {
+        focus: function(){
+            this.bindStore(catStore);
+        },
+        blur: function(c){
+            catStore.purgeListeners();
+        }
+    }
+
+    var completeColumn = new CompleteColumn();
+
+    // custom template for the grid header
+    var headerTpl = new Ext.Template(
+        '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+        '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',
+        '<tbody><tr class="new-task-row">',
+            '<td><div id="new-task-icon"></div></td>',
+            '<td><div class="x-small-editor" id="new-task-title"></div></td>',
+            '<td><div class="x-small-editor" id="new-task-cat"></div></td>',
+            '<td><div class="x-small-editor" id="new-task-due"></div></td>',
+        '</tr></tbody>',
+        "</table>"
+    );
+
+    var selections = new Ext.grid.RowSelectionModel();
+
+    // The main grid in all its configuration option glory
+    var grid = new xg.EditorGridPanel({
+        id:'tasks-grid',
+        store: taskStore,
+        sm: selections,
+        clicksToEdit: 'auto',
+        enableColumnHide:false,
+        enableColumnMove:false,
+		border:false,
+		title:'All Tasks',
+		iconCls:'icon-show-all',
+		region:'center',
+		
+        plugins: completeColumn,
+
+        columns: [
+            completeColumn,
+            {
+                header: "Task",
+                width:400,
+                sortable: true,
+                dataIndex: 'title',
+                id:'task-title',
+                editor: new Ext.form.TextField({
+                    allowBlank: false
+                })
+            },
+            {
+                header: "Category",
+                width:150,
+                sortable: true,
+                dataIndex: 'category',
+                editor: new Ext.form.ComboBox({
+                    displayField: 'text',
+                    triggerAction: 'all',
+                    mode:'local',
+                    selectOnFocus:true,
+                    listClass:'x-combo-list-small',
+                    listeners: comboEvents
+                })
+            },
+            {
+                header: "Due Date",
+                width: 150,
+                sortable: true,
+                renderer: Ext.util.Format.dateRenderer('D m/d/Y'),
+                dataIndex: 'dueDate',
+                groupRenderer: textDate(),
+                groupName: 'Due',
+                editor: new Ext.form.DateField({
+                    format : "m/d/Y"
+                })
+            }
+        ],
+
+        view: new Ext.grid.GroupingView({
+            forceFit:true,
+            ignoreAdd: true,
+            emptyText: 'No Tasks to display',
+
+            templates: {
+                header: headerTpl
+            },
+
+            getRowClass : function(r){
+                var d = r.data;
+                if(d.completed){
+                    return 'task-completed';
+                }
+                if(d.dueDate && d.dueDate.getTime() < new Date().clearTime().getTime()){
+                    return 'task-overdue';
+                }
+                return '';
+            }
+        })
+    });
+
+    var viewPanel = new Ext.Panel({
+    	frame:true,
+    	title: 'Views',
+    	collapsible:true,
+    	contentEl:'task-views',
+    	titleCollapse: true
+    });
+    
+    var taskActions = new Ext.Panel({
+    	frame:true,
+    	title: 'Task Actions',
+    	collapsible:true,
+    	contentEl:'task-actions',
+    	titleCollapse: true
+    });
+    
+    var groupActions = new Ext.Panel({
+    	frame:true,
+    	title: 'Task Grouping',
+    	collapsible:true,
+    	contentEl:'task-grouping',
+    	titleCollapse: true
+    });
+    
+    var actionPanel = new Ext.Panel({
+    	id:'action-panel',
+    	region:'west',
+    	split:true,
+    	collapsible: true,
+    	collapseMode: 'mini',
+    	width:200,
+    	minWidth: 150,
+    	border: false,
+    	baseCls:'x-plain',
+    	items: [taskActions, viewPanel, groupActions]
+    });
+
+    if(Ext.isAir){ // create AIR window
+        var win = new Ext.air.MainWindow({
+            layout:'border',
+            items: [actionPanel, grid],
+            title: 'Simple Tasks',
+            iconCls: 'icon-show-all'
+        }).render();
+	}else{
+        var viewport = new Ext.Viewport({
+            layout:'border',
+            items: [actionPanel, grid]
+        });
+    }
+
+    var ab = actionPanel.body;
+    ab.on('mousedown', doAction, null, {delegate:'a'});
+	ab.on('click', Ext.emptyFn, null, {delegate:'a', preventDefault:true});
+
+    grid.on('resize', syncFields);
+	grid.on('columnresize', syncFields);
+
+    grid.on('afteredit', function(e){
+        if(e.field == 'category'){
+            catStore.addCategory(e.value);
+        }
+        if(e.field == taskStore.getGroupState()){
+            taskStore.applyGrouping();
+        }
+
+    });
+
+    grid.on('keydown', function(e){
+         if(e.getKey() == e.DELETE && !grid.editing){
+             actions['action-delete']();
+         }
+    });
+
+    selections.on('selectionchange', function(sm){
+    	var bd = taskActions.body, c = sm.getCount();
+    	bd.select('li:not(#new-task)').setDisplayed(c > 0);
+    	bd.select('span.s').setDisplayed(c > 1);
+    });
+
+    // The fields in the grid's header
+    var ntTitle = new Ext.form.TextField({
+        renderTo: 'new-task-title',
+        emptyText: 'Add a task...'
+    });
+
+    var ntCat = new Ext.form.ComboBox({
+        renderTo: 'new-task-cat',
+        disabled:true,
+        displayField: 'text',
+        triggerAction: 'all',
+        mode:'local',
+        selectOnFocus:true,
+        listClass:'x-combo-list-small',
+        listeners: comboEvents
+    });
+
+    var ntDue = new Ext.form.DateField({
+        renderTo: 'new-task-due',
+        value: new Date(),
+        disabled:true,
+        format : "m/d/Y"
+    });
+
+    // syncs the header fields' widths with the grid column widths
+    function syncFields(){
+        var cm = grid.getColumnModel();
+        ntTitle.setSize(cm.getColumnWidth(1)-2);
+        ntCat.setSize(cm.getColumnWidth(2)-4);
+        ntDue.setSize(cm.getColumnWidth(3)-4);
+    }
+    syncFields();
+
+    var editing = false, focused = false, userTriggered = false;
+    var handlers = {
+        focus: function(){
+            focused = true;
+        },
+        blur: function(){
+            focused = false;
+            doBlur.defer(250);
+        },
+        specialkey: function(f, e){
+            if(e.getKey()==e.ENTER){
+                userTriggered = true;
+                e.stopEvent();
+                f.el.blur();
+                if(f.triggerBlur){
+                    f.triggerBlur();
+                }
+            }
+        }
+    }
+    ntTitle.on(handlers);
+    ntCat.on(handlers);
+    ntDue.on(handlers);
+
+    ntTitle.on('focus', function(){
+        focused = true;
+        if(!editing){
+            ntCat.enable();
+            ntDue.enable();
+            syncFields();
+            editing = true;
+        }
+    });
+
+    // when a field in the add bar is blurred, this determines
+    // whether a new task should be created
+    function doBlur(){
+        if(editing && !focused){
+            var title = ntTitle.getValue();
+            if(!Ext.isEmpty(title)){
+                taskStore.addTask({
+                    taskId: Task.nextId(),
+                    title: title,
+                    dueDate: ntDue.getValue()||'',
+                    description: '', // ???
+                    category: ntCat.getValue(),
+                    completed: false
+                });
+                ntTitle.setValue('');
+                if(userTriggered){ // if the entered to add the task, then go to a new add automatically
+                    userTriggered = false;
+                    ntTitle.focus.defer(100, ntTitle);
+                }
+            }
+            ntCat.disable();
+            ntDue.disable();
+            editing = false;
+        }
+    }
+	
+    var actions = {
+    	'view-all' : function(){
+    		taskStore.applyFilter('all');
+    		grid.setTitle('All Tasks', 'icon-show-all');
+    	},
+    	
+    	'view-active' : function(){
+    		taskStore.applyFilter(false);
+    		grid.setTitle('Active Tasks', 'icon-show-active');
+    	},
+    	
+    	'view-complete' : function(){
+    		taskStore.applyFilter(true);
+    		grid.setTitle('Completed Tasks', 'icon-show-complete');
+    	},
+    	
+    	'action-new' : function(){
+    		ntTitle.focus();
+    	},
+    	
+    	'action-complete' : function(){
+    		selections.each(function(s){
+    			s.set('completed', true);
+    		});
+            taskStore.applyFilter();
+    	},
+    	
+    	'action-active' : function(){
+    		selections.each(function(s){
+    			s.set('completed', false);
+    		});
+            taskStore.applyFilter();
+    	},
+    	
+    	'action-delete' : function(){
+    		Ext.Msg.confirm('Confirm', 'Are you sure you want to delete the selected task(s)?', 
+    		function(btn){
+                if(btn == 'yes'){
+                	selections.each(function(s){
+		    			taskStore.remove(s);
+		    		});
+                }
+            });
+    	},
+    	
+    	'group-date' : function(){
+    		taskStore.groupBy('dueDate');
+    	},
+    	
+    	'group-cat' : function(){
+    		taskStore.groupBy('category');
+    	},
+    	
+    	'no-group' : function(){
+    		taskStore.clearGrouping();
+    	}
+    };
+    
+    function doAction(e, t){
+    	e.stopEvent();
+    	actions[t.id]();
+    }
+    
+    
+    // generates a renderer function to be used for textual date groups
+    function textDate(){
+        // create the cache of ranges to be reused
+        var today = new Date().clearTime(true);
+        var year = today.getFullYear();
+        var todayTime = today.getTime();
+        var yesterday = today.add('d', -1).getTime();
+        var tomorrow = today.add('d', 1).getTime();
+        var weekDays = today.add('d', 6).getTime();
+        var lastWeekDays = today.add('d', -6).getTime();
+
+        return function(date){
+            if(!date) {
+                return '(No Date)';
+            }
+            var notime = date.clearTime(true).getTime();
+
+            if (notime == todayTime) {
+                return 'Today';
+            }
+            if(notime > todayTime){
+                if (notime == tomorrow) {
+                    return 'Tomorrow';
+                }
+                if (notime <= weekDays) {
+                    return date.format('l');
+                }
+            }else {
+            	if(notime == yesterday) {
+                	return 'Yesterday';
+	            }
+	            if(notime >= lastWeekDays) {
+	                return 'Last ' + date.format('l');
+	            }
+            }            
+            return date.getFullYear() == year ? date.format('D m/d') : date.format('D m/d/Y');
+       }
+    }
+});
+
+/* This is used to laod some demo tasks if the task database is empty */
+function loadDemoTasks(store){
+	var s = new Date();
+	// hardcoded demo tasks
+	store.addTask({taskId: Task.nextId(), title:'Start documentation of Ext 2.0', category:'Ext', description:'', dueDate: s.add('d', 21), completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Release Ext 1.l Beta 2', category:'Ext', description:'', dueDate:s.add('d', 2), completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Take wife to see movie', category:'Family', description:'', dueDate:s.add('d', 2), completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Finish task list demo app', category:'Ext', description:'', dueDate:s.add('d', 2), completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Do something other than work', category:'Family', description:'', dueDate:s.add('d', -1), completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Go to the grocery store', category:'Family', description:'', dueDate:s.add('d', -1), completed: true});
+	store.addTask({taskId: Task.nextId(), title:'Reboot my computer', category:'Misc', description:'', dueDate:s, completed: false});
+	store.addTask({taskId: Task.nextId(), title:'Respond to emails', category:'Ext', description:'', dueDate:s, completed: true});
+}
+
+    
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.html	(revision 625)
@@ -0,0 +1,31 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Toolbar with Menus</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="overflow.js"></script>
+    <link rel="stylesheet" type="text/css" href="toolbars.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body id="docbody">
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Toolbars</h1>
+<div id="content" class="x-hidden">
+    <p>Resize the Ext.Window to see the toolbar overflow menu in action. 
+    The js is not minified so it is readable. See <a href="overflow.js">overflow.js</a>.</p>
+    <p>For a demo of all supported button types, see <a href="../button/buttons.html">the button sample</a>.</p>
+    <p style="margin-bottom:15px;">For a more toolbar samples, see <a href="toolbars.html">the toolbars sample</a>.</p>
+</div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/overflow.js	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+
+    var handleAction = function(action){
+        Ext.example.msg('<b>Action</b>', 'You clicked "'+action+'"');
+    };
+    
+    var p = new Ext.Window({
+        title: 'Standard',
+        closable: false,
+        height:250,
+        width: 500,
+        bodyStyle: 'padding:10px',
+        contentEl: 'content',
+        autoScroll: true,
+        tbar: [{
+            xtype:'splitbutton',
+            text: 'Menu Button',
+            iconCls: 'add16',
+            handler: handleAction.createCallback('Menu Button'),
+            menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]
+        },'-',{
+            xtype:'splitbutton',
+            text: 'Cut',
+            iconCls: 'add16',
+            handler: handleAction.createCallback('Cut'),
+            menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]
+        },{
+            text: 'Copy',
+            iconCls: 'add16',
+            handler: handleAction.createCallback('Copy')
+        },{
+            text: 'Paste',
+            iconCls: 'add16',
+            menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]
+        },'-',{
+            text: 'Format',
+            iconCls: 'add16',
+            handler: handleAction.createCallback('Format')
+        },'->',{
+            text: 'Right',
+            iconCls: 'add16',
+            handler: handleAction.createCallback('Right')
+        }]
+    });
+    p.show();
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.css	(revision 625)
@@ -0,0 +1,49 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#container {
+    width:600px;
+    height:400px;
+    border:3px solid #c3daf9;
+}
+
+.add {
+    background-image: url( images/add.gif ) !important;
+}
+.add16 {
+    background-image: url( images/add16.gif ) !important;
+}
+.add24 {
+    background-image: url( images/add24.gif ) !important;
+}
+.remove {
+    background-image: url( ../menu/images/delete.gif ) !important;
+}
+.edit {
+    background-image: url( ../menu/images/edit.gif ) !important;
+}
+.find {
+    background-image: url( ../menu/images/find.gif ) !important;
+}
+.view {
+    background-image: url( ../menu/images/view.gif ) !important;
+}
+
+.btn-panel td {
+    padding-left:5px;
+}
+
+h2 {
+    color:#083772 !important;
+    margin: 20px 0 0 !important;
+    padding: 5px;
+    background:#eee;
+    width:400px;
+}
+
+h3 {
+    font-weight:normal !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.html	(revision 625)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Toolbar with Menus</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="toolbars.js"></script>
+    <link rel="stylesheet" type="text/css" href="toolbars.css"/>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+</head>
+<body id="docbody">
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Toolbars</h1>
+<p>The js is not minified so it is readable. See <a href="toolbars.js">toolbars.js</a>.</p>
+<p>For a demo of all supported button types, see <a href="../button/buttons.html">the button sample</a>.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/toolbar/toolbars.js	(revision 625)
@@ -0,0 +1,351 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+   
+    var SamplePanel = Ext.extend(Ext.Panel, {
+        width: 500,
+        height:250,
+        style: 'margin-top:15px',
+        bodyStyle: 'padding:10px',
+        renderTo: 'docbody',
+        html: Ext.example.shortBogusMarkup,
+        autoScroll: true
+    });
+
+    new SamplePanel({
+        title: 'Standard',
+        tbar: [{
+            xtype:'splitbutton',
+            text: 'Menu Button',
+            iconCls: 'add16',
+            menu: [{text: 'Menu Button 1'}]
+        },'-',{
+            xtype:'splitbutton',
+            text: 'Cut',
+            iconCls: 'add16',
+            menu: [{text: 'Cut Menu Item'}]
+        },{
+            text: 'Copy',
+            iconCls: 'add16'
+        },{
+            text: 'Paste',
+            iconCls: 'add16',
+            menu: [{text: 'Paste Menu Item'}]
+        },'-',{
+            text: 'Format',
+            iconCls: 'add16'
+        }]
+    });
+
+    new SamplePanel({
+        title: 'Multi columns',
+        tbar: [{
+            xtype: 'buttongroup',
+            title: 'Clipboard',
+            columns: 2,
+            defaults: {
+                scale: 'small'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add16',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add16',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add16'
+            },{
+                text: 'Paste',
+                iconCls: 'add16',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format',
+                iconCls: 'add16'
+            }]
+        },{
+            xtype: 'buttongroup',
+            title: 'Other Bugus Actions',
+            columns: 2,
+            defaults: {
+                scale: 'small'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add16',
+                menu: [{text: 'Menu Button 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add16',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add16'
+            },{
+                text: 'Paste',
+                iconCls: 'add16',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format',
+                iconCls: 'add16'
+            }]
+        }]
+    });
+
+
+
+    new SamplePanel({
+        title: 'Multi columns (No titles, double stack)',
+        tbar: [{
+            xtype: 'buttongroup',
+            columns: 3,
+            defaults: {
+                scale: 'small'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add16',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add16',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add16'
+            },{
+                text: 'Paste',
+                iconCls: 'add16',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format',
+                iconCls: 'add16'
+            }]
+        },{
+            xtype: 'buttongroup',
+            columns: 3,
+            defaults: {
+                scale: 'small'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add16',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add16',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add16'
+            },{
+                text: 'Paste',
+                iconCls: 'add16',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format',
+                iconCls: 'add16'
+            }]
+        }]
+    });
+
+    new SamplePanel({
+        title: 'Mix and match icon sizes to create a huge unusable toolbar',
+        tbar: [{
+            xtype: 'buttongroup',
+            columns: 3,
+            title: 'Clipboard',
+            items: [{
+                text: 'Paste',
+                scale: 'large',
+                rowspan: 3, iconCls: 'add',
+                iconAlign: 'top',
+                cls: 'x-btn-as-arrow'
+            },{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                scale: 'large',
+                rowspan: 3,
+                iconCls: 'add',
+                iconAlign: 'top',
+                arrowAlign:'bottom',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy', iconCls: 'add16'
+            },{
+                text: 'Format', iconCls: 'add16'
+            }]
+        },{
+            xtype: 'buttongroup',
+            columns: 3,
+            title: 'Other Actions',
+            items: [{
+                text: 'Paste',
+                scale: 'large',
+                rowspan: 3, iconCls: 'add',
+                iconAlign: 'top',
+                cls: 'x-btn-as-arrow'
+            },{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                scale: 'large',
+                rowspan: 3,
+                iconCls: 'add',
+                iconAlign: 'top',
+                arrowAlign:'bottom',
+                menu: [{text: 'Menu Button 1'}]
+            },{
+                xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy', iconCls: 'add16'
+            },{
+                text: 'Format', iconCls: 'add16'
+            }]
+        }]
+    });
+
+    new SamplePanel({
+        title: 'Medium icons, arrows to the bottom',
+        tbar: [{
+            xtype: 'buttongroup',
+            title: 'Clipboard',
+            defaults: {
+                scale: 'medium',
+                iconAlign:'top'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add24',
+                cls: 'x-btn-as-arrow'
+            },{
+                text: 'Paste',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format<br/>Stuff',
+                iconCls: 'add24'
+            }]
+        },{
+            xtype: 'buttongroup',
+            title: 'Other Bogus Actions',
+            defaults: {
+                scale: 'medium',
+                iconAlign:'top'
+            },
+            items: [{
+                xtype:'splitbutton',
+                text: 'Menu Button',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Menu Item 1'}]
+            },{
+                xtype:'splitbutton',
+                text: 'Cut',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Cut Menu Item'}]
+            },{
+                text: 'Copy',
+                iconCls: 'add24',
+                cls: 'x-btn-as-arrow'
+            },{
+                text: 'Paste',
+                iconCls: 'add24',
+                arrowAlign:'bottom',
+                menu: [{text: 'Paste Menu Item'}]
+            },{
+                text: 'Format',
+                iconCls: 'add24',
+                cls: 'x-btn-as-arrow'
+            }]
+        }]
+    });
+
+
+    new SamplePanel({
+        title: 'Medium icons, text and arrows to the left',
+        tbar: [{
+            xtype:'buttongroup',
+            items: [{
+                text: 'Cut',
+                iconCls: 'add24',
+                scale: 'medium'
+            },{
+                text: 'Copy',
+                iconCls: 'add24',
+                scale: 'medium'
+            },{
+                text: 'Paste',
+                iconCls: 'add24',
+                scale: 'medium',
+                menu: [{text: 'Paste Menu Item'}]
+            }]
+        }, {
+            xtype:'buttongroup',
+            items: [{
+                text: 'Format',
+                iconCls: 'add24',
+                scale: 'medium'
+            }]
+        }]
+    });
+
+    new SamplePanel({
+        title: 'Small icons, text and arrows to the left',
+        tbar: [{
+            xtype:'buttongroup',
+            items: [{
+                text: 'Cut',
+                iconCls: 'add16',
+                scale: 'small'
+            },{
+                text: 'Copy',
+                iconCls: 'add16',
+                scale: 'small'
+            },{
+                text: 'Paste',
+                iconCls: 'add16',
+                scale: 'small',
+                menu: [{text: 'Paste Menu Item'}]
+            }]
+        }, {
+            xtype:'buttongroup',
+            items: [{
+                text: 'Format',
+                iconCls: 'add16',
+                scale: 'small'
+            }]
+        }]
+    });
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/ARIA.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/ARIA.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/ARIA.js	(revision 625)
@@ -0,0 +1,110 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function() {
+
+Ext.a11y.ARIA = Ext.apply(new Ext.util.Observable(), function() {
+    return {
+        setRole : function(el, role) {
+            el = Ext.getDom(el);
+            if(el) {
+                el.setAttribute('role', role.toString());
+            }
+        },
+        
+        setProperty : function(el, key, value) {
+            el = Ext.getDom(el);
+            if(el) {
+                el.setAttribute(key.toString(), value.toString());
+            }                
+        }
+    }
+}());
+
+var ARIA = Ext.a11y.ARIA;
+
+Ext.override(Ext.tree.TreeNode, {
+    render : function(bulkRender){
+        this.ui.render(bulkRender);
+        if(!this.rendered){
+            // make sure it is registered
+            this.getOwnerTree().registerNode(this);
+            this.rendered = true;
+            this.fireEvent('noderender', this);
+            if(this.expanded){
+                this.expanded = false;
+                this.expand(false, false);
+            }
+        }
+    }
+});
+
+Ext.override(Ext.tree.TreePanel, {
+    initARIA : function() {
+        Ext.tree.TreePanel.superclass.initARIA.call(this);
+        this.getSelectionModel().on('selectionchange', this.onNodeSelect, this);
+        this.ariaTreeEl = this.body.down('.x-tree-root-ct');
+        this.on('collapsenode', this.onNodeCollapse, this);
+        this.on('expandnode', this.onNodeExpand, this);
+    },
+    
+    // private
+    registerNode : function(node){
+        if(this.nodeHash[node.id] === undefined) {
+            node.on('noderender', this.onNodeRender, this);
+        }
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        node.un('noderender', this.onNodeRender, this);
+        delete this.nodeHash[node.id];
+    },
+    
+    onNodeRender : function(node) {
+        var a = node.ui.anchor,
+            level = this.rootVisible ? 1 : 0,
+            pnode = node;
+                                
+        if(node.isRoot) {
+            ARIA.setRole(this.ariaTreeEl, 'tree');
+            ARIA.setProperty(this.ariaTreeEl, 'aria-labelledby', Ext.id(node.ui.textNode));
+            ARIA.setProperty(this.ariaTreeEl, 'aria-activedescendant', 'false');
+            if(!this.rootVisible) {
+                return;
+            }
+        }
+        ARIA.setRole(node.ui.wrap, 'treeitem');
+        ARIA.setProperty(node.ui.wrap, 'aria-labelledby', Ext.id(node.ui.textNode));            
+        ARIA.setProperty(node.ui.wrap, 'aria-expanded', 'false');
+        ARIA.setProperty(node.ui.wrap, 'aria-selected', 'false');
+        while (pnode.parentNode) {
+            level++;
+            pnode = pnode.parentNode;
+        }
+        ARIA.setProperty(node.ui.wrap, 'aria-level', level);   
+        if(!node.isLeaf()) {
+            ARIA.setRole(node.ui.ctNode, 'group');
+            ARIA.setProperty(node.ui.wrap, 'aria-expanded', node.isExpanded());
+        }
+    },
+    
+    onNodeSelect : function(sm, node) {
+        ARIA.setProperty(this.ariaTreeEl, 'aria-activedescendant', Ext.id(node.ui.wrap));
+        ARIA.setProperty(node.ui.wrap, 'aria-selected', 'true');
+    },
+    
+    onNodeCollapse : function(node) {
+        ARIA.setProperty(node.ui.wrap, 'aria-expanded', 'false');
+    },
+    
+    onNodeExpand : function(node) {
+        ARIA.setProperty(node.ui.wrap, 'aria-expanded', 'true');
+    }
+});
+     
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.html	(revision 625)
@@ -0,0 +1,60 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>ARIA Enabled Tree</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+        #tree {
+        	float:left;
+        	margin:20px;
+        	border:1px solid #c3daf9;
+        }
+        .folder .x-tree-node-icon{
+    		background:transparent url(../../resources/images/default/tree/folder.gif);
+    	}
+    	.x-tree-node-expanded .x-tree-node-icon{
+    		background:transparent url(../../resources/images/default/tree/folder-open.gif);
+    	}
+        .x-a11y-focusframe {
+            position: absolute;
+            top: 0;
+            left: 0;
+            z-index: 10000000;
+            width: 0;
+            height: 0;
+            font-size: 0;
+        }
+        .x-a11y-focusframe-side {
+            position: absolute;
+            font-size: 0;
+            overflow: hidden;
+        }
+        .x-a11y-focusable:focus {
+            outline: none
+        }
+        button.x-a11y-focusable::-moz-focus-inner{border:none}
+    </style>
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+    <script type="text/javascript" src="../ux/Focus.js"></script>
+    <script type="text/javascript" src="ARIA.js"></script>
+    <script type="text/javascript" src="aria-tree.js"></script>
+</head>
+
+<body role="">
+    <h1>ARIA Enabled Tree</h1>
+    <p>This example shows a TreePanel with ARIA enabled. Download a screenreader like NVDA and navigate to this page
+    to test. By default the tree will be focused. Press down to select the root node and start navigating using the arrow keys.</p>
+
+    <div id="tree"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/aria-tree.js	(revision 625)
@@ -0,0 +1,45 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+var TreeTest = function(){
+    // shorthand
+    var Tree = Ext.tree;
+
+    return {
+        init : function(){
+            // yui-ext tree
+            var tree = new Tree.TreePanel({
+                animate:true,
+                autoScroll:true,
+                loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}),
+                containerScroll: true,
+                border: false,
+                height: 300,
+                width: 300
+            });
+
+            // add a tree sorter in folder mode
+            new Tree.TreeSorter(tree, {folderSort:true});
+
+            // set the root node
+            var root = new Tree.AsyncTreeNode({
+                text: 'Ext JS',
+                draggable:false, // disable root node dragging
+                id:'src'
+            });
+            tree.setRootNode(root);
+
+            // render the tree
+            tree.render('tree');
+            root.expand(false, /*no anim*/ false);
+            tree.bodyFocus.fi.setFrameEl(tree.el);
+            tree.getSelectionModel().select(tree.getRootNode());
+            tree.enter.defer(100, tree);
+        }
+    };
+}();
+
+Ext.EventManager.onDocumentReady(TreeTest.init, TreeTest, true);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-nodes.json
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-nodes.json	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-nodes.json	(revision 625)
@@ -0,0 +1,61 @@
+[{
+    text: 'To Do', 
+    cls: 'folder',
+    children: [{
+        text: 'Go jogging',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Take a nap',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Climb Everest',
+        leaf: true,
+        checked: false
+    }]
+},{
+    text: 'Grocery List',
+    cls: 'folder',
+    children: [{
+        text: 'Bananas',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Milk',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Cereal',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Energy foods',
+        cls: 'folder',
+        children: [{
+            text: 'Coffee',
+            leaf: true,
+            checked: false
+        },{
+            text: 'Red Bull',
+            leaf: true,
+            checked: false
+        }]
+    }]
+},{
+    text: 'Remodel Project', 
+    cls: 'folder',
+    children: [{
+        text: 'Finish the budget',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Call contractors',
+        leaf: true,
+        checked: false
+    },{
+        text: 'Choose design',
+        leaf: true,
+        checked: false
+    }]
+}]
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.html	(revision 625)
@@ -0,0 +1,37 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Checkbox TreePanel</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+<script type="text/javascript" src="check-tree.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+<style type="text/css">
+    .complete .x-tree-node-anchor span {
+        text-decoration: line-through;
+        color: #777;
+    }
+</style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Checkbox Selection in a TreePanel</h1>
+<p>This example shows simple checkbox selection in a tree. It is enabled on leaf nodes by simply
+setting <tt>checked:true/false</tt> at the node level.</p>
+<p>This example also shows loading an entire tree structure statically in one load call, rather than
+loading each node asynchronously.</p>
+<p>The js is not minified so it is readable. See <a href="check-tree.js">check-tree.js</a>.</p>
+
+<div id="tree-div"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/check-tree.js	(revision 625)
@@ -0,0 +1,60 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+    var tree = new Ext.tree.TreePanel({
+        renderTo:'tree-div',
+        title: 'My Task List',
+        height: 300,
+        width: 400,
+        useArrows:true,
+        autoScroll:true,
+        animate:true,
+        enableDD:true,
+        containerScroll: true,
+        rootVisible: false,
+        frame: true,
+        root: {
+            nodeType: 'async'
+        },
+        
+        // auto create TreeLoader
+        dataUrl: 'check-nodes.json',
+        
+        listeners: {
+            'checkchange': function(node, checked){
+                if(checked){
+                    node.getUI().addClass('complete');
+                }else{
+                    node.getUI().removeClass('complete');
+                }
+            }
+        },
+        
+        buttons: [{
+            text: 'Get Completed Tasks',
+            handler: function(){
+                var msg = '', selNodes = tree.getChecked();
+                Ext.each(selNodes, function(node){
+                    if(msg.length > 0){
+                        msg += ', ';
+                    }
+                    msg += node.text;
+                });
+                Ext.Msg.show({
+                    title: 'Completed Tasks', 
+                    msg: msg.length > 0 ? msg : 'None',
+                    icon: Ext.Msg.INFO,
+                    minWidth: 200,
+                    buttons: Ext.Msg.OK
+                });
+            }
+        }]
+    });
+
+    tree.getRootNode().expand(true);
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-data.json
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-data.json	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-data.json	(revision 625)
@@ -0,0 +1,159 @@
+[{
+    task:'ColumnTree Example',
+    duration:'3 hours',
+    user:'',
+    uiProvider:'col',
+    cls:'master-task',
+    iconCls:'task-folder',
+    children:[{
+        task:'Abstract rendering in TreeNodeUI',
+        duration:'15 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreeNodeUI with column knowledge',
+        duration:'45 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreePanel to render and lock headers',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Add CSS to make it look fly',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Test and make sure it works',
+        duration:'1 hour',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    }]
+},{
+    task:'Custom Field Example',
+    duration:'2 1/2 hours',
+    user:'',
+    uiProvider:'col',
+    cls:'master-task',
+    iconCls:'task-folder',
+    children:[{
+        task:'Implement "Live Search" on extjs.com from Alex',
+        duration:'1 hour',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Extend TwinTrigger',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Testing and debugging',
+        duration:'1 hour',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    }]
+},{
+    task:'Foo Bar Item',
+    duration:'3 hours',
+    user:'',
+    uiProvider:'col',
+    cls:'master-task',
+    iconCls:'task-folder',
+    children:[{
+        task:'Abstract rendering in TreeNodeUI',
+        duration:'15 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreeNodeUI with column knowledge',
+        duration:'45 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreePanel to render and lock headers',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Add CSS to make it look fly',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Test and make sure it works',
+        duration:'1 hour',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    }]
+},{
+    task:'WTF Item',
+    duration:'3 hours',
+    user:'',
+    uiProvider:'col',
+    cls:'master-task',
+    iconCls:'task-folder',
+    children:[{
+        task:'Abstract rendering in TreeNodeUI',
+        duration:'15 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreeNodeUI with column knowledge',
+        duration:'45 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Create TreePanel to render and lock headers',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Add CSS to make it look fly',
+        duration:'30 min',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    },{
+        task:'Test and make sure it works',
+        duration:'1 hour',
+        user:'Jack Slocum',
+        uiProvider:'col',
+        leaf:true,
+        iconCls:'task'
+    }]
+}]
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.css	(revision 625)
@@ -0,0 +1,12 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.task {
+    background-image:url(../shared/icons/fam/cog.png) !important;
+}
+.task-folder {
+    background-image:url(../shared/icons/fam/folder_go.png) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.html	(revision 625)
@@ -0,0 +1,32 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Customizing TreePanel</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="../ux/css/ColumnNodeUI.css" />
+    <link rel="stylesheet" type="text/css" href="column-tree.css" />
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../code-display.js"></script>
+
+    <script type="text/javascript" src="../ux/ColumnNodeUI.js"></script>
+    <script type="text/javascript" src="column-tree.js"></script>
+    <!-- EXAMPLES -->
+    <script type="text/javascript" src="../shared/examples.js"></script>
+</head>
+<body>
+
+    <h1>ColumnTree Example</h1>
+
+    <p>Demonstrates extending the native <tt>Ext.tree.TreePanel</tt> and <tt>Ext.tree.TreeNodeUI</tt>
+    to display basic columns via the custom <a href="../ux/ColumnNodeUI.js">Ext.ux.tree.ColumnTree</a>
+    and <a href="../ux/ColumnNodeUI.js">Ext.ux.tree.ColumnNodeUI</a> classes.</p>
+    <p>The js is not minified so it is readable. See <a href="column-tree.js">column-tree.js</a>.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/column-tree.js	(revision 625)
@@ -0,0 +1,41 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var tree = new Ext.ux.tree.ColumnTree({
+        width: 550,
+        height: 300,
+        rootVisible:false,
+        autoScroll:true,
+        title: 'Example Tasks',
+        renderTo: Ext.getBody(),
+
+        columns:[{
+            header:'Task',
+            width:330,
+            dataIndex:'task'
+        },{
+            header:'Duration',
+            width:100,
+            dataIndex:'duration'
+        },{
+            header:'Assigned To',
+            width:100,
+            dataIndex:'user'
+        }],
+
+        loader: new Ext.tree.TreeLoader({
+            dataUrl:'column-data.json',
+            uiProviders:{
+                'col': Ext.ux.tree.ColumnNodeUI
+            }
+        }),
+
+        root: new Ext.tree.AsyncTreeNode({
+            text:'Tasks'
+        })
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/get-nodes.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/get-nodes.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/get-nodes.php	(revision 625)
@@ -0,0 +1,43 @@
+<?php
+// from php manual page
+function formatBytes($val, $digits = 3, $mode = "SI", $bB = "B"){ //$mode == "SI"|"IEC", $bB == "b"|"B"
+   $si = array("", "K", "M", "G", "T", "P", "E", "Z", "Y");
+   $iec = array("", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi");
+   switch(strtoupper($mode)) {
+       case "SI" : $factor = 1000; $symbols = $si; break;
+       case "IEC" : $factor = 1024; $symbols = $iec; break;
+       default : $factor = 1000; $symbols = $si; break;
+   }
+   switch($bB) {
+       case "b" : $val *= 8; break;
+       default : $bB = "B"; break;
+   }
+   for($i=0;$i<count($symbols)-1 && $val>=$factor;$i++)
+       $val /= $factor;
+   $p = strpos($val, ".");
+   if($p !== false && $p > $digits) $val = round($val);
+   elseif($p !== false) $val = round($val, $digits-$p);
+   return round($val, $digits) . " " . $symbols[$i] . $bB;
+}
+
+$dir = isset($_REQUEST['lib'])&&$_REQUEST['lib'] == 'yui' ? '../../../' : '../../';
+$node = isset($_REQUEST['node'])?$_REQUEST['node']:"";
+if(strpos($node, '..') !== false){
+    die('Nice try buddy.');
+}
+$nodes = array();
+$d = dir($dir.$node);
+while($f = $d->read()){
+    if($f == '.' || $f == '..' || substr($f, 0, 1) == '.')continue;
+    $lastmod = date('M j, Y, g:i a',filemtime($dir.$node.'/'.$f));
+    if(is_dir($dir.$node.'/'.$f)){
+        $qtip = 'Type: Folder<br />Last Modified: '.$lastmod;
+        $nodes[] = array('text'=>$f, 'id'=>$node.'/'.$f/*, 'qtip'=>$qtip*/, 'cls'=>'folder');
+    }else{
+        $size = formatBytes(filesize($dir.$node.'/'.$f), 2);
+        $qtip = 'Type: JavaScript File<br />Last Modified: '.$lastmod.'<br />Size: '.$size;
+        $nodes[] = array('text'=>$f, 'id'=>$node.'/'.$f, 'leaf'=>true/*, 'qtip'=>$qtip, 'qtipTitle'=>$f */, 'cls'=>'file');
+    }
+}
+$d->close();
+echo json_encode($nodes);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.html	(revision 625)
@@ -0,0 +1,31 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Reorder TreePanel</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+<script type="text/javascript" src="reorder.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Drag and Drop ordering in a TreePanel</h1>
+<p>This example shows basic drag and drop node moving in a tree. In this implementation there are no restrictions and 
+anything can be dropped anywhere except appending to nodes marked "leaf" (the files).</p>
+<p>Drag along the edge of the tree to trigger auto scrolling while performing a drag and drop.</p>
+<p>In order to demonstrate drag and drop insertion points, sorting was <b>not</b> enabled.</p>
+<p>The data for this tree is asynchronously loaded with a JSON TreeLoader.</p>
+<p>The js is not minified so it is readable. See <a href="reorder.js">reorder.js</a>.</p>
+
+<div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/reorder.js	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    // shorthand
+    var Tree = Ext.tree;
+
+    var tree = new Tree.TreePanel({
+        useArrows: true,
+        autoScroll: true,
+        animate: true,
+        enableDD: true,
+        containerScroll: true,
+        border: false,
+        // auto create TreeLoader
+        dataUrl: 'get-nodes.php',
+
+        root: {
+            nodeType: 'async',
+            text: 'Ext JS',
+            draggable: false,
+            id: 'src'
+        }
+    });
+
+    // render the tree
+    tree.render('tree-div');
+    tree.getRootNode().expand();
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/save-dep.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/save-dep.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/save-dep.php	(revision 625)
@@ -0,0 +1,3 @@
+<?php
+$tree = stripslashes($_REQUEST['data']);
+file_put_contents('./dep-tree.json', $tree);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.html	(revision 625)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Drag and Drop between 2 TreePanels</title>
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+<script type="text/javascript" src="two-trees.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+<style type="text/css">
+    #tree, #tree2 {
+    	float:left;
+    	margin:20px;
+    	border:1px solid #c3daf9;
+    	width:250px;
+    	height:300px;
+    }
+    .folder .x-tree-node-icon{
+		background:transparent url(../../resources/images/default/tree/folder.gif);
+	}
+	.x-tree-node-expanded .x-tree-node-icon{
+		background:transparent url(../../resources/images/default/tree/folder-open.gif);
+	}
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Drag and Drop betweens two TreePanels</h1>
+<p>The TreePanels have a TreeSorter applied in "folderSort" mode.</p>
+<p>Both TreePanels are in "appendOnly" drop mode since they are sorted.</p>
+<p>Drag along the edge of the tree to trigger auto scrolling while performing a drag and drop.</p>
+<p>The data for this tree is asynchronously loaded with a JSON TreeLoader.</p>
+<p>The js is not minified so it is readable. See <a href="two-trees.js">two-trees.js</a>.</p>
+
+<div id="tree"></div>
+<div id="tree2"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/two-trees.js	(revision 625)
@@ -0,0 +1,74 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+var TreeTest = function(){
+    // shorthand
+    var Tree = Ext.tree;
+    
+    return {
+        init : function(){
+            // yui-ext tree
+            var tree = new Tree.TreePanel({
+                animate:true, 
+                autoScroll:true,
+                loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}),
+                enableDD:true,
+                containerScroll: true,
+                border: false,
+                dropConfig: {appendOnly:true}
+            });
+            
+            // add a tree sorter in folder mode
+            new Tree.TreeSorter(tree, {folderSort:true});
+            
+            // set the root node
+            var root = new Tree.AsyncTreeNode({
+                text: 'Ext JS', 
+                draggable:false, // disable root node dragging
+                id:'src'
+            });
+            tree.setRootNode(root);
+            
+            // render the tree
+            tree.render('tree');
+            
+            root.expand(false, /*no anim*/ false);
+            
+            //-------------------------------------------------------------
+            
+            // YUI tree            
+            var tree2 = new Tree.TreePanel({
+                animate:true,
+                autoScroll:true,
+                //rootVisible: false,
+                loader: new Ext.tree.TreeLoader({
+                    dataUrl:'get-nodes.php',
+                    baseParams: {lib:'yui'} // custom http params
+                }),
+                containerScroll: true,
+                border: false,
+                enableDD:true,
+                dropConfig: {appendOnly:true}
+            });
+            
+            // add a tree sorter in folder mode
+            new Tree.TreeSorter(tree2, {folderSort:true});
+            
+            // add the root node
+            var root2 = new Tree.AsyncTreeNode({
+                text: 'My Files', 
+                draggable:false, 
+                id:'yui'
+            });
+            tree2.setRootNode(root2);
+            tree2.render('tree2');
+            
+            root2.expand(false, /*no anim*/ false);
+        }
+    };
+}();
+
+Ext.EventManager.onDocumentReady(TreeTest.init, TreeTest, true);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-data.xml
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-data.xml	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-data.xml	(revision 625)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<authors>
+    <author first="Fyodor" last="Dostoevsky" gender="m">
+        <book title="Crime and Punishment" published="1866" url="http://www.amazon.com/Crime-Punishment-Fyodor-Dostoevsky/dp/0679734503/">
+            Raskolnikov, a destitute and desperate former student, commits a random murder without remorse or regret, imagining himself to be a great man far above moral law. But as he embarks on a dangerous cat-and-mouse game with a suspicious police investigator, his own conscience begins to torment him. 
+        </book>
+        <book title="The Brothers Karamazov" published="1879" url="http://www.amazon.com/Brothers-Karamazov-Fyodor-Dostoevsky/dp/0374528373/">
+            Driven by intense, uncontrollable emotions of rage and revenge, the Karamozov brothers become involved in the brutal murder of their despicable father. It is a love-hate struggle with profound psychological and spiritual implications.
+        </book>
+    </author>
+    <author first="Stephen" last="King" gender="m">
+        <book title="The Shining" published="1977" url="http://www.amazon.com/Shining-Stephen-King/dp/0743424425/">
+            An alcoholic man, his wife, and his psychic son go to a large haunted hotel for the winter, where the child is threatened by supernatural and family dangers.
+        </book>
+        <book title="Cujo" published="1981" url="http://www.amazon.com/Cujo-Signet-Stephen-King/dp/0451161351/">
+            A big, friendly dog chases a rabbit into a hidden underground cave and stirs a sleeping evil crueler than death itself. The little Maine town of Castle Rock is about to be invaded by the most hideous menace ever to savage the flesh and devour the mind.
+        </book>
+        <book title="IT" published="1986" url="http://www.amazon.com/Signet-Books-Stephen-King/dp/0451169514/">
+            They were seven teenagers when they first stumbled upon the horror. Now they were grown-up men and women who had gone out into the big world to gain success and happiness. But none of them could withstand the force that drew them back to Derry, Maine to face the nightmare without an end, and the evil without a name.
+        </book>
+    </author>
+    <author first="J.K." last="Rowling" gender="f">
+        <book title="Harry Potter and the Sorcerer's Stone" published="1997" url="http://www.amazon.com/Harry-Potter-Sorcerers-Stone-Book/dp/043936213X/">
+            All Harry Potter knows is a miserable life with the Dursleys, his horrible aunt and uncle, and their abominable son, Dudley. But all that is about to change when a mysterious letter arrives by owl messenger: a letter with an invitation to a wonderful place he never dreamed existed.
+        </book>
+        <book title="Harry Potter and the Chamber of Secrets" published="1998" url="http://www.amazon.com/Harry-Potter-Chamber-Secrets-Book/dp/0439064864/">
+            Someone - or something - starts turning Hogwarts students to stone. Could it be Draco Malfoy, a more poisonous rival than ever? Could it possibly be Hagrid, whose mysterious past is finally told? Or could it be the one everyone at Hogwarts most suspects... Harry Potter himself!
+        </book>
+        <book title="Harry Potter and the Prisoner of Azkaban" published="1999" url="http://www.amazon.com/Harry-Potter-Prisoner-Azkaban-Book/dp/043965548X/">
+            For Twelve long years, the dread fortress of Azkaban held an infamous prisoner named Sirius Black. Now he has escaped, and the Azkaban guards heard Black muttering in his sleep, "He's at Hogwarts..." Harry Potter isn't safe, not even within the walls of his magical school. Because on top of it all, there may well be a traitor in their midst.
+        </book>
+    </author>
+</authors>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.css	(revision 625)
@@ -0,0 +1,31 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#details-panel .x-panel-body {
+    padding: 10px;
+    background: #eee;
+    color: #555;
+}
+#details-panel a:link, #details-panel a:visited {
+    color: #369;
+}
+#details-panel h2 {
+    color: #369;
+    font-size: 15px;
+}
+#details-panel p {
+    margin-bottom: 5px;
+}
+
+.author-m {
+    background-image: url(../shared/icons/fam/user.gif) !important;
+}
+.author-f {
+    background-image: url(../shared/icons/fam/user_female.gif) !important;
+}
+.book {
+    background-image: url(../shared/icons/fam/book.png) !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.html	(revision 625)
@@ -0,0 +1,41 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>XmlTreeLoader Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="xml-tree-loader.css" />
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../ux/XmlTreeLoader.js"></script>
+    <script type="text/javascript" src="xml-tree-loader.js"></script>
+
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <script type="text/javascript" src="../shared/examples.js"></script>
+</head>
+<body>
+
+    <h1>XmlTreeLoader Example</h1>
+    <p>Demonstrates extending the native <tt>Ext.tree.TreeLoader</tt> to support loading XML data via the
+    custom <a href="../ux/XmlTreeLoader.js">Ext.ux.tree.XmlTreeLoader</a> class.</p>
+    <p>The XmlTreeLoader is then further extended to demonstrate additional custom, application-specific node processing.</p>
+    <p>The js is not minified so it is readable. See <a href="xml-tree-loader.js">xml-tree-loader.js</a>.</p>
+    <p>This demo loads an XML file in the following format:</p>
+    <p>
+        <pre style="font-size:11px;">
+    &lt;authors>
+        &lt;author first="Fyodor" last="Dostoevsky" gender="m">
+            &lt;book title="Crime and Punishment" published="1866" url="http://...">
+                Raskolnikov, a destitute and desperate former student...
+            &lt;/book>
+            ...
+        &lt;/author>
+        ...
+    &lt;/authors>
+        </pre>
+    </p>
+
+    <div id="tree"></div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/tree/xml-tree-loader.js	(revision 625)
@@ -0,0 +1,99 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+//
+// Extend the XmlTreeLoader to set some custom TreeNode attributes specific to our application:
+//
+Ext.app.BookLoader = Ext.extend(Ext.ux.tree.XmlTreeLoader, {
+    processAttributes : function(attr){
+        if(attr.first){ // is it an author node?
+
+            // Set the node text that will show in the tree since our raw data does not include a text attribute:
+            attr.text = attr.first + ' ' + attr.last;
+
+            // Author icon, using the gender flag to choose a specific icon:
+            attr.iconCls = 'author-' + attr.gender;
+
+            // Override these values for our folder nodes because we are loading all data at once.  If we were
+            // loading each node asynchronously (the default) we would not want to do this:
+            attr.loaded = true;
+            attr.expanded = true;
+        }
+        else if(attr.title){ // is it a book node?
+
+            // Set the node text that will show in the tree since our raw data does not include a text attribute:
+            attr.text = attr.title + ' (' + attr.published + ')';
+
+            // Book icon:
+            attr.iconCls = 'book';
+
+            // Tell the tree this is a leaf node.  This could also be passed as an attribute in the original XML,
+            // but this example demonstrates that you can control this even when you cannot dictate the format of
+            // the incoming source XML:
+            attr.leaf = true;
+        }
+    }
+});
+
+Ext.onReady(function(){
+
+    var detailsText = '<i>Select a book to see more information...</i>';
+
+	var tpl = new Ext.Template(
+        '<h2 class="title">{title}</h2>',
+        '<p><b>Published</b>: {published}</p>',
+        '<p><b>Synopsis</b>: {innerText}</p>',
+        '<p><a href="{url}" target="_blank">Purchase from Amazon</a></p>'
+	);
+    tpl.compile();
+
+    new Ext.Panel({
+        title: 'Reading List',
+	    renderTo: 'tree',
+        layout: 'border',
+	    width: 500,
+        height: 500,
+        items: [{
+            xtype: 'treepanel',
+            id: 'tree-panel',
+            region: 'center',
+            margins: '2 2 0 2',
+            autoScroll: true,
+	        rootVisible: false,
+	        root: new Ext.tree.AsyncTreeNode(),
+
+            // Our custom TreeLoader:
+	        loader: new Ext.app.BookLoader({
+	            dataUrl:'xml-tree-data.xml'
+	        }),
+
+	        listeners: {
+	            'render': function(tp){
+                    tp.getSelectionModel().on('selectionchange', function(tree, node){
+                        var el = Ext.getCmp('details-panel').body;
+	                    if(node && node.leaf){
+	                        tpl.overwrite(el, node.attributes);
+	                    }else{
+                            el.update(detailsText);
+                        }
+                    })
+	            }
+	        }
+        },{
+            region: 'south',
+            title: 'Book Details',
+            id: 'details-panel',
+            autoScroll: true,
+            collapsible: true,
+            split: true,
+            margins: '0 2 2 2',
+            cmargins: '2 2 2 2',
+            height: 220,
+            html: detailsText
+        }]
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/BufferView.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/BufferView.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/BufferView.js	(revision 625)
@@ -0,0 +1,212 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.BufferView
+ * @extends Ext.grid.GridView
+ * A custom GridView which renders rows on an as-needed basis.
+ */
+Ext.ux.grid.BufferView = Ext.extend(Ext.grid.GridView, {
+	/**
+	 * @cfg {Number} rowHeight
+	 * The height of a row in the grid.
+	 */
+	rowHeight: 19,
+
+	/**
+	 * @cfg {Number} borderHeight
+	 * The combined height of border-top and border-bottom of a row.
+	 */
+	borderHeight: 2,
+
+	/**
+	 * @cfg {Boolean/Number} scrollDelay
+	 * The number of milliseconds before rendering rows out of the visible
+	 * viewing area. Defaults to 100. Rows will render immediately with a config
+	 * of false.
+	 */
+	scrollDelay: 100,
+
+	/**
+	 * @cfg {Number} cacheSize
+	 * The number of rows to look forward and backwards from the currently viewable
+	 * area.  The cache applies only to rows that have been rendered already.
+	 */
+	cacheSize: 20,
+
+	/**
+	 * @cfg {Number} cleanDelay
+	 * The number of milliseconds to buffer cleaning of extra rows not in the
+	 * cache.
+	 */
+	cleanDelay: 500,
+
+	initTemplates : function(){
+		Ext.ux.grid.BufferView.superclass.initTemplates.call(this);
+		var ts = this.templates;
+		// empty div to act as a place holder for a row
+	        ts.rowHolder = new Ext.Template(
+		        '<div class="x-grid3-row {alt}" style="{tstyle}"></div>'
+		);
+		ts.rowHolder.disableFormats = true;
+		ts.rowHolder.compile();
+
+		ts.rowBody = new Ext.Template(
+		        '<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+			'<tbody><tr>{cells}</tr>',
+			(this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''),
+			'</tbody></table>'
+		);
+		ts.rowBody.disableFormats = true;
+		ts.rowBody.compile();
+	},
+
+	getStyleRowHeight : function(){
+		return Ext.isBorderBox ? (this.rowHeight + this.borderHeight) : this.rowHeight;
+	},
+
+	getCalculatedRowHeight : function(){
+		return this.rowHeight + this.borderHeight;
+	},
+
+	getVisibleRowCount : function(){
+		var rh = this.getCalculatedRowHeight();
+		var visibleHeight = this.scroller.dom.clientHeight;
+		return (visibleHeight < 1) ? 0 : Math.ceil(visibleHeight / rh);
+	},
+
+	getVisibleRows: function(){
+		var count = this.getVisibleRowCount();
+		var sc = this.scroller.dom.scrollTop;
+		var start = (sc == 0 ? 0 : Math.floor(sc/this.getCalculatedRowHeight())-1);
+		return {
+			first: Math.max(start, 0),
+			last: Math.min(start + count + 2, this.ds.getCount()-1)
+		};
+	},
+
+	doRender : function(cs, rs, ds, startRow, colCount, stripe, onlyBody){
+		var ts = this.templates, ct = ts.cell, rt = ts.row, rb = ts.rowBody, last = colCount-1;
+		var rh = this.getStyleRowHeight();
+		var vr = this.getVisibleRows();
+		var tstyle = 'width:'+this.getTotalWidth()+';height:'+rh+'px;';
+		// buffers
+		var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r;
+		for (var j = 0, len = rs.length; j < len; j++) {
+			r = rs[j]; cb = [];
+			var rowIndex = (j+startRow);
+			var visible = rowIndex >= vr.first && rowIndex <= vr.last;
+			if (visible) {
+				for (var i = 0; i < colCount; i++) {
+					c = cs[i];
+					p.id = c.id;
+					p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+					p.attr = p.cellAttr = "";
+					p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
+					p.style = c.style;
+					if (p.value == undefined || p.value === "") {
+						p.value = "&#160;";
+					}
+					if (r.dirty && typeof r.modified[c.name] !== 'undefined') {
+						p.css += ' x-grid3-dirty-cell';
+					}
+					cb[cb.length] = ct.apply(p);
+				}
+			}
+			var alt = [];
+			if(stripe && ((rowIndex+1) % 2 == 0)){
+			    alt[0] = "x-grid3-row-alt";
+			}
+			if(r.dirty){
+			    alt[1] = " x-grid3-dirty-row";
+			}
+			rp.cols = colCount;
+			if(this.getRowClass){
+			    alt[2] = this.getRowClass(r, rowIndex, rp, ds);
+			}
+			rp.alt = alt.join(" ");
+			rp.cells = cb.join("");
+			buf[buf.length] =  !visible ? ts.rowHolder.apply(rp) : (onlyBody ? rb.apply(rp) : rt.apply(rp));
+		}
+		return buf.join("");
+	},
+
+	isRowRendered: function(index){
+		var row = this.getRow(index);
+		return row && row.childNodes.length > 0;
+	},
+
+	syncScroll: function(){
+		Ext.ux.grid.BufferView.superclass.syncScroll.apply(this, arguments);
+		this.update();
+	},
+
+	// a (optionally) buffered method to update contents of gridview
+	update: function(){
+		if (this.scrollDelay) {
+			if (!this.renderTask) {
+				this.renderTask = new Ext.util.DelayedTask(this.doUpdate, this);
+			}
+			this.renderTask.delay(this.scrollDelay);
+		}else{
+			this.doUpdate();
+		}
+	},
+
+	doUpdate: function(){
+		if (this.getVisibleRowCount() > 0) {
+			var g = this.grid, cm = g.colModel, ds = g.store;
+		        var cs = this.getColumnData();
+
+		        var vr = this.getVisibleRows();
+			for (var i = vr.first; i <= vr.last; i++) {
+				// if row is NOT rendered and is visible, render it
+				if(!this.isRowRendered(i)){
+					var html = this.doRender(cs, [ds.getAt(i)], ds, i, cm.getColumnCount(), g.stripeRows, true);
+					this.getRow(i).innerHTML = html;
+				}
+			}
+			this.clean();
+		}
+	},
+
+	// a buffered method to clean rows
+	clean : function(){
+		if(!this.cleanTask){
+			this.cleanTask = new Ext.util.DelayedTask(this.doClean, this);
+		}
+		this.cleanTask.delay(this.cleanDelay);
+	},
+
+	doClean: function(){
+		if (this.getVisibleRowCount() > 0) {
+			var vr = this.getVisibleRows();
+			vr.first -= this.cacheSize;
+			vr.last += this.cacheSize;
+
+			var i = 0, rows = this.getRows();
+			// if first is less than 0, all rows have been rendered
+			// so lets clean the end...
+			if(vr.first <= 0){
+				i = vr.last + 1;
+			}
+			for(var len = this.ds.getCount(); i < len; i++){
+				// if current row is outside of first and last and
+				// has content, update the innerHTML to nothing
+				if ((i < vr.first || i > vr.last) && rows[i].innerHTML) {
+					rows[i].innerHTML = '';
+				}
+			}
+		}
+	},
+
+	layout: function(){
+		Ext.ux.grid.BufferView.superclass.layout.call(this);
+		this.update();
+	}
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CenterLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CenterLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CenterLayout.js	(revision 625)
@@ -0,0 +1,62 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// We are adding these custom layouts to a namespace that does not
+// exist by default in Ext, so we have to add the namespace first:
+Ext.ns('Ext.ux.layout');
+
+/**
+ * @class Ext.ux.layout.CenterLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This is a very simple layout style used to center contents within a container.  This layout works within
+ * nested containers and can also be used as expected as a Viewport layout to center the page layout.</p>
+ * <p>As a subclass of FitLayout, CenterLayout expects to have a single child panel of the container that uses
+ * the layout.  The layout does not require any config options, although the child panel contained within the
+ * layout must provide a fixed or percentage width.  The child panel's height will fit to the container by
+ * default, but you can specify <tt>autoHeight:true</tt> to allow it to autosize based on its content height.
+ * Example usage:</p>
+ * <pre><code>
+// The content panel is centered in the container
+var p = new Ext.Panel({
+    title: 'Center Layout',
+    layout: 'ux.center',
+    items: [{
+        title: 'Centered Content',
+        width: '75%',
+        html: 'Some content'
+    }]
+});
+
+// If you leave the title blank and specify no border
+// you'll create a non-visual, structural panel just
+// for centering the contents in the main container.
+var p = new Ext.Panel({
+    layout: 'ux.center',
+    border: false,
+    items: [{
+        title: 'Centered Content',
+        width: 300,
+        autoHeight: true,
+        html: 'Some content'
+    }]
+});
+</code></pre>
+ */
+Ext.ux.layout.CenterLayout = Ext.extend(Ext.layout.FitLayout, {
+	// private
+    setItemSize : function(item, size){
+        this.container.addClass('ux-layout-center');
+        item.addClass('ux-layout-center-item');
+        if(item && size.height > 0){
+            if(item.width){
+                size.width = item.width;
+            }
+            item.setSize(size);
+        }
+    }
+});
+
+Ext.Container.LAYOUTS['ux.center'] = Ext.ux.layout.CenterLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CheckColumn.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CheckColumn.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/CheckColumn.js	(revision 625)
@@ -0,0 +1,80 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.CheckColumn
+ * @extends Object
+ * GridPanel plugin to add a column with check boxes to a grid.
+ * <p>Example usage:</p>
+ * <pre><code>
+// create the column
+var checkColumn = new Ext.grid.CheckColumn({
+   header: 'Indoor?',
+   dataIndex: 'indoor',
+   id: 'check',
+   width: 55
+});
+
+// add the column to the column model
+var cm = new Ext.grid.ColumnModel([{
+       header: 'Foo',
+       ...
+    },
+    checkColumn
+]);
+
+// create the grid
+var grid = new Ext.grid.EditorGridPanel({
+    ...
+    cm: cm,
+    plugins: [checkColumn], // include plugin
+    ...
+});
+ * </code></pre>
+ * In addition to storing a Boolean value within the record data, this
+ * class toggles a css class between <tt>'x-grid3-check-col'</tt> and
+ * <tt>'x-grid3-check-col-on'</tt> to alter the background image used for
+ * a column.
+ */
+Ext.ux.grid.CheckColumn = function(config){
+    Ext.apply(this, config);
+    if(!this.id){
+        this.id = Ext.id();
+    }
+    this.renderer = this.renderer.createDelegate(this);
+};
+
+Ext.ux.grid.CheckColumn.prototype ={
+    init : function(grid){
+        this.grid = grid;
+        this.grid.on('render', function(){
+            var view = this.grid.getView();
+            view.mainBody.on('mousedown', this.onMouseDown, this);
+        }, this);
+    },
+
+    onMouseDown : function(e, t){
+        if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
+            e.stopEvent();
+            var index = this.grid.getView().findRowIndex(t);
+            var record = this.grid.store.getAt(index);
+            record.set(this.dataIndex, !record.data[this.dataIndex]);
+        }
+    },
+
+    renderer : function(v, p, record){
+        p.css += ' x-grid3-check-col-td'; 
+        return '<div class="x-grid3-check-col'+(v?'-on':'')+' x-grid3-cc-'+this.id+'">&#160;</div>';
+    }
+};
+
+// register ptype
+Ext.preg('checkcolumn', Ext.ux.grid.CheckColumn);
+
+// backwards compat
+Ext.grid.CheckColumn = Ext.ux.grid.CheckColumn;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ColumnNodeUI.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ColumnNodeUI.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ColumnNodeUI.js	(revision 625)
@@ -0,0 +1,109 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.tree');
+
+/**
+ * @class Ext.ux.tree.ColumnTree
+ * @extends Ext.tree.TreePanel
+ * 
+ * @xtype columntree
+ */
+Ext.ux.tree.ColumnTree = Ext.extend(Ext.tree.TreePanel, {
+    lines : false,
+    borderWidth : Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell
+    cls : 'x-column-tree',
+
+    onRender : function(){
+        Ext.tree.ColumnTree.superclass.onRender.apply(this, arguments);
+        this.headers = this.header.createChild({cls:'x-tree-headers'});
+
+        var cols = this.columns, c;
+        var totalWidth = 0;
+        var scrollOffset = 19; // similar to Ext.grid.GridView default
+
+        for(var i = 0, len = cols.length; i < len; i++){
+             c = cols[i];
+             totalWidth += c.width;
+             this.headers.createChild({
+                 cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''),
+                 cn: {
+                     cls:'x-tree-hd-text',
+                     html: c.header
+                 },
+                 style:'width:'+(c.width-this.borderWidth)+'px;'
+             });
+        }
+        this.headers.createChild({cls:'x-clear'});
+        // prevent floats from wrapping when clipped
+        this.headers.setWidth(totalWidth+scrollOffset);
+        this.innerCt.setWidth(totalWidth);
+    }
+});
+
+Ext.reg('columntree', Ext.ux.tree.ColumnTree);
+
+//backwards compat
+Ext.tree.ColumnTree = Ext.ux.tree.ColumnTree;
+
+
+/**
+ * @class Ext.ux.tree.ColumnNodeUI
+ * @extends Ext.tree.TreeNodeUI
+ */
+Ext.ux.tree.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    focus: Ext.emptyFn, // prevent odd scrolling behavior
+
+    renderElements : function(n, a, targetNode, bulkRender){
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var t = n.getOwnerTree();
+        var cols = t.columns;
+        var bw = t.borderWidth;
+        var c = cols[0];
+
+        var buf = [
+             '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf ', a.cls,'">',
+                '<div class="x-tree-col" style="width:',c.width-bw,'px;">',
+                    '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
+                    '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow">',
+                    '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on">',
+                    '<a hidefocus="on" class="x-tree-node-anchor" href="',a.href ? a.href : "#",'" tabIndex="1" ',
+                    a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
+                    '<span unselectable="on">', n.text || (c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",
+                "</div>"];
+         for(var i = 1, len = cols.length; i < len; i++){
+             c = cols[i];
+
+             buf.push('<div class="x-tree-col ',(c.cls?c.cls:''),'" style="width:',c.width-bw,'px;">',
+                        '<div class="x-tree-col-text">',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</div>",
+                      "</div>");
+         }
+         buf.push(
+            '<div class="x-clear"></div></div>',
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>");
+
+        if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin",
+                                n.nextSibling.ui.getEl(), buf.join(""));
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join(""));
+        }
+
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.firstChild.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        this.anchor = cs[3];
+        this.textNode = cs[3].firstChild;
+    }
+});
+
+//backwards compat
+Ext.tree.ColumnNodeUI = Ext.ux.tree.ColumnNodeUI;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/DataView-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/DataView-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/DataView-more.js	(revision 625)
@@ -0,0 +1,157 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DataView.LabelEditor
+ * @extends Ext.Editor
+ * 
+ */
+Ext.DataView.LabelEditor = Ext.extend(Ext.Editor, {
+    alignment: "tl-tl",
+    hideEl : false,
+    cls: "x-small-editor",
+    shim: false,
+    completeOnEnter: true,
+    cancelOnEsc: true,
+    labelSelector: 'span.x-editable',
+    
+    constructor: function(cfg, field){
+        Ext.DataView.LabelEditor.superclass.constructor.call(this,
+            field || new Ext.form.TextField({
+                allowBlank: false,
+                growMin:90,
+                growMax:240,
+                grow:true,
+                selectOnFocus:true
+            }), cfg
+        );
+    },
+    
+    init : function(view){
+        this.view = view;
+        view.on('render', this.initEditor, this);
+        this.on('complete', this.onSave, this);
+    },
+
+    initEditor : function(){
+        this.view.on({
+            scope: this,
+            containerclick: this.doBlur,
+            click: this.doBlur
+        });
+        this.view.getEl().on('mousedown', this.onMouseDown, this, {delegate: this.labelSelector});
+    },
+    
+    doBlur: function(){
+        if(this.editing){
+            this.field.blur();
+        }
+    },
+
+    onMouseDown : function(e, target){
+        if(!e.ctrlKey && !e.shiftKey){
+            var item = this.view.findItemFromChild(target);
+            e.stopEvent();
+            var record = this.view.store.getAt(this.view.indexOf(item));
+            this.startEdit(target, record.data[this.dataIndex]);
+            this.activeRecord = record;
+        }else{
+            e.preventDefault();
+        }
+    },
+
+    onSave : function(ed, value){
+        this.activeRecord.set(this.dataIndex, value);
+    }
+});
+
+
+Ext.DataView.DragSelector = function(cfg){
+    cfg = cfg || {};
+    var view, proxy, tracker;
+    var rs, bodyRegion, dragRegion = new Ext.lib.Region(0,0,0,0);
+    var dragSafe = cfg.dragSafe === true;
+
+    this.init = function(dataView){
+        view = dataView;
+        view.on('render', onRender);
+    };
+
+    function fillRegions(){
+        rs = [];
+        view.all.each(function(el){
+            rs[rs.length] = el.getRegion();
+        });
+        bodyRegion = view.el.getRegion();
+    }
+
+    function cancelClick(){
+        return false;
+    }
+
+    function onBeforeStart(e){
+        return !dragSafe || e.target == view.el.dom;
+    }
+
+    function onStart(e){
+        view.on('containerclick', cancelClick, view, {single:true});
+        if(!proxy){
+            proxy = view.el.createChild({cls:'x-view-selector'});
+        }else{
+            proxy.setDisplayed('block');
+        }
+        fillRegions();
+        view.clearSelections();
+    }
+
+    function onDrag(e){
+        var startXY = tracker.startXY;
+        var xy = tracker.getXY();
+
+        var x = Math.min(startXY[0], xy[0]);
+        var y = Math.min(startXY[1], xy[1]);
+        var w = Math.abs(startXY[0] - xy[0]);
+        var h = Math.abs(startXY[1] - xy[1]);
+
+        dragRegion.left = x;
+        dragRegion.top = y;
+        dragRegion.right = x+w;
+        dragRegion.bottom = y+h;
+
+        dragRegion.constrainTo(bodyRegion);
+        proxy.setRegion(dragRegion);
+
+        for(var i = 0, len = rs.length; i < len; i++){
+            var r = rs[i], sel = dragRegion.intersect(r);
+            if(sel && !r.selected){
+                r.selected = true;
+                view.select(i, true);
+            }else if(!sel && r.selected){
+                r.selected = false;
+                view.deselect(i);
+            }
+        }
+    }
+
+    function onEnd(e){
+        if (!Ext.isIE) {
+            view.un('containerclick', cancelClick, view);    
+        }        
+        if(proxy){
+            proxy.setDisplayed(false);
+        }
+    }
+
+    function onRender(view){
+        tracker = new Ext.dd.DragTracker({
+            onBeforeStart: onBeforeStart,
+            onStart: onStart,
+            onDrag: onDrag,
+            onEnd: onEnd
+        });
+        tracker.initEl(view.el);
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/FileUploadField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/FileUploadField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/FileUploadField.js	(revision 625)
@@ -0,0 +1,145 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.FileUploadField
+ * @extends Ext.form.TextField
+ * Creates a file upload field.
+ * @xtype fileuploadfield
+ */
+Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {String} buttonText The button text to display on the upload button (defaults to
+     * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
+     * value will be used instead if available.
+     */
+    buttonText: 'Browse...',
+    /**
+     * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
+     * text field (defaults to false).  If true, all inherited TextField members will still be available.
+     */
+    buttonOnly: false,
+    /**
+     * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
+     * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
+     */
+    buttonOffset: 3,
+    /**
+     * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.
+     */
+
+    // private
+    readOnly: true,
+
+    /**
+     * @hide
+     * @method autoSize
+     */
+    autoSize: Ext.emptyFn,
+
+    // private
+    initComponent: function(){
+        Ext.ux.form.FileUploadField.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event fileselected
+             * Fires when the underlying file input field's value has changed from the user
+             * selecting a new file from the system file selection dialog.
+             * @param {Ext.ux.form.FileUploadField} this
+             * @param {String} value The file value returned by the underlying file input field
+             */
+            'fileselected'
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ux.form.FileUploadField.superclass.onRender.call(this, ct, position);
+
+        this.wrap = this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});
+        this.el.addClass('x-form-file-text');
+        this.el.dom.removeAttribute('name');
+
+        this.fileInput = this.wrap.createChild({
+            id: this.getFileInputId(),
+            name: this.name||this.getId(),
+            cls: 'x-form-file',
+            tag: 'input',
+            type: 'file',
+            size: 1
+        });
+
+        var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
+            text: this.buttonText
+        });
+        this.button = new Ext.Button(Ext.apply(btnCfg, {
+            renderTo: this.wrap,
+            cls: 'x-form-file-btn' + (btnCfg.iconCls ? ' x-btn-icon' : '')
+        }));
+
+        if(this.buttonOnly){
+            this.el.hide();
+            this.wrap.setWidth(this.button.getEl().getWidth());
+        }
+
+        this.fileInput.on('change', function(){
+            var v = this.fileInput.dom.value;
+            this.setValue(v);
+            this.fireEvent('fileselected', this, v);
+        }, this);
+    },
+
+    // private
+    getFileInputId: function(){
+        return this.id + '-file';
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.ux.form.FileUploadField.superclass.onResize.call(this, w, h);
+
+        this.wrap.setWidth(w);
+
+        if(!this.buttonOnly){
+            var w = this.wrap.getWidth() - this.button.getEl().getWidth() - this.buttonOffset;
+            this.el.setWidth(w);
+        }
+    },
+
+    // private
+    onDestroy: function(){
+        Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
+        Ext.destroy(this.fileInput, this.button, this.wrap);
+    },
+
+
+    // private
+    preFocus : Ext.emptyFn,
+
+    // private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon : function(){
+        this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+    }
+
+});
+
+Ext.reg('fileuploadfield', Ext.ux.form.FileUploadField);
+
+// backwards compat
+Ext.form.FileUploadField = Ext.ux.form.FileUploadField;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Focus.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Focus.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Focus.js	(revision 625)
@@ -0,0 +1,812 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+Ext.ns('Ext.a11y');
+
+Ext.a11y.Frame = Ext.extend(Object, {
+    initialized: false,
+    
+    constructor: function(size, color){
+        this.setSize(size || 1);
+        this.setColor(color || '15428B');
+    },
+    
+    init: function(){
+        if (!this.initialized) {
+            this.sides = [];
+            
+            var s, i;
+            
+            this.ct = Ext.DomHelper.append(document.body, {
+                cls: 'x-a11y-focusframe'
+            }, true);
+            
+            for (i = 0; i < 4; i++) {
+                s = Ext.DomHelper.append(this.ct, {
+                    cls: 'x-a11y-focusframe-side',
+                    style: 'background-color: #' + this.color
+                }, true);
+                s.visibilityMode = Ext.Element.DISPLAY;
+                this.sides.push(s);
+            }
+            
+            this.frameTask = new Ext.util.DelayedTask(function(el){
+                var newEl = Ext.get(el);
+                if (newEl != this.curEl) {
+                    var w = newEl.getWidth();
+                    var h = newEl.getHeight();
+                    this.sides[0].show().setSize(w, this.size).anchorTo(el, 'tl', [0, -1]);
+                    this.sides[2].show().setSize(w, this.size).anchorTo(el, 'bl', [0, -1]);
+                    this.sides[1].show().setSize(this.size, h).anchorTo(el, 'tr', [-1, 0]);
+                    this.sides[3].show().setSize(this.size, h).anchorTo(el, 'tl', [-1, 0]);
+                    this.curEl = newEl;
+                }
+            }, this);
+            
+            this.unframeTask = new Ext.util.DelayedTask(function(){
+                if (this.initialized) {
+                    this.sides[0].hide();
+                    this.sides[1].hide();
+                    this.sides[2].hide();
+                    this.sides[3].hide();
+                    this.curEl = null;
+                }
+            }, this);
+            this.initialized = true;
+        }
+    },
+    
+    frame: function(el){
+        this.init();
+        this.unframeTask.cancel();
+        this.frameTask.delay(2, false, false, [el]);
+    },
+    
+    unframe: function(){
+        this.init();
+        this.unframeTask.delay(2);
+    },
+    
+    setSize: function(size){
+        this.size = size;
+    },
+    
+    setColor: function(color){
+        this.color = color;
+    }
+});
+
+Ext.a11y.FocusFrame = new Ext.a11y.Frame(2, '15428B');
+Ext.a11y.RelayFrame = new Ext.a11y.Frame(1, '6B8CBF');
+
+Ext.a11y.Focusable = Ext.extend(Ext.util.Observable, {
+    constructor: function(el, relayTo, noFrame, frameEl){
+        Ext.a11y.Focusable.superclass.constructor.call(this);
+        
+        this.addEvents('focus', 'blur', 'left', 'right', 'up', 'down', 'esc', 'enter', 'space');
+        
+        if (el instanceof Ext.Component) {
+            this.el = el.el;
+            this.setComponent(el);
+        }
+        else {
+            this.el = Ext.get(el);
+            this.setComponent(null);
+        }
+        
+        this.setRelayTo(relayTo)
+        this.setNoFrame(noFrame);
+        this.setFrameEl(frameEl);
+        
+        this.init();
+        
+        Ext.a11y.FocusMgr.register(this);
+    },
+    
+    init: function(){
+        this.el.dom.tabIndex = '1';
+        this.el.addClass('x-a11y-focusable');
+        this.el.on({
+            focus: this.onFocus,
+            blur: this.onBlur,
+            keydown: this.onKeyDown,
+            scope: this
+        });
+    },
+    
+    setRelayTo: function(relayTo){
+        this.relayTo = relayTo ? Ext.a11y.FocusMgr.get(relayTo) : null;
+    },
+    
+    setNoFrame: function(noFrame){
+        this.noFrame = (noFrame === true) ? true : false;
+    },
+    
+    setFrameEl: function(frameEl){
+        this.frameEl = frameEl && Ext.get(frameEl) || this.el;
+    },
+    
+    setComponent: function(cmp){
+        this.component = cmp || null;
+    },
+    
+    onKeyDown: function(e, t){
+        var k = e.getKey(), SK = Ext.a11y.Focusable.SpecialKeys, ret, tf;
+        
+        tf = (t !== this.el.dom) ? Ext.a11y.FocusMgr.get(t, true) : this;
+        if (!tf) {
+            // this can happen when you are on a focused item within a panel body
+            // that is not a Ext.a11y.Focusable
+            tf = Ext.a11y.FocusMgr.get(Ext.fly(t).parent('.x-a11y-focusable'));
+        }
+        
+        if (SK[k] !== undefined) {
+            ret = this.fireEvent(SK[k], e, t, tf, this);
+        }
+        if (ret === false || this.fireEvent('keydown', e, t, tf, this) === false) {
+            e.stopEvent();
+        }
+    },
+    
+    focus: function(){
+        this.el.dom.focus();
+    },
+    
+    blur: function(){
+        this.el.dom.blur();
+    },
+    
+    onFocus: function(e, t){
+        this.el.addClass('x-a11y-focused');
+        if (this.relayTo) {
+            this.relayTo.el.addClass('x-a11y-focused-relay');
+            if (!this.relayTo.noFrame) {
+                Ext.a11y.FocusFrame.frame(this.relayTo.frameEl);
+            }
+            if (!this.noFrame) {
+                Ext.a11y.RelayFrame.frame(this.frameEl);
+            }
+        }
+        else {
+            if (!this.noFrame) {
+                Ext.a11y.FocusFrame.frame(this.frameEl);
+            }
+        }
+        
+        this.fireEvent('focus', e, t, this);
+    },
+    
+    onBlur: function(e, t){
+        if (this.relayTo) {
+            this.relayTo.el.removeClass('x-a11y-focused-relay');
+            Ext.a11y.RelayFrame.unframe();
+        }
+        this.el.removeClass('x-a11y-focused');
+        Ext.a11y.FocusFrame.unframe();
+        this.fireEvent('blur', e, t, this);
+    },
+    
+    destroy: function(){
+        this.el.un('keydown', this.onKeyDown);
+        this.el.un('focus', this.onFocus);
+        this.el.un('blur', this.onBlur);
+        this.el.removeClass('x-a11y-focusable');
+        this.el.removeClass('x-a11y-focused');
+        if (this.relayTo) {
+            this.relayTo.el.removeClass('x-a11y-focused-relay');
+        }
+    }
+});
+
+Ext.a11y.FocusItem = Ext.extend(Object, {
+    constructor: function(el, enableTabbing){
+        Ext.a11y.FocusItem.superclass.constructor.call(this);
+        
+        this.el = Ext.get(el);
+        this.fi = new Ext.a11y.Focusable(el);
+        this.fi.setComponent(this);
+        
+        this.fi.on('tab', this.onTab, this);
+        
+        this.enableTabbing = enableTabbing === true ? true : false;
+    },
+    
+    getEnterItem: function(){
+        if (this.enableTabbing) {
+            var items = this.getFocusItems();
+            if (items && items.length) {
+                return items[0];
+            }
+        }
+    },
+    
+    getFocusItems: function(){
+        if (this.enableTabbing) {
+            return this.el.query('a, button, input, select');
+        }
+        return null;
+    },
+    
+    onTab: function(e, t){
+        var items = this.getFocusItems(), i;
+        
+        if (items && items.length && (i = items.indexOf(t)) !== -1) {
+            if (e.shiftKey && i > 0) {
+                e.stopEvent();
+                items[i - 1].focus();
+                Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                return;
+            }
+            else 
+                if (!e.shiftKey && i < items.length - 1) {
+                    e.stopEvent();
+                    items[i + 1].focus();
+                    Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                    return;
+                }
+        }
+    },
+    
+    focus: function(){
+        if (this.enableTabbing) {
+            var items = this.getFocusItems();
+            if (items && items.length) {
+                items[0].focus();
+                Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                return;
+            }
+        }
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    }
+});
+
+Ext.a11y.FocusMgr = function(){
+    var all = new Ext.util.MixedCollection();
+    
+    return {
+        register: function(f){
+            all.add(f.el && Ext.id(f.el), f);
+        },
+        
+        unregister: function(f){
+            all.remove(f);
+        },
+        
+        get: function(el, noCreate){
+            return all.get(Ext.id(el)) || (noCreate ? false : new Ext.a11y.Focusable(el));
+        },
+        
+        all: all
+    }
+}();
+
+Ext.a11y.Focusable.SpecialKeys = {};
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.LEFT] = 'left';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.RIGHT] = 'right';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.DOWN] = 'down';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.UP] = 'up';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ESC] = 'esc';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ENTER] = 'enter';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.SPACE] = 'space';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.TAB] = 'tab';
+
+// we use the new observeClass method to fire our new initFocus method on components
+Ext.util.Observable.observeClass(Ext.Component);
+Ext.Component.on('render', function(cmp){
+    cmp.initFocus();
+    cmp.initARIA();
+});
+Ext.override(Ext.Component, {
+    initFocus: Ext.emptyFn,
+    initARIA: Ext.emptyFn
+});
+
+Ext.override(Ext.Container, {
+    isFocusable: true,
+    noFocus: false,
+    
+    // private
+    initFocus: function(){
+        if (!this.fi && !this.noFocus) {
+            this.fi = new Ext.a11y.Focusable(this);
+        }
+        this.mon(this.fi, {
+            focus: this.onFocus,
+            blur: this.onBlur,
+            tab: this.onTab,
+            enter: this.onEnter,
+            esc: this.onEsc,
+            scope: this
+        });
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    },
+    
+    focus: function(){
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    },
+    
+    enter: function(){
+        var eitem = this.getEnterItem();
+        if (eitem) {
+            eitem.focus();
+        }
+    },
+    
+    onFocus: Ext.emptyFn,
+    onBlur: Ext.emptyFn,
+    
+    onTab: function(e, t, tf){
+        var rf = tf.relayTo || tf;
+        if (rf.component && rf.component !== this) {
+            e.stopEvent();
+            var item = e.shiftKey ? this.getPreviousFocus(rf.component) : this.getNextFocus(rf.component);
+            item.focus();
+        }
+    },
+    
+    onEnter: function(e, t, tf){
+        // check to see if enter is pressed while "on" the panel
+        if (tf.component && tf.component === this) {
+            e.stopEvent();
+            this.enter();
+        }
+        e.stopPropagation();
+    },
+    
+    onEsc: function(e, t){
+        e.preventDefault();
+        
+        // check to see if esc is pressed while "inside" the panel
+        // or while "on" the panel
+        if (t === this.el.dom) {
+            // "on" the panel, check if this panel has an owner panel and focus that
+            // we dont stop the event in this case so that this same check will be
+            // done for this ownerCt
+            if (this.ownerCt) {
+                this.ownerCt.focus();
+            }
+        }
+        else {
+            // we were inside the panel when esc was pressed,
+            // so go back "on" the panel
+            if (this.ownerCt && this.ownerCt.isFocusable) {
+                var si = this.ownerCt.getFocusItems();
+                
+                if (si && si.getCount() > 1) {
+                    e.stopEvent();
+                }
+            }
+            this.focus();
+        }
+    },
+    
+    getFocusItems: function(){
+        return this.items &&
+        this.items.filterBy(function(o){
+            return o.isFocusable;
+        }) ||
+        null;
+    },
+    
+    getEnterItem: function(){
+        var ci = this.getFocusItems(), length = ci ? ci.getCount() : 0;
+        
+        if (length === 1) {
+            return ci.first().getEnterItem && ci.first().getEnterItem() || ci.first();
+        }
+        else 
+            if (length > 1) {
+                return ci.first();
+            }
+    },
+    
+    getNextFocus: function(current){
+        var items = this.getFocusItems(), next = current, i = items.indexOf(current), length = items.getCount();
+        
+        if (i === length - 1) {
+            next = items.first();
+        }
+        else {
+            next = items.get(i + 1);
+        }
+        return next;
+    },
+    
+    getPreviousFocus: function(current){
+        var items = this.getFocusItems(), prev = current, i = items.indexOf(current), length = items.getCount();
+        
+        if (i === 0) {
+            prev = items.last();
+        }
+        else {
+            prev = items.get(i - 1);
+        }
+        return prev;
+    },
+    
+    getFocusable : function() {
+        return this.fi;
+    }
+});
+
+Ext.override(Ext.Panel, {
+    /**
+     * @cfg {Boolean} enableTabbing <tt>true</tt> to enable tabbing. Default is <tt>false</tt>.
+     */        
+    getFocusItems: function(){
+        // items gets all the items inside the body
+        var items = Ext.Panel.superclass.getFocusItems.call(this), bodyFocus = null;
+        
+        if (!items) {
+            items = new Ext.util.MixedCollection();
+            this.bodyFocus = this.bodyFocus || new Ext.a11y.FocusItem(this.body, this.enableTabbing);
+            items.add('body', this.bodyFocus);
+        }
+        // but panels can also have tbar, bbar, fbar
+        if (this.tbar && this.topToolbar) {
+            items.insert(0, this.topToolbar);
+        }
+        if (this.bbar && this.bottomToolbar) {
+            items.add(this.bottomToolbar);
+        }
+        if (this.fbar) {
+            items.add(this.fbar);
+        }
+        
+        return items;
+    }
+});
+
+Ext.override(Ext.TabPanel, {
+    // private
+    initFocus: function(){
+        Ext.TabPanel.superclass.initFocus.call(this);
+        this.mon(this.fi, {
+            left: this.onLeft,
+            right: this.onRight,
+            scope: this
+        });
+    },
+    
+    onLeft: function(e){
+        if (!this.activeTab) {
+            return;
+        }
+        e.stopEvent();
+        var prev = this.items.itemAt(this.items.indexOf(this.activeTab) - 1);
+        if (prev) {
+            this.setActiveTab(prev);
+        }
+        return false;
+    },
+    
+    onRight: function(e){
+        if (!this.activeTab) {
+            return;
+        }
+        e.stopEvent();
+        var next = this.items.itemAt(this.items.indexOf(this.activeTab) + 1);
+        if (next) {
+            this.setActiveTab(next);
+        }
+        return false;
+    }
+});
+
+Ext.override(Ext.tree.TreeNodeUI, {
+    // private
+    focus: function(){
+        this.node.getOwnerTree().bodyFocus.focus();
+    }
+});
+
+Ext.override(Ext.tree.TreePanel, {
+    // private
+    afterRender : function(){
+        Ext.tree.TreePanel.superclass.afterRender.call(this);
+        this.root.render();
+        if(!this.rootVisible){
+            this.root.renderChildren();
+        }
+        this.bodyFocus = new Ext.a11y.FocusItem(this.body.down('.x-tree-root-ct'));
+        this.bodyFocus.fi.setFrameEl(this.body);
+    } 
+});
+
+Ext.override(Ext.grid.GridPanel, {
+    initFocus: function(){
+        Ext.grid.GridPanel.superclass.initFocus.call(this);
+        this.bodyFocus = new Ext.a11y.FocusItem(this.view.focusEl);
+        this.bodyFocus.fi.setFrameEl(this.body);
+    }
+});
+
+Ext.override(Ext.Button, {
+    isFocusable: true,
+    noFocus: false,
+    
+    initFocus: function(){
+        Ext.Button.superclass.initFocus.call(this);
+        this.fi = this.fi || new Ext.a11y.Focusable(this.btnEl, null, null, this.el);
+        this.fi.setComponent(this);
+        
+        this.mon(this.fi, {
+            focus: this.onFocus,
+            blur: this.onBlur,
+            scope: this
+        });
+        
+        if (this.menu) {
+            this.mon(this.fi, 'down', this.showMenu, this);
+            this.on('menuhide', this.focus, this);
+        }
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    },
+    
+    focus: function(){
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    },
+    
+    onFocus: function(){
+        if (!this.disabled) {
+            this.el.addClass("x-btn-focus");
+        }
+    },
+    
+    onBlur: function(){
+        this.el.removeClass("x-btn-focus");
+    }
+});
+
+Ext.override(Ext.Toolbar, {
+    initFocus: function(){
+        Ext.Toolbar.superclass.initFocus.call(this);
+        this.mon(this.fi, {
+            left: this.onLeft,
+            right: this.onRight,
+            scope: this
+        });
+        
+        this.on('focus', this.onButtonFocus, this, {
+            stopEvent: true
+        });
+    },
+    
+    addItem: function(item){
+        Ext.Toolbar.superclass.add.apply(this, arguments);
+        if (item.rendered && item.fi !== undefined) {
+            item.fi.setRelayTo(this.el);
+            this.relayEvents(item.fi, ['focus']);
+        }
+        else {
+            item.on('render', function(){
+                if (item.fi !== undefined) {
+                    item.fi.setRelayTo(this.el);
+                    this.relayEvents(item.fi, ['focus']);
+                }
+            }, this, {
+                single: true
+            });
+        }
+        return item;
+    },
+    
+    onFocus: function(){
+        var items = this.getFocusItems();
+        if (items && items.getCount() > 0) {
+            if (this.lastFocus && items.indexOf(this.lastFocus) !== -1) {
+                this.lastFocus.focus();
+            }
+            else {
+                items.first().focus();
+            }
+        }
+    },
+    
+    onButtonFocus: function(e, t, tf){
+        this.lastFocus = tf.component || null;
+    },
+    
+    onLeft: function(e, t, tf){
+        e.stopEvent();
+        this.getPreviousFocus(tf.component).focus();
+    },
+    
+    onRight: function(e, t, tf){
+        e.stopEvent();
+        this.getNextFocus(tf.component).focus();
+    },
+    
+    getEnterItem: Ext.emptyFn,
+    onTab: Ext.emptyFn,
+    onEsc: Ext.emptyFn
+});
+
+Ext.override(Ext.menu.BaseItem, {
+    initFocus: function(){
+        this.fi = new Ext.a11y.Focusable(this, this.parentMenu && this.parentMenu.el || null, true);
+    }
+});
+
+Ext.override(Ext.menu.Menu, {
+    initFocus: function(){
+        this.fi = new Ext.a11y.Focusable(this);
+        this.focusEl = this.fi;
+    }
+});
+
+Ext.a11y.WindowMgr = new Ext.WindowGroup();
+
+Ext.apply(Ext.WindowMgr, {
+    bringToFront: function(win){
+        Ext.a11y.WindowMgr.bringToFront.call(this, win);
+        if (win.modal) {
+            win.enter();
+        }
+        else {
+            win.focus();
+        }
+    }
+});
+
+Ext.override(Ext.Window, {
+    initFocus: function(){
+        Ext.Window.superclass.initFocus.call(this);
+        this.on('beforehide', function(){
+            Ext.a11y.RelayFrame.unframe();
+            Ext.a11y.FocusFrame.unframe();
+        });
+    }
+});
+
+Ext.override(Ext.form.Field, {
+    isFocusable: true,
+    noFocus: false,
+    
+    initFocus: function(){
+        this.fi = this.fi || new Ext.a11y.Focusable(this, null, true);
+        
+        Ext.form.Field.superclass.initFocus.call(this);
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    }
+});
+
+Ext.override(Ext.FormPanel, {
+    initFocus: function(){
+        Ext.FormPanel.superclass.initFocus.call(this);
+        this.on('focus', this.onFieldFocus, this, {
+            stopEvent: true
+        });
+    },
+    
+    // private
+    createForm: function(){
+        delete this.initialConfig.listeners;
+        var form = new Ext.form.BasicForm(null, this.initialConfig);
+        form.afterMethod('add', this.formItemAdd, this);
+        return form;
+    },
+    
+    formItemAdd: function(item){
+        item.on('render', function(field){
+            field.fi.setRelayTo(this.el);
+            this.relayEvents(field.fi, ['focus']);
+        }, this, {
+            single: true
+        });
+    },
+    
+    onFocus: function(){
+        var items = this.getFocusItems();
+        if (items && items.getCount() > 0) {
+            if (this.lastFocus && items.indexOf(this.lastFocus) !== -1) {
+                this.lastFocus.focus();
+            }
+            else {
+                items.first().focus();
+            }
+        }
+    },
+    
+    onFieldFocus: function(e, t, tf){
+        this.lastFocus = tf.component || null;
+    },
+    
+    onTab: function(e, t, tf){
+        if (tf.relayTo.component === this) {
+            var item = e.shiftKey ? this.getPreviousFocus(tf.component) : this.getNextFocus(tf.component);
+            
+            if (item) {
+                ev.stopEvent();
+                item.focus();
+                return;
+            }
+        }
+        Ext.FormPanel.superclass.onTab.apply(this, arguments);
+    },
+    
+    getNextFocus: function(current){
+        var items = this.getFocusItems(), i = items.indexOf(current), length = items.getCount();
+        
+        return (i < length - 1) ? items.get(i + 1) : false;
+    },
+    
+    getPreviousFocus: function(current){
+        var items = this.getFocusItems(), i = items.indexOf(current), length = items.getCount();
+        
+        return (i > 0) ? items.get(i - 1) : false;
+    }
+});
+
+Ext.override(Ext.Viewport, {
+    initFocus: function(){
+        Ext.Viewport.superclass.initFocus.apply(this);
+        this.mon(Ext.get(document), 'focus', this.focus, this);
+        this.mon(Ext.get(document), 'blur', this.blur, this);
+        this.fi.setNoFrame(true);
+    },
+    
+    onTab: function(e, t, tf, f){
+        e.stopEvent();
+        
+        if (tf === f) {
+            items = this.getFocusItems();
+            if (items && items.getCount() > 0) {
+                items.first().focus();
+            }
+        }
+        else {
+            var rf = tf.relayTo || tf;
+            var item = e.shiftKey ? this.getPreviousFocus(rf.component) : this.getNextFocus(rf.component);
+            item.focus();
+        }
+    }
+});
+    
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GMapPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GMapPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GMapPanel.js	(revision 625)
@@ -0,0 +1,215 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.GMapPanel
+ * @extends Ext.Panel
+ * @author Shea Frederick
+ */
+Ext.ux.GMapPanel = Ext.extend(Ext.Panel, {
+    initComponent : function(){
+        
+        var defConfig = {
+            plain: true,
+            zoomLevel: 3,
+            yaw: 180,
+            pitch: 0,
+            zoom: 0,
+            gmapType: 'map',
+            border: false
+        };
+        
+        Ext.applyIf(this,defConfig);
+        
+        Ext.ux.GMapPanel.superclass.initComponent.call(this);        
+
+    },
+    afterRender : function(){
+        
+        var wh = this.ownerCt.getSize();
+        Ext.applyIf(this, wh);
+        
+        Ext.ux.GMapPanel.superclass.afterRender.call(this);    
+        
+        if (this.gmapType === 'map'){
+            this.gmap = new GMap2(this.body.dom);
+        }
+        
+        if (this.gmapType === 'panorama'){
+            this.gmap = new GStreetviewPanorama(this.body.dom);
+        }
+        
+        if (typeof this.addControl == 'object' && this.gmapType === 'map') {
+            this.gmap.addControl(this.addControl);
+        }
+        
+        if (typeof this.setCenter === 'object') {
+            if (typeof this.setCenter.geoCodeAddr === 'string'){
+                this.geoCodeLookup(this.setCenter.geoCodeAddr);
+            }else{
+                if (this.gmapType === 'map'){
+                    var point = new GLatLng(this.setCenter.lat,this.setCenter.lng);
+                    this.gmap.setCenter(point, this.zoomLevel);    
+                }
+                if (typeof this.setCenter.marker === 'object' && typeof point === 'object'){
+                    this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear);
+                }
+            }
+            if (this.gmapType === 'panorama'){
+                this.gmap.setLocationAndPOV(new GLatLng(this.setCenter.lat,this.setCenter.lng), {yaw: this.yaw, pitch: this.pitch, zoom: this.zoom});
+            }
+        }
+
+        GEvent.bind(this.gmap, 'load', this, function(){
+            this.onMapReady();
+        });
+
+    },
+    onMapReady : function(){
+        this.addMarkers(this.markers);
+        this.addMapControls();
+        this.addOptions();  
+    },
+    onResize : function(w, h){
+
+        if (typeof this.getMap() == 'object') {
+            this.gmap.checkResize();
+        }
+        
+        Ext.ux.GMapPanel.superclass.onResize.call(this, w, h);
+
+    },
+    setSize : function(width, height, animate){
+        
+        if (typeof this.getMap() == 'object') {
+            this.gmap.checkResize();
+        }
+        
+        Ext.ux.GMapPanel.superclass.setSize.call(this, width, height, animate);
+        
+    },
+    getMap : function(){
+        
+        return this.gmap;
+        
+    },
+    getCenter : function(){
+        
+        return this.getMap().getCenter();
+        
+    },
+    getCenterLatLng : function(){
+        
+        var ll = this.getCenter();
+        return {lat: ll.lat(), lng: ll.lng()};
+        
+    },
+    addMarkers : function(markers) {
+        
+        if (Ext.isArray(markers)){
+            for (var i = 0; i < markers.length; i++) {
+                var mkr_point = new GLatLng(markers[i].lat,markers[i].lng);
+                this.addMarker(mkr_point,markers[i].marker,false,markers[i].setCenter, markers[i].listeners);
+            }
+        }
+        
+    },
+    addMarker : function(point, marker, clear, center, listeners){
+        
+        Ext.applyIf(marker,G_DEFAULT_ICON);
+
+        if (clear === true){
+            this.getMap().clearOverlays();
+        }
+        if (center === true) {
+            this.getMap().setCenter(point, this.zoomLevel);
+        }
+
+        var mark = new GMarker(point,marker);
+        if (typeof listeners === 'object'){
+            for (evt in listeners) {
+                GEvent.bind(mark, evt, this, listeners[evt]);
+            }
+        }
+        this.getMap().addOverlay(mark);
+
+    },
+    addMapControls : function(){
+        
+        if (this.gmapType === 'map') {
+            if (Ext.isArray(this.mapControls)) {
+                for(i=0;i<this.mapControls.length;i++){
+                    this.addMapControl(this.mapControls[i]);
+                }
+            }else if(typeof this.mapControls === 'string'){
+                this.addMapControl(this.mapControls);
+            }else if(typeof this.mapControls === 'object'){
+                this.getMap().addControl(this.mapControls);
+            }
+        }
+        
+    },
+    addMapControl : function(mc){
+        
+        var mcf = window[mc];
+        if (typeof mcf === 'function') {
+            this.getMap().addControl(new mcf());
+        }    
+        
+    },
+    addOptions : function(){
+        
+        if (Ext.isArray(this.mapConfOpts)) {
+            var mc;
+            for(i=0;i<this.mapConfOpts.length;i++){
+                this.addOption(this.mapConfOpts[i]);
+            }
+        }else if(typeof this.mapConfOpts === 'string'){
+            this.addOption(this.mapConfOpts);
+        }        
+        
+    },
+    addOption : function(mc){
+        
+        var mcf = this.getMap()[mc];
+        if (typeof mcf === 'function') {
+            this.getMap()[mc]();
+        }    
+        
+    },
+    geoCodeLookup : function(addr) {
+        
+        this.geocoder = new GClientGeocoder();
+        this.geocoder.getLocations(addr, this.addAddressToMap.createDelegate(this));
+        
+    },
+    addAddressToMap : function(response) {
+        
+        if (!response || response.Status.code != 200) {
+            Ext.MessageBox.alert('Error', 'Code '+response.Status.code+' Error Returned');
+        }else{
+            place = response.Placemark[0];
+            addressinfo = place.AddressDetails;
+            accuracy = addressinfo.Accuracy;
+            if (accuracy === 0) {
+                Ext.MessageBox.alert('Unable to Locate Address', 'Unable to Locate the Address you provided');
+            }else{
+                if (accuracy < 7) {
+                    Ext.MessageBox.alert('Address Accuracy', 'The address provided has a low accuracy.<br><br>Level '+accuracy+' Accuracy (8 = Exact Match, 1 = Vague Match)');
+                }else{
+                    point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
+                    if (typeof this.setCenter.marker === 'object' && typeof point === 'object'){
+                        this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear,true, this.setCenter.listeners);
+                    }
+                }
+            }
+        }
+        
+    }
+ 
+});
+
+Ext.reg('gmappanel', Ext.ux.GMapPanel); 
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupSummary.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupSummary.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupSummary.js	(revision 625)
@@ -0,0 +1,369 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.GroupSummary
+ * @extends Ext.util.Observable
+ * A GridPanel plugin that enables dynamic column calculations and a dynamically
+ * updated grouped summary row.
+ */
+Ext.ux.grid.GroupSummary = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Function} summaryRenderer Renderer example:<pre><code>
+summaryRenderer: function(v, params, data){
+    return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
+},
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} summaryType (Optional) The type of
+     * calculation to be used for the column.  For options available see
+     * {@link #Calculations}.
+     */
+
+    constructor : function(config){
+        Ext.apply(this, config);
+        Ext.ux.grid.GroupSummary.superclass.constructor.call(this);
+    },
+    init : function(grid){
+        this.grid = grid;
+        this.cm = grid.getColumnModel();
+        this.view = grid.getView();
+
+        var v = this.view;
+        v.doGroupEnd = this.doGroupEnd.createDelegate(this);
+
+        v.afterMethod('onColumnWidthUpdated', this.doWidth, this);
+        v.afterMethod('onAllColumnWidthsUpdated', this.doAllWidths, this);
+        v.afterMethod('onColumnHiddenUpdated', this.doHidden, this);
+        v.afterMethod('onUpdate', this.doUpdate, this);
+        v.afterMethod('onRemove', this.doRemove, this);
+
+        if(!this.rowTpl){
+            this.rowTpl = new Ext.Template(
+                '<div class="x-grid3-summary-row" style="{tstyle}">',
+                '<table class="x-grid3-summary-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<tbody><tr>{cells}</tr></tbody>',
+                '</table></div>'
+            );
+            this.rowTpl.disableFormats = true;
+        }
+        this.rowTpl.compile();
+
+        if(!this.cellTpl){
+            this.cellTpl = new Ext.Template(
+                '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">',
+                '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',
+                "</td>"
+            );
+            this.cellTpl.disableFormats = true;
+        }
+        this.cellTpl.compile();
+    },
+
+    /**
+     * Toggle the display of the summary row on/off
+     * @param {Boolean} visible <tt>true</tt> to show the summary, <tt>false</tt> to hide the summary.
+     */
+    toggleSummaries : function(visible){
+        var el = this.grid.getGridEl();
+        if(el){
+            if(visible === undefined){
+                visible = el.hasClass('x-grid-hide-summary');
+            }
+            el[visible ? 'removeClass' : 'addClass']('x-grid-hide-summary');
+        }
+    },
+
+    renderSummary : function(o, cs){
+        cs = cs || this.view.getColumnData();
+        var cfg = this.cm.config;
+
+        var buf = [], c, p = {}, cf, last = cs.length-1;
+        for(var i = 0, len = cs.length; i < len; i++){
+            c = cs[i];
+            cf = cfg[i];
+            p.id = c.id;
+            p.style = c.style;
+            p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+            if(cf.summaryType || cf.summaryRenderer){
+                p.value = (cf.summaryRenderer || c.renderer)(o.data[c.name], p, o);
+            }else{
+                p.value = '';
+            }
+            if(p.value == undefined || p.value === "") p.value = "&#160;";
+            buf[buf.length] = this.cellTpl.apply(p);
+        }
+
+        return this.rowTpl.apply({
+            tstyle: 'width:'+this.view.getTotalWidth()+';',
+            cells: buf.join('')
+        });
+    },
+
+    /**
+     * @private
+     * @param {Object} rs
+     * @param {Object} cs
+     */
+    calculate : function(rs, cs){
+        var data = {}, r, c, cfg = this.cm.config, cf;
+        for(var j = 0, jlen = rs.length; j < jlen; j++){
+            r = rs[j];
+            for(var i = 0, len = cs.length; i < len; i++){
+                c = cs[i];
+                cf = cfg[i];
+                if(cf.summaryType){
+                    data[c.name] = Ext.ux.grid.GroupSummary.Calculations[cf.summaryType](data[c.name] || 0, r, c.name, data);
+                }
+            }
+        }
+        return data;
+    },
+
+    doGroupEnd : function(buf, g, cs, ds, colCount){
+        var data = this.calculate(g.rs, cs);
+        buf.push('</div>', this.renderSummary({data: data}, cs), '</div>');
+    },
+
+    doWidth : function(col, w, tw){
+        var gs = this.view.getGroups(), s;
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            s.firstChild.rows[0].childNodes[col].style.width = w;
+        }
+    },
+
+    doAllWidths : function(ws, tw){
+        var gs = this.view.getGroups(), s, cells, wlen = ws.length;
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            cells = s.firstChild.rows[0].childNodes;
+            for(var j = 0; j < wlen; j++){
+                cells[j].style.width = ws[j];
+            }
+        }
+    },
+
+    doHidden : function(col, hidden, tw){
+        var gs = this.view.getGroups(), s, display = hidden ? 'none' : '';
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            s.firstChild.rows[0].childNodes[col].style.display = display;
+        }
+    },
+
+    // Note: requires that all (or the first) record in the
+    // group share the same group value. Returns false if the group
+    // could not be found.
+    refreshSummary : function(groupValue){
+        return this.refreshSummaryById(this.view.getGroupId(groupValue));
+    },
+
+    getSummaryNode : function(gid){
+        var g = Ext.fly(gid, '_gsummary');
+        if(g){
+            return g.down('.x-grid3-summary-row', true);
+        }
+        return null;
+    },
+
+    refreshSummaryById : function(gid){
+        var g = document.getElementById(gid);
+        if(!g){
+            return false;
+        }
+        var rs = [];
+        this.grid.store.each(function(r){
+            if(r._groupId == gid){
+                rs[rs.length] = r;
+            }
+        });
+        var cs = this.view.getColumnData();
+        var data = this.calculate(rs, cs);
+        var markup = this.renderSummary({data: data}, cs);
+
+        var existing = this.getSummaryNode(gid);
+        if(existing){
+            g.removeChild(existing);
+        }
+        Ext.DomHelper.append(g, markup);
+        return true;
+    },
+
+    doUpdate : function(ds, record){
+        this.refreshSummaryById(record._groupId);
+    },
+
+    doRemove : function(ds, record, index, isUpdate){
+        if(!isUpdate){
+            this.refreshSummaryById(record._groupId);
+        }
+    },
+
+    /**
+     * Show a message in the summary row.
+     * <pre><code>
+grid.on('afteredit', function(){
+    var groupValue = 'Ext Forms: Field Anchoring';
+    summary.showSummaryMsg(groupValue, 'Updating Summary...');
+});
+     * </code></pre>
+     * @param {String} groupValue
+     * @param {String} msg Text to use as innerHTML for the summary row.
+     */
+    showSummaryMsg : function(groupValue, msg){
+        var gid = this.view.getGroupId(groupValue);
+        var node = this.getSummaryNode(gid);
+        if(node){
+            node.innerHTML = '<div class="x-grid3-summary-msg">' + msg + '</div>';
+        }
+    }
+});
+
+//backwards compat
+Ext.grid.GroupSummary = Ext.ux.grid.GroupSummary;
+
+
+/**
+ * Calculation types for summary row:</p><div class="mdetail-params"><ul>
+ * <li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
+ * </ul></div>
+ * <p>Custom calculations may be implemented.  An example of
+ * custom <code>summaryType=totalCost</code>:</p><pre><code>
+// define a custom summary function
+Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
+    return v + (record.data.estimate * record.data.rate);
+};
+ * </code></pre>
+ * @property Calculations
+ */
+
+Ext.ux.grid.GroupSummary.Calculations = {
+    'sum' : function(v, record, field){
+        return v + (record.data[field]||0);
+    },
+
+    'count' : function(v, record, field, data){
+        return data[field+'count'] ? ++data[field+'count'] : (data[field+'count'] = 1);
+    },
+
+    'max' : function(v, record, field, data){
+        var v = record.data[field];
+        var max = data[field+'max'] === undefined ? (data[field+'max'] = v) : data[field+'max'];
+        return v > max ? (data[field+'max'] = v) : max;
+    },
+
+    'min' : function(v, record, field, data){
+        var v = record.data[field];
+        var min = data[field+'min'] === undefined ? (data[field+'min'] = v) : data[field+'min'];
+        return v < min ? (data[field+'min'] = v) : min;
+    },
+
+    'average' : function(v, record, field, data){
+        var c = data[field+'count'] ? ++data[field+'count'] : (data[field+'count'] = 1);
+        var t = (data[field+'total'] = ((data[field+'total']||0) + (record.data[field]||0)));
+        return t === 0 ? 0 : t / c;
+    }
+};
+Ext.grid.GroupSummary.Calculations = Ext.ux.grid.GroupSummary.Calculations;
+
+/**
+ * @class Ext.ux.grid.HybridSummary
+ * @extends Ext.ux.grid.GroupSummary
+ * Adds capability to specify the summary data for the group via json as illustrated here:
+ * <pre><code>
+{
+    data: [
+        {
+            projectId: 100,     project: 'House',
+            taskId:    112, description: 'Paint',
+            estimate:    6,        rate:     150,
+            due:'06/24/2007'
+        },
+        ...
+    ],
+
+    summaryData: {
+        'House': {
+            description: 14, estimate: 9,
+                   rate: 99, due: new Date(2009, 6, 29),
+                   cost: 999
+        }
+    }
+}
+ * </code></pre>
+ *
+ */
+Ext.ux.grid.HybridSummary = Ext.extend(Ext.ux.grid.GroupSummary, {
+    /**
+     * @private
+     * @param {Object} rs
+     * @param {Object} cs
+     */
+    calculate : function(rs, cs){
+        var gcol = this.view.getGroupField();
+        var gvalue = rs[0].data[gcol];
+        var gdata = this.getSummaryData(gvalue);
+        return gdata || Ext.ux.grid.HybridSummary.superclass.calculate.call(this, rs, cs);
+    },
+
+    /**
+     * <pre><code>
+grid.on('afteredit', function(){
+    var groupValue = 'Ext Forms: Field Anchoring';
+    summary.showSummaryMsg(groupValue, 'Updating Summary...');
+    setTimeout(function(){ // simulate server call
+        // HybridSummary class implements updateSummaryData
+        summary.updateSummaryData(groupValue,
+            // create data object based on configured dataIndex
+            {description: 22, estimate: 888, rate: 888, due: new Date(), cost: 8});
+    }, 2000);
+});
+     * </code></pre>
+     * @param {String} groupValue
+     * @param {Object} data data object
+     * @param {Boolean} skipRefresh (Optional) Defaults to false
+     */
+    updateSummaryData : function(groupValue, data, skipRefresh){
+        var json = this.grid.store.reader.jsonData;
+        if(!json.summaryData){
+            json.summaryData = {};
+        }
+        json.summaryData[groupValue] = data;
+        if(!skipRefresh){
+            this.refreshSummary(groupValue);
+        }
+    },
+
+    /**
+     * Returns the summaryData for the specified groupValue or null.
+     * @param {String} groupValue
+     * @return {Object} summaryData
+     */
+    getSummaryData : function(groupValue){
+        var json = this.grid.store.reader.jsonData;
+        if(json && json.summaryData){
+            return json.summaryData[groupValue];
+        }
+        return null;
+    }
+});
+
+//backwards compat
+Ext.grid.HybridSummary = Ext.ux.grid.HybridSummary;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTab.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTab.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTab.js	(revision 625)
@@ -0,0 +1,266 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.GroupTab = Ext.extend(Ext.Container, {
+    mainItem: 0,
+    
+    expanded: true,
+    
+    deferredRender: true,
+    
+    activeTab: null,
+    
+    idDelimiter: '__',
+    
+    headerAsText: false,
+    
+    frame: false,
+    
+    hideBorders: true,
+    
+    initComponent: function(config){
+        Ext.apply(this, config);
+        this.frame = false;
+        
+        Ext.ux.GroupTab.superclass.initComponent.call(this);
+        
+        this.addEvents('activate', 'deactivate', 'changemainitem', 'beforetabchange', 'tabchange');
+        
+        this.setLayout(new Ext.layout.CardLayout({
+            deferredRender: this.deferredRender
+        }));
+        
+        if (!this.stack) {
+            this.stack = Ext.TabPanel.AccessStack();
+        }
+        
+        this.initItems();
+        
+        this.on('beforerender', function(){
+            this.groupEl = this.ownerCt.getGroupEl(this);
+        }, this);
+        
+        this.on('add', this.onAdd, this, {
+            target: this
+        });
+        this.on('remove', this.onRemove, this, {
+            target: this
+        });
+        
+        if (this.mainItem !== undefined) {
+            var item = (typeof this.mainItem == 'object') ? this.mainItem : this.items.get(this.mainItem);
+            delete this.mainItem;
+            this.setMainItem(item);
+        }
+    },
+    
+    /**
+     * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which
+     * can return false to cancel the tab change.
+     * @param {String/Panel} tab The id or tab Panel to activate
+     */
+    setActiveTab : function(item){
+        item = this.getComponent(item);
+        if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeTab = item;
+            return;
+        }
+        if(this.activeTab != item){
+            if(this.activeTab && this.activeTab != this.mainItem){
+                var oldEl = this.getTabEl(this.activeTab);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-grouptabs-strip-active');
+                }
+                this.activeTab.fireEvent('deactivate', this.activeTab);
+            }
+            var el = this.getTabEl(item);
+            Ext.fly(el).addClass('x-grouptabs-strip-active');
+            this.activeTab = item;
+            this.stack.add(item);
+
+            this.layout.setActiveItem(item);
+            if(this.layoutOnTabChange && item.doLayout){
+                item.doLayout();
+            }
+            if(this.scrolling){
+                this.scrollToTab(item, this.animScroll);
+            }
+
+            item.fireEvent('activate', item);
+            this.fireEvent('tabchange', this, item);
+        }
+    },
+    
+    getTabEl: function(item){
+        if (item == this.mainItem) {
+            return this.groupEl;
+        }
+        return Ext.TabPanel.prototype.getTabEl.call(this, item);
+    },
+    
+    onRender: function(ct, position){
+        Ext.ux.GroupTab.superclass.onRender.call(this, ct, position);
+        
+        this.strip = Ext.fly(this.groupEl).createChild({
+            tag: 'ul',
+            cls: 'x-grouptabs-sub'
+        });
+
+        this.tooltip = new Ext.ToolTip({
+           target: this.groupEl,
+           delegate: 'a.x-grouptabs-text',
+           trackMouse: true,
+           renderTo: document.body,
+           listeners: {
+               beforeshow: function(tip) {
+                   var item = (tip.triggerElement.parentNode === this.mainItem.tabEl)
+                       ? this.mainItem
+                       : this.findById(tip.triggerElement.parentNode.id.split(this.idDelimiter)[1]);
+
+                   if(!item.tabTip) {
+                       return false;
+                   }
+                   tip.body.dom.innerHTML = item.tabTip;
+               },
+               scope: this
+           }
+        });
+                
+        if (!this.itemTpl) {
+            var tt = new Ext.Template('<li class="{cls}" id="{id}">', '<a onclick="return false;" class="x-grouptabs-text {iconCls}">{text}</a>', '</li>');
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.ux.GroupTab.prototype.itemTpl = tt;
+        }
+        
+        this.items.each(this.initTab, this);
+    },
+    
+    afterRender: function(){
+        Ext.ux.GroupTab.superclass.afterRender.call(this);
+        
+        if (this.activeTab !== undefined) {
+            var item = (typeof this.activeTab == 'object') ? this.activeTab : this.items.get(this.activeTab);
+            delete this.activeTab;
+            this.setActiveTab(item);
+        }
+    },
+    
+    // private
+    initTab: function(item, index){
+        var before = this.strip.dom.childNodes[index];
+        var p = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
+        
+        if (item === this.mainItem) {
+            item.tabEl = this.groupEl;
+            p.cls += ' x-grouptabs-main-item';
+        }
+        
+        var el = before ? this.itemTpl.insertBefore(before, p) : this.itemTpl.append(this.strip, p);
+        
+        item.tabEl = item.tabEl || el;
+                
+        item.on('disable', this.onItemDisabled, this);
+        item.on('enable', this.onItemEnabled, this);
+        item.on('titlechange', this.onItemTitleChanged, this);
+        item.on('iconchange', this.onItemIconChanged, this);
+        item.on('beforeshow', this.onBeforeShowItem, this);
+    },
+    
+    setMainItem: function(item){
+        item = this.getComponent(item);
+        if (!item || this.fireEvent('changemainitem', this, item, this.mainItem) === false) {
+            return;
+        }
+        
+        this.mainItem = item;
+    },
+    
+    getMainItem: function(){
+        return this.mainItem || null;
+    },
+    
+    // private
+    onBeforeShowItem: function(item){
+        if (item != this.activeTab) {
+            this.setActiveTab(item);
+            return false;
+        }
+    },
+    
+    // private
+    onAdd: function(gt, item, index){
+        if (this.rendered) {
+            this.initTab.call(this, item, index);
+        }
+    },
+    
+    // private
+    onRemove: function(tp, item){
+        Ext.destroy(Ext.get(this.getTabEl(item)));
+        this.stack.remove(item);
+        item.un('disable', this.onItemDisabled, this);
+        item.un('enable', this.onItemEnabled, this);
+        item.un('titlechange', this.onItemTitleChanged, this);
+        item.un('iconchange', this.onItemIconChanged, this);
+        item.un('beforeshow', this.onBeforeShowItem, this);
+        if (item == this.activeTab) {
+            var next = this.stack.next();
+            if (next) {
+                this.setActiveTab(next);
+            }
+            else if (this.items.getCount() > 0) {
+                this.setActiveTab(0);
+            }
+            else {
+                this.activeTab = null;
+            }
+        }
+    },
+    
+    // private
+    onBeforeAdd: function(item){
+        var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
+        if (existing) {
+            this.setActiveTab(item);
+            return false;
+        }
+        Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
+        var es = item.elements;
+        item.elements = es ? es.replace(',header', '') : es;
+        item.border = (item.border === true);
+    },
+    
+    // private
+    onItemDisabled: Ext.TabPanel.prototype.onItemDisabled,
+    onItemEnabled: Ext.TabPanel.prototype.onItemEnabled,
+    
+    // private
+    onItemTitleChanged: function(item){
+        var el = this.getTabEl(item);
+        if (el) {
+            Ext.fly(el).child('a.x-grouptabs-text', true).innerHTML = item.title;
+        }
+    },
+    
+    //private
+    onItemIconChanged: function(item, iconCls, oldCls){
+        var el = this.getTabEl(item);
+        if (el) {
+            Ext.fly(el).child('a.x-grouptabs-text').replaceClass(oldCls, iconCls);
+        }
+    },
+    
+    beforeDestroy: function(){
+        Ext.TabPanel.prototype.beforeDestroy.call(this);
+        this.tooltip.destroy();
+    }
+});
+
+Ext.reg('grouptab', Ext.ux.GroupTab);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTabPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTabPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/GroupTabPanel.js	(revision 625)
@@ -0,0 +1,287 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux');
+
+Ext.ux.GroupTabPanel = Ext.extend(Ext.TabPanel, {
+    tabPosition: 'left',
+    
+    alternateColor: false,
+    
+    alternateCls: 'x-grouptabs-panel-alt',
+    
+    defaultType: 'grouptab',
+    
+    deferredRender: false,
+    
+    activeGroup : null,
+    
+    initComponent: function(){
+        Ext.ux.GroupTabPanel.superclass.initComponent.call(this);
+        
+        this.addEvents(
+            'beforegroupchange',
+            'groupchange'
+        );
+        this.elements = 'body,header';
+        this.stripTarget = 'header';
+        
+        this.tabPosition = this.tabPosition == 'right' ? 'right' : 'left';
+        
+        this.addClass('x-grouptabs-panel');
+        
+        if (this.tabStyle && this.tabStyle != '') {
+            this.addClass('x-grouptabs-panel-' + this.tabStyle);
+        }
+        
+        if (this.alternateColor) {
+            this.addClass(this.alternateCls);
+        }
+        
+        this.on('beforeadd', function(gtp, item, index){
+            this.initGroup(item, index);
+        });		     
+    },
+    
+    initEvents : function() {
+        this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
+    },
+        
+    onRender: function(ct, position){
+        Ext.TabPanel.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            var pos = this.tabPosition == 'top' ? 'header' : 'footer';
+            this[pos].addClass('x-tab-panel-'+pos+'-plain');
+        }
+
+        var st = this[this.stripTarget];
+
+        this.stripWrap = st.createChild({cls:'x-tab-strip-wrap ', cn:{
+            tag:'ul', cls:'x-grouptabs-strip x-grouptabs-tab-strip-'+this.tabPosition}});
+
+        var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null);
+        this.strip = new Ext.Element(this.stripWrap.dom.firstChild);
+
+		this.header.addClass('x-grouptabs-panel-header');
+		this.bwrap.addClass('x-grouptabs-bwrap');
+        this.body.addClass('x-tab-panel-body-'+this.tabPosition + ' x-grouptabs-panel-body');
+
+        if (!this.itemTpl) {
+            var tt = new Ext.Template(
+                '<li class="{cls}" id="{id}">', 
+                '<a class="x-grouptabs-expand" onclick="return false;"></a>', 
+                '<a class="x-grouptabs-text {iconCls}" href="#" onclick="return false;">',
+                '<span>{text}</span></a>', 
+                '</li>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.ux.GroupTabPanel.prototype.itemTpl = tt;
+        }
+
+        this.items.each(this.initGroup, this);
+    },
+    
+    afterRender: function(){
+        Ext.ux.GroupTabPanel.superclass.afterRender.call(this);
+        
+        this.tabJoint = Ext.fly(this.body.dom.parentNode).createChild({
+            cls: 'x-tab-joint'
+        });
+        
+        this.addClass('x-tab-panel-' + this.tabPosition);
+        this.header.setWidth(this.tabWidth);
+        
+        if (this.activeGroup !== undefined) {
+            var group = (typeof this.activeGroup == 'object') ? this.activeGroup : this.items.get(this.activeGroup);
+            delete this.activeGroup;
+            this.setActiveGroup(group);
+            group.setActiveTab(group.getMainItem());
+        }
+    },
+
+    getGroupEl : Ext.TabPanel.prototype.getTabEl,
+        
+    // private
+    findTargets: function(e){
+        var item = null;
+        var itemEl = e.getTarget('li', this.strip);
+        if (itemEl) {
+            item = this.findById(itemEl.id.split(this.idDelimiter)[1]);
+            if (item.disabled) {
+                return {
+                    expand: null,
+                    item: null,
+                    el: null
+                };
+            }
+        }
+        return {
+            expand: e.getTarget('.x-grouptabs-expand', this.strip),
+            isGroup: !e.getTarget('ul.x-grouptabs-sub', this.strip),
+            item: item,
+            el: itemEl
+        };
+    },
+    
+    // private
+    onStripMouseDown: function(e){
+        if (e.button != 0) {
+            return;
+        }
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if (t.expand) {
+            this.toggleGroup(t.el);
+        }
+        else if (t.item) {
+            if(t.isGroup) {
+                t.item.setActiveTab(t.item.getMainItem());
+            }
+            else {
+                t.item.ownerCt.setActiveTab(t.item);
+            }
+        }
+    },
+    
+    expandGroup: function(groupEl){
+        if(groupEl.isXType) {
+            groupEl = this.getGroupEl(groupEl);
+        }
+        Ext.fly(groupEl).addClass('x-grouptabs-expanded');
+    },
+    
+    toggleGroup: function(groupEl){
+        if(groupEl.isXType) {
+            groupEl = this.getGroupEl(groupEl);
+        }        
+        Ext.fly(groupEl).toggleClass('x-grouptabs-expanded');
+		this.syncTabJoint();
+    },    
+    
+    syncTabJoint: function(groupEl){
+        if (!this.tabJoint) {
+            return;
+        }
+        
+        groupEl = groupEl || this.getGroupEl(this.activeGroup);
+        if(groupEl) {
+            this.tabJoint.setHeight(Ext.fly(groupEl).getHeight() - 2); 
+			
+            var y = Ext.isGecko2 ? 0 : 1;
+            if (this.tabPosition == 'left'){
+                this.tabJoint.alignTo(groupEl, 'tl-tr', [-2,y]);
+            }
+            else {
+                this.tabJoint.alignTo(groupEl, 'tr-tl', [1,y]);
+            }           
+        }
+        else {
+            this.tabJoint.hide();
+        }
+    },
+    
+    getActiveTab : function() {
+        if(!this.activeGroup) return null;
+        return this.activeGroup.getTabEl(this.activeGroup.activeTab) || null;  
+    },
+    
+    onResize: function(){
+        Ext.ux.GroupTabPanel.superclass.onResize.apply(this, arguments);
+        this.syncTabJoint();
+    },
+    
+    createCorner: function(el, pos){
+        return Ext.fly(el).createChild({
+            cls: 'x-grouptabs-corner x-grouptabs-corner-' + pos
+        });
+    },
+    
+    initGroup: function(group, index){
+        var before = this.strip.dom.childNodes[index];        
+        var p = this.getTemplateArgs(group);
+        if (index === 0) {
+            p.cls += ' x-tab-first';
+        }
+        p.cls += ' x-grouptabs-main';
+        p.text = group.getMainItem().title;
+        
+        var el = before ? this.itemTpl.insertBefore(before, p) : this.itemTpl.append(this.strip, p);
+        
+        var tl = this.createCorner(el, 'top-' + this.tabPosition);
+        var bl = this.createCorner(el, 'bottom-' + this.tabPosition);
+
+        if (group.expanded) {
+            this.expandGroup(el);
+        }
+
+        if (Ext.isIE6 || (Ext.isIE && !Ext.isStrict)){
+            bl.setLeft('-10px');
+            bl.setBottom('-5px');
+            tl.setLeft('-10px');
+            tl.setTop('-5px');
+        }
+
+        this.mon(group, 'changemainitem', this.onGroupChangeMainItem, this);
+        this.mon(group, 'beforetabchange', this.onGroupBeforeTabChange, this);
+    },
+    
+    setActiveGroup : function(group) {
+        group = this.getComponent(group);
+        if(!group || this.fireEvent('beforegroupchange', this, group, this.activeGroup) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeGroup = group;
+            return;
+        }
+        if(this.activeGroup != group){
+            if(this.activeGroup){
+                var oldEl = this.getGroupEl(this.activeGroup);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-grouptabs-strip-active');
+                }
+                this.activeGroup.fireEvent('deactivate', this.activeTab);
+            }
+
+            var groupEl = this.getGroupEl(group);
+            Ext.fly(groupEl).addClass('x-grouptabs-strip-active');
+                        
+            this.activeGroup = group;
+            this.stack.add(group);
+
+            this.layout.setActiveItem(group);
+            this.syncTabJoint(groupEl);
+
+            group.fireEvent('activate', group);
+            this.fireEvent('groupchange', this, group);
+        }        
+    },
+    
+    onGroupBeforeTabChange: function(group, newTab, oldTab){
+        if(group !== this.activeGroup || newTab !== oldTab) {
+            this.strip.select('.x-grouptabs-sub > li.x-grouptabs-strip-active', true).removeClass('x-grouptabs-strip-active');
+        } 
+        
+        this.expandGroup(this.getGroupEl(group));
+        this.setActiveGroup(group);
+    },
+    
+    getFrameHeight: function(){
+        var h = this.el.getFrameWidth('tb');
+        h += (this.tbar ? this.tbar.getHeight() : 0) +
+        (this.bbar ? this.bbar.getHeight() : 0);
+        
+        return h;
+    },
+    
+    adjustBodyWidth: function(w){
+        return w - this.tabWidth;
+    }
+});
+
+Ext.reg('grouptabpanel', Ext.ux.GroupTabPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ItemSelector.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ItemSelector.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ItemSelector.js	(revision 625)
@@ -0,0 +1,335 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Note that this control will most likely remain as an example, and not as a core Ext form
+ * control.  However, the API will be changing in a future release and so should not yet be
+ * treated as a final, stable API at this time.
+ */
+
+/**
+ * @class Ext.ux.form.ItemSelector
+ * @extends Ext.form.Field
+ * A control that allows selection of between two Ext.ux.form.MultiSelect controls.
+ *
+ *  @history
+ *    2008-06-19 bpm Original code contributed by Toby Stuart (with contributions from Robert Williams)
+ *
+ * @constructor
+ * Create a new ItemSelector
+ * @param {Object} config Configuration options
+ * @xtype itemselector 
+ */
+Ext.ux.form.ItemSelector = Ext.extend(Ext.form.Field,  {
+    hideNavIcons:false,
+    imagePath:"",
+    iconUp:"up2.gif",
+    iconDown:"down2.gif",
+    iconLeft:"left2.gif",
+    iconRight:"right2.gif",
+    iconTop:"top2.gif",
+    iconBottom:"bottom2.gif",
+    drawUpIcon:true,
+    drawDownIcon:true,
+    drawLeftIcon:true,
+    drawRightIcon:true,
+    drawTopIcon:true,
+    drawBotIcon:true,
+    delimiter:',',
+    bodyStyle:null,
+    border:false,
+    defaultAutoCreate:{tag: "div"},
+    /**
+     * @cfg {Array} multiselects An array of {@link Ext.ux.form.MultiSelect} config objects, with at least all required parameters (e.g., store)
+     */
+    multiselects:null,
+
+    initComponent: function(){
+        Ext.ux.form.ItemSelector.superclass.initComponent.call(this);
+        this.addEvents({
+            'rowdblclick' : true,
+            'change' : true
+        });
+    },
+
+    onRender: function(ct, position){
+        Ext.ux.form.ItemSelector.superclass.onRender.call(this, ct, position);
+
+        // Internal default configuration for both multiselects
+        var msConfig = [{
+            legend: 'Available',
+            draggable: true,
+            droppable: true,
+            width: 100,
+            height: 100
+        },{
+            legend: 'Selected',
+            droppable: true,
+            draggable: true,
+            width: 100,
+            height: 100
+        }];
+
+        this.fromMultiselect = new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[0], msConfig[0]));
+        this.fromMultiselect.on('dblclick', this.onRowDblClick, this);
+
+        this.toMultiselect = new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[1], msConfig[1]));
+        this.toMultiselect.on('dblclick', this.onRowDblClick, this);
+
+        var p = new Ext.Panel({
+            bodyStyle:this.bodyStyle,
+            border:this.border,
+            layout:"table",
+            layoutConfig:{columns:3}
+        });
+
+        p.add(this.fromMultiselect);
+        var icons = new Ext.Panel({header:false});
+        p.add(icons);
+        p.add(this.toMultiselect);
+        p.render(this.el);
+        icons.el.down('.'+icons.bwrapCls).remove();
+
+        // ICON HELL!!!
+        if (this.imagePath!="" && this.imagePath.charAt(this.imagePath.length-1)!="/")
+            this.imagePath+="/";
+        this.iconUp = this.imagePath + (this.iconUp || 'up2.gif');
+        this.iconDown = this.imagePath + (this.iconDown || 'down2.gif');
+        this.iconLeft = this.imagePath + (this.iconLeft || 'left2.gif');
+        this.iconRight = this.imagePath + (this.iconRight || 'right2.gif');
+        this.iconTop = this.imagePath + (this.iconTop || 'top2.gif');
+        this.iconBottom = this.imagePath + (this.iconBottom || 'bottom2.gif');
+        var el=icons.getEl();
+        this.toTopIcon = el.createChild({tag:'img', src:this.iconTop, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.upIcon = el.createChild({tag:'img', src:this.iconUp, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.addIcon = el.createChild({tag:'img', src:this.iconRight, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.removeIcon = el.createChild({tag:'img', src:this.iconLeft, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.downIcon = el.createChild({tag:'img', src:this.iconDown, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.toBottomIcon = el.createChild({tag:'img', src:this.iconBottom, style:{cursor:'pointer', margin:'2px'}});
+        this.toTopIcon.on('click', this.toTop, this);
+        this.upIcon.on('click', this.up, this);
+        this.downIcon.on('click', this.down, this);
+        this.toBottomIcon.on('click', this.toBottom, this);
+        this.addIcon.on('click', this.fromTo, this);
+        this.removeIcon.on('click', this.toFrom, this);
+        if (!this.drawUpIcon || this.hideNavIcons) { this.upIcon.dom.style.display='none'; }
+        if (!this.drawDownIcon || this.hideNavIcons) { this.downIcon.dom.style.display='none'; }
+        if (!this.drawLeftIcon || this.hideNavIcons) { this.addIcon.dom.style.display='none'; }
+        if (!this.drawRightIcon || this.hideNavIcons) { this.removeIcon.dom.style.display='none'; }
+        if (!this.drawTopIcon || this.hideNavIcons) { this.toTopIcon.dom.style.display='none'; }
+        if (!this.drawBotIcon || this.hideNavIcons) { this.toBottomIcon.dom.style.display='none'; }
+
+        var tb = p.body.first();
+        this.el.setWidth(p.body.first().getWidth());
+        p.body.removeClass();
+
+        this.hiddenName = this.name;
+        var hiddenTag = {tag: "input", type: "hidden", value: "", name: this.name};
+        this.hiddenField = this.el.createChild(hiddenTag);
+    },
+    
+    doLayout: function(){
+        if(this.rendered){
+            this.fromMultiselect.fs.doLayout();
+            this.toMultiselect.fs.doLayout();
+        }
+    },
+
+    afterRender: function(){
+        Ext.ux.form.ItemSelector.superclass.afterRender.call(this);
+
+        this.toStore = this.toMultiselect.store;
+        this.toStore.on('add', this.valueChanged, this);
+        this.toStore.on('remove', this.valueChanged, this);
+        this.toStore.on('load', this.valueChanged, this);
+        this.valueChanged(this.toStore);
+    },
+
+    toTop : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            selectionsArray.sort();
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=records.length-1; i>-1; i--) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                this.toMultiselect.view.store.insert(0, record);
+                selectionsArray.push(((records.length - 1) - i));
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    toBottom : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            selectionsArray.sort();
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                this.toMultiselect.view.store.add(record);
+                selectionsArray.push((this.toMultiselect.view.store.getCount()) - (records.length - i));
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    up : function() {
+        var record = null;
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        selectionsArray.sort();
+        var newSelectionsArray = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                if ((selectionsArray[i] - 1) >= 0) {
+                    this.toMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.insert(selectionsArray[i] - 1, record);
+                    newSelectionsArray.push(selectionsArray[i] - 1);
+                }
+            }
+            this.toMultiselect.view.refresh();
+            this.toMultiselect.view.select(newSelectionsArray);
+        }
+    },
+
+    down : function() {
+        var record = null;
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        selectionsArray.sort();
+        selectionsArray.reverse();
+        var newSelectionsArray = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                if ((selectionsArray[i] + 1) < this.toMultiselect.view.store.getCount()) {
+                    this.toMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.insert(selectionsArray[i] + 1, record);
+                    newSelectionsArray.push(selectionsArray[i] + 1);
+                }
+            }
+            this.toMultiselect.view.refresh();
+            this.toMultiselect.view.select(newSelectionsArray);
+        }
+    },
+
+    fromTo : function() {
+        var selectionsArray = this.fromMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.fromMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            if(!this.allowDup)selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                if(this.allowDup){
+                    var x=new Ext.data.Record();
+                    record.id=x.id;
+                    delete x;
+                    this.toMultiselect.view.store.add(record);
+                }else{
+                    this.fromMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.add(record);
+                    selectionsArray.push((this.toMultiselect.view.store.getCount() - 1));
+                }
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.fromMultiselect.view.refresh();
+        var si = this.toMultiselect.store.sortInfo;
+        if(si){
+            this.toMultiselect.store.sort(si.field, si.direction);
+        }
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    toFrom : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                if(!this.allowDup){
+                    this.fromMultiselect.view.store.add(record);
+                    selectionsArray.push((this.fromMultiselect.view.store.getCount() - 1));
+                }
+            }
+        }
+        this.fromMultiselect.view.refresh();
+        this.toMultiselect.view.refresh();
+        var si = this.fromMultiselect.store.sortInfo;
+        if (si){
+            this.fromMultiselect.store.sort(si.field, si.direction);
+        }
+        this.fromMultiselect.view.select(selectionsArray);
+    },
+
+    valueChanged: function(store) {
+        var record = null;
+        var values = [];
+        for (var i=0; i<store.getCount(); i++) {
+            record = store.getAt(i);
+            values.push(record.get(this.toMultiselect.valueField));
+        }
+        this.hiddenField.dom.value = values.join(this.delimiter);
+        this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
+    },
+
+    getValue : function() {
+        return this.hiddenField.dom.value;
+    },
+
+    onRowDblClick : function(vw, index, node, e) {
+        if (vw == this.toMultiselect.view){
+            this.toFrom();
+        } else if (vw == this.fromMultiselect.view) {
+            this.fromTo();
+        }
+        return this.fireEvent('rowdblclick', vw, index, node, e);
+    },
+
+    reset: function(){
+        range = this.toMultiselect.store.getRange();
+        this.toMultiselect.store.removeAll();
+        this.fromMultiselect.store.add(range);
+        var si = this.fromMultiselect.store.sortInfo;
+        if (si){
+            this.fromMultiselect.store.sort(si.field, si.direction);
+        }
+        this.valueChanged(this.toMultiselect.store);
+    }
+});
+
+Ext.reg('itemselector', Ext.ux.form.ItemSelector);
+
+//backwards compat
+Ext.ux.ItemSelector = Ext.ux.form.ItemSelector;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/MultiSelect.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/MultiSelect.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/MultiSelect.js	(revision 625)
@@ -0,0 +1,596 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.MultiSelect
+ * @extends Ext.form.Field
+ * A control that allows selection and form submission of multiple list items.
+ *
+ *  @history
+ *    2008-06-19 bpm Original code contributed by Toby Stuart (with contributions from Robert Williams)
+ *    2008-06-19 bpm Docs and demo code clean up
+ *
+ * @constructor
+ * Create a new MultiSelect
+ * @param {Object} config Configuration options
+ * @xtype multiselect 
+ */
+Ext.ux.form.MultiSelect = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} legend Wraps the object with a fieldset and specified legend.
+     */
+    /**
+     * @cfg {Ext.ListView} view The {@link Ext.ListView} used to render the multiselect list.
+     */
+    /**
+     * @cfg {String/Array} dragGroup The ddgroup name(s) for the MultiSelect DragZone (defaults to undefined).
+     */
+    /**
+     * @cfg {String/Array} dropGroup The ddgroup name(s) for the MultiSelect DropZone (defaults to undefined).
+     */
+    /**
+     * @cfg {Boolean} ddReorder Whether the items in the MultiSelect list are drag/drop reorderable (defaults to false).
+     */
+    ddReorder:false,
+    /**
+     * @cfg {Object/Array} tbar The top toolbar of the control. This can be a {@link Ext.Toolbar} object, a
+     * toolbar config, or an array of buttons/button configs to be added to the toolbar.
+     */
+    /**
+     * @cfg {String} appendOnly True if the list should only allow append drops when drag/drop is enabled
+     * (use for lists which are sorted, defaults to false).
+     */
+    appendOnly:false,
+    /**
+     * @cfg {Number} width Width in pixels of the control (defaults to 100).
+     */
+    width:100,
+    /**
+     * @cfg {Number} height Height in pixels of the control (defaults to 100).
+     */
+    height:100,
+    /**
+     * @cfg {String/Number} displayField Name/Index of the desired display field in the dataset (defaults to 0).
+     */
+    displayField:0,
+    /**
+     * @cfg {String/Number} valueField Name/Index of the desired value field in the dataset (defaults to 1).
+     */
+    valueField:1,
+    /**
+     * @cfg {Boolean} allowBlank False to require at least one item in the list to be selected, true to allow no
+     * selection (defaults to true).
+     */
+    allowBlank:true,
+    /**
+     * @cfg {Number} minSelections Minimum number of selections allowed (defaults to 0).
+     */
+    minSelections:0,
+    /**
+     * @cfg {Number} maxSelections Maximum number of selections allowed (defaults to Number.MAX_VALUE).
+     */
+    maxSelections:Number.MAX_VALUE,
+    /**
+     * @cfg {String} blankText Default text displayed when the control contains no items (defaults to the same value as
+     * {@link Ext.form.TextField#blankText}.
+     */
+    blankText:Ext.form.TextField.prototype.blankText,
+    /**
+     * @cfg {String} minSelectionsText Validation message displayed when {@link #minSelections} is not met (defaults to 'Minimum {0}
+     * item(s) required').  The {0} token will be replaced by the value of {@link #minSelections}.
+     */
+    minSelectionsText:'Minimum {0} item(s) required',
+    /**
+     * @cfg {String} maxSelectionsText Validation message displayed when {@link #maxSelections} is not met (defaults to 'Maximum {0}
+     * item(s) allowed').  The {0} token will be replaced by the value of {@link #maxSelections}.
+     */
+    maxSelectionsText:'Maximum {0} item(s) allowed',
+    /**
+     * @cfg {String} delimiter The string used to delimit between items when set or returned as a string of values
+     * (defaults to ',').
+     */
+    delimiter:',',
+    /**
+     * @cfg {Ext.data.Store/Array} store The data source to which this MultiSelect is bound (defaults to <tt>undefined</tt>).
+     * Acceptable values for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
+     * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
+     * <div class="mdetail-params"><ul>
+     * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
+     * A 1-dimensional array will automatically be expanded (each array item will be the combo
+     * {@link #valueField value} and {@link #displayField text})</div></li>
+     * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
+     * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
+     * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
+     * </div></li></ul></div></li></ul></div>
+     */
+
+    // private
+    defaultAutoCreate : {tag: "div"},
+
+    // private
+    initComponent: function(){
+        Ext.ux.form.MultiSelect.superclass.initComponent.call(this);
+
+        if(Ext.isArray(this.store)){
+            if (Ext.isArray(this.store[0])){
+                this.store = new Ext.data.ArrayStore({
+                    fields: ['value','text'],
+                    data: this.store
+                });
+                this.valueField = 'value';
+            }else{
+                this.store = new Ext.data.ArrayStore({
+                    fields: ['text'],
+                    data: this.store,
+                    expandData: true
+                });
+                this.valueField = 'text';
+            }
+            this.displayField = 'text';
+        } else {
+            this.store = Ext.StoreMgr.lookup(this.store);
+        }
+
+        this.addEvents({
+            'dblclick' : true,
+            'click' : true,
+            'change' : true,
+            'drop' : true
+        });
+    },
+
+    // private
+    onRender: function(ct, position){
+        Ext.ux.form.MultiSelect.superclass.onRender.call(this, ct, position);
+
+        var fs = this.fs = new Ext.form.FieldSet({
+            renderTo: this.el,
+            title: this.legend,
+            height: this.height,
+            width: this.width,
+            style: "padding:0;",
+            tbar: this.tbar,
+            bodyStyle: 'overflow: auto;'
+        });
+
+        this.view = new Ext.ListView({
+            multiSelect: true,
+            store: this.store,
+            columns: [{ header: 'Value', width: 1, dataIndex: this.displayField }],
+            hideHeaders: true
+        });
+
+        fs.add(this.view);
+
+        this.view.on('click', this.onViewClick, this);
+        this.view.on('beforeclick', this.onViewBeforeClick, this);
+        this.view.on('dblclick', this.onViewDblClick, this);
+
+        this.hiddenName = this.name || Ext.id();
+        var hiddenTag = { tag: "input", type: "hidden", value: "", name: this.hiddenName };
+        this.hiddenField = this.el.createChild(hiddenTag);
+        this.hiddenField.dom.disabled = this.hiddenName != this.name;
+        fs.doLayout();
+    },
+
+    // private
+    afterRender: function(){
+        Ext.ux.form.MultiSelect.superclass.afterRender.call(this);
+
+        if (this.ddReorder && !this.dragGroup && !this.dropGroup){
+            this.dragGroup = this.dropGroup = 'MultiselectDD-' + Ext.id();
+        }
+
+        if (this.draggable || this.dragGroup){
+            this.dragZone = new Ext.ux.form.MultiSelect.DragZone(this, {
+                ddGroup: this.dragGroup
+            });
+        }
+        if (this.droppable || this.dropGroup){
+            this.dropZone = new Ext.ux.form.MultiSelect.DropZone(this, {
+                ddGroup: this.dropGroup
+            });
+        }
+    },
+
+    // private
+    onViewClick: function(vw, index, node, e) {
+        this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
+        this.hiddenField.dom.value = this.getValue();
+        this.fireEvent('click', this, e);
+        this.validate();
+    },
+
+    // private
+    onViewBeforeClick: function(vw, index, node, e) {
+        if (this.disabled) {return false;}
+    },
+
+    // private
+    onViewDblClick : function(vw, index, node, e) {
+        return this.fireEvent('dblclick', vw, index, node, e);
+    },
+
+    /**
+     * Returns an array of data values for the selected items in the list. The values will be separated
+     * by {@link #delimiter}.
+     * @return {Array} value An array of string data values
+     */
+    getValue: function(valueField){
+        var returnArray = [];
+        var selectionsArray = this.view.getSelectedIndexes();
+        if (selectionsArray.length == 0) {return '';}
+        for (var i=0; i<selectionsArray.length; i++) {
+            returnArray.push(this.store.getAt(selectionsArray[i]).get((valueField != null) ? valueField : this.valueField));
+        }
+        return returnArray.join(this.delimiter);
+    },
+
+    /**
+     * Sets a delimited string (using {@link #delimiter}) or array of data values into the list.
+     * @param {String/Array} values The values to set
+     */
+    setValue: function(values) {
+        var index;
+        var selections = [];
+        this.view.clearSelections();
+        this.hiddenField.dom.value = '';
+
+        if (!values || (values == '')) { return; }
+
+        if (!Ext.isArray(values)) { values = values.split(this.delimiter); }
+        for (var i=0; i<values.length; i++) {
+            index = this.view.store.indexOf(this.view.store.query(this.valueField,
+                new RegExp('^' + values[i] + '$', "i")).itemAt(0));
+            selections.push(index);
+        }
+        this.view.select(selections);
+        this.hiddenField.dom.value = this.getValue();
+        this.validate();
+    },
+
+    // inherit docs
+    reset : function() {
+        this.setValue('');
+    },
+
+    // inherit docs
+    getRawValue: function(valueField) {
+        var tmp = this.getValue(valueField);
+        if (tmp.length) {
+            tmp = tmp.split(this.delimiter);
+        }
+        else {
+            tmp = [];
+        }
+        return tmp;
+    },
+
+    // inherit docs
+    setRawValue: function(values){
+        setValue(values);
+    },
+
+    // inherit docs
+    validateValue : function(value){
+        if (value.length < 1) { // if it has no value
+             if (this.allowBlank) {
+                 this.clearInvalid();
+                 return true;
+             } else {
+                 this.markInvalid(this.blankText);
+                 return false;
+             }
+        }
+        if (value.length < this.minSelections) {
+            this.markInvalid(String.format(this.minSelectionsText, this.minSelections));
+            return false;
+        }
+        if (value.length > this.maxSelections) {
+            this.markInvalid(String.format(this.maxSelectionsText, this.maxSelections));
+            return false;
+        }
+        return true;
+    },
+
+    // inherit docs
+    disable: function(){
+        this.disabled = true;
+        this.hiddenField.dom.disabled = true;
+        this.fs.disable();
+    },
+
+    // inherit docs
+    enable: function(){
+        this.disabled = false;
+        this.hiddenField.dom.disabled = false;
+        this.fs.enable();
+    },
+
+    // inherit docs
+    destroy: function(){
+        Ext.destroy(this.fs, this.dragZone, this.dropZone);
+        Ext.ux.form.MultiSelect.superclass.destroy.call(this);
+    }
+});
+
+
+Ext.reg('multiselect', Ext.ux.form.MultiSelect);
+
+//backwards compat
+Ext.ux.Multiselect = Ext.ux.form.MultiSelect;
+
+
+Ext.ux.form.MultiSelect.DragZone = function(ms, config){
+    this.ms = ms;
+    this.view = ms.view;
+    var ddGroup = config.ddGroup || 'MultiselectDD';
+    var dd;
+    if (Ext.isArray(ddGroup)){
+        dd = ddGroup.shift();
+    } else {
+        dd = ddGroup;
+        ddGroup = null;
+    }
+    Ext.ux.form.MultiSelect.DragZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
+    this.setDraggable(ddGroup);
+};
+
+Ext.extend(Ext.ux.form.MultiSelect.DragZone, Ext.dd.DragZone, {
+    onInitDrag : function(x, y){
+        var el = Ext.get(this.dragData.ddel.cloneNode(true));
+        this.proxy.update(el.dom);
+        el.setWidth(el.child('em').getWidth());
+        this.onStartDrag(x, y);
+        return true;
+    },
+    
+    // private
+    collectSelection: function(data) {
+        data.repairXY = Ext.fly(this.view.getSelectedNodes()[0]).getXY();
+        var i = 0;
+        this.view.store.each(function(rec){
+            if (this.view.isSelected(i)) {
+                var n = this.view.getNode(i);
+                var dragNode = n.cloneNode(true);
+                dragNode.id = Ext.id();
+                data.ddel.appendChild(dragNode);
+                data.records.push(this.view.store.getAt(i));
+                data.viewNodes.push(n);
+            }
+            i++;
+        }, this);
+    },
+
+    // override
+    onEndDrag: function(data, e) {
+        var d = Ext.get(this.dragData.ddel);
+        if (d && d.hasClass("multi-proxy")) {
+            d.remove();
+        }
+    },
+
+    // override
+    getDragData: function(e){
+        var target = this.view.findItemFromChild(e.getTarget());
+        if(target) {
+            if (!this.view.isSelected(target) && !e.ctrlKey && !e.shiftKey) {
+                this.view.select(target);
+                this.ms.setValue(this.ms.getValue());
+            }
+            if (this.view.getSelectionCount() == 0 || e.ctrlKey || e.shiftKey) return false;
+            var dragData = {
+                sourceView: this.view,
+                viewNodes: [],
+                records: []
+            };
+            if (this.view.getSelectionCount() == 1) {
+                var i = this.view.getSelectedIndexes()[0];
+                var n = this.view.getNode(i);
+                dragData.viewNodes.push(dragData.ddel = n);
+                dragData.records.push(this.view.store.getAt(i));
+                dragData.repairXY = Ext.fly(n).getXY();
+            } else {
+                dragData.ddel = document.createElement('div');
+                dragData.ddel.className = 'multi-proxy';
+                this.collectSelection(dragData);
+            }
+            return dragData;
+        }
+        return false;
+    },
+
+    // override the default repairXY.
+    getRepairXY : function(e){
+        return this.dragData.repairXY;
+    },
+
+    // private
+    setDraggable: function(ddGroup){
+        if (!ddGroup) return;
+        if (Ext.isArray(ddGroup)) {
+            Ext.each(ddGroup, this.setDraggable, this);
+            return;
+        }
+        this.addToGroup(ddGroup);
+    }
+});
+
+Ext.ux.form.MultiSelect.DropZone = function(ms, config){
+    this.ms = ms;
+    this.view = ms.view;
+    var ddGroup = config.ddGroup || 'MultiselectDD';
+    var dd;
+    if (Ext.isArray(ddGroup)){
+        dd = ddGroup.shift();
+    } else {
+        dd = ddGroup;
+        ddGroup = null;
+    }
+    Ext.ux.form.MultiSelect.DropZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
+    this.setDroppable(ddGroup);
+};
+
+Ext.extend(Ext.ux.form.MultiSelect.DropZone, Ext.dd.DropZone, {
+    /**
+	 * Part of the Ext.dd.DropZone interface. If no target node is found, the
+	 * whole Element becomes the target, and this causes the drop gesture to append.
+	 */
+    getTargetFromEvent : function(e) {
+        var target = e.getTarget();
+        return target;
+    },
+
+    // private
+    getDropPoint : function(e, n, dd){
+        if (n == this.ms.fs.body.dom) { return "below"; }
+        var t = Ext.lib.Dom.getY(n), b = t + n.offsetHeight;
+        var c = t + (b - t) / 2;
+        var y = Ext.lib.Event.getPageY(e);
+        if(y <= c) {
+            return "above";
+        }else{
+            return "below";
+        }
+    },
+
+    // private
+    isValidDropPoint: function(pt, n, data) {
+        if (!data.viewNodes || (data.viewNodes.length != 1)) {
+            return true;
+        }
+        var d = data.viewNodes[0];
+        if (d == n) {
+            return false;
+        }
+        if ((pt == "below") && (n.nextSibling == d)) {
+            return false;
+        }
+        if ((pt == "above") && (n.previousSibling == d)) {
+            return false;
+        }
+        return true;
+    },
+
+    // override
+    onNodeEnter : function(n, dd, e, data){
+        return false;
+    },
+
+    // override
+    onNodeOver : function(n, dd, e, data){
+        var dragElClass = this.dropNotAllowed;
+        var pt = this.getDropPoint(e, n, dd);
+        if (this.isValidDropPoint(pt, n, data)) {
+            if (this.ms.appendOnly) {
+                return "x-tree-drop-ok-below";
+            }
+
+            // set the insert point style on the target node
+            if (pt) {
+                var targetElClass;
+                if (pt == "above"){
+                    dragElClass = n.previousSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-above";
+                    targetElClass = "x-view-drag-insert-above";
+                } else {
+                    dragElClass = n.nextSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-below";
+                    targetElClass = "x-view-drag-insert-below";
+                }
+                if (this.lastInsertClass != targetElClass){
+                    Ext.fly(n).replaceClass(this.lastInsertClass, targetElClass);
+                    this.lastInsertClass = targetElClass;
+                }
+            }
+        }
+        return dragElClass;
+    },
+
+    // private
+    onNodeOut : function(n, dd, e, data){
+        this.removeDropIndicators(n);
+    },
+
+    // private
+    onNodeDrop : function(n, dd, e, data){
+        if (this.ms.fireEvent("drop", this, n, dd, e, data) === false) {
+            return false;
+        }
+        var pt = this.getDropPoint(e, n, dd);
+        if (n != this.ms.fs.body.dom)
+            n = this.view.findItemFromChild(n);
+        var insertAt = (this.ms.appendOnly || (n == this.ms.fs.body.dom)) ? this.view.store.getCount() : this.view.indexOf(n);
+        if (pt == "below") {
+            insertAt++;
+        }
+
+        var dir = false;
+
+        // Validate if dragging within the same MultiSelect
+        if (data.sourceView == this.view) {
+            // If the first element to be inserted below is the target node, remove it
+            if (pt == "below") {
+                if (data.viewNodes[0] == n) {
+                    data.viewNodes.shift();
+                }
+            } else {  // If the last element to be inserted above is the target node, remove it
+                if (data.viewNodes[data.viewNodes.length - 1] == n) {
+                    data.viewNodes.pop();
+                }
+            }
+
+            // Nothing to drop...
+            if (!data.viewNodes.length) {
+                return false;
+            }
+
+            // If we are moving DOWN, then because a store.remove() takes place first,
+            // the insertAt must be decremented.
+            if (insertAt > this.view.store.indexOf(data.records[0])) {
+                dir = 'down';
+                insertAt--;
+            }
+        }
+
+        for (var i = 0; i < data.records.length; i++) {
+            var r = data.records[i];
+            if (data.sourceView) {
+                data.sourceView.store.remove(r);
+            }
+            this.view.store.insert(dir == 'down' ? insertAt : insertAt++, r);
+            var si = this.view.store.sortInfo;
+            if(si){
+                this.view.store.sort(si.field, si.direction);
+            }
+        }
+        return true;
+    },
+
+    // private
+    removeDropIndicators : function(n){
+        if(n){
+            Ext.fly(n).removeClass([
+                "x-view-drag-insert-above",
+                "x-view-drag-insert-left",
+                "x-view-drag-insert-right",
+                "x-view-drag-insert-below"]);
+            this.lastInsertClass = "_noclass";
+        }
+    },
+
+    // private
+    setDroppable: function(ddGroup){
+        if (!ddGroup) return;
+        if (Ext.isArray(ddGroup)) {
+            Ext.each(ddGroup, this.setDroppable, this);
+            return;
+        }
+        this.addToGroup(ddGroup);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PagingMemoryProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PagingMemoryProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PagingMemoryProxy.js	(revision 625)
@@ -0,0 +1,96 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+/* Fix for Opera, which does not seem to include the map function on Array's */
+if (!Array.prototype.map) {
+    Array.prototype.map = function(fun){
+        var len = this.length;
+        if (typeof fun != 'function') {
+            throw new TypeError();
+        }
+        var res = new Array(len);
+        var thisp = arguments[1];
+        for (var i = 0; i < len; i++) {
+            if (i in this) {
+                res[i] = fun.call(thisp, this[i], i, this);
+            }
+        }
+        return res;
+    };
+}
+
+Ext.ns('Ext.ux.data');
+
+/**
+ * @class Ext.ux.data.PagingMemoryProxy
+ * @extends Ext.data.MemoryProxy
+ * <p>Paging Memory Proxy, allows to use paging grid with in memory dataset</p>
+ */
+Ext.ux.data.PagingMemoryProxy = Ext.extend(Ext.data.MemoryProxy, {
+    constructor : function(data){
+        Ext.ux.data.PagingMemoryProxy.superclass.constructor.call(this);
+        this.data = data;
+    },
+    doRequest : function(action, rs, params, reader, callback, scope, options){
+        params = params ||
+        {};
+        var result;
+        try {
+            result = reader.readRecords(this.data);
+        } 
+        catch (e) {
+            this.fireEvent('loadexception', this, options, null, e);
+            callback.call(scope, null, options, false);
+            return;
+        }
+        
+        // filtering
+        if (params.filter !== undefined) {
+            result.records = result.records.filter(function(el){
+                if (typeof(el) == 'object') {
+                    var att = params.filterCol || 0;
+                    return String(el.data[att]).match(params.filter) ? true : false;
+                }
+                else {
+                    return String(el).match(params.filter) ? true : false;
+                }
+            });
+            result.totalRecords = result.records.length;
+        }
+        
+        // sorting
+        if (params.sort !== undefined) {
+            // use integer as params.sort to specify column, since arrays are not named
+            // params.sort=0; would also match a array without columns
+            var dir = String(params.dir).toUpperCase() == 'DESC' ? -1 : 1;
+            var fn = function(r1, r2){
+                return r1 < r2;
+            };
+            result.records.sort(function(a, b){
+                var v = 0;
+                if (typeof(a) == 'object') {
+                    v = fn(a.data[params.sort], b.data[params.sort]) * dir;
+                }
+                else {
+                    v = fn(a, b) * dir;
+                }
+                if (v == 0) {
+                    v = (a.index < b.index ? -1 : 1);
+                }
+                return v;
+            });
+        }
+        // paging (use undefined cause start can also be 0 (thus false))
+        if (params.start !== undefined && params.limit !== undefined) {
+            result.records = result.records.slice(params.start, params.start + params.limit);
+        }
+        callback.call(scope, result, options, true);
+    }
+});
+
+//backwards compat.
+Ext.data.PagingMemoryProxy = Ext.ux.data.PagingMemoryProxy;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PanelResizer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PanelResizer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PanelResizer.js	(revision 625)
@@ -0,0 +1,59 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.PanelResizer = Ext.extend(Ext.util.Observable, {
+    minHeight: 0,
+    maxHeight:10000000,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        this.events = {};
+        Ext.ux.PanelResizer.superclass.constructor.call(this, config);
+    },
+
+    init : function(p){
+        this.panel = p;
+
+        if(this.panel.elements.indexOf('footer')==-1){
+            p.elements += ',footer';
+        }
+        p.on('render', this.onRender, this);
+    },
+
+    onRender : function(p){
+        this.handle = p.footer.createChild({cls:'x-panel-resize'});
+
+        this.tracker = new Ext.dd.DragTracker({
+            onStart: this.onDragStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onDragEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(this.handle);
+        p.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+	// private
+    onDragStart: function(e){
+        this.dragging = true;
+        this.startHeight = this.panel.el.getHeight();
+        this.fireEvent('dragstart', this, e);
+    },
+
+	// private
+    onDrag: function(e){
+        this.panel.setHeight((this.startHeight-this.tracker.getOffset()[1]).constrain(this.minHeight, this.maxHeight));
+        this.fireEvent('drag', this, e);
+    },
+
+	// private
+    onDragEnd: function(e){
+        this.dragging = false;
+        this.fireEvent('dragend', this, e);
+    }
+});
+Ext.preg('panelresizer', Ext.ux.PanelResizer);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portal.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portal.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portal.js	(revision 625)
@@ -0,0 +1,205 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.Portal = Ext.extend(Ext.Panel, {
+    layout : 'column',
+    autoScroll : true,
+    cls : 'x-portal',
+    defaultType : 'portalcolumn',
+    
+    initComponent : function(){
+        Ext.ux.Portal.superclass.initComponent.call(this);
+        this.addEvents({
+            validatedrop:true,
+            beforedragover:true,
+            dragover:true,
+            beforedrop:true,
+            drop:true
+        });
+    },
+
+    initEvents : function(){
+        Ext.ux.Portal.superclass.initEvents.call(this);
+        this.dd = new Ext.ux.Portal.DropZone(this, this.dropConfig);
+    },
+    
+    beforeDestroy : function() {
+        if(this.dd){
+            this.dd.unreg();
+        }
+        Ext.ux.Portal.superclass.beforeDestroy.call(this);
+    }
+});
+
+Ext.reg('portal', Ext.ux.Portal);
+
+
+Ext.ux.Portal.DropZone = function(portal, cfg){
+    this.portal = portal;
+    Ext.dd.ScrollManager.register(portal.body);
+    Ext.ux.Portal.DropZone.superclass.constructor.call(this, portal.bwrap.dom, cfg);
+    portal.body.ddScrollConfig = this.ddScrollConfig;
+};
+
+Ext.extend(Ext.ux.Portal.DropZone, Ext.dd.DropTarget, {
+    ddScrollConfig : {
+        vthresh: 50,
+        hthresh: -1,
+        animate: true,
+        increment: 200
+    },
+
+    createEvent : function(dd, e, data, col, c, pos){
+        return {
+            portal: this.portal,
+            panel: data.panel,
+            columnIndex: col,
+            column: c,
+            position: pos,
+            data: data,
+            source: dd,
+            rawEvent: e,
+            status: this.dropAllowed
+        };
+    },
+
+    notifyOver : function(dd, e, data){
+        var xy = e.getXY(), portal = this.portal, px = dd.proxy;
+
+        // case column widths
+        if(!this.grid){
+            this.grid = this.getGrid();
+        }
+
+        // handle case scroll where scrollbars appear during drag
+        var cw = portal.body.dom.clientWidth;
+        if(!this.lastCW){
+            this.lastCW = cw;
+        }else if(this.lastCW != cw){
+            this.lastCW = cw;
+            portal.doLayout();
+            this.grid = this.getGrid();
+        }
+
+        // determine column
+        var col = 0, xs = this.grid.columnX, cmatch = false;
+        for(var len = xs.length; col < len; col++){
+            if(xy[0] < (xs[col].x + xs[col].w)){
+                cmatch = true;
+                break;
+            }
+        }
+        // no match, fix last index
+        if(!cmatch){
+            col--;
+        }
+
+        // find insert position
+        var p, match = false, pos = 0,
+            c = portal.items.itemAt(col),
+            items = c.items.items, overSelf = false;
+
+        for(var len = items.length; pos < len; pos++){
+            p = items[pos];
+            var h = p.el.getHeight();
+            if(h === 0){
+                overSelf = true;
+            }
+            else if((p.el.getY()+(h/2)) > xy[1]){
+                match = true;
+                break;
+            }
+        }
+
+        pos = (match && p ? pos : c.items.getCount()) + (overSelf ? -1 : 0);
+        var overEvent = this.createEvent(dd, e, data, col, c, pos);
+
+        if(portal.fireEvent('validatedrop', overEvent) !== false &&
+           portal.fireEvent('beforedragover', overEvent) !== false){
+
+            // make sure proxy width is fluid
+            px.getProxy().setWidth('auto');
+
+            if(p){
+                px.moveProxy(p.el.dom.parentNode, match ? p.el.dom : null);
+            }else{
+                px.moveProxy(c.el.dom, null);
+            }
+
+            this.lastPos = {c: c, col: col, p: overSelf || (match && p) ? pos : false};
+            this.scrollPos = portal.body.getScroll();
+
+            portal.fireEvent('dragover', overEvent);
+
+            return overEvent.status;
+        }else{
+            return overEvent.status;
+        }
+
+    },
+
+    notifyOut : function(){
+        delete this.grid;
+    },
+
+    notifyDrop : function(dd, e, data){
+        delete this.grid;
+        if(!this.lastPos){
+            return;
+        }
+        var c = this.lastPos.c, col = this.lastPos.col, pos = this.lastPos.p;
+
+        var dropEvent = this.createEvent(dd, e, data, col, c,
+            pos !== false ? pos : c.items.getCount());
+
+        if(this.portal.fireEvent('validatedrop', dropEvent) !== false &&
+           this.portal.fireEvent('beforedrop', dropEvent) !== false){
+
+            dd.proxy.getProxy().remove();
+            dd.panel.el.dom.parentNode.removeChild(dd.panel.el.dom);
+            
+            if(pos !== false){
+                if(c == dd.panel.ownerCt && (c.items.items.indexOf(dd.panel) <= pos)){
+                    pos++;
+                }
+                c.insert(pos, dd.panel);
+            }else{
+                c.add(dd.panel);
+            }
+            
+            c.doLayout();
+
+            this.portal.fireEvent('drop', dropEvent);
+
+            // scroll position is lost on drop, fix it
+            var st = this.scrollPos.top;
+            if(st){
+                var d = this.portal.body.dom;
+                setTimeout(function(){
+                    d.scrollTop = st;
+                }, 10);
+            }
+
+        }
+        delete this.lastPos;
+    },
+
+    // internal cache of body and column coords
+    getGrid : function(){
+        var box = this.portal.bwrap.getBox();
+        box.columnX = [];
+        this.portal.items.each(function(c){
+             box.columnX.push({x: c.el.getX(), w: c.el.getWidth()});
+        });
+        return box;
+    },
+
+    // unregister the dropzone from ScrollManager
+    unreg: function() {
+        //Ext.dd.ScrollManager.unregister(this.portal.body);
+        Ext.ux.Portal.DropZone.superclass.unreg.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PortalColumn.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PortalColumn.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/PortalColumn.js	(revision 625)
@@ -0,0 +1,14 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.PortalColumn = Ext.extend(Ext.Container, {
+    layout : 'anchor',
+    //autoEl : 'div',//already defined by Ext.Component
+    defaultType : 'portlet',
+    cls : 'x-portal-column'
+});
+
+Ext.reg('portalcolumn', Ext.ux.PortalColumn);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portlet.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portlet.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Portlet.js	(revision 625)
@@ -0,0 +1,15 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.Portlet = Ext.extend(Ext.Panel, {
+    anchor : '100%',
+    frame : true,
+    collapsible : true,
+    draggable : true,
+    cls : 'x-portlet'
+});
+
+Ext.reg('portlet', Ext.ux.Portlet);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ProgressBarPager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ProgressBarPager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ProgressBarPager.js	(revision 625)
@@ -0,0 +1,121 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+* @class Ext.ux.ProgressBarPager
+* @extends Object 
+* Plugin (ptype = 'tabclosemenu') for displaying a progressbar inside of a paging toolbar instead of plain text
+* 
+* @ptype progressbarpager 
+* @constructor
+* Create a new ItemSelector
+* @param {Object} config Configuration options
+* @xtype itemselector 
+*/
+Ext.ux.ProgressBarPager  = Ext.extend(Object, {
+	/**
+ 	* @cfg {Integer} progBarWidth
+ 	* <p>The default progress bar width.  Default is 225.</p>
+	*/
+	progBarWidth   : 225,
+	/**
+ 	* @cfg {String} defaultText
+	* <p>The text to display while the store is loading.  Default is 'Loading...'</p>
+ 	*/
+	defaultText    : 'Loading...',
+    	/**
+ 	* @cfg {Object} defaultAnimCfg 
+ 	* <p>A {@link Ext.Fx Ext.Fx} configuration object.  Default is  { duration : 1, easing : 'bounceOut' }.</p>
+ 	*/
+	defaultAnimCfg : {
+		duration   : 1,
+		easing     : 'bounceOut'	
+	},												  
+	constructor : function(config) {
+		if (config) {
+			Ext.apply(this, config);
+		}
+	},
+	//public
+	init : function (parent) {
+		
+		if(parent.displayInfo){
+			this.parent = parent;
+			var ind  = parent.items.indexOf(parent.displayItem);
+			parent.remove(parent.displayItem, true);
+			this.progressBar = new Ext.ProgressBar({
+				text    : this.defaultText,
+				width   : this.progBarWidth,
+				animate :  this.defaultAnimCfg
+			});					
+		   
+			parent.displayItem = this.progressBar;
+			
+			parent.add(parent.displayItem);	
+			parent.doLayout();
+			Ext.apply(parent, this.parentOverrides);		
+			
+			this.progressBar.on('render', function(pb) {
+				pb.el.applyStyles('cursor:pointer');
+
+				pb.el.on('click', this.handleProgressBarClick, this);
+			}, this);
+			
+		
+			// Remove the click handler from the 
+			this.progressBar.on({
+				scope         : this,
+				beforeDestroy : function() {
+					this.progressBar.el.un('click', this.handleProgressBarClick, this);	
+				}
+			});	
+						
+		}
+		  
+	},
+	// private
+	// This method handles the click for the progress bar
+	handleProgressBarClick : function(e){
+		var parent = this.parent;
+		var displayItem = parent.displayItem;
+		
+		var box = this.progressBar.getBox();
+		var xy = e.getXY();
+		var position = xy[0]-box.x;
+		var pages = Math.ceil(parent.store.getTotalCount()/parent.pageSize);
+		
+		var newpage = Math.ceil(position/(displayItem.width/pages));
+		parent.changePage(newpage);
+	},
+	
+	// private, overriddes
+	parentOverrides  : {
+		// private
+		// This method updates the information via the progress bar.
+		updateInfo : function(){
+			if(this.displayItem){
+				var count   = this.store.getCount();
+				var pgData  = this.getPageData();
+				var pageNum = this.readPage(pgData);
+				
+				var msg    = count == 0 ?
+					this.emptyMsg :
+					String.format(
+						this.displayMsg,
+						this.cursor+1, this.cursor+count, this.store.getTotalCount()
+					);
+					
+				pageNum = pgData.activePage; ;	
+				
+				var pct	= pageNum / pgData.pages;	
+				
+				this.displayItem.updateProgress(pct, msg, this.animate || this.defaultAnimConfig);
+			}
+		}
+	}
+});
+Ext.preg('progressbarpager', Ext.ux.ProgressBarPager);
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowEditor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowEditor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowEditor.js	(revision 625)
@@ -0,0 +1,521 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.RowEditor
+ * @extends Ext.Panel 
+ * Plugin (ptype = 'roweditor') that adds the ability to rapidly edit full rows in a grid.
+ * A validation mode may be enabled which uses AnchorTips to notify the user of all
+ * validation errors at once.
+ * 
+ * @ptype roweditor
+ */
+Ext.ux.grid.RowEditor = Ext.extend(Ext.Panel, {
+    floating: true,
+    shadow: false,
+    layout: 'hbox',
+    cls: 'x-small-editor',
+    buttonAlign: 'center',
+    baseCls: 'x-row-editor',
+    elements: 'header,footer,body',
+    frameWidth: 5,
+    buttonPad: 3,
+    clicksToEdit: 'auto',
+    monitorValid: true,
+    focusDelay: 250,
+    errorSummary: true,
+
+    defaults: {
+        normalWidth: true
+    },
+
+    initComponent: function(){
+        Ext.ux.grid.RowEditor.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforeedit
+             * Fired before the row editor is activated.
+             * If the listener returns <tt>false</tt> the editor will not be activated.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'beforeedit',
+            /**
+             * @event validateedit
+             * Fired after a row is edited and passes validation.
+             * If the listener returns <tt>false</tt> changes to the record will not be set.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Object} changes Object with changes made to the record.
+             * @param {Ext.data.Record} r The Record that was edited.
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'validateedit',
+            /**
+             * @event afteredit
+             * Fired after a row is edited and passes validation.  This event is fired
+             * after the store's update event is fired with this edit.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Object} changes Object with changes made to the record.
+             * @param {Ext.data.Record} r The Record that was edited.
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'afteredit'
+        );
+    },
+
+    init: function(grid){
+        this.grid = grid;
+        this.ownerCt = grid;
+        if(this.clicksToEdit === 2){
+            grid.on('rowdblclick', this.onRowDblClick, this);
+        }else{
+            grid.on('rowclick', this.onRowClick, this);
+            if(Ext.isIE){
+                grid.on('rowdblclick', this.onRowDblClick, this);
+            }
+        }
+
+        // stopEditing without saving when a record is removed from Store.
+        grid.getStore().on('remove', function() {
+            this.stopEditing(false);
+        },this);
+
+        grid.on({
+            scope: this,
+            keydown: this.onGridKey,
+            columnresize: this.verifyLayout,
+            columnmove: this.refreshFields,
+            reconfigure: this.refreshFields,
+	    destroy : this.destroy,
+            bodyscroll: {
+                buffer: 250,
+                fn: this.positionButtons
+            }
+        });
+        grid.getColumnModel().on('hiddenchange', this.verifyLayout, this, {delay:1});
+        grid.getView().on('refresh', this.stopEditing.createDelegate(this, []));
+    },
+
+    refreshFields: function(){
+        this.initFields();
+        this.verifyLayout();
+    },
+
+    isDirty: function(){
+        var dirty;
+        this.items.each(function(f){
+            if(String(this.values[f.id]) !== String(f.getValue())){
+                dirty = true;
+                return false;
+            }
+        }, this);
+        return dirty;
+    },
+
+    startEditing: function(rowIndex, doFocus){
+        if(this.editing && this.isDirty()){
+            this.showTooltip('You need to commit or cancel your changes');
+            return;
+        }
+        this.editing = true;
+        if(typeof rowIndex == 'object'){
+            rowIndex = this.grid.getStore().indexOf(rowIndex);
+        }
+        if(this.fireEvent('beforeedit', this, rowIndex) !== false){
+            var g = this.grid, view = g.getView();
+            var row = view.getRow(rowIndex);
+            var record = g.store.getAt(rowIndex);
+            this.record = record;
+            this.rowIndex = rowIndex;
+            this.values = {};
+            if(!this.rendered){
+                this.render(view.getEditorParent());
+            }
+            var w = Ext.fly(row).getWidth();
+            this.setSize(w);
+            if(!this.initialized){
+                this.initFields();
+            }
+            var cm = g.getColumnModel(), fields = this.items.items, f, val;
+            for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+                val = this.preEditValue(record, cm.getDataIndex(i));
+                f = fields[i];
+                f.setValue(val);
+                this.values[f.id] = val || '';
+            }
+            this.verifyLayout(true);
+            if(!this.isVisible()){
+                this.setPagePosition(Ext.fly(row).getXY());
+            } else{
+                this.el.setXY(Ext.fly(row).getXY(), {duration:0.15});
+            }
+            if(!this.isVisible()){
+                this.show().doLayout();
+            }
+            if(doFocus !== false){
+                this.doFocus.defer(this.focusDelay, this);
+            }
+        }
+    },
+
+    stopEditing : function(saveChanges){
+        this.editing = false;
+        if(!this.isVisible()){
+            return;
+        }
+        if(saveChanges === false || !this.isValid()){
+            this.hide();
+            return;
+        }
+        var changes = {}, r = this.record, hasChange = false;
+        var cm = this.grid.colModel, fields = this.items.items;
+        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+            if(!cm.isHidden(i)){
+                var dindex = cm.getDataIndex(i);
+                if(!Ext.isEmpty(dindex)){
+                    var oldValue = r.data[dindex];
+                    var value = this.postEditValue(fields[i].getValue(), oldValue, r, dindex);
+                    if(String(oldValue) !== String(value)){
+                        changes[dindex] = value;
+                        hasChange = true;
+                    }
+                }
+            }
+        }
+        if(hasChange && this.fireEvent('validateedit', this, changes, r, this.rowIndex) !== false){
+            r.beginEdit();
+            for(var k in changes){
+                if(changes.hasOwnProperty(k)){
+                    r.set(k, changes[k]);
+                }
+            }
+            r.endEdit();
+            this.fireEvent('afteredit', this, changes, r, this.rowIndex);
+        }
+        this.hide();
+    },
+
+    verifyLayout: function(force){
+        if(this.el && (this.isVisible() || force === true)){
+            var row = this.grid.getView().getRow(this.rowIndex);
+            this.setSize(Ext.fly(row).getWidth(), Ext.isIE ? Ext.fly(row).getHeight() + (Ext.isBorderBox ? 9 : 0) : undefined);
+            var cm = this.grid.colModel, fields = this.items.items;
+            for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+                if(!cm.isHidden(i)){
+                    var adjust = 0;
+                    if(i === 0){
+                        adjust += 0; // outer padding
+                    }
+                    if(i === (len - 1)){
+                        adjust += 3; // outer padding
+                    } else{
+                        adjust += 1;
+                    }
+                    fields[i].show();
+                    fields[i].setWidth(cm.getColumnWidth(i) - adjust);
+                } else{
+                    fields[i].hide();
+                }
+            }
+            this.doLayout();
+            this.positionButtons();
+        }
+    },
+
+    slideHide : function(){
+        this.hide();
+    },
+
+    initFields: function(){
+        var cm = this.grid.getColumnModel(), pm = Ext.layout.ContainerLayout.prototype.parseMargins;
+        this.removeAll(false);
+        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+            var c = cm.getColumnAt(i);
+            var ed = c.getEditor();
+            if(!ed){
+                ed = c.displayEditor || new Ext.form.DisplayField();
+            }
+            if(i == 0){
+                ed.margins = pm('0 1 2 1');
+            } else if(i == len - 1){
+                ed.margins = pm('0 0 2 1');
+            } else{
+                ed.margins = pm('0 1 2');
+            }
+            ed.setWidth(cm.getColumnWidth(i));
+            ed.column = c;
+            if(ed.ownerCt !== this){
+                ed.on('focus', this.ensureVisible, this);
+                ed.on('specialkey', this.onKey, this);
+            }
+            this.insert(i, ed);
+        }
+        this.initialized = true;
+    },
+
+    onKey: function(f, e){
+        if(e.getKey() === e.ENTER){
+            this.stopEditing(true);
+            e.stopPropagation();
+        }
+    },
+
+    onGridKey: function(e){
+        if(e.getKey() === e.ENTER && !this.isVisible()){
+            var r = this.grid.getSelectionModel().getSelected();
+            if(r){
+                var index = this.grid.store.indexOf(r);
+                this.startEditing(index);
+                e.stopPropagation();
+            }
+        }
+    },
+
+    ensureVisible: function(editor){
+        if(this.isVisible()){
+             this.grid.getView().ensureVisible(this.rowIndex, this.grid.colModel.getIndexById(editor.column.id), true);
+        }
+    },
+
+    onRowClick: function(g, rowIndex, e){
+        if(this.clicksToEdit == 'auto'){
+            var li = this.lastClickIndex;
+            this.lastClickIndex = rowIndex;
+            if(li != rowIndex && !this.isVisible()){
+                return;
+            }
+        }
+        this.startEditing(rowIndex, false);
+        this.doFocus.defer(this.focusDelay, this, [e.getPoint()]);
+    },
+
+    onRowDblClick: function(g, rowIndex, e){
+        this.startEditing(rowIndex, false);
+        this.doFocus.defer(this.focusDelay, this, [e.getPoint()]);
+    },
+
+    onRender: function(){
+        Ext.ux.grid.RowEditor.superclass.onRender.apply(this, arguments);
+        this.el.swallowEvent(['keydown', 'keyup', 'keypress']);
+        this.btns = new Ext.Panel({
+            baseCls: 'x-plain',
+            cls: 'x-btns',
+            elements:'body',
+            layout: 'table',
+            width: (this.minButtonWidth * 2) + (this.frameWidth * 2) + (this.buttonPad * 4), // width must be specified for IE
+            items: [{
+                ref: 'saveBtn',
+                itemId: 'saveBtn',
+                xtype: 'button',
+                text: this.saveText || 'Save',
+                width: this.minButtonWidth,
+                handler: this.stopEditing.createDelegate(this, [true])
+            }, {
+                xtype: 'button',
+                text: this.cancelText || 'Cancel',
+                width: this.minButtonWidth,
+                handler: this.stopEditing.createDelegate(this, [false])
+            }]
+        });
+        this.btns.render(this.bwrap);
+    },
+
+    afterRender: function(){
+        Ext.ux.grid.RowEditor.superclass.afterRender.apply(this, arguments);
+        this.positionButtons();
+        if(this.monitorValid){
+            this.startMonitoring();
+        }
+    },
+
+    onShow: function(){
+        if(this.monitorValid){
+            this.startMonitoring();
+        }
+        Ext.ux.grid.RowEditor.superclass.onShow.apply(this, arguments);
+    },
+
+    onHide: function(){
+        Ext.ux.grid.RowEditor.superclass.onHide.apply(this, arguments);
+        this.stopMonitoring();
+        this.grid.getView().focusRow(this.rowIndex);
+    },
+
+    positionButtons: function(){
+        if(this.btns){
+            var h = this.el.dom.clientHeight;
+            var view = this.grid.getView();
+            var scroll = view.scroller.dom.scrollLeft;
+            var width =  view.mainBody.getWidth();
+            var bw = this.btns.getWidth();
+            this.btns.el.shift({left: (width/2)-(bw/2)+scroll, top: h - 2, stopFx: true, duration:0.2});
+        }
+    },
+
+    // private
+    preEditValue : function(r, field){
+        var value = r.data[field];
+        return this.autoEncode && typeof value === 'string' ? Ext.util.Format.htmlDecode(value) : value;
+    },
+
+    // private
+    postEditValue : function(value, originalValue, r, field){
+        return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value;
+    },
+
+    doFocus: function(pt){
+        if(this.isVisible()){
+            var index = 0;
+            if(pt){
+                index = this.getTargetColumnIndex(pt);
+            }
+            var cm = this.grid.getColumnModel();
+            for(var i = index||0, len = cm.getColumnCount(); i < len; i++){
+                var c = cm.getColumnAt(i);
+                if(!c.hidden && c.getEditor()){
+                    c.getEditor().focus();
+                    break;
+                }
+            }
+        }
+    },
+
+    getTargetColumnIndex: function(pt){
+        var grid = this.grid, v = grid.view;
+        var x = pt.left;
+        var cms = grid.colModel.config;
+        var i = 0, match = false;
+        for(var len = cms.length, c; c = cms[i]; i++){
+            if(!c.hidden){
+                if(Ext.fly(v.getHeaderCell(i)).getRegion().right >= x){
+                    match = i;
+                    break;
+                }
+            }
+        }
+        return match;
+    },
+
+    startMonitoring : function(){
+        if(!this.bound && this.monitorValid){
+            this.bound = true;
+            Ext.TaskMgr.start({
+                run : this.bindHandler,
+                interval : this.monitorPoll || 200,
+                scope: this
+            });
+        }
+    },
+
+    stopMonitoring : function(){
+        this.bound = false;
+        if(this.tooltip){
+            this.tooltip.hide();
+        }
+    },
+
+    isValid: function(){
+        var valid = true;
+        this.items.each(function(f){
+            if(!f.isValid(true)){
+                valid = false;
+                return false;
+            }
+        });
+        return valid;
+    },
+
+    // private
+    bindHandler : function(){
+        if(!this.bound){
+            return false; // stops binding
+        }
+        var valid = this.isValid();
+        if(!valid && this.errorSummary){
+            this.showTooltip(this.getErrorText().join(''));
+        }
+        this.btns.saveBtn.setDisabled(!valid);
+        this.fireEvent('validation', this, valid);
+    },
+
+    showTooltip: function(msg){
+        var t = this.tooltip;
+        if(!t){
+            t = this.tooltip = new Ext.ToolTip({
+                maxWidth: 600,
+                cls: 'errorTip',
+                width: 300,
+                title: 'Errors',
+                autoHide: false,
+                anchor: 'left',
+                anchorToTarget: true,
+                mouseOffset: [40,0]
+            });
+        }
+        t.initTarget(this.items.last().getEl());
+        if(!t.rendered){
+            t.show();
+            t.hide();
+        }
+        t.body.update(msg);
+        t.doAutoWidth();
+        t.show();
+    },
+
+    getErrorText: function(){
+        var data = ['<ul>'];
+        this.items.each(function(f){
+            if(!f.isValid(true)){
+                data.push('<li>', f.activeError, '</li>');
+            }
+        });
+        data.push('</ul>');
+        return data;
+    }
+});
+Ext.preg('roweditor', Ext.ux.grid.RowEditor);
+
+Ext.override(Ext.form.Field, {
+    markInvalid : function(msg){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        msg = msg || this.invalidText;
+
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.mark(this, msg);
+        }else if(this.msgTarget){
+            this.el.addClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = msg;
+                t.style.display = this.msgDisplay;
+            }
+        }
+        this.activeError = msg;
+        this.fireEvent('invalid', this, msg);
+    }
+});
+
+Ext.override(Ext.ToolTip, {
+    doAutoWidth : function(){
+        var bw = this.body.getTextWidth();
+        if(this.title){
+            bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
+        }
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + 20;
+        this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
+
+        // IE7 repaint bug on initial show
+        if(Ext.isIE7 && !this.repainted){
+            this.el.repaint();
+            this.repainted = true;
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowExpander.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowExpander.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowExpander.js	(revision 625)
@@ -0,0 +1,231 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.RowExpander
+ * @extends Ext.util.Observable
+ * Plugin (ptype = 'rowexpander') that adds the ability to have a Column in a grid which enables
+ * a second row body which expands/contracts.  The expand/contract behavior is configurable to react
+ * on clicking of the column, double click of the row, and/or hitting enter while a row is selected.
+ *
+ * @ptype rowexpander
+ */
+Ext.ux.grid.RowExpander = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Boolean} expandOnEnter
+     * <tt>true</tt> to toggle selected row(s) between expanded/collapsed when the enter
+     * key is pressed (defaults to <tt>true</tt>).
+     */
+    expandOnEnter : true,
+    /**
+     * @cfg {Boolean} expandOnDblClick
+     * <tt>true</tt> to toggle a row between expanded/collapsed when double clicked
+     * (defaults to <tt>true</tt>).
+     */
+    expandOnDblClick : true,
+
+    header : '',
+    width : 20,
+    sortable : false,
+    fixed : true,
+    menuDisabled : true,
+    dataIndex : '',
+    id : 'expander',
+    lazyRender : true,
+    enableCaching : true,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+
+        this.addEvents({
+            /**
+             * @event beforeexpand
+             * Fires before the row expands. Have the listener return false to prevent the row from expanding.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            beforeexpand: true,
+            /**
+             * @event expand
+             * Fires after the row expands.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            expand: true,
+            /**
+             * @event beforecollapse
+             * Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            beforecollapse: true,
+            /**
+             * @event collapse
+             * Fires after the row collapses.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            collapse: true
+        });
+
+        Ext.ux.grid.RowExpander.superclass.constructor.call(this);
+
+        if(this.tpl){
+            if(typeof this.tpl == 'string'){
+                this.tpl = new Ext.Template(this.tpl);
+            }
+            this.tpl.compile();
+        }
+
+        this.state = {};
+        this.bodyContent = {};
+    },
+
+    getRowClass : function(record, rowIndex, p, ds){
+        p.cols = p.cols-1;
+        var content = this.bodyContent[record.id];
+        if(!content && !this.lazyRender){
+            content = this.getBodyContent(record, rowIndex);
+        }
+        if(content){
+            p.body = content;
+        }
+        return this.state[record.id] ? 'x-grid3-row-expanded' : 'x-grid3-row-collapsed';
+    },
+
+    init : function(grid){
+        this.grid = grid;
+
+        var view = grid.getView();
+        view.getRowClass = this.getRowClass.createDelegate(this);
+
+        view.enableRowBody = true;
+
+
+        grid.on('render', this.onRender, this);
+        grid.on('destroy', this.onDestroy, this);
+    },
+
+    // @private
+    onRender: function() {
+        var grid = this.grid;
+        var mainBody = grid.getView().mainBody;
+        mainBody.on('mousedown', this.onMouseDown, this, {delegate: '.x-grid3-row-expander'});
+        if (this.expandOnEnter) {
+            this.keyNav = new Ext.KeyNav(this.grid.getGridEl(), {
+                'enter' : this.onEnter,
+                scope: this
+            });
+        }
+        if (this.expandOnDblClick) {
+            grid.on('rowdblclick', this.onRowDblClick, this);
+        }
+    },
+    
+    // @private    
+    onDestroy: function() {
+        this.keyNav.disable();
+        delete this.keyNav;
+        var mainBody = this.grid.getView().mainBody;
+        mainBody.un('mousedown', this.onMouseDown, this);
+    },
+    // @private
+    onRowDblClick: function(grid, rowIdx, e) {
+        this.toggleRow(rowIdx);
+    },
+
+    onEnter: function(e) {
+        var g = this.grid;
+        var sm = g.getSelectionModel();
+        var sels = sm.getSelections();
+        for (var i = 0, len = sels.length; i < len; i++) {
+            var rowIdx = g.getStore().indexOf(sels[i]);
+            this.toggleRow(rowIdx);
+        }
+    },
+
+    getBodyContent : function(record, index){
+        if(!this.enableCaching){
+            return this.tpl.apply(record.data);
+        }
+        var content = this.bodyContent[record.id];
+        if(!content){
+            content = this.tpl.apply(record.data);
+            this.bodyContent[record.id] = content;
+        }
+        return content;
+    },
+
+    onMouseDown : function(e, t){
+        e.stopEvent();
+        var row = e.getTarget('.x-grid3-row');
+        this.toggleRow(row);
+    },
+
+    renderer : function(v, p, record){
+        p.cellAttr = 'rowspan="2"';
+        return '<div class="x-grid3-row-expander">&#160;</div>';
+    },
+
+    beforeExpand : function(record, body, rowIndex){
+        if(this.fireEvent('beforeexpand', this, record, body, rowIndex) !== false){
+            if(this.tpl && this.lazyRender){
+                body.innerHTML = this.getBodyContent(record, rowIndex);
+            }
+            return true;
+        }else{
+            return false;
+        }
+    },
+
+    toggleRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        this[Ext.fly(row).hasClass('x-grid3-row-collapsed') ? 'expandRow' : 'collapseRow'](row);
+    },
+
+    expandRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        var record = this.grid.store.getAt(row.rowIndex);
+        var body = Ext.DomQuery.selectNode('tr:nth(2) div.x-grid3-row-body', row);
+        if(this.beforeExpand(record, body, row.rowIndex)){
+            this.state[record.id] = true;
+            Ext.fly(row).replaceClass('x-grid3-row-collapsed', 'x-grid3-row-expanded');
+            this.fireEvent('expand', this, record, body, row.rowIndex);
+        }
+    },
+
+    collapseRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        var record = this.grid.store.getAt(row.rowIndex);
+        var body = Ext.fly(row).child('tr:nth(1) div.x-grid3-row-body', true);
+        if(this.fireEvent('beforecollapse', this, record, body, row.rowIndex) !== false){
+            this.state[record.id] = false;
+            Ext.fly(row).replaceClass('x-grid3-row-expanded', 'x-grid3-row-collapsed');
+            this.fireEvent('collapse', this, record, body, row.rowIndex);
+        }
+    }
+});
+
+Ext.preg('rowexpander', Ext.ux.grid.RowExpander);
+
+//backwards compat
+Ext.grid.RowExpander = Ext.ux.grid.RowExpander;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/RowLayout.js	(revision 625)
@@ -0,0 +1,128 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// We are adding these custom layouts to a namespace that does not
+// exist by default in Ext, so we have to add the namespace first:
+Ext.ns('Ext.ux.layout');
+
+/**
+ * @class Ext.ux.layout.RowLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is the layout style of choice for creating structural layouts in a multi-row format where the height of
+ * each row can be specified as a percentage or fixed height.  Row widths can also be fixed, percentage or auto.
+ * This class is intended to be extended or created via the layout:'ux.row' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>RowLayout does not have any direct config options (other than inherited ones), but it does support a
+ * specific config property of <b><tt>rowHeight</tt></b> that can be included in the config of any panel added to it.  The
+ * layout will use the rowHeight (if present) or height of each panel during layout to determine how to size each panel.
+ * If height or rowHeight is not specified for a given panel, its height will default to the panel's height (or auto).</p>
+ * <p>The height property is always evaluated as pixels, and must be a number greater than or equal to 1.
+ * The rowHeight property is always evaluated as a percentage, and must be a decimal value greater than 0 and
+ * less than 1 (e.g., .25).</p>
+ * <p>The basic rules for specifying row heights are pretty simple.  The logic makes two passes through the
+ * set of contained panels.  During the first layout pass, all panels that either have a fixed height or none
+ * specified (auto) are skipped, but their heights are subtracted from the overall container height.  During the second
+ * pass, all panels with rowHeights are assigned pixel heights in proportion to their percentages based on
+ * the total <b>remaining</b> container height.  In other words, percentage height panels are designed to fill the space
+ * left over by all the fixed-height and/or auto-height panels.  Because of this, while you can specify any number of rows
+ * with different percentages, the rowHeights must always add up to 1 (or 100%) when added together, otherwise your
+ * layout may not render as expected.  Example usage:</p>
+ * <pre><code>
+// All rows are percentages -- they must add up to 1
+var p = new Ext.Panel({
+    title: 'Row Layout - Percentage Only',
+    layout:'ux.row',
+    items: [{
+        title: 'Row 1',
+        rowHeight: .25
+    },{
+        title: 'Row 2',
+        rowHeight: .6
+    },{
+        title: 'Row 3',
+        rowHeight: .15
+    }]
+});
+
+// Mix of height and rowHeight -- all rowHeight values must add
+// up to 1. The first row will take up exactly 120px, and the last two
+// rows will fill the remaining container height.
+var p = new Ext.Panel({
+    title: 'Row Layout - Mixed',
+    layout:'ux.row',
+    items: [{
+        title: 'Row 1',
+        height: 120,
+        // standard panel widths are still supported too:
+        width: '50%' // or 200
+    },{
+        title: 'Row 2',
+        rowHeight: .8,
+        width: 300
+    },{
+        title: 'Row 3',
+        rowHeight: .2
+    }]
+});
+</code></pre>
+ */
+Ext.ux.layout.RowLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+
+    // private
+    isValidParent : function(c, target){
+        return c.getEl().dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var rs = ct.items.items, len = rs.length, r, i;
+
+        if(!this.innerCt){
+            target.addClass('ux-row-layout-ct');
+            this.innerCt = target.createChild({cls:'x-row-inner'});
+        }
+        this.renderAll(ct, this.innerCt);
+
+        var size = target.getViewSize();
+
+        if(size.width < 1 && size.height < 1){ // display none?
+            return;
+        }
+
+        var h = size.height - target.getPadding('tb'),
+            ph = h;
+
+        this.innerCt.setSize({height:h});
+
+        // some rows can be percentages while others are fixed
+        // so we need to make 2 passes
+
+        for(i = 0; i < len; i++){
+            r = rs[i];
+            if(!r.rowHeight){
+                ph -= (r.getSize().height + r.getEl().getMargins('tb'));
+            }
+        }
+
+        ph = ph < 0 ? 0 : ph;
+
+        for(i = 0; i < len; i++){
+            r = rs[i];
+            if(r.rowHeight){
+                r.setSize({height: Math.floor(r.rowHeight*ph) - r.getEl().getMargins('tb')});
+            }
+        }
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['ux.row'] = Ext.ux.layout.RowLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SearchField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SearchField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SearchField.js	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.form');
+
+Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
+    initComponent : function(){
+        Ext.ux.form.SearchField.superclass.initComponent.call(this);
+        this.on('specialkey', function(f, e){
+            if(e.getKey() == e.ENTER){
+                this.onTrigger2Click();
+            }
+        }, this);
+    },
+
+    validationEvent:false,
+    validateOnBlur:false,
+    trigger1Class:'x-form-clear-trigger',
+    trigger2Class:'x-form-search-trigger',
+    hideTrigger1:true,
+    width:180,
+    hasSearch : false,
+    paramName : 'query',
+
+    onTrigger1Click : function(){
+        if(this.hasSearch){
+            this.el.dom.value = '';
+            var o = {start: 0};
+            this.store.baseParams = this.store.baseParams || {};
+            this.store.baseParams[this.paramName] = '';
+            this.store.reload({params:o});
+            this.triggers[0].hide();
+            this.hasSearch = false;
+        }
+    },
+
+    onTrigger2Click : function(){
+        var v = this.getRawValue();
+        if(v.length < 1){
+            this.onTrigger1Click();
+            return;
+        }
+        var o = {start: 0};
+        this.store.baseParams = this.store.baseParams || {};
+        this.store.baseParams[this.paramName] = v;
+        this.store.reload({params:o});
+        this.hasSearch = true;
+        this.triggers[0].show();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SelectBox.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SelectBox.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SelectBox.js	(revision 625)
@@ -0,0 +1,203 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.SelectBox
+ * @extends Ext.form.ComboBox
+ * <p>Makes a ComboBox more closely mimic an HTML SELECT.  Supports clicking and dragging
+ * through the list, with item selection occurring when the mouse button is released.
+ * When used will automatically set {@link #editable} to false and call {@link Ext.Element#unselectable}
+ * on inner elements.  Re-enabling editable after calling this will NOT work.</p>
+ * @author Corey Gilmore http://extjs.com/forum/showthread.php?t=6392
+ * @history 2007-07-08 jvs
+ * Slight mods for Ext 2.0
+ * @xtype selectbox
+ */
+Ext.ux.form.SelectBox = Ext.extend(Ext.form.ComboBox, {
+	constructor: function(config){
+		this.searchResetDelay = 1000;
+		config = config || {};
+		config = Ext.apply(config || {}, {
+			editable: false,
+			forceSelection: true,
+			rowHeight: false,
+			lastSearchTerm: false,
+			triggerAction: 'all',
+			mode: 'local'
+		});
+
+		Ext.ux.form.SelectBox.superclass.constructor.apply(this, arguments);
+
+		this.lastSelectedIndex = this.selectedIndex || 0;
+	},
+
+	initEvents : function(){
+		Ext.ux.form.SelectBox.superclass.initEvents.apply(this, arguments);
+		// you need to use keypress to capture upper/lower case and shift+key, but it doesn't work in IE
+		this.el.on('keydown', this.keySearch, this, true);
+		this.cshTask = new Ext.util.DelayedTask(this.clearSearchHistory, this);
+	},
+
+	keySearch : function(e, target, options) {
+		var raw = e.getKey();
+		var key = String.fromCharCode(raw);
+		var startIndex = 0;
+
+		if( !this.store.getCount() ) {
+			return;
+		}
+
+		switch(raw) {
+			case Ext.EventObject.HOME:
+				e.stopEvent();
+				this.selectFirst();
+				return;
+
+			case Ext.EventObject.END:
+				e.stopEvent();
+				this.selectLast();
+				return;
+
+			case Ext.EventObject.PAGEDOWN:
+				this.selectNextPage();
+				e.stopEvent();
+				return;
+
+			case Ext.EventObject.PAGEUP:
+				this.selectPrevPage();
+				e.stopEvent();
+				return;
+		}
+
+		// skip special keys other than the shift key
+		if( (e.hasModifier() && !e.shiftKey) || e.isNavKeyPress() || e.isSpecialKey() ) {
+			return;
+		}
+		if( this.lastSearchTerm == key ) {
+			startIndex = this.lastSelectedIndex;
+		}
+		this.search(this.displayField, key, startIndex);
+		this.cshTask.delay(this.searchResetDelay);
+	},
+
+	onRender : function(ct, position) {
+		this.store.on('load', this.calcRowsPerPage, this);
+		Ext.ux.form.SelectBox.superclass.onRender.apply(this, arguments);
+		if( this.mode == 'local' ) {
+			this.calcRowsPerPage();
+		}
+	},
+
+	onSelect : function(record, index, skipCollapse){
+		if(this.fireEvent('beforeselect', this, record, index) !== false){
+			this.setValue(record.data[this.valueField || this.displayField]);
+			if( !skipCollapse ) {
+				this.collapse();
+			}
+			this.lastSelectedIndex = index + 1;
+			this.fireEvent('select', this, record, index);
+		}
+	},
+
+	render : function(ct) {
+		Ext.ux.form.SelectBox.superclass.render.apply(this, arguments);
+		if( Ext.isSafari ) {
+			this.el.swallowEvent('mousedown', true);
+		}
+		this.el.unselectable();
+		this.innerList.unselectable();
+		this.trigger.unselectable();
+		this.innerList.on('mouseup', function(e, target, options) {
+			if( target.id && target.id == this.innerList.id ) {
+				return;
+			}
+			this.onViewClick();
+		}, this);
+
+		this.innerList.on('mouseover', function(e, target, options) {
+			if( target.id && target.id == this.innerList.id ) {
+				return;
+			}
+			this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1;
+			this.cshTask.delay(this.searchResetDelay);
+		}, this);
+
+		this.trigger.un('click', this.onTriggerClick, this);
+		this.trigger.on('mousedown', function(e, target, options) {
+			e.preventDefault();
+			this.onTriggerClick();
+		}, this);
+
+		this.on('collapse', function(e, target, options) {
+			Ext.getDoc().un('mouseup', this.collapseIf, this);
+		}, this, true);
+
+		this.on('expand', function(e, target, options) {
+			Ext.getDoc().on('mouseup', this.collapseIf, this);
+		}, this, true);
+	},
+
+	clearSearchHistory : function() {
+		this.lastSelectedIndex = 0;
+		this.lastSearchTerm = false;
+	},
+
+	selectFirst : function() {
+		this.focusAndSelect(this.store.data.first());
+	},
+
+	selectLast : function() {
+		this.focusAndSelect(this.store.data.last());
+	},
+
+	selectPrevPage : function() {
+		if( !this.rowHeight ) {
+			return;
+		}
+		var index = Math.max(this.selectedIndex-this.rowsPerPage, 0);
+		this.focusAndSelect(this.store.getAt(index));
+	},
+
+	selectNextPage : function() {
+		if( !this.rowHeight ) {
+			return;
+		}
+		var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1);
+		this.focusAndSelect(this.store.getAt(index));
+	},
+
+	search : function(field, value, startIndex) {
+		field = field || this.displayField;
+		this.lastSearchTerm = value;
+		var index = this.store.find.apply(this.store, arguments);
+		if( index !== -1 ) {
+			this.focusAndSelect(index);
+		}
+	},
+
+	focusAndSelect : function(record) {
+		var index = typeof record === 'number' ? record : this.store.indexOf(record);
+		this.select(index, this.isExpanded());
+		this.onSelect(this.store.getAt(record), index, this.isExpanded());
+	},
+
+	calcRowsPerPage : function() {
+		if( this.store.getCount() ) {
+			this.rowHeight = Ext.fly(this.view.getNode(0)).getHeight();
+			this.rowsPerPage = this.maxHeight / this.rowHeight;
+		} else {
+			this.rowHeight = false;
+		}
+	}
+
+});
+
+Ext.reg('selectbox', Ext.ux.form.SelectBox);
+
+//backwards compat
+Ext.ux.SelectBox = Ext.ux.form.SelectBox;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SliderTip.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SliderTip.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SliderTip.js	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.SliderTip
+ * @extends Ext.Tip
+ * Simple plugin for using an Ext.Tip with a slider to show the slider value
+ */
+Ext.ux.SliderTip = Ext.extend(Ext.Tip, {
+    minWidth: 10,
+    offsets : [0, -10],
+    init : function(slider){
+        slider.on('dragstart', this.onSlide, this);
+        slider.on('drag', this.onSlide, this);
+        slider.on('dragend', this.hide, this);
+        slider.on('destroy', this.destroy, this);
+    },
+
+    onSlide : function(slider){
+        this.show();
+        this.body.update(this.getText(slider));
+        this.doAutoWidth();
+        this.el.alignTo(slider.thumb, 'b-t?', this.offsets);
+    },
+
+    getText : function(slider){
+        return String(slider.getValue());
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SlidingPager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SlidingPager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SlidingPager.js	(revision 625)
@@ -0,0 +1,38 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.SlidingPager = Ext.extend(Object, {
+    init : function(pbar){
+        Ext.each(pbar.items.getRange(2,6), function(c){
+            c.hide();
+        });
+        var slider = new Ext.Slider({
+            width: 114,
+            minValue: 1,
+            maxValue: 1,
+            plugins: new Ext.ux.SliderTip({
+                getText : function(s){
+                    return String.format('Page <b>{0}</b> of <b>{1}</b>', s.value, s.maxValue);
+                }
+            }),
+            listeners: {
+                changecomplete: function(s, v){
+                    pbar.changePage(v);
+                }
+            }
+        });
+        pbar.insert(5, slider);
+        pbar.on({
+            change: function(pb, data){
+                slider.maxValue = data.pages;
+                slider.setValue(data.activePage);
+            },
+            beforedestroy: function(){
+                slider.destroy();
+            }
+        });
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spinner.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spinner.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spinner.js	(revision 625)
@@ -0,0 +1,438 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.Spinner
+ * @extends Ext.util.Observable
+ * Creates a Spinner control utilized by Ext.ux.form.SpinnerField
+ */
+Ext.ux.Spinner = Ext.extend(Ext.util.Observable, {
+    incrementValue: 1,
+    alternateIncrementValue: 5,
+    triggerClass: 'x-form-spinner-trigger',
+    splitterClass: 'x-form-spinner-splitter',
+    alternateKey: Ext.EventObject.shiftKey,
+    defaultValue: 0,
+    accelerate: false,
+
+    constructor: function(config){
+        Ext.ux.Spinner.superclass.constructor.call(this, config);
+        Ext.apply(this, config);
+        this.mimicing = false;
+    },
+
+    init: function(field){
+        this.field = field;
+
+        field.afterMethod('onRender', this.doRender, this);
+        field.afterMethod('onEnable', this.doEnable, this);
+        field.afterMethod('onDisable', this.doDisable, this);
+        field.afterMethod('afterRender', this.doAfterRender, this);
+        field.afterMethod('onResize', this.doResize, this);
+        field.afterMethod('onFocus', this.doFocus, this);
+        field.beforeMethod('onDestroy', this.doDestroy, this);
+    },
+
+    doRender: function(ct, position){
+        var el = this.el = this.field.getEl();
+        var f = this.field;
+
+        if (!f.wrap) {
+            f.wrap = this.wrap = el.wrap({
+                cls: "x-form-field-wrap"
+            });
+        }
+        else {
+            this.wrap = f.wrap.addClass('x-form-field-wrap');
+        }
+
+        this.trigger = this.wrap.createChild({
+            tag: "img",
+            src: Ext.BLANK_IMAGE_URL,
+            cls: "x-form-trigger " + this.triggerClass
+        });
+
+        if (!f.width) {
+            this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
+        }
+
+        this.splitter = this.wrap.createChild({
+            tag: 'div',
+            cls: this.splitterClass,
+            style: 'width:13px; height:2px;'
+        });
+        this.splitter.setRight((Ext.isIE) ? 1 : 2).setTop(10).show();
+
+        this.proxy = this.trigger.createProxy('', this.splitter, true);
+        this.proxy.addClass("x-form-spinner-proxy");
+        this.proxy.setStyle('left', '0px');
+        this.proxy.setSize(14, 1);
+        this.proxy.hide();
+        this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
+            dragElId: this.proxy.id
+        });
+
+        this.initTrigger();
+        this.initSpinner();
+    },
+
+    doAfterRender: function(){
+        var y;
+        if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
+            this.el.position();
+            this.el.setY(y);
+        }
+    },
+
+    doEnable: function(){
+        if (this.wrap) {
+            this.wrap.removeClass(this.field.disabledClass);
+        }
+    },
+
+    doDisable: function(){
+        if (this.wrap) {
+            this.wrap.addClass(this.field.disabledClass);
+            this.el.removeClass(this.field.disabledClass);
+        }
+    },
+
+    doResize: function(w, h){
+        if (typeof w == 'number') {
+            this.el.setWidth(this.field.adjustWidth('input', w - this.trigger.getWidth()));
+        }
+        this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
+    },
+
+    doFocus: function(){
+        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
+            });
+            this.el.on('keydown', this.checkTab, this);
+        }
+    },
+
+    // private
+    checkTab: function(e){
+        if (e.getKey() == e.TAB) {
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    mimicBlur: function(e){
+        if (!this.wrap.contains(e.target) && this.field.validateBlur(e)) {
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    triggerBlur: function(){
+        this.mimicing = false;
+        Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        this.el.un("keydown", this.checkTab, this);
+        this.field.beforeBlur();
+        this.wrap.removeClass('x-trigger-wrap-focus');
+        this.field.onBlur.call(this.field);
+    },
+
+    initTrigger: function(){
+        this.trigger.addClassOnOver('x-form-trigger-over');
+        this.trigger.addClassOnClick('x-form-trigger-click');
+    },
+
+    initSpinner: function(){
+        this.field.addEvents({
+            'spin': true,
+            'spinup': true,
+            'spindown': true
+        });
+
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up": function(e){
+                e.preventDefault();
+                this.onSpinUp();
+            },
+
+            "down": function(e){
+                e.preventDefault();
+                this.onSpinDown();
+            },
+
+            "pageUp": function(e){
+                e.preventDefault();
+                this.onSpinUpAlternate();
+            },
+
+            "pageDown": function(e){
+                e.preventDefault();
+                this.onSpinDownAlternate();
+            },
+
+            scope: this
+        });
+
+        this.repeater = new Ext.util.ClickRepeater(this.trigger, {
+            accelerate: this.accelerate
+        });
+        this.field.mon(this.repeater, "click", this.onTriggerClick, this, {
+            preventDefault: true
+        });
+
+        this.field.mon(this.trigger, {
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut,
+            mousemove: this.onMouseMove,
+            mousedown: this.onMouseDown,
+            mouseup: this.onMouseUp,
+            scope: this,
+            preventDefault: true
+        });
+
+        this.field.mon(this.wrap, "mousewheel", this.handleMouseWheel, this);
+
+        this.dd.setXConstraint(0, 0, 10)
+        this.dd.setYConstraint(1500, 1500, 10);
+        this.dd.endDrag = this.endDrag.createDelegate(this);
+        this.dd.startDrag = this.startDrag.createDelegate(this);
+        this.dd.onDrag = this.onDrag.createDelegate(this);
+    },
+
+    onMouseOver: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        this.tmpHoverClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
+        this.trigger.addClass(this.tmpHoverClass);
+    },
+
+    //private
+    onMouseOut: function(){
+        this.trigger.removeClass(this.tmpHoverClass);
+    },
+
+    //private
+    onMouseMove: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        if (((Ext.EventObject.getPageY() > middle) && this.tmpHoverClass == "x-form-spinner-overup") ||
+        ((Ext.EventObject.getPageY() < middle) && this.tmpHoverClass == "x-form-spinner-overdown")) {
+        }
+    },
+
+    //private
+    onMouseDown: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        this.tmpClickClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
+        this.trigger.addClass(this.tmpClickClass);
+    },
+
+    //private
+    onMouseUp: function(){
+        this.trigger.removeClass(this.tmpClickClass);
+    },
+
+    //private
+    onTriggerClick: function(){
+        if (this.disabled || this.el.dom.readOnly) {
+            return;
+        }
+        var middle = this.getMiddle();
+        var ud = (Ext.EventObject.getPageY() < middle) ? 'Up' : 'Down';
+        this['onSpin' + ud]();
+    },
+
+    //private
+    getMiddle: function(){
+        var t = this.trigger.getTop();
+        var h = this.trigger.getHeight();
+        var middle = t + (h / 2);
+        return middle;
+    },
+
+    //private
+    //checks if control is allowed to spin
+    isSpinnable: function(){
+        if (this.disabled || this.el.dom.readOnly) {
+            Ext.EventObject.preventDefault(); //prevent scrolling when disabled/readonly
+            return false;
+        }
+        return true;
+    },
+
+    handleMouseWheel: function(e){
+        //disable scrolling when not focused
+        if (this.wrap.hasClass('x-trigger-wrap-focus') == false) {
+            return;
+        }
+
+        var delta = e.getWheelDelta();
+        if (delta > 0) {
+            this.onSpinUp();
+            e.stopEvent();
+        }
+        else
+            if (delta < 0) {
+                this.onSpinDown();
+                e.stopEvent();
+            }
+    },
+
+    //private
+    startDrag: function(){
+        this.proxy.show();
+        this._previousY = Ext.fly(this.dd.getDragEl()).getTop();
+    },
+
+    //private
+    endDrag: function(){
+        this.proxy.hide();
+    },
+
+    //private
+    onDrag: function(){
+        if (this.disabled) {
+            return;
+        }
+        var y = Ext.fly(this.dd.getDragEl()).getTop();
+        var ud = '';
+
+        if (this._previousY > y) {
+            ud = 'Up';
+        } //up
+        if (this._previousY < y) {
+            ud = 'Down';
+        } //down
+        if (ud != '') {
+            this['onSpin' + ud]();
+        }
+
+        this._previousY = y;
+    },
+
+    //private
+    onSpinUp: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        if (Ext.EventObject.shiftKey == true) {
+            this.onSpinUpAlternate();
+            return;
+        }
+        else {
+            this.spin(false, false);
+        }
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spinup", this);
+    },
+
+    //private
+    onSpinDown: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        if (Ext.EventObject.shiftKey == true) {
+            this.onSpinDownAlternate();
+            return;
+        }
+        else {
+            this.spin(true, false);
+        }
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spindown", this);
+    },
+
+    //private
+    onSpinUpAlternate: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        this.spin(false, true);
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spinup", this);
+    },
+
+    //private
+    onSpinDownAlternate: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        this.spin(true, true);
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spindown", this);
+    },
+
+    spin: function(down, alternate){
+        var v = parseFloat(this.field.getValue());
+        var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
+        (down == true) ? v -= incr : v += incr;
+
+        v = (isNaN(v)) ? this.defaultValue : v;
+        v = this.fixBoundries(v);
+        this.field.setRawValue(v);
+    },
+
+    fixBoundries: function(value){
+        var v = value;
+
+        if (this.field.minValue != undefined && v < this.field.minValue) {
+            v = this.field.minValue;
+        }
+        if (this.field.maxValue != undefined && v > this.field.maxValue) {
+            v = this.field.maxValue;
+        }
+
+        return this.fixPrecision(v);
+    },
+
+    // private
+    fixPrecision: function(value){
+        var nan = isNaN(value);
+        if (!this.field.allowDecimals || this.field.decimalPrecision == -1 || nan || !value) {
+            return nan ? '' : value;
+        }
+        return parseFloat(parseFloat(value).toFixed(this.field.decimalPrecision));
+    },
+
+    doDestroy: function(){
+        if (this.trigger) {
+            this.trigger.remove();
+        }
+        if (this.wrap) {
+            this.wrap.remove();
+            delete this.field.wrap;
+        }
+
+        if (this.splitter) {
+            this.splitter.remove();
+        }
+
+        if (this.dd) {
+            this.dd.unreg();
+            this.dd = null;
+        }
+
+        if (this.proxy) {
+            this.proxy.remove();
+        }
+
+        if (this.repeater) {
+            this.repeater.purgeListeners();
+        }
+    }
+});
+
+//backwards compat
+Ext.form.Spinner = Ext.ux.Spinner;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SpinnerField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SpinnerField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/SpinnerField.js	(revision 625)
@@ -0,0 +1,71 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.SpinnerField
+ * @extends Ext.form.NumberField
+ * Creates a field utilizing Ext.ux.Spinner
+ * @xtype spinnerfield
+ */
+Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
+    deferHeight: true,
+    autoSize: Ext.emptyFn,
+    onBlur: Ext.emptyFn,
+    adjustSize: Ext.BoxComponent.prototype.adjustSize,
+
+	constructor: function(config) {
+		var spinnerConfig = Ext.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');
+
+		var spl = this.spinner = new Ext.ux.Spinner(spinnerConfig);
+
+		var plugins = config.plugins
+			? (Ext.isArray(config.plugins)
+				? config.plugins.push(spl)
+				: [config.plugins, spl])
+			: spl;
+
+		Ext.ux.form.SpinnerField.superclass.constructor.call(this, Ext.apply(config, {plugins: plugins}));
+	},
+
+    onShow: function(){
+        if (this.wrap) {
+            this.wrap.dom.style.display = '';
+            this.wrap.dom.style.visibility = 'visible';
+        }
+    },
+
+    onHide: function(){
+        this.wrap.dom.style.display = 'none';
+    },
+
+    // private
+    getResizeEl: function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl: function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon: function(){
+        if (this.wrap) {
+            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+        }
+    },
+
+    validateBlur: function(){
+        return true;
+    }
+});
+
+Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
+
+//backwards compat
+Ext.form.SpinnerField = Ext.ux.form.SpinnerField;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spotlight.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spotlight.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/Spotlight.js	(revision 625)
@@ -0,0 +1,146 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ux.Spotlight = function(config){
+    Ext.apply(this, config);
+}
+Ext.ux.Spotlight.prototype = {
+    active : false,
+    animate : true,
+    duration: .25,
+    easing:'easeNone',
+
+    // private
+    animated : false,
+
+    createElements : function(){
+        var bd = Ext.getBody();
+
+        this.right = bd.createChild({cls:'x-spotlight'});
+        this.left = bd.createChild({cls:'x-spotlight'});
+        this.top = bd.createChild({cls:'x-spotlight'});
+        this.bottom = bd.createChild({cls:'x-spotlight'});
+
+        this.all = new Ext.CompositeElement([this.right, this.left, this.top, this.bottom]);
+    },
+
+    show : function(el, callback, scope){
+        if(this.animated){
+            this.show.defer(50, this, [el, callback, scope]);
+            return;
+        }
+        this.el = Ext.get(el);
+        if(!this.right){
+            this.createElements();
+        }
+        if(!this.active){
+            this.all.setDisplayed('');
+            this.applyBounds(true, false);
+            this.active = true;
+            Ext.EventManager.onWindowResize(this.syncSize, this);
+            this.applyBounds(false, this.animate, false, callback, scope);
+        }else{
+            this.applyBounds(false, false, false, callback, scope); // all these booleans look hideous
+        }
+    },
+
+    hide : function(callback, scope){
+        if(this.animated){
+            this.hide.defer(50, this, [callback, scope]);
+            return;
+        }
+        Ext.EventManager.removeResizeListener(this.syncSize, this);
+        this.applyBounds(true, this.animate, true, callback, scope);
+    },
+
+    doHide : function(){
+        this.active = false;
+        this.all.setDisplayed(false);
+    },
+
+    syncSize : function(){
+        this.applyBounds(false, false);
+    },
+
+    applyBounds : function(basePts, anim, doHide, callback, scope){
+
+        var rg = this.el.getRegion();
+
+        var dw = Ext.lib.Dom.getViewWidth(true);
+        var dh = Ext.lib.Dom.getViewHeight(true);
+
+        var c = 0, cb = false;
+        if(anim){
+            cb = {
+                callback: function(){
+                    c++;
+                    if(c == 4){
+                        this.animated = false;
+                        if(doHide){
+                            this.doHide();
+                        }
+                        Ext.callback(callback, scope, [this]);
+                    }
+                },
+                scope: this,
+                duration: this.duration,
+                easing: this.easing
+            };
+            this.animated = true;
+        }
+
+        this.right.setBounds(
+                rg.right,
+                basePts ? dh : rg.top,
+                dw - rg.right,
+                basePts ? 0 : (dh - rg.top),
+                cb);
+
+        this.left.setBounds(
+                0,
+                0,
+                rg.left,
+                basePts ? 0 : rg.bottom,
+                cb);
+
+        this.top.setBounds(
+                basePts ? dw : rg.left,
+                0,
+                basePts ? 0 : dw - rg.left,
+                rg.top,
+                cb);
+
+        this.bottom.setBounds(
+                0,
+                rg.bottom,
+                basePts ? 0 : rg.right,
+                dh - rg.bottom,
+                cb);
+
+        if(!anim){
+            if(doHide){
+                this.doHide();
+            }
+            if(callback){
+                Ext.callback(callback, scope, [this]);
+            }
+        }
+    },
+
+    destroy : function(){
+        this.doHide();
+        Ext.destroy(
+            this.right,
+            this.left,
+            this.top,
+            this.bottom);
+        delete this.el;
+        delete this.all;
+    }
+};
+
+//backwards compat
+Ext.Spotlight = Ext.ux.Spotlight;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/StatusBar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/StatusBar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/StatusBar.js	(revision 625)
@@ -0,0 +1,409 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.StatusBar
+ * <p>Basic status bar component that can be used as the bottom toolbar of any {@link Ext.Panel}.  In addition to
+ * supporting the standard {@link Ext.Toolbar} interface for adding buttons, menus and other items, the StatusBar
+ * provides a greedy status element that can be aligned to either side and has convenient methods for setting the
+ * status text and icon.  You can also indicate that something is processing using the {@link #showBusy} method.</p>
+ * <p><b>Note:</b> Although StatusBar supports xtype:'statusbar', at this time Ext.Toolbar (the base class) does
+ * not support xtype.  For this reason, if you are adding Toolbar items into the StatusBar you must declare it
+ * using the "new StatusBar()" syntax for the items to render correctly.</p>
+ * <pre><code>
+new Ext.Panel({
+    title: 'StatusBar',
+    // etc.
+    bbar: new Ext.ux.StatusBar({
+        id: 'my-status',
+
+        // defaults to use when the status is cleared:
+        defaultText: 'Default status text',
+        defaultIconCls: 'default-icon',
+
+        // values to set initially:
+        text: 'Ready',
+        iconCls: 'ready-icon',
+
+        // any standard Toolbar items:
+        items: [{
+            text: 'A Button'
+        }, '-', 'Plain Text']
+    })
+});
+
+// Update the status bar later in code:
+var sb = Ext.getCmp('my-status');
+sb.setStatus({
+    text: 'OK',
+    iconCls: 'ok-icon',
+    clear: true // auto-clear after a set interval
+});
+
+// Set the status bar to show that something is processing:
+sb.showBusy();
+
+// processing....
+
+sb.clearStatus(); // once completeed
+</code></pre>
+ * @extends Ext.Toolbar
+ * @constructor
+ * Creates a new StatusBar
+ * @param {Object/Array} config A config object
+ */
+Ext.ux.StatusBar = Ext.extend(Ext.Toolbar, {
+    /**
+     * @cfg {String} statusAlign
+     * The alignment of the status element within the overall StatusBar layout.  When the StatusBar is rendered,
+     * it creates an internal div containing the status text and icon.  Any additional Toolbar items added in the
+     * StatusBar's {@link #items} config, or added via {@link #add} or any of the supported add* methods, will be
+     * rendered, in added order, to the opposite side.  The status element is greedy, so it will automatically
+     * expand to take up all sapce left over by any other items.  Example usage:
+     * <pre><code>
+// Create a left-aligned status bar containing a button,
+// separator and text item that will be right-aligned (default):
+new Ext.Panel({
+    title: 'StatusBar',
+    // etc.
+    bbar: new Ext.ux.StatusBar({
+        defaultText: 'Default status text',
+        id: 'status-id',
+        items: [{
+            text: 'A Button'
+        }, '-', 'Plain Text']
+    })
+});
+
+// By adding the statusAlign config, this will create the
+// exact same toolbar, except the status and toolbar item
+// layout will be reversed from the previous example:
+new Ext.Panel({
+    title: 'StatusBar',
+    // etc.
+    bbar: new Ext.ux.StatusBar({
+        defaultText: 'Default status text',
+        id: 'status-id',
+        statusAlign: 'right',
+        items: [{
+            text: 'A Button'
+        }, '-', 'Plain Text']
+    })
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} defaultText
+     * The default {@link #text} value.  This will be used anytime the status bar is cleared with the
+     * <tt>useDefaults:true</tt> option (defaults to '').
+     */
+    /**
+     * @cfg {String} defaultIconCls
+     * The default {@link #iconCls} value (see the iconCls docs for additional details about customizing the icon).
+     * This will be used anytime the status bar is cleared with the <tt>useDefaults:true</tt> option (defaults to '').
+     */
+    /**
+     * @cfg {String} text
+     * A string that will be rendered into the status element as the status message (defaults to '');
+     */
+    /**
+     * @cfg {String} iconCls
+     * A CSS class that will be applied to the status element and is expected to provide a background image that will
+     * serve as the status bar icon (defaults to '').  The class is applied directly to the div that also contains the
+     * status text, so the rule should provide the appropriate padding on the div to make room for the image.
+     * Example usage:<pre><code>
+// Example CSS rule:
+.x-statusbar .x-status-custom {
+    padding-left: 25px;
+    background: transparent url(images/custom-icon.gif) no-repeat 3px 3px;
+}
+
+// Initializing the status bar:
+var sb = new Ext.ux.StatusBar({
+    defaultIconCls: 'x-status-custom'
+});
+
+// Setting it in code:
+sb.setStatus({
+    text: 'New status',
+    iconCls: 'x-status-custom'
+});
+</code></pre>
+     */
+
+    /**
+     * @cfg {String} cls
+     * The base class applied to the containing element for this component on render (defaults to 'x-statusbar')
+     */
+    cls : 'x-statusbar',
+    /**
+     * @cfg {String} busyIconCls
+     * The default {@link #iconCls} applied when calling {@link #showBusy} (defaults to 'x-status-busy'). It can be
+     * overridden at any time by passing the <tt>iconCls</tt> argument into <tt>showBusy</tt>. See the
+     * iconCls docs for additional details about customizing the icon.
+     */
+    busyIconCls : 'x-status-busy',
+    /**
+     * @cfg {String} busyText
+     * The default {@link #text} applied when calling {@link #showBusy} (defaults to 'Loading...'). It can be
+     * overridden at any time by passing the <tt>text</tt> argument into <tt>showBusy</tt>.
+     */
+    busyText : 'Loading...',
+    /**
+     * @cfg {Number} autoClear
+     * The number of milliseconds to wait after setting the status via {@link #setStatus} before automatically
+     * clearing the status text and icon (defaults to 5000).  Note that this only applies when passing the
+     * <tt>clear</tt> argument to setStatus since that is the only way to defer clearing the status.  This can
+     * be overridden by specifying a different <tt>wait</tt> value in setStatus. Calls to {@link #clearStatus}
+     * always clear the status bar immediately and ignore this value.
+     */
+    autoClear : 5000,
+
+    // private
+    activeThreadId : 0,
+
+    // private
+    initComponent : function(){
+        if(this.statusAlign=='right'){
+            this.cls += ' x-status-right';
+        }
+        Ext.ux.StatusBar.superclass.initComponent.call(this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ux.StatusBar.superclass.afterRender.call(this);
+
+        var right = this.statusAlign == 'right';
+        this.statusEl = new Ext.Toolbar.TextItem({
+            cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''),
+            text: this.text || this.defaultText || ''
+        });
+
+        if(right){
+            this.add('->');
+            this.add(this.statusEl);
+        }else{
+            this.insert(0, this.statusEl);
+            this.insert(1, '->');
+        }
+
+//         this.statusEl = td.createChild({
+//             cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''),
+//             html: this.text || this.defaultText || ''
+//         });
+//         this.statusEl.unselectable();
+
+//         this.spacerEl = td.insertSibling({
+//             tag: 'td',
+//             style: 'width:100%',
+//             cn: [{cls:'ytb-spacer'}]
+//         }, right ? 'before' : 'after');
+    },
+
+    /**
+     * Sets the status {@link #text} and/or {@link #iconCls}. Also supports automatically clearing the
+     * status that was set after a specified interval.
+     * @param {Object/String} config A config object specifying what status to set, or a string assumed
+     * to be the status text (and all other options are defaulted as explained below). A config
+     * object containing any or all of the following properties can be passed:<ul>
+     * <li><tt>text</tt> {String} : (optional) The status text to display.  If not specified, any current
+     * status text will remain unchanged.</li>
+     * <li><tt>iconCls</tt> {String} : (optional) The CSS class used to customize the status icon (see
+     * {@link #iconCls} for details). If not specified, any current iconCls will remain unchanged.</li>
+     * <li><tt>clear</tt> {Boolean/Number/Object} : (optional) Allows you to set an internal callback that will
+     * automatically clear the status text and iconCls after a specified amount of time has passed. If clear is not
+     * specified, the new status will not be auto-cleared and will stay until updated again or cleared using
+     * {@link #clearStatus}. If <tt>true</tt> is passed, the status will be cleared using {@link #autoClear},
+     * {@link #defaultText} and {@link #defaultIconCls} via a fade out animation. If a numeric value is passed,
+     * it will be used as the callback interval (in milliseconds), overriding the {@link #autoClear} value.
+     * All other options will be defaulted as with the boolean option.  To customize any other options,
+     * you can pass an object in the format:<ul>
+     *    <li><tt>wait</tt> {Number} : (optional) The number of milliseconds to wait before clearing
+     *    (defaults to {@link #autoClear}).</li>
+     *    <li><tt>anim</tt> {Number} : (optional) False to clear the status immediately once the callback
+     *    executes (defaults to true which fades the status out).</li>
+     *    <li><tt>useDefaults</tt> {Number} : (optional) False to completely clear the status text and iconCls
+     *    (defaults to true which uses {@link #defaultText} and {@link #defaultIconCls}).</li>
+     * </ul></li></ul>
+     * Example usage:<pre><code>
+// Simple call to update the text
+statusBar.setStatus('New status');
+
+// Set the status and icon, auto-clearing with default options:
+statusBar.setStatus({
+    text: 'New status',
+    iconCls: 'x-status-custom',
+    clear: true
+});
+
+// Auto-clear with custom options:
+statusBar.setStatus({
+    text: 'New status',
+    iconCls: 'x-status-custom',
+    clear: {
+        wait: 8000,
+        anim: false,
+        useDefaults: false
+    }
+});
+</code></pre>
+     * @return {Ext.ux.StatusBar} this
+     */
+    setStatus : function(o){
+        o = o || {};
+
+        if(typeof o == 'string'){
+            o = {text:o};
+        }
+        if(o.text !== undefined){
+            this.setText(o.text);
+        }
+        if(o.iconCls !== undefined){
+            this.setIcon(o.iconCls);
+        }
+
+        if(o.clear){
+            var c = o.clear,
+                wait = this.autoClear,
+                defaults = {useDefaults: true, anim: true};
+
+            if(typeof c == 'object'){
+                c = Ext.applyIf(c, defaults);
+                if(c.wait){
+                    wait = c.wait;
+                }
+            }else if(typeof c == 'number'){
+                wait = c;
+                c = defaults;
+            }else if(typeof c == 'boolean'){
+                c = defaults;
+            }
+
+            c.threadId = this.activeThreadId;
+            this.clearStatus.defer(wait, this, [c]);
+        }
+        return this;
+    },
+
+    /**
+     * Clears the status {@link #text} and {@link #iconCls}. Also supports clearing via an optional fade out animation.
+     * @param {Object} config (optional) A config object containing any or all of the following properties.  If this
+     * object is not specified the status will be cleared using the defaults below:<ul>
+     * <li><tt>anim</tt> {Boolean} : (optional) True to clear the status by fading out the status element (defaults
+     * to false which clears immediately).</li>
+     * <li><tt>useDefaults</tt> {Boolean} : (optional) True to reset the text and icon using {@link #defaultText} and
+     * {@link #defaultIconCls} (defaults to false which sets the text to '' and removes any existing icon class).</li>
+     * </ul>
+     * @return {Ext.ux.StatusBar} this
+     */
+    clearStatus : function(o){
+        o = o || {};
+
+        if(o.threadId && o.threadId !== this.activeThreadId){
+            // this means the current call was made internally, but a newer
+            // thread has set a message since this call was deferred.  Since
+            // we don't want to overwrite a newer message just ignore.
+            return this;
+        }
+
+        var text = o.useDefaults ? this.defaultText : '',
+            iconCls = o.useDefaults ? (this.defaultIconCls ? this.defaultIconCls : '') : '';
+
+        if(o.anim){
+            this.statusEl.fadeOut({
+                remove: false,
+                useDisplay: true,
+                scope: this,
+                callback: function(){
+                    this.setStatus({
+	                    text: text,
+	                    iconCls: iconCls
+	                });
+                    this.statusEl.show();
+                }
+            });
+        }else{
+            // hide/show the el to avoid jumpy text or icon
+            this.statusEl.hide();
+	        this.setStatus({
+	            text: text,
+	            iconCls: iconCls
+	        });
+            this.statusEl.show();
+        }
+        return this;
+    },
+
+    /**
+     * Convenience method for setting the status text directly.  For more flexible options see {@link #setStatus}.
+     * @param {String} text (optional) The text to set (defaults to '')
+     * @return {Ext.ux.StatusBar} this
+     */
+    setText : function(text){
+        this.activeThreadId++;
+        this.text = text || '';
+        if(this.rendered){
+            this.statusEl.setText(this.text);
+        }
+        return this;
+    },
+
+    /**
+     * Returns the current status text.
+     * @return {String} The status text
+     */
+    getText : function(){
+        return this.text;
+    },
+
+    /**
+     * Convenience method for setting the status icon directly.  For more flexible options see {@link #setStatus}.
+     * See {@link #iconCls} for complete details about customizing the icon.
+     * @param {String} iconCls (optional) The icon class to set (defaults to '', and any current icon class is removed)
+     * @return {Ext.ux.StatusBar} this
+     */
+    setIcon : function(cls){
+        this.activeThreadId++;
+        cls = cls || '';
+
+        if(this.rendered){
+	        if(this.currIconCls){
+	            this.statusEl.removeClass(this.currIconCls);
+	            this.currIconCls = null;
+	        }
+	        if(cls.length > 0){
+	            this.statusEl.addClass(cls);
+	            this.currIconCls = cls;
+	        }
+        }else{
+            this.currIconCls = cls;
+        }
+        return this;
+    },
+
+    /**
+     * Convenience method for setting the status text and icon to special values that are pre-configured to indicate
+     * a "busy" state, usually for loading or processing activities.
+     * @param {Object/String} config (optional) A config object in the same format supported by {@link #setStatus}, or a
+     * string to use as the status text (in which case all other options for setStatus will be defaulted).  Use the
+     * <tt>text</tt> and/or <tt>iconCls</tt> properties on the config to override the default {@link #busyText}
+     * and {@link #busyIconCls} settings. If the config argument is not specified, {@link #busyText} and
+     * {@link #busyIconCls} will be used in conjunction with all of the default options for {@link #setStatus}.
+     * @return {Ext.ux.StatusBar} this
+     */
+    showBusy : function(o){
+        if(typeof o == 'string'){
+            o = {text:o};
+        }
+        o = Ext.applyIf(o || {}, {
+            text: this.busyText,
+            iconCls: this.busyIconCls
+        });
+        return this.setStatus(o);
+    }
+});
+Ext.reg('statusbar', Ext.ux.StatusBar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabCloseMenu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabCloseMenu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabCloseMenu.js	(revision 625)
@@ -0,0 +1,58 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ux.TabCloseMenu
+ * @extends Object 
+ * Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs.
+ * 
+ * @ptype tabclosemenu
+ */
+Ext.ux.TabCloseMenu = function(){
+    var tabs, menu, ctxItem;
+    this.init = function(tp){
+        tabs = tp;
+        tabs.on('contextmenu', onContextMenu);
+    };
+
+    function onContextMenu(ts, item, e){
+        if(!menu){ // create context menu on first right click
+            menu = new Ext.menu.Menu({            
+            items: [{
+                id: tabs.id + '-close',
+                text: 'Close Tab',
+                handler : function(){
+                    tabs.remove(ctxItem);
+                }
+            },{
+                id: tabs.id + '-close-others',
+                text: 'Close Other Tabs',
+                handler : function(){
+                    tabs.items.each(function(item){
+                        if(item.closable && item != ctxItem){
+                            tabs.remove(item);
+                        }
+                    });
+                }
+            }]});
+        }
+        ctxItem = item;
+        var items = menu.items;
+        items.get(tabs.id + '-close').setDisabled(!item.closable);
+        var disableOthers = true;
+        tabs.items.each(function(){
+            if(this != item && this.closable){
+                disableOthers = false;
+                return false;
+            }
+        });
+        items.get(tabs.id + '-close-others').setDisabled(disableOthers);
+	e.stopEvent();
+        menu.showAt(e.getPoint());
+    }
+};
+
+Ext.preg('tabclosemenu', Ext.ux.TabCloseMenu);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabScrollerMenu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabScrollerMenu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TabScrollerMenu.js	(revision 625)
@@ -0,0 +1,185 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+
+Ext.ux.TabScrollerMenu =  Ext.extend(Object, {
+	pageSize       : 10,
+	maxText        : 15,
+	menuPrefixText : 'Items',
+	constructor    : function(config) {
+		config = config || {};
+		Ext.apply(this, config);
+	},
+	init : function(tabPanel) {
+		Ext.apply(tabPanel, this.tabPanelMethods);
+		
+		tabPanel.tabScrollerMenu = this;
+		var thisRef = this;
+		
+		tabPanel.on({
+			render : {
+				scope  : tabPanel,
+				single : true,
+				fn     : function() { 
+					var newFn = tabPanel.createScrollers.createSequence(thisRef.createPanelsMenu, this);
+					tabPanel.createScrollers = newFn;
+				}
+			}
+		});
+	},
+	// private && sequeneced
+	createPanelsMenu : function() {
+		var h = this.stripWrap.dom.offsetHeight;
+		
+		//move the right menu item to the left 18px
+		var rtScrBtn = this.header.dom.firstChild;
+		Ext.fly(rtScrBtn).applyStyles({
+			right : '18px'
+		});
+		
+		var stripWrap = Ext.get(this.strip.dom.parentNode);
+		stripWrap.applyStyles({
+			 'margin-right' : '36px'
+		});
+		
+		// Add the new righthand menu
+		var scrollMenu = this.header.insertFirst({
+			cls:'x-tab-tabmenu-right'
+		});
+		scrollMenu.setHeight(h);
+		scrollMenu.addClassOnOver('x-tab-tabmenu-over');
+		scrollMenu.on('click', this.showTabsMenu, this);	
+		
+		this.scrollLeft.show = this.scrollLeft.show.createSequence(function() {
+			scrollMenu.show();												 						 
+		});
+		
+		this.scrollLeft.hide = this.scrollLeft.hide.createSequence(function() {
+			scrollMenu.hide();								
+		});
+		
+	},
+	// public
+	getPageSize : function() {
+		return this.pageSize;
+	},
+	// public
+	setPageSize : function(pageSize) {
+		this.pageSize = pageSize;
+	},
+	// public
+	getMaxText : function() {
+		return this.maxText;
+	},
+	// public
+	setMaxText : function(t) {
+		this.maxText = t;
+	},
+	getMenuPrefixText : function() {
+		return this.menuPrefixText;
+	},
+	setMenuPrefixText : function(t) {
+		this.menuPrefixText = t;
+	},
+	// private && applied to the tab panel itself.
+	tabPanelMethods : {
+		// all execute within the scope of the tab panel
+		// private	
+		showTabsMenu : function(e) {		
+			if (! this.tabsMenu) {
+				this.tabsMenu =  new Ext.menu.Menu();
+				this.on('beforedestroy', this.tabsMenu.destroy, this.tabsMenu);
+			}
+			
+			this.tabsMenu.removeAll();
+			
+			this.generateTabMenuItems();
+			
+			var target = Ext.get(e.getTarget());
+			var xy     = target.getXY();
+			
+			//Y param + 24 pixels
+			xy[1] += 24;
+			
+			this.tabsMenu.showAt(xy);
+		},
+		// private	
+		generateTabMenuItems : function() {
+			var curActive  = this.getActiveTab();
+			var totalItems = this.items.getCount();
+			var pageSize   = this.tabScrollerMenu.getPageSize();
+			
+			
+			if (totalItems > pageSize)  {
+				var numSubMenus = Math.floor(totalItems / pageSize);
+				var remainder   = totalItems % pageSize;
+				
+				// Loop through all of the items and create submenus in chunks of 10
+				for (var i = 0 ; i < numSubMenus; i++) {
+					var curPage = (i + 1) * pageSize;
+					var menuItems = [];
+					
+					
+					for (var x = 0; x < pageSize; x++) {				
+						index = x + curPage - pageSize;
+						var item = this.items.get(index);
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+					
+					this.tabsMenu.add({
+						text : this.tabScrollerMenu.getMenuPrefixText() + ' '  + (curPage - pageSize + 1) + ' - ' + curPage,
+						menu : menuItems
+					});
+					
+				}
+				// remaining items
+				if (remainder > 0) {
+					var start = numSubMenus * pageSize;
+					menuItems = [];
+					for (var i = start ; i < totalItems; i ++ ) {					
+						var item = this.items.get(i);
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+					
+					
+					this.tabsMenu.add({
+						text : this.tabScrollerMenu.menuPrefixText  + ' ' + (start + 1) + ' - ' + (start + menuItems.length),
+						menu : menuItems
+					});
+					
+
+				}
+			}
+			else {
+				this.items.each(function(item) {
+					if (item.id != curActive.id && ! item.hidden) {
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+				}, this);
+			}	
+		},
+		// private
+		autoGenMenuItem : function(item) {
+			var maxText = this.tabScrollerMenu.getMaxText();
+			var text    = Ext.util.Format.ellipsis(item.title, maxText);
+			
+			return {
+				text      : text,
+				handler   : this.showTabFromMenu,
+				scope     : this,
+				disabled  : item.disabled,
+				tabToShow : item,
+				iconCls   : item.iconCls
+			}
+		
+		},
+		// private
+		showTabFromMenu : function(menuItem) {
+			this.setActiveTab(menuItem.tabToShow);
+		}	
+	}	
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TableGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TableGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/TableGrid.js	(revision 625)
@@ -0,0 +1,87 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.TableGrid
+ * @extends Ext.grid.GridPanel
+ * A Grid which creates itself from an existing HTML table element.
+ * @history
+ * 2007-03-01 Original version by Nige "Animal" White
+ * 2007-03-10 jvs Slightly refactored to reuse existing classes * @constructor
+ * @param {String/HTMLElement/Ext.Element} table The table element from which this grid will be created -
+ * The table MUST have some type of size defined for the grid to fill. The container will be
+ * automatically set to position relative if it isn't already.
+ * @param {Object} config A config object that sets properties on this grid and has two additional (optional)
+ * properties: fields and columns which allow for customizing data fields and columns for this grid.
+ */
+Ext.ux.grid.TableGrid = function(table, config){
+    config = config ||
+    {};
+    Ext.apply(this, config);
+    var cf = config.fields || [], ch = config.columns || [];
+    table = Ext.get(table);
+    
+    var ct = table.insertSibling();
+    
+    var fields = [], cols = [];
+    var headers = table.query("thead th");
+    for (var i = 0, h; h = headers[i]; i++) {
+        var text = h.innerHTML;
+        var name = 'tcol-' + i;
+        
+        fields.push(Ext.applyIf(cf[i] ||
+        {}, {
+            name: name,
+            mapping: 'td:nth(' + (i + 1) + ')/@innerHTML'
+        }));
+        
+        cols.push(Ext.applyIf(ch[i] ||
+        {}, {
+            'header': text,
+            'dataIndex': name,
+            'width': h.offsetWidth,
+            'tooltip': h.title,
+            'sortable': true
+        }));
+    }
+    
+    var ds = new Ext.data.Store({
+        reader: new Ext.data.XmlReader({
+            record: 'tbody tr'
+        }, fields)
+    });
+    
+    ds.loadData(table.dom);
+    
+    var cm = new Ext.grid.ColumnModel(cols);
+    
+    if (config.width || config.height) {
+        ct.setSize(config.width || 'auto', config.height || 'auto');
+    }
+    else {
+        ct.setWidth(table.getWidth());
+    }
+    
+    if (config.remove !== false) {
+        table.remove();
+    }
+    
+    Ext.applyIf(this, {
+        'ds': ds,
+        'cm': cm,
+        'sm': new Ext.grid.RowSelectionModel(),
+        autoHeight: true,
+        autoWidth: false
+    });
+    Ext.ux.grid.TableGrid.superclass.constructor.call(this, ct, {});
+};
+
+Ext.extend(Ext.ux.grid.TableGrid, Ext.grid.GridPanel);
+
+//backwards compat
+Ext.grid.TableGrid = Ext.ux.grid.TableGrid;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/XmlTreeLoader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/XmlTreeLoader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/XmlTreeLoader.js	(revision 625)
@@ -0,0 +1,108 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.tree');
+
+/**
+ * @class Ext.ux.tree.XmlTreeLoader
+ * @extends Ext.tree.TreeLoader
+ * <p>A TreeLoader that can convert an XML document into a hierarchy of {@link Ext.tree.TreeNode}s.
+ * Any text value included as a text node in the XML will be added to the parent node as an attribute
+ * called <tt>innerText</tt>.  Also, the tag name of each XML node will be added to the tree node as
+ * an attribute called <tt>tagName</tt>.</p>
+ * <p>By default, this class expects that your source XML will provide the necessary attributes on each
+ * node as expected by the {@link Ext.tree.TreePanel} to display and load properly.  However, you can
+ * provide your own custom processing of node attributes by overriding the {@link #processNode} method
+ * and modifying the attributes as needed before they are used to create the associated TreeNode.</p>
+ * @constructor
+ * Creates a new XmlTreeloader.
+ * @param {Object} config A config object containing config properties.
+ */
+Ext.ux.tree.XmlTreeLoader = Ext.extend(Ext.tree.TreeLoader, {
+    /**
+     * @property  XML_NODE_ELEMENT
+     * XML element node (value 1, read-only)
+     * @type Number
+     */
+    XML_NODE_ELEMENT : 1,
+    /**
+     * @property  XML_NODE_TEXT
+     * XML text node (value 3, read-only)
+     * @type Number
+     */
+    XML_NODE_TEXT : 3,
+
+    // private override
+    processResponse : function(response, node, callback){
+        var xmlData = response.responseXML;
+        var root = xmlData.documentElement || xmlData;
+
+        try{
+            node.beginUpdate();
+            node.appendChild(this.parseXml(root));
+            node.endUpdate();
+
+            if(typeof callback == "function"){
+                callback(this, node);
+            }
+        }catch(e){
+            this.handleFailure(response);
+        }
+    },
+
+    // private
+    parseXml : function(node) {
+        var nodes = [];
+        Ext.each(node.childNodes, function(n){
+            if(n.nodeType == this.XML_NODE_ELEMENT){
+                var treeNode = this.createNode(n);
+                if(n.childNodes.length > 0){
+                    var child = this.parseXml(n);
+                    if(typeof child == 'string'){
+                        treeNode.attributes.innerText = child;
+                    }else{
+                        treeNode.appendChild(child);
+                    }
+                }
+                nodes.push(treeNode);
+            }
+            else if(n.nodeType == this.XML_NODE_TEXT){
+                var text = n.nodeValue.trim();
+                if(text.length > 0){
+                    return nodes = text;
+                }
+            }
+        }, this);
+
+        return nodes;
+    },
+
+    // private override
+    createNode : function(node){
+        var attr = {
+            tagName: node.tagName
+        };
+
+        Ext.each(node.attributes, function(a){
+            attr[a.nodeName] = a.nodeValue;
+        });
+
+        this.processAttributes(attr);
+
+        return Ext.ux.tree.XmlTreeLoader.superclass.createNode.call(this, attr);
+    },
+
+    /*
+     * Template method intended to be overridden by subclasses that need to provide
+     * custom attribute processing prior to the creation of each TreeNode.  This method
+     * will be passed a config object containing existing TreeNode attribute name/value
+     * pairs which can be modified as needed directly (no need to return the object).
+     */
+    processAttributes: Ext.emptyFn
+});
+
+//backwards compat
+Ext.ux.XmlTreeLoader = Ext.ux.tree.XmlTreeLoader;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/CenterLayout.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/CenterLayout.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/CenterLayout.css	(revision 625)
@@ -0,0 +1,14 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ux-layout-center-item {
+    margin:0 auto;
+    text-align:left;
+}
+.ux-layout-center .x-panel-body,   
+body.ux-layout-center {            
+    text-align:center;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ColumnNodeUI.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ColumnNodeUI.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ColumnNodeUI.css	(revision 625)
@@ -0,0 +1,66 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-column-tree .x-panel-header {
+	padding: 3px 0px 0px 0px;
+	border-bottom-width: 0px;
+}
+
+.x-column-tree .x-panel-header .x-panel-header-text {
+	margin-left: 3px
+}
+
+.x-column-tree .x-tree-node {
+    zoom:1;
+}
+.x-column-tree .x-tree-node-el {
+    /*border-bottom:1px solid #eee; borders? */
+    zoom:1;
+}
+.x-column-tree .x-tree-selected {
+    background: #d9e8fb;
+}
+.x-column-tree  .x-tree-node a {
+    line-height:18px;
+    vertical-align:middle;
+}
+.x-column-tree  .x-tree-node a span{
+	
+}
+.x-column-tree  .x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#000;
+}
+.x-tree-col {
+    float:left;
+    overflow:hidden;
+    padding:0 1px;
+    zoom:1;
+}
+
+.x-tree-col-text, .x-tree-hd-text {
+    color:#000;
+    overflow:hidden;
+    -o-text-overflow: ellipsis;
+    text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-headers {
+	margin-top: 3px;
+	background: #f9f9f9 url(../../../resources/images/default/grid/grid3-hrow.gif) repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+}
+
+.x-tree-hd {
+    float:left;
+    overflow:hidden;
+    border-left:1px solid #eee;
+    border-right:1px solid #d0d0d0;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupSummary.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupSummary.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupSummary.css	(revision 625)
@@ -0,0 +1,26 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-grid3-summary-row {
+    border-left:1px solid #fff;
+    border-right:1px solid #fff;
+    color:#333;
+    background: #f1f2f4;
+}
+.x-grid3-summary-row .x-grid3-cell-inner {
+    font-weight:bold;
+    padding-bottom:4px;
+}
+.x-grid3-cell-first .x-grid3-cell-inner {
+    padding-left:16px;
+}
+.x-grid-hide-summary .x-grid3-summary-row {
+    display:none;
+}
+.x-grid3-summary-msg {
+    padding:4px 16px;
+    font-weight:bold;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupTab.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupTab.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/GroupTab.css	(revision 625)
@@ -0,0 +1,226 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-grouptabs-panel {
+    background-color: #4E78B1;
+    border: solid 15px #4E78B1;
+}
+.x-tab-panel-left .x-grouptabs-panel-header,
+.x-tab-panel-right .x-grouptabs-panel-header {
+    float: left;
+    border: 0;
+    background: transparent;
+}
+.x-tab-panel-right .x-grouptabs-panel-header {
+    float:right;
+}
+.x-tab-panel-left .x-grouptabs-bwrap {
+    float: right;
+    position: relative;
+}
+.x-tab-panel-right .x-grouptabs-bwrap {
+    float: left;
+    position: relative;
+}
+.x-tab-panel-left ul.x-grouptabs-strip,
+.x-tab-panel-right ul.x-grouptabs-strip {
+    width: auto;
+	display: block;
+}
+.x-tab-panel-left ul.x-grouptabs-strip li,
+.x-tab-panel-right ul.x-grouptabs-strip li {
+    padding: 6px 0 2px 6px;
+    float: none;
+    margin: 0;
+    position: relative;
+    clear: both;
+}
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text,
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+	font-size: 13px;
+	line-height: 18px;
+	cursor: pointer;
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+    padding-left: 18px;
+}
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+    padding-right: 18px;
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text,
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	font-size: 12px;
+    padding: 0;  
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	margin-left: 4px;
+}
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	margin-right: 4px;
+}
+
+.x-grouptabs-panel .x-grouptabs-strip a.x-grouptabs-text{
+    overflow: hidden;
+    white-space: nowrap;
+	display: block;
+    color: #DFE8F6;
+    font-family: tahoma, arial, sans-serif;
+    font-weight: bold;
+    text-decoration: none;
+}
+.x-tab-panel-right .x-grouptabs-strip a.x-grouptabs-text {
+    text-align: right;
+}
+
+.x-grouptabs-panel .x-grouptabs-strip-active a.x-grouptabs-text {
+    color: #395B8E;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub a.x-grouptabs-text {
+	font-weight: normal;
+}
+.x-tab-joint {
+    position: absolute;
+    width: 3px;
+    top: 1px;
+    background: #fff;
+    z-index: 9999;
+}
+
+.x-grouptabs-panel .x-grouptabs-panel-body {
+    border: 1px solid #999;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-strip li {
+    border-top: 1px solid transparent;
+    border-bottom: 1px solid transparent;
+	border-left: 1px solid transparent;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border: 0;
+    background: #fff;
+    border-top: 1px solid #999;
+    border-bottom: 1px solid #999;
+}
+
+.x-tab-panel-left ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border-left: 1px solid #999;
+}
+.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border-right: 1px solid #999;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub li.x-grouptabs-strip-active{
+    background-color: #EDEEF0;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub {
+    background-color: transparent;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub li {
+    border-color: transparent;
+}
+
+/* Tab corners */
+.x-grouptabs-panel .x-grouptabs-corner {
+    background-image: url('../images/x-grouptabs-corners.gif');
+    display: none;
+    width: 11px;
+    height: 11px;
+    position: absolute;
+    font-size: 1px;
+    line-height: 6px;
+    overflow: hidden;
+    zoom:1;
+}
+.x-grouptabs-panel .x-grouptabs-strip-active .x-grouptabs-corner {
+    display: block;
+}
+.x-grouptabs-panel .x-grouptabs-main.x-grouptabs-strip-active ul.x-grouptabs-sub .x-grouptabs-corner {
+	display: none;
+}
+
+.x-grouptabs-panel .x-grouptabs-corner-top-left {
+    background-position: top left;
+    left: 0; top: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-bottom-left {
+    background-position: bottom left;
+    left: 0; bottom: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-top-right {
+    background-position: top right;
+    right: 0; top: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-bottom-right {
+    background-position: bottom right;
+    right: 0; bottom: 0;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-bottom-left{
+    bottom: -4px; left: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-bottom-right{
+    bottom: -4px; right: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-top-left{
+    top: -4px; left: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-top-right{
+    top: -4px; right: -4px;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub li.x-tab-with-icon a.x-grouptabs-text {
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+/* General tab styling */
+.x-grouptabs-panel .x-grouptabs-expand {
+	background: transparent url('../images/elbow-plus-nl.gif') no-repeat;
+	width: 16px;
+	height: 16px;
+	position: absolute;
+	left: 7px;
+	top: 6px;
+}
+
+.ext-ie6 .x-grouptabs-panel .x-grouptabs-expand,
+.ext-border-box .x-grouptabs-panel .x-grouptabs-expand {
+	left: 0;
+}
+
+.x-grouptabs-expanded .x-grouptabs-expand {
+	background-image: url('../images/elbow-minus-nl.gif');
+}
+
+/* GroupTabs sub group styling */
+.x-grouptabs-sub {
+	display: none;
+	margin-top: 4px;
+}
+
+.x-grouptabs-expanded .x-grouptabs-sub {
+	display: block;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub li {
+	height: 18px;
+	margin: 0 0 2px;
+    padding: 0;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub .x-grouptabs-main-item {
+	display: none;
+}
+
+.x-tab-with-icon{
+   border-style:none !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/MultiSelect.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/MultiSelect.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/MultiSelect.css	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ux-mselect{
+    overflow:auto;
+    background:white;
+    position:relative; /* for calculating scroll offsets */
+    zoom:1;
+    overflow:auto;	
+}
+.ux-mselect-item{
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+    padding:2px;
+    border:1px solid #fff;
+    white-space: nowrap;
+    cursor:pointer;
+}
+.ux-mselect-selected{
+	border:1px dotted #a3bae9 !important;
+    background:#DFE8F6;
+    cursor:pointer;
+}
+
+.x-view-drag-insert-above { 
+    border-top:1px dotted #3366cc; 
+} 
+.x-view-drag-insert-below { 
+    border-bottom:1px dotted #3366cc; 
+} 
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/PanelResizer.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/PanelResizer.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/PanelResizer.css	(revision 625)
@@ -0,0 +1,19 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel-resize {
+        height:5px;
+        background:transparent url(../images/panel-handle.gif) no-repeat center bottom;
+        position:relative;
+        left:0;
+        top:2px;
+        cursor:n-resize;
+        cursor:row-resize;
+        /* for IE */
+        font-size:1px;
+        line-height:1px;
+        overflow:hidden;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Portal.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Portal.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Portal.css	(revision 625)
@@ -0,0 +1,40 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-portal .x-panel-dd-spacer {
+    margin-bottom:10px;
+}
+
+.x-portlet {
+    margin-bottom:10px;
+}
+
+/* Clean up the look of the portlets */
+.x-portlet .x-panel-ml {
+    padding-left:2px;
+}
+.x-portlet .x-panel-mr {
+    padding-right:2px;
+}
+.x-portlet .x-panel-bl {
+    padding-left:2px;
+}
+
+.x-portlet .x-panel-br {
+    padding-right:2px;
+}
+.x-portlet .x-panel-body {
+    background:white;
+}
+.x-portlet .x-panel-mc {
+    padding-top:2px;
+}
+.x-portlet .x-panel-bc .x-panel-footer {
+    padding-bottom:2px;
+}
+.x-portlet .x-panel-nofooter .x-panel-bc {
+    height:2px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/RowEditor.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/RowEditor.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/RowEditor.css	(revision 625)
@@ -0,0 +1,52 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ext-ie .x-row-editor .x-form-text {
+    margin:0 !important; 
+}
+.x-row-editor-header {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(../images/row-editor-bg.gif) repeat-x 0 0;
+}
+.x-row-editor-footer {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(../images/row-editor-bg.gif) repeat-x 0 -2px;
+}
+.ext-ie .x-row-editor-footer {
+    margin-top:-1px;
+}
+
+.x-row-editor-body {
+    overflow:hidden;
+    zoom:1;
+    background: #ebf2fb;
+    padding-top:2px;
+}
+.x-row-editor .x-btns {
+    position:absolute;
+    top:28px;
+    left:20px;
+    padding-left:5px;
+    background: transparent url(../images/row-editor-btns.gif) no-repeat 0 0;
+}
+.x-row-editor .x-btns .x-plain-bwrap {
+    padding-right:5px;
+    background: transparent url(../images/row-editor-btns.gif) no-repeat right -31px;
+}
+.x-row-editor .x-btns .x-plain-body {
+    background: transparent url(../images/row-editor-btns.gif) repeat-x 0 -62px;
+    height:31px;
+}
+.x-row-editor .x-btns .x-table-layout-cell {
+    padding:3px;
+}
+
+.errorTip .x-tip-body ul{
+    list-style-type:disc;
+    margin-left:15px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Spinner.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Spinner.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/Spinner.css	(revision 625)
@@ -0,0 +1,56 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-form-spinner-proxy{
+	/*background-color:#ff00cc;*/
+}
+.x-form-field-wrap .x-form-spinner-trigger {
+    background:transparent url('../images/spinner.gif') no-repeat 0 0;
+}
+
+.x-form-field-wrap .x-form-spinner-overup{
+    background-position:-17px 0;
+}
+.x-form-field-wrap .x-form-spinner-clickup{
+    background-position:-34px 0;
+}
+.x-form-field-wrap .x-form-spinner-overdown{
+    background-position:-51px 0;
+}
+.x-form-field-wrap .x-form-spinner-clickdown{
+    background-position:-68px 0;
+}
+
+
+.x-trigger-wrap-focus .x-form-spinner-trigger{
+    background-position:-85px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-overup{
+    background-position:-102px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-clickup{
+    background-position:-119px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-overdown{
+    background-position:-136px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-clickdown{
+    background-position:-153px 0;
+}
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom: 1px solid #7eadd9;
+}
+
+.x-form-field-wrap .x-form-spinner-splitter {
+	line-height:1px;
+	font-size:1px;
+    background:transparent url('../images/spinner-split.gif') no-repeat 0 0;
+	position:absolute;
+	cursor: n-resize;
+}
+.x-trigger-wrap-focus .x-form-spinner-splitter{
+    background-position:-14px 0;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/StatusBar.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/StatusBar.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/StatusBar.css	(revision 625)
@@ -0,0 +1,86 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Ext JS Library 2.2
+ * Copyright(c) 2006-2008, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://extjs.com/license
+ */
+
+/* StatusBar */
+
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+.x-statusbar .x-status-busy {
+    padding-left: 25px !important;
+    background: transparent url(../images/loading.gif) no-repeat 3px 3px;
+}
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid #99BBE8;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #99BBE8;
+    padding: 2px 8px 2px 5px;
+}
+
+/* StatusBar word processor example styles */
+
+#word-status .x-status-text {
+    color: #777;
+}
+#word-status .x-status-text-panel .spacer {
+    width: 60px;
+    font-size:0;
+    line-height:0;
+}
+#word-status .x-status-busy {
+    padding-left: 25px !important;
+    background: transparent url(../images/saving.gif) no-repeat 3px 3px;
+}
+#word-status .x-status-saved {
+    padding-left: 25px !important;
+    background: transparent url(../images/saved.png) no-repeat 3px 3px;
+}
+
+/* StatusBar form validation example styles */
+
+.x-statusbar .x-status-error {
+    color: #C33;
+    cursor: pointer;
+    padding-left: 25px !important;
+    background: transparent url(../images/exclamation.gif) no-repeat 3px 3px;
+}
+.x-statusbar .x-status-valid {
+    padding-left: 25px !important;
+    background: transparent url(../images/accept.png) no-repeat 3px 3px;
+}
+.x-status-error-list {
+    font: 11px tahoma,arial,verdana,sans-serif;
+    position: absolute;
+    z-index: 9999;
+    border: 1px solid #C33;
+    background: #ffa;
+    padding: 5px 10px;
+    color: #999;
+}
+.x-status-error-list li {
+    cursor: pointer;
+    list-style: disc;
+    margin-left: 10px;
+}
+.x-status-error-list li a {
+    color: #15428B;
+    text-decoration: none;
+}
+.x-status-error-list li a:hover {
+    text-decoration: underline;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ux-all.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ux-all.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/css/ux-all.css	(revision 625)
@@ -0,0 +1,480 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ux-layout-center-item {
+    margin:0 auto;
+    text-align:left;
+}
+.ux-layout-center .x-panel-body,   
+body.ux-layout-center {            
+    text-align:center;
+}
+.x-column-tree .x-panel-header {
+	padding: 3px 0px 0px 0px;
+	border-bottom-width: 0px;
+}
+
+.x-column-tree .x-panel-header .x-panel-header-text {
+	margin-left: 3px
+}
+
+.x-column-tree .x-tree-node {
+    zoom:1;
+}
+.x-column-tree .x-tree-node-el {
+    /*border-bottom:1px solid #eee; borders? */
+    zoom:1;
+}
+.x-column-tree .x-tree-selected {
+    background: #d9e8fb;
+}
+.x-column-tree  .x-tree-node a {
+    line-height:18px;
+    vertical-align:middle;
+}
+.x-column-tree  .x-tree-node a span{
+	
+}
+.x-column-tree  .x-tree-node .x-tree-selected a span{
+	background:transparent;
+	color:#000;
+}
+.x-tree-col {
+    float:left;
+    overflow:hidden;
+    padding:0 1px;
+    zoom:1;
+}
+
+.x-tree-col-text, .x-tree-hd-text {
+    color:#000;
+    overflow:hidden;
+    -o-text-overflow: ellipsis;
+    text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-headers {
+	margin-top: 3px;
+	background: #f9f9f9 url(../../../resources/images/default/grid/grid3-hrow.gif) repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+}
+
+.x-tree-hd {
+    float:left;
+    overflow:hidden;
+    border-left:1px solid #eee;
+    border-right:1px solid #d0d0d0;
+}
+.x-grid3-summary-row {
+    border-left:1px solid #fff;
+    border-right:1px solid #fff;
+    color:#333;
+    background: #f1f2f4;
+}
+.x-grid3-summary-row .x-grid3-cell-inner {
+    font-weight:bold;
+    padding-bottom:4px;
+}
+.x-grid3-cell-first .x-grid3-cell-inner {
+    padding-left:16px;
+}
+.x-grid-hide-summary .x-grid3-summary-row {
+    display:none;
+}
+.x-grid3-summary-msg {
+    padding:4px 16px;
+    font-weight:bold;
+}.x-grouptabs-panel {
+    background-color: #4E78B1;
+    border: solid 15px #4E78B1;
+}
+.x-tab-panel-left .x-grouptabs-panel-header,
+.x-tab-panel-right .x-grouptabs-panel-header {
+    float: left;
+    border: 0;
+    background: transparent;
+}
+.x-tab-panel-right .x-grouptabs-panel-header {
+    float:right;
+}
+.x-tab-panel-left .x-grouptabs-bwrap {
+    float: right;
+    position: relative;
+}
+.x-tab-panel-right .x-grouptabs-bwrap {
+    float: left;
+    position: relative;
+}
+.x-tab-panel-left ul.x-grouptabs-strip,
+.x-tab-panel-right ul.x-grouptabs-strip {
+    width: auto;
+	display: block;
+}
+.x-tab-panel-left ul.x-grouptabs-strip li,
+.x-tab-panel-right ul.x-grouptabs-strip li {
+    padding: 6px 0 2px 6px;
+    float: none;
+    margin: 0;
+    position: relative;
+    clear: both;
+}
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text,
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+	font-size: 13px;
+	line-height: 18px;
+	cursor: pointer;
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+    padding-left: 18px;
+}
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text{
+    padding-right: 18px;
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text,
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	font-size: 12px;
+    padding: 0;  
+}
+
+.x-tab-panel-left .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	margin-left: 4px;
+}
+.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-sub a.x-grouptabs-text{
+	margin-right: 4px;
+}
+
+.x-grouptabs-panel .x-grouptabs-strip a.x-grouptabs-text{
+    overflow: hidden;
+    white-space: nowrap;
+	display: block;
+    color: #DFE8F6;
+    font-family: tahoma, arial, sans-serif;
+    font-weight: bold;
+    text-decoration: none;
+}
+.x-tab-panel-right .x-grouptabs-strip a.x-grouptabs-text {
+    text-align: right;
+}
+
+.x-grouptabs-panel .x-grouptabs-strip-active a.x-grouptabs-text {
+    color: #395B8E;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub a.x-grouptabs-text {
+	font-weight: normal;
+}
+.x-tab-joint {
+    position: absolute;
+    width: 3px;
+    top: 1px;
+    background: #fff;
+    z-index: 9999;
+}
+
+.x-grouptabs-panel .x-grouptabs-panel-body {
+    border: 1px solid #999;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-strip li {
+    border-top: 1px solid transparent;
+    border-bottom: 1px solid transparent;
+	border-left: 1px solid transparent;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border: 0;
+    background: #fff;
+    border-top: 1px solid #999;
+    border-bottom: 1px solid #999;
+}
+
+.x-tab-panel-left ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border-left: 1px solid #999;
+}
+.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
+    border-right: 1px solid #999;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub li.x-grouptabs-strip-active{
+    background-color: #EDEEF0;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub {
+    background-color: transparent;
+}
+
+.x-grouptabs-panel li.x-grouptabs-strip-active ul.x-grouptabs-sub li {
+    border-color: transparent;
+}
+
+/* Tab corners */
+.x-grouptabs-panel .x-grouptabs-corner {
+    background-image: url('../images/x-grouptabs-corners.gif');
+    display: none;
+    width: 11px;
+    height: 11px;
+    position: absolute;
+    font-size: 1px;
+    line-height: 6px;
+    overflow: hidden;
+    zoom:1;
+}
+.x-grouptabs-panel .x-grouptabs-strip-active .x-grouptabs-corner {
+    display: block;
+}
+.x-grouptabs-panel .x-grouptabs-main.x-grouptabs-strip-active ul.x-grouptabs-sub .x-grouptabs-corner {
+	display: none;
+}
+
+.x-grouptabs-panel .x-grouptabs-corner-top-left {
+    background-position: top left;
+    left: 0; top: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-bottom-left {
+    background-position: bottom left;
+    left: 0; bottom: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-top-right {
+    background-position: top right;
+    right: 0; top: 0;
+}
+.x-grouptabs-panel .x-grouptabs-corner-bottom-right {
+    background-position: bottom right;
+    right: 0; bottom: 0;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-bottom-left{
+    bottom: -4px; left: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-bottom-right{
+    bottom: -4px; right: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-top-left{
+    top: -4px; left: -4px;
+}
+.x-grouptabs-panel li.x-grouptabs-strip-active .x-grouptabs-corner-top-right{
+    top: -4px; right: -4px;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub li.x-tab-with-icon a.x-grouptabs-text {
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+/* General tab styling */
+.x-grouptabs-panel .x-grouptabs-expand {
+	background: transparent url('../images/elbow-plus-nl.gif') no-repeat;
+	width: 16px;
+	height: 16px;
+	position: absolute;
+	left: 7px;
+	top: 6px;
+}
+
+.ext-ie6 .x-grouptabs-panel .x-grouptabs-expand,
+.ext-border-box .x-grouptabs-panel .x-grouptabs-expand {
+	left: 0;
+}
+
+.x-grouptabs-expanded .x-grouptabs-expand {
+	background-image: url('../images/elbow-minus-nl.gif');
+}
+
+/* GroupTabs sub group styling */
+.x-grouptabs-sub {
+	display: none;
+	margin-top: 4px;
+}
+
+.x-grouptabs-expanded .x-grouptabs-sub {
+	display: block;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub li {
+	height: 18px;
+	margin: 0 0 2px;
+    padding: 0;
+}
+
+.x-grouptabs-panel ul.x-grouptabs-sub .x-grouptabs-main-item {
+	display: none;
+}
+
+.x-tab-with-icon{
+   border-style:none !important;
+}
+.ux-mselect{
+    overflow:auto;
+    background:white;
+    position:relative; /* for calculating scroll offsets */
+    zoom:1;
+    overflow:auto;	
+}
+.ux-mselect-item{
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+    padding:2px;
+    border:1px solid #fff;
+    white-space: nowrap;
+    cursor:pointer;
+}
+.ux-mselect-selected{
+	border:1px dotted #a3bae9 !important;
+    background:#DFE8F6;
+    cursor:pointer;
+}
+
+.x-view-drag-insert-above { 
+    border-top:1px dotted #3366cc; 
+} 
+.x-view-drag-insert-below { 
+    border-bottom:1px dotted #3366cc; 
+} 
+.x-panel-resize {
+        height:5px;
+        background:transparent url(../images/panel-handle.gif) no-repeat center bottom;
+        position:relative;
+        left:0;
+        top:2px;
+        cursor:n-resize;
+        cursor:row-resize;
+        /* for IE */
+        font-size:1px;
+        line-height:1px;
+        overflow:hidden;
+}.x-portal .x-panel-dd-spacer {
+    margin-bottom:10px;
+}
+
+.x-portlet {
+    margin-bottom:10px;
+}
+
+/* Clean up the look of the portlets */
+.x-portlet .x-panel-ml {
+    padding-left:2px;
+}
+.x-portlet .x-panel-mr {
+    padding-right:2px;
+}
+.x-portlet .x-panel-bl {
+    padding-left:2px;
+}
+
+.x-portlet .x-panel-br {
+    padding-right:2px;
+}
+.x-portlet .x-panel-body {
+    background:white;
+}
+.x-portlet .x-panel-mc {
+    padding-top:2px;
+}
+.x-portlet .x-panel-bc .x-panel-footer {
+    padding-bottom:2px;
+}
+.x-portlet .x-panel-nofooter .x-panel-bc {
+    height:2px;
+}.ext-ie .x-row-editor .x-form-text {
+    margin:0 !important; 
+}
+.x-row-editor-header {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(../images/row-editor-bg.gif) repeat-x 0 0;
+}
+.x-row-editor-footer {
+    height:2px;
+    overflow:hidden;
+    background: transparent url(../images/row-editor-bg.gif) repeat-x 0 -2px;
+}
+.ext-ie .x-row-editor-footer {
+    margin-top:-1px;
+}
+
+.x-row-editor-body {
+    overflow:hidden;
+    zoom:1;
+    background: #ebf2fb;
+    padding-top:2px;
+}
+.x-row-editor .x-btns {
+    position:absolute;
+    top:28px;
+    left:20px;
+    padding-left:5px;
+    background: transparent url(../images/row-editor-btns.gif) no-repeat 0 0;
+}
+.x-row-editor .x-btns .x-plain-bwrap {
+    padding-right:5px;
+    background: transparent url(../images/row-editor-btns.gif) no-repeat right -31px;
+}
+.x-row-editor .x-btns .x-plain-body {
+    background: transparent url(../images/row-editor-btns.gif) repeat-x 0 -62px;
+    height:31px;
+}
+.x-row-editor .x-btns .x-table-layout-cell {
+    padding:3px;
+}
+
+.errorTip .x-tip-body ul{
+    list-style-type:disc;
+    margin-left:15px;
+}
+.x-form-spinner-proxy{
+	/*background-color:#ff00cc;*/
+}
+.x-form-field-wrap .x-form-spinner-trigger {
+    background:transparent url('../images/spinner.gif') no-repeat 0 0;
+}
+
+.x-form-field-wrap .x-form-spinner-overup{
+    background-position:-17px 0;
+}
+.x-form-field-wrap .x-form-spinner-clickup{
+    background-position:-34px 0;
+}
+.x-form-field-wrap .x-form-spinner-overdown{
+    background-position:-51px 0;
+}
+.x-form-field-wrap .x-form-spinner-clickdown{
+    background-position:-68px 0;
+}
+
+
+.x-trigger-wrap-focus .x-form-spinner-trigger{
+    background-position:-85px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-overup{
+    background-position:-102px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-clickup{
+    background-position:-119px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-overdown{
+    background-position:-136px 0;
+}
+.x-trigger-wrap-focus .x-form-spinner-clickdown{
+    background-position:-153px 0;
+}
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom: 1px solid #7eadd9;
+}
+
+.x-form-field-wrap .x-form-spinner-splitter {
+	line-height:1px;
+	font-size:1px;
+    background:transparent url('../images/spinner-split.gif') no-repeat 0 0;
+	position:absolute;
+	cursor: n-resize;
+}
+.x-trigger-wrap-focus .x-form-spinner-splitter{
+    background-position:-14px 0;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all-debug.js	(revision 625)
@@ -0,0 +1,6251 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.BufferView
+ * @extends Ext.grid.GridView
+ * A custom GridView which renders rows on an as-needed basis.
+ */
+Ext.ux.grid.BufferView = Ext.extend(Ext.grid.GridView, {
+	/**
+	 * @cfg {Number} rowHeight
+	 * The height of a row in the grid.
+	 */
+	rowHeight: 19,
+
+	/**
+	 * @cfg {Number} borderHeight
+	 * The combined height of border-top and border-bottom of a row.
+	 */
+	borderHeight: 2,
+
+	/**
+	 * @cfg {Boolean/Number} scrollDelay
+	 * The number of milliseconds before rendering rows out of the visible
+	 * viewing area. Defaults to 100. Rows will render immediately with a config
+	 * of false.
+	 */
+	scrollDelay: 100,
+
+	/**
+	 * @cfg {Number} cacheSize
+	 * The number of rows to look forward and backwards from the currently viewable
+	 * area.  The cache applies only to rows that have been rendered already.
+	 */
+	cacheSize: 20,
+
+	/**
+	 * @cfg {Number} cleanDelay
+	 * The number of milliseconds to buffer cleaning of extra rows not in the
+	 * cache.
+	 */
+	cleanDelay: 500,
+
+	initTemplates : function(){
+		Ext.ux.grid.BufferView.superclass.initTemplates.call(this);
+		var ts = this.templates;
+		// empty div to act as a place holder for a row
+	        ts.rowHolder = new Ext.Template(
+		        '<div class="x-grid3-row {alt}" style="{tstyle}"></div>'
+		);
+		ts.rowHolder.disableFormats = true;
+		ts.rowHolder.compile();
+
+		ts.rowBody = new Ext.Template(
+		        '<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+			'<tbody><tr>{cells}</tr>',
+			(this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''),
+			'</tbody></table>'
+		);
+		ts.rowBody.disableFormats = true;
+		ts.rowBody.compile();
+	},
+
+	getStyleRowHeight : function(){
+		return Ext.isBorderBox ? (this.rowHeight + this.borderHeight) : this.rowHeight;
+	},
+
+	getCalculatedRowHeight : function(){
+		return this.rowHeight + this.borderHeight;
+	},
+
+	getVisibleRowCount : function(){
+		var rh = this.getCalculatedRowHeight();
+		var visibleHeight = this.scroller.dom.clientHeight;
+		return (visibleHeight < 1) ? 0 : Math.ceil(visibleHeight / rh);
+	},
+
+	getVisibleRows: function(){
+		var count = this.getVisibleRowCount();
+		var sc = this.scroller.dom.scrollTop;
+		var start = (sc == 0 ? 0 : Math.floor(sc/this.getCalculatedRowHeight())-1);
+		return {
+			first: Math.max(start, 0),
+			last: Math.min(start + count + 2, this.ds.getCount()-1)
+		};
+	},
+
+	doRender : function(cs, rs, ds, startRow, colCount, stripe, onlyBody){
+		var ts = this.templates, ct = ts.cell, rt = ts.row, rb = ts.rowBody, last = colCount-1;
+		var rh = this.getStyleRowHeight();
+		var vr = this.getVisibleRows();
+		var tstyle = 'width:'+this.getTotalWidth()+';height:'+rh+'px;';
+		// buffers
+		var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r;
+		for (var j = 0, len = rs.length; j < len; j++) {
+			r = rs[j]; cb = [];
+			var rowIndex = (j+startRow);
+			var visible = rowIndex >= vr.first && rowIndex <= vr.last;
+			if (visible) {
+				for (var i = 0; i < colCount; i++) {
+					c = cs[i];
+					p.id = c.id;
+					p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+					p.attr = p.cellAttr = "";
+					p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
+					p.style = c.style;
+					if (p.value == undefined || p.value === "") {
+						p.value = "&#160;";
+					}
+					if (r.dirty && typeof r.modified[c.name] !== 'undefined') {
+						p.css += ' x-grid3-dirty-cell';
+					}
+					cb[cb.length] = ct.apply(p);
+				}
+			}
+			var alt = [];
+			if(stripe && ((rowIndex+1) % 2 == 0)){
+			    alt[0] = "x-grid3-row-alt";
+			}
+			if(r.dirty){
+			    alt[1] = " x-grid3-dirty-row";
+			}
+			rp.cols = colCount;
+			if(this.getRowClass){
+			    alt[2] = this.getRowClass(r, rowIndex, rp, ds);
+			}
+			rp.alt = alt.join(" ");
+			rp.cells = cb.join("");
+			buf[buf.length] =  !visible ? ts.rowHolder.apply(rp) : (onlyBody ? rb.apply(rp) : rt.apply(rp));
+		}
+		return buf.join("");
+	},
+
+	isRowRendered: function(index){
+		var row = this.getRow(index);
+		return row && row.childNodes.length > 0;
+	},
+
+	syncScroll: function(){
+		Ext.ux.grid.BufferView.superclass.syncScroll.apply(this, arguments);
+		this.update();
+	},
+
+	// a (optionally) buffered method to update contents of gridview
+	update: function(){
+		if (this.scrollDelay) {
+			if (!this.renderTask) {
+				this.renderTask = new Ext.util.DelayedTask(this.doUpdate, this);
+			}
+			this.renderTask.delay(this.scrollDelay);
+		}else{
+			this.doUpdate();
+		}
+	},
+
+	doUpdate: function(){
+		if (this.getVisibleRowCount() > 0) {
+			var g = this.grid, cm = g.colModel, ds = g.store;
+		        var cs = this.getColumnData();
+
+		        var vr = this.getVisibleRows();
+			for (var i = vr.first; i <= vr.last; i++) {
+				// if row is NOT rendered and is visible, render it
+				if(!this.isRowRendered(i)){
+					var html = this.doRender(cs, [ds.getAt(i)], ds, i, cm.getColumnCount(), g.stripeRows, true);
+					this.getRow(i).innerHTML = html;
+				}
+			}
+			this.clean();
+		}
+	},
+
+	// a buffered method to clean rows
+	clean : function(){
+		if(!this.cleanTask){
+			this.cleanTask = new Ext.util.DelayedTask(this.doClean, this);
+		}
+		this.cleanTask.delay(this.cleanDelay);
+	},
+
+	doClean: function(){
+		if (this.getVisibleRowCount() > 0) {
+			var vr = this.getVisibleRows();
+			vr.first -= this.cacheSize;
+			vr.last += this.cacheSize;
+
+			var i = 0, rows = this.getRows();
+			// if first is less than 0, all rows have been rendered
+			// so lets clean the end...
+			if(vr.first <= 0){
+				i = vr.last + 1;
+			}
+			for(var len = this.ds.getCount(); i < len; i++){
+				// if current row is outside of first and last and
+				// has content, update the innerHTML to nothing
+				if ((i < vr.first || i > vr.last) && rows[i].innerHTML) {
+					rows[i].innerHTML = '';
+				}
+			}
+		}
+	},
+
+	layout: function(){
+		Ext.ux.grid.BufferView.superclass.layout.call(this);
+		this.update();
+	}
+});
+// We are adding these custom layouts to a namespace that does not
+// exist by default in Ext, so we have to add the namespace first:
+Ext.ns('Ext.ux.layout');
+
+/**
+ * @class Ext.ux.layout.CenterLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This is a very simple layout style used to center contents within a container.  This layout works within
+ * nested containers and can also be used as expected as a Viewport layout to center the page layout.</p>
+ * <p>As a subclass of FitLayout, CenterLayout expects to have a single child panel of the container that uses
+ * the layout.  The layout does not require any config options, although the child panel contained within the
+ * layout must provide a fixed or percentage width.  The child panel's height will fit to the container by
+ * default, but you can specify <tt>autoHeight:true</tt> to allow it to autosize based on its content height.
+ * Example usage:</p>
+ * <pre><code>
+// The content panel is centered in the container
+var p = new Ext.Panel({
+    title: 'Center Layout',
+    layout: 'ux.center',
+    items: [{
+        title: 'Centered Content',
+        width: '75%',
+        html: 'Some content'
+    }]
+});
+
+// If you leave the title blank and specify no border
+// you'll create a non-visual, structural panel just
+// for centering the contents in the main container.
+var p = new Ext.Panel({
+    layout: 'ux.center',
+    border: false,
+    items: [{
+        title: 'Centered Content',
+        width: 300,
+        autoHeight: true,
+        html: 'Some content'
+    }]
+});
+</code></pre>
+ */
+Ext.ux.layout.CenterLayout = Ext.extend(Ext.layout.FitLayout, {
+	// private
+    setItemSize : function(item, size){
+        this.container.addClass('ux-layout-center');
+        item.addClass('ux-layout-center-item');
+        if(item && size.height > 0){
+            if(item.width){
+                size.width = item.width;
+            }
+            item.setSize(size);
+        }
+    }
+});
+
+Ext.Container.LAYOUTS['ux.center'] = Ext.ux.layout.CenterLayout;
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.CheckColumn
+ * @extends Object
+ * GridPanel plugin to add a column with check boxes to a grid.
+ * <p>Example usage:</p>
+ * <pre><code>
+// create the column
+var checkColumn = new Ext.grid.CheckColumn({
+   header: 'Indoor?',
+   dataIndex: 'indoor',
+   id: 'check',
+   width: 55
+});
+
+// add the column to the column model
+var cm = new Ext.grid.ColumnModel([{
+       header: 'Foo',
+       ...
+    },
+    checkColumn
+]);
+
+// create the grid
+var grid = new Ext.grid.EditorGridPanel({
+    ...
+    cm: cm,
+    plugins: [checkColumn], // include plugin
+    ...
+});
+ * </code></pre>
+ * In addition to storing a Boolean value within the record data, this
+ * class toggles a css class between <tt>'x-grid3-check-col'</tt> and
+ * <tt>'x-grid3-check-col-on'</tt> to alter the background image used for
+ * a column.
+ */
+Ext.ux.grid.CheckColumn = function(config){
+    Ext.apply(this, config);
+    if(!this.id){
+        this.id = Ext.id();
+    }
+    this.renderer = this.renderer.createDelegate(this);
+};
+
+Ext.ux.grid.CheckColumn.prototype ={
+    init : function(grid){
+        this.grid = grid;
+        this.grid.on('render', function(){
+            var view = this.grid.getView();
+            view.mainBody.on('mousedown', this.onMouseDown, this);
+        }, this);
+    },
+
+    onMouseDown : function(e, t){
+        if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
+            e.stopEvent();
+            var index = this.grid.getView().findRowIndex(t);
+            var record = this.grid.store.getAt(index);
+            record.set(this.dataIndex, !record.data[this.dataIndex]);
+        }
+    },
+
+    renderer : function(v, p, record){
+        p.css += ' x-grid3-check-col-td'; 
+        return '<div class="x-grid3-check-col'+(v?'-on':'')+' x-grid3-cc-'+this.id+'">&#160;</div>';
+    }
+};
+
+// register ptype
+Ext.preg('checkcolumn', Ext.ux.grid.CheckColumn);
+
+// backwards compat
+Ext.grid.CheckColumn = Ext.ux.grid.CheckColumn;Ext.ns('Ext.ux.tree');
+
+/**
+ * @class Ext.ux.tree.ColumnTree
+ * @extends Ext.tree.TreePanel
+ * 
+ * @xtype columntree
+ */
+Ext.ux.tree.ColumnTree = Ext.extend(Ext.tree.TreePanel, {
+    lines : false,
+    borderWidth : Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell
+    cls : 'x-column-tree',
+
+    onRender : function(){
+        Ext.tree.ColumnTree.superclass.onRender.apply(this, arguments);
+        this.headers = this.header.createChild({cls:'x-tree-headers'});
+
+        var cols = this.columns, c;
+        var totalWidth = 0;
+        var scrollOffset = 19; // similar to Ext.grid.GridView default
+
+        for(var i = 0, len = cols.length; i < len; i++){
+             c = cols[i];
+             totalWidth += c.width;
+             this.headers.createChild({
+                 cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''),
+                 cn: {
+                     cls:'x-tree-hd-text',
+                     html: c.header
+                 },
+                 style:'width:'+(c.width-this.borderWidth)+'px;'
+             });
+        }
+        this.headers.createChild({cls:'x-clear'});
+        // prevent floats from wrapping when clipped
+        this.headers.setWidth(totalWidth+scrollOffset);
+        this.innerCt.setWidth(totalWidth);
+    }
+});
+
+Ext.reg('columntree', Ext.ux.tree.ColumnTree);
+
+//backwards compat
+Ext.tree.ColumnTree = Ext.ux.tree.ColumnTree;
+
+
+/**
+ * @class Ext.ux.tree.ColumnNodeUI
+ * @extends Ext.tree.TreeNodeUI
+ */
+Ext.ux.tree.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    focus: Ext.emptyFn, // prevent odd scrolling behavior
+
+    renderElements : function(n, a, targetNode, bulkRender){
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var t = n.getOwnerTree();
+        var cols = t.columns;
+        var bw = t.borderWidth;
+        var c = cols[0];
+
+        var buf = [
+             '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf ', a.cls,'">',
+                '<div class="x-tree-col" style="width:',c.width-bw,'px;">',
+                    '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
+                    '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow">',
+                    '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on">',
+                    '<a hidefocus="on" class="x-tree-node-anchor" href="',a.href ? a.href : "#",'" tabIndex="1" ',
+                    a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
+                    '<span unselectable="on">', n.text || (c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",
+                "</div>"];
+         for(var i = 1, len = cols.length; i < len; i++){
+             c = cols[i];
+
+             buf.push('<div class="x-tree-col ',(c.cls?c.cls:''),'" style="width:',c.width-bw,'px;">',
+                        '<div class="x-tree-col-text">',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</div>",
+                      "</div>");
+         }
+         buf.push(
+            '<div class="x-clear"></div></div>',
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>");
+
+        if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin",
+                                n.nextSibling.ui.getEl(), buf.join(""));
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join(""));
+        }
+
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.firstChild.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        this.anchor = cs[3];
+        this.textNode = cs[3].firstChild;
+    }
+});
+
+//backwards compat
+Ext.tree.ColumnNodeUI = Ext.ux.tree.ColumnNodeUI;
+/**
+ * @class Ext.DataView.LabelEditor
+ * @extends Ext.Editor
+ * 
+ */
+Ext.DataView.LabelEditor = Ext.extend(Ext.Editor, {
+    alignment: "tl-tl",
+    hideEl : false,
+    cls: "x-small-editor",
+    shim: false,
+    completeOnEnter: true,
+    cancelOnEsc: true,
+    labelSelector: 'span.x-editable',
+    
+    constructor: function(cfg, field){
+        Ext.DataView.LabelEditor.superclass.constructor.call(this,
+            field || new Ext.form.TextField({
+                allowBlank: false,
+                growMin:90,
+                growMax:240,
+                grow:true,
+                selectOnFocus:true
+            }), cfg
+        );
+    },
+    
+    init : function(view){
+        this.view = view;
+        view.on('render', this.initEditor, this);
+        this.on('complete', this.onSave, this);
+    },
+
+    initEditor : function(){
+        this.view.on({
+            scope: this,
+            containerclick: this.doBlur,
+            click: this.doBlur
+        });
+        this.view.getEl().on('mousedown', this.onMouseDown, this, {delegate: this.labelSelector});
+    },
+    
+    doBlur: function(){
+        if(this.editing){
+            this.field.blur();
+        }
+    },
+
+    onMouseDown : function(e, target){
+        if(!e.ctrlKey && !e.shiftKey){
+            var item = this.view.findItemFromChild(target);
+            e.stopEvent();
+            var record = this.view.store.getAt(this.view.indexOf(item));
+            this.startEdit(target, record.data[this.dataIndex]);
+            this.activeRecord = record;
+        }else{
+            e.preventDefault();
+        }
+    },
+
+    onSave : function(ed, value){
+        this.activeRecord.set(this.dataIndex, value);
+    }
+});
+
+
+Ext.DataView.DragSelector = function(cfg){
+    cfg = cfg || {};
+    var view, proxy, tracker;
+    var rs, bodyRegion, dragRegion = new Ext.lib.Region(0,0,0,0);
+    var dragSafe = cfg.dragSafe === true;
+
+    this.init = function(dataView){
+        view = dataView;
+        view.on('render', onRender);
+    };
+
+    function fillRegions(){
+        rs = [];
+        view.all.each(function(el){
+            rs[rs.length] = el.getRegion();
+        });
+        bodyRegion = view.el.getRegion();
+    }
+
+    function cancelClick(){
+        return false;
+    }
+
+    function onBeforeStart(e){
+        return !dragSafe || e.target == view.el.dom;
+    }
+
+    function onStart(e){
+        view.on('containerclick', cancelClick, view, {single:true});
+        if(!proxy){
+            proxy = view.el.createChild({cls:'x-view-selector'});
+        }else{
+            proxy.setDisplayed('block');
+        }
+        fillRegions();
+        view.clearSelections();
+    }
+
+    function onDrag(e){
+        var startXY = tracker.startXY;
+        var xy = tracker.getXY();
+
+        var x = Math.min(startXY[0], xy[0]);
+        var y = Math.min(startXY[1], xy[1]);
+        var w = Math.abs(startXY[0] - xy[0]);
+        var h = Math.abs(startXY[1] - xy[1]);
+
+        dragRegion.left = x;
+        dragRegion.top = y;
+        dragRegion.right = x+w;
+        dragRegion.bottom = y+h;
+
+        dragRegion.constrainTo(bodyRegion);
+        proxy.setRegion(dragRegion);
+
+        for(var i = 0, len = rs.length; i < len; i++){
+            var r = rs[i], sel = dragRegion.intersect(r);
+            if(sel && !r.selected){
+                r.selected = true;
+                view.select(i, true);
+            }else if(!sel && r.selected){
+                r.selected = false;
+                view.deselect(i);
+            }
+        }
+    }
+
+    function onEnd(e){
+        if (!Ext.isIE) {
+            view.un('containerclick', cancelClick, view);    
+        }        
+        if(proxy){
+            proxy.setDisplayed(false);
+        }
+    }
+
+    function onRender(view){
+        tracker = new Ext.dd.DragTracker({
+            onBeforeStart: onBeforeStart,
+            onStart: onStart,
+            onDrag: onDrag,
+            onEnd: onEnd
+        });
+        tracker.initEl(view.el);
+    }
+};Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.FileUploadField
+ * @extends Ext.form.TextField
+ * Creates a file upload field.
+ * @xtype fileuploadfield
+ */
+Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {String} buttonText The button text to display on the upload button (defaults to
+     * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
+     * value will be used instead if available.
+     */
+    buttonText: 'Browse...',
+    /**
+     * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
+     * text field (defaults to false).  If true, all inherited TextField members will still be available.
+     */
+    buttonOnly: false,
+    /**
+     * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
+     * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
+     */
+    buttonOffset: 3,
+    /**
+     * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.
+     */
+
+    // private
+    readOnly: true,
+
+    /**
+     * @hide
+     * @method autoSize
+     */
+    autoSize: Ext.emptyFn,
+
+    // private
+    initComponent: function(){
+        Ext.ux.form.FileUploadField.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event fileselected
+             * Fires when the underlying file input field's value has changed from the user
+             * selecting a new file from the system file selection dialog.
+             * @param {Ext.ux.form.FileUploadField} this
+             * @param {String} value The file value returned by the underlying file input field
+             */
+            'fileselected'
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ux.form.FileUploadField.superclass.onRender.call(this, ct, position);
+
+        this.wrap = this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});
+        this.el.addClass('x-form-file-text');
+        this.el.dom.removeAttribute('name');
+
+        this.fileInput = this.wrap.createChild({
+            id: this.getFileInputId(),
+            name: this.name||this.getId(),
+            cls: 'x-form-file',
+            tag: 'input',
+            type: 'file',
+            size: 1
+        });
+
+        var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
+            text: this.buttonText
+        });
+        this.button = new Ext.Button(Ext.apply(btnCfg, {
+            renderTo: this.wrap,
+            cls: 'x-form-file-btn' + (btnCfg.iconCls ? ' x-btn-icon' : '')
+        }));
+
+        if(this.buttonOnly){
+            this.el.hide();
+            this.wrap.setWidth(this.button.getEl().getWidth());
+        }
+
+        this.fileInput.on('change', function(){
+            var v = this.fileInput.dom.value;
+            this.setValue(v);
+            this.fireEvent('fileselected', this, v);
+        }, this);
+    },
+
+    // private
+    getFileInputId: function(){
+        return this.id + '-file';
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.ux.form.FileUploadField.superclass.onResize.call(this, w, h);
+
+        this.wrap.setWidth(w);
+
+        if(!this.buttonOnly){
+            var w = this.wrap.getWidth() - this.button.getEl().getWidth() - this.buttonOffset;
+            this.el.setWidth(w);
+        }
+    },
+
+    // private
+    onDestroy: function(){
+        Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
+        Ext.destroy(this.fileInput, this.button, this.wrap);
+    },
+
+
+    // private
+    preFocus : Ext.emptyFn,
+
+    // private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon : function(){
+        this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+    }
+
+});
+
+Ext.reg('fileuploadfield', Ext.ux.form.FileUploadField);
+
+// backwards compat
+Ext.form.FileUploadField = Ext.ux.form.FileUploadField;
+(function(){
+Ext.ns('Ext.a11y');
+
+Ext.a11y.Frame = Ext.extend(Object, {
+    initialized: false,
+    
+    constructor: function(size, color){
+        this.setSize(size || 1);
+        this.setColor(color || '15428B');
+    },
+    
+    init: function(){
+        if (!this.initialized) {
+            this.sides = [];
+            
+            var s, i;
+            
+            this.ct = Ext.DomHelper.append(document.body, {
+                cls: 'x-a11y-focusframe'
+            }, true);
+            
+            for (i = 0; i < 4; i++) {
+                s = Ext.DomHelper.append(this.ct, {
+                    cls: 'x-a11y-focusframe-side',
+                    style: 'background-color: #' + this.color
+                }, true);
+                s.visibilityMode = Ext.Element.DISPLAY;
+                this.sides.push(s);
+            }
+            
+            this.frameTask = new Ext.util.DelayedTask(function(el){
+                var newEl = Ext.get(el);
+                if (newEl != this.curEl) {
+                    var w = newEl.getWidth();
+                    var h = newEl.getHeight();
+                    this.sides[0].show().setSize(w, this.size).anchorTo(el, 'tl', [0, -1]);
+                    this.sides[2].show().setSize(w, this.size).anchorTo(el, 'bl', [0, -1]);
+                    this.sides[1].show().setSize(this.size, h).anchorTo(el, 'tr', [-1, 0]);
+                    this.sides[3].show().setSize(this.size, h).anchorTo(el, 'tl', [-1, 0]);
+                    this.curEl = newEl;
+                }
+            }, this);
+            
+            this.unframeTask = new Ext.util.DelayedTask(function(){
+                if (this.initialized) {
+                    this.sides[0].hide();
+                    this.sides[1].hide();
+                    this.sides[2].hide();
+                    this.sides[3].hide();
+                    this.curEl = null;
+                }
+            }, this);
+            this.initialized = true;
+        }
+    },
+    
+    frame: function(el){
+        this.init();
+        this.unframeTask.cancel();
+        this.frameTask.delay(2, false, false, [el]);
+    },
+    
+    unframe: function(){
+        this.init();
+        this.unframeTask.delay(2);
+    },
+    
+    setSize: function(size){
+        this.size = size;
+    },
+    
+    setColor: function(color){
+        this.color = color;
+    }
+});
+
+Ext.a11y.FocusFrame = new Ext.a11y.Frame(2, '15428B');
+Ext.a11y.RelayFrame = new Ext.a11y.Frame(1, '6B8CBF');
+
+Ext.a11y.Focusable = Ext.extend(Ext.util.Observable, {
+    constructor: function(el, relayTo, noFrame, frameEl){
+        Ext.a11y.Focusable.superclass.constructor.call(this);
+        
+        this.addEvents('focus', 'blur', 'left', 'right', 'up', 'down', 'esc', 'enter', 'space');
+        
+        if (el instanceof Ext.Component) {
+            this.el = el.el;
+            this.setComponent(el);
+        }
+        else {
+            this.el = Ext.get(el);
+            this.setComponent(null);
+        }
+        
+        this.setRelayTo(relayTo)
+        this.setNoFrame(noFrame);
+        this.setFrameEl(frameEl);
+        
+        this.init();
+        
+        Ext.a11y.FocusMgr.register(this);
+    },
+    
+    init: function(){
+        this.el.dom.tabIndex = '1';
+        this.el.addClass('x-a11y-focusable');
+        this.el.on({
+            focus: this.onFocus,
+            blur: this.onBlur,
+            keydown: this.onKeyDown,
+            scope: this
+        });
+    },
+    
+    setRelayTo: function(relayTo){
+        this.relayTo = relayTo ? Ext.a11y.FocusMgr.get(relayTo) : null;
+    },
+    
+    setNoFrame: function(noFrame){
+        this.noFrame = (noFrame === true) ? true : false;
+    },
+    
+    setFrameEl: function(frameEl){
+        this.frameEl = frameEl && Ext.get(frameEl) || this.el;
+    },
+    
+    setComponent: function(cmp){
+        this.component = cmp || null;
+    },
+    
+    onKeyDown: function(e, t){
+        var k = e.getKey(), SK = Ext.a11y.Focusable.SpecialKeys, ret, tf;
+        
+        tf = (t !== this.el.dom) ? Ext.a11y.FocusMgr.get(t, true) : this;
+        if (!tf) {
+            // this can happen when you are on a focused item within a panel body
+            // that is not a Ext.a11y.Focusable
+            tf = Ext.a11y.FocusMgr.get(Ext.fly(t).parent('.x-a11y-focusable'));
+        }
+        
+        if (SK[k] !== undefined) {
+            ret = this.fireEvent(SK[k], e, t, tf, this);
+        }
+        if (ret === false || this.fireEvent('keydown', e, t, tf, this) === false) {
+            e.stopEvent();
+        }
+    },
+    
+    focus: function(){
+        this.el.dom.focus();
+    },
+    
+    blur: function(){
+        this.el.dom.blur();
+    },
+    
+    onFocus: function(e, t){
+        this.el.addClass('x-a11y-focused');
+        if (this.relayTo) {
+            this.relayTo.el.addClass('x-a11y-focused-relay');
+            if (!this.relayTo.noFrame) {
+                Ext.a11y.FocusFrame.frame(this.relayTo.frameEl);
+            }
+            if (!this.noFrame) {
+                Ext.a11y.RelayFrame.frame(this.frameEl);
+            }
+        }
+        else {
+            if (!this.noFrame) {
+                Ext.a11y.FocusFrame.frame(this.frameEl);
+            }
+        }
+        
+        this.fireEvent('focus', e, t, this);
+    },
+    
+    onBlur: function(e, t){
+        if (this.relayTo) {
+            this.relayTo.el.removeClass('x-a11y-focused-relay');
+            Ext.a11y.RelayFrame.unframe();
+        }
+        this.el.removeClass('x-a11y-focused');
+        Ext.a11y.FocusFrame.unframe();
+        this.fireEvent('blur', e, t, this);
+    },
+    
+    destroy: function(){
+        this.el.un('keydown', this.onKeyDown);
+        this.el.un('focus', this.onFocus);
+        this.el.un('blur', this.onBlur);
+        this.el.removeClass('x-a11y-focusable');
+        this.el.removeClass('x-a11y-focused');
+        if (this.relayTo) {
+            this.relayTo.el.removeClass('x-a11y-focused-relay');
+        }
+    }
+});
+
+Ext.a11y.FocusItem = Ext.extend(Object, {
+    constructor: function(el, enableTabbing){
+        Ext.a11y.FocusItem.superclass.constructor.call(this);
+        
+        this.el = Ext.get(el);
+        this.fi = new Ext.a11y.Focusable(el);
+        this.fi.setComponent(this);
+        
+        this.fi.on('tab', this.onTab, this);
+        
+        this.enableTabbing = enableTabbing === true ? true : false;
+    },
+    
+    getEnterItem: function(){
+        if (this.enableTabbing) {
+            var items = this.getFocusItems();
+            if (items && items.length) {
+                return items[0];
+            }
+        }
+    },
+    
+    getFocusItems: function(){
+        if (this.enableTabbing) {
+            return this.el.query('a, button, input, select');
+        }
+        return null;
+    },
+    
+    onTab: function(e, t){
+        var items = this.getFocusItems(), i;
+        
+        if (items && items.length && (i = items.indexOf(t)) !== -1) {
+            if (e.shiftKey && i > 0) {
+                e.stopEvent();
+                items[i - 1].focus();
+                Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                return;
+            }
+            else 
+                if (!e.shiftKey && i < items.length - 1) {
+                    e.stopEvent();
+                    items[i + 1].focus();
+                    Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                    return;
+                }
+        }
+    },
+    
+    focus: function(){
+        if (this.enableTabbing) {
+            var items = this.getFocusItems();
+            if (items && items.length) {
+                items[0].focus();
+                Ext.a11y.FocusFrame.frame.defer(20, Ext.a11y.FocusFrame, [this.el]);
+                return;
+            }
+        }
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    }
+});
+
+Ext.a11y.FocusMgr = function(){
+    var all = new Ext.util.MixedCollection();
+    
+    return {
+        register: function(f){
+            all.add(f.el && Ext.id(f.el), f);
+        },
+        
+        unregister: function(f){
+            all.remove(f);
+        },
+        
+        get: function(el, noCreate){
+            return all.get(Ext.id(el)) || (noCreate ? false : new Ext.a11y.Focusable(el));
+        },
+        
+        all: all
+    }
+}();
+
+Ext.a11y.Focusable.SpecialKeys = {};
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.LEFT] = 'left';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.RIGHT] = 'right';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.DOWN] = 'down';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.UP] = 'up';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ESC] = 'esc';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ENTER] = 'enter';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.SPACE] = 'space';
+Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.TAB] = 'tab';
+
+// we use the new observeClass method to fire our new initFocus method on components
+Ext.util.Observable.observeClass(Ext.Component);
+Ext.Component.on('render', function(cmp){
+    cmp.initFocus();
+    cmp.initARIA();
+});
+Ext.override(Ext.Component, {
+    initFocus: Ext.emptyFn,
+    initARIA: Ext.emptyFn
+});
+
+Ext.override(Ext.Container, {
+    isFocusable: true,
+    noFocus: false,
+    
+    // private
+    initFocus: function(){
+        if (!this.fi && !this.noFocus) {
+            this.fi = new Ext.a11y.Focusable(this);
+        }
+        this.mon(this.fi, {
+            focus: this.onFocus,
+            blur: this.onBlur,
+            tab: this.onTab,
+            enter: this.onEnter,
+            esc: this.onEsc,
+            scope: this
+        });
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    },
+    
+    focus: function(){
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    },
+    
+    enter: function(){
+        var eitem = this.getEnterItem();
+        if (eitem) {
+            eitem.focus();
+        }
+    },
+    
+    onFocus: Ext.emptyFn,
+    onBlur: Ext.emptyFn,
+    
+    onTab: function(e, t, tf){
+        var rf = tf.relayTo || tf;
+        if (rf.component && rf.component !== this) {
+            e.stopEvent();
+            var item = e.shiftKey ? this.getPreviousFocus(rf.component) : this.getNextFocus(rf.component);
+            item.focus();
+        }
+    },
+    
+    onEnter: function(e, t, tf){
+        // check to see if enter is pressed while "on" the panel
+        if (tf.component && tf.component === this) {
+            e.stopEvent();
+            this.enter();
+        }
+        e.stopPropagation();
+    },
+    
+    onEsc: function(e, t){
+        e.preventDefault();
+        
+        // check to see if esc is pressed while "inside" the panel
+        // or while "on" the panel
+        if (t === this.el.dom) {
+            // "on" the panel, check if this panel has an owner panel and focus that
+            // we dont stop the event in this case so that this same check will be
+            // done for this ownerCt
+            if (this.ownerCt) {
+                this.ownerCt.focus();
+            }
+        }
+        else {
+            // we were inside the panel when esc was pressed,
+            // so go back "on" the panel
+            if (this.ownerCt && this.ownerCt.isFocusable) {
+                var si = this.ownerCt.getFocusItems();
+                
+                if (si && si.getCount() > 1) {
+                    e.stopEvent();
+                }
+            }
+            this.focus();
+        }
+    },
+    
+    getFocusItems: function(){
+        return this.items &&
+        this.items.filterBy(function(o){
+            return o.isFocusable;
+        }) ||
+        null;
+    },
+    
+    getEnterItem: function(){
+        var ci = this.getFocusItems(), length = ci ? ci.getCount() : 0;
+        
+        if (length === 1) {
+            return ci.first().getEnterItem && ci.first().getEnterItem() || ci.first();
+        }
+        else 
+            if (length > 1) {
+                return ci.first();
+            }
+    },
+    
+    getNextFocus: function(current){
+        var items = this.getFocusItems(), next = current, i = items.indexOf(current), length = items.getCount();
+        
+        if (i === length - 1) {
+            next = items.first();
+        }
+        else {
+            next = items.get(i + 1);
+        }
+        return next;
+    },
+    
+    getPreviousFocus: function(current){
+        var items = this.getFocusItems(), prev = current, i = items.indexOf(current), length = items.getCount();
+        
+        if (i === 0) {
+            prev = items.last();
+        }
+        else {
+            prev = items.get(i - 1);
+        }
+        return prev;
+    },
+    
+    getFocusable : function() {
+        return this.fi;
+    }
+});
+
+Ext.override(Ext.Panel, {
+    /**
+     * @cfg {Boolean} enableTabbing <tt>true</tt> to enable tabbing. Default is <tt>false</tt>.
+     */        
+    getFocusItems: function(){
+        // items gets all the items inside the body
+        var items = Ext.Panel.superclass.getFocusItems.call(this), bodyFocus = null;
+        
+        if (!items) {
+            items = new Ext.util.MixedCollection();
+            this.bodyFocus = this.bodyFocus || new Ext.a11y.FocusItem(this.body, this.enableTabbing);
+            items.add('body', this.bodyFocus);
+        }
+        // but panels can also have tbar, bbar, fbar
+        if (this.tbar && this.topToolbar) {
+            items.insert(0, this.topToolbar);
+        }
+        if (this.bbar && this.bottomToolbar) {
+            items.add(this.bottomToolbar);
+        }
+        if (this.fbar) {
+            items.add(this.fbar);
+        }
+        
+        return items;
+    }
+});
+
+Ext.override(Ext.TabPanel, {
+    // private
+    initFocus: function(){
+        Ext.TabPanel.superclass.initFocus.call(this);
+        this.mon(this.fi, {
+            left: this.onLeft,
+            right: this.onRight,
+            scope: this
+        });
+    },
+    
+    onLeft: function(e){
+        if (!this.activeTab) {
+            return;
+        }
+        e.stopEvent();
+        var prev = this.items.itemAt(this.items.indexOf(this.activeTab) - 1);
+        if (prev) {
+            this.setActiveTab(prev);
+        }
+        return false;
+    },
+    
+    onRight: function(e){
+        if (!this.activeTab) {
+            return;
+        }
+        e.stopEvent();
+        var next = this.items.itemAt(this.items.indexOf(this.activeTab) + 1);
+        if (next) {
+            this.setActiveTab(next);
+        }
+        return false;
+    }
+});
+
+Ext.override(Ext.tree.TreeNodeUI, {
+    // private
+    focus: function(){
+        this.node.getOwnerTree().bodyFocus.focus();
+    }
+});
+
+Ext.override(Ext.tree.TreePanel, {
+    // private
+    afterRender : function(){
+        Ext.tree.TreePanel.superclass.afterRender.call(this);
+        this.root.render();
+        if(!this.rootVisible){
+            this.root.renderChildren();
+        }
+        this.bodyFocus = new Ext.a11y.FocusItem(this.body.down('.x-tree-root-ct'));
+        this.bodyFocus.fi.setFrameEl(this.body);
+    } 
+});
+
+Ext.override(Ext.grid.GridPanel, {
+    initFocus: function(){
+        Ext.grid.GridPanel.superclass.initFocus.call(this);
+        this.bodyFocus = new Ext.a11y.FocusItem(this.view.focusEl);
+        this.bodyFocus.fi.setFrameEl(this.body);
+    }
+});
+
+Ext.override(Ext.Button, {
+    isFocusable: true,
+    noFocus: false,
+    
+    initFocus: function(){
+        Ext.Button.superclass.initFocus.call(this);
+        this.fi = this.fi || new Ext.a11y.Focusable(this.btnEl, null, null, this.el);
+        this.fi.setComponent(this);
+        
+        this.mon(this.fi, {
+            focus: this.onFocus,
+            blur: this.onBlur,
+            scope: this
+        });
+        
+        if (this.menu) {
+            this.mon(this.fi, 'down', this.showMenu, this);
+            this.on('menuhide', this.focus, this);
+        }
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    },
+    
+    focus: function(){
+        this.fi.focus();
+    },
+    
+    blur: function(){
+        this.fi.blur();
+    },
+    
+    onFocus: function(){
+        if (!this.disabled) {
+            this.el.addClass("x-btn-focus");
+        }
+    },
+    
+    onBlur: function(){
+        this.el.removeClass("x-btn-focus");
+    }
+});
+
+Ext.override(Ext.Toolbar, {
+    initFocus: function(){
+        Ext.Toolbar.superclass.initFocus.call(this);
+        this.mon(this.fi, {
+            left: this.onLeft,
+            right: this.onRight,
+            scope: this
+        });
+        
+        this.on('focus', this.onButtonFocus, this, {
+            stopEvent: true
+        });
+    },
+    
+    addItem: function(item){
+        Ext.Toolbar.superclass.add.apply(this, arguments);
+        if (item.rendered && item.fi !== undefined) {
+            item.fi.setRelayTo(this.el);
+            this.relayEvents(item.fi, ['focus']);
+        }
+        else {
+            item.on('render', function(){
+                if (item.fi !== undefined) {
+                    item.fi.setRelayTo(this.el);
+                    this.relayEvents(item.fi, ['focus']);
+                }
+            }, this, {
+                single: true
+            });
+        }
+        return item;
+    },
+    
+    onFocus: function(){
+        var items = this.getFocusItems();
+        if (items && items.getCount() > 0) {
+            if (this.lastFocus && items.indexOf(this.lastFocus) !== -1) {
+                this.lastFocus.focus();
+            }
+            else {
+                items.first().focus();
+            }
+        }
+    },
+    
+    onButtonFocus: function(e, t, tf){
+        this.lastFocus = tf.component || null;
+    },
+    
+    onLeft: function(e, t, tf){
+        e.stopEvent();
+        this.getPreviousFocus(tf.component).focus();
+    },
+    
+    onRight: function(e, t, tf){
+        e.stopEvent();
+        this.getNextFocus(tf.component).focus();
+    },
+    
+    getEnterItem: Ext.emptyFn,
+    onTab: Ext.emptyFn,
+    onEsc: Ext.emptyFn
+});
+
+Ext.override(Ext.menu.BaseItem, {
+    initFocus: function(){
+        this.fi = new Ext.a11y.Focusable(this, this.parentMenu && this.parentMenu.el || null, true);
+    }
+});
+
+Ext.override(Ext.menu.Menu, {
+    initFocus: function(){
+        this.fi = new Ext.a11y.Focusable(this);
+        this.focusEl = this.fi;
+    }
+});
+
+Ext.a11y.WindowMgr = new Ext.WindowGroup();
+
+Ext.apply(Ext.WindowMgr, {
+    bringToFront: function(win){
+        Ext.a11y.WindowMgr.bringToFront.call(this, win);
+        if (win.modal) {
+            win.enter();
+        }
+        else {
+            win.focus();
+        }
+    }
+});
+
+Ext.override(Ext.Window, {
+    initFocus: function(){
+        Ext.Window.superclass.initFocus.call(this);
+        this.on('beforehide', function(){
+            Ext.a11y.RelayFrame.unframe();
+            Ext.a11y.FocusFrame.unframe();
+        });
+    }
+});
+
+Ext.override(Ext.form.Field, {
+    isFocusable: true,
+    noFocus: false,
+    
+    initFocus: function(){
+        this.fi = this.fi || new Ext.a11y.Focusable(this, null, true);
+        
+        Ext.form.Field.superclass.initFocus.call(this);
+        
+        if (this.hidden) {
+            this.isFocusable = false;
+        }
+        
+        this.on('show', function(){
+            this.isFocusable = true;
+        }, this);
+        this.on('hide', function(){
+            this.isFocusable = false;
+        }, this);
+    }
+});
+
+Ext.override(Ext.FormPanel, {
+    initFocus: function(){
+        Ext.FormPanel.superclass.initFocus.call(this);
+        this.on('focus', this.onFieldFocus, this, {
+            stopEvent: true
+        });
+    },
+    
+    // private
+    createForm: function(){
+        delete this.initialConfig.listeners;
+        var form = new Ext.form.BasicForm(null, this.initialConfig);
+        form.afterMethod('add', this.formItemAdd, this);
+        return form;
+    },
+    
+    formItemAdd: function(item){
+        item.on('render', function(field){
+            field.fi.setRelayTo(this.el);
+            this.relayEvents(field.fi, ['focus']);
+        }, this, {
+            single: true
+        });
+    },
+    
+    onFocus: function(){
+        var items = this.getFocusItems();
+        if (items && items.getCount() > 0) {
+            if (this.lastFocus && items.indexOf(this.lastFocus) !== -1) {
+                this.lastFocus.focus();
+            }
+            else {
+                items.first().focus();
+            }
+        }
+    },
+    
+    onFieldFocus: function(e, t, tf){
+        this.lastFocus = tf.component || null;
+    },
+    
+    onTab: function(e, t, tf){
+        if (tf.relayTo.component === this) {
+            var item = e.shiftKey ? this.getPreviousFocus(tf.component) : this.getNextFocus(tf.component);
+            
+            if (item) {
+                ev.stopEvent();
+                item.focus();
+                return;
+            }
+        }
+        Ext.FormPanel.superclass.onTab.apply(this, arguments);
+    },
+    
+    getNextFocus: function(current){
+        var items = this.getFocusItems(), i = items.indexOf(current), length = items.getCount();
+        
+        return (i < length - 1) ? items.get(i + 1) : false;
+    },
+    
+    getPreviousFocus: function(current){
+        var items = this.getFocusItems(), i = items.indexOf(current), length = items.getCount();
+        
+        return (i > 0) ? items.get(i - 1) : false;
+    }
+});
+
+Ext.override(Ext.Viewport, {
+    initFocus: function(){
+        Ext.Viewport.superclass.initFocus.apply(this);
+        this.mon(Ext.get(document), 'focus', this.focus, this);
+        this.mon(Ext.get(document), 'blur', this.blur, this);
+        this.fi.setNoFrame(true);
+    },
+    
+    onTab: function(e, t, tf, f){
+        e.stopEvent();
+        
+        if (tf === f) {
+            items = this.getFocusItems();
+            if (items && items.getCount() > 0) {
+                items.first().focus();
+            }
+        }
+        else {
+            var rf = tf.relayTo || tf;
+            var item = e.shiftKey ? this.getPreviousFocus(rf.component) : this.getNextFocus(rf.component);
+            item.focus();
+        }
+    }
+});
+    
+})();/**
+ * @class Ext.ux.GMapPanel
+ * @extends Ext.Panel
+ * @author Shea Frederick
+ */
+Ext.ux.GMapPanel = Ext.extend(Ext.Panel, {
+    initComponent : function(){
+        
+        var defConfig = {
+            plain: true,
+            zoomLevel: 3,
+            yaw: 180,
+            pitch: 0,
+            zoom: 0,
+            gmapType: 'map',
+            border: false
+        };
+        
+        Ext.applyIf(this,defConfig);
+        
+        Ext.ux.GMapPanel.superclass.initComponent.call(this);        
+
+    },
+    afterRender : function(){
+        
+        var wh = this.ownerCt.getSize();
+        Ext.applyIf(this, wh);
+        
+        Ext.ux.GMapPanel.superclass.afterRender.call(this);    
+        
+        if (this.gmapType === 'map'){
+            this.gmap = new GMap2(this.body.dom);
+        }
+        
+        if (this.gmapType === 'panorama'){
+            this.gmap = new GStreetviewPanorama(this.body.dom);
+        }
+        
+        if (typeof this.addControl == 'object' && this.gmapType === 'map') {
+            this.gmap.addControl(this.addControl);
+        }
+        
+        if (typeof this.setCenter === 'object') {
+            if (typeof this.setCenter.geoCodeAddr === 'string'){
+                this.geoCodeLookup(this.setCenter.geoCodeAddr);
+            }else{
+                if (this.gmapType === 'map'){
+                    var point = new GLatLng(this.setCenter.lat,this.setCenter.lng);
+                    this.gmap.setCenter(point, this.zoomLevel);    
+                }
+                if (typeof this.setCenter.marker === 'object' && typeof point === 'object'){
+                    this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear);
+                }
+            }
+            if (this.gmapType === 'panorama'){
+                this.gmap.setLocationAndPOV(new GLatLng(this.setCenter.lat,this.setCenter.lng), {yaw: this.yaw, pitch: this.pitch, zoom: this.zoom});
+            }
+        }
+
+        GEvent.bind(this.gmap, 'load', this, function(){
+            this.onMapReady();
+        });
+
+    },
+    onMapReady : function(){
+        this.addMarkers(this.markers);
+        this.addMapControls();
+        this.addOptions();  
+    },
+    onResize : function(w, h){
+
+        if (typeof this.getMap() == 'object') {
+            this.gmap.checkResize();
+        }
+        
+        Ext.ux.GMapPanel.superclass.onResize.call(this, w, h);
+
+    },
+    setSize : function(width, height, animate){
+        
+        if (typeof this.getMap() == 'object') {
+            this.gmap.checkResize();
+        }
+        
+        Ext.ux.GMapPanel.superclass.setSize.call(this, width, height, animate);
+        
+    },
+    getMap : function(){
+        
+        return this.gmap;
+        
+    },
+    getCenter : function(){
+        
+        return this.getMap().getCenter();
+        
+    },
+    getCenterLatLng : function(){
+        
+        var ll = this.getCenter();
+        return {lat: ll.lat(), lng: ll.lng()};
+        
+    },
+    addMarkers : function(markers) {
+        
+        if (Ext.isArray(markers)){
+            for (var i = 0; i < markers.length; i++) {
+                var mkr_point = new GLatLng(markers[i].lat,markers[i].lng);
+                this.addMarker(mkr_point,markers[i].marker,false,markers[i].setCenter, markers[i].listeners);
+            }
+        }
+        
+    },
+    addMarker : function(point, marker, clear, center, listeners){
+        
+        Ext.applyIf(marker,G_DEFAULT_ICON);
+
+        if (clear === true){
+            this.getMap().clearOverlays();
+        }
+        if (center === true) {
+            this.getMap().setCenter(point, this.zoomLevel);
+        }
+
+        var mark = new GMarker(point,marker);
+        if (typeof listeners === 'object'){
+            for (evt in listeners) {
+                GEvent.bind(mark, evt, this, listeners[evt]);
+            }
+        }
+        this.getMap().addOverlay(mark);
+
+    },
+    addMapControls : function(){
+        
+        if (this.gmapType === 'map') {
+            if (Ext.isArray(this.mapControls)) {
+                for(i=0;i<this.mapControls.length;i++){
+                    this.addMapControl(this.mapControls[i]);
+                }
+            }else if(typeof this.mapControls === 'string'){
+                this.addMapControl(this.mapControls);
+            }else if(typeof this.mapControls === 'object'){
+                this.getMap().addControl(this.mapControls);
+            }
+        }
+        
+    },
+    addMapControl : function(mc){
+        
+        var mcf = window[mc];
+        if (typeof mcf === 'function') {
+            this.getMap().addControl(new mcf());
+        }    
+        
+    },
+    addOptions : function(){
+        
+        if (Ext.isArray(this.mapConfOpts)) {
+            var mc;
+            for(i=0;i<this.mapConfOpts.length;i++){
+                this.addOption(this.mapConfOpts[i]);
+            }
+        }else if(typeof this.mapConfOpts === 'string'){
+            this.addOption(this.mapConfOpts);
+        }        
+        
+    },
+    addOption : function(mc){
+        
+        var mcf = this.getMap()[mc];
+        if (typeof mcf === 'function') {
+            this.getMap()[mc]();
+        }    
+        
+    },
+    geoCodeLookup : function(addr) {
+        
+        this.geocoder = new GClientGeocoder();
+        this.geocoder.getLocations(addr, this.addAddressToMap.createDelegate(this));
+        
+    },
+    addAddressToMap : function(response) {
+        
+        if (!response || response.Status.code != 200) {
+            Ext.MessageBox.alert('Error', 'Code '+response.Status.code+' Error Returned');
+        }else{
+            place = response.Placemark[0];
+            addressinfo = place.AddressDetails;
+            accuracy = addressinfo.Accuracy;
+            if (accuracy === 0) {
+                Ext.MessageBox.alert('Unable to Locate Address', 'Unable to Locate the Address you provided');
+            }else{
+                if (accuracy < 7) {
+                    Ext.MessageBox.alert('Address Accuracy', 'The address provided has a low accuracy.<br><br>Level '+accuracy+' Accuracy (8 = Exact Match, 1 = Vague Match)');
+                }else{
+                    point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
+                    if (typeof this.setCenter.marker === 'object' && typeof point === 'object'){
+                        this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear,true, this.setCenter.listeners);
+                    }
+                }
+            }
+        }
+        
+    }
+ 
+});
+
+Ext.reg('gmappanel', Ext.ux.GMapPanel); Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.GroupSummary
+ * @extends Ext.util.Observable
+ * A GridPanel plugin that enables dynamic column calculations and a dynamically
+ * updated grouped summary row.
+ */
+Ext.ux.grid.GroupSummary = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Function} summaryRenderer Renderer example:<pre><code>
+summaryRenderer: function(v, params, data){
+    return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
+},
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} summaryType (Optional) The type of
+     * calculation to be used for the column.  For options available see
+     * {@link #Calculations}.
+     */
+
+    constructor : function(config){
+        Ext.apply(this, config);
+        Ext.ux.grid.GroupSummary.superclass.constructor.call(this);
+    },
+    init : function(grid){
+        this.grid = grid;
+        this.cm = grid.getColumnModel();
+        this.view = grid.getView();
+
+        var v = this.view;
+        v.doGroupEnd = this.doGroupEnd.createDelegate(this);
+
+        v.afterMethod('onColumnWidthUpdated', this.doWidth, this);
+        v.afterMethod('onAllColumnWidthsUpdated', this.doAllWidths, this);
+        v.afterMethod('onColumnHiddenUpdated', this.doHidden, this);
+        v.afterMethod('onUpdate', this.doUpdate, this);
+        v.afterMethod('onRemove', this.doRemove, this);
+
+        if(!this.rowTpl){
+            this.rowTpl = new Ext.Template(
+                '<div class="x-grid3-summary-row" style="{tstyle}">',
+                '<table class="x-grid3-summary-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<tbody><tr>{cells}</tr></tbody>',
+                '</table></div>'
+            );
+            this.rowTpl.disableFormats = true;
+        }
+        this.rowTpl.compile();
+
+        if(!this.cellTpl){
+            this.cellTpl = new Ext.Template(
+                '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">',
+                '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',
+                "</td>"
+            );
+            this.cellTpl.disableFormats = true;
+        }
+        this.cellTpl.compile();
+    },
+
+    /**
+     * Toggle the display of the summary row on/off
+     * @param {Boolean} visible <tt>true</tt> to show the summary, <tt>false</tt> to hide the summary.
+     */
+    toggleSummaries : function(visible){
+        var el = this.grid.getGridEl();
+        if(el){
+            if(visible === undefined){
+                visible = el.hasClass('x-grid-hide-summary');
+            }
+            el[visible ? 'removeClass' : 'addClass']('x-grid-hide-summary');
+        }
+    },
+
+    renderSummary : function(o, cs){
+        cs = cs || this.view.getColumnData();
+        var cfg = this.cm.config;
+
+        var buf = [], c, p = {}, cf, last = cs.length-1;
+        for(var i = 0, len = cs.length; i < len; i++){
+            c = cs[i];
+            cf = cfg[i];
+            p.id = c.id;
+            p.style = c.style;
+            p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+            if(cf.summaryType || cf.summaryRenderer){
+                p.value = (cf.summaryRenderer || c.renderer)(o.data[c.name], p, o);
+            }else{
+                p.value = '';
+            }
+            if(p.value == undefined || p.value === "") p.value = "&#160;";
+            buf[buf.length] = this.cellTpl.apply(p);
+        }
+
+        return this.rowTpl.apply({
+            tstyle: 'width:'+this.view.getTotalWidth()+';',
+            cells: buf.join('')
+        });
+    },
+
+    /**
+     * @private
+     * @param {Object} rs
+     * @param {Object} cs
+     */
+    calculate : function(rs, cs){
+        var data = {}, r, c, cfg = this.cm.config, cf;
+        for(var j = 0, jlen = rs.length; j < jlen; j++){
+            r = rs[j];
+            for(var i = 0, len = cs.length; i < len; i++){
+                c = cs[i];
+                cf = cfg[i];
+                if(cf.summaryType){
+                    data[c.name] = Ext.ux.grid.GroupSummary.Calculations[cf.summaryType](data[c.name] || 0, r, c.name, data);
+                }
+            }
+        }
+        return data;
+    },
+
+    doGroupEnd : function(buf, g, cs, ds, colCount){
+        var data = this.calculate(g.rs, cs);
+        buf.push('</div>', this.renderSummary({data: data}, cs), '</div>');
+    },
+
+    doWidth : function(col, w, tw){
+        var gs = this.view.getGroups(), s;
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            s.firstChild.rows[0].childNodes[col].style.width = w;
+        }
+    },
+
+    doAllWidths : function(ws, tw){
+        var gs = this.view.getGroups(), s, cells, wlen = ws.length;
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            cells = s.firstChild.rows[0].childNodes;
+            for(var j = 0; j < wlen; j++){
+                cells[j].style.width = ws[j];
+            }
+        }
+    },
+
+    doHidden : function(col, hidden, tw){
+        var gs = this.view.getGroups(), s, display = hidden ? 'none' : '';
+        for(var i = 0, len = gs.length; i < len; i++){
+            s = gs[i].childNodes[2];
+            s.style.width = tw;
+            s.firstChild.style.width = tw;
+            s.firstChild.rows[0].childNodes[col].style.display = display;
+        }
+    },
+
+    // Note: requires that all (or the first) record in the
+    // group share the same group value. Returns false if the group
+    // could not be found.
+    refreshSummary : function(groupValue){
+        return this.refreshSummaryById(this.view.getGroupId(groupValue));
+    },
+
+    getSummaryNode : function(gid){
+        var g = Ext.fly(gid, '_gsummary');
+        if(g){
+            return g.down('.x-grid3-summary-row', true);
+        }
+        return null;
+    },
+
+    refreshSummaryById : function(gid){
+        var g = document.getElementById(gid);
+        if(!g){
+            return false;
+        }
+        var rs = [];
+        this.grid.store.each(function(r){
+            if(r._groupId == gid){
+                rs[rs.length] = r;
+            }
+        });
+        var cs = this.view.getColumnData();
+        var data = this.calculate(rs, cs);
+        var markup = this.renderSummary({data: data}, cs);
+
+        var existing = this.getSummaryNode(gid);
+        if(existing){
+            g.removeChild(existing);
+        }
+        Ext.DomHelper.append(g, markup);
+        return true;
+    },
+
+    doUpdate : function(ds, record){
+        this.refreshSummaryById(record._groupId);
+    },
+
+    doRemove : function(ds, record, index, isUpdate){
+        if(!isUpdate){
+            this.refreshSummaryById(record._groupId);
+        }
+    },
+
+    /**
+     * Show a message in the summary row.
+     * <pre><code>
+grid.on('afteredit', function(){
+    var groupValue = 'Ext Forms: Field Anchoring';
+    summary.showSummaryMsg(groupValue, 'Updating Summary...');
+});
+     * </code></pre>
+     * @param {String} groupValue
+     * @param {String} msg Text to use as innerHTML for the summary row.
+     */
+    showSummaryMsg : function(groupValue, msg){
+        var gid = this.view.getGroupId(groupValue);
+        var node = this.getSummaryNode(gid);
+        if(node){
+            node.innerHTML = '<div class="x-grid3-summary-msg">' + msg + '</div>';
+        }
+    }
+});
+
+//backwards compat
+Ext.grid.GroupSummary = Ext.ux.grid.GroupSummary;
+
+
+/**
+ * Calculation types for summary row:</p><div class="mdetail-params"><ul>
+ * <li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
+ * </ul></div>
+ * <p>Custom calculations may be implemented.  An example of
+ * custom <code>summaryType=totalCost</code>:</p><pre><code>
+// define a custom summary function
+Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
+    return v + (record.data.estimate * record.data.rate);
+};
+ * </code></pre>
+ * @property Calculations
+ */
+
+Ext.ux.grid.GroupSummary.Calculations = {
+    'sum' : function(v, record, field){
+        return v + (record.data[field]||0);
+    },
+
+    'count' : function(v, record, field, data){
+        return data[field+'count'] ? ++data[field+'count'] : (data[field+'count'] = 1);
+    },
+
+    'max' : function(v, record, field, data){
+        var v = record.data[field];
+        var max = data[field+'max'] === undefined ? (data[field+'max'] = v) : data[field+'max'];
+        return v > max ? (data[field+'max'] = v) : max;
+    },
+
+    'min' : function(v, record, field, data){
+        var v = record.data[field];
+        var min = data[field+'min'] === undefined ? (data[field+'min'] = v) : data[field+'min'];
+        return v < min ? (data[field+'min'] = v) : min;
+    },
+
+    'average' : function(v, record, field, data){
+        var c = data[field+'count'] ? ++data[field+'count'] : (data[field+'count'] = 1);
+        var t = (data[field+'total'] = ((data[field+'total']||0) + (record.data[field]||0)));
+        return t === 0 ? 0 : t / c;
+    }
+};
+Ext.grid.GroupSummary.Calculations = Ext.ux.grid.GroupSummary.Calculations;
+
+/**
+ * @class Ext.ux.grid.HybridSummary
+ * @extends Ext.ux.grid.GroupSummary
+ * Adds capability to specify the summary data for the group via json as illustrated here:
+ * <pre><code>
+{
+    data: [
+        {
+            projectId: 100,     project: 'House',
+            taskId:    112, description: 'Paint',
+            estimate:    6,        rate:     150,
+            due:'06/24/2007'
+        },
+        ...
+    ],
+
+    summaryData: {
+        'House': {
+            description: 14, estimate: 9,
+                   rate: 99, due: new Date(2009, 6, 29),
+                   cost: 999
+        }
+    }
+}
+ * </code></pre>
+ *
+ */
+Ext.ux.grid.HybridSummary = Ext.extend(Ext.ux.grid.GroupSummary, {
+    /**
+     * @private
+     * @param {Object} rs
+     * @param {Object} cs
+     */
+    calculate : function(rs, cs){
+        var gcol = this.view.getGroupField();
+        var gvalue = rs[0].data[gcol];
+        var gdata = this.getSummaryData(gvalue);
+        return gdata || Ext.ux.grid.HybridSummary.superclass.calculate.call(this, rs, cs);
+    },
+
+    /**
+     * <pre><code>
+grid.on('afteredit', function(){
+    var groupValue = 'Ext Forms: Field Anchoring';
+    summary.showSummaryMsg(groupValue, 'Updating Summary...');
+    setTimeout(function(){ // simulate server call
+        // HybridSummary class implements updateSummaryData
+        summary.updateSummaryData(groupValue,
+            // create data object based on configured dataIndex
+            {description: 22, estimate: 888, rate: 888, due: new Date(), cost: 8});
+    }, 2000);
+});
+     * </code></pre>
+     * @param {String} groupValue
+     * @param {Object} data data object
+     * @param {Boolean} skipRefresh (Optional) Defaults to false
+     */
+    updateSummaryData : function(groupValue, data, skipRefresh){
+        var json = this.grid.store.reader.jsonData;
+        if(!json.summaryData){
+            json.summaryData = {};
+        }
+        json.summaryData[groupValue] = data;
+        if(!skipRefresh){
+            this.refreshSummary(groupValue);
+        }
+    },
+
+    /**
+     * Returns the summaryData for the specified groupValue or null.
+     * @param {String} groupValue
+     * @return {Object} summaryData
+     */
+    getSummaryData : function(groupValue){
+        var json = this.grid.store.reader.jsonData;
+        if(json && json.summaryData){
+            return json.summaryData[groupValue];
+        }
+        return null;
+    }
+});
+
+//backwards compat
+Ext.grid.HybridSummary = Ext.ux.grid.HybridSummary;
+Ext.ux.GroupTab = Ext.extend(Ext.Container, {
+    mainItem: 0,
+    
+    expanded: true,
+    
+    deferredRender: true,
+    
+    activeTab: null,
+    
+    idDelimiter: '__',
+    
+    headerAsText: false,
+    
+    frame: false,
+    
+    hideBorders: true,
+    
+    initComponent: function(config){
+        Ext.apply(this, config);
+        this.frame = false;
+        
+        Ext.ux.GroupTab.superclass.initComponent.call(this);
+        
+        this.addEvents('activate', 'deactivate', 'changemainitem', 'beforetabchange', 'tabchange');
+        
+        this.setLayout(new Ext.layout.CardLayout({
+            deferredRender: this.deferredRender
+        }));
+        
+        if (!this.stack) {
+            this.stack = Ext.TabPanel.AccessStack();
+        }
+        
+        this.initItems();
+        
+        this.on('beforerender', function(){
+            this.groupEl = this.ownerCt.getGroupEl(this);
+        }, this);
+        
+        this.on('add', this.onAdd, this, {
+            target: this
+        });
+        this.on('remove', this.onRemove, this, {
+            target: this
+        });
+        
+        if (this.mainItem !== undefined) {
+            var item = (typeof this.mainItem == 'object') ? this.mainItem : this.items.get(this.mainItem);
+            delete this.mainItem;
+            this.setMainItem(item);
+        }
+    },
+    
+    /**
+     * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which
+     * can return false to cancel the tab change.
+     * @param {String/Panel} tab The id or tab Panel to activate
+     */
+    setActiveTab : function(item){
+        item = this.getComponent(item);
+        if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeTab = item;
+            return;
+        }
+        if(this.activeTab != item){
+            if(this.activeTab && this.activeTab != this.mainItem){
+                var oldEl = this.getTabEl(this.activeTab);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-grouptabs-strip-active');
+                }
+                this.activeTab.fireEvent('deactivate', this.activeTab);
+            }
+            var el = this.getTabEl(item);
+            Ext.fly(el).addClass('x-grouptabs-strip-active');
+            this.activeTab = item;
+            this.stack.add(item);
+
+            this.layout.setActiveItem(item);
+            if(this.layoutOnTabChange && item.doLayout){
+                item.doLayout();
+            }
+            if(this.scrolling){
+                this.scrollToTab(item, this.animScroll);
+            }
+
+            item.fireEvent('activate', item);
+            this.fireEvent('tabchange', this, item);
+        }
+    },
+    
+    getTabEl: function(item){
+        if (item == this.mainItem) {
+            return this.groupEl;
+        }
+        return Ext.TabPanel.prototype.getTabEl.call(this, item);
+    },
+    
+    onRender: function(ct, position){
+        Ext.ux.GroupTab.superclass.onRender.call(this, ct, position);
+        
+        this.strip = Ext.fly(this.groupEl).createChild({
+            tag: 'ul',
+            cls: 'x-grouptabs-sub'
+        });
+
+        this.tooltip = new Ext.ToolTip({
+           target: this.groupEl,
+           delegate: 'a.x-grouptabs-text',
+           trackMouse: true,
+           renderTo: document.body,
+           listeners: {
+               beforeshow: function(tip) {
+                   var item = (tip.triggerElement.parentNode === this.mainItem.tabEl)
+                       ? this.mainItem
+                       : this.findById(tip.triggerElement.parentNode.id.split(this.idDelimiter)[1]);
+
+                   if(!item.tabTip) {
+                       return false;
+                   }
+                   tip.body.dom.innerHTML = item.tabTip;
+               },
+               scope: this
+           }
+        });
+                
+        if (!this.itemTpl) {
+            var tt = new Ext.Template('<li class="{cls}" id="{id}">', '<a onclick="return false;" class="x-grouptabs-text {iconCls}">{text}</a>', '</li>');
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.ux.GroupTab.prototype.itemTpl = tt;
+        }
+        
+        this.items.each(this.initTab, this);
+    },
+    
+    afterRender: function(){
+        Ext.ux.GroupTab.superclass.afterRender.call(this);
+        
+        if (this.activeTab !== undefined) {
+            var item = (typeof this.activeTab == 'object') ? this.activeTab : this.items.get(this.activeTab);
+            delete this.activeTab;
+            this.setActiveTab(item);
+        }
+    },
+    
+    // private
+    initTab: function(item, index){
+        var before = this.strip.dom.childNodes[index];
+        var p = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
+        
+        if (item === this.mainItem) {
+            item.tabEl = this.groupEl;
+            p.cls += ' x-grouptabs-main-item';
+        }
+        
+        var el = before ? this.itemTpl.insertBefore(before, p) : this.itemTpl.append(this.strip, p);
+        
+        item.tabEl = item.tabEl || el;
+                
+        item.on('disable', this.onItemDisabled, this);
+        item.on('enable', this.onItemEnabled, this);
+        item.on('titlechange', this.onItemTitleChanged, this);
+        item.on('iconchange', this.onItemIconChanged, this);
+        item.on('beforeshow', this.onBeforeShowItem, this);
+    },
+    
+    setMainItem: function(item){
+        item = this.getComponent(item);
+        if (!item || this.fireEvent('changemainitem', this, item, this.mainItem) === false) {
+            return;
+        }
+        
+        this.mainItem = item;
+    },
+    
+    getMainItem: function(){
+        return this.mainItem || null;
+    },
+    
+    // private
+    onBeforeShowItem: function(item){
+        if (item != this.activeTab) {
+            this.setActiveTab(item);
+            return false;
+        }
+    },
+    
+    // private
+    onAdd: function(gt, item, index){
+        if (this.rendered) {
+            this.initTab.call(this, item, index);
+        }
+    },
+    
+    // private
+    onRemove: function(tp, item){
+        Ext.destroy(Ext.get(this.getTabEl(item)));
+        this.stack.remove(item);
+        item.un('disable', this.onItemDisabled, this);
+        item.un('enable', this.onItemEnabled, this);
+        item.un('titlechange', this.onItemTitleChanged, this);
+        item.un('iconchange', this.onItemIconChanged, this);
+        item.un('beforeshow', this.onBeforeShowItem, this);
+        if (item == this.activeTab) {
+            var next = this.stack.next();
+            if (next) {
+                this.setActiveTab(next);
+            }
+            else if (this.items.getCount() > 0) {
+                this.setActiveTab(0);
+            }
+            else {
+                this.activeTab = null;
+            }
+        }
+    },
+    
+    // private
+    onBeforeAdd: function(item){
+        var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
+        if (existing) {
+            this.setActiveTab(item);
+            return false;
+        }
+        Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
+        var es = item.elements;
+        item.elements = es ? es.replace(',header', '') : es;
+        item.border = (item.border === true);
+    },
+    
+    // private
+    onItemDisabled: Ext.TabPanel.prototype.onItemDisabled,
+    onItemEnabled: Ext.TabPanel.prototype.onItemEnabled,
+    
+    // private
+    onItemTitleChanged: function(item){
+        var el = this.getTabEl(item);
+        if (el) {
+            Ext.fly(el).child('a.x-grouptabs-text', true).innerHTML = item.title;
+        }
+    },
+    
+    //private
+    onItemIconChanged: function(item, iconCls, oldCls){
+        var el = this.getTabEl(item);
+        if (el) {
+            Ext.fly(el).child('a.x-grouptabs-text').replaceClass(oldCls, iconCls);
+        }
+    },
+    
+    beforeDestroy: function(){
+        Ext.TabPanel.prototype.beforeDestroy.call(this);
+        this.tooltip.destroy();
+    }
+});
+
+Ext.reg('grouptab', Ext.ux.GroupTab);
+Ext.ns('Ext.ux');
+
+Ext.ux.GroupTabPanel = Ext.extend(Ext.TabPanel, {
+    tabPosition: 'left',
+    
+    alternateColor: false,
+    
+    alternateCls: 'x-grouptabs-panel-alt',
+    
+    defaultType: 'grouptab',
+    
+    deferredRender: false,
+    
+    activeGroup : null,
+    
+    initComponent: function(){
+        Ext.ux.GroupTabPanel.superclass.initComponent.call(this);
+        
+        this.addEvents(
+            'beforegroupchange',
+            'groupchange'
+        );
+        this.elements = 'body,header';
+        this.stripTarget = 'header';
+        
+        this.tabPosition = this.tabPosition == 'right' ? 'right' : 'left';
+        
+        this.addClass('x-grouptabs-panel');
+        
+        if (this.tabStyle && this.tabStyle != '') {
+            this.addClass('x-grouptabs-panel-' + this.tabStyle);
+        }
+        
+        if (this.alternateColor) {
+            this.addClass(this.alternateCls);
+        }
+        
+        this.on('beforeadd', function(gtp, item, index){
+            this.initGroup(item, index);
+        });		     
+    },
+    
+    initEvents : function() {
+        this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
+    },
+        
+    onRender: function(ct, position){
+        Ext.TabPanel.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            var pos = this.tabPosition == 'top' ? 'header' : 'footer';
+            this[pos].addClass('x-tab-panel-'+pos+'-plain');
+        }
+
+        var st = this[this.stripTarget];
+
+        this.stripWrap = st.createChild({cls:'x-tab-strip-wrap ', cn:{
+            tag:'ul', cls:'x-grouptabs-strip x-grouptabs-tab-strip-'+this.tabPosition}});
+
+        var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null);
+        this.strip = new Ext.Element(this.stripWrap.dom.firstChild);
+
+		this.header.addClass('x-grouptabs-panel-header');
+		this.bwrap.addClass('x-grouptabs-bwrap');
+        this.body.addClass('x-tab-panel-body-'+this.tabPosition + ' x-grouptabs-panel-body');
+
+        if (!this.itemTpl) {
+            var tt = new Ext.Template(
+                '<li class="{cls}" id="{id}">', 
+                '<a class="x-grouptabs-expand" onclick="return false;"></a>', 
+                '<a class="x-grouptabs-text {iconCls}" href="#" onclick="return false;">',
+                '<span>{text}</span></a>', 
+                '</li>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.ux.GroupTabPanel.prototype.itemTpl = tt;
+        }
+
+        this.items.each(this.initGroup, this);
+    },
+    
+    afterRender: function(){
+        Ext.ux.GroupTabPanel.superclass.afterRender.call(this);
+        
+        this.tabJoint = Ext.fly(this.body.dom.parentNode).createChild({
+            cls: 'x-tab-joint'
+        });
+        
+        this.addClass('x-tab-panel-' + this.tabPosition);
+        this.header.setWidth(this.tabWidth);
+        
+        if (this.activeGroup !== undefined) {
+            var group = (typeof this.activeGroup == 'object') ? this.activeGroup : this.items.get(this.activeGroup);
+            delete this.activeGroup;
+            this.setActiveGroup(group);
+            group.setActiveTab(group.getMainItem());
+        }
+    },
+
+    getGroupEl : Ext.TabPanel.prototype.getTabEl,
+        
+    // private
+    findTargets: function(e){
+        var item = null;
+        var itemEl = e.getTarget('li', this.strip);
+        if (itemEl) {
+            item = this.findById(itemEl.id.split(this.idDelimiter)[1]);
+            if (item.disabled) {
+                return {
+                    expand: null,
+                    item: null,
+                    el: null
+                };
+            }
+        }
+        return {
+            expand: e.getTarget('.x-grouptabs-expand', this.strip),
+            isGroup: !e.getTarget('ul.x-grouptabs-sub', this.strip),
+            item: item,
+            el: itemEl
+        };
+    },
+    
+    // private
+    onStripMouseDown: function(e){
+        if (e.button != 0) {
+            return;
+        }
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if (t.expand) {
+            this.toggleGroup(t.el);
+        }
+        else if (t.item) {
+            if(t.isGroup) {
+                t.item.setActiveTab(t.item.getMainItem());
+            }
+            else {
+                t.item.ownerCt.setActiveTab(t.item);
+            }
+        }
+    },
+    
+    expandGroup: function(groupEl){
+        if(groupEl.isXType) {
+            groupEl = this.getGroupEl(groupEl);
+        }
+        Ext.fly(groupEl).addClass('x-grouptabs-expanded');
+    },
+    
+    toggleGroup: function(groupEl){
+        if(groupEl.isXType) {
+            groupEl = this.getGroupEl(groupEl);
+        }        
+        Ext.fly(groupEl).toggleClass('x-grouptabs-expanded');
+		this.syncTabJoint();
+    },    
+    
+    syncTabJoint: function(groupEl){
+        if (!this.tabJoint) {
+            return;
+        }
+        
+        groupEl = groupEl || this.getGroupEl(this.activeGroup);
+        if(groupEl) {
+            this.tabJoint.setHeight(Ext.fly(groupEl).getHeight() - 2); 
+			
+            var y = Ext.isGecko2 ? 0 : 1;
+            if (this.tabPosition == 'left'){
+                this.tabJoint.alignTo(groupEl, 'tl-tr', [-2,y]);
+            }
+            else {
+                this.tabJoint.alignTo(groupEl, 'tr-tl', [1,y]);
+            }           
+        }
+        else {
+            this.tabJoint.hide();
+        }
+    },
+    
+    getActiveTab : function() {
+        if(!this.activeGroup) return null;
+        return this.activeGroup.getTabEl(this.activeGroup.activeTab) || null;  
+    },
+    
+    onResize: function(){
+        Ext.ux.GroupTabPanel.superclass.onResize.apply(this, arguments);
+        this.syncTabJoint();
+    },
+    
+    createCorner: function(el, pos){
+        return Ext.fly(el).createChild({
+            cls: 'x-grouptabs-corner x-grouptabs-corner-' + pos
+        });
+    },
+    
+    initGroup: function(group, index){
+        var before = this.strip.dom.childNodes[index];        
+        var p = this.getTemplateArgs(group);
+        if (index === 0) {
+            p.cls += ' x-tab-first';
+        }
+        p.cls += ' x-grouptabs-main';
+        p.text = group.getMainItem().title;
+        
+        var el = before ? this.itemTpl.insertBefore(before, p) : this.itemTpl.append(this.strip, p);
+        
+        var tl = this.createCorner(el, 'top-' + this.tabPosition);
+        var bl = this.createCorner(el, 'bottom-' + this.tabPosition);
+
+        if (group.expanded) {
+            this.expandGroup(el);
+        }
+
+        if (Ext.isIE6 || (Ext.isIE && !Ext.isStrict)){
+            bl.setLeft('-10px');
+            bl.setBottom('-5px');
+            tl.setLeft('-10px');
+            tl.setTop('-5px');
+        }
+
+        this.mon(group, 'changemainitem', this.onGroupChangeMainItem, this);
+        this.mon(group, 'beforetabchange', this.onGroupBeforeTabChange, this);
+    },
+    
+    setActiveGroup : function(group) {
+        group = this.getComponent(group);
+        if(!group || this.fireEvent('beforegroupchange', this, group, this.activeGroup) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeGroup = group;
+            return;
+        }
+        if(this.activeGroup != group){
+            if(this.activeGroup){
+                var oldEl = this.getGroupEl(this.activeGroup);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-grouptabs-strip-active');
+                }
+                this.activeGroup.fireEvent('deactivate', this.activeTab);
+            }
+
+            var groupEl = this.getGroupEl(group);
+            Ext.fly(groupEl).addClass('x-grouptabs-strip-active');
+                        
+            this.activeGroup = group;
+            this.stack.add(group);
+
+            this.layout.setActiveItem(group);
+            this.syncTabJoint(groupEl);
+
+            group.fireEvent('activate', group);
+            this.fireEvent('groupchange', this, group);
+        }        
+    },
+    
+    onGroupBeforeTabChange: function(group, newTab, oldTab){
+        if(group !== this.activeGroup || newTab !== oldTab) {
+            this.strip.select('.x-grouptabs-sub > li.x-grouptabs-strip-active', true).removeClass('x-grouptabs-strip-active');
+        } 
+        
+        this.expandGroup(this.getGroupEl(group));
+        this.setActiveGroup(group);
+    },
+    
+    getFrameHeight: function(){
+        var h = this.el.getFrameWidth('tb');
+        h += (this.tbar ? this.tbar.getHeight() : 0) +
+        (this.bbar ? this.bbar.getHeight() : 0);
+        
+        return h;
+    },
+    
+    adjustBodyWidth: function(w){
+        return w - this.tabWidth;
+    }
+});
+
+Ext.reg('grouptabpanel', Ext.ux.GroupTabPanel);/*
+ * Note that this control will most likely remain as an example, and not as a core Ext form
+ * control.  However, the API will be changing in a future release and so should not yet be
+ * treated as a final, stable API at this time.
+ */
+
+/**
+ * @class Ext.ux.form.ItemSelector
+ * @extends Ext.form.Field
+ * A control that allows selection of between two Ext.ux.form.MultiSelect controls.
+ *
+ *  @history
+ *    2008-06-19 bpm Original code contributed by Toby Stuart (with contributions from Robert Williams)
+ *
+ * @constructor
+ * Create a new ItemSelector
+ * @param {Object} config Configuration options
+ * @xtype itemselector 
+ */
+Ext.ux.form.ItemSelector = Ext.extend(Ext.form.Field,  {
+    hideNavIcons:false,
+    imagePath:"",
+    iconUp:"up2.gif",
+    iconDown:"down2.gif",
+    iconLeft:"left2.gif",
+    iconRight:"right2.gif",
+    iconTop:"top2.gif",
+    iconBottom:"bottom2.gif",
+    drawUpIcon:true,
+    drawDownIcon:true,
+    drawLeftIcon:true,
+    drawRightIcon:true,
+    drawTopIcon:true,
+    drawBotIcon:true,
+    delimiter:',',
+    bodyStyle:null,
+    border:false,
+    defaultAutoCreate:{tag: "div"},
+    /**
+     * @cfg {Array} multiselects An array of {@link Ext.ux.form.MultiSelect} config objects, with at least all required parameters (e.g., store)
+     */
+    multiselects:null,
+
+    initComponent: function(){
+        Ext.ux.form.ItemSelector.superclass.initComponent.call(this);
+        this.addEvents({
+            'rowdblclick' : true,
+            'change' : true
+        });
+    },
+
+    onRender: function(ct, position){
+        Ext.ux.form.ItemSelector.superclass.onRender.call(this, ct, position);
+
+        // Internal default configuration for both multiselects
+        var msConfig = [{
+            legend: 'Available',
+            draggable: true,
+            droppable: true,
+            width: 100,
+            height: 100
+        },{
+            legend: 'Selected',
+            droppable: true,
+            draggable: true,
+            width: 100,
+            height: 100
+        }];
+
+        this.fromMultiselect = new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[0], msConfig[0]));
+        this.fromMultiselect.on('dblclick', this.onRowDblClick, this);
+
+        this.toMultiselect = new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[1], msConfig[1]));
+        this.toMultiselect.on('dblclick', this.onRowDblClick, this);
+
+        var p = new Ext.Panel({
+            bodyStyle:this.bodyStyle,
+            border:this.border,
+            layout:"table",
+            layoutConfig:{columns:3}
+        });
+
+        p.add(this.fromMultiselect);
+        var icons = new Ext.Panel({header:false});
+        p.add(icons);
+        p.add(this.toMultiselect);
+        p.render(this.el);
+        icons.el.down('.'+icons.bwrapCls).remove();
+
+        // ICON HELL!!!
+        if (this.imagePath!="" && this.imagePath.charAt(this.imagePath.length-1)!="/")
+            this.imagePath+="/";
+        this.iconUp = this.imagePath + (this.iconUp || 'up2.gif');
+        this.iconDown = this.imagePath + (this.iconDown || 'down2.gif');
+        this.iconLeft = this.imagePath + (this.iconLeft || 'left2.gif');
+        this.iconRight = this.imagePath + (this.iconRight || 'right2.gif');
+        this.iconTop = this.imagePath + (this.iconTop || 'top2.gif');
+        this.iconBottom = this.imagePath + (this.iconBottom || 'bottom2.gif');
+        var el=icons.getEl();
+        this.toTopIcon = el.createChild({tag:'img', src:this.iconTop, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.upIcon = el.createChild({tag:'img', src:this.iconUp, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.addIcon = el.createChild({tag:'img', src:this.iconRight, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.removeIcon = el.createChild({tag:'img', src:this.iconLeft, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.downIcon = el.createChild({tag:'img', src:this.iconDown, style:{cursor:'pointer', margin:'2px'}});
+        el.createChild({tag: 'br'});
+        this.toBottomIcon = el.createChild({tag:'img', src:this.iconBottom, style:{cursor:'pointer', margin:'2px'}});
+        this.toTopIcon.on('click', this.toTop, this);
+        this.upIcon.on('click', this.up, this);
+        this.downIcon.on('click', this.down, this);
+        this.toBottomIcon.on('click', this.toBottom, this);
+        this.addIcon.on('click', this.fromTo, this);
+        this.removeIcon.on('click', this.toFrom, this);
+        if (!this.drawUpIcon || this.hideNavIcons) { this.upIcon.dom.style.display='none'; }
+        if (!this.drawDownIcon || this.hideNavIcons) { this.downIcon.dom.style.display='none'; }
+        if (!this.drawLeftIcon || this.hideNavIcons) { this.addIcon.dom.style.display='none'; }
+        if (!this.drawRightIcon || this.hideNavIcons) { this.removeIcon.dom.style.display='none'; }
+        if (!this.drawTopIcon || this.hideNavIcons) { this.toTopIcon.dom.style.display='none'; }
+        if (!this.drawBotIcon || this.hideNavIcons) { this.toBottomIcon.dom.style.display='none'; }
+
+        var tb = p.body.first();
+        this.el.setWidth(p.body.first().getWidth());
+        p.body.removeClass();
+
+        this.hiddenName = this.name;
+        var hiddenTag = {tag: "input", type: "hidden", value: "", name: this.name};
+        this.hiddenField = this.el.createChild(hiddenTag);
+    },
+    
+    doLayout: function(){
+        if(this.rendered){
+            this.fromMultiselect.fs.doLayout();
+            this.toMultiselect.fs.doLayout();
+        }
+    },
+
+    afterRender: function(){
+        Ext.ux.form.ItemSelector.superclass.afterRender.call(this);
+
+        this.toStore = this.toMultiselect.store;
+        this.toStore.on('add', this.valueChanged, this);
+        this.toStore.on('remove', this.valueChanged, this);
+        this.toStore.on('load', this.valueChanged, this);
+        this.valueChanged(this.toStore);
+    },
+
+    toTop : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            selectionsArray.sort();
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=records.length-1; i>-1; i--) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                this.toMultiselect.view.store.insert(0, record);
+                selectionsArray.push(((records.length - 1) - i));
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    toBottom : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            selectionsArray.sort();
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                this.toMultiselect.view.store.add(record);
+                selectionsArray.push((this.toMultiselect.view.store.getCount()) - (records.length - i));
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    up : function() {
+        var record = null;
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        selectionsArray.sort();
+        var newSelectionsArray = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                if ((selectionsArray[i] - 1) >= 0) {
+                    this.toMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.insert(selectionsArray[i] - 1, record);
+                    newSelectionsArray.push(selectionsArray[i] - 1);
+                }
+            }
+            this.toMultiselect.view.refresh();
+            this.toMultiselect.view.select(newSelectionsArray);
+        }
+    },
+
+    down : function() {
+        var record = null;
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        selectionsArray.sort();
+        selectionsArray.reverse();
+        var newSelectionsArray = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                if ((selectionsArray[i] + 1) < this.toMultiselect.view.store.getCount()) {
+                    this.toMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.insert(selectionsArray[i] + 1, record);
+                    newSelectionsArray.push(selectionsArray[i] + 1);
+                }
+            }
+            this.toMultiselect.view.refresh();
+            this.toMultiselect.view.select(newSelectionsArray);
+        }
+    },
+
+    fromTo : function() {
+        var selectionsArray = this.fromMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.fromMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            if(!this.allowDup)selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                if(this.allowDup){
+                    var x=new Ext.data.Record();
+                    record.id=x.id;
+                    delete x;
+                    this.toMultiselect.view.store.add(record);
+                }else{
+                    this.fromMultiselect.view.store.remove(record);
+                    this.toMultiselect.view.store.add(record);
+                    selectionsArray.push((this.toMultiselect.view.store.getCount() - 1));
+                }
+            }
+        }
+        this.toMultiselect.view.refresh();
+        this.fromMultiselect.view.refresh();
+        var si = this.toMultiselect.store.sortInfo;
+        if(si){
+            this.toMultiselect.store.sort(si.field, si.direction);
+        }
+        this.toMultiselect.view.select(selectionsArray);
+    },
+
+    toFrom : function() {
+        var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
+        var records = [];
+        if (selectionsArray.length > 0) {
+            for (var i=0; i<selectionsArray.length; i++) {
+                record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
+                records.push(record);
+            }
+            selectionsArray = [];
+            for (var i=0; i<records.length; i++) {
+                record = records[i];
+                this.toMultiselect.view.store.remove(record);
+                if(!this.allowDup){
+                    this.fromMultiselect.view.store.add(record);
+                    selectionsArray.push((this.fromMultiselect.view.store.getCount() - 1));
+                }
+            }
+        }
+        this.fromMultiselect.view.refresh();
+        this.toMultiselect.view.refresh();
+        var si = this.fromMultiselect.store.sortInfo;
+        if (si){
+            this.fromMultiselect.store.sort(si.field, si.direction);
+        }
+        this.fromMultiselect.view.select(selectionsArray);
+    },
+
+    valueChanged: function(store) {
+        var record = null;
+        var values = [];
+        for (var i=0; i<store.getCount(); i++) {
+            record = store.getAt(i);
+            values.push(record.get(this.toMultiselect.valueField));
+        }
+        this.hiddenField.dom.value = values.join(this.delimiter);
+        this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
+    },
+
+    getValue : function() {
+        return this.hiddenField.dom.value;
+    },
+
+    onRowDblClick : function(vw, index, node, e) {
+        if (vw == this.toMultiselect.view){
+            this.toFrom();
+        } else if (vw == this.fromMultiselect.view) {
+            this.fromTo();
+        }
+        return this.fireEvent('rowdblclick', vw, index, node, e);
+    },
+
+    reset: function(){
+        range = this.toMultiselect.store.getRange();
+        this.toMultiselect.store.removeAll();
+        this.fromMultiselect.store.add(range);
+        var si = this.fromMultiselect.store.sortInfo;
+        if (si){
+            this.fromMultiselect.store.sort(si.field, si.direction);
+        }
+        this.valueChanged(this.toMultiselect.store);
+    }
+});
+
+Ext.reg('itemselector', Ext.ux.form.ItemSelector);
+
+//backwards compat
+Ext.ux.ItemSelector = Ext.ux.form.ItemSelector;
+Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.MultiSelect
+ * @extends Ext.form.Field
+ * A control that allows selection and form submission of multiple list items.
+ *
+ *  @history
+ *    2008-06-19 bpm Original code contributed by Toby Stuart (with contributions from Robert Williams)
+ *    2008-06-19 bpm Docs and demo code clean up
+ *
+ * @constructor
+ * Create a new MultiSelect
+ * @param {Object} config Configuration options
+ * @xtype multiselect 
+ */
+Ext.ux.form.MultiSelect = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} legend Wraps the object with a fieldset and specified legend.
+     */
+    /**
+     * @cfg {Ext.ListView} view The {@link Ext.ListView} used to render the multiselect list.
+     */
+    /**
+     * @cfg {String/Array} dragGroup The ddgroup name(s) for the MultiSelect DragZone (defaults to undefined).
+     */
+    /**
+     * @cfg {String/Array} dropGroup The ddgroup name(s) for the MultiSelect DropZone (defaults to undefined).
+     */
+    /**
+     * @cfg {Boolean} ddReorder Whether the items in the MultiSelect list are drag/drop reorderable (defaults to false).
+     */
+    ddReorder:false,
+    /**
+     * @cfg {Object/Array} tbar The top toolbar of the control. This can be a {@link Ext.Toolbar} object, a
+     * toolbar config, or an array of buttons/button configs to be added to the toolbar.
+     */
+    /**
+     * @cfg {String} appendOnly True if the list should only allow append drops when drag/drop is enabled
+     * (use for lists which are sorted, defaults to false).
+     */
+    appendOnly:false,
+    /**
+     * @cfg {Number} width Width in pixels of the control (defaults to 100).
+     */
+    width:100,
+    /**
+     * @cfg {Number} height Height in pixels of the control (defaults to 100).
+     */
+    height:100,
+    /**
+     * @cfg {String/Number} displayField Name/Index of the desired display field in the dataset (defaults to 0).
+     */
+    displayField:0,
+    /**
+     * @cfg {String/Number} valueField Name/Index of the desired value field in the dataset (defaults to 1).
+     */
+    valueField:1,
+    /**
+     * @cfg {Boolean} allowBlank False to require at least one item in the list to be selected, true to allow no
+     * selection (defaults to true).
+     */
+    allowBlank:true,
+    /**
+     * @cfg {Number} minSelections Minimum number of selections allowed (defaults to 0).
+     */
+    minSelections:0,
+    /**
+     * @cfg {Number} maxSelections Maximum number of selections allowed (defaults to Number.MAX_VALUE).
+     */
+    maxSelections:Number.MAX_VALUE,
+    /**
+     * @cfg {String} blankText Default text displayed when the control contains no items (defaults to the same value as
+     * {@link Ext.form.TextField#blankText}.
+     */
+    blankText:Ext.form.TextField.prototype.blankText,
+    /**
+     * @cfg {String} minSelectionsText Validation message displayed when {@link #minSelections} is not met (defaults to 'Minimum {0}
+     * item(s) required').  The {0} token will be replaced by the value of {@link #minSelections}.
+     */
+    minSelectionsText:'Minimum {0} item(s) required',
+    /**
+     * @cfg {String} maxSelectionsText Validation message displayed when {@link #maxSelections} is not met (defaults to 'Maximum {0}
+     * item(s) allowed').  The {0} token will be replaced by the value of {@link #maxSelections}.
+     */
+    maxSelectionsText:'Maximum {0} item(s) allowed',
+    /**
+     * @cfg {String} delimiter The string used to delimit between items when set or returned as a string of values
+     * (defaults to ',').
+     */
+    delimiter:',',
+    /**
+     * @cfg {Ext.data.Store/Array} store The data source to which this MultiSelect is bound (defaults to <tt>undefined</tt>).
+     * Acceptable values for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
+     * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
+     * <div class="mdetail-params"><ul>
+     * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
+     * A 1-dimensional array will automatically be expanded (each array item will be the combo
+     * {@link #valueField value} and {@link #displayField text})</div></li>
+     * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
+     * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
+     * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
+     * </div></li></ul></div></li></ul></div>
+     */
+
+    // private
+    defaultAutoCreate : {tag: "div"},
+
+    // private
+    initComponent: function(){
+        Ext.ux.form.MultiSelect.superclass.initComponent.call(this);
+
+        if(Ext.isArray(this.store)){
+            if (Ext.isArray(this.store[0])){
+                this.store = new Ext.data.ArrayStore({
+                    fields: ['value','text'],
+                    data: this.store
+                });
+                this.valueField = 'value';
+            }else{
+                this.store = new Ext.data.ArrayStore({
+                    fields: ['text'],
+                    data: this.store,
+                    expandData: true
+                });
+                this.valueField = 'text';
+            }
+            this.displayField = 'text';
+        } else {
+            this.store = Ext.StoreMgr.lookup(this.store);
+        }
+
+        this.addEvents({
+            'dblclick' : true,
+            'click' : true,
+            'change' : true,
+            'drop' : true
+        });
+    },
+
+    // private
+    onRender: function(ct, position){
+        Ext.ux.form.MultiSelect.superclass.onRender.call(this, ct, position);
+
+        var fs = this.fs = new Ext.form.FieldSet({
+            renderTo: this.el,
+            title: this.legend,
+            height: this.height,
+            width: this.width,
+            style: "padding:0;",
+            tbar: this.tbar,
+            bodyStyle: 'overflow: auto;'
+        });
+
+        this.view = new Ext.ListView({
+            multiSelect: true,
+            store: this.store,
+            columns: [{ header: 'Value', width: 1, dataIndex: this.displayField }],
+            hideHeaders: true
+        });
+
+        fs.add(this.view);
+
+        this.view.on('click', this.onViewClick, this);
+        this.view.on('beforeclick', this.onViewBeforeClick, this);
+        this.view.on('dblclick', this.onViewDblClick, this);
+
+        this.hiddenName = this.name || Ext.id();
+        var hiddenTag = { tag: "input", type: "hidden", value: "", name: this.hiddenName };
+        this.hiddenField = this.el.createChild(hiddenTag);
+        this.hiddenField.dom.disabled = this.hiddenName != this.name;
+        fs.doLayout();
+    },
+
+    // private
+    afterRender: function(){
+        Ext.ux.form.MultiSelect.superclass.afterRender.call(this);
+
+        if (this.ddReorder && !this.dragGroup && !this.dropGroup){
+            this.dragGroup = this.dropGroup = 'MultiselectDD-' + Ext.id();
+        }
+
+        if (this.draggable || this.dragGroup){
+            this.dragZone = new Ext.ux.form.MultiSelect.DragZone(this, {
+                ddGroup: this.dragGroup
+            });
+        }
+        if (this.droppable || this.dropGroup){
+            this.dropZone = new Ext.ux.form.MultiSelect.DropZone(this, {
+                ddGroup: this.dropGroup
+            });
+        }
+    },
+
+    // private
+    onViewClick: function(vw, index, node, e) {
+        this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
+        this.hiddenField.dom.value = this.getValue();
+        this.fireEvent('click', this, e);
+        this.validate();
+    },
+
+    // private
+    onViewBeforeClick: function(vw, index, node, e) {
+        if (this.disabled) {return false;}
+    },
+
+    // private
+    onViewDblClick : function(vw, index, node, e) {
+        return this.fireEvent('dblclick', vw, index, node, e);
+    },
+
+    /**
+     * Returns an array of data values for the selected items in the list. The values will be separated
+     * by {@link #delimiter}.
+     * @return {Array} value An array of string data values
+     */
+    getValue: function(valueField){
+        var returnArray = [];
+        var selectionsArray = this.view.getSelectedIndexes();
+        if (selectionsArray.length == 0) {return '';}
+        for (var i=0; i<selectionsArray.length; i++) {
+            returnArray.push(this.store.getAt(selectionsArray[i]).get((valueField != null) ? valueField : this.valueField));
+        }
+        return returnArray.join(this.delimiter);
+    },
+
+    /**
+     * Sets a delimited string (using {@link #delimiter}) or array of data values into the list.
+     * @param {String/Array} values The values to set
+     */
+    setValue: function(values) {
+        var index;
+        var selections = [];
+        this.view.clearSelections();
+        this.hiddenField.dom.value = '';
+
+        if (!values || (values == '')) { return; }
+
+        if (!Ext.isArray(values)) { values = values.split(this.delimiter); }
+        for (var i=0; i<values.length; i++) {
+            index = this.view.store.indexOf(this.view.store.query(this.valueField,
+                new RegExp('^' + values[i] + '$', "i")).itemAt(0));
+            selections.push(index);
+        }
+        this.view.select(selections);
+        this.hiddenField.dom.value = this.getValue();
+        this.validate();
+    },
+
+    // inherit docs
+    reset : function() {
+        this.setValue('');
+    },
+
+    // inherit docs
+    getRawValue: function(valueField) {
+        var tmp = this.getValue(valueField);
+        if (tmp.length) {
+            tmp = tmp.split(this.delimiter);
+        }
+        else {
+            tmp = [];
+        }
+        return tmp;
+    },
+
+    // inherit docs
+    setRawValue: function(values){
+        setValue(values);
+    },
+
+    // inherit docs
+    validateValue : function(value){
+        if (value.length < 1) { // if it has no value
+             if (this.allowBlank) {
+                 this.clearInvalid();
+                 return true;
+             } else {
+                 this.markInvalid(this.blankText);
+                 return false;
+             }
+        }
+        if (value.length < this.minSelections) {
+            this.markInvalid(String.format(this.minSelectionsText, this.minSelections));
+            return false;
+        }
+        if (value.length > this.maxSelections) {
+            this.markInvalid(String.format(this.maxSelectionsText, this.maxSelections));
+            return false;
+        }
+        return true;
+    },
+
+    // inherit docs
+    disable: function(){
+        this.disabled = true;
+        this.hiddenField.dom.disabled = true;
+        this.fs.disable();
+    },
+
+    // inherit docs
+    enable: function(){
+        this.disabled = false;
+        this.hiddenField.dom.disabled = false;
+        this.fs.enable();
+    },
+
+    // inherit docs
+    destroy: function(){
+        Ext.destroy(this.fs, this.dragZone, this.dropZone);
+        Ext.ux.form.MultiSelect.superclass.destroy.call(this);
+    }
+});
+
+
+Ext.reg('multiselect', Ext.ux.form.MultiSelect);
+
+//backwards compat
+Ext.ux.Multiselect = Ext.ux.form.MultiSelect;
+
+
+Ext.ux.form.MultiSelect.DragZone = function(ms, config){
+    this.ms = ms;
+    this.view = ms.view;
+    var ddGroup = config.ddGroup || 'MultiselectDD';
+    var dd;
+    if (Ext.isArray(ddGroup)){
+        dd = ddGroup.shift();
+    } else {
+        dd = ddGroup;
+        ddGroup = null;
+    }
+    Ext.ux.form.MultiSelect.DragZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
+    this.setDraggable(ddGroup);
+};
+
+Ext.extend(Ext.ux.form.MultiSelect.DragZone, Ext.dd.DragZone, {
+    onInitDrag : function(x, y){
+        var el = Ext.get(this.dragData.ddel.cloneNode(true));
+        this.proxy.update(el.dom);
+        el.setWidth(el.child('em').getWidth());
+        this.onStartDrag(x, y);
+        return true;
+    },
+    
+    // private
+    collectSelection: function(data) {
+        data.repairXY = Ext.fly(this.view.getSelectedNodes()[0]).getXY();
+        var i = 0;
+        this.view.store.each(function(rec){
+            if (this.view.isSelected(i)) {
+                var n = this.view.getNode(i);
+                var dragNode = n.cloneNode(true);
+                dragNode.id = Ext.id();
+                data.ddel.appendChild(dragNode);
+                data.records.push(this.view.store.getAt(i));
+                data.viewNodes.push(n);
+            }
+            i++;
+        }, this);
+    },
+
+    // override
+    onEndDrag: function(data, e) {
+        var d = Ext.get(this.dragData.ddel);
+        if (d && d.hasClass("multi-proxy")) {
+            d.remove();
+        }
+    },
+
+    // override
+    getDragData: function(e){
+        var target = this.view.findItemFromChild(e.getTarget());
+        if(target) {
+            if (!this.view.isSelected(target) && !e.ctrlKey && !e.shiftKey) {
+                this.view.select(target);
+                this.ms.setValue(this.ms.getValue());
+            }
+            if (this.view.getSelectionCount() == 0 || e.ctrlKey || e.shiftKey) return false;
+            var dragData = {
+                sourceView: this.view,
+                viewNodes: [],
+                records: []
+            };
+            if (this.view.getSelectionCount() == 1) {
+                var i = this.view.getSelectedIndexes()[0];
+                var n = this.view.getNode(i);
+                dragData.viewNodes.push(dragData.ddel = n);
+                dragData.records.push(this.view.store.getAt(i));
+                dragData.repairXY = Ext.fly(n).getXY();
+            } else {
+                dragData.ddel = document.createElement('div');
+                dragData.ddel.className = 'multi-proxy';
+                this.collectSelection(dragData);
+            }
+            return dragData;
+        }
+        return false;
+    },
+
+    // override the default repairXY.
+    getRepairXY : function(e){
+        return this.dragData.repairXY;
+    },
+
+    // private
+    setDraggable: function(ddGroup){
+        if (!ddGroup) return;
+        if (Ext.isArray(ddGroup)) {
+            Ext.each(ddGroup, this.setDraggable, this);
+            return;
+        }
+        this.addToGroup(ddGroup);
+    }
+});
+
+Ext.ux.form.MultiSelect.DropZone = function(ms, config){
+    this.ms = ms;
+    this.view = ms.view;
+    var ddGroup = config.ddGroup || 'MultiselectDD';
+    var dd;
+    if (Ext.isArray(ddGroup)){
+        dd = ddGroup.shift();
+    } else {
+        dd = ddGroup;
+        ddGroup = null;
+    }
+    Ext.ux.form.MultiSelect.DropZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
+    this.setDroppable(ddGroup);
+};
+
+Ext.extend(Ext.ux.form.MultiSelect.DropZone, Ext.dd.DropZone, {
+    /**
+	 * Part of the Ext.dd.DropZone interface. If no target node is found, the
+	 * whole Element becomes the target, and this causes the drop gesture to append.
+	 */
+    getTargetFromEvent : function(e) {
+        var target = e.getTarget();
+        return target;
+    },
+
+    // private
+    getDropPoint : function(e, n, dd){
+        if (n == this.ms.fs.body.dom) { return "below"; }
+        var t = Ext.lib.Dom.getY(n), b = t + n.offsetHeight;
+        var c = t + (b - t) / 2;
+        var y = Ext.lib.Event.getPageY(e);
+        if(y <= c) {
+            return "above";
+        }else{
+            return "below";
+        }
+    },
+
+    // private
+    isValidDropPoint: function(pt, n, data) {
+        if (!data.viewNodes || (data.viewNodes.length != 1)) {
+            return true;
+        }
+        var d = data.viewNodes[0];
+        if (d == n) {
+            return false;
+        }
+        if ((pt == "below") && (n.nextSibling == d)) {
+            return false;
+        }
+        if ((pt == "above") && (n.previousSibling == d)) {
+            return false;
+        }
+        return true;
+    },
+
+    // override
+    onNodeEnter : function(n, dd, e, data){
+        return false;
+    },
+
+    // override
+    onNodeOver : function(n, dd, e, data){
+        var dragElClass = this.dropNotAllowed;
+        var pt = this.getDropPoint(e, n, dd);
+        if (this.isValidDropPoint(pt, n, data)) {
+            if (this.ms.appendOnly) {
+                return "x-tree-drop-ok-below";
+            }
+
+            // set the insert point style on the target node
+            if (pt) {
+                var targetElClass;
+                if (pt == "above"){
+                    dragElClass = n.previousSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-above";
+                    targetElClass = "x-view-drag-insert-above";
+                } else {
+                    dragElClass = n.nextSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-below";
+                    targetElClass = "x-view-drag-insert-below";
+                }
+                if (this.lastInsertClass != targetElClass){
+                    Ext.fly(n).replaceClass(this.lastInsertClass, targetElClass);
+                    this.lastInsertClass = targetElClass;
+                }
+            }
+        }
+        return dragElClass;
+    },
+
+    // private
+    onNodeOut : function(n, dd, e, data){
+        this.removeDropIndicators(n);
+    },
+
+    // private
+    onNodeDrop : function(n, dd, e, data){
+        if (this.ms.fireEvent("drop", this, n, dd, e, data) === false) {
+            return false;
+        }
+        var pt = this.getDropPoint(e, n, dd);
+        if (n != this.ms.fs.body.dom)
+            n = this.view.findItemFromChild(n);
+        var insertAt = (this.ms.appendOnly || (n == this.ms.fs.body.dom)) ? this.view.store.getCount() : this.view.indexOf(n);
+        if (pt == "below") {
+            insertAt++;
+        }
+
+        var dir = false;
+
+        // Validate if dragging within the same MultiSelect
+        if (data.sourceView == this.view) {
+            // If the first element to be inserted below is the target node, remove it
+            if (pt == "below") {
+                if (data.viewNodes[0] == n) {
+                    data.viewNodes.shift();
+                }
+            } else {  // If the last element to be inserted above is the target node, remove it
+                if (data.viewNodes[data.viewNodes.length - 1] == n) {
+                    data.viewNodes.pop();
+                }
+            }
+
+            // Nothing to drop...
+            if (!data.viewNodes.length) {
+                return false;
+            }
+
+            // If we are moving DOWN, then because a store.remove() takes place first,
+            // the insertAt must be decremented.
+            if (insertAt > this.view.store.indexOf(data.records[0])) {
+                dir = 'down';
+                insertAt--;
+            }
+        }
+
+        for (var i = 0; i < data.records.length; i++) {
+            var r = data.records[i];
+            if (data.sourceView) {
+                data.sourceView.store.remove(r);
+            }
+            this.view.store.insert(dir == 'down' ? insertAt : insertAt++, r);
+            var si = this.view.store.sortInfo;
+            if(si){
+                this.view.store.sort(si.field, si.direction);
+            }
+        }
+        return true;
+    },
+
+    // private
+    removeDropIndicators : function(n){
+        if(n){
+            Ext.fly(n).removeClass([
+                "x-view-drag-insert-above",
+                "x-view-drag-insert-left",
+                "x-view-drag-insert-right",
+                "x-view-drag-insert-below"]);
+            this.lastInsertClass = "_noclass";
+        }
+    },
+
+    // private
+    setDroppable: function(ddGroup){
+        if (!ddGroup) return;
+        if (Ext.isArray(ddGroup)) {
+            Ext.each(ddGroup, this.setDroppable, this);
+            return;
+        }
+        this.addToGroup(ddGroup);
+    }
+});
+
+/* Fix for Opera, which does not seem to include the map function on Array's */
+if (!Array.prototype.map) {
+    Array.prototype.map = function(fun){
+        var len = this.length;
+        if (typeof fun != 'function') {
+            throw new TypeError();
+        }
+        var res = new Array(len);
+        var thisp = arguments[1];
+        for (var i = 0; i < len; i++) {
+            if (i in this) {
+                res[i] = fun.call(thisp, this[i], i, this);
+            }
+        }
+        return res;
+    };
+}
+
+Ext.ns('Ext.ux.data');
+
+/**
+ * @class Ext.ux.data.PagingMemoryProxy
+ * @extends Ext.data.MemoryProxy
+ * <p>Paging Memory Proxy, allows to use paging grid with in memory dataset</p>
+ */
+Ext.ux.data.PagingMemoryProxy = Ext.extend(Ext.data.MemoryProxy, {
+    constructor : function(data){
+        Ext.ux.data.PagingMemoryProxy.superclass.constructor.call(this);
+        this.data = data;
+    },
+    doRequest : function(action, rs, params, reader, callback, scope, options){
+        params = params ||
+        {};
+        var result;
+        try {
+            result = reader.readRecords(this.data);
+        } 
+        catch (e) {
+            this.fireEvent('loadexception', this, options, null, e);
+            callback.call(scope, null, options, false);
+            return;
+        }
+        
+        // filtering
+        if (params.filter !== undefined) {
+            result.records = result.records.filter(function(el){
+                if (typeof(el) == 'object') {
+                    var att = params.filterCol || 0;
+                    return String(el.data[att]).match(params.filter) ? true : false;
+                }
+                else {
+                    return String(el).match(params.filter) ? true : false;
+                }
+            });
+            result.totalRecords = result.records.length;
+        }
+        
+        // sorting
+        if (params.sort !== undefined) {
+            // use integer as params.sort to specify column, since arrays are not named
+            // params.sort=0; would also match a array without columns
+            var dir = String(params.dir).toUpperCase() == 'DESC' ? -1 : 1;
+            var fn = function(r1, r2){
+                return r1 < r2;
+            };
+            result.records.sort(function(a, b){
+                var v = 0;
+                if (typeof(a) == 'object') {
+                    v = fn(a.data[params.sort], b.data[params.sort]) * dir;
+                }
+                else {
+                    v = fn(a, b) * dir;
+                }
+                if (v == 0) {
+                    v = (a.index < b.index ? -1 : 1);
+                }
+                return v;
+            });
+        }
+        // paging (use undefined cause start can also be 0 (thus false))
+        if (params.start !== undefined && params.limit !== undefined) {
+            result.records = result.records.slice(params.start, params.start + params.limit);
+        }
+        callback.call(scope, result, options, true);
+    }
+});
+
+//backwards compat.
+Ext.data.PagingMemoryProxy = Ext.ux.data.PagingMemoryProxy;
+Ext.ux.PanelResizer = Ext.extend(Ext.util.Observable, {
+    minHeight: 0,
+    maxHeight:10000000,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        this.events = {};
+        Ext.ux.PanelResizer.superclass.constructor.call(this, config);
+    },
+
+    init : function(p){
+        this.panel = p;
+
+        if(this.panel.elements.indexOf('footer')==-1){
+            p.elements += ',footer';
+        }
+        p.on('render', this.onRender, this);
+    },
+
+    onRender : function(p){
+        this.handle = p.footer.createChild({cls:'x-panel-resize'});
+
+        this.tracker = new Ext.dd.DragTracker({
+            onStart: this.onDragStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onDragEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(this.handle);
+        p.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+	// private
+    onDragStart: function(e){
+        this.dragging = true;
+        this.startHeight = this.panel.el.getHeight();
+        this.fireEvent('dragstart', this, e);
+    },
+
+	// private
+    onDrag: function(e){
+        this.panel.setHeight((this.startHeight-this.tracker.getOffset()[1]).constrain(this.minHeight, this.maxHeight));
+        this.fireEvent('drag', this, e);
+    },
+
+	// private
+    onDragEnd: function(e){
+        this.dragging = false;
+        this.fireEvent('dragend', this, e);
+    }
+});
+Ext.preg('panelresizer', Ext.ux.PanelResizer);Ext.ux.Portal = Ext.extend(Ext.Panel, {
+    layout : 'column',
+    autoScroll : true,
+    cls : 'x-portal',
+    defaultType : 'portalcolumn',
+    
+    initComponent : function(){
+        Ext.ux.Portal.superclass.initComponent.call(this);
+        this.addEvents({
+            validatedrop:true,
+            beforedragover:true,
+            dragover:true,
+            beforedrop:true,
+            drop:true
+        });
+    },
+
+    initEvents : function(){
+        Ext.ux.Portal.superclass.initEvents.call(this);
+        this.dd = new Ext.ux.Portal.DropZone(this, this.dropConfig);
+    },
+    
+    beforeDestroy : function() {
+        if(this.dd){
+            this.dd.unreg();
+        }
+        Ext.ux.Portal.superclass.beforeDestroy.call(this);
+    }
+});
+
+Ext.reg('portal', Ext.ux.Portal);
+
+
+Ext.ux.Portal.DropZone = function(portal, cfg){
+    this.portal = portal;
+    Ext.dd.ScrollManager.register(portal.body);
+    Ext.ux.Portal.DropZone.superclass.constructor.call(this, portal.bwrap.dom, cfg);
+    portal.body.ddScrollConfig = this.ddScrollConfig;
+};
+
+Ext.extend(Ext.ux.Portal.DropZone, Ext.dd.DropTarget, {
+    ddScrollConfig : {
+        vthresh: 50,
+        hthresh: -1,
+        animate: true,
+        increment: 200
+    },
+
+    createEvent : function(dd, e, data, col, c, pos){
+        return {
+            portal: this.portal,
+            panel: data.panel,
+            columnIndex: col,
+            column: c,
+            position: pos,
+            data: data,
+            source: dd,
+            rawEvent: e,
+            status: this.dropAllowed
+        };
+    },
+
+    notifyOver : function(dd, e, data){
+        var xy = e.getXY(), portal = this.portal, px = dd.proxy;
+
+        // case column widths
+        if(!this.grid){
+            this.grid = this.getGrid();
+        }
+
+        // handle case scroll where scrollbars appear during drag
+        var cw = portal.body.dom.clientWidth;
+        if(!this.lastCW){
+            this.lastCW = cw;
+        }else if(this.lastCW != cw){
+            this.lastCW = cw;
+            portal.doLayout();
+            this.grid = this.getGrid();
+        }
+
+        // determine column
+        var col = 0, xs = this.grid.columnX, cmatch = false;
+        for(var len = xs.length; col < len; col++){
+            if(xy[0] < (xs[col].x + xs[col].w)){
+                cmatch = true;
+                break;
+            }
+        }
+        // no match, fix last index
+        if(!cmatch){
+            col--;
+        }
+
+        // find insert position
+        var p, match = false, pos = 0,
+            c = portal.items.itemAt(col),
+            items = c.items.items, overSelf = false;
+
+        for(var len = items.length; pos < len; pos++){
+            p = items[pos];
+            var h = p.el.getHeight();
+            if(h === 0){
+                overSelf = true;
+            }
+            else if((p.el.getY()+(h/2)) > xy[1]){
+                match = true;
+                break;
+            }
+        }
+
+        pos = (match && p ? pos : c.items.getCount()) + (overSelf ? -1 : 0);
+        var overEvent = this.createEvent(dd, e, data, col, c, pos);
+
+        if(portal.fireEvent('validatedrop', overEvent) !== false &&
+           portal.fireEvent('beforedragover', overEvent) !== false){
+
+            // make sure proxy width is fluid
+            px.getProxy().setWidth('auto');
+
+            if(p){
+                px.moveProxy(p.el.dom.parentNode, match ? p.el.dom : null);
+            }else{
+                px.moveProxy(c.el.dom, null);
+            }
+
+            this.lastPos = {c: c, col: col, p: overSelf || (match && p) ? pos : false};
+            this.scrollPos = portal.body.getScroll();
+
+            portal.fireEvent('dragover', overEvent);
+
+            return overEvent.status;
+        }else{
+            return overEvent.status;
+        }
+
+    },
+
+    notifyOut : function(){
+        delete this.grid;
+    },
+
+    notifyDrop : function(dd, e, data){
+        delete this.grid;
+        if(!this.lastPos){
+            return;
+        }
+        var c = this.lastPos.c, col = this.lastPos.col, pos = this.lastPos.p;
+
+        var dropEvent = this.createEvent(dd, e, data, col, c,
+            pos !== false ? pos : c.items.getCount());
+
+        if(this.portal.fireEvent('validatedrop', dropEvent) !== false &&
+           this.portal.fireEvent('beforedrop', dropEvent) !== false){
+
+            dd.proxy.getProxy().remove();
+            dd.panel.el.dom.parentNode.removeChild(dd.panel.el.dom);
+            
+            if(pos !== false){
+                if(c == dd.panel.ownerCt && (c.items.items.indexOf(dd.panel) <= pos)){
+                    pos++;
+                }
+                c.insert(pos, dd.panel);
+            }else{
+                c.add(dd.panel);
+            }
+            
+            c.doLayout();
+
+            this.portal.fireEvent('drop', dropEvent);
+
+            // scroll position is lost on drop, fix it
+            var st = this.scrollPos.top;
+            if(st){
+                var d = this.portal.body.dom;
+                setTimeout(function(){
+                    d.scrollTop = st;
+                }, 10);
+            }
+
+        }
+        delete this.lastPos;
+    },
+
+    // internal cache of body and column coords
+    getGrid : function(){
+        var box = this.portal.bwrap.getBox();
+        box.columnX = [];
+        this.portal.items.each(function(c){
+             box.columnX.push({x: c.el.getX(), w: c.el.getWidth()});
+        });
+        return box;
+    },
+
+    // unregister the dropzone from ScrollManager
+    unreg: function() {
+        //Ext.dd.ScrollManager.unregister(this.portal.body);
+        Ext.ux.Portal.DropZone.superclass.unreg.call(this);
+    }
+});
+Ext.ux.PortalColumn = Ext.extend(Ext.Container, {
+    layout : 'anchor',
+    //autoEl : 'div',//already defined by Ext.Component
+    defaultType : 'portlet',
+    cls : 'x-portal-column'
+});
+
+Ext.reg('portalcolumn', Ext.ux.PortalColumn);
+Ext.ux.Portlet = Ext.extend(Ext.Panel, {
+    anchor : '100%',
+    frame : true,
+    collapsible : true,
+    draggable : true,
+    cls : 'x-portlet'
+});
+
+Ext.reg('portlet', Ext.ux.Portlet);
+/**
+* @class Ext.ux.ProgressBarPager
+* @extends Object 
+* Plugin (ptype = 'tabclosemenu') for displaying a progressbar inside of a paging toolbar instead of plain text
+* 
+* @ptype progressbarpager 
+* @constructor
+* Create a new ItemSelector
+* @param {Object} config Configuration options
+* @xtype itemselector 
+*/
+Ext.ux.ProgressBarPager  = Ext.extend(Object, {
+	/**
+ 	* @cfg {Integer} progBarWidth
+ 	* <p>The default progress bar width.  Default is 225.</p>
+	*/
+	progBarWidth   : 225,
+	/**
+ 	* @cfg {String} defaultText
+	* <p>The text to display while the store is loading.  Default is 'Loading...'</p>
+ 	*/
+	defaultText    : 'Loading...',
+    	/**
+ 	* @cfg {Object} defaultAnimCfg 
+ 	* <p>A {@link Ext.Fx Ext.Fx} configuration object.  Default is  { duration : 1, easing : 'bounceOut' }.</p>
+ 	*/
+	defaultAnimCfg : {
+		duration   : 1,
+		easing     : 'bounceOut'	
+	},												  
+	constructor : function(config) {
+		if (config) {
+			Ext.apply(this, config);
+		}
+	},
+	//public
+	init : function (parent) {
+		
+		if(parent.displayInfo){
+			this.parent = parent;
+			var ind  = parent.items.indexOf(parent.displayItem);
+			parent.remove(parent.displayItem, true);
+			this.progressBar = new Ext.ProgressBar({
+				text    : this.defaultText,
+				width   : this.progBarWidth,
+				animate :  this.defaultAnimCfg
+			});					
+		   
+			parent.displayItem = this.progressBar;
+			
+			parent.add(parent.displayItem);	
+			parent.doLayout();
+			Ext.apply(parent, this.parentOverrides);		
+			
+			this.progressBar.on('render', function(pb) {
+				pb.el.applyStyles('cursor:pointer');
+
+				pb.el.on('click', this.handleProgressBarClick, this);
+			}, this);
+			
+		
+			// Remove the click handler from the 
+			this.progressBar.on({
+				scope         : this,
+				beforeDestroy : function() {
+					this.progressBar.el.un('click', this.handleProgressBarClick, this);	
+				}
+			});	
+						
+		}
+		  
+	},
+	// private
+	// This method handles the click for the progress bar
+	handleProgressBarClick : function(e){
+		var parent = this.parent;
+		var displayItem = parent.displayItem;
+		
+		var box = this.progressBar.getBox();
+		var xy = e.getXY();
+		var position = xy[0]-box.x;
+		var pages = Math.ceil(parent.store.getTotalCount()/parent.pageSize);
+		
+		var newpage = Math.ceil(position/(displayItem.width/pages));
+		parent.changePage(newpage);
+	},
+	
+	// private, overriddes
+	parentOverrides  : {
+		// private
+		// This method updates the information via the progress bar.
+		updateInfo : function(){
+			if(this.displayItem){
+				var count   = this.store.getCount();
+				var pgData  = this.getPageData();
+				var pageNum = this.readPage(pgData);
+				
+				var msg    = count == 0 ?
+					this.emptyMsg :
+					String.format(
+						this.displayMsg,
+						this.cursor+1, this.cursor+count, this.store.getTotalCount()
+					);
+					
+				pageNum = pgData.activePage; ;	
+				
+				var pct	= pageNum / pgData.pages;	
+				
+				this.displayItem.updateProgress(pct, msg, this.animate || this.defaultAnimConfig);
+			}
+		}
+	}
+});
+Ext.preg('progressbarpager', Ext.ux.ProgressBarPager);
+
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.RowEditor
+ * @extends Ext.Panel 
+ * Plugin (ptype = 'roweditor') that adds the ability to rapidly edit full rows in a grid.
+ * A validation mode may be enabled which uses AnchorTips to notify the user of all
+ * validation errors at once.
+ * 
+ * @ptype roweditor
+ */
+Ext.ux.grid.RowEditor = Ext.extend(Ext.Panel, {
+    floating: true,
+    shadow: false,
+    layout: 'hbox',
+    cls: 'x-small-editor',
+    buttonAlign: 'center',
+    baseCls: 'x-row-editor',
+    elements: 'header,footer,body',
+    frameWidth: 5,
+    buttonPad: 3,
+    clicksToEdit: 'auto',
+    monitorValid: true,
+    focusDelay: 250,
+    errorSummary: true,
+
+    defaults: {
+        normalWidth: true
+    },
+
+    initComponent: function(){
+        Ext.ux.grid.RowEditor.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforeedit
+             * Fired before the row editor is activated.
+             * If the listener returns <tt>false</tt> the editor will not be activated.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'beforeedit',
+            /**
+             * @event validateedit
+             * Fired after a row is edited and passes validation.
+             * If the listener returns <tt>false</tt> changes to the record will not be set.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Object} changes Object with changes made to the record.
+             * @param {Ext.data.Record} r The Record that was edited.
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'validateedit',
+            /**
+             * @event afteredit
+             * Fired after a row is edited and passes validation.  This event is fired
+             * after the store's update event is fired with this edit.
+             * @param {Ext.ux.grid.RowEditor} roweditor This object
+             * @param {Object} changes Object with changes made to the record.
+             * @param {Ext.data.Record} r The Record that was edited.
+             * @param {Number} rowIndex The rowIndex of the row just edited
+             */
+            'afteredit'
+        );
+    },
+
+    init: function(grid){
+        this.grid = grid;
+        this.ownerCt = grid;
+        if(this.clicksToEdit === 2){
+            grid.on('rowdblclick', this.onRowDblClick, this);
+        }else{
+            grid.on('rowclick', this.onRowClick, this);
+            if(Ext.isIE){
+                grid.on('rowdblclick', this.onRowDblClick, this);
+            }
+        }
+
+        // stopEditing without saving when a record is removed from Store.
+        grid.getStore().on('remove', function() {
+            this.stopEditing(false);
+        },this);
+
+        grid.on({
+            scope: this,
+            keydown: this.onGridKey,
+            columnresize: this.verifyLayout,
+            columnmove: this.refreshFields,
+            reconfigure: this.refreshFields,
+	    destroy : this.destroy,
+            bodyscroll: {
+                buffer: 250,
+                fn: this.positionButtons
+            }
+        });
+        grid.getColumnModel().on('hiddenchange', this.verifyLayout, this, {delay:1});
+        grid.getView().on('refresh', this.stopEditing.createDelegate(this, []));
+    },
+
+    refreshFields: function(){
+        this.initFields();
+        this.verifyLayout();
+    },
+
+    isDirty: function(){
+        var dirty;
+        this.items.each(function(f){
+            if(String(this.values[f.id]) !== String(f.getValue())){
+                dirty = true;
+                return false;
+            }
+        }, this);
+        return dirty;
+    },
+
+    startEditing: function(rowIndex, doFocus){
+        if(this.editing && this.isDirty()){
+            this.showTooltip('You need to commit or cancel your changes');
+            return;
+        }
+        this.editing = true;
+        if(typeof rowIndex == 'object'){
+            rowIndex = this.grid.getStore().indexOf(rowIndex);
+        }
+        if(this.fireEvent('beforeedit', this, rowIndex) !== false){
+            var g = this.grid, view = g.getView();
+            var row = view.getRow(rowIndex);
+            var record = g.store.getAt(rowIndex);
+            this.record = record;
+            this.rowIndex = rowIndex;
+            this.values = {};
+            if(!this.rendered){
+                this.render(view.getEditorParent());
+            }
+            var w = Ext.fly(row).getWidth();
+            this.setSize(w);
+            if(!this.initialized){
+                this.initFields();
+            }
+            var cm = g.getColumnModel(), fields = this.items.items, f, val;
+            for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+                val = this.preEditValue(record, cm.getDataIndex(i));
+                f = fields[i];
+                f.setValue(val);
+                this.values[f.id] = val || '';
+            }
+            this.verifyLayout(true);
+            if(!this.isVisible()){
+                this.setPagePosition(Ext.fly(row).getXY());
+            } else{
+                this.el.setXY(Ext.fly(row).getXY(), {duration:0.15});
+            }
+            if(!this.isVisible()){
+                this.show().doLayout();
+            }
+            if(doFocus !== false){
+                this.doFocus.defer(this.focusDelay, this);
+            }
+        }
+    },
+
+    stopEditing : function(saveChanges){
+        this.editing = false;
+        if(!this.isVisible()){
+            return;
+        }
+        if(saveChanges === false || !this.isValid()){
+            this.hide();
+            return;
+        }
+        var changes = {}, r = this.record, hasChange = false;
+        var cm = this.grid.colModel, fields = this.items.items;
+        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+            if(!cm.isHidden(i)){
+                var dindex = cm.getDataIndex(i);
+                if(!Ext.isEmpty(dindex)){
+                    var oldValue = r.data[dindex];
+                    var value = this.postEditValue(fields[i].getValue(), oldValue, r, dindex);
+                    if(String(oldValue) !== String(value)){
+                        changes[dindex] = value;
+                        hasChange = true;
+                    }
+                }
+            }
+        }
+        if(hasChange && this.fireEvent('validateedit', this, changes, r, this.rowIndex) !== false){
+            r.beginEdit();
+            for(var k in changes){
+                if(changes.hasOwnProperty(k)){
+                    r.set(k, changes[k]);
+                }
+            }
+            r.endEdit();
+            this.fireEvent('afteredit', this, changes, r, this.rowIndex);
+        }
+        this.hide();
+    },
+
+    verifyLayout: function(force){
+        if(this.el && (this.isVisible() || force === true)){
+            var row = this.grid.getView().getRow(this.rowIndex);
+            this.setSize(Ext.fly(row).getWidth(), Ext.isIE ? Ext.fly(row).getHeight() + (Ext.isBorderBox ? 9 : 0) : undefined);
+            var cm = this.grid.colModel, fields = this.items.items;
+            for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+                if(!cm.isHidden(i)){
+                    var adjust = 0;
+                    if(i === 0){
+                        adjust += 0; // outer padding
+                    }
+                    if(i === (len - 1)){
+                        adjust += 3; // outer padding
+                    } else{
+                        adjust += 1;
+                    }
+                    fields[i].show();
+                    fields[i].setWidth(cm.getColumnWidth(i) - adjust);
+                } else{
+                    fields[i].hide();
+                }
+            }
+            this.doLayout();
+            this.positionButtons();
+        }
+    },
+
+    slideHide : function(){
+        this.hide();
+    },
+
+    initFields: function(){
+        var cm = this.grid.getColumnModel(), pm = Ext.layout.ContainerLayout.prototype.parseMargins;
+        this.removeAll(false);
+        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+            var c = cm.getColumnAt(i);
+            var ed = c.getEditor();
+            if(!ed){
+                ed = c.displayEditor || new Ext.form.DisplayField();
+            }
+            if(i == 0){
+                ed.margins = pm('0 1 2 1');
+            } else if(i == len - 1){
+                ed.margins = pm('0 0 2 1');
+            } else{
+                ed.margins = pm('0 1 2');
+            }
+            ed.setWidth(cm.getColumnWidth(i));
+            ed.column = c;
+            if(ed.ownerCt !== this){
+                ed.on('focus', this.ensureVisible, this);
+                ed.on('specialkey', this.onKey, this);
+            }
+            this.insert(i, ed);
+        }
+        this.initialized = true;
+    },
+
+    onKey: function(f, e){
+        if(e.getKey() === e.ENTER){
+            this.stopEditing(true);
+            e.stopPropagation();
+        }
+    },
+
+    onGridKey: function(e){
+        if(e.getKey() === e.ENTER && !this.isVisible()){
+            var r = this.grid.getSelectionModel().getSelected();
+            if(r){
+                var index = this.grid.store.indexOf(r);
+                this.startEditing(index);
+                e.stopPropagation();
+            }
+        }
+    },
+
+    ensureVisible: function(editor){
+        if(this.isVisible()){
+             this.grid.getView().ensureVisible(this.rowIndex, this.grid.colModel.getIndexById(editor.column.id), true);
+        }
+    },
+
+    onRowClick: function(g, rowIndex, e){
+        if(this.clicksToEdit == 'auto'){
+            var li = this.lastClickIndex;
+            this.lastClickIndex = rowIndex;
+            if(li != rowIndex && !this.isVisible()){
+                return;
+            }
+        }
+        this.startEditing(rowIndex, false);
+        this.doFocus.defer(this.focusDelay, this, [e.getPoint()]);
+    },
+
+    onRowDblClick: function(g, rowIndex, e){
+        this.startEditing(rowIndex, false);
+        this.doFocus.defer(this.focusDelay, this, [e.getPoint()]);
+    },
+
+    onRender: function(){
+        Ext.ux.grid.RowEditor.superclass.onRender.apply(this, arguments);
+        this.el.swallowEvent(['keydown', 'keyup', 'keypress']);
+        this.btns = new Ext.Panel({
+            baseCls: 'x-plain',
+            cls: 'x-btns',
+            elements:'body',
+            layout: 'table',
+            width: (this.minButtonWidth * 2) + (this.frameWidth * 2) + (this.buttonPad * 4), // width must be specified for IE
+            items: [{
+                ref: 'saveBtn',
+                itemId: 'saveBtn',
+                xtype: 'button',
+                text: this.saveText || 'Save',
+                width: this.minButtonWidth,
+                handler: this.stopEditing.createDelegate(this, [true])
+            }, {
+                xtype: 'button',
+                text: this.cancelText || 'Cancel',
+                width: this.minButtonWidth,
+                handler: this.stopEditing.createDelegate(this, [false])
+            }]
+        });
+        this.btns.render(this.bwrap);
+    },
+
+    afterRender: function(){
+        Ext.ux.grid.RowEditor.superclass.afterRender.apply(this, arguments);
+        this.positionButtons();
+        if(this.monitorValid){
+            this.startMonitoring();
+        }
+    },
+
+    onShow: function(){
+        if(this.monitorValid){
+            this.startMonitoring();
+        }
+        Ext.ux.grid.RowEditor.superclass.onShow.apply(this, arguments);
+    },
+
+    onHide: function(){
+        Ext.ux.grid.RowEditor.superclass.onHide.apply(this, arguments);
+        this.stopMonitoring();
+        this.grid.getView().focusRow(this.rowIndex);
+    },
+
+    positionButtons: function(){
+        if(this.btns){
+            var h = this.el.dom.clientHeight;
+            var view = this.grid.getView();
+            var scroll = view.scroller.dom.scrollLeft;
+            var width =  view.mainBody.getWidth();
+            var bw = this.btns.getWidth();
+            this.btns.el.shift({left: (width/2)-(bw/2)+scroll, top: h - 2, stopFx: true, duration:0.2});
+        }
+    },
+
+    // private
+    preEditValue : function(r, field){
+        var value = r.data[field];
+        return this.autoEncode && typeof value === 'string' ? Ext.util.Format.htmlDecode(value) : value;
+    },
+
+    // private
+    postEditValue : function(value, originalValue, r, field){
+        return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value;
+    },
+
+    doFocus: function(pt){
+        if(this.isVisible()){
+            var index = 0;
+            if(pt){
+                index = this.getTargetColumnIndex(pt);
+            }
+            var cm = this.grid.getColumnModel();
+            for(var i = index||0, len = cm.getColumnCount(); i < len; i++){
+                var c = cm.getColumnAt(i);
+                if(!c.hidden && c.getEditor()){
+                    c.getEditor().focus();
+                    break;
+                }
+            }
+        }
+    },
+
+    getTargetColumnIndex: function(pt){
+        var grid = this.grid, v = grid.view;
+        var x = pt.left;
+        var cms = grid.colModel.config;
+        var i = 0, match = false;
+        for(var len = cms.length, c; c = cms[i]; i++){
+            if(!c.hidden){
+                if(Ext.fly(v.getHeaderCell(i)).getRegion().right >= x){
+                    match = i;
+                    break;
+                }
+            }
+        }
+        return match;
+    },
+
+    startMonitoring : function(){
+        if(!this.bound && this.monitorValid){
+            this.bound = true;
+            Ext.TaskMgr.start({
+                run : this.bindHandler,
+                interval : this.monitorPoll || 200,
+                scope: this
+            });
+        }
+    },
+
+    stopMonitoring : function(){
+        this.bound = false;
+        if(this.tooltip){
+            this.tooltip.hide();
+        }
+    },
+
+    isValid: function(){
+        var valid = true;
+        this.items.each(function(f){
+            if(!f.isValid(true)){
+                valid = false;
+                return false;
+            }
+        });
+        return valid;
+    },
+
+    // private
+    bindHandler : function(){
+        if(!this.bound){
+            return false; // stops binding
+        }
+        var valid = this.isValid();
+        if(!valid && this.errorSummary){
+            this.showTooltip(this.getErrorText().join(''));
+        }
+        this.btns.saveBtn.setDisabled(!valid);
+        this.fireEvent('validation', this, valid);
+    },
+
+    showTooltip: function(msg){
+        var t = this.tooltip;
+        if(!t){
+            t = this.tooltip = new Ext.ToolTip({
+                maxWidth: 600,
+                cls: 'errorTip',
+                width: 300,
+                title: 'Errors',
+                autoHide: false,
+                anchor: 'left',
+                anchorToTarget: true,
+                mouseOffset: [40,0]
+            });
+        }
+        t.initTarget(this.items.last().getEl());
+        if(!t.rendered){
+            t.show();
+            t.hide();
+        }
+        t.body.update(msg);
+        t.doAutoWidth();
+        t.show();
+    },
+
+    getErrorText: function(){
+        var data = ['<ul>'];
+        this.items.each(function(f){
+            if(!f.isValid(true)){
+                data.push('<li>', f.activeError, '</li>');
+            }
+        });
+        data.push('</ul>');
+        return data;
+    }
+});
+Ext.preg('roweditor', Ext.ux.grid.RowEditor);
+
+Ext.override(Ext.form.Field, {
+    markInvalid : function(msg){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        msg = msg || this.invalidText;
+
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.mark(this, msg);
+        }else if(this.msgTarget){
+            this.el.addClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = msg;
+                t.style.display = this.msgDisplay;
+            }
+        }
+        this.activeError = msg;
+        this.fireEvent('invalid', this, msg);
+    }
+});
+
+Ext.override(Ext.ToolTip, {
+    doAutoWidth : function(){
+        var bw = this.body.getTextWidth();
+        if(this.title){
+            bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
+        }
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + 20;
+        this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
+
+        // IE7 repaint bug on initial show
+        if(Ext.isIE7 && !this.repainted){
+            this.el.repaint();
+            this.repainted = true;
+        }
+    }
+});
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.RowExpander
+ * @extends Ext.util.Observable
+ * Plugin (ptype = 'rowexpander') that adds the ability to have a Column in a grid which enables
+ * a second row body which expands/contracts.  The expand/contract behavior is configurable to react
+ * on clicking of the column, double click of the row, and/or hitting enter while a row is selected.
+ *
+ * @ptype rowexpander
+ */
+Ext.ux.grid.RowExpander = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Boolean} expandOnEnter
+     * <tt>true</tt> to toggle selected row(s) between expanded/collapsed when the enter
+     * key is pressed (defaults to <tt>true</tt>).
+     */
+    expandOnEnter : true,
+    /**
+     * @cfg {Boolean} expandOnDblClick
+     * <tt>true</tt> to toggle a row between expanded/collapsed when double clicked
+     * (defaults to <tt>true</tt>).
+     */
+    expandOnDblClick : true,
+
+    header : '',
+    width : 20,
+    sortable : false,
+    fixed : true,
+    menuDisabled : true,
+    dataIndex : '',
+    id : 'expander',
+    lazyRender : true,
+    enableCaching : true,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+
+        this.addEvents({
+            /**
+             * @event beforeexpand
+             * Fires before the row expands. Have the listener return false to prevent the row from expanding.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            beforeexpand: true,
+            /**
+             * @event expand
+             * Fires after the row expands.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            expand: true,
+            /**
+             * @event beforecollapse
+             * Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            beforecollapse: true,
+            /**
+             * @event collapse
+             * Fires after the row collapses.
+             * @param {Object} this RowExpander object.
+             * @param {Object} Ext.data.Record Record for the selected row.
+             * @param {Object} body body element for the secondary row.
+             * @param {Number} rowIndex The current row index.
+             */
+            collapse: true
+        });
+
+        Ext.ux.grid.RowExpander.superclass.constructor.call(this);
+
+        if(this.tpl){
+            if(typeof this.tpl == 'string'){
+                this.tpl = new Ext.Template(this.tpl);
+            }
+            this.tpl.compile();
+        }
+
+        this.state = {};
+        this.bodyContent = {};
+    },
+
+    getRowClass : function(record, rowIndex, p, ds){
+        p.cols = p.cols-1;
+        var content = this.bodyContent[record.id];
+        if(!content && !this.lazyRender){
+            content = this.getBodyContent(record, rowIndex);
+        }
+        if(content){
+            p.body = content;
+        }
+        return this.state[record.id] ? 'x-grid3-row-expanded' : 'x-grid3-row-collapsed';
+    },
+
+    init : function(grid){
+        this.grid = grid;
+
+        var view = grid.getView();
+        view.getRowClass = this.getRowClass.createDelegate(this);
+
+        view.enableRowBody = true;
+
+
+        grid.on('render', this.onRender, this);
+        grid.on('destroy', this.onDestroy, this);
+    },
+
+    // @private
+    onRender: function() {
+        var grid = this.grid;
+        var mainBody = grid.getView().mainBody;
+        mainBody.on('mousedown', this.onMouseDown, this, {delegate: '.x-grid3-row-expander'});
+        if (this.expandOnEnter) {
+            this.keyNav = new Ext.KeyNav(this.grid.getGridEl(), {
+                'enter' : this.onEnter,
+                scope: this
+            });
+        }
+        if (this.expandOnDblClick) {
+            grid.on('rowdblclick', this.onRowDblClick, this);
+        }
+    },
+    
+    // @private    
+    onDestroy: function() {
+        this.keyNav.disable();
+        delete this.keyNav;
+        var mainBody = this.grid.getView().mainBody;
+        mainBody.un('mousedown', this.onMouseDown, this);
+    },
+    // @private
+    onRowDblClick: function(grid, rowIdx, e) {
+        this.toggleRow(rowIdx);
+    },
+
+    onEnter: function(e) {
+        var g = this.grid;
+        var sm = g.getSelectionModel();
+        var sels = sm.getSelections();
+        for (var i = 0, len = sels.length; i < len; i++) {
+            var rowIdx = g.getStore().indexOf(sels[i]);
+            this.toggleRow(rowIdx);
+        }
+    },
+
+    getBodyContent : function(record, index){
+        if(!this.enableCaching){
+            return this.tpl.apply(record.data);
+        }
+        var content = this.bodyContent[record.id];
+        if(!content){
+            content = this.tpl.apply(record.data);
+            this.bodyContent[record.id] = content;
+        }
+        return content;
+    },
+
+    onMouseDown : function(e, t){
+        e.stopEvent();
+        var row = e.getTarget('.x-grid3-row');
+        this.toggleRow(row);
+    },
+
+    renderer : function(v, p, record){
+        p.cellAttr = 'rowspan="2"';
+        return '<div class="x-grid3-row-expander">&#160;</div>';
+    },
+
+    beforeExpand : function(record, body, rowIndex){
+        if(this.fireEvent('beforeexpand', this, record, body, rowIndex) !== false){
+            if(this.tpl && this.lazyRender){
+                body.innerHTML = this.getBodyContent(record, rowIndex);
+            }
+            return true;
+        }else{
+            return false;
+        }
+    },
+
+    toggleRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        this[Ext.fly(row).hasClass('x-grid3-row-collapsed') ? 'expandRow' : 'collapseRow'](row);
+    },
+
+    expandRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        var record = this.grid.store.getAt(row.rowIndex);
+        var body = Ext.DomQuery.selectNode('tr:nth(2) div.x-grid3-row-body', row);
+        if(this.beforeExpand(record, body, row.rowIndex)){
+            this.state[record.id] = true;
+            Ext.fly(row).replaceClass('x-grid3-row-collapsed', 'x-grid3-row-expanded');
+            this.fireEvent('expand', this, record, body, row.rowIndex);
+        }
+    },
+
+    collapseRow : function(row){
+        if(typeof row == 'number'){
+            row = this.grid.view.getRow(row);
+        }
+        var record = this.grid.store.getAt(row.rowIndex);
+        var body = Ext.fly(row).child('tr:nth(1) div.x-grid3-row-body', true);
+        if(this.fireEvent('beforecollapse', this, record, body, row.rowIndex) !== false){
+            this.state[record.id] = false;
+            Ext.fly(row).replaceClass('x-grid3-row-expanded', 'x-grid3-row-collapsed');
+            this.fireEvent('collapse', this, record, body, row.rowIndex);
+        }
+    }
+});
+
+Ext.preg('rowexpander', Ext.ux.grid.RowExpander);
+
+//backwards compat
+Ext.grid.RowExpander = Ext.ux.grid.RowExpander;// We are adding these custom layouts to a namespace that does not
+// exist by default in Ext, so we have to add the namespace first:
+Ext.ns('Ext.ux.layout');
+
+/**
+ * @class Ext.ux.layout.RowLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is the layout style of choice for creating structural layouts in a multi-row format where the height of
+ * each row can be specified as a percentage or fixed height.  Row widths can also be fixed, percentage or auto.
+ * This class is intended to be extended or created via the layout:'ux.row' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>RowLayout does not have any direct config options (other than inherited ones), but it does support a
+ * specific config property of <b><tt>rowHeight</tt></b> that can be included in the config of any panel added to it.  The
+ * layout will use the rowHeight (if present) or height of each panel during layout to determine how to size each panel.
+ * If height or rowHeight is not specified for a given panel, its height will default to the panel's height (or auto).</p>
+ * <p>The height property is always evaluated as pixels, and must be a number greater than or equal to 1.
+ * The rowHeight property is always evaluated as a percentage, and must be a decimal value greater than 0 and
+ * less than 1 (e.g., .25).</p>
+ * <p>The basic rules for specifying row heights are pretty simple.  The logic makes two passes through the
+ * set of contained panels.  During the first layout pass, all panels that either have a fixed height or none
+ * specified (auto) are skipped, but their heights are subtracted from the overall container height.  During the second
+ * pass, all panels with rowHeights are assigned pixel heights in proportion to their percentages based on
+ * the total <b>remaining</b> container height.  In other words, percentage height panels are designed to fill the space
+ * left over by all the fixed-height and/or auto-height panels.  Because of this, while you can specify any number of rows
+ * with different percentages, the rowHeights must always add up to 1 (or 100%) when added together, otherwise your
+ * layout may not render as expected.  Example usage:</p>
+ * <pre><code>
+// All rows are percentages -- they must add up to 1
+var p = new Ext.Panel({
+    title: 'Row Layout - Percentage Only',
+    layout:'ux.row',
+    items: [{
+        title: 'Row 1',
+        rowHeight: .25
+    },{
+        title: 'Row 2',
+        rowHeight: .6
+    },{
+        title: 'Row 3',
+        rowHeight: .15
+    }]
+});
+
+// Mix of height and rowHeight -- all rowHeight values must add
+// up to 1. The first row will take up exactly 120px, and the last two
+// rows will fill the remaining container height.
+var p = new Ext.Panel({
+    title: 'Row Layout - Mixed',
+    layout:'ux.row',
+    items: [{
+        title: 'Row 1',
+        height: 120,
+        // standard panel widths are still supported too:
+        width: '50%' // or 200
+    },{
+        title: 'Row 2',
+        rowHeight: .8,
+        width: 300
+    },{
+        title: 'Row 3',
+        rowHeight: .2
+    }]
+});
+</code></pre>
+ */
+Ext.ux.layout.RowLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+
+    // private
+    isValidParent : function(c, target){
+        return c.getEl().dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var rs = ct.items.items, len = rs.length, r, i;
+
+        if(!this.innerCt){
+            target.addClass('ux-row-layout-ct');
+            this.innerCt = target.createChild({cls:'x-row-inner'});
+        }
+        this.renderAll(ct, this.innerCt);
+
+        var size = target.getViewSize();
+
+        if(size.width < 1 && size.height < 1){ // display none?
+            return;
+        }
+
+        var h = size.height - target.getPadding('tb'),
+            ph = h;
+
+        this.innerCt.setSize({height:h});
+
+        // some rows can be percentages while others are fixed
+        // so we need to make 2 passes
+
+        for(i = 0; i < len; i++){
+            r = rs[i];
+            if(!r.rowHeight){
+                ph -= (r.getSize().height + r.getEl().getMargins('tb'));
+            }
+        }
+
+        ph = ph < 0 ? 0 : ph;
+
+        for(i = 0; i < len; i++){
+            r = rs[i];
+            if(r.rowHeight){
+                r.setSize({height: Math.floor(r.rowHeight*ph) - r.getEl().getMargins('tb')});
+            }
+        }
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['ux.row'] = Ext.ux.layout.RowLayout;
+Ext.ns('Ext.ux.form');
+
+Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
+    initComponent : function(){
+        Ext.ux.form.SearchField.superclass.initComponent.call(this);
+        this.on('specialkey', function(f, e){
+            if(e.getKey() == e.ENTER){
+                this.onTrigger2Click();
+            }
+        }, this);
+    },
+
+    validationEvent:false,
+    validateOnBlur:false,
+    trigger1Class:'x-form-clear-trigger',
+    trigger2Class:'x-form-search-trigger',
+    hideTrigger1:true,
+    width:180,
+    hasSearch : false,
+    paramName : 'query',
+
+    onTrigger1Click : function(){
+        if(this.hasSearch){
+            this.el.dom.value = '';
+            var o = {start: 0};
+            this.store.baseParams = this.store.baseParams || {};
+            this.store.baseParams[this.paramName] = '';
+            this.store.reload({params:o});
+            this.triggers[0].hide();
+            this.hasSearch = false;
+        }
+    },
+
+    onTrigger2Click : function(){
+        var v = this.getRawValue();
+        if(v.length < 1){
+            this.onTrigger1Click();
+            return;
+        }
+        var o = {start: 0};
+        this.store.baseParams = this.store.baseParams || {};
+        this.store.baseParams[this.paramName] = v;
+        this.store.reload({params:o});
+        this.hasSearch = true;
+        this.triggers[0].show();
+    }
+});Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.SelectBox
+ * @extends Ext.form.ComboBox
+ * <p>Makes a ComboBox more closely mimic an HTML SELECT.  Supports clicking and dragging
+ * through the list, with item selection occurring when the mouse button is released.
+ * When used will automatically set {@link #editable} to false and call {@link Ext.Element#unselectable}
+ * on inner elements.  Re-enabling editable after calling this will NOT work.</p>
+ * @author Corey Gilmore http://extjs.com/forum/showthread.php?t=6392
+ * @history 2007-07-08 jvs
+ * Slight mods for Ext 2.0
+ * @xtype selectbox
+ */
+Ext.ux.form.SelectBox = Ext.extend(Ext.form.ComboBox, {
+	constructor: function(config){
+		this.searchResetDelay = 1000;
+		config = config || {};
+		config = Ext.apply(config || {}, {
+			editable: false,
+			forceSelection: true,
+			rowHeight: false,
+			lastSearchTerm: false,
+			triggerAction: 'all',
+			mode: 'local'
+		});
+
+		Ext.ux.form.SelectBox.superclass.constructor.apply(this, arguments);
+
+		this.lastSelectedIndex = this.selectedIndex || 0;
+	},
+
+	initEvents : function(){
+		Ext.ux.form.SelectBox.superclass.initEvents.apply(this, arguments);
+		// you need to use keypress to capture upper/lower case and shift+key, but it doesn't work in IE
+		this.el.on('keydown', this.keySearch, this, true);
+		this.cshTask = new Ext.util.DelayedTask(this.clearSearchHistory, this);
+	},
+
+	keySearch : function(e, target, options) {
+		var raw = e.getKey();
+		var key = String.fromCharCode(raw);
+		var startIndex = 0;
+
+		if( !this.store.getCount() ) {
+			return;
+		}
+
+		switch(raw) {
+			case Ext.EventObject.HOME:
+				e.stopEvent();
+				this.selectFirst();
+				return;
+
+			case Ext.EventObject.END:
+				e.stopEvent();
+				this.selectLast();
+				return;
+
+			case Ext.EventObject.PAGEDOWN:
+				this.selectNextPage();
+				e.stopEvent();
+				return;
+
+			case Ext.EventObject.PAGEUP:
+				this.selectPrevPage();
+				e.stopEvent();
+				return;
+		}
+
+		// skip special keys other than the shift key
+		if( (e.hasModifier() && !e.shiftKey) || e.isNavKeyPress() || e.isSpecialKey() ) {
+			return;
+		}
+		if( this.lastSearchTerm == key ) {
+			startIndex = this.lastSelectedIndex;
+		}
+		this.search(this.displayField, key, startIndex);
+		this.cshTask.delay(this.searchResetDelay);
+	},
+
+	onRender : function(ct, position) {
+		this.store.on('load', this.calcRowsPerPage, this);
+		Ext.ux.form.SelectBox.superclass.onRender.apply(this, arguments);
+		if( this.mode == 'local' ) {
+			this.calcRowsPerPage();
+		}
+	},
+
+	onSelect : function(record, index, skipCollapse){
+		if(this.fireEvent('beforeselect', this, record, index) !== false){
+			this.setValue(record.data[this.valueField || this.displayField]);
+			if( !skipCollapse ) {
+				this.collapse();
+			}
+			this.lastSelectedIndex = index + 1;
+			this.fireEvent('select', this, record, index);
+		}
+	},
+
+	render : function(ct) {
+		Ext.ux.form.SelectBox.superclass.render.apply(this, arguments);
+		if( Ext.isSafari ) {
+			this.el.swallowEvent('mousedown', true);
+		}
+		this.el.unselectable();
+		this.innerList.unselectable();
+		this.trigger.unselectable();
+		this.innerList.on('mouseup', function(e, target, options) {
+			if( target.id && target.id == this.innerList.id ) {
+				return;
+			}
+			this.onViewClick();
+		}, this);
+
+		this.innerList.on('mouseover', function(e, target, options) {
+			if( target.id && target.id == this.innerList.id ) {
+				return;
+			}
+			this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1;
+			this.cshTask.delay(this.searchResetDelay);
+		}, this);
+
+		this.trigger.un('click', this.onTriggerClick, this);
+		this.trigger.on('mousedown', function(e, target, options) {
+			e.preventDefault();
+			this.onTriggerClick();
+		}, this);
+
+		this.on('collapse', function(e, target, options) {
+			Ext.getDoc().un('mouseup', this.collapseIf, this);
+		}, this, true);
+
+		this.on('expand', function(e, target, options) {
+			Ext.getDoc().on('mouseup', this.collapseIf, this);
+		}, this, true);
+	},
+
+	clearSearchHistory : function() {
+		this.lastSelectedIndex = 0;
+		this.lastSearchTerm = false;
+	},
+
+	selectFirst : function() {
+		this.focusAndSelect(this.store.data.first());
+	},
+
+	selectLast : function() {
+		this.focusAndSelect(this.store.data.last());
+	},
+
+	selectPrevPage : function() {
+		if( !this.rowHeight ) {
+			return;
+		}
+		var index = Math.max(this.selectedIndex-this.rowsPerPage, 0);
+		this.focusAndSelect(this.store.getAt(index));
+	},
+
+	selectNextPage : function() {
+		if( !this.rowHeight ) {
+			return;
+		}
+		var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1);
+		this.focusAndSelect(this.store.getAt(index));
+	},
+
+	search : function(field, value, startIndex) {
+		field = field || this.displayField;
+		this.lastSearchTerm = value;
+		var index = this.store.find.apply(this.store, arguments);
+		if( index !== -1 ) {
+			this.focusAndSelect(index);
+		}
+	},
+
+	focusAndSelect : function(record) {
+		var index = typeof record === 'number' ? record : this.store.indexOf(record);
+		this.select(index, this.isExpanded());
+		this.onSelect(this.store.getAt(record), index, this.isExpanded());
+	},
+
+	calcRowsPerPage : function() {
+		if( this.store.getCount() ) {
+			this.rowHeight = Ext.fly(this.view.getNode(0)).getHeight();
+			this.rowsPerPage = this.maxHeight / this.rowHeight;
+		} else {
+			this.rowHeight = false;
+		}
+	}
+
+});
+
+Ext.reg('selectbox', Ext.ux.form.SelectBox);
+
+//backwards compat
+Ext.ux.SelectBox = Ext.ux.form.SelectBox;
+/**
+ * @class Ext.ux.SliderTip
+ * @extends Ext.Tip
+ * Simple plugin for using an Ext.Tip with a slider to show the slider value
+ */
+Ext.ux.SliderTip = Ext.extend(Ext.Tip, {
+    minWidth: 10,
+    offsets : [0, -10],
+    init : function(slider){
+        slider.on('dragstart', this.onSlide, this);
+        slider.on('drag', this.onSlide, this);
+        slider.on('dragend', this.hide, this);
+        slider.on('destroy', this.destroy, this);
+    },
+
+    onSlide : function(slider){
+        this.show();
+        this.body.update(this.getText(slider));
+        this.doAutoWidth();
+        this.el.alignTo(slider.thumb, 'b-t?', this.offsets);
+    },
+
+    getText : function(slider){
+        return String(slider.getValue());
+    }
+});
+Ext.ux.SlidingPager = Ext.extend(Object, {
+    init : function(pbar){
+        Ext.each(pbar.items.getRange(2,6), function(c){
+            c.hide();
+        });
+        var slider = new Ext.Slider({
+            width: 114,
+            minValue: 1,
+            maxValue: 1,
+            plugins: new Ext.ux.SliderTip({
+                getText : function(s){
+                    return String.format('Page <b>{0}</b> of <b>{1}</b>', s.value, s.maxValue);
+                }
+            }),
+            listeners: {
+                changecomplete: function(s, v){
+                    pbar.changePage(v);
+                }
+            }
+        });
+        pbar.insert(5, slider);
+        pbar.on({
+            change: function(pb, data){
+                slider.maxValue = data.pages;
+                slider.setValue(data.activePage);
+            },
+            beforedestroy: function(){
+                slider.destroy();
+            }
+        });
+    }
+});Ext.ns('Ext.ux.form');
+
+/**
+ * @class Ext.ux.form.SpinnerField
+ * @extends Ext.form.NumberField
+ * Creates a field utilizing Ext.ux.Spinner
+ * @xtype spinnerfield
+ */
+Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
+    deferHeight: true,
+    autoSize: Ext.emptyFn,
+    onBlur: Ext.emptyFn,
+    adjustSize: Ext.BoxComponent.prototype.adjustSize,
+
+	constructor: function(config) {
+		var spinnerConfig = Ext.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');
+
+		var spl = this.spinner = new Ext.ux.Spinner(spinnerConfig);
+
+		var plugins = config.plugins
+			? (Ext.isArray(config.plugins)
+				? config.plugins.push(spl)
+				: [config.plugins, spl])
+			: spl;
+
+		Ext.ux.form.SpinnerField.superclass.constructor.call(this, Ext.apply(config, {plugins: plugins}));
+	},
+
+    onShow: function(){
+        if (this.wrap) {
+            this.wrap.dom.style.display = '';
+            this.wrap.dom.style.visibility = 'visible';
+        }
+    },
+
+    onHide: function(){
+        this.wrap.dom.style.display = 'none';
+    },
+
+    // private
+    getResizeEl: function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl: function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon: function(){
+        if (this.wrap) {
+            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+        }
+    },
+
+    validateBlur: function(){
+        return true;
+    }
+});
+
+Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
+
+//backwards compat
+Ext.form.SpinnerField = Ext.ux.form.SpinnerField;
+/**
+ * @class Ext.ux.Spinner
+ * @extends Ext.util.Observable
+ * Creates a Spinner control utilized by Ext.ux.form.SpinnerField
+ */
+Ext.ux.Spinner = Ext.extend(Ext.util.Observable, {
+    incrementValue: 1,
+    alternateIncrementValue: 5,
+    triggerClass: 'x-form-spinner-trigger',
+    splitterClass: 'x-form-spinner-splitter',
+    alternateKey: Ext.EventObject.shiftKey,
+    defaultValue: 0,
+    accelerate: false,
+
+    constructor: function(config){
+        Ext.ux.Spinner.superclass.constructor.call(this, config);
+        Ext.apply(this, config);
+        this.mimicing = false;
+    },
+
+    init: function(field){
+        this.field = field;
+
+        field.afterMethod('onRender', this.doRender, this);
+        field.afterMethod('onEnable', this.doEnable, this);
+        field.afterMethod('onDisable', this.doDisable, this);
+        field.afterMethod('afterRender', this.doAfterRender, this);
+        field.afterMethod('onResize', this.doResize, this);
+        field.afterMethod('onFocus', this.doFocus, this);
+        field.beforeMethod('onDestroy', this.doDestroy, this);
+    },
+
+    doRender: function(ct, position){
+        var el = this.el = this.field.getEl();
+        var f = this.field;
+
+        if (!f.wrap) {
+            f.wrap = this.wrap = el.wrap({
+                cls: "x-form-field-wrap"
+            });
+        }
+        else {
+            this.wrap = f.wrap.addClass('x-form-field-wrap');
+        }
+
+        this.trigger = this.wrap.createChild({
+            tag: "img",
+            src: Ext.BLANK_IMAGE_URL,
+            cls: "x-form-trigger " + this.triggerClass
+        });
+
+        if (!f.width) {
+            this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
+        }
+
+        this.splitter = this.wrap.createChild({
+            tag: 'div',
+            cls: this.splitterClass,
+            style: 'width:13px; height:2px;'
+        });
+        this.splitter.setRight((Ext.isIE) ? 1 : 2).setTop(10).show();
+
+        this.proxy = this.trigger.createProxy('', this.splitter, true);
+        this.proxy.addClass("x-form-spinner-proxy");
+        this.proxy.setStyle('left', '0px');
+        this.proxy.setSize(14, 1);
+        this.proxy.hide();
+        this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
+            dragElId: this.proxy.id
+        });
+
+        this.initTrigger();
+        this.initSpinner();
+    },
+
+    doAfterRender: function(){
+        var y;
+        if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
+            this.el.position();
+            this.el.setY(y);
+        }
+    },
+
+    doEnable: function(){
+        if (this.wrap) {
+            this.wrap.removeClass(this.field.disabledClass);
+        }
+    },
+
+    doDisable: function(){
+        if (this.wrap) {
+            this.wrap.addClass(this.field.disabledClass);
+            this.el.removeClass(this.field.disabledClass);
+        }
+    },
+
+    doResize: function(w, h){
+        if (typeof w == 'number') {
+            this.el.setWidth(this.field.adjustWidth('input', w - this.trigger.getWidth()));
+        }
+        this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
+    },
+
+    doFocus: function(){
+        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
+            });
+            this.el.on('keydown', this.checkTab, this);
+        }
+    },
+
+    // private
+    checkTab: function(e){
+        if (e.getKey() == e.TAB) {
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    mimicBlur: function(e){
+        if (!this.wrap.contains(e.target) && this.field.validateBlur(e)) {
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    triggerBlur: function(){
+        this.mimicing = false;
+        Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        this.el.un("keydown", this.checkTab, this);
+        this.field.beforeBlur();
+        this.wrap.removeClass('x-trigger-wrap-focus');
+        this.field.onBlur.call(this.field);
+    },
+
+    initTrigger: function(){
+        this.trigger.addClassOnOver('x-form-trigger-over');
+        this.trigger.addClassOnClick('x-form-trigger-click');
+    },
+
+    initSpinner: function(){
+        this.field.addEvents({
+            'spin': true,
+            'spinup': true,
+            'spindown': true
+        });
+
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up": function(e){
+                e.preventDefault();
+                this.onSpinUp();
+            },
+
+            "down": function(e){
+                e.preventDefault();
+                this.onSpinDown();
+            },
+
+            "pageUp": function(e){
+                e.preventDefault();
+                this.onSpinUpAlternate();
+            },
+
+            "pageDown": function(e){
+                e.preventDefault();
+                this.onSpinDownAlternate();
+            },
+
+            scope: this
+        });
+
+        this.repeater = new Ext.util.ClickRepeater(this.trigger, {
+            accelerate: this.accelerate
+        });
+        this.field.mon(this.repeater, "click", this.onTriggerClick, this, {
+            preventDefault: true
+        });
+
+        this.field.mon(this.trigger, {
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut,
+            mousemove: this.onMouseMove,
+            mousedown: this.onMouseDown,
+            mouseup: this.onMouseUp,
+            scope: this,
+            preventDefault: true
+        });
+
+        this.field.mon(this.wrap, "mousewheel", this.handleMouseWheel, this);
+
+        this.dd.setXConstraint(0, 0, 10)
+        this.dd.setYConstraint(1500, 1500, 10);
+        this.dd.endDrag = this.endDrag.createDelegate(this);
+        this.dd.startDrag = this.startDrag.createDelegate(this);
+        this.dd.onDrag = this.onDrag.createDelegate(this);
+    },
+
+    onMouseOver: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        this.tmpHoverClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
+        this.trigger.addClass(this.tmpHoverClass);
+    },
+
+    //private
+    onMouseOut: function(){
+        this.trigger.removeClass(this.tmpHoverClass);
+    },
+
+    //private
+    onMouseMove: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        if (((Ext.EventObject.getPageY() > middle) && this.tmpHoverClass == "x-form-spinner-overup") ||
+        ((Ext.EventObject.getPageY() < middle) && this.tmpHoverClass == "x-form-spinner-overdown")) {
+        }
+    },
+
+    //private
+    onMouseDown: function(){
+        if (this.disabled) {
+            return;
+        }
+        var middle = this.getMiddle();
+        this.tmpClickClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
+        this.trigger.addClass(this.tmpClickClass);
+    },
+
+    //private
+    onMouseUp: function(){
+        this.trigger.removeClass(this.tmpClickClass);
+    },
+
+    //private
+    onTriggerClick: function(){
+        if (this.disabled || this.el.dom.readOnly) {
+            return;
+        }
+        var middle = this.getMiddle();
+        var ud = (Ext.EventObject.getPageY() < middle) ? 'Up' : 'Down';
+        this['onSpin' + ud]();
+    },
+
+    //private
+    getMiddle: function(){
+        var t = this.trigger.getTop();
+        var h = this.trigger.getHeight();
+        var middle = t + (h / 2);
+        return middle;
+    },
+
+    //private
+    //checks if control is allowed to spin
+    isSpinnable: function(){
+        if (this.disabled || this.el.dom.readOnly) {
+            Ext.EventObject.preventDefault(); //prevent scrolling when disabled/readonly
+            return false;
+        }
+        return true;
+    },
+
+    handleMouseWheel: function(e){
+        //disable scrolling when not focused
+        if (this.wrap.hasClass('x-trigger-wrap-focus') == false) {
+            return;
+        }
+
+        var delta = e.getWheelDelta();
+        if (delta > 0) {
+            this.onSpinUp();
+            e.stopEvent();
+        }
+        else
+            if (delta < 0) {
+                this.onSpinDown();
+                e.stopEvent();
+            }
+    },
+
+    //private
+    startDrag: function(){
+        this.proxy.show();
+        this._previousY = Ext.fly(this.dd.getDragEl()).getTop();
+    },
+
+    //private
+    endDrag: function(){
+        this.proxy.hide();
+    },
+
+    //private
+    onDrag: function(){
+        if (this.disabled) {
+            return;
+        }
+        var y = Ext.fly(this.dd.getDragEl()).getTop();
+        var ud = '';
+
+        if (this._previousY > y) {
+            ud = 'Up';
+        } //up
+        if (this._previousY < y) {
+            ud = 'Down';
+        } //down
+        if (ud != '') {
+            this['onSpin' + ud]();
+        }
+
+        this._previousY = y;
+    },
+
+    //private
+    onSpinUp: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        if (Ext.EventObject.shiftKey == true) {
+            this.onSpinUpAlternate();
+            return;
+        }
+        else {
+            this.spin(false, false);
+        }
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spinup", this);
+    },
+
+    //private
+    onSpinDown: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        if (Ext.EventObject.shiftKey == true) {
+            this.onSpinDownAlternate();
+            return;
+        }
+        else {
+            this.spin(true, false);
+        }
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spindown", this);
+    },
+
+    //private
+    onSpinUpAlternate: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        this.spin(false, true);
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spinup", this);
+    },
+
+    //private
+    onSpinDownAlternate: function(){
+        if (this.isSpinnable() == false) {
+            return;
+        }
+        this.spin(true, true);
+        this.field.fireEvent("spin", this);
+        this.field.fireEvent("spindown", this);
+    },
+
+    spin: function(down, alternate){
+        var v = parseFloat(this.field.getValue());
+        var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
+        (down == true) ? v -= incr : v += incr;
+
+        v = (isNaN(v)) ? this.defaultValue : v;
+        v = this.fixBoundries(v);
+        this.field.setRawValue(v);
+    },
+
+    fixBoundries: function(value){
+        var v = value;
+
+        if (this.field.minValue != undefined && v < this.field.minValue) {
+            v = this.field.minValue;
+        }
+        if (this.field.maxValue != undefined && v > this.field.maxValue) {
+            v = this.field.maxValue;
+        }
+
+        return this.fixPrecision(v);
+    },
+
+    // private
+    fixPrecision: function(value){
+        var nan = isNaN(value);
+        if (!this.field.allowDecimals || this.field.decimalPrecision == -1 || nan || !value) {
+            return nan ? '' : value;
+        }
+        return parseFloat(parseFloat(value).toFixed(this.field.decimalPrecision));
+    },
+
+    doDestroy: function(){
+        if (this.trigger) {
+            this.trigger.remove();
+        }
+        if (this.wrap) {
+            this.wrap.remove();
+            delete this.field.wrap;
+        }
+
+        if (this.splitter) {
+            this.splitter.remove();
+        }
+
+        if (this.dd) {
+            this.dd.unreg();
+            this.dd = null;
+        }
+
+        if (this.proxy) {
+            this.proxy.remove();
+        }
+
+        if (this.repeater) {
+            this.repeater.purgeListeners();
+        }
+    }
+});
+
+//backwards compat
+Ext.form.Spinner = Ext.ux.Spinner;Ext.ux.Spotlight = function(config){
+    Ext.apply(this, config);
+}
+Ext.ux.Spotlight.prototype = {
+    active : false,
+    animate : true,
+    duration: .25,
+    easing:'easeNone',
+
+    // private
+    animated : false,
+
+    createElements : function(){
+        var bd = Ext.getBody();
+
+        this.right = bd.createChild({cls:'x-spotlight'});
+        this.left = bd.createChild({cls:'x-spotlight'});
+        this.top = bd.createChild({cls:'x-spotlight'});
+        this.bottom = bd.createChild({cls:'x-spotlight'});
+
+        this.all = new Ext.CompositeElement([this.right, this.left, this.top, this.bottom]);
+    },
+
+    show : function(el, callback, scope){
+        if(this.animated){
+            this.show.defer(50, this, [el, callback, scope]);
+            return;
+        }
+        this.el = Ext.get(el);
+        if(!this.right){
+            this.createElements();
+        }
+        if(!this.active){
+            this.all.setDisplayed('');
+            this.applyBounds(true, false);
+            this.active = true;
+            Ext.EventManager.onWindowResize(this.syncSize, this);
+            this.applyBounds(false, this.animate, false, callback, scope);
+        }else{
+            this.applyBounds(false, false, false, callback, scope); // all these booleans look hideous
+        }
+    },
+
+    hide : function(callback, scope){
+        if(this.animated){
+            this.hide.defer(50, this, [callback, scope]);
+            return;
+        }
+        Ext.EventManager.removeResizeListener(this.syncSize, this);
+        this.applyBounds(true, this.animate, true, callback, scope);
+    },
+
+    doHide : function(){
+        this.active = false;
+        this.all.setDisplayed(false);
+    },
+
+    syncSize : function(){
+        this.applyBounds(false, false);
+    },
+
+    applyBounds : function(basePts, anim, doHide, callback, scope){
+
+        var rg = this.el.getRegion();
+
+        var dw = Ext.lib.Dom.getViewWidth(true);
+        var dh = Ext.lib.Dom.getViewHeight(true);
+
+        var c = 0, cb = false;
+        if(anim){
+            cb = {
+                callback: function(){
+                    c++;
+                    if(c == 4){
+                        this.animated = false;
+                        if(doHide){
+                            this.doHide();
+                        }
+                        Ext.callback(callback, scope, [this]);
+                    }
+                },
+                scope: this,
+                duration: this.duration,
+                easing: this.easing
+            };
+            this.animated = true;
+        }
+
+        this.right.setBounds(
+                rg.right,
+                basePts ? dh : rg.top,
+                dw - rg.right,
+                basePts ? 0 : (dh - rg.top),
+                cb);
+
+        this.left.setBounds(
+                0,
+                0,
+                rg.left,
+                basePts ? 0 : rg.bottom,
+                cb);
+
+        this.top.setBounds(
+                basePts ? dw : rg.left,
+                0,
+                basePts ? 0 : dw - rg.left,
+                rg.top,
+                cb);
+
+        this.bottom.setBounds(
+                0,
+                rg.bottom,
+                basePts ? 0 : rg.right,
+                dh - rg.bottom,
+                cb);
+
+        if(!anim){
+            if(doHide){
+                this.doHide();
+            }
+            if(callback){
+                Ext.callback(callback, scope, [this]);
+            }
+        }
+    },
+
+    destroy : function(){
+        this.doHide();
+        Ext.destroy(
+            this.right,
+            this.left,
+            this.top,
+            this.bottom);
+        delete this.el;
+        delete this.all;
+    }
+};
+
+//backwards compat
+Ext.Spotlight = Ext.ux.Spotlight;/**
+ * @class Ext.ux.TabCloseMenu
+ * @extends Object 
+ * Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs.
+ * 
+ * @ptype tabclosemenu
+ */
+Ext.ux.TabCloseMenu = function(){
+    var tabs, menu, ctxItem;
+    this.init = function(tp){
+        tabs = tp;
+        tabs.on('contextmenu', onContextMenu);
+    };
+
+    function onContextMenu(ts, item, e){
+        if(!menu){ // create context menu on first right click
+            menu = new Ext.menu.Menu({            
+            items: [{
+                id: tabs.id + '-close',
+                text: 'Close Tab',
+                handler : function(){
+                    tabs.remove(ctxItem);
+                }
+            },{
+                id: tabs.id + '-close-others',
+                text: 'Close Other Tabs',
+                handler : function(){
+                    tabs.items.each(function(item){
+                        if(item.closable && item != ctxItem){
+                            tabs.remove(item);
+                        }
+                    });
+                }
+            }]});
+        }
+        ctxItem = item;
+        var items = menu.items;
+        items.get(tabs.id + '-close').setDisabled(!item.closable);
+        var disableOthers = true;
+        tabs.items.each(function(){
+            if(this != item && this.closable){
+                disableOthers = false;
+                return false;
+            }
+        });
+        items.get(tabs.id + '-close-others').setDisabled(disableOthers);
+	e.stopEvent();
+        menu.showAt(e.getPoint());
+    }
+};
+
+Ext.preg('tabclosemenu', Ext.ux.TabCloseMenu);
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.TableGrid
+ * @extends Ext.grid.GridPanel
+ * A Grid which creates itself from an existing HTML table element.
+ * @history
+ * 2007-03-01 Original version by Nige "Animal" White
+ * 2007-03-10 jvs Slightly refactored to reuse existing classes * @constructor
+ * @param {String/HTMLElement/Ext.Element} table The table element from which this grid will be created -
+ * The table MUST have some type of size defined for the grid to fill. The container will be
+ * automatically set to position relative if it isn't already.
+ * @param {Object} config A config object that sets properties on this grid and has two additional (optional)
+ * properties: fields and columns which allow for customizing data fields and columns for this grid.
+ */
+Ext.ux.grid.TableGrid = function(table, config){
+    config = config ||
+    {};
+    Ext.apply(this, config);
+    var cf = config.fields || [], ch = config.columns || [];
+    table = Ext.get(table);
+    
+    var ct = table.insertSibling();
+    
+    var fields = [], cols = [];
+    var headers = table.query("thead th");
+    for (var i = 0, h; h = headers[i]; i++) {
+        var text = h.innerHTML;
+        var name = 'tcol-' + i;
+        
+        fields.push(Ext.applyIf(cf[i] ||
+        {}, {
+            name: name,
+            mapping: 'td:nth(' + (i + 1) + ')/@innerHTML'
+        }));
+        
+        cols.push(Ext.applyIf(ch[i] ||
+        {}, {
+            'header': text,
+            'dataIndex': name,
+            'width': h.offsetWidth,
+            'tooltip': h.title,
+            'sortable': true
+        }));
+    }
+    
+    var ds = new Ext.data.Store({
+        reader: new Ext.data.XmlReader({
+            record: 'tbody tr'
+        }, fields)
+    });
+    
+    ds.loadData(table.dom);
+    
+    var cm = new Ext.grid.ColumnModel(cols);
+    
+    if (config.width || config.height) {
+        ct.setSize(config.width || 'auto', config.height || 'auto');
+    }
+    else {
+        ct.setWidth(table.getWidth());
+    }
+    
+    if (config.remove !== false) {
+        table.remove();
+    }
+    
+    Ext.applyIf(this, {
+        'ds': ds,
+        'cm': cm,
+        'sm': new Ext.grid.RowSelectionModel(),
+        autoHeight: true,
+        autoWidth: false
+    });
+    Ext.ux.grid.TableGrid.superclass.constructor.call(this, ct, {});
+};
+
+Ext.extend(Ext.ux.grid.TableGrid, Ext.grid.GridPanel);
+
+//backwards compat
+Ext.grid.TableGrid = Ext.ux.grid.TableGrid;
+
+
+Ext.ux.TabScrollerMenu =  Ext.extend(Object, {
+	pageSize       : 10,
+	maxText        : 15,
+	menuPrefixText : 'Items',
+	constructor    : function(config) {
+		config = config || {};
+		Ext.apply(this, config);
+	},
+	init : function(tabPanel) {
+		Ext.apply(tabPanel, this.tabPanelMethods);
+		
+		tabPanel.tabScrollerMenu = this;
+		var thisRef = this;
+		
+		tabPanel.on({
+			render : {
+				scope  : tabPanel,
+				single : true,
+				fn     : function() { 
+					var newFn = tabPanel.createScrollers.createSequence(thisRef.createPanelsMenu, this);
+					tabPanel.createScrollers = newFn;
+				}
+			}
+		});
+	},
+	// private && sequeneced
+	createPanelsMenu : function() {
+		var h = this.stripWrap.dom.offsetHeight;
+		
+		//move the right menu item to the left 18px
+		var rtScrBtn = this.header.dom.firstChild;
+		Ext.fly(rtScrBtn).applyStyles({
+			right : '18px'
+		});
+		
+		var stripWrap = Ext.get(this.strip.dom.parentNode);
+		stripWrap.applyStyles({
+			 'margin-right' : '36px'
+		});
+		
+		// Add the new righthand menu
+		var scrollMenu = this.header.insertFirst({
+			cls:'x-tab-tabmenu-right'
+		});
+		scrollMenu.setHeight(h);
+		scrollMenu.addClassOnOver('x-tab-tabmenu-over');
+		scrollMenu.on('click', this.showTabsMenu, this);	
+		
+		this.scrollLeft.show = this.scrollLeft.show.createSequence(function() {
+			scrollMenu.show();												 						 
+		});
+		
+		this.scrollLeft.hide = this.scrollLeft.hide.createSequence(function() {
+			scrollMenu.hide();								
+		});
+		
+	},
+	// public
+	getPageSize : function() {
+		return this.pageSize;
+	},
+	// public
+	setPageSize : function(pageSize) {
+		this.pageSize = pageSize;
+	},
+	// public
+	getMaxText : function() {
+		return this.maxText;
+	},
+	// public
+	setMaxText : function(t) {
+		this.maxText = t;
+	},
+	getMenuPrefixText : function() {
+		return this.menuPrefixText;
+	},
+	setMenuPrefixText : function(t) {
+		this.menuPrefixText = t;
+	},
+	// private && applied to the tab panel itself.
+	tabPanelMethods : {
+		// all execute within the scope of the tab panel
+		// private	
+		showTabsMenu : function(e) {		
+			if (! this.tabsMenu) {
+				this.tabsMenu =  new Ext.menu.Menu();
+				this.on('beforedestroy', this.tabsMenu.destroy, this.tabsMenu);
+			}
+			
+			this.tabsMenu.removeAll();
+			
+			this.generateTabMenuItems();
+			
+			var target = Ext.get(e.getTarget());
+			var xy     = target.getXY();
+			
+			//Y param + 24 pixels
+			xy[1] += 24;
+			
+			this.tabsMenu.showAt(xy);
+		},
+		// private	
+		generateTabMenuItems : function() {
+			var curActive  = this.getActiveTab();
+			var totalItems = this.items.getCount();
+			var pageSize   = this.tabScrollerMenu.getPageSize();
+			
+			
+			if (totalItems > pageSize)  {
+				var numSubMenus = Math.floor(totalItems / pageSize);
+				var remainder   = totalItems % pageSize;
+				
+				// Loop through all of the items and create submenus in chunks of 10
+				for (var i = 0 ; i < numSubMenus; i++) {
+					var curPage = (i + 1) * pageSize;
+					var menuItems = [];
+					
+					
+					for (var x = 0; x < pageSize; x++) {				
+						index = x + curPage - pageSize;
+						var item = this.items.get(index);
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+					
+					this.tabsMenu.add({
+						text : this.tabScrollerMenu.getMenuPrefixText() + ' '  + (curPage - pageSize + 1) + ' - ' + curPage,
+						menu : menuItems
+					});
+					
+				}
+				// remaining items
+				if (remainder > 0) {
+					var start = numSubMenus * pageSize;
+					menuItems = [];
+					for (var i = start ; i < totalItems; i ++ ) {					
+						var item = this.items.get(i);
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+					
+					
+					this.tabsMenu.add({
+						text : this.tabScrollerMenu.menuPrefixText  + ' ' + (start + 1) + ' - ' + (start + menuItems.length),
+						menu : menuItems
+					});
+					
+
+				}
+			}
+			else {
+				this.items.each(function(item) {
+					if (item.id != curActive.id && ! item.hidden) {
+						menuItems.push(this.autoGenMenuItem(item));
+					}
+				}, this);
+			}	
+		},
+		// private
+		autoGenMenuItem : function(item) {
+			var maxText = this.tabScrollerMenu.getMaxText();
+			var text    = Ext.util.Format.ellipsis(item.title, maxText);
+			
+			return {
+				text      : text,
+				handler   : this.showTabFromMenu,
+				scope     : this,
+				disabled  : item.disabled,
+				tabToShow : item,
+				iconCls   : item.iconCls
+			}
+		
+		},
+		// private
+		showTabFromMenu : function(menuItem) {
+			this.setActiveTab(menuItem.tabToShow);
+		}	
+	}	
+});
+Ext.ns('Ext.ux.tree');
+
+/**
+ * @class Ext.ux.tree.XmlTreeLoader
+ * @extends Ext.tree.TreeLoader
+ * <p>A TreeLoader that can convert an XML document into a hierarchy of {@link Ext.tree.TreeNode}s.
+ * Any text value included as a text node in the XML will be added to the parent node as an attribute
+ * called <tt>innerText</tt>.  Also, the tag name of each XML node will be added to the tree node as
+ * an attribute called <tt>tagName</tt>.</p>
+ * <p>By default, this class expects that your source XML will provide the necessary attributes on each
+ * node as expected by the {@link Ext.tree.TreePanel} to display and load properly.  However, you can
+ * provide your own custom processing of node attributes by overriding the {@link #processNode} method
+ * and modifying the attributes as needed before they are used to create the associated TreeNode.</p>
+ * @constructor
+ * Creates a new XmlTreeloader.
+ * @param {Object} config A config object containing config properties.
+ */
+Ext.ux.tree.XmlTreeLoader = Ext.extend(Ext.tree.TreeLoader, {
+    /**
+     * @property  XML_NODE_ELEMENT
+     * XML element node (value 1, read-only)
+     * @type Number
+     */
+    XML_NODE_ELEMENT : 1,
+    /**
+     * @property  XML_NODE_TEXT
+     * XML text node (value 3, read-only)
+     * @type Number
+     */
+    XML_NODE_TEXT : 3,
+
+    // private override
+    processResponse : function(response, node, callback){
+        var xmlData = response.responseXML;
+        var root = xmlData.documentElement || xmlData;
+
+        try{
+            node.beginUpdate();
+            node.appendChild(this.parseXml(root));
+            node.endUpdate();
+
+            if(typeof callback == "function"){
+                callback(this, node);
+            }
+        }catch(e){
+            this.handleFailure(response);
+        }
+    },
+
+    // private
+    parseXml : function(node) {
+        var nodes = [];
+        Ext.each(node.childNodes, function(n){
+            if(n.nodeType == this.XML_NODE_ELEMENT){
+                var treeNode = this.createNode(n);
+                if(n.childNodes.length > 0){
+                    var child = this.parseXml(n);
+                    if(typeof child == 'string'){
+                        treeNode.attributes.innerText = child;
+                    }else{
+                        treeNode.appendChild(child);
+                    }
+                }
+                nodes.push(treeNode);
+            }
+            else if(n.nodeType == this.XML_NODE_TEXT){
+                var text = n.nodeValue.trim();
+                if(text.length > 0){
+                    return nodes = text;
+                }
+            }
+        }, this);
+
+        return nodes;
+    },
+
+    // private override
+    createNode : function(node){
+        var attr = {
+            tagName: node.tagName
+        };
+
+        Ext.each(node.attributes, function(a){
+            attr[a.nodeName] = a.nodeValue;
+        });
+
+        this.processAttributes(attr);
+
+        return Ext.ux.tree.XmlTreeLoader.superclass.createNode.call(this, attr);
+    },
+
+    /*
+     * Template method intended to be overridden by subclasses that need to provide
+     * custom attribute processing prior to the creation of each TreeNode.  This method
+     * will be passed a config object containing existing TreeNode attribute name/value
+     * pairs which can be modified as needed directly (no need to return the object).
+     */
+    processAttributes: Ext.emptyFn
+});
+
+//backwards compat
+Ext.ux.XmlTreeLoader = Ext.ux.tree.XmlTreeLoader;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/ux/ux-all.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns("Ext.ux.grid");Ext.ux.grid.BufferView=Ext.extend(Ext.grid.GridView,{rowHeight:19,borderHeight:2,scrollDelay:100,cacheSize:20,cleanDelay:500,initTemplates:function(){Ext.ux.grid.BufferView.superclass.initTemplates.call(this);var a=this.templates;a.rowHolder=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"></div>');a.rowHolder.disableFormats=true;a.rowHolder.compile();a.rowBody=new Ext.Template('<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table>");a.rowBody.disableFormats=true;a.rowBody.compile()},getStyleRowHeight:function(){return Ext.isBorderBox?(this.rowHeight+this.borderHeight):this.rowHeight},getCalculatedRowHeight:function(){return this.rowHeight+this.borderHeight},getVisibleRowCount:function(){var b=this.getCalculatedRowHeight();var a=this.scroller.dom.clientHeight;return(a<1)?0:Math.ceil(a/b)},getVisibleRows:function(){var a=this.getVisibleRowCount();var b=this.scroller.dom.scrollTop;var c=(b==0?0:Math.floor(b/this.getCalculatedRowHeight())-1);return{first:Math.max(c,0),last:Math.min(c+a+2,this.ds.getCount()-1)}},doRender:function(g,k,u,a,s,A,l){var b=this.templates,f=b.cell,h=b.row,x=b.rowBody,n=s-1;var t=this.getStyleRowHeight();var z=this.getVisibleRows();var d="width:"+this.getTotalWidth()+";height:"+t+"px;";var D=[],w,E,v={},m={tstyle:d},q;for(var y=0,C=k.length;y<C;y++){q=k[y];w=[];var o=(y+a);var e=o>=z.first&&o<=z.last;if(e){for(var B=0;B<s;B++){E=g[B];v.id=E.id;v.css=B==0?"x-grid3-cell-first ":(B==n?"x-grid3-cell-last ":"");v.attr=v.cellAttr="";v.value=E.renderer(q.data[E.name],v,q,o,B,u);v.style=E.style;if(v.value==undefined||v.value===""){v.value="&#160;"}if(q.dirty&&typeof q.modified[E.name]!=="undefined"){v.css+=" x-grid3-dirty-cell"}w[w.length]=f.apply(v)}}var F=[];if(A&&((o+1)%2==0)){F[0]="x-grid3-row-alt"}if(q.dirty){F[1]=" x-grid3-dirty-row"}m.cols=s;if(this.getRowClass){F[2]=this.getRowClass(q,o,m,u)}m.alt=F.join(" ");m.cells=w.join("");D[D.length]=!e?b.rowHolder.apply(m):(l?x.apply(m):h.apply(m))}return D.join("")},isRowRendered:function(a){var b=this.getRow(a);return b&&b.childNodes.length>0},syncScroll:function(){Ext.ux.grid.BufferView.superclass.syncScroll.apply(this,arguments);this.update()},update:function(){if(this.scrollDelay){if(!this.renderTask){this.renderTask=new Ext.util.DelayedTask(this.doUpdate,this)}this.renderTask.delay(this.scrollDelay)}else{this.doUpdate()}},doUpdate:function(){if(this.getVisibleRowCount()>0){var f=this.grid,b=f.colModel,h=f.store;var e=this.getColumnData();var a=this.getVisibleRows();for(var d=a.first;d<=a.last;d++){if(!this.isRowRendered(d)){var c=this.doRender(e,[h.getAt(d)],h,d,b.getColumnCount(),f.stripeRows,true);this.getRow(d).innerHTML=c}}this.clean()}},clean:function(){if(!this.cleanTask){this.cleanTask=new Ext.util.DelayedTask(this.doClean,this)}this.cleanTask.delay(this.cleanDelay)},doClean:function(){if(this.getVisibleRowCount()>0){var b=this.getVisibleRows();b.first-=this.cacheSize;b.last+=this.cacheSize;var c=0,d=this.getRows();if(b.first<=0){c=b.last+1}for(var a=this.ds.getCount();c<a;c++){if((c<b.first||c>b.last)&&d[c].innerHTML){d[c].innerHTML=""}}}},layout:function(){Ext.ux.grid.BufferView.superclass.layout.call(this);this.update()}});Ext.ns("Ext.ux.layout");Ext.ux.layout.CenterLayout=Ext.extend(Ext.layout.FitLayout,{setItemSize:function(b,a){this.container.addClass("ux-layout-center");b.addClass("ux-layout-center-item");if(b&&a.height>0){if(b.width){a.width=b.width}b.setSize(a)}}});Ext.Container.LAYOUTS["ux.center"]=Ext.ux.layout.CenterLayout;Ext.ns("Ext.ux.grid");Ext.ux.grid.CheckColumn=function(a){Ext.apply(this,a);if(!this.id){this.id=Ext.id()}this.renderer=this.renderer.createDelegate(this)};Ext.ux.grid.CheckColumn.prototype={init:function(a){this.grid=a;this.grid.on("render",function(){var b=this.grid.getView();b.mainBody.on("mousedown",this.onMouseDown,this)},this)},onMouseDown:function(d,c){if(c.className&&c.className.indexOf("x-grid3-cc-"+this.id)!=-1){d.stopEvent();var b=this.grid.getView().findRowIndex(c);var a=this.grid.store.getAt(b);a.set(this.dataIndex,!a.data[this.dataIndex])}},renderer:function(b,c,a){c.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(b?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'}};Ext.preg("checkcolumn",Ext.ux.grid.CheckColumn);Ext.grid.CheckColumn=Ext.ux.grid.CheckColumn;Ext.ns("Ext.ux.tree");Ext.ux.tree.ColumnTree=Ext.extend(Ext.tree.TreePanel,{lines:false,borderWidth:Ext.isBorderBox?0:2,cls:"x-column-tree",onRender:function(){Ext.tree.ColumnTree.superclass.onRender.apply(this,arguments);this.headers=this.header.createChild({cls:"x-tree-headers"});var f=this.columns,g;var b=0;var d=19;for(var e=0,a=f.length;e<a;e++){g=f[e];b+=g.width;this.headers.createChild({cls:"x-tree-hd "+(g.cls?g.cls+"-hd":""),cn:{cls:"x-tree-hd-text",html:g.header},style:"width:"+(g.width-this.borderWidth)+"px;"})}this.headers.createChild({cls:"x-clear"});this.headers.setWidth(b+d);this.innerCt.setWidth(b)}});Ext.reg("columntree",Ext.ux.tree.ColumnTree);Ext.tree.ColumnTree=Ext.ux.tree.ColumnTree;Ext.ux.tree.ColumnNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{focus:Ext.emptyFn,renderElements:function(d,m,h,o){this.indentMarkup=d.parentNode?d.parentNode.ui.getChildIndent():"";var p=d.getOwnerTree();var l=p.columns;var k=p.borderWidth;var j=l[0];var b=['<li class="x-tree-node"><div ext:tree-node-id="',d.id,'" class="x-tree-node-el x-tree-node-leaf ',m.cls,'">','<div class="x-tree-col" style="width:',j.width-k,'px;">','<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">','<a hidefocus="on" class="x-tree-node-anchor" href="',m.href?m.href:"#",'" tabIndex="1" ',m.hrefTarget?' target="'+m.hrefTarget+'"':"",">",'<span unselectable="on">',d.text||(j.renderer?j.renderer(m[j.dataIndex],d,m):m[j.dataIndex]),"</span></a>","</div>"];for(var e=1,g=l.length;e<g;e++){j=l[e];b.push('<div class="x-tree-col ',(j.cls?j.cls:""),'" style="width:',j.width-k,'px;">','<div class="x-tree-col-text">',(j.renderer?j.renderer(m[j.dataIndex],d,m):m[j.dataIndex]),"</div>","</div>")}b.push('<div class="x-clear"></div></div>','<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>");if(o!==true&&d.nextSibling&&d.nextSibling.ui.getEl()){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",d.nextSibling.ui.getEl(),b.join(""))}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",h,b.join(""))}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var f=this.elNode.firstChild.childNodes;this.indentNode=f[0];this.ecNode=f[1];this.iconNode=f[2];this.anchor=f[3];this.textNode=f[3].firstChild}});Ext.tree.ColumnNodeUI=Ext.ux.tree.ColumnNodeUI;Ext.DataView.LabelEditor=Ext.extend(Ext.Editor,{alignment:"tl-tl",hideEl:false,cls:"x-small-editor",shim:false,completeOnEnter:true,cancelOnEsc:true,labelSelector:"span.x-editable",constructor:function(a,b){Ext.DataView.LabelEditor.superclass.constructor.call(this,b||new Ext.form.TextField({allowBlank:false,growMin:90,growMax:240,grow:true,selectOnFocus:true}),a)},init:function(a){this.view=a;a.on("render",this.initEditor,this);this.on("complete",this.onSave,this)},initEditor:function(){this.view.on({scope:this,containerclick:this.doBlur,click:this.doBlur});this.view.getEl().on("mousedown",this.onMouseDown,this,{delegate:this.labelSelector})},doBlur:function(){if(this.editing){this.field.blur()}},onMouseDown:function(d,c){if(!d.ctrlKey&&!d.shiftKey){var b=this.view.findItemFromChild(c);d.stopEvent();var a=this.view.store.getAt(this.view.indexOf(b));this.startEdit(c,a.data[this.dataIndex]);this.activeRecord=a}else{d.preventDefault()}},onSave:function(a,b){this.activeRecord.set(this.dataIndex,b)}});Ext.DataView.DragSelector=function(f){f=f||{};var j,h,l;var d,k,m=new Ext.lib.Region(0,0,0,0);var b=f.dragSafe===true;this.init=function(q){j=q;j.on("render",p)};function n(){d=[];j.all.each(function(q){d[d.length]=q.getRegion()});k=j.el.getRegion()}function e(){return false}function g(q){return !b||q.target==j.el.dom}function o(q){j.on("containerclick",e,j,{single:true});if(!h){h=j.el.createChild({cls:"x-view-selector"})}else{h.setDisplayed("block")}n();j.clearSelections()}function c(z){var A=l.startXY;var E=l.getXY();var C=Math.min(A[0],E[0]);var B=Math.min(A[1],E[1]);var D=Math.abs(A[0]-E[0]);var u=Math.abs(A[1]-E[1]);m.left=C;m.top=B;m.right=C+D;m.bottom=B+u;m.constrainTo(k);h.setRegion(m);for(var t=0,v=d.length;t<v;t++){var q=d[t],s=m.intersect(q);if(s&&!q.selected){q.selected=true;j.select(t,true)}else{if(!s&&q.selected){q.selected=false;j.deselect(t)}}}}function a(q){if(!Ext.isIE){j.un("containerclick",e,j)}if(h){h.setDisplayed(false)}}function p(q){l=new Ext.dd.DragTracker({onBeforeStart:g,onStart:o,onDrag:c,onEnd:a});l.initEl(q.el)}};Ext.ns("Ext.ux.form");Ext.ux.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:"Browse...",buttonOnly:false,buttonOffset:3,readOnly:true,autoSize:Ext.emptyFn,initComponent:function(){Ext.ux.form.FileUploadField.superclass.initComponent.call(this);this.addEvents("fileselected")},onRender:function(c,a){Ext.ux.form.FileUploadField.superclass.onRender.call(this,c,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-file-wrap"});this.el.addClass("x-form-file-text");this.el.dom.removeAttribute("name");this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:"x-form-file",tag:"input",type:"file",size:1});var b=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText});this.button=new Ext.Button(Ext.apply(b,{renderTo:this.wrap,cls:"x-form-file-btn"+(b.iconCls?" x-btn-icon":"")}));if(this.buttonOnly){this.el.hide();this.wrap.setWidth(this.button.getEl().getWidth())}this.fileInput.on("change",function(){var d=this.fileInput.dom.value;this.setValue(d);this.fireEvent("fileselected",this,d)},this)},getFileInputId:function(){return this.id+"-file"},onResize:function(a,b){Ext.ux.form.FileUploadField.superclass.onResize.call(this,a,b);this.wrap.setWidth(a);if(!this.buttonOnly){var a=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset;this.el.setWidth(a)}},onDestroy:function(){Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);Ext.destroy(this.fileInput,this.button,this.wrap)},preFocus:Ext.emptyFn,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}});Ext.reg("fileuploadfield",Ext.ux.form.FileUploadField);Ext.form.FileUploadField=Ext.ux.form.FileUploadField;(function(){Ext.ns("Ext.a11y");Ext.a11y.Frame=Ext.extend(Object,{initialized:false,constructor:function(b,a){this.setSize(b||1);this.setColor(a||"15428B")},init:function(){if(!this.initialized){this.sides=[];var b,a;this.ct=Ext.DomHelper.append(document.body,{cls:"x-a11y-focusframe"},true);for(a=0;a<4;a++){b=Ext.DomHelper.append(this.ct,{cls:"x-a11y-focusframe-side",style:"background-color: #"+this.color},true);b.visibilityMode=Ext.Element.DISPLAY;this.sides.push(b)}this.frameTask=new Ext.util.DelayedTask(function(e){var f=Ext.get(e);if(f!=this.curEl){var c=f.getWidth();var d=f.getHeight();this.sides[0].show().setSize(c,this.size).anchorTo(e,"tl",[0,-1]);this.sides[2].show().setSize(c,this.size).anchorTo(e,"bl",[0,-1]);this.sides[1].show().setSize(this.size,d).anchorTo(e,"tr",[-1,0]);this.sides[3].show().setSize(this.size,d).anchorTo(e,"tl",[-1,0]);this.curEl=f}},this);this.unframeTask=new Ext.util.DelayedTask(function(){if(this.initialized){this.sides[0].hide();this.sides[1].hide();this.sides[2].hide();this.sides[3].hide();this.curEl=null}},this);this.initialized=true}},frame:function(a){this.init();this.unframeTask.cancel();this.frameTask.delay(2,false,false,[a])},unframe:function(){this.init();this.unframeTask.delay(2)},setSize:function(a){this.size=a},setColor:function(a){this.color=a}});Ext.a11y.FocusFrame=new Ext.a11y.Frame(2,"15428B");Ext.a11y.RelayFrame=new Ext.a11y.Frame(1,"6B8CBF");Ext.a11y.Focusable=Ext.extend(Ext.util.Observable,{constructor:function(b,d,c,a){Ext.a11y.Focusable.superclass.constructor.call(this);this.addEvents("focus","blur","left","right","up","down","esc","enter","space");if(b instanceof Ext.Component){this.el=b.el;this.setComponent(b)}else{this.el=Ext.get(b);this.setComponent(null)}this.setRelayTo(d);this.setNoFrame(c);this.setFrameEl(a);this.init();Ext.a11y.FocusMgr.register(this)},init:function(){this.el.dom.tabIndex="1";this.el.addClass("x-a11y-focusable");this.el.on({focus:this.onFocus,blur:this.onBlur,keydown:this.onKeyDown,scope:this})},setRelayTo:function(a){this.relayTo=a?Ext.a11y.FocusMgr.get(a):null},setNoFrame:function(a){this.noFrame=(a===true)?true:false},setFrameEl:function(a){this.frameEl=a&&Ext.get(a)||this.el},setComponent:function(a){this.component=a||null},onKeyDown:function(g,d){var b=g.getKey(),a=Ext.a11y.Focusable.SpecialKeys,c,f;f=(d!==this.el.dom)?Ext.a11y.FocusMgr.get(d,true):this;if(!f){f=Ext.a11y.FocusMgr.get(Ext.fly(d).parent(".x-a11y-focusable"))}if(a[b]!==undefined){c=this.fireEvent(a[b],g,d,f,this)}if(c===false||this.fireEvent("keydown",g,d,f,this)===false){g.stopEvent()}},focus:function(){this.el.dom.focus()},blur:function(){this.el.dom.blur()},onFocus:function(b,a){this.el.addClass("x-a11y-focused");if(this.relayTo){this.relayTo.el.addClass("x-a11y-focused-relay");if(!this.relayTo.noFrame){Ext.a11y.FocusFrame.frame(this.relayTo.frameEl)}if(!this.noFrame){Ext.a11y.RelayFrame.frame(this.frameEl)}}else{if(!this.noFrame){Ext.a11y.FocusFrame.frame(this.frameEl)}}this.fireEvent("focus",b,a,this)},onBlur:function(b,a){if(this.relayTo){this.relayTo.el.removeClass("x-a11y-focused-relay");Ext.a11y.RelayFrame.unframe()}this.el.removeClass("x-a11y-focused");Ext.a11y.FocusFrame.unframe();this.fireEvent("blur",b,a,this)},destroy:function(){this.el.un("keydown",this.onKeyDown);this.el.un("focus",this.onFocus);this.el.un("blur",this.onBlur);this.el.removeClass("x-a11y-focusable");this.el.removeClass("x-a11y-focused");if(this.relayTo){this.relayTo.el.removeClass("x-a11y-focused-relay")}}});Ext.a11y.FocusItem=Ext.extend(Object,{constructor:function(b,a){Ext.a11y.FocusItem.superclass.constructor.call(this);this.el=Ext.get(b);this.fi=new Ext.a11y.Focusable(b);this.fi.setComponent(this);this.fi.on("tab",this.onTab,this);this.enableTabbing=a===true?true:false},getEnterItem:function(){if(this.enableTabbing){var a=this.getFocusItems();if(a&&a.length){return a[0]}}},getFocusItems:function(){if(this.enableTabbing){return this.el.query("a, button, input, select")}return null},onTab:function(d,c){var a=this.getFocusItems(),b;if(a&&a.length&&(b=a.indexOf(c))!==-1){if(d.shiftKey&&b>0){d.stopEvent();a[b-1].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}else{if(!d.shiftKey&&b<a.length-1){d.stopEvent();a[b+1].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}}}},focus:function(){if(this.enableTabbing){var a=this.getFocusItems();if(a&&a.length){a[0].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}}this.fi.focus()},blur:function(){this.fi.blur()}});Ext.a11y.FocusMgr=function(){var a=new Ext.util.MixedCollection();return{register:function(b){a.add(b.el&&Ext.id(b.el),b)},unregister:function(b){a.remove(b)},get:function(c,b){return a.get(Ext.id(c))||(b?false:new Ext.a11y.Focusable(c))},all:a}}();Ext.a11y.Focusable.SpecialKeys={};Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.LEFT]="left";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.RIGHT]="right";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.DOWN]="down";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.UP]="up";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ESC]="esc";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ENTER]="enter";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.SPACE]="space";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.TAB]="tab";Ext.util.Observable.observeClass(Ext.Component);Ext.Component.on("render",function(a){a.initFocus();a.initARIA()});Ext.override(Ext.Component,{initFocus:Ext.emptyFn,initARIA:Ext.emptyFn});Ext.override(Ext.Container,{isFocusable:true,noFocus:false,initFocus:function(){if(!this.fi&&!this.noFocus){this.fi=new Ext.a11y.Focusable(this)}this.mon(this.fi,{focus:this.onFocus,blur:this.onBlur,tab:this.onTab,enter:this.onEnter,esc:this.onEsc,scope:this});if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)},focus:function(){this.fi.focus()},blur:function(){this.fi.blur()},enter:function(){var a=this.getEnterItem();if(a){a.focus()}},onFocus:Ext.emptyFn,onBlur:Ext.emptyFn,onTab:function(f,b,d){var a=d.relayTo||d;if(a.component&&a.component!==this){f.stopEvent();var c=f.shiftKey?this.getPreviousFocus(a.component):this.getNextFocus(a.component);c.focus()}},onEnter:function(c,a,b){if(b.component&&b.component===this){c.stopEvent();this.enter()}c.stopPropagation()},onEsc:function(c,b){c.preventDefault();if(b===this.el.dom){if(this.ownerCt){this.ownerCt.focus()}}else{if(this.ownerCt&&this.ownerCt.isFocusable){var a=this.ownerCt.getFocusItems();if(a&&a.getCount()>1){c.stopEvent()}}this.focus()}},getFocusItems:function(){return this.items&&this.items.filterBy(function(a){return a.isFocusable})||null},getEnterItem:function(){var a=this.getFocusItems(),b=a?a.getCount():0;if(b===1){return a.first().getEnterItem&&a.first().getEnterItem()||a.first()}else{if(b>1){return a.first()}}},getNextFocus:function(e){var a=this.getFocusItems(),c=e,b=a.indexOf(e),d=a.getCount();if(b===d-1){c=a.first()}else{c=a.get(b+1)}return c},getPreviousFocus:function(e){var a=this.getFocusItems(),d=e,b=a.indexOf(e),c=a.getCount();if(b===0){d=a.last()}else{d=a.get(b-1)}return d},getFocusable:function(){return this.fi}});Ext.override(Ext.Panel,{getFocusItems:function(){var a=Ext.Panel.superclass.getFocusItems.call(this),b=null;if(!a){a=new Ext.util.MixedCollection();this.bodyFocus=this.bodyFocus||new Ext.a11y.FocusItem(this.body,this.enableTabbing);a.add("body",this.bodyFocus)}if(this.tbar&&this.topToolbar){a.insert(0,this.topToolbar)}if(this.bbar&&this.bottomToolbar){a.add(this.bottomToolbar)}if(this.fbar){a.add(this.fbar)}return a}});Ext.override(Ext.TabPanel,{initFocus:function(){Ext.TabPanel.superclass.initFocus.call(this);this.mon(this.fi,{left:this.onLeft,right:this.onRight,scope:this})},onLeft:function(b){if(!this.activeTab){return}b.stopEvent();var a=this.items.itemAt(this.items.indexOf(this.activeTab)-1);if(a){this.setActiveTab(a)}return false},onRight:function(b){if(!this.activeTab){return}b.stopEvent();var a=this.items.itemAt(this.items.indexOf(this.activeTab)+1);if(a){this.setActiveTab(a)}return false}});Ext.override(Ext.tree.TreeNodeUI,{focus:function(){this.node.getOwnerTree().bodyFocus.focus()}});Ext.override(Ext.tree.TreePanel,{afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}this.bodyFocus=new Ext.a11y.FocusItem(this.body.down(".x-tree-root-ct"));this.bodyFocus.fi.setFrameEl(this.body)}});Ext.override(Ext.grid.GridPanel,{initFocus:function(){Ext.grid.GridPanel.superclass.initFocus.call(this);this.bodyFocus=new Ext.a11y.FocusItem(this.view.focusEl);this.bodyFocus.fi.setFrameEl(this.body)}});Ext.override(Ext.Button,{isFocusable:true,noFocus:false,initFocus:function(){Ext.Button.superclass.initFocus.call(this);this.fi=this.fi||new Ext.a11y.Focusable(this.btnEl,null,null,this.el);this.fi.setComponent(this);this.mon(this.fi,{focus:this.onFocus,blur:this.onBlur,scope:this});if(this.menu){this.mon(this.fi,"down",this.showMenu,this);this.on("menuhide",this.focus,this)}if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)},focus:function(){this.fi.focus()},blur:function(){this.fi.blur()},onFocus:function(){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(){this.el.removeClass("x-btn-focus")}});Ext.override(Ext.Toolbar,{initFocus:function(){Ext.Toolbar.superclass.initFocus.call(this);this.mon(this.fi,{left:this.onLeft,right:this.onRight,scope:this});this.on("focus",this.onButtonFocus,this,{stopEvent:true})},addItem:function(a){Ext.Toolbar.superclass.add.apply(this,arguments);if(a.rendered&&a.fi!==undefined){a.fi.setRelayTo(this.el);this.relayEvents(a.fi,["focus"])}else{a.on("render",function(){if(a.fi!==undefined){a.fi.setRelayTo(this.el);this.relayEvents(a.fi,["focus"])}},this,{single:true})}return a},onFocus:function(){var a=this.getFocusItems();if(a&&a.getCount()>0){if(this.lastFocus&&a.indexOf(this.lastFocus)!==-1){this.lastFocus.focus()}else{a.first().focus()}}},onButtonFocus:function(c,a,b){this.lastFocus=b.component||null},onLeft:function(c,a,b){c.stopEvent();this.getPreviousFocus(b.component).focus()},onRight:function(c,a,b){c.stopEvent();this.getNextFocus(b.component).focus()},getEnterItem:Ext.emptyFn,onTab:Ext.emptyFn,onEsc:Ext.emptyFn});Ext.override(Ext.menu.BaseItem,{initFocus:function(){this.fi=new Ext.a11y.Focusable(this,this.parentMenu&&this.parentMenu.el||null,true)}});Ext.override(Ext.menu.Menu,{initFocus:function(){this.fi=new Ext.a11y.Focusable(this);this.focusEl=this.fi}});Ext.a11y.WindowMgr=new Ext.WindowGroup();Ext.apply(Ext.WindowMgr,{bringToFront:function(a){Ext.a11y.WindowMgr.bringToFront.call(this,a);if(a.modal){a.enter()}else{a.focus()}}});Ext.override(Ext.Window,{initFocus:function(){Ext.Window.superclass.initFocus.call(this);this.on("beforehide",function(){Ext.a11y.RelayFrame.unframe();Ext.a11y.FocusFrame.unframe()})}});Ext.override(Ext.form.Field,{isFocusable:true,noFocus:false,initFocus:function(){this.fi=this.fi||new Ext.a11y.Focusable(this,null,true);Ext.form.Field.superclass.initFocus.call(this);if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)}});Ext.override(Ext.FormPanel,{initFocus:function(){Ext.FormPanel.superclass.initFocus.call(this);this.on("focus",this.onFieldFocus,this,{stopEvent:true})},createForm:function(){delete this.initialConfig.listeners;var a=new Ext.form.BasicForm(null,this.initialConfig);a.afterMethod("add",this.formItemAdd,this);return a},formItemAdd:function(a){a.on("render",function(b){b.fi.setRelayTo(this.el);this.relayEvents(b.fi,["focus"])},this,{single:true})},onFocus:function(){var a=this.getFocusItems();if(a&&a.getCount()>0){if(this.lastFocus&&a.indexOf(this.lastFocus)!==-1){this.lastFocus.focus()}else{a.first().focus()}}},onFieldFocus:function(c,a,b){this.lastFocus=b.component||null},onTab:function(d,a,c){if(c.relayTo.component===this){var b=d.shiftKey?this.getPreviousFocus(c.component):this.getNextFocus(c.component);if(b){ev.stopEvent();b.focus();return}}Ext.FormPanel.superclass.onTab.apply(this,arguments)},getNextFocus:function(d){var a=this.getFocusItems(),b=a.indexOf(d),c=a.getCount();return(b<c-1)?a.get(b+1):false},getPreviousFocus:function(d){var a=this.getFocusItems(),b=a.indexOf(d),c=a.getCount();return(b>0)?a.get(b-1):false}});Ext.override(Ext.Viewport,{initFocus:function(){Ext.Viewport.superclass.initFocus.apply(this);this.mon(Ext.get(document),"focus",this.focus,this);this.mon(Ext.get(document),"blur",this.blur,this);this.fi.setNoFrame(true)},onTab:function(h,b,g,d){h.stopEvent();if(g===d){items=this.getFocusItems();if(items&&items.getCount()>0){items.first().focus()}}else{var a=g.relayTo||g;var c=h.shiftKey?this.getPreviousFocus(a.component):this.getNextFocus(a.component);c.focus()}}})})();Ext.ux.GMapPanel=Ext.extend(Ext.Panel,{initComponent:function(){var a={plain:true,zoomLevel:3,yaw:180,pitch:0,zoom:0,gmapType:"map",border:false};Ext.applyIf(this,a);Ext.ux.GMapPanel.superclass.initComponent.call(this)},afterRender:function(){var b=this.ownerCt.getSize();Ext.applyIf(this,b);Ext.ux.GMapPanel.superclass.afterRender.call(this);if(this.gmapType==="map"){this.gmap=new GMap2(this.body.dom)}if(this.gmapType==="panorama"){this.gmap=new GStreetviewPanorama(this.body.dom)}if(typeof this.addControl=="object"&&this.gmapType==="map"){this.gmap.addControl(this.addControl)}if(typeof this.setCenter==="object"){if(typeof this.setCenter.geoCodeAddr==="string"){this.geoCodeLookup(this.setCenter.geoCodeAddr)}else{if(this.gmapType==="map"){var a=new GLatLng(this.setCenter.lat,this.setCenter.lng);this.gmap.setCenter(a,this.zoomLevel)}if(typeof this.setCenter.marker==="object"&&typeof a==="object"){this.addMarker(a,this.setCenter.marker,this.setCenter.marker.clear)}}if(this.gmapType==="panorama"){this.gmap.setLocationAndPOV(new GLatLng(this.setCenter.lat,this.setCenter.lng),{yaw:this.yaw,pitch:this.pitch,zoom:this.zoom})}}GEvent.bind(this.gmap,"load",this,function(){this.onMapReady()})},onMapReady:function(){this.addMarkers(this.markers);this.addMapControls();this.addOptions()},onResize:function(a,b){if(typeof this.getMap()=="object"){this.gmap.checkResize()}Ext.ux.GMapPanel.superclass.onResize.call(this,a,b)},setSize:function(c,a,b){if(typeof this.getMap()=="object"){this.gmap.checkResize()}Ext.ux.GMapPanel.superclass.setSize.call(this,c,a,b)},getMap:function(){return this.gmap},getCenter:function(){return this.getMap().getCenter()},getCenterLatLng:function(){var a=this.getCenter();return{lat:a.lat(),lng:a.lng()}},addMarkers:function(c){if(Ext.isArray(c)){for(var b=0;b<c.length;b++){var a=new GLatLng(c[b].lat,c[b].lng);this.addMarker(a,c[b].marker,false,c[b].setCenter,c[b].listeners)}}},addMarker:function(c,d,b,a,e){Ext.applyIf(d,G_DEFAULT_ICON);if(b===true){this.getMap().clearOverlays()}if(a===true){this.getMap().setCenter(c,this.zoomLevel)}var f=new GMarker(c,d);if(typeof e==="object"){for(evt in e){GEvent.bind(f,evt,this,e[evt])}}this.getMap().addOverlay(f)},addMapControls:function(){if(this.gmapType==="map"){if(Ext.isArray(this.mapControls)){for(i=0;i<this.mapControls.length;i++){this.addMapControl(this.mapControls[i])}}else{if(typeof this.mapControls==="string"){this.addMapControl(this.mapControls)}else{if(typeof this.mapControls==="object"){this.getMap().addControl(this.mapControls)}}}}},addMapControl:function(b){var a=window[b];if(typeof a==="function"){this.getMap().addControl(new a())}},addOptions:function(){if(Ext.isArray(this.mapConfOpts)){var a;for(i=0;i<this.mapConfOpts.length;i++){this.addOption(this.mapConfOpts[i])}}else{if(typeof this.mapConfOpts==="string"){this.addOption(this.mapConfOpts)}}},addOption:function(b){var a=this.getMap()[b];if(typeof a==="function"){this.getMap()[b]()}},geoCodeLookup:function(a){this.geocoder=new GClientGeocoder();this.geocoder.getLocations(a,this.addAddressToMap.createDelegate(this))},addAddressToMap:function(a){if(!a||a.Status.code!=200){Ext.MessageBox.alert("Error","Code "+a.Status.code+" Error Returned")}else{place=a.Placemark[0];addressinfo=place.AddressDetails;accuracy=addressinfo.Accuracy;if(accuracy===0){Ext.MessageBox.alert("Unable to Locate Address","Unable to Locate the Address you provided")}else{if(accuracy<7){Ext.MessageBox.alert("Address Accuracy","The address provided has a low accuracy.<br><br>Level "+accuracy+" Accuracy (8 = Exact Match, 1 = Vague Match)")}else{point=new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);if(typeof this.setCenter.marker==="object"&&typeof point==="object"){this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear,true,this.setCenter.listeners)}}}}}});Ext.reg("gmappanel",Ext.ux.GMapPanel);Ext.ns("Ext.ux.grid");Ext.ux.grid.GroupSummary=Ext.extend(Ext.util.Observable,{constructor:function(a){Ext.apply(this,a);Ext.ux.grid.GroupSummary.superclass.constructor.call(this)},init:function(b){this.grid=b;this.cm=b.getColumnModel();this.view=b.getView();var a=this.view;a.doGroupEnd=this.doGroupEnd.createDelegate(this);a.afterMethod("onColumnWidthUpdated",this.doWidth,this);a.afterMethod("onAllColumnWidthsUpdated",this.doAllWidths,this);a.afterMethod("onColumnHiddenUpdated",this.doHidden,this);a.afterMethod("onUpdate",this.doUpdate,this);a.afterMethod("onRemove",this.doRemove,this);if(!this.rowTpl){this.rowTpl=new Ext.Template('<div class="x-grid3-summary-row" style="{tstyle}">','<table class="x-grid3-summary-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr></tbody>","</table></div>");this.rowTpl.disableFormats=true}this.rowTpl.compile();if(!this.cellTpl){this.cellTpl=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',"</td>");this.cellTpl.disableFormats=true}this.cellTpl.compile()},toggleSummaries:function(b){var a=this.grid.getGridEl();if(a){if(b===undefined){b=a.hasClass("x-grid-hide-summary")}a[b?"removeClass":"addClass"]("x-grid-hide-summary")}},renderSummary:function(d,h){h=h||this.view.getColumnData();var j=this.cm.config;var e=[],k,a={},b,l=h.length-1;for(var f=0,g=h.length;f<g;f++){k=h[f];b=j[f];a.id=k.id;a.style=k.style;a.css=f==0?"x-grid3-cell-first ":(f==l?"x-grid3-cell-last ":"");if(b.summaryType||b.summaryRenderer){a.value=(b.summaryRenderer||k.renderer)(d.data[k.name],a,d)}else{a.value=""}if(a.value==undefined||a.value===""){a.value="&#160;"}e[e.length]=this.cellTpl.apply(a)}return this.rowTpl.apply({tstyle:"width:"+this.view.getTotalWidth()+";",cells:e.join("")})},calculate:function(d,k){var g={},a,m,l=this.cm.config,b;for(var e=0,n=d.length;e<n;e++){a=d[e];for(var f=0,h=k.length;f<h;f++){m=k[f];b=l[f];if(b.summaryType){g[m.name]=Ext.ux.grid.GroupSummary.Calculations[b.summaryType](g[m.name]||0,a,m.name,g)}}}return g},doGroupEnd:function(a,d,b,f,c){var e=this.calculate(d.rs,b);a.push("</div>",this.renderSummary({data:e},b),"</div>")},doWidth:function(e,b,d){var c=this.view.getGroups(),g;for(var f=0,a=c.length;f<a;f++){g=c[f].childNodes[2];g.style.width=d;g.firstChild.style.width=d;g.firstChild.rows[0].childNodes[e].style.width=b}},doAllWidths:function(g,d){var a=this.view.getGroups(),k,h,e=g.length;for(var c=0,f=a.length;c<f;c++){k=a[c].childNodes[2];k.style.width=d;k.firstChild.style.width=d;h=k.firstChild.rows[0].childNodes;for(var b=0;b<e;b++){h[b].style.width=g[b]}}},doHidden:function(d,g,c){var b=this.view.getGroups(),f,h=g?"none":"";for(var e=0,a=b.length;e<a;e++){f=b[e].childNodes[2];f.style.width=c;f.firstChild.style.width=c;f.firstChild.rows[0].childNodes[d].style.display=h}},refreshSummary:function(a){return this.refreshSummaryById(this.view.getGroupId(a))},getSummaryNode:function(a){var b=Ext.fly(a,"_gsummary");if(b){return b.down(".x-grid3-summary-row",true)}return null},refreshSummaryById:function(d){var f=document.getElementById(d);if(!f){return false}var b=[];this.grid.store.each(function(g){if(g._groupId==d){b[b.length]=g}});var c=this.view.getColumnData();var h=this.calculate(b,c);var a=this.renderSummary({data:h},c);var e=this.getSummaryNode(d);if(e){f.removeChild(e)}Ext.DomHelper.append(f,a);return true},doUpdate:function(b,a){this.refreshSummaryById(a._groupId)},doRemove:function(d,a,b,c){if(!c){this.refreshSummaryById(a._groupId)}},showSummaryMsg:function(a,d){var b=this.view.getGroupId(a);var c=this.getSummaryNode(b);if(c){c.innerHTML='<div class="x-grid3-summary-msg">'+d+"</div>"}}});Ext.grid.GroupSummary=Ext.ux.grid.GroupSummary;Ext.ux.grid.GroupSummary.Calculations={sum:function(b,a,c){return b+(a.data[c]||0)},count:function(b,a,d,c){return c[d+"count"]?++c[d+"count"]:(c[d+"count"]=1)},max:function(c,b,e,d){var c=b.data[e];var a=d[e+"max"]===undefined?(d[e+"max"]=c):d[e+"max"];return c>a?(d[e+"max"]=c):a},min:function(b,a,e,d){var b=a.data[e];var c=d[e+"min"]===undefined?(d[e+"min"]=b):d[e+"min"];return b<c?(d[e+"min"]=b):c},average:function(b,a,f,e){var g=e[f+"count"]?++e[f+"count"]:(e[f+"count"]=1);var d=(e[f+"total"]=((e[f+"total"]||0)+(a.data[f]||0)));return d===0?0:d/g}};Ext.grid.GroupSummary.Calculations=Ext.ux.grid.GroupSummary.Calculations;Ext.ux.grid.HybridSummary=Ext.extend(Ext.ux.grid.GroupSummary,{calculate:function(b,d){var a=this.view.getGroupField();var c=b[0].data[a];var e=this.getSummaryData(c);return e||Ext.ux.grid.HybridSummary.superclass.calculate.call(this,b,d)},updateSummaryData:function(a,d,c){var b=this.grid.store.reader.jsonData;if(!b.summaryData){b.summaryData={}}b.summaryData[a]=d;if(!c){this.refreshSummary(a)}},getSummaryData:function(a){var b=this.grid.store.reader.jsonData;if(b&&b.summaryData){return b.summaryData[a]}return null}});Ext.grid.HybridSummary=Ext.ux.grid.HybridSummary;Ext.ux.GroupTab=Ext.extend(Ext.Container,{mainItem:0,expanded:true,deferredRender:true,activeTab:null,idDelimiter:"__",headerAsText:false,frame:false,hideBorders:true,initComponent:function(a){Ext.apply(this,a);this.frame=false;Ext.ux.GroupTab.superclass.initComponent.call(this);this.addEvents("activate","deactivate","changemainitem","beforetabchange","tabchange");this.setLayout(new Ext.layout.CardLayout({deferredRender:this.deferredRender}));if(!this.stack){this.stack=Ext.TabPanel.AccessStack()}this.initItems();this.on("beforerender",function(){this.groupEl=this.ownerCt.getGroupEl(this)},this);this.on("add",this.onAdd,this,{target:this});this.on("remove",this.onRemove,this,{target:this});if(this.mainItem!==undefined){var b=(typeof this.mainItem=="object")?this.mainItem:this.items.get(this.mainItem);delete this.mainItem;this.setMainItem(b)}},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&&this.activeTab!=this.mainItem){var a=this.getTabEl(this.activeTab);if(a){Ext.fly(a).removeClass("x-grouptabs-strip-active")}this.activeTab.fireEvent("deactivate",this.activeTab)}var b=this.getTabEl(c);Ext.fly(b).addClass("x-grouptabs-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)}},getTabEl:function(a){if(a==this.mainItem){return this.groupEl}return Ext.TabPanel.prototype.getTabEl.call(this,a)},onRender:function(b,a){Ext.ux.GroupTab.superclass.onRender.call(this,b,a);this.strip=Ext.fly(this.groupEl).createChild({tag:"ul",cls:"x-grouptabs-sub"});this.tooltip=new Ext.ToolTip({target:this.groupEl,delegate:"a.x-grouptabs-text",trackMouse:true,renderTo:document.body,listeners:{beforeshow:function(e){var d=(e.triggerElement.parentNode===this.mainItem.tabEl)?this.mainItem:this.findById(e.triggerElement.parentNode.id.split(this.idDelimiter)[1]);if(!d.tabTip){return false}e.body.dom.innerHTML=d.tabTip},scope:this}});if(!this.itemTpl){var c=new Ext.Template('<li class="{cls}" id="{id}">','<a onclick="return false;" class="x-grouptabs-text {iconCls}">{text}</a>',"</li>");c.disableFormats=true;c.compile();Ext.ux.GroupTab.prototype.itemTpl=c}this.items.each(this.initTab,this)},afterRender:function(){Ext.ux.GroupTab.superclass.afterRender.call(this);if(this.activeTab!==undefined){var a=(typeof this.activeTab=="object")?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initTab:function(c,a){var d=this.strip.dom.childNodes[a];var e=Ext.TabPanel.prototype.getTemplateArgs.call(this,c);if(c===this.mainItem){c.tabEl=this.groupEl;e.cls+=" x-grouptabs-main-item"}var b=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);c.tabEl=c.tabEl||b;c.on("disable",this.onItemDisabled,this);c.on("enable",this.onItemEnabled,this);c.on("titlechange",this.onItemTitleChanged,this);c.on("iconchange",this.onItemIconChanged,this);c.on("beforeshow",this.onBeforeShowItem,this)},setMainItem:function(a){a=this.getComponent(a);if(!a||this.fireEvent("changemainitem",this,a,this.mainItem)===false){return}this.mainItem=a},getMainItem:function(){return this.mainItem||null},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onAdd:function(a,c,b){if(this.rendered){this.initTab.call(this,c,b)}},onRemove:function(c,b){Ext.destroy(Ext.get(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("iconchange",this.onItemIconChanged,this);b.un("beforeshow",this.onBeforeShowItem,this);if(b==this.activeTab){var a=this.stack.next();if(a){this.setActiveTab(a)}else{if(this.items.getCount()>0){this.setActiveTab(0)}else{this.activeTab=null}}}},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)},onItemDisabled:Ext.TabPanel.prototype.onItemDisabled,onItemEnabled:Ext.TabPanel.prototype.onItemEnabled,onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("a.x-grouptabs-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){Ext.fly(b).child("a.x-grouptabs-text").replaceClass(c,a)}},beforeDestroy:function(){Ext.TabPanel.prototype.beforeDestroy.call(this);this.tooltip.destroy()}});Ext.reg("grouptab",Ext.ux.GroupTab);Ext.ns("Ext.ux");Ext.ux.GroupTabPanel=Ext.extend(Ext.TabPanel,{tabPosition:"left",alternateColor:false,alternateCls:"x-grouptabs-panel-alt",defaultType:"grouptab",deferredRender:false,activeGroup:null,initComponent:function(){Ext.ux.GroupTabPanel.superclass.initComponent.call(this);this.addEvents("beforegroupchange","groupchange");this.elements="body,header";this.stripTarget="header";this.tabPosition=this.tabPosition=="right"?"right":"left";this.addClass("x-grouptabs-panel");if(this.tabStyle&&this.tabStyle!=""){this.addClass("x-grouptabs-panel-"+this.tabStyle)}if(this.alternateColor){this.addClass(this.alternateCls)}this.on("beforeadd",function(b,c,a){this.initGroup(c,a)})},initEvents:function(){this.mon(this.strip,"mousedown",this.onStripMouseDown,this)},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var f=this.tabPosition=="top"?"header":"footer";this[f].addClass("x-tab-panel-"+f+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap ",cn:{tag:"ul",cls:"x-grouptabs-strip x-grouptabs-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.header.addClass("x-grouptabs-panel-header");this.bwrap.addClass("x-grouptabs-bwrap");this.body.addClass("x-tab-panel-body-"+this.tabPosition+" x-grouptabs-panel-body");if(!this.itemTpl){var d=new Ext.Template('<li class="{cls}" id="{id}">','<a class="x-grouptabs-expand" onclick="return false;"></a>','<a class="x-grouptabs-text {iconCls}" href="#" onclick="return false;">',"<span>{text}</span></a>","</li>");d.disableFormats=true;d.compile();Ext.ux.GroupTabPanel.prototype.itemTpl=d}this.items.each(this.initGroup,this)},afterRender:function(){Ext.ux.GroupTabPanel.superclass.afterRender.call(this);this.tabJoint=Ext.fly(this.body.dom.parentNode).createChild({cls:"x-tab-joint"});this.addClass("x-tab-panel-"+this.tabPosition);this.header.setWidth(this.tabWidth);if(this.activeGroup!==undefined){var a=(typeof this.activeGroup=="object")?this.activeGroup:this.items.get(this.activeGroup);delete this.activeGroup;this.setActiveGroup(a);a.setActiveTab(a.getMainItem())}},getGroupEl:Ext.TabPanel.prototype.getTabEl,findTargets:function(c){var b=null;var a=c.getTarget("li",this.strip);if(a){b=this.findById(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{expand:null,item:null,el:null}}}return{expand:c.getTarget(".x-grouptabs-expand",this.strip),isGroup:!c.getTarget("ul.x-grouptabs-sub",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!=0){return}b.preventDefault();var a=this.findTargets(b);if(a.expand){this.toggleGroup(a.el)}else{if(a.item){if(a.isGroup){a.item.setActiveTab(a.item.getMainItem())}else{a.item.ownerCt.setActiveTab(a.item)}}}},expandGroup:function(a){if(a.isXType){a=this.getGroupEl(a)}Ext.fly(a).addClass("x-grouptabs-expanded")},toggleGroup:function(a){if(a.isXType){a=this.getGroupEl(a)}Ext.fly(a).toggleClass("x-grouptabs-expanded");this.syncTabJoint()},syncTabJoint:function(b){if(!this.tabJoint){return}b=b||this.getGroupEl(this.activeGroup);if(b){this.tabJoint.setHeight(Ext.fly(b).getHeight()-2);var a=Ext.isGecko2?0:1;if(this.tabPosition=="left"){this.tabJoint.alignTo(b,"tl-tr",[-2,a])}else{this.tabJoint.alignTo(b,"tr-tl",[1,a])}}else{this.tabJoint.hide()}},getActiveTab:function(){if(!this.activeGroup){return null}return this.activeGroup.getTabEl(this.activeGroup.activeTab)||null},onResize:function(){Ext.ux.GroupTabPanel.superclass.onResize.apply(this,arguments);this.syncTabJoint()},createCorner:function(a,b){return Ext.fly(a).createChild({cls:"x-grouptabs-corner x-grouptabs-corner-"+b})},initGroup:function(f,b){var d=this.strip.dom.childNodes[b];var e=this.getTemplateArgs(f);if(b===0){e.cls+=" x-tab-first"}e.cls+=" x-grouptabs-main";e.text=f.getMainItem().title;var c=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);var a=this.createCorner(c,"top-"+this.tabPosition);var g=this.createCorner(c,"bottom-"+this.tabPosition);if(f.expanded){this.expandGroup(c)}if(Ext.isIE6||(Ext.isIE&&!Ext.isStrict)){g.setLeft("-10px");g.setBottom("-5px");a.setLeft("-10px");a.setTop("-5px")}this.mon(f,"changemainitem",this.onGroupChangeMainItem,this);this.mon(f,"beforetabchange",this.onGroupBeforeTabChange,this)},setActiveGroup:function(b){b=this.getComponent(b);if(!b||this.fireEvent("beforegroupchange",this,b,this.activeGroup)===false){return}if(!this.rendered){this.activeGroup=b;return}if(this.activeGroup!=b){if(this.activeGroup){var a=this.getGroupEl(this.activeGroup);if(a){Ext.fly(a).removeClass("x-grouptabs-strip-active")}this.activeGroup.fireEvent("deactivate",this.activeTab)}var c=this.getGroupEl(b);Ext.fly(c).addClass("x-grouptabs-strip-active");this.activeGroup=b;this.stack.add(b);this.layout.setActiveItem(b);this.syncTabJoint(c);b.fireEvent("activate",b);this.fireEvent("groupchange",this,b)}},onGroupBeforeTabChange:function(a,c,b){if(a!==this.activeGroup||c!==b){this.strip.select(".x-grouptabs-sub > li.x-grouptabs-strip-active",true).removeClass("x-grouptabs-strip-active")}this.expandGroup(this.getGroupEl(a));this.setActiveGroup(a)},getFrameHeight:function(){var a=this.el.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);return a},adjustBodyWidth:function(a){return a-this.tabWidth}});Ext.reg("grouptabpanel",Ext.ux.GroupTabPanel);Ext.ux.form.ItemSelector=Ext.extend(Ext.form.Field,{hideNavIcons:false,imagePath:"",iconUp:"up2.gif",iconDown:"down2.gif",iconLeft:"left2.gif",iconRight:"right2.gif",iconTop:"top2.gif",iconBottom:"bottom2.gif",drawUpIcon:true,drawDownIcon:true,drawLeftIcon:true,drawRightIcon:true,drawTopIcon:true,drawBotIcon:true,delimiter:",",bodyStyle:null,border:false,defaultAutoCreate:{tag:"div"},multiselects:null,initComponent:function(){Ext.ux.form.ItemSelector.superclass.initComponent.call(this);this.addEvents({rowdblclick:true,change:true})},onRender:function(d,a){Ext.ux.form.ItemSelector.superclass.onRender.call(this,d,a);var h=[{legend:"Available",draggable:true,droppable:true,width:100,height:100},{legend:"Selected",droppable:true,draggable:true,width:100,height:100}];this.fromMultiselect=new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[0],h[0]));this.fromMultiselect.on("dblclick",this.onRowDblClick,this);this.toMultiselect=new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[1],h[1]));this.toMultiselect.on("dblclick",this.onRowDblClick,this);var g=new Ext.Panel({bodyStyle:this.bodyStyle,border:this.border,layout:"table",layoutConfig:{columns:3}});g.add(this.fromMultiselect);var c=new Ext.Panel({header:false});g.add(c);g.add(this.toMultiselect);g.render(this.el);c.el.down("."+c.bwrapCls).remove();if(this.imagePath!=""&&this.imagePath.charAt(this.imagePath.length-1)!="/"){this.imagePath+="/"}this.iconUp=this.imagePath+(this.iconUp||"up2.gif");this.iconDown=this.imagePath+(this.iconDown||"down2.gif");this.iconLeft=this.imagePath+(this.iconLeft||"left2.gif");this.iconRight=this.imagePath+(this.iconRight||"right2.gif");this.iconTop=this.imagePath+(this.iconTop||"top2.gif");this.iconBottom=this.imagePath+(this.iconBottom||"bottom2.gif");var f=c.getEl();this.toTopIcon=f.createChild({tag:"img",src:this.iconTop,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.upIcon=f.createChild({tag:"img",src:this.iconUp,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.addIcon=f.createChild({tag:"img",src:this.iconRight,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.removeIcon=f.createChild({tag:"img",src:this.iconLeft,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.downIcon=f.createChild({tag:"img",src:this.iconDown,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.toBottomIcon=f.createChild({tag:"img",src:this.iconBottom,style:{cursor:"pointer",margin:"2px"}});this.toTopIcon.on("click",this.toTop,this);this.upIcon.on("click",this.up,this);this.downIcon.on("click",this.down,this);this.toBottomIcon.on("click",this.toBottom,this);this.addIcon.on("click",this.fromTo,this);this.removeIcon.on("click",this.toFrom,this);if(!this.drawUpIcon||this.hideNavIcons){this.upIcon.dom.style.display="none"}if(!this.drawDownIcon||this.hideNavIcons){this.downIcon.dom.style.display="none"}if(!this.drawLeftIcon||this.hideNavIcons){this.addIcon.dom.style.display="none"}if(!this.drawRightIcon||this.hideNavIcons){this.removeIcon.dom.style.display="none"}if(!this.drawTopIcon||this.hideNavIcons){this.toTopIcon.dom.style.display="none"}if(!this.drawBotIcon||this.hideNavIcons){this.toBottomIcon.dom.style.display="none"}var b=g.body.first();this.el.setWidth(g.body.first().getWidth());g.body.removeClass();this.hiddenName=this.name;var e={tag:"input",type:"hidden",value:"",name:this.name};this.hiddenField=this.el.createChild(e)},doLayout:function(){if(this.rendered){this.fromMultiselect.fs.doLayout();this.toMultiselect.fs.doLayout()}},afterRender:function(){Ext.ux.form.ItemSelector.superclass.afterRender.call(this);this.toStore=this.toMultiselect.store;this.toStore.on("add",this.valueChanged,this);this.toStore.on("remove",this.valueChanged,this);this.toStore.on("load",this.valueChanged,this);this.valueChanged(this.toStore)},toTop:function(){var c=this.toMultiselect.view.getSelectedIndexes();var a=[];if(c.length>0){c.sort();for(var b=0;b<c.length;b++){record=this.toMultiselect.view.store.getAt(c[b]);a.push(record)}c=[];for(var b=a.length-1;b>-1;b--){record=a[b];this.toMultiselect.view.store.remove(record);this.toMultiselect.view.store.insert(0,record);c.push(((a.length-1)-b))}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(c)},toBottom:function(){var c=this.toMultiselect.view.getSelectedIndexes();var a=[];if(c.length>0){c.sort();for(var b=0;b<c.length;b++){record=this.toMultiselect.view.store.getAt(c[b]);a.push(record)}c=[];for(var b=0;b<a.length;b++){record=a[b];this.toMultiselect.view.store.remove(record);this.toMultiselect.view.store.add(record);c.push((this.toMultiselect.view.store.getCount())-(a.length-b))}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(c)},up:function(){var a=null;var c=this.toMultiselect.view.getSelectedIndexes();c.sort();var d=[];if(c.length>0){for(var b=0;b<c.length;b++){a=this.toMultiselect.view.store.getAt(c[b]);if((c[b]-1)>=0){this.toMultiselect.view.store.remove(a);this.toMultiselect.view.store.insert(c[b]-1,a);d.push(c[b]-1)}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(d)}},down:function(){var a=null;var c=this.toMultiselect.view.getSelectedIndexes();c.sort();c.reverse();var d=[];if(c.length>0){for(var b=0;b<c.length;b++){a=this.toMultiselect.view.store.getAt(c[b]);if((c[b]+1)<this.toMultiselect.view.store.getCount()){this.toMultiselect.view.store.remove(a);this.toMultiselect.view.store.insert(c[b]+1,a);d.push(c[b]+1)}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(d)}},fromTo:function(){var e=this.fromMultiselect.view.getSelectedIndexes();var b=[];if(e.length>0){for(var d=0;d<e.length;d++){record=this.fromMultiselect.view.store.getAt(e[d]);b.push(record)}if(!this.allowDup){e=[]}for(var d=0;d<b.length;d++){record=b[d];if(this.allowDup){var a=new Ext.data.Record();record.id=a.id;delete a;this.toMultiselect.view.store.add(record)}else{this.fromMultiselect.view.store.remove(record);this.toMultiselect.view.store.add(record);e.push((this.toMultiselect.view.store.getCount()-1))}}}this.toMultiselect.view.refresh();this.fromMultiselect.view.refresh();var c=this.toMultiselect.store.sortInfo;if(c){this.toMultiselect.store.sort(c.field,c.direction)}this.toMultiselect.view.select(e)},toFrom:function(){var d=this.toMultiselect.view.getSelectedIndexes();var a=[];if(d.length>0){for(var c=0;c<d.length;c++){record=this.toMultiselect.view.store.getAt(d[c]);a.push(record)}d=[];for(var c=0;c<a.length;c++){record=a[c];this.toMultiselect.view.store.remove(record);if(!this.allowDup){this.fromMultiselect.view.store.add(record);d.push((this.fromMultiselect.view.store.getCount()-1))}}}this.fromMultiselect.view.refresh();this.toMultiselect.view.refresh();var b=this.fromMultiselect.store.sortInfo;if(b){this.fromMultiselect.store.sort(b.field,b.direction)}this.fromMultiselect.view.select(d)},valueChanged:function(c){var a=null;var b=[];for(var d=0;d<c.getCount();d++){a=c.getAt(d);b.push(a.get(this.toMultiselect.valueField))}this.hiddenField.dom.value=b.join(this.delimiter);this.fireEvent("change",this,this.getValue(),this.hiddenField.dom.value)},getValue:function(){return this.hiddenField.dom.value},onRowDblClick:function(c,a,b,d){if(c==this.toMultiselect.view){this.toFrom()}else{if(c==this.fromMultiselect.view){this.fromTo()}}return this.fireEvent("rowdblclick",c,a,b,d)},reset:function(){range=this.toMultiselect.store.getRange();this.toMultiselect.store.removeAll();this.fromMultiselect.store.add(range);var a=this.fromMultiselect.store.sortInfo;if(a){this.fromMultiselect.store.sort(a.field,a.direction)}this.valueChanged(this.toMultiselect.store)}});Ext.reg("itemselector",Ext.ux.form.ItemSelector);Ext.ux.ItemSelector=Ext.ux.form.ItemSelector;Ext.ns("Ext.ux.form");Ext.ux.form.MultiSelect=Ext.extend(Ext.form.Field,{ddReorder:false,appendOnly:false,width:100,height:100,displayField:0,valueField:1,allowBlank:true,minSelections:0,maxSelections:Number.MAX_VALUE,blankText:Ext.form.TextField.prototype.blankText,minSelectionsText:"Minimum {0} item(s) required",maxSelectionsText:"Maximum {0} item(s) allowed",delimiter:",",defaultAutoCreate:{tag:"div"},initComponent:function(){Ext.ux.form.MultiSelect.superclass.initComponent.call(this);if(Ext.isArray(this.store)){if(Ext.isArray(this.store[0])){this.store=new Ext.data.ArrayStore({fields:["value","text"],data:this.store});this.valueField="value"}else{this.store=new Ext.data.ArrayStore({fields:["text"],data:this.store,expandData:true});this.valueField="text"}this.displayField="text"}else{this.store=Ext.StoreMgr.lookup(this.store)}this.addEvents({dblclick:true,click:true,change:true,drop:true})},onRender:function(c,b){Ext.ux.form.MultiSelect.superclass.onRender.call(this,c,b);var a=this.fs=new Ext.form.FieldSet({renderTo:this.el,title:this.legend,height:this.height,width:this.width,style:"padding:0;",tbar:this.tbar,bodyStyle:"overflow: auto;"});this.view=new Ext.ListView({multiSelect:true,store:this.store,columns:[{header:"Value",width:1,dataIndex:this.displayField}],hideHeaders:true});a.add(this.view);this.view.on("click",this.onViewClick,this);this.view.on("beforeclick",this.onViewBeforeClick,this);this.view.on("dblclick",this.onViewDblClick,this);this.hiddenName=this.name||Ext.id();var d={tag:"input",type:"hidden",value:"",name:this.hiddenName};this.hiddenField=this.el.createChild(d);this.hiddenField.dom.disabled=this.hiddenName!=this.name;a.doLayout()},afterRender:function(){Ext.ux.form.MultiSelect.superclass.afterRender.call(this);if(this.ddReorder&&!this.dragGroup&&!this.dropGroup){this.dragGroup=this.dropGroup="MultiselectDD-"+Ext.id()}if(this.draggable||this.dragGroup){this.dragZone=new Ext.ux.form.MultiSelect.DragZone(this,{ddGroup:this.dragGroup})}if(this.droppable||this.dropGroup){this.dropZone=new Ext.ux.form.MultiSelect.DropZone(this,{ddGroup:this.dropGroup})}},onViewClick:function(c,a,b,d){this.fireEvent("change",this,this.getValue(),this.hiddenField.dom.value);this.hiddenField.dom.value=this.getValue();this.fireEvent("click",this,d);this.validate()},onViewBeforeClick:function(c,a,b,d){if(this.disabled){return false}},onViewDblClick:function(c,a,b,d){return this.fireEvent("dblclick",c,a,b,d)},getValue:function(a){var d=[];var c=this.view.getSelectedIndexes();if(c.length==0){return""}for(var b=0;b<c.length;b++){d.push(this.store.getAt(c[b]).get((a!=null)?a:this.valueField))}return d.join(this.delimiter)},setValue:function(a){var b;var d=[];this.view.clearSelections();this.hiddenField.dom.value="";if(!a||(a=="")){return}if(!Ext.isArray(a)){a=a.split(this.delimiter)}for(var c=0;c<a.length;c++){b=this.view.store.indexOf(this.view.store.query(this.valueField,new RegExp("^"+a[c]+"$","i")).itemAt(0));d.push(b)}this.view.select(d);this.hiddenField.dom.value=this.getValue();this.validate()},reset:function(){this.setValue("")},getRawValue:function(a){var b=this.getValue(a);if(b.length){b=b.split(this.delimiter)}else{b=[]}return b},setRawValue:function(a){setValue(a)},validateValue:function(a){if(a.length<1){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(a.length<this.minSelections){this.markInvalid(String.format(this.minSelectionsText,this.minSelections));return false}if(a.length>this.maxSelections){this.markInvalid(String.format(this.maxSelectionsText,this.maxSelections));return false}return true},disable:function(){this.disabled=true;this.hiddenField.dom.disabled=true;this.fs.disable()},enable:function(){this.disabled=false;this.hiddenField.dom.disabled=false;this.fs.enable()},destroy:function(){Ext.destroy(this.fs,this.dragZone,this.dropZone);Ext.ux.form.MultiSelect.superclass.destroy.call(this)}});Ext.reg("multiselect",Ext.ux.form.MultiSelect);Ext.ux.Multiselect=Ext.ux.form.MultiSelect;Ext.ux.form.MultiSelect.DragZone=function(d,c){this.ms=d;this.view=d.view;var b=c.ddGroup||"MultiselectDD";var a;if(Ext.isArray(b)){a=b.shift()}else{a=b;b=null}Ext.ux.form.MultiSelect.DragZone.superclass.constructor.call(this,this.ms.fs.body,{containerScroll:true,ddGroup:a});this.setDraggable(b)};Ext.extend(Ext.ux.form.MultiSelect.DragZone,Ext.dd.DragZone,{onInitDrag:function(a,c){var b=Ext.get(this.dragData.ddel.cloneNode(true));this.proxy.update(b.dom);b.setWidth(b.child("em").getWidth());this.onStartDrag(a,c);return true},collectSelection:function(b){b.repairXY=Ext.fly(this.view.getSelectedNodes()[0]).getXY();var a=0;this.view.store.each(function(d){if(this.view.isSelected(a)){var e=this.view.getNode(a);var c=e.cloneNode(true);c.id=Ext.id();b.ddel.appendChild(c);b.records.push(this.view.store.getAt(a));b.viewNodes.push(e)}a++},this)},onEndDrag:function(a,b){var c=Ext.get(this.dragData.ddel);if(c&&c.hasClass("multi-proxy")){c.remove()}},getDragData:function(d){var c=this.view.findItemFromChild(d.getTarget());if(c){if(!this.view.isSelected(c)&&!d.ctrlKey&&!d.shiftKey){this.view.select(c);this.ms.setValue(this.ms.getValue())}if(this.view.getSelectionCount()==0||d.ctrlKey||d.shiftKey){return false}var b={sourceView:this.view,viewNodes:[],records:[]};if(this.view.getSelectionCount()==1){var a=this.view.getSelectedIndexes()[0];var f=this.view.getNode(a);b.viewNodes.push(b.ddel=f);b.records.push(this.view.store.getAt(a));b.repairXY=Ext.fly(f).getXY()}else{b.ddel=document.createElement("div");b.ddel.className="multi-proxy";this.collectSelection(b)}return b}return false},getRepairXY:function(a){return this.dragData.repairXY},setDraggable:function(a){if(!a){return}if(Ext.isArray(a)){Ext.each(a,this.setDraggable,this);return}this.addToGroup(a)}});Ext.ux.form.MultiSelect.DropZone=function(d,c){this.ms=d;this.view=d.view;var b=c.ddGroup||"MultiselectDD";var a;if(Ext.isArray(b)){a=b.shift()}else{a=b;b=null}Ext.ux.form.MultiSelect.DropZone.superclass.constructor.call(this,this.ms.fs.body,{containerScroll:true,ddGroup:a});this.setDroppable(b)};Ext.extend(Ext.ux.form.MultiSelect.DropZone,Ext.dd.DropZone,{getTargetFromEvent:function(b){var a=b.getTarget();return a},getDropPoint:function(g,k,d){if(k==this.ms.fs.body.dom){return"below"}var f=Ext.lib.Dom.getY(k),a=f+k.offsetHeight;var j=f+(a-f)/2;var h=Ext.lib.Event.getPageY(g);if(h<=j){return"above"}else{return"below"}},isValidDropPoint:function(b,e,a){if(!a.viewNodes||(a.viewNodes.length!=1)){return true}var c=a.viewNodes[0];if(c==e){return false}if((b=="below")&&(e.nextSibling==c)){return false}if((b=="above")&&(e.previousSibling==c)){return false}return true},onNodeEnter:function(d,a,c,b){return false},onNodeOver:function(h,a,g,d){var b=this.dropNotAllowed;var f=this.getDropPoint(g,h,a);if(this.isValidDropPoint(f,h,d)){if(this.ms.appendOnly){return"x-tree-drop-ok-below"}if(f){var c;if(f=="above"){b=h.previousSibling?"x-tree-drop-ok-between":"x-tree-drop-ok-above";c="x-view-drag-insert-above"}else{b=h.nextSibling?"x-tree-drop-ok-between":"x-tree-drop-ok-below";c="x-view-drag-insert-below"}if(this.lastInsertClass!=c){Ext.fly(h).replaceClass(this.lastInsertClass,c);this.lastInsertClass=c}}}return b},onNodeOut:function(d,a,c,b){this.removeDropIndicators(d)},onNodeDrop:function(b,k,j,g){if(this.ms.fireEvent("drop",this,b,k,j,g)===false){return false}var l=this.getDropPoint(j,b,k);if(b!=this.ms.fs.body.dom){b=this.view.findItemFromChild(b)}var c=(this.ms.appendOnly||(b==this.ms.fs.body.dom))?this.view.store.getCount():this.view.indexOf(b);if(l=="below"){c++}var d=false;if(g.sourceView==this.view){if(l=="below"){if(g.viewNodes[0]==b){g.viewNodes.shift()}}else{if(g.viewNodes[g.viewNodes.length-1]==b){g.viewNodes.pop()}}if(!g.viewNodes.length){return false}if(c>this.view.store.indexOf(g.records[0])){d="down";c--}}for(var h=0;h<g.records.length;h++){var a=g.records[h];if(g.sourceView){g.sourceView.store.remove(a)}this.view.store.insert(d=="down"?c:c++,a);var f=this.view.store.sortInfo;if(f){this.view.store.sort(f.field,f.direction)}}return true},removeDropIndicators:function(a){if(a){Ext.fly(a).removeClass(["x-view-drag-insert-above","x-view-drag-insert-left","x-view-drag-insert-right","x-view-drag-insert-below"]);this.lastInsertClass="_noclass"}},setDroppable:function(a){if(!a){return}if(Ext.isArray(a)){Ext.each(a,this.setDroppable,this);return}this.addToGroup(a)}});if(!Array.prototype.map){Array.prototype.map=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var e=new Array(a);var d=arguments[1];for(var c=0;c<a;c++){if(c in this){e[c]=b.call(d,this[c],c,this)}}return e}}Ext.ns("Ext.ux.data");Ext.ux.data.PagingMemoryProxy=Ext.extend(Ext.data.MemoryProxy,{constructor:function(a){Ext.ux.data.PagingMemoryProxy.superclass.constructor.call(this);this.data=a},doRequest:function(c,d,b,f,j,k,l){b=b||{};var m;try{m=f.readRecords(this.data)}catch(g){this.fireEvent("loadexception",this,l,null,g);j.call(k,null,l,false);return}if(b.filter!==undefined){m.records=m.records.filter(function(n){if(typeof(n)=="object"){var e=b.filterCol||0;return String(n.data[e]).match(b.filter)?true:false}else{return String(n).match(b.filter)?true:false}});m.totalRecords=m.records.length}if(b.sort!==undefined){var a=String(b.dir).toUpperCase()=="DESC"?-1:1;var h=function(n,e){return n<e};m.records.sort(function(n,e){var o=0;if(typeof(n)=="object"){o=h(n.data[b.sort],e.data[b.sort])*a}else{o=h(n,e)*a}if(o==0){o=(n.index<e.index?-1:1)}return o})}if(b.start!==undefined&&b.limit!==undefined){m.records=m.records.slice(b.start,b.start+b.limit)}j.call(k,m,l,true)}});Ext.data.PagingMemoryProxy=Ext.ux.data.PagingMemoryProxy;Ext.ux.PanelResizer=Ext.extend(Ext.util.Observable,{minHeight:0,maxHeight:10000000,constructor:function(a){Ext.apply(this,a);this.events={};Ext.ux.PanelResizer.superclass.constructor.call(this,a)},init:function(a){this.panel=a;if(this.panel.elements.indexOf("footer")==-1){a.elements+=",footer"}a.on("render",this.onRender,this)},onRender:function(a){this.handle=a.footer.createChild({cls:"x-panel-resize"});this.tracker=new Ext.dd.DragTracker({onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.handle);a.on("beforedestroy",this.tracker.destroy,this.tracker)},onDragStart:function(a){this.dragging=true;this.startHeight=this.panel.el.getHeight();this.fireEvent("dragstart",this,a)},onDrag:function(a){this.panel.setHeight((this.startHeight-this.tracker.getOffset()[1]).constrain(this.minHeight,this.maxHeight));this.fireEvent("drag",this,a)},onDragEnd:function(a){this.dragging=false;this.fireEvent("dragend",this,a)}});Ext.preg("panelresizer",Ext.ux.PanelResizer);Ext.ux.Portal=Ext.extend(Ext.Panel,{layout:"column",autoScroll:true,cls:"x-portal",defaultType:"portalcolumn",initComponent:function(){Ext.ux.Portal.superclass.initComponent.call(this);this.addEvents({validatedrop:true,beforedragover:true,dragover:true,beforedrop:true,drop:true})},initEvents:function(){Ext.ux.Portal.superclass.initEvents.call(this);this.dd=new Ext.ux.Portal.DropZone(this,this.dropConfig)},beforeDestroy:function(){if(this.dd){this.dd.unreg()}Ext.ux.Portal.superclass.beforeDestroy.call(this)}});Ext.reg("portal",Ext.ux.Portal);Ext.ux.Portal.DropZone=function(a,b){this.portal=a;Ext.dd.ScrollManager.register(a.body);Ext.ux.Portal.DropZone.superclass.constructor.call(this,a.bwrap.dom,b);a.body.ddScrollConfig=this.ddScrollConfig};Ext.extend(Ext.ux.Portal.DropZone,Ext.dd.DropTarget,{ddScrollConfig:{vthresh:50,hthresh:-1,animate:true,increment:200},createEvent:function(a,f,d,b,h,g){return{portal:this.portal,panel:d.panel,columnIndex:b,column:h,position:g,data:d,source:a,rawEvent:f,status:this.dropAllowed}},notifyOver:function(w,u,x){var f=u.getXY(),a=this.portal,o=w.proxy;if(!this.grid){this.grid=this.getGrid()}var b=a.body.dom.clientWidth;if(!this.lastCW){this.lastCW=b}else{if(this.lastCW!=b){this.lastCW=b;a.doLayout();this.grid=this.getGrid()}}var d=0,m=this.grid.columnX,n=false;for(var t=m.length;d<t;d++){if(f[0]<(m[d].x+m[d].w)){n=true;break}}if(!n){d--}var r,l=false,j=0,v=a.items.itemAt(d),q=v.items.items,k=false;for(var t=q.length;j<t;j++){r=q[j];var s=r.el.getHeight();if(s===0){k=true}else{if((r.el.getY()+(s/2))>f[1]){l=true;break}}}j=(l&&r?j:v.items.getCount())+(k?-1:0);var g=this.createEvent(w,u,x,d,v,j);if(a.fireEvent("validatedrop",g)!==false&&a.fireEvent("beforedragover",g)!==false){o.getProxy().setWidth("auto");if(r){o.moveProxy(r.el.dom.parentNode,l?r.el.dom:null)}else{o.moveProxy(v.el.dom,null)}this.lastPos={c:v,col:d,p:k||(l&&r)?j:false};this.scrollPos=a.body.getScroll();a.fireEvent("dragover",g);return g.status}else{return g.status}},notifyOut:function(){delete this.grid},notifyDrop:function(l,g,f){delete this.grid;if(!this.lastPos){return}var j=this.lastPos.c,b=this.lastPos.col,k=this.lastPos.p;var a=this.createEvent(l,g,f,b,j,k!==false?k:j.items.getCount());if(this.portal.fireEvent("validatedrop",a)!==false&&this.portal.fireEvent("beforedrop",a)!==false){l.proxy.getProxy().remove();l.panel.el.dom.parentNode.removeChild(l.panel.el.dom);if(k!==false){if(j==l.panel.ownerCt&&(j.items.items.indexOf(l.panel)<=k)){k++}j.insert(k,l.panel)}else{j.add(l.panel)}j.doLayout();this.portal.fireEvent("drop",a);var m=this.scrollPos.top;if(m){var h=this.portal.body.dom;setTimeout(function(){h.scrollTop=m},10)}}delete this.lastPos},getGrid:function(){var a=this.portal.bwrap.getBox();a.columnX=[];this.portal.items.each(function(b){a.columnX.push({x:b.el.getX(),w:b.el.getWidth()})});return a},unreg:function(){Ext.ux.Portal.DropZone.superclass.unreg.call(this)}});Ext.ux.PortalColumn=Ext.extend(Ext.Container,{layout:"anchor",defaultType:"portlet",cls:"x-portal-column"});Ext.reg("portalcolumn",Ext.ux.PortalColumn);Ext.ux.Portlet=Ext.extend(Ext.Panel,{anchor:"100%",frame:true,collapsible:true,draggable:true,cls:"x-portlet"});Ext.reg("portlet",Ext.ux.Portlet);Ext.ux.ProgressBarPager=Ext.extend(Object,{progBarWidth:225,defaultText:"Loading...",defaultAnimCfg:{duration:1,easing:"bounceOut"},constructor:function(a){if(a){Ext.apply(this,a)}},init:function(a){if(a.displayInfo){this.parent=a;var b=a.items.indexOf(a.displayItem);a.remove(a.displayItem,true);this.progressBar=new Ext.ProgressBar({text:this.defaultText,width:this.progBarWidth,animate:this.defaultAnimCfg});a.displayItem=this.progressBar;a.add(a.displayItem);a.doLayout();Ext.apply(a,this.parentOverrides);this.progressBar.on("render",function(c){c.el.applyStyles("cursor:pointer");c.el.on("click",this.handleProgressBarClick,this)},this);this.progressBar.on({scope:this,beforeDestroy:function(){this.progressBar.el.un("click",this.handleProgressBarClick,this)}})}},handleProgressBarClick:function(j){var d=this.parent;var c=d.displayItem;var f=this.progressBar.getBox();var h=j.getXY();var b=h[0]-f.x;var a=Math.ceil(d.store.getTotalCount()/d.pageSize);var g=Math.ceil(b/(c.width/a));d.changePage(g)},parentOverrides:{updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var a=this.getPageData();var d=this.readPage(a);var e=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());d=a.activePage;var c=d/a.pages;this.displayItem.updateProgress(c,e,this.animate||this.defaultAnimConfig)}}}});Ext.preg("progressbarpager",Ext.ux.ProgressBarPager);Ext.ns("Ext.ux.grid");Ext.ux.grid.RowEditor=Ext.extend(Ext.Panel,{floating:true,shadow:false,layout:"hbox",cls:"x-small-editor",buttonAlign:"center",baseCls:"x-row-editor",elements:"header,footer,body",frameWidth:5,buttonPad:3,clicksToEdit:"auto",monitorValid:true,focusDelay:250,errorSummary:true,defaults:{normalWidth:true},initComponent:function(){Ext.ux.grid.RowEditor.superclass.initComponent.call(this);this.addEvents("beforeedit","validateedit","afteredit")},init:function(a){this.grid=a;this.ownerCt=a;if(this.clicksToEdit===2){a.on("rowdblclick",this.onRowDblClick,this)}else{a.on("rowclick",this.onRowClick,this);if(Ext.isIE){a.on("rowdblclick",this.onRowDblClick,this)}}a.getStore().on("remove",function(){this.stopEditing(false)},this);a.on({scope:this,keydown:this.onGridKey,columnresize:this.verifyLayout,columnmove:this.refreshFields,reconfigure:this.refreshFields,destroy:this.destroy,bodyscroll:{buffer:250,fn:this.positionButtons}});a.getColumnModel().on("hiddenchange",this.verifyLayout,this,{delay:1});a.getView().on("refresh",this.stopEditing.createDelegate(this,[]))},refreshFields:function(){this.initFields();this.verifyLayout()},isDirty:function(){var a;this.items.each(function(b){if(String(this.values[b.id])!==String(b.getValue())){a=true;return false}},this);return a},startEditing:function(k,p){if(this.editing&&this.isDirty()){this.showTooltip("You need to commit or cancel your changes");return}this.editing=true;if(typeof k=="object"){k=this.grid.getStore().indexOf(k)}if(this.fireEvent("beforeedit",this,k)!==false){var e=this.grid,l=e.getView();var o=l.getRow(k);var c=e.store.getAt(k);this.record=c;this.rowIndex=k;this.values={};if(!this.rendered){this.render(l.getEditorParent())}var m=Ext.fly(o).getWidth();this.setSize(m);if(!this.initialized){this.initFields()}var n=e.getColumnModel(),d=this.items.items,j,a;for(var b=0,h=n.getColumnCount();b<h;b++){a=this.preEditValue(c,n.getDataIndex(b));j=d[b];j.setValue(a);this.values[j.id]=a||""}this.verifyLayout(true);if(!this.isVisible()){this.setPagePosition(Ext.fly(o).getXY())}else{this.el.setXY(Ext.fly(o).getXY(),{duration:0.15})}if(!this.isVisible()){this.show().doLayout()}if(p!==false){this.doFocus.defer(this.focusDelay,this)}}},stopEditing:function(n){this.editing=false;if(!this.isVisible()){return}if(n===false||!this.isValid()){this.hide();return}var h={},b=this.record,j=false;var m=this.grid.colModel,f=this.items.items;for(var e=0,g=m.getColumnCount();e<g;e++){if(!m.isHidden(e)){var c=m.getDataIndex(e);if(!Ext.isEmpty(c)){var a=b.data[c];var l=this.postEditValue(f[e].getValue(),a,b,c);if(String(a)!==String(l)){h[c]=l;j=true}}}}if(j&&this.fireEvent("validateedit",this,h,b,this.rowIndex)!==false){b.beginEdit();for(var d in h){if(h.hasOwnProperty(d)){b.set(d,h[d])}}b.endEdit();this.fireEvent("afteredit",this,h,b,this.rowIndex)}this.hide()},verifyLayout:function(e){if(this.el&&(this.isVisible()||e===true)){var g=this.grid.getView().getRow(this.rowIndex);this.setSize(Ext.fly(g).getWidth(),Ext.isIE?Ext.fly(g).getHeight()+(Ext.isBorderBox?9:0):undefined);var c=this.grid.colModel,b=this.items.items;for(var d=0,a=c.getColumnCount();d<a;d++){if(!c.isHidden(d)){var f=0;if(d===0){f+=0}if(d===(a-1)){f+=3}else{f+=1}b[d].show();b[d].setWidth(c.getColumnWidth(d)-f)}else{b[d].hide()}}this.doLayout();this.positionButtons()}},slideHide:function(){this.hide()},initFields:function(){var b=this.grid.getColumnModel(),f=Ext.layout.ContainerLayout.prototype.parseMargins;this.removeAll(false);for(var e=0,a=b.getColumnCount();e<a;e++){var g=b.getColumnAt(e);var d=g.getEditor();if(!d){d=g.displayEditor||new Ext.form.DisplayField()}if(e==0){d.margins=f("0 1 2 1")}else{if(e==a-1){d.margins=f("0 0 2 1")}else{d.margins=f("0 1 2")}}d.setWidth(b.getColumnWidth(e));d.column=g;if(d.ownerCt!==this){d.on("focus",this.ensureVisible,this);d.on("specialkey",this.onKey,this)}this.insert(e,d)}this.initialized=true},onKey:function(a,b){if(b.getKey()===b.ENTER){this.stopEditing(true);b.stopPropagation()}},onGridKey:function(c){if(c.getKey()===c.ENTER&&!this.isVisible()){var b=this.grid.getSelectionModel().getSelected();if(b){var a=this.grid.store.indexOf(b);this.startEditing(a);c.stopPropagation()}}},ensureVisible:function(a){if(this.isVisible()){this.grid.getView().ensureVisible(this.rowIndex,this.grid.colModel.getIndexById(a.column.id),true)}},onRowClick:function(b,d,c){if(this.clicksToEdit=="auto"){var a=this.lastClickIndex;this.lastClickIndex=d;if(a!=d&&!this.isVisible()){return}}this.startEditing(d,false);this.doFocus.defer(this.focusDelay,this,[c.getPoint()])},onRowDblClick:function(a,c,b){this.startEditing(c,false);this.doFocus.defer(this.focusDelay,this,[b.getPoint()])},onRender:function(){Ext.ux.grid.RowEditor.superclass.onRender.apply(this,arguments);this.el.swallowEvent(["keydown","keyup","keypress"]);this.btns=new Ext.Panel({baseCls:"x-plain",cls:"x-btns",elements:"body",layout:"table",width:(this.minButtonWidth*2)+(this.frameWidth*2)+(this.buttonPad*4),items:[{ref:"saveBtn",itemId:"saveBtn",xtype:"button",text:this.saveText||"Save",width:this.minButtonWidth,handler:this.stopEditing.createDelegate(this,[true])},{xtype:"button",text:this.cancelText||"Cancel",width:this.minButtonWidth,handler:this.stopEditing.createDelegate(this,[false])}]});this.btns.render(this.bwrap)},afterRender:function(){Ext.ux.grid.RowEditor.superclass.afterRender.apply(this,arguments);this.positionButtons();if(this.monitorValid){this.startMonitoring()}},onShow:function(){if(this.monitorValid){this.startMonitoring()}Ext.ux.grid.RowEditor.superclass.onShow.apply(this,arguments)},onHide:function(){Ext.ux.grid.RowEditor.superclass.onHide.apply(this,arguments);this.stopMonitoring();this.grid.getView().focusRow(this.rowIndex)},positionButtons:function(){if(this.btns){var d=this.el.dom.clientHeight;var b=this.grid.getView();var a=b.scroller.dom.scrollLeft;var c=b.mainBody.getWidth();var e=this.btns.getWidth();this.btns.el.shift({left:(c/2)-(e/2)+a,top:d-2,stopFx:true,duration:0.2})}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&typeof b==="string"?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&typeof c=="string"?Ext.util.Format.htmlEncode(c):c},doFocus:function(f){if(this.isVisible()){var d=0;if(f){d=this.getTargetColumnIndex(f)}var b=this.grid.getColumnModel();for(var e=d||0,a=b.getColumnCount();e<a;e++){var g=b.getColumnAt(e);if(!g.hidden&&g.getEditor()){g.getEditor().focus();break}}}},getTargetColumnIndex:function(k){var a=this.grid,j=a.view;var h=k.left;var f=a.colModel.config;var b=0,d=false;for(var e=f.length,g;g=f[b];b++){if(!g.hidden){if(Ext.fly(j.getHeaderCell(b)).getRegion().right>=h){d=b;break}}}return d},startMonitoring:function(){if(!this.bound&&this.monitorValid){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false;if(this.tooltip){this.tooltip.hide()}},isValid:function(){var a=true;this.items.each(function(b){if(!b.isValid(true)){a=false;return false}});return a},bindHandler:function(){if(!this.bound){return false}var a=this.isValid();if(!a&&this.errorSummary){this.showTooltip(this.getErrorText().join(""))}this.btns.saveBtn.setDisabled(!a);this.fireEvent("validation",this,a)},showTooltip:function(b){var a=this.tooltip;if(!a){a=this.tooltip=new Ext.ToolTip({maxWidth:600,cls:"errorTip",width:300,title:"Errors",autoHide:false,anchor:"left",anchorToTarget:true,mouseOffset:[40,0]})}a.initTarget(this.items.last().getEl());if(!a.rendered){a.show();a.hide()}a.body.update(b);a.doAutoWidth();a.show()},getErrorText:function(){var a=["<ul>"];this.items.each(function(b){if(!b.isValid(true)){a.push("<li>",b.activeError,"</li>")}});a.push("</ul>");return a}});Ext.preg("roweditor",Ext.ux.grid.RowEditor);Ext.override(Ext.form.Field,{markInvalid:function(c){if(!this.rendered||this.preventMark){return}c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}this.activeError=c;this.fireEvent("invalid",this,c)}});Ext.override(Ext.ToolTip,{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")+20;this.setWidth(a.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}}});Ext.ns("Ext.ux.grid");Ext.ux.grid.RowExpander=Ext.extend(Ext.util.Observable,{expandOnEnter:true,expandOnDblClick:true,header:"",width:20,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"expander",lazyRender:true,enableCaching:true,constructor:function(a){Ext.apply(this,a);this.addEvents({beforeexpand:true,expand:true,beforecollapse:true,collapse:true});Ext.ux.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if(typeof this.tpl=="string"){this.tpl=new Ext.Template(this.tpl)}this.tpl.compile()}this.state={};this.bodyContent={}},getRowClass:function(a,e,d,c){d.cols=d.cols-1;var b=this.bodyContent[a.id];if(!b&&!this.lazyRender){b=this.getBodyContent(a,e)}if(b){d.body=b}return this.state[a.id]?"x-grid3-row-expanded":"x-grid3-row-collapsed"},init:function(b){this.grid=b;var a=b.getView();a.getRowClass=this.getRowClass.createDelegate(this);a.enableRowBody=true;b.on("render",this.onRender,this);b.on("destroy",this.onDestroy,this)},onRender:function(){var a=this.grid;var b=a.getView().mainBody;b.on("mousedown",this.onMouseDown,this,{delegate:".x-grid3-row-expander"});if(this.expandOnEnter){this.keyNav=new Ext.KeyNav(this.grid.getGridEl(),{enter:this.onEnter,scope:this})}if(this.expandOnDblClick){a.on("rowdblclick",this.onRowDblClick,this)}},onDestroy:function(){this.keyNav.disable();delete this.keyNav;var a=this.grid.getView().mainBody;a.un("mousedown",this.onMouseDown,this)},onRowDblClick:function(a,b,c){this.toggleRow(b)},onEnter:function(h){var f=this.grid;var j=f.getSelectionModel();var b=j.getSelections();for(var c=0,a=b.length;c<a;c++){var d=f.getStore().indexOf(b[c]);this.toggleRow(d)}},getBodyContent:function(a,b){if(!this.enableCaching){return this.tpl.apply(a.data)}var c=this.bodyContent[a.id];if(!c){c=this.tpl.apply(a.data);this.bodyContent[a.id]=c}return c},onMouseDown:function(b,a){b.stopEvent();var c=b.getTarget(".x-grid3-row");this.toggleRow(c)},renderer:function(b,c,a){c.cellAttr='rowspan="2"';return'<div class="x-grid3-row-expander">&#160;</div>'},beforeExpand:function(b,a,c){if(this.fireEvent("beforeexpand",this,b,a,c)!==false){if(this.tpl&&this.lazyRender){a.innerHTML=this.getBodyContent(b,c)}return true}else{return false}},toggleRow:function(a){if(typeof a=="number"){a=this.grid.view.getRow(a)}this[Ext.fly(a).hasClass("x-grid3-row-collapsed")?"expandRow":"collapseRow"](a)},expandRow:function(c){if(typeof c=="number"){c=this.grid.view.getRow(c)}var b=this.grid.store.getAt(c.rowIndex);var a=Ext.DomQuery.selectNode("tr:nth(2) div.x-grid3-row-body",c);if(this.beforeExpand(b,a,c.rowIndex)){this.state[b.id]=true;Ext.fly(c).replaceClass("x-grid3-row-collapsed","x-grid3-row-expanded");this.fireEvent("expand",this,b,a,c.rowIndex)}},collapseRow:function(c){if(typeof c=="number"){c=this.grid.view.getRow(c)}var b=this.grid.store.getAt(c.rowIndex);var a=Ext.fly(c).child("tr:nth(1) div.x-grid3-row-body",true);if(this.fireEvent("beforecollapse",this,b,a,c.rowIndex)!==false){this.state[b.id]=false;Ext.fly(c).replaceClass("x-grid3-row-expanded","x-grid3-row-collapsed");this.fireEvent("collapse",this,b,a,c.rowIndex)}}});Ext.preg("rowexpander",Ext.ux.grid.RowExpander);Ext.grid.RowExpander=Ext.ux.grid.RowExpander;Ext.ns("Ext.ux.layout");Ext.ux.layout.RowLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,isValidParent:function(b,a){return b.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(f,j){var b=f.items.items,g=b.length,a,c;if(!this.innerCt){j.addClass("ux-row-layout-ct");this.innerCt=j.createChild({cls:"x-row-inner"})}this.renderAll(f,this.innerCt);var k=j.getViewSize();if(k.width<1&&k.height<1){return}var d=k.height-j.getPadding("tb"),e=d;this.innerCt.setSize({height:d});for(c=0;c<g;c++){a=b[c];if(!a.rowHeight){e-=(a.getSize().height+a.getEl().getMargins("tb"))}}e=e<0?0:e;for(c=0;c<g;c++){a=b[c];if(a.rowHeight){a.setSize({height:Math.floor(a.rowHeight*e)-a.getEl().getMargins("tb")})}}}});Ext.Container.LAYOUTS["ux.row"]=Ext.ux.layout.RowLayout;Ext.ns("Ext.ux.form");Ext.ux.form.SearchField=Ext.extend(Ext.form.TwinTriggerField,{initComponent:function(){Ext.ux.form.SearchField.superclass.initComponent.call(this);this.on("specialkey",function(a,b){if(b.getKey()==b.ENTER){this.onTrigger2Click()}},this)},validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,hasSearch:false,paramName:"query",onTrigger1Click:function(){if(this.hasSearch){this.el.dom.value="";var a={start:0};this.store.baseParams=this.store.baseParams||{};this.store.baseParams[this.paramName]="";this.store.reload({params:a});this.triggers[0].hide();this.hasSearch=false}},onTrigger2Click:function(){var a=this.getRawValue();if(a.length<1){this.onTrigger1Click();return}var b={start:0};this.store.baseParams=this.store.baseParams||{};this.store.baseParams[this.paramName]=a;this.store.reload({params:b});this.hasSearch=true;this.triggers[0].show()}});Ext.ns("Ext.ux.form");Ext.ux.form.SelectBox=Ext.extend(Ext.form.ComboBox,{constructor:function(a){this.searchResetDelay=1000;a=a||{};a=Ext.apply(a||{},{editable:false,forceSelection:true,rowHeight:false,lastSearchTerm:false,triggerAction:"all",mode:"local"});Ext.ux.form.SelectBox.superclass.constructor.apply(this,arguments);this.lastSelectedIndex=this.selectedIndex||0},initEvents:function(){Ext.ux.form.SelectBox.superclass.initEvents.apply(this,arguments);this.el.on("keydown",this.keySearch,this,true);this.cshTask=new Ext.util.DelayedTask(this.clearSearchHistory,this)},keySearch:function(f,d,b){var a=f.getKey();var c=String.fromCharCode(a);var g=0;if(!this.store.getCount()){return}switch(a){case Ext.EventObject.HOME:f.stopEvent();this.selectFirst();return;case Ext.EventObject.END:f.stopEvent();this.selectLast();return;case Ext.EventObject.PAGEDOWN:this.selectNextPage();f.stopEvent();return;case Ext.EventObject.PAGEUP:this.selectPrevPage();f.stopEvent();return}if((f.hasModifier()&&!f.shiftKey)||f.isNavKeyPress()||f.isSpecialKey()){return}if(this.lastSearchTerm==c){g=this.lastSelectedIndex}this.search(this.displayField,c,g);this.cshTask.delay(this.searchResetDelay)},onRender:function(b,a){this.store.on("load",this.calcRowsPerPage,this);Ext.ux.form.SelectBox.superclass.onRender.apply(this,arguments);if(this.mode=="local"){this.calcRowsPerPage()}},onSelect:function(a,c,b){if(this.fireEvent("beforeselect",this,a,c)!==false){this.setValue(a.data[this.valueField||this.displayField]);if(!b){this.collapse()}this.lastSelectedIndex=c+1;this.fireEvent("select",this,a,c)}},render:function(a){Ext.ux.form.SelectBox.superclass.render.apply(this,arguments);if(Ext.isSafari){this.el.swallowEvent("mousedown",true)}this.el.unselectable();this.innerList.unselectable();this.trigger.unselectable();this.innerList.on("mouseup",function(d,c,b){if(c.id&&c.id==this.innerList.id){return}this.onViewClick()},this);this.innerList.on("mouseover",function(d,c,b){if(c.id&&c.id==this.innerList.id){return}this.lastSelectedIndex=this.view.getSelectedIndexes()[0]+1;this.cshTask.delay(this.searchResetDelay)},this);this.trigger.un("click",this.onTriggerClick,this);this.trigger.on("mousedown",function(d,c,b){d.preventDefault();this.onTriggerClick()},this);this.on("collapse",function(d,c,b){Ext.getDoc().un("mouseup",this.collapseIf,this)},this,true);this.on("expand",function(d,c,b){Ext.getDoc().on("mouseup",this.collapseIf,this)},this,true)},clearSearchHistory:function(){this.lastSelectedIndex=0;this.lastSearchTerm=false},selectFirst:function(){this.focusAndSelect(this.store.data.first())},selectLast:function(){this.focusAndSelect(this.store.data.last())},selectPrevPage:function(){if(!this.rowHeight){return}var a=Math.max(this.selectedIndex-this.rowsPerPage,0);this.focusAndSelect(this.store.getAt(a))},selectNextPage:function(){if(!this.rowHeight){return}var a=Math.min(this.selectedIndex+this.rowsPerPage,this.store.getCount()-1);this.focusAndSelect(this.store.getAt(a))},search:function(c,b,d){c=c||this.displayField;this.lastSearchTerm=b;var a=this.store.find.apply(this.store,arguments);if(a!==-1){this.focusAndSelect(a)}},focusAndSelect:function(a){var b=typeof a==="number"?a:this.store.indexOf(a);this.select(b,this.isExpanded());this.onSelect(this.store.getAt(a),b,this.isExpanded())},calcRowsPerPage:function(){if(this.store.getCount()){this.rowHeight=Ext.fly(this.view.getNode(0)).getHeight();this.rowsPerPage=this.maxHeight/this.rowHeight}else{this.rowHeight=false}}});Ext.reg("selectbox",Ext.ux.form.SelectBox);Ext.ux.SelectBox=Ext.ux.form.SelectBox;Ext.ux.SliderTip=Ext.extend(Ext.Tip,{minWidth:10,offsets:[0,-10],init:function(a){a.on("dragstart",this.onSlide,this);a.on("drag",this.onSlide,this);a.on("dragend",this.hide,this);a.on("destroy",this.destroy,this)},onSlide:function(a){this.show();this.body.update(this.getText(a));this.doAutoWidth();this.el.alignTo(a.thumb,"b-t?",this.offsets)},getText:function(a){return String(a.getValue())}});Ext.ux.SlidingPager=Ext.extend(Object,{init:function(a){Ext.each(a.items.getRange(2,6),function(d){d.hide()});var b=new Ext.Slider({width:114,minValue:1,maxValue:1,plugins:new Ext.ux.SliderTip({getText:function(c){return String.format("Page <b>{0}</b> of <b>{1}</b>",c.value,c.maxValue)}}),listeners:{changecomplete:function(d,c){a.changePage(c)}}});a.insert(5,b);a.on({change:function(c,d){b.maxValue=d.pages;b.setValue(d.activePage)},beforedestroy:function(){b.destroy()}})}});Ext.ns("Ext.ux.form");Ext.ux.form.SpinnerField=Ext.extend(Ext.form.NumberField,{deferHeight:true,autoSize:Ext.emptyFn,onBlur:Ext.emptyFn,adjustSize:Ext.BoxComponent.prototype.adjustSize,constructor:function(c){var b=Ext.copyTo({},c,"incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass");var d=this.spinner=new Ext.ux.Spinner(b);var a=c.plugins?(Ext.isArray(c.plugins)?c.plugins.push(d):[c.plugins,d]):d;Ext.ux.form.SpinnerField.superclass.constructor.call(this,Ext.apply(c,{plugins:a}))},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},validateBlur:function(){return true}});Ext.reg("spinnerfield",Ext.ux.form.SpinnerField);Ext.form.SpinnerField=Ext.ux.form.SpinnerField;Ext.ux.Spinner=Ext.extend(Ext.util.Observable,{incrementValue:1,alternateIncrementValue:5,triggerClass:"x-form-spinner-trigger",splitterClass:"x-form-spinner-splitter",alternateKey:Ext.EventObject.shiftKey,defaultValue:0,accelerate:false,constructor:function(a){Ext.ux.Spinner.superclass.constructor.call(this,a);Ext.apply(this,a);this.mimicing=false},init:function(a){this.field=a;a.afterMethod("onRender",this.doRender,this);a.afterMethod("onEnable",this.doEnable,this);a.afterMethod("onDisable",this.doDisable,this);a.afterMethod("afterRender",this.doAfterRender,this);a.afterMethod("onResize",this.doResize,this);a.afterMethod("onFocus",this.doFocus,this);a.beforeMethod("onDestroy",this.doDestroy,this)},doRender:function(b,a){var c=this.el=this.field.getEl();var d=this.field;if(!d.wrap){d.wrap=this.wrap=c.wrap({cls:"x-form-field-wrap"})}else{this.wrap=d.wrap.addClass("x-form-field-wrap")}this.trigger=this.wrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(!d.width){this.wrap.setWidth(c.getWidth()+this.trigger.getWidth())}this.splitter=this.wrap.createChild({tag:"div",cls:this.splitterClass,style:"width:13px; height:2px;"});this.splitter.setRight((Ext.isIE)?1:2).setTop(10).show();this.proxy=this.trigger.createProxy("",this.splitter,true);this.proxy.addClass("x-form-spinner-proxy");this.proxy.setStyle("left","0px");this.proxy.setSize(14,1);this.proxy.hide();this.dd=new Ext.dd.DDProxy(this.splitter.dom.id,"SpinnerDrag",{dragElId:this.proxy.id});this.initTrigger();this.initSpinner()},doAfterRender:function(){var a;if(Ext.isIE&&this.el.getY()!=(a=this.trigger.getY())){this.el.position();this.el.setY(a)}},doEnable:function(){if(this.wrap){this.wrap.removeClass(this.field.disabledClass)}},doDisable:function(){if(this.wrap){this.wrap.addClass(this.field.disabledClass);this.el.removeClass(this.field.disabledClass)}},doResize:function(a,b){if(typeof a=="number"){this.el.setWidth(this.field.adjustWidth("input",a-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},doFocus:function(){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});this.el.on("keydown",this.checkTab,this)}},checkTab:function(a){if(a.getKey()==a.TAB){this.triggerBlur()}},mimicBlur:function(a){if(!this.wrap.contains(a.target)&&this.field.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);this.el.un("keydown",this.checkTab,this);this.field.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");this.field.onBlur.call(this.field)},initTrigger:function(){this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},initSpinner:function(){this.field.addEvents({spin:true,spinup:true,spindown:true});this.keyNav=new Ext.KeyNav(this.el,{up:function(a){a.preventDefault();this.onSpinUp()},down:function(a){a.preventDefault();this.onSpinDown()},pageUp:function(a){a.preventDefault();this.onSpinUpAlternate()},pageDown:function(a){a.preventDefault();this.onSpinDownAlternate()},scope:this});this.repeater=new Ext.util.ClickRepeater(this.trigger,{accelerate:this.accelerate});this.field.mon(this.repeater,"click",this.onTriggerClick,this,{preventDefault:true});this.field.mon(this.trigger,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,mousemove:this.onMouseMove,mousedown:this.onMouseDown,mouseup:this.onMouseUp,scope:this,preventDefault:true});this.field.mon(this.wrap,"mousewheel",this.handleMouseWheel,this);this.dd.setXConstraint(0,0,10);this.dd.setYConstraint(1500,1500,10);this.dd.endDrag=this.endDrag.createDelegate(this);this.dd.startDrag=this.startDrag.createDelegate(this);this.dd.onDrag=this.onDrag.createDelegate(this)},onMouseOver:function(){if(this.disabled){return}var a=this.getMiddle();this.tmpHoverClass=(Ext.EventObject.getPageY()<a)?"x-form-spinner-overup":"x-form-spinner-overdown";this.trigger.addClass(this.tmpHoverClass)},onMouseOut:function(){this.trigger.removeClass(this.tmpHoverClass)},onMouseMove:function(){if(this.disabled){return}var a=this.getMiddle();if(((Ext.EventObject.getPageY()>a)&&this.tmpHoverClass=="x-form-spinner-overup")||((Ext.EventObject.getPageY()<a)&&this.tmpHoverClass=="x-form-spinner-overdown")){}},onMouseDown:function(){if(this.disabled){return}var a=this.getMiddle();this.tmpClickClass=(Ext.EventObject.getPageY()<a)?"x-form-spinner-clickup":"x-form-spinner-clickdown";this.trigger.addClass(this.tmpClickClass)},onMouseUp:function(){this.trigger.removeClass(this.tmpClickClass)},onTriggerClick:function(){if(this.disabled||this.el.dom.readOnly){return}var b=this.getMiddle();var a=(Ext.EventObject.getPageY()<b)?"Up":"Down";this["onSpin"+a]()},getMiddle:function(){var b=this.trigger.getTop();var c=this.trigger.getHeight();var a=b+(c/2);return a},isSpinnable:function(){if(this.disabled||this.el.dom.readOnly){Ext.EventObject.preventDefault();return false}return true},handleMouseWheel:function(a){if(this.wrap.hasClass("x-trigger-wrap-focus")==false){return}var b=a.getWheelDelta();if(b>0){this.onSpinUp();a.stopEvent()}else{if(b<0){this.onSpinDown();a.stopEvent()}}},startDrag:function(){this.proxy.show();this._previousY=Ext.fly(this.dd.getDragEl()).getTop()},endDrag:function(){this.proxy.hide()},onDrag:function(){if(this.disabled){return}var b=Ext.fly(this.dd.getDragEl()).getTop();var a="";if(this._previousY>b){a="Up"}if(this._previousY<b){a="Down"}if(a!=""){this["onSpin"+a]()}this._previousY=b},onSpinUp:function(){if(this.isSpinnable()==false){return}if(Ext.EventObject.shiftKey==true){this.onSpinUpAlternate();return}else{this.spin(false,false)}this.field.fireEvent("spin",this);this.field.fireEvent("spinup",this)},onSpinDown:function(){if(this.isSpinnable()==false){return}if(Ext.EventObject.shiftKey==true){this.onSpinDownAlternate();return}else{this.spin(true,false)}this.field.fireEvent("spin",this);this.field.fireEvent("spindown",this)},onSpinUpAlternate:function(){if(this.isSpinnable()==false){return}this.spin(false,true);this.field.fireEvent("spin",this);this.field.fireEvent("spinup",this)},onSpinDownAlternate:function(){if(this.isSpinnable()==false){return}this.spin(true,true);this.field.fireEvent("spin",this);this.field.fireEvent("spindown",this)},spin:function(d,b){var a=parseFloat(this.field.getValue());var c=(b==true)?this.alternateIncrementValue:this.incrementValue;(d==true)?a-=c:a+=c;a=(isNaN(a))?this.defaultValue:a;a=this.fixBoundries(a);this.field.setRawValue(a)},fixBoundries:function(b){var a=b;if(this.field.minValue!=undefined&&a<this.field.minValue){a=this.field.minValue}if(this.field.maxValue!=undefined&&a>this.field.maxValue){a=this.field.maxValue}return this.fixPrecision(a)},fixPrecision:function(b){var a=isNaN(b);if(!this.field.allowDecimals||this.field.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.field.decimalPrecision))},doDestroy:function(){if(this.trigger){this.trigger.remove()}if(this.wrap){this.wrap.remove();delete this.field.wrap}if(this.splitter){this.splitter.remove()}if(this.dd){this.dd.unreg();this.dd=null}if(this.proxy){this.proxy.remove()}if(this.repeater){this.repeater.purgeListeners()}}});Ext.form.Spinner=Ext.ux.Spinner;Ext.ux.Spotlight=function(a){Ext.apply(this,a)};Ext.ux.Spotlight.prototype={active:false,animate:true,duration:0.25,easing:"easeNone",animated:false,createElements:function(){var a=Ext.getBody();this.right=a.createChild({cls:"x-spotlight"});this.left=a.createChild({cls:"x-spotlight"});this.top=a.createChild({cls:"x-spotlight"});this.bottom=a.createChild({cls:"x-spotlight"});this.all=new Ext.CompositeElement([this.right,this.left,this.top,this.bottom])},show:function(b,c,a){if(this.animated){this.show.defer(50,this,[b,c,a]);return}this.el=Ext.get(b);if(!this.right){this.createElements()}if(!this.active){this.all.setDisplayed("");this.applyBounds(true,false);this.active=true;Ext.EventManager.onWindowResize(this.syncSize,this);this.applyBounds(false,this.animate,false,c,a)}else{this.applyBounds(false,false,false,c,a)}},hide:function(b,a){if(this.animated){this.hide.defer(50,this,[b,a]);return}Ext.EventManager.removeResizeListener(this.syncSize,this);this.applyBounds(true,this.animate,true,b,a)},doHide:function(){this.active=false;this.all.setDisplayed(false)},syncSize:function(){this.applyBounds(false,false)},applyBounds:function(e,d,k,j,l){var h=this.el.getRegion();var a=Ext.lib.Dom.getViewWidth(true);var g=Ext.lib.Dom.getViewHeight(true);var f=0,b=false;if(d){b={callback:function(){f++;if(f==4){this.animated=false;if(k){this.doHide()}Ext.callback(j,l,[this])}},scope:this,duration:this.duration,easing:this.easing};this.animated=true}this.right.setBounds(h.right,e?g:h.top,a-h.right,e?0:(g-h.top),b);this.left.setBounds(0,0,h.left,e?0:h.bottom,b);this.top.setBounds(e?a:h.left,0,e?0:a-h.left,h.top,b);this.bottom.setBounds(0,h.bottom,e?0:h.right,g-h.bottom,b);if(!d){if(k){this.doHide()}if(j){Ext.callback(j,l,[this])}}},destroy:function(){this.doHide();Ext.destroy(this.right,this.left,this.top,this.bottom);delete this.el;delete this.all}};Ext.Spotlight=Ext.ux.Spotlight;Ext.ux.TabCloseMenu=function(){var a,c,b;this.init=function(e){a=e;a.on("contextmenu",d)};function d(h,g,j){if(!c){c=new Ext.menu.Menu({items:[{id:a.id+"-close",text:"Close Tab",handler:function(){a.remove(b)}},{id:a.id+"-close-others",text:"Close Other Tabs",handler:function(){a.items.each(function(e){if(e.closable&&e!=b){a.remove(e)}})}}]})}b=g;var f=c.items;f.get(a.id+"-close").setDisabled(!g.closable);var k=true;a.items.each(function(){if(this!=g&&this.closable){k=false;return false}});f.get(a.id+"-close-others").setDisabled(k);j.stopEvent();c.showAt(j.getPoint())}};Ext.preg("tabclosemenu",Ext.ux.TabCloseMenu);Ext.ns("Ext.ux.grid");Ext.ux.grid.TableGrid=function(p,f){f=f||{};Ext.apply(this,f);var c=f.fields||[],a=f.columns||[];p=Ext.get(p);var k=p.insertSibling();var l=[],m=[];var e=p.query("thead th");for(var g=0,j;j=e[g];g++){var o=j.innerHTML;var b="tcol-"+g;l.push(Ext.applyIf(c[g]||{},{name:b,mapping:"td:nth("+(g+1)+")/@innerHTML"}));m.push(Ext.applyIf(a[g]||{},{header:o,dataIndex:b,width:j.offsetWidth,tooltip:j.title,sortable:true}))}var d=new Ext.data.Store({reader:new Ext.data.XmlReader({record:"tbody tr"},l)});d.loadData(p.dom);var n=new Ext.grid.ColumnModel(m);if(f.width||f.height){k.setSize(f.width||"auto",f.height||"auto")}else{k.setWidth(p.getWidth())}if(f.remove!==false){p.remove()}Ext.applyIf(this,{ds:d,cm:n,sm:new Ext.grid.RowSelectionModel(),autoHeight:true,autoWidth:false});Ext.ux.grid.TableGrid.superclass.constructor.call(this,k,{})};Ext.extend(Ext.ux.grid.TableGrid,Ext.grid.GridPanel);Ext.grid.TableGrid=Ext.ux.grid.TableGrid;Ext.ux.TabScrollerMenu=Ext.extend(Object,{pageSize:10,maxText:15,menuPrefixText:"Items",constructor:function(a){a=a||{};Ext.apply(this,a)},init:function(b){Ext.apply(b,this.tabPanelMethods);b.tabScrollerMenu=this;var a=this;b.on({render:{scope:b,single:true,fn:function(){var c=b.createScrollers.createSequence(a.createPanelsMenu,this);b.createScrollers=c}}})},createPanelsMenu:function(){var c=this.stripWrap.dom.offsetHeight;var b=this.header.dom.firstChild;Ext.fly(b).applyStyles({right:"18px"});var a=Ext.get(this.strip.dom.parentNode);a.applyStyles({"margin-right":"36px"});var d=this.header.insertFirst({cls:"x-tab-tabmenu-right"});d.setHeight(c);d.addClassOnOver("x-tab-tabmenu-over");d.on("click",this.showTabsMenu,this);this.scrollLeft.show=this.scrollLeft.show.createSequence(function(){d.show()});this.scrollLeft.hide=this.scrollLeft.hide.createSequence(function(){d.hide()})},getPageSize:function(){return this.pageSize},setPageSize:function(a){this.pageSize=a},getMaxText:function(){return this.maxText},setMaxText:function(a){this.maxText=a},getMenuPrefixText:function(){return this.menuPrefixText},setMenuPrefixText:function(a){this.menuPrefixText=a},tabPanelMethods:{showTabsMenu:function(c){if(!this.tabsMenu){this.tabsMenu=new Ext.menu.Menu();this.on("beforedestroy",this.tabsMenu.destroy,this.tabsMenu)}this.tabsMenu.removeAll();this.generateTabMenuItems();var b=Ext.get(c.getTarget());var a=b.getXY();a[1]+=24;this.tabsMenu.showAt(a)},generateTabMenuItems:function(){var a=this.getActiveTab();var l=this.items.getCount();var g=this.tabScrollerMenu.getPageSize();if(l>g){var d=Math.floor(l/g);var j=l%g;for(var e=0;e<d;e++){var f=(e+1)*g;var b=[];for(var h=0;h<g;h++){index=h+f-g;var k=this.items.get(index);b.push(this.autoGenMenuItem(k))}this.tabsMenu.add({text:this.tabScrollerMenu.getMenuPrefixText()+" "+(f-g+1)+" - "+f,menu:b})}if(j>0){var c=d*g;b=[];for(var e=c;e<l;e++){var k=this.items.get(e);b.push(this.autoGenMenuItem(k))}this.tabsMenu.add({text:this.tabScrollerMenu.menuPrefixText+" "+(c+1)+" - "+(c+b.length),menu:b})}}else{this.items.each(function(m){if(m.id!=a.id&&!m.hidden){b.push(this.autoGenMenuItem(m))}},this)}},autoGenMenuItem:function(b){var a=this.tabScrollerMenu.getMaxText();var c=Ext.util.Format.ellipsis(b.title,a);return{text:c,handler:this.showTabFromMenu,scope:this,disabled:b.disabled,tabToShow:b,iconCls:b.iconCls}},showTabFromMenu:function(a){this.setActiveTab(a.tabToShow)}}});Ext.ns("Ext.ux.tree");Ext.ux.tree.XmlTreeLoader=Ext.extend(Ext.tree.TreeLoader,{XML_NODE_ELEMENT:1,XML_NODE_TEXT:3,processResponse:function(b,d,g){var c=b.responseXML;var a=c.documentElement||c;try{d.beginUpdate();d.appendChild(this.parseXml(a));d.endUpdate();if(typeof g=="function"){g(this,d)}}catch(f){this.handleFailure(b)}},parseXml:function(b){var a=[];Ext.each(b.childNodes,function(f){if(f.nodeType==this.XML_NODE_ELEMENT){var c=this.createNode(f);if(f.childNodes.length>0){var e=this.parseXml(f);if(typeof e=="string"){c.attributes.innerText=e}else{c.appendChild(e)}}a.push(c)}else{if(f.nodeType==this.XML_NODE_TEXT){var d=f.nodeValue.trim();if(d.length>0){return a=d}}}},this);return a},createNode:function(b){var a={tagName:b.tagName};Ext.each(b.attributes,function(c){a[c.nodeName]=c.nodeValue});this.processAttributes(a);return Ext.ux.tree.XmlTreeLoader.superclass.createNode.call(this,a)},processAttributes:Ext.emptyFn});Ext.ux.XmlTreeLoader=Ext.ux.tree.XmlTreeLoader;
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser-example.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser-example.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser-example.js	(revision 625)
@@ -0,0 +1,33 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var chooser, btn;
+
+    function insertImage(data){
+    	Ext.DomHelper.append('images', {
+    		tag: 'img', src: data.url, style:'margin:10px;visibility:hidden;'
+    	}, true).show(true).frame();
+    	btn.focus();
+    };
+
+    function choose(btn){
+    	if(!chooser){
+    		chooser = new ImageChooser({
+    			url:'get-images.php',
+    			width:515,
+    			height:350
+    		});
+    	}
+    	chooser.show(btn.getEl(), insertImage);
+    };
+
+    btn = new Ext.Button({
+	    text: "Insert Image",
+		handler: choose,
+        renderTo: 'buttons'
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.css	(revision 625)
@@ -0,0 +1,75 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#img-chooser-dlg .details{
+    padding: 10px;
+    text-align: center;
+}
+#img-chooser-dlg .details-info{
+    border-top: 1px solid #cccccc;
+    font: 11px Arial, Helvetica, sans-serif;
+    margin-top: 5px;
+    padding-top: 5px;
+    text-align: left;
+}
+#img-chooser-dlg .details-info b{
+    color: #555555;
+    display: block;
+    margin-bottom: 4px;
+}
+#img-chooser-dlg .details-info span{
+    display: block;
+    margin-bottom: 5px;
+    margin-left: 5px;
+}
+
+#img-chooser-view{
+    background: white;
+    font: 11px Arial, Helvetica, sans-serif;
+}
+#img-chooser-view .thumb{
+    background: #dddddd;
+    padding: 3px;
+}
+#img-chooser-view .thumb img{
+    height: 60px;
+    width: 80px;
+}
+#img-chooser-view .thumb-wrap{
+    float: left;
+    margin: 4px;
+    margin-right: 0;
+    padding: 5px;
+}
+#img-chooser-view .thumb-wrap span{
+    display: block;
+    overflow: hidden;
+    text-align: center;
+}
+#img-chooser-view .x-view-over{
+    border:1px solid #dddddd;
+    background: #efefef url(../../resources/images/default/grid/row-over.gif) repeat-x left top;
+    padding: 4px;
+}
+#img-chooser-view .x-view-selected{
+    background: #DFEDFF;
+    border: 1px solid #6593cf;
+    padding: 4px;
+}
+#img-chooser-view .x-view-selected .thumb{
+    background:transparent;
+}
+#img-chooser-view .x-view-selected span{
+    color:#1A4D8F;
+}
+#img-chooser-view .loading-indicator {
+    font-size:11px;
+    background-image:url('../../resources/images/grid/loading.gif');
+    background-repeat: no-repeat;
+    background-position: left;
+    padding-left:20px;
+    margin:10px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.html	(revision 625)
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<title>Advanced DataView Example</title>
+	<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+	
+	<link rel="stylesheet" type="text/css" href="chooser.css" />
+	<script type="text/javascript" src="chooser.js"></script>
+	<script type="text/javascript" src="chooser-example.js"></script>
+	
+	<!-- Common Styles for the examples -->
+	<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body class="xtheme-gray">
+	<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+	<h1>Advanced DataView Example</h1>
+	<p>This example shows loading a DataView in a Window.  Each item has a linked details view, and the DataView
+    supports custom sorting and filtering.</p>
+	<div id="buttons" style="margin:20px;"></div>
+	<div id="images" style="margin:20px;width:600px;"></div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/chooser.js	(revision 625)
@@ -0,0 +1,236 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+var ImageChooser = function(config){
+	this.config = config;
+}
+
+ImageChooser.prototype = {
+    // cache data by image name for easy lookup
+    lookup : {},
+
+	show : function(el, callback){
+		if(!this.win){
+			this.initTemplates();
+
+			this.store = new Ext.data.JsonStore({
+			    url: this.config.url,
+			    root: 'images',
+			    fields: [
+			        'name', 'url',
+			        {name:'size', type: 'float'},
+			        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+			    ],
+			    listeners: {
+			    	'load': {fn:function(){ this.view.select(0); }, scope:this, single:true}
+			    }
+			});
+			this.store.load();
+
+			var formatSize = function(data){
+		        if(data.size < 1024) {
+		            return data.size + " bytes";
+		        } else {
+		            return (Math.round(((data.size*10) / 1024))/10) + " KB";
+		        }
+		    };
+
+			var formatData = function(data){
+		    	data.shortName = data.name.ellipse(15);
+		    	data.sizeString = formatSize(data);
+		    	data.dateString = new Date(data.lastmod).format("m/d/Y g:i a");
+		    	this.lookup[data.name] = data;
+		    	return data;
+		    };
+
+		    this.view = new Ext.DataView({
+				tpl: this.thumbTemplate,
+				singleSelect: true,
+				overClass:'x-view-over',
+				itemSelector: 'div.thumb-wrap',
+				emptyText : '<div style="padding:10px;">No images match the specified filter</div>',
+				store: this.store,
+				listeners: {
+					'selectionchange': {fn:this.showDetails, scope:this, buffer:100},
+					'dblclick'       : {fn:this.doCallback, scope:this},
+					'loadexception'  : {fn:this.onLoadException, scope:this},
+					'beforeselect'   : {fn:function(view){
+				        return view.store.getRange().length > 0;
+				    }}
+				},
+				prepareData: formatData.createDelegate(this)
+			});
+
+			var cfg = {
+		    	title: 'Choose an Image',
+		    	id: 'img-chooser-dlg',
+		    	layout: 'border',
+				minWidth: 500,
+				minHeight: 300,
+				modal: true,
+				closeAction: 'hide',
+				border: false,
+				items:[{
+					id: 'img-chooser-view',
+					region: 'center',
+					autoScroll: true,
+					items: this.view,
+                    tbar:[{
+                    	text: 'Filter:'
+                    },{
+                    	xtype: 'textfield',
+                    	id: 'filter',
+                    	selectOnFocus: true,
+                    	width: 100,
+                    	listeners: {
+                    		'render': {fn:function(){
+						    	Ext.getCmp('filter').getEl().on('keyup', function(){
+						    		this.filter();
+						    	}, this, {buffer:500});
+                    		}, scope:this}
+                    	}
+                    }, ' ', '-', {
+                    	text: 'Sort By:'
+                    }, {
+                    	id: 'sortSelect',
+                    	xtype: 'combo',
+				        typeAhead: true,
+				        triggerAction: 'all',
+				        width: 100,
+				        editable: false,
+				        mode: 'local',
+				        displayField: 'desc',
+				        valueField: 'name',
+				        lazyInit: false,
+				        value: 'name',
+				        store: new Ext.data.ArrayStore({
+					        fields: ['name', 'desc'],
+					        data : [['name', 'Name'],['size', 'File Size'],['lastmod', 'Last Modified']]
+					    }),
+					    listeners: {
+							'select': {fn:this.sortImages, scope:this}
+					    }
+				    }]
+				},{
+					id: 'img-detail-panel',
+					region: 'east',
+					split: true,
+					width: 150,
+					minWidth: 150,
+					maxWidth: 250
+				}],
+				buttons: [{
+					id: 'ok-btn',
+					text: 'OK',
+					handler: this.doCallback,
+					scope: this
+				},{
+					text: 'Cancel',
+					handler: function(){ this.win.hide(); },
+					scope: this
+				}],
+				keys: {
+					key: 27, // Esc key
+					handler: function(){ this.win.hide(); },
+					scope: this
+				}
+			};
+			Ext.apply(cfg, this.config);
+		    this.win = new Ext.Window(cfg);
+		}
+
+		this.reset();
+	    this.win.show(el);
+		this.callback = callback;
+		this.animateTarget = el;
+	},
+
+	initTemplates : function(){
+		this.thumbTemplate = new Ext.XTemplate(
+			'<tpl for=".">',
+				'<div class="thumb-wrap" id="{name}">',
+				'<div class="thumb"><img src="{url}" title="{name}"></div>',
+				'<span>{shortName}</span></div>',
+			'</tpl>'
+		);
+		this.thumbTemplate.compile();
+
+		this.detailsTemplate = new Ext.XTemplate(
+			'<div class="details">',
+				'<tpl for=".">',
+					'<img src="{url}"><div class="details-info">',
+					'<b>Image Name:</b>',
+					'<span>{name}</span>',
+					'<b>Size:</b>',
+					'<span>{sizeString}</span>',
+					'<b>Last Modified:</b>',
+					'<span>{dateString}</span></div>',
+				'</tpl>',
+			'</div>'
+		);
+		this.detailsTemplate.compile();
+	},
+
+	showDetails : function(){
+	    var selNode = this.view.getSelectedNodes();
+	    var detailEl = Ext.getCmp('img-detail-panel').body;
+		if(selNode && selNode.length > 0){
+			selNode = selNode[0];
+			Ext.getCmp('ok-btn').enable();
+		    var data = this.lookup[selNode.id];
+            detailEl.hide();
+            this.detailsTemplate.overwrite(detailEl, data);
+            detailEl.slideIn('l', {stopFx:true,duration:.2});
+		}else{
+		    Ext.getCmp('ok-btn').disable();
+		    detailEl.update('');
+		}
+	},
+
+	filter : function(){
+		var filter = Ext.getCmp('filter');
+		this.view.store.filter('name', filter.getValue());
+		this.view.select(0);
+	},
+
+	sortImages : function(){
+		var v = Ext.getCmp('sortSelect').getValue();
+    	this.view.store.sort(v, v == 'name' ? 'asc' : 'desc');
+    	this.view.select(0);
+    },
+
+	reset : function(){
+		if(this.win.rendered){
+			Ext.getCmp('filter').reset();
+			this.view.getEl().dom.scrollTop = 0;
+		}
+	    this.view.store.clearFilter();
+		this.view.select(0);
+	},
+
+	doCallback : function(){
+        var selNode = this.view.getSelectedNodes()[0];
+		var callback = this.callback;
+		var lookup = this.lookup;
+		this.win.hide(this.animateTarget, function(){
+            if(selNode && callback){
+				var data = lookup[selNode.id];
+				callback(data);
+			}
+		});
+    },
+
+	onLoadException : function(v,o){
+	    this.view.getEl().update('<div style="padding:10px;">Error loading images.</div>');
+	}
+};
+
+String.prototype.ellipse = function(maxLength){
+    if(this.length > maxLength){
+        return this.substr(0, maxLength-3) + '...';
+    }
+    return this;
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.css	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#images-view .x-panel-body{
+	background: white;
+	font: 11px Arial, Helvetica, sans-serif;
+}
+#images-view .thumb{
+	background: #dddddd;
+	padding: 3px;
+}
+#images-view .thumb img{
+	height: 60px;
+	width: 80px;
+}
+#images-view .thumb-wrap{
+	float: left;
+	margin: 4px;
+	margin-right: 0;
+	padding: 5px;
+}
+#images-view .thumb-wrap span{
+	display: block;
+	overflow: hidden;
+	text-align: center;
+}
+
+#images-view .x-view-over{
+    border:1px solid #dddddd;
+    background: #efefef url(../../resources/images/default/grid/row-over.gif) repeat-x left top;
+	padding: 4px;
+}
+
+#images-view .x-view-selected{
+	background: #eff5fb url(images/selected.gif) no-repeat right bottom;
+	border:1px solid #99bbe8;
+	padding: 4px;
+}
+#images-view .x-view-selected .thumb{
+	background:transparent;
+}
+
+#images-view .loading-indicator {
+	font-size:11px;
+	background-image:url('../../resources/images/default/grid/loading.gif');
+	background-repeat: no-repeat;
+	background-position: left;
+	padding-left:20px;
+	margin:10px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.html	(revision 625)
@@ -0,0 +1,28 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>DataView Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="../ux/DataView-more.js"></script>
+    <script type="text/javascript" src="data-view.js"></script>
+    <link rel="stylesheet" type="text/css" href="data-view.css" />
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>DataView Example</h1>
+<p>This example shows how to use an Ext.DataView.  It demonstrates editable labels (click<br />
+any of the photo labels), basic multi-select (using ctrl or shift) and drag selection.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/data-view.js	(revision 625)
@@ -0,0 +1,69 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var xd = Ext.data;
+
+    var store = new Ext.data.JsonStore({
+        url: 'get-images.php',
+        root: 'images',
+        fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date', dateFormat:'timestamp'}]
+    });
+    store.load();
+
+    var tpl = new Ext.XTemplate(
+		'<tpl for=".">',
+            '<div class="thumb-wrap" id="{name}">',
+		    '<div class="thumb"><img src="{url}" title="{name}"></div>',
+		    '<span class="x-editable">{shortName}</span></div>',
+        '</tpl>',
+        '<div class="x-clear"></div>'
+	);
+
+    var panel = new Ext.Panel({
+        id:'images-view',
+        frame:true,
+        width:535,
+        autoHeight:true,
+        collapsible:true,
+        layout:'fit',
+        title:'Simple DataView (0 items selected)',
+
+        items: new Ext.DataView({
+            store: store,
+            tpl: tpl,
+            autoHeight:true,
+            multiSelect: true,
+            overClass:'x-view-over',
+            itemSelector:'div.thumb-wrap',
+            emptyText: 'No images to display',
+
+            plugins: [
+                new Ext.DataView.DragSelector(),
+                new Ext.DataView.LabelEditor({dataIndex: 'name'})
+            ],
+
+            prepareData: function(data){
+                data.shortName = Ext.util.Format.ellipsis(data.name, 15);
+                data.sizeString = Ext.util.Format.fileSize(data.size);
+                data.dateString = data.lastmod.format("m/d/Y g:i a");
+                return data;
+            },
+            
+            listeners: {
+            	selectionchange: {
+            		fn: function(dv,nodes){
+            			var l = nodes.length;
+            			var s = l != 1 ? 's' : '';
+            			panel.setTitle('Simple DataView ('+l+' item'+s+' selected)');
+            		}
+            	}
+            }
+        })
+    });
+    panel.render(document.body);
+
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/get-images.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/get-images.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/get-images.php	(revision 625)
@@ -0,0 +1,14 @@
+<?php
+$dir = "images/thumbs/";
+$images = array();
+$d = dir($dir);
+while($name = $d->read()){
+    if(!preg_match('/\.(jpg|gif|png)$/', $name)) continue;
+    $size = filesize($dir.$name);
+    $lastmod = filemtime($dir.$name)*1000;
+    $images[] = array('name'=>$name, 'size'=>$size,
+			'lastmod'=>$lastmod, 'url'=>$dir.$name);
+}
+$d->close();
+$o = array('images'=>$images);
+echo json_encode($o);
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.css	(revision 625)
@@ -0,0 +1,6 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.html	(revision 625)
@@ -0,0 +1,26 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>ListView Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script type="text/javascript" src="list-view.js"></script>
+    <link rel="stylesheet" type="text/css" href="list-view.css" />
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>ListView Example</h1>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/view/list-view.js	(revision 625)
@@ -0,0 +1,58 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+
+    var store = new Ext.data.JsonStore({
+        url: 'get-images.php',
+        root: 'images',
+        fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date', dateFormat:'timestamp'}]
+    });
+    store.load();
+
+    var listView = new Ext.ListView({
+        store: store,
+        multiSelect: true,
+        emptyText: 'No images to display',
+        reserveScrollOffset: true,
+
+        columns: [{
+            header: 'File',
+            width: .5,
+            dataIndex: 'name'
+        },{
+            header: 'Last Modified',
+            width: .35, 
+            dataIndex: 'lastmod',
+            tpl: '{lastmod:date("m-d h:i a")}'
+        },{
+            header: 'Size',
+            dataIndex: 'size',
+            tpl: '{size:fileSize}',
+            align: 'right'
+        }]
+    });
+    
+    // put it in a Panel so it looks pretty
+    var panel = new Ext.Panel({
+        id:'images-view',
+        width:425,
+        height:250,
+        collapsible:true,
+        layout:'fit',
+        title:'Simple ListView <i>(0 items selected)</i>',
+        items: listView
+    });
+    panel.render(document.body);
+
+    // little bit of feedback
+    listView.on('selectionchange', function(view, nodes){
+        var l = nodes.length;
+        var s = l != 1 ? 's' : '';
+        panel.setTitle('Simple ListView <i>('+l+' item'+s+' selected)</i>');
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.html	(revision 625)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>GMap Window Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+<!-- GMaps API Key that works for www.extjs.com -->
+<!--<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA2CKu_qQN-JHtlfQ5L7BLlRRadLUjZPtnrRT4mXZqcP4UUH-2OxREmPm3GpN_NHsHuvuHd-QKI4YoRg" type="text/javascript"></script>-->
+<!-- GMaps API Key that works for localhost -->
+<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAA2CKu_qQN-JHtlfQ5L7BLlRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQl3I3p2yrGARYK4f4bkjp9NHpm5w" type="text/javascript"></script>
+
+
+    <script src="../ux/GMapPanel.js"></script>
+    <script src="gmap.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+    .x-panel-body p {
+        margin:10px;
+        font-size:12px;
+    }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>GMap Window</h1>
+<p>This example shows how to create an extension and utilize an external library.</p>
+<input type="button" id="show-btn" value="Gimme a Map" /><br /><br />
+<p>Note that the js is not minified so it is readable. See <a href="GMapPanel.js">GMapPanel.js</a> and <a href="gmap.js">gmap.js</a> for the full source code.</p>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/gmap.js	(revision 625)
@@ -0,0 +1,59 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+Ext.onReady(function(){
+
+    var mapwin;
+    var button = Ext.get('show-btn');
+
+    button.on('click', function(){
+        // create the window on the first click and reuse on subsequent clicks
+        if(!mapwin){
+
+            mapwin = new Ext.Window({
+                layout: 'fit',
+                title: 'GMap Window',
+                closeAction: 'hide',
+                width:400,
+                height:400,
+                x: 40,
+                y: 60,
+                items: {
+                    xtype: 'gmappanel',
+                    region: 'center',
+                    zoomLevel: 14,
+                    gmapType: 'map',
+                    mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
+                    mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
+                    setCenter: {
+                        geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
+                        marker: {title: 'Fenway Park'}
+                    },
+                    markers: [{
+                        lat: 42.339641,
+                        lng: -71.094224,
+                        marker: {title: 'Boston Museum of Fine Arts'},
+                        listeners: {
+                            click: function(e){
+                                Ext.Msg.alert('Its fine', 'and its art.');
+                            }
+                        }
+                    },{
+                        lat: 42.339419,
+                        lng: -71.09077,
+                        marker: {title: 'Northeastern University'}
+                    }]
+                }
+            });
+            
+        }
+        
+        mapwin.show();
+        
+    });
+    
+ });
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.html	(revision 625)
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Hello World Window Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+ 	<!-- LIBS -->
+ 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+ 	<!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="hello.js"></script>
+
+<!-- Common Styles for the examples -->
+<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+
+    <style type="text/css">
+    .x-panel-body p {
+        margin:10px;
+        font-size:12px;
+    }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+
+<h1>Hello World Window</h1>
+<p>This example shows how to create a very simple modal Window with "autoTabs" from existing markup.</p>
+<input type="button" id="show-btn" value="Hello World" /><br /><br />
+<p>Note that the js is not minified so it is readable. See <a href="hello.js">hello.js</a> for the full source code.</p>
+
+<div id="hello-win" class="x-hidden">
+    <div class="x-window-header">Hello Dialog</div>
+    <div id="hello-tabs">
+        <!-- Auto create tab 1 -->
+        <div class="x-tab" title="Hello World 1">
+            <p>Hello...</p>
+        </div>
+        <!-- Auto create tab 2 -->
+        <div class="x-tab" title="Hello World 2">
+            <p>... World!</p>
+        </div>
+    </div>
+</div>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/hello.js	(revision 625)
@@ -0,0 +1,43 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    var win;
+    var button = Ext.get('show-btn');
+
+    button.on('click', function(){
+        // create the window on the first click and reuse on subsequent clicks
+        if(!win){
+            win = new Ext.Window({
+                applyTo:'hello-win',
+                layout:'fit',
+                width:500,
+                height:300,
+                closeAction:'hide',
+                plain: true,
+
+                items: new Ext.TabPanel({
+                    applyTo: 'hello-tabs',
+                    autoTabs:true,
+                    activeTab:0,
+                    deferredRender:false,
+                    border:false
+                }),
+
+                buttons: [{
+                    text:'Submit',
+                    disabled:true
+                },{
+                    text: 'Close',
+                    handler: function(){
+                        win.hide();
+                    }
+                }]
+            });
+        }
+        win.show(this);
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.html	(revision 625)
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Window Layouts Example</title>
+    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
+
+    <!-- GC -->
+    <!-- LIBS -->
+    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+    <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+
+    <script language="javascript" src="../state/save-state.php"></script>
+    <script language="javascript" src="../state/get-state.php"></script>
+    <script language="javascript" src="../state/SessionProvider.js"></script>
+    <script language="javascript" src="layout.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css"/>
+
+    <style type="text/css">
+        .x-panel-body p {
+            margin: 10px;
+            font-size: 12px;
+        }
+    </style>
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script>
+<!-- EXAMPLES -->
+<h1>Windows with Layouts</h1>
+<p>This example shows how Ext containers can be nested in windows to create advanced layouts.</p>
+<input type="button" id="show-btn" value="Show Window"/><br/><br/>
+<p>Note that the js is not minified so it is readable. See <a href="layout.js">layout.js</a> for the full source code.</p>
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/window/layout.js	(revision 625)
@@ -0,0 +1,61 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){
+    
+    Ext.state.Manager.setProvider(
+            new Ext.state.SessionProvider({state: Ext.appState}));
+
+    var button = Ext.get('show-btn');
+
+    button.on('click', function(){
+
+        // tabs for the center
+        var tabs = new Ext.TabPanel({
+            region: 'center',
+            margins:'3 3 3 0', 
+            activeTab: 0,
+            defaults:{autoScroll:true},
+
+            items:[{
+                title: 'Bogus Tab',
+                html: Ext.example.bogusMarkup
+            },{
+                title: 'Another Tab',
+                html: Ext.example.bogusMarkup
+            },{
+                title: 'Closable Tab',
+                html: Ext.example.bogusMarkup,
+                closable:true
+            }]
+        });
+
+        // Panel for the west
+        var nav = new Ext.Panel({
+            title: 'Navigation',
+            region: 'west',
+            split: true,
+            width: 200,
+            collapsible: true,
+            margins:'3 0 3 3',
+            cmargins:'3 3 3 3'
+        });
+
+        var win = new Ext.Window({
+            title: 'Layout Window',
+            closable:true,
+            width:600,
+            height:350,
+            //border:false,
+            plain:true,
+            layout: 'border',
+
+            items: [nav, tabs]
+        });
+
+        win.show(this);
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserForm.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserForm.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserForm.js	(revision 625)
@@ -0,0 +1,133 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('App', 'App.user');
+/**
+ * @class App.user.FormPanel
+ * A typical FormPanel extension
+ */
+App.user.Form = Ext.extend(Ext.form.FormPanel, {
+    renderTo: 'user-form',
+    iconCls: 'silk-user',
+    frame: true,
+    labelAlign: 'right',
+    title: 'User -- All fields are required',
+    frame: true,
+    width: 500,
+    defaultType: 'textfield',
+    defaults: {
+        anchor: '100%'
+    },
+
+    // private A pointer to the currently loaded record
+    record : null,
+
+    /**
+     * initComponent
+     * @protected
+     */
+    initComponent : function() {
+        // build the form-fields.  Always a good idea to defer form-building to a method so that this class can
+        // be over-ridden to provide different form-fields
+        this.items = this.buildForm();
+
+        // build form-buttons
+        this.buttons = this.buildUI();
+
+        // add a create event for convenience in our application-code.
+        this.addEvents({
+            /**
+             * @event create
+             * Fires when user clicks [create] button
+             * @param {FormPanel} this
+             * @param {Object} values, the Form's values object
+             */
+            create : true
+        });
+
+        // super
+        App.user.Form.superclass.initComponent.call(this);
+    },
+
+    /**
+     * buildform
+     * @private
+     */
+    buildForm : function() {
+        return [
+            {fieldLabel: 'Email', name: 'email', allowBlank: false, vtype: 'email'},
+            {fieldLabel: 'First', name: 'first', allowBlank: false},
+            {fieldLabel: 'Last', name: 'last', allowBlank: false}
+        ];
+    },
+
+    /**
+     * buildUI
+     * @private
+     */
+    buildUI: function(){
+        return [{
+            text: 'Save',
+            iconCls: 'icon-save',
+            handler: this.onUpdate,
+            scope: this
+        }, {
+            text: 'Create',
+            iconCls: 'silk-user-add',
+            handler: this.onCreate,
+            scope: this
+        }, {
+            text: 'Reset',
+            handler: function(btn, ev){
+                this.getForm().reset();
+            },
+            scope: this
+        }];
+    },
+
+    /**
+     * loadRecord
+     * @param {Record} rec
+     */
+    loadRecord : function(rec) {
+        this.record = rec;
+        this.getForm().loadRecord(rec);
+    },
+
+    /**
+     * onUpdate
+     */
+    onUpdate : function(btn, ev) {
+        if (this.record == null) {
+            return;
+        }
+        if (!this.getForm().isValid()) {
+            App.setAlert(false, "Form is invalid.");
+            return false;
+        }
+        this.getForm().updateRecord(this.record);
+    },
+
+    /**
+     * onCreate
+     */
+    onCreate : function(btn, ev) {
+        if (!this.getForm().isValid()) {
+            App.setAlert(false, "Form is invalid");
+            return false;
+        }
+        this.fireEvent('create', this, this.getForm().getValues());
+        this.getForm().reset();
+    },
+
+    /**
+     * onReset
+     */
+    onReset : function(btn, ev) {
+        this.fireEvent('update', this, this.getForm().getValues());
+        this.getForm().reset();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/UserGrid.js	(revision 625)
@@ -0,0 +1,134 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns('App', 'App.user');
+/**
+ * App.user.Grid
+ * A typical EditorGridPanel extension.
+ */
+App.user.Grid = Ext.extend(Ext.grid.EditorGridPanel, {
+    renderTo: 'user-grid',
+    iconCls: 'silk-grid',
+    frame: true,
+    title: 'Users',
+    height: 300,
+    width: 500,
+    style: 'margin-top: 10px',
+
+    initComponent : function() {
+
+        // typical viewConfig
+        this.viewConfig = {
+            forceFit: true
+        };
+
+        // relay the Store's CRUD events into this grid so these events can be conveniently listened-to in our application-code.
+        this.relayEvents(this.store, ['destroy', 'save', 'update']);
+
+        // build toolbars and buttons.
+        this.tbar = this.buildTopToolbar();
+        this.bbar = this.buildBottomToolbar();
+        this.buttons = this.buildUI();
+
+        // super
+        App.user.Grid.superclass.initComponent.call(this);
+    },
+
+    /**
+     * buildTopToolbar
+     */
+    buildTopToolbar : function() {
+        return [{
+            text: 'Add',
+            iconCls: 'silk-add',
+            handler: this.onAdd,
+            scope: this
+        }, '-', {
+            text: 'Delete',
+            iconCls: 'silk-delete',
+            handler: this.onDelete,
+            scope: this
+        }, '-'];
+    },
+
+    /**
+     * buildBottomToolbar
+     */
+    buildBottomToolbar : function() {
+        return ['<b>@cfg:</b>', '-', {
+            text: 'autoSave',
+            enableToggle: true,
+            pressed: true,
+            tooltip: 'When enabled, Store will execute Ajax requests as soon as a Record becomes dirty.',
+            toggleHandler: function(btn, pressed) {
+                this.store.autoSave = pressed;
+            },
+            scope: this
+        }, '-', {
+            text: 'batch',
+            enableToggle: true,
+            pressed: true,
+            tooltip: 'When enabled, Store will batch all records for each type of CRUD verb into a single Ajax request.',
+            toggleHandler: function(btn, pressed) {
+                this.store.batch = pressed;
+            },
+            scope: this
+        }, '-', {
+            text: 'writeAllFields',
+            enableToggle: true,
+            tooltip: 'When enabled, Writer will write *all* fields to the server -- not just those that changed.',
+            toggleHandler: function(btn, pressed) {
+                store.writer.writeAllFields = pressed;
+            },
+            scope: this
+        }, '-'];
+    },
+
+    /**
+     * buildUI
+     */
+    buildUI : function() {
+        return [{
+            text: 'Save',
+            iconCls: 'icon-save',
+            handler: this.onSave,
+            scope: this
+        }];
+    },
+
+    /**
+     * onSave
+     */
+    onSave : function(btn, ev) {
+        this.store.save();
+    },
+
+    /**
+     * onAdd
+     */
+    onAdd : function(btn, ev) {
+        var u = new this.store.recordType({
+            first : '',
+            last: '',
+            email : ''
+        });
+        this.stopEditing();
+        this.store.insert(0, u);
+        this.startEditing(0, 1);
+    },
+
+    /**
+     * onDelete
+     */
+    onDelete : function(btn, ev) {
+        var index = this.getSelectionModel().getSelectedCell();
+        if (!index) {
+            return false;
+        }
+        var rec = this.store.getAt(index[0]);
+        this.store.remove(rec);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/app.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/app.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/app.php	(revision 625)
@@ -0,0 +1,17 @@
+<?php
+    require('remote/init.php');
+
+    // Get Request
+    $request = new Request(array('restful' => false));
+
+    //echo "<P>request: " . $request->to_string();
+
+    // Get Controller
+    require('remote/app/controllers/' . $request->controller . '.php');
+    $controller_name = ucfirst($request->controller);
+    $controller = new $controller_name;
+
+
+    // Dispatch request
+    echo $controller->dispatch($request);
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/controllers/users.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/controllers/users.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/controllers/users.php	(revision 625)
@@ -0,0 +1,102 @@
+<?php
+/**
+ * @class Users
+ * A simple application controller extension
+ */
+class Users extends ApplicationController {
+    /**
+     * view
+     * Retrieves rows from database.
+     */
+    public function view() {
+        $res = new Response();
+        $res->success = true;
+        $res->message = "Loaded data";
+        $res->data = User::all();
+        return $res->to_json();
+    }
+    /**
+     * create
+     */
+    public function create() {
+        $res = new Response();
+
+        // Ugh, php...check if !hash
+        if (is_array($this->params) && !empty($this->params) && preg_match('/^\d+$/', implode('', array_keys($this->params)))) {
+            foreach ($this->params as $data) {
+                array_push($res->data, User::create($data)->to_hash());
+            }
+            $res->success = true;
+            $res->message = "Created " . count($res->data) . ' records';
+        } else {
+            if ($rec =  User::create($this->params)) {
+                $res->success = true;
+                $res->data = $rec->to_hash();
+                $res->message = "Created record";
+            } else {
+                $res->success = false;
+                $res->message = "Failed to create record";
+            }
+        }
+        return $res->to_json();
+    }
+
+    /**
+     * update
+     */
+    public function update() {
+        $res = new Response();
+        if (is_array($this->id)) {
+            $res->data = array();
+            foreach ($this->id as $idx => $id) {
+                if ($rec = User::update($id, $this->params[$idx])) {
+                    array_push($res->data, $rec->to_hash());
+                }
+            }
+            $res->success = true;
+            $res->message = "Updated " . count($res->data) . " records";
+        } else {
+            if ($rec = User::update($this->id, $this->params)) {
+                $res->data = $rec->to_hash();
+                $res->success = true;
+                $res->message = "Updated record";
+            } else {
+                $res->message = "Failed to updated record";
+                $res->success = false;
+            }
+            // SIMULATE ERROR:  All records having odd-numbered ID have error.
+            if ($this->id % 2) {
+                $res->success = false;
+                $res->message = "SIMULATED ERROR:  Lorem ipsum dolor sit amet, placerat consectetuer, nec lacus imperdiet velit dui interdum vestibulum, sagittis lectus morbi, urna aliquet minus natoque commodo egestas non, libero libero arcu sed sed.";
+            }
+        }
+        return $res->to_json();
+    }
+
+    /**
+     * destroy
+     */
+    public function destroy() {
+        $res = new Response();
+
+        if (is_array($this->params)) {
+            $destroyed = array();
+            foreach ($this->params as $id) {
+                if ($rec = User::destroy($id)) {
+                    array_push($destroyed, $rec);
+                }
+            }
+            $res->success = true;
+            $res->message = 'Destroyed ' . count($destroyed) . ' records';
+        } else {
+            if ($rec = User::destroy($this->params)) {
+                $res->message = "Destroyed User";
+                $res->success = true;
+            } else {
+                $res->message = "Failed to Destroy user";
+            }
+        }
+        return $res->to_json();
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/models/user.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/models/user.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/app/models/user.php	(revision 625)
@@ -0,0 +1,7 @@
+<?php
+/**
+ * @class User
+ */
+class User extends Model {
+
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/init.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/init.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/init.php	(revision 625)
@@ -0,0 +1,17 @@
+<?php
+    session_start();
+
+    // base framework
+    require(dirname(__FILE__).'/lib/session_db.php');
+    require(dirname(__FILE__).'/lib/application_controller.php');
+    require(dirname(__FILE__).'/lib/model.php');
+    require(dirname(__FILE__).'/lib/request.php');
+    require(dirname(__FILE__).'/lib/response.php');
+
+    // require /models (Should iterate app/models and auto-include all files there)
+    require(dirname(__FILE__).'/app/models/user.php');
+
+    // Fake a database connection using _SESSION
+    $dbh = new SessionDB();
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/application_controller.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/application_controller.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/application_controller.php	(revision 625)
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @class ApplicationController
+ */
+class ApplicationController {
+    public $request, $id, $params;
+
+    /**
+     * dispatch
+     * Dispatch request to appropriate controller-action by convention according to the HTTP method.
+     */
+    public function dispatch($request) {
+        $this->request = $request;
+        $this->id = $request->id;
+        $this->params = $request->params;
+
+        if ($request->isRestful()) {
+            return $this->dispatchRestful();
+        }
+        if ($request->action) {
+            return $this->{$request->action}();
+        }
+
+        // normal dispatch here.  discover action
+    }
+
+    protected function dispatchRestful() {
+        switch ($this->request->method) {
+            case 'GET':
+                return $this->view();
+                break;
+            case 'POST':
+                return $this->create();
+                break;
+            case 'PUT':
+                return $this->update();
+                break;
+            case 'DELETE':
+                return $this->destroy();
+                break;
+        }
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/model.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/model.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/model.php	(revision 625)
@@ -0,0 +1,70 @@
+<?php
+/**
+ * @class Model
+ * Baseclass for Models in this imaginary ORM
+ */
+class Model {
+    public $id, $attributes;
+    static function create($params) {
+        $obj = new self($params);
+        $obj->save();
+        return $obj;
+    }
+    static function find($id) {
+        global $dbh;
+        $found = null;
+        foreach ($dbh->rs() as $rec) {
+            if ($rec['id'] == $id) {
+                $found = new self($rec);
+                break;
+            }
+        }
+        return $found;
+    }
+    static function update($id, $params) {
+        global $dbh;
+        $rec = self::find($id);
+        if ($rec == null) {
+            return $rec;
+        }
+        $rs = $dbh->rs();
+        foreach ($rs as $idx => $row) {
+            if ($row['id'] == $id) {
+                $rec->attributes = array_merge($rec->attributes, $params);
+                $dbh->update($idx, $rec->attributes);
+                break;
+            }
+        }
+        return $rec;
+    }
+    static function destroy($id) {
+        global $dbh;
+        $rec = null;
+        $rs = $dbh->rs();
+        foreach ($rs as $idx => $row) {
+            if ($row['id'] == $id) {
+                $rec = new self($dbh->destroy($idx));
+                break;
+            }
+        }
+        return $rec;
+    }
+    static function all() {
+        global $dbh;
+        return $dbh->rs();
+    }
+
+    public function __construct($params) {
+        $this->id = $params["id"] || null;
+        $this->attributes = $params;
+    }
+    public function save() {
+        global $dbh;
+        $this->attributes['id'] = $dbh->pk();
+        $dbh->insert($this->attributes);
+    }
+    public function to_hash() {
+        return $this->attributes;
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/request.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/request.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/request.php	(revision 625)
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * @class Request
+ */
+class Request {
+    public $restful, $method, $controller, $action, $id, $params;
+    public function __construct($params) {
+        $this->restful = (isset($params["restful"])) ? $params["restful"] : false;
+        $this->method = $_SERVER["REQUEST_METHOD"];
+        $this->parseRequest();
+    }
+    public function isRestful() {
+        return $this->restful;
+    }
+    public function to_string() {
+        return "controller: " . $this->controller . ', action: ' . $this->action . ', id: ' . $this->id;
+    }
+    protected function parseRequest() {
+        if ($this->method == 'PUT') {   // <-- Have to jump through hoops to get PUT data
+            $raw  = '';
+            $httpContent = fopen('php://input', 'r');
+            while ($kb = fread($httpContent, 1024)) {
+                $raw .= $kb;
+            }
+            fclose($httpContent);
+            $params = array();
+            parse_str($raw, $params);
+            $this->id = (isset($params['id'])) ? $params['id'] : null;
+            $this->params = (isset($params['data'])) ? json_decode(stripslashes($params['data']), true) : null;
+        } else {
+            // grab JSON data if there...
+            $this->params = (isset($_REQUEST['data'])) ? json_decode(stripslashes($_REQUEST['data']), true) : null;
+            $this->id = (isset($_REQUEST['id'])) ? json_decode(stripslashes($_REQUEST['id']), true) : null;
+        }
+        // parse path info
+        if (isset($_SERVER["PATH_INFO"])){
+            $cai = '/^\/([a-z]+\w)\/([a-z]+\w)\/([0-9]+)$/';    // /controller/action/id
+            $ca =  '/^\/([a-z]+\w)\/([a-z]+\w)$/';              // /controller/action
+            $ci = '/^\/([a-z]+\w)\/([0-9]+)$/';               // /controller/id
+            $c =  '/^\/([a-z]+)$/';                             // /controller
+            $i =  '/^\/([0-9]+)$/';                             // /id
+            $matches = array();
+            if (preg_match($cai, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->action = $matches[2];
+                $this->id = $matches[3];
+            } else if (preg_match($ca, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->action = $matches[2];
+            } else if (preg_match($ci, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+                $this->id = $matches[2];
+            } else if (preg_match($c, $_SERVER["PATH_INFO"], $matches)) {
+                $this->controller = $matches[1];
+            } else if (preg_match($i, $_SERVER["PATH_INFO"], $matches)) {
+                $this->id = $matches[1];
+            }
+        }
+    }
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/response.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/response.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/response.php	(revision 625)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @class Response
+ * A simple JSON Response class.
+ */
+class Response {
+    public $success, $data, $message, $errors, $tid, $trace;
+
+    public function __construct($params = array()) {
+        $this->success  = isset($params["success"]) ? $params["success"] : false;
+        $this->message  = isset($params["message"]) ? $params["message"] : '';
+        $this->data     = isset($params["data"])    ? $params["data"]    : array();
+    }
+
+    public function to_json() {
+        return json_encode(array(
+            'success'   => $this->success,
+            'message'   => $this->message,
+            'data'      => $this->data
+        ));
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/session_db.php
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/session_db.php	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/remote/lib/session_db.php	(revision 625)
@@ -0,0 +1,42 @@
+<?php
+ /**
+ * @class SessionDB
+ * Fake Database.  Stores records in $_SESSION
+ */
+class SessionDB {
+    public function __construct() {
+        if (!isset($_SESSION['pk'])) {
+            $_SESSION['pk'] = 10;           // <-- start fake pks at 10
+            $_SESSION['rs'] = getData();    // <-- populate $_SESSION with data.
+        }
+    }
+    // fake a database pk
+    public function pk() {
+        return $_SESSION['pk']++;
+    }
+    // fake a resultset
+    public function rs() {
+        return $_SESSION['rs'];
+    }
+    public function insert($rec) {
+        array_push($_SESSION['rs'], $rec);
+    }
+    public function update($idx, $attributes) {
+        $_SESSION['rs'][$idx] = $attributes;
+    }
+    public function destroy($idx) {
+        return array_shift(array_splice($_SESSION['rs'], $idx, 1));
+    }
+}
+
+// Sample data.
+function getData() {
+    return array(
+        array('id' => 1, 'first' => "Fred", 'last' => 'Flintstone', 'email' => 'fred@flintstone.com'),
+        array('id' => 2, 'first' => "Wilma", 'last' => 'Flintstone', 'email' => 'wilma@flintstone.com'),
+        array('id' => 3, 'first' => "Pebbles", 'last' => 'Flintstone', 'email' => 'pebbles@flintstone.com'),
+        array('id' => 4, 'first' => "Barney", 'last' => 'Rubble', 'email' => 'barney@rubble.com'),
+        array('id' => 5, 'first' => "Betty", 'last' => 'Rubble', 'email' => 'betty@rubble.com'),
+        array('id' => 6, 'first' => "BamBam", 'last' => 'Rubble', 'email' => 'bambam@rubble.com')
+    );
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.css	(revision 625)
@@ -0,0 +1,6 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.html
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.html	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.html	(revision 625)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Grid with DataWriter Example</title>
+
+<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
+
+    <!-- GC -->
+     <!-- LIBS -->
+     <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
+     <!-- ENDLIBS -->
+
+    <script type="text/javascript" src="../../ext-all.js"></script>
+    <script type="text/javascript" src="../shared/extjs/App.js"></script>
+    <script type="text/javascript" src="writer.js"></script>
+    <script type="text/javascript" src="UserForm.js"></script>
+    <script type="text/javascript" src="UserGrid.js"></script>
+
+    <!-- Common Styles for the examples -->
+    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
+    <link rel="stylesheet" type="text/css" href="../shared/icons/silk.css" />
+</head>
+<body>
+<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
+<h1>Ext.data.DataWriter Example</h1>
+<p>This example shows how to implement a Writer for your Store.  A Writer-enabled Store frees you from having to manually compose Ajax requests
+to perform CRUD actions on a Store.</p>
+<p>Note that the js is not minified so it is readable. See <a href="writer.js">writer.js</a>, <a href="UserForm.js">UserForm.js</a> and
+<a href="UserGrid.js">UserGrid.js</a>.</p>
+
+<p>The HttpProxy plugged into the store in this example uses the new <em>api</em> configuration instead of an <em>url</em>.
+A simple MVC-like php backend has been created for this example which simulates a database by storing records in $_SESSION.  See the file /remote/app/controllers/users.php.  You may have to configure
+your web-server to allow scripts to be executed in the /examples directory.</p>
+
+<code><pre>
+var proxy = new Ext.data.HttpProxy({
+    api: {
+        read    : 'app.php/users/read',
+        create  : 'app.php/users/create',
+        update  : 'app.php/users/update',
+        destroy : 'app.php/users/destroy'
+    }
+});
+</pre></code>
+
+<p>Take note of the requests being generated in Firebug as you interact with the Grid and Form.</p>
+
+<p>An <b>Error has been simulated</b> on the server-side:  Attempting to update a record having ODD-numbered id will generate this errror.
+Responses from the update action will have successProperty === false along with a message.  This error can be handled by
+listening to the <b>"exception"</b> event upon your Store.</p>
+
+<code><pre>
+exception : function(proxy, type, action, options, res, arg) {
+    if (type === 'remote') {
+        Ext.Msg.show({
+            title: 'REMOTE EXCEPTION',
+            msg: res.message,
+            icon: Ext.MessageBox.ERROR
+        });
+    }
+}
+</pre></code>
+<p><b>Note: This new "exception" event supercedes the old loadexception event which is now deprecated.</b></p>
+
+<div class="container" style="width:500px">
+    <div id="user-form"></div>
+    <div id="user-grid"></div>
+</div>
+
+</body>
+</html>
Index: trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/examples/writer/writer.js	(revision 625)
@@ -0,0 +1,109 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Application instance for showing user-feedback messages.
+var App = new Ext.App({});
+
+// Create HttpProxy instance.  Notice new configuration parameter "api" here instead of load.  However, you can still use
+// the "url" paramater -- All CRUD requests will be directed to your single url instead.
+var proxy = new Ext.data.HttpProxy({
+    api: {
+        read : 'app.php/users/view',
+        create : 'app.php/users/create',
+        update: 'app.php/users/update',
+        destroy: 'app.php/users/destroy'
+    }
+});
+
+// Typical JsonReader.  Notice additional meta-data params for defining the core attributes of your json-response
+var reader = new Ext.data.JsonReader({
+    totalProperty: 'total',
+    successProperty: 'success',
+    idProperty: 'id',
+    root: 'data'
+}, [
+    {name: 'id'},
+    {name: 'email', allowBlank: false},
+    {name: 'first', allowBlank: false},
+    {name: 'last', allowBlank: false}
+]);
+
+// The new DataWriter component.
+var writer = new Ext.data.JsonWriter({
+    encode: true,
+    writeAllFields: false
+});
+
+// Typical Store collecting the Proxy, Reader and Writer together.
+var store = new Ext.data.Store({
+    id: 'user',
+    proxy: proxy,
+    reader: reader,
+    writer: writer,  // <-- plug a DataWriter into the store just as you would a Reader
+    autoSave: true,  // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
+    listeners: {
+        write : function(store, action, result, res, rs) {
+            App.setAlert(res.success, res.message); // <-- show user-feedback for all write actions
+        },
+        exception : function(proxy, type, action, options, res, arg) {
+            if (type === 'remote') {
+                Ext.Msg.show({
+                    title: 'REMOTE EXCEPTION',
+                    msg: res.message,
+                    icon: Ext.MessageBox.ERROR,
+                    buttons: Ext.Msg.OK
+                });
+            }
+        }
+    }
+});
+
+
+// A new generic text field
+var textField =  new Ext.form.TextField();
+
+// Let's pretend we rendered our grid-columns with meta-data from our ORM framework.
+var userColumns =  [
+    {header: "ID", width: 40, sortable: true, dataIndex: 'id'},
+    {header: "Email", width: 100, sortable: true, dataIndex: 'email', editor: textField},
+    {header: "First", width: 50, sortable: true, dataIndex: 'first', editor: textField},
+    {header: "Last", width: 50, sortable: true, dataIndex: 'last', editor: textField}
+];
+
+// load the store immeditately
+store.load();
+
+
+Ext.onReady(function() {
+    Ext.QuickTips.init();
+
+    // create user.Form instance (@see UserForm.js)
+    var userForm = new App.user.Form({
+        renderTo: 'user-form',
+        listeners: {
+            create : function(fpanel, data) {   // <-- custom "create" event defined in App.user.Form class
+                var rec = new userGrid.store.recordType(data);
+                userGrid.store.insert(0, rec);
+            }
+        }
+    });
+
+    // create user.Grid instance (@see UserGrid.js)
+    var userGrid = new App.user.Grid({
+        renderTo: 'user-grid',
+        store: store,
+        columns : userColumns,
+        listeners: {
+            rowclick: function(g, index, ev) {
+                var rec = g.store.getAt(index);
+                userForm.loadRecord(rec);
+            },
+            destroy : function() {
+                userForm.getForm().reset();
+            }
+        }
+    });
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/ext-all-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/ext-all-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/ext-all-debug.js	(revision 625)
@@ -0,0 +1,65610 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DomHelper
+ * <p>The DomHelper class provides a layer of abstraction from DOM and transparently supports creating
+ * elements via DOM or using HTML fragments. It also has the ability to create HTML fragment templates
+ * from your DOM building code.</p>
+ *
+ * <p><b><u>DomHelper element specification object</u></b></p>
+ * <p>A specification object is used when creating elements. Attributes of this object
+ * are assumed to be element attributes, except for 4 special attributes:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>tag</tt></b> : <div class="sub-desc">The tag name of the element</div></li>
+ * <li><b><tt>children</tt></b> : or <tt>cn</tt><div class="sub-desc">An array of the
+ * same kind of element definition objects to be created and appended. These can be nested
+ * as deep as you want.</div></li>
+ * <li><b><tt>cls</tt></b> : <div class="sub-desc">The class attribute of the element.
+ * This will end up being either the "class" attribute on a HTML fragment or className
+ * for a DOM node, depending on whether DomHelper is using fragments or DOM.</div></li>
+ * <li><b><tt>html</tt></b> : <div class="sub-desc">The innerHTML for the element</div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Insertion methods</u></b></p>
+ * <p>Commonly used insertion methods:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #append}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertBefore}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertAfter}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #overwrite}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #createTemplate}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertHtml}</tt></b> : <div class="sub-desc"></div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Example</u></b></p>
+ * <p>This is an example, where an unordered list with 3 children items is appended to an existing
+ * element with id <tt>'my-div'</tt>:<br>
+ <pre><code>
+var dh = Ext.DomHelper; // create shorthand alias
+// specification object
+var spec = {
+    id: 'my-ul',
+    tag: 'ul',
+    cls: 'my-list',
+    // append children after creating
+    children: [     // may also specify 'cn' instead of 'children'
+        {tag: 'li', id: 'item0', html: 'List Item 0'},
+        {tag: 'li', id: 'item1', html: 'List Item 1'},
+        {tag: 'li', id: 'item2', html: 'List Item 2'}
+    ]
+};
+var list = dh.append(
+    'my-div', // the context element 'my-div' can either be the id or the actual node
+    spec      // the specification object
+);
+ </code></pre></p>
+ * <p>Element creation specification parameters in this class may also be passed as an Array of
+ * specification objects. This can be used to insert multiple sibling nodes into an existing
+ * container very efficiently. For example, to add more list items to the example above:<pre><code>
+dh.append('my-ul', [
+    {tag: 'li', id: 'item3', html: 'List Item 3'},
+    {tag: 'li', id: 'item4', html: 'List Item 4'}
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Templating</u></b></p>
+ * <p>The real power is in the built-in templating. Instead of creating or appending any elements,
+ * <tt>{@link #createTemplate}</tt> returns a Template object which can be used over and over to
+ * insert new elements. Revisiting the example above, we could utilize templating this time:
+ * <pre><code>
+// create the node
+var list = dh.append('my-div', {tag: 'ul', cls: 'my-list'});
+// get template
+var tpl = dh.createTemplate({tag: 'li', id: 'item{0}', html: 'List Item {0}'});
+
+for(var i = 0; i < 5, i++){
+    tpl.append(list, [i]); // use template to append to the actual node
+}
+ * </code></pre></p>
+ * <p>An example using a template:<pre><code>
+var html = '<a id="{0}" href="{1}" class="nav">{2}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', ['link1', 'http://www.jackslocum.com/', "Jack&#39;s Site"]);
+tpl.append('blog-roll', ['link2', 'http://www.dustindiaz.com/', "Dustin&#39;s Site"]);
+ * </code></pre></p>
+ *
+ * <p>The same example using named parameters:<pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', {
+    id: 'link1',
+    url: 'http://www.jackslocum.com/',
+    text: "Jack&#39;s Site"
+});
+tpl.append('blog-roll', {
+    id: 'link2',
+    url: 'http://www.dustindiaz.com/',
+    text: "Dustin&#39;s Site"
+});
+ * </code></pre></p>
+ *
+ * <p><b><u>Compiling Templates</u></b></p>
+ * <p>Templates are applied using regular expressions. The performance is great, but if
+ * you are adding a bunch of DOM elements using the same template, you can increase
+ * performance even further by {@link Ext.Template#compile "compiling"} the template.
+ * The way "{@link Ext.Template#compile compile()}" works is the template is parsed and
+ * broken up at the different variable points and a dynamic function is created and eval'ed.
+ * The generated function performs string concatenation of these parts and the passed
+ * variables instead of using regular expressions.
+ * <pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.compile();
+
+//... use template like normal
+ * </code></pre></p>
+ *
+ * <p><b><u>Performance Boost</u></b></p>
+ * <p>DomHelper will transparently create HTML fragments when it can. Using HTML fragments instead
+ * of DOM can significantly boost performance.</p>
+ * <p>Element creation specification parameters may also be strings. If {@link #useDom} is <tt>false</tt>,
+ * then the string is used as innerHTML. If {@link #useDom} is <tt>true</tt>, a string specification
+ * results in the creation of a text node. Usage:</p>
+ * <pre><code>
+Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
+ * </code></pre>
+ * @singleton
+ */
+Ext.DomHelper = function(){
+    var tempTableEl = null,
+    	emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,
+    	tableRe = /^table|tbody|tr|td$/i,
+    	pub,
+    	// kill repeat to save bytes
+    	afterbegin = "afterbegin",
+    	afterend = "afterend",
+    	beforebegin = "beforebegin",
+    	beforeend = "beforeend",
+    	ts = '<table>',
+        te = '</table>',
+        tbs = ts+'<tbody>',
+        tbe = '</tbody>'+te,
+        trs = tbs + '<tr>',
+        tre = '</tr>'+tbe;
+
+    // private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o));
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+    // build as innerHTML where available
+    function createHtml(o){
+	    var b = "",
+	    	attr,
+	    	val,
+	    	key,
+	    	keyVal,
+	    	cn;
+
+        if(typeof o == 'string'){
+            b = o;
+        } else if (Ext.isArray(o)) {
+	        Ext.each(o, function(v) {
+                b += createHtml(v);
+            });
+        } else {
+	        b += "<" + (o.tag = o.tag || "div");
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html$/i.test(attr)){
+                    if (Ext.isObject(val)) {
+                        b += " " + attr + "='";
+                        Ext.iterate(val, function(key, keyVal){
+                            b += key + ":" + keyVal + ";";
+                        });
+                        b += "'";
+                    }else{
+                        b += " " + ({cls : "class", htmlFor : "for"}[attr] || attr) + "='" + val + "'";
+                    }
+                }
+            });
+	        // Now either just close the tag or try to add children and close the tag.
+	        if (emptyTags.test(o.tag)) {
+	            b += "/>";
+	        } else {
+	            b += ">";
+	            if ((cn = o.children || o.cn)) {
+	                b += createHtml(cn);
+	            } else if(o.html){
+	                b += o.html;
+	            }
+	            b += "</" + o.tag + ">";
+        	}
+        }
+        return b;
+    }
+
+    function ieTable(depth, s, h, e){
+        tempTableEl.innerHTML = [s, h, e].join('');
+        var i = -1,
+        	el = tempTableEl;
+        while(++i < depth){
+            el = el.firstChild;
+        }
+        return el;
+    }
+
+    /**
+     * @ignore
+     * Nasty code for IE's broken table implementation
+     */
+    function insertIntoTable(tag, where, el, html) {
+	    var node,
+        	before;
+
+        tempTableEl = tempTableEl || document.createElement('div');
+
+  	    if(tag == 'td' && (where == afterbegin || where == beforeend) ||
+  	       !/td|tr|tbody/i.test(tag) && (where == beforebegin || where == afterend)) {
+            return;
+        }
+        before = where == beforebegin ? el :
+		 		 where == afterend ? el.nextSibling :
+				 where == afterbegin ? el.firstChild : null;
+
+        if (where == beforebegin || where == afterend) {
+        	el = el.parentNode;
+    	}
+
+        if (tag == 'td' || (tag == "tr" && (where == beforeend || where == afterbegin))) {
+	        node = ieTable(4, trs, html, tre);
+        } else if ((tag == "tbody" && (where == beforeend || where == afterbegin)) ||
+        		   (tag == "tr" && (where == beforebegin || where == afterend))) {
+	        node = ieTable(3, tbs, html, tbe);
+        } else {
+	     	node = ieTable(2, ts, html, te);
+        }
+        el.insertBefore(node, before);
+        return node;
+    }
+
+
+    pub = {
+	    /**
+	     * Returns the markup for the passed Element(s) config.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {String}
+	     */
+	    markup : function(o){
+	        return createHtml(o);
+	    },
+
+	    /**
+	     * Inserts an HTML fragment into the DOM.
+	     * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
+	     * @param {HTMLElement} el The context element
+	     * @param {String} html The HTML fragmenet
+	     * @return {HTMLElement} The new node
+	     */
+	    insertHtml : function(where, el, html){
+	        var hash = {},
+	        	hashVal,
+ 	        	setStart,
+	        	range,
+	        	frag,
+	        	rangeEl,
+	        	rs;
+
+	        where = where.toLowerCase();
+	        // add these here because they are used in both branches of the condition.
+	        hash[beforebegin] = ['BeforeBegin', 'previousSibling'];
+	        hash[afterend] = ['AfterEnd', 'nextSibling'];
+
+	        if (el.insertAdjacentHTML) {
+	            if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){
+	            	return rs;
+	            }
+	            // add these two to the hash.
+	            hash[afterbegin] = ['AfterBegin', 'firstChild'];
+	            hash[beforeend] = ['BeforeEnd', 'lastChild'];
+	            if ((hashVal = hash[where])) {
+		        	el.insertAdjacentHTML(hashVal[0], html);
+	            	return el[hashVal[1]];
+	            }
+	        } else {
+		        range = el.ownerDocument.createRange();
+		        setStart = "setStart" + (/end/i.test(where) ? "After" : "Before");
+		        if (hash[where]) {
+			     	range[setStart](el);
+			     	frag = range.createContextualFragment(html);
+			     	el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling);
+			     	return el[(where == beforebegin ? "previous" : "next") + "Sibling"];
+		        } else {
+			        rangeEl = (where == afterbegin ? "first" : "last") + "Child";
+			        if (el.firstChild) {
+				        range[setStart](el[rangeEl]);
+				        frag = range.createContextualFragment(html);
+                        if(where == afterbegin){
+                            el.insertBefore(frag, el.firstChild);
+                        }else{
+                            el.appendChild(frag);
+                        }
+			        } else {
+		 	            el.innerHTML = html;
+	 	            }
+	 	            return el[rangeEl];
+		        }
+	        }
+	        throw 'Illegal insertion point -> "' + where + '"';
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, "nextSibling");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, "firstChild");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    append : function(el, o, returnElement){
+		    return doInsert(el, o, returnElement, beforeend, "", true);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and overwrites the contents of el with them.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    overwrite : function(el, o, returnElement){
+	        el = Ext.getDom(el);
+	        el.innerHTML = createHtml(o);
+	        return returnElement ? Ext.get(el.firstChild) : el.firstChild;
+	    },
+
+	    createHtml : createHtml
+    };
+    return pub;
+}();/**
+ * @class Ext.DomHelper
+ */
+Ext.apply(Ext.DomHelper,
+function(){
+	var pub,
+		afterbegin = 'afterbegin',
+    	afterend = 'afterend',
+    	beforebegin = 'beforebegin',
+    	beforeend = 'beforeend';
+
+	// private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        el = Ext.getDom(el);
+        var newNode;
+        if (pub.useDom) {
+            newNode = createDom(o, null);
+            if (append) {
+	            el.appendChild(newNode);
+            } else {
+	        	(sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el);
+            }
+        } else {
+            newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o));
+        }
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+	// build as dom
+    /** @ignore */
+    function createDom(o, parentNode){
+        var el,
+        	doc = document,
+        	useSet,
+        	attr,
+        	val,
+        	cn;
+
+        if (Ext.isArray(o)) {                       // Allow Arrays of siblings to be inserted
+            el = doc.createDocumentFragment(); // in one shot using a DocumentFragment
+	        Ext.each(o, function(v) {
+                createDom(v, el);
+            });
+        } else if (Ext.isString(o)) {         // Allow a string as a child spec.
+            el = doc.createTextNode(o);
+        } else {
+            el = doc.createElement( o.tag || 'div' );
+            useSet = !!el.setAttribute; // In IE some elements don't have setAttribute
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html|style/.test(attr)){
+	                if(attr == 'cls'){
+	                    el.className = val;
+	                }else{
+                        if(useSet){
+                            el.setAttribute(attr, val);
+                        }else{
+                            el[attr] = val;
+                        }
+	                }
+                }
+            });
+            pub.applyStyles(el, o.style);
+
+            if ((cn = o.children || o.cn)) {
+                createDom(cn, el);
+            } else if (o.html) {
+                el.innerHTML = o.html;
+            }
+        }
+        if(parentNode){
+           parentNode.appendChild(el);
+        }
+        return el;
+    }
+
+	pub = {
+		/**
+	     * Creates a new Ext.Template from the DOM object spec.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {Ext.Template} The new template
+	     */
+	    createTemplate : function(o){
+	        var html = Ext.DomHelper.createHtml(o);
+	        return new Ext.Template(html);
+	    },
+
+		/** True to force the use of DOM instead of html fragments @type Boolean */
+	    useDom : false,
+
+	    /**
+	     * Applies a style specification to an element.
+	     * @param {String/HTMLElement} el The element to apply styles to
+	     * @param {String/Object/Function} styles A style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or
+	     * a function which returns such a specification.
+	     */
+	    applyStyles : function(el, styles){
+		    if(styles){
+				var i = 0,
+	    			len,
+	    			style;
+
+	    		el = Ext.fly(el);
+				if(Ext.isFunction(styles)){
+   					styles = styles.call();
+				}
+				if(Ext.isString(styles)){
+					styles = styles.trim().split(/\s*(?::|;)\s*/);
+					for(len = styles.length; i < len;){
+						el.setStyle(styles[i++], styles[i++]);
+					}
+				}else if (Ext.isObject(styles)){
+					el.setStyle(styles);
+				}
+			}
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, 'nextSibling');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, 'firstChild');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    append: function(el, o, returnElement){
+            return doInsert(el, o, returnElement, beforeend, '', true);
+        },
+
+	    /**
+	     * Creates new DOM element(s) without inserting them to the document.
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @return {HTMLElement} The new uninserted node
+	     */
+        createDom: createDom
+	};
+	return pub;
+}());/**
+ * @class Ext.Template
+ * Represents an HTML fragment template. Templates can be precompiled for greater performance.
+ * For a list of available format functions, see {@link Ext.util.Format}.<br />
+ * Usage:
+<pre><code>
+var t = new Ext.Template(
+    '&lt;div name="{id}"&gt;',
+        '&lt;span class="{cls}"&gt;{name:trim} {value:ellipsis(10)}&lt;/span&gt;',
+    '&lt;/div&gt;'
+);
+t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
+</code></pre>
+ * @constructor
+ * @param {String/Array} html The HTML fragment or an array of fragments to join("") or multiple arguments to join("")
+ */
+Ext.Template = function(html){
+    var me = this,
+    	a = arguments,
+    	buf = [];
+
+    if (Ext.isArray(html)) {
+        html = html.join("");
+    } else if (a.length > 1) {
+	    Ext.each(a, function(v) {
+            if (Ext.isObject(v)) {
+                Ext.apply(me, v);
+            } else {
+                buf.push(v);
+            }
+        });
+        html = buf.join('');
+    }
+
+    /**@private*/
+    me.html = html;
+    if (me.compiled) {
+        me.compile();
+    }
+};
+Ext.Template.prototype = {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+		var me = this;
+
+        return me.compiled ?
+        		me.compiled(values) :
+				me.html.replace(me.re, function(m, name){
+		        	return values[name] !== undefined ? values[name] : "";
+		        });
+	},
+
+    /**
+     * Sets the HTML used as the template and optionally compiles it.
+     * @param {String} html
+     * @param {Boolean} compile (optional) True to compile the template (defaults to undefined)
+     * @return {Ext.Template} this
+     */
+    set : function(html, compile){
+	    var me = this;
+        me.html = html;
+        me.compiled = null;
+        return compile ? me.compile() : me;
+    },
+
+    /**
+    * The regular expression used to match template variables
+    * @type RegExp
+    * @property
+    */
+    re : /\{([\w-]+)\}/g,
+
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     */
+    compile : function(){
+        var me = this,
+        	sep = Ext.isGecko ? "+" : ",";
+
+        function fn(m, name){                        
+	        name = "values['" + name + "']";
+	        return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'";
+        }
+                
+        eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") +
+             me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+             (Ext.isGecko ?  "';};" : "'].join('');};"));
+        return me;
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) as the first child of el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertFirst: function(el, values, returnElement){
+        return this.doInsert('afterBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) before el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertBefore: function(el, values, returnElement){
+        return this.doInsert('beforeBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) after el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertAfter : function(el, values, returnElement){
+        return this.doInsert('afterEnd', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and appends the new node(s) to el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    append : function(el, values, returnElement){
+        return this.doInsert('beforeEnd', el, values, returnElement);
+    },
+
+    doInsert : function(where, el, values, returnEl){
+        el = Ext.getDom(el);
+        var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values));
+        return returnEl ? Ext.get(newNode, true) : newNode;
+    },
+
+    /**
+     * Applies the supplied values to the template and overwrites the content of el with the new node(s).
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    overwrite : function(el, values, returnElement){
+        el = Ext.getDom(el);
+        el.innerHTML = this.applyTemplate(values);
+        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
+    }
+};
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.Template
+ * @method apply
+ */
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @param {Object} config A configuration object
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.Template.from = function(el, config){
+    el = Ext.getDom(el);
+    return new Ext.Template(el.value || el.innerHTML, config || '');
+};/**
+ * @class Ext.Template
+ */
+Ext.apply(Ext.Template.prototype, {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     * @hide repeat doc
+     */
+    applyTemplate : function(values){
+		var me = this,
+			useF = me.disableFormats !== true,
+        	fm = Ext.util.Format, 
+        	tpl = me;	    
+	    
+        if(me.compiled){
+            return me.compiled(values);
+        }
+        function fn(m, name, format, args){
+            if (format && useF) {
+                if (format.substr(0, 5) == "this.") {
+                    return tpl.call(format.substr(5), values[name], values);
+                } else {
+                    if (args) {
+                        // quoted values are required for strings in compiled templates,
+                        // but for non compiled we need to strip them
+                        // quoted reversed for jsmin
+                        var re = /^\s*['"](.*)["']\s*$/;
+                        args = args.split(',');
+                        for(var i = 0, len = args.length; i < len; i++){
+                            args[i] = args[i].replace(re, "$1");
+                        }
+                        args = [values[name]].concat(args);
+                    } else {
+                        args = [values[name]];
+                    }
+                    return fm[format].apply(fm, args);
+                }
+            } else {
+                return values[name] !== undefined ? values[name] : "";
+            }
+        }
+        return me.html.replace(me.re, fn);
+    },
+		
+    /**
+     * <tt>true</tt> to disable format functions (defaults to <tt>false</tt>)
+     * @type Boolean
+     * @property
+     */
+    disableFormats : false,				
+	
+    /**
+     * The regular expression used to match template variables
+     * @type RegExp
+     * @property
+     * @hide repeat doc
+     */
+    re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
+    
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     * @hide repeat doc
+     */
+    compile : function(){
+        var me = this,
+        	fm = Ext.util.Format,
+        	useF = me.disableFormats !== true,
+        	sep = Ext.isGecko ? "+" : ",",
+        	body;
+        
+        function fn(m, name, format, args){
+            if(format && useF){
+                args = args ? ',' + args : "";
+                if(format.substr(0, 5) != "this."){
+                    format = "fm." + format + '(';
+                }else{
+                    format = 'this.call("'+ format.substr(5) + '", ';
+                    args = ", values";
+                }
+            }else{
+                args= ''; format = "(values['" + name + "'] == undefined ? '' : ";
+            }
+            return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'";
+        }
+        
+        // branched to use + in gecko and [].join() in others
+        if(Ext.isGecko){
+            body = "this.compiled = function(values){ return '" +
+                   me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+                    "';};";
+        }else{
+            body = ["this.compiled = function(values){ return ['"];
+            body.push(me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn));
+            body.push("'].join('');};");
+            body = body.join('');
+        }
+        eval(body);
+        return me;
+    },
+    
+    // private function used to call members
+    call : function(fnName, value, allValues){
+        return this[fnName](value, allValues);
+    }
+});
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; /*
+ * This is code is also distributed under MIT license for use
+ * with jQuery and prototype JavaScript libraries.
+ */
+/**
+ * @class Ext.DomQuery
+Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
+<p>
+DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p>
+
+<p>
+All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.
+</p>
+<h4>Element Selectors:</h4>
+<ul class="list">
+    <li> <b>*</b> any element</li>
+    <li> <b>E</b> an element with the tag E</li>
+    <li> <b>E F</b> All descendent elements of E that have the tag F</li>
+    <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li>
+    <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li>
+    <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li>
+</ul>
+<h4>Attribute Selectors:</h4>
+<p>The use of &#64; and quotes are optional. For example, div[&#64;foo='bar'] is also a valid attribute selector.</p>
+<ul class="list">
+    <li> <b>E[foo]</b> has an attribute "foo"</li>
+    <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li>
+    <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li>
+    <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li>
+    <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li>
+    <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li>
+    <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li>
+</ul>
+<h4>Pseudo Classes:</h4>
+<ul class="list">
+    <li> <b>E:first-child</b> E is the first child of its parent</li>
+    <li> <b>E:last-child</b> E is the last child of its parent</li>
+    <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li>
+    <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li>
+    <li> <b>E:nth-child(even)</b> E is an even child of its parent</li>
+    <li> <b>E:only-child</b> E is the only child of its parent</li>
+    <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li>
+    <li> <b>E:first</b> the first E in the resultset</li>
+    <li> <b>E:last</b> the last E in the resultset</li>
+    <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li>
+    <li> <b>E:odd</b> shortcut for :nth-child(odd)</li>
+    <li> <b>E:even</b> shortcut for :nth-child(even)</li>
+    <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li>
+    <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li>
+    <li> <b>E:not(S)</b> an E element that does not match simple selector S</li>
+    <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li>
+    <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li>
+    <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li>
+</ul>
+<h4>CSS Value Selectors:</h4>
+<ul class="list">
+    <li> <b>E{display=none}</b> css value "display" that equals "none"</li>
+    <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li>
+    <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li>
+    <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li>
+    <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li>
+    <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li>
+</ul>
+ * @singleton
+ */
+Ext.DomQuery = function(){
+    var cache = {}, 
+    	simpleCache = {}, 
+    	valueCache = {},
+    	nonSpace = /\S/,
+    	trimRe = /^\s+|\s+$/g,
+    	tplRe = /\{(\d+)\}/g,
+    	modeRe = /^(\s?[\/>+~]\s?|\s|$)/,
+    	tagTokenRe = /^(#)?([\w-\*]+)/,
+    	nthRe = /(\d*)n\+?(\d*)/, 
+    	nthRe2 = /\D/,
+    	// This is for IE MSXML which does not support expandos.
+	    // IE runs the same speed using setAttribute, however FF slows way down
+	    // and Safari completely fails so they need to continue to use expandos.
+	    isIE = window.ActiveXObject ? true : false,
+        isOpera = Ext.isOpera,
+	    key = 30803;
+	    
+    // this eval is stop the compressor from
+	// renaming the variable to something shorter
+	eval("var batch = 30803;");    	
+
+    function child(p, index){
+        var i = 0,
+        	n = p.firstChild;
+        while(n){
+            if(n.nodeType == 1){
+               if(++i == index){
+                   return n;
+               }
+            }
+            n = n.nextSibling;
+        }
+        return null;
+    };
+
+    function next(n){
+        while((n = n.nextSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function prev(n){
+        while((n = n.previousSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function children(d){
+        var n = d.firstChild, ni = -1,
+        	nx;
+ 	    while(n){
+ 	        nx = n.nextSibling;
+ 	        if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
+ 	            d.removeChild(n);
+ 	        }else{
+ 	            n.nodeIndex = ++ni;
+ 	        }
+ 	        n = nx;
+ 	    }
+ 	    return this;
+ 	};
+
+    function byClassName(c, a, v){
+        if(!v){
+            return c;
+        }
+        var r = [], ri = -1, cn;
+        for(var i = 0, ci; ci = c[i]; i++){
+            if((' '+ci.className+' ').indexOf(v) != -1){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function attrValue(n, attr){
+        if(!n.tagName && typeof n.length != "undefined"){
+            n = n[0];
+        }
+        if(!n){
+            return null;
+        }
+        if(attr == "for"){
+            return n.htmlFor;
+        }
+        if(attr == "class" || attr == "className"){
+            return n.className;
+        }
+        return n.getAttribute(attr) || n[attr];
+
+    };
+
+    function getNodes(ns, mode, tagName){
+        var result = [], ri = -1, cs;
+        if(!ns){
+            return result;
+        }
+        tagName = tagName || "*";
+        if(typeof ns.getElementsByTagName != "undefined"){
+            ns = [ns];
+        }
+        if(!mode){
+            for(var i = 0, ni; ni = ns[i]; i++){
+                cs = ni.getElementsByTagName(tagName);
+                for(var j = 0, ci; ci = cs[j]; j++){
+                    result[++ri] = ci;
+                }
+            }
+        }else if(mode == "/" || mode == ">"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, ni, cn; ni = ns[i]; i++){
+                cn = isOpera ? ni.childNodes : (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 == "~"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, n; n = ns[i]; i++){
+                while((n = n.nextSibling)){
+                    if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){
+                        result[++ri] = n;
+                    }
+                }
+            }
+        }
+        return result;
+    };
+
+    function concat(a, b){
+        if(b.slice){
+            return a.concat(b);
+        }
+        for(var i = 0, l = b.length; i < l; i++){
+            a[a.length] = b[i];
+        }
+        return a;
+    }
+
+    function byTag(cs, tagName){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!tagName){
+            return cs;
+        }
+        var r = [], ri = -1;
+        tagName = tagName.toLowerCase();
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byId(cs, attr, id){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!id){
+            return cs;
+        }
+        var r = [], ri = -1;
+        for(var i = 0,ci; ci = cs[i]; i++){
+            if(ci && ci.id == id){
+                r[++ri] = ci;
+                return r;
+            }
+        }
+        return r;
+    };
+
+    function byAttribute(cs, attr, value, op, custom){
+        var r = [], 
+        	ri = -1, 
+        	st = custom=="{",
+        	f = Ext.DomQuery.operators[op];
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType != 1){
+                continue;
+            }
+            var a;
+            if(st){
+                a = Ext.DomQuery.getStyle(ci, attr);
+            }
+            else if(attr == "class" || attr == "className"){
+                a = ci.className;
+            }else if(attr == "for"){
+                a = ci.htmlFor;
+            }else if(attr == "href"){
+                a = ci.getAttribute("href", 2);
+            }else{
+                a = ci.getAttribute(attr);
+            }
+            if((f && f(a, value)) || (!f && a)){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byPseudo(cs, name, value){
+        return Ext.DomQuery.pseudos[name](cs, value);
+    };
+
+    function nodupIEXml(cs){
+        var d = ++key, 
+        	r;
+        cs[0].setAttribute("_nodup", d);
+        r = [cs[0]];
+        for(var i = 1, len = cs.length; i < len; i++){
+            var c = cs[i];
+            if(!c.getAttribute("_nodup") != d){
+                c.setAttribute("_nodup", d);
+                r[r.length] = c;
+            }
+        }
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].removeAttribute("_nodup");
+        }
+        return r;
+    }
+
+    function nodup(cs){
+        if(!cs){
+            return [];
+        }
+        var len = cs.length, c, i, r = cs, cj, ri = -1;
+        if(!len || typeof cs.nodeType != "undefined" || len == 1){
+            return cs;
+        }
+        if(isIE && typeof cs[0].selectSingleNode != "undefined"){
+            return nodupIEXml(cs);
+        }
+        var d = ++key;
+        cs[0]._nodup = d;
+        for(i = 1; c = cs[i]; i++){
+            if(c._nodup != d){
+                c._nodup = d;
+            }else{
+                r = [];
+                for(var j = 0; j < i; j++){
+                    r[++ri] = cs[j];
+                }
+                for(j = i+1; cj = cs[j]; j++){
+                    if(cj._nodup != d){
+                        cj._nodup = d;
+                        r[++ri] = cj;
+                    }
+                }
+                return r;
+            }
+        }
+        return r;
+    }
+
+    function quickDiffIEXml(c1, c2){
+        var d = ++key,
+        	r = [];
+        for(var i = 0, len = c1.length; i < len; i++){
+            c1[i].setAttribute("_qdiff", d);
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i].getAttribute("_qdiff") != d){
+                r[r.length] = c2[i];
+            }
+        }
+        for(var i = 0, len = c1.length; i < len; i++){
+           c1[i].removeAttribute("_qdiff");
+        }
+        return r;
+    }
+
+    function quickDiff(c1, c2){
+        var len1 = c1.length,
+        	d = ++key,
+        	r = [];
+        if(!len1){
+            return c2;
+        }
+        if(isIE && c1[0].selectSingleNode){
+            return quickDiffIEXml(c1, c2);
+        }        
+        for(var i = 0; i < len1; i++){
+            c1[i]._qdiff = d;
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i]._qdiff != d){
+                r[r.length] = c2[i];
+            }
+        }
+        return r;
+    }
+
+    function quickId(ns, mode, root, id){
+        if(ns == root){
+           var d = root.ownerDocument || root;
+           return d.getElementById(id);
+        }
+        ns = getNodes(ns, mode, "*");
+        return byId(ns, null, id);
+    }
+
+    return {
+        getStyle : function(el, name){
+            return Ext.fly(el).getStyle(name);
+        },
+        /**
+         * Compiles a selector/xpath query into a reusable function. The returned function
+         * takes one parameter "root" (optional), which is the context node from where the query should start.
+         * @param {String} selector The selector/xpath query
+         * @param {String} type (optional) Either "select" (the default) or "simple" for a simple selector match
+         * @return {Function}
+         */
+        compile : function(path, type){
+            type = type || "select";
+
+            var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],
+            	q = path, mode, lq,
+            	tk = Ext.DomQuery.matchers,
+            	tklen = tk.length,
+            	mm,
+            	// accept leading mode switch
+            	lmode = q.match(modeRe);
+            
+            if(lmode && lmode[1]){
+                fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
+                q = q.replace(lmode[1], "");
+            }
+            // strip leading slashes
+            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;
+                        }
+                    }
+                    // prevent infinite loop on bad selector
+                    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;
+        },
+
+        /**
+         * Selects a group of elements.
+         * @param {String} selector The selector/xpath query (can be a comma separated list of selectors)
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        select : function(path, root, type){
+            if(!root || root == document){
+                root = document;
+            }
+            if(typeof root == "string"){
+                root = document.getElementById(root);
+            }
+            var paths = path.split(","),
+            	results = [];
+            for(var i = 0, len = paths.length; i < len; i++){
+                var p = paths[i].replace(trimRe, "");
+                if(!cache[p]){
+                    cache[p] = Ext.DomQuery.compile(p);
+                    if(!cache[p]){
+                        throw p + " is not a valid selector";
+                    }
+                }
+                var result = cache[p](root);
+                if(result && result != document){
+                    results = results.concat(result);
+                }
+            }
+            if(paths.length > 1){
+                return nodup(results);
+            }
+            return results;
+        },
+
+        /**
+         * Selects a single element.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Element} The DOM element which matched the selector.
+         */
+        selectNode : function(path, root){
+            return Ext.DomQuery.select(path, root)[0];
+        },
+
+        /**
+         * Selects the value of a node, optionally replacing null with the defaultValue.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {String} defaultValue
+         * @return {String}
+         */
+        selectValue : function(path, root, defaultValue){
+            path = path.replace(trimRe, "");
+            if(!valueCache[path]){
+                valueCache[path] = Ext.DomQuery.compile(path, "select");
+            }
+            var n = valueCache[path](root),
+            	v;
+            n = n[0] ? n[0] : n;
+            v = (n && n.firstChild ? n.firstChild.nodeValue : null);
+            return ((v === null||v === undefined||v==='') ? defaultValue : v);
+        },
+
+        /**
+         * Selects the value of a node, parsing integers and floats. Returns the defaultValue, or 0 if none is specified.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {Number} defaultValue
+         * @return {Number}
+         */
+        selectNumber : function(path, root, defaultValue){
+            var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0);
+            return parseFloat(v);
+        },
+
+        /**
+         * Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child)
+         * @param {String/HTMLElement/Array} el An element id, element or array of elements
+         * @param {String} selector The simple selector to test
+         * @return {Boolean}
+         */
+        is : function(el, ss){
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            var isArray = Ext.isArray(el),
+            	result = Ext.DomQuery.filter(isArray ? el : [el], ss);
+            return isArray ? (result.length == el.length) : (result.length > 0);
+        },
+
+        /**
+         * Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child)
+         * @param {Array} el An array of elements to filter
+         * @param {String} selector The simple selector to test
+         * @param {Boolean} nonMatches If true, it returns the elements that DON'T match
+         * the selector instead of the ones that match
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        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;
+        },
+
+        /**
+         * Collection of matching regular expressions and code snippets.
+         */
+        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}")}};'
+            }
+        ],
+
+        /**
+         * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=.
+         * New operators can be added as long as the match the format <i>c</i>= where <i>c</i> is any character other than space, &gt; &lt;.
+         */
+        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;
+            }
+        },
+
+        /**
+         * Collection of "pseudo class" processors. Each processor is passed the current nodeset (array)
+         * and the argument (if any) supplied in the selector.
+         */
+        pseudos : {
+            "first-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.previousSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "last-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.nextSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nth-child" : function(c, a) {
+                var r = [], ri = -1,
+                	m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a),
+                	f = (m[1] || 1) - 0, l = m[2] - 0;
+                for(var i = 0, n; n = c[i]; i++){
+                    var pn = n.parentNode;
+                    if (batch != pn._batch) {
+                        var j = 0;
+                        for(var cn = pn.firstChild; cn; cn = cn.nextSibling){
+                            if(cn.nodeType == 1){
+                               cn.nodeIndex = ++j;
+                            }
+                        }
+                        pn._batch = batch;
+                    }
+                    if (f == 1) {
+                        if (l == 0 || n.nodeIndex == l){
+                            r[++ri] = n;
+                        }
+                    } else if ((n.nodeIndex + l) % f == 0){
+                        r[++ri] = n;
+                    }
+                }
+
+                return r;
+            },
+
+            "only-child" : function(c){
+                var r = [], ri = -1;;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(!prev(ci) && !next(ci)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "empty" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var cns = ci.childNodes, j = 0, cn, empty = true;
+                    while(cn = cns[j]){
+                        ++j;
+                        if(cn.nodeType == 1 || cn.nodeType == 3){
+                            empty = false;
+                            break;
+                        }
+                    }
+                    if(empty){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "contains" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if((ci.textContent||ci.innerText||'').indexOf(v) != -1){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nodeValue" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.firstChild && ci.firstChild.nodeValue == v){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "checked" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.checked == true){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "not" : function(c, ss){
+                return Ext.DomQuery.filter(c, ss, true);
+            },
+
+            "any" : function(c, selectors){
+                var ss = selectors.split('|'),
+                	r = [], ri = -1, s;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    for(var j = 0; s = ss[j]; j++){
+                        if(Ext.DomQuery.is(ci, s)){
+                            r[++ri] = ci;
+                            break;
+                        }
+                    }
+                }
+                return r;
+            },
+
+            "odd" : function(c){
+                return this["nth-child"](c, "odd");
+            },
+
+            "even" : function(c){
+                return this["nth-child"](c, "even");
+            },
+
+            "nth" : function(c, a){
+                return c[a-1] || [];
+            },
+
+            "first" : function(c){
+                return c[0] || [];
+            },
+
+            "last" : function(c){
+                return c[c.length-1] || [];
+            },
+
+            "has" : function(c, ss){
+                var s = Ext.DomQuery.select,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(s(ss, ci).length > 0){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "next" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = next(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "prev" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = prev(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            }
+        }
+    };
+}();
+
+/**
+ * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select}
+ * @param {String} path The selector/xpath query
+ * @param {Node} root (optional) The start of the query (defaults to document).
+ * @return {Array}
+ * @member Ext
+ * @method query
+ */
+Ext.query = Ext.DomQuery.select;
+(function(){
+
+var EXTUTIL = Ext.util,
+    TOARRAY = Ext.toArray,
+    EACH = Ext.each,
+    ISOBJECT = Ext.isObject,
+    TRUE = true,
+    FALSE = false;
+/**
+ * @class Ext.util.Observable
+ * Base class that provides a common interface for publishing events. Subclasses are expected to
+ * to have a property "events" with all the events defined, and, optionally, a property "listeners"
+ * with configured listeners defined.<br>
+ * For example:
+ * <pre><code>
+Employee = Ext.extend(Ext.util.Observable, {
+    constructor: function(config){
+        this.name = config.name;
+        this.addEvents({
+            "fired" : true,
+            "quit" : true
+        });
+
+        // Copy configured listeners into *this* object so that the base class&#39;s
+        // constructor will add them.
+        this.listeners = config.listeners;
+
+        // Call our superclass constructor to complete construction process.
+        Employee.superclass.constructor.call(config)
+    }
+});
+</code></pre>
+ * This could then be used like this:<pre><code>
+var newEmployee = new Employee({
+    name: employeeName,
+    listeners: {
+        quit: function() {
+            // By default, "this" will be the object that fired the event.
+            alert(this.name + " has quit!");
+        }
+    }
+});
+</code></pre>
+ */
+EXTUTIL.Observable = function(){
+    /**
+     * @cfg {Object} listeners (optional) <p>A config object containing one or more event handlers to be added to this
+     * object during initialization.  This should be a valid listeners config object as specified in the
+     * {@link #addListener} example for attaching multiple handlers at once.</p>
+     * <br><p><b><u>DOM events from ExtJs {@link Ext.Component Components}</u></b></p>
+     * <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
+     * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s
+     * <b><code>{@link Ext.DataView#click click}</code></b> event passing the node clicked on. To access DOM
+     * events directly from a Component's HTMLElement, listeners must be added to the <i>{@link Ext.Component#getEl Element}</i> after the Component
+     * has been rendered. A plugin can simplify this step:<pre><code>
+// Plugin is configured with a listeners config object.
+// The Component is appended to the argument list of all handler functions.
+Ext.DomObserver = Ext.extend(Object, {
+    constructor: function(config) {
+        this.listeners = config.listeners ? config.listeners : config;
+    },
+
+    // Component passes itself into plugin&#39;s init method
+    init: function(c) {
+        var p, l = this.listeners;
+        for (p in l) {
+            if (Ext.isFunction(l[p])) {
+                l[p] = this.createHandler(l[p], c);
+            } else {
+                l[p].fn = this.createHandler(l[p].fn, c);
+            }
+        }
+
+        // Add the listeners to the Element immediately following the render call
+        c.render = c.render.{@link Function#createSequence createSequence}(function() {
+            var e = c.getEl();
+            if (e) {
+                e.on(l);
+            }
+        });
+    },
+
+    createHandler: function(fn, c) {
+        return function(e) {
+            fn.call(this, e, c);
+        };
+    }
+});
+
+var combo = new Ext.form.ComboBox({
+
+    // Collapse combo when its element is clicked on
+    plugins: [ new Ext.DomObserver({
+        click: function(evt, comp) {
+            comp.collapse();
+        }
+    })],
+    store: myStore,
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all'
+});
+     * </code></pre></p>
+     */
+    var me = this, e = me.events;
+    if(me.listeners){
+        me.on(me.listeners);
+        delete me.listeners;
+    }
+    me.events = e || {};
+};
+
+EXTUTIL.Observable.prototype = function(){
+    var filterOptRe = /^(?:scope|delay|buffer|single)$/, toLower = function(s){
+        return s.toLowerCase();
+    };
+
+    return {
+        /**
+         * <p>Fires the specified event with the passed parameters (minus the event name).</p>
+         * <p>An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget})
+         * by calling {@link #enableBubble}.</p>
+         * @param {String} eventName The name of the event to fire.
+         * @param {Object...} args Variable number of parameters are passed to handlers.
+         * @return {Boolean} returns false if any of the handlers return false otherwise it returns true.
+         */
+
+        fireEvent : function(){
+            var a = TOARRAY(arguments),
+                ename = toLower(a[0]),
+                me = this,
+                ret = TRUE,
+                ce = me.events[ename],
+                q,
+                c;
+            if (me.eventsSuspended === TRUE) {
+                if (q = me.suspendedEventsQueue) {
+                    q.push(a);
+                }
+            }
+            else if(ISOBJECT(ce) && ce.bubble){
+                if(ce.fire.apply(ce, a.slice(1)) === FALSE) {
+                    return FALSE;
+                }
+                c = me.getBubbleTarget && me.getBubbleTarget();
+                if(c && c.enableBubble) {
+                    c.enableBubble(ename);
+                    return c.fireEvent.apply(c, a);
+                }
+            }
+            else {
+                if (ISOBJECT(ce)) {
+                    a.shift();
+                    ret = ce.fire.apply(ce, a);
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * Appends an event handler to this object.
+         * @param {String}   eventName The name of the event to listen for.
+         * @param {Function} handler The method the event invokes.
+         * @param {Object}   scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b>
+         * @param {Object}   options (optional) An object containing handler configuration.
+         * properties. This may contain any of the following properties:<ul>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b></div></li>
+         * <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+         * <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+         * <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+         * by the specified number of milliseconds. If the event fires again within that time, the original
+         * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+         * <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
+         * if the event was bubbled up from a child Observable.</div></li>
+         * </ul><br>
+         * <p>
+         * <b>Combining Options</b><br>
+         * Using the options argument, it is possible to combine different types of listeners:<br>
+         * <br>
+         * A delayed, one-time listener.
+         * <pre><code>
+myDataView.on('click', this.onClick, this, {
+    single: true,
+    delay: 100
+});</code></pre>
+         * <p>
+         * <b>Attaching multiple handlers in 1 call</b><br>
+         * The method also allows for a single argument to be passed which is a config object containing properties
+         * which specify multiple handlers.
+         * <p>
+         * <pre><code>
+myGridPanel.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * <pre><code>
+myGridPanel.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+     scope: this
+});</code></pre>
+         */
+        addListener : function(eventName, fn, scope, o){
+            var me = this,
+                e,
+                oe,
+                isF,
+            ce;
+            if (ISOBJECT(eventName)) {
+                o = eventName;
+                for (e in o){
+                    oe = o[e];
+                    if (!filterOptRe.test(e)) {
+                        me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o);
+                    }
+                }
+            } else {
+                eventName = toLower(eventName);
+                ce = me.events[eventName] || TRUE;
+                if (typeof ce == "boolean") {
+                    me.events[eventName] = ce = new EXTUTIL.Event(me, eventName);
+                }
+                ce.addListener(fn, scope, ISOBJECT(o) ? o : {});
+            }
+        },
+
+        /**
+         * Removes an event handler.
+         * @param {String}   eventName The type of event the handler was associated with.
+         * @param {Function} handler   The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+         * @param {Object}   scope     (optional) The scope originally specified for the handler.
+         */
+        removeListener : function(eventName, fn, scope){
+            var ce = this.events[toLower(eventName)];
+            if (ISOBJECT(ce)) {
+                ce.removeListener(fn, scope);
+            }
+        },
+
+        /**
+         * Removes all listeners for this object
+         */
+        purgeListeners : function(){
+            var events = this.events,
+                evt,
+                key;
+            for(key in events){
+                evt = events[key];
+                if(ISOBJECT(evt)){
+                    evt.clearListeners();
+                }
+            }
+        },
+
+        /**
+         * Used to define events on this Observable
+         * @param {Object} object The object with the events defined
+         */
+        addEvents : function(o){
+            var me = this;
+            me.events = me.events || {};
+            if (typeof o == 'string') {
+                EACH(arguments, function(a) {
+                    me.events[a] = me.events[a] || TRUE;
+                });
+            } else {
+                Ext.applyIf(me.events, o);
+            }
+        },
+
+        /**
+         * Checks to see if this object has any listeners for a specified event
+         * @param {String} eventName The name of the event to check for
+         * @return {Boolean} True if the event is being listened for, else false
+         */
+        hasListener : function(eventName){
+            var e = this.events[eventName];
+            return ISOBJECT(e) && e.listeners.length > 0;
+        },
+
+        /**
+         * Suspend the firing of all events. (see {@link #resumeEvents})
+         * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired
+         * after the {@link #resumeEvents} call instead of discarding all suspended events;
+         */
+        suspendEvents : function(queueSuspended){
+            this.eventsSuspended = TRUE;
+            if (queueSuspended){
+                this.suspendedEventsQueue = [];
+            }
+        },
+
+        /**
+         * Resume firing events. (see {@link #suspendEvents})
+         * If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
+         * events fired during event suspension will be sent to any listeners now.
+         */
+        resumeEvents : function(){
+            var me = this;
+            me.eventsSuspended = !delete me.suspendedEventQueue;
+            EACH(me.suspendedEventsQueue, function(e) {
+                me.fireEvent.apply(me, e);
+            });
+        }
+    }
+}();
+
+var OBSERVABLE = EXTUTIL.Observable.prototype;
+/**
+ * Appends an event handler to this object (shorthand for {@link #addListener}.)
+ * @param {String}   eventName     The type of event to listen for
+ * @param {Function} handler       The method the event invokes
+ * @param {Object}   scope         (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+ * <b>If omitted, defaults to the object which fired the event.</b>
+ * @param {Object}   options       (optional) An object containing handler configuration.
+ * @method
+ */
+OBSERVABLE.on = OBSERVABLE.addListener;
+/**
+ * Removes an event handler (shorthand for {@link #removeListener}.)
+ * @param {String}   eventName     The type of event the handler was associated with.
+ * @param {Function} handler       The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+ * @param {Object}   scope         (optional) The scope originally specified for the handler.
+ * @method
+ */
+OBSERVABLE.un = OBSERVABLE.removeListener;
+
+/**
+ * Removes <b>all</b> added captures from the Observable.
+ * @param {Observable} o The Observable to release
+ * @static
+ */
+EXTUTIL.Observable.releaseCapture = function(o){
+    o.fireEvent = OBSERVABLE.fireEvent;
+};
+
+function createTargeted(h, o, scope){
+    return function(){
+        if(o.target == arguments[0]){
+            h.apply(scope, TOARRAY(arguments));
+        }
+    };
+};
+
+function createBuffered(h, o, scope){
+    var task = new EXTUTIL.DelayedTask();
+    return function(){
+        task.delay(o.buffer, h, scope, TOARRAY(arguments));
+    };
+}
+
+function createSingle(h, e, fn, scope){
+    return function(){
+        e.removeListener(fn, scope);
+        return h.apply(scope, arguments);
+    };
+}
+
+function createDelayed(h, o, scope){
+    return function(){
+        var args = TOARRAY(arguments);
+        (function(){
+            h.apply(scope, args);
+        }).defer(o.delay || 10);
+    };
+};
+
+EXTUTIL.Event = function(obj, name){
+    this.name = name;
+    this.obj = obj;
+    this.listeners = [];
+};
+
+EXTUTIL.Event.prototype = {
+    addListener : function(fn, scope, options){
+        var me = this,
+            l;
+        scope = scope || me.obj;
+        if(!me.isListening(fn, scope)){
+            l = me.createListener(fn, scope, options);
+            if(me.firing){ // if we are currently firing this event, don't disturb the listener loop
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.push(l);
+        }
+    },
+
+    createListener: function(fn, scope, o){
+        o = o || {}, scope = scope || this.obj;
+        var l = {
+            fn: fn,
+            scope: scope,
+            options: o
+        }, h = fn;
+        if(o.target){
+            h = createTargeted(h, o, scope);
+        }
+        if(o.delay){
+            h = createDelayed(h, o, scope);
+        }
+        if(o.single){
+            h = createSingle(h, this, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o, scope);
+        }
+        l.fireFn = h;
+        return l;
+    },
+
+    findListener : function(fn, scope){
+        var s, ret = -1;
+        EACH(this.listeners, function(l, i) {
+            s = l.scope;
+            if(l.fn == fn && (s == scope || s == this.obj)){
+                ret = i;
+                return FALSE;
+            }
+        },
+        this);
+        return ret;
+    },
+
+    isListening : function(fn, scope){
+        return this.findListener(fn, scope) != -1;
+    },
+
+    removeListener : function(fn, scope){
+        var index,
+            me = this,
+            ret = FALSE;
+        if((index = me.findListener(fn, scope)) != -1){
+            if (me.firing) {
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.splice(index, 1);
+            ret = TRUE;
+        }
+        return ret;
+    },
+
+    clearListeners : function(){
+        this.listeners = [];
+    },
+
+    fire : function(){
+        var me = this,
+            args = TOARRAY(arguments),
+            ret = TRUE;
+
+        EACH(me.listeners, function(l) {
+            me.firing = TRUE;
+            if (l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) {
+                return ret = me.firing = FALSE;
+            }
+        });
+        me.firing = FALSE;
+        return ret;
+    }
+};
+})();/**
+ * @class Ext.util.Observable
+ */
+Ext.apply(Ext.util.Observable.prototype, function(){    
+    // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?)
+    // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+    // private
+    function getMethodEvent(method){
+        var e = (this.methodEvents = this.methodEvents ||
+        {})[method], returnValue, v, cancel, obj = this;
+        
+        if (!e) {
+            this.methodEvents[method] = e = {};
+            e.originalFn = this[method];
+            e.methodName = method;
+            e.before = [];
+            e.after = [];
+            
+            var makeCall = function(fn, scope, args){
+                if (!Ext.isEmpty(v = fn.apply(scope || obj, args))) {
+                    if (Ext.isObject(v)) {
+                        returnValue = !Ext.isEmpty(v.returnValue) ? v.returnValue : v;
+                        cancel = !!v.cancel;
+                    }
+                    else 
+                        if (v === false) {
+                            cancel = true;
+                        }
+                        else {
+                            returnValue = v;
+                        }
+                }
+            };
+            
+            this[method] = function(){
+                var args = Ext.toArray(arguments);
+                returnValue = v = undefined;
+                cancel = false;
+                
+                Ext.each(e.before, function(b){
+                    makeCall(b.fn, b.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                
+                if (!Ext.isEmpty(v = e.originalFn.apply(obj, args))) {
+                    returnValue = v;
+                }
+                Ext.each(e.after, function(a){
+                    makeCall(a.fn, a.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                return returnValue;
+            };
+        }
+        return e;
+    }
+    
+    return {
+        // these are considered experimental
+        // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+        // adds an "interceptor" called before the original method
+        beforeMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).before.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        // adds a "sequence" called after the original method
+        afterMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).after.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        removeMethodListener: function(method, fn, scope){
+            var e = getMethodEvent.call(this, method), found = false;
+            Ext.each(e.before, function(b, i, arr){
+                if (b.fn == fn && b.scope == scope) {
+                    arr.splice(i, 1);
+                    found = true;
+                    return false;
+                }
+            });
+            if (!found) {
+                Ext.each(e.after, function(a, i, arr){
+                    if (a.fn == fn && a.scope == scope) {
+                        arr.splice(i, 1);
+                        return false;
+                    }
+                });
+            }
+        },
+        
+        /**
+         * Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.
+         * @param {Object} o The Observable whose events this object is to relay.
+         * @param {Array} events Array of event names to relay.
+         */
+        relayEvents: function(o, events){
+            var me = this;
+            function createHandler(ename){
+                return function(){
+                    return me.fireEvent.apply(me, [ename].concat(Ext.toArray(arguments)));
+                };
+            }
+            Ext.each(events, function(ename){
+                me.events[ename] = me.events[ename] || true;
+                o.on(ename, createHandler(ename), me);
+            });
+        },
+        
+        /**
+         * Used to enable bubbling of events
+         * @param {Object} events
+         */
+        enableBubble: function(events){
+            var me = this;
+            events = Ext.isArray(events) ? events : Ext.toArray(arguments);
+            Ext.each(events, function(ename){
+                ename = ename.toLowerCase();
+                var ce = me.events[ename] || true;
+                if (typeof ce == "boolean") {
+                    ce = new Ext.util.Event(me, ename);
+                    me.events[ename] = ce;
+                }
+                ce.bubble = true;
+            });
+        }
+    };
+}());
+
+
+/**
+ * Starts capture on the specified Observable. All events will be passed
+ * to the supplied function with the event name + standard signature of the event
+ * <b>before</b> the event is fired. If the supplied function returns false,
+ * the event will not fire.
+ * @param {Observable} o The Observable to capture
+ * @param {Function} fn The function to call
+ * @param {Object} scope (optional) The scope (this object) for the fn
+ * @static
+ */
+Ext.util.Observable.capture = function(o, fn, scope){
+    o.fireEvent = o.fireEvent.createInterceptor(fn, scope);
+};
+
+
+/**
+ * Sets observability on the passed class constructor.<p>
+ * <p>This makes any event fired on any instance of the passed class also fire a single event through
+ * the <i>class</i> allowing for central handling of events on many instances at once.</p>
+ * <p>Usage:</p><pre><code>
+Ext.util.Observable.observeClass(Ext.data.Connection);
+Ext.data.Connection.on('beforerequest', function(con, options) {
+    console.log("Ajax request made to " + options.url);
+});</code></pre>
+ * @param {Function} c The class constructor to make observable.
+ * @static
+ */
+Ext.util.Observable.observeClass = function(c){
+    Ext.apply(c, new Ext.util.Observable());
+    c.prototype.fireEvent = function(){
+        return (c.fireEvent.apply(c, arguments) !== false) &&
+        (Ext.util.Observable.prototype.fireEvent.apply(this, arguments) !== false);
+    };
+};/**
+ * @class Ext.EventManager
+ * Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides
+ * several useful events directly.
+ * See {@link Ext.EventObject} for more details on normalized event objects.
+ * @singleton
+ */
+Ext.EventManager = function(){
+    var docReadyEvent, 
+    	docReadyProcId, 
+    	docReadyState = false,    	
+    	E = Ext.lib.Event,
+    	D = Ext.lib.Dom,
+    	DOC = document,
+    	WINDOW = window,
+    	IEDEFERED = "ie-deferred-loader",
+    	DOMCONTENTLOADED = "DOMContentLoaded",
+    	elHash = {},
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+    /// There is some jquery work around stuff here that isn't needed in Ext Core.
+    function addListener(el, ename, fn, wrap, scope){	    
+        var id = Ext.id(el),
+        	es = elHash[id] = elHash[id] || {};     	
+       
+        (es[ename] = es[ename] || []).push([fn, wrap, scope]);
+        E.on(el, ename, wrap);
+
+        // this is a workaround for jQuery and should somehow be removed from Ext Core in the future
+        // without breaking ExtJS.
+        if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery
+        	var args = ["DOMMouseScroll", wrap, false];
+        	el.addEventListener.apply(el, args);
+            E.on(window, 'unload', function(){
+	            el.removeEventListener.apply(el, args);                
+            });
+        }
+        if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document
+            Ext.EventManager.stoppedMouseDownEvent.addListener(wrap);
+        }
+    };
+    
+    function fireDocReady(){
+        if(!docReadyState){            
+            Ext.isReady = docReadyState = true;
+            if(docReadyProcId){
+                clearInterval(docReadyProcId);
+            }
+            if(Ext.isGecko || Ext.isOpera) {
+                DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false);
+            }
+            if(Ext.isIE){
+                var defer = DOC.getElementById(IEDEFERED);
+                if(defer){
+                    defer.onreadystatechange = null;
+                    defer.parentNode.removeChild(defer);
+                }
+            }
+            if(docReadyEvent){
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();
+            }
+        }
+    };
+
+    function initDocReady(){
+	    var COMPLETE = "complete";
+	    	
+        docReadyEvent = new Ext.util.Event();
+        if (Ext.isGecko || Ext.isOpera) {
+            DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false);
+        } else if (Ext.isIE){
+            DOC.write("<s"+'cript id=' + IEDEFERED + ' defer="defer" src="/'+'/:"></s'+"cript>");            
+            DOC.getElementById(IEDEFERED).onreadystatechange = function(){
+                if(this.readyState == COMPLETE){
+                    fireDocReady();
+                }
+            };
+        } else if (Ext.isWebKit){
+            docReadyProcId = setInterval(function(){                
+                if(DOC.readyState == COMPLETE) {
+                    fireDocReady();
+                 }
+            }, 10);
+        }
+        // no matter what, make sure it fires on load
+        E.on(WINDOW, "load", fireDocReady);
+    };
+
+    function createTargeted(h, o){
+        return function(){
+	        var args = Ext.toArray(arguments);
+            if(o.target == Ext.EventObject.setEvent(args[0]).target){
+                h.apply(this, args);
+            }
+        };
+    };    
+    
+    function createBuffered(h, o){
+        var task = new Ext.util.DelayedTask(h);
+        return function(e){
+            // create new event object impl so new events don't wipe out properties            
+            task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
+        };
+    };
+
+    function createSingle(h, el, ename, fn, scope){
+        return function(e){
+            Ext.EventManager.removeListener(el, ename, fn, scope);
+            h(e);
+        };
+    };
+
+    function createDelayed(h, o){
+        return function(e){
+            // create new event object impl so new events don't wipe out properties   
+            e = new Ext.EventObjectImpl(e);
+            setTimeout(function(){
+                h(e);
+            }, o.delay || 10);
+        };
+    };
+
+    function listen(element, ename, opt, fn, scope){
+        var o = !Ext.isObject(opt) ? {} : opt,
+        	el = Ext.getDom(element);
+        	
+        fn = fn || o.fn; 
+        scope = scope || o.scope;
+        
+        if(!el){
+            throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.';
+        }
+        function h(e){
+            // prevent errors while unload occurring
+            if(!Ext){// !window[xname]){  ==> can't we do this? 
+                return;
+            }
+            e = Ext.EventObject.setEvent(e);
+            var t;
+            if (o.delegate) {
+                if(!(t = e.getTarget(o.delegate, el))){
+                    return;
+                }
+            } else {
+                t = e.target;
+            }            
+            if (o.stopEvent) {
+                e.stopEvent();
+            }
+            if (o.preventDefault) {
+               e.preventDefault();
+            }
+            if (o.stopPropagation) {
+                e.stopPropagation();
+            }
+            if (o.normalized) {
+                e = e.browserEvent;
+            }
+            
+            fn.call(scope || el, e, t, o);
+        };
+        if(o.target){
+            h = createTargeted(h, o);
+        }
+        if(o.delay){
+            h = createDelayed(h, o);
+        }
+        if(o.single){
+            h = createSingle(h, el, ename, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o);
+        }
+
+        addListener(el, ename, fn, h, scope);
+        return h;
+    };
+
+    var pub = {
+	    /**
+	     * Appends an event handler to an element.  The shorthand version {@link #on} is equivalent.  Typically you will
+	     * use {@link Ext.Element#addListener} directly on an Element in favor of calling this version.
+	     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+	     * @param {String} eventName The type of event to listen for
+	     * @param {Function} handler The handler function the event invokes This function is passed
+	     * the following parameters:<ul>
+	     * <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+	     * <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+	     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+	     * <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+	     * </ul>
+	     * @param {Object} scope (optional) The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.
+	     * @param {Object} options (optional) An object containing handler configuration properties.
+	     * This may contain any of the following properties:<ul>
+	     * <li>scope : Object<div class="sub-desc">The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.</div></li>
+	     * <li>delegate : String<div class="sub-desc">A simple selector to filter the target or look for a descendant of the target</div></li>
+	     * <li>stopEvent : Boolean<div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+	     * <li>preventDefault : Boolean<div class="sub-desc">True to prevent the default action</div></li>
+	     * <li>stopPropagation : Boolean<div class="sub-desc">True to prevent event propagation</div></li>
+	     * <li>normalized : Boolean<div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+	     * <li>delay : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after te event fires.</div></li>
+	     * <li>single : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+	     * <li>buffer : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+	     * by the specified number of milliseconds. If the event fires again within that time, the original
+	     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+	     * <li>target : Element<div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+	     * </ul><br>
+	     * <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p>
+	     */
+		addListener : function(element, eventName, fn, scope, options){		     		     		     
+            if(Ext.isObject(eventName)){                
+	            var o = eventName, e, val;
+                for(e in o){
+	                val = o[e];
+                    if(!propRe.test(e)){                            		         
+	                    if(Ext.isFunction(val)){
+	                        // shared options
+	                        listen(element, e, o, val, o.scope);
+	                    }else{
+	                        // individual options
+	                        listen(element, e, val);
+	                    }
+                    }
+                }
+            } else {
+            	listen(element, eventName, options, fn, scope);
+        	}
+        },
+        
+        /**
+         * Removes an event handler from an element.  The shorthand version {@link #un} is equivalent.  Typically
+         * you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         * @param {String} eventName The type of event
+         * @param {Function} fn The handler function to remove
+         */
+        removeListener : function(element, eventName, fn, scope){            
+            var el = Ext.getDom(element),
+                id = Ext.id(el),
+        	    wrap;      
+	        
+	        Ext.each((elHash[id] || {})[eventName], function (v,i,a) {
+			    if (Ext.isArray(v) && v[0] == fn && (!scope || v[2] == scope)) {		        			        
+			        E.un(el, eventName, wrap = v[1]);
+			        a.splice(i,1);
+			        return false;			        
+		        }
+	        });	
+
+            // jQuery workaround that should be removed from Ext Core
+	        if(eventName == "mousewheel" && el.addEventListener && wrap){
+	            el.removeEventListener("DOMMouseScroll", wrap, false);
+	        }
+            	        
+	        if(eventName == "mousedown" && el == DOC && wrap){ // fix stopped mousedowns on the document
+	            Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
+	        }
+        },
+        
+        /**
+         * Removes all event handers from an element.  Typically you will use {@link Ext.Element#removeAllListeners}
+         * directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         */
+        removeAll : function(el){
+	        var id = Ext.id(el = Ext.getDom(el)), 
+				es = elHash[id], 				
+				ename;
+	       
+	        for(ename in es){
+	            if(es.hasOwnProperty(ename)){	                    
+	                Ext.each(es[ename], function(v) {
+	                    E.un(el, ename, v.wrap);                    
+	                });
+	            }            
+	        }
+	        elHash[id] = null;       
+        },
+
+        /**
+         * Fires when the document is ready (before onload and before images are loaded). Can be
+         * accessed shorthanded as Ext.onReady().
+         * @param {Function} fn The method the event invokes
+         * @param {Object} scope (optional) An object that becomes the scope of the handler
+         * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+         */
+        onDocumentReady : function(fn, scope, options){
+            if(docReadyState){ // if it already fired
+                docReadyEvent.addListener(fn, scope, options);
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();               
+            } else {
+                if(!docReadyEvent) initDocReady();
+                options = options || {};
+	            options.delay = options.delay || 1;	            
+	            docReadyEvent.addListener(fn, scope, options);
+            }
+        },
+        
+        elHash : elHash   
+    };
+     /**
+     * Appends an event handler to an element.  Shorthand for {@link #addListener}.
+     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+     * @param {String} eventName The type of event to listen for
+     * @param {Function} handler The handler function the event invokes
+     * @param {Object} scope (optional) The scope in which to execute the handler
+     * function (the handler function's "this" context)
+     * @param {Object} options (optional) An object containing standard {@link #addListener} options
+     * @member Ext.EventManager
+     * @method on
+     */
+    pub.on = pub.addListener;
+    /**
+     * Removes an event handler from an element.  Shorthand for {@link #removeListener}.
+     * @param {String/HTMLElement} el The id or html element from which to remove the event
+     * @param {String} eventName The type of event
+     * @param {Function} fn The handler function to remove
+     * @return {Boolean} True if a listener was actually removed, else false
+     * @member Ext.EventManager
+     * @method un
+     */
+    pub.un = pub.removeListener;
+
+    pub.stoppedMouseDownEvent = new Ext.util.Event();
+    return pub;
+}();
+/**
+  * Fires when the document is ready (before onload and before images are loaded).  Shorthand of {@link Ext.EventManager#onDocumentReady}.
+  * @param {Function} fn The method the event invokes
+  * @param {Object} scope An object that becomes the scope of the handler
+  * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+  * @member Ext
+  * @method onReady
+ */
+Ext.onReady = Ext.EventManager.onDocumentReady;
+
+
+//Initialize doc classes
+(function(){
+    
+    var initExtCss = function(){
+        // find the body element
+        var bd = document.body || document.getElementsByTagName('body')[0];
+        if(!bd){ return false; }
+        var cls = [' ',
+                Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8'))
+                : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3')
+                : Ext.isOpera ? "ext-opera"
+                : Ext.isWebKit ? "ext-webkit" : ""];
+
+        if(Ext.isSafari){
+            cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4')));
+        }else if(Ext.isChrome){
+            cls.push("ext-chrome");
+        }
+
+        if(Ext.isMac){
+            cls.push("ext-mac");
+        }
+        if(Ext.isLinux){
+            cls.push("ext-linux");
+        }
+
+        if(Ext.isStrict || Ext.isBorderBox){ // add to the parent to allow for selectors like ".ext-strict .ext-ie"
+            var p = bd.parentNode;
+            if(p){
+                p.className += Ext.isStrict ? ' ext-strict' : ' ext-border-box';
+            }
+        }
+        bd.className += cls.join(' ');
+        return true;
+    }
+
+    if(!initExtCss()){
+        Ext.onReady(initExtCss);
+    }
+})();
+
+
+/**
+ * @class Ext.EventObject
+ * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject 
+ * wraps the browser's native event-object normalizing cross-browser differences,
+ * such as which mouse button is clicked, keys pressed, mechanisms to stop
+ * event-propagation along with a method to prevent default actions from taking place.
+ * <p>For example:</p>
+ * <pre><code>
+function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
+    e.preventDefault();
+    var target = e.getTarget(); // same as t (the target HTMLElement)
+    ...
+}
+var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
+myDiv.on(         // 'on' is shorthand for addListener
+    "click",      // perform an action on click of myDiv
+    handleClick   // reference to the action handler
+);  
+// other methods to do the same:
+Ext.EventManager.on("myDiv", 'click', handleClick);
+Ext.EventManager.addListener("myDiv", 'click', handleClick);
+ </code></pre>
+ * @singleton
+ */
+Ext.EventObject = function(){
+    var E = Ext.lib.Event,
+    	// safari keypress events for special keys return bad keycodes
+    	safariKeys = {
+	        3 : 13, // enter
+	        63234 : 37, // left
+	        63235 : 39, // right
+	        63232 : 38, // up
+	        63233 : 40, // down
+	        63276 : 33, // page up
+	        63277 : 34, // page down
+	        63272 : 46, // delete
+	        63273 : 36, // home
+	        63275 : 35  // end
+    	},
+    	// normalize button clicks
+    	btnMap = Ext.isIE ? {1:0,4:1,2:2} :
+                (Ext.isWebKit ? {1:0,2:1,3:2} : {0:0,1:1,2:2});
+
+    Ext.EventObjectImpl = function(e){
+        if(e){
+            this.setEvent(e.browserEvent || e);
+        }
+    };
+
+    Ext.EventObjectImpl.prototype = {
+           /** @private */
+        setEvent : function(e){
+	        var me = this;
+            if(e == me || (e && e.browserEvent)){ // already wrapped
+                return e;
+            }
+            me.browserEvent = e;
+            if(e){
+                // normalize buttons
+                me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1);
+                if(e.type == 'click' && me.button == -1){
+                    me.button = 0;
+                }
+                me.type = e.type;
+                me.shiftKey = e.shiftKey;
+                // mac metaKey behaves like ctrlKey
+                me.ctrlKey = e.ctrlKey || e.metaKey || false;
+                me.altKey = e.altKey;
+                // in getKey these will be normalized for the mac
+                me.keyCode = e.keyCode;
+                me.charCode = e.charCode;
+                // cache the target for the delayed and or buffered events
+                me.target = E.getTarget(e);
+                // same for XY
+                me.xy = E.getXY(e);
+            }else{
+                me.button = -1;
+                me.shiftKey = false;
+                me.ctrlKey = false;
+                me.altKey = false;
+                me.keyCode = 0;
+                me.charCode = 0;
+                me.target = null;
+                me.xy = [0, 0];
+            }
+            return me;
+        },
+
+        /**
+         * Stop the event (preventDefault and stopPropagation)
+         */
+        stopEvent : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopEvent(me.browserEvent);
+            }
+        },
+
+        /**
+         * Prevents the browsers default handling of the event.
+         */
+        preventDefault : function(){
+            if(this.browserEvent){
+                E.preventDefault(this.browserEvent);
+            }
+        },        
+
+        /**
+         * Cancels bubbling of the event.
+         */
+        stopPropagation : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopPropagation(me.browserEvent);
+            }
+        },
+
+        /**
+         * Gets the character code for the event.
+         * @return {Number}
+         */
+        getCharCode : function(){
+            return this.charCode || this.keyCode;
+        },
+
+        /**
+         * Returns a normalized keyCode for the event.
+         * @return {Number} The key code
+         */
+        getKey : function(){
+            return this.normalizeKey(this.keyCode || this.charCode)
+        },
+		
+		// private
+		normalizeKey: function(k){
+			return Ext.isSafari ? (safariKeys[k] || k) : k; 
+		},
+
+        /**
+         * Gets the x coordinate of the event.
+         * @return {Number}
+         */
+        getPageX : function(){
+            return this.xy[0];
+        },
+
+        /**
+         * Gets the y coordinate of the event.
+         * @return {Number}
+         */
+        getPageY : function(){
+            return this.xy[1];
+        },
+
+        /**
+         * Gets the page coordinates of the event.
+         * @return {Array} The xy values like [x, y]
+         */
+        getXY : function(){
+            return this.xy;
+        },
+
+        /**
+         * Gets the target for the event.
+         * @param {String} selector (optional) A simple selector to filter the target or look for an ancestor of the target
+         * @param {Number/Mixed} maxDepth (optional) The max depth to
+                search as a number or element (defaults to 10 || document.body)
+         * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+         * @return {HTMLelement}
+         */
+        getTarget : function(selector, maxDepth, returnEl){
+            return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target);
+        },
+
+        /**
+         * Gets the related target.
+         * @return {HTMLElement}
+         */
+        getRelatedTarget : function(){
+            return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null;
+        },
+
+        /**
+         * Normalizes mouse wheel delta across browsers
+         * @return {Number} The delta
+         */
+        getWheelDelta : function(){
+            var e = this.browserEvent;
+            var delta = 0;
+            if(e.wheelDelta){ /* IE/Opera. */
+                delta = e.wheelDelta/120;
+            }else if(e.detail){ /* Mozilla case. */
+                delta = -e.detail/3;
+            }
+            return delta;
+        },
+		
+		/**
+		* Returns true if the target of this event is a child of el.  Unless the allowEl parameter is set, it will return false if if the target is el.
+		* Example usage:<pre><code>
+		// Handle click on any child of an element
+		Ext.getBody().on('click', function(e){
+			if(e.within('some-el')){
+				alert('Clicked on a child of some-el!');
+			}
+		});
+		
+		// Handle click directly on an element, ignoring clicks on child nodes
+		Ext.getBody().on('click', function(e,t){
+			if((t.id == 'some-el') && !e.within(t, true)){
+				alert('Clicked directly on some-el!');
+			}
+		});
+		</code></pre>
+		 * @param {Mixed} el The id, DOM element or Ext.Element to check
+		 * @param {Boolean} related (optional) true to test if the related target is within el instead of the target
+		 * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target
+		 * @return {Boolean}
+		 */
+		within : function(el, related, allowEl){
+            if(el){
+			    var t = this[related ? "getRelatedTarget" : "getTarget"]();
+			    return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t));
+            }
+            return false;
+		}
+	 };
+
+    return new Ext.EventObjectImpl();
+}();/**
+ * @class Ext.EventManager
+ */
+Ext.apply(Ext.EventManager, function(){
+	var resizeEvent, 
+    	resizeTask, 
+    	textEvent, 
+    	textSize,
+    	D = Ext.lib.Dom,
+    	E = Ext.lib.Event,
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
+        curWidth = 0,
+        curHeight = 0,
+        // note 1: IE fires ONLY the keydown event on specialkey autorepeat
+        // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat
+        // (research done by @Jan Wolter at http://unixpapa.com/js/key.html)
+        useKeydown = Ext.isSafari ? 
+                    Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1] || 2) >= 3.1 :
+                    !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera);
+      	
+	return { 
+		// private
+	    doResizeEvent: function(){
+            var h = D.getViewHeight(),
+                w = D.getViewWidth();
+            
+            //whacky problem in IE where the resize event will fire even though the w/h are the same.
+            if(curHeight != h || curWidth != w){
+                resizeEvent.fire(curWidth = w, curHeight = h);
+            }
+	    },
+	    
+	    /**
+	     * Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onWindowResize : function(fn, scope, options){
+	        if(!resizeEvent){
+	            resizeEvent = new Ext.util.Event();
+	            resizeTask = new Ext.util.DelayedTask(this.doResizeEvent);
+	            E.on(window, "resize", this.fireWindowResize, this);
+	        }
+	        resizeEvent.addListener(fn, scope, options);
+	    },
+	
+	    // exposed only to allow manual firing
+	    fireWindowResize : function(){
+	        if(resizeEvent){
+	            if((Ext.isIE||Ext.isAir) && resizeTask){
+	                resizeTask.delay(50);
+	            }else{
+	                resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	            }
+	        }
+	    },
+	
+	    /**
+	     * Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onTextResize : function(fn, scope, options){
+	        if(!textEvent){
+	            textEvent = new Ext.util.Event();
+	            var textEl = new Ext.Element(document.createElement('div'));
+	            textEl.dom.className = 'x-text-resize';
+	            textEl.dom.innerHTML = 'X';
+	            textEl.appendTo(document.body);
+	            textSize = textEl.dom.offsetHeight;
+	            setInterval(function(){
+	                if(textEl.dom.offsetHeight != textSize){
+	                    textEvent.fire(textSize, textSize = textEl.dom.offsetHeight);
+	                }
+	            }, this.textResizeInterval);
+	        }
+	        textEvent.addListener(fn, scope, options);
+	    },
+	
+	    /**
+	     * Removes the passed window resize listener.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    The scope of handler
+	     */
+	    removeResizeListener : function(fn, scope){
+	        if(resizeEvent){
+	            resizeEvent.removeListener(fn, scope);
+	        }
+	    },
+	
+	    // private
+	    fireResize : function(){
+	        if(resizeEvent){
+	            resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	        }
+	    },
+	    
+	     /**
+	     * The frequency, in milliseconds, to check for text resize events (defaults to 50)
+	     */
+	    textResizeInterval : 50,
+	    
+	    /**
+         * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
+         */
+        ieDeferSrc : false,
+        
+        // protected for use inside the framework
+        // detects whether we should use keydown or keypress based on the browser.
+        useKeydown: useKeydown
+    };
+}());
+
+Ext.EventManager.on = Ext.EventManager.addListener;
+
+
+Ext.apply(Ext.EventObjectImpl.prototype, {
+    /** Key constant @type Number */
+    BACKSPACE: 8,
+    /** Key constant @type Number */
+    TAB: 9,
+    /** Key constant @type Number */
+    NUM_CENTER: 12,
+    /** Key constant @type Number */
+    ENTER: 13,
+    /** Key constant @type Number */
+    RETURN: 13,
+    /** Key constant @type Number */
+    SHIFT: 16,
+    /** Key constant @type Number */
+    CTRL: 17,
+    CONTROL : 17, // legacy
+    /** Key constant @type Number */
+    ALT: 18,
+    /** Key constant @type Number */
+    PAUSE: 19,
+    /** Key constant @type Number */
+    CAPS_LOCK: 20,
+    /** Key constant @type Number */
+    ESC: 27,
+    /** Key constant @type Number */
+    SPACE: 32,
+    /** Key constant @type Number */
+    PAGE_UP: 33,
+    PAGEUP : 33, // legacy
+    /** Key constant @type Number */
+    PAGE_DOWN: 34,
+    PAGEDOWN : 34, // legacy
+    /** Key constant @type Number */
+    END: 35,
+    /** Key constant @type Number */
+    HOME: 36,
+    /** Key constant @type Number */
+    LEFT: 37,
+    /** Key constant @type Number */
+    UP: 38,
+    /** Key constant @type Number */
+    RIGHT: 39,
+    /** Key constant @type Number */
+    DOWN: 40,
+    /** Key constant @type Number */
+    PRINT_SCREEN: 44,
+    /** Key constant @type Number */
+    INSERT: 45,
+    /** Key constant @type Number */
+    DELETE: 46,
+    /** Key constant @type Number */
+    ZERO: 48,
+    /** Key constant @type Number */
+    ONE: 49,
+    /** Key constant @type Number */
+    TWO: 50,
+    /** Key constant @type Number */
+    THREE: 51,
+    /** Key constant @type Number */
+    FOUR: 52,
+    /** Key constant @type Number */
+    FIVE: 53,
+    /** Key constant @type Number */
+    SIX: 54,
+    /** Key constant @type Number */
+    SEVEN: 55,
+    /** Key constant @type Number */
+    EIGHT: 56,
+    /** Key constant @type Number */
+    NINE: 57,
+    /** Key constant @type Number */
+    A: 65,
+    /** Key constant @type Number */
+    B: 66,
+    /** Key constant @type Number */
+    C: 67,
+    /** Key constant @type Number */
+    D: 68,
+    /** Key constant @type Number */
+    E: 69,
+    /** Key constant @type Number */
+    F: 70,
+    /** Key constant @type Number */
+    G: 71,
+    /** Key constant @type Number */
+    H: 72,
+    /** Key constant @type Number */
+    I: 73,
+    /** Key constant @type Number */
+    J: 74,
+    /** Key constant @type Number */
+    K: 75,
+    /** Key constant @type Number */
+    L: 76,
+    /** Key constant @type Number */
+    M: 77,
+    /** Key constant @type Number */
+    N: 78,
+    /** Key constant @type Number */
+    O: 79,
+    /** Key constant @type Number */
+    P: 80,
+    /** Key constant @type Number */
+    Q: 81,
+    /** Key constant @type Number */
+    R: 82,
+    /** Key constant @type Number */
+    S: 83,
+    /** Key constant @type Number */
+    T: 84,
+    /** Key constant @type Number */
+    U: 85,
+    /** Key constant @type Number */
+    V: 86,
+    /** Key constant @type Number */
+    W: 87,
+    /** Key constant @type Number */
+    X: 88,
+    /** Key constant @type Number */
+    Y: 89,
+    /** Key constant @type Number */
+    Z: 90,
+    /** Key constant @type Number */
+    CONTEXT_MENU: 93,
+    /** Key constant @type Number */
+    NUM_ZERO: 96,
+    /** Key constant @type Number */
+    NUM_ONE: 97,
+    /** Key constant @type Number */
+    NUM_TWO: 98,
+    /** Key constant @type Number */
+    NUM_THREE: 99,
+    /** Key constant @type Number */
+    NUM_FOUR: 100,
+    /** Key constant @type Number */
+    NUM_FIVE: 101,
+    /** Key constant @type Number */
+    NUM_SIX: 102,
+    /** Key constant @type Number */
+    NUM_SEVEN: 103,
+    /** Key constant @type Number */
+    NUM_EIGHT: 104,
+    /** Key constant @type Number */
+    NUM_NINE: 105,
+    /** Key constant @type Number */
+    NUM_MULTIPLY: 106,
+    /** Key constant @type Number */
+    NUM_PLUS: 107,
+    /** Key constant @type Number */
+    NUM_MINUS: 109,
+    /** Key constant @type Number */
+    NUM_PERIOD: 110,
+    /** Key constant @type Number */
+    NUM_DIVISION: 111,
+    /** Key constant @type Number */
+    F1: 112,
+    /** Key constant @type Number */
+    F2: 113,
+    /** Key constant @type Number */
+    F3: 114,
+    /** Key constant @type Number */
+    F4: 115,
+    /** Key constant @type Number */
+    F5: 116,
+    /** Key constant @type Number */
+    F6: 117,
+    /** Key constant @type Number */
+    F7: 118,
+    /** Key constant @type Number */
+    F8: 119,
+    /** Key constant @type Number */
+    F9: 120,
+    /** Key constant @type Number */
+    F10: 121,
+    /** Key constant @type Number */
+    F11: 122,
+    /** Key constant @type Number */
+    F12: 123,	
+    
+    /** @private */
+    isNavKeyPress : function(){
+        var me = this,
+        	k = this.normalizeKey(me.keyCode);		
+        return (k >= 33 && k <= 40) ||  // Page Up/Down, End, Home, Left, Up, Right, Down
+		k == me.RETURN ||
+		k == me.TAB ||
+		k == me.ESC;
+    },
+
+    isSpecialKey : function(){
+        var k = this.normalizeKey(this.keyCode);
+        return (this.type == 'keypress' && this.ctrlKey) ||
+		this.isNavKeyPress() ||
+        (k == this.BACKSPACE) || // Backspace
+		(k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock
+		(k >= 44 && k <= 45);   // Print Screen, Insert
+    },
+	
+	getPoint : function(){
+	    return new Ext.lib.Point(this.xy[0], this.xy[1]);
+	},
+
+    /**
+     * Returns true if the control, meta, shift or alt key was pressed during this event.
+     * @return {Boolean}
+     */
+    hasModifier : function(){
+        return ((this.ctrlKey || this.altKey) || this.shiftKey);
+    }
+});/**
+ * @class Ext.Element
+ * <p>Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.</p>
+ * <p>All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.</p>
+ * <p>Note that the events documented in this class are not Ext events, they encapsulate browser events. To
+ * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older
+ * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.</p>
+ * Usage:<br>
+<pre><code>
+// by id
+var el = Ext.get("my-div");
+
+// by DOM element reference
+var el = Ext.get(myDivElement);
+</code></pre>
+ * <b>Animations</b><br />
+ * <p>When an element is manipulated, by default there is no animation.</p>
+ * <pre><code>
+var el = Ext.get("my-div");
+
+// no animation
+el.setWidth(100);
+ * </code></pre>
+ * <p>Many of the functions for manipulating an element have an optional "animate" parameter.  This
+ * parameter can be specified as boolean (<tt>true</tt>) for default animation effects.</p>
+ * <pre><code>
+// default animation
+el.setWidth(100, true);
+ * </code></pre>
+ * 
+ * <p>To configure the effects, an object literal with animation options to use as the Element animation
+ * configuration object can also be specified. Note that the supported Element animation configuration
+ * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects.  The supported
+ * Element animation configuration options are:</p>
+<pre>
+Option    Default   Description
+--------- --------  ---------------------------------------------
+{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
+{@link Ext.Fx#easing easing}    easeOut   The easing method
+{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
+{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
+</pre>
+ * 
+ * <pre><code>
+// Element animation options object
+var opt = {
+    {@link Ext.Fx#duration duration}: 1,
+    {@link Ext.Fx#easing easing}: 'elasticIn',
+    {@link Ext.Fx#callback callback}: this.foo,
+    {@link Ext.Fx#scope scope}: this
+};
+// animation with some options set
+el.setWidth(100, opt);
+ * </code></pre>
+ * <p>The Element animation object being used for the animation will be set on the options
+ * object as "anim", which allows you to stop or manipulate the animation. Here is an example:</p>
+ * <pre><code>
+// using the "anim" property to get the Anim object
+if(opt.anim.isAnimated()){
+    opt.anim.stop();
+}
+ * </code></pre>
+ * <p>Also see the <tt>{@link #animate}</tt> method for another animation technique.</p>
+ * <p><b> Composite (Collections of) Elements</b></p>
+ * <p>For working with collections of Elements, see {@link Ext.CompositeElement}</p>
+ * @constructor Create a new Element directly.
+ * @param {String/HTMLElement} element
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).
+ */
+(function(){
+var DOC = document;
+
+Ext.Element = function(element, forceNew){
+    var dom = typeof element == "string" ?
+              DOC.getElementById(element) : element,
+        id;
+
+    if(!dom) return null;
+
+    id = dom.id;
+
+    if(!forceNew && id && Ext.Element.cache[id]){ // element object already exists
+        return Ext.Element.cache[id];
+    }
+
+    /**
+     * The DOM element
+     * @type HTMLElement
+     */
+    this.dom = dom;
+
+    /**
+     * The DOM element ID
+     * @type String
+     */
+    this.id = id || Ext.id(dom);
+};
+
+var D = Ext.lib.Dom,
+    DH = Ext.DomHelper,
+    E = Ext.lib.Event,
+    A = Ext.lib.Anim,
+    El = Ext.Element;
+
+El.prototype = {
+    /**
+     * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
+     * @param {Object} o The object with the attributes
+     * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos.
+     * @return {Ext.Element} this
+     */
+    set : function(o, useSet){
+        var el = this.dom,
+            attr,
+            val;        
+       
+        for(attr in o){
+            val = o[attr];
+            if (attr != "style" && !Ext.isFunction(val)) {
+                if (attr == "cls" ) {
+                    el.className = val;
+                } else if (o.hasOwnProperty(attr)) {
+                    if (useSet || !!el.setAttribute) el.setAttribute(attr, val);
+                    else el[attr] = val;
+                }
+            }
+        }
+        if(o.style){
+            Ext.DomHelper.applyStyles(el, o.style);
+        }
+        return this;
+    },
+    
+//  Mouse events
+    /**
+     * @event click
+     * Fires when a mouse click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event dblclick
+     * Fires when a mouse double click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousedown
+     * Fires when a mousedown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseup
+     * Fires when a mouseup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseover
+     * Fires when a mouseover is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousemove
+     * Fires when a mousemove is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseout
+     * Fires when a mouseout is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseenter
+     * Fires when the mouse enters the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseleave
+     * Fires when the mouse leaves the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    
+//  Keyboard events
+    /**
+     * @event keypress
+     * Fires when a keypress is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keydown
+     * Fires when a keydown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keyup
+     * Fires when a keyup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+
+//  HTML frame/object events
+    /**
+     * @event load
+     * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event unload
+     * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event abort
+     * Fires when an object/image is stopped from loading before completely loaded.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event error
+     * Fires when an object/image/frame cannot be loaded properly.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event resize
+     * Fires when a document view is resized.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event scroll
+     * Fires when a document view is scrolled.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  Form events
+    /**
+     * @event select
+     * Fires when a user selects some text in a text field, including input and textarea.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event change
+     * Fires when a control loses the input focus and its value has been modified since gaining focus.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event submit
+     * Fires when a form is submitted.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event reset
+     * Fires when a form is reset.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event focus
+     * Fires when an element receives focus either via the pointing device or by tab navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event blur
+     * Fires when an element loses focus either via the pointing device or by tabbing navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  User Interface events
+    /**
+     * @event DOMFocusIn
+     * Where supported. Similar to HTML focus event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMFocusOut
+     * Where supported. Similar to HTML blur event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMActivate
+     * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  DOM Mutation events
+    /**
+     * @event DOMSubtreeModified
+     * Where supported. Fires when the subtree is modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInserted
+     * Where supported. Fires when a node has been added as a child of another node.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemoved
+     * Where supported. Fires when a descendant node of the element is removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemovedFromDocument
+     * Where supported. Fires when a node is being removed from a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInsertedIntoDocument
+     * Where supported. Fires when a node is being inserted into a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMAttrModified
+     * Where supported. Fires when an attribute has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMCharacterDataModified
+     * Where supported. Fires when the character data has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+    /**
+     * The default unit to append to CSS values where a unit isn't provided (defaults to px).
+     * @type String
+     */
+    defaultUnit : "px",
+
+    /**
+     * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
+     * @param {String} selector The simple selector to test
+     * @return {Boolean} True if this element matches the selector, else false
+     */
+    is : function(simpleSelector){
+        return Ext.DomQuery.is(this.dom, simpleSelector);
+    },
+
+    /**
+     * Tries to focus the element. Any exceptions are caught and ignored.
+     * @param {Number} defer (optional) Milliseconds to defer the focus
+     * @return {Ext.Element} this
+     */
+    focus : function(defer, /* private */ dom) {
+        var me = this,
+            dom = dom || me.dom;
+        try{
+            if(Number(defer)){
+                me.focus.defer(defer, null, [null, dom]);
+            }else{
+                dom.focus();
+            }
+        }catch(e){}
+        return me;
+    },
+
+    /**
+     * Tries to blur the element. Any exceptions are caught and ignored.
+     * @return {Ext.Element} this
+     */
+    blur : function() {
+        try{
+            this.dom.blur();
+        }catch(e){}
+        return this;
+    },
+
+    /**
+     * Returns the value of the "value" attribute
+     * @param {Boolean} asNumber true to parse the value as a number
+     * @return {String/Number}
+     */
+    getValue : function(asNumber){
+        var val = this.dom.value;
+        return asNumber ? parseInt(val, 10) : val;
+    },
+
+    /**
+     * Appends an event handler to this element.  The shorthand version {@link #on} is equivalent.
+     * @param {String} eventName The type of event to handle
+     * @param {Function} fn The handler function the event invokes. This function is passed
+     * the following parameters:<ul>
+     * <li><b>evt</b> : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+     * <li><b>el</b> : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+     * <li><b>o</b> : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b>.
+     * @param {Object} options (optional) An object containing handler configuration properties.
+     * This may contain any of the following properties:<ul>
+     * <li><b>scope</b> Object : <div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b></div></li>
+     * <li><b>delegate</b> String: <div class="sub-desc">A simple selector to filter the target or look for a descendant of the target. See below for additional details.</div></li>
+     * <li><b>stopEvent</b> Boolean: <div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+     * <li><b>preventDefault</b> Boolean: <div class="sub-desc">True to prevent the default action</div></li>
+     * <li><b>stopPropagation</b> Boolean: <div class="sub-desc">True to prevent event propagation</div></li>
+     * <li><b>normalized</b> Boolean: <div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+     * <li><b>target</b> Ext.Element: <div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+     * <li><b>delay</b> Number: <div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+     * <li><b>single</b> Boolean: <div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+     * <li><b>buffer</b> Number: <div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+     * by the specified number of milliseconds. If the event fires again within that time, the original
+     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+     * </ul><br>
+     * <p>
+     * <b>Combining Options</b><br>
+     * In the following examples, the shorthand form {@link #on} is used rather than the more verbose
+     * addListener.  The two are equivalent.  Using the options argument, it is possible to combine different
+     * types of listeners:<br>
+     * <br>
+     * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the
+     * options object. The options object is available as the third parameter in the handler function.<div style="margin: 5px 20px 20px;">
+     * Code:<pre><code>
+el.on('click', this.onClick, this, {
+    single: true,
+    delay: 100,
+    stopEvent : true,
+    forumId: 4
+});</code></pre></p>
+     * <p>
+     * <b>Attaching multiple handlers in 1 call</b><br>
+     * The method also allows for a single argument to be passed which is a config object containing properties
+     * which specify multiple handlers.</p>
+     * <p>
+     * Code:<pre><code>
+el.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * Code:<pre><code></p>
+el.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+    scope: this
+});
+     * </code></pre></p>
+     * <p><b>delegate</b></p>
+     * <p>This is a configuration option that you can pass along when registering a handler for
+     * an event to assist with event delegation. Event delegation is a technique that is used to
+     * reduce memory consumption and prevent exposure to memory-leaks. By registering an event
+     * for a container element as opposed to each element within a container. By setting this
+     * configuration option to a simple selector, the target element will be filtered to look for
+     * a descendant of the target.
+     * For example:<pre><code>
+// using this markup:
+&lt;div id='elId'>
+    &lt;p id='p1'>paragraph one&lt;/p>
+    &lt;p id='p2' class='clickable'>paragraph two&lt;/p>
+    &lt;p id='p3'>paragraph three&lt;/p>
+&lt;/div>
+// utilize event delegation to registering just one handler on the container element: 
+el = Ext.get('elId');
+el.on(
+    'click',
+    function(e,t) {
+        // handle click
+        console.info(t.id); // 'p2'
+    },
+    this,
+    {
+        // filter the target element to be a descendant with the class 'clickable'
+        delegate: '.clickable' 
+    }
+);
+     * </code></pre></p>
+     * @return {Ext.Element} this
+     */
+    addListener : function(eventName, fn, scope, options){
+        Ext.EventManager.on(this.dom,  eventName, fn, scope || this, options);
+        return this;
+    },
+
+    /**
+     * Removes an event handler from this element.  The shorthand version {@link #un} is equivalent.
+     * <b>Note</b>: if a <i>scope</i> was explicitly specified when {@link #addListener adding} the
+     * listener, the same scope must be specified here.
+     * Example:
+     * <pre><code>
+el.removeListener('click', this.handlerFn);
+// or
+el.un('click', this.handlerFn);
+</code></pre>
+     * @param {String} eventName the type of event to remove
+     * @param {Function} fn the method the event invokes
+     * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+     * to this Element.
+     * @return {Ext.Element} this
+     */
+    removeListener : function(eventName, fn, scope){
+        Ext.EventManager.removeListener(this.dom,  eventName, fn, scope || this);
+        return this;
+    },
+
+    /**
+     * Removes all previous added listeners from this element
+     * @return {Ext.Element} this
+     */
+    removeAllListeners : function(){
+        Ext.EventManager.removeAll(this.dom);
+        return this;
+    },
+
+    /**
+     * @private Test if size has a unit, otherwise appends the default
+     */
+    addUnits : function(size){
+        if(size === "" || size == "auto" || size === undefined){
+            size = size || '';
+        } else if(!isNaN(size) || !unitPattern.test(size)){
+            size = size + (this.defaultUnit || 'px');
+        }
+        return size;
+    },
+
+    /**
+     * <p>Updates the <a href="http://developer.mozilla.org/en/DOM/element.innerHTML">innerHTML</a> of this Element
+     * from a specified URL. Note that this is subject to the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">Same Origin Policy</a></p>
+     * <p>Updating innerHTML of an element will <b>not</b> execute embedded <tt>&lt;script></tt> elements. This is a browser restriction.</p>
+     * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying
+     * exactly how to request the HTML.
+     * @return {Ext.Element} this
+     */
+    load : function(url, params, cb){
+        Ext.Ajax.request(Ext.apply({
+            params: params,
+            url: url.url || url,
+            callback: cb,
+            el: this.dom,
+            indicatorText: url.indicatorText || ''
+        }, Ext.isObject(url) ? url : {}));
+        return this;
+    },
+
+    /**
+     * Tests various css rules/browsers to determine if this element uses a border box
+     * @return {Boolean}
+     */
+    isBorderBox : function(){
+        return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;
+    },
+
+    /**
+     * Removes this element from the DOM and deletes it from the cache
+     */
+    remove : function(){
+        var me = this,
+            dom = me.dom;
+        
+        me.removeAllListeners();
+        delete El.cache[dom.id];
+        delete El.dataCache[dom.id]
+        Ext.removeNode(dom);
+    },
+
+    /**
+     * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
+     * @param {Function} overFn The function to call when the mouse enters the Element.
+     * @param {Function} outFn The function to call when the mouse leaves the Element.
+     * @param {Object} scope (optional) The scope (<tt>this</tt> reference) in which the functions are executed. Defaults to the Element's DOM element.
+     * @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the <tt>options</tt> parameter}.
+     * @return {Ext.Element} this
+     */
+    hover : function(overFn, outFn, scope, options){
+        var me = this;
+        me.on('mouseenter', overFn, scope || me.dom, options);
+        me.on('mouseleave', outFn, scope || me.dom, options);
+        return me;
+    },
+
+    /**
+     * Returns true if this element is an ancestor of the passed element
+     * @param {HTMLElement/String} el The element to check
+     * @return {Boolean} True if this element is an ancestor of el, else false
+     */
+    contains : function(el){
+        return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);
+    },
+
+    /**
+     * Returns the value of a namespaced attribute from the element's underlying DOM node.
+     * @param {String} namespace The namespace in which to look for the attribute
+     * @param {String} name The attribute name
+     * @return {String} The attribute value
+     * @deprecated
+     */
+    getAttributeNS : function(ns, name){
+        return this.getAttribute(name, ns); 
+    },
+    
+    /**
+     * Returns the value of an attribute from the element's underlying DOM node.
+     * @param {String} name The attribute name
+     * @param {String} namespace (optional) The namespace in which to look for the attribute
+     * @return {String} The attribute value
+     */
+    getAttribute : Ext.isIE ? function(name, ns){
+        var d = this.dom,
+            type = typeof d[ns + ":" + name];
+
+        if(['undefined', 'unknown'].indexOf(type) == -1){
+            return d[ns + ":" + name];
+        }
+        return d[name];
+    } : function(name, ns){
+        var d = this.dom;
+        return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name];
+    },
+    
+    /**
+    * Update the innerHTML of this element
+    * @param {String} html The new HTML
+    * @return {Ext.Element} this
+     */
+    update : function(html) {
+        this.dom.innerHTML = html;
+        return this;
+    }
+};
+
+var ep = El.prototype;
+
+El.addMethods = function(o){
+   Ext.apply(ep, o);
+};
+
+/**
+ * Appends an event handler (shorthand for {@link #addListener}).
+ * @param {String} eventName The type of event to handle
+ * @param {Function} fn The handler function the event invokes
+ * @param {Object} scope (optional) The scope (this element) of the handler function
+ * @param {Object} options (optional) An object containing standard {@link #addListener} options
+ * @member Ext.Element
+ * @method on
+ */
+ep.on = ep.addListener;
+
+/**
+ * Removes an event handler from this element (see {@link #removeListener} for additional notes).
+ * @param {String} eventName the type of event to remove
+ * @param {Function} fn the method the event invokes
+ * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+ * to this Element.
+ * @return {Ext.Element} this
+ * @member Ext.Element
+ * @method un
+ */
+ep.un = ep.removeListener;
+
+/**
+ * true to automatically adjust width and height settings for box-model issues (default to true)
+ */
+ep.autoBoxAdjust = true;
+
+// private
+var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
+    docEl;
+
+/**
+ * @private
+ */
+El.cache = {};
+El.dataCache = {};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @static
+ * @member Ext.Element
+ * @method get
+ */
+El.get = function(el){
+    var ex,
+        elm,
+        id;
+    if(!el){ return null; }
+    if (typeof el == "string") { // element id
+        if (!(elm = DOC.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) { // dom element
+        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 = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid,
+                                                          // catch case where it hasn't been appended
+            El.cache[el.id] = el; // in case it was created directly with Element(), let's cache it
+        }
+        return el;
+    } else if(el.isComposite) {
+        return el;
+    } else if(Ext.isArray(el)) {
+        return El.select(el);
+    } else if(el == DOC) {
+        // create a bogus element object representing the document object
+        if(!docEl){
+            var f = function(){};
+            f.prototype = El.prototype;
+            docEl = new f();
+            docEl.dom = DOC;
+        }
+        return docEl;
+    }
+    return null;
+};
+
+// private method for getting and setting element data
+El.data = function(el, key, value){
+    var c = El.dataCache[el.id];
+    if(!c){
+        c = El.dataCache[el.id] = {};
+    }
+    if(arguments.length == 2){
+        return c[key];    
+    }else{
+        c[key] = value;
+    }
+};
+
+// private
+// Garbage collection - uncache elements/purge listeners on orphaned elements
+// so we don't hold a reference and cause the browser to retain them
+function garbageCollect(){
+    if(!Ext.enableGarbageCollector){
+        clearInterval(El.collectorThread);
+    } else {
+        var eid,
+            el,
+            d;
+
+        for(eid in El.cache){
+            el = El.cache[eid];
+            d = el.dom;
+            // -------------------------------------------------------
+            // Determining what is garbage:
+            // -------------------------------------------------------
+            // !d
+            // dom node is null, definitely garbage
+            // -------------------------------------------------------
+            // !d.parentNode
+            // no parentNode == direct orphan, definitely garbage
+            // -------------------------------------------------------
+            // !d.offsetParent && !document.getElementById(eid)
+            // display none elements have no offsetParent so we will
+            // also try to look it up by it's id. However, check
+            // offsetParent first so we don't do unneeded lookups.
+            // This enables collection of elements that are not orphans
+            // directly, but somewhere up the line they have an orphan
+            // parent.
+            // -------------------------------------------------------
+            if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){
+                delete El.cache[eid];
+                if(d && Ext.enableListenerCollection){
+                    Ext.EventManager.removeAll(d);
+                }
+            }
+        }
+    }
+}
+El.collectorThreadId = setInterval(garbageCollect, 30000);
+
+var flyFn = function(){};
+flyFn.prototype = El.prototype;
+
+// dom is optional
+El.Flyweight = function(dom){
+    this.dom = dom;
+};
+
+El.Flyweight.prototype = new flyFn();
+El.Flyweight.prototype.isFlyweight = true;
+El._flyweights = {};
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext.Element
+ * @method fly
+ */
+El.fly = function(el, named){
+    var ret = null;
+    named = named || '_global';
+
+    if (el = Ext.getDom(el)) {
+        (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el;
+        ret = El._flyweights[named];
+    }
+    return ret;
+};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * Shorthand of {@link Ext.Element#get}
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @member Ext
+ * @method get
+ */
+Ext.get = El.get;
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext
+ * @method fly
+ */
+Ext.fly = El.fly;
+
+// speedy lookup for elements never to box adjust
+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.dataCache;
+    delete El._flyweights;
+});
+})();
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({    
+    /**
+     * Stops the specified event(s) from bubbling and optionally prevents the default action
+     * @param {String/Array} eventName an event / array of events to stop from bubbling
+     * @param {Boolean} preventDefault (optional) true to prevent the default action too
+     * @return {Ext.Element} this
+     */
+    swallowEvent : function(eventName, preventDefault){
+	    var me = this;
+        function fn(e){
+            e.stopPropagation();
+            if(preventDefault){
+                e.preventDefault();
+            }
+        }
+        if(Ext.isArray(eventName)){            
+	        Ext.each(eventName, function(e) {
+                 me.on(e, fn);
+            });
+            return me;
+        }
+        me.on(eventName, fn);
+        return me;
+    },
+    
+    /**
+     * Create an event handler on this element such that when the event fires and is handled by this element,
+     * it will be relayed to another object (i.e., fired again as if it originated from that object instead).
+     * @param {String} eventName The type of event to relay
+     * @param {Object} object Any object that extends {@link Ext.util.Observable} that will provide the context
+     * for firing the relayed event
+     */
+    relayEvent : function(eventName, observable){
+        this.on(eventName, function(e){
+            observable.fireEvent(eventName, e);
+        });
+    },
+    
+	/**
+     * Removes worthless text nodes
+     * @param {Boolean} forceReclean (optional) By default the element
+     * keeps track if it has been cleaned already so
+     * you can call this over and over. However, if you update the element and
+     * need to force a reclean, you can pass true.
+     */
+    clean : function(forceReclean){
+        var me = this, 
+            dom = me.dom,
+        	n = dom.firstChild, 
+        	ni = -1;
+        	
+	    if(Ext.Element.data(dom, 'isCleaned') && forceReclean !== true){
+            return me;
+        }      
+        	
+ 	    while(n){
+ 	        var nx = n.nextSibling;
+            if(n.nodeType == 3 && !/\S/.test(n.nodeValue)){
+                dom.removeChild(n);
+            }else{
+                n.nodeIndex = ++ni;
+            }
+ 	        n = nx;
+ 	    }
+        Ext.Element.data(dom, 'isCleaned', true);
+ 	    return me;
+ 	},
+    
+    /**
+     * Direct access to the Updater {@link Ext.Updater#update} method. The method takes the same object
+     * parameter as {@link Ext.Updater#update}
+     * @return {Ext.Element} this
+     */
+    load : function(){
+        var um = this.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    /**
+    * Gets this element's {@link Ext.Updater Updater}
+    * @return {Ext.Updater} The Updater
+    */
+    getUpdater : function(){
+        return this.updateManager || (this.updateManager = new Ext.Updater(this));
+    },
+    
+	/**
+    * Update the innerHTML of this element, optionally searching for and processing scripts
+    * @param {String} html The new HTML
+    * @param {Boolean} loadScripts (optional) True to look for and process scripts (defaults to false)
+    * @param {Function} callback (optional) For async script loading you can be notified when the update completes
+    * @return {Ext.Element} this
+     */
+    update : function(html, loadScripts, callback){
+        html = html || "";
+	    
+        if(loadScripts !== true){
+            this.dom.innerHTML = html;
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+            return this;
+        }
+        
+        var id = Ext.id(),
+        	dom = this.dom;
+
+        html += '<span id="' + id + '"></span>';
+
+        Ext.lib.Event.onAvailable(id, function(){
+            var DOC = document,
+                hd = DOC.getElementsByTagName("head")[0],
+            	re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+            	srcRe = /\ssrc=([\'\"])(.*?)\1/i,
+            	typeRe = /\stype=([\'\"])(.*?)\1/i,
+            	match,
+            	attrs,
+            	srcMatch,
+            	typeMatch,
+            	el,
+            	s;
+
+            while((match = re.exec(html))){
+                attrs = match[1];
+                srcMatch = attrs ? attrs.match(srcRe) : false;
+                if(srcMatch && srcMatch[2]){
+                   s = DOC.createElement("script");
+                   s.src = srcMatch[2];
+                   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]);
+                    }
+                }
+            }
+            el = DOC.getElementById(id);
+            if(el){Ext.removeNode(el);}
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+        });
+        dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
+        return this;
+    },
+    
+    /**
+     * Creates a proxy element of this element
+     * @param {String/Object} config The class name of the proxy element or a DomHelper config object
+     * @param {String/HTMLElement} renderTo (optional) The element or element id to render the proxy to (defaults to document.body)
+     * @param {Boolean} matchBox (optional) True to align and size the proxy to this element now (defaults to false)
+     * @return {Ext.Element} The new proxy element
+     */
+    createProxy : function(config, renderTo, matchBox){
+        config = Ext.isObject(config) ? config : {tag : "div", cls: config};
+
+        var me = this,
+        	proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
+        					   Ext.DomHelper.insertBefore(me.dom, config, true);        
+        
+        if(matchBox && me.setBox && me.getBox){ // check to make sure Element.position.js is loaded
+           proxy.setBox(me.getBox());
+        }
+        return proxy;
+    }
+});
+
+Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater;
+
+// private
+Ext.Element.uncache = function(el){
+    for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+        if(a[i]){
+            delete Ext.Element.cache[a[i].id || a[i]];
+        }
+    }
+};/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Gets the x,y coordinates specified by the anchor position on the element.
+     * @param {String} anchor (optional) The specified anchor position (defaults to "c").  See {@link #alignTo}
+     * for details on supported anchor positions.
+     * @param {Boolean} local (optional) True to get the local (element top/left-relative) anchor position instead
+     * of page coordinates
+     * @param {Object} size (optional) An object containing the size to use for calculating anchor position
+     * {width: (target width), height: (target height)} (defaults to the element's current size)
+     * @return {Array} [x, y] An array containing the element's x and y coordinates
+     */
+    getAnchorXY : function(anchor, local, s){
+        //Passing a different size is useful for pre-calculating anchors,
+        //especially for anchored animations that change the el size.
+		anchor = (anchor || "tl").toLowerCase();
+        s = s || {};
+        
+        var me = this,        
+        	vp = me.dom == document.body || me.dom == document,
+        	w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(),
+        	h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(),         	        	
+        	xy,       	
+        	r = Math.round,
+        	o = me.getXY(),
+        	scroll = me.getScroll(),
+        	extraX = vp ? scroll.left : !local ? o[0] : 0,
+        	extraY = vp ? scroll.top : !local ? o[1] : 0,
+        	hash = {
+	        	c  : [r(w * 0.5), r(h * 0.5)],
+	        	t  : [r(w * 0.5), 0],
+	        	l  : [0, r(h * 0.5)],
+	        	r  : [w, r(h * 0.5)],
+	        	b  : [r(w * 0.5), h],
+	        	tl : [0, 0],	
+	        	bl : [0, h],
+	        	br : [w, h],
+	        	tr : [w, 0]
+        	};
+        
+        xy = hash[anchor];	
+        return [xy[0] + extraX, xy[1] + extraY]; 
+    },
+
+    /**
+     * Anchors an element to another element and realigns it when the window is resized.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) True for the default animation or a standard Element animation config object
+     * @param {Boolean/Number} monitorScroll (optional) True to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @param {Function} callback The function to call after the animation finishes
+     * @return {Ext.Element} this
+     */
+    anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){        
+	    var me = this,
+            dom = me.dom;
+	    
+	    function action(){
+            Ext.fly(dom).alignTo(el, alignment, offsets, animate);
+            Ext.callback(callback, Ext.fly(dom));
+        }
+        
+        Ext.EventManager.onWindowResize(action, me);
+        
+        if(!Ext.isEmpty(monitorScroll)){
+            Ext.EventManager.on(window, 'scroll', action, me,
+                {buffer: !isNaN(monitorScroll) ? monitorScroll : 50});
+        }
+        action.call(me); // align immediately
+        return me;
+    },
+
+    /**
+     * Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
+     * supported position values.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Array} [x, y]
+     */
+    getAlignToXY : function(el, p, o){	    
+        el = Ext.get(el);
+        
+        if(!el || !el.dom){
+            throw "Element.alignToXY with an element that doesn't exist";
+        }
+        
+        o = o || [0,0];
+        p = (p == "?" ? "tl-bl?" : (!/-/.test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase();       
+                
+        var me = this,
+        	d = me.dom,
+        	a1,
+        	a2,
+        	x,
+        	y,
+        	//constrain the aligned el to viewport if necessary
+        	w,
+        	h,
+        	r,
+        	dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie
+        	dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie
+        	p1y,
+        	p1x,        	
+        	p2y,
+        	p2x,
+        	swapY,
+        	swapX,
+        	doc = document,
+        	docElement = doc.documentElement,
+        	docBody = doc.body,
+        	scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5,
+        	scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5,
+        	c = false, //constrain to viewport
+        	p1 = "", 
+        	p2 = "",
+        	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];
+
+        //Subtract the aligned el's internal xy from the target's offset xy
+        //plus custom offset to get the aligned el's new offset xy
+        a1 = me.getAnchorXY(p1, true);
+        a2 = el.getAnchorXY(p2, false);
+
+        x = a2[0] - a1[0] + o[0];
+        y = a2[1] - a1[1] + o[1];
+
+        if(c){    
+	       w = me.getWidth();
+           h = me.getHeight();
+           r = el.getRegion();       
+           //If we are at a viewport boundary and the aligned el is anchored on a target border that is
+           //perpendicular to the vp border, allow the aligned el to slide on that border,
+           //otherwise swap the aligned el to the opposite border of the target.
+           p1y = p1.charAt(0);
+           p1x = p1.charAt(p1.length-1);
+           p2y = p2.charAt(0);
+           p2x = p2.charAt(p2.length-1);
+           swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t"));
+           swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r"));          
+           
+
+           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];
+    },
+
+    /**
+     * Aligns this element with another element relative to the specified anchor points. If the other element is the
+     * document it aligns it to the viewport.
+     * The position parameter is optional, and can be specified in any one of the following formats:
+     * <ul>
+     *   <li><b>Blank</b>: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").</li>
+     *   <li><b>One anchor (deprecated)</b>: The passed anchor position is used as the target element's anchor point.
+     *       The element being aligned will position its top-left corner (tl) to that point.  <i>This method has been
+     *       deprecated in favor of the newer two anchor syntax below</i>.</li>
+     *   <li><b>Two anchors</b>: If two values from the table below are passed separated by a dash, the first value is used as the
+     *       element's anchor point, and the second value is used as the target's anchor point.</li>
+     * </ul>
+     * In addition to the anchor points, the position parameter also supports the "?" character.  If "?" is passed at the end of
+     * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to
+     * the viewport if necessary.  Note that the element being aligned might be swapped to align to a different position than
+     * that specified in order to enforce the viewport constraints.
+     * Following are all of the supported anchor positions:
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner (default)
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+c      In the center of the element
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+Example Usage:
+<pre><code>
+// align el to other-el using the default positioning ("tl-bl", non-constrained)
+el.alignTo("other-el");
+
+// align the top left corner of el with the top right corner of other-el (constrained to viewport)
+el.alignTo("other-el", "tr?");
+
+// align the bottom right corner of el with the center left edge of other-el
+el.alignTo("other-el", "br-l?");
+
+// align the center of el with the bottom left corner of other-el and
+// adjust the x position by -6 pixels (and the y position by 0)
+el.alignTo("other-el", "c-bl", [-6, 0]);
+</code></pre>
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    alignTo : function(element, position, offsets, animate){
+	    var me = this;
+        return me.setXY(me.getAlignToXY(element, position, offsets),
+          		        me.preanim && !!animate ? me.preanim(arguments, 3) : false);
+    },
+    
+    // private ==>  used outside of core
+    adjustForConstraints : function(xy, parent, offsets){
+        return this.getConstrainToXY(parent || document, false, offsets, xy) ||  xy;
+    },
+
+    // private ==>  used outside of core
+    getConstrainToXY : function(el, local, offsets, proposedXY){   
+	    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;
+
+            // only move it if it needs it
+            var moved = false;
+
+            // first validate right/bottom
+            if((x + w) > vr){
+                x = vr - w;
+                moved = true;
+            }
+            if((y + h) > vb){
+                y = vb - h;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < vx){
+                x = vx;
+                moved = true;
+            }
+            if(y < vy){
+                y = vy;
+                moved = true;
+            }
+            return moved ? [x, y] : false;
+        };
+    }(),
+	    
+	    
+	        
+//         el = Ext.get(el);
+//         offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0});
+
+//         var	me = this,
+//         	doc = document,
+//         	s = el.getScroll(),
+//         	vxy = el.getXY(),
+//         	vx = offsets.left + s.left, 
+//         	vy = offsets.top + s.top,            	
+//         	vw = -offsets.right, 
+//         	vh = -offsets.bottom, 
+//         	vr,
+//         	vb,
+//         	xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]),
+//         	x = xy[0],
+//         	y = xy[1],
+//         	w = me.dom.offsetWidth, h = me.dom.offsetHeight,
+//         	moved = false; // only move it if it needs it
+//       
+//         	
+//         if(el.dom == doc.body || el.dom == doc){
+//             vw += Ext.lib.Dom.getViewWidth();
+//             vh += Ext.lib.Dom.getViewHeight();
+//         }else{
+//             vw += el.dom.clientWidth;
+//             vh += el.dom.clientHeight;
+//             if(!local){                    
+//                 vx += vxy[0];
+//                 vy += vxy[1];
+//             }
+//         }
+
+//         // first validate right/bottom
+//         if(x + w > vx + vw){
+//             x = vx + vw - w;
+//             moved = true;
+//         }
+//         if(y + h > vy + vh){
+//             y = vy + vh - h;
+//             moved = true;
+//         }
+//         // then make sure top/left isn't negative
+//         if(x < vx){
+//             x = vx;
+//             moved = true;
+//         }
+//         if(y < vy){
+//             y = vy;
+//             moved = true;
+//         }
+//         return moved ? [x, y] : false;
+//    },
+    
+    /**
+    * Calculates the x, y to center this element on the screen
+    * @return {Array} The x, y values [x, y]
+    */
+    getCenterXY : function(){
+        return this.getAlignToXY(document, 'c-c');
+    },
+
+    /**
+    * Centers the Element in either the viewport, or another Element.
+    * @param {Mixed} centerIn (optional) The element in which to center the element.
+    */
+    center : function(centerIn){
+        return this.alignTo(centerIn || document, 'c-c');        
+    }    
+});
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){
+	var PARENTNODE = 'parentNode',
+		NEXTSIBLING = 'nextSibling',
+		PREVIOUSSIBLING = 'previousSibling',
+		DQ = Ext.DomQuery,
+		GET = Ext.get;
+	
+	return {
+		/**
+	     * Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to search as a number or element (defaults to 50 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParent : function(simpleSelector, maxDepth, returnEl){
+	        var p = this.dom,
+	        	b = document.body, 
+	        	depth = 0, 	        	
+	        	stopEl;	        
+            if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') {
+                return null;
+            }
+	        maxDepth = maxDepth || 50;
+	        if (isNaN(maxDepth)) {
+	            stopEl = Ext.getDom(maxDepth);
+	            maxDepth = Number.MAX_VALUE;
+	        }
+	        while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){
+	            if(DQ.is(p, simpleSelector)){
+	                return returnEl ? GET(p) : p;
+	            }
+	            depth++;
+	            p = p.parentNode;
+	        }
+	        return null;
+	    },
+	
+	    /**
+	     * Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParentNode : function(simpleSelector, maxDepth, returnEl){
+	        var p = Ext.fly(this.dom.parentNode, '_internal');
+	        return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null;
+	    },
+	
+	    /**
+	     * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
+	     * This is a shortcut for findParentNode() that always returns an Ext.Element.
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @return {Ext.Element} The matching DOM node (or null if no match was found)
+	     */
+	    up : function(simpleSelector, maxDepth){
+	        return this.findParentNode(simpleSelector, maxDepth, true);
+	    },
+	
+	    /**
+	     * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} unique (optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object)
+	     * @return {CompositeElement/CompositeElementLite} The composite element
+	     */
+	    select : function(selector, unique){
+	        return Ext.Element.select(selector, unique, this.dom);
+	    },
+	
+	    /**
+	     * Selects child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @return {Array} An array of the matched nodes
+	     */
+	    query : function(selector, unique){
+	        return DQ.select(selector, this.dom);
+	    },
+	
+	    /**
+	     * Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    child : function(selector, returnDom){
+	        var n = DQ.selectNode(selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+	    /**
+	     * Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    down : function(selector, returnDom){
+	        var n = DQ.selectNode(" > " + selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+		 /**
+	     * Gets the parent node for this element, optionally chaining up trying to match a selector
+	     * @param {String} selector (optional) Find a parent node that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The parent node or null
+		 */
+	    parent : function(selector, returnDom){
+	        return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom);
+	    },
+	
+	     /**
+	     * Gets the next sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The next sibling or null
+		 */
+	    next : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the previous sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The previous sibling or null
+		 */
+	    prev : function(selector, returnDom){
+	        return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom);
+	    },
+	
+	
+	    /**
+	     * Gets the first child, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The first child or null
+		 */
+	    first : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the last child, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The last child or null
+		 */
+	    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 || DQ.is(n, selector))){
+	                return !returnDom ? GET(n) : n;
+	            }
+	            n = n[dir];
+	        }
+	        return null;
+	    }	
+    }
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper,
+        isEl = function(el){
+            return  (el.nodeType || el.dom || typeof el == 'string');  
+        };
+	
+	return {
+	    /**
+	     * Appends the passed element(s) to this element
+	     * @param {String/HTMLElement/Array/Element/CompositeElement} el
+	     * @return {Ext.Element} this
+	     */
+	    appendChild: function(el){        
+	        return GET(el).appendTo(this);        
+	    },
+	
+	    /**
+	     * Appends this element to the passed element
+	     * @param {Mixed} el The new parent element
+	     * @return {Ext.Element} this
+	     */
+	    appendTo: function(el){        
+	        GETDOM(el).appendChild(this.dom);        
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element before the passed element in the DOM
+	     * @param {Mixed} el The element before which this element will be inserted
+	     * @return {Ext.Element} this
+	     */
+	    insertBefore: function(el){  	          
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element after the passed element in the DOM
+	     * @param {Mixed} el The element to insert after
+	     * @return {Ext.Element} this
+	     */
+	    insertAfter: function(el){
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts (or creates) an element (or DomHelper config) as the first child of this element
+	     * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert
+	     * @return {Ext.Element} The new child
+	     */
+	    insertFirst: function(el, returnDom){
+            el = el || {};
+            if(isEl(el)){ // element
+                el = GETDOM(el);
+                this.dom.insertBefore(el, this.dom.firstChild);
+                return !returnDom ? GET(el) : el;
+            }else{ // dh config
+                return this.createChild(el, this.dom.firstChild, returnDom);
+            }
+    },
+	
+	    /**
+	     * Replaces the passed element with this element
+	     * @param {Mixed} el The element to replace
+	     * @return {Ext.Element} this
+	     */
+	    replace: function(el){
+	        el = GET(el);
+	        this.insertBefore(el);
+	        el.remove();
+	        return this;
+	    },
+	
+	    /**
+	     * Replaces this element with the passed element
+	     * @param {Mixed/Object} el The new element or a DomHelper config of an element to create
+	     * @return {Ext.Element} this
+	     */
+	    replaceWith: function(el){
+		    var me = this,
+		    	Element = Ext.Element;
+            if(isEl(el)){
+                el = GETDOM(el);
+                me.dom.parentNode.insertBefore(el, me.dom);
+            }else{
+                el = DH.insertBefore(me.dom, el);
+            }
+	        
+	        delete Element.cache[me.id];
+	        Ext.removeNode(me.dom);      
+	        me.id = Ext.id(me.dom = el);
+	        return Element.cache[me.id] = me;        
+	    },
+	    
+		/**
+		 * Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.
+		 * @param {Object} config DomHelper element config object.  If no tag is specified (e.g., {tag:'input'}) then a div will be
+		 * automatically generated with the specified attributes.
+		 * @param {HTMLElement} insertBefore (optional) a child element of this element
+		 * @param {Boolean} returnDom (optional) true to return the dom node instead of creating an Element
+		 * @return {Ext.Element} The new child element
+		 */
+		createChild: function(config, insertBefore, returnDom){
+		    config = config || {tag:'div'};
+		    return insertBefore ? 
+		    	   DH.insertBefore(insertBefore, config, returnDom !== true) :	
+		    	   DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config,  returnDom !== true);
+		},
+		
+		/**
+		 * Creates and wraps this element with another element
+		 * @param {Object} config (optional) DomHelper element config object for the wrapper element or null for an empty div
+		 * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+		 * @return {HTMLElement/Element} The newly created wrapper element
+		 */
+		wrap: function(config, returnDom){        
+		    var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom);
+		    newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom);
+		    return newEl;
+		},
+		
+		/**
+		 * Inserts an html fragment into this element
+		 * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd.
+		 * @param {String} html The HTML fragment
+		 * @param {Boolean} returnEl (optional) True to return an Ext.Element (defaults to false)
+		 * @return {HTMLElement/Ext.Element} The inserted node (or nearest related if more than 1 inserted)
+		 */
+		insertHtml : function(where, html, returnEl){
+		    var el = DH.insertHtml(where, this.dom, html);
+		    return returnEl ? Ext.get(el) : el;
+		}
+	}
+}());/**
+ * @class Ext.Element
+ */
+Ext.apply(Ext.Element.prototype, function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper;
+	
+	return {	
+		/**
+	     * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
+	     * @param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert *or* an array of any of those.
+	     * @param {String} where (optional) 'before' or 'after' defaults to before
+	     * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+	     * @return {Ext.Element} the inserted Element
+	     */
+	    insertSibling: function(el, where, returnDom){
+	        var me = this,
+	        	rt;
+	        	
+	        if(Ext.isArray(el)){            
+	            Ext.each(el, function(e) {
+		            rt = me.insertSibling(e, where, returnDom);
+	            });
+	            return rt;
+	        }
+	                
+	        where = (where || 'before').toLowerCase();
+	        el = el || {};
+	       	
+            if(el.nodeType || el.dom){
+                rt = me.dom.parentNode.insertBefore(GETDOM(el), where == 'before' ? me.dom : me.dom.nextSibling);
+                if (!returnDom) {
+                    rt = GET(rt);
+                }
+            }else{
+                if (where == 'after' && !me.dom.nextSibling) {
+                    rt = DH.append(me.dom.parentNode, el, !returnDom);
+                } else {                    
+                    rt = DH[where == 'after' ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom);
+                }
+            }
+	        return rt;
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){  
+    // local style camelizing for speed
+    var propCache = {},
+        camelRe = /(-[a-z])/gi,
+        classReCache = {},
+        view = document.defaultView,
+        propFloat = Ext.isIE ? 'styleFloat' : 'cssFloat',
+        opacityRe = /alpha\(opacity=(.*)\)/i,
+        trimRe = /^\s+|\s+$/g,
+        EL = Ext.Element,   
+        PADDING = "padding",
+        MARGIN = "margin",
+        BORDER = "border",
+        LEFT = "-left",
+        RIGHT = "-right",
+        TOP = "-top",
+        BOTTOM = "-bottom",
+        WIDTH = "-width",    
+        MATH = Math,
+        HIDDEN = 'hidden',
+        ISCLIPPED = 'isClipped',
+        OVERFLOW = 'overflow',
+        OVERFLOWX = 'overflow-x',
+        OVERFLOWY = 'overflow-y',
+        ORIGINALCLIP = 'originalClip',
+        // special markup used throughout Ext when box wrapping elements    
+        borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH},
+        paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM},
+        margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM},
+        data = Ext.Element.data;
+        
+    
+    // private  
+    function camelFn(m, a) {
+        return a.charAt(1).toUpperCase();
+    }
+    
+    // private (needs to be called => addStyles.call(this, sides, styles))
+    function addStyles(sides, styles){
+        var val = 0;    
+        
+        Ext.each(sides.match(/\w/g), function(s) {
+            if (s = parseInt(this.getStyle(styles[s]), 10)) {
+                val += MATH.abs(s);      
+            }
+        },
+        this);
+        return val;
+    }
+
+    function chkCache(prop) {
+        return propCache[prop] || (propCache[prop] = prop == 'float' ? propFloat : prop.replace(camelRe, camelFn));
+
+    }
+            
+    return {    
+        // private  ==> used by Fx  
+        adjustWidth : function(width) {
+            var me = this;
+            var isNum = (typeof width == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               width -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+            }
+            return (isNum && width < 0) ? 0 : width;
+        },
+        
+        // private   ==> used by Fx 
+        adjustHeight : function(height) {
+            var me = this;
+            var isNum = (typeof height == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               height -= (me.getBorderWidth("tb") + me.getPadding("tb"));               
+            }
+            return (isNum && height < 0) ? 0 : height;
+        },
+    
+    
+        /**
+         * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        addClass : function(className){
+            var me = this;
+            Ext.each(className, function(v) {
+                me.dom.className += (!me.hasClass(v) && v ? " " + v : "");  
+            });
+            return me;
+        },
+    
+        /**
+         * Adds one or more CSS classes to this element and removes the same class(es) from all siblings.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        radioClass : function(className){
+            Ext.each(this.dom.parentNode.childNodes, function(v) {
+                if(v.nodeType == 1) {
+                    Ext.fly(v, '_internal').removeClass(className);          
+                }
+            });
+            return this.addClass(className);
+        },
+    
+        /**
+         * Removes one or more CSS classes from the element.
+         * @param {String/Array} className The CSS class to remove, or an array of classes
+         * @return {Ext.Element} this
+         */
+        removeClass : function(className){
+            var me = this;
+            if (me.dom.className) {
+                Ext.each(className, function(v) {               
+                    me.dom.className = me.dom.className.replace(
+                        classReCache[v] = classReCache[v] || new RegExp('(?:^|\\s+)' + v + '(?:\\s+|$)', "g"), 
+                        " ");               
+                });    
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).
+         * @param {String} className The CSS class to toggle
+         * @return {Ext.Element} this
+         */
+        toggleClass : function(className){
+            return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
+        },
+    
+        /**
+         * Checks if the specified CSS class exists on this element's DOM node.
+         * @param {String} className The CSS class to check for
+         * @return {Boolean} True if the class exists, else false
+         */
+        hasClass : function(className){
+            return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1;
+        },
+    
+        /**
+         * Replaces a CSS class on the element with another.  If the old name does not exist, the new name will simply be added.
+         * @param {String} oldClassName The CSS class to replace
+         * @param {String} newClassName The replacement CSS class
+         * @return {Ext.Element} this
+         */
+        replaceClass : function(oldClassName, newClassName){
+            return this.removeClass(oldClassName).addClass(newClassName);
+        },
+        
+        isStyle : function(style, val) {
+            return this.getStyle(style) == val;  
+        },
+    
+        /**
+         * Normalizes currentStyle and computedStyle.
+         * @param {String} property The style property whose value is returned.
+         * @return {String} The current value of the style property for this element.
+         */
+        getStyle : function(){         
+            return view && view.getComputedStyle ?
+                function(prop){
+                    var el = this.dom,
+                        v,                  
+                        cs;
+                    if(el == document) return null;
+                    prop = chkCache(prop);
+                    return (v = el.style[prop]) ? v : 
+                           (cs = view.getComputedStyle(el, "")) ? cs[prop] : null;
+                } :
+                function(prop){      
+                    var el = this.dom, 
+                        m, 
+                        cs;     
+                        
+                    if(el == document) return null;      
+                    if (prop == 'opacity') {
+                        if (el.style.filter.match) {                       
+                            if(m = el.style.filter.match(opacityRe)){
+                                var fv = parseFloat(m[1]);
+                                if(!isNaN(fv)){
+                                    return fv ? fv / 100 : 0;
+                                }
+                            }
+                        }
+                        return 1;
+                    }
+                    prop = chkCache(prop);  
+                    return el.style[prop] || ((cs = el.currentStyle) ? cs[prop] : null);
+                };
+        }(),
+        
+        /**
+         * Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values
+         * are convert to standard 6 digit hex color.
+         * @param {String} attr The css attribute
+         * @param {String} defaultValue The default value to use when a valid color isn't found
+         * @param {String} prefix (optional) defaults to #. Use an empty string when working with
+         * color anims.
+         */
+        getColor : function(attr, defaultValue, prefix){
+            var v = this.getStyle(attr),
+                color = prefix || '#',
+                h;
+                
+            if(!v || /transparent|inherit/.test(v)){
+                return defaultValue;
+            }
+            if(/^r/.test(v)){
+                Ext.each(v.slice(4, v.length -1).split(','), function(s){
+                    h = parseInt(s, 10);
+                    color += (h < 16 ? '0' : '') + h.toString(16); 
+                });
+            }else{
+                v = v.replace('#', '');
+                color += v.length == 3 ? v.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3') : v;
+            }
+            return(color.length > 5 ? color.toLowerCase() : defaultValue);
+        },
+    
+        /**
+         * Wrapper for setting style properties, also takes single object parameter of multiple styles.
+         * @param {String/Object} property The style property to be set, or an object of multiple styles.
+         * @param {String} value (optional) The value to apply to the given property, or null if an object was passed.
+         * @return {Ext.Element} this
+         */
+        setStyle : function(prop, value){
+            var tmp, 
+                style,
+                camel;
+            if (!Ext.isObject(prop)) {
+                tmp = {};
+                tmp[prop] = value;          
+                prop = tmp;
+            }
+            for (style in prop) {
+                value = prop[style];            
+                style == 'opacity' ? 
+                    this.setOpacity(value) : 
+                    this.dom.style[chkCache(style)] = value;
+            }
+            return this;
+        },
+        
+        /**
+         * Set the opacity of the element
+         * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc
+         * @param {Boolean/Object} animate (optional) a standard Element animation config object or <tt>true</tt> for
+         * the default animation (<tt>{duration: .35, easing: 'easeIn'}</tt>)
+         * @return {Ext.Element} this
+         */
+         setOpacity : function(opacity, animate){
+            var me = this,
+                s = me.dom.style;
+                
+            if(!animate || !me.anim){            
+                if(Ext.isIE){
+                    var opac = opacity < 1 ? 'alpha(opacity=' + opacity * 100 + ')' : '', 
+                    val = s.filter.replace(opacityRe, '').replace(trimRe, '');
+
+                    s.zoom = 1;
+                    s.filter = val + (val.length > 0 ? ' ' : '') + opac;
+                }else{
+                    s.opacity = opacity;
+                }
+            }else{
+                me.anim({opacity: {to: opacity}}, me.preanim(arguments, 1), null, .35, 'easeIn');
+            }
+            return me;
+        },
+        
+        /**
+         * Clears any opacity settings from this element. Required in some cases for IE.
+         * @return {Ext.Element} this
+         */
+        clearOpacity : function(){
+            var style = this.dom.style;
+            if(Ext.isIE){
+                if(!Ext.isEmpty(style.filter)){
+                    style.filter = style.filter.replace(opacityRe, '').replace(trimRe, '');
+                }
+            }else{
+                style.opacity = style['-moz-opacity'] = style['-khtml-opacity'] = '';
+            }
+            return this;
+        },
+    
+        /**
+         * Returns the offset height of the element
+         * @param {Boolean} contentHeight (optional) true to get the height minus borders and padding
+         * @return {Number} The element's height
+         */
+        getHeight : function(contentHeight){
+            var me = this,
+                dom = me.dom,
+                h = MATH.max(dom.offsetHeight, dom.clientHeight) || 0;
+            h = !contentHeight ? h : h - me.getBorderWidth("tb") - me.getPadding("tb");
+            return h < 0 ? 0 : h;
+        },
+    
+        /**
+         * Returns the offset width of the element
+         * @param {Boolean} contentWidth (optional) true to get the width minus borders and padding
+         * @return {Number} The element's width
+         */
+        getWidth : function(contentWidth){
+            var me = this,
+                dom = me.dom,
+                w = MATH.max(dom.offsetWidth, dom.clientWidth) || 0;
+            w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr");
+            return w < 0 ? 0 : w;
+        },
+    
+        /**
+         * Set the width of this Element.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        setWidth : function(width, animate){
+            var me = this;
+            width = me.adjustWidth(width);
+            !animate || !me.anim ? 
+                me.dom.style.width = me.addUnits(width) :
+                me.anim({width : {to : width}}, me.preanim(arguments, 1));
+            return me;
+        },
+    
+        /**
+         * Set the height of this Element.
+         * <pre><code>
+// change the height to 200px and animate with default configuration
+Ext.fly('elementId').setHeight(200, true);
+
+// change the height to 150px and animate with a custom configuration
+Ext.fly('elId').setHeight(150, {
+    duration : .5, // animation will have a duration of .5 seconds
+    // will change the content to "finished"
+    callback: function(){ this.{@link #update}("finished"); } 
+});
+         * </code></pre>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels.)</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setHeight : function(height, animate){
+            var me = this;
+            height = me.adjustHeight(height);
+            !animate || !me.anim ? 
+                me.dom.style.height = me.addUnits(height) :
+                me.anim({height : {to : height}}, me.preanim(arguments, 1));
+            return me;
+        },
+        
+        /**
+         * Gets the width of the border(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the border <b><u>l</u></b>eft width + the border <b><u>r</u></b>ight width.
+         * @return {Number} The width of the sides passed added together
+         */
+        getBorderWidth : function(side){
+            return addStyles.call(this, side, borders);
+        },
+    
+        /**
+         * Gets the width of the padding(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the padding <b><u>l</u></b>eft + the padding <b><u>r</u></b>ight.
+         * @return {Number} The padding of the sides passed added together
+         */
+        getPadding : function(side){
+            return addStyles.call(this, side, paddings);
+        },
+    
+        /**
+         *  Store the current overflow setting and clip overflow on the element - use <tt>{@link #unclip}</tt> to remove
+         * @return {Ext.Element} this
+         */
+        clip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(!data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, true);
+                data(dom, ORIGINALCLIP, {
+                    o: me.getStyle(OVERFLOW),
+                    x: me.getStyle(OVERFLOWX),
+                    y: me.getStyle(OVERFLOWY)
+                });
+                me.setStyle(OVERFLOW, HIDDEN);
+                me.setStyle(OVERFLOWX, HIDDEN);
+                me.setStyle(OVERFLOWY, HIDDEN);
+            }
+            return me;
+        },
+    
+        /**
+         *  Return clipping (overflow) to original clipping before <tt>{@link #clip}</tt> was called
+         * @return {Ext.Element} this
+         */
+        unclip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, false);
+                var o = data(dom, ORIGINALCLIP);
+                if(o.o){
+                    me.setStyle(OVERFLOW, o.o);
+                }
+                if(o.x){
+                    me.setStyle(OVERFLOWX, o.x);
+                }
+                if(o.y){
+                    me.setStyle(OVERFLOWY, o.y);
+                }
+            }
+            return me;
+        },
+        
+        addStyles : addStyles,
+        margins : margins
+    }
+}()         
+);/**
+ * @class Ext.Element
+ */
+
+// special markup used throughout Ext when box wrapping elements
+Ext.Element.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>';
+
+Ext.Element.addMethods(function(){
+	var INTERNAL = "_internal";
+	return {
+	    /**
+	     * More flexible version of {@link #setStyle} for setting style properties.
+	     * @param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
+	     * a function which returns such a specification.
+	     * @return {Ext.Element} this
+	     */
+	    applyStyles : function(style){
+	        Ext.DomHelper.applyStyles(this.dom, style);
+	        return this;
+	    },
+
+		/**
+	     * Returns an object with properties matching the styles requested.
+	     * For example, el.getStyles('color', 'font-size', 'width') might return
+	     * {'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.
+	     * @param {String} style1 A style name
+	     * @param {String} style2 A style name
+	     * @param {String} etc.
+	     * @return {Object} The style object
+	     */
+	    getStyles : function(){
+		    var ret = {};
+		    Ext.each(arguments, function(v) {
+			   ret[v] = this.getStyle(v);
+		    },
+		    this);
+		    return ret;
+	    },
+
+		getStyleSize : function(){
+	        var me = this,
+	        	w,
+	        	h,
+	        	d = this.dom,
+	        	s = d.style;
+	        if(s.width && s.width != 'auto'){
+	            w = parseInt(s.width, 10);
+	            if(me.isBorderBox()){
+	               w -= me.getFrameWidth('lr');
+	            }
+	        }
+	        if(s.height && s.height != 'auto'){
+	            h = parseInt(s.height, 10);
+	            if(me.isBorderBox()){
+	               h -= me.getFrameWidth('tb');
+	            }
+	        }
+	        return {width: w || me.getWidth(true), height: h || me.getHeight(true)};
+	    },
+
+	    // private  ==> used by ext full
+		setOverflow : function(v){
+			var dom = this.dom;
+	    	if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
+	    		dom.style.overflow = 'hidden';
+	        	(function(){dom.style.overflow = 'auto';}).defer(1);
+	    	}else{
+	    		dom.style.overflow = v;
+	    	}
+		},
+
+	   /**
+		* <p>Wraps the specified element with a special 9 element markup/CSS block that renders by default as
+		* a gray container with a gradient background, rounded corners and a 4-way shadow.</p>
+		* <p>This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button},
+		* {@link Ext.Panel} when <tt>{@link Ext.Panel#frame frame=true}</tt>, {@link Ext.Window}).  The markup
+		* is of this form:</p>
+		* <pre><code>
+Ext.Element.boxMarkup =
+    &#39;&lt;div class="{0}-tl">&lt;div class="{0}-tr">&lt;div class="{0}-tc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-ml">&lt;div class="{0}-mr">&lt;div class="{0}-mc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-bl">&lt;div class="{0}-br">&lt;div class="{0}-bc">&lt;/div>&lt;/div>&lt;/div>&#39;;
+		* </code></pre>
+		* <p>Example usage:</p>
+		* <pre><code>
+// Basic box wrap
+Ext.get("foo").boxWrap();
+
+// You can also add a custom class and use CSS inheritance rules to customize the box look.
+// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
+// for how to create a custom box wrap style.
+Ext.get("foo").boxWrap().addClass("x-box-blue");
+		* </code></pre>
+		* @param {String} class (optional) A base CSS class to apply to the containing wrapper element
+		* (defaults to <tt>'x-box'</tt>). Note that there are a number of CSS rules that are dependent on
+		* this name to make the overall effect work, so if you supply an alternate base class, make sure you
+		* also supply all of the necessary rules.
+		* @return {Ext.Element} this
+		*/
+	    boxWrap : function(cls){
+	        cls = cls || 'x-box';
+	        var el = Ext.get(this.insertHtml("beforeBegin", "<div class='" + cls + "'>" + String.format(Ext.Element.boxMarkup, cls) + "</div>"));        //String.format('<div class="{0}">'+Ext.Element.boxMarkup+'</div>', cls)));
+	        Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom);
+	        return el;
+	    },
+
+        /**
+         * Set the size of this Element. If animation is true, both width and height will be animated concurrently.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+         * </ul></div>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+	    setSize : function(width, height, animate){
+			var me = this;
+			if(Ext.isObject(width)){ // in case of object from getSize()
+			    height = width.height;
+			    width = width.width;
+			}
+			width = me.adjustWidth(width);
+			height = me.adjustHeight(height);
+			if(!animate || !me.anim){
+			    me.dom.style.width = me.addUnits(width);
+			    me.dom.style.height = me.addUnits(height);
+			}else{
+			    me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2));
+			}
+			return me;
+	    },
+
+	    /**
+	     * Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
+	     * when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements
+	     * if a height has not been set using CSS.
+	     * @return {Number}
+	     */
+	    getComputedHeight : function(){
+		    var me = this,
+	        	h = Math.max(me.dom.offsetHeight, me.dom.clientHeight);
+	        if(!h){
+	            h = parseInt(me.getStyle('height'), 10) || 0;
+	            if(!me.isBorderBox()){
+	                h += me.getFrameWidth('tb');
+	            }
+	        }
+	        return h;
+	    },
+
+	    /**
+	     * Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
+	     * when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements
+	     * if a width has not been set using CSS.
+	     * @return {Number}
+	     */
+	    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;
+	    },
+
+	    /**
+	     * Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
+	     for more information about the sides.
+	     * @param {String} sides
+	     * @return {Number}
+	     */
+	    getFrameWidth : function(sides, onlyContentBox){
+	        return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides));
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is over this element
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnOver : function(className){
+	        this.hover(
+	            function(){
+	                Ext.fly(this, INTERNAL).addClass(className);
+	            },
+	            function(){
+	                Ext.fly(this, INTERNAL).removeClass(className);
+	            }
+	        );
+	        return this;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when this element has the focus
+	     * @param {String} className
+	     * @return {Ext.Element} 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;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnClick : function(className){
+	        var dom = this.dom;
+	        this.on("mousedown", function(){
+	            Ext.fly(dom, INTERNAL).addClass(className);
+	            var d = Ext.getDoc(),
+	            	fn = function(){
+		                Ext.fly(dom, INTERNAL).removeClass(className);
+		                d.removeListener("mouseup", fn);
+		            };
+	            d.on("mouseup", fn);
+	        });
+	        return this;
+	    },
+
+	    /**
+	     * Returns the width and height of the viewport.
+        * <pre><code>
+        var vpSize = Ext.getBody().getViewSize();
+
+        // all Windows created afterwards will have a default value of 90% height and 95% width
+        Ext.Window.override({
+            width: vpSize.width * 0.9,
+            height: vpSize.height * 0.95
+        });
+        // To handle window resizing you would have to hook onto onWindowResize.
+        </code></pre>
+	     * @return {Object} An object containing the viewport's size {width: (viewport width), height: (viewport height)}
+	     */
+	    getViewSize : function(){
+	        var doc = document,
+	        	d = this.dom,
+	        	extdom = Ext.lib.Dom,
+	        	isDoc = (d == doc || d == doc.body);
+	        return { width : (isDoc ? extdom.getViewWidth() : d.clientWidth),
+	        		 height : (isDoc ? extdom.getViewHeight() : d.clientHeight) };
+	    },
+
+	    /**
+	     * Returns the size of the element.
+	     * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding
+	     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+	     */
+	    getSize : function(contentSize){
+	        return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)};
+	    },
+
+	    /**
+	     * Forces the browser to repaint this element
+	     * @return {Ext.Element} this
+	     */
+	    repaint : function(){
+	        var dom = this.dom;
+	        this.addClass("x-repaint");
+	        setTimeout(function(){
+	            Ext.fly(dom).removeClass("x-repaint");
+	        }, 1);
+	        return this;
+	    },
+
+	    /**
+	     * Disables text selection for this element (normalized across browsers)
+	     * @return {Ext.Element} this
+	     */
+	    unselectable : function(){
+	        this.dom.unselectable = "on";
+	        return this.swallowEvent("selectstart", true).
+	        		    applyStyles("-moz-user-select:none;-khtml-user-select:none;").
+	        		    addClass("x-unselectable");
+	    },
+
+	    /**
+	     * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
+	     * then it returns the calculated width of the sides (see getPadding)
+	     * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides
+	     * @return {Object/Number}
+	     */
+	    getMargins : function(side){
+		    var me = this,
+		    	key,
+		    	hash = {t:"top", l:"left", r:"right", b: "bottom"},
+		    	o = {};
+
+		    if (!side) {
+		        for (key in me.margins){
+		        	o[hash[key]] = parseInt(me.getStyle(me.margins[key]), 10) || 0;
+                }
+		        return o;
+	        } else {
+	            return me.addStyles.call(me, side, me.margins);
+	        }
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+(function(){
+var D = Ext.lib.Dom,
+        LEFT = "left",
+        RIGHT = "right",
+        TOP = "top",
+        BOTTOM = "bottom",
+        POSITION = "position",
+        STATIC = "static",
+        RELATIVE = "relative",
+        AUTO = "auto",
+        ZINDEX = "z-index";
+
+function animTest(args, animate, i) {
+	return this.preanim && !!animate ? this.preanim(args, i) : false	
+}
+
+Ext.Element.addMethods({
+	/**
+      * Gets the current X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The X position of the element
+      */
+    getX : function(){
+        return D.getX(this.dom);
+    },
+
+    /**
+      * Gets the current Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The Y position of the element
+      */
+    getY : function(){
+        return D.getY(this.dom);
+    },
+
+    /**
+      * Gets the current position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Array} The XY position of the element
+      */
+    getXY : function(){
+        return D.getXY(this.dom);
+    },
+
+    /**
+      * Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.
+      * @param {Mixed} element The element to get the offsets from.
+      * @return {Array} The XY page offsets (e.g. [100, -200])
+      */
+    getOffsetsTo : function(el){
+        var o = this.getXY(),
+        	e = Ext.fly(el, '_internal').getXY();
+        return [o[0]-e[0],o[1]-e[1]];
+    },
+
+    /**
+     * Sets the X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The X position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setX : function(x, animate){	    
+	    return this.setXY([x, this.getY()], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The Y position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setY : function(y, animate){	    
+	    return this.setXY([this.getX(), y], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the element's left position directly using CSS style (instead of {@link #setX}).
+     * @param {String} left The left CSS property value
+     * @return {Ext.Element} this
+     */
+    setLeft : function(left){
+        this.setStyle(LEFT, this.addUnits(left));
+        return this;
+    },
+
+    /**
+     * Sets the element's top position directly using CSS style (instead of {@link #setY}).
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+    setTop : function(top){
+        this.setStyle(TOP, this.addUnits(top));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS right style.
+     * @param {String} right The right CSS property value
+     * @return {Ext.Element} this
+     */
+    setRight : function(right){
+        this.setStyle(RIGHT, this.addUnits(right));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS bottom style.
+     * @param {String} bottom The bottom CSS property value
+     * @return {Ext.Element} this
+     */
+    setBottom : function(bottom){
+        this.setStyle(BOTTOM, this.addUnits(bottom));
+        return this;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setXY : function(pos, animate){
+	    var me = this;
+        if(!animate || !me.anim){
+            D.setXY(me.dom, pos);
+        }else{
+            me.anim({points: {to: pos}}, me.preanim(arguments, 1), 'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setLocation : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    moveTo : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));        
+    },    
+    
+    /**
+     * Gets the left X coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getLeft : function(local){
+	    return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0;
+    },
+
+    /**
+     * Gets the right X coordinate of the element (element X position + element width)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getRight : function(local){
+	    var me = this;
+	    return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0;
+    },
+
+    /**
+     * Gets the top Y coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getTop : function(local) {
+	    return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0;
+    },
+
+    /**
+     * Gets the bottom Y coordinate of the element (element Y position + element height)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getBottom : function(local){
+	    var me = this;
+	    return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0;
+    },
+
+    /**
+    * Initializes positioning on this element. If a desired position is not passed, it will make the
+    * the element positioned relative IF it is not already positioned.
+    * @param {String} pos (optional) Positioning to use "relative", "absolute" or "fixed"
+    * @param {Number} zIndex (optional) The zIndex to apply
+    * @param {Number} x (optional) Set the page X position
+    * @param {Number} y (optional) Set the page Y position
+    */
+    position : function(pos, zIndex, x, y){
+	    var me = this;
+	    
+        if(!pos && me.isStyle(POSITION, STATIC)){           
+            me.setStyle(POSITION, RELATIVE);           
+        } else if(pos) {
+            me.setStyle(POSITION, pos);
+        }
+        if(zIndex){
+            me.setStyle(ZINDEX, zIndex);
+        }
+        if(x || y) me.setXY([x || false, y || false]);
+    },
+
+    /**
+    * Clear positioning back to the default when the document was loaded
+    * @param {String} value (optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'.
+    * @return {Ext.Element} this
+     */
+    clearPositioning : function(value){
+        value = value || '';
+        this.setStyle({
+            left : value,
+            right : value,
+            top : value,
+            bottom : value,
+            "z-index" : "",
+            position : STATIC
+        });
+        return this;
+    },
+
+    /**
+    * Gets an object with all CSS positioning properties. Useful along with setPostioning to get
+    * snapshot before performing an update and then restoring the element.
+    * @return {Object}
+    */
+    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(ZINDEX)
+        };
+    },
+    
+    /**
+    * Set positioning with an object returned by getPositioning().
+    * @param {Object} posCfg
+    * @return {Ext.Element} this
+     */
+    setPositioning : function(pc){
+	    var me = this,
+	    	style = me.dom.style;
+	    	
+        me.setStyle(pc);
+        
+        if(pc.right == AUTO){
+            style.right = "";
+        }
+        if(pc.bottom == AUTO){
+            style.bottom = "";
+        }
+        
+        return me;
+    },    
+	
+    /**
+     * Translates the passed page coordinates into left/top css values for this element
+     * @param {Number/Array} x The page x or an array containing [x, y]
+     * @param {Number} y (optional) The page y, required if x is not an array
+     * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)}
+     */
+    translatePoints : function(x, y){        	     
+	    y = isNaN(x[1]) ? y : x[1];
+        x = isNaN(x[0]) ? x : x[0];
+        var me = this,
+        	relative = me.isStyle(POSITION, RELATIVE),
+        	o = me.getXY(),
+        	l = parseInt(me.getStyle(LEFT), 10),
+        	t = parseInt(me.getStyle(TOP), 10);
+        
+        l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft);
+        t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);        
+
+        return {left: (x - o[0] + l), top: (y - o[1] + t)}; 
+    },
+    
+    animTest : animTest
+});
+})();/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
+     * @param {Object} box The box to fill {x, y, width, height}
+     * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBox : function(box, adjust, animate){
+        var me = this,
+        	w = box.width, 
+        	h = box.height;
+        if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){
+           w -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+           h -= (me.getBorderWidth("tb") + me.getPadding("tb"));
+        }
+        me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2));
+        return me;
+    },
+    
+    /**
+     * Return a box {x, y, width, height} that can be used to set another elements
+     * size/location to match this element.
+     * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y.
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+	getBox : function(contentBox, local) {	    
+	    var me = this,
+        	xy,
+        	left,
+        	top,
+        	getBorderWidth = me.getBorderWidth,
+        	getPadding = me.getPadding, 
+        	l,
+        	r,
+        	t,
+        	b;
+        if(!local){
+            xy = me.getXY();
+        }else{
+            left = parseInt(me.getStyle("left"), 10) || 0;
+            top = parseInt(me.getStyle("top"), 10) || 0;
+            xy = [left, top];
+        }
+        var el = me.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{
+            l = getBorderWidth.call(me, "l") + getPadding.call(me, "l");
+            r = getBorderWidth.call(me, "r") + getPadding.call(me, "r");
+            t = getBorderWidth.call(me, "t") + getPadding.call(me, "t");
+            b = getBorderWidth.call(me, "b") + getPadding.call(me, "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;
+	},
+	
+    /**
+     * Move this element relative to its current position.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to move the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+     move : function(direction, distance, animate){
+        var me = this,        	
+        	xy = me.getXY(),
+        	x = xy[0],
+        	y = xy[1],        	
+        	left = [x - distance, y],
+        	right = [x + distance, y],
+        	top = [x, y - distance],
+        	bottom = [x, y + distance],
+	       	hash = {
+	        	l :	left,
+	        	left : left,
+	        	r : right,
+	        	right : right,
+	        	t : top,
+	        	top : top,
+	        	up : top,
+	        	b : bottom, 
+	        	bottom : bottom,
+	        	down : bottom	        		
+	        };
+        
+ 	    direction = direction.toLowerCase();    
+ 	    me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2));
+    },
+    
+    /**
+     * Quick set left and top adding default units
+     * @param {String} left The left CSS property value
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+     setLeftTop : function(left, top){
+	    var me = this,
+	    	style = me.dom.style;
+        style.left = me.addUnits(left);
+        style.top = me.addUnits(top);
+        return me;
+    },
+    
+    /**
+     * Returns the region of the given element.
+     * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+     * @return {Region} A Ext.lib.Region containing "top, left, bottom, right" member data.
+     */
+    getRegion : function(){
+        return Ext.lib.Dom.getRegion(this.dom);
+    },
+    
+    /**
+     * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+     * </ul></div>
+     * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * </ul></div>
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBounds : function(x, y, width, height, animate){
+	    var me = this;
+        if (!animate || !me.anim) {
+            me.setSize(width, height);
+            me.setLocation(x, y);
+        } else {
+            me.anim({points: {to: [x, y]}, 
+            		 width: {to: me.adjustWidth(width)}, 
+            		 height: {to: me.adjustHeight(height)}},
+                     me.preanim(arguments, 4), 
+                     'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the element's position and size the specified region. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Ext.lib.Region} region The region to fill
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setRegion : function(region, animate) {
+        return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1));
+    }
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Returns true if this element is scrollable.
+     * @return {Boolean}
+     */
+    isScrollable : function(){
+        var dom = this.dom;
+        return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth;
+    },
+
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value.
+     * @return {Element} this
+     */
+    scrollTo : function(side, value){
+        this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value;
+        return this;
+    },
+
+    /**
+     * Returns the current scroll position of the element.
+     * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)}
+     */
+    getScroll : function(){
+        var d = this.dom, 
+            doc = document,
+            body = doc.body,
+            docElement = doc.documentElement,
+            l,
+            t,
+            ret;
+
+        if(d == doc || d == body){
+            if(Ext.isIE && Ext.isStrict){
+                l = docElement.scrollLeft; 
+                t = docElement.scrollTop;
+            }else{
+                l = window.pageXOffset;
+                t = window.pageYOffset;
+            }
+            ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)};
+        }else{
+            ret = {left: d.scrollLeft, top: d.scrollTop};
+        }
+        return ret;
+    }
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Element} this
+     */
+    scrollTo : function(side, value, animate){
+        var tester = /top/i,
+        	prop = "scroll" + (tester.test(side) ? "Top" : "Left"),
+        	me = this,
+        	dom = me.dom;
+        if (!animate || !me.anim) {
+            dom[prop] = value;
+        } else {
+            me.anim({scroll: {to: tester.test(prop) ? [dom[prop], value] : [value, dom[prop]]}},
+            		 me.preanim(arguments, 2), 'scroll');
+        }
+        return me;
+    },
+    
+    /**
+     * Scrolls this element into view within the passed container.
+     * @param {Mixed} container (optional) The container element to scroll (defaults to document.body).  Should be a
+     * string (id), dom node, or Ext.Element.
+     * @param {Boolean} hscroll (optional) False to disable horizontal scroll (defaults to true)
+     * @return {Ext.Element} this
+     */
+    scrollIntoView : function(container, hscroll){
+        var c = Ext.getDom(container) || Ext.getBody().dom,
+        	el = this.dom,
+        	o = this.getOffsetsTo(c),
+            l = o[0] + c.scrollLeft,
+            t = o[1] + c.scrollTop,
+            b = t + el.offsetHeight,
+            r = l + el.offsetWidth,
+        	ch = c.clientHeight,
+        	ct = parseInt(c.scrollTop, 10),
+        	cl = parseInt(c.scrollLeft, 10),
+        	cb = ct + ch,
+        	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; // corrects IE, other browsers will ignore
+
+        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;
+    },
+
+    // private
+    scrollChildIntoView : function(child, hscroll){
+        Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll);
+    },
+    
+    /**
+     * Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
+     * within this element's scrollable range.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to scroll the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Boolean} Returns true if a scroll was triggered or false if the element
+     * was scrolled as far as it could go.
+     */
+     scroll : function(direction, distance, animate){
+         if(!this.isScrollable()){
+             return;
+         }
+         var el = this.dom,
+            l = el.scrollLeft, t = el.scrollTop,
+            w = el.scrollWidth, h = el.scrollHeight,
+            cw = el.clientWidth, ch = el.clientHeight,
+            scrolled = false, v,
+            hash = {
+                l: Math.min(l + distance, w-cw),
+                r: v = Math.max(l - distance, 0),
+                t: Math.max(t - distance, 0),
+                b: Math.min(t + distance, h-ch)
+            };
+            hash.d = hash.b;
+            hash.u = hash.t;
+            
+         direction = direction.substr(0, 1);
+         if((v = hash[direction]) > -1){
+            scrolled = true;
+            this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2));
+         }
+         return scrolled;
+    }
+});/**
+ * @class Ext.Element
+ */
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use visibility to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.VISIBILITY = 1;
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use display to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.DISPLAY = 2;
+
+Ext.Element.addMethods(function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",      
+        ORIGINALDISPLAY = 'originalDisplay',
+        VISMODE = 'visibilityMode',
+        ELDISPLAY = Ext.Element.DISPLAY,
+        data = Ext.Element.data,
+        getDisplay = function(dom){
+            var d = data(dom, ORIGINALDISPLAY);
+            if(d === undefined){
+                data(dom, ORIGINALDISPLAY, d = '');
+            }
+            return d;
+        },
+        getVisMode = function(dom){
+            var m = data(dom, VISMODE);
+            if(m === undefined){
+                data(dom, VISMODE, m = 1)
+            }
+            return m;
+        };
+    
+    return {
+        /**
+         * The element's default display mode  (defaults to "")
+         * @type String
+         */
+        originalDisplay : "",
+        visibilityMode : 1,
+        
+        /**
+         * Sets the element's visibility mode. When setVisible() is called it
+         * will use this to determine whether to set the visibility or the display property.
+         * @param visMode Ext.Element.VISIBILITY or Ext.Element.DISPLAY
+         * @return {Ext.Element} this
+         */
+        setVisibilityMode : function(visMode){  
+            data(this.dom, VISMODE, visMode);
+            return this;
+        },
+        
+        /**
+         * Perform custom animation on this element.
+         * <div><ul class="mdetail-params">
+         * <li><u>Animation Properties</u></li>
+         * 
+         * <p>The Animation Control Object enables gradual transitions for any member of an
+         * element's style object that takes a numeric value including but not limited to
+         * these properties:</p><div><ul class="mdetail-params">
+         * <li><tt>bottom, top, left, right</tt></li>
+         * <li><tt>height, width</tt></li>
+         * <li><tt>margin, padding</tt></li>
+         * <li><tt>borderWidth</tt></li>
+         * <li><tt>opacity</tt></li>
+         * <li><tt>fontSize</tt></li>
+         * <li><tt>lineHeight</tt></li>
+         * </ul></div>
+         * 
+         * 
+         * <li><u>Animation Property Attributes</u></li>
+         * 
+         * <p>Each Animation Property is a config object with optional properties:</p>
+         * <div><ul class="mdetail-params">
+         * <li><tt>by</tt>*  : relative change - start at current value, change by this value</li>
+         * <li><tt>from</tt> : ignore current value, start from this value</li>
+         * <li><tt>to</tt>*  : start at current value, go to this value</li>
+         * <li><tt>unit</tt> : any allowable unit specification</li>
+         * <p>* do not specify both <tt>to</tt> and <tt>by</tt> for an animation property</p>
+         * </ul></div>
+         * 
+         * <li><u>Animation Types</u></li>
+         * 
+         * <p>The supported animation types:</p><div><ul class="mdetail-params">
+         * <li><tt>'run'</tt> : Default
+         * <pre><code>
+var el = Ext.get('complexEl');
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'run'      // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre>
+         * </li>
+         * <li><tt>'color'</tt>
+         * <p>Animates transition of background, text, or border colors.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        color: { to: '#06e' },
+        backgroundColor: { to: '#e06' }
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'color'    // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * 
+         * <li><tt>'motion'</tt>
+         * <p>Animates the motion of an element to/from specific points using optional bezier
+         * way points during transit.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+        points: {
+            to: [50, 100],  // go to this point
+            control: [      // optional bezier way points
+                [ 600, 800],
+                [-100, 200]
+            ]
+        }
+    },
+    3000,      // animation duration (milliseconds!)
+    null,      // callback
+    'easeOut', // easing method
+    'motion'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * <li><tt>'scroll'</tt>
+         * <p>Animate horizontal or vertical scrolling of an overflowing page element.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        scroll: {to: [400, 300]}
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'scroll'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * </ul></div>
+         * 
+         * </ul></div>
+         * 
+         * @param {Object} args The animation control args
+         * @param {Float} duration (optional) How long the animation lasts in seconds (defaults to <tt>.35</tt>)
+         * @param {Function} onComplete (optional) Function to call when animation completes
+         * @param {String} easing (optional) {@link Ext.Fx#easing} method to use (defaults to <tt>'easeOut'</tt>)
+         * @param {String} animType (optional) <tt>'run'</tt> is the default. Can also be <tt>'color'</tt>,
+         * <tt>'motion'</tt>, or <tt>'scroll'</tt>
+         * @return {Ext.Element} this
+         */
+        animate : function(args, duration, onComplete, easing, animType){       
+            this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType);
+            return this;
+        },
+    
+        /*
+         * @private Internal animation call
+         */
+        anim : function(args, opt, animType, defaultDur, defaultEase, cb){
+            animType = animType || 'run';
+            opt = opt || {};
+            var me = this,              
+                anim = Ext.lib.Anim[animType](
+                    me.dom, 
+                    args,
+                    (opt.duration || defaultDur) || .35,
+                    (opt.easing || defaultEase) || 'easeOut',
+                    function(){
+                        if(cb) cb.call(me);
+                        if(opt.callback) opt.callback.call(opt.scope || me, me, opt);
+                    },
+                    me
+                );
+            opt.anim = anim;
+            return anim;
+        },
+    
+        // private legacy anim prep
+        preanim : function(a, i){
+            return !a[i] ? false : (Ext.isObject(a[i]) ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]});
+        },
+        
+        /**
+         * Checks whether the element is currently visible using both visibility and display properties.         
+         * @return {Boolean} True if the element is currently visible, else false
+         */
+        isVisible : function() {
+            return !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE);
+        },
+        
+        /**
+         * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
+         * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
+         * @param {Boolean} visible Whether the element is visible
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setVisible : function(visible, animate){
+            var me = this,
+                dom = me.dom,
+                isDisplay = getVisMode(this.dom) == ELDISPLAY;
+                
+            if (!animate || !me.anim) {
+                if(isDisplay){
+                    me.setDisplayed(visible);
+                }else{
+                    me.fixDisplay();
+                    dom.style.visibility = visible ? "visible" : HIDDEN;
+                }
+            }else{
+                // closure for composites            
+                if(visible){
+                    me.setOpacity(.01);
+                    me.setVisible(true);
+                }
+                me.anim({opacity: { to: (visible?1:0) }},
+                        me.preanim(arguments, 1),
+                        null,
+                        .35,
+                        'easeIn',
+                        function(){
+                             if(!visible){
+                                 dom.style[isDisplay ? DISPLAY : VISIBILITY] = (isDisplay) ? NONE : HIDDEN;                     
+                                 Ext.fly(dom).setOpacity(1);
+                             }
+                        });
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the element's visibility or display, depending on visibility mode.
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        toggle : function(animate){
+            var me = this;
+            me.setVisible(!me.isVisible(), me.preanim(arguments, 0));
+            return me;
+        },
+    
+        /**
+         * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
+         * @param {Mixed} value Boolean value to display the element using its default display, or a string to set the display directly.
+         * @return {Ext.Element} this
+         */
+        setDisplayed : function(value) {            
+            if(typeof value == "boolean"){
+               value = value ? getDisplay(this.dom) : NONE;
+            }
+            this.setStyle(DISPLAY, value);
+            return this;
+        },
+        
+        // private
+        fixDisplay : function(){
+            var me = this;
+            if(me.isStyle(DISPLAY, NONE)){
+                me.setStyle(VISIBILITY, HIDDEN);
+                me.setStyle(DISPLAY, getDisplay(this.dom)); // first try reverting to default
+                if(me.isStyle(DISPLAY, NONE)){ // if that fails, default to block
+                    me.setStyle(DISPLAY, "block");
+                }
+            }
+        },
+    
+        /**
+         * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        hide : function(animate){
+            this.setVisible(false, this.preanim(arguments, 0));
+            return this;
+        },
+    
+        /**
+        * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+        * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        show : function(animate){
+            this.setVisible(true, this.preanim(arguments, 0));
+            return this;
+        }
+    }
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",
+	    XMASKED = "x-masked",
+		XMASKEDRELATIVE = "x-masked-relative",
+        data = Ext.Element.data;
+		
+	return {
+		/**
+	     * Checks whether the element is currently visible using both visibility and display properties.
+	     * @param {Boolean} deep (optional) True to walk the dom and see if parent elements are hidden (defaults to false)
+	     * @return {Boolean} True if the element is currently visible, else false
+	     */
+	    isVisible : function(deep) {
+	        var vis = !this.isStyle(VISIBILITY,HIDDEN) && !this.isStyle(DISPLAY,NONE),
+	        	p = this.dom.parentNode;
+	        if(deep !== true || !vis){
+	            return vis;
+	        }	        
+	        while(p && !/body/i.test(p.tagName)){
+	            if(!Ext.fly(p, '_isVisible').isVisible()){
+	                return false;
+	            }
+	            p = p.parentNode;
+	        }
+	        return true;
+	    },
+	    
+	    /**
+	     * Returns true if display is not "none"
+	     * @return {Boolean}
+	     */
+	    isDisplayed : function() {
+	        return !this.isStyle(DISPLAY, NONE);
+	    },
+	    
+		/**
+	     * Convenience method for setVisibilityMode(Element.DISPLAY)
+	     * @param {String} display (optional) What to set display to when visible
+	     * @return {Ext.Element} this
+	     */
+	    enableDisplayMode : function(display){	    
+	        this.setVisibilityMode(Ext.Element.DISPLAY);
+	        if(!Ext.isEmpty(display)){
+                data(this.dom, 'originalDisplay', display);
+            }
+	        return this;
+	    },
+	    
+		/**
+	     * Puts a mask over this element to disable user interaction. Requires core.css.
+	     * This method can only be applied to elements which accept child nodes.
+	     * @param {String} msg (optional) A message to display in the mask
+	     * @param {String} msgCls (optional) A css class to apply to the msg element
+	     * @return {Element} The mask element
+	     */
+	    mask : function(msg, msgCls){
+		    var me = this,
+		    	dom = me.dom,
+		    	dh = Ext.DomHelper,
+		    	EXTELMASKMSG = "ext-el-mask-msg",
+                el, 
+                mask;
+		    	
+	        if(me.getStyle("position") == "static"){
+	            me.addClass(XMASKEDRELATIVE);
+	        }
+	        if((el = data(dom, 'maskMsg'))){
+	            el.remove();
+	        }
+	        if((el = data(dom, 'mask'))){
+	            el.remove();
+	        }
+	
+            mask = dh.append(dom, {cls : "ext-el-mask"}, true);
+	        data(dom, 'mask', mask);
+	
+	        me.addClass(XMASKED);
+	        mask.setDisplayed(true);
+	        if(typeof msg == 'string'){
+                var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
+                data(dom, 'maskMsg', mm);
+	            mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG;
+	            mm.dom.firstChild.innerHTML = msg;
+	            mm.setDisplayed(true);
+	            mm.center(me);
+	        }
+	        if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto'){ // ie will not expand full height automatically
+	            mask.setSize(undefined, me.getHeight());
+	        }
+	        return mask;
+	    },
+	
+	    /**
+	     * Removes a previously applied mask.
+	     */
+	    unmask : function(){
+		    var me = this,
+                dom = me.dom,
+		    	mask = data(dom, 'mask'),
+		    	maskMsg = data(dom, 'maskMsg');
+	        if(mask){
+	            if(maskMsg){
+	                maskMsg.remove();
+                    data(dom, 'maskMsg', undefined);
+	            }
+	            mask.remove();
+                data(dom, 'mask', undefined);
+	        }
+	        me.removeClass([XMASKED, XMASKEDRELATIVE]);
+	    },
+	
+	    /**
+	     * Returns true if this element is masked
+	     * @return {Boolean}
+	     */
+	    isMasked : function(){
+            var m = data(this.dom, 'mask');
+	        return m && m.isVisible();
+	    },
+	    
+	    /**
+	     * Creates an iframe shim for this element to keep selects and other windowed objects from
+	     * showing through.
+	     * @return {Ext.Element} The new shim element
+	     */
+	    createShim : function(){
+	        var el = document.createElement('iframe'),        	
+	        	shim;
+	        el.frameBorder = '0';
+	        el.className = 'ext-shim';
+	        if(Ext.isIE && Ext.isSecure){
+	            el.src = Ext.SSL_SECURE_URL;
+	        }
+	        shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
+	        shim.autoBoxAdjust = false;
+	        return shim;
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Convenience method for constructing a KeyMap
+     * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
+     *                                  {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyListener : function(key, fn, scope){
+        var config;
+        if(!Ext.isObject(key) || 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);
+    },
+
+    /**
+     * Creates a KeyMap for this element
+     * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyMap : function(config){
+        return new Ext.KeyMap(this, config);
+    }
+});(function(){
+    // contants
+    var NULL = null,
+        UNDEFINED = undefined,
+        TRUE = true,
+        FALSE = false,
+        SETX = "setX",
+        SETY = "setY",
+        SETXY = "setXY",
+        LEFT = "left",
+        BOTTOM = "bottom",
+        TOP = "top",
+        RIGHT = "right",
+        HEIGHT = "height",
+        WIDTH = "width",
+        POINTS = "points",
+        HIDDEN = "hidden",
+        ABSOLUTE = "absolute",
+        VISIBLE = "visible",
+        MOTION = "motion",
+        POSITION = "position",
+        EASEOUT = "easeOut",
+        /*
+         * Use a light flyweight here since we are using so many callbacks and are always assured a DOM element
+         */
+        flyEl = new Ext.Element.Flyweight(),
+        queues = {},
+        getObject = function(o){
+            return o || {};
+        },
+        fly = function(dom){
+            flyEl.dom = dom;
+            flyEl.id = Ext.id(dom);
+            return flyEl;
+        },
+        /*
+         * Queueing now stored outside of the element due to closure issues
+         */
+        getQueue = function(id){
+            if(!queues[id]){
+                queues[id] = [];
+            }
+            return queues[id];
+        },
+        setQueue = function(id, value){
+            queues[id] = value;
+        };
+        
+//Notifies Element that fx methods are available
+Ext.enableFx = TRUE;
+
+/**
+ * @class Ext.Fx
+ * <p>A class to provide basic animation and visual effects support.  <b>Note:</b> This class is automatically applied
+ * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}.
+ * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx <b>must</b> be
+ * {@link Ext#enableFx included} in order for the Element effects to work.</p><br/>
+ * 
+ * <p><b><u>Method Chaining</u></b></p>
+ * <p>It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that
+ * they return the Element object itself as the method return value, it is not always possible to mix the two in a single
+ * method chain.  The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced.
+ * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately.  For this reason,
+ * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the
+ * expected results and should be done with care.  Also see <tt>{@link #callback}</tt>.</p><br/>
+ *
+ * <p><b><u>Anchor Options for Motion Effects</u></b></p>
+ * <p>Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element
+ * that will serve as either the start or end point of the animation.  Following are all of the supported anchor positions:</p>
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+ * <b>Note</b>: some Fx methods accept specific custom config parameters.  The options shown in the Config Options
+ * section below are common options that can be passed to any Fx method unless otherwise noted.</b>
+ * 
+ * @cfg {Function} callback A function called when the effect is finished.  Note that effects are queued internally by the
+ * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together
+ * and called in sequence (see note for <b><u>Method Chaining</u></b> above), for example:<pre><code>
+ * el.slideIn().highlight();
+ * </code></pre>
+ * The callback is intended for any additional code that should run once a particular effect has completed. The Element
+ * being operated upon is passed as the first parameter.
+ * 
+ * @cfg {Object} scope The scope of the <tt>{@link #callback}</tt> function
+ * 
+ * @cfg {String} easing A valid Ext.lib.Easing value for the effect:</p><div class="mdetail-params"><ul>
+ * <li><b><tt>backBoth</tt></b></li>
+ * <li><b><tt>backIn</tt></b></li>
+ * <li><b><tt>backOut</tt></b></li>
+ * <li><b><tt>bounceBoth</tt></b></li>
+ * <li><b><tt>bounceIn</tt></b></li>
+ * <li><b><tt>bounceOut</tt></b></li>
+ * <li><b><tt>easeBoth</tt></b></li>
+ * <li><b><tt>easeBothStrong</tt></b></li>
+ * <li><b><tt>easeIn</tt></b></li>
+ * <li><b><tt>easeInStrong</tt></b></li>
+ * <li><b><tt>easeNone</tt></b></li>
+ * <li><b><tt>easeOut</tt></b></li>
+ * <li><b><tt>easeOutStrong</tt></b></li>
+ * <li><b><tt>elasticBoth</tt></b></li>
+ * <li><b><tt>elasticIn</tt></b></li>
+ * <li><b><tt>elasticOut</tt></b></li>
+ * </ul></div>
+ *
+ * @cfg {String} afterCls A css class to apply after the effect
+ * @cfg {Number} duration The length of time (in seconds) that the effect should last
+ * 
+ * @cfg {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between
+ * <tt>0</tt> and <tt>1</tt> inclusive to configure the ending opacity value.
+ *  
+ * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes
+ * @cfg {Boolean} useDisplay Whether to use the <i>display</i> CSS property instead of <i>visibility</i> when hiding Elements (only applies to 
+ * effects that end with the element being visually hidden, ignored otherwise)
+ * @cfg {String/Object/Function} afterStyle A style specification string, e.g. <tt>"width:100px"</tt>, or an object
+ * in the form <tt>{width:"100px"}</tt>, or a function which returns such a specification that will be applied to the
+ * Element after the effect finishes.
+ * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs
+ * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence
+ * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects)
+ */
+Ext.Fx = {
+    
+    // private - calls the function taking arguments from the argHash based on the key.  Returns the return value of the function.
+    //           this is useful for replacing switch statements (for example).
+    switchStatements : function(key, fn, argHash){
+        return fn.apply(this, argHash[key]);
+    },
+    
+    /**
+     * Slides the element into view.  An anchor point can be optionally passed to set the point of
+     * origin for the slide effect.  This function automatically handles wrapping the element with
+     * a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element in from the top
+el.slideIn();
+
+// custom: slide the element in from the right with a 2-second duration
+el.slideIn('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideIn('t', {
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideIn : function(anchor, o){ 
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy,
+            r,
+            b,              
+            wrap,               
+            after,
+            st,
+            args, 
+            pt,
+            bw,
+            bh;
+            
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){            
+            xy = fly(dom).getXY();
+            // fix display to visibility
+            fly(dom).fixDisplay();            
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore();      
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+            
+            // fixed size for slide
+            fly(dom).setWidth(b.width).setHeight(b.height);            
+            
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, HIDDEN);
+            
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            
+            // clear out temp styles after slide and unwrap
+            function after(){
+                 fly(dom).fxUnwrap(wrap, r.pos, o);
+                 st.width = r.width;
+                 st.height = r.height;
+                 fly(dom).afterFx(o);
+            }
+            
+            // time to calculate the positions        
+            pt = {to: [b.x, b.y]}; 
+            bw = {to: b.width};
+            bh = {to: b.height};
+                
+            function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){                    
+                var ret = {};
+                fly(wrap).setWidth(ww).setHeight(wh);
+                if(fly(wrap)[sXY]){
+                    fly(wrap)[sXY](sXYval);                  
+                }
+                style[s1] = style[s2] = "0";                    
+                if(w){
+                    ret.width = w
+                };
+                if(h){
+                    ret.height = h;
+                }
+                if(p){
+                    ret.points = p;
+                }
+                return ret;
+            };
+
+            args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                    t  : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL],
+                    l  : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL],
+                    r  : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt],
+                    b  : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt],
+                    tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt],
+                    bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt],
+                    br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt],
+                    tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt]
+                });
+            
+            st.visibility = VISIBLE;
+            fly(wrap).show();
+
+            arguments.callee.anim = fly(wrap).fxanim(args,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+    
+    /**
+     * Slides the element out of view.  An anchor point can be optionally passed to set the end point
+     * for the slide effect.  When the effect is completed, the element will be hidden (visibility = 
+     * 'hidden') but block elements will still take up space in the document.  The element must be removed
+     * from the DOM using the 'remove' config option if desired.  This function automatically handles 
+     * wrapping the element with a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element out to the top
+el.slideOut();
+
+// custom: slide the element out to the right with a 2-second duration
+el.slideOut('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideOut('t', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideOut : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy = me.getXY(),
+            wrap,
+            r,
+            b,
+            a,
+            zero = {to: 0}; 
+                    
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore(); 
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+                
+            // fixed size for slide   
+            fly(dom).setWidth(b.width).setHeight(b.height);
+
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
+                
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            fly(wrap).setWidth(b.width).setHeight(b.height);            
+
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                
+                fly(dom).fxUnwrap(wrap, r.pos, o);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }            
+            
+            function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){                    
+                var ret = {};
+                
+                style[s1] = style[s2] = "0";
+                ret[p1] = v1;               
+                if(p2){
+                    ret[p2] = v2;               
+                }
+                if(p3){
+                    ret[p3] = v3;
+                }
+                
+                return ret;
+            };
+            
+            a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                t  : [st, LEFT, BOTTOM, HEIGHT, zero],
+                l  : [st, RIGHT, TOP, WIDTH, zero],
+                r  : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}],
+                b  : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero],
+                bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
+                tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
+            });
+            
+            arguments.callee.anim = fly(wrap).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+
+    /**
+     * Fades the element out while slowly expanding it in all directions.  When the effect is completed, the 
+     * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. 
+     * The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.puff();
+
+// common config options shown with default values
+el.puff({
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    puff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            width,
+            height,
+            r;
+
+        me.queueFx(o, function(){
+            width = fly(dom).getWidth();
+            height = fly(dom).getHeight();
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();                   
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                  
+                fly(dom).clearOpacity();  
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                st.fontSize = '';
+                fly(dom).afterFx(o);
+            }   
+
+            arguments.callee.anim = fly(dom).fxanim({
+                    width : {to : fly(dom).adjustWidth(width * 2)},
+                    height : {to : fly(dom).adjustHeight(height * 2)},
+                    points : {by : [-width * .5, -height * .5]},
+                    opacity : {to : 0},
+                    fontSize: {to : 200, unit: "%"}
+                },
+                o,
+                MOTION,
+                .5,
+                EASEOUT,
+                 after);
+        });
+        return me;
+    },
+
+    /**
+     * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
+     * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still 
+     * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.switchOff();
+
+// all config options shown with default values
+el.switchOff({
+    easing: 'easeIn',
+    duration: .3,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    switchOff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            r;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).clip();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+                
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();  
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;   
+                fly(dom).afterFx(o);
+            };
+
+            fly(dom).fxanim({opacity : {to : 0.3}}, 
+                NULL, 
+                NULL, 
+                .1, 
+                NULL, 
+                function(){                                 
+                    fly(dom).clearOpacity();
+                        (function(){                            
+                            fly(dom).fxanim({
+                                height : {to : 1},
+                                points : {by : [0, fly(dom).getHeight() * .5]}
+                            }, 
+                            o, 
+                            MOTION, 
+                            0.3, 
+                            'easeIn', 
+                            after);
+                        }).defer(100);
+                });
+        });
+        return me;
+    },
+
+    /**
+     * Highlights the Element by setting a color (applies to the background-color by default, but can be
+     * changed using the "attr" config option) and then fading back to the original color. If no original
+     * color is available, you should provide the "endColor" config option which will be cleared after the animation.
+     * Usage:
+<pre><code>
+// default: highlight background to yellow
+el.highlight();
+
+// custom: highlight foreground text to blue for 2 seconds
+el.highlight("0000ff", { attr: 'color', duration: 2 });
+
+// common config options shown with default values
+el.highlight("ffff9c", {
+    attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
+    endColor: (current color) or "ffffff",
+    easing: 'easeIn',
+    duration: 1
+});
+</code></pre>
+     * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */ 
+    highlight : function(color, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            attr = o.attr || "backgroundColor",
+            a = {},
+            restore;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            function after(){
+                dom.style[attr] = restore;
+                fly(dom).afterFx(o);
+            }            
+            restore = dom.style[attr];
+            a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"};
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                'color',
+                1,
+                'easeIn', 
+                after);
+        });
+        return me;
+    },
+
+   /**
+    * Shows a ripple of exploding, attenuating borders to draw attention to an Element.
+    * Usage:
+<pre><code>
+// default: a single light blue ripple
+el.frame();
+
+// custom: 3 red ripples lasting 3 seconds total
+el.frame("ff0000", 3, { duration: 3 });
+
+// common config options shown with default values
+el.frame("C3DAF9", 1, {
+    duration: 1 //duration of each individual ripple.
+    // Note: Easing is not configurable and will be ignored if included
+});
+</code></pre>
+    * @param {String} color (optional) The color of the border.  Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').
+    * @param {Number} count (optional) The number of ripples to display (defaults to 1)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    frame : function(color, count, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            proxy,
+            active;
+
+        me.queueFx(o, function(){
+            color = color || "#C3DAF9"
+            if(color.length == 6){
+                color = "#" + color;
+            }            
+            count = count || 1;
+            fly(dom).show();
+
+            var xy = fly(dom).getXY(),
+                b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight},
+                queue = function(){
+                    proxy = fly(document.body || document.documentElement).createChild({
+                        style:{
+                            visbility: HIDDEN,
+                            position : ABSOLUTE,
+                            "z-index": 35000, // yee haw
+                            border : "0px solid " + color
+                        }
+                    });
+                    return proxy.queueFx({}, animFn);
+                };
+            
+            
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function() {
+                    count = 0;
+                    proxy.stopFx();
+                }
+            };
+            
+            function animFn(){
+                var scale = Ext.isBorderBox ? 2 : 1;
+                active = proxy.anim({
+                    top : {from : b.y, to : b.y - 20},
+                    left : {from : b.x, to : b.x - 20},
+                    borderWidth : {from : 0, to : 10},
+                    opacity : {from : 1, to : 0},
+                    height : {from : b.height, to : b.height + 20 * scale},
+                    width : {from : b.width, to : b.width + 20 * scale}
+                },{
+                    duration: o.duration || 1,
+                    callback: function() {
+                        proxy.remove();
+                        --count > 0 ? queue() : fly(dom).afterFx(o);
+                    }
+                });
+                arguments.callee.anim = {
+                    isAnimated: true,
+                    stop: function(){
+                        active.stop();
+                    }
+                };
+            };
+            queue();
+        });
+        return me;
+    },
+
+   /**
+    * Creates a pause before any subsequent queued effects begin.  If there are
+    * no effects queued after the pause it will have no effect.
+    * Usage:
+<pre><code>
+el.pause(1);
+</code></pre>
+    * @param {Number} seconds The length of time to pause (in seconds)
+    * @return {Ext.Element} The Element
+    */
+    pause : function(seconds){        
+        var dom = this.dom,
+            t;
+
+        this.queueFx({}, function(){
+            t = setTimeout(function(){
+                fly(dom).afterFx({});
+            }, seconds * 1000);
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function(){
+                    clearTimeout(t);
+                    fly(dom).afterFx({});
+                }
+            };
+        });
+        return this;
+    },
+
+   /**
+    * Fade an element in (from transparent to opaque).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.
+    * Usage:
+<pre><code>
+// default: fade in from opacity 0 to 100%
+el.fadeIn();
+
+// custom: fade in from opacity 0 to 75% over 2 seconds
+el.fadeIn({ endOpacity: .75, duration: 2});
+
+// common config options shown with default values
+el.fadeIn({
+    endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeIn : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            to = o.endOpacity || 1;
+        
+        me.queueFx(o, function(){
+            fly(dom).setOpacity(0);
+            fly(dom).fixDisplay();
+            dom.style.visibility = VISIBLE;
+            arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}},
+                o, NULL, .5, EASEOUT, function(){
+                if(to == 1){
+                    fly(dom).clearOpacity();
+                }
+                fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Fade an element out (from opaque to transparent).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.  Note that IE may require
+    * <tt>{@link #useDisplay}:true</tt> in order to redisplay correctly.
+    * Usage:
+<pre><code>
+// default: fade out from the element's current opacity to 0
+el.fadeOut();
+
+// custom: fade out from the element's current opacity to 25% over 2 seconds
+el.fadeOut({ endOpacity: .25, duration: 2});
+
+// common config options shown with default values
+el.fadeOut({
+    endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeOut : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            style = dom.style,
+            to = o.endOpacity || 0;         
+        
+        me.queueFx(o, function(){  
+            arguments.callee.anim = fly(dom).fxanim({ 
+                opacity : {to : to}},
+                o, 
+                NULL, 
+                .5, 
+                EASEOUT, 
+                function(){
+                    if(to == 0){
+                        Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? 
+                            style.display = "none" :
+                            style.visibility = HIDDEN;
+                            
+                        fly(dom).clearOpacity();
+                    }
+                    fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Animates the transition of an element's dimensions from a starting height/width
+    * to an ending height/width.  This method is a convenience implementation of {@link shift}.
+    * Usage:
+<pre><code>
+// change height and width to 100x100 pixels
+el.scale(100, 100);
+
+// common config options shown with default values.  The height and width will default to
+// the element&#39;s existing values if passed as null.
+el.scale(
+    [element&#39;s width],
+    [element&#39;s height], {
+        easing: 'easeOut',
+        duration: .35
+    }
+);
+</code></pre>
+    * @param {Number} width  The new width (pass undefined to keep the original width)
+    * @param {Number} height  The new height (pass undefined to keep the original height)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    scale : function(w, h, o){
+        this.shift(Ext.apply({}, o, {
+            width: w,
+            height: h
+        }));
+        return this;
+    },
+
+   /**
+    * Animates the transition of any combination of an element's dimensions, xy position and/or opacity.
+    * Any of these properties not specified in the config object will not be changed.  This effect 
+    * requires that at least one new dimension, position or opacity setting must be passed in on
+    * the config object in order for the function to have any effect.
+    * Usage:
+<pre><code>
+// slide the element horizontally to x position 200 while changing the height and opacity
+el.shift({ x: 200, height: 50, opacity: .8 });
+
+// common config options shown with default values.
+el.shift({
+    width: [element&#39;s width],
+    height: [element&#39;s height],
+    x: [element&#39;s x position],
+    y: [element&#39;s y position],
+    opacity: [element&#39;s opacity],
+    easing: 'easeOut',
+    duration: .35
+});
+</code></pre>
+    * @param {Object} options  Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    shift : function(o){
+        o = getObject(o);
+        var dom = this.dom,
+            a = {};
+                
+        this.queueFx(o, function(){
+            for (var prop in o) {
+                if (o[prop] != UNDEFINED) {                                                 
+                    a[prop] = {to : o[prop]};                   
+                }
+            } 
+            
+            a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
+            a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;   
+            
+            if (a.x || a.y || a.xy) {
+                a.points = a.xy || 
+                           {to : [ a.x ? a.x.to : fly(dom).getX(),
+                                   a.y ? a.y.to : fly(dom).getY()]};                  
+            }
+
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o, 
+                MOTION, 
+                .35, 
+                EASEOUT, 
+                function(){
+                    fly(dom).afterFx(o);
+                });
+        });
+        return this;
+    },
+
+    /**
+     * Slides the element while fading it out of view.  An anchor point can be optionally passed to set the 
+     * ending point of the effect.
+     * Usage:
+     *<pre><code>
+// default: slide the element downward while fading out
+el.ghost();
+
+// custom: slide the element out to the right with a 2-second duration
+el.ghost('r', { duration: 2 });
+
+// common config options shown with default values
+el.ghost('b', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    ghost : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            a = {opacity: {to: 0}, points: {}},
+            pt = a.points,
+            r,
+            w,
+            h;
+            
+        anchor = anchor || "b";
+
+        me.queueFx(o, function(){
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+            w = fly(dom).getWidth();
+            h = fly(dom).getHeight();
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();   
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }
+                
+            pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, {
+               t  : [0, -h],
+               l  : [-w, 0],
+               r  : [w, 0],
+               b  : [0, h],
+               tl : [-w, -h],
+               bl : [-w, h],
+               br : [w, h],
+               tr : [w, -h] 
+            });
+                
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, after);
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after syncFx is called on the element are
+     * run concurrently.  This is the opposite of {@link #sequenceFx}.
+     * @return {Ext.Element} The Element
+     */
+    syncFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : TRUE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after sequenceFx is called on the element are
+     * run in sequence.  This is the opposite of {@link #syncFx}.
+     * @return {Ext.Element} The Element
+     */
+    sequenceFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : FALSE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /* @private */
+    nextFx : function(){        
+        var ef = getQueue(this.dom.id)[0];
+        if(ef){
+            ef.call(this);
+        }
+    },
+
+    /**
+     * Returns true if the element has any effects actively running or queued, else returns false.
+     * @return {Boolean} True if element has active effects, else false
+     */
+    hasActiveFx : function(){
+        return getQueue(this.dom.id)[0];
+    },
+
+    /**
+     * Stops any running effects and clears the element's internal effects queue if it contains
+     * any additional effects that haven't started yet.
+     * @return {Ext.Element} The Element
+     */
+    stopFx : function(finish){
+        var me = this,
+            id = me.dom.id;
+        if(me.hasActiveFx()){
+            var cur = getQueue(id)[0];
+            if(cur && cur.anim){
+                if(cur.anim.isAnimated){
+                    setQueue(id, [cur]); //clear
+                    cur.anim.stop(finish !== undefined ? finish : TRUE);
+                }else{
+                    setQueue(id, []);
+                }
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    beforeFx : function(o){
+        if(this.hasActiveFx() && !o.concurrent){
+           if(o.stopFx){
+               this.stopFx();
+               return TRUE;
+           }
+           return FALSE;
+        }
+        return TRUE;
+    },
+
+    /**
+     * Returns true if the element is currently blocking so that no other effect can be queued
+     * until this effect is finished, else returns false if blocking is not set.  This is commonly
+     * used to ensure that an effect initiated by a user action runs to completion prior to the
+     * same effect being restarted (e.g., firing only one effect even if the user clicks several times).
+     * @return {Boolean} True if blocking, else false
+     */
+    hasFxBlock : function(){
+        var q = getQueue(this.dom.id);
+        return q && q[0] && q[0].block;
+    },
+
+    /* @private */
+    queueFx : function(o, fn){
+        var me = this;
+        if(!me.hasFxBlock()){
+            Ext.applyIf(o, me.fxDefaults);
+            if(!o.concurrent){
+                var run = me.beforeFx(o);
+                fn.block = o.block;
+                getQueue(me.dom.id).push(fn);
+                if(run){
+                    me.nextFx();
+                }
+            }else{
+                fn.call(me);
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    fxWrap : function(pos, o, vis){ 
+        var dom = this.dom,
+            wrap,
+            wrapXY;
+        if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){            
+            if(o.fixPosition){
+                wrapXY = fly(dom).getXY();
+            }
+            var div = document.createElement("div");
+            div.style.visibility = vis;
+            wrap = dom.parentNode.insertBefore(div, dom);
+            fly(wrap).setPositioning(pos);
+            if(fly(wrap).isStyle(POSITION, "static")){
+                fly(wrap).position("relative");
+            }
+            fly(dom).clearPositioning('auto');
+            fly(wrap).clip();
+            wrap.appendChild(dom);
+            if(wrapXY){
+                fly(wrap).setXY(wrapXY);
+            }
+        }
+        return wrap;
+    },
+
+    /* @private */
+    fxUnwrap : function(wrap, pos, o){      
+        var dom = this.dom;
+        fly(dom).clearPositioning();
+        fly(dom).setPositioning(pos);
+        if(!o.wrap){
+            wrap.parentNode.insertBefore(dom, wrap);
+            fly(wrap).remove();
+        }
+    },
+
+    /* @private */
+    getFxRestore : function(){
+        var st = this.dom.style;
+        return {pos: this.getPositioning(), width: st.width, height : st.height};
+    },
+
+    /* @private */
+    afterFx : function(o){
+        var dom = this.dom,
+            id = dom.id,
+            notConcurrent = !o.concurrent;
+        if(o.afterStyle){
+            fly(dom).setStyle(o.afterStyle);            
+        }
+        if(o.afterCls){
+            fly(dom).addClass(o.afterCls);
+        }
+        if(o.remove == TRUE){
+            fly(dom).remove();
+        }
+        if(notConcurrent){
+            getQueue(id).shift();
+        }
+        if(o.callback){
+            o.callback.call(o.scope, fly(dom));
+        }
+        if(notConcurrent){
+            fly(dom).nextFx();
+        }
+    },
+
+    /* @private */
+    fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
+        animType = animType || 'run';
+        opt = opt || {};
+        var anim = Ext.lib.Anim[animType](
+                this.dom, 
+                args,
+                (opt.duration || defaultDur) || .35,
+                (opt.easing || defaultEase) || EASEOUT,
+                cb,            
+                this
+            );
+        opt.anim = anim;
+        return anim;
+    }
+};
+
+// backwards compat
+Ext.Fx.resize = Ext.Fx.scale;
+
+//When included, Ext.Fx is automatically applied to Element so that all basic
+//effects are available directly via the Element API
+Ext.Element.addMethods(Ext.Fx);
+})();/**
+ * @class Ext.CompositeElementLite
+ * Flyweight composite class. Reuses the same Ext.Element for element operations.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class");
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class');
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre><br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ */
+Ext.CompositeElementLite = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+    this.el = new Ext.Element.Flyweight();
+};
+
+Ext.CompositeElementLite.prototype = {
+	isComposite: true,	
+	/**
+     * Returns the number of elements in this composite
+     * @return Number
+     */
+    getCount : function(){
+        return this.elements.length;
+    },    
+	add : function(els){
+        if(els){
+            if (Ext.isArray(els)) {
+                this.elements = this.elements.concat(els);
+            } else {
+                var yels = this.elements;                	                
+	            Ext.each(els, function(e) {
+                    yels.push(e);
+                });
+            }
+        }
+        return this;
+    },
+    invoke : function(fn, args){
+        var els = this.elements,
+        	el = this.el;        
+	    Ext.each(els, function(e) {    
+            el.dom = e;
+        	Ext.Element.prototype[fn].apply(el, args);
+        });
+        return this;
+    },
+    /**
+     * Returns a flyweight Element of the dom element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+	    var me = this;
+        if(!me.elements[index]){
+            return null;
+        }
+        me.el.dom = me.elements[index];
+        return me.el;
+    },
+
+    // fixes scope with flyweight
+    addListener : function(eventName, handler, scope, opt){
+        Ext.each(this.elements, function(e) {
+	        Ext.EventManager.on(e, eventName, handler, scope || e, opt);
+        });
+        return this;
+    },
+    /**
+    * Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
+    * passed is the flyweight (shared) Ext.Element instance, so if you require a
+    * a reference to the dom node, use el.dom.</b>
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){       
+        var me = this,
+        	el = me.el;
+       
+	    Ext.each(me.elements, function(e,i) {    
+            el.dom = e;
+        	return fn.call(scope || el, el, me, i);
+        });
+        return me;
+    },
+    
+    /**
+     * Find the index of the passed element within the composite collection.
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found.
+     */
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.getDom(el));
+    },
+    
+    /**
+    * Replaces the specified element with the passed element.
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * to replace.
+    * @param {Mixed} replacement The id of an element or the Element itself.
+    * @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too.
+    * @return {CompositeElement} this
+    */    
+    replaceElement : function(el, replacement, domReplace){
+        var index = !isNaN(el) ? el : this.indexOf(el),
+        	d;
+        if(index > -1){
+            replacement = Ext.getDom(replacement);
+            if(domReplace){
+                d = this.elements[index];
+                d.parentNode.insertBefore(replacement, d);
+                Ext.removeNode(d);
+            }
+            this.elements.splice(index, 1, replacement);
+        }
+        return this;
+    },
+    
+    /**
+     * Removes all elements.
+     */
+    clear : function(){
+        this.elements = [];
+    }
+};
+
+Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener;
+
+(function(){
+var fnName,
+	ElProto = Ext.Element.prototype,
+	CelProto = Ext.CompositeElementLite.prototype;
+	
+for(fnName in ElProto){
+    if(Ext.isFunction(ElProto[fnName])){
+	    (function(fnName){ 
+		    CelProto[fnName] = CelProto[fnName] || function(){
+		    	return this.invoke(fnName, arguments);
+	    	};
+    	}).call(CelProto, fnName);
+        
+    }
+}
+})();
+
+if(Ext.DomQuery){
+    Ext.Element.selectorFunction = Ext.DomQuery.select;
+} 
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) <b>Not supported in core</b>
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+    return new Ext.CompositeElementLite(els);
+};
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext
+ * @method select
+ */
+Ext.select = Ext.Element.select;/**
+ * @class Ext.CompositeElementLite
+ */
+Ext.apply(Ext.CompositeElementLite.prototype, {	
+	addElements : function(els, root){
+        if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },
+    
+    /**
+    * Clears this composite and adds the elements returned by the passed selector.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    fill : function(els){
+        this.elements = [];
+        this.add(els);
+        return this;
+    },
+    
+    /**
+     * Returns the first Element
+     * @return {Ext.Element}
+     */
+    first : function(){
+        return this.item(0);
+    },   
+    
+    /**
+     * Returns the last Element
+     * @return {Ext.Element}
+     */
+    last : function(){
+        return this.item(this.getCount()-1);
+    },
+    
+    /**
+     * Returns true if this composite contains the passed element
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Boolean
+     */
+    contains : function(el){
+        return this.indexOf(el) != -1;
+    },
+
+    /**
+    * Filters this composite to only elements that match the passed selector.
+    * @param {String} selector A string CSS selector
+    * @return {CompositeElement} this
+    */
+    filter : function(selector){
+        var els = [];
+        this.each(function(el){
+            if(el.is(selector)){
+                els[els.length] = el.dom;
+            }
+        });
+        this.fill(els);
+        return this;
+    },
+    
+    /**
+    * Removes the specified element(s).
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * or an array of any of those.
+    * @param {Boolean} removeDom (optional) True to also remove the element from the document
+    * @return {CompositeElement} this
+    */
+    removeElement : function(keys, removeDom){
+        var me = this,
+	        els = this.elements,	    
+	    	el;	    	
+	    Ext.each(keys, function(val){
+		    if ((el = (els[val] || els[val = me.indexOf(val)]))) {
+		    	if(removeDom){
+                    if(el.dom){
+                        el.remove();
+                    }else{
+                        Ext.removeNode(el);
+                    }
+                }
+		    	els.splice(val, 1);		    	
+			}
+	    });
+        return this;
+    }    
+});
+/**
+ * @class Ext.CompositeElement
+ * @extends Ext.CompositeElementLite
+ * Standard composite class. Creates a Ext.Element for every element in the collection.
+ * <br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ * <br><br>
+ * All methods return <i>this</i> and can be chained.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class", true);
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class', true);
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre>
+ */
+Ext.CompositeElement = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+};
+
+Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, {
+    invoke : function(fn, args){
+	    Ext.each(this.elements, function(e) {
+        	Ext.Element.prototype[fn].apply(e, args);
+        });
+        return this;
+    },
+    
+    /**
+    * Adds elements to this composite.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    add : function(els, root){
+	    if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },    
+    
+    /**
+     * Returns the Element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+        return this.elements[index] || null;
+    },
+
+
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.get(el));
+    },
+        
+    filter : function(selector){
+		var me = this,
+			out = [];
+			
+		Ext.each(me.elements, function(el) {	
+			if(el.is(selector)){
+				out.push(Ext.get(el));
+			}
+		});
+		me.elements = out;
+		return me;
+	},
+	
+	/**
+    * Calls the passed function passing (el, this, index) for each element in this composite.
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){        
+        Ext.each(this.elements, function(e,i) {
+	        return fn.call(scope || e, e, this, i);
+        }, this);
+        return this;
+    }
+});
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+
+    return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els);
+};
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.select = Ext.Element.select;(function(){
+    var BEFOREREQUEST = "beforerequest",
+        REQUESTCOMPLETE = "requestcomplete",
+        REQUESTEXCEPTION = "requestexception",
+        UNDEFINED = undefined,
+        LOAD = 'load',
+        POST = 'POST',
+        GET = 'GET',
+        WINDOW = window;
+    
+    /**
+     * @class Ext.data.Connection
+     * @extends Ext.util.Observable
+     * <p>The class encapsulates a connection to the page's originating domain, allowing requests to be made
+     * either to a configured URL, or to a URL specified at request time.</p>
+     * <p>Requests made by this class are asynchronous, and will return immediately. No data from
+     * the server will be available to the statement immediately following the {@link #request} call.
+     * To process returned data, use a
+     * <a href="#request-option-success" ext:member="request-option-success" ext:cls="Ext.data.Connection">success callback</a>
+     * in the request options object,
+     * or an {@link #requestcomplete event listener}.</p>
+     * <p><h3>File Uploads</h3><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that
+     * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+     * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     * @constructor
+     * @param {Object} config a configuration object.
+     */
+    Ext.data.Connection = function(config){    
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event beforerequest
+             * Fires before a network request is made to retrieve a data object.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            BEFOREREQUEST,
+            /**
+             * @event requestcomplete
+             * Fires if the request was successfully completed.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTCOMPLETE,
+            /**
+             * @event requestexception
+             * Fires if an error HTTP status was returned from the server.
+             * See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP Status Code Definitions</a>
+             * for details of HTTP status codes.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTEXCEPTION
+        );
+        Ext.data.Connection.superclass.constructor.call(this);
+    };
+
+    // private
+    function handleResponse(response){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTCOMPLETE, this, response, options);
+        if(options.success){
+            options.success.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, true, response);
+        }
+    }
+
+    // private
+    function handleFailure(response, e){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTEXCEPTION, this, response, options, e);
+        if(options.failure){
+            options.failure.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, false, response);
+        }
+    }
+
+    // private
+    function doFormUpload(o, ps, url){
+        var id = Ext.id(),
+            doc = document,
+            frame = doc.createElement('iframe'),
+            form = Ext.getDom(o.form),
+            hiddens = [],
+            hd,
+            encoding = 'multipart/form-data',
+            buf = {
+                target: form.target,
+                method: form.method,
+                encoding: form.encoding,
+                enctype: form.enctype,
+                action: form.action
+            };
+            
+        Ext.apply(frame, {
+            id: id,
+            name: id,
+            className: 'x-hidden',
+            src: Ext.SSL_SECURE_URL // for IE
+        });     
+        doc.body.appendChild(frame);
+        
+        // This is required so that IE doesn't pop the response up in a new window.
+        if(Ext.isIE){
+           document.frames[id].name = id;
+        }
+        
+        Ext.apply(form, {
+            target: id,
+            method: POST,
+            enctype: encoding,
+            encoding: encoding,
+            action: url || buf.action
+        });
+        
+        // add dynamic params            
+        ps = Ext.urlDecode(ps, false);
+        for(var k in ps){
+            if(ps.hasOwnProperty(k)){
+                hd = doc.createElement('input');
+                hd.type = 'hidden';                    
+                hd.value = ps[hd.name = k];
+                form.appendChild(hd);
+                hiddens.push(hd);
+            }
+        }        
+
+        function cb(){
+            var me = this,
+                // bogus response object
+                r = {responseText : '',
+                     responseXML : null,
+                     argument : o.argument},
+                doc,
+                firstChild;
+
+            try{ 
+                doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document;
+                if(doc){
+                    if(doc.body){
+                        if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){ // json response wrapped in textarea                        
+                            r.responseText = firstChild.value;
+                        }else{
+                            r.responseText = doc.body.innerHTML;
+                        }
+                    }
+                    //in IE the document may still have a body even if returns XML.
+                    r.responseXML = doc.XMLDocument || doc;
+                }
+            }
+            catch(e) {}
+
+            Ext.EventManager.removeListener(frame, LOAD, cb, me);
+
+            me.fireEvent(REQUESTCOMPLETE, me, r, o);
+            
+            function runCallback(fn, scope, args){
+                if(Ext.isFunction(fn)){
+                    fn.apply(scope, args);
+                }
+            }
+
+            runCallback(o.success, o.scope, [r, o]);
+            runCallback(o.callback, o.scope, [o, true, r]);
+
+            if(!me.debugUploads){
+                setTimeout(function(){Ext.removeNode(frame);}, 100);
+            }
+        }
+
+        Ext.EventManager.on(frame, LOAD, cb, this);
+        form.submit();
+        
+        Ext.apply(form, buf);
+        Ext.each(hiddens, function(h) {
+            Ext.removeNode(h);
+        });
+    }
+
+    Ext.extend(Ext.data.Connection, Ext.util.Observable, {
+        /**
+         * @cfg {String} url (Optional) <p>The default URL to be used for requests to the server. Defaults to undefined.</p>
+         * <p>The <code>url</code> config may be a function which <i>returns</i> the URL to use for the Ajax request. The scope
+         * (<code><b>this</b></code> reference) of the function is the <code>scope</code> option passed to the {@link #request} method.</p>
+         */
+        /**
+         * @cfg {Object} extraParams (Optional) An object containing properties which are used as
+         * extra parameters to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added
+         *  to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {String} method (Optional) The default HTTP method to be used for requests.
+         * (defaults to undefined; if not set, but {@link #request} params are present, POST will be used;
+         * otherwise, GET will be used.)
+         */
+        /**
+         * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
+         */
+        timeout : 30000,
+        /**
+         * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false)
+         * @type Boolean
+         */
+        autoAbort:false,
+    
+        /**
+         * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
+         * @type Boolean
+         */
+        disableCaching: true,
+        
+        /**
+         * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching
+         * through a cache buster. Defaults to '_dc'
+         * @type String
+         */
+        disableCachingParam: '_dc',
+        
+        /**
+         * <p>Sends an HTTP request to a remote server.</p>
+         * <p><b>Important:</b> Ajax server requests are asynchronous, and this call will
+         * return before the response has been received. Process any returned data
+         * in a callback function.</p>
+         * <pre><code>
+Ext.Ajax.request({
+   url: 'ajax_demo/sample.json',
+   success: function(response, opts) {
+      var obj = Ext.decode(response.responseText);
+      console.dir(obj);
+   },
+   failure: function(response, opts) {
+      console.log('server-side failure with status code ' + response.status);
+   }
+});
+         * </code></pre>
+         * <p>To execute a callback function in the correct scope, use the <tt>scope</tt> option.</p>
+         * @param {Object} options An object which may contain the following properties:<ul>
+         * <li><b>url</b> : String/Function (Optional)<div class="sub-desc">The URL to
+         * which to send the request, or a function to call which returns a URL string. The scope of the
+         * function is specified by the <tt>scope</tt> option. Defaults to the configured
+         * <tt>{@link #url}</tt>.</div></li>
+         * <li><b>params</b> : Object/String/Function (Optional)<div class="sub-desc">
+         * An object containing properties which are used as parameters to the
+         * request, a url encoded string or a function to call to get either. The scope of the function
+         * is specified by the <tt>scope</tt> option.</div></li>
+         * <li><b>method</b> : String (Optional)<div class="sub-desc">The HTTP method to use
+         * for the request. Defaults to the configured method, or if no method was configured,
+         * "GET" if no parameters are being sent, and "POST" if parameters are being sent.  Note that
+         * the method name is case-sensitive and should be all caps.</div></li>
+         * <li><b>callback</b> : Function (Optional)<div class="sub-desc">The
+         * function to be called upon receipt of the HTTP response. The callback is
+         * called regardless of success or failure and is passed the following
+         * parameters:<ul>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * <li><b>success</b> : Boolean<div class="sub-desc">True if the request succeeded.</div></li>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data. 
+         * See <a href="http://www.w3.org/TR/XMLHttpRequest/">http://www.w3.org/TR/XMLHttpRequest/</a> for details about 
+         * accessing elements of the response.</div></li>
+         * </ul></div></li>
+         * <li><a id="request-option-success"></a><b>success</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon success of the request. The callback is passed the following
+         * parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>failure</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon failure of the request. The callback is passed the
+         * following parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>scope</b> : Object (Optional)<div class="sub-desc">The scope in
+         * which to execute the callbacks: The "this" object for the callback function. If the <tt>url</tt>, or <tt>params</tt> options were
+         * specified as functions from which to draw values, then this also serves as the scope for those function calls.
+         * Defaults to the browser window.</div></li>
+         * <li><b>timeout</b> : Number (Optional)<div class="sub-desc">The timeout in milliseconds to be used for this request. Defaults to 30 seconds.</div></li>
+         * <li><b>form</b> : Element/HTMLElement/String (Optional)<div class="sub-desc">The <tt>&lt;form&gt;</tt>
+         * Element or the id of the <tt>&lt;form&gt;</tt> to pull parameters from.</div></li>
+         * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc"><b>Only meaningful when used 
+         * with the <tt>form</tt> option</b>.
+         * <p>True if the form object is a file upload (will be set automatically if the form was
+         * configured with <b><tt>enctype</tt></b> "multipart/form-data").</p>
+         * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+         * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+         * DOM <tt>&lt;form></tt> element temporarily modified to have its
+         * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+         * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+         * but removed after the return data has been gathered.</p>
+         * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+         * server is using JSON to send the return object, then the
+         * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+         * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+         * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+         * is created containing a <tt>responseText</tt> property in order to conform to the
+         * requirements of event handlers and callbacks.</p>
+         * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+         * and some server technologies (notably JEE) may require some custom processing in order to
+         * retrieve parameter names and parameter values from the packet content.</p>
+         * </div></li>
+         * <li><b>headers</b> : Object (Optional)<div class="sub-desc">Request
+         * headers to set for the request.</div></li>
+         * <li><b>xmlData</b> : Object (Optional)<div class="sub-desc">XML document
+         * to use for the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>jsonData</b> : Object/String (Optional)<div class="sub-desc">JSON
+         * data to use as the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>disableCaching</b> : Boolean (Optional)<div class="sub-desc">True
+         * to add a unique cache-buster param to GET requests.</div></li>
+         * </ul></p>
+         * <p>The options object may also contain any other property which might be needed to perform
+         * postprocessing in a callback because it is passed to callback functions.</p>
+         * @return {Number} transactionId The id of the server transaction. This may be used
+         * to cancel the request.
+         */
+        request : function(o){
+            var me = this;
+            if(me.fireEvent(BEFOREREQUEST, me, o)){
+                if (o.el) {
+                    if(!Ext.isEmpty(o.indicatorText)){
+                        me.indicatorText = '<div class="loading-indicator">'+o.indicatorText+"</div>";
+                    }
+                    if(me.indicatorText) {
+                        Ext.getDom(o.el).innerHTML = me.indicatorText;                        
+                    }
+                    o.success = (Ext.isFunction(o.success) ? o.success : function(){}).createInterceptor(function(response) {
+                        Ext.getDom(o.el).innerHTML = response.responseText;
+                    });
+                }
+                
+                var p = o.params,
+                    url = o.url || me.url,                
+                    method,
+                    cb = {success: handleResponse,
+                          failure: handleFailure,
+                          scope: me,
+                          argument: {options: o},
+                          timeout : o.timeout || me.timeout
+                    },
+                    form,                    
+                    serForm;                    
+                  
+                     
+                if (Ext.isFunction(p)) {
+                    p = p.call(o.scope||WINDOW, o);
+                }
+                                                           
+                p = Ext.urlEncode(me.extraParams, Ext.isObject(p) ? Ext.urlEncode(p) : p);    
+                
+                if (Ext.isFunction(url)) {
+                    url = url.call(o.scope || WINDOW, o);
+                }
+    
+                if((form = Ext.getDom(o.form))){
+                    url = url || form.action;
+                     if(o.isUpload || /multipart\/form-data/i.test(form.getAttribute("enctype"))) { 
+                         return doFormUpload.call(me, o, p, url);
+                     }
+                    serForm = Ext.lib.Ajax.serializeForm(form);                    
+                    p = p ? (p + '&' + serForm) : serForm;
+                }
+                
+                method = o.method || me.method || ((p || o.xmlData || o.jsonData) ? POST : GET);
+                
+                if(method === GET && (me.disableCaching && o.disableCaching !== false) || o.disableCaching === true){
+                    var dcp = o.disableCachingParam || me.disableCachingParam;
+                    url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime()));
+                }
+                
+                o.headers = Ext.apply(o.headers || {}, me.defaultHeaders || {});
+                
+                if(o.autoAbort === true || me.autoAbort) {
+                    me.abort();
+                }
+                 
+                if((method == GET || o.xmlData || o.jsonData) && p){
+                    url = Ext.urlAppend(url, p);  
+                    p = '';
+                }
+                return (me.transId = Ext.lib.Ajax.request(method, url, cb, p, o));
+            }else{                
+                return o.callback ? o.callback.apply(o.scope, [o,UNDEFINED,UNDEFINED]) : null;
+            }
+        },
+    
+        /**
+         * Determine whether this object has a request outstanding.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         * @return {Boolean} True if there is an outstanding request.
+         */
+        isLoading : function(transId){
+            return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId;            
+        },
+    
+        /**
+         * Aborts any outstanding request.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         */
+        abort : function(transId){
+            if(transId || this.isLoading()){
+                Ext.lib.Ajax.abort(transId || this.transId);
+            }
+        }
+    });
+})();
+
+/**
+ * @class Ext.Ajax
+ * @extends Ext.data.Connection
+ * <p>The global Ajax request class that provides a simple way to make Ajax requests
+ * with maximum flexibility.</p>
+ * <p>Since Ext.Ajax is a singleton, you can set common properties/events for it once
+ * and override them at the request function level only if necessary.</p>
+ * <p>Common <b>Properties</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #method}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #extraParams}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #url}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Default headers to pass in every request
+Ext.Ajax.defaultHeaders = {
+    'Powered-By': 'Ext'
+};
+ * </code></pre> 
+ * </p>
+ * <p>Common <b>Events</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.data.Connection#beforerequest beforerequest}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestcomplete requestcomplete}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestexception requestexception}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Example: show a spinner during all Ajax requests
+Ext.Ajax.on('beforerequest', this.showSpinner, this);
+Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
+Ext.Ajax.on('requestexception', this.hideSpinner, this);
+ * </code></pre> 
+ * </p>
+ * <p>An example request:</p>
+ * <pre><code>
+// Basic request
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+   url: 'foo.php',
+   success: someFn,
+   failure: otherFn,
+   headers: {
+       'my-header': 'foo'
+   },
+   params: { foo: 'bar' }
+});
+
+// Simple ajax form submission
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+    form: 'some-form',
+    params: 'foo=bar'
+});
+ * </code></pre> 
+ * </p>
+ * @singleton
+ */
+Ext.Ajax = new Ext.data.Connection({
+    /**
+     * @cfg {String} url @hide
+     */
+    /**
+     * @cfg {Object} extraParams @hide
+     */
+    /**
+     * @cfg {Object} defaultHeaders @hide
+     */
+    /**
+     * @cfg {String} method (Optional) @hide
+     */
+    /**
+     * @cfg {Number} timeout (Optional) @hide
+     */
+    /**
+     * @cfg {Boolean} autoAbort (Optional) @hide
+     */
+
+    /**
+     * @cfg {Boolean} disableCaching (Optional) @hide
+     */
+
+    /**
+     * @property  disableCaching
+     * True to add a unique cache-buster param to GET requests. (defaults to true)
+     * @type Boolean
+     */
+    /**
+     * @property  url
+     * The default URL to be used for requests to the server. (defaults to undefined)
+     * If the server receives all requests through one URL, setting this once is easier than
+     * entering it on every request.
+     * @type String
+     */
+    /**
+     * @property  extraParams
+     * An object containing properties which are used as extra parameters to each request made
+     * by this object (defaults to undefined). Session information and other data that you need
+     * to pass with each request are commonly put here.
+     * @type Object
+     */
+    /**
+     * @property  defaultHeaders
+     * An object containing request headers which are added to each request made by this object
+     * (defaults to undefined).
+     * @type Object
+     */
+    /**
+     * @property  method
+     * The default HTTP method to be used for requests. Note that this is case-sensitive and
+     * should be all caps (defaults to undefined; if not set but params are present will use
+     * <tt>"POST"</tt>, otherwise will use <tt>"GET"</tt>.)
+     * @type String
+     */
+    /**
+     * @property  timeout
+     * The timeout in milliseconds to be used for requests. (defaults to 30000)
+     * @type Number
+     */
+
+    /**
+     * @property  autoAbort
+     * Whether a new request should abort any pending requests. (defaults to false)
+     * @type Boolean
+     */
+    autoAbort : false,
+
+    /**
+     * Serialize the passed form into a url encoded string
+     * @param {String/HTMLElement} form
+     * @return {String}
+     */
+    serializeForm : function(form){
+        return Ext.lib.Ajax.serializeForm(form);
+    }
+});
+/**
+ * @class Ext.Updater
+ * @extends Ext.util.Observable
+ * Provides AJAX-style update capabilities for Element objects.  Updater can be used to {@link #update}
+ * an {@link Ext.Element} once, or you can use {@link #startAutoRefresh} to set up an auto-updating
+ * {@link Ext.Element Element} on a specific interval.<br><br>
+ * Usage:<br>
+ * <pre><code>
+ * var el = Ext.get("foo"); // Get Ext.Element object
+ * var mgr = el.getUpdater();
+ * mgr.update({
+        url: "http://myserver.com/index.php",
+        params: {
+            param1: "foo",
+            param2: "bar"
+        }
+ * });
+ * ...
+ * mgr.formUpdate("myFormId", "http://myserver.com/index.php");
+ * <br>
+ * // or directly (returns the same Updater instance)
+ * var mgr = new Ext.Updater("myElementId");
+ * mgr.startAutoRefresh(60, "http://myserver.com/index.php");
+ * mgr.on("update", myFcnNeedsToKnow);
+ * <br>
+ * // short handed call directly from the element object
+ * Ext.get("foo").load({
+        url: "bar.php",
+        scripts: true,
+        params: "param1=foo&amp;param2=bar",
+        text: "Loading Foo..."
+ * });
+ * </code></pre>
+ * @constructor
+ * Create new Updater directly.
+ * @param {Mixed} el The element to update
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already
+ * has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).
+ */
+Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, 
+function() {
+	var BEFOREUPDATE = "beforeupdate",
+		UPDATE = "update",
+		FAILURE = "failure";
+		
+	// private
+    function processSuccess(response){	    
+	    var me = this;
+        me.transaction = null;
+        if (response.argument.form && response.argument.reset) {
+            try { // put in try/catch since some older FF releases had problems with this
+                response.argument.form.reset();
+            } catch(e){}
+        }
+        if (me.loadScripts) {
+            me.renderer.render(me.el, response, me,
+               updateComplete.createDelegate(me, [response]));
+        } else {
+            me.renderer.render(me.el, response, me);
+            updateComplete.call(me, response);
+        }
+    }
+    
+    // private
+    function updateComplete(response, type, success){
+        this.fireEvent(type || UPDATE, this.el, response);
+        if(Ext.isFunction(response.argument.callback)){
+            response.argument.callback.call(response.argument.scope, this.el, Ext.isEmpty(success) ? true : false, response, response.argument.options);
+        }
+    }
+
+    // private
+    function processFailure(response){	            
+        updateComplete.call(this, response, FAILURE, !!(this.transaction = null));
+    }
+	    
+	return {
+	    constructor: function(el, forceNew){
+		    var me = this;
+	        el = Ext.get(el);
+	        if(!forceNew && el.updateManager){
+	            return el.updateManager;
+	        }
+	        /**
+	         * The Element object
+	         * @type Ext.Element
+	         */
+	        me.el = el;
+	        /**
+	         * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.
+	         * @type String
+	         */
+	        me.defaultUrl = null;
+	
+	        me.addEvents(
+	            /**
+	             * @event beforeupdate
+	             * Fired before an update is made, return false from your handler and the update is cancelled.
+	             * @param {Ext.Element} el
+	             * @param {String/Object/Function} url
+	             * @param {String/Object} params
+	             */
+	            BEFOREUPDATE,
+	            /**
+	             * @event update
+	             * Fired after successful update is made.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            UPDATE,
+	            /**
+	             * @event failure
+	             * Fired on update failure.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            FAILURE
+	        );
+	
+	        Ext.apply(me, Ext.Updater.defaults);
+	        /**
+	         * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}).
+	         * @property sslBlankUrl
+	         * @type String
+	         */
+	        /**
+	         * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}).
+	         * @property disableCaching
+	         * @type Boolean
+	         */
+	        /**
+	         * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}).
+	         * @property indicatorText
+	         * @type String
+	         */
+	        /**
+	         * Whether to show indicatorText when loading (defaults to {@link Ext.Updater.defaults#showLoadIndicator}).
+	         * @property showLoadIndicator
+	         * @type String
+	         */
+	        /**
+	         * Timeout for requests or form posts in seconds (defaults to {@link Ext.Updater.defaults#timeout}).
+	         * @property timeout
+	         * @type Number
+	         */
+	        /**
+	         * True to process scripts in the output (defaults to {@link Ext.Updater.defaults#loadScripts}).
+	         * @property loadScripts
+	         * @type Boolean
+	         */
+	
+	        /**
+	         * Transaction object of the current executing transaction, or null if there is no active transaction.
+	         */
+	        me.transaction = null;
+	        /**
+	         * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.refreshDelegate = me.refresh.createDelegate(me);
+	        /**
+	         * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.updateDelegate = me.update.createDelegate(me);
+	        /**
+	         * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me);	
+	        
+			/**
+			 * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}).
+			 */
+	        me.renderer = me.renderer || me.getDefaultRenderer();
+	        
+	        Ext.Updater.superclass.constructor.call(me);
+	    },
+        
+		/**
+	     * Sets the content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @param {Object} renderer The object implementing the render() method
+	     */
+	    setRenderer : function(renderer){
+	        this.renderer = renderer;
+	    },	
+        
+	    /**
+	     * Returns the current content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @return {Object}
+	     */
+	    getRenderer : function(){
+	       return this.renderer;
+	    },
+
+	    /**
+	     * This is an overrideable method which returns a reference to a default
+	     * renderer class if none is specified when creating the Ext.Updater.
+	     * Defaults to {@link Ext.Updater.BasicRenderer}
+	     */
+	    getDefaultRenderer: function() {
+	        return new Ext.Updater.BasicRenderer();
+	    },
+                
+	    /**
+	     * Sets the default URL used for updates.
+	     * @param {String/Function} defaultUrl The url or a function to call to get the url
+	     */
+	    setDefaultUrl : function(defaultUrl){
+	        this.defaultUrl = defaultUrl;
+	    },
+        
+	    /**
+	     * Get the Element this Updater is bound to
+	     * @return {Ext.Element} The element
+	     */
+	    getEl : function(){
+	        return this.el;
+	    },
+	
+		/**
+	     * Performs an <b>asynchronous</b> request, updating this element with the response.
+	     * If params are specified it uses POST, otherwise it uses GET.<br><br>
+	     * <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element
+	     * will not have been fully updated when the function returns. To post-process the returned
+	     * data, use the callback option, or an <b><tt>update</tt></b> event handler.
+	     * @param {Object} options A config object containing any of the following options:<ul>
+	     * <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which
+	     * <i>returns</i> the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).</p></li>
+	     * <li>method : <b>String</b><p class="sub-desc">The HTTP method to
+	     * use. Defaults to POST if the <tt>params</tt> argument is present, otherwise GET.</p></li>
+	     * <li>params : <b>String/Object/Function</b><p class="sub-desc">The
+	     * parameters to pass to the server (defaults to none). These may be specified as a url-encoded
+	     * string, or as an object containing properties which represent parameters,
+	     * or as a function, which returns such an object.</p></li>
+	     * <li>scripts : <b>Boolean</b><p class="sub-desc">If <tt>true</tt>
+	     * any &lt;script&gt; tags embedded in the response text will be extracted
+	     * and executed (defaults to {@link Ext.Updater.defaults#loadScripts}). If this option is specified,
+	     * the callback will be called <i>after</i> the execution of the scripts.</p></li>
+	     * <li>callback : <b>Function</b><p class="sub-desc">A function to
+	     * be called when the response from the server arrives. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
+	     * <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
+	     * </p></li>
+	     * <li>scope : <b>Object</b><p class="sub-desc">The scope in which
+	     * to execute the callback (The callback's <tt>this</tt> reference.) If the
+	     * <tt>params</tt> argument is a function, this scope is used for that function also.</p></li>
+	     * <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes
+	     * the default URL for this Updater object, and will be subsequently used in {@link #refresh}
+	     * calls.  To bypass this behavior, pass <tt>discardUrl:true</tt> (defaults to false).</p></li>
+	     * <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before
+	     * timing out (defaults to {@link Ext.Updater.defaults#timeout}).</p></li>
+	     * <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the
+	     * {@link Ext.Updater.defaults#indicatorText} div (defaults to 'Loading...').  To replace the entire div, not
+	     * just the text, override {@link Ext.Updater.defaults#indicatorText} directly.</p></li>
+	     * <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
+	     * requests, this option causes an extra, auto-generated parameter to be appended to the request
+	     * to defeat caching (defaults to {@link Ext.Updater.defaults#disableCaching}).</p></li></ul>
+	     * <p>
+	     * For example:
+	<pre><code>
+	um.update({
+	    url: "your-url.php",
+	    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+	    callback: yourFunction,
+	    scope: yourObject, //(optional scope)
+	    discardUrl: true,
+	    nocache: true,
+	    text: "Loading...",
+	    timeout: 60,
+	    scripts: false // Save time by avoiding RegExp execution.
+	});
+	</code></pre>
+	     */
+	    update : function(url, params, callback, discardUrl){
+		    var me = this,
+		    	cfg, 
+		    	callerScope;
+		    	
+	        if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){	            
+	            if(Ext.isObject(url)){ // must be config object
+	                cfg = url;
+	                url = cfg.url;
+	                params = params || cfg.params;
+	                callback = callback || cfg.callback;
+	                discardUrl = discardUrl || cfg.discardUrl;
+	                callerScope = cfg.scope;	                
+	                if(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;};
+	                if(!Ext.isEmpty(cfg.text)){me.indicatorText = '<div class="loading-indicator">'+cfg.text+"</div>";};
+	                if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;};
+	                if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;};
+	            }
+	            me.showLoading();
+	
+	            if(!discardUrl){
+	                me.defaultUrl = url;
+	            }
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	
+	            var o = Ext.apply({}, {
+	                url : url,
+	                params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                callback: undefined,
+	                timeout: (me.timeout*1000),
+	                disableCaching: me.disableCaching,
+	                argument: {
+	                    "options": cfg,
+	                    "url": url,
+	                    "form": null,
+	                    "callback": callback,
+	                    "scope": callerScope || window,
+	                    "params": params
+	                }
+	            }, cfg);
+	
+	            me.transaction = Ext.Ajax.request(o);
+	        }
+	    },	    	
+
+		/**
+	     * <p>Performs an async form post, updating this element with the response. If the form has the attribute
+	     * enctype="<a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>", it assumes it's a file upload.
+	     * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.</p>
+	     * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+	     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+	     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+	     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+	     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+	     * but removed after the return data has been gathered.</p>
+	     * <p>Be aware that file upload packets, sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>
+	     * and some server technologies (notably JEE) may require some custom processing in order to
+	     * retrieve parameter names and parameter values from the packet content.</p>
+	     * @param {String/HTMLElement} form The form Id or form element
+	     * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used.
+	     * @param {Boolean} reset (optional) Whether to try to reset the form after the update
+	     * @param {Function} callback (optional) Callback when transaction is complete. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul>
+	     */
+	    formUpdate : function(form, url, reset, callback){
+		    var me = this;
+	        if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	            form = Ext.getDom(form)
+	            me.transaction = Ext.Ajax.request({
+	                form: form,
+	                url:url,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                timeout: (me.timeout*1000),
+	                argument: {
+	                    "url": url,
+	                    "form": form,
+	                    "callback": callback,
+	                    "reset": reset
+	                }
+	            });
+	            me.showLoading.defer(1, me);
+	        }
+	    },
+                	
+	    /**
+	     * Set this element to auto refresh.  Can be canceled by calling {@link #stopAutoRefresh}.
+	     * @param {Number} interval How often to update (in seconds).
+	     * @param {String/Object/Function} url (optional) The url for this request, a config object in the same format
+	     * supported by {@link #load}, or a function to call to get the url (defaults to the last used url).  Note that while
+	     * the url used in a load call can be reused by this method, other load config options will not be reused and must be
+	     * sepcified as part of a config object passed as this paramter if needed.
+	     * @param {String/Object} params (optional) The parameters to pass as either a url encoded string
+	     * "&param1=1&param2=2" or as an object {param1: 1, param2: 2}
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval
+	     */
+	    startAutoRefresh : function(interval, url, params, callback, refreshNow){
+		    var me = this;
+	        if(refreshNow){
+	            me.update(url || me.defaultUrl, params, callback, true);
+	        }
+	        if(me.autoRefreshProcId){
+	            clearInterval(me.autoRefreshProcId);
+	        }
+	        me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000);
+	    },
+	
+	    /**
+	     * Stop auto refresh on this element.
+	     */
+	    stopAutoRefresh : function(){
+	        if(this.autoRefreshProcId){
+	            clearInterval(this.autoRefreshProcId);
+	            delete this.autoRefreshProcId;
+	        }
+	    },
+	
+	    /**
+	     * Returns true if the Updater is currently set to auto refresh its content (see {@link #startAutoRefresh}), otherwise false.
+	     */
+	    isAutoRefreshing : function(){
+	       return !!this.autoRefreshProcId;
+	    },
+	
+	    /**
+	     * Display the element's "loading" state. By default, the element is updated with {@link #indicatorText}. This
+	     * method may be overridden to perform a custom action while this Updater is actively updating its contents.
+	     */
+	    showLoading : function(){
+	        if(this.showLoadIndicator){
+            	this.el.dom.innerHTML = this.indicatorText;
+	        }
+	    },
+	
+	    /**
+	     * Aborts the currently executing transaction, if any.
+	     */
+	    abort : function(){
+	        if(this.transaction){
+	            Ext.Ajax.abort(this.transaction);
+	        }
+	    },
+	
+	    /**
+	     * Returns true if an update is in progress, otherwise false.
+	     * @return {Boolean}
+	     */
+	    isUpdating : function(){        
+	    	return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false;        
+	    },
+	    
+	    /**
+	     * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     */
+	    refresh : function(callback){
+	        if(this.defaultUrl){
+	        	this.update(this.defaultUrl, null, callback, true);
+	    	}
+	    }
+    }
+}());
+
+/**
+ * @class Ext.Updater.defaults
+ * The defaults collection enables customizing the default properties of Updater
+ */
+Ext.Updater.defaults = {
+   /**
+     * Timeout for requests or form posts in seconds (defaults to 30 seconds).
+     * @type Number
+     */
+    timeout : 30,    
+    /**
+     * True to append a unique parameter to GET requests to disable caching (defaults to false).
+     * @type Boolean
+     */
+    disableCaching : false,
+    /**
+     * Whether or not to show {@link #indicatorText} during loading (defaults to true).
+     * @type Boolean
+     */
+    showLoadIndicator : true,
+    /**
+     * Text for loading indicator (defaults to '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').
+     * @type String
+     */
+    indicatorText : '<div class="loading-indicator">Loading...</div>',
+     /**
+     * True to process scripts by default (defaults to false).
+     * @type Boolean
+     */
+    loadScripts : false,
+    /**
+    * Blank page URL to use with SSL file uploads (defaults to {@link Ext#SSL_SECURE_URL} if set, or "javascript:false").
+    * @type String
+    */
+    sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false")      
+};
+
+
+/**
+ * Static convenience method. <b>This method is deprecated in favor of el.load({url:'foo.php', ...})</b>.
+ * Usage:
+ * <pre><code>Ext.Updater.updateElement("my-div", "stuff.php");</code></pre>
+ * @param {Mixed} el The element to update
+ * @param {String} url The url
+ * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs
+ * @param {Object} options (optional) A config object with any of the Updater properties you want to set - for
+ * example: {disableCaching:true, indicatorText: "Loading data..."}
+ * @static
+ * @deprecated
+ * @member Ext.Updater
+ */
+Ext.Updater.updateElement = function(el, url, params, options){
+    var um = Ext.get(el).getUpdater();
+    Ext.apply(um, options);
+    um.update(url, params, options ? options.callback : null);
+};
+
+/**
+ * @class Ext.Updater.BasicRenderer
+ * Default Content renderer. Updates the elements innerHTML with the responseText.
+ */
+Ext.Updater.BasicRenderer = function(){};
+
+Ext.Updater.BasicRenderer.prototype = {
+    /**
+     * This is called when the transaction is completed and it's time to update the element - The BasicRenderer
+     * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing),
+     * create an object with a "render(el, response)" method and pass it to setRenderer on the Updater.
+     * @param {Ext.Element} el The element being rendered
+     * @param {Object} response The XMLHttpRequest object
+     * @param {Updater} updateManager The calling update manager
+     * @param {Function} callback A callback that will need to be called if loadScripts is true on the Updater
+     */
+     render : function(el, response, updateManager, callback){	     
+        el.update(response.responseText, updateManager.loadScripts, callback);
+    }
+};/**
+ * @class Date
+ *
+ * The date parsing and formatting syntax contains a subset of
+ * <a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are
+ * supported will provide results equivalent to their PHP versions.
+ *
+ * The following is a list of all currently supported formats:
+ * <pre>
+Format  Description                                                               Example returned values
+------  -----------------------------------------------------------------------   -----------------------
+  d     Day of the month, 2 digits with leading zeros                             01 to 31
+  D     A short textual representation of the day of the week                     Mon to Sun
+  j     Day of the month without leading zeros                                    1 to 31
+  l     A full textual representation of the day of the week                      Sunday to Saturday
+  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
+  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
+  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
+  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
+  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
+  F     A full textual representation of a month, such as January or March        January to December
+  m     Numeric representation of a month, with leading zeros                     01 to 12
+  M     A short textual representation of a month                                 Jan to Dec
+  n     Numeric representation of a month, without leading zeros                  1 to 12
+  t     Number of days in the given month                                         28 to 31
+  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
+  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
+        belongs to the previous or next year, that year is used instead)
+  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
+  y     A two digit representation of a year                                      Examples: 99 or 03
+  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
+  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
+  g     12-hour format of an hour without leading zeros                           1 to 12
+  G     24-hour format of an hour without leading zeros                           0 to 23
+  h     12-hour format of an hour with leading zeros                              01 to 12
+  H     24-hour format of an hour with leading zeros                              00 to 23
+  i     Minutes, with leading zeros                                               00 to 59
+  s     Seconds, with leading zeros                                               00 to 59
+  u     Decimal fraction of a second                                              Examples:
+        (minimum 1 digit, arbitrary number of digits allowed)                     001 (i.e. 0.001s) or
+                                                                                  100 (i.e. 0.100s) or
+                                                                                  999 (i.e. 0.999s) or
+                                                                                  999876543210 (i.e. 0.999876543210s)
+  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
+  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
+  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
+  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
+  c     ISO 8601 date
+        Notes:                                                                    Examples:
+        1) If unspecified, the month / day defaults to the current month / day,   1991 or
+           the time defaults to midnight, while the timezone defaults to the      1992-10 or
+           browser's timezone. If a time is specified, it must include both hours 1993-09-20 or
+           and minutes. The "T" delimiter, seconds, milliseconds and timezone     1994-08-19T16:20+01:00 or
+           are optional.                                                          1995-07-18T17:21:28-02:00 or
+        2) The decimal fraction of a second, if specified, must contain at        1996-06-17T18:22:29.98765+03:00 or
+           least 1 digit (there is no limit to the maximum number                 1997-05-16T19:23:30,12345-0400 or
+           of digits allowed), and may be delimited by either a '.' or a ','      1998-04-15T20:24:31.2468Z or
+        Refer to the examples on the right for the various levels of              1999-03-14T20:24:32Z or
+        date-time granularity which are supported, or see                         2000-02-13T21:25:33
+        http://www.w3.org/TR/NOTE-datetime for more info.                         2001-01-12 22:26:34
+  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
+  M$    Microsoft AJAX serialized dates                                           \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
+                                                                                  \/Date(1238606590509+0800)\/
+</pre>
+ *
+ * Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
+ * <pre><code>
+// Sample date:
+// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
+
+var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
+document.write(dt.format('Y-m-d'));                           // 2007-01-10
+document.write(dt.format('F j, Y, g:i a'));                   // January 10, 2007, 3:05 pm
+document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
+</code></pre>
+ *
+ * Here are some standard date/time patterns that you might find helpful.  They
+ * are not part of the source of Date.js, but to use them you can simply copy this
+ * block of code into any script that is included after Date.js and they will also become
+ * globally available on the Date object.  Feel free to add or remove patterns as needed in your code.
+ * <pre><code>
+Date.patterns = {
+    ISO8601Long:"Y-m-d H:i:s",
+    ISO8601Short:"Y-m-d",
+    ShortDate: "n/j/Y",
+    LongDate: "l, F d, Y",
+    FullDateTime: "l, F d, Y g:i:s A",
+    MonthDay: "F d",
+    ShortTime: "g:i A",
+    LongTime: "g:i:s A",
+    SortableDateTime: "Y-m-d\\TH:i:s",
+    UniversalSortableDateTime: "Y-m-d H:i:sO",
+    YearMonth: "F, Y"
+};
+</code></pre>
+ *
+ * Example usage:
+ * <pre><code>
+var dt = new Date();
+document.write(dt.format(Date.patterns.ShortDate));
+</code></pre>
+ * <p>Developer-written, custom formats may be used by supplying both a formatting and a parsing function
+ * which perform to specialized requirements. The functions are stored in {@link #parseFunctions} and {@link #formatFunctions}.</p>
+ */
+
+/*
+ * Most of the date-formatting functions below are the excellent work of Baron Schwartz.
+ * (see http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/)
+ * They generate precompiled functions from format patterns instead of parsing and
+ * processing each pattern every time a date is formatted. These functions are available
+ * on every Date object.
+ */
+
+(function() {
+
+/**
+ * Global flag which determines if strict date parsing should be used.
+ * Strict date parsing will not roll-over invalid dates, which is the
+ * default behaviour of javascript Date objects.
+ * (see {@link #parseDate} for more information)
+ * Defaults to <tt>false</tt>.
+ * @static
+ * @type Boolean
+*/
+Date.useStrict = false;
+
+
+// create private copy of Ext's String.format() method
+// - to remove unnecessary dependency
+// - to resolve namespace conflict with M$-Ajax's implementation
+function xf(format) {
+    var args = Array.prototype.slice.call(arguments, 1);
+    return format.replace(/\{(\d+)\}/g, function(m, i) {
+        return args[i];
+    });
+}
+
+
+// private
+Date.formatCodeToRegex = function(character, currentGroup) {
+    // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below)
+    var p = Date.parseCodes[character];
+
+    if (p) {
+      p = typeof p == 'function'? p() : p;
+      Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
+    }
+
+    return p? Ext.applyIf({
+      c: p.c? xf(p.c, currentGroup || "{0}") : p.c
+    }, p) : {
+        g:0,
+        c:null,
+        s:Ext.escapeRe(character) // treat unrecognised characters as literals
+    }
+}
+
+// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
+var $f = Date.formatCodeToRegex;
+
+Ext.apply(Date, {
+    /**
+     * <p>An object hash in which each property is a date parsing function. The property name is the
+     * format string which that function parses.</p>
+     * <p>This object is automatically populated with date parsing functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom parsing functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #parseDate}.<p>
+     * <p>Example:</p><pre><code>
+Date.parseFunctions['x-date-format'] = myDateParser;
+</code></pre>
+     * <p>A parsing function should return a Date object, and is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : String<div class="sub-desc">The date string to parse.</div></li>
+     * <li><code>strict</code> : Boolean<div class="sub-desc">True to validate date strings while parsing
+     * (i.e. prevent javascript Date "rollover") (The default must be false).
+     * Invalid date strings should return null when parsed.</div></li>
+     * </ul></div></p>
+     * <p>To enable Dates to also be <i>formatted</i> according to that format, a corresponding
+     * formatting function must be placed into the {@link #formatFunctions} property.
+     * @property parseFunctions
+     * @static
+     * @type Object
+     */
+    parseFunctions: {
+        "M$": function(input, strict) {
+            // note: the timezone offset is ignored since the M$ Ajax server sends
+            // a UTC milliseconds-since-Unix-epoch value (negative values are allowed)
+            var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/');
+            var r = (input || '').match(re);
+            return r? new Date(((r[1] || '') + r[2]) * 1) : null;
+        }
+    },
+    parseRegexes: [],
+
+    /**
+     * <p>An object hash in which each property is a date formatting function. The property name is the
+     * format string which corresponds to the produced formatted date string.</p>
+     * <p>This object is automatically populated with date formatting functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom formatting functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #format}. Example:</p><pre><code>
+Date.formatFunctions['x-date-format'] = myDateFormatter;
+</code></pre>
+     * <p>A formatting function should return a string repesentation of the passed Date object:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : Date<div class="sub-desc">The Date to format.</div></li>
+     * </ul></div></p>
+     * <p>To enable date strings to also be <i>parsed</i> according to that format, a corresponding
+     * parsing function must be placed into the {@link #parseFunctions} property.
+     * @property formatFunctions
+     * @static
+     * @type Object
+     */
+    formatFunctions: {
+        "M$": function() {
+            // UTC milliseconds since Unix epoch (M$-AJAX serialized date format (MRSF))
+            return '\\/Date(' + this.getTime() + ')\\/';
+        }
+    },
+
+    y2kYear : 50,
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MILLI : "ms",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    SECOND : "s",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MINUTE : "mi",
+
+    /** Date interval constant
+     * @static
+     * @type String
+     */
+    HOUR : "h",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    DAY : "d",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MONTH : "mo",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    YEAR : "y",
+
+    /**
+     * <p>An object hash containing default date values used during date parsing.</p>
+     * <p>The following properties are available:<div class="mdetail-params"><ul>
+     * <li><code>y</code> : Number<div class="sub-desc">The default year value. (defaults to undefined)</div></li>
+     * <li><code>m</code> : Number<div class="sub-desc">The default 1-based month value. (defaults to undefined)</div></li>
+     * <li><code>d</code> : Number<div class="sub-desc">The default day value. (defaults to undefined)</div></li>
+     * <li><code>h</code> : Number<div class="sub-desc">The default hour value. (defaults to undefined)</div></li>
+     * <li><code>i</code> : Number<div class="sub-desc">The default minute value. (defaults to undefined)</div></li>
+     * <li><code>s</code> : Number<div class="sub-desc">The default second value. (defaults to undefined)</div></li>
+     * <li><code>ms</code> : Number<div class="sub-desc">The default millisecond value. (defaults to undefined)</div></li>
+     * </ul></div></p>
+     * <p>Override these properties to customize the default date values used by the {@link #parseDate} method.</p>
+     * <p><b>Note: In countries which experience Daylight Saving Time (i.e. DST), the <tt>h</tt>, <tt>i</tt>, <tt>s</tt>
+     * and <tt>ms</tt> properties may coincide with the exact time in which DST takes effect.
+     * It is the responsiblity of the developer to account for this.</b></p>
+     * Example Usage:
+     * <pre><code>
+// set default day value to the first day of the month
+Date.defaults.d = 1;
+
+// parse a February date string containing only year and month values.
+// setting the default day value to 1 prevents weird date rollover issues
+// when attempting to parse the following date string on, for example, March 31st 2009.
+Date.parseDate('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
+</code></pre>
+     * @property defaults
+     * @static
+     * @type Object
+     */
+    defaults: {},
+
+    /**
+     * An array of textual day names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.dayNames = [
+    'SundayInYourLang',
+    'MondayInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    dayNames : [
+        "Sunday",
+        "Monday",
+        "Tuesday",
+        "Wednesday",
+        "Thursday",
+        "Friday",
+        "Saturday"
+    ],
+
+    /**
+     * An array of textual month names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNames = [
+    'JanInYourLang',
+    'FebInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    monthNames : [
+        "January",
+        "February",
+        "March",
+        "April",
+        "May",
+        "June",
+        "July",
+        "August",
+        "September",
+        "October",
+        "November",
+        "December"
+    ],
+
+    /**
+     * An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive).
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNumbers = {
+    'ShortJanNameInYourLang':0,
+    'ShortFebNameInYourLang':1,
+    ...
+};
+</code></pre>
+     * @type Object
+     * @static
+     */
+    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
+    },
+
+    /**
+     * Get the short month name for the given month number.
+     * Override this function for international dates.
+     * @param {Number} month A zero-based javascript month number.
+     * @return {String} The short month name.
+     * @static
+     */
+    getShortMonthName : function(month) {
+        return Date.monthNames[month].substring(0, 3);
+    },
+
+    /**
+     * Get the short day name for the given day number.
+     * Override this function for international dates.
+     * @param {Number} day A zero-based javascript day number.
+     * @return {String} The short day name.
+     * @static
+     */
+    getShortDayName : function(day) {
+        return Date.dayNames[day].substring(0, 3);
+    },
+
+    /**
+     * Get the zero-based javascript month number for the given short/full month name.
+     * Override this function for international dates.
+     * @param {String} name The short/full month name.
+     * @return {Number} The zero-based javascript month number.
+     * @static
+     */
+    getMonthNumber : function(name) {
+        // handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive)
+        return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+    },
+
+    /**
+     * The base format-code to formatting-function hashmap used by the {@link #format} method.
+     * Formatting functions are strings (or functions which return strings) which
+     * will return the appropriate value when evaluated in the context of the Date object
+     * from which the {@link #format} method is called.
+     * Add to / override these mappings for custom date formatting.
+     * Note: Date.format() treats characters as literals if an appropriate mapping cannot be found.
+     * Example:
+     * <pre><code>
+Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')";
+(new Date()).format("X"); // returns the current day of the month
+</code></pre>
+     * @type Object
+     * @static
+     */
+    formatCodes : {
+        d: "String.leftPad(this.getDate(), 2, '0')",
+        D: "Date.getShortDayName(this.getDay())", // get localised short day name
+        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())", // get localised short month name
+        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() { // ISO-8601 -- GMT format
+            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)); // treat T as a character literal
+            }
+            return code.join(" + ");
+        },
+        /*
+        c: function() { // ISO-8601 -- UTC format
+            return [
+              "this.getUTCFullYear()", "'-'",
+              "String.leftPad(this.getUTCMonth() + 1, 2, '0')", "'-'",
+              "String.leftPad(this.getUTCDate(), 2, '0')",
+              "'T'",
+              "String.leftPad(this.getUTCHours(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCMinutes(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCSeconds(), 2, '0')",
+              "'Z'"
+            ].join(" + ");
+        },
+        */
+
+        U: "Math.round(this.getTime() / 1000)"
+    },
+
+    /**
+     * Checks if the passed Date parameters will cause a javascript Date "rollover".
+     * @param {Number} year 4-digit year
+     * @param {Number} month 1-based month-of-year
+     * @param {Number} day Day of month
+     * @param {Number} hour (optional) Hour
+     * @param {Number} minute (optional) Minute
+     * @param {Number} second (optional) Second
+     * @param {Number} millisecond (optional) Millisecond
+     * @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise.
+     * @static
+     */
+    isValid : function(y, m, d, h, i, s, ms) {
+        // setup defaults
+        h = h || 0;
+        i = i || 0;
+        s = s || 0;
+        ms = ms || 0;
+
+        var dt = new Date(y, m - 1, d, h, i, s, ms);
+
+        return y == dt.getFullYear() &&
+            m == dt.getMonth() + 1 &&
+            d == dt.getDate() &&
+            h == dt.getHours() &&
+            i == dt.getMinutes() &&
+            s == dt.getSeconds() &&
+            ms == dt.getMilliseconds();
+    },
+
+    /**
+     * Parses the passed string using the specified date format.
+     * Note that this function expects normal calendar dates, meaning that months are 1-based (i.e. 1 = January).
+     * The {@link #defaults} hash will be used for any date value (i.e. year, month, day, hour, minute, second or millisecond)
+     * which cannot be found in the passed string. If a corresponding default date value has not been specified in the {@link #defaults} hash,
+     * the current date's year, month, day or DST-adjusted zero-hour time value will be used instead.
+     * Keep in mind that the input date string must precisely match the specified format string
+     * in order for the parse operation to be successful (failed parse operations return a null value).
+     * <p>Example:</p><pre><code>
+//dt = Fri May 25 2007 (current date)
+var dt = new Date();
+
+//dt = Thu May 25 2006 (today&#39;s month/day in 2006)
+dt = Date.parseDate("2006", "Y");
+
+//dt = Sun Jan 15 2006 (all date parts specified)
+dt = Date.parseDate("2006-01-15", "Y-m-d");
+
+//dt = Sun Jan 15 2006 15:20:01
+dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d g:i:s A");
+
+// attempt to parse Sun Feb 29 2006 03:20:01 in strict mode
+dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
+</code></pre>
+     * @param {String} input The raw date string.
+     * @param {String} format The expected date string format.
+     * @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover")
+                        (defaults to false). Invalid date strings will return null when parsed.
+     * @return {Date} The parsed Date.
+     * @static
+     */
+    parseDate : function(input, format, strict) {
+        var p = Date.parseFunctions;
+        if (p[format] == null) {
+            Date.createParser(format);
+        }
+        return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict);
+    },
+
+    // private
+    getFormatCode : function(character) {
+        var f = Date.formatCodes[character];
+
+        if (f) {
+          f = typeof f == 'function'? f() : f;
+          Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
+        }
+
+        // note: unknown characters are treated as literals
+        return f || ("'" + String.escape(character) + "'");
+    },
+
+    // private
+    createFormat : function(format) {
+        var code = [],
+            special = false,
+            ch = '';
+
+        for (var i = 0; i < format.length; ++i) {
+            ch = format.charAt(i);
+            if (!special && ch == "\\") {
+                special = true;
+            } else if (special) {
+                special = false;
+                code.push("'" + String.escape(ch) + "'");
+            } else {
+                code.push(Date.getFormatCode(ch))
+            }
+        }
+        Date.formatFunctions[format] = new Function("return " + code.join('+'));
+    },
+
+    // private
+    createParser : function() {
+        var code = [
+            "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
+                "def = Date.defaults,",
+                "results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings
+
+            "if(results){",
+                "{1}",
+
+                "if(u != null){", // i.e. unix time is defined
+                    "v = new Date(u * 1000);", // give top priority to UNIX time
+                "}else{",
+                    // create Date object representing midnight of the current day;
+                    // this will provide us with our date defaults
+                    // (note: clearTime() handles Daylight Saving Time automatically)
+                    "dt = (new Date()).clearTime();",
+
+                    // date calculations (note: these calculations create a dependency on Ext.num())
+                    "y = y >= 0? y : Ext.num(def.y, dt.getFullYear());",
+                    "m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());",
+                    "d = d >= 0? d : Ext.num(def.d, dt.getDate());",
+
+                    // time calculations (note: these calculations create a dependency on Ext.num())
+                    "h  = h || Ext.num(def.h, dt.getHours());",
+                    "i  = i || Ext.num(def.i, dt.getMinutes());",
+                    "s  = s || Ext.num(def.s, dt.getSeconds());",
+                    "ms = ms || Ext.num(def.ms, dt.getMilliseconds());",
+
+                    "if(z >= 0 && y >= 0){",
+                        // both the year and zero-based day of year are defined and >= 0.
+                        // these 2 values alone provide sufficient info to create a full date object
+
+                        // create Date object representing January 1st for the given year
+                        "v = new Date(y, 0, 1, h, i, s, ms);",
+
+                        // then add day of year, checking for Date "rollover" if necessary
+                        "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);",
+                    "}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", // check for Date "rollover"
+                        "v = null;", // invalid date, so return null
+                    "}else{",
+                        // plain old Date object
+                        "v = new Date(y, m, d, h, i, s, ms);",
+                    "}",
+                "}",
+            "}",
+
+            "if(v){",
+                // favour UTC offset over GMT offset
+                "if(zz != null){",
+                    // reset to UTC, then add offset
+                    "v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);",
+                "}else if(o){",
+                    // reset to GMT, then add offset
+                    "v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));",
+                "}",
+            "}",
+
+            "return v;"
+        ].join('\n');
+
+        return function(format) {
+            var regexNum = Date.parseRegexes.length,
+                currentGroup = 1,
+                calc = [],
+                regex = [],
+                special = false,
+                ch = "";
+
+            for (var i = 0; i < format.length; ++i) {
+                ch = format.charAt(i);
+                if (!special && ch == "\\") {
+                    special = true;
+                } else if (special) {
+                    special = false;
+                    regex.push(String.escape(ch));
+                } else {
+                    var obj = $f(ch, currentGroup);
+                    currentGroup += obj.g;
+                    regex.push(obj.s);
+                    if (obj.g && obj.c) {
+                        calc.push(obj.c);
+                    }
+                }
+            }
+
+            Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", "i");
+            Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join('')));
+        }
+    }(),
+
+    // private
+    parseCodes : {
+        /*
+         * Notes:
+         * g = {Number} calculation group (0 or 1. only group 1 contributes to date calculations.)
+         * c = {String} calculation method (required for group 1. null for group 0. {0} = currentGroup - position in regex result array)
+         * s = {String} regex pattern. all matches are stored in results[], and are accessible by the calculation mapped to 'c'
+         */
+        d: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // day of month with leading zeroes (01 - 31)
+        },
+        j: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // day of month without leading zeroes (1 - 31)
+        },
+        D: function() {
+            for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get localised short day names
+            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]" // ISO-8601 day number (1 (monday) - 7 (sunday))
+        },
+        S: {
+            g:0,
+            c:null,
+            s:"(?:st|nd|rd|th)"
+        },
+        w: {
+            g:0,
+            c:null,
+            s:"[0-6]" // javascript day number (0 (sunday) - 6 (saturday))
+        },
+        z: {
+            g:1,
+            c:"z = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,3})" // day of the year (0 - 364 (365 in leap years))
+        },
+        W: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // ISO-8601 week number (with leading zero)
+        },
+        F: function() {
+            return {
+                g:1,
+                c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number
+                s:"(" + Date.monthNames.join("|") + ")"
+            }
+        },
+        M: function() {
+            for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names
+            return Ext.applyIf({
+                s:"(" + a.join("|") + ")"
+            }, $f("F"));
+        },
+        m: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{2})" // month number with leading zeros (01 - 12)
+        },
+        n: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{1,2})" // month number without leading zeros (1 - 12)
+        },
+        t: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // no. of days in the month (28 - 31)
+        },
+        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})" // 4-digit year
+        },
+        y: {
+            g:1,
+            c:"var ty = parseInt(results[{0}], 10);\n"
+                + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year
+            s:"(\\d{1,2})"
+        },
+        a: {
+            g:1,
+            c:"if (results[{0}] == 'am') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(am|pm)"
+        },
+        A: {
+            g:1,
+            c:"if (results[{0}] == 'AM') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(AM|PM)"
+        },
+        g: function() {
+            return $f("G");
+        },
+        G: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // 24-hr format of an hour without leading zeroes (0 - 23)
+        },
+        h: function() {
+            return $f("H");
+        },
+        H: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" //  24-hr format of an hour with leading zeroes (00 - 23)
+        },
+        i: {
+            g:1,
+            c:"i = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // minutes with leading zeros (00 - 59)
+        },
+        s: {
+            g:1,
+            c:"s = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // seconds with leading zeros (00 - 59)
+        },
+        u: {
+            g:1,
+            c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
+            s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+        },
+        O: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(3,5) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{4})" // GMT offset in hrs and mins
+        },
+        P: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(4,6) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{2}:\\d{2})" // GMT offset in hrs and mins (with colon separator)
+        },
+        T: {
+            g:0,
+            c:null,
+            s:"[A-Z]{1,4}" // timezone abbrev. may be between 1 - 4 chars
+        },
+        Z: {
+            g:1,
+            c:"zz = results[{0}] * 1;\n" // -43200 <= UTC offset <= 50400
+                  + "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",
+            s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset
+        },
+        c: function() {
+            var calc = [],
+                arr = [
+                    $f("Y", 1), // year
+                    $f("m", 2), // month
+                    $f("d", 3), // day
+                    $f("h", 4), // hour
+                    $f("i", 5), // minute
+                    $f("s", 6), // second
+                    {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+                    {c:[ // allow either "Z" (i.e. UTC) or "-0530" or "+08:00" (i.e. UTC offset) timezone delimiters. assumes local timezone if no timezone is specified
+                        "if(results[8]) {", // timezone specified
+                            "if(results[8] == 'Z'){",
+                                "zz = 0;", // UTC
+                            "}else if (results[8].indexOf(':') > -1){",
+                                $f("P", 8).c, // timezone offset with colon separator
+                            "}else{",
+                                $f("O", 8).c, // timezone offset without colon separator
+                            "}",
+                        "}"
+                    ].join('\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, // year (required)
+                    "(?:", "-", arr[1].s, // month (optional)
+                        "(?:", "-", arr[2].s, // day (optional)
+                            "(?:",
+                                "(?:T| )?", // time delimiter -- either a "T" or a single blank space
+                                arr[3].s, ":", arr[4].s,  // hour AND minute, delimited by a single colon (optional). MUST be preceded by either a "T" or a single blank space
+                                "(?::", arr[5].s, ")?", // seconds (optional)
+                                "(?:(?:\\.|,)(\\d+))?", // decimal fraction of a second (e.g. ",12345" or ".98765") (optional)
+                                "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", // "Z" (UTC) or "-0530" (UTC offset without colon delimiter) or "+08:00" (UTC offset with colon delimiter) (optional)
+                            ")?",
+                        ")?",
+                    ")?"
+                ].join("")
+            }
+        },
+        U: {
+            g:1,
+            c:"u = parseInt(results[{0}], 10);\n",
+            s:"(-?\\d+)" // leading minus sign indicates seconds before UNIX epoch
+        }
+    }
+});
+
+}());
+
+Ext.apply(Date.prototype, {
+    // private
+    dateFormat : function(format) {
+        if (Date.formatFunctions[format] == null) {
+            Date.createFormat(format);
+        }
+        return Date.formatFunctions[format].call(this);
+    },
+
+    /**
+     * Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
+     *
+     * Note: The date string returned by the javascript Date object's toString() method varies
+     * between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
+     * For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
+     * getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
+     * (which may or may not be present), failing which it proceeds to get the timezone abbreviation
+     * from the GMT offset portion of the date string.
+     * @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).
+     */
+    getTimezone : function() {
+        // the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale:
+        //
+        // Opera  : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot
+        // Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF)
+        // FF     : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone
+        // IE     : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev
+        // IE     : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev
+        //
+        // this crazy regex attempts to guess the correct timezone abbreviation despite these differences.
+        // step 1: (?:\((.*)\) -- find timezone in parentheses
+        // step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string
+        // step 3: remove all non uppercase characters found in step 1 and 2
+        return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "");
+    },
+
+    /**
+     * Get the offset from GMT of the current date (equivalent to the format specifier 'O').
+     * @param {Boolean} colon (optional) true to separate the hours and minutes with a colon (defaults to false).
+     * @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600').
+     */
+    getGMTOffset : function(colon) {
+        return (this.getTimezoneOffset() > 0 ? "-" : "+")
+            + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0")
+            + (colon ? ":" : "")
+            + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0");
+    },
+
+    /**
+     * Get the numeric day number of the year, adjusted for leap year.
+     * @return {Number} 0 to 364 (365 in leap years).
+     */
+    getDayOfYear: function() {
+        var i = 0,
+            num = 0,
+            d = this.clone(),
+            m = this.getMonth();
+
+        for (i = 0, d.setMonth(0); i < m; d.setMonth(++i)) {
+            num += d.getDaysInMonth();
+        }
+        return num + this.getDate() - 1;
+    },
+
+    /**
+     * Get the numeric ISO-8601 week number of the year.
+     * (equivalent to the format specifier 'W', but without a leading zero).
+     * @return {Number} 1 to 53
+     */
+    getWeekOfYear : function() {
+        // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
+        var ms1d = 864e5, // milliseconds in a day
+            ms7d = 7 * ms1d; // milliseconds in a week
+
+        return function() { // return a closure so constants get calculated only once
+            var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number
+                AWN = Math.floor(DC3 / 7), // an Absolute Week Number
+                Wyr = new Date(AWN * ms7d).getUTCFullYear();
+
+            return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
+        }
+    }(),
+
+    /**
+     * Checks if the current date falls within a leap year.
+     * @return {Boolean} True if the current date falls within a leap year, false otherwise.
+     */
+    isLeapYear : function() {
+        var year = this.getFullYear();
+        return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
+    },
+
+    /**
+     * Get the first day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getFirstDayOfMonth : function() {
+        var day = (this.getDay() - (this.getDate() - 1)) % 7;
+        return (day < 0) ? (day + 7) : day;
+    },
+
+    /**
+     * Get the last day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getLastDayOfMonth : function() {
+        return this.getLastDateOfMonth().getDay();
+    },
+
+
+    /**
+     * Get the date of the first day of the month in which this date resides.
+     * @return {Date}
+     */
+    getFirstDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), 1);
+    },
+
+    /**
+     * Get the date of the last day of the month in which this date resides.
+     * @return {Date}
+     */
+    getLastDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth());
+    },
+
+    /**
+     * Get the number of days in the current month, adjusted for leap year.
+     * @return {Number} The number of days in the month.
+     */
+    getDaysInMonth: function() {
+        var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+
+        return function() { // return a closure for efficiency
+            var m = this.getMonth();
+
+            return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m];
+        }
+    }(),
+
+    /**
+     * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
+     * @return {String} 'st, 'nd', 'rd' or 'th'.
+     */
+    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";
+        }
+    },
+
+    /**
+     * Creates and returns a new Date instance with the exact same date value as the called instance.
+     * Dates are copied and passed by reference, so if a copied date variable is modified later, the original
+     * variable will also be changed.  When the intention is to create a new variable that will not
+     * modify the original instance, you should create a clone.
+     *
+     * Example of correctly cloning a date:
+     * <pre><code>
+//wrong way:
+var orig = new Date('10/1/2006');
+var copy = orig;
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 05 2006'!
+
+//correct way:
+var orig = new Date('10/1/2006');
+var copy = orig.clone();
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 01 2006'
+</code></pre>
+     * @return {Date} The new Date instance.
+     */
+    clone : function() {
+        return new Date(this.getTime());
+    },
+
+    /**
+     * Checks if the current date is affected by Daylight Saving Time (DST).
+     * @return {Boolean} True if the current date is affected by DST.
+     */
+    isDST : function() {
+        // adapted from http://extjs.com/forum/showthread.php?p=247172#post247172
+        // courtesy of @geoffrey.mcgill
+        return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset();
+    },
+
+    /**
+     * Attempts to clear all time information from this Date by setting the time to midnight of the same day,
+     * automatically adjusting for Daylight Saving Time (DST) where applicable.
+     * (note: DST timezone information for the browser's host operating system is assumed to be up-to-date)
+     * @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false).
+     * @return {Date} this or the clone.
+     */
+    clearTime : function(clone) {
+        if (clone) {
+            return this.clone().clearTime();
+        }
+
+        // get current date before clearing time
+        var d = this.getDate();
+
+        // clear time
+        this.setHours(0);
+        this.setMinutes(0);
+        this.setSeconds(0);
+        this.setMilliseconds(0);
+
+        if (this.getDate() != d) { // account for DST (i.e. day of month changed when setting hour = 0)
+            // note: DST adjustments are assumed to occur in multiples of 1 hour (this is almost always the case)
+            // refer to http://www.timeanddate.com/time/aboutdst.html for the (rare) exceptions to this rule
+
+            // increment hour until cloned date == current date
+            for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr));
+
+            this.setDate(d);
+            this.setHours(c.getHours());
+        }
+
+        return this;
+    },
+
+    /**
+     * Provides a convenient method for performing basic date arithmetic. This method
+     * does not modify the Date instance being called - it creates and returns
+     * a new Date instance containing the resulting date value.
+     *
+     * Examples:
+     * <pre><code>
+// Basic usage:
+var dt = new Date('10/29/2006').add(Date.DAY, 5);
+document.write(dt); //returns 'Fri Nov 03 2006 00:00:00'
+
+// Negative values will be subtracted:
+var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
+document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
+
+// You can even chain several calls together in one line:
+var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
+document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
+</code></pre>
+     *
+     * @param {String} interval A valid date interval enum value.
+     * @param {Number} value The amount to add to the current date.
+     * @return {Date} The new Date instance.
+     */
+    add : function(interval, value) {
+        var d = this.clone();
+        if (!interval || value === 0) return d;
+
+        switch(interval.toLowerCase()) {
+            case Date.MILLI:
+                d.setMilliseconds(this.getMilliseconds() + value);
+                break;
+            case Date.SECOND:
+                d.setSeconds(this.getSeconds() + value);
+                break;
+            case Date.MINUTE:
+                d.setMinutes(this.getMinutes() + value);
+                break;
+            case Date.HOUR:
+                d.setHours(this.getHours() + value);
+                break;
+            case Date.DAY:
+                d.setDate(this.getDate() + value);
+                break;
+            case Date.MONTH:
+                var day = this.getDate();
+                if (day > 28) {
+                    day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate());
+                }
+                d.setDate(day);
+                d.setMonth(this.getMonth() + value);
+                break;
+            case Date.YEAR:
+                d.setFullYear(this.getFullYear() + value);
+                break;
+        }
+        return d;
+    },
+
+    /**
+     * Checks if this date falls on or between the given start and end dates.
+     * @param {Date} start Start date
+     * @param {Date} end End date
+     * @return {Boolean} true if this date falls on or between the given start and end dates.
+     */
+    between : function(start, end) {
+        var t = this.getTime();
+        return start.getTime() <= t && t <= end.getTime();
+    }
+});
+
+
+/**
+ * Formats a date given the supplied format string.
+ * @param {String} format The format string.
+ * @return {String} The formatted date.
+ * @method format
+ */
+Date.prototype.format = Date.prototype.dateFormat;
+
+
+// private
+if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) {
+    Ext.apply(Date.prototype, {
+        _xMonth : Date.prototype.setMonth,
+        _xDate  : Date.prototype.setDate,
+
+        // Bug in Safari 1.3, 2.0 (WebKit build < 420)
+        // Date.setMonth does not work consistently if iMonth is not 0-11
+        setMonth : function(num) {
+            if (num <= -1) {
+                var n = Math.ceil(-num),
+                    back_year = Math.ceil(n / 12),
+                    month = (n % 12) ? 12 - n % 12 : 0;
+
+                this.setFullYear(this.getFullYear() - back_year);
+
+                return this._xMonth(month);
+            } else {
+                return this._xMonth(num);
+            }
+        },
+
+        // Bug in setDate() method (resolved in WebKit build 419.3, so to be safe we target Webkit builds < 420)
+        // The parameter for Date.setDate() is converted to a signed byte integer in Safari
+        // http://brianary.blogspot.com/2006/03/safari-date-bug.html
+        setDate : function(d) {
+            // use setTime() to workaround setDate() bug
+            // subtract current day of month in milliseconds, then add desired day of month in milliseconds
+            return this.setTime(this.getTime() - (this.getDate() - d) * 864e5);
+        }
+    });
+}
+
+
+
+/* Some basic Date tests... (requires Firebug)
+
+Date.parseDate('', 'c'); // call Date.parseDate() once to force computation of regex string so we can console.log() it
+console.log('Insane Regex for "c" format: %o', Date.parseCodes.c.s); // view the insane regex for the "c" format specifier
+
+// standard tests
+console.group('Standard Date.parseDate() Tests');
+    console.log('Date.parseDate("2009-01-05T11:38:56", "c")               = %o', Date.parseDate("2009-01-05T11:38:56", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-02-04T12:37:55.001000", "c")        = %o', Date.parseDate("2009-02-04T12:37:55.001000", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-03-03T13:36:54,101000Z", "c")       = %o', Date.parseDate("2009-03-03T13:36:54,101000Z", "c")); // UTC
+    console.log('Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")   = %o', Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")); // GMT-0530
+    console.log('Date.parseDate("2009-05-01T15:34:52,9876000+08:00", "c") = %o', Date.parseDate("2009-05-01T15:34:52,987600+08:00", "c")); // GMT+08:00
+console.groupEnd();
+
+// ISO-8601 format as specified in http://www.w3.org/TR/NOTE-datetime
+// -- accepts ALL 6 levels of date-time granularity
+console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime)');
+    console.log('Date.parseDate("1997", "c")                              = %o', Date.parseDate("1997", "c")); // YYYY (e.g. 1997)
+    console.log('Date.parseDate("1997-07", "c")                           = %o', Date.parseDate("1997-07", "c")); // YYYY-MM (e.g. 1997-07)
+    console.log('Date.parseDate("1997-07-16", "c")                        = %o', Date.parseDate("1997-07-16", "c")); // YYYY-MM-DD (e.g. 1997-07-16)
+    console.log('Date.parseDate("1997-07-16T19:20+01:00", "c")            = %o', Date.parseDate("1997-07-16T19:20+01:00", "c")); // YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30+01:00", "c")         = %o', Date.parseDate("1997-07-16T19:20:30+01:00", "c")); // YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")); // YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")); // YYYY-MM-DD hh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value
+console.groupEnd();
+
+//*//**
+ * @class Ext.util.DelayedTask
+ * <p> The DelayedTask class provides a convenient way to "buffer" the execution of a method,
+ * performing setTimeout where a new timeout cancels the old timeout. When called, the
+ * task will wait the specified time period before executing. If durng that time period,
+ * the task is called again, the original call will be cancelled. This continues so that
+ * the function is only called a single time for each iteration.</p>
+ * <p>This method is especially useful for things like detecting whether a user has finished
+ * typing in a text field. An example would be performing validation on a keypress. You can
+ * use this class to buffer the keypress events for a certain number of milliseconds, and
+ * perform only if they stop for that amount of time.  Usage:</p><pre><code>
+var task = new Ext.util.DelayedTask(function(){
+    alert(Ext.getDom('myInputField').value.length);
+});
+// Wait 500ms before calling our function. If the user presses another key 
+// during that 500ms, it will be cancelled and we'll wait another 500ms.
+Ext.get('myInputField').on('keypress', function(){
+    task.{@link #delay}(500); 
+});
+ * </code></pre> 
+ * <p>Note that we are using a DelayedTask here to illustrate a point. The configuration
+ * option <tt>buffer</tt> for {@link Ext.util.Observable#addListener addListener/on} will
+ * also setup a delayed task for you to buffer events.</p> 
+ * @constructor The parameters to this constructor serve as defaults and are not required.
+ * @param {Function} fn (optional) The default function to timeout
+ * @param {Object} scope (optional) The default scope of that timeout
+ * @param {Array} args (optional) The default Array of arguments
+ */
+Ext.util.DelayedTask = function(fn, scope, args){
+    var me = this,
+    	id,    	
+    	call = function(){
+    		clearInterval(id);
+	        id = null;
+	        fn.apply(scope, args || []);
+	    };
+	    
+    /**
+     * Cancels any pending timeout and queues a new one
+     * @param {Number} delay The milliseconds to delay
+     * @param {Function} newFn (optional) Overrides function passed to constructor
+     * @param {Object} newScope (optional) Overrides scope passed to constructor
+     * @param {Array} newArgs (optional) Overrides args passed to constructor
+     */
+    me.delay = function(delay, newFn, newScope, newArgs){
+        me.cancel();
+        fn = newFn || fn;
+        scope = newScope || scope;
+        args = newArgs || args;
+        id = setInterval(call, delay);
+    };
+
+    /**
+     * Cancel the last queued timeout
+     */
+    me.cancel = function(){
+        if(id){
+            clearInterval(id);
+            id = null;
+        }
+    };
+};/**
+ * @class Ext.util.MixedCollection
+ * @extends Ext.util.Observable
+ * A Collection class that maintains both numeric indexes and keys and exposes events.
+ * @constructor
+ * @param {Boolean} allowFunctions True if the addAll function should add function references to the
+ * collection (defaults to false)
+ * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection
+ * and return the key value for that item.  This is used when available to look up the key on items that
+ * were passed without an explicit key parameter to a MixedCollection method.  Passing this parameter is
+ * equivalent to providing an implementation for the {@link #getKey} method.
+ */
+Ext.util.MixedCollection = function(allowFunctions, keyFn){
+    this.items = [];
+    this.map = {};
+    this.keys = [];
+    this.length = 0;
+    this.addEvents(
+        /**
+         * @event clear
+         * Fires when the collection is cleared.
+         */
+        "clear",
+        /**
+         * @event add
+         * Fires when an item is added to the collection.
+         * @param {Number} index The index at which the item was added.
+         * @param {Object} o The item added.
+         * @param {String} key The key associated with the added item.
+         */
+        "add",
+        /**
+         * @event replace
+         * Fires when an item is replaced in the collection.
+         * @param {String} key he key associated with the new added.
+         * @param {Object} old The item being replaced.
+         * @param {Object} new The new item.
+         */
+        "replace",
+        /**
+         * @event remove
+         * Fires when an item is removed from the collection.
+         * @param {Object} o The item being removed.
+         * @param {String} key (optional) The key associated with the removed item.
+         */
+        "remove",
+        "sort"
+    );
+    this.allowFunctions = allowFunctions === true;
+    if(keyFn){
+        this.getKey = keyFn;
+    }
+    Ext.util.MixedCollection.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
+    allowFunctions : false,
+
+/**
+ * Adds an item to the collection. Fires the {@link #add} event when complete.
+ * @param {String} key <p>The key to associate with the item, or the new item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
+ * this parameter.</p>
+ * @param {Object} o The item to add.
+ * @return {Object} The item added.
+ */
+    add: function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        if(typeof key != 'undefined' && key !== null){
+            var old = this.map[key];
+            if(typeof old != 'undefined'){
+                return this.replace(key, o);
+            }
+            this.map[key] = o;
+        }
+        this.length++;
+        this.items.push(o);
+        this.keys.push(key);
+        this.fireEvent('add', this.length-1, o, key);
+        return o;
+    },
+
+/**
+  * MixedCollection has a generic way to fetch keys if you implement getKey.  The default implementation
+  * simply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementation
+  * to return a different value as in the following examples:
+<pre><code>
+// normal way
+var mc = new Ext.util.MixedCollection();
+mc.add(someEl.dom.id, someEl);
+mc.add(otherEl.dom.id, otherEl);
+//and so on
+
+// using getKey
+var mc = new Ext.util.MixedCollection();
+mc.getKey = function(el){
+   return el.dom.id;
+};
+mc.add(someEl);
+mc.add(otherEl);
+
+// or via the constructor
+var mc = new Ext.util.MixedCollection(false, function(el){
+   return el.dom.id;
+});
+mc.add(someEl);
+mc.add(otherEl);
+</code></pre>
+ * @param {Object} item The item for which to find the key.
+ * @return {Object} The key for the passed item.
+ */
+    getKey : function(o){
+         return o.id;
+    },
+
+/**
+ * Replaces an item in the collection. Fires the {@link #replace} event when complete.
+ * @param {String} key <p>The key associated with the item to replace, or the replacement item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
+ * with one having the same key value, then just pass the replacement item in this parameter.</p>
+ * @param o {Object} o (optional) If the first parameter passed was a key, the item to associate
+ * with that key.
+ * @return {Object}  The new item.
+ */
+    replace : function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        var old = this.map[key];
+        if(typeof key == "undefined" || key === null || typeof old == "undefined"){
+             return this.add(key, o);
+        }
+        var index = this.indexOfKey(key);
+        this.items[index] = o;
+        this.map[key] = o;
+        this.fireEvent("replace", key, old, o);
+        return o;
+    },
+
+/**
+ * Adds all elements of an Array or an Object to the collection.
+ * @param {Object/Array} objs An Object containing properties which will be added to the collection, or
+ * an Array of values, each of which are added to the collection.
+ */
+    addAll : function(objs){
+        if(arguments.length > 1 || Ext.isArray(objs)){
+            var args = arguments.length > 1 ? arguments : objs;
+            for(var i = 0, len = args.length; i < len; i++){
+                this.add(args[i]);
+            }
+        }else{
+            for(var key in objs){
+                if(this.allowFunctions || typeof objs[key] != "function"){
+                    this.add(key, objs[key]);
+                }
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every item in the collection, passing the following arguments:
+ * <div class="mdetail-params"><ul>
+ * <li><b>item</b> : Mixed<p class="sub-desc">The collection item</p></li>
+ * <li><b>index</b> : Number<p class="sub-desc">The item's index</p></li>
+ * <li><b>length</b> : Number<p class="sub-desc">The total number of items in the collection</p></li>
+ * </ul></div>
+ * The function should return a boolean value. Returning false from the function will stop the iteration.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    each : function(fn, scope){
+        var items = [].concat(this.items); // each safe for removal
+        for(var i = 0, len = items.length; i < len; i++){
+            if(fn.call(scope || items[i], items[i], i, len) === false){
+                break;
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every key in the collection, passing each
+ * key, and its associated item as the first two parameters.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    eachKey : function(fn, scope){
+        for(var i = 0, len = this.keys.length; i < len; i++){
+            fn.call(scope || window, this.keys[i], this.items[i], i, len);
+        }
+    },
+
+    /**
+     * Returns the first item in the collection which elicits a true return value from the
+     * passed selection function.
+     * @param {Function} fn The selection function to execute for each item.
+     * @param {Object} scope (optional) The scope in which to execute the function.
+     * @return {Object} The first item in the collection which returned true from the selection function.
+     */
+    find : function(fn, scope){
+        for(var i = 0, len = this.items.length; i < len; i++){
+            if(fn.call(scope || window, this.items[i], this.keys[i])){
+                return this.items[i];
+            }
+        }
+        return null;
+    },
+
+/**
+ * Inserts an item at the specified index in the collection. Fires the {@link #add} event when complete.
+ * @param {Number} index The index to insert the item at.
+ * @param {String} key The key to associate with the new item, or the item itself.
+ * @param {Object} o (optional) If the second parameter was a key, the new item.
+ * @return {Object} The item inserted.
+ */
+    insert : function(index, key, o){
+        if(arguments.length == 2){
+            o = arguments[1];
+            key = this.getKey(o);
+        }
+        if(this.containsKey(key)){
+            this.suspendEvents();
+            this.removeKey(key);
+            this.resumeEvents();
+        }
+        if(index >= this.length){
+            return this.add(key, o);
+        }
+        this.length++;
+        this.items.splice(index, 0, o);
+        if(typeof key != "undefined" && key !== null){
+            this.map[key] = o;
+        }
+        this.keys.splice(index, 0, key);
+        this.fireEvent("add", index, o, key);
+        return o;
+    },
+
+/**
+ * Remove an item from the collection.
+ * @param {Object} o The item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    remove : function(o){
+        return this.removeAt(this.indexOf(o));
+    },
+
+/**
+ * Remove an item from a specified index in the collection. Fires the {@link #remove} event when complete.
+ * @param {Number} index The index within the collection of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeAt : function(index){
+        if(index < this.length && index >= 0){
+            this.length--;
+            var o = this.items[index];
+            this.items.splice(index, 1);
+            var key = this.keys[index];
+            if(typeof key != "undefined"){
+                delete this.map[key];
+            }
+            this.keys.splice(index, 1);
+            this.fireEvent("remove", o, key);
+            return o;
+        }
+        return false;
+    },
+
+/**
+ * Removed an item associated with the passed key fom the collection.
+ * @param {String} key The key of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeKey : function(key){
+        return this.removeAt(this.indexOfKey(key));
+    },
+
+/**
+ * Returns the number of items in the collection.
+ * @return {Number} the number of items in the collection.
+ */
+    getCount : function(){
+        return this.length;
+    },
+
+/**
+ * Returns index within the collection of the passed Object.
+ * @param {Object} o The item to find the index of.
+ * @return {Number} index of the item. Returns -1 if not found.
+ */
+    indexOf : function(o){
+        return this.items.indexOf(o);
+    },
+
+/**
+ * Returns index within the collection of the passed key.
+ * @param {String} key The key to find the index of.
+ * @return {Number} index of the key.
+ */
+    indexOfKey : function(key){
+        return this.keys.indexOf(key);
+    },
+
+/**
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+    item : function(key){
+        var mk = this.map[key],
+            item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined;
+        return !Ext.isFunction(item) || this.allowFunctions ? item : null; // for prototype!
+    },
+
+/**
+ * Returns the item at the specified index.
+ * @param {Number} index The index of the item.
+ * @return {Object} The item at the specified index.
+ */
+    itemAt : function(index){
+        return this.items[index];
+    },
+
+/**
+ * Returns the item associated with the passed key.
+ * @param {String/Number} key The key of the item.
+ * @return {Object} The item associated with the passed key.
+ */
+    key : function(key){
+        return this.map[key];
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as an item.
+ * @param {Object} o  The Object to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as an item.
+ */
+    contains : function(o){
+        return this.indexOf(o) != -1;
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as a key.
+ * @param {String} key The key to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as a key.
+ */
+    containsKey : function(key){
+        return typeof this.map[key] != "undefined";
+    },
+
+/**
+ * Removes all items from the collection.  Fires the {@link #clear} event when complete.
+ */
+    clear : function(){
+        this.length = 0;
+        this.items = [];
+        this.keys = [];
+        this.map = {};
+        this.fireEvent("clear");
+    },
+
+/**
+ * Returns the first item in the collection.
+ * @return {Object} the first item in the collection..
+ */
+    first : function(){
+        return this.items[0];
+    },
+
+/**
+ * Returns the last item in the collection.
+ * @return {Object} the last item in the collection..
+ */
+    last : function(){
+        return this.items[this.length-1];
+    },
+
+    // private
+    _sort : function(property, dir, fn){
+        var i,
+            len,
+            dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1,
+            c = [], k = this.keys, items = this.items;
+            
+        fn = fn || function(a, b){
+            return a-b;
+        };
+        for(i = 0, len = items.length; i < len; i++){
+            c[c.length] = {key: k[i], value: items[i], index: i};
+        }
+        c.sort(function(a, b){
+            var v = fn(a[property], b[property]) * dsc;
+            if(v === 0){
+                v = (a.index < b.index ? -1 : 1);
+            }
+            return v;
+        });
+        for(i = 0, len = c.length; i < len; i++){
+            items[i] = c[i].value;
+            k[i] = c[i].key;
+        }
+        this.fireEvent("sort", this);
+    },
+
+    /**
+     * Sorts this collection with the passed comparison function
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) comparison function
+     */
+    sort : function(dir, fn){
+        this._sort("value", dir, fn);
+    },
+
+    /**
+     * Sorts this collection by keys
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) a comparison function (defaults to case insensitive string)
+     */
+    keySort : function(dir, fn){
+        this._sort("key", dir, fn || function(a, b){
+            var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase();
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        });
+    },
+
+    /**
+     * Returns a range of items in this collection
+     * @param {Number} startIndex (optional) defaults to 0
+     * @param {Number} endIndex (optional) default to the last item
+     * @return {Array} An array of items
+     */
+    getRange : function(start, end){
+        var items = this.items;
+        if(items.length < 1){
+            return [];
+        }
+        start = start || 0;
+        end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1);
+        var i, r = [];
+        if(start <= end){
+            for(i = start; i <= end; i++) {
+                r[r.length] = items[i];
+            }
+        }else{
+            for(i = start; i >= end; i--) {
+                r[r.length] = items[i];
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Filter the <i>objects</i> in this collection by a specific property.
+     * Returns a new collection that has been filtered.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either string that the property values
+     * should start with or a RegExp to test against the property
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison (defaults to False).
+     * @return {MixedCollection} The new filtered collection
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return this.clone();
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.filterBy(function(o){
+            return o && value.test(o[property]);
+        });
+    },
+
+    /**
+     * Filter by a function. Returns a <i>new</i> collection that has been filtered.
+     * The passed function will be called with each object in the collection.
+     * If the function returns true, the value is included otherwise it is filtered.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key)
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} The new filtered collection
+     */
+    filterBy : function(fn, scope){
+        var r = new Ext.util.MixedCollection();
+        r.getKey = this.getKey;
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                r.add(k[i], it[i]);
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Finds the index of the first matching object in this collection by a specific property/value.
+     * @param {String} property The name of a property on your objects.
+     * @param {String/RegExp} value A string that the property values
+     * should start with or a RegExp to test against the property.
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning.
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison.
+     * @return {Number} The matched index or -1
+     */
+    findIndex : function(property, value, start, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return -1;
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.findIndexBy(function(o){
+            return o && value.test(o[property]);
+        }, null, start);
+    },
+
+    /**
+     * Find the index of the first matching object in this collection by a function.
+     * If the function returns <i>true</i> it is considered a match.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key).
+     * @param {Object} scope (optional) The scope of the function (defaults to this).
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @return {Number} The matched index or -1
+     */
+    findIndexBy : function(fn, scope, start){
+        var k = this.keys, it = this.items;
+        for(var i = (start||0), len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    // private
+    createValueMatcher : function(value, anyMatch, caseSensitive){
+        if(!value.exec){ // not a regex
+            value = String(value);
+            value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i');
+        }
+        return value;
+    },
+
+    /**
+     * Creates a shallow copy of this collection
+     * @return {MixedCollection}
+     */
+    clone : function(){
+        var r = new Ext.util.MixedCollection();
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            r.add(k[i], it[i]);
+        }
+        r.getKey = this.getKey;
+        return r;
+    }
+});
+/**
+ * This method calls {@link #item item()}.
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item;/**
+ * @class Ext.util.JSON
+ * Modified version of Douglas Crockford"s json.js that doesn"t
+ * mess with the Object prototype
+ * http://www.json.org/js.html
+ * @singleton
+ */
+Ext.util.JSON = new (function(){
+    var useHasOwn = !!{}.hasOwnProperty,
+        isNative = function() {
+            var useNative = null;
+
+            return function() {
+                if (useNative === null) {
+                    useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]';
+                }
+        
+                return useNative;
+            };
+        }(),
+        pad = function(n) {
+            return n < 10 ? "0" + n : n;
+        },
+        doDecode = function(json){
+            return eval("(" + json + ')');    
+        },
+        doEncode = function(o){
+            if(typeof o == "undefined" || o === null){
+                return "null";
+            }else if(Ext.isArray(o)){
+                return encodeArray(o);
+            }else if(Object.prototype.toString.apply(o) === '[object Date]'){
+                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(doEncode(i), ":",
+                                    v === null ? "null" : doEncode(v));
+                            b = true;
+                        }
+                    }
+                }
+                a.push("}");
+                return a.join("");
+            }    
+        },
+        m = {
+            "\b": '\\b',
+            "\t": '\\t',
+            "\n": '\\n',
+            "\f": '\\f',
+            "\r": '\\r',
+            '"' : '\\"',
+            "\\": '\\\\'
+        },
+        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 + '"';
+        },
+        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()) + '"';
+    };
+
+    /**
+     * Encodes an Object, Array or other value
+     * @param {Mixed} o The variable to encode
+     * @return {String} The JSON string
+     */
+    this.encode = function() {
+        var ec;
+        return function(o) {
+            if (!ec) {
+                // setup encoding function on first access
+                ec = isNative() ? JSON.stringify : doEncode;
+            }
+            return ec(o);
+        };
+    }();
+
+
+    /**
+     * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.
+     * @param {String} json The JSON string
+     * @return {Object} The resulting object
+     */
+    this.decode = function() {
+        var dc;
+        return function(json) {
+            if (!dc) {
+                // setup decoding function on first access
+                dc = isNative() ? JSON.parse : doDecode;
+            }
+            return dc(json);
+        };
+    }();
+
+})();
+/**
+ * Shorthand for {@link Ext.util.JSON#encode}
+ * @param {Mixed} o The variable to encode
+ * @return {String} The JSON string
+ * @member Ext
+ * @method encode
+ */
+Ext.encode = Ext.util.JSON.encode;
+/**
+ * Shorthand for {@link Ext.util.JSON#decode}
+ * @param {String} json The JSON string
+ * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid.
+ * @return {Object} The resulting object
+ * @member Ext
+ * @method decode
+ */
+Ext.decode = Ext.util.JSON.decode;
+/**
+ * @class Ext.util.Format
+ * Reusable data formatting functions
+ * @singleton
+ */
+Ext.util.Format = function(){
+    var trimRe = /^\s+|\s+$/g;
+    return {
+        /**
+         * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
+         * @param {String} value The string to truncate
+         * @param {Number} length The maximum length to allow before truncating
+         * @param {Boolean} word True to try to find a common work break
+         * @return {String} The converted text
+         */
+        ellipsis : function(value, len, word){
+            if(value && value.length > len){
+                if(word){
+                    var vs = value.substr(0, len - 2);
+                    var index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?'));
+                    if(index == -1 || index < (len - 15)){
+                        return value.substr(0, len - 3) + "...";
+                    }else{
+                        return vs.substr(0, index) + "...";
+                    }
+                } else{
+                    return value.substr(0, len - 3) + "...";
+                }
+            }
+            return value;
+        },
+
+        /**
+         * Checks a reference and converts it to empty string if it is undefined
+         * @param {Mixed} value Reference to check
+         * @return {Mixed} Empty string if converted, otherwise the original value
+         */
+        undef : function(value){
+            return value !== undefined ? value : "";
+        },
+
+        /**
+         * Checks a reference and converts it to the default value if it's empty
+         * @param {Mixed} value Reference to check
+         * @param {String} defaultValue The value to insert of it's undefined (defaults to "")
+         * @return {String}
+         */
+        defaultValue : function(value, defaultValue){
+            return value !== undefined && value !== '' ? value : defaultValue;
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
+         * @param {String} value The string to encode
+         * @return {String} The encoded text
+         */
+        htmlEncode : function(value){
+            return !value ? value : String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') from their HTML character equivalents.
+         * @param {String} value The string to decode
+         * @return {String} The decoded text
+         */
+        htmlDecode : function(value){
+            return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
+        },
+
+        /**
+         * Trims any whitespace from either side of a string
+         * @param {String} value The text to trim
+         * @return {String} The trimmed text
+         */
+        trim : function(value){
+            return String(value).replace(trimRe, "");
+        },
+
+        /**
+         * Returns a substring from within an original string
+         * @param {String} value The original text
+         * @param {Number} start The start index of the substring
+         * @param {Number} length The length of the substring
+         * @return {String} The substring
+         */
+        substr : function(value, start, length){
+            return String(value).substr(start, length);
+        },
+
+        /**
+         * Converts a string to all lower case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        lowercase : function(value){
+            return String(value).toLowerCase();
+        },
+
+        /**
+         * Converts a string to all upper case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        uppercase : function(value){
+            return String(value).toUpperCase();
+        },
+
+        /**
+         * Converts the first character only of a string to upper case
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        capitalize : function(value){
+            return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase();
+        },
+
+        // private
+        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);
+            }
+        },
+
+        /**
+         * Format a number as US currency
+         * @param {Number/String} value The numeric value to format
+         * @return {String} The formatted currency string
+         */
+        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;
+        },
+
+        /**
+         * Parse a value into a formatted date using the specified format pattern.
+         * @param {String/Date} value The value to format (Strings must conform to the format expected by the javascript Date object's <a href="http://www.w3schools.com/jsref/jsref_parse.asp">parse()</a> method)
+         * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y')
+         * @return {String} The formatted date string
+         */
+        date : function(v, format){
+            if(!v){
+                return "";
+            }
+            if(!Ext.isDate(v)){
+                v = new Date(Date.parse(v));
+            }
+            return v.dateFormat(format || "m/d/Y");
+        },
+
+        /**
+         * Returns a date rendering function that can be reused to apply a date format multiple times efficiently
+         * @param {String} format Any valid date format string
+         * @return {Function} The date formatting function
+         */
+        dateRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.date(v, format);
+            };
+        },
+
+        // private
+        stripTagsRE : /<\/?[^>]+>/gi,
+        
+        /**
+         * Strips all HTML tags
+         * @param {Mixed} value The text from which to strip tags
+         * @return {String} The stripped text
+         */
+        stripTags : function(v){
+            return !v ? v : String(v).replace(this.stripTagsRE, "");
+        },
+
+        stripScriptsRe : /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+
+        /**
+         * Strips all script tags
+         * @param {Mixed} value The text from which to strip script tags
+         * @return {String} The stripped text
+         */
+        stripScripts : function(v){
+            return !v ? v : String(v).replace(this.stripScriptsRe, "");
+        },
+
+        /**
+         * Simple format for a file size (xxx bytes, xxx KB, xxx MB)
+         * @param {Number/String} size The numeric value to format
+         * @return {String} The formatted file size
+         */
+        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";
+            }
+        },
+
+        /**
+         * It does simple math for use in a template, for example:<pre><code>
+         * var tpl = new Ext.Template('{value} * 10 = {value:math("* 10")}');
+         * </code></pre>
+         * @return {Function} A function that operates on the passed value.
+         */
+        math : function(){
+            var fns = {};
+            return function(v, a){
+                if(!fns[a]){
+                    fns[a] = new Function('v', 'return v ' + a + ';');
+                }
+                return fns[a](v);
+            }
+        }(),
+
+        /**
+         * Rounds the passed number to the required decimal precision.
+         * @param {Number/String} value The numeric value to round.
+         * @param {Number} precision The number of decimal places to which to round the first parameter's value.
+         * @return {Number} The rounded value.
+         */
+        round : function(value, precision) {
+            var result = Number(value);
+            if (typeof precision == 'number') {
+                precision = Math.pow(10, precision);
+                result = Math.round(value * precision) / precision;
+            }
+            return result;
+        },
+
+        /**
+         * Formats the number according to the format string.
+         * <div style="margin-left:40px">examples (123456.789):
+         * <div style="margin-left:10px">
+         * 0 - (123456) show only digits, no precision<br>
+         * 0.00 - (123456.78) show only digits, 2 precision<br>
+         * 0.0000 - (123456.7890) show only digits, 4 precision<br>
+         * 0,000 - (123,456) show comma and digits, no precision<br>
+         * 0,000.00 - (123,456.78) show comma and digits, 2 precision<br>
+         * 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br>
+         * To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.
+         * For example: 0.000,00/i
+         * </div></div>
+         * @param {Number} v The number to format.
+         * @param {String} format The way you would like to format this text.
+         * @return {String} The formatted number.
+         */
+        number: function(v, format) {
+            if(!format){
+		        return v;
+		    }
+		    v = Ext.num(v, NaN);
+            if (isNaN(v)){
+                return '';
+            }
+		    var comma = ',',
+		        dec = '.',
+		        i18n = false,
+		        neg = v < 0;
+		
+		    v = Math.abs(v);
+		    if(format.substr(format.length - 2) == '/i'){
+		        format = format.substr(0, format.length - 2);
+		        i18n = true;
+		        comma = '.';
+		        dec = ',';
+		    }
+		
+		    var hasComma = format.indexOf(comma) != -1, 
+		        psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec);
+		
+		    if(1 < psplit.length){
+		        v = v.toFixed(psplit[1].length);
+		    }else if(2 < psplit.length){
+		        throw ('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format);
+		    }else{
+		        v = v.toFixed(0);
+		    }
+		
+		    var fnum = v.toString();
+		    if(hasComma){
+		        psplit = fnum.split('.');
+		
+		        var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), n = cnum.length % 3 || 3;
+		
+		        for(var i = 0; i < j; i += n){
+		            if(i != 0){
+		                n = 3;
+		            }
+		            parr[parr.length] = cnum.substr(i, n);
+		            m -= 1;
+		        }
+		        fnum = parr.join(comma);
+		        if(psplit[1]){
+		            fnum += dec + psplit[1];
+		        }
+		    }
+		
+		    return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum);
+        },
+
+        /**
+         * Returns a number rendering function that can be reused to apply a number format multiple times efficiently
+         * @param {String} format Any valid number format string for {@link #number}
+         * @return {Function} The number formatting function
+         */
+        numberRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.number(v, format);
+            };
+        },
+
+        /**
+         * Selectively do a plural form of a word based on a numeric value. For example, in a template,
+         * {commentCount:plural("Comment")}  would result in "1 Comment" if commentCount was 1 or would be "x Comments"
+         * if the value is 0 or greater than 1.
+         * @param {Number} value The value to compare against
+         * @param {String} singular The singular form of the word
+         * @param {String} plural (optional) The plural form of the word (defaults to the singular with an "s")
+         */
+        plural : function(v, s, p){
+            return v +' ' + (v == 1 ? s : (p ? p : s+'s'));
+        },
+        
+        /**
+         * Converts newline characters to the HTML tag &lt;br/>
+         * @param {String} The string value to format.
+         * @return {String} The string with embedded &lt;br/> tags in place of newlines.
+         */
+        nl2br : function(v){
+            return v === undefined || v === null ? '' : v.replace(/\n/g, '<br/>');
+        }
+    }
+}();/**
+ * @class Ext.XTemplate
+ * @extends Ext.Template
+ * <p>A template class that supports advanced functionality like autofilling arrays, conditional processing with
+ * basic comparison operators, sub-templates, basic math function support, special built-in template variables,
+ * inline code execution and more.  XTemplate also provides the templating mechanism built into {@link Ext.DataView}.</p>
+ * <p>XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are
+ * supported in the templates that can be created.  The following examples demonstrate all of the supported features.
+ * This is the data object used for reference in each code example:</p>
+ * <pre><code>
+var data = {
+    name: 'Jack Slocum',
+    title: 'Lead Developer',
+    company: 'Ext JS, LLC',
+    email: 'jack@extjs.com',
+    address: '4 Red Bulls Drive',
+    city: 'Cleveland',
+    state: 'Ohio',
+    zip: '44102',
+    drinks: ['Red Bull', 'Coffee', 'Water'],
+    kids: [{
+        name: 'Sara Grace',
+        age:3
+    },{
+        name: 'Zachary',
+        age:2
+    },{
+        name: 'John James',
+        age:0
+    }]
+};
+ * </code></pre>
+ * <p><b>Auto filling of arrays</b><br/>The <tt>tpl</tt> tag and the <tt>for</tt> operator are used
+ * to process the provided data object. If <tt>for="."</tt> is specified, the data object provided
+ * is examined. If the variable in <tt>for</tt> is an array, it will auto-fill, repeating the template
+ * block inside the <tt>tpl</tt> tag for each item in the array:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Kids: ',
+    '&lt;tpl for=".">',
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data.kids); // pass the kids property of the data object
+ * </code></pre>
+ * <p><b>Scope switching</b><br/>The <tt>for</tt> property can be leveraged to access specified members
+ * of the provided data object to populate the template:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Title: {title}&lt;/p>',
+    '&lt;p>Company: {company}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl <b>for="kids"</b>>', // interrogate the kids property within the data
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+ * </code></pre>
+ * <p><b>Access to parent object from within sub-template scope</b><br/>When processing a sub-template, for example while
+ * looping through a child array, you can access the parent object's members via the <tt>parent</tt> object:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Array item index and basic math support</b> <br/>While processing an array, the special variable <tt>{#}</tt>
+ * will provide the current array index + 1 (starts at 1, not 0). Templates also support the basic math operators
+ * + - * and / that can be applied directly on numeric data values:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{#}: {name}&lt;/p>',  // <-- Auto-number each item
+            '&lt;p>In 5 Years: {age+5}&lt;/p>',  // <-- Basic math
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Auto-rendering of flat arrays</b> <br/>Flat arrays that contain values (and not objects) can be auto-rendered
+ * using the special <tt>{.}</tt> variable inside a loop.  This variable will represent the value of
+ * the array at the current index:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>{name}\'s favorite beverages:&lt;/p>',
+    '&lt;tpl for="drinks">',
+       '&lt;div> - {.}&lt;/div>',
+    '&lt;/tpl>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Basic conditional logic</b> <br/>Using the <tt>tpl</tt> tag and the <tt>if</tt>
+ * operator you can provide conditional checks for deciding whether or not to render specific parts of the template.
+ * Note that there is no <tt>else</tt> operator &mdash; if needed, you should use two opposite <tt>if</tt> statements.
+ * Properly-encoded attributes are required as seen in the following example:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Ability to execute arbitrary inline code</b> <br/>In an XTemplate, anything between {[ ... ]}  is considered
+ * code to be executed in the scope of the template. There are some special variables available in that code:
+ * <ul>
+ * <li><b><tt>values</tt></b>: The values in the current scope. If you are using scope changing sub-templates, you
+ * can change what <tt>values</tt> is.</li>
+ * <li><b><tt>parent</tt></b>: The scope (values) of the ancestor template.</li>
+ * <li><b><tt>xindex</tt></b>: If you are in a looping template, the index of the loop you are in (1-based).</li>
+ * <li><b><tt>xcount</tt></b>: If you are in a looping template, the total length of the array you are looping.</li>
+ * <li><b><tt>fm</tt></b>: An alias for <tt>Ext.util.Format</tt>.</li>
+ * </ul>
+ * This example demonstrates basic row striping using an inline code block and the <tt>xindex</tt> variable:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Company: {[values.company.toUpperCase() + ", " + values.title]}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+       '&lt;div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
+        '{name}',
+        '&lt;/div>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Template member functions</b> <br/>One or more member functions can be defined directly on the config
+ * object passed into the XTemplate constructor for more complex processing:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="this.isGirl(name)">',
+            '&lt;p>Girl: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isGirl(name) == false">',
+            '&lt;p>Boy: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isBaby(age)">',
+            '&lt;p>{name} is a baby!&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>', {
+     isGirl: function(name){
+         return name == 'Sara Grace';
+     },
+     isBaby: function(age){
+        return age < 1;
+     }
+});
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * @constructor
+ * @param {String/Array/Object} parts The HTML fragment or an array of fragments to join(""), or multiple arguments
+ * to join("") that can also include a config object
+ */
+Ext.XTemplate = function(){
+    Ext.XTemplate.superclass.constructor.apply(this, arguments);
+
+    var me = this,
+    	s = me.html,
+    	re = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,
+    	nameRe = /^<tpl\b[^>]*?for="(.*?)"/,
+    	ifRe = /^<tpl\b[^>]*?if="(.*?)"/,
+    	execRe = /^<tpl\b[^>]*?exec="(.*?)"/,
+    	m,
+    	id = 0,
+    	tpls = [],
+    	VALUES = 'values',
+    	PARENT = 'parent',
+    	XINDEX = 'xindex',
+    	XCOUNT = 'xcount',
+    	RETURN = 'return ',
+    	WITHVALUES = 'with(values){ ';
+
+    s = ['<tpl>', s, '</tpl>'].join('');
+
+    while((m = s.match(re))){
+       	var m2 = m[0].match(nameRe),
+			m3 = m[0].match(ifRe),
+       		m4 = m[0].match(execRe),
+       		exp = null,
+       		fn = null,
+       		exec = null,
+       		name = m2 && m2[1] ? m2[1] : '';
+
+       if (m3) {
+           exp = m3 && m3[1] ? m3[1] : null;
+           if(exp){
+               fn = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES + RETURN +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if (m4) {
+           exp = m4 && m4[1] ? m4[1] : null;
+           if(exp){
+               exec = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if(name){
+           switch(name){
+               case '.': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + VALUES + '; }'); break;
+               case '..': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + PARENT + '; }'); break;
+               default: name = new Function(VALUES, PARENT, WITHVALUES + RETURN + name + '; }');
+           }
+       }
+       tpls.push({
+            id: id,
+            target: name,
+            exec: exec,
+            test: fn,
+            body: m[1]||''
+        });
+       s = s.replace(m[0], '{xtpl'+ id + '}');
+       ++id;
+    }
+	Ext.each(tpls, function(t) {
+        me.compileTpl(t);
+    });
+    me.master = tpls[tpls.length-1];
+    me.tpls = tpls;
+};
+Ext.extend(Ext.XTemplate, Ext.Template, {
+    // private
+    re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,
+    // private
+    codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g,
+
+    // private
+    applySubTemplate : function(id, values, parent, xindex, xcount){
+        var me = this,
+        	len,
+        	t = me.tpls[id],
+        	vs,
+        	buf = [];
+        if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) ||
+            (t.exec && t.exec.call(me, values, parent, xindex, xcount))) {
+            return '';
+        }
+        vs = t.target ? t.target.call(me, values, parent) : values;
+        len = vs.length;
+        parent = t.target ? values : parent;
+        if(t.target && Ext.isArray(vs)){
+	        Ext.each(vs, function(v, i) {
+                buf[buf.length] = t.compiled.call(me, v, parent, i+1, len);
+            });
+            return buf.join('');
+        }
+        return t.compiled.call(me, vs, parent, xindex, xcount);
+    },
+
+    // private
+    compileTpl : function(tpl){
+        var fm = Ext.util.Format,
+       		useF = this.disableFormats !== true,
+            sep = Ext.isGecko ? "+" : ",",
+            body;
+
+        function fn(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+"'";
+        }
+
+        function codeFn(m, code){
+            return "'"+ sep +'('+code+')'+sep+"'";
+        }
+
+        // branched to use + in gecko and [].join() in others
+        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;
+    },
+
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+        return this.master.compiled.call(this, values, {}, 1, 1);
+    },
+
+    /**
+     * Compile the template to a function for optimized performance.  Recommended if the template will be used frequently.
+     * @return {Function} The compiled function
+     */
+    compile : function(){return this;}
+
+    /**
+     * @property re
+     * @hide
+     */
+    /**
+     * @property disableFormats
+     * @hide
+     */
+    /**
+     * @method set
+     * @hide
+     */
+
+});
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.XTemplate
+ * @method apply
+ */
+Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.XTemplate.from = function(el){
+    el = Ext.getDom(el);
+    return new Ext.XTemplate(el.value || el.innerHTML);
+};/**
+ * @class Ext.util.CSS
+ * Utility class for manipulating CSS rules
+ * @singleton
+ */
+Ext.util.CSS = function(){
+	var rules = null;
+   	var doc = document;
+
+    var camelRe = /(-[a-z])/gi;
+    var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); };
+
+   return {
+   /**
+    * Creates a stylesheet from a text blob of rules.
+    * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.
+    * @param {String} cssText The text containing the css rules
+    * @param {String} id An id to add to the stylesheet for later removal
+    * @return {StyleSheet}
+    */
+   createStyleSheet : function(cssText, id){
+       var ss;
+       var head = doc.getElementsByTagName("head")[0];
+       var rules = doc.createElement("style");
+       rules.setAttribute("type", "text/css");
+       if(id){
+           rules.setAttribute("id", id);
+       }
+       if(Ext.isIE){
+           head.appendChild(rules);
+           ss = rules.styleSheet;
+           ss.cssText = cssText;
+       }else{
+           try{
+                rules.appendChild(doc.createTextNode(cssText));
+           }catch(e){
+               rules.cssText = cssText;
+           }
+           head.appendChild(rules);
+           ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
+       }
+       this.cacheStyleSheet(ss);
+       return ss;
+   },
+
+   /**
+    * Removes a style or link tag by id
+    * @param {String} id The id of the tag
+    */
+   removeStyleSheet : function(id){
+       var existing = doc.getElementById(id);
+       if(existing){
+           existing.parentNode.removeChild(existing);
+       }
+   },
+
+   /**
+    * Dynamically swaps an existing stylesheet reference for a new one
+    * @param {String} id The id of an existing link tag to remove
+    * @param {String} url The href of the new stylesheet to include
+    */
+   swapStyleSheet : function(id, url){
+       this.removeStyleSheet(id);
+       var ss = doc.createElement("link");
+       ss.setAttribute("rel", "stylesheet");
+       ss.setAttribute("type", "text/css");
+       ss.setAttribute("id", id);
+       ss.setAttribute("href", url);
+       doc.getElementsByTagName("head")[0].appendChild(ss);
+   },
+   
+   /**
+    * Refresh the rule cache if you have dynamically added stylesheets
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   refreshCache : function(){
+       return this.getRules(true);
+   },
+
+   // private
+   cacheStyleSheet : function(ss){
+       if(!rules){
+           rules = {};
+       }
+       try{// try catch for cross domain access issue
+           var ssRules = ss.cssRules || ss.rules;
+           for(var j = ssRules.length-1; j >= 0; --j){
+               rules[ssRules[j].selectorText] = ssRules[j];
+           }
+       }catch(e){}
+   },
+   
+   /**
+    * Gets all css rules for the document
+    * @param {Boolean} refreshCache true to refresh the internal cache
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   getRules : function(refreshCache){
+   		if(rules === null || refreshCache){
+   			rules = {};
+   			var ds = doc.styleSheets;
+   			for(var i =0, len = ds.length; i < len; i++){
+   			    try{
+    		        this.cacheStyleSheet(ds[i]);
+    		    }catch(e){} 
+	        }
+   		}
+   		return rules;
+   	},
+   	
+   	/**
+    * Gets an an individual CSS rule by selector(s)
+    * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned.
+    * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically
+    * @return {CSSRule} The CSS rule or null if one is not found
+    */
+   getRule : function(selector, refreshCache){
+   		var rs = this.getRules(refreshCache);
+   		if(!Ext.isArray(selector)){
+   		    return rs[selector];
+   		}
+   		for(var i = 0; i < selector.length; i++){
+			if(rs[selector[i]]){
+				return rs[selector[i]];
+			}
+		}
+		return null;
+   	},
+   	
+   	
+   	/**
+    * Updates a rule property
+    * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+    * @param {String} property The css property
+    * @param {String} value The new value for the property
+    * @return {Boolean} true If a rule was found and updated
+    */
+   updateRule : function(selector, property, value){
+   		if(!Ext.isArray(selector)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   				rule.style[property.replace(camelRe, camelFn)] = value;
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.updateRule(selector[i], property, value)){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	}
+   };	
+}();/**
+ @class Ext.util.ClickRepeater
+ @extends Ext.util.Observable
+
+ A wrapper class which can be applied to any element. Fires a "click" event while the
+ mouse is pressed. The interval between firings may be specified in the config but
+ defaults to 20 milliseconds.
+
+ Optionally, a CSS class may be applied to the element during the time it is pressed.
+
+ @cfg {Mixed} el The element to act as a button.
+ @cfg {Number} delay The initial delay before the repeating event begins firing.
+ Similar to an autorepeat key delay.
+ @cfg {Number} interval The interval between firings of the "click" event. Default 20 ms.
+ @cfg {String} pressClass A CSS class name to be applied to the element while pressed.
+ @cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate.
+           "interval" and "delay" are ignored.
+ @cfg {Boolean} preventDefault True to prevent the default click event
+ @cfg {Boolean} stopDefault True to stop the default click event
+
+ @history
+    2007-02-02 jvs Original code contributed by Nige "Animal" White
+    2007-02-02 jvs Renamed to ClickRepeater
+    2007-02-03 jvs Modifications for FF Mac and Safari
+
+ @constructor
+ @param {Mixed} el The element to listen on
+ @param {Object} config
+ */
+Ext.util.ClickRepeater = function(el, config)
+{
+    this.el = Ext.get(el);
+    this.el.unselectable();
+
+    Ext.apply(this, config);
+
+    this.addEvents(
+    /**
+     * @event mousedown
+     * Fires when the mouse button is depressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mousedown",
+    /**
+     * @event click
+     * Fires on a specified interval during the time the element is pressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "click",
+    /**
+     * @event mouseup
+     * Fires when the mouse key is released.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mouseup"
+    );
+
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+
+    // allow inline handler
+    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,
+
+    /**
+     * Enables the repeater and allows events to fire.
+     */
+    enable: function(){
+        if(this.disabled){
+            this.el.on('mousedown', this.handleMouseDown, this);
+            if(this.preventDefault || this.stopDefault){
+                this.el.on('click', this.eventOptions, this);
+            }
+        }
+        this.disabled = false;
+    },
+    
+    /**
+     * Disables the repeater and stops events from firing.
+     */
+    disable: function(/* private */ force){
+        if(force || !this.disabled){
+            clearTimeout(this.timer);
+            if(this.pressClass){
+                this.el.removeClass(this.pressClass);
+            }
+            Ext.getDoc().un('mouseup', this.handleMouseUp, this);
+            this.el.removeAllListeners();
+        }
+        this.disabled = true;
+    },
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled: function(disabled){
+        this[disabled ? 'disable' : 'enable']();    
+    },
+    
+    eventOptions: function(e){
+        if(this.preventDefault){
+            e.preventDefault();
+        }
+        if(this.stopDefault){
+            e.stopEvent();
+        }       
+    },
+    
+    // private
+    destroy : function() {
+        this.disable(true);
+        Ext.destroy(this.el);
+        this.purgeListeners();
+    },
+    
+    // private
+    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);
+
+//      Do not honor delay or interval if acceleration wanted.
+        if (this.accelerate) {
+            this.delay = 400;
+	    }
+        this.timer = this.click.defer(this.delay || this.interval, this);
+    },
+
+    // private
+    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 (t, b, c, d) {
+        return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+    },
+
+    // private
+    handleMouseOut : function(){
+        clearTimeout(this.timer);
+        if(this.pressClass){
+            this.el.removeClass(this.pressClass);
+        }
+        this.el.on("mouseover", this.handleMouseReturn, this);
+    },
+
+    // private
+    handleMouseReturn : function(){
+        this.el.un("mouseover", this.handleMouseReturn, this);
+        if(this.pressClass){
+            this.el.addClass(this.pressClass);
+        }
+        this.click();
+    },
+
+    // private
+    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);
+    }
+});/**
+ * @class Ext.KeyNav
+ * <p>Provides a convenient wrapper for normalized keyboard navigation.  KeyNav allows you to bind
+ * navigation keys to function calls that will get called when the keys are pressed, providing an easy
+ * way to implement custom navigation schemes for any UI component.</p>
+ * <p>The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc,
+ * pageUp, pageDown, del, home, end.  Usage:</p>
+ <pre><code>
+var nav = new Ext.KeyNav("my-element", {
+    "left" : function(e){
+        this.moveLeft(e.ctrlKey);
+    },
+    "right" : function(e){
+        this.moveRight(e.ctrlKey);
+    },
+    "enter" : function(e){
+        this.save();
+    },
+    scope : this
+});
+</code></pre>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config
+ */
+Ext.KeyNav = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+};
+
+Ext.KeyNav.prototype = {
+    /**
+     * @cfg {Boolean} disabled
+     * True to disable this KeyNav instance (defaults to false)
+     */
+    disabled : false,
+    /**
+     * @cfg {String} defaultEventAction
+     * The method to call on the {@link Ext.EventObject} after this KeyNav intercepts a key.  Valid values are
+     * {@link Ext.EventObject#stopEvent}, {@link Ext.EventObject#preventDefault} and
+     * {@link Ext.EventObject#stopPropagation} (defaults to 'stopEvent')
+     */
+    defaultEventAction: "stopEvent",
+    /**
+     * @cfg {Boolean} forceKeyDown
+     * Handle the keydown event instead of keypress (defaults to false).  KeyNav automatically does this for IE since
+     * IE does not propagate special keys on keypress, but setting this to true will force other browsers to also
+     * handle keydown instead of keypress.
+     */
+    forceKeyDown : false,
+
+    // private
+    prepareEvent : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(Ext.isSafari2 && h && k >= 37 && k <= 40){
+            e.stopEvent();
+        }
+    },
+
+    // private
+    relay : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(h && this[h]){
+            if(this.doRelay(e, this[h], h) !== true){
+                e[this.defaultEventAction]();
+            }
+        }
+    },
+
+    // private
+    doRelay : function(e, h, hname){
+        return h.call(this.scope || this, e);
+    },
+
+    // possible handlers
+    enter : false,
+    left : false,
+    right : false,
+    up : false,
+    down : false,
+    tab : false,
+    esc : false,
+    pageUp : false,
+    pageDown : false,
+    del : false,
+    home : false,
+    end : false,
+
+    // quick lookup hash
+    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 this KeyNav
+	 */
+	enable: function(){
+		if(this.disabled){
+            // ie won't do special keys on keypress, no one else will repeat keys with keydown
+            // the EventObject will normalize Safari automatically
+            if(this.isKeydown()){
+                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 this KeyNav
+	 */
+	disable: function(){
+		if(!this.disabled){
+		    if(this.isKeydown()){
+                this.el.un("keydown", this.relay, this);
+            }else{
+                this.el.un("keydown", this.prepareEvent, this);
+                this.el.un("keypress", this.relay, this);
+            }
+		    this.disabled = true;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    },
+    
+    // private
+    isKeydown: function(){
+        return this.forceKeyDown || Ext.EventManager.useKeydown;
+    }
+};
+/**
+ * @class Ext.KeyMap
+ * Handles mapping keys to actions for an element. One key map can be used for multiple actions.
+ * The constructor accepts the same config object as defined by {@link #addBinding}.
+ * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key
+ * combination it will call the function with this signature (if the match is a multi-key
+ * combination the callback will still be called only once): (String key, Ext.EventObject e)
+ * A KeyMap can also handle a string representation of keys.<br />
+ * Usage:
+ <pre><code>
+// map one key by key code
+var map = new Ext.KeyMap("my-element", {
+    key: 13, // or Ext.EventObject.ENTER
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to one action by string
+var map = new Ext.KeyMap("my-element", {
+    key: "a\r\n\t",
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to multiple actions by strings and array of codes
+var map = new Ext.KeyMap("my-element", [
+    {
+        key: [10,13],
+        fn: function(){ alert("Return was pressed"); }
+    }, {
+        key: "abc",
+        fn: function(){ alert('a, b or c was pressed'); }
+    }, {
+        key: "\t",
+        ctrl:true,
+        shift:true,
+        fn: function(){ alert('Control + shift + tab was pressed.'); }
+    }
+]);
+</code></pre>
+ * <b>Note: A KeyMap starts enabled</b>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config (see {@link #addBinding})
+ * @param {String} eventName (optional) The event to bind to (defaults to "keydown")
+ */
+Ext.KeyMap = function(el, config, eventName){
+    this.el  = Ext.get(el);
+    this.eventName = eventName || "keydown";
+    this.bindings = [];
+    if(config){
+        this.addBinding(config);
+    }
+    this.enable();
+};
+
+Ext.KeyMap.prototype = {
+    /**
+     * True to stop the event from bubbling and prevent the default browser action if the
+     * key was handled by the KeyMap (defaults to false)
+     * @type Boolean
+     */
+    stopEvent : false,
+
+    /**
+     * Add a new binding to this KeyMap. The following config object properties are supported:
+     * <pre>
+Property    Type             Description
+----------  ---------------  ----------------------------------------------------------------------
+key         String/Array     A single keycode or an array of keycodes to handle
+shift       Boolean          True to handle key only when shift is pressed, False to handle the key only when shift is not pressed (defaults to undefined)
+ctrl        Boolean          True to handle key only when ctrl is pressed, False to handle the key only when ctrl is not pressed (defaults to undefined)
+alt         Boolean          True to handle key only when alt is pressed, False to handle the key only when alt is not pressed (defaults to undefined)
+handler     Function         The function to call when KeyMap finds the expected key combination
+fn          Function         Alias of handler (for backwards-compatibility)
+scope       Object           The scope of the callback function
+stopEvent   Boolean          True to stop the event from bubbling and prevent the default browser action if the key was handled by the KeyMap (defaults to false)
+</pre>
+     *
+     * Usage:
+     * <pre><code>
+// Create a KeyMap
+var map = new Ext.KeyMap(document, {
+    key: Ext.EventObject.ENTER,
+    fn: handleKey,
+    scope: this
+});
+
+//Add a new binding to the existing KeyMap later
+map.addBinding({
+    key: 'abc',
+    shift: true,
+    fn: handleKey,
+    scope: this
+});
+</code></pre>
+     * @param {Object/Array} config A single KeyMap config or an array of configs
+     */
+	addBinding : function(config){
+        if(Ext.isArray(config)){
+            Ext.each(config, function(c){
+                this.addBinding(c);
+            }, this);
+            return;
+        }
+        var keyCode = config.key,
+            fn = config.fn || config.handler,
+            scope = config.scope;
+
+	if (config.stopEvent) {
+	    this.stopEvent = config.stopEvent;    
+	}	
+
+        if(typeof keyCode == "string"){
+            var ks = [];
+            var keyString = keyCode.toUpperCase();
+            for(var j = 0, len = keyString.length; j < len; j++){
+                ks.push(keyString.charCodeAt(j));
+            }
+            keyCode = ks;
+        }
+        var keyArray = Ext.isArray(keyCode);
+        
+        var handler = function(e){
+            if(this.checkModifiers(config, e)){
+                var k = e.getKey();
+                if(keyArray){
+                    for(var i = 0, len = keyCode.length; i < len; i++){
+                        if(keyCode[i] == k){
+                          if(this.stopEvent){
+                              e.stopEvent();
+                          }
+                          fn.call(scope || window, k, e);
+                          return;
+                        }
+                    }
+                }else{
+                    if(k == keyCode){
+                        if(this.stopEvent){
+                           e.stopEvent();
+                        }
+                        fn.call(scope || window, k, e);
+                    }
+                }
+            }
+        };
+        this.bindings.push(handler);
+	},
+    
+    // private
+    checkModifiers: function(config, e){
+        var val, key, keys = ['shift', 'ctrl', 'alt'];
+        for (var i = 0, len = keys.length; i < len; ++i){
+            key = keys[i];
+            val = config[key];
+            if(!(val === undefined || (val === e[key + 'Key']))){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Shorthand for adding a single key listener
+     * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the
+     * following options:
+     * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     */
+    on : function(key, fn, scope){
+        var keyCode, shift, ctrl, alt;
+        if(typeof key == "object" && !Ext.isArray(key)){
+            keyCode = key.key;
+            shift = key.shift;
+            ctrl = key.ctrl;
+            alt = key.alt;
+        }else{
+            keyCode = key;
+        }
+        this.addBinding({
+            key: keyCode,
+            shift: shift,
+            ctrl: ctrl,
+            alt: alt,
+            fn: fn,
+            scope: scope
+        });
+    },
+
+    // private
+    handleKeyDown : function(e){
+	    if(this.enabled){ //just in case
+    	    var b = this.bindings;
+    	    for(var i = 0, len = b.length; i < len; i++){
+    	        b[i].call(this, e);
+    	    }
+	    }
+	},
+
+	/**
+	 * Returns true if this KeyMap is enabled
+	 * @return {Boolean}
+	 */
+	isEnabled : function(){
+	    return this.enabled;
+	},
+
+	/**
+	 * Enables this KeyMap
+	 */
+	enable: function(){
+		if(!this.enabled){
+		    this.el.on(this.eventName, this.handleKeyDown, this);
+		    this.enabled = true;
+		}
+	},
+
+	/**
+	 * Disable this KeyMap
+	 */
+	disable: function(){
+		if(this.enabled){
+		    this.el.removeListener(this.eventName, this.handleKeyDown, this);
+		    this.enabled = false;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    }
+};/**
+ * @class Ext.util.TextMetrics
+ * Provides precise pixel measurements for blocks of text so that you can determine exactly how high and
+ * wide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and
+ * should not contain any HTML, otherwise it may not be measured correctly.
+ * @singleton
+ */
+Ext.util.TextMetrics = function(){
+    var shared;
+    return {
+        /**
+         * Measures the size of the specified text
+         * @param {String/HTMLElement} el The element, dom node or id from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String} text The text to measure
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        measure : function(el, text, fixedWidth){
+            if(!shared){
+                shared = Ext.util.TextMetrics.Instance(el, fixedWidth);
+            }
+            shared.bind(el);
+            shared.setFixedWidth(fixedWidth || 'auto');
+            return shared.getSize(text);
+        },
+
+        /**
+         * Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces
+         * the overhead of multiple calls to initialize the style properties on each measurement.
+         * @param {String/HTMLElement} el The element, dom node or id that the instance will be bound to
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Ext.util.TextMetrics.Instance} instance The new instance
+         */
+        createInstance : function(el, fixedWidth){
+            return Ext.util.TextMetrics.Instance(el, fixedWidth);
+        }
+    };
+}();
+
+Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
+    var ml = new Ext.Element(document.createElement('div'));
+    document.body.appendChild(ml.dom);
+    ml.position('absolute');
+    ml.setLeftTop(-1000, -1000);
+    ml.hide();
+
+    if(fixedWidth){
+        ml.setWidth(fixedWidth);
+    }
+
+    var instance = {
+        /**
+         * Returns the size of the specified text based on the internal element's style and width properties
+         * @param {String} text The text to measure
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        getSize : function(text){
+            ml.update(text);
+            var s = ml.getSize();
+            ml.update('');
+            return s;
+        },
+
+        /**
+         * Binds this TextMetrics instance to an element from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String/HTMLElement} el The element, dom node or id
+         */
+        bind : function(el){
+            ml.setStyle(
+                Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing')
+            );
+        },
+
+        /**
+         * Sets a fixed width on the internal measurement element.  If the text will be multiline, you have
+         * to set a fixed width in order to accurately measure the text height.
+         * @param {Number} width The width to set on the element
+         */
+        setFixedWidth : function(width){
+            ml.setWidth(width);
+        },
+
+        /**
+         * Returns the measured width of the specified text
+         * @param {String} text The text to measure
+         * @return {Number} width The width in pixels
+         */
+        getWidth : function(text){
+            ml.dom.style.width = 'auto';
+            return this.getSize(text).width;
+        },
+
+        /**
+         * Returns the measured height of the specified text.  For multiline text, be sure to call
+         * {@link #setFixedWidth} if necessary.
+         * @param {String} text The text to measure
+         * @return {Number} height The height in pixels
+         */
+        getHeight : function(text){
+            return this.getSize(text).height;
+        }
+    };
+
+    instance.bind(bindTo);
+
+    return instance;
+};
+
+Ext.Element.addMethods({
+    /**
+     * Returns the width in pixels of the passed text, or the width of the text in this Element.
+     * @param {String} text The text to measure. Defaults to the innerHTML of the element.
+     * @param {Number} min (Optional) The minumum value to return.
+     * @param {Number} max (Optional) The maximum value to return.
+     * @return {Number} The text width in pixels.
+     * @member Ext.Element getTextWidth
+     */
+    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);
+    }
+});
+/**
+ * @class Ext.util.Cookies
+ * Utility class for managing and interacting with cookies.
+ * @singleton
+ */
+Ext.util.Cookies = {
+    /**
+     * Create a cookie with the specified name and value. Additional settings
+     * for the cookie may be optionally specified (for example: expiration,
+     * access restriction, SSL).
+     * @param {Object} name
+     * @param {Object} value
+     * @param {Object} expires (Optional) Specify an expiration date the
+     * cookie is to persist until.  Note that the specified Date object will
+     * be converted to Greenwich Mean Time (GMT). 
+     * @param {String} path (Optional) Setting a path on the cookie restricts
+     * access to pages that match that path. Defaults to all pages (<tt>'/'</tt>). 
+     * @param {String} domain (Optional) Setting a domain restricts access to
+     * pages on a given domain (typically used to allow cookie access across
+     * subdomains). For example, "extjs.com" will create a cookie that can be
+     * accessed from any subdomain of extjs.com, including www.extjs.com,
+     * support.extjs.com, etc.
+     * @param {Boolean} secure (Optional) Specify true to indicate that the cookie
+     * should only be accessible via SSL on a page using the HTTPS protocol.
+     * Defaults to <tt>false</tt>. Note that this will only work if the page
+     * calling this code uses the HTTPS protocol, otherwise the cookie will be
+     * created with default options.
+     */
+    set : function(name, value){
+        var argv = arguments;
+        var argc = arguments.length;
+        var expires = (argc > 2) ? argv[2] : null;
+        var path = (argc > 3) ? argv[3] : '/';
+        var domain = (argc > 4) ? argv[4] : null;
+        var secure = (argc > 5) ? argv[5] : false;
+        document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : "");
+    },
+
+    /**
+     * Retrieves cookies that are accessible by the current page. If a cookie
+     * does not exist, <code>get()</code> returns <tt>null</tt>.  The following
+     * example retrieves the cookie called "valid" and stores the String value
+     * in the variable <tt>validStatus</tt>.
+     * <pre><code>
+     * var validStatus = Ext.util.Cookies.get("valid");
+     * </code></pre>
+     * @param {Object} name The name of the cookie to get
+     * @return {Mixed} Returns the cookie value for the specified name;
+     * null if the cookie name does not exist.
+     */
+    get : function(name){
+        var arg = name + "=";
+        var alen = arg.length;
+        var clen = document.cookie.length;
+        var i = 0;
+        var j = 0;
+        while(i < clen){
+            j = i + alen;
+            if(document.cookie.substring(i, j) == arg){
+                return Ext.util.Cookies.getCookieVal(j);
+            }
+            i = document.cookie.indexOf(" ", i) + 1;
+            if(i === 0){
+                break;
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Removes a cookie with the provided name from the browser
+     * if found.
+     * @param {Object} name The name of the cookie to remove
+     */
+    clear : function(name){
+        if(Ext.util.Cookies.get(name)){
+            document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
+        }
+    },
+    /**
+     * @private
+     */
+    getCookieVal : function(offset){
+        var endstr = document.cookie.indexOf(";", offset);
+        if(endstr == -1){
+            endstr = document.cookie.length;
+        }
+        return unescape(document.cookie.substring(offset, endstr));
+    }
+};/**
+ * Framework-wide error-handler.  Developers can override this method to provide
+ * custom exception-handling.  Framework errors will often extend from the base
+ * Ext.Error class.
+ * @param {Object/Error} e The thrown exception object.
+ */
+Ext.handleError = function(e) {
+    throw e;
+};
+
+/**
+ * @class Ext.Error
+ * @extends Error
+ * <p>A base error class. Future implementations are intended to provide more
+ * robust error handling throughout the framework (<b>in the debug build only</b>)
+ * to check for common errors and problems. The messages issued by this class
+ * will aid error checking. Error checks will be automatically removed in the
+ * production build so that performance is not negatively impacted.</p>
+ * <p>Some sample messages currently implemented:</p><pre>
+"DataProxy attempted to execute an API-action but found an undefined
+url / function. Please review your Proxy url/api-configuration."
+ * </pre><pre>
+"Could not locate your "root" property in your server response.
+Please review your JsonReader config to ensure the config-property
+"root" matches the property your server-response.  See the JsonReader
+docs for additional assistance."
+ * </pre>
+ * <p>An example of the code used for generating error messages:</p><pre><code>
+try {
+    generateError({
+        foo: 'bar'
+    });
+}
+catch (e) {
+    console.error(e);
+}
+function generateError(data) {
+    throw new Ext.Error('foo-error', data);
+}
+ * </code></pre>
+ * @param {String} message
+ */
+Ext.Error = function(message) {
+    // Try to read the message from Ext.Error.lang
+    this.message = (this.lang[message]) ? this.lang[message] : message;
+}
+Ext.Error.prototype = new Error();
+Ext.apply(Ext.Error.prototype, {
+    // protected.  Extensions place their error-strings here.
+    lang: {},
+
+    name: 'Ext.Error',
+    /**
+     * getName
+     * @return {String}
+     */
+    getName : function() {
+        return this.name;
+    },
+    /**
+     * getMessage
+     * @return {String}
+     */
+    getMessage : function() {
+        return this.message;
+    },
+    /**
+     * toJson
+     * @return {String}
+     */
+    toJson : function() {
+        return Ext.encode(this);
+    }
+});
+
+/**
+ * @class Ext.ComponentMgr
+ * <p>Provides a registry of all Components (instances of {@link Ext.Component} or any subclass
+ * thereof) on a page so that they can be easily accessed by {@link Ext.Component component}
+ * {@link Ext.Component#id id} (see {@link #get}, or the convenience method {@link Ext#getCmp Ext.getCmp}).</p>
+ * <p>This object also provides a registry of available Component <i>classes</i>
+ * indexed by a mnemonic code known as the Component's {@link Ext.Component#xtype xtype}.
+ * The <tt>{@link Ext.Component#xtype xtype}</tt> provides a way to avoid instantiating child Components
+ * when creating a full, nested config object for a complete Ext page.</p>
+ * <p>A child Component may be specified simply as a <i>config object</i>
+ * as long as the correct <tt>{@link Ext.Component#xtype xtype}</tt> is specified so that if and when the Component
+ * needs rendering, the correct type can be looked up for lazy instantiation.</p>
+ * <p>For a list of all available <tt>{@link Ext.Component#xtype xtypes}</tt>, see {@link Ext.Component}.</p>
+ * @singleton
+ */
+Ext.ComponentMgr = function(){
+    var all = new Ext.util.MixedCollection();
+    var types = {};
+    var ptypes = {};
+
+    return {
+        /**
+         * Registers a component.
+         * @param {Ext.Component} c The component
+         */
+        register : function(c){
+            all.add(c);
+        },
+
+        /**
+         * Unregisters a component.
+         * @param {Ext.Component} c The component
+         */
+        unregister : function(c){
+            all.remove(c);
+        },
+
+        /**
+         * Returns a component by {@link Ext.Component#id id}.
+         * For additional details see {@link Ext.util.MixedCollection#get}.
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+         */
+        get : function(id){
+            return all.get(id);
+        },
+
+        /**
+         * Registers a function that will be called when a specified component is added to ComponentMgr
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @param {Function} fn The callback function
+         * @param {Object} scope The scope of the callback
+         */
+        onAvailable : function(id, fn, scope){
+            all.on("add", function(index, o){
+                if(o.id == id){
+                    fn.call(scope || o, o);
+                    all.un("add", fn, scope);
+                }
+            });
+        },
+
+        /**
+         * The MixedCollection used internally for the component cache. An example usage may be subscribing to
+         * events on the MixedCollection to monitor addition or removal.  Read-only.
+         * @type {MixedCollection}
+         */
+        all : all,
+        
+        /**
+         * Checks if a Component type is registered.
+         * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up
+         * @return {Boolean} Whether the type is registered.
+         */
+        isRegistered : function(xtype){
+            return types[xtype] !== undefined;    
+        },
+
+        /**
+         * <p>Registers a new Component constructor, keyed by a new
+         * {@link Ext.Component#xtype}.</p>
+         * <p>Use this method (or its alias {@link Ext#reg Ext.reg}) to register new
+         * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying
+         * child Components.
+         * see {@link Ext.Container#items}</p>
+         * @param {String} xtype The mnemonic string by which the Component class may be looked up.
+         * @param {Constructor} cls The new Component class.
+         */
+        registerType : function(xtype, cls){
+            types[xtype] = cls;
+            cls.xtype = xtype;
+        },
+
+        /**
+         * Creates a new Component from the specified config object using the
+         * config object's {@link Ext.component#xtype xtype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Component you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Component type if
+         * the config object does not contain a <tt>xtype</tt>. (Optional if the config contains a <tt>xtype</tt>).
+         * @return {Ext.Component} The newly instantiated Component.
+         */
+        create : function(config, defaultType){
+            return config.render ? config : new types[config.xtype || defaultType](config);
+        },
+
+        /**
+         * <p>Registers a new Plugin constructor, keyed by a new
+         * {@link Ext.Component#ptype}.</p>
+         * <p>Use this method (or its alias {@link Ext#preg Ext.preg}) to register new
+         * plugins for {@link Ext.Component}s so that lazy instantiation may be used when specifying
+         * Plugins.</p>
+         * @param {String} ptype The mnemonic string by which the Plugin class may be looked up.
+         * @param {Constructor} cls The new Plugin class.
+         */
+        registerPlugin : function(ptype, cls){
+            ptypes[ptype] = cls;
+            cls.ptype = ptype;
+        },
+
+        /**
+         * Creates a new Plugin from the specified config object using the
+         * config object's {@link Ext.component#ptype ptype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Plugin you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Plugin type if
+         * the config object does not contain a <tt>ptype</tt>. (Optional if the config contains a <tt>ptype</tt>).
+         * @return {Ext.Component} The newly instantiated Plugin.
+         */
+        createPlugin : function(config, defaultType){
+            return new ptypes[config.ptype || defaultType](config);
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerType}
+ * @param {String} xtype The {@link Ext.component#xtype mnemonic string} by which the Component class
+ * may be looked up.
+ * @param {Constructor} cls The new Component class.
+ * @member Ext
+ * @method reg
+ */
+Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerPlugin}
+ * @param {String} ptype The {@link Ext.component#ptype mnemonic string} by which the Plugin class
+ * may be looked up.
+ * @param {Constructor} cls The new Plugin class.
+ * @member Ext
+ * @method preg
+ */
+Ext.preg = Ext.ComponentMgr.registerPlugin;
+Ext.create = Ext.ComponentMgr.create;
+/**
+ * @class Ext.Component
+ * @extends Ext.util.Observable
+ * <p>Base class for all Ext components.  All subclasses of Component may participate in the automated
+ * Ext component lifecycle of creation, rendering and destruction which is provided by the {@link Ext.Container Container} class.
+ * Components may be added to a Container through the {@link Ext.Container#items items} config option at the time the Container is created,
+ * or they may be added dynamically via the {@link Ext.Container#add add} method.</p>
+ * <p>The Component base class has built-in support for basic hide/show and enable/disable behavior.</p>
+ * <p>All Components are registered with the {@link Ext.ComponentMgr} on construction so that they can be referenced at any time via
+ * {@link Ext#getCmp}, passing the {@link #id}.</p>
+ * <p>All user-developed visual widgets that are required to participate in automated lifecycle and size management should subclass Component (or
+ * {@link Ext.BoxComponent} if managed box model handling is required, ie height and width management).</p>
+ * <p>See the <a href="http://extjs.com/learn/Tutorial:Creating_new_UI_controls">Creating new UI controls</a> tutorial for details on how
+ * and to either extend or augment ExtJs base classes to create custom Components.</p>
+ * <p>Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the
+ * xtype like {@link #getXType} and {@link #isXType}. This is the list of all valid xtypes:</p>
+ * <pre>
+xtype            Class
+-------------    ------------------
+box              {@link Ext.BoxComponent}
+button           {@link Ext.Button}
+buttongroup      {@link Ext.ButtonGroup}
+colorpalette     {@link Ext.ColorPalette}
+component        {@link Ext.Component}
+container        {@link Ext.Container}
+cycle            {@link Ext.CycleButton}
+dataview         {@link Ext.DataView}
+datepicker       {@link Ext.DatePicker}
+editor           {@link Ext.Editor}
+editorgrid       {@link Ext.grid.EditorGridPanel}
+flash            {@link Ext.FlashComponent}
+grid             {@link Ext.grid.GridPanel}
+listview         {@link Ext.ListView}
+panel            {@link Ext.Panel}
+progress         {@link Ext.ProgressBar}
+propertygrid     {@link Ext.grid.PropertyGrid}
+slider           {@link Ext.Slider}
+spacer           {@link Ext.Spacer}
+splitbutton      {@link Ext.SplitButton}
+tabpanel         {@link Ext.TabPanel}
+treepanel        {@link Ext.tree.TreePanel}
+viewport         {@link Ext.ViewPort}
+window           {@link Ext.Window}
+
+Toolbar components
+---------------------------------------
+paging           {@link Ext.PagingToolbar}
+toolbar          {@link Ext.Toolbar}
+tbbutton         {@link Ext.Toolbar.Button}        (deprecated; use button)
+tbfill           {@link Ext.Toolbar.Fill}
+tbitem           {@link Ext.Toolbar.Item}
+tbseparator      {@link Ext.Toolbar.Separator}
+tbspacer         {@link Ext.Toolbar.Spacer}
+tbsplit          {@link Ext.Toolbar.SplitButton}   (deprecated; use splitbutton)
+tbtext           {@link Ext.Toolbar.TextItem}
+
+Menu components
+---------------------------------------
+menu             {@link Ext.menu.Menu}
+colormenu        {@link Ext.menu.ColorMenu}
+datemenu         {@link Ext.menu.DateMenu}
+menubaseitem     {@link Ext.menu.BaseItem}
+menucheckitem    {@link Ext.menu.CheckItem}
+menuitem         {@link Ext.menu.Item}
+menuseparator    {@link Ext.menu.Separator}
+menutextitem     {@link Ext.menu.TextItem}
+
+Form components
+---------------------------------------
+form             {@link Ext.FormPanel}
+checkbox         {@link Ext.form.Checkbox}
+checkboxgroup    {@link Ext.form.CheckboxGroup}
+combo            {@link Ext.form.ComboBox}
+datefield        {@link Ext.form.DateField}
+displayfield     {@link Ext.form.DisplayField}
+field            {@link Ext.form.Field}
+fieldset         {@link Ext.form.FieldSet}
+hidden           {@link Ext.form.Hidden}
+htmleditor       {@link Ext.form.HtmlEditor}
+label            {@link Ext.form.Label}
+numberfield      {@link Ext.form.NumberField}
+radio            {@link Ext.form.Radio}
+radiogroup       {@link Ext.form.RadioGroup}
+textarea         {@link Ext.form.TextArea}
+textfield        {@link Ext.form.TextField}
+timefield        {@link Ext.form.TimeField}
+trigger          {@link Ext.form.TriggerField}
+
+Chart components
+---------------------------------------
+chart            {@link Ext.chart.Chart}
+barchart         {@link Ext.chart.BarChart}
+cartesianchart   {@link Ext.chart.CartesianChart}
+columnchart      {@link Ext.chart.ColumnChart}
+linechart        {@link Ext.chart.LineChart}
+piechart         {@link Ext.chart.PieChart}
+
+Store xtypes
+---------------------------------------
+arraystore       {@link Ext.data.ArrayStore}
+directstore      {@link Ext.data.DirectStore}
+groupingstore    {@link Ext.data.GroupingStore}
+jsonstore        {@link Ext.data.JsonStore}
+simplestore      {@link Ext.data.SimpleStore}      (deprecated; use arraystore)
+store            {@link Ext.data.Store}
+xmlstore         {@link Ext.data.XmlStore}
+</pre>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options may be specified as either:
+ * <div class="mdetail-params"><ul>
+ * <li><b>an element</b> :
+ * <p class="sub-desc">it is set as the internal element and its id used as the component id</p></li>
+ * <li><b>a string</b> :
+ * <p class="sub-desc">it is assumed to be the id of an existing element and is used as the component id</p></li>
+ * <li><b>anything else</b> :
+ * <p class="sub-desc">it is assumed to be a standard config object and is applied to the component</p></li>
+ * </ul></div>
+ */
+Ext.Component = function(config){
+    config = config || {};
+    if(config.initialConfig){
+        if(config.isAction){           // actions
+            this.baseAction = config;
+        }
+        config = config.initialConfig; // component cloning / action set up
+    }else if(config.tagName || config.dom || Ext.isString(config)){ // element object
+        config = {applyTo: config, id: config.id || config};
+    }
+
+    /**
+     * This Component's initial configuration specification. Read-only.
+     * @type Object
+     * @property initialConfig
+     */
+    this.initialConfig = config;
+
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event disable
+         * Fires after the component is disabled.
+         * @param {Ext.Component} this
+         */
+        'disable',
+        /**
+         * @event enable
+         * Fires after the component is enabled.
+         * @param {Ext.Component} this
+         */
+        'enable',
+        /**
+         * @event beforeshow
+         * Fires before the component is shown by calling the {@link #show} method.
+         * Return false from an event handler to stop the show.
+         * @param {Ext.Component} this
+         */
+        'beforeshow',
+        /**
+         * @event show
+         * Fires after the component is shown when calling the {@link #show} method.
+         * @param {Ext.Component} this
+         */
+        'show',
+        /**
+         * @event beforehide
+         * Fires before the component is hidden by calling the {@link #hide} method.
+         * Return false from an event handler to stop the hide.
+         * @param {Ext.Component} this
+         */
+        'beforehide',
+        /**
+         * @event hide
+         * Fires after the component is hidden.
+         * Fires after the component is hidden when calling the {@link #hide} method.
+         * @param {Ext.Component} this
+         */
+        'hide',
+        /**
+         * @event beforerender
+         * Fires before the component is {@link #rendered}. Return false from an
+         * event handler to stop the {@link #render}.
+         * @param {Ext.Component} this
+         */
+        'beforerender',
+        /**
+         * @event render
+         * Fires after the component markup is {@link #rendered}.
+         * @param {Ext.Component} this
+         */
+        'render',
+        /**
+         * @event afterrender
+         * <p>Fires after the component rendering is finished.</p>
+         * <p>The afterrender event is fired after this Component has been {@link #rendered}, been postprocesed
+         * by any afterRender method defined for the Component, and, if {@link #stateful}, after state
+         * has been restored.</p>
+         * @param {Ext.Component} this
+         */
+        'afterrender',
+        /**
+         * @event beforedestroy
+         * Fires before the component is {@link #destroy}ed. Return false from an event handler to stop the {@link #destroy}.
+         * @param {Ext.Component} this
+         */
+        'beforedestroy',
+        /**
+         * @event destroy
+         * Fires after the component is {@link #destroy}ed.
+         * @param {Ext.Component} this
+         */
+        'destroy',
+        /**
+         * @event beforestaterestore
+         * Fires before the state of the component is restored. Return false from an event handler to stop the restore.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. If this
+         * event is not vetoed, then the state object is passed to <b><tt>applyState</tt></b>. By default,
+         * that simply copies property values into this Component. The method maybe overriden to
+         * provide custom state restoration.
+         */
+        'beforestaterestore',
+        /**
+         * @event staterestore
+         * Fires after the state of the component is restored.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. This is passed
+         * to <b><tt>applyState</tt></b>. By default, that simply copies property values into this
+         * Component. The method maybe overriden to provide custom state restoration.
+         */
+        'staterestore',
+        /**
+         * @event beforestatesave
+         * Fires before the state of the component is saved to the configured state provider. Return false to stop the save.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        'beforestatesave',
+        /**
+         * @event statesave
+         * Fires after the state of the component is saved to the configured state provider.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        '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 i = 0, len = this.plugins.length; i < len; i++){
+                this.plugins[i] = this.initPlugin(this.plugins[i]);
+            }
+        }else{
+            this.plugins = this.initPlugin(this.plugins);
+        }
+    }
+
+    if(this.stateful !== false){
+        this.initState(config);
+    }
+
+    if(this.applyTo){
+        this.applyToMarkup(this.applyTo);
+        delete this.applyTo;
+    }else if(this.renderTo){
+        this.render(this.renderTo);
+        delete this.renderTo;
+    }
+};
+
+// private
+Ext.Component.AUTO_ID = 1000;
+
+Ext.extend(Ext.Component, Ext.util.Observable, {
+	// Configs below are used for all Components when rendered by FormLayout.
+    /**
+     * @cfg {String} fieldLabel <p>The label text to display next to this Component (defaults to '').</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
+     * has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout manager (e.g.
+     * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>).</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelStyle <p>A CSS style specification string to apply directly to this field's
+     * label.  Defaults to the container's labelStyle value if set (e.g.,
+     * <tt>{@link Ext.layout.FormLayout#labelStyle}</tt> , or '').</p>
+     * <br><p><b>Note</b>: see the note for <code>{@link #clearCls}</code>.</p><br>
+     * <p>Also see <code>{@link #hideLabel}</code> and
+     * <code>{@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</code></p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name',
+        labelStyle: 'font-weight:bold;'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelSeparator <p>The separator to display after the text of each
+     * <tt>{@link #fieldLabel}</tt>.  This property may be configured at various levels.
+     * The order of precedence is:
+     * <div class="mdetail-params"><ul>
+     * <li>field / component level</li>
+     * <li>container level</li>
+     * <li>{@link Ext.layout.FormLayout#labelSeparator layout level} (defaults to colon <tt>':'</tt>)</li>
+     * </ul></div>
+     * To display no separator for this field's label specify empty string ''.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    layoutConfig: {
+        labelSeparator: '~'   // layout config has lowest priority (defaults to ':')
+    },
+    {@link Ext.layout.FormLayout#labelSeparator labelSeparator}: '>>',     // config at container level
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Field 1',
+        labelSeparator: '...' // field/component level config supersedes others
+    },{
+        xtype: 'textfield',
+        fieldLabel: 'Field 2' // labelSeparator will be '='
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideLabel <p><tt>true</tt> to completely hide the label element
+     * ({@link #fieldLabel label} and {@link #labelSeparator separator}). Defaults to <tt>false</tt>.
+     * By default, even if you do not specify a <tt>{@link #fieldLabel}</tt> the space will still be
+     * reserved so that the field will line up with other fields that do have labels.
+     * Setting this to <tt>true</tt> will cause the field to not reserve that space.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield'
+        hideLabel: true
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} clearCls <p>The CSS class used to to apply to the special clearing div rendered
+     * directly after each form field wrapper to provide field clearing (defaults to
+     * <tt>'x-form-clear-left'</tt>).</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container
+     * which has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout
+     * manager (e.g. {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) and either a
+     * <tt>{@link #fieldLabel}</tt> is specified or <tt>isFormField=true</tt> is specified.</p><br>
+     * <p>See {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} also.</p>
+     */
+    /**
+     * @cfg {String} itemCls <p>An additional CSS class to apply to the div wrapping the form item
+     * element of this field.  If supplied, <tt>itemCls</tt> at the <b>field</b> level will override
+     * the default <tt>itemCls</tt> supplied at the <b>container</b> level. The value specified for
+     * <tt>itemCls</tt> will be added to the default class (<tt>'x-form-item'</tt>).</p>
+     * <p>Since it is applied to the item wrapper (see
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}), it allows
+     * you to write standard CSS rules that can apply to the field, the label (if specified), or
+     * any other element within the markup for the field.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #fieldLabel}</tt>.</p><br>
+     * Example use:<pre><code>
+// Apply a style to the field's label:
+&lt;style>
+    .required .x-form-item-label {font-weight:bold;color:red;}
+&lt;/style>
+
+new Ext.FormPanel({
+	height: 100,
+	renderTo: Ext.getBody(),
+	items: [{
+		xtype: 'textfield',
+		fieldLabel: 'Name',
+		itemCls: 'required' //this label will be styled
+	},{
+		xtype: 'textfield',
+		fieldLabel: 'Favorite Color'
+	}]
+});
+</code></pre>
+     */
+
+	// Configs below are used for all Components when rendered by AnchorLayout.
+    /**
+     * @cfg {String} anchor <p><b>Note</b>: this config is only used when this Component is rendered
+     * by a Container which has been configured to use an <b>{@link Ext.layout.AnchorLayout AnchorLayout}</b>
+     * based layout manager, for example:<div class="mdetail-params"><ul>
+     * <li>{@link Ext.form.FormPanel}</li>
+     * <li>specifying <code>layout: 'anchor' // or 'form', or 'absolute'</code></li>
+     * </ul></div></p>
+     * <p>See {@link Ext.layout.AnchorLayout}.{@link Ext.layout.AnchorLayout#anchor anchor} also.</p>
+     */
+
+    /**
+     * @cfg {String} id
+     * <p>The <b>unique</b> id of this component (defaults to an {@link #getId auto-assigned id}).
+     * You should assign an id if you need to be able to access the component later and you do
+     * not have an object reference available (e.g., using {@link Ext}.{@link Ext#getCmp getCmp}).</p>
+     * <p>Note that this id will also be used as the element id for the containing HTML element
+     * that is rendered to the page for this component. This allows you to write id-based CSS
+     * rules to style the specific instance of this component uniquely, and also to select
+     * sub-elements using this component's id as the parent.</p>
+     * <p><b>Note</b>: to avoid complications imposed by a unique <tt>id</tt> also see
+     * <code>{@link #itemId}</code> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <code>{@link #ownerCt}</code>.</p>
+     */
+    /**
+     * @cfg {String} itemId
+     * <p>An <tt>itemId</tt> can be used as an alternative way to get a reference to a component
+     * when no object reference is available.  Instead of using an <code>{@link #id}</code> with
+     * {@link Ext}.{@link Ext#getCmp getCmp}, use <code>itemId</code> with
+     * {@link Ext.Container}.{@link Ext.Container#getComponent getComponent} which will retrieve
+     * <code>itemId</code>'s or <tt>{@link #id}</tt>'s. Since <code>itemId</code>'s are an index to the
+     * container's internal MixedCollection, the <code>itemId</code> is scoped locally to the container --
+     * avoiding potential conflicts with {@link Ext.ComponentMgr} which requires a <b>unique</b>
+     * <code>{@link #id}</code>.</p>
+     * <pre><code>
+var c = new Ext.Panel({ //
+    {@link Ext.BoxComponent#height height}: 300,
+    {@link #renderTo}: document.body,
+    {@link Ext.Container#layout layout}: 'auto',
+    {@link Ext.Container#items items}: [
+        {
+            itemId: 'p1',
+            {@link Ext.Panel#title title}: 'Panel 1',
+            {@link Ext.BoxComponent#height height}: 150
+        },
+        {
+            itemId: 'p2',
+            {@link Ext.Panel#title title}: 'Panel 2',
+            {@link Ext.BoxComponent#height height}: 150
+        }
+    ]
+})
+p1 = c.{@link Ext.Container#getComponent getComponent}('p1'); // not the same as {@link Ext#getCmp Ext.getCmp()}
+p2 = p1.{@link #ownerCt}.{@link Ext.Container#getComponent getComponent}('p2'); // reference via a sibling
+     * </code></pre>
+     * <p>Also see <tt>{@link #id}</tt> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <tt>{@link #ownerCt}</tt>.</p>
+     */
+    /**
+     * @cfg {String} xtype
+     * The registered <tt>xtype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a child item of a Container is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>xtype</tt> will be looked up at render time up to determine what
+     * type of child Component to create.<br><br>
+     * The predefined xtypes are listed {@link Ext.Component here}.
+     * <br><br>
+     * If you subclass Components to create your own Components, you may register
+     * them using {@link Ext.ComponentMgr#registerType} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} ptype
+     * The registered <tt>ptype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a Plugin is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>ptype</tt> will be looked up at render time up to determine what
+     * type of Plugin to create.<br><br>
+     * If you create your own Plugins, you may register them using
+     * {@link Ext.ComponentMgr#registerPlugin} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} cls
+     * An optional extra CSS class that will be added to this component's Element (defaults to '').  This can be
+     * useful for adding customized styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} overCls
+     * An optional extra CSS class that will be added to this component's Element when the mouse moves
+     * over the Element, and removed when the mouse moves out. (defaults to '').  This can be
+     * useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} style
+     * A custom style specification to be applied to this component's Element.  Should be a valid argument to
+     * {@link Ext.Element#applyStyles}.
+     * <pre><code>
+new Ext.Panel({
+    title: 'Some Title',
+    renderTo: Ext.getBody(),
+    width: 400, height: 300,
+    layout: 'form',
+    items: [{
+        xtype: 'textarea',
+        style: {
+            width: '95%',
+            marginBottom: '10px'
+        }
+    },
+        new Ext.Button({
+            text: 'Send',
+            minWidth: '100',
+            style: {
+                marginBottom: '10px'
+            }
+        })
+    ]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} ctCls
+     * <p>An optional extra CSS class that will be added to this component's container. This can be useful for
+     * adding customized styles to the container or any of its children using standard CSS rules.  See
+     * {@link Ext.layout.ContainerLayout}.{@link Ext.layout.ContainerLayout#extraCls extraCls} also.</p>
+     * <p><b>Note</b>: <tt>ctCls</tt> defaults to <tt>''</tt> except for the following class
+     * which assigns a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-layout-ct'</tt></li>
+     * </ul></div>
+     * To configure the above Class with an extra CSS class append to the default.  For example,
+     * for BoxLayout (Hbox and Vbox):<pre><code>
+     * ctCls: 'x-box-layout-ct custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this component disabled (default is false).
+     */
+    disabled : false,
+    /**
+     * @cfg {Boolean} hidden
+     * Render this component hidden (default is false). If <tt>true</tt>, the
+     * {@link #hide} method will be called internally.
+     */
+    hidden : false,
+    /**
+     * @cfg {Object/Array} plugins
+     * An object or array of objects that will provide custom functionality for this component.  The only
+     * requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.
+     * When a component is created, if any plugins are available, the component will call the init method on each
+     * plugin, passing a reference to itself.  Each plugin can then call methods or respond to events on the
+     * component as needed to provide its functionality.
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
+     * that is already present in the document that specifies some structural markup for this
+     * component.</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">When <tt>applyTo</tt> is used, constituent parts of the component can also be specified
+     * by id or CSS class name within the main element, and the component being created may attempt
+     * to create its subcomponents from that markup if applicable.</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * <div class="sub-desc">If applyTo is specified, any value passed for {@link #renderTo} will be ignored and the target
+     * element's parent node will automatically be used as the component's container.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Mixed} renderTo
+     * <p>Specify the id of the element, a DOM element or an existing Element that this component
+     * will be rendered into.</p><div><ul>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">Do <u>not</u> use this option if the Component is to be a child item of
+     * a {@link Ext.Container Container}. It is the responsibility of the
+     * {@link Ext.Container Container}'s {@link Ext.Container#layout layout manager}
+     * to render and manage its child items.</div>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * </ul></li>
+     * </ul></div>
+     * <p>See <tt>{@link #render}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} stateful
+     * <p>A flag which causes the Component to attempt to restore the state of
+     * internal properties from a saved state on startup. The component must have
+     * either a <code>{@link #stateId}</code> or <code>{@link #id}</code> assigned
+     * for state to be managed. Auto-generated ids are not guaranteed to be stable
+     * across page loads and cannot be relied upon to save and restore the same
+     * state for a component.<p>
+     * <p>For state saving to work, the state manager's provider must have been
+     * set to an implementation of {@link Ext.state.Provider} which overrides the
+     * {@link Ext.state.Provider#set set} and {@link Ext.state.Provider#get get}
+     * methods to save and recall name/value pairs. A built-in implementation,
+     * {@link Ext.state.CookieProvider} is available.</p>
+     * <p>To set the state provider for the current page:</p>
+     * <pre><code>
+Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
+    expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
+}));
+     * </code></pre>
+     * <p>A stateful Component attempts to save state when one of the events
+     * listed in the <code>{@link #stateEvents}</code> configuration fires.</p>
+     * <p>To save state, a stateful Component first serializes its state by
+     * calling <b><code>getState</code></b>. By default, this function does
+     * nothing. The developer must provide an implementation which returns an
+     * object hash which represents the Component's restorable state.</p>
+     * <p>The value yielded by getState is passed to {@link Ext.state.Manager#set}
+     * which uses the configured {@link Ext.state.Provider} to save the object
+     * keyed by the Component's <code>{@link stateId}</code>, or, if that is not
+     * specified, its <code>{@link #id}</code>.</p>
+     * <p>During construction, a stateful Component attempts to <i>restore</i>
+     * its state by calling {@link Ext.state.Manager#get} passing the
+     * <code>{@link #stateId}</code>, or, if that is not specified, the
+     * <code>{@link #id}</code>.</p>
+     * <p>The resulting object is passed to <b><code>applyState</code></b>.
+     * The default implementation of <code>applyState</code> simply copies
+     * properties into the object, but a developer may override this to support
+     * more behaviour.</p>
+     * <p>You can perform extra processing on state save and restore by attaching
+     * handlers to the {@link #beforestaterestore}, {@link #staterestore},
+     * {@link #beforestatesave} and {@link #statesave} events.</p>
+     */
+    /**
+     * @cfg {String} stateId
+     * The unique id for this component to use for state management purposes
+     * (defaults to the component id if one was set, otherwise null if the
+     * component is using a generated id).
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Array} stateEvents
+     * <p>An array of events that, when fired, should trigger this component to
+     * save its state (defaults to none). <code>stateEvents</code> may be any type
+     * of event supported by this component, including browser or custom events
+     * (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Mixed} autoEl
+     * <p>A tag name or {@link Ext.DomHelper DomHelper} spec used to create the {@link #getEl Element} which will
+     * encapsulate this Component.</p>
+     * <p>You do not normally need to specify this. For the base classes {@link Ext.Component}, {@link Ext.BoxComponent},
+     * and {@link Ext.Container}, this defaults to <b><tt>'div'</tt></b>. The more complex Ext classes use a more complex
+     * DOM structure created by their own onRender methods.</p>
+     * <p>This is intended to allow the developer to create application-specific utility Components encapsulated by
+     * different DOM elements. Example usage:</p><pre><code>
+{
+    xtype: 'box',
+    autoEl: {
+        tag: 'img',
+        src: 'http://www.example.com/example.jpg'
+    }
+}, {
+    xtype: 'box',
+    autoEl: {
+        tag: 'blockquote',
+        html: 'autoEl is cool!'
+    }
+}, {
+    xtype: 'container',
+    autoEl: 'ul',
+    cls: 'ux-unordered-list',
+    items: {
+        xtype: 'box',
+        autoEl: 'li',
+        html: 'First list item'
+    }
+}
+</code></pre>
+     */
+    autoEl : 'div',
+
+    /**
+     * @cfg {String} disabledClass
+     * CSS class added to the component when it is disabled (defaults to 'x-item-disabled').
+     */
+    disabledClass : 'x-item-disabled',
+    /**
+     * @cfg {Boolean} allowDomMove
+     * Whether the component can move the Dom node when rendering (defaults to true).
+     */
+    allowDomMove : true,
+    /**
+     * @cfg {Boolean} autoShow
+     * True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
+     * them on render (defaults to false).
+     */
+    autoShow : false,
+    /**
+     * @cfg {String} hideMode
+     * <p>How this component should be hidden. Supported values are <tt>'visibility'</tt>
+     * (css visibility), <tt>'offsets'</tt> (negative offset position) and <tt>'display'</tt>
+     * (css display).</p>
+     * <br><p><b>Note</b>: the default of <tt>'display'</tt> is generally preferred
+     * since items are automatically laid out when they are first shown (no sizing
+     * is done while hidden).</p>
+     */
+    hideMode : 'display',
+    /**
+     * @cfg {Boolean} hideParent
+     * True to hide and show the component's container when hide/show is called on the component, false to hide
+     * and show the component itself (defaults to false).  For example, this can be used as a shortcut for a hide
+     * button on a window by setting hide:true on the button when adding it to its parent container.
+     */
+    hideParent : false,
+    /**
+     * <p>The {@link Ext.Element} which encapsulates this Component. Read-only.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the <code>{@link #autoEl}</code> config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link Ext.util.Observable#listeners listeners}
+     * config for a suggestion, or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * <p>See also <tt>{@link #getEl getEl}</p>
+     * @type Ext.Element
+     * @property el
+     */
+    /**
+     * The component's owner {@link Ext.Container} (defaults to undefined, and is set automatically when
+     * the component is added to a container).  Read-only.
+     * <p><b>Note</b>: to access items within the container see <tt>{@link #itemId}</tt>.</p>
+     * @type Ext.Container
+     * @property ownerCt
+     */
+    /**
+     * True if this component is hidden. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component is disabled. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component has been rendered. Read-only.
+     * @type Boolean
+     * @property
+     */
+    rendered : false,
+
+    // private
+    ctype : 'Ext.Component',
+
+    // private
+    actionMode : 'el',
+
+    // private
+    getActionEl : function(){
+        return this[this.actionMode];
+    },
+
+    initPlugin : function(p){
+        if(p.ptype && !Ext.isFunction(p.init)){
+            p = Ext.ComponentMgr.createPlugin(p);
+        }else if(Ext.isString(p)){
+            p = Ext.ComponentMgr.createPlugin({
+                ptype: p
+            });
+        }
+        p.init(this);
+        return p;
+    },
+
+    /* // protected
+     * Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default).
+     * <pre><code>
+// Traditional constructor:
+Ext.Foo = function(config){
+    // call superclass constructor:
+    Ext.Foo.superclass.constructor.call(this, config);
+
+    this.addEvents({
+        // add events
+    });
+};
+Ext.extend(Ext.Foo, Ext.Bar, {
+   // class body
+}
+
+// initComponent replaces the constructor:
+Ext.Foo = Ext.extend(Ext.Bar, {
+    initComponent : function(){
+        // call superclass initComponent
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents({
+            // add events
+        });
+    }
+}
+</code></pre>
+     */
+    initComponent : Ext.emptyFn,
+
+    /**
+     * <p>Render this Component into the passed HTML element.</p>
+     * <p><b>If you are using a {@link Ext.Container Container} object to house this Component, then
+     * do not use the render method.</b></p>
+     * <p>A Container's child Components are rendered by that Container's
+     * {@link Ext.Container#layout layout} manager when the Container is first rendered.</p>
+     * <p>Certain layout managers allow dynamic addition of child components. Those that do
+     * include {@link Ext.layout.CardLayout}, {@link Ext.layout.AnchorLayout},
+     * {@link Ext.layout.FormLayout}, {@link Ext.layout.TableLayout}.</p>
+     * <p>If the Container is already rendered when a new child Component is added, you may need to call
+     * the Container's {@link Ext.Container#doLayout doLayout} to refresh the view which causes any
+     * unrendered child Components to be rendered. This is required so that you can add multiple
+     * child components if needed while only refreshing the layout once.</p>
+     * <p>When creating complex UIs, it is important to remember that sizing and positioning
+     * of child items is the responsibility of the Container's {@link Ext.Container#layout layout} manager.
+     * If you expect child items to be sized in response to user interactions, you must
+     * configure the Container with a layout manager which creates and manages the type of layout you
+     * have in mind.</p>
+     * <p><b>Omitting the Container's {@link Ext.Container#layout layout} config means that a basic
+     * layout manager is used which does nothing but render child components sequentially into the
+     * Container. No sizing or positioning will be performed in this situation.</b></p>
+     * @param {Element/HTMLElement/String} container (optional) The element this Component should be
+     * rendered into. If it is being created from existing markup, this should be omitted.
+     * @param {String/Number} position (optional) The element ID or DOM node index within the container <b>before</b>
+     * which this component will be inserted (defaults to appending to the end of the container)
+     */
+    render : function(container, position){
+        if(!this.rendered && this.fireEvent('beforerender', this) !== false){
+            if(!container && this.el){
+                this.el = Ext.get(this.el);
+                container = this.el.dom.parentNode;
+                this.allowDomMove = false;
+            }
+            this.container = Ext.get(container);
+            if(this.ctCls){
+                this.container.addClass(this.ctCls);
+            }
+            this.rendered = true;
+            if(position !== undefined){
+                if(Ext.isNumber(position)){
+                    position = this.container.dom.childNodes[position];
+                }else{
+                    position = Ext.getDom(position);
+                }
+            }
+            this.onRender(this.container, position || 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;
+            }
+            if(this.overCls){
+                this.el.addClassOnOver(this.overCls);
+            }
+            this.fireEvent('render', this);
+            this.afterRender(this.container);
+            if(this.hidden){
+                // call this so we don't fire initial hide events.
+                this.doHide();
+            }
+            if(this.disabled){
+                // pass silent so the event doesn't fire the first time.
+                this.disable(true);
+            }
+
+            if(this.stateful !== false){
+                this.initStateEvents();
+            }
+            this.initRef();
+            this.fireEvent('afterrender', this);
+        }
+        return this;
+    },
+
+    initRef : function(){
+        /**
+         * @cfg {String} ref
+         * <p>A path specification, relative to the Component's {@link #ownerCt} specifying into which
+         * ancestor Container to place a named reference to this Component.</p>
+         * <p>The ancestor axis can be traversed by using '/' characters in the path.
+         * For example, to put a reference to a Toolbar Button into <i>the Panel which owns the Toolbar</i>:</p><pre><code>
+var myGrid = new Ext.grid.EditorGridPanel({
+    title: 'My EditorGridPanel',
+    store: myStore,
+    colModel: myColModel,
+    tbar: [{
+        text: 'Save',
+        handler: saveChanges,
+        disabled: true,
+        ref: '../saveButton'
+    }],
+    listeners: {
+        afteredit: function() {
+//          The button reference is in the GridPanel
+            myGrid.saveButton.enable();
+        }
+    }
+});
+</code></pre>
+         * <p>In the code above, if the ref had been <code>'saveButton'</code> the reference would
+         * have been placed into the Toolbar. Each '/' in the ref moves up one level from the
+         * Component's {@link #ownerCt}.</p>
+         */
+        if(this.ref){
+            var levels = this.ref.split('/');
+            var last = levels.length, i = 0;
+            var t = this;
+            while(i < last){
+                if(t.ownerCt){
+                    t = t.ownerCt;
+                }
+                i++;
+            }
+            t[levels[--i]] = this;
+        }
+    },
+
+    // private
+    initState : function(config){
+        if(Ext.state.Manager){
+            var id = this.getStateId();
+            if(id){
+                var state = Ext.state.Manager.get(id);
+                if(state){
+                    if(this.fireEvent('beforestaterestore', this, state) !== false){
+                        this.applyState(state);
+                        this.fireEvent('staterestore', this, state);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getStateId : function(){
+        return this.stateId || ((this.id.indexOf('ext-comp-') == 0 || this.id.indexOf('ext-gen') == 0) ? null : this.id);
+    },
+
+    // private
+    initStateEvents : function(){
+        if(this.stateEvents){
+            for(var i = 0, e; e = this.stateEvents[i]; i++){
+                this.on(e, this.saveState, this, {delay:100});
+            }
+        }
+    },
+
+    // private
+    applyState : function(state, config){
+        if(state){
+            Ext.apply(this, state);
+        }
+    },
+
+    // private
+    getState : function(){
+        return null;
+    },
+
+    // private
+    saveState : function(){
+        if(Ext.state.Manager && this.stateful !== false){
+            var id = this.getStateId();
+            if(id){
+                var state = this.getState();
+                if(this.fireEvent('beforestatesave', this, state) !== false){
+                    Ext.state.Manager.set(id, state);
+                    this.fireEvent('statesave', this, state);
+                }
+            }
+        }
+    },
+
+    /**
+     * Apply this component to existing markup that is valid. With this function, no call to render() is required.
+     * @param {String/HTMLElement} el
+     */
+    applyToMarkup : function(el){
+        this.allowDomMove = false;
+        this.el = Ext.get(el);
+        this.render(this.el.dom.parentNode);
+    },
+
+    /**
+     * Adds a CSS class to the component's underlying element.
+     * @param {string} cls The CSS class name to add
+     * @return {Ext.Component} this
+     */
+    addClass : function(cls){
+        if(this.el){
+            this.el.addClass(cls);
+        }else{
+            this.cls = this.cls ? this.cls + ' ' + cls : cls;
+        }
+        return this;
+    },
+
+    /**
+     * Removes a CSS class from the component's underlying element.
+     * @param {string} cls The CSS class name to remove
+     * @return {Ext.Component} this
+     */
+    removeClass : function(cls){
+        if(this.el){
+            this.el.removeClass(cls);
+        }else if(this.cls){
+            this.cls = this.cls.split(' ').remove(cls).join(' ');
+        }
+        return this;
+    },
+
+    // private
+    // default function is not really useful
+    onRender : function(ct, position){
+        if(!this.el && this.autoEl){
+            if(Ext.isString(this.autoEl)){
+                this.el = document.createElement(this.autoEl);
+            }else{
+                var div = document.createElement('div');
+                Ext.DomHelper.overwrite(div, this.autoEl);
+                this.el = div.firstChild;
+            }
+            if (!this.el.id) {
+                this.el.id = this.getId();
+            }
+        }
+        if(this.el){
+            this.el = Ext.get(this.el);
+            if(this.allowDomMove !== false){
+                ct.dom.insertBefore(this.el.dom, position);
+            }
+        }
+    },
+
+    // private
+    getAutoCreate : function(){
+        var cfg = Ext.isObject(this.autoCreate) ?
+                      this.autoCreate : Ext.apply({}, this.defaultAutoCreate);
+        if(this.id && !cfg.id){
+            cfg.id = this.id;
+        }
+        return cfg;
+    },
+
+    // private
+    afterRender : Ext.emptyFn,
+
+    /**
+     * Destroys this component by purging any event listeners, removing the component's element from the DOM,
+     * removing the component from its {@link Ext.Container} (if applicable) and unregistering it from
+     * {@link Ext.ComponentMgr}.  Destruction is generally handled automatically by the framework and this method
+     * should usually not need to be called directly.
+     *
+     */
+    destroy : function(){
+        if(this.fireEvent('beforedestroy', this) !== false){
+            this.beforeDestroy();
+            if(this.rendered){
+                this.el.removeAllListeners();
+                this.el.remove();
+                if(this.actionMode == 'container' || this.removeMode == 'container'){
+                    this.container.remove();
+                }
+            }
+            this.onDestroy();
+            Ext.ComponentMgr.unregister(this);
+            this.fireEvent('destroy', this);
+            this.purgeListeners();
+        }
+    },
+
+    // private
+    beforeDestroy : Ext.emptyFn,
+
+    // private
+    onDestroy  : Ext.emptyFn,
+
+    /**
+     * <p>Returns the {@link Ext.Element} which encapsulates this Component.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the {@link #autoEl} config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link #listeners} config for a suggestion,
+     * or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * @return {Ext.Element} The Element which encapsulates this Component.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the <code>id</code> of this component or automatically generates and
+     * returns an <code>id</code> if an <code>id</code> is not defined yet:<pre><code>
+     * 'ext-comp-' + (++Ext.Component.AUTO_ID)
+     * </code></pre>
+     * @return {String} id
+     */
+    getId : function(){
+        return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID));
+    },
+
+    /**
+     * Returns the <code>{@link #itemId}</code> of this component.  If an
+     * <code>{@link #itemId}</code> was not assigned through configuration the
+     * <code>id</code> is returned using <code>{@link #getId}</code>.
+     * @return {String}
+     */
+    getItemId : function(){
+        return this.itemId || this.getId();
+    },
+
+    /**
+     * Try to focus this component.
+     * @param {Boolean} selectText (optional) If applicable, true to also select the text in this component
+     * @param {Boolean/Number} delay (optional) Delay the focus this number of milliseconds (true for 10 milliseconds)
+     * @return {Ext.Component} this
+     */
+    focus : function(selectText, delay){
+        if(delay){
+            this.focus.defer(Ext.isNumber(delay) ? delay : 10, this, [selectText, false]);
+            return;
+        }
+        if(this.rendered){
+            this.el.focus();
+            if(selectText === true){
+                this.el.dom.select();
+            }
+        }
+        return this;
+    },
+
+    // private
+    blur : function(){
+        if(this.rendered){
+            this.el.blur();
+        }
+        return this;
+    },
+
+    /**
+     * Disable this component and fire the 'disable' event.
+     * @return {Ext.Component} this
+     */
+    disable : function(/* private */ silent){
+        if(this.rendered){
+            this.onDisable();
+        }
+        this.disabled = true;
+        if(silent !== true){
+            this.fireEvent('disable', this);
+        }
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        this.getActionEl().addClass(this.disabledClass);
+        this.el.dom.disabled = true;
+    },
+
+    /**
+     * Enable this component and fire the 'enable' event.
+     * @return {Ext.Component} this
+     */
+    enable : function(){
+        if(this.rendered){
+            this.onEnable();
+        }
+        this.disabled = false;
+        this.fireEvent('enable', this);
+        return this;
+    },
+
+    // private
+    onEnable : function(){
+        this.getActionEl().removeClass(this.disabledClass);
+        this.el.dom.disabled = false;
+    },
+
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     * @return {Ext.Component} this
+     */
+    setDisabled : function(disabled){
+        return this[disabled ? 'disable' : 'enable']();
+    },
+
+    /**
+     * Show this component.  Listen to the '{@link #beforeshow}' event and return
+     * <tt>false</tt> to cancel showing the component.  Fires the '{@link #show}'
+     * event after showing the component.
+     * @return {Ext.Component} this
+     */
+    show : function(){
+        if(this.fireEvent('beforeshow', this) !== false){
+            this.hidden = false;
+            if(this.autoRender){
+                this.render(Ext.isBoolean(this.autoRender) ? Ext.getBody() : this.autoRender);
+            }
+            if(this.rendered){
+                this.onShow();
+            }
+            this.fireEvent('show', this);
+        }
+        return this;
+    },
+
+    // private
+    onShow : function(){
+        this.getVisibiltyEl().removeClass('x-hide-' + this.hideMode);
+    },
+
+    /**
+     * Hide this component.  Listen to the '{@link #beforehide}' event and return
+     * <tt>false</tt> to cancel hiding the component.  Fires the '{@link #hide}'
+     * event after hiding the component. Note this method is called internally if
+     * the component is configured to be <code>{@link #hidden}</code>.
+     * @return {Ext.Component} this
+     */
+    hide : function(){
+        if(this.fireEvent('beforehide', this) !== false){
+            this.doHide();
+            this.fireEvent('hide', this);
+        }
+        return this;
+    },
+
+    // private
+    doHide: function(){
+        this.hidden = true;
+        if(this.rendered){
+            this.onHide();
+        }
+    },
+
+    // private
+    onHide : function(){
+        this.getVisibiltyEl().addClass('x-hide-' + this.hideMode);
+    },
+
+    // private
+    getVisibiltyEl : function(){
+        return this.hideParent ? this.container : this.getActionEl();
+    },
+
+    /**
+     * Convenience function to hide or show this component by boolean.
+     * @param {Boolean} visible True to show, false to hide
+     * @return {Ext.Component} this
+     */
+    setVisible : function(visible){
+        return this[visible ? 'show' : 'hide']();
+    },
+
+    /**
+     * Returns true if this component is visible.
+     * @return {Boolean} True if this component is visible, false otherwise.
+     */
+    isVisible : function(){
+        return this.rendered && this.getVisibiltyEl().isVisible();
+    },
+
+    /**
+     * Clone the current component using the original config values passed into this instance by default.
+     * @param {Object} overrides A new config containing any properties to override in the cloned version.
+     * An id property can be passed on this object, otherwise one will be generated to avoid duplicates.
+     * @return {Ext.Component} clone The cloned copy of this component
+     */
+    cloneConfig : function(overrides){
+        overrides = overrides || {};
+        var id = overrides.id || Ext.id();
+        var cfg = Ext.applyIf(overrides, this.initialConfig);
+        cfg.id = id; // prevent dup id
+        return new this.constructor(cfg);
+    },
+
+    /**
+     * Gets the xtype for this component as registered with {@link Ext.ComponentMgr}. For a list of all
+     * available xtypes, see the {@link Ext.Component} header. Example usage:
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXType());  // alerts 'textfield'
+</code></pre>
+     * @return {String} The xtype
+     */
+    getXType : function(){
+        return this.constructor.xtype;
+    },
+
+    /**
+     * <p>Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
+     * from the xtype (default) or whether it is directly of the xtype specified (shallow = true).</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>For a list of all available xtypes, see the {@link Ext.Component} header.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+var isText = t.isXType('textfield');        // true
+var isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
+</code></pre>
+     * @param {String} xtype The xtype to check for this Component
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Boolean} True if this component descends from the specified xtype, false otherwise.
+     */
+    isXType : function(xtype, shallow){
+        //assume a string by default
+        if (Ext.isFunction(xtype)){
+            xtype = xtype.xtype; //handle being passed the class, e.g. Ext.Component
+        }else if (Ext.isObject(xtype)){
+            xtype = xtype.constructor.xtype; //handle being passed an instance
+        }
+
+        return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype;
+    },
+
+    /**
+     * <p>Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all
+     * available xtypes, see the {@link Ext.Component} header.</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXTypes());  // alerts 'component/box/field/textfield'
+</code></pre>
+     * @return {String} The xtype hierarchy string
+     */
+    getXTypes : function(){
+        var tc = this.constructor;
+        if(!tc.xtypes){
+            var c = [], sc = this;
+            while(sc && sc.constructor.xtype){
+                c.unshift(sc.constructor.xtype);
+                sc = sc.constructor.superclass;
+            }
+            tc.xtypeChain = c;
+            tc.xtypes = c.join('/');
+        }
+        return tc.xtypes;
+    },
+
+    /**
+     * Find a container above this component at any level by a custom function. If the passed function returns
+     * true, the container will be returned.
+     * @param {Function} fn The custom function to call with the arguments (container, this component).
+     * @return {Ext.Container} The first Container for which the custom function returns true
+     */
+    findParentBy : function(fn) {
+        for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt);
+        return p || null;
+    },
+
+    /**
+     * Find a container above this component at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @return {Ext.Container} The first Container which matches the given xtype or class
+     */
+    findParentByType : function(xtype) {
+        return Ext.isFunction(xtype) ?
+            this.findParentBy(function(p){
+                return p.constructor === xtype;
+            }) :
+            this.findParentBy(function(p){
+                return p.constructor.xtype === xtype;
+            });
+    },
+
+    getDomPositionEl : function(){
+        return this.getPositionEl ? this.getPositionEl() : this.getEl();
+    },
+
+    // private
+    purgeListeners : function(){
+        Ext.Component.superclass.purgeListeners.call(this);
+        if(this.mons){
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+    },
+
+    // private
+    clearMons : function(){
+        Ext.each(this.mons, function(m){
+            m.item.un(m.ename, m.fn, m.scope);
+        }, this);
+        this.mons = [];
+    },
+
+    // internal function for auto removal of assigned event handlers on destruction
+    mon : function(item, ename, fn, scope, opt){
+        if(!this.mons){
+            this.mons = [];
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+
+        if(Ext.isObject(ename)){
+        	var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+            var o = ename;
+            for(var e in o){
+                if(propRe.test(e)){
+                    continue;
+                }
+                if(Ext.isFunction(o[e])){
+                    // shared options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e], o.scope, o);
+                }else{
+                    // individual options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e]);
+                }
+            }
+            return;
+        }
+
+
+        this.mons.push({
+            item: item, ename: ename, fn: fn, scope: scope
+        });
+        item.on(ename, fn, scope, opt);
+    },
+
+    // protected, opposite of mon
+    mun : function(item, ename, fn, scope){
+        var found, mon;
+        for(var i = 0, len = this.mons.length; i < len; ++i){
+            mon = this.mons[i];
+            if(item === mon.item && ename == mon.ename && fn === mon.fn && scope === mon.scope){
+                this.mons.splice(i, 1);
+                item.un(ename, fn, scope);
+                found = true;
+                break;
+            }
+        }
+        return found;
+    },
+
+    /**
+     * Returns the next component in the owning container
+     * @return Ext.Component
+     */
+    nextSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index != -1 && index+1 < this.ownerCt.items.getCount()){
+                return this.ownerCt.items.itemAt(index+1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Returns the previous component in the owning container
+     * @return Ext.Component
+     */
+    previousSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index > 0){
+                return this.ownerCt.items.itemAt(index-1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy.
+     * @return {Ext.Container} the Container which owns this Component.
+     */
+    getBubbleTarget : function(){
+        return this.ownerCt;
+    }
+});
+
+Ext.reg('component', Ext.Component);
+/**
+ * @class Ext.Action
+ * <p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
+ * can be usefully shared among multiple components.  Actions let you share handlers, configuration options and UI
+ * updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button}
+ * and {@link Ext.menu.Menu} components).</p>
+ * <p>Aside from supporting the config object interface, any component that needs to use Actions must also support
+ * the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),
+ * setDisabled(boolean), setVisible(boolean) and setHandler(function).</p>
+ * Example usage:<br>
+ * <pre><code>
+// Define the shared action.  Each component below will have the same
+// display text and icon, and will display the same message on click.
+var action = new Ext.Action({
+    {@link #text}: 'Do something',
+    {@link #handler}: function(){
+        Ext.Msg.alert('Click', 'You did something.');
+    },
+    {@link #iconCls}: 'do-something',
+    {@link #itemId}: 'myAction'
+});
+
+var panel = new Ext.Panel({
+    title: 'Actions',
+    width: 500,
+    height: 300,
+    tbar: [
+        // Add the action directly to a toolbar as a menu button
+        action,
+        {
+            text: 'Action Menu',
+            // Add the action to a menu as a text item
+            menu: [action]
+        }
+    ],
+    items: [
+        // Add the action to the panel body as a standard button
+        new Ext.Button(action)
+    ],
+    renderTo: Ext.getBody()
+});
+
+// Change the text for all components using the action
+action.setText('Something else');
+
+// Reference an action through a container using the itemId
+var btn = panel.getComponent('myAction');
+var aRef = btn.baseAction;
+aRef.setText('New text');
+</code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.Action = function(config){
+    this.initialConfig = config;
+    this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
+    this.items = [];
+}
+
+Ext.Action.prototype = {
+    /**
+     * @cfg {String} text The text to set for all components using this action (defaults to '').
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon for
+     * all components using this action (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'do-something'
+
+// css class that specifies background image to be used as the icon image:
+.do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} disabled True to disable all components using this action, false to enable them (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} hidden True to hide all components using this action, false to show them (defaults to false).
+     */
+    /**
+     * @cfg {Function} handler The function that will be invoked by each component tied to this action
+     * when the component's primary event is triggered (defaults to undefined).
+     */
+    /**
+     * @cfg {String} itemId
+     * See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.
+     */
+    /**
+     * @cfg {Object} scope The scope in which the {@link #handler} function will execute.
+     */
+
+    // private
+    isAction : true,
+
+    /**
+     * Sets the text to be displayed by all components using this action.
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.initialConfig.text = text;
+        this.callEach('setText', [text]);
+    },
+
+    /**
+     * Gets the text currently displayed by all components using this action.
+     */
+    getText : function(){
+        return this.initialConfig.text;
+    },
+
+    /**
+     * Sets the icon CSS class for all components using this action.  The class should supply
+     * a background image that will be used as the icon image.
+     * @param {String} cls The CSS class supplying the icon image
+     */
+    setIconClass : function(cls){
+        this.initialConfig.iconCls = cls;
+        this.callEach('setIconClass', [cls]);
+    },
+
+    /**
+     * Gets the icon CSS class currently used by all components using this action.
+     */
+    getIconClass : function(){
+        return this.initialConfig.iconCls;
+    },
+
+    /**
+     * Sets the disabled state of all components using this action.  Shortcut method
+     * for {@link #enable} and {@link #disable}.
+     * @param {Boolean} disabled True to disable the component, false to enable it
+     */
+    setDisabled : function(v){
+        this.initialConfig.disabled = v;
+        this.callEach('setDisabled', [v]);
+    },
+
+    /**
+     * Enables all components using this action.
+     */
+    enable : function(){
+        this.setDisabled(false);
+    },
+
+    /**
+     * Disables all components using this action.
+     */
+    disable : function(){
+        this.setDisabled(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently disabled, else returns false.  
+     */
+    isDisabled : function(){
+        return this.initialConfig.disabled;
+    },
+
+    /**
+     * Sets the hidden state of all components using this action.  Shortcut method
+     * for <code>{@link #hide}</code> and <code>{@link #show}</code>.
+     * @param {Boolean} hidden True to hide the component, false to show it
+     */
+    setHidden : function(v){
+        this.initialConfig.hidden = v;
+        this.callEach('setVisible', [!v]);
+    },
+
+    /**
+     * Shows all components using this action.
+     */
+    show : function(){
+        this.setHidden(false);
+    },
+
+    /**
+     * Hides all components using this action.
+     */
+    hide : function(){
+        this.setHidden(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently hidden, else returns false.  
+     */
+    isHidden : function(){
+        return this.initialConfig.hidden;
+    },
+
+    /**
+     * Sets the function that will be called by each component using this action when its primary event is triggered.
+     * @param {Function} fn The function that will be invoked by the action's components.  The function
+     * will be called with no arguments.
+     * @param {Object} scope The scope in which the function will execute
+     */
+    setHandler : function(fn, scope){
+        this.initialConfig.handler = fn;
+        this.initialConfig.scope = scope;
+        this.callEach('setHandler', [fn, scope]);
+    },
+
+    /**
+     * Executes the specified function once for each component currently tied to this action.  The function passed
+     * in should accept a single argument that will be an object that supports the basic Action config/method interface.
+     * @param {Function} fn The function to execute for each component
+     * @param {Object} scope The scope in which the function will execute
+     */
+    each : function(fn, scope){
+        Ext.each(this.items, fn, scope);
+    },
+
+    // private
+    callEach : function(fnName, args){
+        var cs = this.items;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i][fnName].apply(cs[i], args);
+        }
+    },
+
+    // private
+    addComponent : function(comp){
+        this.items.push(comp);
+        comp.on('destroy', this.removeComponent, this);
+    },
+
+    // private
+    removeComponent : function(comp){
+        this.items.remove(comp);
+    },
+
+    /**
+     * Executes this action manually using the handler function specified in the original config object
+     * or the handler function set with <code>{@link #setHandler}</code>.  Any arguments passed to this
+     * function will be passed on to the handler function.
+     * @param {Mixed} arg1 (optional) Variable number of arguments passed to the handler function
+     * @param {Mixed} arg2 (optional)
+     * @param {Mixed} etc... (optional)
+     */
+    execute : function(){
+        this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
+    }
+};
+/**
+ * @class Ext.Layer
+ * @extends Ext.Element
+ * An extended {@link Ext.Element} object that supports a shadow and shim, constrain to viewport and
+ * automatic maintaining of shadow/shim positions.
+ * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true)
+ * @cfg {String/Boolean} shadow True to automatically create an {@link Ext.Shadow}, or a string indicating the
+ * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false)
+ * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: 'div', cls: 'x-layer'}).
+ * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true)
+ * @cfg {String} cls CSS class to add to the element
+ * @cfg {Number} zindex Starting z-index (defaults to 11000)
+ * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 4)
+ * @cfg {Boolean} useDisplay
+ * Defaults to use css offsets to hide the Layer. Specify <tt>true</tt>
+ * to use css style <tt>'display:none;'</tt> to hide the Layer.
+ * @constructor
+ * @param {Object} config An object with config options.
+ * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it.
+ */
+(function(){
+Ext.Layer = function(config, existingEl){
+    config = config || {};
+    var dh = Ext.DomHelper;
+    var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body;
+    if(existingEl){
+        this.dom = Ext.getDom(existingEl);
+    }
+    if(!this.dom){
+        var o = config.dh || {tag: 'div', cls: 'x-layer'};
+        this.dom = dh.append(pel, o);
+    }
+    if(config.cls){
+        this.addClass(config.cls);
+    }
+    this.constrain = config.constrain !== false;
+    this.setVisibilityMode(Ext.Element.VISIBILITY);
+    if(config.id){
+        this.id = this.dom.id = config.id;
+    }else{
+        this.id = Ext.id(this.dom);
+    }
+    this.zindex = config.zindex || this.getZIndex();
+    this.position('absolute', this.zindex);
+    if(config.shadow){
+        this.shadowOffset = config.shadowOffset || 4;
+        this.shadow = new Ext.Shadow({
+            offset : this.shadowOffset,
+            mode : config.shadow
+        });
+    }else{
+        this.shadowOffset = 0;
+    }
+    this.useShim = config.shim !== false && Ext.useShims;
+    this.useDisplay = config.useDisplay;
+    this.hide();
+};
+
+var supr = Ext.Element.prototype;
+
+// shims are shared among layer to keep from having 100 iframes
+var shims = [];
+
+Ext.extend(Ext.Layer, Ext.Element, {
+
+    getZIndex : function(){
+        return this.zindex || parseInt((this.getShim() || this).getStyle('z-index'), 10) || 11000;
+    },
+
+    getShim : function(){
+        if(!this.useShim){
+            return null;
+        }
+        if(this.shim){
+            return this.shim;
+        }
+        var shim = shims.shift();
+        if(!shim){
+            shim = this.createShim();
+            shim.enableDisplayMode('block');
+            shim.dom.style.display = 'none';
+            shim.dom.style.visibility = 'visible';
+        }
+        var pn = this.dom.parentNode;
+        if(shim.dom.parentNode != pn){
+            pn.insertBefore(shim.dom, this.dom);
+        }
+        shim.setStyle('z-index', this.getZIndex()-2);
+        this.shim = shim;
+        return shim;
+    },
+
+    hideShim : function(){
+        if(this.shim){
+            this.shim.setDisplayed(false);
+            shims.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(show){
+        if(this.shadow){
+            this.shadowDisabled = false;
+            this.shadowOffset = this.lastShadowOffset;
+            delete this.lastShadowOffset;
+            if(show){
+                this.sync(true);
+            }
+        }
+    },
+
+    // private
+    // this code can execute repeatedly in milliseconds (i.e. during a drag) so
+    // code size was sacrificed for effeciency (e.g. no getBox/setBox, no XY calls)
+    sync : function(doShow){
+        var sw = this.shadow;
+        if(!this.updating && this.isVisible() && (sw || this.useShim)){
+            var sh = this.getShim();
+
+            var w = this.getWidth(),
+                h = this.getHeight();
+
+            var l = this.getLeft(true),
+                t = this.getTop(true);
+
+            if(sw && !this.shadowDisabled){
+                if(doShow && !sw.isVisible()){
+                    sw.show(this);
+                }else{
+                    sw.realign(l, t, w, h);
+                }
+                if(sh){
+                    if(doShow){
+                       sh.show();
+                    }
+                    // fit the shim behind the shadow, so it is shimmed too
+                    var a = sw.adjusts, s = sh.dom.style;
+                    s.left = (Math.min(l, l+a.l))+'px';
+                    s.top = (Math.min(t, t+a.t))+'px';
+                    s.width = (w+a.w)+'px';
+                    s.height = (h+a.h)+'px';
+                }
+            }else if(sh){
+                if(doShow){
+                   sh.show();
+                }
+                sh.setSize(w, h);
+                sh.setLeftTop(l, t);
+            }
+
+        }
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    beginUpdate : function(){
+        this.updating = true;
+    },
+
+    // private
+    endUpdate : function(){
+        this.updating = false;
+        this.sync(true);
+    },
+
+    // private
+    hideUnders : function(negOffset){
+        if(this.shadow){
+            this.shadow.hide();
+        }
+        this.hideShim();
+    },
+
+    // private
+    constrainXY : function(){
+        if(this.constrain){
+            var vw = Ext.lib.Dom.getViewWidth(),
+                vh = Ext.lib.Dom.getViewHeight();
+            var s = Ext.getDoc().getScroll();
+
+            var xy = this.getXY();
+            var x = xy[0], y = xy[1];
+            var so = this.shadowOffset;
+            var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so;
+            // only move it if it needs it
+            var moved = false;
+            // first validate right/bottom
+            if((x + w) > vw+s.left){
+                x = vw - w - so;
+                moved = true;
+            }
+            if((y + h) > vh+s.top){
+                y = vh - h - so;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < s.left){
+                x = s.left;
+                moved = true;
+            }
+            if(y < s.top){
+                y = s.top;
+                moved = true;
+            }
+            if(moved){
+                if(this.avoidY){
+                    var ay = this.avoidY;
+                    if(y <= ay && (y+h) >= ay){
+                        y = ay-h-5;
+                    }
+                }
+                xy = [x, y];
+                this.storeXY(xy);
+                supr.setXY.call(this, xy);
+                this.sync();
+            }
+        }
+        return this;
+    },
+
+    isVisible : function(){
+        return this.visible;
+    },
+
+    // private
+    showAction : function(){
+        this.visible = true; // track visibility to prevent getStyle calls
+        if(this.useDisplay === true){
+            this.setDisplayed('');
+        }else if(this.lastXY){
+            supr.setXY.call(this, this.lastXY);
+        }else if(this.lastLT){
+            supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]);
+        }
+    },
+
+    // private
+    hideAction : function(){
+        this.visible = false;
+        if(this.useDisplay === true){
+            this.setDisplayed(false);
+        }else{
+            this.setLeftTop(-10000,-10000);
+        }
+    },
+
+    // overridden Element method
+    setVisible : function(v, a, d, c, e){
+        if(v){
+            this.showAction();
+        }
+        if(a && v){
+            var cb = function(){
+                this.sync(true);
+                if(c){
+                    c();
+                }
+            }.createDelegate(this);
+            supr.setVisible.call(this, true, true, d, cb, e);
+        }else{
+            if(!v){
+                this.hideUnders(true);
+            }
+            var cb = c;
+            if(a){
+                cb = function(){
+                    this.hideAction();
+                    if(c){
+                        c();
+                    }
+                }.createDelegate(this);
+            }
+            supr.setVisible.call(this, v, a, d, cb, e);
+            if(v){
+                this.sync(true);
+            }else if(!a){
+                this.hideAction();
+            }
+        }
+        return this;
+    },
+
+    storeXY : function(xy){
+        delete this.lastLT;
+        this.lastXY = xy;
+    },
+
+    storeLeftTop : function(left, top){
+        delete this.lastXY;
+        this.lastLT = [left, top];
+    },
+
+    // private
+    beforeFx : function(){
+        this.beforeAction();
+        return Ext.Layer.superclass.beforeFx.apply(this, arguments);
+    },
+
+    // private
+    afterFx : function(){
+        Ext.Layer.superclass.afterFx.apply(this, arguments);
+        this.sync(this.isVisible());
+    },
+
+    // private
+    beforeAction : function(){
+        if(!this.updating && this.shadow){
+            this.shadow.hide();
+        }
+    },
+
+    // overridden Element method
+    setLeft : function(left){
+        this.storeLeftTop(left, this.getTop(true));
+        supr.setLeft.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setTop : function(top){
+        this.storeLeftTop(this.getLeft(true), top);
+        supr.setTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setLeftTop : function(left, top){
+        this.storeLeftTop(left, top);
+        supr.setLeftTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setXY : function(xy, a, d, c, e){
+        this.fixDisplay();
+        this.beforeAction();
+        this.storeXY(xy);
+        var cb = this.createCB(c);
+        supr.setXY.call(this, xy, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // private
+    createCB : function(c){
+        var el = this;
+        return function(){
+            el.constrainXY();
+            el.sync(true);
+            if(c){
+                c();
+            }
+        };
+    },
+
+    // overridden Element method
+    setX : function(x, a, d, c, e){
+        this.setXY([x, this.getY()], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setY : function(y, a, d, c, e){
+        this.setXY([this.getX(), y], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setSize : function(w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setSize.call(this, w, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setWidth : function(w, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setWidth.call(this, w, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setHeight : function(h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setHeight.call(this, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setBounds : function(x, y, w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        if(!a){
+            this.storeXY([x, y]);
+            supr.setXY.call(this, [x, y]);
+            supr.setSize.call(this, w, h, a, d, cb, e);
+            cb();
+        }else{
+            supr.setBounds.call(this, x, y, w, h, a, d, cb, e);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically
+     * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow
+     * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index).
+     * @param {Number} zindex The new z-index to set
+     * @return {this} The Layer
+     */
+    setZIndex : function(zindex){
+        this.zindex = zindex;
+        this.setStyle('z-index', zindex + 2);
+        if(this.shadow){
+            this.shadow.setZIndex(zindex + 1);
+        }
+        if(this.shim){
+            this.shim.setStyle('z-index', zindex);
+        }
+        return this;
+    }
+});
+})();/**
+ * @class Ext.Shadow
+ * Simple class that can provide a shadow effect for any element.  Note that the element MUST be absolutely positioned,
+ * and the shadow does not provide any shimming.  This should be used only in simple cases -- for more advanced
+ * functionality that can also provide the same shadow effect, see the {@link Ext.Layer} class.
+ * @constructor
+ * Create a new Shadow
+ * @param {Object} config The config object
+ */
+Ext.Shadow = function(config){
+    Ext.apply(this, config);
+    if(typeof this.mode != "string"){
+        this.mode = this.defaultMode;
+    }
+    var o = this.offset, a = {h: 0};
+    var rad = Math.floor(this.offset/2);
+    switch(this.mode.toLowerCase()){ // all this hideous nonsense calculates the various offsets for shadows
+        case "drop":
+            a.w = 0;
+            a.l = a.t = o;
+            a.t -= 1;
+            if(Ext.isIE){
+                a.l -= this.offset + rad;
+                a.t -= this.offset + rad;
+                a.w -= rad;
+                a.h -= rad;
+                a.t += 1;
+            }
+        break;
+        case "sides":
+            a.w = (o*2);
+            a.l = -o;
+            a.t = o-1;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= this.offset + rad;
+                a.l += 1;
+                a.w -= (this.offset - rad)*2;
+                a.w -= rad + 1;
+                a.h -= 1;
+            }
+        break;
+        case "frame":
+            a.w = a.h = (o*2);
+            a.l = a.t = -o;
+            a.t += 1;
+            a.h -= 2;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= (this.offset - rad);
+                a.l += 1;
+                a.w -= (this.offset + rad + 1);
+                a.h -= (this.offset + rad);
+                a.h += 1;
+            }
+        break;
+    };
+
+    this.adjusts = a;
+};
+
+Ext.Shadow.prototype = {
+    /**
+     * @cfg {String} mode
+     * The shadow display mode.  Supports the following options:<div class="mdetail-params"><ul>
+     * <li><b><tt>sides</tt></b> : Shadow displays on both sides and bottom only</li>
+     * <li><b><tt>frame</tt></b> : Shadow displays equally on all four sides</li>
+     * <li><b><tt>drop</tt></b> : Traditional bottom-right drop shadow</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {String} offset
+     * The number of pixels to offset the shadow from the element (defaults to <tt>4</tt>)
+     */
+    offset: 4,
+
+    // private
+    defaultMode: "drop",
+
+    /**
+     * Displays the shadow under the target element
+     * @param {Mixed} targetEl The id or element under which the shadow should display
+     */
+    show : function(target){
+        target = Ext.get(target);
+        if(!this.el){
+            this.el = Ext.Shadow.Pool.pull();
+            if(this.el.dom.nextSibling != target.dom){
+                this.el.insertBefore(target);
+            }
+        }
+        this.el.setStyle("z-index", this.zIndex || parseInt(target.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(
+            target.getLeft(true),
+            target.getTop(true),
+            target.getWidth(),
+            target.getHeight()
+        );
+        this.el.dom.style.display = "block";
+    },
+
+    /**
+     * Returns true if the shadow is visible, else false
+     */
+    isVisible : function(){
+        return this.el ? true : false;  
+    },
+
+    /**
+     * Direct alignment when values are already available. Show must be called at least once before
+     * calling this method to ensure it is initialized.
+     * @param {Number} left The target element left position
+     * @param {Number} top The target element top position
+     * @param {Number} width The target element width
+     * @param {Number} height The target element height
+     */
+    realign : function(l, t, w, h){
+        if(!this.el){
+            return;
+        }
+        var a = this.adjusts, d = this.el.dom, s = d.style;
+        var iea = 0;
+        s.left = (l+a.l)+"px";
+        s.top = (t+a.t)+"px";
+        var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px";
+        if(s.width != sws || s.height != shs){
+            s.width = sws;
+            s.height = shs;
+            if(!Ext.isIE){
+                var cn = d.childNodes;
+                var sww = Math.max(0, (sw-12))+"px";
+                cn[0].childNodes[1].style.width = sww;
+                cn[1].childNodes[1].style.width = sww;
+                cn[2].childNodes[1].style.width = sww;
+                cn[1].style.height = Math.max(0, (sh-12))+"px";
+            }
+        }
+    },
+
+    /**
+     * Hides this shadow
+     */
+    hide : function(){
+        if(this.el){
+            this.el.dom.style.display = "none";
+            Ext.Shadow.Pool.push(this.el);
+            delete this.el;
+        }
+    },
+
+    /**
+     * Adjust the z-index of this shadow
+     * @param {Number} zindex The new z-index
+     */
+    setZIndex : function(z){
+        this.zIndex = z;
+        if(this.el){
+            this.el.setStyle("z-index", z);
+        }
+    }
+};
+
+// Private utility class that manages the internal Shadow cache
+Ext.Shadow.Pool = function(){
+    var p = [];
+    var markup = 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 sh = p.shift();
+            if(!sh){
+                sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup));
+                sh.autoBoxAdjust = false;
+            }
+            return sh;
+        },
+
+        push : function(sh){
+            p.push(sh);
+        }
+    };
+}();/**
+ * @class Ext.BoxComponent
+ * @extends Ext.Component
+ * <p>Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.</p>
+ * <p>BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly
+ * within the Component rendering model.</p>
+ * <p>A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing
+ * element, or one that is created to your specifications at render time. Usually, to participate in layouts,
+ * a Component will need to be a <b>Box</b>Component in order to have its width and height managed.</p>
+ * <p>To use a pre-existing element as a BoxComponent, configure it so that you preset the <b>el</b> property to the
+ * element to reference:<pre><code>
+var pageHeader = new Ext.BoxComponent({
+    el: 'my-header-div'
+});</code></pre>
+ * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.</p>
+ * <p>To create a BoxComponent based around a HTML element to be created at render time, use the
+ * {@link Ext.Component#autoEl autoEl} config option which takes the form of a
+ * {@link Ext.DomHelper DomHelper} specification:<pre><code>
+var myImage = new Ext.BoxComponent({
+    autoEl: {
+        tag: 'img',
+        src: '/images/my-image.jpg'
+    }
+});</code></pre></p>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options.
+ * @xtype box
+ */
+Ext.BoxComponent = Ext.extend(Ext.Component, {
+
+    // Configs below are used for all Components when rendered by BorderLayout.
+    /**
+     * @cfg {String} region <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * layout manager (e.g. specifying <tt>layout:'border'</tt>).</p><br>
+     * <p>See {@link Ext.layout.BorderLayout} also.</p>
+     */
+    // margins config is used when a BoxComponent is rendered by BorderLayout or BoxLayout.
+    /**
+     * @cfg {Object} margins <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * or one of the two <b>{@link Ext.layout.BoxLayout BoxLayout} subclasses.</b></p>
+     * <p>An object containing margins to apply to this BoxComponent in the
+     * format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Number} x
+     * The local x (left) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} y
+     * The local y (top) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageX
+     * The page level x coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageY
+     * The page level y coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} height
+     * The height of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Number} width
+     * The width of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <p>True to use height:'auto', false to use fixed height (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components inherit this config option, not all will
+     * function as expected with a height of 'auto'. Setting autoHeight:true means that the
+     * browser will manage height based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the height, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the height might
+     * result in elements needing to be synchronized with the new height. Example:</p><pre><code>
+var w = new Ext.Window({
+    title: 'Window',
+    width: 600,
+    autoHeight: true,
+    items: {
+        title: 'Collapse Me',
+        height: 400,
+        collapsible: true,
+        border: false,
+        listeners: {
+            beforecollapse: function() {
+                w.el.shadow.hide();
+            },
+            beforeexpand: function() {
+                w.el.shadow.hide();
+            },
+            collapse: function() {
+                w.syncShadow();
+            },
+            expand: function() {
+                w.syncShadow();
+            }
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * <p>True to use width:'auto', false to use fixed width (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components  inherit this config option, not all will
+     * function as expected with a width of 'auto'. Setting autoWidth:true means that the
+     * browser will manage width based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the width, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the width might
+     * result in elements needing to be synchronized with the new width. For example, where the target element is:</p><pre><code>
+&lt;div id='grid-container' style='margin-left:25%;width:50%'>&lt;/div>
+</code></pre>
+     * A Panel rendered into that target element must listen for browser window resize in order to relay its
+      * child items when the browser changes its width:<pre><code>
+var myPanel = new Ext.Panel({
+    renderTo: 'grid-container',
+    monitorResize: true, // relay on browser resize
+    title: 'Panel',
+    height: 400,
+    autoWidth: true,
+    layout: 'hbox',
+    layoutConfig: {
+        align: 'stretch'
+    },
+    defaults: {
+        flex: 1
+    },
+    items: [{
+        title: 'Box 1',
+    }, {
+        title: 'Box 2'
+    }, {
+        title: 'Box 3'
+    }],
+});
+</code></pre>
+     */
+
+    /* // private internal config
+     * {Boolean} deferHeight
+     * True to defer height calculations to an external component, false to allow this component to set its own
+     * height (defaults to false).
+     */
+
+    // private
+    initComponent : function(){
+        Ext.BoxComponent.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event resize
+             * Fires after the component is resized.
+             * @param {Ext.Component} this
+             * @param {Number} adjWidth The box-adjusted width that was set
+             * @param {Number} adjHeight The box-adjusted height that was set
+             * @param {Number} rawWidth The width that was originally specified
+             * @param {Number} rawHeight The height that was originally specified
+             */
+            'resize',
+            /**
+             * @event move
+             * Fires after the component is moved.
+             * @param {Ext.Component} this
+             * @param {Number} x The new x position
+             * @param {Number} y The new y position
+             */
+            'move'
+        );
+    },
+
+    // private, set in afterRender to signify that the component has been rendered
+    boxReady : false,
+    // private, used to defer height settings to subclasses
+    deferHeight: false,
+
+    /**
+     * Sets the width and height of this BoxComponent. This method fires the {@link #resize} event. This method can accept
+     * either width and height as separate arguments, or you can pass a size object like <code>{width:10, height:20}</code>.
+     * @param {Mixed} width The new width to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+     * <li><code>undefined</code> to leave the width unchanged.</li>
+     * </ul></div>
+     * @param {Mixed} height The new height to set (not required if a size object is passed as the first arg).
+     * This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * <li><code>undefined</code> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setSize : function(w, h){
+        // support for standard size objects
+        if(typeof w == 'object'){
+            h = w.height;
+            w = w.width;
+        }
+        // not rendered
+        if(!this.boxReady){
+            this.width = w;
+            this.height = h;
+            return this;
+        }
+
+        // prevent recalcs when not needed
+        if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
+            return this;
+        }
+        this.lastSize = {width: w, height: h};
+        var adj = this.adjustSize(w, h);
+        var aw = adj.width, ah = adj.height;
+        if(aw !== undefined || ah !== undefined){ // this code is nasty but performs better with floaters
+            var rz = this.getResizeEl();
+            if(!this.deferHeight && aw !== undefined && ah !== undefined){
+                rz.setSize(aw, ah);
+            }else if(!this.deferHeight && ah !== undefined){
+                rz.setHeight(ah);
+            }else if(aw !== undefined){
+                rz.setWidth(aw);
+            }
+            this.onResize(aw, ah, w, h);
+            this.fireEvent('resize', this, aw, ah, w, h);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the width of the component.  This method fires the {@link #resize} event.
+     * @param {Number} width The new width to setThis may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setWidth : function(width){
+        return this.setSize(width);
+    },
+
+    /**
+     * Sets the height of the component.  This method fires the {@link #resize} event.
+     * @param {Number} height The new height to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style.</li>
+     * <li><i>undefined</i> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setHeight : function(height){
+        return this.setSize(undefined, height);
+    },
+
+    /**
+     * Gets the current size of the component's underlying element.
+     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+     */
+    getSize : function(){
+        return this.getResizeEl().getSize();
+    },
+
+    /**
+     * Gets the current width of the component's underlying element.
+     * @return {Number}
+     */
+    getWidth : function(){
+        return this.getResizeEl().getWidth();
+    },
+
+    /**
+     * Gets the current height of the component's underlying element.
+     * @return {Number}
+     */
+    getHeight : function(){
+        return this.getResizeEl().getHeight();
+    },
+
+    /**
+     * Gets the current size of the component's underlying element, including space taken by its margins.
+     * @return {Object} An object containing the element's size {width: (element width + left/right margins), height: (element height + top/bottom margins)}
+     */
+    getOuterSize : function(){
+        var el = this.getResizeEl();
+        return {width: el.getWidth() + el.getMargins('lr'),
+                height: el.getHeight() + el.getMargins('tb')};
+    },
+
+    /**
+     * Gets the current XY position of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Array} The XY position of the element (e.g., [100, 200])
+     */
+    getPosition : function(local){
+        var el = this.getPositionEl();
+        if(local === true){
+            return [el.getLeft(true), el.getTop(true)];
+        }
+        return this.xy || el.getXY();
+    },
+
+    /**
+     * Gets the current box measurements of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+    getBox : function(local){
+        var pos = this.getPosition(local);
+        var s = this.getSize();
+        s.x = pos[0];
+        s.y = pos[1];
+        return s;
+    },
+
+    /**
+     * Sets the current box measurements of the component's underlying element.
+     * @param {Object} box An object in the format {x, y, width, height}
+     * @return {Ext.BoxComponent} this
+     */
+    updateBox : function(box){
+        this.setSize(box.width, box.height);
+        this.setPagePosition(box.x, box.y);
+        return this;
+    },
+
+    /**
+     * <p>Returns the outermost Element of this Component which defines the Components overall size.</p>
+     * <p><i>Usually</i> this will return the same Element as <code>{@link #getEl}</code>,
+     * but in some cases, a Component may have some more wrapping Elements around its main
+     * active Element.</p>
+     * <p>An example is a ComboBox. It is encased in a <i>wrapping</i> Element which
+     * contains both the <code>&lt;input></code> Element (which is what would be returned
+     * by its <code>{@link #getEl}</code> method, <i>and</i> the trigger button Element.
+     * This Element is returned as the <code>resizeEl</code>.
+     */
+    getResizeEl : function(){
+        return this.resizeEl || this.el;
+    },
+
+    // protected
+    getPositionEl : function(){
+        return this.positionEl || this.el;
+    },
+
+    /**
+     * Sets the left and top of the component.  To set the page XY position instead, use {@link #setPagePosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} left The new left
+     * @param {Number} top The new top
+     * @return {Ext.BoxComponent} this
+     */
+    setPosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.x = x;
+        this.y = y;
+        if(!this.boxReady){
+            return this;
+        }
+        var adj = this.adjustPosition(x, y);
+        var ax = adj.x, ay = adj.y;
+
+        var el = this.getPositionEl();
+        if(ax !== undefined || ay !== undefined){
+            if(ax !== undefined && ay !== undefined){
+                el.setLeftTop(ax, ay);
+            }else if(ax !== undefined){
+                el.setLeft(ax);
+            }else if(ay !== undefined){
+                el.setTop(ay);
+            }
+            this.onPosition(ax, ay);
+            this.fireEvent('move', this, ax, ay);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the page XY position of the component.  To set the left and top instead, use {@link #setPosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     * @return {Ext.BoxComponent} this
+     */
+    setPagePosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.pageX = x;
+        this.pageY = y;
+        if(!this.boxReady){
+            return;
+        }
+        if(x === undefined || y === undefined){ // cannot translate undefined points
+            return;
+        }
+        var p = this.getPositionEl().translatePoints(x, y);
+        this.setPosition(p.left, p.top);
+        return this;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.BoxComponent.superclass.onRender.call(this, ct, position);
+        if(this.resizeEl){
+            this.resizeEl = Ext.get(this.resizeEl);
+        }
+        if(this.positionEl){
+            this.positionEl = Ext.get(this.positionEl);
+        }
+    },
+
+    // private
+    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);
+        }
+    },
+
+    /**
+     * Force the component's size to recalculate based on the underlying element's current height and width.
+     * @return {Ext.BoxComponent} this
+     */
+    syncSize : function(){
+        delete this.lastSize;
+        this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight());
+        return this;
+    },
+
+    /* // protected
+     * Called after the component is resized, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a resize occurs.
+     * @param {Number} adjWidth The box-adjusted width that was set
+     * @param {Number} adjHeight The box-adjusted height that was set
+     * @param {Number} rawWidth The width that was originally specified
+     * @param {Number} rawHeight The height that was originally specified
+     */
+    onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
+
+    },
+
+    /* // protected
+     * Called after the component is moved, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a move occurs.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     */
+    onPosition : function(x, y){
+
+    },
+
+    // private
+    adjustSize : function(w, h){
+        if(this.autoWidth){
+            w = 'auto';
+        }
+        if(this.autoHeight){
+            h = 'auto';
+        }
+        return {width : w, height: h};
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        return {x : x, y: y};
+    }
+});
+Ext.reg('box', Ext.BoxComponent);
+
+
+/**
+ * @class Ext.Spacer
+ * @extends Ext.BoxComponent
+ * <p>Used to provide a sizable space in a layout.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Spacer = Ext.extend(Ext.BoxComponent, {
+    autoEl:'div'
+});
+Ext.reg('spacer', Ext.Spacer);/**
+ * @class Ext.SplitBar
+ * @extends Ext.util.Observable
+ * Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized).
+ * <br><br>
+ * Usage:
+ * <pre><code>
+var split = new Ext.SplitBar("elementToDrag", "elementToSize",
+                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
+split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
+split.minSize = 100;
+split.maxSize = 600;
+split.animate = true;
+split.on('moved', splitterMoved);
+</code></pre>
+ * @constructor
+ * Create a new SplitBar
+ * @param {Mixed} dragElement The element to be dragged and act as the SplitBar.
+ * @param {Mixed} resizingElement The element to be resized based on where the SplitBar element is dragged
+ * @param {Number} orientation (optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+ * @param {Number} placement (optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or  
+                        Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial
+                        position of the SplitBar).
+ */
+Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
+    
+    /** @private */
+    this.el = Ext.get(dragElement, true);
+    this.el.dom.unselectable = "on";
+    /** @private */
+    this.resizingEl = Ext.get(resizingElement, true);
+
+    /**
+     * @private
+     * The orientation of the split. Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+     * Note: If this is changed after creating the SplitBar, the placement property must be manually updated
+     * @type Number
+     */
+    this.orientation = orientation || Ext.SplitBar.HORIZONTAL;
+    
+    /**
+     * The increment, in pixels by which to move this SplitBar. When <i>undefined</i>, the SplitBar moves smoothly.
+     * @type Number
+     * @property tickSize
+     */
+    /**
+     * The minimum size of the resizing element. (Defaults to 0)
+     * @type Number
+     */
+    this.minSize = 0;
+    
+    /**
+     * The maximum size of the resizing element. (Defaults to 2000)
+     * @type Number
+     */
+    this.maxSize = 2000;
+    
+    /**
+     * Whether to animate the transition to the new size
+     * @type Boolean
+     */
+    this.animate = false;
+    
+    /**
+     * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
+     * @type Boolean
+     */
+    this.useShim = false;
+    
+    /** @private */
+    this.shim = null;
+    
+    if(!existingProxy){
+        /** @private */
+        this.proxy = Ext.SplitBar.createProxy(this.orientation);
+    }else{
+        this.proxy = Ext.get(existingProxy).dom;
+    }
+    /** @private */
+    this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id});
+    
+    /** @private */
+    this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dragSpecs = {};
+    
+    /**
+     * @private The adapter to use to positon and resize elements
+     */
+    this.adapter = new Ext.SplitBar.BasicLayoutAdapter();
+    this.adapter.init(this);
+    
+    if(this.orientation == Ext.SplitBar.HORIZONTAL){
+        /** @private */
+        this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
+        this.el.addClass("x-splitbar-h");
+    }else{
+        /** @private */
+        this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
+        this.el.addClass("x-splitbar-v");
+    }
+    
+    this.addEvents(
+        /**
+         * @event resize
+         * Fires when the splitter is moved (alias for {@link #moved})
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "resize",
+        /**
+         * @event moved
+         * Fires when the splitter is moved
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "moved",
+        /**
+         * @event beforeresize
+         * Fires before the splitter is dragged
+         * @param {Ext.SplitBar} this
+         */
+        "beforeresize",
+
+        "beforeapply"
+    );
+
+    Ext.SplitBar.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.SplitBar, Ext.util.Observable, {
+    onStartProxyDrag : function(x, y){
+        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 size = this.adapter.getElementSize(this);
+        this.activeMinSize = this.getMinimumSize();
+        this.activeMaxSize = this.getMaximumSize();
+        var c1 = size - this.activeMinSize;
+        var c2 = Math.max(this.activeMaxSize - size, 0);
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(
+                this.placement == Ext.SplitBar.LEFT ? c1 : c2, 
+                this.placement == Ext.SplitBar.LEFT ? c2 : c1,
+                this.tickSize
+            );
+            this.dd.setYConstraint(0, 0);
+        }else{
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(0, 0);
+            this.dd.setYConstraint(
+                this.placement == Ext.SplitBar.TOP ? c1 : c2, 
+                this.placement == Ext.SplitBar.TOP ? c2 : c1,
+                this.tickSize
+            );
+         }
+        this.dragSpecs.startSize = size;
+        this.dragSpecs.startPoint = [x, y];
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y);
+    },
+    
+    /** 
+     * @private Called after the drag operation by the DDProxy
+     */
+    onEndProxyDrag : function(e){
+        Ext.get(this.proxy).setDisplayed(false);
+        var endPoint = Ext.lib.Event.getXY(e);
+        if(this.overlay){
+            Ext.destroy(this.overlay);
+            delete this.overlay;
+        }
+        var newSize;
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.LEFT ?
+                    endPoint[0] - this.dragSpecs.startPoint[0] :
+                    this.dragSpecs.startPoint[0] - endPoint[0]
+                );
+        }else{
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.TOP ?
+                    endPoint[1] - this.dragSpecs.startPoint[1] :
+                    this.dragSpecs.startPoint[1] - endPoint[1]
+                );
+        }
+        newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize);
+        if(newSize != this.dragSpecs.startSize){
+            if(this.fireEvent('beforeapply', this, newSize) !== false){
+                this.adapter.setElementSize(this, newSize);
+                this.fireEvent("moved", this, newSize);
+                this.fireEvent("resize", this, newSize);
+            }
+        }
+    },
+    
+    /**
+     * Get the adapter this SplitBar uses
+     * @return The adapter object
+     */
+    getAdapter : function(){
+        return this.adapter;
+    },
+    
+    /**
+     * Set the adapter this SplitBar uses
+     * @param {Object} adapter A SplitBar adapter object
+     */
+    setAdapter : function(adapter){
+        this.adapter = adapter;
+        this.adapter.init(this);
+    },
+    
+    /**
+     * Gets the minimum size for the resizing element
+     * @return {Number} The minimum size
+     */
+    getMinimumSize : function(){
+        return this.minSize;
+    },
+    
+    /**
+     * Sets the minimum size for the resizing element
+     * @param {Number} minSize The minimum size
+     */
+    setMinimumSize : function(minSize){
+        this.minSize = minSize;
+    },
+    
+    /**
+     * Gets the maximum size for the resizing element
+     * @return {Number} The maximum size
+     */
+    getMaximumSize : function(){
+        return this.maxSize;
+    },
+    
+    /**
+     * Sets the maximum size for the resizing element
+     * @param {Number} maxSize The maximum size
+     */
+    setMaximumSize : function(maxSize){
+        this.maxSize = maxSize;
+    },
+    
+    /**
+     * Sets the initialize size for the resizing element
+     * @param {Number} size The initial size
+     */
+    setCurrentSize : function(size){
+        var oldAnimate = this.animate;
+        this.animate = false;
+        this.adapter.setElementSize(this, size);
+        this.animate = oldAnimate;
+    },
+    
+    /**
+     * Destroy this splitbar. 
+     * @param {Boolean} removeEl True to remove the element
+     */
+    destroy : function(removeEl){
+		Ext.destroy(this.shim, Ext.get(this.proxy));
+        this.dd.unreg();
+        if(removeEl){
+            this.el.remove();
+        }
+		this.purgeListeners();
+    }
+});
+
+/**
+ * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color.
+ */
+Ext.SplitBar.createProxy = function(dir){
+    var proxy = new Ext.Element(document.createElement("div"));
+    proxy.unselectable();
+    var cls = 'x-splitbar-proxy';
+    proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v'));
+    document.body.appendChild(proxy.dom);
+    return proxy.dom;
+};
+
+/** 
+ * @class Ext.SplitBar.BasicLayoutAdapter
+ * Default Adapter. It assumes the splitter and resizing element are not positioned
+ * elements and only gets/sets the width of the element. Generally used for table based layouts.
+ */
+Ext.SplitBar.BasicLayoutAdapter = function(){
+};
+
+Ext.SplitBar.BasicLayoutAdapter.prototype = {
+    // do nothing for now
+    init : function(s){
+    
+    },
+    /**
+     * Called before drag operations to get the current size of the resizing element. 
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     */
+     getElementSize : function(s){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            return s.resizingEl.getWidth();
+        }else{
+            return s.resizingEl.getHeight();
+        }
+    },
+    
+    /**
+     * Called after drag operations to set the size of the resizing element.
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     * @param {Number} newSize The new size to set
+     * @param {Function} onComplete A function to be invoked when resizing is complete
+     */
+    setElementSize : function(s, newSize, onComplete){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            if(!s.animate){
+                s.resizingEl.setWidth(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }else{
+            
+            if(!s.animate){
+                s.resizingEl.setHeight(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }
+    }
+};
+
+/** 
+ *@class Ext.SplitBar.AbsoluteLayoutAdapter
+ * @extends Ext.SplitBar.BasicLayoutAdapter
+ * Adapter that  moves the splitter element to align with the resized sizing element. 
+ * Used with an absolute positioned SplitBar.
+ * @param {Mixed} container The container that wraps around the absolute positioned content. If it's
+ * document.body, make sure you assign an id to the body element.
+ */
+Ext.SplitBar.AbsoluteLayoutAdapter = function(container){
+    this.basic = new Ext.SplitBar.BasicLayoutAdapter();
+    this.container = Ext.get(container);
+};
+
+Ext.SplitBar.AbsoluteLayoutAdapter.prototype = {
+    init : function(s){
+        this.basic.init(s);
+    },
+    
+    getElementSize : function(s){
+        return this.basic.getElementSize(s);
+    },
+    
+    setElementSize : function(s, newSize, onComplete){
+        this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s]));
+    },
+    
+    moveSplitter : function(s){
+        var yes = Ext.SplitBar;
+        switch(s.placement){
+            case yes.LEFT:
+                s.el.setX(s.resizingEl.getRight());
+                break;
+            case yes.RIGHT:
+                s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px");
+                break;
+            case yes.TOP:
+                s.el.setY(s.resizingEl.getBottom());
+                break;
+            case yes.BOTTOM:
+                s.el.setY(s.resizingEl.getTop() - s.el.getHeight());
+                break;
+        }
+    }
+};
+
+/**
+ * Orientation constant - Create a vertical SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.VERTICAL = 1;
+
+/**
+ * Orientation constant - Create a horizontal SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.HORIZONTAL = 2;
+
+/**
+ * Placement constant - The resizing element is to the left of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.LEFT = 1;
+
+/**
+ * Placement constant - The resizing element is to the right of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.RIGHT = 2;
+
+/**
+ * Placement constant - The resizing element is positioned above the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.TOP = 3;
+
+/**
+ * Placement constant - The resizing element is positioned under splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.BOTTOM = 4;
+/**
+ * @class Ext.Container
+ * @extends Ext.BoxComponent
+ * <p>Base class for any {@link Ext.BoxComponent} that may contain other Components. Containers handle the
+ * basic behavior of containing items, namely adding, inserting and removing items.</p>
+ *
+ * <p>The most commonly used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}.
+ * If you do not need the capabilities offered by the aforementioned classes you can create a lightweight
+ * Container to be encapsulated by an HTML element to your specifications by using the
+ * <tt><b>{@link Ext.Component#autoEl autoEl}</b></tt> config option. This is a useful technique when creating
+ * embedded {@link Ext.layout.ColumnLayout column} layouts inside {@link Ext.form.FormPanel FormPanels}
+ * for example.</p>
+ *
+ * <p>The code below illustrates both how to explicitly create a Container, and how to implicitly
+ * create one using the <b><tt>'container'</tt></b> xtype:<pre><code>
+// explicitly create a Container
+var embeddedColumns = new Ext.Container({
+    autoEl: 'div',  // This is the default
+    layout: 'column',
+    defaults: {
+        // implicitly create Container by specifying xtype
+        xtype: 'container',
+        autoEl: 'div', // This is the default.
+        layout: 'form',
+        columnWidth: 0.5,
+        style: {
+            padding: '10px'
+        }
+    },
+//  The two items below will be Ext.Containers, each encapsulated by a &lt;DIV> element.
+    items: [{
+        items: {
+            xtype: 'datefield',
+            name: 'startDate',
+            fieldLabel: 'Start date'
+        }
+    }, {
+        items: {
+            xtype: 'datefield',
+            name: 'endDate',
+            fieldLabel: 'End date'
+        }
+    }]
+});</code></pre></p>
+ *
+ * <p><u><b>Layout</b></u></p>
+ * <p>Container classes delegate the rendering of child Components to a layout
+ * manager class which must be configured into the Container using the
+ * <code><b>{@link #layout}</b></code> configuration property.</p>
+ * <p>When either specifying child <code>{@link #items}</code> of a Container,
+ * or dynamically {@link #add adding} Components to a Container, remember to
+ * consider how you wish the Container to arrange those child elements, and
+ * whether those child elements need to be sized using one of Ext's built-in
+ * <b><code>{@link #layout}</code></b> schemes. By default, Containers use the
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme which only
+ * renders child components, appending them one after the other inside the
+ * Container, and <b>does not apply any sizing</b> at all.</p>
+ * <p>A common mistake is when a developer neglects to specify a
+ * <b><code>{@link #layout}</code></b> (e.g. widgets like GridPanels or
+ * TreePanels are added to Containers for which no <tt><b>{@link #layout}</b></tt>
+ * has been specified). If a Container is left to use the default
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme, none of its
+ * child components will be resized, or changed in any way when the Container
+ * is resized.</p>
+ * <p>Certain layout managers allow dynamic addition of child components.
+ * Those that do include {@link Ext.layout.CardLayout},
+ * {@link Ext.layout.AnchorLayout}, {@link Ext.layout.FormLayout}, and
+ * {@link Ext.layout.TableLayout}. For example:<pre><code>
+//  Create the GridPanel.
+var myNewGrid = new Ext.grid.GridPanel({
+    store: myStore,
+    columns: myColumnModel,
+    title: 'Results', // the title becomes the title of the tab
+});
+
+myTabPanel.add(myNewGrid); // {@link Ext.TabPanel} implicitly uses {@link Ext.layout.CardLayout CardLayout}
+myTabPanel.{@link Ext.TabPanel#setActiveTab setActiveTab}(myNewGrid);
+ * </code></pre></p>
+ * <p>The example above adds a newly created GridPanel to a TabPanel. Note that
+ * a TabPanel uses {@link Ext.layout.CardLayout} as its layout manager which
+ * means all its child items are sized to {@link Ext.layout.FitLayout fit}
+ * exactly into its client area.
+ * <p><b><u>Overnesting is a common problem</u></b>.
+ * An example of overnesting occurs when a GridPanel is added to a TabPanel
+ * by wrapping the GridPanel <i>inside</i> a wrapping Panel (that has no
+ * <tt><b>{@link #layout}</b></tt> specified) and then add that wrapping Panel
+ * to the TabPanel. The point to realize is that a GridPanel <b>is</b> a
+ * Component which can be added directly to a Container. If the wrapping Panel
+ * has no <tt><b>{@link #layout}</b></tt> configuration, then the overnested
+ * GridPanel will not be sized as expected.<p>
+</code></pre>
+ *
+ * <p><u><b>Adding via remote configuration</b></u></p>
+ *
+ * <p>A server side script can be used to add Components which are generated dynamically on the server.
+ * An example of adding a GridPanel to a TabPanel where the GridPanel is generated by the server
+ * based on certain parameters:
+ * </p><pre><code>
+// execute an Ajax request to invoke server side script:
+Ext.Ajax.request({
+    url: 'gen-invoice-grid.php',
+    // send additional parameters to instruct server script
+    params: {
+        startDate: Ext.getCmp('start-date').getValue(),
+        endDate: Ext.getCmp('end-date').getValue()
+    },
+    // process the response object to add it to the TabPanel:
+    success: function(xhr) {
+        var newComponent = eval(xhr.responseText); // see discussion below
+        myTabPanel.add(newComponent); // add the component to the TabPanel
+        myTabPanel.setActiveTab(newComponent);
+    },
+    failure: function() {
+        Ext.Msg.alert("Grid create failed", "Server communication failure");
+    }
+});
+</code></pre>
+ * <p>The server script needs to return an executable Javascript statement which, when processed
+ * using <tt>eval()</tt>, will return either a config object with an {@link Ext.Component#xtype xtype},
+ * or an instantiated Component. The server might return this for example:</p><pre><code>
+(function() {
+    function formatDate(value){
+        return value ? value.dateFormat('M d, Y') : '';
+    };
+
+    var store = new Ext.data.Store({
+        url: 'get-invoice-data.php',
+        baseParams: {
+            startDate: '01/01/2008',
+            endDate: '01/31/2008'
+        },
+        reader: new Ext.data.JsonReader({
+            record: 'transaction',
+            idProperty: 'id',
+            totalRecords: 'total'
+        }, [
+           'customer',
+           'invNo',
+           {name: 'date', type: 'date', dateFormat: 'm/d/Y'},
+           {name: 'value', type: 'float'}
+        ])
+    });
+
+    var grid = new Ext.grid.GridPanel({
+        title: 'Invoice Report',
+        bbar: new Ext.PagingToolbar(store),
+        store: store,
+        columns: [
+            {header: "Customer", width: 250, dataIndex: 'customer', sortable: true},
+            {header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},
+            {header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},
+            {header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}
+        ],
+    });
+    store.load();
+    return grid;  // return instantiated component
+})();
+</code></pre>
+ * <p>When the above code fragment is passed through the <tt>eval</tt> function in the success handler
+ * of the Ajax request, the code is executed by the Javascript processor, and the anonymous function
+ * runs, and returns the instantiated grid component.</p>
+ * <p>Note: since the code above is <i>generated</i> by a server script, the <tt>baseParams</tt> for
+ * the Store, the metadata to allow generation of the Record layout, and the ColumnModel
+ * can all be generated into the code since these are all known on the server.</p>
+ *
+ * @xtype container
+ */
+Ext.Container = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {Boolean} monitorResize
+     * True to automatically monitor window resize events to handle anything that is sensitive to the current size
+     * of the viewport.  This value is typically managed by the chosen <code>{@link #layout}</code> and should not need
+     * to be set manually.
+     */
+    /**
+     * @cfg {String/Object} layout
+     * When creating complex UIs, it is important to remember that sizing and
+     * positioning of child items is the responsibility of the Container's
+     * layout manager. If you expect child items to be sized in response to
+     * user interactions, <b>you must specify a layout manager</b> which
+     * creates and manages the type of layout you have in mind.  For example:<pre><code>
+new Ext.Window({
+    width:300, height: 300,
+    layout: 'fit', // explicitly set layout manager: override the default (layout:'auto')
+    items: [{
+        title: 'Panel inside a Window'
+    }]
+}).show();
+     * </code></pre>
+     * <p>Omitting the {@link #layout} config means that the
+     * {@link Ext.layout.ContainerLayout default layout manager} will be used which does
+     * nothing but render child components sequentially into the Container (no sizing or
+     * positioning will be performed in this situation).</p>
+     * <p>The layout manager class for this container may be specified as either as an
+     * Object or as a String:</p>
+     * <div><ul class="mdetail-params">
+     *
+     * <li><u>Specify as an Object</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: {
+    type: 'vbox',
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     *
+     * <li><tt><b>type</b></tt></li>
+     * <br/><p>The layout type to be used for this container.  If not specified,
+     * a default {@link Ext.layout.ContainerLayout} will be created and used.</p>
+     * <br/><p>Valid layout <tt>type</tt> values are:</p>
+     * <div class="sub-desc"><ul class="mdetail-params">
+     * <li><tt><b>{@link Ext.layout.AbsoluteLayout absolute}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AccordionLayout accordion}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AnchorLayout anchor}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ContainerLayout auto}</b></tt> &nbsp;&nbsp;&nbsp; <b>Default</b></li>
+     * <li><tt><b>{@link Ext.layout.BorderLayout border}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.CardLayout card}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ColumnLayout column}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FitLayout fit}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FormLayout form}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.HBoxLayout hbox}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.MenuLayout menu}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.TableLayout table}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ToolbarLayout toolbar}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.VBoxLayout vbox}</b></tt></li>
+     * </ul></div>
+     *
+     * <li>Layout specific configuration properties</li>
+     * <br/><p>Additional layout specific configuration properties may also be
+     * specified. For complete details regarding the valid config options for
+     * each layout type, see the layout class corresponding to the <tt>type</tt>
+     * specified.</p>
+     *
+     * </ul></div>
+     *
+     * <li><u>Specify as a String</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: 'vbox',
+layoutConfig: {
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     * <li><tt><b>layout</b></tt></li>
+     * <br/><p>The layout <tt>type</tt> to be used for this container (see list
+     * of valid layout type values above).</p><br/>
+     * <li><tt><b>{@link #layoutConfig}</b></tt></li>
+     * <br/><p>Additional layout specific configuration properties. For complete
+     * details regarding the valid config options for each layout type, see the
+     * layout class corresponding to the <tt>layout</tt> specified.</p>
+     * </ul></div></ul></div>
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * This is a config object containing properties specific to the chosen
+     * <b><code>{@link #layout}</code></b> if <b><code>{@link #layout}</code></b>
+     * has been specified as a <i>string</i>.</p>
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer
+     * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers
+     * with a large quantity of sub-components for which frequent layout calls would be expensive.
+     */
+    bufferResize: 100,
+    
+    /**
+     * @cfg {String/Number} activeItem
+     * A string component id or the numeric index of the component that should be initially activated within the
+     * container's layout on render.  For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first
+     * item in the container's collection).  activeItem only applies to layout styles that can display
+     * items one at a time (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} and
+     * {@link Ext.layout.FitLayout}).  Related to {@link Ext.layout.ContainerLayout#activeItem}.
+     */
+    /**
+     * @cfg {Object/Array} items
+     * <pre><b>** IMPORTANT</b>: be sure to specify a <b><code>{@link #layout}</code> ! **</b></pre>
+     * <p>A single item, or an array of child Components to be added to this container,
+     * for example:</p>
+     * <pre><code>
+// specifying a single item
+items: {...},
+layout: 'fit',    // specify a layout!
+
+// specifying multiple items
+items: [{...}, {...}],
+layout: 'anchor', // specify a layout!
+     * </code></pre>
+     * <p>Each item may be:</p>
+     * <div><ul class="mdetail-params">
+     * <li>any type of object based on {@link Ext.Component}</li>
+     * <li>a fully instanciated object or</li>
+     * <li>an object literal that:</li>
+     * <div><ul class="mdetail-params">
+     * <li>has a specified <code>{@link Ext.Component#xtype xtype}</code></li>
+     * <li>the {@link Ext.Component#xtype} specified is associated with the Component
+     * desired and should be chosen from one of the available xtypes as listed
+     * in {@link Ext.Component}.</li>
+     * <li>If an <code>{@link Ext.Component#xtype xtype}</code> is not explicitly
+     * specified, the {@link #defaultType} for that Container is used.</li>
+     * <li>will be "lazily instanciated", avoiding the overhead of constructing a fully
+     * instanciated Component object</li>
+     * </ul></div></ul></div>
+     * <p><b>Notes</b>:</p>
+     * <div><ul class="mdetail-params">
+     * <li>Ext uses lazy rendering. Child Components will only be rendered
+     * should it become necessary. Items are automatically laid out when they are first
+     * shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.</li>
+     * <li>Do not specify <code>{@link Ext.Panel#contentEl contentEl}</code>/
+     * <code>{@link Ext.Panel#html html}</code> with <code>items</code>.</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} defaults
+     * <p>A config object that will be applied to all components added to this container either via the {@link #items}
+     * config or via the {@link #add} or {@link #insert} methods.  The <tt>defaults</tt> config can contain any
+     * number of name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the container.  For example, to automatically apply padding to the body of each of a set of
+     * contained {@link Ext.Panel} items, you could pass: <tt>defaults: {bodyStyle:'padding:15px'}</tt>.</p><br/>
+     * <p><b>Note</b>: <tt>defaults</tt> will not be applied to config objects if the option is already specified.
+     * For example:</p><pre><code>
+defaults: {               // defaults are applied to items, not the container
+    autoScroll:true
+},
+items: [
+    {
+        xtype: 'panel',   // defaults <b>do not</b> have precedence over
+        id: 'panel1',     // options in config objects, so the defaults
+        autoScroll: false // will not be applied here, panel1 will be autoScroll:false
+    },
+    new Ext.Panel({       // defaults <b>do</b> have precedence over options
+        id: 'panel2',     // options in components, so the defaults
+        autoScroll: false // will be applied here, panel2 will be autoScroll:true.
+    })
+]
+     * </code></pre>
+     */
+
+
+    /** @cfg {Boolean} autoDestroy
+     * If true the container will automatically destroy any contained component that is removed from it, else
+     * destruction must be handled manually (defaults to true).
+     */
+    autoDestroy : true,
+
+    /** @cfg {Boolean} forceLayout
+     * If true the container will force a layout initially even if hidden or collapsed. This option
+     * is useful for forcing forms to render in collapsed or hidden containers. (defaults to false).
+     */
+    forceLayout: false,
+
+    /** @cfg {Boolean} hideBorders
+     * True to hide the borders of each contained component, false to defer to the component's existing
+     * border settings (defaults to false).
+     */
+    /** @cfg {String} defaultType
+     * <p>The default {@link Ext.Component xtype} of child Components to create in this Container when
+     * a child item is specified as a raw configuration object, rather than as an instantiated Component.</p>
+     * <p>Defaults to <tt>'panel'</tt>, except {@link Ext.menu.Menu} which defaults to <tt>'menuitem'</tt>,
+     * and {@link Ext.Toolbar} and {@link Ext.ButtonGroup} which default to <tt>'button'</tt>.</p>
+     */
+    defaultType : 'panel',
+
+    // private
+    initComponent : function(){
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event afterlayout
+             * Fires when the components in this container are arranged by the associated layout manager.
+             * @param {Ext.Container} this
+             * @param {ContainerLayout} layout The ContainerLayout implementation for this container
+             */
+            'afterlayout',
+            /**
+             * @event beforeadd
+             * Fires before any {@link Ext.Component} is added or inserted into the container.
+             * A handler can return false to cancel the add.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being added
+             * @param {Number} index The index at which the component will be added to the container's items collection
+             */
+            'beforeadd',
+            /**
+             * @event beforeremove
+             * Fires before any {@link Ext.Component} is removed from the container.  A handler can return
+             * false to cancel the remove.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being removed
+             */
+            'beforeremove',
+            /**
+             * @event add
+             * @bubbles
+             * Fires after any {@link Ext.Component} is added or inserted into the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was added
+             * @param {Number} index The index at which the component was added to the container's items collection
+             */
+            'add',
+            /**
+             * @event remove
+             * @bubbles
+             * Fires after any {@link Ext.Component} is removed from the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was removed
+             */
+            'remove'
+        );
+
+		this.enableBubble('add', 'remove');
+
+        /**
+         * The collection of components in this container as a {@link Ext.util.MixedCollection}
+         * @type MixedCollection
+         * @property items
+         */
+        var items = this.items;
+        if(items){
+            delete this.items;
+            if(Ext.isArray(items) && items.length > 0){
+                this.add.apply(this, items);
+            }else{
+                this.add(items);
+            }
+        }
+    },
+
+    // private
+    initItems : function(){
+        if(!this.items){
+            this.items = new Ext.util.MixedCollection(false, this.getComponentId);
+            this.getLayout(); // initialize the layout
+        }
+    },
+
+    // private
+    setLayout : function(layout){
+        if(this.layout && this.layout != layout){
+            this.layout.setContainer(null);
+        }
+        this.initItems();
+        this.layout = layout;
+        layout.setContainer(this);
+    },
+
+    // private
+    render : function(){
+        Ext.Container.superclass.render.apply(this, arguments);
+        if(this.layout){
+            if(Ext.isObject(this.layout) && !this.layout.layout){
+                this.layoutConfig = this.layout;
+                this.layout = this.layoutConfig.type;
+            }
+            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 item = this.activeItem;
+                delete this.activeItem;
+                this.layout.setActiveItem(item);
+            }
+        }
+        if(!this.ownerCt){
+            // force a layout if no ownerCt is set
+            this.doLayout(false, true);
+        }
+        if(this.monitorResize === true){
+            Ext.EventManager.onWindowResize(this.doLayout, this, [false]);
+        }
+    },
+
+    /**
+     * <p>Returns the Element to be used to contain the child Components of this Container.</p>
+     * <p>An implementation is provided which returns the Container's {@link #getEl Element}, but
+     * if there is a more complex structure to a Container, this may be overridden to return
+     * the element into which the {@link #layout layout} renders child Components.</p>
+     * @return {Ext.Element} The Element to render child Components into.
+     */
+    getLayoutTarget : function(){
+        return this.el;
+    },
+
+    // private - used as the key lookup function for the items collection
+    getComponentId : function(comp){
+        return comp.getItemId();
+    },
+
+    /**
+     * <p>Adds {@link Ext.Component Component}(s) to this Container.</p>
+     * <br><p><b>Description</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>Fires the {@link #beforeadd} event before adding</li>
+     * <li>The Container's {@link #defaults default config values} will be applied
+     * accordingly (see <code>{@link #defaults}</code> for details).</li>
+     * <li>Fires the {@link #add} event after the component has been added.</li>
+     * </ul></div>
+     * <br><p><b>Notes</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>If the Container is <i>already rendered</i> when <tt>add</tt>
+     * is called, you may need to call {@link #doLayout} to refresh the view which causes
+     * any unrendered child Components to be rendered. This is required so that you can
+     * <tt>add</tt> multiple child components if needed while only refreshing the layout
+     * once. For example:<pre><code>
+var tb = new {@link Ext.Toolbar}();
+tb.render(document.body);  // toolbar is rendered
+tb.add({text:'Button 1'}); // add multiple items ({@link #defaultType} for {@link Ext.Toolbar Toolbar} is 'button')
+tb.add({text:'Button 2'});
+tb.{@link #doLayout}();             // refresh the layout
+     * </code></pre></li>
+     * <li><i>Warning:</i> Containers directly managed by the BorderLayout layout manager
+     * may not be removed or added.  See the Notes for {@link Ext.layout.BorderLayout BorderLayout}
+     * for more details.</li>
+     * </ul></div>
+     * @param {Object/Array} component
+     * <p>Either a single component or an Array of components to add.  See
+     * <code>{@link #items}</code> for additional information.</p>
+     * @param {Object} (Optional) component_2
+     * @param {Object} (Optional) component_n
+     * @return {Ext.Component} component The Component (or config object) that was added.
+     */
+    add : function(comp){
+        this.initItems();
+        var args = arguments.length > 1;
+        if(args || Ext.isArray(comp)){
+            Ext.each(args ? arguments : comp, function(c){
+                this.add(c);
+            }, this);
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+        var pos = this.items.length;
+        if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){
+            this.items.add(c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, pos);
+        }
+        return c;
+    },
+
+    /**
+     * Inserts a Component into this Container at a specified index. Fires the
+     * {@link #beforeadd} event before inserting, then fires the {@link #add} event after the
+     * Component has been inserted.
+     * @param {Number} index The index at which the Component will be inserted
+     * into the Container's items collection
+     * @param {Ext.Component} component The child Component to insert.<br><br>
+     * Ext uses lazy rendering, and will only render the inserted Component should
+     * it become necessary.<br><br>
+     * A Component config object may be passed in order to avoid the overhead of
+     * constructing a real Component object if lazy rendering might mean that the
+     * inserted Component will not be rendered immediately. To take advantage of
+     * this 'lazy instantiation', set the {@link Ext.Component#xtype} config
+     * property to the registered type of the Component wanted.<br><br>
+     * For a list of all available xtypes, see {@link Ext.Component}.
+     * @return {Ext.Component} component The Component (or config object) that was
+     * inserted with the Container's default config values applied.
+     */
+    insert : function(index, comp){
+        this.initItems();
+        var a = arguments, len = a.length;
+        if(len > 2){
+            for(var i = len-1; i >= 1; --i) {
+                this.insert(index, a[i]);
+            }
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+
+        if(c.ownerCt == this && this.items.indexOf(c) < index){
+            --index;
+        }
+
+        if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){
+            this.items.insert(index, c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, index);
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(this.defaults){
+            if(typeof c == 'string'){
+                c = Ext.ComponentMgr.get(c);
+                Ext.apply(c, this.defaults);
+            }else if(!c.events){
+                Ext.applyIf(c, this.defaults);
+            }else{
+                Ext.apply(c, this.defaults);
+            }
+        }
+        return c;
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        if(item.ownerCt){
+            item.ownerCt.remove(item, false);
+        }
+        if(this.hideBorders === true){
+            item.border = (item.border === true);
+        }
+    },
+
+    /**
+     * Removes a component from this container.  Fires the {@link #beforeremove} event before removing, then fires
+     * the {@link #remove} event after the component has been removed.
+     * @param {Component/String} component The component reference or id to remove.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Ext.Component} component The Component that was removed.
+     */
+    remove : function(comp, autoDestroy){
+        this.initItems();
+        var c = this.getComponent(comp);
+        if(c && this.fireEvent('beforeremove', this, c) !== false){
+            this.items.remove(c);
+            delete c.ownerCt;
+            if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){
+                c.destroy();
+            }
+            if(this.layout && this.layout.activeItem == c){
+                delete this.layout.activeItem;
+            }
+            this.fireEvent('remove', this, c);
+        }
+        return c;
+    },
+
+    /**
+     * Removes all components from this container.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Array} Array of the destroyed components
+     */
+    removeAll: function(autoDestroy){
+        this.initItems();
+        var item, rem = [], items = [];
+        this.items.each(function(i){
+            rem.push(i);
+        });
+        for (var i = 0, len = rem.length; i < len; ++i){
+            item = rem[i];
+            this.remove(item, autoDestroy);
+            if(item.ownerCt !== this){
+                items.push(item);
+            }
+        }
+        return items;
+    },
+
+    /**
+     * Examines this container's <code>{@link #items}</code> <b>property</b>
+     * and gets a direct child component of this container.
+     * @param {String/Number} comp This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link #items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     * @return Ext.Component The component (if found).
+     */
+    getComponent : function(comp){
+        if(Ext.isObject(comp)){
+            return comp;
+        }
+        return this.items.get(comp);
+    },
+
+    // private
+    lookupComponent : function(comp){
+        if(typeof comp == 'string'){
+            return Ext.ComponentMgr.get(comp);
+        }else if(!comp.events){
+            return this.createComponent(comp);
+        }
+        return comp;
+    },
+
+    // private
+    createComponent : function(config){
+        return Ext.create(config, this.defaultType);
+    },
+
+    /**
+     * Force this container's layout to be recalculated. A call to this function is required after adding a new component
+     * to an already rendered container, or possibly after changing sizing/position properties of child components.
+     * @param {Boolean} shallow (optional) True to only calc the layout of this component, and let child components auto
+     * calc layouts as required (defaults to false, which calls doLayout recursively for each subcontainer)
+     * @param {Boolean} force (optional) True to force a layout to occur, even if the item is hidden.
+     * @return {Ext.Container} this
+     */
+    doLayout: function(shallow, force){
+        var rendered = this.rendered,
+            forceLayout = this.forceLayout;
+
+        if(!this.isVisible() || this.collapsed){
+            this.deferLayout = this.deferLayout || !shallow;
+            if(!(force || forceLayout)){
+                return;
+            }
+            shallow = shallow && !this.deferLayout;
+        } else {
+            delete this.deferLayout;
+        }
+        if(rendered && this.layout){
+            this.layout.layout();
+        }
+        if(shallow !== true && this.items){
+            var cs = this.items.items;
+            for(var i = 0, len = cs.length; i < len; i++){
+                var c = cs[i];
+                if(c.doLayout){
+                    c.forceLayout = forceLayout;
+                    c.doLayout();
+                }
+            }
+        }
+        if(rendered){
+            this.onLayout(shallow, force);
+        }
+        delete this.forceLayout;
+    },
+
+    //private
+    onLayout : Ext.emptyFn,
+
+    onShow : function(){
+        Ext.Container.superclass.onShow.call(this);
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+    },
+
+    /**
+     * Returns the layout currently in use by the container.  If the container does not currently have a layout
+     * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout.
+     * @return {ContainerLayout} layout The container's layout
+     */
+    getLayout : function(){
+        if(!this.layout){
+            var layout = new Ext.layout.ContainerLayout(this.layoutConfig);
+            this.setLayout(layout);
+        }
+        return this.layout;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.items){
+            Ext.destroy.apply(Ext, this.items.items);
+        }
+        if(this.monitorResize){
+            Ext.EventManager.removeResizeListener(this.doLayout, this);
+        }
+        Ext.destroy(this.layout);
+        Ext.Container.superclass.beforeDestroy.call(this);
+    },
+
+    /**
+     * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current component)
+     * @return {Ext.Container} this
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.ownerCt;
+        }
+        return this;
+    },
+
+    /**
+     * Cascades down the component/container heirarchy from this component (called first), calling the specified function with
+     * each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current component)
+     * @param {Array} args (optional) The args to call the function with (defaults to passing the current component)
+     * @return {Ext.Container} this
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            if(this.items){
+                var cs = this.items.items;
+                for(var i = 0, len = cs.length; i < len; i++){
+                    if(cs[i].cascade){
+                        cs[i].cascade(fn, scope, args);
+                    }else{
+                        fn.apply(scope || cs[i], args || [cs[i]]);
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Find a component under this container at any level by id
+     * @param {String} id
+     * @return Ext.Component
+     */
+    findById : function(id){
+        var m, ct = this;
+        this.cascade(function(c){
+            if(ct != c && c.id === id){
+                m = c;
+                return false;
+            }
+        });
+        return m || null;
+    },
+
+    /**
+     * Find a component under this container at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Array} Array of Ext.Components
+     */
+    findByType : function(xtype, shallow){
+        return this.findBy(function(c){
+            return c.isXType(xtype, shallow);
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by property
+     * @param {String} prop
+     * @param {String} value
+     * @return {Array} Array of Ext.Components
+     */
+    find : function(prop, value){
+        return this.findBy(function(c){
+            return c[prop] === value;
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by a custom function. If the passed function returns
+     * true, the component will be included in the results. The passed function is called with the arguments (component, this container).
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional)
+     * @return {Array} Array of Ext.Components
+     */
+    findBy : function(fn, scope){
+        var m = [], ct = this;
+        this.cascade(function(c){
+            if(ct != c && fn.call(scope || c, c, ct) === true){
+                m.push(c);
+            }
+        });
+        return m;
+    },
+
+    /**
+     * Get a component contained by this container (alias for items.get(key))
+     * @param {String/Number} key The index or id of the component
+     * @return {Ext.Component} Ext.Component
+     */
+    get : function(key){
+        return this.items.get(key);
+    }
+});
+
+Ext.Container.LAYOUTS = {};
+Ext.reg('container', Ext.Container);
+/**
+ * @class Ext.layout.ContainerLayout
+ * <p>The ContainerLayout class is the default layout manager delegated by {@link Ext.Container} to
+ * render any child Components when no <tt>{@link Ext.Container#layout layout}</tt> is configured into
+ * a {@link Ext.Container Container}. ContainerLayout provides the basic foundation for all other layout
+ * classes in Ext. It simply renders all child Components into the Container, performing no sizing or
+ * positioning services. To utilize a layout that provides sizing and positioning of child Components,
+ * specify an appropriate <tt>{@link Ext.Container#layout layout}</tt>.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ */
+Ext.layout.ContainerLayout = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.layout.ContainerLayout.prototype = {
+    /**
+     * @cfg {String} extraCls
+     * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
+     * customized styles to the container or any of its children using standard CSS rules. See
+     * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.</p>
+     * <p><b>Note</b>: <tt>extraCls</tt> defaults to <tt>''</tt> except for the following classes
+     * which assign a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.AbsoluteLayout Absolute Layout} : <tt>'x-abs-layout-item'</tt></li>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-item'</tt></li>
+     * <li>{@link Ext.layout.ColumnLayout Column Layout} : <tt>'x-column'</tt></li>
+     * </ul></div>
+     * To configure the above Classes with an extra CSS class append to the default.  For example,
+     * for ColumnLayout:<pre><code>
+     * extraCls: 'x-column custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} renderHidden
+     * True to hide each contained item on render (defaults to false).
+     */
+
+    /**
+     * A reference to the {@link Ext.Component} that is active.  For example, <pre><code>
+     * if(myPanel.layout.activeItem.id == 'item-1') { ... }
+     * </code></pre>
+     * <tt>activeItem</tt> only applies to layout styles that can display items one at a time
+     * (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout}
+     * and {@link Ext.layout.FitLayout}).  Read-only.  Related to {@link Ext.Container#activeItem}.
+     * @type {Ext.Component}
+     * @property activeItem
+     */
+
+    // private
+    monitorResize:false,
+    // private
+    activeItem : null,
+
+    // private
+    layout : function(){
+        var target = this.container.getLayoutTarget();
+        this.onLayout(this.container, target);
+        this.container.fireEvent('afterlayout', this.container, this);
+    },
+
+    // private
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+    },
+
+    // private
+    isValidParent : function(c, target){
+		return target && c.getDomPositionEl().dom.parentNode == (target.dom || target);
+    },
+
+    // private
+    renderAll : function(ct, target){
+        var items = ct.items.items;
+        for(var i = 0, len = items.length; i < len; i++) {
+            var c = items[i];
+            if(c && (!c.rendered || !this.isValidParent(c, target))){
+                this.renderItem(c, i, target);
+            }
+        }
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(target, position);
+            this.configureItem(c, position);
+        }else if(c && !this.isValidParent(c, target)){
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getDomPositionEl().dom, position || null);
+            c.container = target;
+            this.configureItem(c, position);
+        }
+    },
+    
+    // private
+    configureItem: function(c, position){
+        if(this.extraCls){
+            var t = c.getPositionEl ? c.getPositionEl() : c;
+            t.addClass(this.extraCls);
+        }
+        if (this.renderHidden && c != this.activeItem) {
+            c.hide();
+        }
+        if(c.doLayout){
+            c.doLayout(false, this.forceLayout);
+        }
+    },
+
+    // private
+    onResize: function(){
+        if(this.container.collapsed){
+            return;
+        }
+        var b = this.container.bufferResize;
+        if(b){
+            if(!this.resizeTask){
+                this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this);
+                this.resizeBuffer = typeof b == 'number' ? b : 100;
+            }
+            this.resizeTask.delay(this.resizeBuffer);
+        }else{
+            this.runLayout();
+        }
+    },
+    
+    // private
+    runLayout: function(){
+        this.layout();
+        this.container.onLayout();
+    },
+
+    // private
+    setContainer : function(ct){
+        if(this.monitorResize && ct != this.container){
+            if(this.container){
+                this.container.un('resize', this.onResize, this);
+                this.container.un('bodyresize', this.onResize, this);
+            }
+            if(ct){
+                ct.on({
+                    scope: this,
+                    resize: this.onResize,
+                    bodyresize: this.onResize
+                });
+            }
+        }
+        this.container = ct;
+    },
+
+    // private
+    parseMargins : function(v){
+        if(typeof v == 'number'){
+            v = v.toString();
+        }
+        var ms = v.split(' ');
+        var len = ms.length;
+        if(len == 1){
+            ms[1] = ms[0];
+            ms[2] = ms[0];
+            ms[3] = ms[0];
+        }
+        if(len == 2){
+            ms[2] = ms[0];
+            ms[3] = ms[1];
+        }
+        if(len == 3){
+            ms[3] = ms[1];
+        }
+        return {
+            top:parseInt(ms[0], 10) || 0,
+            right:parseInt(ms[1], 10) || 0,
+            bottom:parseInt(ms[2], 10) || 0,
+            left:parseInt(ms[3], 10) || 0
+        };
+    },
+
+    /**
+     * The {@link Template Ext.Template} used by Field rendering layout classes (such as
+     * {@link Ext.layout.FormLayout}) to create the DOM structure of a fully wrapped,
+     * labeled and styled form Field. A default Template is supplied, but this may be
+     * overriden to create custom field structures. The template processes values returned from
+     * {@link Ext.layout.FormLayout#getTemplateArgs}.
+     * @property fieldTpl
+     * @type Ext.Template
+     */
+    fieldTpl: (function() {
+        var t = new Ext.Template(
+            '<div class="x-form-item {itemCls}" tabIndex="-1">',
+                '<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
+                '<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">',
+                '</div><div class="{clearCls}"></div>',
+            '</div>'
+        );
+        t.disableFormats = true;
+        return t.compile();
+    })(),
+	
+    /*
+     * Destroys this layout. This is a template method that is empty by default, but should be implemented
+     * by subclasses that require explicit destruction to purge event handlers or remove DOM nodes.
+     * @protected
+     */
+    destroy : Ext.emptyFn
+};
+Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout;/**
+ * @class Ext.layout.FitLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a base class for layouts that contain <b>a single item</b> that automatically expands to fill the layout's
+ * container.  This class is intended to be extended or created via the <tt>layout:'fit'</tt> {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>FitLayout does not have any direct config options (other than inherited ones).  To fit a panel to a container
+ * using FitLayout, simply set layout:'fit' on the container and add a single panel to it.  If the container has
+ * multiple panels, only the first one will be displayed.  Example usage:</p>
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Fit Layout',
+    layout:'fit',
+    items: {
+        title: 'Inner Panel',
+        html: '&lt;p&gt;This is the inner panel content&lt;/p&gt;',
+        border: false
+    }
+});
+</code></pre>
+ */
+Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target);
+        if(!this.container.collapsed){
+            var sz = (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getViewSize() : target.getStyleSize();
+            this.setItemSize(this.activeItem || ct.items.itemAt(0), sz);
+        }
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(item && size.height > 0){ // display none?
+            item.setSize(size);
+        }
+    }
+});
+Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;/**
+ * @class Ext.layout.CardLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be
+ * visible at any given time.  This layout style is most commonly used for wizards, tab implementations, etc.
+ * This class is intended to be extended or created via the layout:'card' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>The CardLayout's focal method is {@link #setActiveItem}.  Since only one panel is displayed at a time,
+ * the only way to move from one Component to the next is by calling setActiveItem, passing the id or index of
+ * the next panel to display.  The layout itself does not provide a user interface for handling this navigation,
+ * so that functionality must be provided by the developer.</p>
+ * <p>In the following example, a simplistic wizard setup is demonstrated.  A button bar is added
+ * to the footer of the containing panel to provide navigation buttons.  The buttons will be handled by a
+ * common navigation routine -- for this example, the implementation of that routine has been ommitted since
+ * it can be any type of custom logic.  Note that other uses of a CardLayout (like a tab control) would require a
+ * completely different implementation.  For serious implementations, a better approach would be to extend
+ * CardLayout to provide the custom functionality needed.  Example usage:</p>
+ * <pre><code>
+var navHandler = function(direction){
+    // This routine could contain business logic required to manage the navigation steps.
+    // It would call setActiveItem as needed, manage navigation button state, handle any
+    // branching logic that might be required, handle alternate actions like cancellation
+    // or finalization, etc.  A complete wizard implementation could get pretty
+    // sophisticated depending on the complexity required, and should probably be
+    // done as a subclass of CardLayout in a real-world implementation.
+};
+
+var card = new Ext.Panel({
+    title: 'Example Wizard',
+    layout:'card',
+    activeItem: 0, // make sure the active item is set on the container config!
+    bodyStyle: 'padding:15px',
+    defaults: {
+        // applied to each contained panel
+        border:false
+    },
+    // just an example of one possible navigation scheme, using buttons
+    bbar: [
+        {
+            id: 'move-prev',
+            text: 'Back',
+            handler: navHandler.createDelegate(this, [-1]),
+            disabled: true
+        },
+        '->', // greedy spacer so that the buttons are aligned to each side
+        {
+            id: 'move-next',
+            text: 'Next',
+            handler: navHandler.createDelegate(this, [1])
+        }
+    ],
+    // the panels (or "cards") within the layout
+    items: [{
+        id: 'card-0',
+        html: '&lt;h1&gt;Welcome to the Wizard!&lt;/h1&gt;&lt;p&gt;Step 1 of 3&lt;/p&gt;'
+    },{
+        id: 'card-1',
+        html: '&lt;p&gt;Step 2 of 3&lt;/p&gt;'
+    },{
+        id: 'card-2',
+        html: '&lt;h1&gt;Congratulations!&lt;/h1&gt;&lt;p&gt;Step 3 of 3 - Complete&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} deferredRender
+     * True to render each contained item at the time it becomes active, false to render all contained items
+     * as soon as the layout is rendered (defaults to false).  If there is a significant amount of content or
+     * a lot of heavy controls being rendered into panels that are not displayed by default, setting this to
+     * true might improve performance.
+     */
+    deferredRender : false,
+    
+    /**
+     * @cfg {Boolean} layoutOnCardChange
+     * True to force a layout of the active item when the active card is changed. Defaults to false.
+     */
+    layoutOnCardChange : false,
+
+    /**
+     * @cfg {Boolean} renderHidden @hide
+     */
+    // private
+    renderHidden : true,
+    
+    constructor: function(config){
+        Ext.layout.CardLayout.superclass.constructor.call(this, config);
+        this.forceLayout = (this.deferredRender === false);
+    },
+
+    /**
+     * Sets the active (visible) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(this.activeItem){
+                this.activeItem.hide();
+            }
+            this.activeItem = item;
+            item.show();
+            this.container.doLayout();
+            if(this.layoutOnCardChange && item.doLayout){
+                item.doLayout();
+            }
+        }
+    },
+
+    // private
+    renderAll : function(ct, target){
+        if(this.deferredRender){
+            this.renderItem(this.activeItem, undefined, target);
+        }else{
+            Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target);
+        }
+    }
+});
+Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;/**
+ * @class Ext.layout.AnchorLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a layout that enables anchoring of contained elements relative to the container's dimensions.
+ * If the container is resized, all anchored items are automatically rerendered according to their
+ * <b><tt>{@link #anchor}</tt></b> rules.</p>
+ * <p>This class is intended to be extended or created via the layout:'anchor' {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>AnchorLayout does not have any direct config options (other than inherited ones). By default,
+ * AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the
+ * container using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>.
+ * If anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating
+ * anchor measurements based on it instead, allowing the container to be sized independently of the anchoring
+ * logic if necessary.  For example:</p>
+ * <pre><code>
+var viewport = new Ext.Viewport({
+    layout:'anchor',
+    anchorSize: {width:800, height:600},
+    items:[{
+        title:'Item 1',
+        html:'Content 1',
+        width:800,
+        anchor:'right 20%'
+    },{
+        title:'Item 2',
+        html:'Content 2',
+        width:300,
+        anchor:'50% 30%'
+    },{
+        title:'Item 3',
+        html:'Content 3',
+        width:600,
+        anchor:'-100 50%'
+    }]
+});
+ * </code></pre>
+ */
+Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {String} anchor
+     * <p>This configuation option is to be applied to <b>child <tt>items</tt></b> of a container managed by
+     * this layout (ie. configured with <tt>layout:'anchor'</tt>).</p><br/>
+     * 
+     * <p>This value is what tells the layout how an item should be anchored to the container. <tt>items</tt>
+     * added to an AnchorLayout accept an anchoring-specific config property of <b>anchor</b> which is a string
+     * containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').
+     * The following types of anchor values are supported:<div class="mdetail-params"><ul>
+     * 
+     * <li><b>Percentage</b> : Any value between 1 and 100, expressed as a percentage.<div class="sub-desc">
+     * The first anchor is the percentage width that the item should take up within the container, and the
+     * second is the percentage height.  For example:<pre><code>
+// two values specified
+anchor: '100% 50%' // render item complete width of the container and
+                   // 1/2 height of the container
+// one value specified
+anchor: '100%'     // the width value; the height will default to auto
+     * </code></pre></div></li>
+     * 
+     * <li><b>Offsets</b> : Any positive or negative integer value.<div class="sub-desc">
+     * This is a raw adjustment where the first anchor is the offset from the right edge of the container,
+     * and the second is the offset from the bottom edge. For example:<pre><code>
+// two values specified
+anchor: '-50 -100' // render item the complete width of the container
+                   // minus 50 pixels and
+                   // the complete height minus 100 pixels.
+// one value specified
+anchor: '-50'      // anchor value is assumed to be the right offset value
+                   // bottom offset will default to 0
+     * </code></pre></div></li>
+     * 
+     * <li><b>Sides</b> : Valid values are <tt>'right'</tt> (or <tt>'r'</tt>) and <tt>'bottom'</tt>
+     * (or <tt>'b'</tt>).<div class="sub-desc">
+     * Either the container must have a fixed size or an anchorSize config value defined at render time in
+     * order for these to have any effect.</div></li>
+     *
+     * <li><b>Mixed</b> : <div class="sub-desc">
+     * Anchor values can also be mixed as needed.  For example, to render the width offset from the container
+     * right edge by 50 pixels and 75% of the container's height use:
+     * <pre><code>
+anchor: '-50 75%' 
+     * </code></pre></div></li>
+     * 
+     * 
+     * </ul></div>
+     */
+    
+    // private
+    monitorResize:true,
+
+    // private
+    getAnchorViewSize : function(ct, target){
+        return target.dom == document.body ?
+                   target.getViewSize() : target.getStyleSize();
+    },
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target);
+
+        var size = this.getAnchorViewSize(ct, target);
+
+        var w = size.width, h = size.height;
+
+        if(w < 20 && h < 20){
+            return;
+        }
+
+        // find the container anchoring size
+        var aw, ah;
+        if(ct.anchorSize){
+            if(typeof ct.anchorSize == 'number'){
+                aw = ct.anchorSize;
+            }else{
+                aw = ct.anchorSize.width;
+                ah = ct.anchorSize.height;
+            }
+        }else{
+            aw = ct.initialConfig.width;
+            ah = ct.initialConfig.height;
+        }
+
+        var cs = ct.items.items, len = cs.length, i, c, a, cw, ch;
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.anchor){
+                a = c.anchorSpec;
+                if(!a){ // cache all anchor values
+                    var vs = c.anchor.split(' ');
+                    c.anchorSpec = a = {
+                        right: this.parseAnchor(vs[0], c.initialConfig.width, aw),
+                        bottom: this.parseAnchor(vs[1], c.initialConfig.height, ah)
+                    };
+                }
+                cw = a.right ? this.adjustWidthAnchor(a.right(w), c) : undefined;
+                ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h), c) : undefined;
+
+                if(cw || ch){
+                    c.setSize(cw || undefined, ch || undefined);
+                }
+            }
+        }
+    },
+
+    // private
+    parseAnchor : function(a, start, cstart){
+        if(a && a != 'none'){
+            var last;
+            if(/^(r|right|b|bottom)$/i.test(a)){   // standard anchor
+                var diff = cstart - start;
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return v - diff;
+                    }
+                }
+            }else if(a.indexOf('%') != -1){
+                var ratio = parseFloat(a.replace('%', ''))*.01;   // percentage
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return Math.floor(v*ratio);
+                    }
+                }
+            }else{
+                a = parseInt(a, 10);
+                if(!isNaN(a)){                            // simple offset adjustment
+                    return function(v){
+                        if(v !== last){
+                            last = v;
+                            return v + a;
+                        }
+                    }
+                }
+            }
+        }
+        return false;
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return value;
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout;/**
+ * @class Ext.layout.ColumnLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is the layout style of choice for creating structural layouts in a multi-column format where the width of
+ * each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content.
+ * This class is intended to be extended or created via the layout:'column' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>ColumnLayout does not have any direct config options (other than inherited ones), but it does support a
+ * specific config property of <b><tt>columnWidth</tt></b> that can be included in the config of any panel added to it.  The
+ * layout will use the columnWidth (if present) or width of each panel during layout to determine how to size each panel.
+ * If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).</p>
+ * <p>The width property is always evaluated as pixels, and must be a number greater than or equal to 1.
+ * The columnWidth property is always evaluated as a percentage, and must be a decimal value greater than 0 and
+ * less than 1 (e.g., .25).</p>
+ * <p>The basic rules for specifying column widths are pretty simple.  The logic makes two passes through the
+ * set of contained panels.  During the first layout pass, all panels that either have a fixed width or none
+ * specified (auto) are skipped, but their widths are subtracted from the overall container width.  During the second
+ * pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on
+ * the total <b>remaining</b> container width.  In other words, percentage width panels are designed to fill the space
+ * left over by all the fixed-width and/or auto-width panels.  Because of this, while you can specify any number of columns
+ * with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your
+ * layout may not render as expected.  Example usage:</p>
+ * <pre><code>
+// All columns are percentages -- they must add up to 1
+var p = new Ext.Panel({
+    title: 'Column Layout - Percentage Only',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        columnWidth: .25 
+    },{
+        title: 'Column 2',
+        columnWidth: .6
+    },{
+        title: 'Column 3',
+        columnWidth: .15
+    }]
+});
+
+// Mix of width and columnWidth -- all columnWidth values must add up
+// to 1. The first column will take up exactly 120px, and the last two
+// columns will fill the remaining container width.
+var p = new Ext.Panel({
+    title: 'Column Layout - Mixed',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        width: 120
+    },{
+        title: 'Column 2',
+        columnWidth: .8
+    },{
+        title: 'Column 3',
+        columnWidth: .2
+    }]
+});
+</code></pre>
+ */
+Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    
+    extraCls: 'x-column',
+
+    scrollOffset : 0,
+
+    // private
+    isValidParent : function(c, target){
+        return (c.getPositionEl ? c.getPositionEl() : c.getEl()).dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.innerCt){
+            target.addClass('x-column-layout-ct');
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:'x-column-inner'});
+            this.innerCt.createChild({cls:'x-clear'});
+        }
+        this.renderAll(ct, this.innerCt);
+
+        var size = Ext.isIE && target.dom != Ext.getBody().dom ? target.getStyleSize() : target.getViewSize();
+
+        if(size.width < 1 && size.height < 1){ // display none?
+            return;
+        }
+
+        var w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            pw = w;
+
+        this.innerCt.setWidth(w);
+        
+        // some columns can be percentages while others are fixed
+        // so we need to make 2 passes
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(!c.columnWidth){
+                pw -= (c.getSize().width + c.getEl().getMargins('lr'));
+            }
+        }
+
+        pw = pw < 0 ? 0 : pw;
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.columnWidth){
+                c.setSize(Math.floor(c.columnWidth*pw) - c.getEl().getMargins('lr'));
+            }
+        }
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout;/**
+ * @class Ext.layout.BorderLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a multi-pane, application-oriented UI layout style that supports multiple
+ * nested panels, automatic {@link Ext.layout.BorderLayout.Region#split split} bars between
+ * {@link Ext.layout.BorderLayout.Region#BorderLayout.Region regions} and built-in
+ * {@link Ext.layout.BorderLayout.Region#collapsible expanding and collapsing} of regions.</p>
+ * <p>This class is intended to be extended or created via the <tt>layout:'border'</tt>
+ * {@link Ext.Container#layout} config, and should generally not need to be created directly
+ * via the new keyword.</p>
+ * <p>BorderLayout does not have any direct config options (other than inherited ones).
+ * All configuration options available for customizing the BorderLayout are at the
+ * {@link Ext.layout.BorderLayout.Region} and {@link Ext.layout.BorderLayout.SplitRegion}
+ * levels.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var myBorderPanel = new Ext.Panel({
+    {@link Ext.Component#renderTo renderTo}: document.body,
+    {@link Ext.BoxComponent#width width}: 700,
+    {@link Ext.BoxComponent#height height}: 500,
+    {@link Ext.Panel#title title}: 'Border Layout',
+    {@link Ext.Container#layout layout}: 'border',
+    {@link Ext.Container#items items}: [{
+        {@link Ext.Panel#title title}: 'South Region is resizable',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'south',     // position for region
+        {@link Ext.BoxComponent#height height}: 100,
+        {@link Ext.layout.BorderLayout.Region#split split}: true,         // enable resizing
+        {@link Ext.SplitBar#minSize minSize}: 75,         // defaults to {@link Ext.layout.BorderLayout.Region#minHeight 50} 
+        {@link Ext.SplitBar#maxSize maxSize}: 150,
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '0 5 5 5'
+    },{
+        // xtype: 'panel' implied by default
+        {@link Ext.Panel#title title}: 'West Region is collapsible',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}:'west',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 0 0 5',
+        {@link Ext.BoxComponent#width width}: 200,
+        {@link Ext.layout.BorderLayout.Region#collapsible collapsible}: true,   // make collapsible
+        {@link Ext.layout.BorderLayout.Region#cmargins cmargins}: '5 5 0 5', // adjust top margin when collapsed
+        {@link Ext.Component#id id}: 'west-region-container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.Panel#unstyled unstyled}: true
+    },{
+        {@link Ext.Panel#title title}: 'Center Region',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'center',     // center region is required, no width/height specified
+        {@link Ext.Component#xtype xtype}: 'container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 5 0 0'
+    }]
+});
+</code></pre>
+ * <p><b><u>Notes</u></b>:</p><div class="mdetail-params"><ul>
+ * <li>Any container using the BorderLayout <b>must</b> have a child item with <tt>region:'center'</tt>.
+ * The child item in the center region will always be resized to fill the remaining space not used by
+ * the other regions in the layout.</li>
+ * <li>Any child items with a region of <tt>west</tt> or <tt>east</tt> must have <tt>width</tt> defined
+ * (an integer representing the number of pixels that the region should take up).</li>
+ * <li>Any child items with a region of <tt>north</tt> or <tt>south</tt> must have <tt>height</tt> defined.</li>
+ * <li>The regions of a BorderLayout are <b>fixed at render time</b> and thereafter, its child Components may not be removed or added</b>.  To add/remove
+ * Components within a BorderLayout, have them wrapped by an additional Container which is directly
+ * managed by the BorderLayout.  If the region is to be collapsible, the Container used directly
+ * by the BorderLayout manager should be a Panel.  In the following example a Container (an Ext.Panel)
+ * is added to the west region:
+ * <div style="margin-left:16px"><pre><code>
+wrc = {@link Ext#getCmp Ext.getCmp}('west-region-container');
+wrc.{@link Ext.Panel#removeAll removeAll}();
+wrc.{@link Ext.Container#add add}({
+    title: 'Added Panel',
+    html: 'Some content'
+});
+wrc.{@link Ext.Container#doLayout doLayout}();
+ * </code></pre></div>
+ * </li>
+ * <li> To reference a {@link Ext.layout.BorderLayout.Region Region}:
+ * <div style="margin-left:16px"><pre><code>
+wr = myBorderPanel.layout.west;
+ * </code></pre></div>
+ * </li>
+ * </ul></div>
+ */
+Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    // private
+    rendered : false,
+
+    // private
+    onLayout : function(ct, target){
+        var collapsed;
+        if(!this.rendered){
+            target.addClass('x-border-layout-ct');
+            var items = ct.items.items;
+            collapsed = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                var c = items[i];
+                var pos = c.region;
+                if(c.collapsed){
+                    collapsed.push(c);
+                }
+                c.collapsed = false;
+                if(!c.rendered){
+                    c.cls = c.cls ? c.cls +' x-border-panel' : 'x-border-panel';
+                    c.render(target, i);
+                }
+                this[pos] = pos != 'center' && c.split ?
+                    new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) :
+                    new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos);
+                this[pos].render(target, c);
+            }
+            this.rendered = true;
+        }
+
+        var size = target.getViewSize();
+        if(size.width < 20 || size.height < 20){ // display none?
+            if(collapsed){
+                this.restoreCollapsed = collapsed;
+            }
+            return;
+        }else if(this.restoreCollapsed){
+            collapsed = this.restoreCollapsed;
+            delete this.restoreCollapsed;
+        }
+
+        var w = size.width, h = size.height;
+        var centerW = w, centerH = h, centerY = 0, centerX = 0;
+
+        var n = this.north, s = this.south, west = this.west, e = this.east, c = this.center;
+        if(!c && Ext.layout.BorderLayout.WARN !== false){
+            throw 'No center region defined in BorderLayout ' + ct.id;
+        }
+
+        if(n && n.isVisible()){
+            var b = n.getSize();
+            var m = n.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            b.y = m.top;
+            centerY = b.height + b.y + m.bottom;
+            centerH -= centerY;
+            n.applyLayout(b);
+        }
+        if(s && s.isVisible()){
+            var b = s.getSize();
+            var m = s.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            var totalHeight = (b.height + m.top + m.bottom);
+            b.y = h - totalHeight + m.top;
+            centerH -= totalHeight;
+            s.applyLayout(b);
+        }
+        if(west && west.isVisible()){
+            var b = west.getSize();
+            var m = west.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            b.x = m.left;
+            b.y = centerY + m.top;
+            var totalWidth = (b.width + m.left + m.right);
+            centerX += totalWidth;
+            centerW -= totalWidth;
+            west.applyLayout(b);
+        }
+        if(e && e.isVisible()){
+            var b = e.getSize();
+            var m = e.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            var totalWidth = (b.width + m.left + m.right);
+            b.x = w - totalWidth + m.left;
+            b.y = centerY + m.top;
+            centerW -= totalWidth;
+            e.applyLayout(b);
+        }
+        if(c){
+            var m = c.getMargins();
+            var centerBox = {
+                x: centerX + m.left,
+                y: centerY + m.top,
+                width: centerW - (m.left+m.right),
+                height: centerH - (m.top+m.bottom)
+            };
+            c.applyLayout(centerBox);
+        }
+        if(collapsed){
+            for(var i = 0, len = collapsed.length; i < len; i++){
+                collapsed[i].collapse(false);
+            }
+        }
+        if(Ext.isIE && Ext.isStrict){ // workaround IE strict repainting issue
+            target.repaint();
+        }
+    },
+
+    destroy: function() {
+        var r = ['north', 'south', 'east', 'west'];
+        for (var i = 0; i < r.length; i++) {
+            var region = this[r[i]];
+            if(region){
+                if(region.destroy){
+                    region.destroy();
+                }else if (region.split){
+                    region.split.destroy(true);
+                }
+            }
+        }
+        Ext.layout.BorderLayout.superclass.destroy.call(this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.BorderLayout.Region
+ * <p>This is a region of a {@link Ext.layout.BorderLayout BorderLayout} that acts as a subcontainer
+ * within the layout.  Each region has its own {@link Ext.layout.ContainerLayout layout} that is
+ * independent of other regions and the containing BorderLayout, and can be any of the
+ * {@link Ext.layout.ContainerLayout valid Ext layout types}.</p>
+ * <p>Region size is managed automatically and cannot be changed by the user -- for
+ * {@link #split resizable regions}, see {@link Ext.layout.BorderLayout.SplitRegion}.</p>
+ * @constructor
+ * Create a new Region.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: <tt>north</tt>, <tt>south</tt>,
+ * <tt>east</tt>, <tt>west</tt> and <tt>center</tt>.  Every {@link Ext.layout.BorderLayout BorderLayout}
+ * <b>must have a center region</b> for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.Region = function(layout, config, pos){
+    Ext.apply(this, config);
+    this.layout = layout;
+    this.position = pos;
+    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 || {},
+                pos == 'north' || pos == 'south' ? this.defaultNSCMargins : this.defaultEWCMargins);
+        }
+    }
+};
+
+Ext.layout.BorderLayout.Region.prototype = {
+    /**
+     * @cfg {Boolean} animFloat
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel that will close again once the user mouses out of that panel (or clicks out if
+     * <tt>{@link #autoHide} = false</tt>).  Setting <tt>{@link #animFloat} = false</tt> will
+     * prevent the open and close of these floated panels from being animated (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {Boolean} autoHide
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel.  If <tt>autoHide = true</tt>, the panel will automatically hide after the user mouses
+     * out of the panel.  If <tt>autoHide = false</tt>, the panel will continue to display until the
+     * user clicks outside of the panel (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {String} collapseMode
+     * <tt>collapseMode</tt> supports two configuration values:<div class="mdetail-params"><ul>
+     * <li><b><tt>undefined</tt></b> (default)<div class="sub-desc">By default, {@link #collapsible}
+     * regions are collapsed by clicking the expand/collapse tool button that renders into the region's
+     * title bar.</div></li>
+     * <li><b><tt>'mini'</tt></b><div class="sub-desc">Optionally, when <tt>collapseMode</tt> is set to
+     * <tt>'mini'</tt> the region's split bar will also display a small collapse button in the center of
+     * the bar. In <tt>'mini'</tt> mode the region will collapse to a thinner bar than in normal mode.
+     * </div></li>
+     * </ul></div></p>
+     * <p><b>Note</b>: if a collapsible region does not have a title bar, then set <tt>collapseMode =
+     * 'mini'</tt> and <tt>{@link #split} = true</tt> in order for the region to be {@link #collapsible}
+     * by the user as the expand/collapse tool button (that would go in the title bar) will not be rendered.</p>
+     * <p>See also <tt>{@link #cmargins}</tt>.</p>
+     */
+    /**
+     * @cfg {Object} margins
+     * An object containing margins to apply to the region when in the expanded state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} cmargins
+     * An object containing margins to apply to the region when in the collapsed state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values.</p>
+     * <p><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></p>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <p><tt>true</tt> to allow the user to collapse this region (defaults to <tt>false</tt>).  If
+     * <tt>true</tt>, an expand/collapse tool button will automatically be rendered into the title
+     * bar of the region, otherwise the button will not be shown.</p>
+     * <p><b>Note</b>: that a title bar is required to display the collapse/expand toggle button -- if
+     * no <tt>title</tt> is specified for the region's panel, the region will only be collapsible if
+     * <tt>{@link #collapseMode} = 'mini'</tt> and <tt>{@link #split} = true</tt>.
+     */
+    collapsible : false,
+    /**
+     * @cfg {Boolean} split
+     * <p><tt>true</tt> to create a {@link Ext.layout.BorderLayout.SplitRegion SplitRegion} and 
+     * display a 5px wide {@link Ext.SplitBar} between this region and its neighbor, allowing the user to
+     * resize the regions dynamically.  Defaults to <tt>false</tt> creating a
+     * {@link Ext.layout.BorderLayout.Region Region}.</p><br>
+     * <p><b>Notes</b>:</p><div class="mdetail-params"><ul>
+     * <li>this configuration option is ignored if <tt>region='center'</tt></li> 
+     * <li>when <tt>split == true</tt>, it is common to specify a
+     * <tt>{@link Ext.SplitBar#minSize minSize}</tt> and <tt>{@link Ext.SplitBar#maxSize maxSize}</tt>
+     * for the {@link Ext.BoxComponent BoxComponent} representing the region. These are not native
+     * configs of {@link Ext.BoxComponent BoxComponent}, and are used only by this class.</li>
+     * <li>if <tt>{@link #collapseMode} = 'mini'</tt> requires <tt>split = true</tt> to reserve space
+     * for the collapse tool</tt></li> 
+     * </ul></div> 
+     */
+    split:false,
+    /**
+     * @cfg {Boolean} floatable
+     * <tt>true</tt> to allow clicking a collapsed region's bar to display the region's panel floated
+     * above the layout, <tt>false</tt> to force the user to fully expand a collapsed region by
+     * clicking the expand button to see it again (defaults to <tt>true</tt>).
+     */
+    floatable: true,
+    /**
+     * @cfg {Number} minWidth
+     * <p>The minimum allowable width in pixels for this region (defaults to <tt>50</tt>).
+     * <tt>maxWidth</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minWidth</tt> / <tt>maxWidth</tt>.</p>
+     */
+    minWidth:50,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum allowable height in pixels for this region (defaults to <tt>50</tt>)
+     * <tt>maxHeight</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minHeight</tt> / <tt>maxHeight</tt>.</p>
+     */
+    minHeight:50,
+
+    // private
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    // private
+    defaultNSCMargins : {left:5,top:5,right:5,bottom:5},
+    // private
+    defaultEWCMargins : {left:5,top:0,right:5,bottom:0},
+    floatingZIndex: 100,
+
+    /**
+     * True if this region is collapsed. Read-only.
+     * @type Boolean
+     * @property
+     */
+    isCollapsed : false,
+
+    /**
+     * This region's panel.  Read-only.
+     * @type Ext.Panel
+     * @property panel
+     */
+    /**
+     * This region's layout.  Read-only.
+     * @type Layout
+     * @property layout
+     */
+    /**
+     * This region's layout position (north, south, east, west or center).  Read-only.
+     * @type String
+     * @property position
+     */
+
+    // private
+    render : function(ct, p){
+        this.panel = p;
+        p.el.enableDisplayMode();
+        this.targetEl = ct;
+        this.el = p.el;
+
+        var gs = p.getState, ps = this.position;
+        p.getState = function(){
+            return Ext.apply(gs.call(p) || {}, this.state);
+        }.createDelegate(this);
+
+        if(ps != 'center'){
+            p.allowQueuedExpand = false;
+            p.on({
+                beforecollapse: this.beforeCollapse,
+                collapse: this.onCollapse,
+                beforeexpand: this.beforeExpand,
+                expand: this.onExpand,
+                hide: this.onHide,
+                show: this.onShow,
+                scope: this
+            });
+            if(this.collapsible || this.floatable){
+                p.collapseEl = 'el';
+                p.slideAnchor = this.getSlideAnchor();
+            }
+            if(p.tools && p.tools.toggle){
+                p.tools.toggle.addClass('x-tool-collapse-'+ps);
+                p.tools.toggle.addClassOnOver('x-tool-collapse-'+ps+'-over');
+            }
+        }
+    },
+
+    // private
+    getCollapsedEl : function(){
+        if(!this.collapsedEl){
+            if(!this.toolTemplate){
+                var tt = new Ext.Template(
+                     '<div class="x-tool x-tool-{id}">&#160;</div>'
+                );
+                tt.disableFormats = true;
+                tt.compile();
+                Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt;
+            }
+            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 {
+                if(this.collapsible !== false && !this.hideCollapseTool) {
+                    var t = this.toolTemplate.append(
+                            this.collapsedEl.dom,
+                            {id:'expand-'+this.position}, true);
+                    t.addClassOnOver('x-tool-expand-'+this.position+'-over');
+                    t.on('click', this.onExpandClick, this, {stopEvent:true});
+                }
+                if(this.floatable !== false || this.titleCollapse){
+                   this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
+                   this.collapsedEl.on("click", this[this.floatable ? 'collapseClick' : 'onExpandClick'], this);
+                }
+            }
+        }
+        return this.collapsedEl;
+    },
+
+    // private
+    onExpandClick : function(e){
+        if(this.isSlid){
+            this.afterSlideIn();
+            this.panel.expand(false);
+        }else{
+            this.panel.expand();
+        }
+    },
+
+    // private
+    onCollapseClick : function(e){
+        this.panel.collapse();
+    },
+
+    // private
+    beforeCollapse : function(p, animate){
+        this.lastAnim = animate;
+        if(this.splitEl){
+            this.splitEl.hide();
+        }
+        this.getCollapsedEl().show();
+        this.panel.el.setStyle('z-index', 100);
+        this.isCollapsed = true;
+        this.layout.layout();
+    },
+
+    // private
+    onCollapse : function(animate){
+        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:.2});
+        }
+        this.state.collapsed = true;
+        this.panel.saveState();
+    },
+
+    // private
+    beforeExpand : function(animate){
+        var c = this.getCollapsedEl();
+        this.el.show();
+        if(this.position == 'east' || this.position == 'west'){
+            this.panel.setSize(undefined, c.getHeight());
+        }else{
+            this.panel.setSize(c.getWidth(), undefined);
+        }
+        c.hide();
+        c.dom.style.visibility = 'hidden';
+        this.panel.el.setStyle('z-index', this.floatingZIndex);
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    collapseClick : function(e){
+        if(this.isSlid){
+           e.stopPropagation();
+           this.slideIn();
+        }else{
+           e.stopPropagation();
+           this.slideOut();
+        }
+    },
+
+    // private
+    onHide : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().hide();
+        }else if(this.splitEl){
+            this.splitEl.hide();
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().show();
+        }else if(this.splitEl){
+            this.splitEl.show();
+        }
+    },
+
+    /**
+     * True if this region is currently visible, else false.
+     * @return {Boolean}
+     */
+    isVisible : function(){
+        return !this.panel.hidden;
+    },
+
+    /**
+     * Returns the current margins for this region.  If the region is collapsed, the
+     * {@link #cmargins} (collapsed margins) value will be returned, otherwise the
+     * {@link #margins} value will be returned.
+     * @return {Object} An object containing the element's margins: <tt>{left: (left
+     * margin), top: (top margin), right: (right margin), bottom: (bottom margin)}</tt>
+     */
+    getMargins : function(){
+        return this.isCollapsed && this.cmargins ? this.cmargins : this.margins;
+    },
+
+    /**
+     * Returns the current size of this region.  If the region is collapsed, the size of the
+     * collapsedEl will be returned, otherwise the size of the region's panel will be returned.
+     * @return {Object} An object containing the element's size: <tt>{width: (element width),
+     * height: (element height)}</tt>
+     */
+    getSize : function(){
+        return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize();
+    },
+
+    /**
+     * Sets the specified panel as the container element for this region.
+     * @param {Ext.Panel} panel The new panel
+     */
+    setPanel : function(panel){
+        this.panel = panel;
+    },
+
+    /**
+     * Returns the minimum allowable width for this region.
+     * @return {Number} The minimum width
+     */
+    getMinWidth: function(){
+        return this.minWidth;
+    },
+
+    /**
+     * Returns the minimum allowable height for this region.
+     * @return {Number} The minimum height
+     */
+    getMinHeight: function(){
+        return this.minHeight;
+    },
+
+    // private
+    applyLayoutCollapsed : function(box){
+        var ce = this.getCollapsedEl();
+        ce.setLeftTop(box.x, box.y);
+        ce.setSize(box.width, box.height);
+    },
+
+    // private
+    applyLayout : function(box){
+        if(this.isCollapsed){
+            this.applyLayoutCollapsed(box);
+        }else{
+            this.panel.setPosition(box.x, box.y);
+            this.panel.setSize(box.width, box.height);
+        }
+    },
+
+    // private
+    beforeSlide: function(){
+        this.panel.beforeEffect();
+    },
+
+    // private
+    afterSlide : function(){
+        this.panel.afterEffect();
+    },
+
+    // private
+    initAutoHide : function(){
+        if(this.autoHide !== false){
+            if(!this.autoHideHd){
+                var st = new Ext.util.DelayedTask(this.slideIn, this);
+                this.autoHideHd = {
+                    "mouseout": function(e){
+                        if(!e.within(this.el, true)){
+                            st.delay(500);
+                        }
+                    },
+                    "mouseover" : function(e){
+                        st.cancel();
+                    },
+                    scope : this
+                };
+            }
+            this.el.on(this.autoHideHd);
+        }
+    },
+
+    // private
+    clearAutoHide : function(){
+        if(this.autoHide !== false){
+            this.el.un("mouseout", this.autoHideHd.mouseout);
+            this.el.un("mouseover", this.autoHideHd.mouseover);
+        }
+    },
+
+    // private
+    clearMonitor : function(){
+        Ext.getDoc().un("click", this.slideInIf, this);
+    },
+
+    /**
+     * If this Region is {@link #floatable}, this method slides this Region into full visibility <i>over the top
+     * of the center Region</i> where it floats until either {@link #slideIn} is called, or other regions of the layout
+     * are clicked, or the mouse exits the Region.
+     */
+    slideOut : function(){
+        if(this.isSlid || this.el.hasActiveFx()){
+            return;
+        }
+        this.isSlid = true;
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.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", this.floatingZIndex+2);
+        this.panel.el.replaceClass('x-panel-collapsed', 'x-panel-floating');
+        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);
+        }
+    },
+
+    // private
+    afterSlideIn : function(){
+        this.clearAutoHide();
+        this.isSlid = false;
+        this.clearMonitor();
+        this.el.setStyle("z-index", "");
+        this.panel.el.replaceClass('x-panel-floating', 'x-panel-collapsed');
+        this.el.dom.style.left = this.restoreLT[0];
+        this.el.dom.style.top = this.restoreLT[1];
+
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.toggle.show();
+        }
+    },
+
+    /**
+     * If this Region is {@link #floatable}, and this Region has been slid into floating visibility, then this method slides
+     * this region back into its collapsed state.
+     */
+    slideIn : function(cb){
+        if(!this.isSlid || this.el.hasActiveFx()){
+            Ext.callback(cb);
+            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(cb);
+                },
+                scope: this,
+                block: true
+            });
+        }else{
+            this.el.hide();
+            this.afterSlideIn();
+        }
+    },
+
+    // private
+    slideInIf : function(e){
+        if(!e.within(this.el)){
+            this.slideIn();
+        }
+    },
+
+    // private
+    anchors : {
+        "west" : "left",
+        "east" : "right",
+        "north" : "top",
+        "south" : "bottom"
+    },
+
+    // private
+    sanchors : {
+        "west" : "l",
+        "east" : "r",
+        "north" : "t",
+        "south" : "b"
+    },
+
+    // private
+    canchors : {
+        "west" : "tl-tr",
+        "east" : "tr-tl",
+        "north" : "tl-bl",
+        "south" : "bl-tl"
+    },
+
+    // private
+    getAnchor : function(){
+        return this.anchors[this.position];
+    },
+
+    // private
+    getCollapseAnchor : function(){
+        return this.canchors[this.position];
+    },
+
+    // private
+    getSlideAnchor : function(){
+        return this.sanchors[this.position];
+    },
+
+    // private
+    getAlignAdj : function(){
+        var cm = 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;
+        }
+    },
+
+    // private
+    getExpandAdj : function(){
+        var c = this.collapsedEl, cm = this.cmargins;
+        switch(this.position){
+            case "west":
+                return [-(cm.right+c.getWidth()+cm.left), 0];
+            break;
+            case "east":
+                return [cm.right+c.getWidth()+cm.left, 0];
+            break;
+            case "north":
+                return [0, -(cm.top+cm.bottom+c.getHeight())];
+            break;
+            case "south":
+                return [0, cm.top+cm.bottom+c.getHeight()];
+            break;
+        }
+    }
+};
+
+/**
+ * @class Ext.layout.BorderLayout.SplitRegion
+ * @extends Ext.layout.BorderLayout.Region
+ * <p>This is a specialized type of {@link Ext.layout.BorderLayout.Region BorderLayout region} that
+ * has a built-in {@link Ext.SplitBar} for user resizing of regions.  The movement of the split bar
+ * is configurable to move either {@link #tickSize smooth or incrementally}.</p>
+ * @constructor
+ * Create a new SplitRegion.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: north, south, east, west and center.  Every
+ * BorderLayout must have a center region for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){
+    Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos);
+    // prevent switch
+    this.applyLayout = this.applyFns[pos];
+};
+
+Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, {
+    /**
+     * @cfg {Number} tickSize
+     * The increment, in pixels by which to move this Region's {@link Ext.SplitBar SplitBar}.
+     * By default, the {@link Ext.SplitBar SplitBar} moves smoothly.
+     */
+    /**
+     * @cfg {String} splitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible non-collapsible} region's split bar
+     * (defaults to <tt>"Drag to resize."</tt>).  Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    splitTip : "Drag to resize.",
+    /**
+     * @cfg {String} collapsibleSplitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible collapsible} region's split bar
+     * (defaults to "Drag to resize. Double click to hide."). Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    collapsibleSplitTip : "Drag to resize. Double click to hide.",
+    /**
+     * @cfg {Boolean} useSplitTips
+     * <tt>true</tt> to display a tooltip when the user hovers over a region's split bar
+     * (defaults to <tt>false</tt>).  The tooltip text will be the value of either
+     * <tt>{@link #splitTip}</tt> or <tt>{@link #collapsibleSplitTip}</tt> as appropriate.
+     */
+    useSplitTips : false,
+
+    // private
+    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'
+        }
+    },
+
+    // private
+    applyFns : {
+        west : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            this.panel.setPosition(box.x, box.y);
+            var sw = sd.offsetWidth;
+            s.left = (box.x+box.width-sw)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        east : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sw = sd.offsetWidth;
+            this.panel.setPosition(box.x+sw, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        north : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y+box.height-sh)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        },
+        south : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y+sh);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        }
+    },
+
+    // private
+    render : function(ct, p){
+        Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p);
+
+        var ps = this.position;
+
+        this.splitEl = ct.createChild({
+            cls: "x-layout-split x-layout-split-"+ps, html: "&#160;",
+            id: this.panel.id + '-xsplit'
+        });
+
+        if(this.collapseMode == 'mini'){
+            this.miniSplitEl = this.splitEl.createChild({
+                cls: "x-layout-mini x-layout-mini-"+ps, html: "&#160;"
+            });
+            this.miniSplitEl.addClassOnOver('x-layout-mini-over');
+            this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true});
+        }
+
+        var s = this.splitSettings[ps];
+
+        this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation);
+        this.split.tickSize = this.tickSize;
+        this.split.placement = s.placement;
+        this.split.getMaximumSize = this[s.maxFn].createDelegate(this);
+        this.split.minSize = this.minSize || this[s.minProp];
+        this.split.on("beforeapply", this.onSplitMove, this);
+        this.split.useShim = this.useShim === true;
+        this.maxSize = this.maxSize || this[s.maxProp];
+
+        if(p.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);
+        }
+    },
+
+    //docs inherit from superclass
+    getSize : function(){
+        if(this.isCollapsed){
+            return this.collapsedEl.getSize();
+        }
+        var s = this.panel.getSize();
+        if(this.position == 'north' || this.position == 'south'){
+            s.height += this.splitEl.dom.offsetHeight;
+        }else{
+            s.width += this.splitEl.dom.offsetWidth;
+        }
+        return s;
+    },
+
+    // private
+    getHMaxSize : function(){
+         var cmax = this.maxSize || 10000;
+         var center = this.layout.center;
+         return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth());
+    },
+
+    // private
+    getVMaxSize : function(){
+        var cmax = this.maxSize || 10000;
+        var center = this.layout.center;
+        return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight());
+    },
+
+    // private
+    onSplitMove : function(split, newSize){
+        var s = this.panel.getSize();
+        this.lastSplitSize = newSize;
+        if(this.position == 'north' || this.position == 'south'){
+            this.panel.setSize(s.width, newSize);
+            this.state.height = newSize;
+        }else{
+            this.panel.setSize(newSize, s.height);
+            this.state.width = newSize;
+        }
+        this.layout.layout();
+        this.panel.saveState();
+        return false;
+    },
+
+    /**
+     * Returns a reference to the split bar in use by this region.
+     * @return {Ext.SplitBar} The split bar
+     */
+    getSplitBar : function(){
+        return this.split;
+    },
+
+    // inherit docs
+    destroy : function() {
+        Ext.destroy(
+            this.miniSplitEl,
+            this.split,
+            this.splitEl
+        );
+    }
+});
+
+Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout;/**
+ * @class Ext.layout.FormLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This layout manager is specifically designed for rendering and managing child Components of
+ * {@link Ext.form.FormPanel forms}. It is responsible for rendering the labels of
+ * {@link Ext.form.Field Field}s.</p>
+ *
+ * <p>This layout manager is used when a Container is configured with the <tt>layout:'form'</tt>
+ * {@link Ext.Container#layout layout} config option, and should generally not need to be created directly
+ * via the new keyword. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ *
+ * <p>In an application, it will usually be preferrable to use a {@link Ext.form.FormPanel FormPanel}
+ * (which is configured with FormLayout as its layout class by default) since it also provides built-in
+ * functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form.</p>
+ *
+ * <p>A {@link Ext.Container Container} <i>using</i> the FormLayout layout manager (e.g.
+ * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) can also accept the following
+ * layout-specific config properties:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.form.FormPanel#hideLabels hideLabels}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelAlign labelAlign}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelPad labelPad}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelWidth labelWidth}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component (including Fields) managed by FormLayout accepts the following as a config option:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#anchor anchor}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component managed by FormLayout may be rendered as a form field (with an associated label) by
+ * configuring it with a non-null <b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b>. Components configured
+ * in this way may be configured with the following options which affect the way the FormLayout renders them:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#clearCls clearCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#hideLabel hideLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#itemCls itemCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelStyle labelStyle}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Example usage:</p>
+ * <pre><code>
+// Required if showing validation messages
+Ext.QuickTips.init();
+
+// While you can create a basic Panel with layout:'form', practically
+// you should usually use a FormPanel to also get its form functionality
+// since it already creates a FormLayout internally.
+var form = new Ext.form.FormPanel({
+    title: 'Form Layout',
+    bodyStyle: 'padding:15px',
+    width: 350,
+    defaultType: 'textfield',
+    defaults: {
+        // applied to each contained item
+        width: 230,
+        msgTarget: 'side'
+    },
+    items: [{
+            fieldLabel: 'First Name',
+            name: 'first',
+            allowBlank: false,
+            {@link Ext.Component#labelSeparator labelSeparator}: ':' // override labelSeparator layout config
+        },{
+            fieldLabel: 'Last Name',
+            name: 'last'
+        },{
+            fieldLabel: 'Email',
+            name: 'email',
+            vtype:'email'
+        }, {
+            xtype: 'textarea',
+            hideLabel: true,     // override hideLabels layout config
+            name: 'msg',
+            anchor: '100% -53'
+        }
+    ],
+    buttons: [
+        {text: 'Save'},
+        {text: 'Cancel'}
+    ],
+    layoutConfig: {
+        {@link #labelSeparator}: '~' // superseded by assignment below
+    },
+    // config options applicable to container when layout='form':
+    hideLabels: false,
+    labelAlign: 'left',   // or 'right' or 'top'
+    {@link Ext.form.FormPanel#labelSeparator labelSeparator}: '>>', // takes precedence over layoutConfig value
+    labelWidth: 65,       // defaults to 100
+    labelPad: 8           // defaults to 5, must specify labelWidth to be honored
+});
+</code></pre>
+ */
+Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.form.FormPanel}.{@link Ext.form.FormPanel#labelSeparator labelSeparator}.  Configuration
+     * of this property at the <b>container</b> level takes precedence.
+     */
+    labelSeparator : ':',
+
+    /**
+     * Read only. The CSS style specification string added to field labels in this layout if not
+     * otherwise {@link Ext.Component#labelStyle specified by each contained field}.
+     * @type String
+     * @property labelStyle
+     */
+
+    // private
+    setContainer : function(ct){
+        Ext.layout.FormLayout.superclass.setContainer.call(this, ct);
+        if(ct.labelAlign){
+            ct.addClass('x-form-label-'+ct.labelAlign);
+        }
+
+        if(ct.hideLabels){
+            this.labelStyle = "display:none";
+            this.elementStyle = "padding-left:0;";
+            this.labelAdjust = 0;
+        }else{
+            this.labelSeparator = ct.labelSeparator || this.labelSeparator;
+            ct.labelWidth = ct.labelWidth || 100;
+            if(typeof ct.labelWidth == 'number'){
+                var pad = (typeof ct.labelPad == 'number' ? ct.labelPad : 5);
+                this.labelAdjust = ct.labelWidth+pad;
+                this.labelStyle = "width:"+ct.labelWidth+"px;";
+                this.elementStyle = "padding-left:"+(ct.labelWidth+pad)+'px';
+            }
+            if(ct.labelAlign == 'top'){
+                this.labelStyle = "width:auto;";
+                this.labelAdjust = 0;
+                this.elementStyle = "padding-left:0;";
+            }
+        }
+    },
+
+    //private
+    getLabelStyle: function(s){
+        var ls = '', items = [this.labelStyle, s];
+        for (var i = 0, len = items.length; i < len; ++i){
+            if (items[i]){
+                ls += items[i];
+                if (ls.substr(-1, 1) != ';'){
+                    ls += ';'
+                }
+            }
+        }
+        return ls;
+    },
+
+    /**
+     * @cfg {Ext.Template} fieldTpl
+     * A {@link Ext.Template#compile compile}d {@link Ext.Template} for rendering
+     * the fully wrapped, labeled and styled form Field. Defaults to:</p><pre><code>
+new Ext.Template(
+    &#39;&lt;div class="x-form-item {itemCls}" tabIndex="-1">&#39;,
+        &#39;&lt;&#108;abel for="{id}" style="{labelStyle}" class="x-form-item-&#108;abel">{&#108;abel}{labelSeparator}&lt;/&#108;abel>&#39;,
+        &#39;&lt;div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">&#39;,
+        &#39;&lt;/div>&lt;div class="{clearCls}">&lt;/div>&#39;,
+    '&lt;/div>'
+);
+</code></pre>
+     * <p>This may be specified to produce a different DOM structure when rendering form Fields.</p>
+     * <p>A description of the properties within the template follows:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * <p>Also see <tt>{@link #getTemplateArgs}</tt></p>
+     */
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
+            var args = this.getTemplateArgs(c);
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position] || null;
+            }
+            if(position){
+                this.fieldTpl.insertBefore(position, args);
+            }else{
+                this.fieldTpl.append(target, args);
+            }
+            c.render('x-form-el-'+c.id);
+        }else {
+            Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments);
+        }
+    },
+
+    /**
+     * <p>Provides template arguments for rendering the fully wrapped, labeled and styled form Field.</p>
+     * <p>This method returns an object hash containing properties used by the layout's {@link #fieldTpl}
+     * to create a correctly wrapped, labeled and styled form Field. This may be overriden to
+     * create custom layouts. The properties which must be returned are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * @param field The {@link Field Ext.form.Field} being rendered.
+     * @return An object hash containing the properties required to render the Field.
+     */
+    getTemplateArgs: function(field) {
+        var noLabelSep = !field.fieldLabel || field.hideLabel;
+        return {
+            id: field.id,
+            label: field.fieldLabel,
+            labelStyle: field.labelStyle||this.labelStyle||'',
+            elementStyle: this.elementStyle||'',
+            labelSeparator: noLabelSep ? '' : (typeof field.labelSeparator == 'undefined' ? this.labelSeparator : field.labelSeparator),
+            itemCls: (field.itemCls||this.container.itemCls||'') + (field.hideLabel ? ' x-hide-label' : ''),
+            clearCls: field.clearCls || 'x-form-clear-left'
+        };
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value - (comp.isFormField || comp.fieldLabel  ? (comp.hideLabel ? 0 : this.labelAdjust) : 0);
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout;/**
+ * @class Ext.layout.AccordionLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This is a layout that contains multiple panels in an expandable accordion style such that only
+ * <b>one panel can be open at any given time</b>.  Each panel has built-in support for expanding and collapsing.
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var accordion = new Ext.Panel({
+    title: 'Accordion Layout',
+    layout:'accordion',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle: 'padding:15px'
+    },
+    layoutConfig: {
+        // layout-specific configs go here
+        titleCollapse: false,
+        animate: true,
+        activeOnTop: true
+    },
+    items: [{
+        title: 'Panel 1',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 2',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 3',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} fill
+     * True to adjust the active item's height to fill the available space in the container, false to use the
+     * item's current height, or auto height if not explicitly set (defaults to true).
+     */
+    fill : true,
+    /**
+     * @cfg {Boolean} autoWidth
+     * True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).
+     * Note that some components, in particular the {@link Ext.grid.GridPanel grid}, will not function properly within
+     * layouts if they have auto width, so in such cases this config should be set to false.
+     */
+    autoWidth : true,
+    /**
+     * @cfg {Boolean} titleCollapse
+     * True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow
+     * expand/collapse only when the toggle tool button is clicked (defaults to true).  When set to false,
+     * {@link #hideCollapseTool} should be false also.
+     */
+    titleCollapse : true,
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false).
+     * When set to true, {@link #titleCollapse} should be true also.
+     */
+    hideCollapseTool : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools
+     * in the contained panels' title bars, false to render it last (defaults to false).
+     */
+    collapseFirst : false,
+    /**
+     * @cfg {Boolean} animate
+     * True to slide the contained panels open and closed during expand/collapse using animation, false to open and
+     * close directly with no animation (defaults to false).  Note: to defer to the specific config setting of each
+     * contained panel for this property, set this to undefined at the layout level.
+     */
+    animate : false,
+    /**
+     * @cfg {Boolean} sequence
+     * <b>Experimental</b>. If animate is set to true, this will result in each animation running in sequence.
+     */
+    sequence : false,
+    /**
+     * @cfg {Boolean} activeOnTop
+     * True to swap the position of each panel as it is expanded so that it becomes the first item in the container,
+     * false to keep the panels in the rendered order. <b>This is NOT compatible with "animate:true"</b> (defaults to false).
+     */
+    activeOnTop : false,
+
+    renderItem : function(c){
+        if(this.animate === false){
+            c.animCollapse = false;
+        }
+        c.collapsible = true;
+        if(this.autoWidth){
+            c.autoWidth = true;
+        }
+        if(this.titleCollapse){
+            c.titleCollapse = true;
+        }
+        if(this.hideCollapseTool){
+            c.hideCollapseTool = true;
+        }
+        if(this.collapseFirst !== undefined){
+            c.collapseFirst = this.collapseFirst;
+        }
+        if(!this.activeItem && !c.collapsed){
+            this.activeItem = c;
+        }else if(this.activeItem && this.activeItem != c){
+            c.collapsed = true;
+        }
+        Ext.layout.AccordionLayout.superclass.renderItem.apply(this, arguments);
+        c.header.addClass('x-accordion-hd');
+        c.on('beforeexpand', this.beforeExpand, this);
+    },
+
+    // private
+    beforeExpand : function(p, anim){
+        var ai = this.activeItem;
+        if(ai){
+            if(this.sequence){
+                delete this.activeItem;
+                if (!ai.collapsed){
+                    ai.collapse({callback:function(){
+                        p.expand(anim || true);
+                    }, scope: this});
+                    return false;
+                }
+            }else{
+                ai.collapse(this.animate);
+            }
+        }
+        this.activeItem = p;
+        if(this.activeOnTop){
+            p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild);
+        }
+        this.layout();
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(this.fill && item){
+            var hh = 0;
+            this.container.items.each(function(p){
+                if(p != item){
+                    hh += p.header.getHeight();
+                }    
+            });
+            size.height -= hh;
+            item.setSize(size);
+        }
+    },
+
+    /**
+     * Sets the active (expanded) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(item.rendered && item.collapsed){
+                item.expand();
+            }else{
+                this.activeItem = item;
+            }
+        }
+
+    }
+});
+Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout;
+
+//backwards compat
+Ext.layout.Accordion = Ext.layout.AccordionLayout;/**
+ * @class Ext.layout.TableLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This layout allows you to easily render content into an HTML table.  The total number of columns can be
+ * specified, and rowspan and colspan can be used to create complex layouts within the table.
+ * This class is intended to be extended or created via the layout:'table' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>Note that when creating a layout via config, the layout-specific config properties must be passed in via
+ * the {@link Ext.Container#layoutConfig} object which will then be applied internally to the layout.  In the
+ * case of TableLayout, the only valid layout config property is {@link #columns}.  However, the items added to a
+ * TableLayout can supply the following table-specific config properties:</p>
+ * <ul>
+ * <li><b>rowspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>colspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>cellId</b> An id applied to the table cell containing the item.</li>
+ * <li><b>cellCls</b> A CSS class name added to the table cell containing the item.</li>
+ * </ul>
+ * <p>The basic concept of building up a TableLayout is conceptually very similar to building up a standard
+ * HTML table.  You simply add each panel (or "cell") that you want to include along with any span attributes
+ * specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts.
+ * Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the
+ * total column count in the layoutConfig and start adding panels in their natural order from left to right,
+ * top to bottom.  The layout will automatically figure out, based on the column count, rowspans and colspans,
+ * how to position each panel within the table.  Just like with HTML tables, your rowspans and colspans must add
+ * up correctly in your overall layout or you'll end up with missing and/or extra cells!  Example usage:</p>
+ * <pre><code>
+// This code will generate a layout table that is 3 columns by 2 rows
+// with some spanning included.  The basic layout will be:
+// +--------+-----------------+
+// |   A    |   B             |
+// |        |--------+--------|
+// |        |   C    |   D    |
+// +--------+--------+--------+
+var table = new Ext.Panel({
+    title: 'Table Layout',
+    layout:'table',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle:'padding:20px'
+    },
+    layoutConfig: {
+        // The total column count must be specified here
+        columns: 3
+    },
+    items: [{
+        html: '&lt;p&gt;Cell A content&lt;/p&gt;',
+        rowspan: 2
+    },{
+        html: '&lt;p&gt;Cell B content&lt;/p&gt;',
+        colspan: 2
+    },{
+        html: '&lt;p&gt;Cell C content&lt;/p&gt;',
+        cellCls: 'highlight'
+    },{
+        html: '&lt;p&gt;Cell D content&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Number} columns
+     * The total number of columns to create in the table for this layout.  If not specified, all Components added to
+     * this layout will be rendered into a single row using one column per Component.
+     */
+
+    // private
+    monitorResize:false,
+
+    /**
+     * @cfg {Object} tableAttrs
+     * <p>An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification
+     * used to create the layout's <tt>&lt;table&gt;</tt> element. Example:</p><pre><code>
+{
+    xtype: 'panel',
+    layout: 'table',
+    layoutConfig: {
+        tableAttrs: {
+        	style: {
+        		width: '100%'
+        	}
+        },
+        columns: 3
+    }
+}</code></pre>
+     */
+    tableAttrs:null,
+    
+    // private
+    setContainer : function(ct){
+        Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
+
+        this.currentRow = 0;
+        this.currentColumn = 0;
+        this.cells = [];
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.table){
+            target.addClass('x-table-layout-ct');
+
+            this.table = target.createChild(
+                Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
+        }
+        this.renderAll(ct, target);
+    },
+
+    // private
+    getRow : function(index){
+        var row = this.table.tBodies[0].childNodes[index];
+        if(!row){
+            row = document.createElement('tr');
+            this.table.tBodies[0].appendChild(row);
+        }
+        return row;
+    },
+
+    // private
+    getNextCell : function(c){
+        var cell = this.getNextNonSpan(this.currentColumn, this.currentRow);
+        var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1];
+        for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){
+            if(!this.cells[rowIndex]){
+                this.cells[rowIndex] = [];
+            }
+            for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){
+                this.cells[rowIndex][colIndex] = true;
+            }
+        }
+        var td = document.createElement('td');
+        if(c.cellId){
+            td.id = c.cellId;
+        }
+        var cls = 'x-table-layout-cell';
+        if(c.cellCls){
+            cls += ' ' + c.cellCls;
+        }
+        td.className = cls;
+        if(c.colspan){
+            td.colSpan = c.colspan;
+        }
+        if(c.rowspan){
+            td.rowSpan = c.rowspan;
+        }
+        this.getRow(curRow).appendChild(td);
+        return td;
+    },
+    
+    // private
+    getNextNonSpan: function(colIndex, rowIndex){
+        var cols = this.columns;
+        while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) {
+            if(cols && colIndex >= cols){
+                rowIndex++;
+                colIndex = 0;
+            }else{
+                colIndex++;
+            }
+        }
+        return [colIndex, rowIndex];
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(this.getNextCell(c));
+            if(this.extraCls){
+                var t = c.getPositionEl ? c.getPositionEl() : c;
+                t.addClass(this.extraCls);
+            }
+        }
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;/**
+ * @class Ext.layout.AbsoluteLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
+ * ability for x/y positioning using the standard x and y component config options.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var form = new Ext.form.FormPanel({
+    title: 'Absolute Layout',
+    layout:'absolute',
+    layoutConfig: {
+        // layout-specific configs go here
+        extraCls: 'x-abs-layout-item',
+    },
+    baseCls: 'x-plain',
+    url:'save-form.php',
+    defaultType: 'textfield',
+    items: [{
+        x: 0,
+        y: 5,
+        xtype:'label',
+        text: 'Send To:'
+    },{
+        x: 60,
+        y: 0,
+        name: 'to',
+        anchor:'100%'  // anchor width by percentage
+    },{
+        x: 0,
+        y: 35,
+        xtype:'label',
+        text: 'Subject:'
+    },{
+        x: 60,
+        y: 30,
+        name: 'subject',
+        anchor: '100%'  // anchor width by percentage
+    },{
+        x:0,
+        y: 60,
+        xtype: 'textarea',
+        name: 'msg',
+        anchor: '100% 100%'  // anchor width and height
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    extraCls: 'x-abs-layout-item',
+
+    onLayout : function(ct, target){
+        target.position();
+        this.paddingLeft = target.getPadding('l');
+        this.paddingTop = target.getPadding('t');
+
+        Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return  value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;
+/**
+ * @class Ext.layout.BoxLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.</p>
+ */
+Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Object} defaultMargins
+     * <p>If the individual contained items do not have a <tt>margins</tt>
+     * property specified, the default margins from this property will be
+     * applied to each item.</p>
+     * <br><p>This property may be specified as an object containing margins
+     * to apply in the format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>This property may also be specified as a string containing
+     * space-separated, numeric margin values. The order of the sides associated
+     * with each value matches the way CSS processes margin values:</p>
+     * <div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the
+     * first value and the right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left
+     * and right are set to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and
+     * left, respectively.</li>
+     * </ul></div>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    /**
+     * @cfg {String} padding
+     * Defaults to <tt>'0'</tt>. Sets the padding to be applied to all child items managed by this
+     * container's layout. 
+     */
+    padding : '0',
+    // documented in subclasses
+    pack : 'start',
+
+    // private
+    monitorResize : true,
+    scrollOffset : 0,
+    extraCls : 'x-box-item',
+    ctCls : 'x-box-layout-ct',
+    innerCls : 'x-box-inner',
+
+    // private
+    isValidParent : function(c, target){
+        return c.getEl().dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm;
+
+        if(!this.innerCt){
+            target.addClass(this.ctCls);
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:this.innerCls});
+            this.padding = this.parseMargins(this.padding); 
+        }
+        this.renderAll(ct, this.innerCt);
+    },
+
+    // private
+    renderItem : function(c){
+        if(typeof c.margins == 'string'){
+            c.margins = this.parseMargins(c.margins);
+        }else if(!c.margins){
+            c.margins = this.defaultMargins;
+        }
+        Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments);
+    },
+
+    getTargetSize : function(target){
+        return (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getStyleSize() : target.getViewSize();
+    },
+    
+    getItems: function(ct){
+        var items = [];
+        ct.items.each(function(c){
+            if(c.isVisible()){
+                items.push(c);
+            }
+        });
+        return items;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.VBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items vertically
+ */
+Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>left</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned horizontally
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are aligned horizontally at the
+     * <b>mid-width</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched horizontally to fill
+     * the width of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched horizontally to
+     * the size of the largest item.</div></li>
+     * </ul></div>
+     */
+    align : 'left', // left, center, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>top</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-height</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>bottom</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>vertically</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.VBoxLayout.superclass.onLayout.call(this, ct, target);
+                    
+        
+        var cs = this.getItems(ct), cm, ch, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchWidth = w - (this.padding.left + this.padding.right),
+            extraHeight = 0,
+            maxWidth = 0,
+            totalFlex = 0,
+            flexHeight = 0,
+            usedHeight = 0;
+            
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            ch = c.getHeight();
+            margin = cm.top + cm.bottom;
+            extraHeight += ch + margin;
+            flexHeight += margin + (c.flex ? 0 : ch);
+            maxWidth = Math.max(maxWidth, c.getWidth() + cm.left + cm.right);
+        });
+        extraHeight = h - extraHeight - this.padding.top - this.padding.bottom;
+        
+        var innerCtWidth = maxWidth + this.padding.left + this.padding.right;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'left':
+                this.innerCt.setSize(innerCtWidth, h);
+                break;
+            case 'center':
+                this.innerCt.setSize(w = Math.max(w, innerCtWidth), h);
+                break;
+        }
+
+        var availHeight = Math.max(0, h - this.padding.top - this.padding.bottom - flexHeight),
+            leftOver = availHeight,
+            heights = [],
+            restore = [],
+            idx = 0,
+            availableWidth = Math.max(0, w - this.padding.left - this.padding.right);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                ch = Math.floor(availHeight * (c.flex / totalFlex));
+                leftOver -= ch;
+                heights.push(ch);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            t += extraHeight ? extraHeight / 2 : 0;
+        }else if(this.pack == 'end'){
+            t += extraHeight;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            t += cm.top;
+            c.setPosition(l + cm.left, t);
+            if(isStart && c.flex){
+                ch = Math.max(0, heights[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getWidth());
+                }
+                c.setSize(availableWidth, ch);
+            }else{
+                ch = c.getHeight();
+            }
+            t += ch + cm.bottom;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setWidth((stretchWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setWidth((maxWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else{
+                if(this.align == 'center'){
+                    var diff = availableWidth - (c.getWidth() + cm.left + cm.right);
+                    if(diff > 0){
+                        c.setPosition(l + cm.left + (diff/2), c.y);
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setWidth(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout;
+
+/**
+ * @class Ext.layout.HBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items horizontally
+ */
+Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>top</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned vertically
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>middle</tt></b> : <div class="sub-desc">child items are aligned vertically at the
+     * <b>mid-height</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched vertically to fill
+     * the height of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched vertically to
+     * the size of the largest item.</div></li>
+     */
+    align : 'top', // top, middle, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>left</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-width</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>right</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>horizontally</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.HBoxLayout.superclass.onLayout.call(this, ct, target);
+        
+        var cs = this.getItems(ct), cm, cw, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchHeight = h - (this.padding.top + this.padding.bottom),
+            extraWidth = 0,
+            maxHeight = 0,
+            totalFlex = 0,
+            flexWidth = 0,
+            usedWidth = 0;
+        
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            cw = c.getWidth();
+            margin = cm.left + cm.right;
+            extraWidth += cw + margin;
+            flexWidth += margin + (c.flex ? 0 : cw);
+            maxHeight = Math.max(maxHeight, c.getHeight() + cm.top + cm.bottom);
+        });
+        extraWidth = w - extraWidth - this.padding.left - this.padding.right;
+        
+        var innerCtHeight = maxHeight + this.padding.top + this.padding.bottom;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'top':
+                this.innerCt.setSize(w, innerCtHeight);
+                break;
+            case 'middle':
+                this.innerCt.setSize(w, h = Math.max(h, innerCtHeight));
+                break;
+        }
+        
+
+        var availWidth = Math.max(0, w - this.padding.left - this.padding.right - flexWidth),
+            leftOver = availWidth,
+            widths = [],
+            restore = [],
+            idx = 0,
+            availableHeight = Math.max(0, h - this.padding.top - this.padding.bottom);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                cw = Math.floor(availWidth * (c.flex / totalFlex));
+                leftOver -= cw;
+                widths.push(cw);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            l += extraWidth ? extraWidth / 2 : 0;
+        }else if(this.pack == 'end'){
+            l += extraWidth;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            l += cm.left;
+            c.setPosition(l, t + cm.top);
+            if(isStart && c.flex){
+                cw = Math.max(0, widths[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getHeight());
+                }
+                c.setSize(cw, availableHeight);
+            }else{
+                cw = c.getWidth();
+            }
+            l += cw + cm.right;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            var cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setHeight((stretchHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setHeight((maxHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else{
+                if(this.align == 'middle'){
+                    var diff = availableHeight - (c.getHeight() + cm.top + cm.bottom);
+                    if(diff > 0){
+                        c.setPosition(c.x, t + cm.top + (diff/2));
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setHeight(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;
+/**
+ * @class Ext.Viewport
+ * @extends Ext.Container
+ * <p>A specialized container representing the viewable application area (the browser viewport).</p>
+ * <p>The Viewport renders itself to the document body, and automatically sizes itself to the size of
+ * the browser viewport and manages window resizing. There may only be one Viewport created
+ * in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s
+ * added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add}
+ * method of any of its child Panels may themselves have a layout.</p>
+ * <p>The Viewport does not provide scrolling, so child Panels within the Viewport should provide
+ * for scrolling if needed using the {@link #autoScroll} config.</p>
+ * <p>An example showing a classic application border layout:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'north',
+        html: '&lt;h1 class="x-panel-header">Page Title&lt;/h1>',
+        autoHeight: true,
+        border: false,
+        margins: '0 0 5 0'
+    }, {
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        width: 200
+        // the west region might typically utilize a {@link Ext.tree.TreePanel TreePanel} or a Panel with {@link Ext.layout.AccordionLayout Accordion layout} 
+    }, {
+        region: 'south',
+        title: 'Title for Panel',
+        collapsible: true,
+        html: 'Information goes here',
+        split: true,
+        height: 100,
+        minHeight: 100
+    }, {
+        region: 'east',
+        title: 'Title for the Grid Panel',
+        collapsible: true,
+        split: true,
+        width: 200,
+        xtype: 'grid',
+        // remaining grid configuration not shown ...
+        // notice that the GridPanel is added directly as the region
+        // it is not "overnested" inside another Panel
+    }, {
+        region: 'center',
+        xtype: 'tabpanel', // TabPanel itself has no title
+        items: {
+            title: 'Default Tab',
+            html: 'The first tab\'s content. Others may be added dynamically'
+        }
+    }]
+});
+</code></pre>
+ * @constructor
+ * Create a new Viewport
+ * @param {Object} config The config object
+ * @xtype viewport
+ */
+Ext.Viewport = Ext.extend(Ext.Container, {
+	/*
+	 * Privatize config options which, if used, would interfere with the
+	 * correct operation of the Viewport as the sole manager of the
+	 * layout of the document body.
+	 */
+    /**
+     * @cfg {Mixed} applyTo @hide
+	 */
+    /**
+     * @cfg {Boolean} allowDomMove @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Mixed} renderTo @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Number} height @hide
+	 */
+    /**
+     * @cfg {Number} width @hide
+	 */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} autoWidth @hide
+	 */
+    /**
+     * @cfg {Boolean} deferHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} monitorResize @hide
+	 */
+    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(w, h){
+        this.fireEvent('resize', this, w, h, w, h);
+    }
+});
+Ext.reg('viewport', Ext.Viewport);/**
+ * @class Ext.Panel
+ * @extends Ext.Container
+ * <p>Panel is a container that has specific functionality and structural components that make
+ * it the perfect building block for application-oriented user interfaces.</p>
+ * <p>Panels are, by virtue of their inheritance from {@link Ext.Container}, capable
+ * of being configured with a {@link Ext.Container#layout layout}, and containing child Components.</p>
+ * <p>When either specifying child {@link Ext.Component#items items} of a Panel, or dynamically {@link Ext.Container#add adding} Components
+ * to a Panel, remember to consider how you wish the Panel to arrange those child elements, and whether
+ * those child elements need to be sized using one of Ext's built-in <tt><b>{@link Ext.Container#layout layout}</b></tt> schemes. By
+ * default, Panels use the {@link Ext.layout.ContainerLayout ContainerLayout} scheme. This simply renders
+ * child components, appending them one after the other inside the Container, and <b>does not apply any sizing</b>
+ * at all.</p>
+ * <p>A Panel may also contain {@link #bbar bottom} and {@link #tbar top} toolbars, along with separate
+ * {@link #header}, {@link #footer} and {@link #body} sections (see {@link #frame} for additional
+ * information).</p>
+ * <p>Panel also provides built-in {@link #collapsible expandable and collapsible behavior}, along with
+ * a variety of {@link #tools prebuilt tool buttons} that can be wired up to provide other customized
+ * behavior.  Panels can be easily dropped into any {@link Ext.Container Container} or layout, and the
+ * layout and rendering pipeline is {@link Ext.Container#add completely managed by the framework}.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype panel
+ */
+Ext.Panel = Ext.extend(Ext.Container, {
+    /**
+     * The Panel's header {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the {@link #title} and {@link #tools}</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property header
+     */
+    /**
+     * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content.
+     * The content may be specified in the {@link #html} config, or it may be loaded using the
+     * {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only.
+     * <p>If this is used to load visible HTML elements in either way, then
+     * the Panel may not be used as a Layout for hosting nested Panels.</p>
+     * <p>If this Panel is intended to be used as the host of a Layout (See {@link #layout}
+     * then the body Element must not be loaded or changed - it is under the control
+     * of the Panel's Layout.
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property body
+     */
+    /**
+     * The Panel's bwrap {@link Ext.Element Element} used to contain other Panel elements
+     * (tbar, body, bbar, footer). See {@link #bodyCfg}. Read-only.
+     * @type Ext.Element
+     * @property bwrap
+     */
+    /**
+     * True if this panel is collapsed. Read-only.
+     * @type Boolean
+     * @property collapsed
+     */
+    /**
+     * @cfg {Object} bodyCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object may be specified for any
+     * Panel Element.</p>
+     * <p>By default, the Default element in the table below will be used for the html markup to
+     * create a child element with the commensurate Default class name (<tt>baseCls</tt> will be
+     * replaced by <tt>{@link #baseCls}</tt>):</p>
+     * <pre>
+     * Panel      Default  Default             Custom      Additional       Additional
+     * Element    element  class               element     class            style
+     * ========   ==========================   =========   ==============   ===========
+     * {@link #header}     div      {@link #baseCls}+'-header'   {@link #headerCfg}   headerCssClass   headerStyle
+     * {@link #bwrap}      div      {@link #baseCls}+'-bwrap'     {@link #bwrapCfg}    bwrapCssClass    bwrapStyle
+     * + tbar     div      {@link #baseCls}+'-tbar'       {@link #tbarCfg}     tbarCssClass     tbarStyle
+     * + {@link #body}     div      {@link #baseCls}+'-body'       {@link #bodyCfg}     {@link #bodyCssClass}     {@link #bodyStyle}
+     * + bbar     div      {@link #baseCls}+'-bbar'       {@link #bbarCfg}     bbarCssClass     bbarStyle
+     * + {@link #footer}   div      {@link #baseCls}+'-footer'   {@link #footerCfg}   footerCssClass   footerStyle
+     * </pre>
+     * <p>Configuring a Custom element may be used, for example, to force the {@link #body} Element
+     * to use a different form of markup than is created by default. An example of this might be
+     * to {@link Ext.Element#createChild create a child} Panel containing a custom content, such as
+     * a header, or forcing centering of all Panel content by having the body be a &lt;center&gt;
+     * element:</p>
+     * <pre><code>
+new Ext.Panel({
+    title: 'Message Title',
+    renderTo: Ext.getBody(),
+    width: 200, height: 130,
+    <b>bodyCfg</b>: {
+        tag: 'center',
+        cls: 'x-panel-body',  // Default class not applied if Custom element specified
+        html: 'Message'
+    },
+    footerCfg: {
+        tag: 'h2',
+        cls: 'x-panel-footer'        // same as the Default class
+        html: 'footer html'
+    },
+    footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass}
+    footerStyle:    'background-color:red' // see {@link #bodyStyle}
+});
+     * </code></pre>
+     * <p>The example above also explicitly creates a <tt>{@link #footer}</tt> with custom markup and
+     * styling applied.</p>
+     */
+    /**
+     * @cfg {Object} headerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #header} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bwrapCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bwrap} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} tbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #tbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} footerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #footer} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} closable
+     * Panels themselves do not directly support being closed, but some Panel subclasses do (like
+     * {@link Ext.Window}) or a Panel Class within an {@link Ext.TabPanel}.  Specify <tt>true</tt>
+     * to enable closing in such situations. Defaults to <tt>false</tt>.
+     */
+    /**
+     * The Panel's footer {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the Panel's <tt>{@link #buttons}</tt> or <tt>{@link #fbar}</tt>.</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property footer
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in
+     * the document that specifies some panel-specific structural markup.  When <tt>applyTo</tt> is used,
+     * constituent parts of the panel can be specified by CSS class name within the main element, and the panel
+     * will automatically create those components from that markup. Any required components not specified in the
+     * markup will be autogenerated if necessary.</p>
+     * <p>The following class names are supported (baseCls will be replaced by {@link #baseCls}):</p>
+     * <ul><li>baseCls + '-header'</li>
+     * <li>baseCls + '-header-text'</li>
+     * <li>baseCls + '-bwrap'</li>
+     * <li>baseCls + '-tbar'</li>
+     * <li>baseCls + '-body'</li>
+     * <li>baseCls + '-bbar'</li>
+     * <li>baseCls + '-footer'</li></ul>
+     * <p>Using this config, a call to render() is not required.  If applyTo is specified, any value passed for
+     * {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the
+     * panel's container.</p>
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * <p>The top toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the top toolbar after render, use {@link #getTopToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not</b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Object/Array} bbar
+     * <p>The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the bottom toolbar after render, use {@link #getBottomToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /** @cfg {Object/Array} fbar
+     * <p>A {@link Ext.Toolbar Toolbar} object, a Toolbar config, or an array of
+     * {@link Ext.Button Button}s/{@link Ext.Button Button} configs, describing a {@link Ext.Toolbar Toolbar} to be rendered into this Panel's footer element.</p>
+     * <p>After render, the <code>fbar</code> property will be an {@link Ext.Toolbar Toolbar} instance.</p>
+     * <p>If <tt>{@link #buttons}</tt> are specified, they will supersede the <tt>fbar</tt> configuration property.</p>
+     * The Panel's <tt>{@link #buttonAlign}</tt> configuration affects the layout of these items, for example:
+     * <pre><code>
+var w = new Ext.Window({
+    height: 250,
+    width: 500,
+    bbar: new Ext.Toolbar({
+        items: [{
+            text: 'bbar Left'
+        },'->',{
+            text: 'bbar Right'
+        }]
+    }),
+    {@link #buttonAlign}: 'left', // anything but 'center' or 'right' and you can use "-", and "->"
+                                  // to control the alignment of fbar items
+    fbar: [{
+        text: 'fbar Left'
+    },'->',{
+        text: 'fbar Right'
+    }]
+}).show();
+     * </code></pre>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Boolean} header
+     * <tt>true</tt> to create the Panel's header element explicitly, <tt>false</tt> to skip creating
+     * it.  If a <tt>{@link #title}</tt> is set the header will be created automatically, otherwise it will not.
+     * If a <tt>{@link #title}</tt> is set but <tt>header</tt> is explicitly set to <tt>false</tt>, the header
+     * will not be rendered.
+     */
+    /**
+     * @cfg {Boolean} footer
+     * <tt>true</tt> to create the footer element explicitly, false to skip creating it. The footer
+     * will be created automatically if <tt>{@link #buttons}</tt> or a <tt>{@link #fbar}</tt> have
+     * been configured.  See <tt>{@link #bodyCfg}</tt> for an example.
+     */
+    /**
+     * @cfg {String} title
+     * The title text to be used as innerHTML (html tags are accepted) to display in the panel
+     * <tt>{@link #header}</tt> (defaults to ''). When a <tt>title</tt> is specified the
+     * <tt>{@link #header}</tt> element will automatically be created and displayed unless
+     * {@link #header} is explicitly set to <tt>false</tt>.  If you do not want to specify a
+     * <tt>title</tt> at config time, but you may want one later, you must either specify a non-empty
+     * <tt>title</tt> (a blank space ' ' will do) or <tt>header:true</tt> so that the container
+     * element will get created.
+     */
+    /**
+     * @cfg {Array} buttons
+     * <tt>buttons</tt> will be used as <tt>{@link Ext.Container#items items}</tt> for the toolbar in
+     * the footer (<tt>{@link #fbar}</tt>). Typically the value of this configuration property will be
+     * an array of {@link Ext.Button}s or {@link Ext.Button} configuration objects.
+     * If an item is configured with <tt>minWidth</tt> or the Panel is configured with <tt>minButtonWidth</tt>,
+     * that width will be applied to the item.
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * A valid url spec according to the Updater {@link Ext.Updater#update} method.
+     * If autoLoad is not null, the panel will attempt to load its contents
+     * immediately upon render.<p>
+     * The URL will become the default URL for this panel's {@link #body} element,
+     * so it may be {@link Ext.Element#refresh refresh}ed at any time.</p>
+     */
+    /**
+     * @cfg {Boolean} frame
+     * <tt>false</tt> by default to render with plain 1px square borders. <tt>true</tt> to render with
+     * 9 elements, complete with custom rounded corners (also see {@link Ext.Element#boxWrap}).
+     * <p>The template generated for each condition is depicted below:</p><pre><code>
+     *
+// frame = false
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+
+    &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:false)&lt;/span>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+    &lt;/div>
+&lt;/div>
+
+// frame = true (create 9 elements)
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+    &lt;div class="x-panel-tl">&lt;div class="x-panel-tr">&lt;div class="x-panel-tc">
+        &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:true)&lt;/span>&lt;/div>
+    &lt;/div>&lt;/div>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-ml">&lt;div class="x-panel-mr">&lt;div class="x-panel-mc">
+            &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+        &lt;/div>&lt;/div>&lt;/div>
+
+        &lt;div class="x-panel-bl">&lt;div class="x-panel-br">&lt;div class="x-panel-bc"/>
+        &lt;/div>&lt;/div>&lt;/div>
+&lt;/div>
+     * </code></pre>
+     */
+    /**
+     * @cfg {Boolean} border
+     * True to display the borders of the panel's body element, false to hide them (defaults to true).  By default,
+     * the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false.
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * True to display an interior border on the body element of the panel, false to hide it (defaults to true).
+     * This only applies when {@link #border} == true.  If border == true and bodyBorder == false, the border will display
+     * as a 1px wide inset border, giving the entire body element an inset appearance.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyCssClass
+     * Additional css class selector to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#addClass} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyStyle
+     * Custom CSS styles to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#applyStyles} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'my-icon'
+
+// css class that specifies background image to be used as the icon image:
+.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
+     * the header tool button area, false to keep the panel statically sized with no button (defaults to false).
+     */
+    /**
+     * @cfg {Array} tools
+     * An array of tool button configs to be added to the header tool area. When rendered, each tool is
+     * stored as an {@link Ext.Element Element} referenced by a public property called <tt><b></b>tools.<i>&lt;tool-type&gt;</i></tt>
+     * <p>Each tool config may contain the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc"><b>Required.</b> The type
+     * of tool to create. By default, this assigns a CSS class of the form <tt>x-tool-<i>&lt;tool-type&gt;</i></tt> to the
+     * resulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below.
+     * The developer may implement custom tools by supplying alternate CSS rules and background images:
+     * <ul>
+     * <div class="x-tool x-tool-toggle" style="float:left; margin-right:5;"> </div><div><tt> toggle</tt> (Created by default when {@link #collapsible} is <tt>true</tt>)</div>
+     * <div class="x-tool x-tool-close" style="float:left; margin-right:5;"> </div><div><tt> close</tt></div>
+     * <div class="x-tool x-tool-minimize" style="float:left; margin-right:5;"> </div><div><tt> minimize</tt></div>
+     * <div class="x-tool x-tool-maximize" style="float:left; margin-right:5;"> </div><div><tt> maximize</tt></div>
+     * <div class="x-tool x-tool-restore" style="float:left; margin-right:5;"> </div><div><tt> restore</tt></div>
+     * <div class="x-tool x-tool-gear" style="float:left; margin-right:5;"> </div><div><tt> gear</tt></div>
+     * <div class="x-tool x-tool-pin" style="float:left; margin-right:5;"> </div><div><tt> pin</tt></div>
+     * <div class="x-tool x-tool-unpin" style="float:left; margin-right:5;"> </div><div><tt> unpin</tt></div>
+     * <div class="x-tool x-tool-right" style="float:left; margin-right:5;"> </div><div><tt> right</tt></div>
+     * <div class="x-tool x-tool-left" style="float:left; margin-right:5;"> </div><div><tt> left</tt></div>
+     * <div class="x-tool x-tool-up" style="float:left; margin-right:5;"> </div><div><tt> up</tt></div>
+     * <div class="x-tool x-tool-down" style="float:left; margin-right:5;"> </div><div><tt> down</tt></div>
+     * <div class="x-tool x-tool-refresh" style="float:left; margin-right:5;"> </div><div><tt> refresh</tt></div>
+     * <div class="x-tool x-tool-minus" style="float:left; margin-right:5;"> </div><div><tt> minus</tt></div>
+     * <div class="x-tool x-tool-plus" style="float:left; margin-right:5;"> </div><div><tt> plus</tt></div>
+     * <div class="x-tool x-tool-help" style="float:left; margin-right:5;"> </div><div><tt> help</tt></div>
+     * <div class="x-tool x-tool-search" style="float:left; margin-right:5;"> </div><div><tt> search</tt></div>
+     * <div class="x-tool x-tool-save" style="float:left; margin-right:5;"> </div><div><tt> save</tt></div>
+     * <div class="x-tool x-tool-print" style="float:left; margin-right:5;"> </div><div><tt> print</tt></div>
+     * </ul></div></li>
+     * <li><b>handler</b> : Function<div class="sub-desc"><b>Required.</b> The function to
+     * call when clicked. Arguments passed are:<ul>
+     * <li><b>event</b> : Ext.EventObject<div class="sub-desc">The click event.</div></li>
+     * <li><b>toolEl</b> : Ext.Element<div class="sub-desc">The tool Element.</div></li>
+     * <li><b>panel</b> : Ext.Panel<div class="sub-desc">The host Panel</div></li>
+     * <li><b>tc</b> : Ext.Panel<div class="sub-desc">The tool configuration object</div></li>
+     * </ul></div></li>
+     * <li><b>stopEvent</b> : Boolean<div class="sub-desc">Defaults to true. Specify as false to allow click event to propagate.</div></li>
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the handler.</div></li>
+     * <li><b>qtip</b> : String/Object<div class="sub-desc">A tip string, or
+     * a config argument to {@link Ext.QuickTip#register}</div></li>
+     * <li><b>hidden</b> : Boolean<div class="sub-desc">True to initially render hidden.</div></li>
+     * <li><b>on</b> : Object<div class="sub-desc">A listener config object specifiying
+     * event listeners in the format of an argument to {@link #addListener}</div></li>
+     * </ul></div>
+     * <p>Note that, apart from the toggle tool which is provided when a panel is collapsible, these
+     * tools only provide the visual button. Any required functionality must be provided by adding
+     * handlers that implement the necessary behavior.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+tools:[{
+    id:'refresh',
+    qtip: 'Refresh form Data',
+    // hidden:true,
+    handler: function(event, toolEl, panel){
+        // refresh logic
+    }
+},
+{
+    id:'help',
+    qtip: 'Get Help',
+    handler: function(event, toolEl, panel){
+        // whatever
+    }
+}]
+</code></pre>
+     * <p>For the custom id of <tt>'help'</tt> define two relevant css classes with a link to
+     * a 15x15 image:</p>
+     * <pre><code>
+.x-tool-help {background-image: url(images/help.png);}
+.x-tool-help-over {background-image: url(images/help_over.png);}
+// if using an image sprite:
+.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}
+.x-tool-help-over {background-position:-15px 0;}
+</code></pre>
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * <p>A Template used to create {@link #tools} in the {@link #header} Element. Defaults to:</p><pre><code>
+new Ext.Template('&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>')</code></pre>
+     * <p>This may may be overridden to provide a custom DOM structure for tools based upon a more
+     * complex XTemplate. The template's data is a single tool configuration object (Not the entire Array)
+     * as specified in {@link #tools}.  In the following example an &lt;a> tag is used to provide a
+     * visual indication when hovering over the tool:</p><pre><code>
+var win = new Ext.Window({
+    tools: [{
+        id: 'download',
+        href: '/MyPdfDoc.pdf'
+    }],
+    toolTemplate: new Ext.XTemplate(
+        '&lt;tpl if="id==\'download\'">',
+            '&lt;a class="x-tool x-tool-pdf" href="{href}">&lt;/a>',
+        '&lt;/tpl>',
+        '&lt;tpl if="id!=\'download\'">',
+            '&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>',
+        '&lt;/tpl>'
+    ),
+    width:500,
+    height:300,
+    closeAction:'hide'
+});</code></pre>
+     * <p>Note that the CSS class "x-tool-pdf" should have an associated style rule which provides an
+     * appropriate background image, something like:</p>
+    <pre><code>
+    a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * <tt>true</tt> to hide the expand/collapse toggle button when <code>{@link #collapsible} == true</code>,
+     * <tt>false</tt> to display it (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * <tt>true</tt> to allow expanding and collapsing the panel (when <tt>{@link #collapsible} = true</tt>)
+     * by clicking anywhere in the header bar, <tt>false</tt>) to allow it only by clicking to tool button
+     * (defaults to <tt>false</tt>)). If this panel is a child item of a border layout also see the
+     * {@link Ext.layout.BorderLayout.Region BorderLayout.Region}
+     * <tt>{@link Ext.layout.BorderLayout.Region#floatable floatable}</tt> config option.
+     */
+    /**
+     * @cfg {Boolean} autoScroll
+     * <tt>true</tt> to use overflow:'auto' on the panel's body element and show scroll bars automatically when
+     * necessary, <tt>false</tt> to clip any overflowing content (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Mixed} floating
+     * <p>This property is used to configure the underlying {@link Ext.Layer}. Acceptable values for this
+     * configuration property are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>false</tt></b> : <b>Default.</b><div class="sub-desc">Display the panel inline where it is
+     * rendered.</div></li>
+     * <li><b><tt>true</tt></b> : <div class="sub-desc">Float the panel (absolute position it with automatic
+     * shimming and shadow).<ul>
+     * <div class="sub-desc">Setting floating to true will create an Ext.Layer for this panel and display the
+     * panel at negative offsets so that it is hidden.</div>
+     * <div class="sub-desc">Since the panel will be absolute positioned, the position must be set explicitly
+     * <i>after</i> render (e.g., <tt>myPanel.setPosition(100,100);</tt>).</div>
+     * <div class="sub-desc"><b>Note</b>: when floating a panel you should always assign a fixed width,
+     * otherwise it will be auto width and will expand to fill to the right edge of the viewport.</div>
+     * </ul></div></li>
+     * <li><b><tt>{@link Ext.Layer object}</tt></b> : <div class="sub-desc">The specified object will be used
+     * as the configuration object for the {@link Ext.Layer} that will be created.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * <tt>true</tt> (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the
+     * panel, <tt>false</tt> to display no shadow (defaults to <tt>'sides'</tt>).  Note that this option
+     * only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * The number of pixels to offset the shadow if displayed (defaults to <tt>4</tt>). Note that this
+     * option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} shim
+     * <tt>false</tt> to disable the iframe shim in browsers which need one (defaults to <tt>true</tt>).
+     * Note that this option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {String/Object} html
+     * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use as the panel's body
+     * content (defaults to ''). The HTML content is added by the Panel's {@link #afterRender} method,
+     * and so the document will not contain this HTML at the time the {@link #render} event is fired.
+     * This content is inserted into the body <i>before</i> any configured {@link #contentEl} is appended.
+     */
+    /**
+     * @cfg {String} contentEl
+     * <p>Specify the <tt>id</tt> of an existing HTML node to use as the panel's body content
+     * (defaults to '').</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">This config option is used to take an existing HTML element and place it in the body
+     * of a new panel (it simply moves the specified DOM element into the body element of the Panel
+     * <i>when the Panel is rendered</i> to use as the content (it is not going to be the
+     * actual panel itself).</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">The specified HTML Element is appended to the Panel's {@link #body} Element by the
+     * Panel's {@link #afterRender} method <i>after any configured {@link #html HTML} has
+     * been inserted</i>, and so the document will not contain this HTML at the time the
+     * {@link #render} event is fired.</div>
+     * <div class="sub-desc">The specified HTML element used will not participate in any layout scheme that the
+     * Panel may use. It's just HTML. Layouts operate on child items.</div>
+     * <div class="sub-desc">Add either the <tt>x-hidden</tt> or the <tt>x-hide-display</tt> CSS class to
+     * prevent a brief flicker of the content before it is rendered to the panel.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object/Array} keys
+     * A {@link Ext.KeyMap} config object (in the format expected by {@link Ext.KeyMap#addBinding}
+     * used to assign custom key handling to this panel (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean/Object} draggable
+     * <p><tt>true</tt> to enable dragging of this Panel (defaults to <tt>false</tt>).</p>
+     * <p>For custom drag/drop implementations, an <b>Ext.Panel.DD</b> config could also be passed
+     * in this config instead of <tt>true</tt>. Ext.Panel.DD is an internal, undocumented class which
+     * moves a proxy Element around in place of the Panel's element, but provides no other behaviour
+     * during dragging or on drop. It is a subclass of {@link Ext.dd.DragSource}, so behaviour may be
+     * added by implementing the interface methods of {@link Ext.dd.DragDrop} e.g.:
+     * <pre><code>
+new Ext.Panel({
+    title: 'Drag me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    draggable: {
+//      Config option of Ext.Panel.DD class.
+//      It&#39;s a floating Panel, so do not show a placeholder proxy in the original position.
+        insertProxy: false,
+
+//      Called for each mousemove event while dragging the DD object.
+        onDrag : function(e){
+//          Record the x,y position of the drag proxy so that we can
+//          position the Panel at end of drag.
+            var pel = this.proxy.getEl();
+            this.x = pel.getLeft(true);
+            this.y = pel.getTop(true);
+
+//          Keep the Shadow aligned if there is one.
+            var s = this.panel.getEl().shadow;
+            if (s) {
+                s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
+            }
+        },
+
+//      Called on the mouseup event.
+        endDrag : function(e){
+            this.panel.setPosition(this.x, this.y);
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {String} tabTip
+     * A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over
+     * the tab of a Ext.Panel which is an item of a {@link Ext.TabPanel}. {@link Ext.QuickTips}.init()
+     * must be called in order for the tips to render.
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this panel disabled (default is <tt>false</tt>). An important note when using the disabled
+     * config on panels is that IE will often fail to initialize the disabled mask element correectly if
+     * the panel's layout has not yet completed by the time the Panel is disabled during the render process.
+     * If you experience this issue, you may need to instead use the {@link #afterlayout} event to initialize
+     * the disabled state:
+     * <pre><code>
+new Ext.Panel({
+    ...
+    listeners: {
+        'afterlayout': {
+            fn: function(p){
+                p.disable();
+            },
+            single: true // important, as many layouts can occur
+        }
+    }
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <tt>true</tt> to use height:'auto', <tt>false</tt> to use fixed height (defaults to <tt>false</tt>).
+     * <b>Note</b>: Setting <tt>autoHeight:true</tt> means that the browser will manage the panel's height
+     * based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
+     * manages dimensions (<tt>fit</tt>, <tt>border</tt>, etc.) then setting <tt>autoHeight:true</tt>
+     * can cause issues with scrolling and will not generally work as expected since the panel will take
+     * on the height of its contents rather than the height required by the Ext layout.
+     */
+
+
+    /**
+     * @cfg {String} baseCls
+     * The base CSS class to apply to this panel's element (defaults to <tt>'x-panel'</tt>).
+     * <p>Another option available by default is to specify <tt>'x-plain'</tt> which strips all styling
+     * except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     * See <tt>{@link #unstyled}</tt> also.</p>
+     */
+    baseCls : 'x-panel',
+    /**
+     * @cfg {String} collapsedCls
+     * A CSS class to add to the panel's element after it has been collapsed (defaults to
+     * <tt>'x-panel-collapsed'</tt>).
+     */
+    collapsedCls : 'x-panel-collapsed',
+    /**
+     * @cfg {Boolean} maskDisabled
+     * <tt>true</tt> to mask the panel when it is {@link #disabled}, <tt>false</tt> to not mask it (defaults
+     * to <tt>true</tt>).  Either way, the panel will always tell its contained elements to disable themselves
+     * when it is disabled, but masking the panel can provide an additional visual cue that the panel is
+     * disabled.
+     */
+    maskDisabled : true,
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>true</tt> if the {@link Ext.Fx} class is available, otherwise <tt>false</tt>).
+     */
+    animCollapse : Ext.enableFx,
+    /**
+     * @cfg {Boolean} headerAsText
+     * <tt>true</tt> to display the panel <tt>{@link #title}</tt> in the <tt>{@link #header}</tt>,
+     * <tt>false</tt> to hide it (defaults to <tt>true</tt>).
+     */
+    headerAsText : true,
+    /**
+     * @cfg {String} buttonAlign
+     * The alignment of any {@link #buttons} added to this panel.  Valid values are <tt>'right'</tt>,
+     * <tt>'left'</tt> and <tt>'center'</tt> (defaults to <tt>'right'</tt>).
+     */
+    buttonAlign : 'right',
+    /**
+     * @cfg {Boolean} collapsed
+     * <tt>true</tt> to render the panel collapsed, <tt>false</tt> to render it expanded (defaults to
+     * <tt>false</tt>).
+     */
+    collapsed : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * <tt>true</tt> to make sure the collapse/expand toggle button always renders first (to the left of)
+     * any other tools in the panel's title bar, <tt>false</tt> to render it last (defaults to <tt>true</tt>).
+     */
+    collapseFirst : true,
+    /**
+     * @cfg {Number} minButtonWidth
+     * Minimum width in pixels of all {@link #buttons} in this panel (defaults to <tt>75</tt>)
+     */
+    minButtonWidth : 75,
+    /**
+     * @cfg {Boolean} unstyled
+     * Overrides the <tt>{@link #baseCls}</tt> setting to <tt>{@link #baseCls} = 'x-plain'</tt> which renders
+     * the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     */
+    /**
+     * @cfg {String} elements
+     * A comma-delimited list of panel elements to initialize when the panel is rendered.  Normally, this list will be
+     * generated automatically based on the items added to the panel at config time, but sometimes it might be useful to
+     * make sure a structural element is rendered even if not specified at config time (for example, you may want
+     * to add a button or toolbar dynamically after the panel has been rendered).  Adding those elements to this
+     * list will allocate the required placeholders in the panel when it is rendered.  Valid values are<div class="mdetail-params"><ul>
+     * <li><tt>header</tt></li>
+     * <li><tt>tbar</tt> (top bar)</li>
+     * <li><tt>body</tt></li>
+     * <li><tt>bbar</tt> (bottom bar)</li>
+     * <li><tt>footer</tt></li>
+     * </ul></div>
+     * Defaults to '<tt>body</tt>'.
+     */
+    elements : 'body',
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * Defaults to <tt>false</tt>.  When set to <tt>true</tt>, an extra css class <tt>'x-panel-normal'</tt>
+     * will be added to the panel's element, effectively applying css styles suggested by the W3C
+     * (see http://www.w3.org/TR/CSS21/sample.html) to the Panel's <b>body</b> element (not the header,
+     * footer, etc.).
+     */
+    preventBodyReset : false,
+
+    // protected - these could be used to customize the behavior of the window,
+    // but changing them would not be useful without further mofifications and
+    // could lead to unexpected or undesirable results.
+    toolTarget : 'header',
+    collapseEl : 'bwrap',
+    slideAnchor : 't',
+    disabledClass : '',
+
+    // private, notify box this class will handle heights
+    deferHeight : true,
+    // private
+    expandDefaults: {
+        duration : 0.25
+    },
+    // private
+    collapseDefaults : {
+        duration : 0.25
+    },
+
+    // private
+    initComponent : function(){
+        Ext.Panel.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event bodyresize
+             * Fires after the Panel has been resized.
+             * @param {Ext.Panel} p the Panel which has been resized.
+             * @param {Number} width The Panel's new width.
+             * @param {Number} height The Panel's new height.
+             */
+            'bodyresize',
+            /**
+             * @event titlechange
+             * Fires after the Panel title has been {@link #title set} or {@link #setTitle changed}.
+             * @param {Ext.Panel} p the Panel which has had its title changed.
+             * @param {String} The new title.
+             */
+            'titlechange',
+            /**
+             * @event iconchange
+             * Fires after the Panel icon class has been {@link #iconCls set} or {@link #setIconClass changed}.
+             * @param {Ext.Panel} p the Panel which has had its {@link #iconCls icon class} changed.
+             * @param {String} The new icon class.
+             * @param {String} The old icon class.
+             */
+            'iconchange',
+            /**
+             * @event collapse
+             * Fires after the Panel has been collapsed.
+             * @param {Ext.Panel} p the Panel that has been collapsed.
+             */
+            'collapse',
+            /**
+             * @event expand
+             * Fires after the Panel has been expanded.
+             * @param {Ext.Panel} p The Panel that has been expanded.
+             */
+            'expand',
+            /**
+             * @event beforecollapse
+             * Fires before the Panel is collapsed.  A handler can return false to cancel the collapse.
+             * @param {Ext.Panel} p the Panel being collapsed.
+             * @param {Boolean} animate True if the collapse is animated, else false.
+             */
+            'beforecollapse',
+            /**
+             * @event beforeexpand
+             * Fires before the Panel is expanded.  A handler can return false to cancel the expand.
+             * @param {Ext.Panel} p The Panel being expanded.
+             * @param {Boolean} animate True if the expand is animated, else false.
+             */
+            'beforeexpand',
+            /**
+             * @event beforeclose
+             * Fires before the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.  This event only
+             * applies to such subclasses.
+             * A handler can return false to cancel the close.
+             * @param {Ext.Panel} p The Panel being closed.
+             */
+            'beforeclose',
+            /**
+             * @event close
+             * Fires after the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.
+             * @param {Ext.Panel} p The Panel that has been closed.
+             */
+            'close',
+            /**
+             * @event activate
+             * Fires after the Panel has been visually activated.
+             * Note that Panels do not directly support being activated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been activated.
+             */
+            'activate',
+            /**
+             * @event deactivate
+             * Fires after the Panel has been visually deactivated.
+             * Note that Panels do not directly support being deactivated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been deactivated.
+             */
+            'deactivate'
+        );
+
+        if(this.unstyled){
+            this.baseCls = 'x-plain';
+        }
+
+        // shortcuts
+        if(this.tbar){
+            this.elements += ',tbar';
+            if(Ext.isObject(this.tbar)){
+                this.topToolbar = this.tbar;
+            }
+            delete this.tbar;
+        }
+        if(this.bbar){
+            this.elements += ',bbar';
+            if(Ext.isObject(this.bbar)){
+                this.bottomToolbar = this.bbar;
+            }
+            delete this.bbar;
+        }
+
+        if(this.header === true){
+            this.elements += ',header';
+            delete this.header;
+        }else if(this.headerCfg || (this.title && this.header !== false)){
+            this.elements += ',header';
+        }
+
+        if(this.footerCfg || this.footer === true){
+            this.elements += ',footer';
+            delete this.footer;
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+            var btns = this.buttons;
+            /**
+             * This Panel's Array of buttons as created from the <tt>{@link #buttons}</tt>
+             * config property. Read only.
+             * @type Array
+             * @property buttons
+             */
+            this.buttons = [];
+            for(var i = 0, len = btns.length; i < len; i++) {
+                if(btns[i].render){ // button instance
+                    this.buttons.push(btns[i]);
+                }else if(btns[i].xtype){
+                    this.buttons.push(Ext.create(btns[i], 'button'));
+                }else{
+                    this.addButton(btns[i]);
+                }
+            }
+        }
+        if(this.fbar){
+            this.elements += ',footer';
+        }
+        if(this.autoLoad){
+            this.on('render', this.doAutoLoad, this, {delay:10});
+        }
+    },
+
+    // private
+    createElement : function(name, pnode){
+        if(this[name]){
+            pnode.appendChild(this[name].dom);
+            return;
+        }
+
+        if(name === 'bwrap' || this.elements.indexOf(name) != -1){
+            if(this[name+'Cfg']){
+                this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']);
+            }else{
+                var el = document.createElement('div');
+                el.className = this[name+'Cls'];
+                this[name] = Ext.get(pnode.appendChild(el));
+            }
+            if(this[name+'CssClass']){
+                this[name].addClass(this[name+'CssClass']);
+            }
+            if(this[name+'Style']){
+                this[name].applyStyles(this[name+'Style']);
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Panel.superclass.onRender.call(this, ct, position);
+        this.createClasses();
+
+        var el = this.el,
+            d = el.dom,
+            bw;
+        el.addClass(this.baseCls);
+        if(d.firstChild){ // existing markup
+            this.header = el.down('.'+this.headerCls);
+            this.bwrap = el.down('.'+this.bwrapCls);
+            var cp = this.bwrap ? this.bwrap : el;
+            this.tbar = cp.down('.'+this.tbarCls);
+            this.body = cp.down('.'+this.bodyCls);
+            this.bbar = cp.down('.'+this.bbarCls);
+            this.footer = cp.down('.'+this.footerCls);
+            this.fromMarkup = true;
+        }
+        if (this.preventBodyReset === true) {
+            el.addClass('x-panel-reset');
+        }
+        if(this.cls){
+            el.addClass(this.cls);
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+        }
+
+        // This block allows for maximum flexibility and performance when using existing markup
+
+        // framing requires special markup
+        if(this.frame){
+            el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls));
+
+            this.createElement('header', d.firstChild.firstChild.firstChild);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            var ml = d.childNodes[1], bl = d.childNodes[2];
+            bw.appendChild(ml);
+            bw.appendChild(bl);
+
+            var mc = bw.firstChild.firstChild.firstChild;
+            this.createElement('tbar', mc);
+            this.createElement('body', mc);
+            this.createElement('bbar', mc);
+            this.createElement('footer', bw.lastChild.firstChild.firstChild);
+
+            if(!this.footer){
+                this.bwrap.dom.lastChild.className += ' x-panel-nofooter';
+            }
+        }else{
+            this.createElement('header', d);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            this.createElement('tbar', bw);
+            this.createElement('body', bw);
+            this.createElement('bbar', bw);
+            this.createElement('footer', bw);
+
+            if(!this.header){
+                this.body.addClass(this.bodyCls + '-noheader');
+                if(this.tbar){
+                    this.tbar.addClass(this.tbarCls + '-noheader');
+                }
+            }
+        }
+
+        if(this.padding !== undefined) {
+            this.body.setStyle('padding', this.body.addUnits(this.padding));
+        }
+
+        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');
+        }
+
+        this.bwrap.enableDisplayMode('block');
+
+        if(this.header){
+            this.header.unselectable();
+
+            // for tools, we need to wrap any existing header markup
+            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.mon(this.header, 'click', this.toggleCollapse, this);
+                this.header.setStyle('cursor', 'pointer');
+            }
+        }
+        if(this.tools){
+            var ts = this.tools;
+            this.tools = {};
+            this.addTool.apply(this, ts);
+        }else{
+            this.tools = {};
+        }
+
+        if(this.buttons && this.buttons.length > 0){
+            this.fbar = new Ext.Toolbar({
+                items: this.buttons,
+                toolbarCls: 'x-panel-fbar'
+            });
+        }
+        this.toolbars = [];
+        if(this.fbar){
+            this.fbar = Ext.create(this.fbar, 'toolbar');
+            this.fbar.enableOverflow = false;
+            if(this.fbar.items){
+                this.fbar.items.each(function(c){
+                    c.minWidth = c.minWidth || this.minButtonWidth;
+                }, this);
+            }
+            this.fbar.toolbarCls = 'x-panel-fbar';
+
+            var bct = this.footer.createChild({cls: 'x-panel-btns x-panel-btns-'+this.buttonAlign});
+            this.fbar.ownerCt = this;
+            this.fbar.render(bct);
+            bct.createChild({cls:'x-clear'});
+            this.toolbars.push(this.fbar);
+        }
+
+        if(this.tbar && this.topToolbar){
+            if(Ext.isArray(this.topToolbar)){
+                this.topToolbar = new Ext.Toolbar(this.topToolbar);
+            }else if(!this.topToolbar.events){
+                this.topToolbar = Ext.create(this.topToolbar, 'toolbar');
+            }
+            this.topToolbar.ownerCt = this;
+            this.topToolbar.render(this.tbar);
+            this.toolbars.push(this.topToolbar);
+        }
+        if(this.bbar && this.bottomToolbar){
+            if(Ext.isArray(this.bottomToolbar)){
+                this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar);
+            }else if(!this.bottomToolbar.events){
+                this.bottomToolbar = Ext.create(this.bottomToolbar, 'toolbar');
+            }
+            this.bottomToolbar.ownerCt = this;
+            this.bottomToolbar.render(this.bbar);
+            this.toolbars.push(this.bottomToolbar);
+        }
+        Ext.each(this.toolbars, function(tb){
+            tb.on({
+                scope: this,
+                afterlayout: this.syncHeight,
+                remove: this.syncHeight
+            });
+        }, this);
+    },
+
+    /**
+     * Sets the CSS class that provides the icon image for this panel.  This method will replace any existing
+     * icon class if one has already been set and fire the {@link #iconchange} event after completion.
+     * @param {String} cls The new CSS class name
+     */
+    setIconClass : function(cls){
+        var old = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered && this.header){
+            if(this.frame){
+                this.header.addClass('x-panel-icon');
+                this.header.replaceClass(old, this.iconCls);
+            }else{
+                var hd = this.header.dom;
+                var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null;
+                if(img){
+                    Ext.fly(img).replaceClass(old, this.iconCls);
+                }else{
+                    Ext.DomHelper.insertBefore(hd.firstChild, {
+                        tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls
+                    });
+                 }
+            }
+        }
+        this.fireEvent('iconchange', this, cls, old);
+    },
+
+    // private
+    makeFloating : function(cfg){
+        this.floating = true;
+        this.el = new Ext.Layer(
+            Ext.isObject(cfg) ? cfg : {
+                shadow: this.shadow !== undefined ? this.shadow : 'sides',
+                shadowOffset: this.shadowOffset,
+                constrain:false,
+                shim: this.shim === false ? false : undefined
+            }, this.el
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the top (<tt>{@link #tbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getTopToolbar : function(){
+        return this.topToolbar;
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the bottom (<tt>{@link #bbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getBottomToolbar : function(){
+        return this.bottomToolbar;
+    },
+
+    /**
+     * Adds a button to this panel.  Note that this method must be called prior to rendering.  The preferred
+     * approach is to add buttons via the {@link #buttons} config.
+     * @param {String/Object} config A valid {@link Ext.Button} config.  A string will become the text for a default
+     * button config, an object will be treated as a button config object.
+     * @param {Function} handler The function to be called on button {@link Ext.Button#click}
+     * @param {Object} scope The scope to use for the button handler function
+     * @return {Ext.Button} The button that was added
+     */
+    addButton : function(config, handler, scope){
+        var bc = {
+            handler: handler,
+            scope: scope,
+            minWidth: this.minButtonWidth,
+            hideParent:true
+        };
+        if(typeof config == "string"){
+            bc.text = config;
+        }else{
+            Ext.apply(bc, config);
+        }
+        var btn = new Ext.Button(bc);
+        if(!this.buttons){
+            this.buttons = [];
+        }
+        this.buttons.push(btn);
+        return btn;
+    },
+
+    // private
+    addTool : function(){
+        if(!this[this.toolTarget]) { // no where to render tools!
+            return;
+        }
+        if(!this.toolTemplate){
+            // initialize the global tool template on first use
+            var tt = new Ext.Template(
+                 '<div class="x-tool x-tool-{id}">&#160;</div>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.Panel.prototype.toolTemplate = tt;
+        }
+        for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+            var tc = a[i];
+            if(!this.tools[tc.id]){
+                var overCls = 'x-tool-'+tc.id+'-over';
+                var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), tc, true);
+                this.tools[tc.id] = t;
+                t.enableDisplayMode('block');
+                this.mon(t, 'click',  this.createToolHandler(t, tc, overCls, this));
+                if(tc.on){
+                    this.mon(t, tc.on);
+                }
+                if(tc.hidden){
+                    t.hide();
+                }
+                if(tc.qtip){
+                    if(Ext.isObject(tc.qtip)){
+                        Ext.QuickTips.register(Ext.apply({
+                              target: t.id
+                        }, tc.qtip));
+                    } else {
+                        t.dom.qtip = tc.qtip;
+                    }
+                }
+                t.addClassOnOver(overCls);
+            }
+        }
+    },
+
+    onLayout : function(){
+        if(this.toolbars.length > 0){
+            this.duringLayout = true;
+            Ext.each(this.toolbars, function(tb){
+                tb.doLayout();
+            });
+            delete this.duringLayout;
+            this.syncHeight();
+        }
+    },
+
+    syncHeight : function(){
+        if(!(this.autoHeight || this.duringLayout)){
+            var last = this.lastSize;
+            if(last && !Ext.isEmpty(last.height)){
+                var old = last.height, h = this.el.getHeight();
+                if(old != 'auto' && old != h){
+                    var bd = this.body, bdh = bd.getHeight();
+                    h = Math.max(bdh + old - h, 0);
+                    if(bdh > 0 && bdh != h){
+                        bd.setHeight(h);
+                        if(Ext.isIE && h <= 0){
+                            return;
+                        }
+                        var sz = bd.getSize();
+                        this.fireEvent('bodyresize', sz.width, sz.height);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.floating){
+            return this.el.show();
+        }
+        Ext.Panel.superclass.onShow.call(this);
+    },
+
+    // private
+    onHide : function(){
+        if(this.floating){
+            return this.el.hide();
+        }
+        Ext.Panel.superclass.onHide.call(this);
+    },
+
+    // private
+    createToolHandler : function(t, tc, overCls, panel){
+        return function(e){
+            t.removeClass(overCls);
+            if(tc.stopEvent !== false){
+                e.stopEvent();
+            }
+            if(tc.handler){
+                tc.handler.call(tc.scope || t, e, t, panel, tc);
+            }
+        };
+    },
+
+    // private
+    afterRender : function(){
+        if(this.floating && !this.hidden){
+            this.el.show();
+        }
+        if(this.title){
+            this.setTitle(this.title);
+        }
+        this.setAutoScroll();
+        if(this.html){
+            this.body.update(Ext.isObject(this.html) ?
+                             Ext.DomHelper.markup(this.html) :
+                             this.html);
+            delete this.html;
+        }
+        if(this.contentEl){
+            var ce = Ext.getDom(this.contentEl);
+            Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']);
+            this.body.dom.appendChild(ce);
+        }
+        if(this.collapsed){
+            this.collapsed = false;
+            this.collapse(false);
+        }
+        Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last
+        this.initEvents();
+    },
+
+    // private
+    setAutoScroll : function(){
+        if(this.rendered && this.autoScroll){
+            var el = this.body || this.el;
+            if(el){
+                el.setOverflow('auto');
+            }
+        }
+    },
+
+    // private
+    getKeyMap : function(){
+        if(!this.keyMap){
+            this.keyMap = new Ext.KeyMap(this.el, this.keys);
+        }
+        return this.keyMap;
+    },
+
+    // private
+    initEvents : function(){
+        if(this.keys){
+            this.getKeyMap();
+        }
+        if(this.draggable){
+            this.initDraggable();
+        }
+    },
+
+    // private
+    initDraggable : function(){
+        /**
+         * <p>If this Panel is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DragSource} which handles dragging the Panel.</p>
+         * The developer must provide implementations of the abstract methods of {@link Ext.dd.DragSource}
+         * in order to supply behaviour for each stage of the drag/drop process. See {@link #draggable}.
+         * @type Ext.dd.DragSource.
+         * @property dd
+         */
+        this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+    },
+
+    // private
+    beforeEffect : function(){
+        if(this.floating){
+            this.el.beforeAction();
+        }
+        this.el.addClass('x-panel-animated');
+    },
+
+    // private
+    afterEffect : function(){
+        this.syncShadow();
+        this.el.removeClass('x-panel-animated');
+    },
+
+    // private - wraps up an animation param with internal callbacks
+    createEffect : function(a, cb, scope){
+        var o = {
+            scope:scope,
+            block:true
+        };
+        if(a === true){
+            o.callback = cb;
+            return o;
+        }else if(!a.callback){
+            o.callback = cb;
+        }else { // wrap it up
+            o.callback = function(){
+                cb.call(scope);
+                Ext.callback(a.callback, a.scope);
+            };
+        }
+        return Ext.applyIf(o, a);
+    },
+
+    /**
+     * Collapses the panel body so that it becomes hidden.  Fires the {@link #beforecollapse} event which will
+     * cancel the collapse action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    collapse : function(animate){
+        if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.beforeEffect();
+        this.onCollapse(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideOut(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this),
+                        this.collapseDefaults));
+        }else{
+            this[this.collapseEl].hide();
+            this.afterCollapse();
+        }
+    },
+
+    // private
+    afterCollapse : function(){
+        this.collapsed = true;
+        this.el.addClass(this.collapsedCls);
+        this.afterEffect();
+        this.fireEvent('collapse', this);
+    },
+
+    /**
+     * Expands the panel body so that it becomes visible.  Fires the {@link #beforeexpand} event which will
+     * cancel the expand action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    expand : function(animate){
+        if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.el.removeClass(this.collapsedCls);
+        this.beforeEffect();
+        this.onExpand(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideIn(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
+                        this.expandDefaults));
+        }else{
+            this[this.collapseEl].show();
+            this.afterExpand();
+        }
+    },
+
+    // private
+    afterExpand : function(){
+        this.collapsed = false;
+        this.afterEffect();
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    toggleCollapse : function(animate){
+        this[this.collapsed ? 'expand' : 'collapse'](animate);
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.mask();
+        }
+        Ext.Panel.superclass.onDisable.call(this);
+    },
+
+    // private
+    onEnable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.unmask();
+        }
+        Ext.Panel.superclass.onEnable.call(this);
+    },
+
+    // private
+    onResize : function(w, h){
+        if(w !== undefined || h !== undefined){
+            if(!this.collapsed){
+                if(typeof w == 'number'){
+                    w = this.adjustBodyWidth(w - this.getFrameWidth());
+                    if(this.tbar){
+                        this.tbar.setWidth(w);
+                        if(this.topToolbar){
+                            this.topToolbar.setSize(w);
+                        }
+                    }
+                    if(this.bbar){
+                        this.bbar.setWidth(w);
+                        if(this.bottomToolbar){
+                            this.bottomToolbar.setSize(w);
+                        }
+                    }
+                    if(this.fbar){
+                        var f = this.fbar,
+                            fWidth = 1,
+                            strict = Ext.isStrict;
+                        if(this.buttonAlign == 'left'){
+                           fWidth = w - f.container.getFrameWidth('lr');
+                        }else{
+                            //center/right alignment off in webkit
+                            if(Ext.isIE || Ext.isWebKit){
+                                //center alignment ok on webkit.
+                                //right broken in both, center on IE
+                                if(!(this.buttonAlign == 'center' && Ext.isWebKit) && (!strict || (!Ext.isIE8 && strict))){
+                                    (function(){
+                                        f.setWidth(f.getEl().child('.x-toolbar-ct').getWidth());
+                                    }).defer(1);
+                                }else{
+                                    fWidth = 'auto';
+                                }
+                            }else{
+                                fWidth = 'auto';
+                            }
+                        }
+                        f.setWidth(fWidth);
+                    }
+                    this.body.setWidth(w);
+                }else if(w == 'auto'){
+                    this.body.setWidth(w);
+                }
+
+                if(typeof h == 'number'){
+                    h = Math.max(0, this.adjustBodyHeight(h - this.getFrameHeight()));
+                    this.body.setHeight(h);
+                }else if(h == 'auto'){
+                    this.body.setHeight(h);
+                }
+
+                if(this.disabled && this.el._mask){
+                    this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
+                }
+            }else{
+                this.queuedBodySize = {width: w, height: h};
+                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, w, h);
+        }
+        this.syncShadow();
+    },
+
+    // private
+    adjustBodyHeight : function(h){
+        return h;
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        return w;
+    },
+
+    // private
+    onPosition : function(){
+        this.syncShadow();
+    },
+
+    /**
+     * Returns the width in pixels of the framing elements of this panel (not including the body width).  To
+     * retrieve the body width see {@link #getInnerWidth}.
+     * @return {Number} The frame width
+     */
+    getFrameWidth : function(){
+        var w = this.el.getFrameWidth('lr')+this.bwrap.getFrameWidth('lr');
+
+        if(this.frame){
+            var l = this.bwrap.dom.firstChild;
+            w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r'));
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            w += Ext.fly(mc).getFrameWidth('lr');
+        }
+        return w;
+    },
+
+    /**
+     * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and
+     * header and footer elements, but not including the body height).  To retrieve the body height see {@link #getInnerHeight}.
+     * @return {Number} The frame height
+     */
+    getFrameHeight : function(){
+        var h  = this.el.getFrameWidth('tb')+this.bwrap.getFrameWidth('tb');
+        h += (this.tbar ? this.tbar.getHeight() : 0) +
+             (this.bbar ? this.bbar.getHeight() : 0);
+
+        if(this.frame){
+            var hd = this.el.dom.firstChild;
+            var ft = this.bwrap.dom.lastChild;
+            h += (hd.offsetHeight + ft.offsetHeight);
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            h += Ext.fly(mc).getFrameWidth('tb');
+        }else{
+            h += (this.header ? this.header.getHeight() : 0) +
+                (this.footer ? this.footer.getHeight() : 0);
+        }
+        return h;
+    },
+
+    /**
+     * Returns the width in pixels of the body element (not including the width of any framing elements).
+     * For the frame width see {@link #getFrameWidth}.
+     * @return {Number} The body width
+     */
+    getInnerWidth : function(){
+        return this.getSize().width - this.getFrameWidth();
+    },
+
+    /**
+     * Returns the height in pixels of the body element (not including the height of any framing elements).
+     * For the frame height see {@link #getFrameHeight}.
+     * @return {Number} The body height
+     */
+    getInnerHeight : function(){
+        return this.getSize().height - this.getFrameHeight();
+    },
+
+    // private
+    syncShadow : function(){
+        if(this.floating){
+            this.el.sync(true);
+        }
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.body;
+    },
+
+    /**
+     * <p>Sets the title text for the panel and optionally the {@link #iconCls icon class}.</p>
+     * <p>In order to be able to set the title, a header element must have been created
+     * for the Panel. This is triggered either by configuring the Panel with a non-blank <tt>{@link #title}</tt>,
+     * or configuring it with <tt><b>{@link #header}: true</b></tt>.</p>
+     * @param {String} title The title text to set
+     * @param {String} iconCls (optional) {@link #iconCls iconCls} A user-defined CSS class that provides the icon image for this panel
+     */
+    setTitle : function(title, iconCls){
+        this.title = title;
+        if(this.header && this.headerAsText){
+            this.header.child('span').update(title);
+        }
+        if(iconCls){
+            this.setIconClass(iconCls);
+        }
+        this.fireEvent('titlechange', this, title);
+        return this;
+    },
+
+    /**
+     * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body.
+     * @return {Ext.Updater} The Updater
+     */
+    getUpdater : function(){
+        return this.body.getUpdater();
+    },
+
+     /**
+     * Loads this content panel immediately with content returned from an XHR call.
+     * @param {Object/String/Function} config A config object containing any of the following options:
+<pre><code>
+panel.load({
+    url: "your-url.php",
+    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+    callback: yourFunction,
+    scope: yourObject, // optional scope for the callback
+    discardUrl: false,
+    nocache: false,
+    text: "Loading...",
+    timeout: 30,
+    scripts: false
+});
+</code></pre>
+     * The only required property is url. The optional properties nocache, text and scripts
+     * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their
+     * associated property on this panel Updater instance.
+     * @return {Ext.Panel} this
+     */
+    load : function(){
+        var um = this.body.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.header){
+            this.header.removeAllListeners();
+            if(this.headerAsText){
+                Ext.Element.uncache(this.header.child('span'));
+            }
+        }
+        Ext.Element.uncache(
+            this.header,
+            this.tbar,
+            this.bbar,
+            this.footer,
+            this.body,
+            this.bwrap
+        );
+        if(this.tools){
+            for(var k in this.tools){
+                Ext.destroy(this.tools[k]);
+            }
+        }
+        if(this.buttons){
+            for(var b in this.buttons){
+                Ext.destroy(this.buttons[b]);
+            }
+        }
+        Ext.destroy(this.toolbars);
+        Ext.Panel.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    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';
+    },
+
+    // private
+    createGhost : function(cls, useShim, appendTo){
+        var el = document.createElement('div');
+        el.className = 'x-panel-ghost ' + (cls ? cls : '');
+        if(this.header){
+            el.appendChild(this.el.dom.firstChild.cloneNode(true));
+        }
+        Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight());
+        el.style.width = this.el.dom.offsetWidth + 'px';;
+        if(!appendTo){
+            this.container.dom.appendChild(el);
+        }else{
+            Ext.getDom(appendTo).appendChild(el);
+        }
+        if(useShim !== false && this.el.useShim !== false){
+            var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el);
+            layer.show();
+            return layer;
+        }else{
+            return new Ext.Element(el);
+        }
+    },
+
+    // private
+    doAutoLoad : function(){
+        var u = this.body.getUpdater();
+        if(this.renderer){
+            u.setRenderer(this.renderer);
+        }
+        u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad});
+    },
+
+    /**
+     * Retrieve a tool by id.
+     * @param {String} id
+     * @return {Object} tool
+     */
+    getTool : function(id) {
+        return this.tools[id];
+    }
+
+/**
+ * @cfg {String} autoEl @hide
+ */
+});
+Ext.reg('panel', Ext.Panel);
+/**
+ * @class Ext.Editor
+ * @extends Ext.Component
+ * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
+ * @constructor
+ * Create a new Editor
+ * @param {Object} config The config object
+ * @xtype editor
+ */
+Ext.Editor = function(field, config){
+    if(field.field){
+        this.field = Ext.create(field.field, 'textfield');
+        config = Ext.apply({}, field); // copy so we don't disturb original config
+        delete config.field;
+    }else{
+        this.field = field;
+    }
+    Ext.Editor.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.Editor, Ext.Component, {
+    /**
+    * @cfg {Ext.form.Field} field
+    * The Field object (or descendant) or config object for field
+    */
+    /**
+     * @cfg {Boolean} allowBlur
+     * True to {@link #completeEdit complete the editing process} if in edit mode when the
+     * field is blurred. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean/String} autoSize
+     * True for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only,
+     * or "height" to adopt the height only (defaults to false)
+     */
+    /**
+     * @cfg {Boolean} revertInvalid
+     * True to automatically revert the field value and cancel the edit when the user completes an edit and the field
+     * validation fails (defaults to true)
+     */
+    /**
+     * @cfg {Boolean} ignoreNoChange
+     * True to skip the edit completion process (no save, no events fired) if the user completes an edit and
+     * the value has not changed (defaults to false).  Applies only to string values - edits for other data types
+     * will never be ignored.
+     */
+    /**
+     * @cfg {Boolean} hideEl
+     * False to keep the bound element visible while the editor is displayed (defaults to true)
+     */
+    /**
+     * @cfg {Mixed} value
+     * The data value of the underlying field (defaults to "")
+     */
+    value : "",
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?").
+     */
+    alignment: "c-c?",
+    /**
+     * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "frame")
+     */
+    shadow : "frame",
+    /**
+     * @cfg {Boolean} constrain True to constrain the editor to the viewport
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true)
+     */
+    swallowKeys : true,
+    /**
+     * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed (defaults to false)
+     */
+    completeOnEnter : false,
+    /**
+     * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed (defaults to false)
+     */
+    cancelOnEsc : false,
+    /**
+     * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false)
+     */
+    updateEl : false,
+
+    initComponent : function(){
+        Ext.Editor.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforestartedit
+             * Fires when editing is initiated, but before the value changes.  Editing can be canceled by returning
+             * false from the handler of this event.
+             * @param {Editor} this
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The field value being set
+             */
+            "beforestartedit",
+            /**
+             * @event startedit
+             * Fires when this editor is displayed
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The starting field value
+             */
+            "startedit",
+            /**
+             * @event beforecomplete
+             * Fires after a change has been made to the field, but before the change is reflected in the underlying
+             * field.  Saving the change to the field can be canceled by returning false from the handler of this event.
+             * Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this
+             * event will not fire since no edit actually occurred.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "beforecomplete",
+            /**
+             * @event complete
+             * Fires after editing is complete and any changed value has been written to the underlying field.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "complete",
+            /**
+             * @event canceledit
+             * Fires after editing has been canceled and the editor's value has been reset.
+             * @param {Editor} this
+             * @param {Mixed} value The user-entered field value that was discarded
+             * @param {Mixed} startValue The original field value that was set back into the editor after cancel
+             */
+            "canceledit",
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.  You can check
+             * {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            "specialkey"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.el = new Ext.Layer({
+            shadow: this.shadow,
+            cls: "x-editor",
+            parentEl : ct,
+            shim : this.shim,
+            shadowOffset: this.shadowOffset || 4,
+            id: this.id,
+            constrain: this.constrain
+        });
+        if(this.zIndex){
+            this.el.setZIndex(this.zIndex);
+        }
+        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.mon(this.field, "specialkey", this.onSpecialKey, this);
+        if(this.swallowKeys){
+            this.field.el.swallowEvent(['keydown','keypress']);
+        }
+        this.field.show();
+        this.mon(this.field, "blur", this.onBlur, this);
+        if(this.field.grow){
+        	this.mon(this.field, "autosize", this.el.sync,  this.el, {delay:1});
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var key = e.getKey();
+        if(this.completeOnEnter && key == e.ENTER){
+            e.stopEvent();
+            this.completeEdit();
+        }else if(this.cancelOnEsc && key == e.ESC){
+            this.cancelEdit();
+        }else{
+            this.fireEvent('specialkey', field, e);
+        }
+        if(this.field.triggerBlur && (key == e.ENTER || key == e.ESC || key == e.TAB)){
+            this.field.triggerBlur();
+        }
+    },
+
+    /**
+     * Starts the editing process and shows the editor.
+     * @param {Mixed} el The element to edit
+     * @param {String} value (optional) A value to initialize the editor with. If a value is not provided, it defaults
+      * to the innerHTML of el.
+     */
+    startEdit : function(el, value){
+        if(this.editing){
+            this.completeEdit();
+        }
+        this.boundEl = Ext.get(el);
+        var v = value !== undefined ? value : this.boundEl.dom.innerHTML;
+        if(!this.rendered){
+            this.render(this.parentEl || document.body);
+        }
+        if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){
+            return;
+        }
+        this.startValue = v;
+        this.field.setValue(v);
+        this.doAutoSize();
+        this.el.alignTo(this.boundEl, this.alignment);
+        this.editing = true;
+        this.show();
+    },
+
+    // private
+    doAutoSize : function(){
+        if(this.autoSize){
+            var sz = this.boundEl.getSize();
+            switch(this.autoSize){
+                case "width":
+                    this.setSize(sz.width,  "");
+                break;
+                case "height":
+                    this.setSize("",  sz.height);
+                break;
+                default:
+                    this.setSize(sz.width,  sz.height);
+            }
+        }
+    },
+
+    /**
+     * Sets the height and width of this editor.
+     * @param {Number} width The new width
+     * @param {Number} height The new height
+     */
+    setSize : function(w, h){
+        delete this.field.lastSize;
+        this.field.setSize(w, h);
+        if(this.el){
+            if(Ext.isGecko2 || Ext.isOpera){
+                // prevent layer scrollbars
+                this.el.setSize(w, h);
+            }
+            this.el.sync();
+        }
+    },
+
+    /**
+     * Realigns the editor to the bound field based on the current alignment config value.
+     */
+    realign : function(){
+        this.el.alignTo(this.boundEl, this.alignment);
+    },
+
+    /**
+     * Ends the editing process, persists the changed value to the underlying field, and hides the editor.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after edit (defaults to false)
+     */
+    completeEdit : function(remainVisible){
+        if(!this.editing){
+            return;
+        }
+        var v = this.getValue();
+        if(!this.field.isValid()){
+            if(this.revertInvalid !== false){
+                this.cancelEdit(remainVisible);
+            }
+            return;
+        }
+        if(String(v) === String(this.startValue) && this.ignoreNoChange){
+            this.hideEdit(remainVisible);
+            return;
+        }
+        if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){
+            v = this.getValue();
+            if(this.updateEl && this.boundEl){
+                this.boundEl.update(v);
+            }
+            this.hideEdit(remainVisible);
+            this.fireEvent("complete", this, v, this.startValue);
+        }
+    },
+
+    // private
+    onShow : function(){
+        this.el.show();
+        if(this.hideEl !== false){
+            this.boundEl.hide();
+        }
+        this.field.show();
+        if(Ext.isIE && !this.fixIEFocus){ // IE has problems with focusing the first time
+            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();
+        }
+    },
+
+    /**
+     * Cancels the editing process and hides the editor without persisting any changes.  The field value will be
+     * reverted to the original starting value.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after
+     * cancel (defaults to false)
+     */
+    cancelEdit : function(remainVisible){
+        if(this.editing){
+            var v = this.getValue();
+            this.setValue(this.startValue);
+            this.hideEdit(remainVisible);
+            this.fireEvent("canceledit", this, v, this.startValue);
+        }
+    },
+    
+    // private
+    hideEdit: function(remainVisible){
+        if(remainVisible !== true){
+            this.editing = false;
+            this.hide();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        if(this.allowBlur !== true && this.editing){
+            this.completeEdit();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    /**
+     * Sets the data value of the editor
+     * @param {Mixed} value Any valid value supported by the underlying field
+     */
+    setValue : function(v){
+        this.field.setValue(v);
+    },
+
+    /**
+     * Gets the data value of the editor
+     * @return {Mixed} The data value
+     */
+    getValue : function(){
+        return this.field.getValue();
+    },
+
+    beforeDestroy : function(){
+        Ext.destroy(this.field);
+        this.field = null;
+    }
+});
+Ext.reg('editor', Ext.Editor);/**
+ * @class Ext.ColorPalette
+ * @extends Ext.Component
+ * Simple color palette class for choosing colors.  The palette can be rendered to any container.<br />
+ * Here's an example of typical usage:
+ * <pre><code>
+var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
+cp.render('my-div');
+
+cp.on('select', function(palette, selColor){
+    // do something with selColor
+});
+</code></pre>
+ * @constructor
+ * Create a new ColorPalette
+ * @param {Object} config The config object
+ * @xtype colorpalette
+ */
+Ext.ColorPalette = function(config){
+    Ext.ColorPalette.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+	     * @event select
+	     * Fires when a color is selected
+	     * @param {ColorPalette} this
+	     * @param {String} color The 6-digit color hex code (without the # symbol)
+	     */
+        'select'
+    );
+
+    if(this.handler){
+        this.on("select", this.handler, this.scope, true);
+    }
+};
+Ext.extend(Ext.ColorPalette, Ext.Component, {
+	/**
+	 * @cfg {String} tpl An existing XTemplate instance to be used in place of the default template for rendering the component.
+	 */
+    /**
+     * @cfg {String} itemCls
+     * The CSS class to apply to the containing element (defaults to "x-color-palette")
+     */
+    itemCls : "x-color-palette",
+    /**
+     * @cfg {String} value
+     * The initial color to highlight (should be a valid 6-digit color hex code without the # symbol).  Note that
+     * the hex codes are case-sensitive.
+     */
+    value : null,
+    clickEvent:'click',
+    // private
+    ctype: "Ext.ColorPalette",
+
+    /**
+     * @cfg {Boolean} allowReselect If set to true then reselecting a color that is already selected fires the {@link #select} event
+     */
+    allowReselect : false,
+
+    /**
+     * <p>An array of 6-digit color hex code strings (without the # symbol).  This array can contain any number
+     * of colors, and each hex code should be unique.  The width of the palette is controlled via CSS by adjusting
+     * the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number
+     * of colors with the width setting until the box is symmetrical.</p>
+     * <p>You can override individual colors if needed:</p>
+     * <pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors[0] = "FF0000";  // change the first box to red
+</code></pre>
+
+Or you can provide a custom array of your own for complete control:
+<pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors = ["000000", "993300", "333300"];
+</code></pre>
+     * @type Array
+     */
+    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"
+    ],
+
+    // private
+    onRender : function(container, position){
+        var t = 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 el = document.createElement("div");
+        el.id = this.getId();
+        el.className = this.itemCls;
+        t.overwrite(el, this.colors);
+        container.dom.insertBefore(el, position);
+        this.el = Ext.get(el);
+        this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'});
+        if(this.clickEvent != 'click'){
+        	this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true});
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ColorPalette.superclass.afterRender.call(this);
+        if(this.value){
+            var s = this.value;
+            this.value = null;
+            this.select(s);
+        }
+    },
+
+    // private
+    handleClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
+            this.select(c.toUpperCase());
+        }
+    },
+
+    /**
+     * Selects the specified color in the palette (fires the {@link #select} event)
+     * @param {String} color A valid 6-digit color hex code (# will be stripped if included)
+     */
+    select : function(color){
+        color = color.replace("#", "");
+        if(color != this.value || this.allowReselect){
+            var el = this.el;
+            if(this.value){
+                el.child("a.color-"+this.value).removeClass("x-color-palette-sel");
+            }
+            el.child("a.color-"+color).addClass("x-color-palette-sel");
+            this.value = color;
+            this.fireEvent("select", this, color);
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('colorpalette', Ext.ColorPalette);/**
+ * @class Ext.DatePicker
+ * @extends Ext.Component
+ * Simple date picker class.
+ * @constructor
+ * Create a new DatePicker
+ * @param {Object} config The config object
+ * @xtype datepicker
+ */
+Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} todayText
+     * The text to display on the button that selects the current date (defaults to <tt>'Today'</tt>)
+     */
+    todayText : 'Today',
+    /**
+     * @cfg {String} okText
+     * The text to display on the ok button (defaults to <tt>'&#160;OK&#160;'</tt> to give the user extra clicking room)
+     */
+    okText : '&#160;OK&#160;',
+    /**
+     * @cfg {String} cancelText
+     * The text to display on the cancel button (defaults to <tt>'Cancel'</tt>)
+     */
+    cancelText : 'Cancel',
+    /**
+     * @cfg {String} todayTip
+     * The tooltip to display for the button that selects the current date (defaults to <tt>'{current date} (Spacebar)'</tt>)
+     */
+    todayTip : '{0} (Spacebar)',
+    /**
+     * @cfg {String} minText
+     * The error text to display if the minDate validation fails (defaults to <tt>'This date is before the minimum date'</tt>)
+     */
+    minText : 'This date is before the minimum date',
+    /**
+     * @cfg {String} maxText
+     * The error text to display if the maxDate validation fails (defaults to <tt>'This date is after the maximum date'</tt>)
+     */
+    maxText : 'This date is after the maximum date',
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/y'</tt>).
+     */
+    format : 'm/d/y',
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : 'Disabled',
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : 'Disabled',
+    /**
+     * @cfg {Array} monthNames
+     * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
+     */
+    monthNames : Date.monthNames,
+    /**
+     * @cfg {Array} dayNames
+     * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
+     */
+    dayNames : Date.dayNames,
+    /**
+     * @cfg {String} nextText
+     * The next month navigation button tooltip (defaults to <tt>'Next Month (Control+Right)'</tt>)
+     */
+    nextText : 'Next Month (Control+Right)',
+    /**
+     * @cfg {String} prevText
+     * The previous month navigation button tooltip (defaults to <tt>'Previous Month (Control+Left)'</tt>)
+     */
+    prevText : 'Previous Month (Control+Left)',
+    /**
+     * @cfg {String} monthYearText
+     * The header month selector tooltip (defaults to <tt>'Choose a month (Control+Up/Down to move years)'</tt>)
+     */
+    monthYearText : 'Choose a month (Control+Up/Down to move years)',
+    /**
+     * @cfg {Number} startDay
+     * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
+     */
+    startDay : 0,
+    /**
+     * @cfg {Boolean} showToday
+     * False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
+     * that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date} minDate
+     * Minimum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Date} maxDate
+     * Maximum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
+     */
+    /**
+     * @cfg {RegExp} disabledDatesRE
+     * JavaScript regular expression used to disable a pattern of dates (defaults to null).  The {@link #disabledDates}
+     * config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
+     * disabledDates value.
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:
+     * <ul>
+     * <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
+     * <li>['03/08', '09/16'] would disable those days for every year</li>
+     * <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
+     * <li>['03/../2006'] would disable every day in March 2006</li>
+     * <li>['^03'] would disable every day in every March</li>
+     * </ul>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
+     * escape the dot when restricting dates. For example: ['03\\.08\\.03'].
+     */
+
+    // private
+    initComponent : function(){
+        Ext.DatePicker.superclass.initComponent.call(this);
+
+        this.value = this.value ?
+                 this.value.clearTime() : new Date().clearTime();
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected
+             * @param {DatePicker} this
+             * @param {Date} date The selected date
+             */
+            'select'
+        );
+
+        if(this.handler){
+            this.on('select', this.handler,  this.scope || this);
+        }
+
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(!this.disabledDatesRE && this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1,
+                re = '(?:';
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array/RegExp} disabledDates An array of date strings (see the {@link #disabledDates} config
+     * for details on supported values), or a JavaScript regular expression used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        if(Ext.isArray(dd)){
+            this.disabledDates = dd;
+            this.disabledDatesRE = null;
+        }else{
+            this.disabledDatesRE = dd;
+        }
+        this.initDisabledDays();
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the {@link #disabledDays} config
+     * for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #minDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinDate : function(dt){
+        this.minDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #maxDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxDate : function(dt){
+        this.maxDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Sets the value of the date field
+     * @param {Date} value The date to set
+     */
+    setValue : function(value){
+        var old = this.value;
+        this.value = value.clearTime(true);
+        if(this.el){
+            this.update(this.value);
+        }
+    },
+
+    /**
+     * Gets the current selected value of the date field
+     * @return {Date} The selected date
+     */
+    getValue : function(){
+        return this.value;
+    },
+
+    // private
+    focus : function(){
+        if(this.el){
+            this.update(this.activeDate);
+        }
+    },
+    
+    // private
+    onEnable: function(initial){
+        Ext.DatePicker.superclass.onEnable.call(this);    
+        this.doDisabled(false);
+        this.update(initial ? this.value : this.activeDate);
+        if(Ext.isIE){
+            this.el.repaint();
+        }
+        
+    },
+    
+    // private
+    onDisable: function(){
+        Ext.DatePicker.superclass.onDisable.call(this);   
+        this.doDisabled(true);
+        if(Ext.isIE && !Ext.isIE8){
+            /* Really strange problem in IE6/7, when disabled, have to explicitly
+             * repaint each of the nodes to get them to display correctly, simply
+             * calling repaint on the main element doesn't appear to be enough.
+             */
+             Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){
+                 Ext.fly(el).repaint();
+             });
+        }
+    },
+    
+    // private
+    doDisabled: function(disabled){
+        this.keyNav.setDisabled(disabled);
+        this.prevRepeater.setDisabled(disabled);
+        this.nextRepeater.setDisabled(disabled);
+        if(this.showToday){
+            this.todayKeyListener.setDisabled(disabled);
+            this.todayBtn.setDisabled(disabled);
+        }
+    },
+
+    // private
+    onRender : function(container, position){
+        var m = [
+             '<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>'],
+                dn = this.dayNames,
+                i;
+        for(i = 0; i < 7; i++){
+            var d = this.startDay+i;
+            if(d > 6){
+                d = d-7;
+            }
+            m.push('<th><span>', dn[d].substr(0,1), '</span></th>');
+        }
+        m[m.length] = '</tr></thead><tbody><tr>';
+        for(i = 0; i < 42; i++) {
+            if(i % 7 === 0 && i !== 0){
+                m[m.length] = '</tr><tr>';
+            }
+            m[m.length] = '<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';
+        }
+        m.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 el = document.createElement('div');
+        el.className = 'x-date-picker';
+        el.innerHTML = m.join('');
+
+        container.dom.insertBefore(el, position);
+
+        this.el = Ext.get(el);
+        this.eventEl = Ext.get(el.firstChild);
+
+        this.prevRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-left a'), {
+            handler: this.showPrevMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.nextRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-right a'), {
+            handler: this.showNextMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.monthPicker = this.el.down('div.x-date-mp');
+        this.monthPicker.enableDisplayMode('block');
+
+        this.keyNav = new Ext.KeyNav(this.eventEl, {
+            'left' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevMonth();
+                }else{
+                    this.update(this.activeDate.add('d', -1));    
+                }
+            },
+
+            'right' : function(e){
+                if(e.ctrlKey){
+                    this.showNextMonth();
+                }else{
+                    this.update(this.activeDate.add('d', 1));    
+                }
+            },
+
+            'up' : function(e){
+                if(e.ctrlKey){
+                    this.showNextYear();
+                }else{
+                    this.update(this.activeDate.add('d', -7));
+                }
+            },
+
+            'down' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevYear();
+                }else{
+                    this.update(this.activeDate.add('d', 7));
+                }
+            },
+
+            'pageUp' : function(e){
+                this.showNextMonth();
+            },
+
+            'pageDown' : function(e){
+                this.showPrevMonth();
+            },
+
+            'enter' : function(e){
+                e.stopPropagation();
+                return true;
+            },
+
+            scope : this
+        });
+
+        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.el.child('em').addClass('x-btn-arrow');
+
+        if(this.showToday){
+            this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday,  this);
+            var today = (new Date()).dateFormat(this.format);
+            this.todayBtn = new Ext.Button({
+                renderTo: this.el.child('td.x-date-bottom', true),
+                text: String.format(this.todayText, today),
+                tooltip: String.format(this.todayTip, today),
+                handler: this.selectToday,
+                scope: this
+            });
+        }
+        this.mon(this.eventEl, 'mousewheel', this.handleMouseWheel, this);
+        this.mon(this.eventEl, 'click', this.handleDateClick,  this, {delegate: 'a.x-date-date'});
+        this.mon(this.mbtn, 'click', this.showMonthPicker, this);
+        this.onEnable(true);
+    },
+
+    // private
+    createMonthPicker : function(){
+        if(!this.monthPicker.dom.firstChild){
+            var buf = ['<table border="0" cellspacing="0">'];
+            for(var i = 0; i < 6; i++){
+                buf.push(
+                    '<tr><td class="x-date-mp-month"><a href="#">', Date.getShortMonthName(i), '</a></td>',
+                    '<td class="x-date-mp-month x-date-mp-sep"><a href="#">', Date.getShortMonthName(i + 6), '</a></td>',
+                    i === 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>'
+                );
+            }
+            buf.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(buf.join(''));
+
+            this.mon(this.monthPicker, 'click', this.onMonthClick, this);
+            this.mon(this.monthPicker, '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(m, a, i){
+                i += 1;
+                if((i%2) === 0){
+                    m.dom.xmonth = 5 + Math.round(i * 0.5);
+                }else{
+                    m.dom.xmonth = Math.round((i-1) * 0.5);
+                }
+            });
+        }
+    },
+
+    // private
+    showMonthPicker : function(){
+        if(!this.disabled){
+            this.createMonthPicker();
+            var size = this.el.getSize();
+            this.monthPicker.setSize(size);
+            this.monthPicker.child('table').setSize(size);
+
+            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});
+        }
+    },
+
+    // private
+    updateMPYear : function(y){
+        this.mpyear = y;
+        var ys = this.mpYears.elements;
+        for(var i = 1; i <= 10; i++){
+            var td = ys[i-1], y2;
+            if((i%2) === 0){
+                y2 = y + Math.round(i * 0.5);
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }else{
+                y2 = y - (5-Math.round(i * 0.5));
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }
+            this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        }
+    },
+
+    // private
+    updateMPMonth : function(sm){
+        this.mpMonths.each(function(m, a, i){
+            m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        });
+    },
+
+    // private
+    selectMPMonth : function(m){
+
+    },
+
+    // private
+    onMonthClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if(el.is('button.x-date-mp-cancel')){
+            this.hideMonthPicker();
+        }
+        else if(el.is('button.x-date-mp-ok')){
+            var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate());
+            if(d.getMonth() != this.mpSelMonth){
+                // 'fix' the JS rolling date conversion if needed
+                d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth();
+            }
+            this.update(d);
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-month', 2))){
+            this.mpMonths.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelMonth = pn.dom.xmonth;
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.mpYears.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelYear = pn.dom.xyear;
+        }
+        else if(el.is('a.x-date-mp-prev')){
+            this.updateMPYear(this.mpyear-10);
+        }
+        else if(el.is('a.x-date-mp-next')){
+            this.updateMPYear(this.mpyear+10);
+        }
+    },
+
+    // private
+    onMonthDblClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if((pn = el.up('td.x-date-mp-month', 2))){
+            this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+    },
+
+    // private
+    hideMonthPicker : function(disableAnim){
+        if(this.monthPicker){
+            if(disableAnim === true){
+                this.monthPicker.hide();
+            }else{
+                this.monthPicker.slideOut('t', {duration:0.2});
+            }
+        }
+    },
+
+    // private
+    showPrevMonth : function(e){
+        this.update(this.activeDate.add('mo', -1));
+    },
+
+    // private
+    showNextMonth : function(e){
+        this.update(this.activeDate.add('mo', 1));
+    },
+
+    // private
+    showPrevYear : function(){
+        this.update(this.activeDate.add('y', -1));
+    },
+
+    // private
+    showNextYear : function(){
+        this.update(this.activeDate.add('y', 1));
+    },
+
+    // private
+    handleMouseWheel : function(e){
+        e.stopEvent();
+        if(!this.disabled){
+            var delta = e.getWheelDelta();
+            if(delta > 0){
+                this.showPrevMonth();
+            } else if(delta < 0){
+                this.showNextMonth();
+            }
+        }
+    },
+
+    // private
+    handleDateClick : function(e, t){
+        e.stopEvent();
+        if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){
+            this.setValue(new Date(t.dateValue));
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    selectToday : function(){
+        if(this.todayBtn && !this.todayBtn.disabled){
+            this.setValue(new Date().clearTime());
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    update : function(date, forceRefresh){
+        var vd = this.activeDate, vis = this.isVisible();
+        this.activeDate = date;
+        if(!forceRefresh && vd && this.el){
+            var t = date.getTime();
+            if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){
+                this.cells.removeClass('x-date-selected');
+                this.cells.each(function(c){
+                   if(c.dom.firstChild.dateValue == t){
+                       c.addClass('x-date-selected');
+                       if(vis){
+                           Ext.fly(c.dom.firstChild).focus(50);
+                       }
+                       return false;
+                   }
+                });
+                return;
+            }
+        }
+        var days = date.getDaysInMonth();
+        var firstOfMonth = date.getFirstDateOfMonth();
+        var startingPos = firstOfMonth.getDay()-this.startDay;
+
+        if(startingPos <= this.startDay){
+            startingPos += 7;
+        }
+
+        var pm = date.add('mo', -1);
+        var prevStart = pm.getDaysInMonth()-startingPos;
+
+        var cells = this.cells.elements;
+        var textEls = this.textNodes;
+        days += startingPos;
+
+        // convert everything to numbers so it's fast
+        var day = 86400000;
+        var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime();
+        var today = new Date().clearTime().getTime();
+        var sel = date.clearTime().getTime();
+        var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY;
+        var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY;
+        var ddMatch = this.disabledDatesRE;
+        var ddText = this.disabledDatesText;
+        var ddays = this.disabledDays ? this.disabledDays.join('') : false;
+        var ddaysText = this.disabledDaysText;
+        var format = this.format;
+
+        if(this.showToday){
+            var td = new Date().clearTime();
+            var disable = (td < min || td > max ||
+                (ddMatch && format && ddMatch.test(td.dateFormat(format))) ||
+                (ddays && ddays.indexOf(td.getDay()) != -1));
+
+            if(!this.disabled){
+                this.todayBtn.setDisabled(disable);
+                this.todayKeyListener[disable ? 'disable' : 'enable']();
+            }
+        }
+
+        var setCellClass = function(cal, cell){
+            cell.title = '';
+            var t = d.getTime();
+            cell.firstChild.dateValue = t;
+            if(t == today){
+                cell.className += ' x-date-today';
+                cell.title = cal.todayText;
+            }
+            if(t == sel){
+                cell.className += ' x-date-selected';
+                if(vis){
+                    Ext.fly(cell.firstChild).focus(50);
+                }
+            }
+            // disabling
+            if(t < min) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.minText;
+                return;
+            }
+            if(t > max) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.maxText;
+                return;
+            }
+            if(ddays){
+                if(ddays.indexOf(d.getDay()) != -1){
+                    cell.title = ddaysText;
+                    cell.className = ' x-date-disabled';
+                }
+            }
+            if(ddMatch && format){
+                var fvalue = d.dateFormat(format);
+                if(ddMatch.test(fvalue)){
+                    cell.title = ddText.replace('%0', fvalue);
+                    cell.className = ' x-date-disabled';
+                }
+            }
+        };
+
+        var i = 0;
+        for(; i < startingPos; i++) {
+            textEls[i].innerHTML = (++prevStart);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-prevday';
+            setCellClass(this, cells[i]);
+        }
+        for(; i < days; i++){
+            var intDay = i - startingPos + 1;
+            textEls[i].innerHTML = (intDay);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-active';
+            setCellClass(this, cells[i]);
+        }
+        var extraDays = 0;
+        for(; i < 42; i++) {
+             textEls[i].innerHTML = (++extraDays);
+             d.setDate(d.getDate()+1);
+             cells[i].className = 'x-date-nextday';
+             setCellClass(this, cells[i]);
+        }
+
+        this.mbtn.setText(this.monthNames[date.getMonth()] + ' ' + date.getFullYear());
+
+        if(!this.internalRender){
+            var main = this.el.dom.firstChild;
+            var w = main.offsetWidth;
+            this.el.setWidth(w + this.el.getBorderWidth('lr'));
+            Ext.fly(main).setWidth(w);
+            this.internalRender = true;
+            // opera does not respect the auto grow header center column
+            // then, after it gets a width opera refuses to recalculate
+            // without a second pass
+            if(Ext.isOpera && !this.secondPass){
+                main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px';
+                this.secondPass = true;
+                this.update.defer(10, this, [date]);
+            }
+        }
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.rendered){
+            this.keyNav.disable();
+            this.keyNav = null;
+            Ext.destroy(
+                this.leftClickRpt,
+                this.rightClickRpt,
+                this.monthPicker,
+                this.eventEl,
+                this.mbtn,
+                this.todayBtn
+            );
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+Ext.reg('datepicker', Ext.DatePicker);
+/**
+ * @class Ext.LoadMask
+ * A simple utility class for generically masking elements while loading data.  If the {@link #store}
+ * config option is specified, the masking will be automatically synchronized with the store's loading
+ * process and the mask element will be cached for reuse.  For all other elements, this mask will replace the
+ * element's Updater load indicator and will be destroyed after the initial load.
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic mask:
+var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
+myMask.show();
+</code></pre>
+ * @constructor
+ * Create a new LoadMask
+ * @param {Mixed} el The element or DOM node, or its id
+ * @param {Object} config The config object
+ */
+Ext.LoadMask = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(this.store){
+        this.store.on('beforeload', this.onBeforeLoad, this);
+        this.store.on('load', this.onLoad, this);
+        this.store.on('exception', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, false);
+    }else{
+        var um = this.el.getUpdater();
+        um.showLoadIndicator = false; // disable the default indicator
+        um.on('beforeupdate', this.onBeforeLoad, this);
+        um.on('update', this.onLoad, this);
+        um.on('failure', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, true);
+    }
+};
+
+Ext.LoadMask.prototype = {
+    /**
+     * @cfg {Ext.data.Store} store
+     * Optional Store to which the mask is bound. The mask is displayed when a load request is issued, and
+     * hidden on either load sucess, or load fail.
+     */
+    /**
+     * @cfg {Boolean} removeMask
+     * True to create a single-use mask that is automatically destroyed after loading (useful for page loads),
+     * False to persist the mask element reference for multiple uses (e.g., for paged data widgets).  Defaults to false.
+     */
+    /**
+     * @cfg {String} msg
+     * The text to display in a centered loading message box (defaults to 'Loading...')
+     */
+    msg : 'Loading...',
+    /**
+     * @cfg {String} msgCls
+     * The CSS class to apply to the loading message element (defaults to "x-mask-loading")
+     */
+    msgCls : 'x-mask-loading',
+
+    /**
+     * Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false)
+     * @type Boolean
+     */
+    disabled: false,
+
+    /**
+     * Disables the mask to prevent it from being displayed
+     */
+    disable : function(){
+       this.disabled = true;
+    },
+
+    /**
+     * Enables the mask so that it can be displayed
+     */
+    enable : function(){
+        this.disabled = false;
+    },
+
+    // private
+    onLoad : function(){
+        this.el.unmask(this.removeMask);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.disabled){
+            this.el.mask(this.msg, this.msgCls);
+        }
+    },
+
+    /**
+     * Show this LoadMask over the configured Element.
+     */
+    show: function(){
+        this.onBeforeLoad();
+    },
+
+    /**
+     * Hide this LoadMask.
+     */
+    hide: function(){
+        this.onLoad();
+    },
+
+    // private
+    destroy : function(){
+        if(this.store){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoad, this);
+        }else{
+            var um = this.el.getUpdater();
+            um.un('beforeupdate', this.onBeforeLoad, this);
+            um.un('update', this.onLoad, this);
+            um.un('failure', this.onLoad, this);
+        }
+    }
+};/**
+ * @class Ext.Slider
+ * @extends Ext.BoxComponent
+ * Slider which supports vertical or horizontal orientation, keyboard adjustments,
+ * configurable snapping, axis clicking and animation. Can be added as an item to
+ * any container. Example usage:
+<pre><code>
+new Ext.Slider({
+    renderTo: Ext.getBody(),
+    width: 200,
+    value: 50,
+    increment: 10,
+    minValue: 0,
+    maxValue: 100
+});
+</code></pre>
+ */
+Ext.Slider = Ext.extend(Ext.BoxComponent, {
+	/**
+	 * @cfg {Number} value The value to initialize the slider with. Defaults to minValue.
+	 */
+	/**
+	 * @cfg {Boolean} vertical Orient the Slider vertically rather than horizontally, defaults to false.
+	 */
+    vertical: false,
+	/**
+	 * @cfg {Number} minValue The minimum value for the Slider. Defaults to 0.
+	 */
+    minValue: 0,
+	/**
+	 * @cfg {Number} maxValue The maximum value for the Slider. Defaults to 100.
+	 */
+    maxValue: 100,
+    /**
+     * @cfg {Number/Boolean} decimalPrecision.
+     * <p>The number of decimal places to which to round the Slider's value. Defaults to 0.</p>
+     * <p>To disable rounding, configure as <tt><b>false</b></tt>.</p>
+     */
+    decimalPrecision: 0,
+	/**
+	 * @cfg {Number} keyIncrement How many units to change the Slider when adjusting with keyboard navigation. Defaults to 1. If the increment config is larger, it will be used instead.
+	 */
+    keyIncrement: 1,
+	/**
+	 * @cfg {Number} increment How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping'.
+	 */
+    increment: 0,
+	// private
+    clickRange: [5,15],
+	/**
+	 * @cfg {Boolean} clickToChange Determines whether or not clicking on the Slider axis will change the slider. Defaults to true
+	 */
+    clickToChange : true,
+	/**
+	 * @cfg {Boolean} animate Turn on or off animation. Defaults to true
+	 */
+    animate: true,
+
+    /**
+     * True while the thumb is in a drag operation
+     * @type boolean
+     */
+    dragging: false,
+
+    // private override
+    initComponent : function(){
+        if(!Ext.isDefined(this.value)){
+            this.value = this.minValue;
+        }
+        Ext.Slider.superclass.initComponent.call(this);
+        this.keyIncrement = Math.max(this.increment, this.keyIncrement);
+        this.addEvents(
+            /**
+             * @event beforechange
+             * Fires before the slider value is changed. By returning false from an event handler,
+             * you can cancel the event and prevent the slider from changing.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider is being changed to.
+			 * @param {Number} oldValue The old value which the slider was previously.
+             */
+			'beforechange',
+			/**
+			 * @event change
+			 * Fires when the slider value is changed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'change',
+			/**
+			 * @event changecomplete
+			 * Fires when the slider value is changed by the user and any drag operations have completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'changecomplete',
+			/**
+			 * @event dragstart
+             * Fires after a drag operation has started.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragstart',
+			/**
+			 * @event drag
+             * Fires continuously during the drag operation while the mouse is moving.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'drag',
+			/**
+			 * @event dragend
+             * Fires after the drag operation has completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragend'
+		);
+
+        if(this.vertical){
+            Ext.apply(this, Ext.Slider.Vertical);
+        }
+    },
+
+	// private override
+    onRender : function(){
+        this.autoEl = {
+            cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'),
+            cn:{cls:'x-slider-end',cn:{cls:'x-slider-inner',cn:[{cls:'x-slider-thumb'},{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}]}}
+        };
+        Ext.Slider.superclass.onRender.apply(this, arguments);
+        this.endEl = this.el.first();
+        this.innerEl = this.endEl.first();
+        this.thumb = this.innerEl.first();
+        this.halfThumb = (this.vertical ? this.thumb.getHeight() : this.thumb.getWidth())/2;
+        this.focusEl = this.thumb.next();
+        this.initEvents();
+    },
+
+	// private override
+    initEvents : function(){
+        this.thumb.addClassOnOver('x-slider-thumb-over');
+        this.mon(this.el, {
+            scope: this,
+            mousedown: this.onMouseDown,
+            keydown: this.onKeyDown
+        });
+
+        this.focusEl.swallowEvent("click", true);
+
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeDragStart.createDelegate(this),
+            onStart: this.onDragStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onDragEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(this.thumb);
+        this.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+	// private override
+    onMouseDown : function(e){
+        if(this.disabled) {return;}
+        if(this.clickToChange && e.target != this.thumb.dom){
+            var local = this.innerEl.translatePoints(e.getXY());
+            this.onClickChange(local);
+        }
+        this.focus();
+    },
+
+	// private
+    onClickChange : function(local){
+        if(local.top > this.clickRange[0] && local.top < this.clickRange[1]){
+            this.setValue(Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true);
+        }
+    },
+
+	// private
+    onKeyDown : function(e){
+        if(this.disabled){e.preventDefault();return;}
+        var k = e.getKey();
+        switch(k){
+            case e.UP:
+            case e.RIGHT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.maxValue, undefined, true);
+                }else{
+                    this.setValue(this.value+this.keyIncrement, undefined, true);
+                }
+            break;
+            case e.DOWN:
+            case e.LEFT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.minValue, undefined, true);
+                }else{
+                    this.setValue(this.value-this.keyIncrement, undefined, true);
+                }
+            break;
+            default:
+                e.preventDefault();
+        }
+    },
+
+	// private
+    doSnap : function(value){
+        if(!this.increment || this.increment == 1 || !value) {
+            return value;
+        }
+        var newValue = value, inc = this.increment;
+        var m = value % inc;
+        if(m != 0){
+            newValue -= m;
+            if(m * 2 > inc){
+                newValue += inc;
+            }else if(m * 2 < -inc){
+                newValue -= inc;
+            }
+        }
+        return newValue.constrain(this.minValue,  this.maxValue);
+    },
+
+	// private
+    afterRender : function(){
+        Ext.Slider.superclass.afterRender.apply(this, arguments);
+        if(this.value !== undefined){
+            var v = this.normalizeValue(this.value);
+            if(v !== this.value){
+                delete this.value;
+                this.setValue(v, false);
+            }else{
+                this.moveThumb(this.translateValue(v), false);
+            }
+        }
+    },
+
+	// private
+    getRatio : function(){
+        var w = this.innerEl.getWidth();
+        var v = this.maxValue - this.minValue;
+        return v == 0 ? w : (w/v);
+    },
+
+	// private
+    normalizeValue : function(v){
+        v = this.doSnap(v);
+        v = Ext.util.Format.round(v, this.decimalPrecision);
+        v = v.constrain(this.minValue, this.maxValue);
+        return v;
+    },
+
+	/**
+	 * Programmatically sets the value of the Slider. Ensures that the value is constrained within
+	 * the minValue and maxValue.
+	 * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue)
+	 * @param {Boolean} animate Turn on or off animation, defaults to true
+	 */
+    setValue : function(v, animate, changeComplete){
+        v = this.normalizeValue(v);
+        if(v !== this.value && this.fireEvent('beforechange', this, v, this.value) !== false){
+            this.value = v;
+            this.moveThumb(this.translateValue(v), animate !== false);
+            this.fireEvent('change', this, v);
+            if(changeComplete){
+                this.fireEvent('changecomplete', this, v);
+            }
+        }
+    },
+
+	// private
+    translateValue : function(v){
+        var ratio = this.getRatio();
+        return (v * ratio)-(this.minValue * ratio)-this.halfThumb;
+    },
+
+	reverseValue : function(pos){
+        var ratio = this.getRatio();
+        return (pos+this.halfThumb+(this.minValue * ratio))/ratio;
+    },
+
+	// private
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setLeft(v);
+        }else{
+            this.thumb.shift({left: v, stopFx: true, duration:.35});
+        }
+    },
+
+	// private
+    focus : function(){
+        this.focusEl.focus(10);
+    },
+
+	// private
+    onBeforeDragStart : function(e){
+        return !this.disabled;
+    },
+
+	// private
+    onDragStart: function(e){
+        this.thumb.addClass('x-slider-thumb-drag');
+        this.dragging = true;
+        this.dragStartValue = this.value;
+        this.fireEvent('dragstart', this, e);
+    },
+
+	// private
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        this.setValue(Ext.util.Format.round(this.reverseValue(pos.left), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+	// private
+    onDragEnd: function(e){
+        this.thumb.removeClass('x-slider-thumb-drag');
+        this.dragging = false;
+        this.fireEvent('dragend', this, e);
+        if(this.dragStartValue != this.value){
+            this.fireEvent('changecomplete', this, this.value);
+        }
+    },
+
+	// private
+    onResize : function(w, h){
+        this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r')));
+        this.syncThumb();
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.Slider.superclass.onDisable.call(this);
+        this.thumb.addClass(this.disabledClass);
+        if(Ext.isIE){
+            //IE breaks when using overflow visible and opacity other than 1.
+            //Create a place holder for the thumb and display it.
+            var xy = this.thumb.getXY();
+            this.thumb.hide();
+            this.innerEl.addClass(this.disabledClass).dom.disabled = true;
+            if (!this.thumbHolder){
+                this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass});    
+            }
+            this.thumbHolder.show().setXY(xy);
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.Slider.superclass.onEnable.call(this);
+        this.thumb.removeClass(this.disabledClass);
+        if(Ext.isIE){
+            this.innerEl.removeClass(this.disabledClass).dom.disabled = false;
+            if (this.thumbHolder){
+                this.thumbHolder.hide();
+            }
+            this.thumb.show();
+            this.syncThumb();
+        }
+    },
+    
+    /**
+     * Synchronizes the thumb position to the proper proportion of the total component width based
+     * on the current slider {@link #value}.  This will be called automatically when the Slider
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the Slider if necessary.
+     */
+    syncThumb : function(){
+        if(this.rendered){
+            this.moveThumb(this.translateValue(this.value));
+        }
+    },
+
+	/**
+	 * Returns the current value of the slider
+	 * @return {Number} The current value of the slider
+	 */
+    getValue : function(){
+        return this.value;
+    }
+});
+Ext.reg('slider', Ext.Slider);
+
+// private class to support vertical sliders
+Ext.Slider.Vertical = {
+    onResize : function(w, h){
+        this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b')));
+        this.syncThumb();
+    },
+
+    getRatio : function(){
+        var h = this.innerEl.getHeight();
+        var v = this.maxValue - this.minValue;
+        return h/v;
+    },
+
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setBottom(v);
+        }else{
+            this.thumb.shift({bottom: v, stopFx: true, duration:.35});
+        }
+    },
+
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        var bottom = this.innerEl.getHeight()-pos.top;
+        this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+    onClickChange : function(local){
+        if(local.left > this.clickRange[0] && local.left < this.clickRange[1]){
+            var bottom = this.innerEl.getHeight()-local.top;
+            this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), undefined, true);
+        }
+    }
+};/**
+ * @class Ext.ProgressBar
+ * @extends Ext.BoxComponent
+ * <p>An updateable progress bar component.  The progress bar supports two different modes: manual and automatic.</p>
+ * <p>In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the
+ * progress bar as needed from your own code.  This method is most appropriate when you want to show progress
+ * throughout an operation that has predictable points of interest at which you can update the control.</p>
+ * <p>In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it
+ * once the operation is complete.  You can optionally have the progress bar wait for a specific amount of time
+ * and then clear itself.  Automatic mode is most appropriate for timed operations or asynchronous operations in
+ * which you have no need for indicating intermediate progress.</p>
+ * @cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+ * @cfg {String} text The progress bar text (defaults to '')
+ * @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress
+ * bar's internal text element)
+ * @cfg {String} id The progress bar element's id (defaults to an auto-generated id)
+ * @xtype progress
+ */
+Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
+   /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
+    */
+    baseCls : 'x-progress',
+    
+    /**
+    * @cfg {Boolean} animate
+    * True to animate the progress bar during transitions (defaults to false)
+    */
+    animate : false,
+
+    // private
+    waitTimer : null,
+
+    // private
+    initComponent : function(){
+        Ext.ProgressBar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event update
+             * Fires after each update interval
+             * @param {Ext.ProgressBar} this
+             * @param {Number} The current progress value
+             * @param {String} The current progress text
+             */
+            "update"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        var tpl = new Ext.Template(
+            '<div class="{cls}-wrap">',
+                '<div class="{cls}-inner">',
+                    '<div class="{cls}-bar">',
+                        '<div class="{cls}-text">',
+                            '<div>&#160;</div>',
+                        '</div>',
+                    '</div>',
+                    '<div class="{cls}-text {cls}-text-back">',
+                        '<div>&#160;</div>',
+                    '</div>',
+                '</div>',
+            '</div>'
+        );
+
+        this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true)
+        	: tpl.append(ct, {cls: this.baseCls}, true);
+		        
+        if(this.id){
+            this.el.dom.id = this.id;
+        }
+        var inner = this.el.dom.firstChild;
+        this.progressBar = Ext.get(inner.firstChild);
+
+        if(this.textEl){
+            //use an external text el
+            this.textEl = Ext.get(this.textEl);
+            delete this.textTopEl;
+        }else{
+            //setup our internal layered text els
+            this.textTopEl = Ext.get(this.progressBar.dom.firstChild);
+            var textBackEl = Ext.get(inner.childNodes[1]);
+            this.textTopEl.setStyle("z-index", 99).addClass('x-hidden');
+            this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]);
+            this.textEl.setWidth(inner.offsetWidth);
+        }
+        this.progressBar.setHeight(inner.offsetHeight);
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.ProgressBar.superclass.afterRender.call(this);
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }else{
+            this.updateText(this.text);
+        }
+    },
+
+    /**
+     * Updates the progress bar value, and optionally its text.  If the text argument is not specified,
+     * any existing text value will be unchanged.  To blank out existing text, pass ''.  Note that even
+     * if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for
+     * determining when the progress is complete and calling {@link #reset} to clear and/or hide the control.
+     * @param {Float} value (optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @param {Boolean} animate (optional) Whether to animate the transition of the progress bar. If this value is
+     * not specified, the default for the class is used (default to false)
+     * @return {Ext.ProgressBar} this
+     */
+    updateProgress : function(value, text, animate){
+        this.value = value || 0;
+        if(text){
+            this.updateText(text);
+        }
+        if(this.rendered){
+            var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);
+            this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
+            if(this.textTopEl){
+                //textTopEl should be the same width as the bar so overflow will clip as the bar moves
+                this.textTopEl.removeClass('x-hidden').setWidth(w);
+            }
+        }
+        this.fireEvent('update', this, value, text);
+        return this;
+    },
+
+    /**
+     * Initiates an auto-updating progress bar.  A duration can be specified, in which case the progress
+     * bar will automatically reset after a fixed amount of time and optionally call a callback function
+     * if specified.  If no duration is passed in, then the progress bar will run indefinitely and must
+     * be manually cleared by calling {@link #reset}.  The wait method accepts a config object with
+     * the following properties:
+     * <pre>
+Property   Type          Description
+---------- ------------  ----------------------------------------------------------------------
+duration   Number        The length of time in milliseconds that the progress bar should
+                         run before resetting itself (defaults to undefined, in which case it
+                         will run indefinitely until reset is called)
+interval   Number        The length of time in milliseconds between each progress update
+                         (defaults to 1000 ms)
+animate    Boolean       Whether to animate the transition of the progress bar. If this value is
+                         not specified, the default for the class is used.                                                   
+increment  Number        The number of progress update segments to display within the progress
+                         bar (defaults to 10).  If the bar reaches the end and is still
+                         updating, it will automatically wrap back to the beginning.
+text       String        Optional text to display in the progress bar element (defaults to '').
+fn         Function      A callback function to execute after the progress bar finishes auto-
+                         updating.  The function will be called with no arguments.  This function
+                         will be ignored if duration is not specified since in that case the
+                         progress bar can only be stopped programmatically, so any required function
+                         should be called by the same code after it resets the progress bar.
+scope      Object        The scope that is passed to the callback function (only applies when
+                         duration and fn are both passed).
+</pre>
+         *
+         * Example usage:
+         * <pre><code>
+var p = new Ext.ProgressBar({
+   renderTo: 'my-el'
+});
+
+//Wait for 5 seconds, then update the status el (progress bar will auto-reset)
+p.wait({
+   interval: 100, //bar will move fast!
+   duration: 5000,
+   increment: 15,
+   text: 'Updating...',
+   scope: this,
+   fn: function(){
+      Ext.fly('status').update('Done!');
+   }
+});
+
+//Or update indefinitely until some async action completes, then reset manually
+p.wait();
+myAction.on('complete', function(){
+    p.reset();
+    Ext.fly('status').update('Done!');
+});
+</code></pre>
+     * @param {Object} config (optional) Configuration options
+     * @return {Ext.ProgressBar} this
+     */
+    wait : function(o){
+        if(!this.waitTimer){
+            var scope = this;
+            o = o || {};
+            this.updateText(o.text);
+            this.waitTimer = Ext.TaskMgr.start({
+                run: function(i){
+                    var inc = o.increment || 10;
+                    this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);
+                },
+                interval: o.interval || 1000,
+                duration: o.duration,
+                onStop: function(){
+                    if(o.fn){
+                        o.fn.apply(o.scope || this);
+                    }
+                    this.reset();
+                },
+                scope: scope
+            });
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the progress bar is currently in a {@link #wait} operation
+     * @return {Boolean} True if waiting, else false
+     */
+    isWaiting : function(){
+        return this.waitTimer !== null;
+    },
+
+    /**
+     * Updates the progress bar text.  If specified, textEl will be updated, otherwise the progress
+     * bar itself will display the updated text.
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @return {Ext.ProgressBar} this
+     */
+    updateText : function(text){
+        this.text = text || '&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+        }
+        return this;
+    },
+    
+    /**
+     * Synchronizes the inner bar width to the proper proportion of the total componet width based
+     * on the current progress {@link #value}.  This will be called automatically when the ProgressBar
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the ProgressBar if necessary.
+     */
+    syncProgressBar : function(){
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the size of the progress bar.
+     * @param {Number} width The new width in pixels
+     * @param {Number} height The new height in pixels
+     * @return {Ext.ProgressBar} this
+     */
+    setSize : function(w, h){
+        Ext.ProgressBar.superclass.setSize.call(this, w, h);
+        if(this.textTopEl){
+            var inner = this.el.dom.firstChild;
+            this.textEl.setSize(inner.offsetWidth, inner.offsetHeight);
+        }
+        this.syncProgressBar();
+        return this;
+    },
+
+    /**
+     * Resets the progress bar value to 0 and text to empty string.  If hide = true, the progress
+     * bar will also be hidden (using the {@link #hideMode} property internally).
+     * @param {Boolean} hide (optional) True to hide the progress bar (defaults to false)
+     * @return {Ext.ProgressBar} this
+     */
+    reset : function(hide){
+        this.updateProgress(0);
+        if(this.textTopEl){
+            this.textTopEl.addClass('x-hidden');
+        }
+        if(this.waitTimer){
+            this.waitTimer.onStop = null; //prevent recursion
+            Ext.TaskMgr.stop(this.waitTimer);
+            this.waitTimer = null;
+        }
+        if(hide === true){
+            this.hide();
+        }
+        return this;
+    }
+});
+Ext.reg('progress', Ext.ProgressBar);/*
+ * These classes are derivatives of the similarly named classes in the YUI Library.
+ * The original license:
+ * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.net/yui/license.txt
+ */
+
+(function() {
+
+var Event=Ext.EventManager;
+var Dom=Ext.lib.Dom;
+
+/**
+ * @class Ext.dd.DragDrop
+ * Defines the interface and base operation of items that that can be
+ * dragged or can be drop targets.  It was designed to be extended, overriding
+ * the event handlers for startDrag, onDrag, onDragOver and onDragOut.
+ * Up to three html elements can be associated with a DragDrop instance:
+ * <ul>
+ * <li>linked element: the element that is passed into the constructor.
+ * This is the element which defines the boundaries for interaction with
+ * other DragDrop objects.</li>
+ * <li>handle element(s): The drag operation only occurs if the element that
+ * was clicked matches a handle element.  By default this is the linked
+ * element, but there are times that you will want only a portion of the
+ * linked element to initiate the drag operation, and the setHandleElId()
+ * method provides a way to define this.</li>
+ * <li>drag element: this represents the element that would be moved along
+ * with the cursor during a drag operation.  By default, this is the linked
+ * element itself as in {@link Ext.dd.DD}.  setDragElId() lets you define
+ * a separate element that would be moved, as in {@link Ext.dd.DDProxy}.
+ * </li>
+ * </ul>
+ * This class should not be instantiated until the onload event to ensure that
+ * the associated elements are available.
+ * The following would define a DragDrop obj that would interact with any
+ * other DragDrop obj in the "group1" group:
+ * <pre>
+ *  dd = new Ext.dd.DragDrop("div1", "group1");
+ * </pre>
+ * Since none of the event handlers have been implemented, nothing would
+ * actually happen if you were to run the code above.  Normally you would
+ * override this class or one of the default implementations, but you can
+ * also override the methods you want on an instance of the class...
+ * <pre>
+ *  dd.onDragDrop = function(e, id) {
+ *  &nbsp;&nbsp;alert("dd was dropped on " + id);
+ *  }
+ * </pre>
+ * @constructor
+ * @param {String} id of the element that is linked to this instance
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DragDrop:
+ *                    padding, isTarget, maintainOffset, primaryButtonOnly
+ */
+Ext.dd.DragDrop = function(id, sGroup, config) {
+    if(id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.dd.DragDrop.prototype = {
+
+    /**
+     * Set to false to enable a DragDrop object to fire drag events while dragging
+     * over its own Element. Defaults to true - DragDrop objects do not by default
+     * fire drag events to themselves.
+     * @property ignoreSelf
+     * @type Boolean
+     */
+
+    /**
+     * The id of the element associated with this object.  This is what we
+     * refer to as the "linked element" because the size and position of
+     * this element is used to determine when the drag and drop objects have
+     * interacted.
+     * @property id
+     * @type String
+     */
+    id: null,
+
+    /**
+     * Configuration attributes passed into the constructor
+     * @property config
+     * @type object
+     */
+    config: null,
+
+    /**
+     * The id of the element that will be dragged.  By default this is same
+     * as the linked element , but could be changed to another element. Ex:
+     * Ext.dd.DDProxy
+     * @property dragElId
+     * @type String
+     * @private
+     */
+    dragElId: null,
+
+    /**
+     * The ID of the element that initiates the drag operation.  By default
+     * this is the linked element, but could be changed to be a child of this
+     * element.  This lets us do things like only starting the drag when the
+     * header element within the linked html element is clicked.
+     * @property handleElId
+     * @type String
+     * @private
+     */
+    handleElId: null,
+
+    /**
+     * An object who's property names identify HTML tags to be considered invalid as drag handles.
+     * A non-null property value identifies the tag as invalid. Defaults to the 
+     * following value which prevents drag operations from being initiated by &lt;a> elements:<pre><code>
+{
+    A: "A"
+}</code></pre>
+     * @property invalidHandleTypes
+     * @type Object
+     */
+    invalidHandleTypes: null,
+
+    /**
+     * An object who's property names identify the IDs of elements to be considered invalid as drag handles.
+     * A non-null property value identifies the ID as invalid. For example, to prevent
+     * dragging from being initiated on element ID "foo", use:<pre><code>
+{
+    foo: true
+}</code></pre>
+     * @property invalidHandleIds
+     * @type Object
+     */
+    invalidHandleIds: null,
+
+    /**
+     * An Array of CSS class names for elements to be considered in valid as drag handles.
+     * @property invalidHandleClasses
+     * @type Array
+     */
+    invalidHandleClasses: null,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageX
+     * @type int
+     * @private
+     */
+    startPageX: 0,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageY
+     * @type int
+     * @private
+     */
+    startPageY: 0,
+
+    /**
+     * The group defines a logical collection of DragDrop objects that are
+     * related.  Instances only get events when interacting with other
+     * DragDrop object in the same group.  This lets us define multiple
+     * groups using a single DragDrop subclass if we want.
+     * @property groups
+     * @type object An object in the format {'group1':true, 'group2':true}
+     */
+    groups: null,
+
+    /**
+     * Individual drag/drop instances can be locked.  This will prevent
+     * onmousedown start drag.
+     * @property locked
+     * @type boolean
+     * @private
+     */
+    locked: false,
+
+    /**
+     * Lock this instance
+     * @method lock
+     */
+    lock: function() { this.locked = true; },
+
+    /**
+     * When set to true, other DD objects in cooperating DDGroups do not receive
+     * notification events when this DD object is dragged over them. Defaults to false.
+     * @property moveOnly
+     * @type boolean
+     */
+    moveOnly: false,
+
+    /**
+     * Unlock this instace
+     * @method unlock
+     */
+    unlock: function() { this.locked = false; },
+
+    /**
+     * By default, all instances can be a drop target.  This can be disabled by
+     * setting isTarget to false.
+     * @property isTarget
+     * @type boolean
+     */
+    isTarget: true,
+
+    /**
+     * The padding configured for this drag and drop object for calculating
+     * the drop zone intersection with this object.
+     * @property padding
+     * @type int[] An array containing the 4 padding values: [top, right, bottom, left]
+     */
+    padding: null,
+
+    /**
+     * Cached reference to the linked element
+     * @property _domRef
+     * @private
+     */
+    _domRef: null,
+
+    /**
+     * Internal typeof flag
+     * @property __ygDragDrop
+     * @private
+     */
+    __ygDragDrop: true,
+
+    /**
+     * Set to true when horizontal contraints are applied
+     * @property constrainX
+     * @type boolean
+     * @private
+     */
+    constrainX: false,
+
+    /**
+     * Set to true when vertical contraints are applied
+     * @property constrainY
+     * @type boolean
+     * @private
+     */
+    constrainY: false,
+
+    /**
+     * The left constraint
+     * @property minX
+     * @type int
+     * @private
+     */
+    minX: 0,
+
+    /**
+     * The right constraint
+     * @property maxX
+     * @type int
+     * @private
+     */
+    maxX: 0,
+
+    /**
+     * The up constraint
+     * @property minY
+     * @type int
+     * @type int
+     * @private
+     */
+    minY: 0,
+
+    /**
+     * The down constraint
+     * @property maxY
+     * @type int
+     * @private
+     */
+    maxY: 0,
+
+    /**
+     * Maintain offsets when we resetconstraints.  Set to true when you want
+     * the position of the element relative to its parent to stay the same
+     * when the page changes
+     *
+     * @property maintainOffset
+     * @type boolean
+     */
+    maintainOffset: false,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * horizontal graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property xTicks
+     * @type int[]
+     */
+    xTicks: null,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * vertical graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property yTicks
+     * @type int[]
+     */
+    yTicks: null,
+
+    /**
+     * By default the drag and drop instance will only respond to the primary
+     * button click (left button for a right-handed mouse).  Set to true to
+     * allow drag and drop to start with any mouse click that is propogated
+     * by the browser
+     * @property primaryButtonOnly
+     * @type boolean
+     */
+    primaryButtonOnly: true,
+
+    /**
+     * The availabe property is false until the linked dom element is accessible.
+     * @property available
+     * @type boolean
+     */
+    available: false,
+
+    /**
+     * By default, drags can only be initiated if the mousedown occurs in the
+     * region the linked element is.  This is done in part to work around a
+     * bug in some browsers that mis-report the mousedown if the previous
+     * mouseup happened outside of the window.  This property is set to true
+     * if outer handles are defined.
+     *
+     * @property hasOuterHandles
+     * @type boolean
+     * @default false
+     */
+    hasOuterHandles: false,
+
+    /**
+     * Code that executes immediately before the startDrag event
+     * @method b4StartDrag
+     * @private
+     */
+    b4StartDrag: function(x, y) { },
+
+    /**
+     * Abstract method called after a drag/drop object is clicked
+     * and the drag or mousedown time thresholds have beeen met.
+     * @method startDrag
+     * @param {int} X click location
+     * @param {int} Y click location
+     */
+    startDrag: function(x, y) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDrag event
+     * @method b4Drag
+     * @private
+     */
+    b4Drag: function(e) { },
+
+    /**
+     * Abstract method called during the onMouseMove event while dragging an
+     * object.
+     * @method onDrag
+     * @param {Event} e the mousemove event
+     */
+    onDrag: function(e) { /* override this */ },
+
+    /**
+     * Abstract method called when this element fist begins hovering over
+     * another DragDrop obj
+     * @method onDragEnter
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of one or more
+     * dragdrop items being hovered over.
+     */
+    onDragEnter: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOver event
+     * @method b4DragOver
+     * @private
+     */
+    b4DragOver: function(e) { },
+
+    /**
+     * Abstract method called when this element is hovering over another
+     * DragDrop obj
+     * @method onDragOver
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of dd items
+     * being hovered over.
+     */
+    onDragOver: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOut event
+     * @method b4DragOut
+     * @private
+     */
+    b4DragOut: function(e) { },
+
+    /**
+     * Abstract method called when we are no longer hovering over an element
+     * @method onDragOut
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was hovering over.  In INTERSECT mode, an array of dd items
+     * that the mouse is no longer over.
+     */
+    onDragOut: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragDrop event
+     * @method b4DragDrop
+     * @private
+     */
+    b4DragDrop: function(e) { },
+
+    /**
+     * Abstract method called when this item is dropped on another DragDrop
+     * obj
+     * @method onDragDrop
+     * @param {Event} e the mouseup event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was dropped on.  In INTERSECT mode, an array of dd items this
+     * was dropped on.
+     */
+    onDragDrop: function(e, id) { /* override this */ },
+
+    /**
+     * Abstract method called when this item is dropped on an area with no
+     * drop target
+     * @method onInvalidDrop
+     * @param {Event} e the mouseup event
+     */
+    onInvalidDrop: function(e) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the endDrag event
+     * @method b4EndDrag
+     * @private
+     */
+    b4EndDrag: function(e) { },
+
+    /**
+     * Fired when we are done dragging the object
+     * @method endDrag
+     * @param {Event} e the mouseup event
+     */
+    endDrag: function(e) { /* override this */ },
+
+    /**
+     * Code executed immediately before the onMouseDown event
+     * @method b4MouseDown
+     * @param {Event} e the mousedown event
+     * @private
+     */
+    b4MouseDown: function(e) {  },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mousedown
+     * @method onMouseDown
+     * @param {Event} e the mousedown event
+     */
+    onMouseDown: function(e) { /* override this */ },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mouseup
+     * @method onMouseUp
+     * @param {Event} e the mouseup event
+     */
+    onMouseUp: function(e) { /* override this */ },
+
+    /**
+     * Override the onAvailable method to do what is needed after the initial
+     * position was determined.
+     * @method onAvailable
+     */
+    onAvailable: function () {
+    },
+
+    /**
+     * Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}).
+     * @type Object
+     */
+    defaultPadding : {left:0, right:0, top:0, bottom:0},
+
+    /**
+     * Initializes the drag drop object's constraints to restrict movement to a certain element.
+ *
+ * Usage:
+ <pre><code>
+ var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
+                { dragElId: "existingProxyDiv" });
+ dd.startDrag = function(){
+     this.constrainTo("parent-id");
+ };
+ </code></pre>
+ * Or you can initalize it using the {@link Ext.Element} object:
+ <pre><code>
+ Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
+     startDrag : function(){
+         this.constrainTo("parent-id");
+     }
+ });
+ </code></pre>
+     * @param {Mixed} constrainTo The element to constrain to.
+     * @param {Object/Number} pad (optional) Pad provides a way to specify "padding" of the constraints,
+     * and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or
+     * an object containing the sides to pad. For example: {right:10, bottom:10}
+     * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders)
+     */
+    constrainTo : function(constrainTo, pad, inContent){
+        if(typeof pad == "number"){
+            pad = {left: pad, right:pad, top:pad, bottom:pad};
+        }
+        pad = pad || this.defaultPadding;
+        var b = Ext.get(this.getEl()).getBox();
+        var ce = Ext.get(constrainTo);
+        var s = ce.getScroll();
+        var c, cd = ce.dom;
+        if(cd == document.body){
+            c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()};
+        }else{
+            var xy = ce.getXY();
+            c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight};
+        }
+
+
+        var topSpace = b.y - c.y;
+        var leftSpace = b.x - c.x;
+
+        this.resetConstraints();
+        this.setXConstraint(leftSpace - (pad.left||0), // left
+                c.width - leftSpace - b.width - (pad.right||0), //right
+				this.xTickSize
+        );
+        this.setYConstraint(topSpace - (pad.top||0), //top
+                c.height - topSpace - b.height - (pad.bottom||0), //bottom
+				this.yTickSize
+        );
+    },
+
+    /**
+     * Returns a reference to the linked element
+     * @method getEl
+     * @return {HTMLElement} the html element
+     */
+    getEl: function() {
+        if (!this._domRef) {
+            this._domRef = Ext.getDom(this.id);
+        }
+
+        return this._domRef;
+    },
+
+    /**
+     * Returns a reference to the actual element to drag.  By default this is
+     * the same as the html element, but it can be assigned to another
+     * element. An example of this can be found in Ext.dd.DDProxy
+     * @method getDragEl
+     * @return {HTMLElement} the html element
+     */
+    getDragEl: function() {
+        return Ext.getDom(this.dragElId);
+    },
+
+    /**
+     * Sets up the DragDrop object.  Must be called in the constructor of any
+     * Ext.dd.DragDrop subclass
+     * @method init
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    init: function(id, sGroup, config) {
+        this.initTarget(id, sGroup, config);
+        Event.on(this.id, "mousedown", this.handleMouseDown, this);
+        // Event.on(this.id, "selectstart", Event.preventDefault);
+    },
+
+    /**
+     * Initializes Targeting functionality only... the object does not
+     * get a mousedown handler.
+     * @method initTarget
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    initTarget: function(id, sGroup, config) {
+
+        // configuration attributes
+        this.config = config || {};
+
+        // create a local reference to the drag and drop manager
+        this.DDM = Ext.dd.DDM;
+        // initialize the groups array
+        this.groups = {};
+
+        // assume that we have an element reference instead of an id if the
+        // parameter is not a string
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+
+        // set the id
+        this.id = id;
+
+        // add to an interaction group
+        this.addToGroup((sGroup) ? sGroup : "default");
+
+        // We don't want to register this as the handle with the manager
+        // so we just set the id rather than calling the setter.
+        this.handleElId = id;
+
+        // the linked element is the element that gets dragged by default
+        this.setDragElId(id);
+
+        // by default, clicked anchors will not start drag operations.
+        this.invalidHandleTypes = { A: "A" };
+        this.invalidHandleIds = {};
+        this.invalidHandleClasses = [];
+
+        this.applyConfig();
+
+        this.handleOnAvailable();
+    },
+
+    /**
+     * Applies the configuration parameters that were passed into the constructor.
+     * This is supposed to happen at each level through the inheritance chain.  So
+     * a DDProxy implentation will execute apply config on DDProxy, DD, and
+     * DragDrop in order to get all of the parameters that are available in
+     * each object.
+     * @method applyConfig
+     */
+    applyConfig: function() {
+
+        // configurable properties:
+        //    padding, isTarget, maintainOffset, primaryButtonOnly
+        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);
+
+    },
+
+    /**
+     * Executed when the linked element is available
+     * @method handleOnAvailable
+     * @private
+     */
+    handleOnAvailable: function() {
+        this.available = true;
+        this.resetConstraints();
+        this.onAvailable();
+    },
+
+     /**
+     * Configures the padding for the target zone in px.  Effectively expands
+     * (or reduces) the virtual object size for targeting calculations.
+     * Supports css-style shorthand; if only one parameter is passed, all sides
+     * will have that padding, and if only two are passed, the top and bottom
+     * will have the first param, the left and right the second.
+     * @method setPadding
+     * @param {int} iTop    Top pad
+     * @param {int} iRight  Right pad
+     * @param {int} iBot    Bot pad
+     * @param {int} iLeft   Left pad
+     */
+    setPadding: function(iTop, iRight, iBot, iLeft) {
+        // this.padding = [iLeft, iRight, iTop, iBot];
+        if (!iRight && 0 !== iRight) {
+            this.padding = [iTop, iTop, iTop, iTop];
+        } else if (!iBot && 0 !== iBot) {
+            this.padding = [iTop, iRight, iTop, iRight];
+        } else {
+            this.padding = [iTop, iRight, iBot, iLeft];
+        }
+    },
+
+    /**
+     * Stores the initial placement of the linked element.
+     * @method setInitPosition
+     * @param {int} diffX   the X offset, default 0
+     * @param {int} diffY   the Y offset, default 0
+     */
+    setInitPosition: function(diffX, diffY) {
+        var el = this.getEl();
+
+        if (!this.DDM.verifyEl(el)) {
+            return;
+        }
+
+        var dx = diffX || 0;
+        var dy = diffY || 0;
+
+        var p = Dom.getXY( el );
+
+        this.initPageX = p[0] - dx;
+        this.initPageY = p[1] - dy;
+
+        this.lastPageX = p[0];
+        this.lastPageY = p[1];
+
+
+        this.setStartPosition(p);
+    },
+
+    /**
+     * Sets the start position of the element.  This is set when the obj
+     * is initialized, the reset when a drag is started.
+     * @method setStartPosition
+     * @param pos current position (from previous lookup)
+     * @private
+     */
+    setStartPosition: function(pos) {
+        var p = pos || Dom.getXY( this.getEl() );
+        this.deltaSetXY = null;
+
+        this.startPageX = p[0];
+        this.startPageY = p[1];
+    },
+
+    /**
+     * Add this instance to a group of related drag/drop objects.  All
+     * instances belong to at least one group, and can belong to as many
+     * groups as needed.
+     * @method addToGroup
+     * @param sGroup {string} the name of the group
+     */
+    addToGroup: function(sGroup) {
+        this.groups[sGroup] = true;
+        this.DDM.regDragDrop(this, sGroup);
+    },
+
+    /**
+     * Remove's this instance from the supplied interaction group
+     * @method removeFromGroup
+     * @param {string}  sGroup  The group to drop
+     */
+    removeFromGroup: function(sGroup) {
+        if (this.groups[sGroup]) {
+            delete this.groups[sGroup];
+        }
+
+        this.DDM.removeDDFromGroup(this, sGroup);
+    },
+
+    /**
+     * Allows you to specify that an element other than the linked element
+     * will be moved with the cursor during a drag
+     * @method setDragElId
+     * @param id {string} the id of the element that will be used to initiate the drag
+     */
+    setDragElId: function(id) {
+        this.dragElId = id;
+    },
+
+    /**
+     * Allows you to specify a child of the linked element that should be
+     * used to initiate the drag operation.  An example of this would be if
+     * you have a content div with text and links.  Clicking anywhere in the
+     * content area would normally start the drag operation.  Use this method
+     * to specify that an element inside of the content div is the element
+     * that starts the drag operation.
+     * @method setHandleElId
+     * @param id {string} the id of the element that will be used to
+     * initiate the drag.
+     */
+    setHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.handleElId = id;
+        this.DDM.regHandle(this.id, id);
+    },
+
+    /**
+     * Allows you to set an element outside of the linked element as a drag
+     * handle
+     * @method setOuterHandleElId
+     * @param id the id of the element that will be used to initiate the drag
+     */
+    setOuterHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        Event.on(id, "mousedown",
+                this.handleMouseDown, this);
+        this.setHandleElId(id);
+
+        this.hasOuterHandles = true;
+    },
+
+    /**
+     * Remove all drag and drop hooks for this element
+     * @method unreg
+     */
+    unreg: function() {
+        Event.un(this.id, "mousedown",
+                this.handleMouseDown);
+        this._domRef = null;
+        this.DDM._remove(this);
+    },
+
+    destroy : function(){
+        this.unreg();
+    },
+
+    /**
+     * Returns true if this instance is locked, or the drag drop mgr is locked
+     * (meaning that all drag/drop is disabled on the page.)
+     * @method isLocked
+     * @return {boolean} true if this obj or all drag/drop is locked, else
+     * false
+     */
+    isLocked: function() {
+        return (this.DDM.isLocked() || this.locked);
+    },
+
+    /**
+     * Fired when this object is clicked
+     * @method handleMouseDown
+     * @param {Event} e
+     * @param {Ext.dd.DragDrop} oDD the clicked dd object (this dd obj)
+     * @private
+     */
+    handleMouseDown: function(e, oDD){
+        if (this.primaryButtonOnly && e.button != 0) {
+            return;
+        }
+
+        if (this.isLocked()) {
+            return;
+        }
+
+        this.DDM.refreshCache(this.groups);
+
+        var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e));
+        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
+        } else {
+            if (this.clickValidator(e)) {
+
+                // set the initial element position
+                this.setStartPosition();
+
+
+                this.b4MouseDown(e);
+                this.onMouseDown(e);
+
+                this.DDM.handleMouseDown(e, this);
+
+                this.DDM.stopEvent(e);
+            } else {
+
+
+            }
+        }
+    },
+
+    clickValidator: function(e) {
+        var target = e.getTarget();
+        return ( this.isValidHandleChild(target) &&
+                    (this.id == this.handleElId ||
+                        this.DDM.handleWasClicked(target, this.id)) );
+    },
+
+    /**
+     * Allows you to specify a tag name that should not start a drag operation
+     * when clicked.  This is designed to facilitate embedding links within a
+     * drag handle that do something other than start the drag.
+     * @method addInvalidHandleType
+     * @param {string} tagName the type of element to exclude
+     */
+    addInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        this.invalidHandleTypes[type] = type;
+    },
+
+    /**
+     * Lets you to specify an element id for a child of a drag handle
+     * that should not initiate a drag
+     * @method addInvalidHandleId
+     * @param {string} id the element id of the element you wish to ignore
+     */
+    addInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.invalidHandleIds[id] = id;
+    },
+
+    /**
+     * Lets you specify a css class of elements that will not initiate a drag
+     * @method addInvalidHandleClass
+     * @param {string} cssClass the class of the elements you wish to ignore
+     */
+    addInvalidHandleClass: function(cssClass) {
+        this.invalidHandleClasses.push(cssClass);
+    },
+
+    /**
+     * Unsets an excluded tag name set by addInvalidHandleType
+     * @method removeInvalidHandleType
+     * @param {string} tagName the type of element to unexclude
+     */
+    removeInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        // this.invalidHandleTypes[type] = null;
+        delete this.invalidHandleTypes[type];
+    },
+
+    /**
+     * Unsets an invalid handle id
+     * @method removeInvalidHandleId
+     * @param {string} id the id of the element to re-enable
+     */
+    removeInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        delete this.invalidHandleIds[id];
+    },
+
+    /**
+     * Unsets an invalid css class
+     * @method removeInvalidHandleClass
+     * @param {string} cssClass the class of the element(s) you wish to
+     * re-enable
+     */
+    removeInvalidHandleClass: function(cssClass) {
+        for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
+            if (this.invalidHandleClasses[i] == cssClass) {
+                delete this.invalidHandleClasses[i];
+            }
+        }
+    },
+
+    /**
+     * Checks the tag exclusion list to see if this click should be ignored
+     * @method isValidHandleChild
+     * @param {HTMLElement} node the HTMLElement to evaluate
+     * @return {boolean} true if this is a valid tag type, false if not
+     */
+    isValidHandleChild: function(node) {
+
+        var valid = true;
+        // var n = (node.nodeName == "#text") ? node.parentNode : node;
+        var nodeName;
+        try {
+            nodeName = node.nodeName.toUpperCase();
+        } catch(e) {
+            nodeName = node.nodeName;
+        }
+        valid = valid && !this.invalidHandleTypes[nodeName];
+        valid = valid && !this.invalidHandleIds[node.id];
+
+        for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) {
+            valid = !Ext.fly(node).hasClass(this.invalidHandleClasses[i]);
+        }
+
+
+        return valid;
+
+    },
+
+    /**
+     * Create the array of horizontal tick marks if an interval was specified
+     * in setXConstraint().
+     * @method setXTicks
+     * @private
+     */
+    setXTicks: function(iStartX, iTickSize) {
+        this.xTicks = [];
+        this.xTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.xTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * Create the array of vertical tick marks if an interval was specified in
+     * setYConstraint().
+     * @method setYTicks
+     * @private
+     */
+    setYTicks: function(iStartY, iTickSize) {
+        this.yTicks = [];
+        this.yTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.yTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Use
+     * this method to limit the horizontal travel of the element.  Pass in
+     * 0,0 for the parameters if you want to lock the drag to the y axis.
+     * @method setXConstraint
+     * @param {int} iLeft the number of pixels the element can move to the left
+     * @param {int} iRight the number of pixels the element can move to the
+     * right
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element
+     * should move iTickSize pixels at a time.
+     */
+    setXConstraint: function(iLeft, iRight, iTickSize) {
+        this.leftConstraint = iLeft;
+        this.rightConstraint = iRight;
+
+        this.minX = this.initPageX - iLeft;
+        this.maxX = this.initPageX + iRight;
+        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }
+
+        this.constrainX = true;
+    },
+
+    /**
+     * Clears any constraints applied to this instance.  Also clears ticks
+     * since they can't exist independent of a constraint at this time.
+     * @method clearConstraints
+     */
+    clearConstraints: function() {
+        this.constrainX = false;
+        this.constrainY = false;
+        this.clearTicks();
+    },
+
+    /**
+     * Clears any tick interval defined for this instance
+     * @method clearTicks
+     */
+    clearTicks: function() {
+        this.xTicks = null;
+        this.yTicks = null;
+        this.xTickSize = 0;
+        this.yTickSize = 0;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Set
+     * this to limit the vertical travel of the element.  Pass in 0,0 for the
+     * parameters if you want to lock the drag to the x axis.
+     * @method setYConstraint
+     * @param {int} iUp the number of pixels the element can move up
+     * @param {int} iDown the number of pixels the element can move down
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element should move iTickSize pixels at a time.
+     */
+    setYConstraint: function(iUp, iDown, iTickSize) {
+        this.topConstraint = iUp;
+        this.bottomConstraint = iDown;
+
+        this.minY = this.initPageY - iUp;
+        this.maxY = this.initPageY + iDown;
+        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }
+
+        this.constrainY = true;
+
+    },
+
+    /**
+     * resetConstraints must be called if you manually reposition a dd element.
+     * @method resetConstraints
+     * @param {boolean} maintainOffset
+     */
+    resetConstraints: function() {
+
+
+        // Maintain offsets if necessary
+        if (this.initPageX || this.initPageX === 0) {
+            // figure out how much this thing has moved
+            var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
+            var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
+
+            this.setInitPosition(dx, dy);
+
+        // This is the first time we have detected the element's position
+        } 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         );
+        }
+    },
+
+    /**
+     * Normally the drag element is moved pixel by pixel, but we can specify
+     * that it move a number of pixels at a time.  This method resolves the
+     * location when we have it set up like this.
+     * @method getTick
+     * @param {int} val where we want to place the object
+     * @param {int[]} tickArray sorted array of valid points
+     * @return {int} the closest tick
+     * @private
+     */
+    getTick: function(val, tickArray) {
+
+        if (!tickArray) {
+            // If tick interval is not defined, it is effectively 1 pixel,
+            // so we return the value passed to us.
+            return val;
+        } else if (tickArray[0] >= val) {
+            // The value is lower than the first tick, so we return the first
+            // tick.
+            return tickArray[0];
+        } else {
+            for (var i=0, len=tickArray.length; i<len; ++i) {
+                var next = i + 1;
+                if (tickArray[next] && tickArray[next] >= val) {
+                    var diff1 = val - tickArray[i];
+                    var diff2 = tickArray[next] - val;
+                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
+                }
+            }
+
+            // The value is larger than the last tick, so we return the last
+            // tick.
+            return tickArray[tickArray.length - 1];
+        }
+    },
+
+    /**
+     * toString method
+     * @method toString
+     * @return {string} string representation of the dd obj
+     */
+    toString: function() {
+        return ("DragDrop " + this.id);
+    }
+
+};
+
+})();
+/**
+ * The drag and drop utility provides a framework for building drag and drop
+ * applications.  In addition to enabling drag and drop for specific elements,
+ * the drag and drop elements are tracked by the manager class, and the
+ * interactions between the various elements are tracked during the drag and
+ * the implementing code is notified about these important moments.
+ */
+
+// Only load the library once.  Rewriting the manager class would orphan
+// existing drag and drop instances.
+if (!Ext.dd.DragDropMgr) {
+
+/**
+ * @class Ext.dd.DragDropMgr
+ * DragDropMgr is a singleton that tracks the element interaction for
+ * all DragDrop items in the window.  Generally, you will not call
+ * this class directly, but it does have helper methods that could
+ * be useful in your DragDrop implementations.
+ * @singleton
+ */
+Ext.dd.DragDropMgr = function() {
+
+    var Event = Ext.EventManager;
+
+    return {
+
+        /**
+         * Two dimensional Array of registered DragDrop objects.  The first
+         * dimension is the DragDrop item group, the second the DragDrop
+         * object.
+         * @property ids
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        ids: {},
+
+        /**
+         * Array of element ids defined as drag handles.  Used to determine
+         * if the element that generated the mousedown event is actually the
+         * handle and not the html element itself.
+         * @property handleIds
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        handleIds: {},
+
+        /**
+         * the DragDrop object that is currently being dragged
+         * @property dragCurrent
+         * @type DragDrop
+         * @private
+         * @static
+         **/
+        dragCurrent: null,
+
+        /**
+         * the DragDrop object(s) that are being hovered over
+         * @property dragOvers
+         * @type Array
+         * @private
+         * @static
+         */
+        dragOvers: {},
+
+        /**
+         * the X distance between the cursor and the object being dragged
+         * @property deltaX
+         * @type int
+         * @private
+         * @static
+         */
+        deltaX: 0,
+
+        /**
+         * the Y distance between the cursor and the object being dragged
+         * @property deltaY
+         * @type int
+         * @private
+         * @static
+         */
+        deltaY: 0,
+
+        /**
+         * Flag to determine if we should prevent the default behavior of the
+         * events we define. By default this is true, but this can be set to
+         * false if you need the default behavior (not recommended)
+         * @property preventDefault
+         * @type boolean
+         * @static
+         */
+        preventDefault: true,
+
+        /**
+         * Flag to determine if we should stop the propagation of the events
+         * we generate. This is true by default but you may want to set it to
+         * false if the html element contains other features that require the
+         * mouse click.
+         * @property stopPropagation
+         * @type boolean
+         * @static
+         */
+        stopPropagation: true,
+
+        /**
+         * Internal flag that is set to true when drag and drop has been
+         * intialized
+         * @property initialized
+         * @private
+         * @static
+         */
+        initialized: false,
+
+        /**
+         * All drag and drop can be disabled.
+         * @property locked
+         * @private
+         * @static
+         */
+        locked: false,
+
+        /**
+         * Called the first time an element is registered.
+         * @method init
+         * @private
+         * @static
+         */
+        init: function() {
+            this.initialized = true;
+        },
+
+        /**
+         * In point mode, drag and drop interaction is defined by the
+         * location of the cursor during the drag/drop
+         * @property POINT
+         * @type int
+         * @static
+         */
+        POINT: 0,
+
+        /**
+         * In intersect mode, drag and drop interaction is defined by the
+         * overlap of two or more drag and drop objects.
+         * @property INTERSECT
+         * @type int
+         * @static
+         */
+        INTERSECT: 1,
+
+        /**
+         * The current drag and drop mode.  Default: POINT
+         * @property mode
+         * @type int
+         * @static
+         */
+        mode: 0,
+
+        /**
+         * Runs method on all drag and drop objects
+         * @method _execOnAll
+         * @private
+         * @static
+         */
+        _execOnAll: function(sMethod, args) {
+            for (var i in this.ids) {
+                for (var j in this.ids[i]) {
+                    var oDD = this.ids[i][j];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+                    oDD[sMethod].apply(oDD, args);
+                }
+            }
+        },
+
+        /**
+         * Drag and drop initialization.  Sets up the global event handlers
+         * @method _onLoad
+         * @private
+         * @static
+         */
+        _onLoad: function() {
+
+            this.init();
+
+
+            Event.on(document, "mouseup",   this.handleMouseUp, this, true);
+            Event.on(document, "mousemove", this.handleMouseMove, this, true);
+            Event.on(window,   "unload",    this._onUnload, this, true);
+            Event.on(window,   "resize",    this._onResize, this, true);
+            // Event.on(window,   "mouseout",    this._test);
+
+        },
+
+        /**
+         * Reset constraints on all drag and drop objs
+         * @method _onResize
+         * @private
+         * @static
+         */
+        _onResize: function(e) {
+            this._execOnAll("resetConstraints", []);
+        },
+
+        /**
+         * Lock all drag and drop functionality
+         * @method lock
+         * @static
+         */
+        lock: function() { this.locked = true; },
+
+        /**
+         * Unlock all drag and drop functionality
+         * @method unlock
+         * @static
+         */
+        unlock: function() { this.locked = false; },
+
+        /**
+         * Is drag and drop locked?
+         * @method isLocked
+         * @return {boolean} True if drag and drop is locked, false otherwise.
+         * @static
+         */
+        isLocked: function() { return this.locked; },
+
+        /**
+         * Location cache that is set for all drag drop objects when a drag is
+         * initiated, cleared when the drag is finished.
+         * @property locationCache
+         * @private
+         * @static
+         */
+        locationCache: {},
+
+        /**
+         * Set useCache to false if you want to force object the lookup of each
+         * drag and drop linked element constantly during a drag.
+         * @property useCache
+         * @type boolean
+         * @static
+         */
+        useCache: true,
+
+        /**
+         * The number of pixels that the mouse needs to move after the
+         * mousedown before the drag is initiated.  Default=3;
+         * @property clickPixelThresh
+         * @type int
+         * @static
+         */
+        clickPixelThresh: 3,
+
+        /**
+         * The number of milliseconds after the mousedown event to initiate the
+         * drag if we don't get a mouseup event. Default=1000
+         * @property clickTimeThresh
+         * @type int
+         * @static
+         */
+        clickTimeThresh: 350,
+
+        /**
+         * Flag that indicates that either the drag pixel threshold or the
+         * mousdown time threshold has been met
+         * @property dragThreshMet
+         * @type boolean
+         * @private
+         * @static
+         */
+        dragThreshMet: false,
+
+        /**
+         * Timeout used for the click time threshold
+         * @property clickTimeout
+         * @type Object
+         * @private
+         * @static
+         */
+        clickTimeout: null,
+
+        /**
+         * The X position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startX
+         * @type int
+         * @private
+         * @static
+         */
+        startX: 0,
+
+        /**
+         * The Y position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startY
+         * @type int
+         * @private
+         * @static
+         */
+        startY: 0,
+
+        /**
+         * Each DragDrop instance must be registered with the DragDropMgr.
+         * This is executed in DragDrop.init()
+         * @method regDragDrop
+         * @param {DragDrop} oDD the DragDrop object to register
+         * @param {String} sGroup the name of the group this element belongs to
+         * @static
+         */
+        regDragDrop: function(oDD, sGroup) {
+            if (!this.initialized) { this.init(); }
+
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+            this.ids[sGroup][oDD.id] = oDD;
+        },
+
+        /**
+         * Removes the supplied dd instance from the supplied group. Executed
+         * by DragDrop.removeFromGroup, so don't call this function directly.
+         * @method removeDDFromGroup
+         * @private
+         * @static
+         */
+        removeDDFromGroup: function(oDD, sGroup) {
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+
+            var obj = this.ids[sGroup];
+            if (obj && obj[oDD.id]) {
+                delete obj[oDD.id];
+            }
+        },
+
+        /**
+         * Unregisters a drag and drop item.  This is executed in
+         * DragDrop.unreg, use that method instead of calling this directly.
+         * @method _remove
+         * @private
+         * @static
+         */
+        _remove: function(oDD) {
+            for (var g in oDD.groups) {
+                if (g && this.ids[g] && this.ids[g][oDD.id]) {
+                    delete this.ids[g][oDD.id];
+                }
+            }
+            delete this.handleIds[oDD.id];
+        },
+
+        /**
+         * Each DragDrop handle element must be registered.  This is done
+         * automatically when executing DragDrop.setHandleElId()
+         * @method regHandle
+         * @param {String} sDDId the DragDrop id this element is a handle for
+         * @param {String} sHandleId the id of the element that is the drag
+         * handle
+         * @static
+         */
+        regHandle: function(sDDId, sHandleId) {
+            if (!this.handleIds[sDDId]) {
+                this.handleIds[sDDId] = {};
+            }
+            this.handleIds[sDDId][sHandleId] = sHandleId;
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop item.
+         * @method isDragDrop
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop item,
+         * false otherwise
+         * @static
+         */
+        isDragDrop: function(id) {
+            return ( this.getDDById(id) ) ? true : false;
+        },
+
+        /**
+         * Returns the drag and drop instances that are in all groups the
+         * passed in instance belongs to.
+         * @method getRelated
+         * @param {DragDrop} p_oDD the obj to get related data for
+         * @param {boolean} bTargetsOnly if true, only return targetable objs
+         * @return {DragDrop[]} the related instances
+         * @static
+         */
+        getRelated: function(p_oDD, bTargetsOnly) {
+            var oDDs = [];
+            for (var i in p_oDD.groups) {
+                for (var j in this.ids[i]) {
+                    var dd = this.ids[i][j];
+                    if (! this.isTypeOfDD(dd)) {
+                        continue;
+                    }
+                    if (!bTargetsOnly || dd.isTarget) {
+                        oDDs[oDDs.length] = dd;
+                    }
+                }
+            }
+
+            return oDDs;
+        },
+
+        /**
+         * Returns true if the specified dd target is a legal target for
+         * the specifice drag obj
+         * @method isLegalTarget
+         * @param {DragDrop} the drag obj
+         * @param {DragDrop} the target
+         * @return {boolean} true if the target is a legal target for the
+         * dd obj
+         * @static
+         */
+        isLegalTarget: function (oDD, oTargetDD) {
+            var targets = this.getRelated(oDD, true);
+            for (var i=0, len=targets.length;i<len;++i) {
+                if (targets[i].id == oTargetDD.id) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * My goal is to be able to transparently determine if an object is
+         * typeof DragDrop, and the exact subclass of DragDrop.  typeof
+         * returns "object", oDD.constructor.toString() always returns
+         * "DragDrop" and not the name of the subclass.  So for now it just
+         * evaluates a well-known variable in DragDrop.
+         * @method isTypeOfDD
+         * @param {Object} the object to evaluate
+         * @return {boolean} true if typeof oDD = DragDrop
+         * @static
+         */
+        isTypeOfDD: function (oDD) {
+            return (oDD && oDD.__ygDragDrop);
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop handle for the given Drag Drop object.
+         * @method isHandle
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop handle, false
+         * otherwise
+         * @static
+         */
+        isHandle: function(sDDId, sHandleId) {
+            return ( this.handleIds[sDDId] &&
+                            this.handleIds[sDDId][sHandleId] );
+        },
+
+        /**
+         * Returns the DragDrop instance for a given id
+         * @method getDDById
+         * @param {String} id the id of the DragDrop object
+         * @return {DragDrop} the drag drop object, null if it is not found
+         * @static
+         */
+        getDDById: function(id) {
+            for (var i in this.ids) {
+                if (this.ids[i][id]) {
+                    return this.ids[i][id];
+                }
+            }
+            return null;
+        },
+
+        /**
+         * Fired after a registered DragDrop object gets the mousedown event.
+         * Sets up the events required to track the object being dragged
+         * @method handleMouseDown
+         * @param {Event} e the event
+         * @param oDD the DragDrop object being dragged
+         * @private
+         * @static
+         */
+        handleMouseDown: function(e, oDD) {
+            if(Ext.QuickTips){
+                Ext.QuickTips.disable();
+            }
+            if(this.dragCurrent){
+                // the original browser mouseup wasn't handled (e.g. outside FF browser window)
+                // so clean up first to avoid breaking the next drag
+                this.handleMouseUp(e);
+            }
+            
+            this.currentTarget = e.getTarget();
+            this.dragCurrent = oDD;
+
+            var el = oDD.getEl();
+
+            // track start position
+            this.startX = e.getPageX();
+            this.startY = e.getPageY();
+
+            this.deltaX = this.startX - el.offsetLeft;
+            this.deltaY = this.startY - el.offsetTop;
+
+            this.dragThreshMet = false;
+
+            this.clickTimeout = setTimeout(
+                    function() {
+                        var DDM = Ext.dd.DDM;
+                        DDM.startDrag(DDM.startX, DDM.startY);
+                    },
+                    this.clickTimeThresh );
+        },
+
+        /**
+         * Fired when either the drag pixel threshol or the mousedown hold
+         * time threshold has been met.
+         * @method startDrag
+         * @param x {int} the X position of the original mousedown
+         * @param y {int} the Y position of the original mousedown
+         * @static
+         */
+        startDrag: function(x, y) {
+            clearTimeout(this.clickTimeout);
+            if (this.dragCurrent) {
+                this.dragCurrent.b4StartDrag(x, y);
+                this.dragCurrent.startDrag(x, y);
+            }
+            this.dragThreshMet = true;
+        },
+
+        /**
+         * Internal function to handle the mouseup event.  Will be invoked
+         * from the context of the document.
+         * @method handleMouseUp
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseUp: function(e) {
+
+            if(Ext.QuickTips){
+                Ext.QuickTips.enable();
+            }
+            if (! this.dragCurrent) {
+                return;
+            }
+
+            clearTimeout(this.clickTimeout);
+
+            if (this.dragThreshMet) {
+                this.fireEvents(e, true);
+            } else {
+            }
+
+            this.stopDrag(e);
+
+            this.stopEvent(e);
+        },
+
+        /**
+         * Utility to stop event propagation and event default, if these
+         * features are turned on.
+         * @method stopEvent
+         * @param {Event} e the event as returned by this.getEvent()
+         * @static
+         */
+        stopEvent: function(e){
+            if(this.stopPropagation) {
+                e.stopPropagation();
+            }
+
+            if (this.preventDefault) {
+                e.preventDefault();
+            }
+        },
+
+        /**
+         * Internal function to clean up event handlers after the drag
+         * operation is complete
+         * @method stopDrag
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        stopDrag: function(e) {
+            // Fire the drag end event for the item that was dragged
+            if (this.dragCurrent) {
+                if (this.dragThreshMet) {
+                    this.dragCurrent.b4EndDrag(e);
+                    this.dragCurrent.endDrag(e);
+                }
+
+                this.dragCurrent.onMouseUp(e);
+            }
+
+            this.dragCurrent = null;
+            this.dragOvers = {};
+        },
+
+        /**
+         * Internal function to handle the mousemove event.  Will be invoked
+         * from the context of the html element.
+         *
+         * @TODO figure out what we can do about mouse events lost when the
+         * user drags objects beyond the window boundary.  Currently we can
+         * detect this in internet explorer by verifying that the mouse is
+         * down during the mousemove event.  Firefox doesn't give us the
+         * button state on the mousemove event.
+         * @method handleMouseMove
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseMove: function(e) {
+            if (! this.dragCurrent) {
+                return true;
+            }
+            // var button = e.which || e.button;
+
+            // check for IE mouseup outside of page boundary
+            if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) {
+                this.stopEvent(e);
+                return this.handleMouseUp(e);
+            }
+
+            if (!this.dragThreshMet) {
+                var diffX = Math.abs(this.startX - e.getPageX());
+                var diffY = Math.abs(this.startY - e.getPageY());
+                if (diffX > this.clickPixelThresh ||
+                            diffY > this.clickPixelThresh) {
+                    this.startDrag(this.startX, this.startY);
+                }
+            }
+
+            if (this.dragThreshMet) {
+                this.dragCurrent.b4Drag(e);
+                this.dragCurrent.onDrag(e);
+                if(!this.dragCurrent.moveOnly){
+                    this.fireEvents(e, false);
+                }
+            }
+
+            this.stopEvent(e);
+
+            return true;
+        },
+
+        /**
+         * Iterates over all of the DragDrop elements to find ones we are
+         * hovering over or dropping on
+         * @method fireEvents
+         * @param {Event} e the event
+         * @param {boolean} isDrop is this a drop op or a mouseover op?
+         * @private
+         * @static
+         */
+        fireEvents: function(e, isDrop) {
+            var dc = this.dragCurrent;
+
+            // If the user did the mouse up outside of the window, we could
+            // get here even though we have ended the drag.
+            if (!dc || dc.isLocked()) {
+                return;
+            }
+
+            var pt = e.getPoint();
+
+            // cache the previous dragOver array
+            var oldOvers = [];
+
+            var outEvts   = [];
+            var overEvts  = [];
+            var dropEvts  = [];
+            var enterEvts = [];
+
+            // Check to see if the object(s) we were hovering over is no longer
+            // being hovered over so we can fire the onDragOut event
+            for (var i in this.dragOvers) {
+
+                var ddo = this.dragOvers[i];
+
+                if (! this.isTypeOfDD(ddo)) {
+                    continue;
+                }
+
+                if (! this.isOverTarget(pt, ddo, this.mode)) {
+                    outEvts.push( ddo );
+                }
+
+                oldOvers[i] = true;
+                delete this.dragOvers[i];
+            }
+
+            for (var sGroup in dc.groups) {
+
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+
+                for (i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+
+                    if (oDD.isTarget && !oDD.isLocked() && ((oDD != dc) || (dc.ignoreSelf === false))) {
+                        if (this.isOverTarget(pt, oDD, this.mode)) {
+                            // look for drop interactions
+                            if (isDrop) {
+                                dropEvts.push( oDD );
+                            // look for drag enter and drag over interactions
+                            } else {
+
+                                // initial drag over: dragEnter fires
+                                if (!oldOvers[oDD.id]) {
+                                    enterEvts.push( oDD );
+                                // subsequent drag overs: dragOver fires
+                                } else {
+                                    overEvts.push( oDD );
+                                }
+
+                                this.dragOvers[oDD.id] = oDD;
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (this.mode) {
+                if (outEvts.length) {
+                    dc.b4DragOut(e, outEvts);
+                    dc.onDragOut(e, outEvts);
+                }
+
+                if (enterEvts.length) {
+                    dc.onDragEnter(e, enterEvts);
+                }
+
+                if (overEvts.length) {
+                    dc.b4DragOver(e, overEvts);
+                    dc.onDragOver(e, overEvts);
+                }
+
+                if (dropEvts.length) {
+                    dc.b4DragDrop(e, dropEvts);
+                    dc.onDragDrop(e, dropEvts);
+                }
+
+            } else {
+                // fire dragout events
+                var len = 0;
+                for (i=0, len=outEvts.length; i<len; ++i) {
+                    dc.b4DragOut(e, outEvts[i].id);
+                    dc.onDragOut(e, outEvts[i].id);
+                }
+
+                // fire enter events
+                for (i=0,len=enterEvts.length; i<len; ++i) {
+                    // dc.b4DragEnter(e, oDD.id);
+                    dc.onDragEnter(e, enterEvts[i].id);
+                }
+
+                // fire over events
+                for (i=0,len=overEvts.length; i<len; ++i) {
+                    dc.b4DragOver(e, overEvts[i].id);
+                    dc.onDragOver(e, overEvts[i].id);
+                }
+
+                // fire drop events
+                for (i=0, len=dropEvts.length; i<len; ++i) {
+                    dc.b4DragDrop(e, dropEvts[i].id);
+                    dc.onDragDrop(e, dropEvts[i].id);
+                }
+
+            }
+
+            // notify about a drop that did not find a target
+            if (isDrop && !dropEvts.length) {
+                dc.onInvalidDrop(e);
+            }
+
+        },
+
+        /**
+         * Helper function for getting the best match from the list of drag
+         * and drop objects returned by the drag and drop events when we are
+         * in INTERSECT mode.  It returns either the first object that the
+         * cursor is over, or the object that has the greatest overlap with
+         * the dragged element.
+         * @method getBestMatch
+         * @param  {DragDrop[]} dds The array of drag and drop objects
+         * targeted
+         * @return {DragDrop}       The best single match
+         * @static
+         */
+        getBestMatch: function(dds) {
+            var winner = null;
+            // Return null if the input is not what we expect
+            //if (!dds || !dds.length || dds.length == 0) {
+               // winner = null;
+            // If there is only one item, it wins
+            //} else if (dds.length == 1) {
+
+            var len = dds.length;
+
+            if (len == 1) {
+                winner = dds[0];
+            } else {
+                // Loop through the targeted items
+                for (var i=0; i<len; ++i) {
+                    var dd = dds[i];
+                    // If the cursor is over the object, it wins.  If the
+                    // cursor is over multiple matches, the first one we come
+                    // to wins.
+                    if (dd.cursorIsOver) {
+                        winner = dd;
+                        break;
+                    // Otherwise the object with the most overlap wins
+                    } else {
+                        if (!winner ||
+                            winner.overlap.getArea() < dd.overlap.getArea()) {
+                            winner = dd;
+                        }
+                    }
+                }
+            }
+
+            return winner;
+        },
+
+        /**
+         * Refreshes the cache of the top-left and bottom-right points of the
+         * drag and drop objects in the specified group(s).  This is in the
+         * format that is stored in the drag and drop instance, so typical
+         * usage is:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache(ddinstance.groups);
+         * </code>
+         * Alternatively:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true});
+         * </code>
+         * @TODO this really should be an indexed array.  Alternatively this
+         * method could accept both.
+         * @method refreshCache
+         * @param {Object} groups an associative array of groups to refresh
+         * @static
+         */
+        refreshCache: function(groups) {
+            for (var sGroup in groups) {
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+                for (var i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+
+                    if (this.isTypeOfDD(oDD)) {
+                    // if (this.isTypeOfDD(oDD) && oDD.isTarget) {
+                        var loc = this.getLocation(oDD);
+                        if (loc) {
+                            this.locationCache[oDD.id] = loc;
+                        } else {
+                            delete this.locationCache[oDD.id];
+                            // this will unregister the drag and drop object if
+                            // the element is not in a usable state
+                            // oDD.unreg();
+                        }
+                    }
+                }
+            }
+        },
+
+        /**
+         * This checks to make sure an element exists and is in the DOM.  The
+         * main purpose is to handle cases where innerHTML is used to remove
+         * drag and drop objects from the DOM.  IE provides an 'unspecified
+         * error' when trying to access the offsetParent of such an element
+         * @method verifyEl
+         * @param {HTMLElement} el the element to check
+         * @return {boolean} true if the element looks usable
+         * @static
+         */
+        verifyEl: function(el) {
+            if (el) {
+                var parent;
+                if(Ext.isIE){
+                    try{
+                        parent = el.offsetParent;
+                    }catch(e){}
+                }else{
+                    parent = el.offsetParent;
+                }
+                if (parent) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * Returns a Region object containing the drag and drop element's position
+         * and size, including the padding configured for it
+         * @method getLocation
+         * @param {DragDrop} oDD the drag and drop object to get the
+         *                       location for
+         * @return {Ext.lib.Region} a Region object representing the total area
+         *                             the element occupies, including any padding
+         *                             the instance is configured for.
+         * @static
+         */
+        getLocation: function(oDD) {
+            if (! this.isTypeOfDD(oDD)) {
+                return null;
+            }
+
+            var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
+
+            try {
+                pos= Ext.lib.Dom.getXY(el);
+            } catch (e) { }
+
+            if (!pos) {
+                return null;
+            }
+
+            x1 = pos[0];
+            x2 = x1 + el.offsetWidth;
+            y1 = pos[1];
+            y2 = y1 + el.offsetHeight;
+
+            t = y1 - oDD.padding[0];
+            r = x2 + oDD.padding[1];
+            b = y2 + oDD.padding[2];
+            l = x1 - oDD.padding[3];
+
+            return new Ext.lib.Region( t, r, b, l );
+        },
+
+        /**
+         * Checks the cursor location to see if it over the target
+         * @method isOverTarget
+         * @param {Ext.lib.Point} pt The point to evaluate
+         * @param {DragDrop} oTarget the DragDrop object we are inspecting
+         * @return {boolean} true if the mouse is over the target
+         * @private
+         * @static
+         */
+        isOverTarget: function(pt, oTarget, intersect) {
+            // use cache if available
+            var loc = this.locationCache[oTarget.id];
+            if (!loc || !this.useCache) {
+                loc = this.getLocation(oTarget);
+                this.locationCache[oTarget.id] = loc;
+
+            }
+
+            if (!loc) {
+                return false;
+            }
+
+            oTarget.cursorIsOver = loc.contains( pt );
+
+            // DragDrop is using this as a sanity check for the initial mousedown
+            // in this case we are done.  In POINT mode, if the drag obj has no
+            // contraints, we are also done. Otherwise we need to evaluate the
+            // location of the target as related to the actual location of the
+            // dragged element.
+            var dc = this.dragCurrent;
+            if (!dc || !dc.getTargetCoord ||
+                    (!intersect && !dc.constrainX && !dc.constrainY)) {
+                return oTarget.cursorIsOver;
+            }
+
+            oTarget.overlap = null;
+
+            // Get the current location of the drag element, this is the
+            // location of the mouse event less the delta that represents
+            // where the original mousedown happened on the element.  We
+            // need to consider constraints and ticks as well.
+            var pos = dc.getTargetCoord(pt.x, pt.y);
+
+            var el = dc.getDragEl();
+            var curRegion = new Ext.lib.Region( pos.y,
+                                                   pos.x + el.offsetWidth,
+                                                   pos.y + el.offsetHeight,
+                                                   pos.x );
+
+            var overlap = curRegion.intersect(loc);
+
+            if (overlap) {
+                oTarget.overlap = overlap;
+                return (intersect) ? true : oTarget.cursorIsOver;
+            } else {
+                return false;
+            }
+        },
+
+        /**
+         * unload event handler
+         * @method _onUnload
+         * @private
+         * @static
+         */
+        _onUnload: function(e, me) {
+            Ext.dd.DragDropMgr.unregAll();
+        },
+
+        /**
+         * Cleans up the drag and drop events and objects.
+         * @method unregAll
+         * @private
+         * @static
+         */
+        unregAll: function() {
+
+            if (this.dragCurrent) {
+                this.stopDrag();
+                this.dragCurrent = null;
+            }
+
+            this._execOnAll("unreg", []);
+
+            for (var i in this.elementCache) {
+                delete this.elementCache[i];
+            }
+
+            this.elementCache = {};
+            this.ids = {};
+        },
+
+        /**
+         * A cache of DOM elements
+         * @property elementCache
+         * @private
+         * @static
+         */
+        elementCache: {},
+
+        /**
+         * Get the wrapper for the DOM element specified
+         * @method getElWrapper
+         * @param {String} id the id of the element to get
+         * @return {Ext.dd.DDM.ElementWrapper} the wrapped element
+         * @private
+         * @deprecated This wrapper isn't that useful
+         * @static
+         */
+        getElWrapper: function(id) {
+            var oWrapper = this.elementCache[id];
+            if (!oWrapper || !oWrapper.el) {
+                oWrapper = this.elementCache[id] =
+                    new this.ElementWrapper(Ext.getDom(id));
+            }
+            return oWrapper;
+        },
+
+        /**
+         * Returns the actual DOM element
+         * @method getElement
+         * @param {String} id the id of the elment to get
+         * @return {Object} The element
+         * @deprecated use Ext.lib.Ext.getDom instead
+         * @static
+         */
+        getElement: function(id) {
+            return Ext.getDom(id);
+        },
+
+        /**
+         * Returns the style property for the DOM element (i.e.,
+         * document.getElById(id).style)
+         * @method getCss
+         * @param {String} id the id of the elment to get
+         * @return {Object} The style property of the element
+         * @deprecated use Ext.lib.Dom instead
+         * @static
+         */
+        getCss: function(id) {
+            var el = Ext.getDom(id);
+            return (el) ? el.style : null;
+        },
+
+        /**
+         * Inner class for cached elements
+         * @class DragDropMgr.ElementWrapper
+         * @for DragDropMgr
+         * @private
+         * @deprecated
+         */
+        ElementWrapper: function(el) {
+                /**
+                 * The element
+                 * @property el
+                 */
+                this.el = el || null;
+                /**
+                 * The element id
+                 * @property id
+                 */
+                this.id = this.el && el.id;
+                /**
+                 * A reference to the style property
+                 * @property css
+                 */
+                this.css = this.el && el.style;
+            },
+
+        /**
+         * Returns the X position of an html element
+         * @method getPosX
+         * @param el the element for which to get the position
+         * @return {int} the X coordinate
+         * @for DragDropMgr
+         * @deprecated use Ext.lib.Dom.getX instead
+         * @static
+         */
+        getPosX: function(el) {
+            return Ext.lib.Dom.getX(el);
+        },
+
+        /**
+         * Returns the Y position of an html element
+         * @method getPosY
+         * @param el the element for which to get the position
+         * @return {int} the Y coordinate
+         * @deprecated use Ext.lib.Dom.getY instead
+         * @static
+         */
+        getPosY: function(el) {
+            return Ext.lib.Dom.getY(el);
+        },
+
+        /**
+         * Swap two nodes.  In IE, we use the native method, for others we
+         * emulate the IE behavior
+         * @method swapNode
+         * @param n1 the first node to swap
+         * @param n2 the other node to swap
+         * @static
+         */
+        swapNode: function(n1, n2) {
+            if (n1.swapNode) {
+                n1.swapNode(n2);
+            } else {
+                var p = n2.parentNode;
+                var s = n2.nextSibling;
+
+                if (s == n1) {
+                    p.insertBefore(n1, n2);
+                } else if (n2 == n1.nextSibling) {
+                    p.insertBefore(n2, n1);
+                } else {
+                    n1.parentNode.replaceChild(n2, n1);
+                    p.insertBefore(n1, s);
+                }
+            }
+        },
+
+        /**
+         * Returns the current scroll position
+         * @method getScroll
+         * @private
+         * @static
+         */
+        getScroll: function () {
+            var t, l, dde=document.documentElement, db=document.body;
+            if (dde && (dde.scrollTop || dde.scrollLeft)) {
+                t = dde.scrollTop;
+                l = dde.scrollLeft;
+            } else if (db) {
+                t = db.scrollTop;
+                l = db.scrollLeft;
+            } else {
+
+            }
+            return { top: t, left: l };
+        },
+
+        /**
+         * Returns the specified element style property
+         * @method getStyle
+         * @param {HTMLElement} el          the element
+         * @param {string}      styleProp   the style property
+         * @return {string} The value of the style property
+         * @deprecated use Ext.lib.Dom.getStyle
+         * @static
+         */
+        getStyle: function(el, styleProp) {
+            return Ext.fly(el).getStyle(styleProp);
+        },
+
+        /**
+         * Gets the scrollTop
+         * @method getScrollTop
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollTop: function () { return this.getScroll().top; },
+
+        /**
+         * Gets the scrollLeft
+         * @method getScrollLeft
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollLeft: function () { return this.getScroll().left; },
+
+        /**
+         * Sets the x/y position of an element to the location of the
+         * target element.
+         * @method moveToEl
+         * @param {HTMLElement} moveEl      The element to move
+         * @param {HTMLElement} targetEl    The position reference element
+         * @static
+         */
+        moveToEl: function (moveEl, targetEl) {
+            var aCoord = Ext.lib.Dom.getXY(targetEl);
+            Ext.lib.Dom.setXY(moveEl, aCoord);
+        },
+
+        /**
+         * Numeric array sort function
+         * @method numericSort
+         * @static
+         */
+        numericSort: function(a, b) { return (a - b); },
+
+        /**
+         * Internal counter
+         * @property _timeoutCount
+         * @private
+         * @static
+         */
+        _timeoutCount: 0,
+
+        /**
+         * Trying to make the load order less important.  Without this we get
+         * an error if this file is loaded before the Event Utility.
+         * @method _addListeners
+         * @private
+         * @static
+         */
+        _addListeners: function() {
+            var DDM = Ext.dd.DDM;
+            if ( Ext.lib.Event && document ) {
+                DDM._onLoad();
+            } else {
+                if (DDM._timeoutCount > 2000) {
+                } else {
+                    setTimeout(DDM._addListeners, 10);
+                    if (document && document.body) {
+                        DDM._timeoutCount += 1;
+                    }
+                }
+            }
+        },
+
+        /**
+         * Recursively searches the immediate parent and all child nodes for
+         * the handle element in order to determine wheter or not it was
+         * clicked.
+         * @method handleWasClicked
+         * @param node the html element to inspect
+         * @static
+         */
+        handleWasClicked: function(node, id) {
+            if (this.isHandle(id, node.id)) {
+                return true;
+            } else {
+                // check to see if this is a text node child of the one we want
+                var p = node.parentNode;
+
+                while (p) {
+                    if (this.isHandle(id, p.id)) {
+                        return true;
+                    } else {
+                        p = p.parentNode;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+    };
+
+}();
+
+// shorter alias, save a few bytes
+Ext.dd.DDM = Ext.dd.DragDropMgr;
+Ext.dd.DDM._addListeners();
+
+}
+
+/**
+ * @class Ext.dd.DD
+ * A DragDrop implementation where the linked element follows the
+ * mouse cursor during a drag.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the linked element
+ * @param {String} sGroup the group of related DragDrop items
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DD:
+ *                    scroll
+ */
+Ext.dd.DD = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {
+
+    /**
+     * When set to true, the utility automatically tries to scroll the browser
+     * window when a drag and drop element is dragged near the viewport boundary.
+     * Defaults to true.
+     * @property scroll
+     * @type boolean
+     */
+    scroll: true,
+
+    /**
+     * Sets the pointer offset to the distance between the linked element's top
+     * left corner and the location the element was clicked
+     * @method autoOffset
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     */
+    autoOffset: function(iPageX, iPageY) {
+        var x = iPageX - this.startPageX;
+        var y = iPageY - this.startPageY;
+        this.setDelta(x, y);
+    },
+
+    /**
+     * Sets the pointer offset.  You can call this directly to force the
+     * offset to be in a particular location (e.g., pass in 0,0 to set it
+     * to the center of the object)
+     * @method setDelta
+     * @param {int} iDeltaX the distance from the left
+     * @param {int} iDeltaY the distance from the top
+     */
+    setDelta: function(iDeltaX, iDeltaY) {
+        this.deltaX = iDeltaX;
+        this.deltaY = iDeltaY;
+    },
+
+    /**
+     * Sets the drag element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method setDragElPos
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    setDragElPos: function(iPageX, iPageY) {
+        // the first time we do this, we are going to check to make sure
+        // the element has css positioning
+
+        var el = this.getDragEl();
+        this.alignElWithMouse(el, iPageX, iPageY);
+    },
+
+    /**
+     * Sets the element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method alignElWithMouse
+     * @param {HTMLElement} el the element to move
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    alignElWithMouse: function(el, iPageX, iPageY) {
+        var oCoord = this.getTargetCoord(iPageX, iPageY);
+        var fly = el.dom ? el : Ext.fly(el, '_dd');
+        if (!this.deltaSetXY) {
+            var aCoord = [oCoord.x, oCoord.y];
+            fly.setXY(aCoord);
+            var newLeft = fly.getLeft(true);
+            var newTop  = fly.getTop(true);
+            this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ];
+        } else {
+            fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]);
+        }
+
+        this.cachePosition(oCoord.x, oCoord.y);
+        this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        return oCoord;
+    },
+
+    /**
+     * Saves the most recent position so that we can reset the constraints and
+     * tick marks on-demand.  We need to know this so that we can calculate the
+     * number of pixels the element is offset from its original position.
+     * @method cachePosition
+     * @param iPageX the current x position (optional, this just makes it so we
+     * don't have to look it up again)
+     * @param iPageY the current y position (optional, this just makes it so we
+     * don't have to look it up again)
+     */
+    cachePosition: function(iPageX, iPageY) {
+        if (iPageX) {
+            this.lastPageX = iPageX;
+            this.lastPageY = iPageY;
+        } else {
+            var aCoord = Ext.lib.Dom.getXY(this.getEl());
+            this.lastPageX = aCoord[0];
+            this.lastPageY = aCoord[1];
+        }
+    },
+
+    /**
+     * Auto-scroll the window if the dragged object has been moved beyond the
+     * visible window boundary.
+     * @method autoScroll
+     * @param {int} x the drag element's x position
+     * @param {int} y the drag element's y position
+     * @param {int} h the height of the drag element
+     * @param {int} w the width of the drag element
+     * @private
+     */
+    autoScroll: function(x, y, h, w) {
+
+        if (this.scroll) {
+            // The client height
+            var clientH = Ext.lib.Dom.getViewHeight();
+
+            // The client width
+            var clientW = Ext.lib.Dom.getViewWidth();
+
+            // The amt scrolled down
+            var st = this.DDM.getScrollTop();
+
+            // The amt scrolled right
+            var sl = this.DDM.getScrollLeft();
+
+            // Location of the bottom of the element
+            var bot = h + y;
+
+            // Location of the right of the element
+            var right = w + x;
+
+            // The distance from the cursor to the bottom of the visible area,
+            // adjusted so that we don't scroll if the cursor is beyond the
+            // element drag constraints
+            var toBot = (clientH + st - y - this.deltaY);
+
+            // The distance from the cursor to the right of the visible area
+            var toRight = (clientW + sl - x - this.deltaX);
+
+
+            // How close to the edge the cursor must be before we scroll
+            // var thresh = (document.all) ? 100 : 40;
+            var thresh = 40;
+
+            // How many pixels to scroll per autoscroll op.  This helps to reduce
+            // clunky scrolling. IE is more sensitive about this ... it needs this
+            // value to be higher.
+            var scrAmt = (document.all) ? 80 : 30;
+
+            // Scroll down if we are near the bottom of the visible page and the
+            // obj extends below the crease
+            if ( bot > clientH && toBot < thresh ) {
+                window.scrollTo(sl, st + scrAmt);
+            }
+
+            // Scroll up if the window is scrolled down and the top of the object
+            // goes above the top border
+            if ( y < st && st > 0 && y - st < thresh ) {
+                window.scrollTo(sl, st - scrAmt);
+            }
+
+            // Scroll right if the obj is beyond the right border and the cursor is
+            // near the border.
+            if ( right > clientW && toRight < thresh ) {
+                window.scrollTo(sl + scrAmt, st);
+            }
+
+            // Scroll left if the window has been scrolled to the right and the obj
+            // extends past the left border
+            if ( x < sl && sl > 0 && x - sl < thresh ) {
+                window.scrollTo(sl - scrAmt, st);
+            }
+        }
+    },
+
+    /**
+     * Finds the location the element should be placed if we want to move
+     * it to where the mouse location less the click offset would place us.
+     * @method getTargetCoord
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     * @return an object that contains the coordinates (Object.x and Object.y)
+     * @private
+     */
+    getTargetCoord: function(iPageX, iPageY) {
+
+
+        var x = iPageX - this.deltaX;
+        var y = iPageY - this.deltaY;
+
+        if (this.constrainX) {
+            if (x < this.minX) { x = this.minX; }
+            if (x > this.maxX) { x = this.maxX; }
+        }
+
+        if (this.constrainY) {
+            if (y < this.minY) { y = this.minY; }
+            if (y > this.maxY) { y = this.maxY; }
+        }
+
+        x = this.getTick(x, this.xTicks);
+        y = this.getTick(y, this.yTicks);
+
+
+        return {x:x, y:y};
+    },
+
+    /**
+     * Sets up config options specific to this class. Overrides
+     * Ext.dd.DragDrop, but all versions of this method through the
+     * inheritance chain are called
+     */
+    applyConfig: function() {
+        Ext.dd.DD.superclass.applyConfig.call(this);
+        this.scroll = (this.config.scroll !== false);
+    },
+
+    /**
+     * Event that fires prior to the onMouseDown event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4MouseDown: function(e) {
+        // this.resetConstraints();
+        this.autoOffset(e.getPageX(),
+                            e.getPageY());
+    },
+
+    /**
+     * Event that fires prior to the onDrag event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4Drag: function(e) {
+        this.setDragElPos(e.getPageX(),
+                            e.getPageY());
+    },
+
+    toString: function() {
+        return ("DD " + this.id);
+    }
+
+    //////////////////////////////////////////////////////////////////////////
+    // Debugging ygDragDrop events that can be overridden
+    //////////////////////////////////////////////////////////////////////////
+    /*
+    startDrag: function(x, y) {
+    },
+
+    onDrag: function(e) {
+    },
+
+    onDragEnter: function(e, id) {
+    },
+
+    onDragOver: function(e, id) {
+    },
+
+    onDragOut: function(e, id) {
+    },
+
+    onDragDrop: function(e, id) {
+    },
+
+    endDrag: function(e) {
+    }
+
+    */
+
+});
+/**
+ * @class Ext.dd.DDProxy
+ * A DragDrop implementation that inserts an empty, bordered div into
+ * the document that follows the cursor during drag operations.  At the time of
+ * the click, the frame div is resized to the dimensions of the linked html
+ * element, and moved to the exact location of the linked element.
+ *
+ * References to the "frame" element refer to the single proxy element that
+ * was created to be dragged in place of all DDProxy elements on the
+ * page.
+ *
+ * @extends Ext.dd.DD
+ * @constructor
+ * @param {String} id the id of the linked html element
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DDProxy in addition to those in DragDrop:
+ *                   resizeFrame, centerFrame, dragElId
+ */
+Ext.dd.DDProxy = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+        this.initFrame();
+    }
+};
+
+/**
+ * The default drag frame div id
+ * @property Ext.dd.DDProxy.dragElId
+ * @type String
+ * @static
+ */
+Ext.dd.DDProxy.dragElId = "ygddfdiv";
+
+Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
+
+    /**
+     * By default we resize the drag frame to be the same size as the element
+     * we want to drag (this is to get the frame effect).  We can turn it off
+     * if we want a different behavior.
+     * @property resizeFrame
+     * @type boolean
+     */
+    resizeFrame: true,
+
+    /**
+     * By default the frame is positioned exactly where the drag element is, so
+     * we use the cursor offset provided by Ext.dd.DD.  Another option that works only if
+     * you do not have constraints on the obj is to have the drag frame centered
+     * around the cursor.  Set centerFrame to true for this effect.
+     * @property centerFrame
+     * @type boolean
+     */
+    centerFrame: false,
+
+    /**
+     * Creates the proxy element if it does not yet exist
+     * @method createFrame
+     */
+    createFrame: function() {
+        var self = this;
+        var body = document.body;
+
+        if (!body || !body.firstChild) {
+            setTimeout( function() { self.createFrame(); }, 50 );
+            return;
+        }
+
+        var div = this.getDragEl();
+
+        if (!div) {
+            div    = document.createElement("div");
+            div.id = this.dragElId;
+            var s  = div.style;
+
+            s.position   = "absolute";
+            s.visibility = "hidden";
+            s.cursor     = "move";
+            s.border     = "2px solid #aaa";
+            s.zIndex     = 999;
+
+            // appendChild can blow up IE if invoked prior to the window load event
+            // while rendering a table.  It is possible there are other scenarios
+            // that would cause this to happen as well.
+            body.insertBefore(div, body.firstChild);
+        }
+    },
+
+    /**
+     * Initialization for the drag frame element.  Must be called in the
+     * constructor of all subclasses
+     * @method initFrame
+     */
+    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);
+    },
+
+    /**
+     * Resizes the drag frame to the dimensions of the clicked object, positions
+     * it over the object, and finally displays it
+     * @method showFrame
+     * @param {int} iPageX X click position
+     * @param {int} iPageY Y click position
+     * @private
+     */
+    showFrame: function(iPageX, iPageY) {
+        var el = this.getEl();
+        var dragEl = this.getDragEl();
+        var s = dragEl.style;
+
+        this._resizeProxy();
+
+        if (this.centerFrame) {
+            this.setDelta( Math.round(parseInt(s.width,  10)/2),
+                           Math.round(parseInt(s.height, 10)/2) );
+        }
+
+        this.setDragElPos(iPageX, iPageY);
+
+        Ext.fly(dragEl).show();
+    },
+
+    /**
+     * The proxy is automatically resized to the dimensions of the linked
+     * element when a drag is initiated, unless resizeFrame is set to false
+     * @method _resizeProxy
+     * @private
+     */
+    _resizeProxy: function() {
+        if (this.resizeFrame) {
+            var el = this.getEl();
+            Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight);
+        }
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+        this.setDragElPos(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4StartDrag: function(x, y) {
+        // show the drag frame
+        this.showFrame(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4EndDrag: function(e) {
+        Ext.fly(this.getDragEl()).hide();
+    },
+
+    // overrides Ext.dd.DragDrop
+    // By default we try to move the element to the last location of the frame.
+    // This is so that the default behavior mirrors that of Ext.dd.DD.
+    endDrag: function(e) {
+
+        var lel = this.getEl();
+        var del = this.getDragEl();
+
+        // Show the drag frame briefly so we can get its position
+        del.style.visibility = "";
+
+        this.beforeMove();
+        // Hide the linked element before the move to get around a Safari
+        // rendering bug.
+        lel.style.visibility = "hidden";
+        Ext.dd.DDM.moveToEl(lel, del);
+        del.style.visibility = "hidden";
+        lel.style.visibility = "";
+
+        this.afterDrag();
+    },
+
+    beforeMove : function(){
+
+    },
+
+    afterDrag : function(){
+
+    },
+
+    toString: function() {
+        return ("DDProxy " + this.id);
+    }
+
+});
+/**
+ * @class Ext.dd.DDTarget
+ * A DragDrop implementation that does not move, but can be a drop
+ * target.  You would get the same result by simply omitting implementation
+ * for the event callbacks, but this way we reduce the processing cost of the
+ * event listener and the callbacks.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the element that is a drop target
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                 Valid properties for DDTarget in addition to those in
+ *                 DragDrop:
+ *                    none
+ */
+Ext.dd.DDTarget = function(id, sGroup, config) {
+    if (id) {
+        this.initTarget(id, sGroup, config);
+    }
+};
+
+// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop();
+Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, {
+    toString: function() {
+        return ("DDTarget " + this.id);
+    }
+});
+/**
+ * @class Ext.dd.DragTracker
+ * @extends Ext.util.Observable
+ */
+Ext.dd.DragTracker = function(config){
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event mousedown
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousedown',
+        /**
+         * @event mouseup
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mouseup',
+        /**
+         * @event mousemove
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousemove',
+        /**
+         * @event dragstart
+         * @param {Object} this
+         * @param {Object} startXY the page coordinates of the event
+         */
+        'dragstart',
+        /**
+         * @event dragend
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'dragend',
+        /**
+         * @event drag
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        '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,  {
+    /**
+     * @cfg {Boolean} active
+	 * Defaults to <tt>false</tt>.
+	 */	
+    active: false,
+    /**
+     * @cfg {Number} tolerance
+	 * Defaults to <tt>5</tt>.
+	 */	
+    tolerance: 5,
+    /**
+     * @cfg {Boolean/Number} autoStart
+	 * Defaults to <tt>false</tt>. Specify <tt>true</tt> to defer trigger start by 1000 ms.
+	 * Specify a Number for the number of milliseconds to defer trigger start.
+	 */	
+    autoStart: false,
+
+    initEl: function(el){
+        this.el = Ext.get(el);
+        el.on('mousedown', this.onMouseDown, this,
+                this.delegate ? {delegate: this.delegate} : undefined);
+    },
+
+    destroy : function(){
+        this.el.un('mousedown', this.onMouseDown, this);
+    },
+
+    onMouseDown: function(e, target){
+        if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){
+            this.startXY = this.lastXY = e.getXY();
+            this.dragTarget = this.delegate ? target : this.el.dom;
+            if(this.preventDefault !== false){
+                e.preventDefault();
+            }
+            var doc = Ext.getDoc();
+            doc.on('mouseup', this.onMouseUp, this);
+            doc.on('mousemove', this.onMouseMove, this);
+            doc.on('selectstart', this.stopSelect, this);
+            if(this.autoStart){
+                this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this);
+            }
+        }
+    },
+
+    onMouseMove: function(e, target){
+        // HACK: IE hack to see if button was released outside of window. */
+        if(this.active && Ext.isIE && !e.browserEvent.button){
+            e.preventDefault();
+            this.onMouseUp(e);
+            return;
+        }
+
+        e.preventDefault();
+        var xy = e.getXY(), s = this.startXY;
+        this.lastXY = xy;
+        if(!this.active){
+            if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){
+                this.triggerStart();
+            }else{
+                return;
+            }
+        }
+        this.fireEvent('mousemove', this, e);
+        this.onDrag(e);
+        this.fireEvent('drag', this, e);
+    },
+
+    onMouseUp: function(e){
+        var doc = Ext.getDoc();
+        doc.un('mousemove', this.onMouseMove, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        doc.un('selectstart', this.stopSelect, this);
+        e.preventDefault();
+        this.clearStart();
+        var wasActive = this.active;
+        this.active = false;
+        delete this.elRegion;
+        this.fireEvent('mouseup', this, e);
+        if(wasActive){
+            this.onEnd(e);
+            this.fireEvent('dragend', this, e);
+        }
+    },
+
+    triggerStart: function(isTimer){
+        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(e){
+        e.stopEvent();
+        return false;
+    },
+
+    onBeforeStart : function(e){
+
+    },
+
+    onStart : function(xy){
+
+    },
+
+    onDrag : function(e){
+
+    },
+
+    onEnd : function(e){
+
+    },
+
+    getDragTarget : function(){
+        return this.dragTarget;
+    },
+
+    getDragCt : function(){
+        return this.el;
+    },
+
+    getXY : function(constrain){
+        return constrain ?
+               this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY;
+    },
+
+    getOffset : function(constrain){
+        var xy = this.getXY(constrain);
+        var s = this.startXY;
+        return [s[0]-xy[0], s[1]-xy[1]];
+    },
+
+    constrainModes: {
+        'point' : function(xy){
+
+            if(!this.elRegion){
+                this.elRegion = this.getDragCt().getRegion();
+            }
+
+            var dr = this.dragRegion;
+
+            dr.left = xy[0];
+            dr.top = xy[1];
+            dr.right = xy[0];
+            dr.bottom = xy[1];
+
+            dr.constrainTo(this.elRegion);
+
+            return [dr.left, dr.top];
+        }
+    }
+});/**
+ * @class Ext.dd.ScrollManager
+ * <p>Provides automatic scrolling of overflow regions in the page during drag operations.</p>
+ * <p>The ScrollManager configs will be used as the defaults for any scroll container registered with it,
+ * but you can also override most of the configs per scroll container by adding a 
+ * <tt>ddScrollConfig</tt> object to the target element that contains these properties: {@link #hthresh},
+ * {@link #vthresh}, {@link #increment} and {@link #frequency}.  Example usage:
+ * <pre><code>
+var el = Ext.get('scroll-ct');
+el.ddScrollConfig = {
+    vthresh: 50,
+    hthresh: -1,
+    frequency: 100,
+    increment: 200
+};
+Ext.dd.ScrollManager.register(el);
+</code></pre>
+ * <b>Note: This class uses "Point Mode" and is untested in "Intersect Mode".</b>
+ * @singleton
+ */
+Ext.dd.ScrollManager = function(){
+    var ddm = Ext.dd.DragDropMgr;
+    var els = {};
+    var dragEl = null;
+    var proc = {};
+    
+    var onStop = function(e){
+        dragEl = null;
+        clearProc();
+    };
+    
+    var triggerRefresh = function(){
+        if(ddm.dragCurrent){
+             ddm.refreshCache(ddm.dragCurrent.groups);
+        }
+    };
+    
+    var doScroll = function(){
+        if(ddm.dragCurrent){
+            var dds = Ext.dd.ScrollManager;
+            var inc = proc.el.ddScrollConfig ?
+                      proc.el.ddScrollConfig.increment : dds.increment;
+            if(!dds.animate){
+                if(proc.el.scroll(proc.dir, inc)){
+                    triggerRefresh();
+                }
+            }else{
+                proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh);
+            }
+        }
+    };
+    
+    var clearProc = function(){
+        if(proc.id){
+            clearInterval(proc.id);
+        }
+        proc.id = 0;
+        proc.el = null;
+        proc.dir = "";
+    };
+    
+    var startProc = function(el, dir){
+        clearProc();
+        proc.el = el;
+        proc.dir = dir;
+        var freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) ? 
+                el.ddScrollConfig.frequency : Ext.dd.ScrollManager.frequency;
+        proc.id = setInterval(doScroll, freq);
+    };
+    
+    var onFire = function(e, isDrop){
+        if(isDrop || !ddm.dragCurrent){ return; }
+        var dds = Ext.dd.ScrollManager;
+        if(!dragEl || dragEl != ddm.dragCurrent){
+            dragEl = ddm.dragCurrent;
+            // refresh regions on drag start
+            dds.refreshCache();
+        }
+        
+        var xy = Ext.lib.Event.getXY(e);
+        var pt = new Ext.lib.Point(xy[0], xy[1]);
+        for(var id in els){
+            var el = els[id], r = el._region;
+            var c = el.ddScrollConfig ? el.ddScrollConfig : dds;
+            if(r && r.contains(pt) && el.isScrollable()){
+                if(r.bottom - pt.y <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "down");
+                    }
+                    return;
+                }else if(r.right - pt.x <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "left");
+                    }
+                    return;
+                }else if(pt.y - r.top <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "up");
+                    }
+                    return;
+                }else if(pt.x - r.left <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "right");
+                    }
+                    return;
+                }
+            }
+        }
+        clearProc();
+    };
+    
+    ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm);
+    ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm);
+    
+    return {
+        /**
+         * Registers new overflow element(s) to auto scroll
+         * @param {Mixed/Array} el The id of or the element to be scrolled or an array of either
+         */
+        register : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.register(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                els[el.id] = el;
+            }
+        },
+        
+        /**
+         * Unregisters overflow element(s) so they are no longer scrolled
+         * @param {Mixed/Array} el The id of or the element to be removed or an array of either
+         */
+        unregister : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.unregister(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                delete els[el.id];
+            }
+        },
+        
+        /**
+         * The number of pixels from the top or bottom edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        vthresh : 25,
+        /**
+         * The number of pixels from the right or left edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        hthresh : 25,
+
+        /**
+         * The number of pixels to scroll in each scroll increment (defaults to 50)
+         * @type Number
+         */
+        increment : 100,
+        
+        /**
+         * The frequency of scrolls in milliseconds (defaults to 500)
+         * @type Number
+         */
+        frequency : 500,
+        
+        /**
+         * True to animate the scroll (defaults to true)
+         * @type Boolean
+         */
+        animate: true,
+        
+        /**
+         * The animation duration in seconds - 
+         * MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4)
+         * @type Number
+         */
+        animDuration: .4,
+        
+        /**
+         * Manually trigger a cache refresh.
+         */
+        refreshCache : function(){
+            for(var id in els){
+                if(typeof els[id] == 'object'){ // for people extending the object prototype
+                    els[id]._region = els[id].getRegion();
+                }
+            }
+        }
+    };
+}();/**
+ * @class Ext.dd.Registry
+ * Provides easy access to all drag drop components that are registered on a page.  Items can be retrieved either
+ * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.
+ * @singleton
+ */
+Ext.dd.Registry = function(){
+    var elements = {}; 
+    var handles = {}; 
+    var autoIdSeed = 0;
+
+    var getId = function(el, autogen){
+        if(typeof el == "string"){
+            return el;
+        }
+        var id = el.id;
+        if(!id && autogen !== false){
+            id = "extdd-" + (++autoIdSeed);
+            el.id = id;
+        }
+        return id;
+    };
+    
+    return {
+    /**
+     * Resgister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to register
+     * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved
+     * in drag drop operations.  You can populate this object with any arbitrary properties that your own code
+     * knows how to interpret, plus there are some specific properties known to the Registry that should be
+     * populated in the data object (if applicable):
+     * <pre>
+Value      Description<br />
+---------  ------------------------------------------<br />
+handles    Array of DOM nodes that trigger dragging<br />
+           for the element being registered<br />
+isHandle   True if the element passed in triggers<br />
+           dragging itself, else false
+</pre>
+     */
+        register : function(el, data){
+            data = data || {};
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            data.ddel = el;
+            elements[getId(el)] = data;
+            if(data.isHandle !== false){
+                handles[data.ddel.id] = data;
+            }
+            if(data.handles){
+                var hs = data.handles;
+                for(var i = 0, len = hs.length; i < len; i++){
+                	handles[getId(hs[i])] = data;
+                }
+            }
+        },
+
+    /**
+     * Unregister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to unregister
+     */
+        unregister : function(el){
+            var id = getId(el, false);
+            var data = elements[id];
+            if(data){
+                delete elements[id];
+                if(data.handles){
+                    var hs = data.handles;
+                    for(var i = 0, len = hs.length; i < len; i++){
+                    	delete handles[getId(hs[i], false)];
+                    }
+                }
+            }
+        },
+
+    /**
+     * Returns the handle registered for a DOM Node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} handle The custom handle data
+     */
+        getHandle : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return handles[id];
+        },
+
+    /**
+     * Returns the handle that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} handle The custom handle data
+     */
+        getHandleFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? handles[t.id] : null;
+        },
+
+    /**
+     * Returns a custom data object that is registered for a DOM node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} data The custom data
+     */
+        getTarget : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return elements[id];
+        },
+
+    /**
+     * Returns a custom data object that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+        getTargetFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? elements[t.id] || handles[t.id] : null;
+        }
+    };
+}();/**
+ * @class Ext.dd.StatusProxy
+ * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair.  This is the
+ * default drag proxy used by all Ext.dd components.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.dd.StatusProxy = function(config){
+    Ext.apply(this, config);
+    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: !config || config.shadow !== false
+    });
+    this.ghost = Ext.get(this.el.dom.childNodes[1]);
+    this.dropStatus = this.dropNotAllowed;
+};
+
+Ext.dd.StatusProxy.prototype = {
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Updates the proxy's visual element to indicate the status of whether or not drop is allowed
+     * over the current target element.
+     * @param {String} cssClass The css class for the new drop status indicator image
+     */
+    setStatus : function(cssClass){
+        cssClass = cssClass || this.dropNotAllowed;
+        if(this.dropStatus != cssClass){
+            this.el.replaceClass(this.dropStatus, cssClass);
+            this.dropStatus = cssClass;
+        }
+    },
+
+    /**
+     * Resets the status indicator to the default dropNotAllowed value
+     * @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it
+     */
+    reset : function(clearGhost){
+        this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed;
+        this.dropStatus = this.dropNotAllowed;
+        if(clearGhost){
+            this.ghost.update("");
+        }
+    },
+
+    /**
+     * Updates the contents of the ghost element
+     * @param {String/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a
+     * DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first).
+     */
+    update : function(html){
+        if(typeof html == "string"){
+            this.ghost.update(html);
+        }else{
+            this.ghost.update("");
+            html.style.margin = "0";
+            this.ghost.dom.appendChild(html);
+        }
+        var el = this.ghost.dom.firstChild; 
+        if(el){
+            Ext.fly(el).setStyle('float', 'none');
+        }
+    },
+
+    /**
+     * Returns the underlying proxy {@link Ext.Layer}
+     * @return {Ext.Layer} el
+    */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the ghost element
+     * @return {Ext.Element} el
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Hides the proxy
+     * @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them
+     */
+    hide : function(clear){
+        this.el.hide();
+        if(clear){
+            this.reset(true);
+        }
+    },
+
+    /**
+     * Stops the repair animation if it's currently running
+     */
+    stop : function(){
+        if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){
+            this.anim.stop();
+        }
+    },
+
+    /**
+     * Displays this proxy
+     */
+    show : function(){
+        this.el.show();
+    },
+
+    /**
+     * Force the Layer to sync its shadow and shim positions to the element
+     */
+    sync : function(){
+        this.el.sync();
+    },
+
+    /**
+     * Causes the proxy to return to its position of origin via an animation.  Should be called after an
+     * invalid drop operation by the item being dragged.
+     * @param {Array} xy The XY position of the element ([x, y])
+     * @param {Function} callback The function to call after the repair is complete
+     * @param {Object} scope The scope in which to execute the callback
+     */
+    repair : function(xy, callback, scope){
+        this.callback = callback;
+        this.scope = scope;
+        if(xy && this.animRepair !== false){
+            this.el.addClass("x-dd-drag-repair");
+            this.el.hideUnders(true);
+            this.anim = this.el.shift({
+                duration: this.repairDuration || .5,
+                easing: 'easeOut',
+                xy: xy,
+                stopFx: true,
+                callback: this.afterRepair,
+                scope: this
+            });
+        }else{
+            this.afterRepair();
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        this.hide(true);
+        if(typeof this.callback == "function"){
+            this.callback.call(this.scope || this);
+        }
+        this.callback = null;
+        this.scope = null;
+    }
+};/**
+ * @class Ext.dd.DragSource
+ * @extends Ext.dd.DDProxy
+ * A simple class that provides the basic implementation needed to make any element draggable.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragSource = function(el, config){
+    this.el = Ext.get(el);
+    if(!this.dragData){
+        this.dragData = {};
+    }
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Returns the data object associated with this drag source
+     * @return {Object} data An object containing arbitrary data
+     */
+    getDragData : function(e){
+        return this.dragData;
+    },
+
+    // private
+    onDragEnter : function(e, id){
+        var target = Ext.dd.DragDropMgr.getDDById(id);
+        this.cachedTarget = target;
+        if(this.beforeDragEnter(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyEnter(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }else{
+                this.proxy.setStatus(this.dropAllowed);
+            }
+            
+            if(this.afterDragEnter){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * when the dragged item enters the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragEnter
+                 */
+                this.afterDragEnter(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * before the dragged item enters the drop target and optionally cancel the onDragEnter.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragEnter : function(target, e, id){
+        return true;
+    },
+
+    // private
+    alignElWithMouse: function() {
+        Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments);
+        this.proxy.sync();
+    },
+
+    // private
+    onDragOver : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOver(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyOver(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }
+
+            if(this.afterDragOver){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * while the dragged item is over the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOver
+                 */
+                this.afterDragOver(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * while the dragged item is over the drop target and optionally cancel the onDragOver.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOver : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onDragOut : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOut(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                target.notifyOut(this, e, this.dragData);
+            }
+            this.proxy.reset();
+            if(this.afterDragOut){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after the dragged item is dragged out of the target without dropping.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOut
+                 */
+                this.afterDragOut(target, e, id);
+            }
+        }
+        this.cachedTarget = null;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dragged out of the target without dropping, and optionally cancel the onDragOut.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOut : function(target, e, id){
+        return true;
+    },
+    
+    // private
+    onDragDrop : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragDrop(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                if(target.notifyDrop(this, e, this.dragData)){ // valid drop?
+                    this.onValidDrop(target, e, id);
+                }else{
+                    this.onInvalidDrop(target, e, id);
+                }
+            }else{
+                this.onValidDrop(target, e, id);
+            }
+            
+            if(this.afterDragDrop){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after a valid drag drop has occurred by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dropped element
+                 * @method afterDragDrop
+                 */
+                this.afterDragDrop(target, e, id);
+            }
+        }
+        delete this.cachedTarget;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dropped onto the target and optionally cancel the onDragDrop.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag drop event is valid, else false to cancel
+     */
+    beforeDragDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onValidDrop : function(target, e, id){
+        this.hideProxy();
+        if(this.afterValidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after a valid drop has occurred by providing an implementation.
+             * @param {Object} target The target DD 
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterValidDrop(target, e, id);
+        }
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return this.el.getXY();  
+    },
+
+    // private
+    onInvalidDrop : function(target, e, id){
+        this.beforeInvalidDrop(target, e, id);
+        if(this.cachedTarget){
+            if(this.cachedTarget.isNotifyTarget){
+                this.cachedTarget.notifyOut(this, e, this.dragData);
+            }
+            this.cacheTarget = null;
+        }
+        this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this);
+
+        if(this.afterInvalidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after an invalid drop has occurred by providing an implementation.
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterInvalidDrop(e, id);
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        if(Ext.enableFx){
+            this.el.highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action after an invalid
+     * drop has occurred.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the invalid drop should proceed, else false to cancel
+     */
+    beforeInvalidDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    handleMouseDown : function(e){
+        if(this.dragging) {
+            return;
+        }
+        var data = this.getDragData(e);
+        if(data && this.onBeforeDrag(data, e) !== false){
+            this.dragData = data;
+            this.proxy.stop();
+            Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments);
+        } 
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the initial
+     * drag event begins and optionally cancel it.
+     * @param {Object} data An object containing arbitrary data to be shared with drop targets
+     * @param {Event} e The event object
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    onBeforeDrag : function(data, e){
+        return true;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action once the initial
+     * drag event has begun.  The drag cannot be canceled from this function.
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     */
+    onStartDrag : Ext.emptyFn,
+
+    // private override
+    startDrag : function(x, y){
+        this.proxy.reset();
+        this.dragging = true;
+        this.proxy.update("");
+        this.onInitDrag(x, y);
+        this.proxy.show();
+    },
+
+    // private
+    onInitDrag : function(x, y){
+        var clone = this.el.dom.cloneNode(true);
+        clone.id = Ext.id(); // prevent duplicate ids
+        this.proxy.update(clone);
+        this.onStartDrag(x, y);
+        return true;
+    },
+
+    /**
+     * Returns the drag source's underlying {@link Ext.dd.StatusProxy}
+     * @return {Ext.dd.StatusProxy} proxy The StatusProxy
+     */
+    getProxy : function(){
+        return this.proxy;  
+    },
+
+    /**
+     * Hides the drag source's {@link Ext.dd.StatusProxy}
+     */
+    hideProxy : function(){
+        this.proxy.hide();  
+        this.proxy.reset(true);
+        this.dragging = false;
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    },
+
+    // private - override to prevent hiding
+    b4EndDrag: function(e) {
+    },
+
+    // private - override to prevent moving
+    endDrag : function(e){
+        this.onEndDrag(this.dragData, e);
+    },
+
+    // private
+    onEndDrag : function(data, e){
+    },
+    
+    // private - pin to cursor
+    autoOffset : function(x, y) {
+        this.setDelta(-12, -20);
+    }    
+});/**
+ * @class Ext.dd.DropTarget
+ * @extends Ext.dd.DDTarget
+ * A simple class that provides the basic implementation needed to make any element a drop target that can have
+ * draggable items dropped onto it.  The drop has no effect until an implementation of notifyDrop is provided.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropTarget = function(el, config){
+    this.el = Ext.get(el);
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} overClass
+     * The CSS class applied to the drop target element while the drag source is over it (defaults to "").
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    // private
+    isTarget : true,
+
+    // private
+    isNotifyTarget : true,
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source is now over the
+     * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
+     * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        if(this.overClass){
+            this.el.addClass(this.overClass);
+        }
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the target.
+     * This method will be called on every mouse movement while the drag source is over the drop target.
+     * This default implementation simply returns the dropAllowed config value.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source has been dragged
+     * out of the target without dropping.  This default implementation simply removes the CSS class specified by
+     * overClass (if any) from the drop element.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    notifyOut : function(dd, e, data){
+        if(this.overClass){
+            this.el.removeClass(this.overClass);
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the dragged item has
+     * been dropped on it.  This method has no default implementation and returns false, so you must provide an
+     * implementation that does something to process the drop event and returns true so that the drag source's
+     * repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        return false;
+    }
+});/**
+ * @class Ext.dd.DragZone
+ * @extends Ext.dd.DragSource
+ * <p>This class provides a container DD instance that allows dragging of multiple child source nodes.</p>
+ * <p>This class does not move the drag target nodes, but a proxy element which may contain
+ * any DOM structure you wish. The DOM element to show in the proxy is provided by either a
+ * provided implementation of {@link #getDragData}, or by registered draggables registered with {@link Ext.dd.Registry}</p>
+ * <p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some
+ * application object (For example nodes in a {@link Ext.DataView DataView}) then use of this class
+ * is the most efficient way to "activate" those nodes.</p>
+ * <p>By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DragZone to manage any number of draggable elements is to configure
+ * the DragZone with  an implementation of the {@link #getDragData} method which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector. For example, to make the nodes of a DataView draggable, use the following
+ * technique. Knowledge of the use of the DataView is required:</p><pre><code>
+myDataView.on('render', function() {
+    myDataView.dragZone = new Ext.dd.DragZone(myDataView.getEl(), {
+
+//      On receipt of a mousedown event, see if it is within a DataView node.
+//      Return a drag data object if so.
+        getDragData: function(e) {
+
+//          Use the DataView's own itemSelector (a mandatory property) to
+//          test if the mousedown is within one of the DataView's nodes.
+            var sourceEl = e.getTarget(myDataView.itemSelector, 10);
+
+//          If the mousedown is within a DataView node, clone the node to produce
+//          a ddel element for use by the drag proxy. Also add application data
+//          to the returned data object.
+            if (sourceEl) {
+                d = sourceEl.cloneNode(true);
+                d.id = Ext.id();
+                return {
+                    ddel: d,
+                    sourceEl: sourceEl,
+                    repairXY: Ext.fly(sourceEl).getXY(),
+                    sourceStore: myDataView.store,
+                    draggedRecord: v.getRecord(sourceEl)
+                }
+            }
+        },
+
+//      Provide coordinates for the proxy to slide back to on failed drag.
+//      This is the original XY coordinates of the draggable element captured
+//      in the getDragData method.
+        getRepairXY: function() {
+            return this.dragData.repairXY;
+        }
+    });
+});</code></pre>
+ * See the {@link Ext.dd.DropZone DropZone} documentation for details about building a DropZone which
+ * cooperates with this DragZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragZone = function(el, config){
+    Ext.dd.DragZone.superclass.constructor.call(this, el, config);
+    if(this.containerScroll){
+        Ext.dd.ScrollManager.register(this.el);
+    }
+};
+
+Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, {
+    /**
+     * This property contains the data representing the dragged object. This data is set up by the implementation
+     * of the {@link #getDragData} method. It must contain a <tt>ddel</tt> property, but can contain
+     * any other data according to the application's needs.
+     * @type Object
+     * @property dragData
+     */
+    /**
+     * @cfg {Boolean} containerScroll True to register this container with the Scrollmanager
+     * for auto scrolling during drag operations.
+     */
+    /**
+     * @cfg {String} hlColor The color to use when visually highlighting the drag source in the afterRepair
+     * method after a failed drop (defaults to "c3daf9" - light blue)
+     */
+
+    /**
+     * Called when a mousedown occurs in this container. Looks in {@link Ext.dd.Registry}
+     * for a valid target to drag based on the mouse down. Override this method
+     * to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned
+     * object has a "ddel" attribute (with an HTML Element) for other functions to work.
+     * @param {EventObject} e The mouse down event
+     * @return {Object} The dragData
+     */
+    getDragData : function(e){
+        return Ext.dd.Registry.getHandleFromEvent(e);
+    },
+    
+    /**
+     * Called once drag threshold has been reached to initialize the proxy element. By default, it clones the
+     * this.dragData.ddel
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     * @return {Boolean} true to continue the drag, false to cancel
+     */
+    onInitDrag : function(x, y){
+        this.proxy.update(this.dragData.ddel.cloneNode(true));
+        this.onStartDrag(x, y);
+        return true;
+    },
+    
+    /**
+     * Called after a repair of an invalid drop. By default, highlights this.dragData.ddel 
+     */
+    afterRepair : function(){
+        if(Ext.enableFx){
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * Called before a repair of an invalid drop to get the XY to animate to. By default returns
+     * the XY of this.dragData.ddel
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e){
+        return Ext.Element.fly(this.dragData.ddel).getXY();  
+    }
+});/**
+ * @class Ext.dd.DropZone
+ * @extends Ext.dd.DropTarget
+ * <p>This class provides a container DD instance that allows dropping on multiple child target nodes.</p>
+ * <p>By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DropZone to manage any number of target elements is to configure the
+ * DropZone with an implementation of {@link #getTargetFromEvent} which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector.</p>
+ * <p>Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over
+ * a drop target, that target is passed as the first parameter to {@link #onNodeEnter}, {@link #onNodeOver},
+ * {@link #onNodeOut}, {@link #onNodeDrop}. You may configure the instance of DropZone with implementations
+ * of these methods to provide application-specific behaviour for these events to update both
+ * application state, and UI state.</p>
+ * <p>For example to make a GridPanel a cooperating target with the example illustrated in
+ * {@link Ext.dd.DragZone DragZone}, the following technique might be used:</p><pre><code>
+myGridPanel.on('render', function() {
+    myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, {
+
+//      If the mouse is over a grid row, return that node. This is
+//      provided as the "target" parameter in all "onNodeXXXX" node event handling functions
+        getTargetFromEvent: function(e) {
+            return e.getTarget(myGridPanel.getView().rowSelector);
+        },
+
+//      On entry into a target node, highlight that node.
+        onNodeEnter : function(target, dd, e, data){ 
+            Ext.fly(target).addClass('my-row-highlight-class');
+        },
+
+//      On exit from a target node, unhighlight that node.
+        onNodeOut : function(target, dd, e, data){ 
+            Ext.fly(target).removeClass('my-row-highlight-class');
+        },
+
+//      While over a target node, return the default drop allowed class which
+//      places a "tick" icon into the drag proxy.
+        onNodeOver : function(target, dd, e, data){ 
+            return Ext.dd.DropZone.prototype.dropAllowed;
+        },
+
+//      On node drop we can interrogate the target to find the underlying
+//      application object that is the real target of the dragged data.
+//      In this case, it is a Record in the GridPanel's Store.
+//      We can use the data set up by the DragZone's getDragData method to read
+//      any data we decided to attach in the DragZone's getDragData method.
+        onNodeDrop : function(target, dd, e, data){
+            var rowIndex = myGridPanel.getView().findRowIndex(target);
+            var r = myGridPanel.getStore().getAt(rowIndex);
+            Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id +
+                ' on Record id ' + r.id);
+            return true;
+        }
+    });
+}
+</code></pre>
+ * See the {@link Ext.dd.DragZone DragZone} documentation for details about building a DragZone which
+ * cooperates with this DropZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropZone = function(el, config){
+    Ext.dd.DropZone.superclass.constructor.call(this, el, config);
+};
+
+Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
+    /**
+     * Returns a custom data object associated with the DOM node that is the target of the event.  By default
+     * this looks up the event target in the {@link Ext.dd.Registry}, although you can override this method to
+     * provide your own custom lookup.
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+    getTargetFromEvent : function(e){
+        return Ext.dd.Registry.getTargetFromEvent(e);
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from 
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeEnter : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * The default implementation returns this.dropNotAllowed, so it should be
+     * overridden to provide the proper feedback.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onNodeOver : function(n, dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dragged out of
+     * the drop node without dropping.  This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeOut : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped onto
+     * the drop node.  The default implementation returns false, so it should be overridden to provide the
+     * appropriate processing of the drop event and return true so that the drag source's repair action does not run.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onNodeDrop : function(n, dd, e, data){
+        return false;
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is being dragged over it,
+     * but not over any of its registered drop nodes.  The default implementation returns this.dropNotAllowed, so
+     * it should be overridden to provide the proper feedback if necessary.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onContainerOver : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped on it,
+     * but not on any of its registered drop nodes.  The default implementation returns false, so it should be
+     * overridden to provide the appropriate processing of the drop event if you need the drop zone itself to
+     * be able to accept drops.  It should return true when valid so that the drag source's repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onContainerDrop : function(dd, e, data){
+        return false;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source is now over
+     * the zone.  The default implementation returns this.dropNotAllowed and expects that only registered drop
+     * nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops
+     * you should override this method and provide a custom implementation.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the drop zone.
+     * This method will be called on every mouse movement while the drag source is over the drop zone.
+     * It will call {@link #onNodeOver} while the drag source is over a registered node, and will also automatically
+     * delegate to the appropriate node-specific methods as necessary when the drag source enters and exits
+     * registered nodes ({@link #onNodeEnter}, {@link #onNodeOut}). If the drag source is not currently over a
+     * registered node, it will call {@link #onContainerOver}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        var n = this.getTargetFromEvent(e);
+        if(!n){ // not over valid drop target
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+                this.lastOverNode = null;
+            }
+            return this.onContainerOver(dd, e, data);
+        }
+        if(this.lastOverNode != n){
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+            }
+            this.onNodeEnter(n, dd, e, data);
+            this.lastOverNode = n;
+        }
+        return this.onNodeOver(n, dd, e, data);
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source has been dragged
+     * out of the zone without dropping.  If the drag source is currently over a registered node, the notification
+     * will be delegated to {@link #onNodeOut} for node-specific handling, otherwise it will be ignored.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag zone
+     */
+    notifyOut : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the dragged item has
+     * been dropped on it.  The drag zone will look up the target node based on the event passed in, and if there
+     * is a node registered for that event, it will delegate to {@link #onNodeDrop} for node-specific handling,
+     * otherwise it will call {@link #onContainerDrop}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+        var n = this.getTargetFromEvent(e);
+        return n ?
+            this.onNodeDrop(n, dd, e, data) :
+            this.onContainerDrop(dd, e, data);
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    }  
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Initializes a {@link Ext.dd.DD} drag drop object for this element.
+     * @param {String} group The group the DD object is member of
+     * @param {Object} config The DD config object
+     * @param {Object} overrides An object containing methods to override/implement on the DD object
+     * @return {Ext.dd.DD} The DD object
+     */
+    initDD : function(group, config, overrides){
+        var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDProxy} object for this element.
+     * @param {String} group The group the DDProxy object is member of
+     * @param {Object} config The DDProxy config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
+     * @return {Ext.dd.DDProxy} The DDProxy object
+     */
+    initDDProxy : function(group, config, overrides){
+        var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDTarget} object for this element.
+     * @param {String} group The group the DDTarget object is member of
+     * @param {Object} config The DDTarget config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
+     * @return {Ext.dd.DDTarget} The DDTarget object
+     */
+    initDDTarget : function(group, config, overrides){
+        var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    }
+});/**
+ * @class Ext.data.Api
+ * @extends Object
+ * Ext.data.Api is a singleton designed to manage the data API including methods
+ * for validating a developer's DataProxy API.  Defines variables for CRUD actions
+ * create, read, update and destroy in addition to a mapping of RESTful HTTP methods
+ * GET, POST, PUT and DELETE to CRUD actions.
+ * @singleton
+ */
+Ext.data.Api = (function() {
+
+    // private validActions.  validActions is essentially an inverted hash of Ext.data.Api.actions, where value becomes the key.
+    // Some methods in this singleton (e.g.: getActions, getVerb) will loop through actions with the code <code>for (var verb in this.actions)</code>
+    // For efficiency, some methods will first check this hash for a match.  Those methods which do acces validActions will cache their result here.
+    // We cannot pre-define this hash since the developer may over-ride the actions at runtime.
+    var validActions = {};
+
+    return {
+        /**
+         * Defined actions corresponding to remote actions:
+         * <pre><code>
+actions: {
+    create  : 'create',  // Text representing the remote-action to create records on server.
+    read    : 'read',    // Text representing the remote-action to read/load data from server.
+    update  : 'update',  // Text representing the remote-action to update records on server.
+    destroy : 'destroy'  // Text representing the remote-action to destroy records on server.
+}
+         * </code></pre>
+         * @property actions
+         * @type Object
+         */
+        actions : {
+            create  : 'create',
+            read    : 'read',
+            update  : 'update',
+            destroy : 'destroy'
+        },
+
+        /**
+         * Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the
+         * corresponding actions for {@link Ext.data.DataProxy#restful RESTful proxies}.
+         * Defaults to:
+         * <pre><code>
+restActions : {
+    create  : 'POST',
+    read    : 'GET',
+    update  : 'PUT',
+    destroy : 'DELETE'
+},
+         * </code></pre>
+         */
+        restActions : {
+            create  : 'POST',
+            read    : 'GET',
+            update  : 'PUT',
+            destroy : 'DELETE'
+        },
+
+        /**
+         * Returns true if supplied action-name is a valid API action defined in <code>{@link #actions}</code> constants
+         * @param {String} action
+         * @param {String[]}(Optional) List of available CRUD actions.  Pass in list when executing multiple times for efficiency.
+         * @return {Boolean}
+         */
+        isAction : function(action) {
+            return (Ext.data.Api.actions[action]) ? true : false;
+        },
+
+        /**
+         * Returns the actual CRUD action KEY "create", "read", "update" or "destroy" from the supplied action-name.  This method is used internally and shouldn't generally
+         * need to be used directly.  The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true.  A developer can override this naming
+         * convention if desired.  However, the framework internally calls methods based upon the KEY so a way of retreiving the the words "create", "read", "update" and "destroy" is
+         * required.  This method will cache discovered KEYS into the private validActions hash.
+         * @param {String} name The runtime name of the action.
+         * @return {String||null} returns the action-key, or verb of the user-action or null if invalid.
+         * @nodoc
+         */
+        getVerb : function(name) {
+            if (validActions[name]) {
+                return validActions[name];  // <-- found in cache.  return immediately.
+            }
+            for (var verb in this.actions) {
+                if (this.actions[verb] === name) {
+                    validActions[name] = verb;
+                    break;
+                }
+            }
+            return (validActions[name] !== undefined) ? validActions[name] : null;
+        },
+
+        /**
+         * Returns true if the supplied API is valid; that is, check that all keys match defined actions
+         * otherwise returns an array of mistakes.
+         * @return {String[]||true}
+         */
+        isValid : function(api){
+            var invalid = [];
+            var crud = this.actions; // <-- cache a copy of the actions.
+            for (var action in api) {
+                if (!(action in crud)) {
+                    invalid.push(action);
+                }
+            }
+            return (!invalid.length) ? true : invalid;
+        },
+
+        /**
+         * Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions
+         * point to the same url.  The question is important for deciding whether to insert the "xaction" HTTP parameter within an
+         * Ajax request.  This method is used internally and shouldn't generally need to be called directly.
+         * @param {Ext.data.DataProxy} proxy
+         * @param {String} verb
+         * @return {Boolean}
+         */
+        hasUniqueUrl : function(proxy, verb) {
+            var url = (proxy.api[verb]) ? proxy.api[verb].url : null;
+            var unique = true;
+            for (var action in proxy.api) {
+                if ((unique = (action === verb) ? true : (proxy.api[action].url != url) ? true : false) === false) {
+                    break;
+                }
+            }
+            return unique;
+        },
+
+        /**
+         * This method is used internally by <tt>{@link Ext.data.DataProxy DataProxy}</tt> and should not generally need to be used directly.
+         * Each action of a DataProxy api can be initially defined as either a String or an Object.  When specified as an object,
+         * one can explicitly define the HTTP method (GET|POST) to use for each CRUD action.  This method will prepare the supplied API, setting
+         * each action to the Object form.  If your API-actions do not explicitly define the HTTP method, the "method" configuration-parameter will
+         * be used.  If the method configuration parameter is not specified, POST will be used.
+         <pre><code>
+new Ext.data.HttpProxy({
+    method: "POST",     // <-- default HTTP method when not specified.
+    api: {
+        create: 'create.php',
+        load: 'read.php',
+        save: 'save.php',
+        destroy: 'destroy.php'
+    }
+});
+
+// Alternatively, one can use the object-form to specify the API
+new Ext.data.HttpProxy({
+    api: {
+        load: {url: 'read.php', method: 'GET'},
+        create: 'create.php',
+        destroy: 'destroy.php',
+        save: 'update.php'
+    }
+});
+        </code></pre>
+         *
+         * @param {Ext.data.DataProxy} proxy
+         */
+        prepare : function(proxy) {
+            if (!proxy.api) {
+                proxy.api = {}; // <-- No api?  create a blank one.
+            }
+            for (var verb in this.actions) {
+                var action = this.actions[verb];
+                proxy.api[action] = proxy.api[action] || proxy.url || proxy.directFn;
+                if (typeof(proxy.api[action]) == 'string') {
+                    proxy.api[action] = {
+                        url: proxy.api[action]
+                    };
+                }
+            }
+        },
+
+        /**
+         * Prepares a supplied Proxy to be RESTful.  Sets the HTTP method for each api-action to be one of
+         * GET, POST, PUT, DELETE according to the defined {@link #restActions}.
+         * @param {Ext.data.DataProxy} proxy
+         */
+        restify : function(proxy) {
+            proxy.restful = true;
+            for (var verb in this.restActions) {
+                proxy.api[this.actions[verb]].method = this.restActions[verb];
+            }
+        }
+    };
+})();
+
+/**
+ * @class Ext.data.Api.Error
+ * @extends Ext.Error
+ * Error class for Ext.data.Api errors
+ */
+Ext.data.Api.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.Api'
+});
+Ext.apply(Ext.data.Api.Error.prototype, {
+    lang: {
+        'action-url-undefined': 'No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.',
+        'invalid': 'received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions',
+        'invalid-url': 'Invalid url.  Please review your proxy configuration.',
+        'execute': 'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'
+    }
+});
+
+/**
+ * @class Ext.data.SortTypes
+ * @singleton
+ * Defines the default sorting (casting?) comparison functions used when sorting data.
+ */
+Ext.data.SortTypes = {
+    /**
+     * Default sort that does nothing
+     * @param {Mixed} s The value being converted
+     * @return {Mixed} The comparison value
+     */
+    none : function(s){
+        return s;
+    },
+    
+    /**
+     * The regular expression used to strip tags
+     * @type {RegExp}
+     * @property
+     */
+    stripTagsRE : /<\/?[^>]+>/gi,
+    
+    /**
+     * Strips all HTML tags to sort on text only
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asText : function(s){
+        return String(s).replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Strips all HTML tags to sort on text only - Case insensitive
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCText : function(s){
+        return String(s).toUpperCase().replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Case insensitive string
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCString : function(s) {
+    	return String(s).toUpperCase();
+    },
+    
+    /**
+     * Date sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asDate : function(s) {
+        if(!s){
+            return 0;
+        }
+        if(Ext.isDate(s)){
+            return s.getTime();
+        }
+    	return Date.parse(String(s));
+    },
+    
+    /**
+     * Float sorting
+     * @param {Mixed} s The value being converted
+     * @return {Float} The comparison value
+     */
+    asFloat : function(s) {
+    	var val = parseFloat(String(s).replace(/,/g, ""));
+    	return isNaN(val) ? 0 : val;
+    },
+    
+    /**
+     * Integer sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asInt : function(s) {
+        var val = parseInt(String(s).replace(/,/g, ""), 10);
+        return isNaN(val) ? 0 : val;
+    }
+};/**
+ * @class Ext.data.Record
+ * <p>Instances of this class encapsulate both Record <em>definition</em> information, and Record
+ * <em>value</em> information for use in {@link Ext.data.Store} objects, or any code which needs
+ * to access Records cached in an {@link Ext.data.Store} object.</p>
+ * <p>Constructors for this class are generated by passing an Array of field definition objects to {@link #create}.
+ * Instances are usually only created by {@link Ext.data.Reader} implementations when processing unformatted data
+ * objects.</p>
+ * <p>Note that an instance of a Record class may only belong to one {@link Ext.data.Store Store} at a time.
+ * In order to copy data from one Store to another, use the {@link #copy} method to create an exact
+ * copy of the Record, and insert the new instance into the other Store.</p>
+ * <p>When serializing a Record for submission to the server, be aware that it contains many private
+ * properties, and also a reference to its owning Store which in turn holds references to its Records.
+ * This means that a whole Record may not be encoded using {@link Ext.util.JSON.encode}. Instead, use the
+ * <code>{@link #data}</code> and <code>{@link #id}</code> properties.</p>
+ * <p>Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.</p>
+ * @constructor
+ * This constructor should not be used to create Record objects. Instead, use {@link #create} to
+ * generate a subclass of Ext.data.Record configured with information about its constituent fields.
+ * @param {Object} data (Optional) An object, the properties of which provide values for the new Record's
+ * fields. If not specified the <code>{@link Ext.data.Field#defaultValue defaultValue}</code>
+ * for each field will be assigned.
+ * @param {Object} id (Optional) The id of the Record. This id should be unique, and is used by the
+ * {@link Ext.data.Store} object which owns the Record to index its collection of Records. If
+ * an <code>id</code> is not specified a <b><code>{@link #phantom}</code></b> Record will be created
+ * with an {@link #Record.id automatically generated id}.
+ */
+Ext.data.Record = function(data, id){
+    // if no id, call the auto id method
+    this.id = (id || id === 0) ? id : Ext.data.Record.id(this);
+    this.data = data || {};
+};
+
+/**
+ * Generate a constructor for a specific Record layout.
+ * @param {Array} o An Array of <b>{@link Ext.data.Field Field}</b> definition objects.
+ * The constructor generated by this method may be used to create new Record instances. The data
+ * object must contain properties named after the {@link Ext.data.Field field}
+ * <b><tt>{@link Ext.data.Field#name}s</tt></b>.  Example usage:<pre><code>
+// create a Record constructor from a description of the fields
+var TopicRecord = Ext.data.Record.create([ // creates a subclass of Ext.data.Record
+    {{@link Ext.data.Field#name name}: 'title', {@link Ext.data.Field#mapping mapping}: 'topic_title'},
+    {name: 'author', mapping: 'username', allowBlank: false},
+    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
+    {name: 'lastPost', mapping: 'post_time', type: 'date'},
+    {name: 'lastPoster', mapping: 'user2'},
+    {name: 'excerpt', mapping: 'post_text', allowBlank: false},
+    // In the simplest case, if no properties other than <tt>name</tt> are required,
+    // a field definition may consist of just a String for the field name.
+    'signature'
+]);
+
+// create Record instance
+var myNewRecord = new TopicRecord(
+    {
+        title: 'Do my job please',
+        author: 'noobie',
+        totalPosts: 1,
+        lastPost: new Date(),
+        lastPoster: 'Animal',
+        excerpt: 'No way dude!',
+        signature: ''
+    },
+    id // optionally specify the id of the record otherwise {@link #Record.id one is auto-assigned}
+);
+myStore.{@link Ext.data.Store#add add}(myNewRecord);
+</code></pre>
+ * @method create
+ * @return {function} A constructor which is used to create new Records according
+ * to the definition. The constructor has the same signature as {@link #Ext.data.Record}.
+ * @static
+ */
+Ext.data.Record.create = function(o){
+    var f = Ext.extend(Ext.data.Record, {});
+    var p = f.prototype;
+    p.fields = new Ext.util.MixedCollection(false, function(field){
+        return field.name;
+    });
+    for(var i = 0, len = o.length; i < len; i++){
+        p.fields.add(new Ext.data.Field(o[i]));
+    }
+    f.getField = function(name){
+        return p.fields.get(name);
+    };
+    return f;
+};
+
+Ext.data.Record.PREFIX = 'ext-record';
+Ext.data.Record.AUTO_ID = 1;
+Ext.data.Record.EDIT = 'edit';
+Ext.data.Record.REJECT = 'reject';
+Ext.data.Record.COMMIT = 'commit';
+
+
+/**
+ * Generates a sequential id. This method is typically called when a record is {@link #create}d
+ * and {@link #Record no id has been specified}. The returned id takes the form:
+ * <tt>&#123;PREFIX}-&#123;AUTO_ID}</tt>.<div class="mdetail-params"><ul>
+ * <li><b><tt>PREFIX</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.PREFIX</tt>
+ * (defaults to <tt>'ext-record'</tt>)</p></li>
+ * <li><b><tt>AUTO_ID</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.AUTO_ID</tt>
+ * (defaults to <tt>1</tt> initially)</p></li>
+ * </ul></div>
+ * @param {Record} rec The record being created.  The record does not exist, it's a {@link #phantom}.
+ * @return {String} auto-generated string id, <tt>"ext-record-i++'</tt>;
+ */
+Ext.data.Record.id = function(rec) {
+    rec.phantom = true;
+    return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join('');
+};
+
+Ext.data.Record.prototype = {
+    /**
+     * <p><b>This property is stored in the Record definition's <u>prototype</u></b></p>
+     * A MixedCollection containing the defined {@link Ext.data.Field Field}s for this Record.  Read-only.
+     * @property fields
+     * @type Ext.util.MixedCollection
+     */
+    /**
+     * An object hash representing the data for this Record. Every field name in the Record definition
+     * is represented by a property of that name in this object. Note that unless you specified a field
+     * with {@link Ext.data.Field#name name} "id" in the Record definition, this will <b>not</b> contain
+     * an <tt>id</tt> property.
+     * @property data
+     * @type {Object}
+     */
+    /**
+     * The unique ID of the Record {@link #Record as specified at construction time}.
+     * @property id
+     * @type {Object}
+     */
+    /**
+     * Readonly flag - true if this Record has been modified.
+     * @type Boolean
+     */
+    dirty : false,
+    editing : false,
+    error: null,
+    /**
+     * This object contains a key and value storing the original values of all modified
+     * fields or is null if no fields have been modified.
+     * @property modified
+     * @type {Object}
+     */
+    modified: null,
+    /**
+     * <tt>false</tt> when the record does not yet exist in a server-side database (see
+     * {@link #markDirty}).  Any record which has a real database pk set as its id property
+     * is NOT a phantom -- it's real.
+     * @property phantom
+     * @type {Boolean}
+     */
+    phantom : false,
+
+    // private
+    join : function(store){
+        /**
+         * The {@link Ext.data.Store} to which this Record belongs.
+         * @property store
+         * @type {Ext.data.Store}
+         */
+        this.store = store;
+    },
+
+    /**
+     * Set the {@link Ext.data.Field#name named field} to the specified value.  For example:
+     * <pre><code>
+// record has a field named 'firstname'
+var Employee = Ext.data.Record.{@link #create}([
+    {name: 'firstname'},
+    ...
+]);
+
+// update the 2nd record in the store:
+var rec = myStore.{@link Ext.data.Store#getAt getAt}(1);
+
+// set the value (shows dirty flag):
+rec.set('firstname', 'Betty');
+
+// commit the change (removes dirty flag):
+rec.{@link #commit}();
+
+// update the record in the store, bypass setting dirty flag,
+// and do not store the change in the {@link Ext.data.Store#getModifiedRecords modified records}
+rec.{@link #data}['firstname'] = 'Wilma'); // updates record, but not the view
+rec.{@link #commit}(); // updates the view
+     * </code></pre>
+     * <b>Notes</b>:<div class="mdetail-params"><ul>
+     * <li>If the store has a writer and <code>autoSave=true</code>, each set()
+     * will execute an XHR to the server.</li>
+     * <li>Use <code>{@link #beginEdit}</code> to prevent the store's <code>update</code>
+     * event firing while using set().</li>
+     * <li>Use <code>{@link #endEdit}</code> to have the store's <code>update</code>
+     * event fire.</li>
+     * </ul></div>
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to set.
+     * @param {Object} value The value to set the field to.
+     */
+    set : function(name, value){
+        var isObj = (typeof value === 'object');
+        if(!isObj && String(this.data[name]) === String(value)){
+            return;
+        } else if (isObj && Ext.encode(this.data[name]) === Ext.encode(value)) {
+            return;
+        }
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        if(typeof this.modified[name] == 'undefined'){
+            this.modified[name] = this.data[name];
+        }
+        this.data[name] = value;
+        if(!this.editing){
+            this.afterEdit();
+        }
+    },
+
+    // private
+    afterEdit: function(){
+        if(this.store){
+            this.store.afterEdit(this);
+        }
+    },
+
+    // private
+    afterReject: function(){
+        if(this.store){
+            this.store.afterReject(this);
+        }
+    },
+
+    // private
+    afterCommit: function(){
+        if(this.store){
+            this.store.afterCommit(this);
+        }
+    },
+
+    /**
+     * Get the value of the {@link Ext.data.Field#name named field}.
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to get the value of.
+     * @return {Object} The value of the field.
+     */
+    get : function(name){
+        return this.data[name];
+    },
+
+    /**
+     * Begin an edit. While in edit mode, no events (e.g.. the <code>update</code> event)
+     * are relayed to the containing store.
+     * See also: <code>{@link #endEdit}</code> and <code>{@link #cancelEdit}</code>.
+     */
+    beginEdit : function(){
+        this.editing = true;
+        this.modified = this.modified || {};
+    },
+
+    /**
+     * Cancels all changes made in the current edit operation.
+     */
+    cancelEdit : function(){
+        this.editing = false;
+        delete this.modified;
+    },
+
+    /**
+     * End an edit. If any data was modified, the containing store is notified
+     * (ie, the store's <code>update</code> event will fire).
+     */
+    endEdit : function(){
+        this.editing = false;
+        if(this.dirty){
+            this.afterEdit();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Rejects all changes made to the Record since either creation, or the last commit operation.
+     * Modified fields are reverted to their original values.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of reject operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    reject : function(silent){
+        var m = this.modified;
+        for(var n in m){
+            if(typeof m[n] != "function"){
+                this.data[n] = m[n];
+            }
+        }
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterReject();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Commits all changes made to the Record since either creation, or the last commit operation.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of commit operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    commit : function(silent){
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterCommit();
+        }
+    },
+
+    /**
+     * Gets a hash of only the fields that have been modified since this Record was created or commited.
+     * @return Object
+     */
+    getChanges : function(){
+        var m = this.modified, cs = {};
+        for(var n in m){
+            if(m.hasOwnProperty(n)){
+                cs[n] = this.data[n];
+            }
+        }
+        return cs;
+    },
+
+    // private
+    hasError : function(){
+        return this.error !== null;
+    },
+
+    // private
+    clearError : function(){
+        this.error = null;
+    },
+
+    /**
+     * Creates a copy of this Record.
+     * @param {String} id (optional) A new Record id, defaults to {@link #Record.id autogenerating an id}.
+     * Note: if an <code>id</code> is not specified the copy created will be a
+     * <code>{@link #phantom}</code> Record.
+     * @return {Record}
+     */
+    copy : function(newId) {
+        return new this.constructor(Ext.apply({}, this.data), newId || this.id);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the passed field name has been <code>{@link #modified}</code>
+     * since the load or last commit.
+     * @param {String} fieldName {@link Ext.data.Field.{@link Ext.data.Field#name}
+     * @return {Boolean}
+     */
+    isModified : function(fieldName){
+        return !!(this.modified && this.modified.hasOwnProperty(fieldName));
+    },
+
+    /**
+     * By default returns <tt>false</tt> if any {@link Ext.data.Field field} within the
+     * record configured with <tt>{@link Ext.data.Field#allowBlank} = false</tt> returns
+     * <tt>true</tt> from an {@link Ext}.{@link Ext#isEmpty isempty} test.
+     * @return {Boolean}
+     */
+    isValid : function() {
+        return this.fields.find(function(f) {
+            return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false;
+        },this) ? false : true;
+    },
+
+    /**
+     * <p>Marks this <b>Record</b> as <code>{@link #dirty}</code>.  This method
+     * is used interally when adding <code>{@link #phantom}</code> records to a
+     * {@link Ext.data.Store#writer writer enabled store}.</p>
+     * <br><p>Marking a record <code>{@link #dirty}</code> causes the phantom to
+     * be returned by {@link Ext.data.Store#getModifiedRecords} where it will
+     * have a create action composed for it during {@link Ext.data.Store#save store save}
+     * operations.</p>
+     */
+    markDirty : function(){
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        this.fields.each(function(f) {
+            this.modified[f.name] = this.data[f.name];
+        },this);
+    }
+};/**
+ * @class Ext.StoreMgr
+ * @extends Ext.util.MixedCollection
+ * The default global group of stores.
+ * @singleton
+ */
+Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
+    /**
+     * @cfg {Object} listeners @hide
+     */
+
+    /**
+     * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
+     * manually.  Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. 
+     * @param {Ext.data.Store} store1 A Store instance
+     * @param {Ext.data.Store} store2 (optional)
+     * @param {Ext.data.Store} etc... (optional)
+     */
+    register : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.add(s);
+        }
+    },
+
+    /**
+     * Unregisters one or more Stores with the StoreMgr
+     * @param {String/Object} id1 The id of the Store, or a Store instance
+     * @param {String/Object} id2 (optional)
+     * @param {String/Object} etc... (optional)
+     */
+    unregister : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.remove(this.lookup(s));
+        }
+    },
+
+    /**
+     * Gets a registered Store by id
+     * @param {String/Object} id The id of the Store, or a Store instance
+     * @return {Ext.data.Store}
+     */
+    lookup : function(id){
+        if(Ext.isArray(id)){
+            var fields = ['field1'], expand = !Ext.isArray(id[0]);
+            if(!expand){
+                for(var i = 2, len = id[0].length; i <= len; ++i){
+                    fields.push('field' + i);
+                }
+            }
+            return new Ext.data.ArrayStore({
+                fields: fields,
+                data: id,
+                expandData: expand,
+                autoDestroy: true,
+                autoCreated: true
+
+            });
+        }
+        return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
+    },
+
+    // getKey implementation for MixedCollection
+    getKey : function(o){
+         return o.storeId;
+    }
+});/**
+ * @class Ext.data.Store
+ * @extends Ext.util.Observable
+ * <p>The Store class encapsulates a client side cache of {@link Ext.data.Record Record}
+ * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel},
+ * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}.</p>
+ * <p><u>Retrieving Data</u></p>
+ * <p>A Store object may access a data object using:<div class="mdetail-params"><ul>
+ * <li>{@link #proxy configured implementation} of {@link Ext.data.DataProxy DataProxy}</li>
+ * <li>{@link #data} to automatically pass in data</li>
+ * <li>{@link #loadData} to manually pass in data</li>
+ * </ul></div></p>
+ * <p><u>Reading Data</u></p>
+ * <p>A Store object has no inherent knowledge of the format of the data object (it could be
+ * an Array, XML, or JSON). A Store object uses an appropriate {@link #reader configured implementation}
+ * of a {@link Ext.data.DataReader DataReader} to create {@link Ext.data.Record Record} instances from the data
+ * object.</p>
+ * <p><u>Store Types</u></p>
+ * <p>There are several implementations of Store available which are customized for use with
+ * a specific DataReader implementation.  Here is an example using an ArrayStore which implicitly
+ * creates a reader commensurate to an Array data object.</p>
+ * <pre><code>
+var myStore = new Ext.data.ArrayStore({
+    fields: ['fullname', 'first'],
+    idIndex: 0 // id for each record will be the first element
+});
+ * </code></pre>
+ * <p>For custom implementations create a basic {@link Ext.data.Store} configured as needed:</p>
+ * <pre><code>
+// create a {@link Ext.data.Record Record} constructor:
+var rt = Ext.data.Record.create([
+    {name: 'fullname'},
+    {name: 'first'}
+]);
+var myStore = new Ext.data.Store({
+    // explicitly create reader
+    reader: new Ext.data.ArrayReader(
+        {
+            idIndex: 0  // id for each record will be the first element
+        },
+        rt // recordType
+    )
+});
+ * </code></pre>
+ * <p>Load some data into store (note the data object is an array which corresponds to the reader):</p>
+ * <pre><code>
+var myData = [
+    [1, 'Fred Flintstone', 'Fred'],  // note that id for the record is the first element
+    [2, 'Barney Rubble', 'Barney']
+];
+myStore.loadData(myData);
+ * </code></pre>
+ * <p>Records are cached and made available through accessor functions.  An example of adding
+ * a record to the store:</p>
+ * <pre><code>
+var defaultData = {
+    fullname: 'Full Name',
+    first: 'First Name'
+};
+var recId = 100; // provide unique id for the record
+var r = new myStore.recordType(defaultData, ++recId); // create new record
+myStore.{@link #insert}(0, r); // insert a new record into the store (also see {@link #add})
+ * </code></pre>
+ * @constructor
+ * Creates a new Store.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype store
+ */
+Ext.data.Store = function(config){
+    this.data = new Ext.util.MixedCollection(false);
+    this.data.getKey = function(o){
+        return o.id;
+    };
+    /**
+     * See the <code>{@link #baseParams corresponding configuration option}</code>
+     * for a description of this property.
+     * To modify this property see <code>{@link #setBaseParam}</code>.
+     * @property
+     */
+    this.baseParams = {};
+
+    // temporary removed-records cache
+    this.removed = [];
+
+    if(config && config.data){
+        this.inlineData = config.data;
+        delete config.data;
+    }
+
+    Ext.apply(this, config);
+    
+    this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames);
+
+    if(this.url && !this.proxy){
+        this.proxy = new Ext.data.HttpProxy({url: this.url});
+    }
+    // If Store is RESTful, so too is the DataProxy
+    if (this.restful === true && this.proxy) {
+        // When operating RESTfully, a unique transaction is generated for each record.
+        this.batch = false;
+        Ext.data.Api.restify(this.proxy);
+    }
+
+    if(this.reader){ // reader passed
+        if(!this.recordType){
+            this.recordType = this.reader.recordType;
+        }
+        if(this.reader.onMetaChange){
+            this.reader.onMetaChange = this.onMetaChange.createDelegate(this);
+        }
+        if (this.writer) { // writer passed
+            this.writer.meta = this.reader.meta;
+            this.pruneModifiedRecords = true;
+        }
+    }
+
+    /**
+     * The {@link Ext.data.Record Record} constructor as supplied to (or created by) the
+     * {@link Ext.data.DataReader Reader}. Read-only.
+     * <p>If the Reader was constructed by passing in an Array of {@link Ext.data.Field} definition objects,
+     * instead of a Record constructor, it will implicitly create a Record constructor from that Array (see
+     * {@link Ext.data.Record}.{@link Ext.data.Record#create create} for additional details).</p>
+     * <p>This property may be used to create new Records of the type held in this Store, for example:</p><pre><code>
+// create the data store
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: [
+       {name: 'company'},
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+store.loadData(myData);
+
+// create the Grid
+var grid = new Ext.grid.EditorGridPanel({
+    store: store,
+    colModel: new Ext.grid.ColumnModel({
+        columns: [
+            {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
+            {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
+            {header: 'Change', renderer: change, dataIndex: 'change'},
+            {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
+            {header: 'Last Updated', width: 85,
+                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+                dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            width: 75
+        }
+    }),
+    autoExpandColumn: 'company', // match the id specified in the column model
+    height:350,
+    width:600,
+    title:'Array Grid',
+    tbar: [{
+        text: 'Add Record',
+        handler : function(){
+            var defaultData = {
+                change: 0,
+                company: 'New Company',
+                lastChange: (new Date()).clearTime(),
+                pctChange: 0,
+                price: 10
+            };
+            var recId = 3; // provide unique id
+            var p = new store.recordType(defaultData, recId); // create new record
+            grid.stopEditing();
+            store.{@link #insert}(0, p); // insert a new record into the store (also see {@link #add})
+            grid.startEditing(0, 0);
+        }
+    }]
+});
+     * </code></pre>
+     * @property recordType
+     * @type Function
+     */
+
+    if(this.recordType){
+        /**
+         * A {@link Ext.util.MixedCollection MixedCollection} containing the defined {@link Ext.data.Field Field}s
+         * for the {@link Ext.data.Record Records} stored in this Store. Read-only.
+         * @property fields
+         * @type Ext.util.MixedCollection
+         */
+        this.fields = this.recordType.prototype.fields;
+    }
+    this.modified = [];
+
+    this.addEvents(
+        /**
+         * @event datachanged
+         * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
+         * widget that is using this Store as a Record cache should refresh its view.
+         * @param {Store} this
+         */
+        'datachanged',
+        /**
+         * @event metachange
+         * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.
+         * @param {Store} this
+         * @param {Object} meta The JSON metadata
+         */
+        'metachange',
+        /**
+         * @event add
+         * Fires when Records have been {@link #add}ed to the Store
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The array of Records added
+         * @param {Number} index The index at which the record(s) were added
+         */
+        'add',
+        /**
+         * @event remove
+         * Fires when a Record has been {@link #remove}d from the Store
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was removed
+         * @param {Number} index The index at which the record was removed
+         */
+        'remove',
+        /**
+         * @event update
+         * Fires when a Record has been updated
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was updated
+         * @param {String} operation The update operation being performed.  Value may be one of:
+         * <pre><code>
+ Ext.data.Record.EDIT
+ Ext.data.Record.REJECT
+ Ext.data.Record.COMMIT
+         * </code></pre>
+         */
+        'update',
+        /**
+         * @event clear
+         * Fires when the data cache has been cleared.
+         * @param {Store} this
+         */
+        'clear',
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for description.
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request is made for a new data object.  If the beforeload handler returns
+         * <tt>false</tt> the {@link #load} action will be canceled.
+         * @param {Store} this
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires after a new set of Records has been loaded.
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The Records that were loaded
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b> in favor of the catch-all <b><code>{@link #exception}</code></b>
+         * event instead.</p>
+         * <p>This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for description.
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * @param {DataProxy} this
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs
+         * @param {Object} options The loading options that were specified. Edit <code>options.params</code> to add Http parameters to the request.  (see {@link #save} for details)
+         * @param {Object} arg The callback's arg object passed to the {@link #request} function
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
+         * Success or failure of the action is available in the <code>result['successProperty']</code> property.
+         * The server-code might set the <code>successProperty</code> to <tt>false</tt> if a database validation
+         * failed, for example.
+         * @param {Ext.data.Store} store
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Object} result The 'data' picked-out out of the response for convenience.
+         * @param {Ext.Direct.Transaction} res
+         * @param {Record/Record[]} rs Store's records, the subject(s) of the write-action
+         */
+        'write'
+    );
+
+    if(this.proxy){
+        this.relayEvents(this.proxy,  ['loadexception', 'exception']);
+    }
+    // With a writer set for the Store, we want to listen to add/remove events to remotely create/destroy records.
+    if (this.writer) {
+        this.on({
+            scope: this,
+            add: this.createRecords,
+            remove: this.destroyRecord,
+            update: this.updateRecord
+        });
+    }
+
+    this.sortToggle = {};
+    if(this.sortField){
+        this.setDefaultSort(this.sortField, this.sortDir);
+    }else if(this.sortInfo){
+        this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction);
+    }
+
+    Ext.data.Store.superclass.constructor.call(this);
+
+    if(this.id){
+        this.storeId = this.id;
+        delete this.id;
+    }
+    if(this.storeId){
+        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, {
+    /**
+     * @cfg {String} storeId If passed, the id to use to register with the <b>{@link Ext.StoreMgr StoreMgr}</b>.
+     * <p><b>Note</b>: if a (deprecated) <tt>{@link #id}</tt> is specified it will supersede the <tt>storeId</tt>
+     * assignment.</p>
+     */
+    /**
+     * @cfg {String} url If a <tt>{@link #proxy}</tt> is not specified the <tt>url</tt> will be used to
+     * implicitly configure a {@link Ext.data.HttpProxy HttpProxy} if an <tt>url</tt> is specified.
+     * Typically this option, or the <code>{@link #data}</code> option will be specified.
+     */
+    /**
+     * @cfg {Boolean/Object} autoLoad If <tt>{@link #data}</tt> is not specified, and if <tt>autoLoad</tt>
+     * is <tt>true</tt> or an <tt>Object</tt>, this store's {@link #load} method is automatically called
+     * after creation. If the value of <tt>autoLoad</tt> is an <tt>Object</tt>, this <tt>Object</tt> will
+     * be passed to the store's {@link #load} method.
+     */
+    /**
+     * @cfg {Ext.data.DataProxy} proxy The {@link Ext.data.DataProxy DataProxy} object which provides
+     * access to a data object.  See <code>{@link #url}</code>.
+     */
+    /**
+     * @cfg {Array} data An inline data object readable by the <code>{@link #reader}</code>.
+     * Typically this option, or the <code>{@link #url}</code> option will be specified.
+     */
+    /**
+     * @cfg {Ext.data.DataReader} reader The {@link Ext.data.DataReader Reader} object which processes the
+     * data object and returns an Array of {@link Ext.data.Record} objects which are cached keyed by their
+     * <b><tt>{@link Ext.data.Record#id id}</tt></b> property.
+     */
+    /**
+     * @cfg {Ext.data.DataWriter} writer
+     * <p>The {@link Ext.data.DataWriter Writer} object which processes a record object for being written
+     * to the server-side database.</p>
+     * <br><p>When a writer is installed into a Store the {@link #add}, {@link #remove}, and {@link #update}
+     * events on the store are monitored in order to remotely {@link #createRecords create records},
+     * {@link #destroyRecord destroy records}, or {@link #updateRecord update records}.</p>
+     * <br><p>The proxy for this store will relay any {@link #writexception} events to this store.</p>
+     * <br><p>Sample implementation:
+     * <pre><code>
+var writer = new {@link Ext.data.JsonWriter}({
+    encode: true,
+    writeAllFields: true // write all fields, not just those that changed
+});
+
+// Typical Store collecting the Proxy, Reader and Writer together.
+var store = new Ext.data.Store({
+    storeId: 'user',
+    root: 'records',
+    proxy: proxy,
+    reader: reader,
+    writer: writer,     // <-- plug a DataWriter into the store just as you would a Reader
+    paramsAsHash: true,
+    autoSave: false    // <-- false to delay executing create, update, destroy requests
+                        //     until specifically told to do so.
+});
+     * </code></pre></p>
+     */
+    writer : undefined,
+    /**
+     * @cfg {Object} baseParams
+     * <p>An object containing properties which are to be sent as parameters
+     * for <i>every</i> HTTP request.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     * <p><b>Note</b>: <code>baseParams</code> may be superseded by any <code>params</code>
+     * specified in a <code>{@link #load}</code> request, see <code>{@link #load}</code>
+     * for more details.</p>
+     * This property may be modified after creation using the <code>{@link #setBaseParam}</code>
+     * method.
+     * @property
+     */
+    /**
+     * @cfg {Object} sortInfo A config object to specify the sort order in the request of a Store's
+     * {@link #load} operation.  Note that for local sorting, the <tt>direction</tt> property is
+     * case-sensitive. See also {@link #remoteSort} and {@link #paramNames}.
+     * For example:<pre><code>
+sortInfo: {
+    field: 'fieldName',
+    direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
+}
+</code></pre>
+     */
+    /**
+     * @cfg {boolean} remoteSort <tt>true</tt> if sorting is to be handled by requesting the <tt>{@link #proxy Proxy}</tt>
+     * to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache
+     * in place (defaults to <tt>false</tt>).
+     * <p>If <tt>remoteSort</tt> is <tt>true</tt>, then clicking on a {@link Ext.grid.Column Grid Column}'s
+     * {@link Ext.grid.Column#header header} causes the current page to be requested from the server appending
+     * the following two parameters to the <b><tt>{@link #load params}</tt></b>:<div class="mdetail-params"><ul>
+     * <li><b><tt>sort</tt></b> : String<p class="sub-desc">The <tt>name</tt> (as specified in the Record's
+     * {@link Ext.data.Field Field definition}) of the field to sort on.</p></li>
+     * <li><b><tt>dir</tt></b> : String<p class="sub-desc">The direction of the sort, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul></div></p>
+     */
+    remoteSort : false,
+
+    /**
+     * @cfg {Boolean} autoDestroy <tt>true</tt> to destroy the store when the component the store is bound
+     * to is destroyed (defaults to <tt>false</tt>).
+     * <p><b>Note</b>: this should be set to true when using stores that are bound to only 1 component.</p>
+     */
+    autoDestroy : false,
+
+    /**
+     * @cfg {Boolean} pruneModifiedRecords <tt>true</tt> to clear all modified record information each time
+     * the store is loaded or when a record is removed (defaults to <tt>false</tt>). See {@link #getModifiedRecords}
+     * for the accessor method to retrieve the modified records.
+     */
+    pruneModifiedRecords : false,
+
+    /**
+     * Contains the last options object used as the parameter to the {@link #load} method. See {@link #load}
+     * for the details of what this may contain. This may be useful for accessing any params which were used
+     * to load the current Record cache.
+     * @property
+     */
+    lastOptions : null,
+
+    /**
+     * @cfg {Boolean} autoSave
+     * <p>Defaults to <tt>true</tt> causing the store to automatically {@link #save} records to
+     * the server when a record is modified (ie: becomes 'dirty'). Specify <tt>false</tt> to manually call {@link #save}
+     * to send all modifiedRecords to the server.</p>
+     * <br><p><b>Note</b>: each CRUD action will be sent as a separate request.</p>
+     */
+    autoSave : true,
+
+    /**
+     * @cfg {Boolean} batch
+     * <p>Defaults to <tt>true</tt> (unless <code>{@link #restful}:true</code>). Multiple
+     * requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined
+     * and sent as one transaction. Only applies when <code>{@link #autoSave}</code> is set
+     * to <tt>false</tt>.</p>
+     * <br><p>If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is
+     * generated for each record.</p>
+     */
+    batch : true,
+
+    /**
+     * @cfg {Boolean} restful
+     * Defaults to <tt>false</tt>.  Set to <tt>true</tt> to have the Store and the set
+     * Proxy operate in a RESTful manner. The store will automatically generate GET, POST,
+     * PUT and DELETE requests to the server. The HTTP method used for any given CRUD
+     * action is described in {@link Ext.data.Api#restActions}.  For additional information
+     * see {@link Ext.data.DataProxy#restful}.
+     * <p><b>Note</b>: if <code>{@link #restful}:true</code> <code>batch</code> will
+     * internally be set to <tt>false</tt>.</p>
+     */
+    restful: false,
+    
+    /**
+     * @cfg {Object} paramNames
+     * <p>An object containing properties which specify the names of the paging and
+     * sorting parameters passed to remote servers when loading blocks of data. By default, this
+     * object takes the following form:</p><pre><code>
+{
+    start : 'start',  // The parameter name which specifies the start row
+    limit : 'limit',  // The parameter name which specifies number of rows to return
+    sort : 'sort',    // The parameter name which specifies the column to sort on
+    dir : 'dir'       // The parameter name which specifies the sort direction
+}
+</code></pre>
+     * <p>The server must produce the requested data block upon receipt of these parameter names.
+     * If different parameter names are required, this property can be overriden using a configuration
+     * property.</p>
+     * <p>A {@link Ext.PagingToolbar PagingToolbar} bound to this Store uses this property to determine
+     * the parameter names to use in its {@link #load requests}.
+     */
+    paramNames : undefined,
+    
+    /**
+     * @cfg {Object} defaultParamNames
+     * Provides the default values for the {@link #paramNames} property. To globally modify the parameters
+     * for all stores, this object should be changed on the store prototype.
+     */
+    defaultParamNames : {
+        start : 'start',
+        limit : 'limit',
+        sort : 'sort',
+        dir : 'dir'
+    },
+
+    /**
+     * Destroys the store.
+     */
+    destroy : function(){
+        if(this.storeId){
+            Ext.StoreMgr.unregister(this);
+        }
+        this.data = null;
+        Ext.destroy(this.proxy);
+        this.reader = this.writer = null;
+        this.purgeListeners();
+    },
+
+    /**
+     * Add Records to the Store and fires the {@link #add} event.  To add Records
+     * to the store from a remote source use <code>{@link #load}({add:true})</code>.
+     * See also <code>{@link #recordType}</code> and <code>{@link #insert}</code>.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects
+     * to add to the cache. See {@link #recordType}.
+     */
+    add : function(records){
+        records = [].concat(records);
+        if(records.length < 1){
+            return;
+        }
+        for(var i = 0, len = records.length; i < len; i++){
+            records[i].join(this);
+        }
+        var index = this.data.length;
+        this.data.addAll(records);
+        if(this.snapshot){
+            this.snapshot.addAll(records);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * (Local sort only) Inserts the passed Record into the Store at the index where it
+     * should go based on the current sort information.
+     * @param {Ext.data.Record} record
+     */
+    addSorted : function(record){
+        var index = this.findInsertIndex(record);
+        this.insert(index, record);
+    },
+
+    /**
+     * Remove a Record from the Store and fires the {@link #remove} event.
+     * @param {Ext.data.Record} record The Ext.data.Record object to remove from the cache.
+     */
+    remove : function(record){
+        var index = this.data.indexOf(record);
+        if(index > -1){
+            this.data.removeAt(index);
+            if(this.pruneModifiedRecords){
+                this.modified.remove(record);
+            }
+            if(this.snapshot){
+                this.snapshot.remove(record);
+            }
+            this.fireEvent('remove', this, record, index);
+        }
+    },
+
+    /**
+     * Remove a Record from the Store at the specified index. Fires the {@link #remove} event.
+     * @param {Number} index The index of the record to remove.
+     */
+    removeAt : function(index){
+        this.remove(this.getAt(index));
+    },
+
+    /**
+     * Remove all Records from the Store and fires the {@link #clear} event.
+     */
+    removeAll : function(){
+        this.data.clear();
+        if(this.snapshot){
+            this.snapshot.clear();
+        }
+        if(this.pruneModifiedRecords){
+            this.modified = [];
+        }
+        this.fireEvent('clear', this);
+    },
+
+    /**
+     * Inserts Records into the Store at the given index and fires the {@link #add} event.
+     * See also <code>{@link #add}</code> and <code>{@link #addSorted}</code>.
+     * @param {Number} index The start index at which to insert the passed Records.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache.
+     */
+    insert : function(index, records){
+        records = [].concat(records);
+        for(var i = 0, len = records.length; i < len; i++){
+            this.data.insert(index, records[i]);
+            records[i].join(this);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * Get the index within the cache of the passed Record.
+     * @param {Ext.data.Record} record The Ext.data.Record object to find.
+     * @return {Number} The index of the passed Record. Returns -1 if not found.
+     */
+    indexOf : function(record){
+        return this.data.indexOf(record);
+    },
+
+    /**
+     * Get the index within the cache of the Record with the passed id.
+     * @param {String} id The id of the Record to find.
+     * @return {Number} The index of the Record. Returns -1 if not found.
+     */
+    indexOfId : function(id){
+        return this.data.indexOfKey(id);
+    },
+
+    /**
+     * Get the Record with the specified id.
+     * @param {String} id The id of the Record to find.
+     * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found.
+     */
+    getById : function(id){
+        return this.data.key(id);
+    },
+
+    /**
+     * Get the Record at the specified index.
+     * @param {Number} index The index of the Record to find.
+     * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found.
+     */
+    getAt : function(index){
+        return this.data.itemAt(index);
+    },
+
+    /**
+     * Returns a range of Records between specified indices.
+     * @param {Number} startIndex (optional) The starting index (defaults to 0)
+     * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store)
+     * @return {Ext.data.Record[]} An array of Records
+     */
+    getRange : function(start, end){
+        return this.data.getRange(start, end);
+    },
+
+    // private
+    storeOptions : function(o){
+        o = Ext.apply({}, o);
+        delete o.callback;
+        delete o.scope;
+        this.lastOptions = o;
+    },
+
+    /**
+     * <p>Loads the Record cache from the configured <tt>{@link #proxy}</tt> using the configured <tt>{@link #reader}</tt>.</p>
+     * <br><p>Notes:</p><div class="mdetail-params"><ul>
+     * <li><b><u>Important</u></b>: loading is asynchronous! This call will return before the new data has been
+     * loaded. To perform any post-processing where information from the load call is required, specify
+     * the <tt>callback</tt> function to be called, or use a {@link Ext.util.Observable#listeners a 'load' event handler}.</li>
+     * <li>If using {@link Ext.PagingToolbar remote paging}, the first load call must specify the <tt>start</tt> and <tt>limit</tt>
+     * properties in the <code>options.params</code> property to establish the initial position within the
+     * dataset, and the number of Records to cache on each read from the Proxy.</li>
+     * <li>If using {@link #remoteSort remote sorting}, the configured <code>{@link #sortInfo}</code>
+     * will be automatically included with the posted parameters according to the specified
+     * <code>{@link #paramNames}</code>.</li>
+     * </ul></div>
+     * @param {Object} options An object containing properties which control loading options:<ul>
+     * <li><b><tt>params</tt></b> :Object<div class="sub-desc"><p>An object containing properties to pass as HTTP
+     * parameters to a remote data source. <b>Note</b>: <code>params</code> will override any
+     * <code>{@link #baseParams}</code> of the same name.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     * <li><b><tt>callback</tt></b> : Function<div class="sub-desc"><p>A function to be called after the Records
+     * have been loaded. The <tt>callback</tt> is called after the load event and is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[]</li>
+     * <li><tt>options</tt>: Options object from the load call</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div></li>
+     * <li><b><tt>scope</tt></b> : Object<div class="sub-desc"><p>Scope with which to call the callback (defaults
+     * to the Store object)</p></div></li>
+     * <li><b><tt>add</tt></b> : Boolean<div class="sub-desc"><p>Indicator to append loaded records rather than
+     * replace the current cache.  <b>Note</b>: see note for <tt>{@link #loadData}</tt></p></div></li>
+     * </ul>
+     * @return {Boolean} If the <i>developer</i> provided <tt>{@link #beforeload}</tt> event handler returns
+     * <tt>false</tt>, the load call will abort and will return <tt>false</tt>; otherwise will return <tt>true</tt>.
+     */
+    load : function(options) {
+        options = options || {};
+        this.storeOptions(options);
+        if(this.sortInfo && this.remoteSort){
+            var pn = this.paramNames;
+            options.params = options.params || {};
+            options.params[pn.sort] = this.sortInfo.field;
+            options.params[pn.dir] = this.sortInfo.direction;
+        }
+        try {
+            return this.execute('read', null, options); // <-- null represents rs.  No rs for load actions.
+        } catch(e) {
+            this.handleException(e);
+            return false;
+        }
+    },
+
+    /**
+     * updateRecord  Should not be used directly.  This method will be called automatically if a Writer is set.
+     * Listens to 'update' event.
+     * @param {Object} store
+     * @param {Object} record
+     * @param {Object} action
+     * @private
+     */
+    updateRecord : function(store, record, action) {
+        if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid))) {
+            this.save();
+        }
+    },
+
+    /**
+     * Should not be used directly.  Store#add will call this automatically if a Writer is set
+     * @param {Object} store
+     * @param {Object} rs
+     * @param {Object} index
+     * @private
+     */
+    createRecords : function(store, rs, index) {
+        for (var i = 0, len = rs.length; i < len; i++) {
+            if (rs[i].phantom && rs[i].isValid()) {
+                rs[i].markDirty();  // <-- Mark new records dirty
+                this.modified.push(rs[i]);  // <-- add to modified
+            }
+        }
+        if (this.autoSave === true) {
+            this.save();
+        }
+    },
+
+    /**
+     * Destroys a record or records.  Should not be used directly.  It's called by Store#remove if a Writer is set.
+     * @param {Store} this
+     * @param {Ext.data.Record/Ext.data.Record[]}
+     * @param {Number} index
+     * @private
+     */
+    destroyRecord : function(store, record, index) {
+        if (this.modified.indexOf(record) != -1) {  // <-- handled already if @cfg pruneModifiedRecords == true
+            this.modified.remove(record);
+        }
+        if (!record.phantom) {
+            this.removed.push(record);
+
+            // since the record has already been removed from the store but the server request has not yet been executed,
+            // must keep track of the last known index this record existed.  If a server error occurs, the record can be
+            // put back into the store.  @see Store#createCallback where the record is returned when response status === false
+            record.lastIndex = index;
+
+            if (this.autoSave === true) {
+                this.save();
+            }
+        }
+    },
+
+    /**
+     * This method should generally not be used directly.  This method is called internally
+     * by {@link #load}, or if a Writer is set will be called automatically when {@link #add},
+     * {@link #remove}, or {@link #update} events fire.
+     * @param {String} action Action name ('read', 'create', 'update', or 'destroy')
+     * @param {Record/Record[]} rs
+     * @param {Object} options
+     * @throws Error
+     * @private
+     */
+    execute : function(action, rs, options) {
+        // blow up if action not Ext.data.CREATE, READ, UPDATE, DESTROY
+        if (!Ext.data.Api.isAction(action)) {
+            throw new Ext.data.Api.Error('execute', action);
+        }
+        // make sure options has a params key
+        options = Ext.applyIf(options||{}, {
+            params: {}
+        });
+
+        // have to separate before-events since load has a different signature than create,destroy and save events since load does not
+        // include the rs (record resultset) parameter.  Capture return values from the beforeaction into doRequest flag.
+        var doRequest = true;
+
+        if (action === 'read') {
+            doRequest = this.fireEvent('beforeload', this, options);
+        }
+        else {
+            // if Writer is configured as listful, force single-recoord rs to be [{}} instead of {}
+            if (this.writer.listful === true && this.restful !== true) {
+                rs = (Ext.isArray(rs)) ? rs : [rs];
+            }
+            // if rs has just a single record, shift it off so that Writer writes data as '{}' rather than '[{}]'
+            else if (Ext.isArray(rs) && rs.length == 1) {
+                rs = rs.shift();
+            }
+            // Write the action to options.params
+            if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) {
+                this.writer.write(action, options.params, rs);
+            }
+        }
+        if (doRequest !== false) {
+            // Send request to proxy.
+            var params = Ext.apply({}, options.params, this.baseParams);
+            if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) {
+                params.xaction = action;
+            }
+            // Note:  Up until this point we've been dealing with 'action' as a key from Ext.data.Api.actions.  We'll flip it now
+            // and send the value into DataProxy#request, since it's the value which maps to the DataProxy#api
+            this.proxy.request(Ext.data.Api.actions[action], rs, params, this.reader, this.createCallback(action, rs), this, options);
+        }
+        return doRequest;
+    },
+
+    /**
+     * Saves all pending changes to the store.  If the commensurate Ext.data.Api.actions action is not configured, then
+     * the configured <code>{@link #url}</code> will be used.
+     * <pre>
+     * change            url
+     * ---------------   --------------------
+     * removed records   Ext.data.Api.actions.destroy
+     * phantom records   Ext.data.Api.actions.create
+     * {@link #getModifiedRecords modified records}  Ext.data.Api.actions.update
+     * </pre>
+     * @TODO:  Create extensions of Error class and send associated Record with thrown exceptions.
+     * e.g.:  Ext.data.DataReader.Error or Ext.data.Error or Ext.data.DataProxy.Error, etc.
+     */
+    save : function() {
+        if (!this.writer) {
+            throw new Ext.data.Store.Error('writer-undefined');
+        }
+
+        // DESTROY:  First check for removed records.  Records in this.removed are guaranteed non-phantoms.  @see Store#remove
+        if (this.removed.length) {
+            this.doTransaction('destroy', this.removed);
+        }
+
+        // Check for modified records. Use a copy so Store#rejectChanges will work if server returns error.
+        var rs = [].concat(this.getModifiedRecords());
+        if (!rs.length) { // Bail-out if empty...
+            return true;
+        }
+
+        // CREATE:  Next check for phantoms within rs.  splice-off and execute create.
+        var phantoms = [];
+        for (var i = rs.length-1; i >= 0; i--) {
+            if (rs[i].phantom === true) {
+                var rec = rs.splice(i, 1).shift();
+                if (rec.isValid()) {
+                    phantoms.push(rec);
+                }
+            } else if (!rs[i].isValid()) { // <-- while we're here, splice-off any !isValid real records
+                rs.splice(i,1);
+            }
+        }
+        // If we have valid phantoms, create them...
+        if (phantoms.length) {
+            this.doTransaction('create', phantoms);
+        }
+
+        // UPDATE:  And finally, if we're still here after splicing-off phantoms and !isValid real records, update the rest...
+        if (rs.length) {
+            this.doTransaction('update', rs);
+        }
+        return true;
+    },
+
+    // private.  Simply wraps call to Store#execute in try/catch.  Defers to Store#handleException on error.  Loops if batch: false
+    doTransaction : function(action, rs) {
+        function transaction(records) {
+            try {
+                this.execute(action, records);
+            } catch (e) {
+                this.handleException(e);
+            }
+        }
+        if (this.batch === false) {
+            for (var i = 0, len = rs.length; i < len; i++) {
+                transaction.call(this, rs[i]);
+            }
+        } else {
+            transaction.call(this, rs);
+        }
+    },
+
+    // @private callback-handler for remote CRUD actions
+    // Do not override -- override loadRecords, onCreateRecords, onDestroyRecords and onUpdateRecords instead.
+    createCallback : function(action, rs) {
+        var actions = Ext.data.Api.actions;
+        return (action == 'read') ? this.loadRecords : function(data, response, success) {
+            // calls: onCreateRecords | onUpdateRecords | onDestroyRecords
+            this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, data);
+            // If success === false here, exception will have been called in DataProxy
+            if (success === true) {
+                this.fireEvent('write', this, action, data, response, rs);
+            }
+        };
+    },
+
+    // Clears records from modified array after an exception event.
+    // NOTE:  records are left marked dirty.  Do we want to commit them even though they were not updated/realized?
+    clearModified : function(rs) {
+        if (Ext.isArray(rs)) {
+            for (var n=rs.length-1;n>=0;n--) {
+                this.modified.splice(this.modified.indexOf(rs[n]), 1);
+            }
+        } else {
+            this.modified.splice(this.modified.indexOf(rs), 1);
+        }
+    },
+
+    // remap record ids in MixedCollection after records have been realized.  @see Store#onCreateRecords, @see DataReader#realize
+    reMap : function(record) {
+        if (Ext.isArray(record)) {
+            for (var i = 0, len = record.length; i < len; i++) {
+                this.reMap(record[i]);
+            }
+        } else {
+            delete this.data.map[record._phid];
+            this.data.map[record.id] = record;
+            var index = this.data.keys.indexOf(record._phid);
+            this.data.keys.splice(index, 1, record.id);
+            delete record._phid;
+        }
+    },
+
+    // @protected onCreateRecord proxy callback for create action
+    onCreateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.realize(rs, data);
+                this.reMap(rs);
+            }
+            catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#realize splices-off the rs until empty.
+                    this.onCreateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected, onUpdateRecords proxy callback for update action
+    onUpdateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.update(rs, data);
+            } catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#update splices-off the rs until empty.
+                    this.onUpdateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected onDestroyRecords proxy callback for destroy action
+    onDestroyRecords : function(success, rs, data) {
+        // splice each rec out of this.removed
+        rs = (rs instanceof Ext.data.Record) ? [rs] : rs;
+        for (var i=0,len=rs.length;i<len;i++) {
+            this.removed.splice(this.removed.indexOf(rs[i]), 1);
+        }
+        if (success === false) {
+            // put records back into store if remote destroy fails.
+            // @TODO: Might want to let developer decide.
+            for (i=rs.length-1;i>=0;i--) {
+                this.insert(rs[i].lastIndex, rs[i]);    // <-- lastIndex set in Store#destroyRecord
+            }
+        }
+    },
+
+    // protected handleException.  Possibly temporary until Ext framework has an exception-handler.
+    handleException : function(e) {
+        // @see core/Error.js
+        Ext.handleError(e);
+    },
+
+    /**
+     * <p>Reloads the Record cache from the configured Proxy using the configured {@link Ext.data.Reader Reader} and
+     * the options from the last load operation performed.</p>
+     * <p><b>Note</b>: see the Important note in {@link #load}.</p>
+     * @param {Object} options (optional) An <tt>Object</tt> containing {@link #load loading options} which may
+     * override the options used in the last {@link #load} operation. See {@link #load} for details (defaults to
+     * <tt>null</tt>, in which case the {@link #lastOptions} are used).
+     */
+    reload : function(options){
+        this.load(Ext.applyIf(options||{}, this.lastOptions));
+    },
+
+    // private
+    // Called as a callback by the Reader during a load operation.
+    loadRecords : function(o, options, success){
+        if(!o || success === false){
+            if(success !== false){
+                this.fireEvent('load', this, [], options);
+            }
+            if(options.callback){
+                options.callback.call(options.scope || this, [], options, false, o);
+            }
+            return;
+        }
+        var r = o.records, t = o.totalRecords || r.length;
+        if(!options || options.add !== true){
+            if(this.pruneModifiedRecords){
+                this.modified = [];
+            }
+            for(var i = 0, len = r.length; i < len; i++){
+                r[i].join(this);
+            }
+            if(this.snapshot){
+                this.data = this.snapshot;
+                delete this.snapshot;
+            }
+            this.data.clear();
+            this.data.addAll(r);
+            this.totalLength = t;
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            this.totalLength = Math.max(t, this.data.length+r.length);
+            this.add(r);
+        }
+        this.fireEvent('load', this, r, options);
+        if(options.callback){
+            options.callback.call(options.scope || this, r, options, true);
+        }
+    },
+
+    /**
+     * Loads data from a passed data block and fires the {@link #load} event. A {@link Ext.data.Reader Reader}
+     * which understands the format of the data must have been configured in the constructor.
+     * @param {Object} data The data block from which to read the Records.  The format of the data expected
+     * is dependent on the type of {@link Ext.data.Reader Reader} that is configured and should correspond to
+     * that {@link Ext.data.Reader Reader}'s <tt>{@link Ext.data.Reader#readRecords}</tt> parameter.
+     * @param {Boolean} append (Optional) <tt>true</tt> to append the new Records rather the default to replace
+     * the existing cache.
+     * <b>Note</b>: that Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records
+     * with ids which are already present in the Store will <i>replace</i> existing Records. Only Records with
+     * new, unique ids will be added.
+     */
+    loadData : function(o, append){
+        var r = this.reader.readRecords(o);
+        this.loadRecords(r, {add: append}, true);
+    },
+
+    /**
+     * Gets the number of cached records.
+     * <p>If using paging, this may not be the total size of the dataset. If the data object
+     * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns
+     * the dataset size.  <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records in the Store's cache.
+     */
+    getCount : function(){
+        return this.data.length || 0;
+    },
+
+    /**
+     * Gets the total number of records in the dataset as returned by the server.
+     * <p>If using paging, for this to be accurate, the data object used by the {@link #reader Reader}
+     * must contain the dataset size. For remote data sources, the value for this property
+     * (<tt>totalProperty</tt> for {@link Ext.data.JsonReader JsonReader},
+     * <tt>totalRecords</tt> for {@link Ext.data.XmlReader XmlReader}) shall be returned by a query on the server.
+     * <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records as specified in the data object passed to the Reader
+     * by the Proxy.
+     * <p><b>Note</b>: this value is not updated when changing the contents of the Store locally.</p>
+     */
+    getTotalCount : function(){
+        return this.totalLength || 0;
+    },
+
+    /**
+     * Returns an object describing the current sort state of this Store.
+     * @return {Object} The sort state of the Store. An object with two properties:<ul>
+     * <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li>
+     * <li><b>direction : String<p class="sub-desc">The sort order, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul>
+     * See <tt>{@link #sortInfo}</tt> for additional details.
+     */
+    getSortState : function(){
+        return this.sortInfo;
+    },
+
+    // private
+    applySort : function(){
+        if(this.sortInfo && !this.remoteSort){
+            var s = this.sortInfo, f = s.field;
+            this.sortData(f, s.direction);
+        }
+    },
+
+    // private
+    sortData : function(f, direction){
+        direction = direction || 'ASC';
+        var st = this.fields.get(f).sortType;
+        var fn = function(r1, r2){
+            var v1 = st(r1.data[f]), v2 = st(r2.data[f]);
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        };
+        this.data.sort(direction, fn);
+        if(this.snapshot && this.snapshot != this.data){
+            this.snapshot.sort(direction, fn);
+        }
+    },
+
+    /**
+     * Sets the default sort column and order to be used by the next {@link #load} operation.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    setDefaultSort : function(field, dir){
+        dir = dir ? dir.toUpperCase() : 'ASC';
+        this.sortInfo = {field: field, direction: dir};
+        this.sortToggle[field] = dir;
+    },
+
+    /**
+     * Sort the Records.
+     * If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local
+     * sorting is used, the cache is sorted internally. See also {@link #remoteSort} and {@link #paramNames}.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    sort : function(fieldName, dir){
+        var f = this.fields.get(fieldName);
+        if(!f){
+            return false;
+        }
+        if(!dir){
+            if(this.sortInfo && this.sortInfo.field == f.name){ // toggle sort dir
+                dir = (this.sortToggle[f.name] || 'ASC').toggle('ASC', 'DESC');
+            }else{
+                dir = f.sortDir;
+            }
+        }
+        var st = (this.sortToggle) ? this.sortToggle[f.name] : null;
+        var si = (this.sortInfo) ? this.sortInfo : null;
+
+        this.sortToggle[f.name] = dir;
+        this.sortInfo = {field: f.name, direction: dir};
+        if(!this.remoteSort){
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            if (!this.load(this.lastOptions)) {
+                if (st) {
+                    this.sortToggle[f.name] = st;
+                }
+                if (si) {
+                    this.sortInfo = si;
+                }
+            }
+        }
+    },
+
+    /**
+     * Calls the specified function for each of the {@link Ext.data.Record Records} in the cache.
+     * @param {Function} fn The function to call. The {@link Ext.data.Record Record} is passed as the first parameter.
+     * Returning <tt>false</tt> aborts and exits the iteration.
+     * @param {Object} scope (optional) The scope in which to call the function (defaults to the {@link Ext.data.Record Record}).
+     */
+    each : function(fn, scope){
+        this.data.each(fn, scope);
+    },
+
+    /**
+     * Gets all {@link Ext.data.Record records} modified since the last commit.  Modified records are
+     * persisted across load operations (e.g., during paging). <b>Note</b>: deleted records are not
+     * included.  See also <tt>{@link #pruneModifiedRecords}</tt> and
+     * {@link Ext.data.Record}<tt>{@link Ext.data.Record#markDirty markDirty}.</tt>.
+     * @return {Ext.data.Record[]} An array of {@link Ext.data.Record Records} containing outstanding
+     * modifications.  To obtain modified fields within a modified record see
+     *{@link Ext.data.Record}<tt>{@link Ext.data.Record#modified modified}.</tt>.
+     */
+    getModifiedRecords : function(){
+        return this.modified;
+    },
+
+    // private
+    createFilterFn : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return false;
+        }
+        value = this.data.createValueMatcher(value, anyMatch, caseSensitive);
+        return function(r){
+            return value.test(r.data[property]);
+        };
+    },
+
+    /**
+     * Sums the value of <tt>property</tt> for each {@link Ext.data.Record record} between <tt>start</tt>
+     * and <tt>end</tt> and returns the result.
+     * @param {String} property A field in each record
+     * @param {Number} start (optional) The record index to start at (defaults to <tt>0</tt>)
+     * @param {Number} end (optional) The last record index to include (defaults to length - 1)
+     * @return {Number} The sum
+     */
+    sum : function(property, start, end){
+        var rs = this.data.items, v = 0;
+        start = start || 0;
+        end = (end || end === 0) ? end : rs.length-1;
+
+        for(var i = start; i <= end; i++){
+            v += (rs[i].data[property] || 0);
+        }
+        return v;
+    },
+
+    /**
+     * Filter the {@link Ext.data.Record records} by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field should begin with, or a RegExp to test
+     * against the field.
+     * @param {Boolean} anyMatch (optional) <tt>true</tt> to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) <tt>true</tt> for case sensitive comparison
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.filterBy(fn) : this.clearFilter();
+    },
+
+    /**
+     * Filter by a function. The specified function will be called for each
+     * Record in this Store. If the function returns <tt>true</tt> the Record is included,
+     * otherwise it is filtered out.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     */
+    filterBy : function(fn, scope){
+        this.snapshot = this.snapshot || this.data;
+        this.data = this.queryBy(fn, scope||this);
+        this.fireEvent('datachanged', this);
+    },
+
+    /**
+     * Query the records by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field
+     * should begin with, or a RegExp to test against the field.
+     * @param {Boolean} anyMatch (optional) True to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     */
+    query : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.queryBy(fn) : this.data.clone();
+    },
+
+    /**
+     * Query the cached records in this Store using a filtering function. The specified function
+     * will be called with each record in this Store. If the function returns <tt>true</tt> the record is
+     * included in the results.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     **/
+    queryBy : function(fn, scope){
+        var data = this.snapshot || this.data;
+        return data.filterBy(fn, scope||this);
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either a string that the property value
+     * should begin with, or a RegExp to test against the property.
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {Number} The matched index or -1
+     */
+    find : function(property, value, start, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.data.findIndexBy(fn, null, start) : -1;
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value The value to match against
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findExact: function(property, value, start){
+        return this.data.findIndexBy(function(rec){
+            return rec.get(property) === value;
+        }, this, start);
+    },
+
+    /**
+     * Find the index of the first matching Record in this Store by a function.
+     * If the function returns <tt>true</tt> it is considered a match.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findBy : function(fn, scope, start){
+        return this.data.findIndexBy(fn, scope, start);
+    },
+
+    /**
+     * Collects unique values for a particular dataIndex from this store.
+     * @param {String} dataIndex The property to collect
+     * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values
+     * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered
+     * @return {Array} An array of the unique values
+     **/
+    collect : function(dataIndex, allowNull, bypassFilter){
+        var d = (bypassFilter === true && this.snapshot) ?
+                this.snapshot.items : this.data.items;
+        var v, sv, r = [], l = {};
+        for(var i = 0, len = d.length; i < len; i++){
+            v = d[i].data[dataIndex];
+            sv = String(v);
+            if((allowNull || !Ext.isEmpty(v)) && !l[sv]){
+                l[sv] = true;
+                r[r.length] = v;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Revert to a view of the Record cache with no filtering applied.
+     * @param {Boolean} suppressEvent If <tt>true</tt> the filter is cleared silently without firing the
+     * {@link #datachanged} event.
+     */
+    clearFilter : function(suppressEvent){
+        if(this.isFiltered()){
+            this.data = this.snapshot;
+            delete this.snapshot;
+            if(suppressEvent !== true){
+                this.fireEvent('datachanged', this);
+            }
+        }
+    },
+
+    /**
+     * Returns true if this store is currently filtered
+     * @return {Boolean}
+     */
+    isFiltered : function(){
+        return this.snapshot && this.snapshot != this.data;
+    },
+
+    // private
+    afterEdit : function(record){
+        if(this.modified.indexOf(record) == -1){
+            this.modified.push(record);
+        }
+        this.fireEvent('update', this, record, Ext.data.Record.EDIT);
+    },
+
+    // private
+    afterReject : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.REJECT);
+    },
+
+    // private
+    afterCommit : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.COMMIT);
+    },
+
+    /**
+     * Commit all Records with {@link #getModifiedRecords outstanding changes}. To handle updates for changes,
+     * subscribe to the Store's {@link #update update event}, and perform updating when the third parameter is
+     * Ext.data.Record.COMMIT.
+     */
+    commitChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].commit();
+        }
+    },
+
+    /**
+     * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}.
+     */
+    rejectChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].reject();
+        }
+    },
+
+    // private
+    onMetaChange : function(meta, rtype, o){
+        this.recordType = rtype;
+        this.fields = rtype.prototype.fields;
+        delete this.snapshot;
+        if(meta.sortInfo){
+            this.sortInfo = meta.sortInfo;
+        }else if(this.sortInfo  && !this.fields.get(this.sortInfo.field)){
+            delete this.sortInfo;
+        }
+        this.modified = [];
+        this.fireEvent('metachange', this, this.reader.meta);
+    },
+
+    // private
+    findInsertIndex : function(record){
+        this.suspendEvents();
+        var data = this.data.clone();
+        this.data.add(record);
+        this.applySort();
+        var index = this.data.indexOf(record);
+        this.data = data;
+        this.resumeEvents();
+        return index;
+    },
+
+    /**
+     * Set the value for a property name in this store's {@link #baseParams}.  Usage:</p><pre><code>
+myStore.setBaseParam('foo', {bar:3});
+</code></pre>
+     * @param {String} name Name of the property to assign
+     * @param {Mixed} value Value to assign the <tt>name</tt>d property
+     **/
+    setBaseParam : function (name, value){
+        this.baseParams = this.baseParams || {};
+        this.baseParams[name] = value;
+    }
+});
+
+Ext.reg('store', Ext.data.Store);
+
+/**
+ * @class Ext.data.Store.Error
+ * @extends Ext.Error
+ * Store Error extension.
+ * @param {String} name
+ */
+Ext.data.Store.Error = Ext.extend(Ext.Error, {
+    name: 'Ext.data.Store'
+});
+Ext.apply(Ext.data.Store.Error.prototype, {
+    lang: {
+        'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.'
+    }
+});
+
+/**
+ * @class Ext.data.Field
+ * <p>This class encapsulates the field definition information specified in the field definition objects
+ * passed to {@link Ext.data.Record#create}.</p>
+ * <p>Developers do not need to instantiate this class. Instances are created by {@link Ext.data.Record.create}
+ * and cached in the {@link Ext.data.Record#fields fields} property of the created Record constructor's <b>prototype.</b></p>
+ */
+Ext.data.Field = function(config){
+    if(typeof config == "string"){
+        config = {name: config};
+    }
+    Ext.apply(this, config);
+
+    if(!this.type){
+        this.type = "auto";
+    }
+
+    var st = Ext.data.SortTypes;
+    // named sortTypes are supported, here we look them up
+    if(typeof this.sortType == "string"){
+        this.sortType = st[this.sortType];
+    }
+
+    // set default sortType for strings and dates
+    if(!this.sortType){
+        switch(this.type){
+            case "string":
+                this.sortType = st.asUCString;
+                break;
+            case "date":
+                this.sortType = st.asDate;
+                break;
+            default:
+                this.sortType = st.none;
+        }
+    }
+
+    // define once
+    var stripRe = /[\$,%]/g;
+
+    // prebuilt conversion function for this field, instead of
+    // switching every time we're reading a value
+    if(!this.convert){
+        var cv, dateFormat = this.dateFormat;
+        switch(this.type){
+            case "":
+            case "auto":
+            case undefined:
+                cv = function(v){ return v; };
+                break;
+            case "string":
+                cv = function(v){ return (v === undefined || v === null) ? '' : String(v); };
+                break;
+            case "int":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseInt(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "float":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseFloat(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "bool":
+            case "boolean":
+                cv = function(v){ return v === true || v === "true" || v == 1; };
+                break;
+            case "date":
+                cv = function(v){
+                    if(!v){
+                        return '';
+                    }
+                    if(Ext.isDate(v)){
+                        return v;
+                    }
+                    if(dateFormat){
+                        if(dateFormat == "timestamp"){
+                            return new Date(v*1000);
+                        }
+                        if(dateFormat == "time"){
+                            return new Date(parseInt(v, 10));
+                        }
+                        return Date.parseDate(v, dateFormat);
+                    }
+                    var parsed = Date.parse(v);
+                    return parsed ? new Date(parsed) : null;
+                };
+             break;
+
+        }
+        this.convert = cv;
+    }
+};
+
+Ext.data.Field.prototype = {
+    /**
+     * @cfg {String} name
+     * The name by which the field is referenced within the Record. This is referenced by, for example,
+     * the <tt>dataIndex</tt> property in column definition objects passed to {@link Ext.grid.ColumnModel}.
+     * <p>Note: In the simplest case, if no properties other than <tt>name</tt> are required, a field
+     * definition may consist of just a String for the field name.</p>
+     */
+    /**
+     * @cfg {String} type
+     * (Optional) The data type for conversion to displayable value if <tt>{@link Ext.data.Field#convert convert}</tt>
+     * has not been specified. Possible values are
+     * <div class="mdetail-params"><ul>
+     * <li>auto (Default, implies no conversion)</li>
+     * <li>string</li>
+     * <li>int</li>
+     * <li>float</li>
+     * <li>boolean</li>
+     * <li>date</li></ul></div>
+     */
+    /**
+     * @cfg {Function} convert
+     * (Optional) A function which converts the value provided by the Reader into an object that will be stored
+     * in the Record. It is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><b>v</b> : Mixed<div class="sub-desc">The data value as read by the Reader, if undefined will use
+     * the configured <tt>{@link Ext.data.Field#defaultValue defaultValue}</tt>.</div></li>
+     * <li><b>rec</b> : Mixed<div class="sub-desc">The data object containing the row as read by the Reader.
+     * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object
+     *  ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).</div></li>
+     * </ul></div>
+     * <pre><code>
+// example of convert function
+function fullName(v, record){
+    return record.name.last + ', ' + record.name.first;
+}
+
+function location(v, record){
+    return !record.city ? '' : (record.city + ', ' + record.state);
+}
+
+var Dude = Ext.data.Record.create([
+    {name: 'fullname',  convert: fullName},
+    {name: 'firstname', mapping: 'name.first'},
+    {name: 'lastname',  mapping: 'name.last'},
+    {name: 'city', defaultValue: 'homeless'},
+    'state',
+    {name: 'location',  convert: location}
+]);
+
+// create the data store
+var store = new Ext.data.Store({
+    reader: new Ext.data.JsonReader(
+        {
+            idProperty: 'key',
+            root: 'daRoot',  
+            totalProperty: 'total'
+        },
+        Dude  // recordType
+    )
+});
+
+var myData = [
+    { key: 1,
+      name: { first: 'Fat',    last:  'Albert' }
+      // notice no city, state provided in data object
+    },
+    { key: 2,
+      name: { first: 'Barney', last:  'Rubble' },
+      city: 'Bedrock', state: 'Stoneridge'
+    },
+    { key: 3,
+      name: { first: 'Cliff',  last:  'Claven' },
+      city: 'Boston',  state: 'MA'
+    }
+];
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} dateFormat
+     * (Optional) A format string for the {@link Date#parseDate Date.parseDate} function, or "timestamp" if the
+     * value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a
+     * javascript millisecond timestamp.
+     */
+    dateFormat: null,
+    /**
+     * @cfg {Mixed} defaultValue
+     * (Optional) The default value used <b>when a Record is being created by a {@link Ext.data.Reader Reader}</b>
+     * when the item referenced by the <tt>{@link Ext.data.Field#mapping mapping}</tt> does not exist in the data
+     * object (i.e. undefined). (defaults to "")
+     */
+    defaultValue: "",
+    /**
+     * @cfg {String/Number} mapping
+     * <p>(Optional) A path expression for use by the {@link Ext.data.DataReader} implementation
+     * that is creating the {@link Ext.data.Record Record} to extract the Field value from the data object.
+     * If the path expression is the same as the field name, the mapping may be omitted.</p>
+     * <p>The form of the mapping expression depends on the Reader being used.</p>
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.data.JsonReader}<div class="sub-desc">The mapping is a string containing the javascript
+     * expression to reference the data from an element of the data item's {@link Ext.data.JsonReader#root root} Array. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.XmlReader}<div class="sub-desc">The mapping is an {@link Ext.DomQuery} path to the data
+     * item relative to the DOM element that represents the {@link Ext.data.XmlReader#record record}. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.ArrayReader}<div class="sub-desc">The mapping is a number indicating the Array index
+     * of the field's value. Defaults to the field specification's Array position.</div></li>
+     * </ul></div>
+     * <p>If a more complex value extraction strategy is required, then configure the Field with a {@link #convert}
+     * function. This is passed the whole row object, and may interrogate it in whatever way is necessary in order to
+     * return the desired data.</p>
+     */
+    mapping: null,
+    /**
+     * @cfg {Function} sortType
+     * (Optional) A function which converts a Field's value to a comparable value in order to ensure
+     * correct sort ordering. Predefined functions are provided in {@link Ext.data.SortTypes}. A custom
+     * sort example:<pre><code>
+// current sort     after sort we want
+// +-+------+          +-+------+
+// |1|First |          |1|First |
+// |2|Last  |          |3|Second|
+// |3|Second|          |2|Last  |
+// +-+------+          +-+------+
+
+sortType: function(value) {
+   switch (value.toLowerCase()) // native toLowerCase():
+   {
+      case 'first': return 1;
+      case 'second': return 2;
+      default: return 3;
+   }
+}
+     * </code></pre>
+     */
+    sortType : null,
+    /**
+     * @cfg {String} sortDir
+     * (Optional) Initial direction to sort (<tt>"ASC"</tt> or  <tt>"DESC"</tt>).  Defaults to
+     * <tt>"ASC"</tt>.
+     */
+    sortDir : "ASC",
+	/**
+	 * @cfg {Boolean} allowBlank 
+	 * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to <tt>true</tt>.
+	 * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid}
+	 * to evaluate to <tt>false</tt>.
+	 */
+	allowBlank : true
+};/**
+ * @class Ext.data.DataReader
+ * Abstract base class for reading structured data from a data source and converting
+ * it into an object containing {@link Ext.data.Record} objects and metadata for use
+ * by an {@link Ext.data.Store}.  This class is intended to be extended and should not
+ * be created directly. For existing implementations, see {@link Ext.data.ArrayReader},
+ * {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader}.
+ * @constructor Create a new DataReader
+ * @param {Object} meta Metadata configuration options (implementation-specific).
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created using {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.DataReader = function(meta, recordType){
+    /**
+     * This DataReader's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    this.meta = meta;
+    /**
+     * @cfg {Array/Object} fields
+     * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+     * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+     * constructor created from {@link Ext.data.Record#create}.</p>
+     */
+    this.recordType = Ext.isArray(recordType) ?
+        Ext.data.Record.create(recordType) : recordType;
+};
+
+Ext.data.DataReader.prototype = {
+
+    /**
+     * Abstract method, overridden in {@link Ext.data.JsonReader}
+     */
+    buildExtractors : Ext.emptyFn,
+
+    /**
+     * Used for un-phantoming a record after a successful database insert.  Sets the records pk along with new data from server.
+     * You <b>must</b> return at least the database pk using the idProperty defined in your DataReader configuration.  The incoming
+     * data from server will be merged with the data in the local record.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed.
+     * @param {Record/Record[]} record The phantom record to be realized.
+     * @param {Object/Object[]} data The new record data to apply.  Must include the primary-key from database defined in idProperty field.
+     */
+    realize: function(rs, data){
+        if (Ext.isArray(rs)) {
+            for (var i = rs.length - 1; i >= 0; i--) {
+                // recurse
+                if (Ext.isArray(data)) {
+                    this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole invalid data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.realize(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+            // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: Let exception-handler choose to commit or not rather than blindly rs.commit() here.
+                //rs.commit();
+                throw new Ext.data.DataReader.Error('realize', rs);
+            }
+            this.buildExtractors();
+            var values = this.extractValues(data, rs.fields.items, rs.fields.items.length);
+            rs.phantom = false; // <-- That's what it's all about
+            rs._phid = rs.id;  // <-- copy phantom-id -> _phid, so we can remap in Store#onCreateRecords
+            rs.id = data[this.meta.idProperty];
+            rs.data = values;
+            rs.commit();
+        }
+    },
+
+    /**
+     * Used for updating a non-phantom or "real" record's data with fresh data from server after remote-save.
+     * You <b>must</b> return a complete new record from the server.  If you don't, your local record's missing fields
+     * will be populated with the default values specified in your Ext.data.Record.create specification.  Without a defaultValue,
+     * local fields will be populated with empty string "".  So return your entire record's data after both remote create and update.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed as the record receives
+     * a fresh new data-hash.
+     * @param {Record/Record[]} rs
+     * @param {Object/Object[]} data
+     */
+    update : function(rs, data) {
+        if (Ext.isArray(rs)) {
+            for (var i=rs.length-1; i >= 0; i--) {
+                if (Ext.isArray(data)) {
+                    this.update(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.update(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+                     // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: create custom Exception class to return record in thrown exception.  Allow exception-handler the choice
+                // to commit or not rather than blindly rs.commit() here.
+                rs.commit();
+                throw new Ext.data.DataReader.Error('update', rs);
+            }
+            this.buildExtractors();
+            rs.data = this.extractValues(Ext.apply(rs.data, data), rs.fields.items, rs.fields.items.length);
+            rs.commit();
+        }
+    },
+
+    /**
+     * Returns true if the supplied data-hash <b>looks</b> and quacks like data.  Checks to see if it has a key
+     * corresponding to idProperty defined in your DataReader config containing non-empty pk.
+     * @param {Object} data
+     * @return {Boolean}
+     */
+    isData : function(data) {
+        return (data && Ext.isObject(data) && !Ext.isEmpty(data[this.meta.idProperty])) ? true : false;
+    }
+};
+
+/**
+ * @class Ext.data.DataReader.Error
+ * @extends Ext.Error
+ * General error class for Ext.data.DataReader
+ */
+Ext.data.DataReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataReader'
+});
+Ext.apply(Ext.data.DataReader.Error.prototype, {
+    lang : {
+        'update': "#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",
+        'realize': "#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.",
+        'invalid-response': "#readResponse received an invalid response from the server."
+    }
+});
+
+
+/**
+ * @class Ext.data.DataWriter
+ * <p>Ext.data.DataWriter facilitates create, update, and destroy actions between
+ * an Ext.data.Store and a server-side framework. A Writer enabled Store will
+ * automatically manage the Ajax requests to perform CRUD actions on a Store.</p>
+ * <p>Ext.data.DataWriter is an abstract base class which is intended to be extended
+ * and should not be created directly. For existing implementations, see
+ * {@link Ext.data.JsonWriter}.</p>
+ * <p>Creating a writer is simple:</p>
+ * <pre><code>
+var writer = new Ext.data.JsonWriter();
+ * </code></pre>
+ * <p>The proxy for a writer enabled store can be configured with a simple <code>url</code>:</p>
+ * <pre><code>
+// Create a standard HttpProxy instance.
+var proxy = new Ext.data.HttpProxy({
+    url: 'app.php/users'
+});
+ * </code></pre>
+ * <p>For finer grained control, the proxy may also be configured with an <code>api</code>:</p>
+ * <pre><code>
+// Use the api specification
+var proxy = new Ext.data.HttpProxy({
+    api: {
+        read    : 'app.php/users/read',
+        create  : 'app.php/users/create',
+        update  : 'app.php/users/update',
+        destroy : 'app.php/users/destroy'
+    }
+});
+ * </code></pre>
+ * <p>Creating a Writer enabled store:</p>
+ * <pre><code>
+var store = new Ext.data.Store({
+    proxy: proxy,
+    reader: reader,
+    writer: writer
+});
+ * </code></pre>
+ * @constructor Create a new DataWriter
+ * @param {Object} meta Metadata configuration options (implementation-specific)
+ * @param {Object} recordType Either an Array of field definition objects as specified
+ * in {@link Ext.data.Record#create}, or an {@link Ext.data.Record} object created
+ * using {@link Ext.data.Record#create}.
+ */
+Ext.data.DataWriter = function(config){
+    /**
+     * This DataWriter's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    Ext.apply(this, config);
+};
+
+Ext.data.DataWriter.prototype = {
+
+    /**
+     * @cfg {Boolean} writeAllFields
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have DataWriter return ALL fields of a modified
+     * record -- not just those that changed.
+     * <tt>false</tt> to have DataWriter only request modified fields from a record.
+     */
+    writeAllFields : false,
+    /**
+     * @cfg {Boolean} listful
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have the DataWriter <b>always</b> write HTTP params as a list,
+     * even when acting upon a single record.
+     */
+    listful : false,    // <-- listful is actually not used internally here in DataWriter.  @see Ext.data.Store#execute.
+
+    /**
+     * Writes data in preparation for server-write action.  Simply proxies to DataWriter#update, DataWriter#create
+     * DataWriter#destroy.
+     * @param {String} action [CREATE|UPDATE|DESTROY]
+     * @param {Object} params The params-hash to write-to
+     * @param {Record/Record[]} rs The recordset write.
+     */
+    write : function(action, params, rs) {
+        this.render(action, rs, params, this[action](rs));
+    },
+
+    /**
+     * abstract method meant to be overridden by all DataWriter extensions.  It's the extension's job to apply the "data" to the "params".
+     * The data-object provided to render is populated with data according to the meta-info defined in the user's DataReader config,
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs Store recordset
+     * @param {Object} params Http params to be sent to server.
+     * @param {Object} data object populated according to DataReader meta-data.
+     */
+    render : Ext.emptyFn,
+
+    /**
+     * update
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    update : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                ids.push(val.id);
+                data.push(this.updateRecord(val));
+            }, this);
+            params[this.meta.idProperty] = ids;
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.idProperty] = rs.id;
+            params[this.meta.root] = this.updateRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} saveRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#saveRecord JsonWriter.saveRecord}
+     */
+    updateRecord : Ext.emptyFn,
+
+    /**
+     * create
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    create : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [];
+            Ext.each(rs, function(val){
+                data.push(this.createRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.createRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} createRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#createRecord JsonWriter.createRecord})
+     */
+    createRecord : Ext.emptyFn,
+
+    /**
+     * destroy
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    destroy : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                data.push(this.destroyRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        } else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.destroyRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} destroyRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#destroyRecord JsonWriter.destroyRecord})
+     */
+    destroyRecord : Ext.emptyFn,
+
+    /**
+     * Converts a Record to a hash
+     * @param {Record}
+     * @private
+     */
+    toHash : function(rec) {
+        var map = rec.fields.map,
+            data = {},
+            raw = (this.writeAllFields === false && rec.phantom === false) ? rec.getChanges() : rec.data,
+            m;
+        Ext.iterate(raw, function(prop, value){
+            if((m = map[prop])){
+                data[m.mapping ? m.mapping : m.name] = value;
+            }
+        });
+        data[this.meta.idProperty] = rec.id;
+        return data;
+    }
+};/**
+ * @class Ext.data.DataProxy
+ * @extends Ext.util.Observable
+ * <p>Abstract base class for implementations which provide retrieval of unformatted data objects.
+ * This class is intended to be extended and should not be created directly. For existing implementations,
+ * see {@link Ext.data.DirectProxy}, {@link Ext.data.HttpProxy}, {@link Ext.data.ScriptTagProxy} and
+ * {@link Ext.data.MemoryProxy}.</p>
+ * <p>DataProxy implementations are usually used in conjunction with an implementation of {@link Ext.data.DataReader}
+ * (of the appropriate type which knows how to parse the data object) to provide a block of
+ * {@link Ext.data.Records} to an {@link Ext.data.Store}.</p>
+ * <p>The parameter to a DataProxy constructor may be an {@link Ext.data.Connection} or can also be the
+ * config object to an {@link Ext.data.Connection}.</p>
+ * <p>Custom implementations must implement either the <code><b>doRequest</b></code> method (preferred) or the
+ * <code>load</code> method (deprecated). See
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#doRequest doRequest} or
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#load load} for additional details.</p>
+ * <p><b><u>Example 1</u></b></p>
+ * <pre><code>
+proxy: new Ext.data.ScriptTagProxy({
+    {@link Ext.data.Connection#url url}: 'http://extjs.com/forum/topics-remote.php'
+}),
+ * </code></pre>
+ * <p><b><u>Example 2</u></b></p>
+ * <pre><code>
+proxy : new Ext.data.HttpProxy({
+    {@link Ext.data.Connection#method method}: 'GET',
+    {@link Ext.data.HttpProxy#prettyUrls prettyUrls}: false,
+    {@link Ext.data.Connection#url url}: 'local/default.php', // see options parameter for {@link Ext.Ajax#request}
+    {@link #api}: {
+        // all actions except the following will use above url
+        create  : 'local/new.php',
+        update  : 'local/update.php'
+    }
+}),
+ * </code></pre>
+ */
+Ext.data.DataProxy = function(conn){
+    // make sure we have a config object here to support ux proxies.
+    // All proxies should now send config into superclass constructor.
+    conn = conn || {};
+
+    // This line caused a bug when people use custom Connection object having its own request method.
+    // http://extjs.com/forum/showthread.php?t=67194.  Have to set DataProxy config
+    //Ext.applyIf(this, conn);
+
+    this.api     = conn.api;
+    this.url     = conn.url;
+    this.restful = conn.restful;
+    this.listeners = conn.listeners;
+
+    // deprecated
+    this.prettyUrls = conn.prettyUrls;
+
+    /**
+     * @cfg {Object} api
+     * Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
+     * Defaults to:<pre><code>
+api: {
+    read    : undefined,
+    create  : undefined,
+    update  : undefined,
+    destroy : undefined
+}
+</code></pre>
+     * <p>If the specific URL for a given CRUD action is undefined, the CRUD action request
+     * will be directed to the configured <tt>{@link Ext.data.Connection#url url}</tt>.</p>
+     * <br><p><b>Note</b>: To modify the URL for an action dynamically the appropriate API
+     * property should be modified before the action is requested using the corresponding before
+     * action event.  For example to modify the URL associated with the load action:
+     * <pre><code>
+// modify the url for the action
+myStore.on({
+    beforeload: {
+        fn: function (store, options) {
+            // use <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> to change the URL for *just* this request.
+            store.proxy.setUrl('changed1.php');
+
+            // set optional second parameter to true to make this URL change
+            // permanent, applying this URL for all subsequent requests.
+            store.proxy.setUrl('changed1.php', true);
+
+            // manually set the <b>private</b> connection URL.
+            // <b>Warning:</b>  Accessing the private URL property should be avoided.
+            // Use the public method <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> instead, shown above.
+            // It should be noted that changing the URL like this will affect
+            // the URL for just this request.  Subsequent requests will use the
+            // API or URL defined in your initial proxy configuration.
+            store.proxy.conn.url = 'changed1.php';
+
+            // proxy URL will be superseded by API (only if proxy created to use ajax):
+            // It should be noted that proxy API changes are permanent and will
+            // be used for all subsequent requests.
+            store.proxy.api.load = 'changed2.php';
+
+            // However, altering the proxy API should be done using the public
+            // method <tt>{@link Ext.data.DataProxy#setApi setApi}</tt> instead.
+            store.proxy.setApi('load', 'changed2.php');
+
+            // Or set the entire API with a config-object.
+            // When using the config-object option, you must redefine the <b>entire</b>
+            // API -- not just a specific action of it.
+            store.proxy.setApi({
+                read    : 'changed_read.php',
+                create  : 'changed_create.php',
+                update  : 'changed_update.php',
+                destroy : 'changed_destroy.php'
+            });
+        }
+    }
+});
+     * </code></pre>
+     * </p>
+     */
+    // Prepare the proxy api.  Ensures all API-actions are defined with the Object-form.
+    try {
+        Ext.data.Api.prepare(this);
+    } catch (e) {
+        if (e instanceof Ext.data.Api.Error) {
+            e.toConsole();
+        }
+    }
+
+    this.addEvents(
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through a corresponding
+         * {@link Ext.data.Store}.{@link Ext.data.Store#exception exception},
+         * so any Store instance may observe this event.
+         * This event can be fired for one of two reasons:</p>
+         * <div class="mdetail-params"><ul>
+         * <li>remote-request <b>failed</b> : <div class="sub-desc">
+         * The server did not return status === 200.
+         * </div></li>
+         * <li>remote-request <b>succeeded</b> : <div class="sub-desc">
+         * The remote-request succeeded but the reader could not read the response.
+         * This means the server returned data, but the configured Reader threw an
+         * error while reading the response.  In this case, this event will be
+         * raised and the caught error will be passed along into this event.
+         * </div></li>
+         * </ul></div>
+         * <br><p>This event fires with two different contexts based upon the 2nd
+         * parameter <tt>type [remote|response]</tt>.  The first four parameters
+         * are identical between the two contexts -- only the final two parameters
+         * differ.</p>
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} type
+         * <p>The value of this parameter will be either <tt>'response'</tt> or <tt>'remote'</tt>.</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>An <b>invalid</b> response from the server was returned: either 404,
+         * 500 or the response meta-data does not match that defined in the DataReader
+         * (e.g.: root, idProperty, successProperty).</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>A <b>valid</b> response was returned from the server having
+         * successProperty === false.  This response might contain an error-message
+         * sent from the server.  For example, the user may have failed
+         * authentication/authorization or a database validation error occurred.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {String} action Name of the action (see {@link Ext.data.Api#actions}.
+         * @param {Object} options The options for the action that were specified in the {@link #request}.
+         * @param {Object} response
+         * <p>The value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>The raw browser response object (e.g.: XMLHttpRequest)</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>The decoded response object sent from the server.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {Mixed} arg
+         * <p>The type and value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : Error<div class="sub-desc">
+         * <p>The JavaScript Error object caught if the configured Reader could not read the data.
+         * If the remote request returns success===false, this parameter will be null.</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : Record/Record[]<div class="sub-desc">
+         * <p>This parameter will only exist if the <tt>action</tt> was a <b>write</b> action
+         * (Ext.data.Api.actions.create|update|destroy).</p>
+         * </div></li>
+         * </ul></div>
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request to retrieve a data object.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} params The params object passed to the {@link #request} function
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires before the load method's callback is called.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} o The request transaction object
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b>.  The signature of the loadexception event
+         * varies depending on the proxy, use the catch-all {@link #exception} event instead.
+         * This event will fire in addition to the {@link #exception} event.</p>
+         * @param {misc} misc See {@link #exception}.
+         * @deprecated
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy
+         * @param {DataProxy} this The proxy for the request
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs The Record(s) to create|update|destroy.
+         * @param {Object} params The request <code>params</code> object.  Edit <code>params</code> to add parameters to the request.
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires before the request-callback is called
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} action [Ext.data.Api.actions.create|upate|destroy]
+         * @param {Object} data The data object extracted from the server-response
+         * @param {Object} response The decoded response from server
+         * @param {Record/Record{}} rs The records from Store
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'write'
+    );
+    Ext.data.DataProxy.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>Defaults to <tt>false</tt>.  Set to <tt>true</tt> to operate in a RESTful manner.</p>
+     * <br><p> Note: this parameter will automatically be set to <tt>true</tt> if the
+     * {@link Ext.data.Store} it is plugged into is set to <code>restful: true</code>. If the
+     * Store is RESTful, there is no need to set this option on the proxy.</p>
+     * <br><p>RESTful implementations enable the serverside framework to automatically route
+     * actions sent to one url based upon the HTTP method, for example:
+     * <pre><code>
+store: new Ext.data.Store({
+    restful: true,
+    proxy: new Ext.data.HttpProxy({url:'/users'}); // all requests sent to /users
+    ...
+)}
+     * </code></pre>
+     * There is no <code>{@link #api}</code> specified in the configuration of the proxy,
+     * all requests will be marshalled to a single RESTful url (/users) so the serverside
+     * framework can inspect the HTTP Method and act accordingly:
+     * <pre>
+<u>Method</u>   <u>url</u>        <u>action</u>
+POST     /users     create
+GET      /users     read
+PUT      /users/23  update
+DESTROY  /users/23  delete
+     * </pre></p>
+     */
+    restful: false,
+
+    /**
+     * <p>Redefines the Proxy's API or a single action of an API. Can be called with two method signatures.</p>
+     * <p>If called with an object as the only parameter, the object should redefine the <b>entire</b> API, e.g.:</p><pre><code>
+proxy.setApi({
+    read    : '/users/read',
+    create  : '/users/create',
+    update  : '/users/update',
+    destroy : '/users/destroy'
+});
+</code></pre>
+     * <p>If called with two parameters, the first parameter should be a string specifying the API action to
+     * redefine and the second parameter should be the URL (or function if using DirectProxy) to call for that action, e.g.:</p><pre><code>
+proxy.setApi(Ext.data.Api.actions.read, '/users/new_load_url');
+</code></pre>
+     * @param {String/Object} api An API specification object, or the name of an action.
+     * @param {String/Function} url The URL (or function if using DirectProxy) to call for the action.
+     */
+    setApi : function() {
+        if (arguments.length == 1) {
+            var valid = Ext.data.Api.isValid(arguments[0]);
+            if (valid === true) {
+                this.api = arguments[0];
+            }
+            else {
+                throw new Ext.data.Api.Error('invalid', valid);
+            }
+        }
+        else if (arguments.length == 2) {
+            if (!Ext.data.Api.isAction(arguments[0])) {
+                throw new Ext.data.Api.Error('invalid', arguments[0]);
+            }
+            this.api[arguments[0]] = arguments[1];
+        }
+        Ext.data.Api.prepare(this);
+    },
+
+    /**
+     * Returns true if the specified action is defined as a unique action in the api-config.
+     * request.  If all API-actions are routed to unique urls, the xaction parameter is unecessary.  However, if no api is defined
+     * and all Proxy actions are routed to DataProxy#url, the server-side will require the xaction parameter to perform a switch to
+     * the corresponding code for CRUD action.
+     * @param {String [Ext.data.Api.CREATE|READ|UPDATE|DESTROY]} action
+     * @return {Boolean}
+     */
+    isApiAction : function(action) {
+        return (this.api[action]) ? true : false;
+    },
+
+    /**
+     * All proxy actions are executed through this method.  Automatically fires the "before" + action event
+     * @param {String} action Name of the action
+     * @param {Ext.data.Record/Ext.data.Record[]/null} rs Will be null when action is 'load'
+     * @param {Object} params
+     * @param {Ext.data.DataReader} reader
+     * @param {Function} callback
+     * @param {Object} scope Scope with which to call the callback (defaults to the Proxy object)
+     * @param {Object} options Any options specified for the action (e.g. see {@link Ext.data.Store#load}.
+     */
+    request : function(action, rs, params, reader, callback, scope, options) {
+        if (!this.api[action] && !this.load) {
+            throw new Ext.data.DataProxy.Error('action-undefined', action);
+        }
+        params = params || {};
+        if ((action === Ext.data.Api.actions.read) ? this.fireEvent("beforeload", this, params) : this.fireEvent("beforewrite", this, action, rs, params) !== false) {
+            this.doRequest.apply(this, arguments);
+        }
+        else {
+            callback.call(scope || this, null, options, false);
+        }
+    },
+
+
+    /**
+     * <b>Deprecated</b> load method using old method signature. See {@doRequest} for preferred method.
+     * @deprecated
+     * @param {Object} params
+     * @param {Object} reader
+     * @param {Object} callback
+     * @param {Object} scope
+     * @param {Object} arg
+     */
+    load : null,
+
+    /**
+     * @cfg {Function} doRequest Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest},
+     * {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}).
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        // default implementation of doRequest for backwards compatibility with 2.0 proxies.
+        // If we're executing here, the action is probably "load".
+        // Call with the pre-3.0 method signature.
+        this.load(params, reader, callback, scope, options);
+    },
+
+    /**
+     * buildUrl
+     * Sets the appropriate url based upon the action being executed.  If restful is true, and only a single record is being acted upon,
+     * url will be built Rails-style, as in "/controller/action/32".  restful will aply iff the supplied record is an
+     * instance of Ext.data.Record rather than an Array of them.
+     * @param {String} action The api action being executed [read|create|update|destroy]
+     * @param {Ext.data.Record/Array[Ext.data.Record]} The record or Array of Records being acted upon.
+     * @return {String} url
+     * @private
+     */
+    buildUrl : function(action, record) {
+        record = record || null;
+        var url = (this.api[action]) ? this.api[action].url : this.url;
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', action);
+        }
+
+        var format = null;
+        var m = url.match(/(.*)(\.\w+)$/);  // <-- look for urls with "provides" suffix, e.g.: /users.json, /users.xml, etc
+        if (m) {
+            format = m[2];
+            url = m[1];
+        }
+        // prettyUrls is deprectated in favor of restful-config
+        if ((this.prettyUrls === true || this.restful === true) && record instanceof Ext.data.Record && !record.phantom) {
+            url += '/' + record.id;
+        }
+        if (format) {   // <-- append the request format if exists (ie: /users/update/69[.json])
+            url += format;
+        }
+        return url;
+    },
+
+    /**
+     * Destroys the proxy by purging any event listeners and cancelling any active requests.
+     */
+    destroy: function(){
+        this.purgeListeners();
+    }
+});
+
+/**
+ * @class Ext.data.DataProxy.Error
+ * @extends Ext.Error
+ * DataProxy Error extension.
+ * constructor
+ * @param {String} name
+ * @param {Record/Array[Record]/Array}
+ */
+Ext.data.DataProxy.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataProxy'
+});
+Ext.apply(Ext.data.DataProxy.Error.prototype, {
+    lang: {
+        'action-undefined': "DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.",
+        'api-invalid': 'Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions.'
+    }
+});
+/**
+ * @class Ext.data.ScriptTagProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain
+ * other than the originating domain of the running page.<br>
+ * <p>
+ * <b>Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain
+ * of the running page, you must use this class, rather than HttpProxy.</b><br>
+ * <p>
+ * The content passed back from a server resource requested by a ScriptTagProxy <b>must</b> be executable JavaScript
+ * source code because it is used as the source inside a &lt;script> tag.<br>
+ * <p>
+ * In order for the browser to process the returned data, the server must wrap the data object
+ * with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy.
+ * Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy
+ * depending on whether the callback name was passed:
+ * <p>
+ * <pre><code>
+boolean scriptTag = false;
+String cb = request.getParameter("callback");
+if (cb != null) {
+    scriptTag = true;
+    response.setContentType("text/javascript");
+} else {
+    response.setContentType("application/x-json");
+}
+Writer out = response.getWriter();
+if (scriptTag) {
+    out.write(cb + "(");
+}
+out.print(dataBlock.toJsonString());
+if (scriptTag) {
+    out.write(");");
+}
+</code></pre>
+ *
+ * @constructor
+ * @param {Object} config A configuration object.
+ */
+Ext.data.ScriptTagProxy = function(config){
+    Ext.apply(this, config);
+
+    Ext.data.ScriptTagProxy.superclass.constructor.call(this, config);
+
+    this.head = document.getElementsByTagName("head")[0];
+
+    /**
+     * @event loadexception
+     * <b>Deprecated</b> in favor of 'exception' event.
+     * Fires if an exception occurs in the Proxy during data loading.  This event can be fired for one of two reasons:
+     * <ul><li><b>The load call timed out.</b>  This means the load callback did not execute within the time limit
+     * specified by {@link #timeout}.  In this case, this event will be raised and the
+     * fourth parameter (read error) will be null.</li>
+     * <li><b>The load succeeded but the reader could not read the response.</b>  This means the server returned
+     * data, but the configured Reader threw an error while reading the data.  In this case, this event will be
+     * raised and the caught error will be passed along as the fourth parameter of this event.</li></ul>
+     * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly
+     * on any Store instance.
+     * @param {Object} this
+     * @param {Object} options The loading options that were specified (see {@link #load} for details).  If the load
+     * call timed out, this parameter will be null.
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data.
+     * If the remote request returns success: false, this parameter will be null.
+     */
+};
+
+Ext.data.ScriptTagProxy.TRANS_ID = 1000;
+
+Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {String} url The URL from which to request the data object.
+     */
+    /**
+     * @cfg {Number} timeout (optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
+     */
+    timeout : 30000,
+    /**
+     * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells
+     * the server the name of the callback function set up by the load call to process the returned data object.
+     * Defaults to "callback".<p>The server-side processing must read this parameter value, and generate
+     * javascript output which calls this named function passing the data object as its only parameter.
+     */
+    callbackParam : "callback",
+    /**
+     *  @cfg {Boolean} nocache (optional) Defaults to true. Disable caching by adding a unique parameter
+     * name to the request.
+     */
+    nocache : true,
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is <tt>read</tt>, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        var p = Ext.urlEncode(Ext.apply(params, this.extraParams));
+
+        var url = this.buildUrl(action, rs);
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', url);
+        }
+        url = Ext.urlAppend(url, p);
+
+        if(this.nocache){
+            url = Ext.urlAppend(url, '_dc=' + (new Date().getTime()));
+        }
+        var transId = ++Ext.data.ScriptTagProxy.TRANS_ID;
+        var trans = {
+            id : transId,
+            action: action,
+            cb : "stcCallback"+transId,
+            scriptId : "stcScript"+transId,
+            params : params,
+            arg : arg,
+            url : url,
+            callback : callback,
+            scope : scope,
+            reader : reader
+        };
+        window[trans.cb] = this.createCallback(action, rs, trans);
+        url += String.format("&{0}={1}", this.callbackParam, trans.cb);
+        if(this.autoAbort !== false){
+            this.abort();
+        }
+
+        trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]);
+
+        var script = document.createElement("script");
+        script.setAttribute("src", url);
+        script.setAttribute("type", "text/javascript");
+        script.setAttribute("id", trans.scriptId);
+        this.head.appendChild(script);
+
+        this.trans = trans;
+    },
+
+    // @private createCallback
+    createCallback : function(action, rs, trans) {
+        var self = this;
+        return function(res) {
+            self.trans = false;
+            self.destroyTrans(trans, true);
+            if (action === Ext.data.Api.actions.read) {
+                self.onRead.call(self, action, trans, res);
+            } else {
+                self.onWrite.call(self, action, trans, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, res) {
+        var result;
+        try {
+            result = trans.reader.readRecords(res);
+        }catch(e){
+            // @deprecated: fire loadexception
+            this.fireEvent("loadexception", this, trans, res, e);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, trans.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, trans, res);
+
+            this.fireEvent('exception', this, 'remote', action, trans, res, null);
+        } else {
+            this.fireEvent("load", this, res, trans.arg);
+        }
+        trans.callback.call(trans.scope||window, result, trans.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, res, rs) {
+        var reader = trans.reader;
+        try {
+            // though we already have a response object here in STP, run through readResponse to catch any meta-data exceptions.
+            reader.readResponse(action, res);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        if(!res[reader.meta.successProperty] === true){
+            this.fireEvent('exception', this, 'remote', action, trans, res, rs);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        this.fireEvent("write", this, action, res[reader.meta.root], res, rs, trans.arg );
+        trans.callback.call(trans.scope||window, res[reader.meta.root], res, true);
+    },
+
+    // private
+    isLoading : function(){
+        return this.trans ? true : false;
+    },
+
+    /**
+     * Abort the current server request.
+     */
+    abort : function(){
+        if(this.isLoading()){
+            this.destroyTrans(this.trans);
+        }
+    },
+
+    // private
+    destroyTrans : function(trans, isLoaded){
+        this.head.removeChild(document.getElementById(trans.scriptId));
+        clearTimeout(trans.timeoutId);
+        if(isLoaded){
+            window[trans.cb] = undefined;
+            try{
+                delete window[trans.cb];
+            }catch(e){}
+        }else{
+            // if hasn't been loaded, wait for load to remove it to prevent script error
+            window[trans.cb] = function(){
+                window[trans.cb] = undefined;
+                try{
+                    delete window[trans.cb];
+                }catch(e){}
+            };
+        }
+    },
+
+    // private
+    handleFailure : function(trans){
+        this.trans = false;
+        this.destroyTrans(trans, false);
+        if (trans.action === Ext.data.Api.actions.read) {
+            // @deprecated firing loadexception
+            this.fireEvent("loadexception", this, null, trans.arg);
+        }
+
+        this.fireEvent('exception', this, 'response', trans.action, {
+            response: null,
+            options: trans.arg
+        });
+        trans.callback.call(trans.scope||window, null, trans.arg, false);
+    },
+
+    // inherit docs
+    destroy: function(){
+        this.abort();
+        Ext.data.ScriptTagProxy.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.data.HttpProxy
+ * @extends Ext.data.DataProxy
+ * <p>An implementation of {@link Ext.data.DataProxy} that processes data requests within the same
+ * domain of the originating page.</p>
+ * <p><b>Note</b>: this class cannot be used to retrieve data from a domain other
+ * than the domain from which the running page was served. For cross-domain requests, use a
+ * {@link Ext.data.ScriptTagProxy ScriptTagProxy}.</p>
+ * <p>Be aware that to enable the browser to parse an XML document, the server must set
+ * the Content-Type header in the HTTP response to "<tt>text/xml</tt>".</p>
+ * @constructor
+ * @param {Object} conn
+ * An {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}.
+ * <p>Note that if this HttpProxy is being used by a (@link Ext.data.Store Store}, then the
+ * Store's call to {@link #load} will override any specified <tt>callback</tt> and <tt>params</tt>
+ * options. In this case, use the Store's {@link Ext.data.Store#events events} to modify parameters,
+ * or react to loading events. The Store's {@link Ext.data.Store#baseParams baseParams} may also be
+ * used to pass parameters known at instantiation time.</p>
+ * <p>If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make
+ * the request.</p>
+ */
+Ext.data.HttpProxy = function(conn){
+    Ext.data.HttpProxy.superclass.constructor.call(this, conn);
+
+    /**
+     * The Connection object (Or options parameter to {@link Ext.Ajax#request}) which this HttpProxy
+     * uses to make requests to the server. Properties of this object may be changed dynamically to
+     * change the way data is requested.
+     * @property
+     */
+    this.conn = conn;
+
+    // nullify the connection url.  The url param has been copied to 'this' above.  The connection
+    // url will be set during each execution of doRequest when buildUrl is called.  This makes it easier for users to override the
+    // connection url during beforeaction events (ie: beforeload, beforesave, etc).  The connection url will be nullified
+    // after each request as well.  Url is always re-defined during doRequest.
+    this.conn.url = null;
+
+    this.useAjax = !conn || !conn.events;
+
+    //private.  A hash containing active requests, keyed on action [Ext.data.Api.actions.create|read|update|destroy]
+    var actions = Ext.data.Api.actions;
+    this.activeRequest = {};
+    for (var verb in actions) {
+        this.activeRequest[actions[verb]] = undefined;
+    }
+};
+
+Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>If set to <tt>true</tt>, a {@link Ext.data.Record#phantom non-phantom} record's
+     * {@link Ext.data.Record#id id} will be appended to the url (defaults to <tt>false</tt>).</p><br>
+     * <p>The url is built based upon the action being executed <tt>[load|create|save|destroy]</tt>
+     * using the commensurate <tt>{@link #api}</tt> property, or if undefined default to the
+     * configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.</p><br>
+     * <p>Some MVC (e.g., Ruby on Rails, Merb and Django) support this style of segment based urls
+     * where the segments in the URL follow the Model-View-Controller approach.</p><pre><code>
+     * someSite.com/controller/action/id
+     * </code></pre>
+     * Where the segments in the url are typically:<div class="mdetail-params"><ul>
+     * <li>The first segment : represents the controller class that should be invoked.</li>
+     * <li>The second segment : represents the class function, or method, that should be called.</li>
+     * <li>The third segment : represents the ID (a variable typically passed to the method).</li>
+     * </ul></div></p>
+     * <p>For example:</p>
+     * <pre><code>
+api: {
+    load :    '/controller/load',
+    create :  '/controller/new',  // Server MUST return idProperty of new record
+    save :    '/controller/update',
+    destroy : '/controller/destroy_action'
+}
+
+// Alternatively, one can use the object-form to specify each API-action
+api: {
+    load: {url: 'read.php', method: 'GET'},
+    create: 'create.php',
+    destroy: 'destroy.php',
+    save: 'update.php'
+}
+     */
+
+    /**
+     * Return the {@link Ext.data.Connection} object being used by this Proxy.
+     * @return {Connection} The Connection object. This object may be used to subscribe to events on
+     * a finer-grained basis than the DataProxy events.
+     */
+    getConnection : function() {
+        return this.useAjax ? Ext.Ajax : this.conn;
+    },
+
+    /**
+     * Used for overriding the url used for a single request.  Designed to be called during a beforeaction event.  Calling setUrl
+     * will override any urls set via the api configuration parameter.  Set the optional parameter makePermanent to set the url for
+     * all subsequent requests.  If not set to makePermanent, the next request will use the same url or api configuration defined
+     * in the initial proxy configuration.
+     * @param {String} url
+     * @param {Boolean} makePermanent (Optional) [false]
+     *
+     * (e.g.: beforeload, beforesave, etc).
+     */
+    setUrl : function(url, makePermanent) {
+        this.conn.url = url;
+        if (makePermanent === true) {
+            this.url = url;
+            Ext.data.Api.prepare(this);
+        }
+    },
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action The crud action type (create, read, update, destroy)
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback
+     * <div class="sub-desc"><p>A function to be called after the request.
+     * The <tt>callback</tt> is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[] The block of Ext.data.Records.</li>
+     * <li><tt>options</tt>: Options object from the action request</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, cb, scope, arg) {
+        var  o = {
+            method: (this.api[action]) ? this.api[action]['method'] : undefined,
+            request: {
+                callback : cb,
+                scope : scope,
+                arg : arg
+            },
+            reader: reader,
+            callback : this.createCallback(action, rs),
+            scope: this
+        };
+        // Sample the request data:  If it's an object, then it hasn't been json-encoded yet.
+        // Transmit data using jsonData config of Ext.Ajax.request
+        if (typeof(params[reader.meta.root]) === 'object') {
+            o.jsonData = params;
+        } else {
+            o.params = params || {};
+        }
+        // Set the connection url.  If this.conn.url is not null here,
+        // the user may have overridden the url during a beforeaction event-handler.
+        // this.conn.url is nullified after each request.
+        if (this.conn.url === null) {
+            this.conn.url = this.buildUrl(action, rs);
+        }
+        else if (this.restful === true && rs instanceof Ext.data.Record && !rs.phantom) {
+            this.conn.url += '/' + rs.id;
+        }
+        if(this.useAjax){
+
+            Ext.applyIf(o, this.conn);
+
+            // If a currently running request is found for this action, abort it.
+            if (this.activeRequest[action]) {
+                // Disabled aborting activeRequest while implementing REST.  activeRequest[action] will have to become an array
+                //Ext.Ajax.abort(this.activeRequest[action]);
+            }
+            this.activeRequest[action] = Ext.Ajax.request(o);
+        }else{
+            this.conn.request(o);
+        }
+        // request is sent, nullify the connection url in preparation for the next request
+        this.conn.url = null;
+    },
+
+    /**
+     * Returns a callback function for a request.  Note a special case is made for the
+     * read action vs all the others.
+     * @param {String} action [create|update|delete|load]
+     * @param {Ext.data.Record[]} rs The Store-recordset being acted upon
+     * @private
+     */
+    createCallback : function(action, rs) {
+        return function(o, success, response) {
+            this.activeRequest[action] = undefined;
+            if (!success) {
+                if (action === Ext.data.Api.actions.read) {
+                    // @deprecated: fire loadexception for backwards compat.
+                    this.fireEvent('loadexception', this, o, response);
+                }
+                this.fireEvent('exception', this, 'response', action, o, response);
+                o.request.callback.call(o.request.scope, null, o.request.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, o, response);
+            } else {
+                this.onWrite(action, o, response, rs);
+            }
+        }
+    },
+
+    /**
+     * Callback for read action
+     * @param {String} action Action name as per {@link Ext.data.Api.actions#read}.
+     * @param {Object} o The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, o, response) {
+        var result;
+        try {
+            result = o.reader.read(response);
+        }catch(e){
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response, e);
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response);
+
+            // Get DataReader read-back a response-object to pass along to exception event
+            var res = o.reader.readResponse(action, response);
+            this.fireEvent('exception', this, 'remote', action, o, res, null);
+        }
+        else {
+            this.fireEvent('load', this, o, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, result, o.request.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, o, response, rs) {
+        var reader = o.reader;
+        var res;
+        try {
+            res = reader.readResponse(action, response);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (res[reader.meta.successProperty] === false) {
+            this.fireEvent('exception', this, 'remote', action, o, res, rs);
+        } else {
+            this.fireEvent('write', this, action, res[reader.meta.root], res, rs, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, res[reader.meta.root], res, res[reader.meta.successProperty]);
+    },
+
+    // inherit docs
+    destroy: function(){
+        if(!this.useAjax){
+            this.conn.abort();
+        }else if(this.activeRequest){
+            var actions = Ext.data.Api.actions;
+            for (var verb in actions) {
+                if(this.activeRequest[actions[verb]]){
+                    Ext.Ajax.abort(this.activeRequest[actions[verb]]);
+                }
+            }
+        }
+        Ext.data.HttpProxy.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.data.MemoryProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor
+ * to the Reader when its load method is called.
+ * @constructor
+ * @param {Object} data The data object which the Reader uses to construct a block of Ext.data.Records.
+ */
+Ext.data.MemoryProxy = function(data){
+    // Must define a dummy api with "read" action to satisfy DataProxy#doRequest and Ext.data.Api#prepare *before* calling super
+    var api = {};
+    api[Ext.data.Api.actions.read] = true;
+    Ext.data.MemoryProxy.superclass.constructor.call(this, {
+        api: api
+    });
+    this.data = data;
+};
+
+Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {
+    /**
+     * @event loadexception
+     * Fires if an exception occurs in the Proxy during data loading. Note that this event is also relayed
+     * through {@link Ext.data.Store}, so you can listen for it directly on any Store instance.
+     * @param {Object} this
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Object} null This parameter does not apply and will always be null for MemoryProxy
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data
+     */
+
+       /**
+     * MemoryProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        // No implementation for CRUD in MemoryProxy.  Assumes all actions are 'load'
+        params = params || {};
+        var result;
+        try {
+            result = reader.readRecords(this.data);
+        }catch(e){
+            // @deprecated loadexception
+            this.fireEvent("loadexception", this, null, arg, e);
+
+            this.fireEvent('exception', this, 'response', action, arg, null, e);
+            callback.call(scope, null, arg, false);
+            return;
+        }
+        callback.call(scope, result, arg, true);
+    }
+});/**
+ * @class Ext.data.JsonWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action.
+ */
+Ext.data.JsonWriter = function(config) {
+    Ext.data.JsonWriter.superclass.constructor.call(this, config);
+    // careful to respect "returnJson", renamed to "encode"
+    if (this.returnJson != undefined) {
+        this.encode = this.returnJson;
+    }
+}
+Ext.extend(Ext.data.JsonWriter, Ext.data.DataWriter, {
+    /**
+     * @cfg {Boolean} returnJson <b>Deprecated.  Use {@link Ext.data.JsonWriter#encode} instead.
+     */
+    returnJson : undefined,
+    /**
+     * @cfg {Boolean} encode <tt>true</tt> to {@link Ext.util.JSON#encode encode} the
+     * {@link Ext.data.DataWriter#toHash hashed data}. Defaults to <tt>true</tt>.  When using
+     * {@link Ext.data.DirectProxy}, set this to <tt>false</tt> since Ext.Direct.JsonProvider will perform
+     * its own json-encoding.  In addition, if you're using {@link Ext.data.HttpProxy}, setting to <tt>false</tt>
+     * will cause HttpProxy to transmit data using the <b>jsonData</b> configuration-params of {@link Ext.Ajax#request}
+     * instead of <b>params</b>.  When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are
+     * tuned to expect data through the jsonData mechanism.  In those cases, one will want to set <b>encode: <tt>false</tt></b>
+     */
+    encode : true,
+
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        Ext.apply(params, data);
+
+        if (this.encode === true) { // <-- @deprecated returnJson
+            if (Ext.isArray(rs) && data[this.meta.idProperty]) {
+                params[this.meta.idProperty] = Ext.encode(params[this.meta.idProperty]);
+            }
+            params[this.meta.root] = Ext.encode(params[this.meta.root]);
+        }
+    },
+    /**
+     * createRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        return this.toHash(rec);
+    },
+    /**
+     * updateRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        return this.toHash(rec);
+
+    },
+    /**
+     * destroyRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        return rec.id;
+    }
+});/**
+ * @class Ext.data.JsonReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from a JSON response
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'firstname'},                  // map the Record's "firstname" field to the row object's key of the same name
+    {name: 'job', mapping: 'occupation'}  // map the Record's "job" field to the row object's "occupation" key
+]);
+var myReader = new Ext.data.JsonReader(
+    {                             // The metadata property, with configuration options:
+        totalProperty: "results", //   the property which contains the total dataset size (optional)
+        root: "rows",             //   the property which contains an Array of record data objects
+        idProperty: "id"          //   the property within each row object that provides an ID for the record (optional)
+    },
+    Employee  // {@link Ext.data.Record} constructor that provides mapping for JSON object
+);
+</code></pre>
+ * <p>This would consume a JSON data object of the form:</p><pre><code>
+{
+    results: 2,  // Reader's configured totalProperty
+    rows: [      // Reader's configured root
+        { id: 1, firstname: 'Bill', occupation: 'Gardener' },         // a row object
+        { id: 2, firstname: 'Ben' , occupation: 'Horticulturalist' }  // another row object
+    ]
+}
+</code></pre>
+ * <p><b><u>Automatic configuration using metaData</u></b></p>
+ * <p>It is possible to change a JsonReader's metadata at any time by including a <b><tt>metaData</tt></b>
+ * property in the JSON data object. If the JSON data object has a <b><tt>metaData</tt></b> property, a
+ * {@link Ext.data.Store Store} object using this Reader will reconfigure itself to use the newly provided
+ * field definition and fire its {@link Ext.data.Store#metachange metachange} event. The metachange event
+ * handler may interrogate the <b><tt>metaData</tt></b> property to perform any configuration required.
+ * Note that reconfiguring a Store potentially invalidates objects which may refer to Fields or Records
+ * which no longer exist.</p>
+ * <p>The <b><tt>metaData</tt></b> property in the JSON data object may contain:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>any of the configuration options for this class</li>
+ * <li>a <b><tt>{@link Ext.data.Record#fields fields}</tt></b> property which the JsonReader will
+ * use as an argument to the {@link Ext.data.Record#create data Record create method} in order to
+ * configure the layout of the Records it will produce.</li>
+ * <li>a <b><tt>{@link Ext.data.Store#sortInfo sortInfo}</tt></b> property which the JsonReader will
+ * use to set the {@link Ext.data.Store}'s {@link Ext.data.Store#sortInfo sortInfo} property</li>
+ * <li>any user-defined properties needed</li>
+ * </ul></div>
+ * <p>To use this facility to send the same data as the example above (without having to code the creation
+ * of the Record constructor), you would create the JsonReader like this:</p><pre><code>
+var myReader = new Ext.data.JsonReader();
+</code></pre>
+ * <p>The first data packet from the server would configure the reader by containing a
+ * <b><tt>metaData</tt></b> property <b>and</b> the data. For example, the JSON data object might take
+ * the form:</p>
+<pre><code>
+{
+    metaData: {
+        idProperty: 'id',
+        root: 'rows',
+        totalProperty: 'results',
+        fields: [
+            {name: 'name'},
+            {name: 'job', mapping: 'occupation'}
+        ],
+        sortInfo: {field: 'name', direction:'ASC'}, // used by store to set its sortInfo
+        foo: 'bar' // custom property
+    },
+    results: 2,
+    rows: [ // an Array
+        { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
+        { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' }
+    ]
+}
+</code></pre>
+ * @cfg {String} totalProperty [total] Name of the property from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.  Defaults to <tt>total</tt>.
+ * @cfg {String} successProperty [success] Name of the property from which to
+ * retrieve the success attribute. Defaults to <tt>success</tt>.  See
+ * {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+ * for additional information.
+ * @cfg {String} root [undefined] <b>Required</b>.  The name of the property
+ * which contains the Array of row objects.  Defaults to <tt>undefined</tt>.
+ * An exception will be thrown if the root property is undefined. The data packet
+ * value for this property should be an empty array to clear the data or show
+ * no data.
+ * @cfg {String} idProperty [id] Name of the property within a row object that contains a record identifier value.  Defaults to <tt>id</tt>
+ * @constructor
+ * Create a new JsonReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.JsonReader = function(meta, recordType){
+    meta = meta || {};
+
+    // default idProperty, successProperty & totalProperty -> "id", "success", "total"
+    Ext.applyIf(meta, {
+        idProperty: 'id',
+        successProperty: 'success',
+        totalProperty: 'total'
+    });
+
+    Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
+    /**
+     * This JsonReader's metadata as passed to the constructor, or as passed in
+     * the last data packet's <b><tt>metaData</tt></b> property.
+     * @type Mixed
+     * @property meta
+     */
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the JSON data in its responseText.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var json = response.responseText;
+        var o = Ext.decode(json);
+        if(!o) {
+            throw {message: "JsonReader.read: Json object not found"};
+        }
+        return this.readRecords(o);
+    },
+
+    // private function a store will implement
+    onMetaChange : function(meta, recordType, o){
+
+    },
+
+    /**
+     * @ignore
+     */
+    simpleAccess: function(obj, subsc) {
+        return obj[subsc];
+    },
+
+    /**
+     * @ignore
+     */
+    getJsonAccessor: function(){
+        var re = /[\[\.]/;
+        return function(expr) {
+            try {
+                return(re.test(expr)) ?
+                new Function("obj", "return obj." + expr) :
+                function(obj){
+                    return obj[expr];
+                };
+            } catch(e){}
+            return Ext.emptyFn;
+        };
+    }(),
+
+    /**
+     * Create a data block containing Ext.data.Records from a JSON object.
+     * @param {Object} o An object which contains an Array of row objects in the property specified
+     * in the config as 'root, and optionally a property, specified in the config as 'totalProperty'
+     * which contains the total size of the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        /**
+         * After any data loads, the raw JSON data is available for further custom processing.  If no data is
+         * loaded or there is a load exception this property will be undefined.
+         * @type Object
+         */
+        this.jsonData = o;
+        if(o.metaData){
+            delete this.ef;
+            this.meta = o.metaData;
+            this.recordType = Ext.data.Record.create(o.metaData.fields);
+            this.onMetaChange(this.meta, this.recordType, o);
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length, v;
+
+        // Generate extraction functions for the totalProperty, the root, the id, and for each field
+        this.buildExtractors();
+        var root = this.getRoot(o), c = root.length, totalRecords = c, success = true;
+        if(s.totalProperty){
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)){
+                totalRecords = v;
+            }
+        }
+        if(s.successProperty){
+            v = this.getSuccess(o);
+            if(v === false || v === 'false'){
+                success = false;
+            }
+        }
+
+        var records = [];
+        for(var i = 0; i < c; i++){
+            var n = root[i];
+            var record = new Record(this.extractValues(n, fi, fl), this.getId(n));
+            record.json = n;
+            records[i] = record;
+        }
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords
+        };
+    },
+
+    // private
+    buildExtractors : function() {
+        if(this.ef){
+            return;
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length;
+
+        if(s.totalProperty) {
+            this.getTotal = this.getJsonAccessor(s.totalProperty);
+        }
+        if(s.successProperty) {
+            this.getSuccess = this.getJsonAccessor(s.successProperty);
+        }
+        this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;};
+        if (s.id || s.idProperty) {
+            var g = this.getJsonAccessor(s.id || s.idProperty);
+            this.getId = function(rec) {
+                var r = g(rec);
+                return (r === undefined || r === "") ? null : r;
+            };
+        } else {
+            this.getId = function(){return null;};
+        }
+        var ef = [];
+        for(var i = 0; i < fl; i++){
+            f = fi[i];
+            var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name;
+            ef.push(this.getJsonAccessor(map));
+        }
+        this.ef = ef;
+    },
+
+    // private extractValues
+    extractValues: function(data, items, len) {
+        var f, values = {};
+        for(var j = 0; j < len; j++){
+            f = items[j];
+            var v = this.ef[j](data);
+            values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data);
+        }
+        return values;
+    },
+
+    /**
+     * Decode a json response from server.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} response
+     */
+    readResponse : function(action, response) {
+        var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response;
+        if(!o) {
+            throw new Ext.data.JsonReader.Error('response');
+        }
+        if (Ext.isEmpty(o[this.meta.successProperty])) {
+            throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty);
+        }
+        // TODO, separate empty and undefined exceptions.
+        if ((action === Ext.data.Api.actions.create || action === Ext.data.Api.actions.update)) {
+            if (Ext.isEmpty(o[this.meta.root])) {
+                throw new Ext.data.JsonReader.Error('root-emtpy', this.meta.root);
+            }
+            else if (o[this.meta.root] === undefined) {
+                throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root);
+            }
+        }
+        // make sure extraction functions are defined.
+        this.ef = this.buildExtractors();
+        return o;
+    }
+});
+
+/**
+ * @class Ext.data.JsonReader.Error
+ * Error class for JsonReader
+ */
+Ext.data.JsonReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name : 'Ext.data.JsonReader'
+});
+Ext.apply(Ext.data.JsonReader.Error.prototype, {
+    lang: {
+        'response': "An error occurred while json-decoding your server response",
+        'successProperty-response': 'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',
+        'root-undefined-response': 'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',
+        'root-undefined-config': 'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',
+        'idProperty-undefined' : 'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',
+        'root-emtpy': 'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'
+    }
+});
+/**
+ * @class Ext.data.ArrayReader
+ * @extends Ext.data.JsonReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an Array.
+ * Each element of that Array represents a row of data fields. The
+ * fields are pulled into a Record object using as a subscript, the <code>mapping</code> property
+ * of the field definition if it exists, or the field's ordinal position in the definition.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
+    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
+]);
+var myReader = new Ext.data.ArrayReader({
+    {@link #idIndex}: 0
+}, Employee);
+</code></pre>
+ * <p>This would consume an Array like this:</p>
+ * <pre><code>
+[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
+ * </code></pre>
+ * @constructor
+ * Create a new ArrayReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
+    /**
+     * @cfg {String} successProperty
+     * @hide
+     */
+    /**
+     * @cfg {Number} id (optional) The subscript within row Array that provides an ID for the Record.
+     * Deprecated. Use {@link #idIndex} instead.
+     */
+    /**
+     * @cfg {Number} idIndex (optional) The subscript within row Array that provides an ID for the Record.
+     */
+    /**
+     * Create a data block containing Ext.data.Records from an Array.
+     * @param {Object} o An Array of row objects which represents the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        this.arrayData = o;
+        var s = this.meta,
+            sid = s ? Ext.num(s.idIndex, s.id) : null,
+            recordType = this.recordType, 
+            fields = recordType.prototype.fields,
+            records = [],
+            v;
+
+        if(!this.getRoot) {
+            this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p) {return p;};
+            if(s.totalProperty) {
+                this.getTotal = this.getJsonAccessor(s.totalProperty);
+            }
+        }
+
+        var root = this.getRoot(o);
+
+        for(var i = 0; i < root.length; i++) {
+            var n = root[i];
+            var values = {};
+            var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null);
+            for(var j = 0, jlen = fields.length; j < jlen; j++) {
+                var f = fields.items[j];
+                var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j;
+                v = n[k] !== undefined ? n[k] : f.defaultValue;
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.json = n;
+            records[records.length] = record;
+        }
+
+        var totalRecords = records.length;
+
+        if(s.totalProperty) {
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)) {
+                totalRecords = v;
+            }
+        }
+
+        return {
+            records : records,
+            totalRecords : totalRecords
+        };
+    }
+});/**
+ * @class Ext.data.ArrayStore
+ * @extends Ext.data.Store
+ * <p>Formerly known as "SimpleStore".</p>
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from Array data easier.
+ * An ArrayStore will be automatically configured with a {@link Ext.data.ArrayReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.ArrayStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    // reader configs
+    idIndex: 0,  
+    fields: [
+       'company',
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+var myData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+];
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.ArrayReader ArrayReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype arraystore
+ */
+Ext.data.ArrayStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.ArrayReader(config)
+        }));
+    },
+
+    loadData : function(data, append){
+        if(this.expandData === true){
+            var r = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                r[r.length] = [data[i]];
+            }
+            data = r;
+        }
+        Ext.data.ArrayStore.superclass.loadData.call(this, data, append);
+    }
+});
+Ext.reg('arraystore', Ext.data.ArrayStore);
+
+// backwards compat
+Ext.data.SimpleStore = Ext.data.ArrayStore;
+Ext.reg('simplestore', Ext.data.SimpleStore);/**
+ * @class Ext.data.JsonStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from JSON data easier.
+ * A JsonStore will be automatically configured with a {@link Ext.data.JsonReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.JsonStore({
+    // store configs
+    autoDestroy: true,
+    url: 'get-images.php',
+    storeId: 'myStore',
+    // reader configs
+    root: 'images',
+    idProperty: 'name',  
+    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+{
+    images: [
+        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
+        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
+    ]
+}
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.JsonReader JsonReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype jsonstore
+ */
+Ext.data.JsonStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.JsonReader(config)
+        }));
+    }
+});
+Ext.reg('jsonstore', Ext.data.JsonStore);/**
+ * @class Ext.data.XmlWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action via XML.
+ */
+Ext.data.XmlWriter = Ext.extend(Ext.data.DataWriter, {
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        // no impl.
+    },
+    /**
+     * createRecord
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        // no impl
+    },
+    /**
+     * updateRecord
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        // no impl.
+
+    },
+    /**
+     * destroyRecord
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        // no impl
+    }
+});/**
+ * @class Ext.data.XmlReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p><b>Note</b>: that in order for the browser to parse a returned XML document, the Content-Type
+ * header in the HTTP response must be set to "text/xml" or "application/xml".</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it is the same as "name"
+   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
+]);
+var myReader = new Ext.data.XmlReader({
+   totalRecords: "results", // The element which contains the total dataset size (optional)
+   record: "row",           // The repeated element which contains row information
+   id: "id"                 // The element within the row that provides an ID for the record (optional)
+}, Employee);
+</code></pre>
+ * <p>
+ * This would consume an XML file like this:
+ * <pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;dataset>
+ &lt;results>2&lt;/results>
+ &lt;row>
+   &lt;id>1&lt;/id>
+   &lt;name>Bill&lt;/name>
+   &lt;occupation>Gardener&lt;/occupation>
+ &lt;/row>
+ &lt;row>
+   &lt;id>2&lt;/id>
+   &lt;name>Ben&lt;/name>
+   &lt;occupation>Horticulturalist&lt;/occupation>
+ &lt;/row>
+&lt;/dataset>
+</code></pre>
+ * @cfg {String} totalRecords The DomQuery path from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.
+ * @cfg {String} record The DomQuery path to the repeated element which contains record information.
+ * @cfg {String} success The DomQuery path to the success attribute used by forms.
+ * @cfg {String} idPath The DomQuery path relative from the record element to the element that contains
+ * a record identifier value.
+ * @constructor
+ * Create a new XmlReader.
+ * @param {Object} meta Metadata configuration options
+ * @param {Object} recordType Either an Array of field definition objects as passed to
+ * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}.
+ */
+Ext.data.XmlReader = function(meta, recordType){
+    meta = meta || {};
+    Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the parsed XML document.  The response is expected
+     * to contain a property called <tt>responseXML</tt> which refers to an XML document object.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var doc = response.responseXML;
+        if(!doc) {
+            throw {message: "XmlReader.read: XML Document not available"};
+        }
+        return this.readRecords(doc);
+    },
+
+    /**
+     * Create a data block containing Ext.data.Records from an XML document.
+     * @param {Object} doc A parsed XML document.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(doc){
+        /**
+         * After any data loads/reads, the raw XML Document is available for further custom processing.
+         * @type XMLDocument
+         */
+        this.xmlData = doc;
+        var root = doc.documentElement || doc;
+        var q = Ext.DomQuery;
+        var recordType = this.recordType, fields = recordType.prototype.fields;
+        var sid = this.meta.idPath || this.meta.id;
+        var totalRecords = 0, success = true;
+        if(this.meta.totalRecords){
+            totalRecords = q.selectNumber(this.meta.totalRecords, root, 0);
+        }
+
+        if(this.meta.success){
+            var sv = q.selectValue(this.meta.success, root, true);
+            success = sv !== false && sv !== 'false';
+        }
+        var records = [];
+        var ns = q.select(this.meta.record, root);
+        for(var i = 0, len = ns.length; i < len; i++) {
+            var n = ns[i];
+            var values = {};
+            var id = sid ? q.selectValue(sid, n) : undefined;
+            for(var j = 0, jlen = fields.length; j < jlen; j++){
+                var f = fields.items[j];
+                var v = q.selectValue(Ext.value(f.mapping, f.name, true), n, f.defaultValue);
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.node = n;
+            records[records.length] = record;
+        }
+
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords || records.length
+        };
+    },
+
+    // TODO: implement readResponse for XmlReader
+    readResponse : Ext.emptyFn
+});/**
+ * @class Ext.data.XmlStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
+ * A XmlStore will be automatically configured with a {@link Ext.data.XmlReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.XmlStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    url: 'sheldon.xml', // automatically configures a HttpProxy
+    // reader configs
+    record: 'Item', // records will have an "Item" tag
+    idPath: 'ASIN',
+    totalRecords: '@TotalResults'
+    fields: [
+        // set up the fields mapping into the xml doc
+        // The first needs mapping, the others are very basic
+        {name: 'Author', mapping: 'ItemAttributes > Author'},
+        'Title', 'Manufacturer', 'ProductGroup'
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+&#60?xml version="1.0" encoding="UTF-8"?>
+&#60ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
+    &#60Items>
+        &#60Request>
+            &#60IsValid>True&#60/IsValid>
+            &#60ItemSearchRequest>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60SearchIndex>Books&#60/SearchIndex>
+            &#60/ItemSearchRequest>
+        &#60/Request>
+        &#60TotalResults>203&#60/TotalResults>
+        &#60TotalPages>21&#60/TotalPages>
+        &#60Item>
+            &#60ASIN>0446355453&#60/ASIN>
+            &#60DetailPageURL>
+                http://www.amazon.com/
+            &#60/DetailPageURL>
+            &#60ItemAttributes>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60Manufacturer>Warner Books&#60/Manufacturer>
+                &#60ProductGroup>Book&#60/ProductGroup>
+                &#60Title>Master of the Game&#60/Title>
+            &#60/ItemAttributes>
+        &#60/Item>
+    &#60/Items>
+&#60/ItemSearchResponse>
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.XmlReader XmlReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype xmlstore
+ */
+Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.XmlReader(config)
+        }));
+    }
+});
+Ext.reg('xmlstore', Ext.data.XmlStore);/**
+ * @class Ext.data.GroupingStore
+ * @extends Ext.data.Store
+ * A specialized store implementation that provides for grouping records by one of the available fields. This
+ * is usually used in conjunction with an {@link Ext.grid.GroupingView} to proved the data model for
+ * a grouped GridPanel.
+ * @constructor
+ * Creates a new GroupingStore.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype groupingstore
+ */
+Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
+    
+    //inherit docs
+    constructor: function(config){
+        Ext.data.GroupingStore.superclass.constructor.call(this, config);
+        this.applyGroupField();
+    },
+    
+    /**
+     * @cfg {String} groupField
+     * The field name by which to sort the store's data (defaults to '').
+     */
+    /**
+     * @cfg {Boolean} remoteGroup
+     * True if the grouping should apply on the server side, false if it is local only (defaults to false).  If the
+     * grouping is local, it can be applied immediately to the data.  If it is remote, then it will simply act as a
+     * helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call.
+     */
+    remoteGroup : false,
+    /**
+     * @cfg {Boolean} groupOnSort
+     * True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the
+     * existing sort info (defaults to false).
+     */
+    groupOnSort:false,
+
+	groupDir : 'ASC',
+	
+    /**
+     * Clears any existing grouping and refreshes the data using the default sort.
+     */
+    clearGrouping : function(){
+        this.groupField = false;
+        if(this.remoteGroup){
+            if(this.baseParams){
+                delete this.baseParams.groupBy;
+            }
+            var lo = this.lastOptions;
+            if(lo && lo.params){
+                delete lo.params.groupBy;
+            }
+            this.reload();
+        }else{
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }
+    },
+
+    /**
+     * Groups the data by the specified field.
+     * @param {String} field The field name by which to sort the store's data
+     * @param {Boolean} forceRegroup (optional) True to force the group to be refreshed even if the field passed
+     * in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)
+     */
+    groupBy : function(field, forceRegroup, direction){
+		direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir;
+        if(this.groupField == field && this.groupDir == direction && !forceRegroup){
+            return; // already grouped by this field
+        }
+        this.groupField = field;
+		this.groupDir = direction;
+        this.applyGroupField();
+        if(this.groupOnSort){
+            this.sort(field, direction);
+            return;
+        }
+        if(this.remoteGroup){
+            this.reload();
+        }else{
+            var si = this.sortInfo || {};
+            if(si.field != field || si.direction != direction){
+                this.applySort();
+            }else{
+                this.sortData(field, direction);
+            }
+            this.fireEvent('datachanged', this);
+        }
+    },
+    
+    // private
+    applyGroupField: function(){
+        if(this.remoteGroup){
+            if(!this.baseParams){
+                this.baseParams = {};
+            }
+            this.baseParams.groupBy = this.groupField;
+            this.baseParams.groupDir = this.groupDir;
+        }
+    },
+
+    // private
+    applySort : function(){
+        Ext.data.GroupingStore.superclass.applySort.call(this);
+        if(!this.groupOnSort && !this.remoteGroup){
+            var gs = this.getGroupState();
+            if(gs && (gs != this.sortInfo.field || this.groupDir != this.sortInfo.direction)){
+                this.sortData(this.groupField, this.groupDir);
+            }
+        }
+    },
+
+    // private
+    applyGrouping : function(alwaysFireChange){
+        if(this.groupField !== false){
+            this.groupBy(this.groupField, true, this.groupDir);
+            return true;
+        }else{
+            if(alwaysFireChange === true){
+                this.fireEvent('datachanged', this);
+            }
+            return false;
+        }
+    },
+
+    // private
+    getGroupState : function(){
+        return this.groupOnSort && this.groupField !== false ?
+               (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField;
+    }
+});
+Ext.reg('groupingstore', Ext.data.GroupingStore);/**
+ * @class Ext.data.DirectProxy
+ * @extends Ext.data.DataProxy
+ */
+Ext.data.DirectProxy = function(config){
+    Ext.apply(this, config);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    Ext.data.DirectProxy.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash
+     * Send parameters as a collection of named arguments (defaults to <tt>true</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: true,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.  directFn is a simple alternative to defining the api configuration-parameter
+     * for Store's which will not implement a full CRUD api.
+     */
+    directFn : undefined,
+
+    // protected
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        var args = [];
+        var directFn = this.api[action] || this.directFn;
+
+        switch (action) {
+            case Ext.data.Api.actions.create:
+                args.push(params[reader.meta.root]);		// <-- create(Hash)
+                break;
+            case Ext.data.Api.actions.read:
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        args.push(params[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    args.push(params);
+                }
+                break;
+            case Ext.data.Api.actions.update:
+                args.push(params[reader.meta.idProperty]);  // <-- save(Integer/Integer[], Hash/Hash[])
+                args.push(params[reader.meta.root]);
+                break;
+            case Ext.data.Api.actions.destroy:
+                args.push(params[reader.meta.root]);        // <-- destroy(Int/Int[])
+                break;
+        }
+
+        var trans = {
+            params : params || {},
+            callback : callback,
+            scope : scope,
+            arg : options,
+            reader: reader
+        };
+
+        args.push(this.createCallback(action, rs, trans), this);
+        directFn.apply(window, args);
+    },
+
+    // private
+    createCallback : function(action, rs, trans) {
+        return function(result, res) {
+            if (!res.status) {
+                // @deprecated fire loadexception
+                if (action === Ext.data.Api.actions.read) {
+                    this.fireEvent("loadexception", this, trans, res, null);
+                }
+                this.fireEvent('exception', this, 'remote', action, trans, res, null);
+                trans.callback.call(trans.scope, null, trans.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, trans, result, res);
+            } else {
+                this.onWrite(action, trans, result, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, result, res) {
+        var records;
+        try {
+            records = trans.reader.readRecords(result);
+        }
+        catch (ex) {
+            // @deprecated: Fire old loadexception for backwards-compat.
+            this.fireEvent("loadexception", this, trans, res, ex);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, ex);
+            trans.callback.call(trans.scope, null, trans.arg, false);
+            return;
+        }
+        this.fireEvent("load", this, res, trans.arg);
+        trans.callback.call(trans.scope, records, trans.arg, true);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, result, res, rs) {
+        this.fireEvent("write", this, action, result, res, rs, trans.arg);
+        trans.callback.call(trans.scope, result, res, true);
+    }
+});
+
+/**
+ * @class Ext.data.DirectStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to create an {@link Ext.data.Store} configured with an
+ * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting
+ * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
+ * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
+ * configured as needed.</p>
+ *
+ * <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
+ * <div><ul class="mdetail-params">
+ * <li><b>{@link Ext.data.Store Store}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ *
+ * </ul></div>
+ * <li><b>{@link Ext.data.JsonReader JsonReader}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.JsonReader#root root}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#idProperty idProperty}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#totalProperty totalProperty}</b></tt></li>
+ * </ul></div>
+ *
+ * <li><b>{@link Ext.data.DirectProxy DirectProxy}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.DirectProxy#directFn directFn}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramOrder paramOrder}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}</b></tt></li>
+ * </ul></div>
+ * </ul></div>
+ *
+ * @xtype directstore
+ *
+ * @constructor
+ * @param {Object} config
+ */
+Ext.data.DirectStore = function(c){
+    // each transaction upon a singe record will generatie a distinct Direct transaction since Direct queues them into one Ajax request.
+    c.batchTransactions = false;
+
+    Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {
+        proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
+        reader: (typeof(c.reader) == 'undefined' && typeof(c.fields) == 'object') ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader
+    }));
+};
+Ext.extend(Ext.data.DirectStore, Ext.data.Store, {});
+Ext.reg('directstore', Ext.data.DirectStore);
+/**
+ * @class Ext.Direct
+ * @extends Ext.util.Observable
+ * <p><b><u>Overview</u></b></p>
+ * 
+ * <p>Ext.Direct aims to streamline communication between the client and server
+ * by providing a single interface that reduces the amount of common code
+ * typically required to validate data and handle returned data packets
+ * (reading data, error conditions, etc).</p>
+ *  
+ * <p>The Ext.direct namespace includes several classes for a closer integration
+ * with the server-side. The Ext.data namespace also includes classes for working
+ * with Ext.data.Stores which are backed by data from an Ext.Direct method.</p>
+ * 
+ * <p><b><u>Specification</u></b></p>
+ * 
+ * <p>For additional information consult the 
+ * <a href="http://extjs.com/products/extjs/direct.php">Ext.Direct Specification</a>.</p>
+ *   
+ * <p><b><u>Providers</u></b></p>
+ * 
+ * <p>Ext.Direct uses a provider architecture, where one or more providers are
+ * used to transport data to and from the server. There are several providers
+ * that exist in the core at the moment:</p><div class="mdetail-params"><ul>
+ * 
+ * <li>{@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations</li>
+ * <li>{@link Ext.direct.PollingProvider PollingProvider} for repeated requests</li>
+ * <li>{@link Ext.direct.RemotingProvider RemotingProvider} exposes server side
+ * on the client.</li>
+ * </ul></div>
+ * 
+ * <p>A provider does not need to be invoked directly, providers are added via
+ * {@link Ext.Direct}.{@link Ext.Direct#add add}.</p>
+ * 
+ * <p><b><u>Router</u></b></p>
+ * 
+ * <p>Ext.Direct utilizes a "router" on the server to direct requests from the client
+ * to the appropriate server-side method. Because the Ext.Direct API is completely
+ * platform-agnostic, you could completely swap out a Java based server solution
+ * and replace it with one that uses C# without changing the client side JavaScript
+ * at all.</p>
+ * 
+ * <p><b><u>Server side events</u></b></p>
+ * 
+ * <p>Custom events from the server may be handled by the client by adding
+ * listeners, for example:</p>
+ * <pre><code>
+{"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
+
+// add a handler for a 'message' event sent by the server 
+Ext.Direct.on('message', function(e){
+    out.append(String.format('&lt;p>&lt;i>{0}&lt;/i>&lt;/p>', e.data));
+            out.el.scrollTo('t', 100000, true);
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.Direct = Ext.extend(Ext.util.Observable, {
+    /**
+     * Each event type implements a getData() method. The default event types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>event</tt></b> : Ext.Direct.Event</li>
+     * <li><b><tt>exception</tt></b> : Ext.Direct.ExceptionEvent</li>
+     * <li><b><tt>rpc</tt></b> : Ext.Direct.RemotingEvent</li>
+     * </ul></div>
+     * @property eventTypes
+     * @type Object
+     */
+
+    /**
+     * Four types of possible exceptions which can occur:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>Ext.Direct.exceptions.TRANSPORT</tt></b> : 'xhr'</li>
+     * <li><b><tt>Ext.Direct.exceptions.PARSE</tt></b> : 'parse'</li>
+     * <li><b><tt>Ext.Direct.exceptions.LOGIN</tt></b> : 'login'</li>
+     * <li><b><tt>Ext.Direct.exceptions.SERVER</tt></b> : 'exception'</li>
+     * </ul></div>
+     * @property exceptions
+     * @type Object
+     */
+    exceptions: {
+        TRANSPORT: 'xhr',
+        PARSE: 'parse',
+        LOGIN: 'login',
+        SERVER: 'exception'
+    },
+    
+    // private
+    constructor: function(){
+        this.addEvents(
+            /**
+             * @event event
+             * Fires after an event.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */
+            'event',
+            /**
+             * @event exception
+             * Fires after an event exception.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */
+            'exception'
+        );
+        this.transactions = {};
+        this.providers = {};
+    },
+
+    /**
+     * Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods.
+     * If the provider is not already connected, it will auto-connect.
+     * <pre><code>
+var pollProv = new Ext.direct.PollingProvider({
+    url: 'php/poll2.php'
+}); 
+
+Ext.Direct.addProvider(
+    {
+        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider} 
+        "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
+        "actions":{              // each property within the actions object represents a Class 
+            "TestAction":[       // array of methods within each server side Class   
+            {
+                "name":"doEcho", // name of method
+                "len":1
+            },{
+                "name":"multiply",
+                "len":1
+            },{
+                "name":"doForm",
+                "formHandler":true, // handle form on server with Ext.Direct.Transaction 
+                "len":1
+            }]
+        },
+        "namespace":"myApplication",// namespace to create the Remoting Provider in
+    },{
+        type: 'polling', // create a {@link Ext.direct.PollingProvider} 
+        url:  'php/poll.php'
+    },
+    pollProv // reference to previously created instance
+);
+     * </code></pre>
+     * @param {Object/Array} provider Accepts either an Array of Provider descriptions (an instance
+     * or config object for a Provider) or any number of Provider descriptions as arguments.  Each
+     * Provider description instructs Ext.Direct how to create client-side stub methods.
+     */
+    addProvider : function(provider){        
+        var a = arguments;
+        if(a.length > 1){
+            for(var i = 0, len = a.length; i < len; i++){
+                this.addProvider(a[i]);
+            }
+            return;
+        }
+        
+        // if provider has not already been instantiated
+        if(!provider.events){
+            provider = new Ext.Direct.PROVIDERS[provider.type](provider);
+        }
+        provider.id = provider.id || Ext.id();
+        this.providers[provider.id] = provider;
+
+        provider.on('data', this.onProviderData, this);
+        provider.on('exception', this.onProviderException, this);
+
+
+        if(!provider.isConnected()){
+            provider.connect();
+        }
+
+        return provider;
+    },
+
+    /**
+     * Retrieve a {@link Ext.direct.Provider provider} by the
+     * <b><tt>{@link Ext.direct.Provider#id id}</tt></b> specified when the provider is
+     * {@link #addProvider added}.
+     * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider} 
+     */
+    getProvider : function(id){
+        return this.providers[id];
+    },
+
+    removeProvider : function(id){
+        var provider = id.id ? id : this.providers[id.id];
+        provider.un('data', this.onProviderData, this);
+        provider.un('exception', this.onProviderException, this);
+        delete this.providers[provider.id];
+        return provider;
+    },
+
+    addTransaction: function(t){
+        this.transactions[t.tid] = t;
+        return t;
+    },
+
+    removeTransaction: function(t){
+        delete this.transactions[t.tid || t];
+        return t;
+    },
+
+    getTransaction: function(tid){
+        return this.transactions[tid.tid || tid];
+    },
+
+    onProviderData : function(provider, e){
+        if(Ext.isArray(e)){
+            for(var i = 0, len = e.length; i < len; i++){
+                this.onProviderData(provider, e[i]);
+            }
+            return;
+        }
+        if(e.name && e.name != 'event' && e.name != 'exception'){
+            this.fireEvent(e.name, e);
+        }else if(e.type == 'exception'){
+            this.fireEvent('exception', e);
+        }
+        this.fireEvent('event', e, provider);
+    },
+
+    createEvent : function(response, extraProps){
+        return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps));
+    }
+});
+// overwrite impl. with static instance
+Ext.Direct = new Ext.Direct();
+
+Ext.Direct.TID = 1;
+Ext.Direct.PROVIDERS = {};/**
+ * @class Ext.Direct.Transaction
+ * @extends Object
+ * <p>Supporting Class for Ext.Direct (not intended to be used directly).</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Direct.Transaction = function(config){
+    Ext.apply(this, config);
+    this.tid = ++Ext.Direct.TID;
+    this.retryCount = 0;
+};
+Ext.Direct.Transaction.prototype = {
+    send: function(){
+        this.provider.queueTransaction(this);
+    },
+
+    retry: function(){
+        this.retryCount++;
+        this.send();
+    },
+
+    getProvider: function(){
+        return this.provider;
+    }
+};Ext.Direct.Event = function(config){
+    Ext.apply(this, config);
+}
+Ext.Direct.Event.prototype = {
+    status: true,
+    getData: function(){
+        return this.data;
+    }
+};
+
+Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, {
+    type: 'rpc',
+    getTransaction: function(){
+        return this.transaction || Ext.Direct.getTransaction(this.tid);
+    }
+});
+
+Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, {
+    status: false,
+    type: 'exception'
+});
+
+Ext.Direct.eventTypes = {
+    'rpc':  Ext.Direct.RemotingEvent,
+    'event':  Ext.Direct.Event,
+    'exception':  Ext.Direct.ExceptionEvent
+};
+
+/**
+ * @class Ext.direct.Provider
+ * @extends Ext.util.Observable
+ * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
+ * 
+ * <p>For example ExtJs implements the following subclasses:</p>
+ * <pre><code>
+Provider
+|
++---{@link Ext.direct.JsonProvider JsonProvider} 
+    |
+    +---{@link Ext.direct.PollingProvider PollingProvider}   
+    |
+    +---{@link Ext.direct.RemotingProvider RemotingProvider}   
+ * </code></pre>
+ * @abstract
+ */
+Ext.direct.Provider = Ext.extend(Ext.util.Observable, {    
+    /**
+     * @cfg {String} id
+     * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
+     * You should assign an id if you need to be able to access the provider later and you do
+     * not have an object reference available, for example:
+     * <pre><code>
+Ext.Direct.addProvider(
+    {
+        type: 'polling',
+        url:  'php/poll.php',
+        id:   'poll-provider'
+    }
+);
+     
+var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
+p.disconnect();
+     * </code></pre>
+     */
+        
+    /**
+     * @cfg {Number} priority
+     * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
+     * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
+     */    
+    priority: 1,
+
+    /**
+     * @cfg {String} type
+     * <b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified
+     * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
+     * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
+     * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
+     * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
+     * </ul></div>
+     */    
+ 
+    // private
+    constructor : function(config){
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event connect
+             * Fires when the Provider connects to the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'connect',
+            /**
+             * @event disconnect
+             * Fires when the Provider disconnects from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'disconnect',
+            /**
+             * @event data
+             * Fires when the Provider receives data from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */            
+            'data',
+            /**
+             * @event exception
+             * Fires when the Provider receives an exception from the server-side
+             */                        
+            'exception'
+        );
+        Ext.direct.Provider.superclass.constructor.call(this, config);
+    },
+
+    /**
+     * Returns whether or not the server-side is currently connected.
+     * Abstract method for subclasses to implement.
+     */
+    isConnected: function(){
+        return false;
+    },
+
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    connect: Ext.emptyFn,
+    
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    disconnect: Ext.emptyFn
+});
+/**
+ * @class Ext.direct.JsonProvider
+ * @extends Ext.direct.Provider
+ */
+Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
+    parseResponse: function(xhr){
+        if(!Ext.isEmpty(xhr.responseText)){
+            if(typeof xhr.responseText == 'object'){
+                return xhr.responseText;
+            }
+            return Ext.decode(xhr.responseText);
+        }
+        return null;
+    },
+
+    getEvents: function(xhr){
+        var data = null;
+        try{
+            data = this.parseResponse(xhr);
+        }catch(e){
+            var event = new Ext.Direct.ExceptionEvent({
+                data: e,
+                xhr: xhr,
+                code: Ext.Direct.exceptions.PARSE,
+                message: 'Error parsing json response: \n\n ' + data
+            })
+            return [event];
+        }
+        var events = [];
+        if(Ext.isArray(data)){
+            for(var i = 0, len = data.length; i < len; i++){
+                events.push(Ext.Direct.createEvent(data[i]));
+            }
+        }else{
+            events.push(Ext.Direct.createEvent(data));
+        }
+        return events;
+    }
+});/**
+ * @class Ext.direct.PollingProvider
+ * @extends Ext.direct.JsonProvider
+ *
+ * <p>Provides for repetitive polling of the server at distinct {@link #interval intervals}.
+ * The initial request for data originates from the client, and then is responded to by the
+ * server.</p>
+ * 
+ * <p>All configurations for the PollingProvider should be generated by the server-side
+ * API portion of the Ext.Direct stack.</p>
+ *
+ * <p>An instance of PollingProvider may be created directly via the new keyword or by simply
+ * specifying <tt>type = 'polling'</tt>.  For example:</p>
+ * <pre><code>
+var pollA = new Ext.direct.PollingProvider({
+    type:'polling',
+    url: 'php/pollA.php',
+});
+Ext.Direct.addProvider(pollA);
+pollA.disconnect();
+
+Ext.Direct.addProvider(
+    {
+        type:'polling',
+        url: 'php/pollB.php',
+        id: 'pollB-provider'
+    }
+);
+var pollB = Ext.Direct.getProvider('pollB-provider');
+ * </code></pre>
+ */
+Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
+    /**
+     * @cfg {Number} priority
+     * Priority of the request (defaults to <tt>3</tt>). See {@link Ext.direct.Provider#priority}.
+     */
+    // override default priority
+    priority: 3,
+    
+    /**
+     * @cfg {Number} interval
+     * How often to poll the server-side in milliseconds (defaults to <tt>3000</tt> - every
+     * 3 seconds).
+     */
+    interval: 3000,
+
+    /**
+     * @cfg {Object} baseParams An object containing properties which are to be sent as parameters
+     * on every polling request
+     */
+    
+    /**
+     * @cfg {String/Function} url
+     * The url which the PollingProvider should contact with each request. This can also be
+     * an imported Ext.Direct method which will accept the baseParams as its only argument.
+     */
+
+    // private
+    constructor : function(config){
+        Ext.direct.PollingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforepoll
+             * Fired immediately before a poll takes place, an event handler can return false
+             * in order to cancel the poll.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'beforepoll',            
+            /**
+             * @event poll
+             * This event has not yet been implemented.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'poll'
+        );
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.pollTask;
+    },
+
+    /**
+     * Connect to the server-side and begin the polling process. To handle each
+     * response subscribe to the data event.
+     */
+    connect: function(){
+        if(this.url && !this.pollTask){
+            this.pollTask = Ext.TaskMgr.start({
+                run: function(){
+                    if(this.fireEvent('beforepoll', this) !== false){
+                        if(typeof this.url == 'function'){
+                            this.url(this.baseParams);
+                        }else{
+                            Ext.Ajax.request({
+                                url: this.url,
+                                callback: this.onData,
+                                scope: this,
+                                params: this.baseParams
+                            });
+                        }
+                    }
+                },
+                interval: this.interval,
+                scope: this
+            });
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing PollingProvider, no url configured.';
+        }
+    },
+
+    /**
+     * Disconnect from the server-side and stop the polling process. The disconnect
+     * event will be fired on a successful disconnect.
+     */
+    disconnect: function(){
+        if(this.pollTask){
+            Ext.TaskMgr.stop(this.pollTask);
+            delete this.pollTask;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    // private
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                this.fireEvent('data', this, e);
+            }
+        }else{
+            var e = new Ext.Direct.ExceptionEvent({
+                data: e,
+                code: Ext.Direct.exceptions.TRANSPORT,
+                message: 'Unable to connect to the server.',
+                xhr: xhr
+            });
+            this.fireEvent('data', this, e);
+        }
+    }
+});
+
+Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;/**
+ * @class Ext.direct.RemotingProvider
+ * @extends Ext.direct.JsonProvider
+ * 
+ * <p>The {@link Ext.direct.RemotingProvider RemotingProvider} exposes access to
+ * server side methods on the client (a remote procedure call (RPC) type of
+ * connection where the client can initiate a procedure on the server).</p>
+ * 
+ * <p>This allows for code to be organized in a fashion that is maintainable,
+ * while providing a clear path between client and server, something that is
+ * not always apparent when using URLs.</p>
+ * 
+ * <p>To accomplish this the server-side needs to describe what classes and methods
+ * are available on the client-side. This configuration will typically be
+ * outputted by the server-side Ext.Direct stack when the API description is built.</p>
+ */
+Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {       
+    /**
+     * @cfg {Object} actions
+     * Object literal defining the server side actions and methods. For example, if
+     * the Provider is configured with:
+     * <pre><code>
+"actions":{ // each property within the 'actions' object represents a server side Class 
+    "TestAction":[ // array of methods within each server side Class to be   
+    {              // stubbed out on client
+        "name":"doEcho", 
+        "len":1            
+    },{
+        "name":"multiply",// name of method
+        "len":2           // The number of parameters that will be used to create an
+                          // array of data to send to the server side function.
+                          // Ensure the server sends back a Number, not a String. 
+    },{
+        "name":"doForm",
+        "formHandler":true, // direct the client to use specialized form handling method 
+        "len":1
+    }]
+}
+     * </code></pre>
+     * <p>Note that a Store is not required, a server method can be called at any time.
+     * In the following example a <b>client side</b> handler is used to call the
+     * server side method "multiply" in the server-side "TestAction" Class:</p>
+     * <pre><code>
+TestAction.multiply(
+    2, 4, // pass two arguments to server, so specify len=2
+    // callback function after the server is called
+    // result: the result returned by the server
+    //      e: Ext.Direct.RemotingEvent object
+    function(result, e){
+        var t = e.getTransaction();
+        var action = t.action; // server side Class called
+        var method = t.method; // server side method called
+        if(e.status){
+            var answer = Ext.encode(result); // 8
+    
+        }else{
+            var msg = e.message; // failure message
+        }
+    }
+);
+     * </code></pre>
+     * In the example above, the server side "multiply" function will be passed two
+     * arguments (2 and 4).  The "multiply" method should return the value 8 which will be
+     * available as the <tt>result</tt> in the example above. 
+     */
+    
+    /**
+     * @cfg {String/Object} namespace
+     * Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>).
+     * Explicitly specify the namespace Object, or specify a String to have a
+     * {@link Ext#namespace namespace created} implicitly.
+     */
+    
+    /**
+     * @cfg {String} url
+     * <b>Required<b>. The url to connect to the {@link Ext.Direct} server-side router. 
+     */
+    
+    /**
+     * @cfg {String} enableUrlEncode
+     * Specify which param will hold the arguments for the method.
+     * Defaults to <tt>'data'</tt>.
+     */
+    
+    /**
+     * @cfg {Number/Boolean} enableBuffer
+     * <p><tt>true</tt> or <tt>false</tt> to enable or disable combining of method
+     * calls. If a number is specified this is the amount of time in milliseconds
+     * to wait before sending a batched request (defaults to <tt>10</tt>).</p>
+     * <br><p>Calls which are received within the specified timeframe will be
+     * concatenated together and sent in a single request, optimizing the
+     * application by reducing the amount of round trips that have to be made
+     * to the server.</p>
+     */
+    enableBuffer: 10,
+    
+    /**
+     * @cfg {Number} maxRetries
+     * Number of times to re-attempt delivery on failure of a call.
+     */
+    maxRetries: 1,
+
+    constructor : function(config){
+        Ext.direct.RemotingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforecall
+             * Fires immediately before the client-side sends off the RPC call.
+             * By returning false from an event handler you can prevent the call from
+             * executing.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'beforecall',
+            /**
+             * @event call
+             * Fires immediately after the request to the server-side is sent. This does
+             * NOT fire after the response has come back from the call.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'call'
+        );
+        this.namespace = (typeof this.namespace === 'string') ? Ext.ns(this.namespace) : this.namespace || window;
+        this.transactions = {};
+        this.callBuffer = [];
+    },
+
+    // private
+    initAPI : function(){
+        var o = this.actions;
+        for(var c in o){
+            var cls = this.namespace[c] || (this.namespace[c] = {});
+            var ms = o[c];
+            for(var i = 0, len = ms.length; i < len; i++){
+                var m = ms[i];
+                cls[m.name] = this.createMethod(c, m);
+            }
+        }
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.connected;
+    },
+
+    connect: function(){
+        if(this.url){
+            this.initAPI();
+            this.connected = true;
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing RemotingProvider, no url configured.';
+        }
+    },
+
+    disconnect: function(){
+        if(this.connected){
+            this.connected = false;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                var t = this.getTransaction(e);
+                this.fireEvent('data', this, e);
+                if(t){
+                    this.doCallback(t, e, true);
+                    Ext.Direct.removeTransaction(t);
+                }
+            }
+        }else{
+            var ts = [].concat(opt.ts);
+            for(var i = 0, len = ts.length; i < len; i++){
+                var t = this.getTransaction(ts[i]);
+                if(t && t.retryCount < this.maxRetries){
+                    t.retry();
+                }else{
+                    var e = new Ext.Direct.ExceptionEvent({
+                        data: e,
+                        transaction: t,
+                        code: Ext.Direct.exceptions.TRANSPORT,
+                        message: 'Unable to connect to the server.',
+                        xhr: xhr
+                    });
+                    this.fireEvent('data', this, e);
+                    if(t){
+                        this.doCallback(t, e, false);
+                        Ext.Direct.removeTransaction(t);
+                    }
+                }
+            }
+        }
+    },
+
+    getCallData: function(t){
+        return {
+            action: t.action,
+            method: t.method,
+            data: t.data,
+            type: 'rpc',
+            tid: t.tid
+        };
+    },
+
+    doSend : function(data){
+        var o = {
+            url: this.url,
+            callback: this.onData,
+            scope: this,
+            ts: data
+        };
+
+        // send only needed data
+        var callData;
+        if(Ext.isArray(data)){
+            callData = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                callData.push(this.getCallData(data[i]));
+            }
+        }else{
+            callData = this.getCallData(data);
+        }
+
+        if(this.enableUrlEncode){
+            var params = {};
+            params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData);
+            o.params = params;
+        }else{
+            o.jsonData = callData;
+        }
+        Ext.Ajax.request(o);
+    },
+
+    combineAndSend : function(){
+        var len = this.callBuffer.length;
+        if(len > 0){
+            this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer);
+            this.callBuffer = [];
+        }
+    },
+
+    queueTransaction: function(t){
+        if(t.form){
+            this.processForm(t);
+            return;
+        }
+        this.callBuffer.push(t);
+        if(this.enableBuffer){
+            if(!this.callTask){
+                this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this);
+            }
+            this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10);
+        }else{
+            this.combineAndSend();
+        }
+    },
+
+    doCall : function(c, m, args){
+        var data = null, hs = args[m.len], scope = args[m.len+1];
+
+        if(m.len !== 0){
+            data = args.slice(0, m.len);
+        }
+
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            args: args,
+            action: c,
+            method: m.name,
+            data: data,
+            cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            this.queueTransaction(t);
+            this.fireEvent('call', this, t);
+        }
+    },
+
+    doForm : function(c, m, form, callback, scope){
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            action: c,
+            method: m.name,
+            args:[form, callback, scope],
+            cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback,
+            isForm: true
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
+                params = {
+                    extTID: t.tid,
+                    extAction: c,
+                    extMethod: m.name,
+                    extType: 'rpc',
+                    extUpload: String(isUpload)
+                };
+            
+            // change made from typeof callback check to callback.params
+            // to support addl param passing in DirectSubmit EAC 6/2
+            Ext.apply(t, {
+                form: Ext.getDom(form),
+                isUpload: isUpload,
+                params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params
+            });
+            this.fireEvent('call', this, t);
+            this.processForm(t);
+        }
+    },
+    
+    processForm: function(t){
+        Ext.Ajax.request({
+            url: this.url,
+            params: t.params,
+            callback: this.onData,
+            scope: this,
+            form: t.form,
+            isUpload: t.isUpload,
+            ts: t
+        });
+    },
+
+    createMethod : function(c, m){
+        var f;
+        if(!m.formHandler){
+            f = function(){
+                this.doCall(c, m, Array.prototype.slice.call(arguments, 0));
+            }.createDelegate(this);
+        }else{
+            f = function(form, callback, scope){
+                this.doForm(c, m, form, callback, scope);
+            }.createDelegate(this);
+        }
+        f.directCfg = {
+            action: c,
+            method: m
+        };
+        return f;
+    },
+
+    getTransaction: function(opt){
+        return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null;
+    },
+
+    doCallback: function(t, e){
+        var fn = e.status ? 'success' : 'failure';
+        if(t && t.cb){
+            var hs = t.cb;
+            var result = e.result || e.data;
+            if(Ext.isFunction(hs)){
+                hs(result, e);
+            } else{
+                Ext.callback(hs[fn], hs.scope, [result, e]);
+                Ext.callback(hs.callback, hs.scope, [result, e]);
+            }
+        }
+    }
+});
+Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;/**
+ * @class Ext.Resizable
+ * @extends Ext.util.Observable
+ * <p>Applies drag handles to an element to make it resizable. The drag handles are inserted into the element 
+ * and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap
+ * the textarea in a div and set 'resizeChild' to true (or to the id of the element), <b>or</b> set wrap:true in your config and
+ * the element will be wrapped for you automatically.</p>
+ * <p>Here is the list of valid resize handles:</p>
+ * <pre>
+Value   Description
+------  -------------------
+ 'n'     north
+ 's'     south
+ 'e'     east
+ 'w'     west
+ 'nw'    northwest
+ 'sw'    southwest
+ 'se'    southeast
+ 'ne'    northeast
+ 'all'   all
+</pre>
+ * <p>Here's an example showing the creation of a typical Resizable:</p>
+ * <pre><code>
+var resizer = new Ext.Resizable('element-id', {
+    handles: 'all',
+    minWidth: 200,
+    minHeight: 100,
+    maxWidth: 500,
+    maxHeight: 400,
+    pinned: true
+});
+resizer.on('resize', myHandler);
+</code></pre>
+ * <p>To hide a particular handle, set its display to none in CSS, or through script:<br>
+ * resizer.east.setDisplayed(false);</p>
+ * @constructor
+ * Create a new resizable component
+ * @param {Mixed} el The id or element to resize
+ * @param {Object} config configuration options
+  */
+Ext.Resizable = function(el, config){
+    this.el = Ext.get(el);
+    
+    if(config && config.wrap){
+        config.resizeChild = this.el;
+        this.el = this.el.wrap(typeof config.wrap == 'object' ? config.wrap : {cls:'xresizable-wrap'});
+        this.el.id = this.el.dom.id = config.resizeChild.id + '-rzwrap';
+        this.el.setStyle('overflow', 'hidden');
+        this.el.setPositioning(config.resizeChild.getPositioning());
+        config.resizeChild.clearPositioning();
+        if(!config.width || !config.height){
+            var csize = config.resizeChild.getSize();
+            this.el.setSize(csize.width, csize.height);
+        }
+        if(config.pinned && !config.adjustments){
+            config.adjustments = 'auto';
+        }
+    }
+
+    /**
+     * The proxy Element that is resized in place of the real Element during the resize operation.
+     * This may be queried using {@link Ext.Element#getBox} to provide the new area to resize to.
+     * Read only.
+     * @type Ext.Element.
+     * @property proxy
+     */
+    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, config);
+    
+    if(this.pinned){
+        this.disableTrackOver = true;
+        this.el.addClass('x-resizable-pinned');
+    }
+    // if the element isn't positioned, make it relative
+    var position = this.el.getStyle('position');
+    if(position != 'absolute' && position != 'fixed'){
+        this.el.setStyle('position', 'relative');
+    }
+    if(!this.handles){ // no handles passed, must be legacy style
+        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 hs = this.handles.split(/\s*?[,;]\s*?| /);
+    var ps = Ext.Resizable.positions;
+    for(var i = 0, len = hs.length; i < len; i++){
+        if(hs[i] && ps[hs[i]]){
+            var pos = ps[hs[i]];
+            this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent);
+        }
+    }
+    // legacy
+    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 rc = this.resizeChild;
+        var hw = this.west, he = this.east, hn = this.north, hs = this.south;
+        if(rc && (hw || hn)){
+            rc.position('relative');
+            rc.setLeft(hw ? hw.el.getWidth() : 0);
+            rc.setTop(hn ? hn.el.getHeight() : 0);
+        }
+        this.adjustments = [
+            (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0),
+            (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.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(
+        /**
+         * @event beforeresize
+         * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize.
+         * @param {Ext.Resizable} this
+         * @param {Ext.EventObject} e The mousedown event
+         */
+        'beforeresize',
+        /**
+         * @event resize
+         * Fired after a resize.
+         * @param {Ext.Resizable} this
+         * @param {Number} width The new width
+         * @param {Number} height The new height
+         * @param {Ext.EventObject} e The mouseup event
+         */
+        '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, {
+
+    /**
+     * @cfg {Array/String} adjustments String 'auto' or an array [width, height] with values to be <b>added</b> to the
+     * resize operation's new size (defaults to <tt>[0, 0]</tt>)
+     */
+    adjustments : [0, 0],
+    /**
+     * @cfg {Boolean} animate True to animate the resize (not compatible with dynamic sizing, defaults to false)
+     */
+    animate : false,
+    /**
+     * @cfg {Mixed} constrainTo Constrain the resize to a particular element
+     */
+    /**
+     * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only applied at config time. (defaults to false)
+     */
+    disableTrackOver : false,
+    /**
+     * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to false)
+     */
+    draggable: false,
+    /**
+     * @cfg {Number} duration Animation duration if animate = true (defaults to 0.35)
+     */
+    duration : 0.35,
+    /**
+     * @cfg {Boolean} dynamic True to resize the element while dragging instead of using a proxy (defaults to false)
+     */
+    dynamic : false,
+    /**
+     * @cfg {String} easing Animation easing if animate = true (defaults to <tt>'easingOutStrong'</tt>)
+     */
+    easing : 'easeOutStrong',
+    /**
+     * @cfg {Boolean} enabled False to disable resizing (defaults to true)
+     */
+    enabled : true,
+    /**
+     * @property enabled Writable. False if resizing is disabled.
+     * @type Boolean 
+     */
+    /**
+     * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined).
+     * Specify either <tt>'all'</tt> or any of <tt>'n s e w ne nw se sw'</tt>.
+     */
+    handles : false,
+    /**
+     * @cfg {Boolean} multiDirectional <b>Deprecated</b>.  Deprecated style of adding multi-direction resize handles.
+     */
+    multiDirectional : false,
+    /**
+     * @cfg {Number} height The height of the element in pixels (defaults to null)
+     */
+    height : null,
+    /**
+     * @cfg {Number} width The width of the element in pixels (defaults to null)
+     */
+    width : null,
+    /**
+     * @cfg {Number} heightIncrement The increment to snap the height resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    heightIncrement : 0,
+    /**
+     * @cfg {Number} widthIncrement The increment to snap the width resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    widthIncrement : 0,
+    /**
+     * @cfg {Number} minHeight The minimum height for the element (defaults to 5)
+     */
+    minHeight : 5,
+    /**
+     * @cfg {Number} minWidth The minimum width for the element (defaults to 5)
+     */
+    minWidth : 5,
+    /**
+     * @cfg {Number} maxHeight The maximum height for the element (defaults to 10000)
+     */
+    maxHeight : 10000,
+    /**
+     * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000)
+     */
+    maxWidth : 10000,
+    /**
+     * @cfg {Number} minX The minimum x for the element (defaults to 0)
+     */
+    minX: 0,
+    /**
+     * @cfg {Number} minY The minimum x for the element (defaults to 0)
+     */
+    minY: 0,
+    /**
+     * @cfg {Boolean} pinned True to ensure that the resize handles are always visible, false to display them only when the
+     * user mouses over the resizable borders. This is only applied at config time. (defaults to false)
+     */
+    pinned : false,
+    /**
+     * @cfg {Boolean} preserveRatio True to preserve the original ratio between height
+     * and width during resize (defaults to false)
+     */
+    preserveRatio : false,
+    /**
+     * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) 
+     */ 
+    resizeChild : false,
+    /**
+     * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false)
+     */
+    transparent: false,
+    /**
+     * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a particular region
+     */
+    /**
+     * @cfg {Boolean} wrap True to wrap an element with a div if needed (required for textareas and images, defaults to false)
+     * in favor of the handles config option (defaults to false)
+     */
+
+    
+    /**
+     * Perform a manual resize and fires the 'resize' event.
+     * @param {Number} width
+     * @param {Number} height
+     */
+    resizeTo : function(width, height){
+        this.el.setSize(width, height);
+        this.updateChildSize();
+        this.fireEvent('resize', this, width, height, null);
+    },
+
+    // private
+    startSizing : function(e, handle){
+        this.fireEvent('beforeresize', this, e);
+        if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler
+
+            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({
+                    scope: this,
+                    mousemove: this.onMouseMove,
+                    mouseup: this.onMouseUp
+                });
+            }
+            this.overlay.setStyle('cursor', handle.el.getStyle('cursor'));
+
+            this.resizing = true;
+            this.startBox = this.el.getBox();
+            this.startPoint = e.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 ct = Ext.get(this.constrainTo);
+                this.resizeRegion = ct.getRegion().adjust(
+                    ct.getFrameWidth('t'),
+                    ct.getFrameWidth('l'),
+                    -ct.getFrameWidth('b'),
+                    -ct.getFrameWidth('r')
+                );
+            }
+
+            this.proxy.setStyle('visibility', 'hidden'); // workaround display none
+            this.proxy.show();
+            this.proxy.setBox(this.startBox);
+            if(!this.dynamic){
+                this.proxy.setStyle('visibility', 'visible');
+            }
+        }
+    },
+
+    // private
+    onMouseDown : function(handle, e){
+        if(this.enabled){
+            e.stopEvent();
+            this.activeHandle = handle;
+            this.startSizing(e, handle);
+        }          
+    },
+
+    // private
+    onMouseUp : function(e){
+        this.activeHandle = null;
+        var size = this.resizeElement();
+        this.resizing = false;
+        this.handleOut();
+        this.overlay.hide();
+        this.proxy.hide();
+        this.fireEvent('resize', this, size.width, size.height, e);
+    },
+
+    // private
+    updateChildSize : function(){
+        if(this.resizeChild){
+            var el = this.el;
+            var child = this.resizeChild;
+            var adj = this.adjustments;
+            if(el.dom.offsetWidth){
+                var b = el.getSize(true);
+                child.setSize(b.width+adj[0], b.height+adj[1]);
+            }
+            // Second call here for IE
+            // The first call enables instant resizing and
+            // the second call corrects scroll bars if they
+            // exist
+            if(Ext.isIE){
+                setTimeout(function(){
+                    if(el.dom.offsetWidth){
+                        var b = el.getSize(true);
+                        child.setSize(b.width+adj[0], b.height+adj[1]);
+                    }
+                }, 10);
+            }
+        }
+    },
+
+    // private
+    snap : function(value, inc, min){
+        if(!inc || !value){
+            return value;
+        }
+        var newValue = value;
+        var m = value % inc;
+        if(m > 0){
+            if(m > (inc/2)){
+                newValue = value + (inc-m);
+            }else{
+                newValue = value - m;
+            }
+        }
+        return Math.max(min, newValue);
+    },
+
+    /**
+     * <p>Performs resizing of the associated Element. This method is called internally by this
+     * class, and should not be called by user code.</p>
+     * <p>If a Resizable is being used to resize an Element which encapsulates a more complex UI
+     * component such as a Panel, this method may be overridden by specifying an implementation
+     * as a config option to provide appropriate behaviour at the end of the resize operation on
+     * mouseup, for example resizing the Panel, and relaying the Panel's content.</p>
+     * <p>The new area to be resized to is available by examining the state of the {@link #proxy}
+     * Element. Example:
+<pre><code>
+new Ext.Panel({
+    title: 'Resize me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    listeners: {
+        render: function(p) {
+            new Ext.Resizable(p.getEl(), {
+                handles: 'all',
+                pinned: true,
+                transparent: true,
+                resizeElement: function() {
+                    var box = this.proxy.getBox();
+                    p.updateBox(box);
+                    if (p.layout) {
+                        p.doLayout();
+                    }
+                    return box;
+                }
+           });
+       }
+    }
+}).show();
+</code></pre>
+     */
+    resizeElement : function(){
+        var box = this.proxy.getBox();
+        if(this.updateBox){
+            this.el.setBox(box, false, this.animate, this.duration, null, this.easing);
+        }else{
+            this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing);
+        }
+        this.updateChildSize();
+        if(!this.dynamic){
+            this.proxy.hide();
+        }
+        return box;
+    },
+
+    // private
+    constrain : function(v, diff, m, mx){
+        if(v - diff < m){
+            diff = v - m;    
+        }else if(v - diff > mx){
+            diff = v - mx; 
+        }
+        return diff;                
+    },
+
+    // private
+    onMouseMove : function(e){
+        if(this.enabled && this.activeHandle){
+            try{// try catch so if something goes wrong the user doesn't get hung
+
+            if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) {
+                return;
+            }
+
+            //var curXY = this.startPoint;
+            var curSize = this.curSize || this.startBox,
+                x = this.startBox.x, y = this.startBox.y,
+                ox = x, 
+                oy = y,
+                w = curSize.width, 
+                h = curSize.height,
+                ow = w, 
+                oh = h,
+                mw = this.minWidth, 
+                mh = this.minHeight,
+                mxw = this.maxWidth, 
+                mxh = this.maxHeight,
+                wi = this.widthIncrement,
+                hi = this.heightIncrement,
+                eventXY = e.getXY(),
+                diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])),
+                diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])),
+                pos = this.activeHandle.position,
+                tw,
+                th;
+            
+            switch(pos){
+                case 'east':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    break;
+                case 'south':
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'southeast':
+                    w += diffX; 
+                    h += diffY;
+                    w = Math.min(Math.max(mw, w), mxw);
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'north':
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'west':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+                case 'northeast':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'northwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    x += diffX;
+                    w -= diffX;
+                    break;
+               case 'southwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+            }
+            
+            var sw = this.snap(w, wi, mw);
+            var sh = this.snap(h, hi, mh);
+            if(sw != w || sh != h){
+                switch(pos){
+                    case 'northeast':
+                        y -= sh - h;
+                    break;
+                    case 'north':
+                        y -= sh - h;
+                        break;
+                    case 'southwest':
+                        x -= sw - w;
+                    break;
+                    case 'west':
+                        x -= sw - w;
+                        break;
+                    case 'northwest':
+                        x -= sw - w;
+                        y -= sh - h;
+                    break;
+                }
+                w = sw;
+                h = sh;
+            }
+            
+            if(this.preserveRatio){
+                switch(pos){
+                    case 'southeast':
+                    case 'east':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                       break;
+                    case 'south':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        break;
+                    case 'northeast':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                    break;
+                    case 'north':
+                        tw = w;
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        x += (tw - w) / 2;
+                        break;
+                    case 'southwest':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                        break;
+                    case 'west':
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        y += (th - h) / 2;
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                       break;
+                    case 'northwest':
+                        tw = w;
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                        y += th - h;
+                        x += tw - w;
+                        break;
+                        
+                }
+            }
+            this.proxy.setBounds(x, y, w, h);
+            if(this.dynamic){
+                this.resizeElement();
+            }
+            }catch(ex){}
+        }
+    },
+
+    // private
+    handleOver : function(){
+        if(this.enabled){
+            this.el.addClass('x-resizable-over');
+        }
+    },
+
+    // private
+    handleOut : function(){
+        if(!this.resizing){
+            this.el.removeClass('x-resizable-over');
+        }
+    },
+    
+    /**
+     * Returns the element this component is bound to.
+     * @return {Ext.Element}
+     */
+    getEl : function(){
+        return this.el;
+    },
+    
+    /**
+     * Returns the resizeChild element (or null).
+     * @return {Ext.Element}
+     */
+    getResizeChild : function(){
+        return this.resizeChild;
+    },
+    
+    /**
+     * Destroys this resizable. If the element was wrapped and 
+     * removeEl is not true then the element remains.
+     * @param {Boolean} removeEl (optional) true to remove the element from the DOM
+     */
+    destroy : function(removeEl){
+        Ext.destroy(this.dd, this.overlay, this.proxy);
+        this.overlay = null;
+        this.proxy = null;
+        
+        var ps = Ext.Resizable.positions;
+        for(var k in ps){
+            if(typeof ps[k] != 'function' && this[ps[k]]){
+                this[ps[k]].destroy();
+            }
+        }
+        if(removeEl){
+            this.el.update('');
+            Ext.destroy(this.el);
+            this.el = null;
+        }
+        this.purgeListeners();
+    },
+
+    syncHandleHeight : function(){
+        var h = this.el.getHeight(true);
+        if(this.west){
+            this.west.el.setHeight(h);
+        }
+        if(this.east){
+            this.east.el.setHeight(h);
+        }
+    }
+});
+
+// private
+// hash to map config positions to true positions
+Ext.Resizable.positions = {
+    n: 'north', s: 'south', e: 'east', w: 'west', se: 'southeast', sw: 'southwest', nw: 'northwest', ne: 'northeast'
+};
+
+// private
+Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){
+    if(!this.tpl){
+        // only initialize the template if resizable is used
+        var tpl = Ext.DomHelper.createTemplate(
+            {tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'}
+        );
+        tpl.compile();
+        Ext.Resizable.Handle.prototype.tpl = tpl;
+    }
+    this.position = pos;
+    this.rz = rz;
+    this.el = this.tpl.append(rz.el.dom, [this.position], true);
+    this.el.unselectable();
+    if(transparent){
+        this.el.setOpacity(0);
+    }
+    this.el.on('mousedown', this.onMouseDown, this);
+    if(!disableTrackOver){
+        this.el.on({
+            scope: this,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+    }
+};
+
+// private
+Ext.Resizable.Handle.prototype = {
+    // private
+    afterResize : function(rz){
+        // do nothing    
+    },
+    // private
+    onMouseDown : function(e){
+        this.rz.onMouseDown(this, e);
+    },
+    // private
+    onMouseOver : function(e){
+        this.rz.handleOver(this, e);
+    },
+    // private
+    onMouseOut : function(e){
+        this.rz.handleOut(this, e);
+    },
+    // private
+    destroy : function(){
+        Ext.destroy(this.el);
+        this.el = null;
+    }
+};
+/**
+ * @class Ext.Window
+ * @extends Ext.Panel
+ * <p>A specialized panel intended for use as an application window.  Windows are floated, {@link #resizable}, and
+ * {@link #draggable} by default.  Windows can be {@link #maximizable maximized} to fill the viewport,
+ * restored to their prior size, and can be {@link #minimize}d.</p>
+ * <p>Windows can also be linked to a {@link Ext.WindowGroup} or managed by the {@link Ext.WindowMgr} to provide 
+ * grouping, activation, to front, to back and other application-specific behavior.</p>
+ * <p>By default, Windows will be rendered to document.body. To {@link #constrain} a Window to another element
+ * specify {@link Ext.Component#renderTo renderTo}.</p>
+ * <p><b>Note:</b> By default, the <code>{@link #closable close}</code> header tool <i>destroys</i> the Window resulting in
+ * destruction of any child Components. This makes the Window object, and all its descendants <b>unusable</b>. To enable
+ * re-use of a Window, use <b><code>{@link #closeAction closeAction: 'hide'}</code></b>.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype window
+ */
+Ext.Window = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} x
+     * The X position of the left edge of the window on initial showing. Defaults to centering the Window within
+     * the width of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Number} y
+     * The Y position of the top edge of the window on initial showing. Defaults to centering the Window within
+     * the height of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Boolean} modal
+     * True to make the window modal and mask everything behind it when displayed, false to display it without
+     * restricting access to other UI elements (defaults to false).
+     */
+    /**
+     * @cfg {String/Element} animateTarget
+     * Id or element from which the window should animate while opening (defaults to null with no animation).
+     */
+    /**
+     * @cfg {String} resizeHandles
+     * A valid {@link Ext.Resizable} handles config string (defaults to 'all').  Only applies when resizable = true.
+     */
+    /**
+     * @cfg {Ext.WindowGroup} manager
+     * A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}).
+     */
+    /**
+    * @cfg {String/Number/Button} defaultButton
+    * The id / index of a button or a button instance to focus when this window received the focus.
+    */
+    /**
+    * @cfg {Function} onEsc
+    * Allows override of the built-in processing for the escape key. Default action
+    * is to close the Window (performing whatever action is specified in {@link #closeAction}.
+    * To prevent the Window closing when the escape key is pressed, specify this as
+    * Ext.emptyFn (See {@link Ext#emptyFn}).
+    */
+    /**
+     * @cfg {Boolean} collapsed
+     * True to render the window collapsed, false to render it expanded (defaults to false). Note that if 
+     * {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window 
+     * will always be expanded when shown.
+     */
+    /**
+     * @cfg {Boolean} maximized
+     * True to initially display the window in a maximized state. (Defaults to false).
+     */
+    
+    /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to this panel's element (defaults to 'x-window').
+    */
+    baseCls : 'x-window',
+    /**
+     * @cfg {Boolean} resizable
+     * True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
+     */
+    resizable : true,
+    /**
+     * @cfg {Boolean} draggable
+     * True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true).  Note
+     * that by default the window will be centered in the viewport, so if dragging is disabled the window may need
+     * to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).
+     */
+    draggable : true,
+    /**
+     * @cfg {Boolean} closable
+     * <p>True to display the 'close' tool button and allow the user to close the window, false to
+     * hide the button and disallow closing the window (defaults to true).</p>
+     * <p>By default, when close is requested by either clicking the close button in the header
+     * or pressing ESC when the Window has focus, the {@link #close} method will be called. This
+     * will <i>{@link Ext.Component#destroy destroy}</i> the Window and its content meaning that
+     * it may not be reused.</p>
+     * <p>To make closing a Window <i>hide</i> the Window so that it may be reused, set
+     * {@link #closeAction} to 'hide'.
+     */
+    closable : true,
+    /**
+     * @cfg {String} closeAction
+     * <p>The action to take when the close header tool is clicked:
+     * <div class="mdetail-params"><ul>
+     * <li><b><code>'{@link #close}'</code></b> : <b>Default</b><div class="sub-desc">
+     * {@link #close remove} the window from the DOM and {@link Ext.Component#destroy destroy}
+     * it and all descendant Components. The window will <b>not</b> be available to be
+     * redisplayed via the {@link #show} method.
+     * </div></li>
+     * <li><b><code>'{@link #hide}'</code></b> : <div class="sub-desc">
+     * {@link #hide} the window by setting visibility to hidden and applying negative offsets.
+     * The window will be available to be redisplayed via the {@link #show} method.
+     * </div></li>
+     * </ul></div>
+     * <p><b>Note:</b> This setting does not affect the {@link #close} method
+     * which will always {@link Ext.Component#destroy destroy} the window. To
+     * programatically <i>hide</i> a window, call {@link #hide}.</p>
+     */
+    closeAction : 'close',
+    /**
+     * @cfg {Boolean} constrain
+     * True to constrain the window within its containing element, false to allow it to fall outside of its
+     * containing element. By default the window will be rendered to document.body.  To render and constrain the 
+     * window within another element specify {@link #renderTo}.
+     * (defaults to false).  Optionally the header only can be constrained using {@link #constrainHeader}.
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} constrainHeader
+     * True to constrain the window header within its containing element (allowing the window body to fall outside 
+     * of its containing element) or false to allow the header to fall outside its containing element (defaults to 
+     * false). Optionally the entire window can be constrained using {@link #constrain}.
+     */
+    constrainHeader : false,
+    /**
+     * @cfg {Boolean} plain
+     * True to render the window body with a transparent background so that it will blend into the framing
+     * elements, false to add a lighter background color to visually highlight the body element and separate it
+     * more distinctly from the surrounding frame (defaults to false).
+     */
+    plain : false,
+    /**
+     * @cfg {Boolean} minimizable
+     * True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button
+     * and disallow minimizing the window (defaults to false).  Note that this button provides no implementation --
+     * the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a
+     * custom minimize behavior implemented for this option to be useful.
+     */
+    minimizable : false,
+    /**
+     * @cfg {Boolean} maximizable
+     * True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button
+     * and disallow maximizing the window (defaults to false).  Note that when a window is maximized, the tool button
+     * will automatically change to a 'restore' button with the appropriate behavior already built-in that will
+     * restore the window to its previous size.
+     */
+    maximizable : false,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum height in pixels allowed for this window (defaults to 100).  Only applies when resizable = true.
+     */
+    minHeight : 100,
+    /**
+     * @cfg {Number} minWidth
+     * The minimum width in pixels allowed for this window (defaults to 200).  Only applies when resizable = true.
+     */
+    minWidth : 200,
+    /**
+     * @cfg {Boolean} expandOnShow
+     * True to always expand the window when it is displayed, false to keep it in its current state (which may be
+     * {@link #collapsed}) when displayed (defaults to true).
+     */
+    expandOnShow : true,
+
+    // inherited docs, same default
+    collapsible : false,
+
+    /**
+     * @cfg {Boolean} initHidden
+     * True to hide the window until show() is explicitly called (defaults to true).
+     */
+    initHidden : true,
+    /**
+    * @cfg {Boolean} monitorResize @hide
+    * This is automatically managed based on the value of constrain and constrainToHeader
+    */
+    monitorResize : true,
+
+    // The following configs are set to provide the basic functionality of a window.
+    // Changing them would require additional code to handle correctly and should
+    // usually only be done in subclasses that can provide custom behavior.  Changing them
+    // may have unexpected or undesirable results.
+    /** @cfg {String} elements @hide */
+    elements : 'header,body',
+    /** @cfg {Boolean} frame @hide */
+    frame : true,
+    /** @cfg {Boolean} floating @hide */
+    floating : true,
+
+    // private
+    initComponent : function(){
+        Ext.Window.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event activate
+             * Fires after the window has been visually activated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event deactivate
+             * Fires after the window has been visually deactivated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event resize
+             * Fires after the window has been resized.
+             * @param {Ext.Window} this
+             * @param {Number} width The window's new width
+             * @param {Number} height The window's new height
+             */
+            'resize',
+            /**
+             * @event maximize
+             * Fires after the window has been maximized.
+             * @param {Ext.Window} this
+             */
+            'maximize',
+            /**
+             * @event minimize
+             * Fires after the window has been minimized.
+             * @param {Ext.Window} this
+             */
+            'minimize',
+            /**
+             * @event restore
+             * Fires after the window has been restored to its original size after being maximized.
+             * @param {Ext.Window} this
+             */
+            'restore'
+        );
+        if(this.initHidden === false){
+            this.show();
+        }else{
+            this.hidden = true;
+        }
+    },
+
+    // private
+    getState : function(){
+        return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true));
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Window.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            this.el.addClass('x-window-plain');
+        }
+
+        // this element allows the Window to be focused for keyboard events
+        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();
+            this.mon(this.mask, 'click', this.focus, this);
+        }
+        this.initTools();
+    },
+
+    // private
+    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.mon(this.resizer, 'beforeresize', this.beforeResize, this);
+        }
+
+        if(this.draggable){
+            this.header.addClass('x-window-draggable');
+        }
+        this.mon(this.el, 'mousedown', this.toFront, this);
+        this.manager = this.manager || Ext.WindowMgr;
+        this.manager.register(this);
+        if(this.maximized){
+            this.maximized = false;
+            this.maximize();
+        }
+        if(this.closable){
+            var km = this.getKeyMap();
+            km.on(27, this.onEsc, this);
+            km.disable();
+        }
+    },
+
+    initDraggable : function(){
+        /**
+         * If this Window is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element.
+         * @type Ext.dd.DD
+         * @property dd
+         */
+        this.dd = new Ext.Window.DD(this);
+    },
+
+   // private
+    onEsc : function(){
+        this[this.closeAction]();
+    },
+
+    // private
+    beforeDestroy : function(){
+        if (this.rendered){
+            this.hide();
+          if(this.doAnchor){
+                Ext.EventManager.removeResizeListener(this.doAnchor, this);
+              Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+            }
+            Ext.destroy(
+                this.focusEl,
+                this.resizer,
+                this.dd,
+                this.proxy,
+                this.mask
+            );
+        }
+        Ext.Window.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.manager){
+            this.manager.unregister(this);
+        }
+        Ext.Window.superclass.onDestroy.call(this);
+    },
+
+    // private
+    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.mon(this.header, 'dblclick', this.toggleMaximize, this);
+        }
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction].createDelegate(this, [])
+            });
+        }
+    },
+
+    // private
+    resizerAction : function(){
+        var box = this.proxy.getBox();
+        this.proxy.hide();
+        this.window.handleResize(box);
+        return box;
+    },
+
+    // private
+    beforeResize : function(){
+        this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); // 40 is a magic minimum content size?
+        this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40);
+        this.resizeBox = this.el.getBox();
+    },
+
+    // private
+    updateHandles : function(){
+        if(Ext.isIE && this.resizer){
+            this.resizer.syncHandleHeight();
+            this.el.repaint();
+        }
+    },
+
+    // private
+    handleResize : function(box){
+        var rz = this.resizeBox;
+        if(rz.x != box.x || rz.y != box.y){
+            this.updateBox(box);
+        }else{
+            this.setSize(box);
+        }
+        this.focus();
+        this.updateHandles();
+        this.saveState();
+        this.doLayout();
+        this.fireEvent('resize', this, box.width, box.height);
+    },
+
+    /**
+     * Focuses the window.  If a defaultButton is set, it will receive focus, otherwise the
+     * window itself will receive focus.
+     */
+    focus : function(){
+        var f = this.focusEl, db = this.defaultButton, t = typeof db;
+        if(t != 'undefined'){
+            if(t == 'number' && this.fbar){
+                f = this.fbar.items.get(db);
+            }else if(t == 'string'){
+                f = Ext.getCmp(db);
+            }else{
+                f = db;
+            }
+        }
+        f = f || this.focusEl;
+        f.focus.defer(10, f);
+    },
+
+    /**
+     * Sets the target element from which the window should animate while opening.
+     * @param {String/Element} el The target element or id
+     */
+    setAnimateTarget : function(el){
+        el = Ext.get(el);
+        this.animateTarget = el;
+    },
+
+    // private
+    beforeShow : function(){
+        delete this.el.lastXY;
+        delete this.el.lastLT;
+        if(this.x === undefined || this.y === undefined){
+            var xy = this.el.getAlignToXY(this.container, 'c-c');
+            var pos = this.el.translatePoints(xy[0], xy[1]);
+            this.x = this.x === undefined? pos.left : this.x;
+            this.y = this.y === undefined? pos.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();
+        }
+    },
+
+    /**
+     * Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
+     * @param {String/Element} animateTarget (optional) The target element or id from which the window should
+     * animate while opening (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is displayed
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    show : function(animateTarget, cb, scope){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        if(this.hidden === false){
+            this.toFront();
+            return this;
+        }
+        if(this.fireEvent('beforeshow', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('show', cb, scope, {single:true});
+        }
+        this.hidden = false;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        this.beforeShow();
+        if(this.animateTarget){
+            this.animShow();
+        }else{
+            this.afterShow();
+        }
+        return this;
+    },
+
+    // private
+    afterShow : function(isAnim){
+        this.proxy.hide();
+        this.el.setStyle('display', 'block');
+        this.el.show();
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+            this.cascade(this.setAutoScroll);
+        }
+
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.onWindowResize(this.onWindowResize, this);
+        }
+        this.doConstrain();
+        this.doLayout();
+        if(this.keyMap){
+            this.keyMap.enable();
+        }
+        this.toFront();
+        this.updateHandles();
+        if(isAnim && (Ext.isIE || Ext.isWebKit)){
+            var sz = this.getSize();
+            this.onResize(sz.width, sz.height);
+        }
+        this.fireEvent('show', this);
+    },
+
+    // private
+    animShow : function(){
+        this.proxy.show();
+        this.proxy.setBox(this.animateTarget.getBox());
+        this.proxy.setOpacity(0);
+        var b = this.getBox(false);
+        b.callback = this.afterShow.createDelegate(this, [true], false);
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.opacity = 0.5;
+        b.block = true;
+        this.el.setStyle('display', 'none');
+        this.proxy.shift(b);
+    },
+
+    /**
+     * Hides the window, setting it to invisible and applying negative offsets.
+     * @param {String/Element} animateTarget (optional) The target element or id to which the window should
+     * animate while hiding (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is hidden
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    hide : function(animateTarget, cb, scope){
+        if(this.hidden || this.fireEvent('beforehide', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('hide', cb, scope, {single:true});
+        }
+        this.hidden = true;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        if(this.modal){
+            this.mask.hide();
+            Ext.getBody().removeClass('x-body-masked');
+        }
+        if(this.animateTarget){
+            this.animHide();
+        }else{
+            this.el.hide();
+            this.afterHide();
+        }
+        return this;
+    },
+
+    // private
+    afterHide : function(){
+        this.proxy.hide();
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        }
+        if(this.keyMap){
+            this.keyMap.disable();
+        }
+        this.fireEvent('hide', this);
+    },
+
+    // private
+    animHide : function(){
+        this.proxy.setOpacity(0.5);
+        this.proxy.show();
+        var tb = this.getBox(false);
+        this.proxy.setBox(tb);
+        this.el.hide();
+        var b = this.animateTarget.getBox();
+        b.callback = this.afterHide;
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.block = true;
+        b.opacity = 0;
+        this.proxy.shift(b);
+    },
+
+    // private
+    onWindowResize : function(){
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(this.modal){
+            this.mask.setSize('100%', '100%');
+            var force = this.mask.dom.offsetHeight;
+            this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
+        }
+        this.doConstrain();
+    },
+
+    // private
+    doConstrain : function(){
+        if(this.constrain || this.constrainHeader){
+            var offsets;
+            if(this.constrain){
+                offsets = {
+                    right:this.el.shadowOffset,
+                    left:this.el.shadowOffset,
+                    bottom:this.el.shadowOffset
+                };
+            }else {
+                var s = this.getSize();
+                offsets = {
+                    right:-(s.width - 100),
+                    bottom:-(s.height - 25)
+                };
+            }
+
+            var xy = this.el.getConstrainToXY(this.container, true, offsets);
+            if(xy){
+                this.setPosition(xy[0], xy[1]);
+            }
+        }
+    },
+
+    // private - used for dragging
+    ghost : function(cls){
+        var ghost = this.createGhost(cls);
+        var box = this.getBox(true);
+        ghost.setLeftTop(box.x, box.y);
+        ghost.setWidth(box.width);
+        this.el.hide();
+        this.activeGhost = ghost;
+        return ghost;
+    },
+
+    // private
+    unghost : function(show, matchPosition){
+        if(!this.activeGhost) {
+            return;
+        }
+        if(show !== false){
+            this.el.show();
+            this.focus();
+            if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+                this.cascade(this.setAutoScroll);
+            }
+        }
+        if(matchPosition !== false){
+            this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true));
+        }
+        this.activeGhost.hide();
+        this.activeGhost.remove();
+        delete this.activeGhost;
+    },
+
+    /**
+     * Placeholder method for minimizing the window.  By default, this method simply fires the {@link #minimize} event
+     * since the behavior of minimizing a window is application-specific.  To implement custom minimize behavior,
+     * either the minimize event can be handled or this method can be overridden.
+     * @return {Ext.Window} this
+     */
+    minimize : function(){
+        this.fireEvent('minimize', this);
+        return this;
+    },
+
+    /**
+     * <p>Closes the Window, removes it from the DOM, {@link Ext.Component#destroy destroy}s
+     * the Window object and all its descendant Components. The {@link Ext.Panel#beforeclose beforeclose}
+     * event is fired before the close happens and will cancel the close action if it returns false.<p>
+     * <p><b>Note:</b> This method is not affected by the {@link #closeAction} setting which
+     * only affects the action triggered when clicking the {@link #closable 'close' tool in the header}.
+     * To hide the Window without destroying it, call {@link #hide}.</p>
+     */
+    close : function(){
+        if(this.fireEvent('beforeclose', this) !== false){
+            this.hide(null, function(){
+                this.fireEvent('close', this);
+                this.destroy();
+            }, this);
+        }
+    },
+
+    /**
+     * Fits the window within its current container and automatically replaces
+     * the {@link #maximizable 'maximize' tool button} with the 'restore' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * Restores a {@link #maximizable maximized}  window back to its original
+     * size and position prior to being maximized and also replaces
+     * the 'restore' tool button with the 'maximize' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * A shortcut method for toggling between {@link #maximize} and {@link #restore} based on the current maximized
+     * state of the window.
+     * @return {Ext.Window} this
+     */
+    toggleMaximize : function(){
+        return this[this.maximized ? 'restore' : 'maximize']();
+    },
+
+    // private
+    fitContainer : function(){
+        var vs = this.container.getViewSize();
+        this.setSize(vs.width, vs.height);
+    },
+
+    // private
+    // z-index is managed by the WindowManager and may be overwritten at any time
+    setZIndex : function(index){
+        if(this.modal){
+            this.mask.setStyle('z-index', index);
+        }
+        this.el.setZIndex(++index);
+        index += 5;
+
+        if(this.resizer){
+            this.resizer.proxy.setStyle('z-index', ++index);
+        }
+
+        this.lastZIndex = index;
+    },
+
+    /**
+     * Aligns the window to the specified element
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details).
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Ext.Window} this
+     */
+    alignTo : function(element, position, offsets){
+        var xy = this.el.getAlignToXY(element, position, offsets);
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    },
+
+    /**
+     * Anchors this window to another element and realigns it when the window is resized or scrolled.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details)
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @return {Ext.Window} this
+     */
+    anchorTo : function(el, alignment, offsets, monitorScroll){
+      if(this.doAnchor){
+          Ext.EventManager.removeResizeListener(this.doAnchor, this);
+          Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+      }
+      this.doAnchor = function(){
+          this.alignTo(el, alignment, offsets);
+      };
+      Ext.EventManager.onWindowResize(this.doAnchor, this);
+      
+      var tm = typeof monitorScroll;
+      if(tm != 'undefined'){
+          Ext.EventManager.on(window, 'scroll', this.doAnchor, this,
+              {buffer: tm == 'number' ? monitorScroll : 50});
+      }
+      this.doAnchor();
+      return this;
+    },
+
+    /**
+     * Brings this window to the front of any other visible windows
+     * @param {Boolean} e (optional) Specify <tt>false</tt> to prevent the window from being focused.
+     * @return {Ext.Window} this
+     */
+    toFront : function(e){
+        if(this.manager.bringToFront(this)){
+            if(!e || !e.getTarget().focus){
+                this.focus();
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Makes this the active window by showing its shadow, or deactivates it by hiding its shadow.  This method also
+     * fires the {@link #activate} or {@link #deactivate} event depending on which action occurred.
+     * @param {Boolean} active True to activate the window, false to deactivate it (defaults to false)
+     */
+    setActive : function(active){
+        if(active){
+            if(!this.maximized){
+                this.el.enableShadow(true);
+            }
+            this.fireEvent('activate', this);
+        }else{
+            this.el.disableShadow();
+            this.fireEvent('deactivate', this);
+        }
+    },
+
+    /**
+     * Sends this window to the back of (lower z-index than) any other visible windows
+     * @return {Ext.Window} this
+     */
+    toBack : function(){
+        this.manager.sendToBack(this);
+        return this;
+    },
+
+    /**
+     * Centers this window in the viewport
+     * @return {Ext.Window} this
+     */
+    center : function(){
+        var xy = this.el.getAlignToXY(this.container, 'c-c');
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     **/
+});
+Ext.reg('window', Ext.Window);
+
+// private - custom Window DD implementation
+Ext.Window.DD = function(win){
+    this.win = win;
+    Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id);
+    this.setHandleElId(win.header.id);
+    this.scroll = false;
+};
+
+Ext.extend(Ext.Window.DD, Ext.dd.DD, {
+    moveOnly:true,
+    headerOffsets:[100, 25],
+    startDrag : function(){
+        var w = this.win;
+        this.proxy = w.ghost();
+        if(w.constrain !== false){
+            var so = w.el.shadowOffset;
+            this.constrainTo(w.container, {right: so, left: so, bottom: so});
+        }else if(w.constrainHeader !== false){
+            var s = this.proxy.getSize();
+            this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])});
+        }
+    },
+    b4Drag : Ext.emptyFn,
+
+    onDrag : function(e){
+        this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY());
+    },
+
+    endDrag : function(e){
+        this.win.unghost();
+        this.win.saveState();
+    }
+});
+/**
+ * @class Ext.WindowGroup
+ * An object that represents a group of {@link Ext.Window} instances and provides z-order management
+ * and window activation behavior.
+ * @constructor
+ */
+Ext.WindowGroup = function(){
+    var list = {};
+    var accessList = [];
+    var front = null;
+
+    // private
+    var sortWindows = function(d1, d2){
+        return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1;
+    };
+
+    // private
+    var orderWindows = function(){
+        var a = accessList, len = a.length;
+        if(len > 0){
+            a.sort(sortWindows);
+            var seed = a[0].manager.zseed;
+            for(var i = 0; i < len; i++){
+                var win = a[i];
+                if(win && !win.hidden){
+                    win.setZIndex(seed + (i*10));
+                }
+            }
+        }
+        activateLast();
+    };
+
+    // private
+    var setActiveWin = function(win){
+        if(win != front){
+            if(front){
+                front.setActive(false);
+            }
+            front = win;
+            if(win){
+                win.setActive(true);
+            }
+        }
+    };
+
+    // private
+    var activateLast = function(){
+        for(var i = accessList.length-1; i >=0; --i) {
+            if(!accessList[i].hidden){
+                setActiveWin(accessList[i]);
+                return;
+            }
+        }
+        // none to activate
+        setActiveWin(null);
+    };
+
+    return {
+        /**
+         * The starting z-index for windows (defaults to 9000)
+         * @type Number The z-index value
+         */
+        zseed : 9000,
+
+        // private
+        register : function(win){
+            list[win.id] = win;
+            accessList.push(win);
+            win.on('hide', activateLast);
+        },
+
+        // private
+        unregister : function(win){
+            delete list[win.id];
+            win.un('hide', activateLast);
+            accessList.remove(win);
+        },
+
+        /**
+         * Gets a registered window by id.
+         * @param {String/Object} id The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window}
+         */
+        get : function(id){
+            return typeof id == "object" ? id : list[id];
+        },
+
+        /**
+         * Brings the specified window to the front of any other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Boolean} True if the dialog was brought to the front, else false
+         * if it was already in front
+         */
+        bringToFront : function(win){
+            win = this.get(win);
+            if(win != front){
+                win._lastAccess = new Date().getTime();
+                orderWindows();
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Sends the specified window to the back of other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window} The window
+         */
+        sendToBack : function(win){
+            win = this.get(win);
+            win._lastAccess = -(new Date().getTime());
+            orderWindows();
+            return win;
+        },
+
+        /**
+         * Hides all windows in the group.
+         */
+        hideAll : function(){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function" && list[id].isVisible()){
+                    list[id].hide();
+                }
+            }
+        },
+
+        /**
+         * Gets the currently-active window in the group.
+         * @return {Ext.Window} The active window
+         */
+        getActive : function(){
+            return front;
+        },
+
+        /**
+         * Returns zero or more windows in the group using the custom search function passed to this method.
+         * The function should accept a single {@link Ext.Window} reference as its only argument and should
+         * return true if the window matches the search criteria, otherwise it should return false.
+         * @param {Function} fn The search function
+         * @param {Object} scope (optional) The scope in which to execute the function (defaults to the window
+         * that gets passed to the function if not specified)
+         * @return {Array} An array of zero or more matching windows
+         */
+        getBy : function(fn, scope){
+            var r = [];
+            for(var i = accessList.length-1; i >=0; --i) {
+                var win = accessList[i];
+                if(fn.call(scope||win, win) !== false){
+                    r.push(win);
+                }
+            }
+            return r;
+        },
+
+        /**
+         * Executes the specified function once for every window in the group, passing each
+         * window as the only parameter. Returning false from the function will stop the iteration.
+         * @param {Function} fn The function to execute for each item
+         * @param {Object} scope (optional) The scope in which to execute the function
+         */
+        each : function(fn, scope){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function"){
+                    if(fn.call(scope || list[id], list[id]) === false){
+                        return;
+                    }
+                }
+            }
+        }
+    };
+};
+
+
+/**
+ * @class Ext.WindowMgr
+ * @extends Ext.WindowGroup
+ * The default global window group that is available automatically.  To have more than one group of windows
+ * with separate z-order stacks, create additional instances of {@link Ext.WindowGroup} as needed.
+ * @singleton
+ */
+Ext.WindowMgr = new Ext.WindowGroup();/**
+ * @class Ext.MessageBox
+ * <p>Utility class for generating different styles of message boxes.  The alias Ext.Msg can also be used.<p/>
+ * <p>Note that the MessageBox is asynchronous.  Unlike a regular JavaScript <code>alert</code> (which will halt
+ * browser execution), showing a MessageBox will not cause the code to stop.  For this reason, if you have code
+ * that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
+ * (see the <code>function</code> parameter for {@link #show} for more details).</p>
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic alert:
+Ext.Msg.alert('Status', 'Changes saved successfully.');
+
+// Prompt for user data and process the result using a callback:
+Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
+    if (btn == 'ok'){
+        // process text value and close...
+    }
+});
+
+// Show a dialog using config options:
+Ext.Msg.show({
+   title:'Save Changes?',
+   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
+   buttons: Ext.Msg.YESNOCANCEL,
+   fn: processResult,
+   animEl: 'elId',
+   icon: Ext.MessageBox.QUESTION
+});
+</code></pre>
+ * @singleton
+ */
+Ext.MessageBox = function(){
+    var dlg, opt, mask, waitTimer;
+    var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl;
+    var buttons, activeTextEl, bwidth, iconCls = '';
+
+    // private
+    var handleButton = function(button){
+        if(dlg.isVisible()){
+            dlg.hide();
+            handleHide();
+            Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value, opt], 1);
+        }
+    };
+
+    // private
+    var handleHide = function(){
+        if(opt && opt.cls){
+            dlg.el.removeClass(opt.cls);
+        }
+        progressBar.reset();
+    };
+
+    // private
+    var handleEsc = function(d, k, e){
+        if(opt && opt.closable !== false){
+            dlg.hide();
+            handleHide();
+        }
+        if(e){
+            e.stopEvent();
+        }
+    };
+
+    // private
+    var updateButtons = function(b){
+        var width = 0;
+        if(!b){
+            buttons["ok"].hide();
+            buttons["cancel"].hide();
+            buttons["yes"].hide();
+            buttons["no"].hide();
+            return width;
+        }
+        dlg.footer.dom.style.display = '';
+        for(var k in buttons){
+            if(typeof buttons[k] != "function"){
+                if(b[k]){
+                    buttons[k].show();
+                    buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]);
+                    width += buttons[k].el.getWidth()+15;
+                }else{
+                    buttons[k].hide();
+                }
+            }
+        }
+        return width;
+    };
+
+    return {
+        /**
+         * Returns a reference to the underlying {@link Ext.Window} element
+         * @return {Ext.Window} The window
+         */
+        getDialog : function(titleText){
+           if(!dlg){
+                dlg = new Ext.Window({
+                    autoCreate : true,
+                    title:titleText,
+                    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(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){
+                            handleButton("no");
+                        }else{
+                            handleButton("cancel");
+                        }
+                    }
+                });
+                buttons = {};
+                var bt = this.buttonText;
+                //TODO: refactor this block into a buttons config to pass into the Window constructor
+                buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok"));
+                buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes"));
+                buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no"));
+                buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel"));
+                buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets';
+                dlg.render(document.body);
+                dlg.getEl().addClass('x-window-dlg');
+                mask = dlg.mask;
+                bodyEl = dlg.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>'
+                });
+                iconEl = Ext.get(bodyEl.dom.firstChild);
+                var contentEl = bodyEl.dom.childNodes[1];
+                msgEl = Ext.get(contentEl.firstChild);
+                textboxEl = Ext.get(contentEl.childNodes[2].firstChild);
+                textboxEl.enableDisplayMode();
+                textboxEl.addKeyListener([10,13], function(){
+                    if(dlg.isVisible() && opt && opt.buttons){
+                        if(opt.buttons.ok){
+                            handleButton("ok");
+                        }else if(opt.buttons.yes){
+                            handleButton("yes");
+                        }
+                    }
+                });
+                textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]);
+                textareaEl.enableDisplayMode();
+                progressBar = new Ext.ProgressBar({
+                    renderTo:bodyEl
+                });
+               bodyEl.createChild({cls:'x-clear'});
+            }
+            return dlg;
+        },
+
+        /**
+         * Updates the message box body text
+         * @param {String} text (optional) Replaces the message box element's innerHTML with the specified string (defaults to
+         * the XHTML-compliant non-breaking space character '&amp;#160;')
+         * @return {Ext.MessageBox} this
+         */
+        updateText : function(text){
+            if(!dlg.isVisible() && !opt.width){
+                dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows
+            }
+            msgEl.update(text || '&#160;');
+
+            var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0;
+            var mw = msgEl.getWidth() + msgEl.getMargins('lr');
+            var fw = dlg.getFrameWidth('lr');
+            var bw = dlg.body.getFrameWidth('lr');
+            if (Ext.isIE && iw > 0){
+                //3 pixels get subtracted in the icon CSS for an IE margin issue,
+                //so we have to add it back here for the overall width to be consistent
+                iw += 3;
+            }
+            var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth),
+                        Math.max(opt.minWidth || this.minWidth, bwidth || 0));
+
+            if(opt.prompt === true){
+                activeTextEl.setWidth(w-iw-fw-bw);
+            }
+            if(opt.progress === true || opt.wait === true){
+                progressBar.setSize(w-iw-fw-bw);
+            }
+            if(Ext.isIE && w == bwidth){
+                w += 4; //Add offset when the content width is smaller than the buttons.    
+            }
+            dlg.setSize(w, 'auto').center();
+            return this;
+        },
+
+        /**
+         * Updates a progress-style message box's text and progress bar. Only relevant on message boxes
+         * initiated via {@link Ext.MessageBox#progress} or {@link Ext.MessageBox#wait},
+         * or by calling {@link Ext.MessageBox#show} with progress: true.
+         * @param {Number} value Any number between 0 and 1 (e.g., .5, defaults to 0)
+         * @param {String} progressText The progress text to display inside the progress bar (defaults to '')
+         * @param {String} msg The message box's body text is replaced with the specified string (defaults to undefined
+         * so that any existing body text will not get overwritten by default unless a new value is passed in)
+         * @return {Ext.MessageBox} this
+         */
+        updateProgress : function(value, progressText, msg){
+            progressBar.updateProgress(value, progressText);
+            if(msg){
+                this.updateText(msg);
+            }
+            return this;
+        },
+
+        /**
+         * Returns true if the message box is currently displayed
+         * @return {Boolean} True if the message box is visible, else false
+         */
+        isVisible : function(){
+            return dlg && dlg.isVisible();
+        },
+
+        /**
+         * Hides the message box if it is displayed
+         * @return {Ext.MessageBox} this
+         */
+        hide : function(){
+            var proxy = dlg ? dlg.activeGhost : null;
+            if(this.isVisible() || proxy){
+                dlg.hide();
+                handleHide();
+                if (proxy){
+                    // unghost is a private function, but i saw no better solution
+                    // to fix the locking problem when dragging while it closes
+                    dlg.unghost(false, false);
+                } 
+            }
+            return this;
+        },
+
+        /**
+         * Displays a new message box, or reinitializes an existing message box, based on the config options
+         * passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,
+         * although those calls are basic shortcuts and do not support all of the config options allowed here.
+         * @param {Object} config The following config options are supported: <ul>
+         * <li><b>animEl</b> : String/Element<div class="sub-desc">An id or Element from which the message box should animate as it
+         * opens and closes (defaults to undefined)</div></li>
+         * <li><b>buttons</b> : Object/Boolean<div class="sub-desc">A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
+         * cancel:'Bar'}), or false to not show any buttons (defaults to false)</div></li>
+         * <li><b>closable</b> : Boolean<div class="sub-desc">False to hide the top-right close button (defaults to true). Note that
+         * progress and wait dialogs will ignore this property and always hide the close button as they can only
+         * be closed programmatically.</div></li>
+         * <li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
+         * <li><b>defaultTextHeight</b> : Number<div class="sub-desc">The default height in pixels of the message box's multiline textarea
+         * if displayed (defaults to 75)</div></li>
+         * <li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
+         * by clicking on the configured buttons, or on the dialog close button, or by pressing
+         * the return button to enter input.
+         * <p>Progress and wait dialogs will ignore this option since they do not respond to user
+         * actions and can only be closed programmatically, so any required function should be called
+         * by the same code after it closes the dialog. Parameters passed:<ul>
+         * <li><b>buttonId</b> : String<div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul>
+         * <li><tt>ok</tt></li>
+         * <li><tt>yes</tt></li>
+         * <li><tt>no</tt></li>
+         * <li><tt>cancel</tt></li>
+         * </ul></div></div></li>
+         * <li><b>text</b> : String<div class="sub-desc">Value of the input field if either <tt><a href="#show-option-prompt" ext:member="show-option-prompt" ext:cls="Ext.MessageBox">prompt</a></tt>
+         * or <tt><a href="#show-option-multiline" ext:member="show-option-multiline" ext:cls="Ext.MessageBox">multiline</a></tt> is true</div></li>
+         * <li><b>opt</b> : Object<div class="sub-desc">The config object passed to show.</div></li>
+         * </ul></p></div></li>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope of the callback function</div></li>
+         * <li><b>icon</b> : String<div class="sub-desc">A CSS class that provides a background image to be used as the body icon for the
+         * dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')</div></li>
+         * <li><b>iconCls</b> : String<div class="sub-desc">The standard {@link Ext.Window#iconCls} to
+         * add an optional header icon (defaults to '')</div></li>
+         * <li><b>maxWidth</b> : Number<div class="sub-desc">The maximum width in pixels of the message box (defaults to 600)</div></li>
+         * <li><b>minWidth</b> : Number<div class="sub-desc">The minimum width in pixels of the message box (defaults to 100)</div></li>
+         * <li><b>modal</b> : Boolean<div class="sub-desc">False to allow user interaction with the page while the message box is
+         * displayed (defaults to true)</div></li>
+         * <li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
+         * XHTML-compliant non-breaking space character '&amp;#160;')</div></li>
+         * <li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">
+         * True to prompt the user to enter multi-line text (defaults to false)</div></li>
+         * <li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
+         * <li><a id="show-option-prompt"></a><b>prompt</b> : Boolean<div class="sub-desc">True to prompt the user to enter single-line text (defaults to false)</div></li>
+         * <li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
+         * <li><b>title</b> : String<div class="sub-desc">The title text</div></li>
+         * <li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
+         * <li><b>wait</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>waitConfig</b> : Object<div class="sub-desc">A {@link Ext.ProgressBar#waitConfig} object (applies only if wait = true)</div></li>
+         * <li><b>width</b> : Number<div class="sub-desc">The width of the dialog in pixels</div></li>
+         * </ul>
+         * Example usage:
+         * <pre><code>
+Ext.Msg.show({
+   title: 'Address',
+   msg: 'Please enter your address:',
+   width: 300,
+   buttons: Ext.MessageBox.OKCANCEL,
+   multiline: true,
+   fn: saveAddress,
+   animEl: 'addAddressBtn',
+   icon: Ext.MessageBox.INFO
+});
+</code></pre>
+         * @return {Ext.MessageBox} this
+         */
+        show : function(options){
+            if(this.isVisible()){
+                this.hide();
+            }
+            opt = options;
+            var d = this.getDialog(opt.title || "&#160;");
+
+            d.setTitle(opt.title || "&#160;");
+            var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true);
+            d.tools.close.setDisplayed(allowClose);
+            activeTextEl = textboxEl;
+            opt.prompt = opt.prompt || (opt.multiline ? true : false);
+            if(opt.prompt){
+                if(opt.multiline){
+                    textboxEl.hide();
+                    textareaEl.show();
+                    textareaEl.setHeight(typeof opt.multiline == "number" ?
+                        opt.multiline : this.defaultTextHeight);
+                    activeTextEl = textareaEl;
+                }else{
+                    textboxEl.show();
+                    textareaEl.hide();
+                }
+            }else{
+                textboxEl.hide();
+                textareaEl.hide();
+            }
+            activeTextEl.dom.value = opt.value || "";
+            if(opt.prompt){
+                d.focusEl = activeTextEl;
+            }else{
+                var bs = opt.buttons;
+                var db = null;
+                if(bs && bs.ok){
+                    db = buttons["ok"];
+                }else if(bs && bs.yes){
+                    db = buttons["yes"];
+                }
+                if (db){
+                    d.focusEl = db;
+                }
+            }
+            if(opt.iconCls){
+              d.setIconClass(opt.iconCls);
+            }
+            this.setIcon(opt.icon);
+            if(opt.cls){
+                d.el.addClass(opt.cls);
+            }
+            d.proxyDrag = opt.proxyDrag === true;
+            d.modal = opt.modal !== false;
+            d.mask = opt.modal !== false ? mask : false;
+            
+            d.on('show', function(){
+                //workaround for window internally enabling keymap in afterShow
+                d.keyMap.setDisabled(allowClose !== true);
+                d.doLayout();
+                this.setIcon(opt.icon);
+                bwidth = updateButtons(opt.buttons);
+                progressBar.setVisible(opt.progress === true || opt.wait === true);
+                this.updateProgress(0, opt.progressText);
+                this.updateText(opt.msg);
+                if(opt.wait === true){
+                    progressBar.wait(opt.waitConfig);
+                }
+
+            }, this, {single:true});
+            if(!d.isVisible()){
+                // force it to the end of the z-index stack so it gets a cursor in FF
+                document.body.appendChild(dlg.el.dom);
+                d.setAnimateTarget(opt.animEl);
+                d.show(opt.animEl);
+            }
+            return this;
+        },
+
+        /**
+         * Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default
+         * styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
+         * to clear any existing icon.  The following built-in icon classes are supported, but you can also pass
+         * in a custom class name:
+         * <pre>
+Ext.MessageBox.INFO
+Ext.MessageBox.WARNING
+Ext.MessageBox.QUESTION
+Ext.MessageBox.ERROR
+         *</pre>
+         * @param {String} icon A CSS classname specifying the icon's background image url, or empty string to clear the icon
+         * @return {Ext.MessageBox} this
+         */
+        setIcon : function(icon){
+            if(icon && icon != ''){
+                iconEl.removeClass('x-hidden');
+                iconEl.replaceClass(iconCls, icon);
+                bodyEl.addClass('x-dlg-icon');
+                iconCls = icon;
+            }else{
+                iconEl.replaceClass(iconCls, 'x-hidden');
+                bodyEl.removeClass('x-dlg-icon');
+                iconCls = '';
+            }
+            return this;
+        },
+
+        /**
+         * Displays a message box with a progress bar.  This message box has no buttons and is not closeable by
+         * the user.  You are responsible for updating the progress bar as needed via {@link Ext.MessageBox#updateProgress}
+         * and closing the message box when the process is complete.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {String} progressText (optional) The text to display inside the progress bar (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        progress : function(title, msg, progressText){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                progress:true,
+                closable:false,
+                minWidth: this.minProgressWidth,
+                progressText: progressText
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user
+         * interaction while waiting for a long-running process to complete that does not have defined intervals.
+         * You are responsible for closing the message box when the process is complete.
+         * @param {String} msg The message box body text
+         * @param {String} title (optional) The title bar text
+         * @param {Object} config (optional) A {@link Ext.ProgressBar#waitConfig} object
+         * @return {Ext.MessageBox} this
+         */
+        wait : function(msg, title, config){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                closable:false,
+                wait:true,
+                modal:true,
+                minWidth: this.minProgressWidth,
+                waitConfig: config
+            });
+            return this;
+        },
+
+        /**
+         * Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
+         * If a callback function is passed it will be called after the user clicks the button, and the
+         * id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        alert : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OK,
+                fn: fn,
+                scope : scope
+            });
+            return this;
+        },
+
+        /**
+         * Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
+         * If a callback function is passed it will be called after the user clicks either button,
+         * and the id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        confirm : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.YESNO,
+                fn: fn,
+                scope : scope,
+                icon: this.QUESTION
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
+         * The prompt can be a single-line or multi-line textbox.  If a callback function is passed it will be called after the user
+         * clicks either button, and the id of the button that was clicked (could also be the top-right
+         * close button) and the text that was entered will be passed as the two parameters to the callback.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @param {Boolean/Number} multiline (optional) True to create a multiline textbox using the defaultTextHeight
+         * property, or the height in pixels to create the textbox (defaults to false / single-line)
+         * @param {String} value (optional) Default value of the text input element (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        prompt : function(title, msg, fn, scope, multiline, value){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OKCANCEL,
+                fn: fn,
+                minWidth:250,
+                scope : scope,
+                prompt:true,
+                multiline: multiline,
+                value: value
+            });
+            return this;
+        },
+
+        /**
+         * Button config that displays a single OK button
+         * @type Object
+         */
+        OK : {ok:true},
+        /**
+         * Button config that displays a single Cancel button
+         * @type Object
+         */
+        CANCEL : {cancel:true},
+        /**
+         * Button config that displays OK and Cancel buttons
+         * @type Object
+         */
+        OKCANCEL : {ok:true, cancel:true},
+        /**
+         * Button config that displays Yes and No buttons
+         * @type Object
+         */
+        YESNO : {yes:true, no:true},
+        /**
+         * Button config that displays Yes, No and Cancel buttons
+         * @type Object
+         */
+        YESNOCANCEL : {yes:true, no:true, cancel:true},
+        /**
+         * The CSS class that provides the INFO icon image
+         * @type String
+         */
+        INFO : 'ext-mb-info',
+        /**
+         * The CSS class that provides the WARNING icon image
+         * @type String
+         */
+        WARNING : 'ext-mb-warning',
+        /**
+         * The CSS class that provides the QUESTION icon image
+         * @type String
+         */
+        QUESTION : 'ext-mb-question',
+        /**
+         * The CSS class that provides the ERROR icon image
+         * @type String
+         */
+        ERROR : 'ext-mb-error',
+
+        /**
+         * The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)
+         * @type Number
+         */
+        defaultTextHeight : 75,
+        /**
+         * The maximum width in pixels of the message box (defaults to 600)
+         * @type Number
+         */
+        maxWidth : 600,
+        /**
+         * The minimum width in pixels of the message box (defaults to 110)
+         * @type Number
+         */
+        minWidth : 110,
+        /**
+         * The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful
+         * for setting a different minimum width than text-only dialogs may need (defaults to 250)
+         * @type Number
+         */
+        minProgressWidth : 250,
+        /**
+         * An object containing the default button text strings that can be overriden for localized language support.
+         * Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific
+         * resource file for handling language support across the framework.
+         * Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french
+         * @type Object
+         */
+        buttonText : {
+            ok : "OK",
+            cancel : "Cancel",
+            yes : "Yes",
+            no : "No"
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.MessageBox}
+ */
+Ext.Msg = Ext.MessageBox;/**
+ * @class Ext.dd.PanelProxy
+ * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally
+ * for the Panel's drag drop implementation, and should never need to be created directly.
+ * @constructor
+ * @param panel The {@link Ext.Panel} to proxy for
+ * @param config Configuration options
+ */
+Ext.dd.PanelProxy = function(panel, config){
+    this.panel = panel;
+    this.id = this.panel.id +'-ddproxy';
+    Ext.apply(this, config);
+};
+
+Ext.dd.PanelProxy.prototype = {
+    /**
+     * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel,
+     * false to drag with no proxy (defaults to true).
+     */
+    insertProxy : true,
+
+    // private overrides
+    setStatus : Ext.emptyFn,
+    reset : Ext.emptyFn,
+    update : Ext.emptyFn,
+    stop : Ext.emptyFn,
+    sync: Ext.emptyFn,
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getEl : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's ghost element
+     * @return {Element} The proxy's ghost element
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getProxy : function(){
+        return this.proxy;
+    },
+
+    /**
+     * Hides the 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;
+        }
+    },
+
+    /**
+     * Shows the proxy
+     */
+    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';
+        }
+    },
+
+    // private
+    repair : function(xy, callback, scope){
+        this.hide();
+        if(typeof callback == "function"){
+            callback.call(scope || this);
+        }
+    },
+
+    /**
+     * Moves the proxy to a different position in the DOM.  This is typically called while dragging the Panel
+     * to keep the proxy sync'd to the Panel's location.
+     * @param {HTMLElement} parentNode The proxy's parent DOM node
+     * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults
+     * to the parent's last child if not specified)
+     */
+    moveProxy : function(parentNode, before){
+        if(this.proxy){
+            parentNode.insertBefore(this.proxy.dom, before);
+        }
+    }
+};
+
+// private - DD implementation for Panels
+Ext.Panel.DD = function(panel, cfg){
+    this.panel = panel;
+    this.dragData = {panel: panel};
+    this.proxy = new Ext.dd.PanelProxy(panel, cfg);
+    Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg);
+    var h = panel.header;
+    if(h){
+        this.setHandleElId(h.id);
+    }
+    (h ? h : 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(x, y) {
+        this.proxy.show();
+    },
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+    },
+    onInitDrag : function(x, y){
+        this.onStartDrag(x, y);
+        return true;
+    },
+    createFrame : Ext.emptyFn,
+    getDragEl : function(e){
+        return this.proxy.ghost.dom;
+    },
+    endDrag : function(e){
+        this.proxy.hide();
+        this.panel.saveState();
+    },
+
+    autoOffset : function(x, y) {
+        x -= this.startPageX;
+        y -= this.startPageY;
+        this.setDelta(x, y);
+    }
+});/**
+ * @class Ext.state.Provider
+ * Abstract base class for state provider implementations. This class provides methods
+ * for encoding and decoding <b>typed</b> variables including dates and defines the
+ * Provider interface.
+ */
+Ext.state.Provider = function(){
+    /**
+     * @event statechange
+     * Fires when a state change occurs.
+     * @param {Provider} this This state provider
+     * @param {String} key The state key which was changed
+     * @param {String} value The encoded value for the state
+     */
+    this.addEvents("statechange");
+    this.state = {};
+    Ext.state.Provider.superclass.constructor.call(this);
+};
+Ext.extend(Ext.state.Provider, Ext.util.Observable, {
+    /**
+     * Returns the current value for a key
+     * @param {String} name The key name
+     * @param {Mixed} defaultValue A default value to return if the key's value is not found
+     * @return {Mixed} The state data
+     */
+    get : function(name, defaultValue){
+        return typeof this.state[name] == "undefined" ?
+            defaultValue : this.state[name];
+    },
+
+    /**
+     * Clears a value from the state
+     * @param {String} name The key name
+     */
+    clear : function(name){
+        delete this.state[name];
+        this.fireEvent("statechange", this, name, null);
+    },
+
+    /**
+     * Sets the value for a key
+     * @param {String} name The key name
+     * @param {Mixed} value The value to set
+     */
+    set : function(name, value){
+        this.state[name] = value;
+        this.fireEvent("statechange", this, name, value);
+    },
+
+    /**
+     * Decodes a string previously encoded with {@link #encodeValue}.
+     * @param {String} value The value to decode
+     * @return {Mixed} The decoded value
+     */
+    decodeValue : function(cookie){
+        var re = /^(a|n|d|b|s|o)\:(.*)$/;
+        var matches = re.exec(unescape(cookie));
+        if(!matches || !matches[1]) return; // non state cookie
+        var type = matches[1];
+        var v = matches[2];
+        switch(type){
+            case "n":
+                return parseFloat(v);
+            case "d":
+                return new Date(Date.parse(v));
+            case "b":
+                return (v == "1");
+            case "a":
+                var all = [];
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    all.push(this.decodeValue(values[i]));
+                }
+                return all;
+           case "o":
+                var all = {};
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    var kv = values[i].split("=");
+                    all[kv[0]] = this.decodeValue(kv[1]);
+                }
+                return all;
+           default:
+                return v;
+        }
+    },
+
+    /**
+     * Encodes a value including type information.  Decode with {@link #decodeValue}.
+     * @param {Mixed} value The value to encode
+     * @return {String} The encoded value
+     */
+    encodeValue : function(v){
+        var enc;
+        if(typeof v == "number"){
+            enc = "n:" + v;
+        }else if(typeof v == "boolean"){
+            enc = "b:" + (v ? "1" : "0");
+        }else if(Ext.isDate(v)){
+            enc = "d:" + v.toGMTString();
+        }else if(Ext.isArray(v)){
+            var flat = "";
+            for(var i = 0, len = v.length; i < len; i++){
+                flat += this.encodeValue(v[i]);
+                if(i != len-1) flat += "^";
+            }
+            enc = "a:" + flat;
+        }else if(typeof v == "object"){
+            var flat = "";
+            for(var key in v){
+                if(typeof v[key] != "function" && v[key] !== undefined){
+                    flat += key + "=" + this.encodeValue(v[key]) + "^";
+                }
+            }
+            enc = "o:" + flat.substring(0, flat.length-1);
+        }else{
+            enc = "s:" + v;
+        }
+        return escape(enc);
+    }
+});
+/**
+ * @class Ext.state.Manager
+ * This is the global state manager. By default all components that are "state aware" check this class
+ * for state information if you don't pass them a custom state provider. In order for this class
+ * to be useful, it must be initialized with a provider when your application initializes. Example usage:
+ <pre><code>
+// in your initialization function
+init : function(){
+   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+   var win = new Window(...);
+   win.restoreState();
+}
+ </code></pre>
+ * @singleton
+ */
+Ext.state.Manager = function(){
+    var provider = new Ext.state.Provider();
+
+    return {
+        /**
+         * Configures the default state provider for your application
+         * @param {Provider} stateProvider The state provider to set
+         */
+        setProvider : function(stateProvider){
+            provider = stateProvider;
+        },
+
+        /**
+         * Returns the current value for a key
+         * @param {String} name The key name
+         * @param {Mixed} defaultValue The default value to return if the key lookup does not match
+         * @return {Mixed} The state data
+         */
+        get : function(key, defaultValue){
+            return provider.get(key, defaultValue);
+        },
+
+        /**
+         * Sets the value for a key
+         * @param {String} name The key name
+         * @param {Mixed} value The state data
+         */
+         set : function(key, value){
+            provider.set(key, value);
+        },
+
+        /**
+         * Clears a value from the state
+         * @param {String} name The key name
+         */
+        clear : function(key){
+            provider.clear(key);
+        },
+
+        /**
+         * Gets the currently configured state provider
+         * @return {Provider} The state provider
+         */
+        getProvider : function(){
+            return provider;
+        }
+    };
+}();
+/**
+ * @class Ext.state.CookieProvider
+ * @extends Ext.state.Provider
+ * The default Provider implementation which saves state via cookies.
+ * <br />Usage:
+ <pre><code>
+   var cp = new Ext.state.CookieProvider({
+       path: "/cgi-bin/",
+       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
+       domain: "extjs.com"
+   });
+   Ext.state.Manager.setProvider(cp);
+ </code></pre>
+ * @cfg {String} path The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
+ * @cfg {Date} expires The cookie expiration date (defaults to 7 days from now)
+ * @cfg {String} domain The domain to save the cookie for.  Note that you cannot specify a different domain than
+ * your page is on, but you can specify a sub-domain, or simply the domain itself like 'extjs.com' to include
+ * all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same
+ * domain the page is running on including the 'www' like 'www.extjs.com')
+ * @cfg {Boolean} secure True if the site is using SSL (defaults to false)
+ * @constructor
+ * Create a new CookieProvider
+ * @param {Object} config The configuration object
+ */
+Ext.state.CookieProvider = function(config){
+    Ext.state.CookieProvider.superclass.constructor.call(this);
+    this.path = "/";
+    this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days
+    this.domain = null;
+    this.secure = false;
+    Ext.apply(this, config);
+    this.state = this.readCookies();
+};
+
+Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, {
+    // private
+    set : function(name, value){
+        if(typeof value == "undefined" || value === null){
+            this.clear(name);
+            return;
+        }
+        this.setCookie(name, value);
+        Ext.state.CookieProvider.superclass.set.call(this, name, value);
+    },
+
+    // private
+    clear : function(name){
+        this.clearCookie(name);
+        Ext.state.CookieProvider.superclass.clear.call(this, name);
+    },
+
+    // private
+    readCookies : function(){
+        var cookies = {};
+        var c = document.cookie + ";";
+        var re = /\s?(.*?)=(.*?);/g;
+    	var matches;
+    	while((matches = re.exec(c)) != null){
+            var name = matches[1];
+            var value = matches[2];
+            if(name && name.substring(0,3) == "ys-"){
+                cookies[name.substr(3)] = this.decodeValue(value);
+            }
+        }
+        return cookies;
+    },
+
+    // private
+    setCookie : function(name, value){
+        document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
+           ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
+           ((this.path == null) ? "" : ("; path=" + this.path)) +
+           ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
+           ((this.secure == true) ? "; secure" : "");
+    },
+
+    // private
+    clearCookie : function(name){
+        document.cookie = "ys-" + name + "=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" : "");
+    }
+});/**
+ * @class Ext.DataView
+ * @extends Ext.BoxComponent
+ * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate}
+ * as its internal templating mechanism, and is bound to an {@link Ext.data.Store}
+ * so that as the data in the store changes the view is automatically updated to reflect the changes.  The view also
+ * provides built-in behavior for many common events that can occur for its contained items including click, doubleclick,
+ * mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an {@link #itemSelector}
+ * config must be provided for the DataView to determine what nodes it will be working with.</b>
+ *
+ * <p>The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.</p>
+ * <pre><code>
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var tpl = new Ext.XTemplate(
+    '&lt;tpl for="."&gt;',
+        '&lt;div class="thumb-wrap" id="{name}"&gt;',
+        '&lt;div class="thumb"&gt;&lt;img src="{url}" title="{name}"&gt;&lt;/div&gt;',
+        '&lt;span class="x-editable"&gt;{shortName}&lt;/span&gt;&lt;/div&gt;',
+    '&lt;/tpl&gt;',
+    '&lt;div class="x-clear"&gt;&lt;/div&gt;'
+);
+
+var panel = new Ext.Panel({
+    id:'images-view',
+    frame:true,
+    width:535,
+    autoHeight:true,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple DataView',
+
+    items: new Ext.DataView({
+        store: store,
+        tpl: tpl,
+        autoHeight:true,
+        multiSelect: true,
+        overClass:'x-view-over',
+        itemSelector:'div.thumb-wrap',
+        emptyText: 'No images to display'
+    })
+});
+panel.render(document.body);
+</code></pre>
+ * @constructor
+ * Create a new DataView
+ * @param {Object} config The config object
+ * @xtype dataview
+ */
+Ext.DataView = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String/Array} tpl
+     * The HTML fragment or an array of fragments that will make up the template used by this DataView.  This should
+     * be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
+     */
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} to bind this DataView to.
+     */
+    /**
+     * @cfg {String} itemSelector
+     * <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or 
+     * <tt>span:first-child</tt>) that will be used to determine what nodes this DataView will be
+     * working with.
+     */
+    /**
+     * @cfg {Boolean} multiSelect
+     * True to allow selection of more than one item at a time, false to allow selection of only a single item
+     * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} singleSelect
+     * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
+     * Note that if {@link #multiSelect} = true, this value will be ignored.
+     */
+    /**
+     * @cfg {Boolean} simpleSelect
+     * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
+     * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
+     */
+    /**
+     * @cfg {String} overClass
+     * A CSS class to apply to each item in the view on mouseover (defaults to undefined).
+     */
+    /**
+     * @cfg {String} loadingText
+     * A string to display during data load operations (defaults to undefined).  If specified, this text will be
+     * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
+     * contents will continue to display normally until the new data is loaded and the contents are replaced.
+     */
+    /**
+     * @cfg {String} selectedClass
+     * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
+     */
+    selectedClass : "x-view-selected",
+    /**
+     * @cfg {String} emptyText
+     * The text to display in the view when there is no data to display (defaults to '').
+     */
+    emptyText : "",
+
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
+     */
+    deferEmptyText: true,
+    /**
+     * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
+     */
+    trackOver: false,
+
+    //private
+    last: false,
+
+    // private
+    initComponent : function(){
+        Ext.DataView.superclass.initComponent.call(this);
+        if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){
+            this.tpl = new Ext.XTemplate(this.tpl);
+        }
+
+        this.addEvents(
+            /**
+             * @event beforeclick
+             * Fires before a click is processed. Returns false to cancel the default action.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "beforeclick",
+            /**
+             * @event click
+             * Fires when a template node is clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "click",
+            /**
+             * @event mouseenter
+             * Fires when the mouse enters a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseenter",
+            /**
+             * @event mouseleave
+             * Fires when the mouse leaves a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseleave",
+            /**
+             * @event containerclick
+             * Fires when a click occurs and it is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containerclick",
+            /**
+             * @event dblclick
+             * Fires when a template node is double clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "dblclick",
+            /**
+             * @event contextmenu
+             * Fires when a template node is right clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "contextmenu",
+            /**
+             * @event containercontextmenu
+             * Fires when a right click occurs that is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containercontextmenu",
+            /**
+             * @event selectionchange
+             * Fires when the selected nodes change.
+             * @param {Ext.DataView} this
+             * @param {Array} selections Array of the selected nodes
+             */
+            "selectionchange",
+
+            /**
+             * @event beforeselect
+             * Fires before a selection is made. If any handlers return false, the selection is cancelled.
+             * @param {Ext.DataView} this
+             * @param {HTMLElement} node The node to be selected
+             * @param {Array} selections Array of currently selected nodes
+             */
+            "beforeselect"
+        );
+
+        this.store = Ext.StoreMgr.lookup(this.store);
+        this.all = new Ext.CompositeElementLite();
+        this.selected = new Ext.CompositeElementLite();
+    },
+
+    // private
+    afterRender : function(){
+        Ext.DataView.superclass.afterRender.call(this);
+
+		this.mon(this.getTemplateTarget(), {
+            "click": this.onClick,
+            "dblclick": this.onDblClick,
+            "contextmenu": this.onContextMenu,
+            scope:this
+        });
+
+        if(this.overClass || this.trackOver){
+            this.mon(this.getTemplateTarget(), {
+                "mouseover": this.onMouseOver,
+                "mouseout": this.onMouseOut,
+                scope:this
+            });
+        }
+
+        if(this.store){
+            this.bindStore(this.store, true);
+        }
+    },
+
+    /**
+     * Refreshes the view by reloading the data from the store and re-rendering the template.
+     */
+    refresh : function(){
+        this.clearSelections(false, true);
+        var el = this.getTemplateTarget();
+        el.update("");
+        var records = this.store.getRange();
+        if(records.length < 1){
+            if(!this.deferEmptyText || this.hasSkippedEmptyText){
+                el.update(this.emptyText);
+            }
+            this.all.clear();
+        }else{
+            this.tpl.overwrite(el, this.collectData(records, 0));
+            this.all.fill(Ext.query(this.itemSelector, el.dom));
+            this.updateIndexes(0);
+        }
+        this.hasSkippedEmptyText = true;
+    },
+
+    getTemplateTarget: function(){
+        return this.el;
+    },
+
+    /**
+     * Function which can be overridden to provide custom formatting for each Record that is used by this
+     * DataView's {@link #tpl template} to render each node.
+     * @param {Array/Object} data The raw data object that was used to create the Record.
+     * @param {Number} recordIndex the index number of the Record being prepared for rendering.
+     * @param {Record} record The Record being prepared for rendering.
+     * @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method.
+     * (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
+     */
+    prepareData : function(data){
+        return data;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * DataView's {@link #tpl template} to render the whole DataView.</p>
+     * <p>This is usually an Array of data objects, each element of which is processed by an
+     * {@link Ext.XTemplate XTemplate} which uses <tt>'&lt;tpl for="."&gt;'</tt> to iterate over its supplied
+     * data object as an Array. However, <i>named</i> properties may be placed into the data object to
+     * provide non-repeating data such as headings, totals etc.</p>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Array} An Array of data objects to be processed by a repeating XTemplate. May also
+     * contain <i>named</i> properties.
+     */
+    collectData : function(records, startIndex){
+        var r = [];
+        for(var i = 0, len = records.length; i < len; i++){
+            r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]);
+        }
+        return r;
+    },
+
+    // private
+    bufferRender : function(records){
+        var div = document.createElement('div');
+        this.tpl.overwrite(div, this.collectData(records));
+        return Ext.query(this.itemSelector, div);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        var index = this.store.indexOf(record);
+        var sel = this.isSelected(index);
+        var original = this.all.elements[index];
+        var node = this.bufferRender([record], index)[0];
+
+        this.all.replaceElement(index, node, true);
+        if(sel){
+            this.selected.replaceElement(original, node);
+            this.all.item(index).addClass(this.selectedClass);
+        }
+        this.updateIndexes(index, index);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        if(this.all.getCount() === 0){
+            this.refresh();
+            return;
+        }
+        var nodes = this.bufferRender(records, index), n, a = this.all.elements;
+        if(index < this.all.getCount()){
+            n = this.all.item(index).insertSibling(nodes, 'before', true);
+            a.splice.apply(a, [index, 0].concat(nodes));
+        }else{
+            n = this.all.last().insertSibling(nodes, 'after', true);
+            a.push.apply(a, nodes);
+        }
+        this.updateIndexes(index);
+    },
+
+    // private
+    onRemove : function(ds, record, index){
+        this.deselect(index);
+        this.all.removeElement(index, true);
+        this.updateIndexes(index);
+        if (this.store.getCount() === 0){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Refreshes an individual node's data from the store.
+     * @param {Number} index The item's data index in the store
+     */
+    refreshNode : function(index){
+        this.onUpdate(this.store, this.store.getAt(index));
+    },
+
+    // private
+    updateIndexes : function(startIndex, endIndex){
+        var ns = this.all.elements;
+        startIndex = startIndex || 0;
+        endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1));
+        for(var i = startIndex; i <= endIndex; i++){
+            ns[i].viewIndex = i;
+        }
+    },
+    
+    /**
+     * Returns the store associated with this DataView.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Changes the data store bound to this view and refreshes it.
+     * @param {Store} store The store to bind to this view
+     */
+    bindStore : function(store, initial){
+        if(!initial && 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(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                datachanged: this.refresh,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Returns the template node the passed child belongs to, or null if it doesn't belong to one.
+     * @param {HTMLElement} node
+     * @return {HTMLElement} The template node
+     */
+    findItemFromChild : function(node){
+        return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget());
+    },
+
+    // private
+    onClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            var index = this.indexOf(item);
+            if(this.onItemClick(item, index, e) !== false){
+                this.fireEvent("click", this, index, item, e);
+            }
+        }else{
+            if(this.fireEvent("containerclick", this, e) !== false){
+                this.onContainerClick(e);
+            }
+        }
+    },
+
+    onContainerClick : function(e){
+        this.clearSelections();
+    },
+
+    // private
+    onContextMenu : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("contextmenu", this, this.indexOf(item), item, e);
+        }else{
+            this.fireEvent("containercontextmenu", this, e);
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("dblclick", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOver : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item && item !== this.lastItem){
+            this.lastItem = item;
+            Ext.fly(item).addClass(this.overClass);
+            this.fireEvent("mouseenter", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        if(this.lastItem){
+            if(!e.within(this.lastItem, true, true)){
+                Ext.fly(this.lastItem).removeClass(this.overClass);
+                this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, e);
+                delete this.lastItem;
+            }
+        }
+    },
+
+    // private
+    onItemClick : function(item, index, e){
+        if(this.fireEvent("beforeclick", this, index, item, e) === false){
+            return false;
+        }
+        if(this.multiSelect){
+            this.doMultiSelection(item, index, e);
+            e.preventDefault();
+        }else if(this.singleSelect){
+            this.doSingleSelection(item, index, e);
+            e.preventDefault();
+        }
+        return true;
+    },
+
+    // private
+    doSingleSelection : function(item, index, e){
+        if(e.ctrlKey && this.isSelected(index)){
+            this.deselect(index);
+        }else{
+            this.select(index, false);
+        }
+    },
+
+    // private
+    doMultiSelection : function(item, index, e){
+        if(e.shiftKey && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, index, e.ctrlKey);
+            this.last = last; // reset the last
+        }else{
+            if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){
+                this.deselect(index);
+            }else{
+                this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect);
+            }
+        }
+    },
+
+    /**
+     * Gets the number of selected nodes.
+     * @return {Number} The node count
+     */
+    getSelectionCount : function(){
+        return this.selected.getCount();
+    },
+
+    /**
+     * Gets the currently selected nodes.
+     * @return {Array} An array of HTMLElements
+     */
+    getSelectedNodes : function(){
+        return this.selected.elements;
+    },
+
+    /**
+     * Gets the indexes of the selected nodes.
+     * @return {Array} An array of numeric indexes
+     */
+    getSelectedIndexes : function(){
+        var indexes = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            indexes.push(s[i].viewIndex);
+        }
+        return indexes;
+    },
+
+    /**
+     * Gets an array of the selected records
+     * @return {Array} An array of {@link Ext.data.Record} objects
+     */
+    getSelectedRecords : function(){
+        var r = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets an array of the records from an array of nodes
+     * @param {Array} nodes The nodes to evaluate
+     * @return {Array} records The {@link Ext.data.Record} objects
+     */
+    getRecords : function(nodes){
+        var r = [], s = nodes;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets a record from a node
+     * @param {HTMLElement} node The node to evaluate
+     * @return {Record} record The {@link Ext.data.Record} object
+     */
+    getRecord : function(node){
+        return this.store.getAt(node.viewIndex);
+    },
+
+    /**
+     * Clears all selections.
+     * @param {Boolean} suppressEvent (optional) True to skip firing of the selectionchange event
+     */
+    clearSelections : function(suppressEvent, skipUpdate){
+        if((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0){
+            if(!skipUpdate){
+                this.selected.removeClass(this.selectedClass);
+            }
+            this.selected.clear();
+            this.last = false;
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        }
+    },
+
+    /**
+     * Returns true if the passed node is selected, else false.
+     * @param {HTMLElement/Number} node The node or node index to check
+     * @return {Boolean} True if selected, else false
+     */
+    isSelected : function(node){
+        return this.selected.contains(this.getNode(node));
+    },
+
+    /**
+     * Deselects a node.
+     * @param {HTMLElement/Number} node The node to deselect
+     */
+    deselect : function(node){
+        if(this.isSelected(node)){
+            node = this.getNode(node);
+            this.selected.removeElement(node);
+            if(this.last == node.viewIndex){
+                this.last = false;
+            }
+            Ext.fly(node).removeClass(this.selectedClass);
+            this.fireEvent("selectionchange", this, this.selected.elements);
+        }
+    },
+
+    /**
+     * Selects a set of nodes.
+     * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node,
+     * id of a template node or an array of any of those to select
+     * @param {Boolean} keepExisting (optional) true to keep existing selections
+     * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent
+     */
+    select : function(nodeInfo, keepExisting, suppressEvent){
+        if(Ext.isArray(nodeInfo)){
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            for(var i = 0, len = nodeInfo.length; i < len; i++){
+                this.select(nodeInfo[i], true, true);
+            }
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        } else{
+            var node = this.getNode(nodeInfo);
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            if(node && !this.isSelected(node)){
+                if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){
+                    Ext.fly(node).addClass(this.selectedClass);
+                    this.selected.add(node);
+                    this.last = node.viewIndex;
+                    if(!suppressEvent){
+                        this.fireEvent("selectionchange", this, this.selected.elements);
+                    }
+                }
+            }
+        }
+    },
+
+    /**
+     * Selects a range of nodes. All nodes between start and end are selected.
+     * @param {Number} start The index of the first node in the range
+     * @param {Number} end The index of the last node in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(start, end, keepExisting){
+        if(!keepExisting){
+            this.clearSelections(true);
+        }
+        this.select(this.getNodes(start, end), true);
+    },
+
+    /**
+     * Gets a template node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {HTMLElement} The node or null if it wasn't found
+     */
+    getNode : function(nodeInfo){
+        if(Ext.isString(nodeInfo)){
+            return document.getElementById(nodeInfo);
+        }else if(Ext.isNumber(nodeInfo)){
+            return this.all.elements[nodeInfo];
+        }
+        return nodeInfo;
+    },
+
+    /**
+     * Gets a range nodes.
+     * @param {Number} start (optional) The index of the first node in the range
+     * @param {Number} end (optional) The index of the last node in the range
+     * @return {Array} An array of nodes
+     */
+    getNodes : function(start, end){
+        var ns = this.all.elements;
+        start = start || 0;
+        end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end;
+        var nodes = [], i;
+        if(start <= end){
+            for(i = start; i <= end && ns[i]; i++){
+                nodes.push(ns[i]);
+            }
+        } else{
+            for(i = start; i >= end && ns[i]; i--){
+                nodes.push(ns[i]);
+            }
+        }
+        return nodes;
+    },
+
+    /**
+     * Finds the index of the passed node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {Number} The index of the node or -1
+     */
+    indexOf : function(node){
+        node = this.getNode(node);
+        if(Ext.isNumber(node.viewIndex)){
+            return node.viewIndex;
+        }
+        return this.all.indexOf(node);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(this.loadingText){
+            this.clearSelections(false, true);
+            this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+'</div>');
+            this.all.clear();
+        }
+    },
+
+    onDestroy : function(){
+        Ext.DataView.superclass.onDestroy.call(this);
+        this.bindStore(null);
+    }
+});
+
+/**
+ * Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore)
+ * @param {Store} store The store to bind to this view
+ */
+Ext.DataView.prototype.setStore = Ext.DataView.prototype.bindStore;
+
+Ext.reg('dataview', Ext.DataView);/**
+ * @class Ext.ListView
+ * @extends Ext.DataView
+ * <p>Ext.ListView is a fast and light-weight implentation of a
+ * {@link Ext.grid.GridPanel Grid} like view with the following characteristics:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>resizable columns</li>
+ * <li>selectable</li>
+ * <li>column widths are initially proportioned by percentage based on the container
+ * width and number of columns</li>
+ * <li>uses templates to render the data in any required format</li>
+ * <li>no horizontal scrolling</li>
+ * <li>no editing</li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+// consume JSON of this form:
+{
+   "images":[
+      {
+         "name":"dance_fever.jpg",
+         "size":2067,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/dance_fever.jpg"
+      },
+      {
+         "name":"zack_sink.jpg",
+         "size":2303,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/zack_sink.jpg"
+      }
+   ]
+} 
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var listView = new Ext.ListView({
+    store: store,
+    multiSelect: true,
+    emptyText: 'No images to display',
+    reserveScrollOffset: true,
+    columns: [{
+        header: 'File',
+        width: .5,
+        dataIndex: 'name'
+    },{
+        header: 'Last Modified',
+        width: .35, 
+        dataIndex: 'lastmod',
+        tpl: '{lastmod:date("m-d h:i a")}'
+    },{
+        header: 'Size',
+        dataIndex: 'size',
+        tpl: '{size:fileSize}', // format using Ext.util.Format.fileSize()
+        align: 'right'
+    }]
+});
+
+// put it in a Panel so it looks pretty
+var panel = new Ext.Panel({
+    id:'images-view',
+    width:425,
+    height:250,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple ListView <i>(0 items selected)</i>',
+    items: listView
+});
+panel.render(document.body);
+
+// little bit of feedback
+listView.on('selectionchange', function(view, nodes){
+    var l = nodes.length;
+    var s = l != 1 ? 's' : '';
+    panel.setTitle('Simple ListView <i>('+l+' item'+s+' selected)</i>');
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ * @xtype listview
+ */
+Ext.ListView = Ext.extend(Ext.DataView, {
+    /**
+     * Set this property to <tt>true</tt> to disable the header click handler disabling sort
+     * (defaults to <tt>false</tt>).
+     * @type Boolean
+     * @property disableHeaders
+     */
+    /**
+     * @cfg {Boolean} hideHeaders
+     * <tt>true</tt> to hide the {@link #internalTpl header row} (defaults to <tt>false</tt> so
+     * the {@link #internalTpl header row} will be shown).
+     */
+    /**
+     * @cfg {String} itemSelector
+     * Defaults to <tt>'dl'</tt> to work with the preconfigured <b><tt>{@link Ext.DataView#tpl tpl}</tt></b>.
+     * This setting specifies the CSS selector (e.g. <tt>div.some-class</tt> or <tt>span:first-child</tt>)
+     * that will be used to determine what nodes the ListView will be working with.   
+     */
+    itemSelector: 'dl',
+    /**
+     * @cfg {String} selectedClass The CSS class applied to a selected row (defaults to
+     * <tt>'x-list-selected'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-selected {background-color: yellow;}
+    </code></pre>
+     * @type String
+     */
+    selectedClass:'x-list-selected',
+    /**
+     * @cfg {String} overClass The CSS class applied when over a row (defaults to
+     * <tt>'x-list-over'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-over {background-color: orange;}
+    </code></pre>
+     * @type String
+     */
+    overClass:'x-list-over',
+    /**
+     * @cfg {Boolean} reserveScrollOffset
+     * By default will defer accounting for the configured <b><tt>{@link #scrollOffset}</tt></b>
+     * for 10 milliseconds.  Specify <tt>true</tt> to account for the configured
+     * <b><tt>{@link #scrollOffset}</tt></b> immediately.
+     */
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the scrollbar (defaults to
+     * <tt>19</tt> pixels)
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean/Object} columnResize
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.ColumnResizer}
+     * to enable the columns to be resizable (defaults to <tt>true</tt>).
+     */
+    columnResize: true,
+    /**
+     * @cfg {Array} columns An array of column configuration objects, for example:
+     * <pre><code>
+{
+    align: 'right',
+    dataIndex: 'size',
+    header: 'Size',
+    tpl: '{size:fileSize}',
+    width: .35
+}
+     * </code></pre> 
+     * Acceptable properties for each column configuration object are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>align</tt></b> : String<div class="sub-desc">Set the CSS text-align property
+     * of the column. Defaults to <tt>'left'</tt>.</div></li>
+     * <li><b><tt>dataIndex</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#dataIndex dataIndex} for details.</div></li>
+     * <li><b><tt>header</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#header header} for details.</div></li>
+     * <li><b><tt>tpl</tt></b> : String<div class="sub-desc">Specify a string to pass as the
+     * configuration string for {@link Ext.XTemplate}.  By default an {@link Ext.XTemplate}
+     * will be implicitly created using the <tt>dataIndex</tt>.</div></li>
+     * <li><b><tt>width</tt></b> : Number<div class="sub-desc">Percentage of the container width
+     * this column should be allocated.  Columns that have no width specified will be
+     * allocated with an equal percentage to fill 100% of the container width.  To easily take
+     * advantage of the full container width, leave the width of at least one column undefined.
+     * Note that if you do not want to take up the full width of the container, the width of
+     * every column needs to be explicitly defined.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/Object} columnSort
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.Sorter}
+     * to enable the columns to be sortable (defaults to <tt>true</tt>).
+     */
+    columnSort: true,
+    /**
+     * @cfg {String/Array} internalTpl
+     * The template to be used for the header row.  See {@link #tpl} for more details.
+     */
+
+    initComponent : function(){
+        if(this.columnResize){
+            this.colResizer = new Ext.ListView.ColumnResizer(this.colResizer);
+            this.colResizer.init(this);
+        }
+        if(this.columnSort){
+            this.colSorter = new Ext.ListView.Sorter(this.columnSort);
+            this.colSorter.init(this);
+        }
+        if(!this.internalTpl){
+            this.internalTpl = new Ext.XTemplate(
+                '<div class="x-list-header"><div class="x-list-header-inner">',
+                    '<tpl for="columns">',
+                    '<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id, '-xlhd-{#}">',
+                        '{header}',
+                    '</em></div>',
+                    '</tpl>',
+                    '<div class="x-clear"></div>',
+                '</div></div>',
+                '<div class="x-list-body"><div class="x-list-body-inner">',
+                '</div></div>'
+            );
+        }
+        if(!this.tpl){
+            this.tpl = new Ext.XTemplate(
+                '<tpl for="rows">',
+                    '<dl>',
+                        '<tpl for="parent.columns">',
+                        '<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',
+                            '{[values.tpl.apply(parent)]}',
+                        '</em></dt>',
+                        '</tpl>',
+                        '<div class="x-clear"></div>',
+                    '</dl>',
+                '</tpl>'
+            );
+        };
+        var cs = this.columns, allocatedWidth = 0, colsWithWidth = 0, len = cs.length;
+        for(var i = 0; i < len; i++){
+            var c = cs[i];
+            if(!c.tpl){
+                c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}');
+            }else if(Ext.isString(c.tpl)){
+                c.tpl = new Ext.XTemplate(c.tpl);
+            }
+            c.align = c.align || 'left';
+            if(Ext.isNumber(c.width)){
+                c.width *= 100;
+                allocatedWidth += c.width;
+                colsWithWidth++;
+            }
+        }
+        // auto calculate missing column widths
+        if(colsWithWidth < len){
+            var remaining = len - colsWithWidth;
+            if(allocatedWidth < 100){
+                var perCol = ((100-allocatedWidth) / remaining);
+                for(var j = 0; j < len; j++){
+                    var c = cs[j];
+                    if(!Ext.isNumber(c.width)){
+                        c.width = perCol;
+                    }
+                }
+            }
+        }
+        Ext.ListView.superclass.initComponent.call(this);
+    },
+
+    onRender : function(){
+        Ext.ListView.superclass.onRender.apply(this, arguments);
+
+        this.internalTpl.overwrite(this.el, {columns: this.columns});
+        
+        this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild);
+        this.innerHd = Ext.get(this.el.dom.firstChild.firstChild);
+
+        if(this.hideHeaders){
+            this.el.dom.firstChild.style.display = 'none';
+        }
+    },
+
+    getTemplateTarget : function(){
+        return this.innerBody;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * view's {@link #tpl template} to render the whole ListView. The returned object 
+     * shall contain the following properties:</p>
+     * <div class="mdetail-params"><ul>
+     * <li><b>columns</b> : String<div class="sub-desc">See <tt>{@link #columns}</tt></div></li>
+     * <li><b>rows</b> : String<div class="sub-desc">See
+     * <tt>{@link Ext.DataView}.{@link Ext.DataView#collectData collectData}</div></li>
+     * </ul></div>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Object} A data object containing properties to be processed by a repeating
+     * XTemplate as described above.
+     */
+    collectData : function(){
+        var rs = Ext.ListView.superclass.collectData.apply(this, arguments);
+        return {
+            columns: this.columns,
+            rows: rs
+        }
+    },
+
+    verifyInternalSize : function(){
+        if(this.lastSize){
+            this.onResize(this.lastSize.width, this.lastSize.height);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        var bd = this.innerBody.dom;
+        var hd = this.innerHd.dom
+        if(!bd){
+            return;
+        }
+        var bdp = bd.parentNode;
+        if(Ext.isNumber(w)){
+            var sw = w - this.scrollOffset;
+            if(this.reserveScrollOffset || ((bdp.offsetWidth - bdp.clientWidth) > 10)){
+                bd.style.width = sw + 'px';
+                hd.style.width = sw + 'px';
+            }else{
+                bd.style.width = w + 'px';
+                hd.style.width = w + 'px';
+                setTimeout(function(){
+                    if((bdp.offsetWidth - bdp.clientWidth) > 10){
+                        bd.style.width = sw + 'px';
+                        hd.style.width = sw + 'px';
+                    }
+                }, 10);
+            }
+        }
+        if(Ext.isNumber(h == 'number')){
+            bdp.style.height = (h - hd.parentNode.offsetHeight) + 'px';
+        }
+    },
+
+    updateIndexes : function(){
+        Ext.ListView.superclass.updateIndexes.apply(this, arguments);
+        this.verifyInternalSize();
+    },
+
+    findHeaderIndex : function(hd){
+        hd = hd.dom || hd;
+        var pn = hd.parentNode, cs = pn.parentNode.childNodes;
+        for(var i = 0, c; c = cs[i]; i++){
+            if(c == pn){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    setHdWidths : function(){
+        var els = this.innerHd.dom.getElementsByTagName('div');
+        for(var i = 0, cs = this.columns, len = cs.length; i < len; i++){
+            els[i].style.width = cs[i].width + '%';
+        }
+    }
+});
+
+Ext.reg('listview', Ext.ListView);/**
+ * @class Ext.ListView.ColumnResizer
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.ColumnResizer = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Number} minPct The minimum percentage to allot for any column (defaults to <tt>.05</tt>)
+     */
+    minPct: .05,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.ColumnResizer.superclass.constructor.call(this);
+    },
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'mousemove', this.handleHdMove, this);
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeStart.createDelegate(this),
+            onStart: this.onStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(view.innerHd);
+        view.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+    handleHdMove : function(e, t){
+        var hw = 5;
+        var x = e.getPageX();
+        var hd = e.getTarget('em', 3, true);
+        if(hd){
+            var r = hd.getRegion();
+            var ss = hd.dom.style;
+            var pn = hd.dom.parentNode;
+
+            if(x - r.left <= hw && pn != pn.parentNode.firstChild){
+                this.activeHd = Ext.get(pn.previousSibling.firstChild);
+				ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize';
+            } else if(r.right - x <= hw && pn != pn.parentNode.lastChild.previousSibling){
+                this.activeHd = hd;
+				ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
+            } else{
+                delete this.activeHd;
+                ss.cursor = '';
+            }
+        }
+    },
+
+    onBeforeStart : function(e){
+        this.dragHd = this.activeHd;
+        return !!this.dragHd;
+    },
+
+    onStart: function(e){
+        this.view.disableHeaders = true;
+        this.proxy = this.view.el.createChild({cls:'x-list-resizer'});
+        this.proxy.setHeight(this.view.el.getHeight());
+
+        var x = this.tracker.getXY()[0];
+        var w = this.view.innerHd.getWidth();
+
+        this.hdX = this.dragHd.getX();
+        this.hdIndex = this.view.findHeaderIndex(this.dragHd);
+
+        this.proxy.setX(this.hdX);
+        this.proxy.setWidth(x-this.hdX);
+
+        this.minWidth = w*this.minPct;
+        this.maxWidth = w - (this.minWidth*(this.view.columns.length-1-this.hdIndex));
+    },
+
+    onDrag: function(e){
+        var cursorX = this.tracker.getXY()[0];
+        this.proxy.setWidth((cursorX-this.hdX).constrain(this.minWidth, this.maxWidth));
+    },
+
+    onEnd: function(e){
+        var nw = this.proxy.getWidth();
+        this.proxy.remove();
+
+        var index = this.hdIndex;
+        var vw = this.view, cs = vw.columns, len = cs.length;
+        var w = this.view.innerHd.getWidth(), minPct = this.minPct * 100;
+
+        var pct = Math.ceil((nw*100) / w);
+        var diff = cs[index].width - pct;
+        var each = Math.floor(diff / (len-1-index));
+        var mod = diff - (each * (len-1-index));
+
+        for(var i = index+1; i < len; i++){
+            var cw = cs[i].width + each;
+            var ncw = Math.max(minPct, cw);
+            if(cw != ncw){
+                mod += cw - ncw;
+            }
+            cs[i].width = ncw;
+        }
+        cs[index].width = pct;
+        cs[index+1].width += mod;
+        delete this.dragHd;
+        this.view.setHdWidths();
+        this.view.refresh();
+        setTimeout(function(){
+            vw.disableHeaders = false;
+        }, 100);
+    }
+});/**
+ * @class Ext.ListView.Sorter
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.Sorter = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Array} sortClasses
+     * The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.Sorter.superclass.constructor.call(this);
+    },
+
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'click', this.onHdClick, this);
+        view.innerHd.setStyle('cursor', 'pointer');
+        view.mon(view.store, 'datachanged', this.updateSortState, this);
+        this.updateSortState.defer(10, this, [view.store]);
+    },
+
+    updateSortState : function(store){
+        var state = store.getSortState();
+        if(!state){
+            return;
+        }
+        this.sortState = state;
+        var cs = this.view.columns, sortColumn = -1;
+        for(var i = 0, len = cs.length; i < len; i++){
+            if(cs[i].dataIndex == state.field){
+                sortColumn = i;
+                break;
+            }
+        }
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.view.innerHd.select('em').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    onHdClick : function(e){
+        var hd = e.getTarget('em', 3);
+        if(hd && !this.view.disableHeaders){
+            var index = this.view.findHeaderIndex(hd);
+            this.view.store.sort(this.view.columns[index].dataIndex);
+        }
+    }
+});/**
+ * @class Ext.TabPanel
+ * <p>A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel}
+ * for layout purposes, but also have special support for containing child Components
+ * (<tt>{@link Ext.Container#items items}</tt>) that are managed using a
+ * {@link Ext.layout.CardLayout CardLayout layout manager}, and displayed as separate tabs.</p>
+ *
+ * <b>Note:</b> By default, a tab's close tool <i>destroys</i> the child tab Component
+ * and all its descendants. This makes the child tab Component, and all its descendants <b>unusable</b>. To enable
+ * re-use of a tab, configure the TabPanel with <b><code>{@link #autoDestroy autoDestroy: false}</code></b>.
+ *
+ * <p><b><u>TabPanel header/footer elements</u></b></p>
+ * <p>TabPanels use their {@link Ext.Panel#header header} or {@link Ext.Panel#footer footer} element
+ * (depending on the {@link #tabPosition} configuration) to accommodate the tab selector buttons.
+ * This means that a TabPanel will not display any configured title, and will not display any
+ * configured header {@link Ext.Panel#tools tools}.</p>
+ * <p>To display a header, embed the TabPanel in a {@link Ext.Panel Panel} which uses
+ * <b><tt>{@link Ext.Container#layout layout:'fit'}</tt></b>.</p>
+ *
+ * <p><b><u>Tab Events</u></b></p>
+ * <p>There is no actual tab class &mdash; each tab is simply a {@link Ext.BoxComponent Component}
+ * such as a {@link Ext.Panel Panel}. However, when rendered in a TabPanel, each child Component
+ * can fire additional events that only exist for tabs and are not available from other Components.
+ * These events are:</p>
+ * <div><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.Panel#activate activate}</b></tt> : Fires when this Component becomes
+ * the active tab.</li>
+ * <li><tt><b>{@link Ext.Panel#deactivate deactivate}</b></tt> : Fires when the Component that
+ * was the active tab becomes deactivated.</li>
+ * </ul></div>
+ * <p><b><u>Creating TabPanels from Code</u></b></p>
+ * <p>TabPanels can be created and rendered completely in code, as in this example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: Ext.getBody(),
+    activeTab: 0,
+    items: [{
+        title: 'Tab 1',
+        html: 'A simple tab'
+    },{
+        title: 'Tab 2',
+        html: 'Another one'
+    }]
+});
+</code></pre>
+ * <p><b><u>Creating TabPanels from Existing Markup</u></b></p>
+ * <p>TabPanels can also be rendered from pre-existing markup in a couple of ways.</p>
+ * <div><ul class="mdetail-params">
+ *
+ * <li>Pre-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A container div with one or more nested tab divs with class <tt>'x-tab'</tt> can be rendered entirely
+ * from existing markup (See the {@link #autoTabs} example).</p>
+ * </div>
+ *
+ * <li>Un-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A TabPanel can also be rendered from markup that is not strictly structured by simply specifying by id
+ * which elements should be the container and the tabs. Using this method tab content can be pulled from different
+ * elements within the page by id regardless of page structure. For example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: 'my-tabs',
+    activeTab: 0,
+    items:[
+        {contentEl:'tab1', title:'Tab 1'},
+        {contentEl:'tab2', title:'Tab 2'}
+    ]
+});
+
+// Note that the tabs do not have to be nested within the container (although they can be)
+&lt;div id="my-tabs">&lt;/div>
+&lt;div id="tab1" class="x-hide-display">A simple tab&lt;/div>
+&lt;div id="tab2" class="x-hide-display">Another one&lt;/div>
+</code></pre>
+ * Note that the tab divs in this example contain the class <tt>'x-hide-display'</tt> so that they can be rendered
+ * deferred without displaying outside the tabs. You could alternately set <tt>{@link #deferredRender} = false </tt>
+ * to render all content tabs on page load.
+ * </div>
+ *
+ * </ul></div>
+ *
+ * @extends Ext.Panel
+ * @constructor
+ * @param {Object} config The configuration options
+ * @xtype tabpanel
+ */
+Ext.TabPanel = Ext.extend(Ext.Panel,  {
+    /**
+     * @cfg {Boolean} layoutOnTabChange
+     * Set to true to force a layout of the active tab when the tab is changed. Defaults to false.
+     * See {@link Ext.layout.CardLayout}.<code>{@link Ext.layout.CardLayout#layoutOnCardChange layoutOnCardChange}</code>.
+     */
+    /**
+     * @cfg {String} tabCls <b>This config option is used on <u>child Components</u> of ths TabPanel.</b> A CSS
+     * class name applied to the tab strip item representing the child Component, allowing special
+     * styling to be applied.
+     */
+    /**
+     * @cfg {Boolean} monitorResize True to automatically monitor window resize events and rerender the layout on
+     * browser resize (defaults to true).
+     */
+    monitorResize : true,
+    /**
+     * @cfg {Boolean} deferredRender
+     * <p><tt>true</tt> by default to defer the rendering of child <tt>{@link Ext.Container#items items}</tt>
+     * to the browsers DOM until a tab is activated. <tt>false</tt> will render all contained
+     * <tt>{@link Ext.Container#items items}</tt> as soon as the {@link Ext.layout.CardLayout layout}
+     * is rendered. If there is a significant amount of content or a lot of heavy controls being
+     * rendered into panels that are not displayed by default, setting this to <tt>true</tt> might
+     * improve performance.</p>
+     * <br><p>The <tt>deferredRender</tt> property is internally passed to the layout manager for
+     * TabPanels ({@link Ext.layout.CardLayout}) as its {@link Ext.layout.CardLayout#deferredRender}
+     * configuration value.</p>
+     * <br><p><b>Note</b>: leaving <tt>deferredRender</tt> as <tt>true</tt> means that the content
+     * within an unactivated tab will not be available. For example, this means that if the TabPanel
+     * is within a {@link Ext.form.FormPanel form}, then until a tab is activated, any Fields within
+     * unactivated tabs will not be rendered, and will therefore not be submitted and will not be
+     * available to either {@link Ext.form.BasicForm#getValues getValues} or
+     * {@link Ext.form.BasicForm#setValues setValues}.</p>
+     */
+    deferredRender : true,
+    /**
+     * @cfg {Number} tabWidth The initial width in pixels of each new tab (defaults to 120).
+     */
+    tabWidth : 120,
+    /**
+     * @cfg {Number} minTabWidth The minimum width in pixels for each tab when {@link #resizeTabs} = true (defaults to 30).
+     */
+    minTabWidth : 30,
+    /**
+     * @cfg {Boolean} resizeTabs True to automatically resize each tab so that the tabs will completely fill the
+     * tab strip (defaults to false).  Setting this to true may cause specific widths that might be set per tab to
+     * be overridden in order to fit them all into view (although {@link #minTabWidth} will always be honored).
+     */
+    resizeTabs : false,
+    /**
+     * @cfg {Boolean} enableTabScroll True to enable scrolling to tabs that may be invisible due to overflowing the
+     * overall TabPanel width. Only available with tabPosition:'top' (defaults to false).
+     */
+    enableTabScroll : false,
+    /**
+     * @cfg {Number} scrollIncrement The number of pixels to scroll each time a tab scroll button is pressed
+     * (defaults to <tt>100</tt>, or if <tt>{@link #resizeTabs} = true</tt>, the calculated tab width).  Only
+     * applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    scrollIncrement : 0,
+    /**
+     * @cfg {Number} scrollRepeatInterval Number of milliseconds between each scroll while a tab scroll button is
+     * continuously pressed (defaults to <tt>400</tt>).
+     */
+    scrollRepeatInterval : 400,
+    /**
+     * @cfg {Float} scrollDuration The number of milliseconds that each scroll animation should last (defaults
+     * to <tt>.35</tt>). Only applies when <tt>{@link #animScroll} = true</tt>.
+     */
+    scrollDuration : 0.35,
+    /**
+     * @cfg {Boolean} animScroll True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults
+     * to <tt>true</tt>).  Only applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    animScroll : true,
+    /**
+     * @cfg {String} tabPosition The position where the tab strip should be rendered (defaults to <tt>'top'</tt>).
+     * The only other supported value is <tt>'bottom'</tt>.  <b>Note</b>: tab scrolling is only supported for
+     * <tt>tabPosition: 'top'</tt>.
+     */
+    tabPosition : 'top',
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the panel (defaults to <tt>'x-tab-panel'</tt>).
+     */
+    baseCls : 'x-tab-panel',
+    /**
+     * @cfg {Boolean} autoTabs
+     * <p><tt>true</tt> to query the DOM for any divs with a class of 'x-tab' to be automatically converted
+     * to tabs and added to this panel (defaults to <tt>false</tt>).  Note that the query will be executed within
+     * the scope of the container element only (so that multiple tab panels from markup can be supported via this
+     * method).</p>
+     * <p>This method is only possible when the markup is structured correctly as a container with nested divs
+     * containing the class <tt>'x-tab'</tt>. To create TabPanels without these limitations, or to pull tab content
+     * from other elements on the page, see the example at the top of the class for generating tabs from markup.</p>
+     * <p>There are a couple of things to note when using this method:<ul>
+     * <li>When using the <tt>autoTabs</tt> config (as opposed to passing individual tab configs in the TabPanel's
+     * {@link #items} collection), you must use <tt>{@link #applyTo}</tt> to correctly use the specified <tt>id</tt>
+     * as the tab container. The <tt>autoTabs</tt> method <em>replaces</em> existing content with the TabPanel
+     * components.</li>
+     * <li>Make sure that you set <tt>{@link #deferredRender}: false</tt> so that the content elements for each
+     * tab will be rendered into the TabPanel immediately upon page load, otherwise they will not be transformed
+     * until each tab is activated and will be visible outside the TabPanel.</li>
+     * </ul>Example usage:</p>
+     * <pre><code>
+var tabs = new Ext.TabPanel({
+    applyTo: 'my-tabs',
+    activeTab: 0,
+    deferredRender: false,
+    autoTabs: true
+});
+
+// This markup will be converted to a TabPanel from the code above
+&lt;div id="my-tabs">
+    &lt;div class="x-tab" title="Tab 1">A simple tab&lt;/div>
+    &lt;div class="x-tab" title="Tab 2">Another one&lt;/div>
+&lt;/div>
+</code></pre>
+     */
+    autoTabs : false,
+    /**
+     * @cfg {String} autoTabSelector The CSS selector used to search for tabs in existing markup when
+     * <tt>{@link #autoTabs} = true</tt> (defaults to <tt>'div.x-tab'</tt>).  This can be any valid selector
+     * supported by {@link Ext.DomQuery#select}. Note that the query will be executed within the scope of this
+     * tab panel only (so that multiple tab panels from markup can be supported on a page).
+     */
+    autoTabSelector : 'div.x-tab',
+    /**
+     * @cfg {String/Number} activeTab A string id or the numeric index of the tab that should be initially
+     * activated on render (defaults to none).
+     */
+    activeTab : null,
+    /**
+     * @cfg {Number} tabMargin The number of pixels of space to calculate into the sizing and scrolling of
+     * tabs. If you change the margin in CSS, you will need to update this value so calculations are correct
+     * with either <tt>{@link #resizeTabs}</tt> or scrolling tabs. (defaults to <tt>2</tt>)
+     */
+    tabMargin : 2,
+    /**
+     * @cfg {Boolean} plain </tt>true</tt> to render the tab strip without a background container image
+     * (defaults to <tt>false</tt>).
+     */
+    plain : false,
+    /**
+     * @cfg {Number} wheelIncrement For scrolling tabs, the number of pixels to increment on mouse wheel
+     * scrolling (defaults to <tt>20</tt>).
+     */
+    wheelIncrement : 20,
+
+    /*
+     * This is a protected property used when concatenating tab ids to the TabPanel id for internal uniqueness.
+     * It does not generally need to be changed, but can be if external code also uses an id scheme that can
+     * potentially clash with this one.
+     */
+    idDelimiter : '__',
+
+    // private
+    itemCls : 'x-tab-item',
+
+    // private config overrides
+    elements : 'body',
+    headerAsText : false,
+    frame : false,
+    hideBorders :true,
+
+    // private
+    initComponent : function(){
+        this.frame = false;
+        Ext.TabPanel.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforetabchange
+             * Fires before the active tab changes. Handlers can <tt>return false</tt> to cancel the tab change.
+             * @param {TabPanel} this
+             * @param {Panel} newTab The tab being activated
+             * @param {Panel} currentTab The current active tab
+             */
+            'beforetabchange',
+            /**
+             * @event tabchange
+             * Fires after the active tab has changed.
+             * @param {TabPanel} this
+             * @param {Panel} tab The new active tab
+             */
+            'tabchange',
+            /**
+             * @event contextmenu
+             * Relays the contextmenu event from a tab selector element in the tab strip.
+             * @param {TabPanel} this
+             * @param {Panel} tab The target tab
+             * @param {EventObject} e
+             */
+            'contextmenu'
+        );
+        /**
+         * @cfg {Object} layoutConfig
+         * TabPanel implicitly uses {@link Ext.layout.CardLayout} as its layout manager.
+         * <code>layoutConfig</code> may be used to configure this layout manager.
+         * <code>{@link #deferredRender}</code> and <code>{@link #layoutOnTabChange}</code>
+         * configured on the TabPanel will be applied as configs to the layout manager.
+         */
+        this.setLayout(new Ext.layout.CardLayout(Ext.apply({
+            layoutOnCardChange: this.layoutOnTabChange,
+            deferredRender: this.deferredRender
+        }, this.layoutConfig)));
+
+        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();
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.TabPanel.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            var pos = this.tabPosition == 'top' ? 'header' : 'footer';
+            this[pos].addClass('x-tab-panel-'+pos+'-plain');
+        }
+
+        var st = this[this.stripTarget];
+
+        this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{
+            tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}});
+
+        var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null);
+        this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl);
+        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);
+
+        /**
+         * @cfg {Template/XTemplate} itemTpl <p>(Optional) A {@link Ext.Template Template} or
+         * {@link Ext.XTemplate XTemplate} which may be provided to process the data object returned from
+         * <tt>{@link #getTemplateArgs}</tt> to produce a clickable selector element in the tab strip.</p>
+         * <p>The main element created should be a <tt>&lt;li></tt> element. In order for a click event on
+         * a selector element to be connected to its item, it must take its <i>id</i> from the TabPanel's
+         * native <tt>{@link #getTemplateArgs}</tt>.</p>
+         * <p>The child element which contains the title text must be marked by the CSS class
+         * <tt>x-tab-strip-inner</tt>.</p>
+         * <p>To enable closability, the created element should contain an element marked by the CSS class
+         * <tt>x-tab-strip-close</tt>.</p>
+         * <p>If a custom <tt>itemTpl</tt> is supplied, it is the developer's responsibility to create CSS
+         * style rules to create the desired appearance.</p>
+         * Below is an example of how to create customized tab selector items:<pre><code>
+new Ext.TabPanel({
+    renderTo: document.body,
+    minTabWidth: 115,
+    tabWidth: 135,
+    enableTabScroll: true,
+    width: 600,
+    height: 250,
+    defaults: {autoScroll:true},
+    itemTpl: new Ext.XTemplate(
+    '&lt;li class="{cls}" id="{id}" style="overflow:hidden">',
+         '&lt;tpl if="closable">',
+            '&lt;a class="x-tab-strip-close" onclick="return false;">&lt;/a>',
+         '&lt;/tpl>',
+         '&lt;a class="x-tab-right" href="#" onclick="return false;" style="padding-left:6px">',
+            '&lt;em class="x-tab-left">',
+                '&lt;span class="x-tab-strip-inner">',
+                    '&lt;img src="{src}" style="float:left;margin:3px 3px 0 0">',
+                    '&lt;span style="margin-left:20px" class="x-tab-strip-text {iconCls}">{text} {extra}&lt;/span>',
+                '&lt;/span>',
+            '&lt;/em>',
+        '&lt;/a>',
+    '&lt;/li>'
+    ),
+    getTemplateArgs: function(item) {
+//      Call the native method to collect the base data. Like the ID!
+        var result = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
+
+//      Add stuff used in our template
+        return Ext.apply(result, {
+            closable: item.closable,
+            src: item.iconSrc,
+            extra: item.extraText || ''
+        });
+    },
+    items: [{
+        title: 'New Tab 1',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 1',
+        closable: true
+    }, {
+        title: 'New Tab 2',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 2',
+        extraText: 'Extra stuff in the tab button'
+    }]
+});
+</code></pre>
+         */
+        if(!this.itemTpl){
+            var tt = 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>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.TabPanel.prototype.itemTpl = tt;
+        }
+
+        this.items.each(this.initTab, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.TabPanel.superclass.afterRender.call(this);
+        if(this.autoTabs){
+            this.readTabs(false);
+        }
+        if(this.activeTab !== undefined){
+            var item = Ext.isObject(this.activeTab) ? this.activeTab : this.items.get(this.activeTab);
+            delete this.activeTab;
+            this.setActiveTab(item);
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.TabPanel.superclass.initEvents.call(this);
+        this.on('add', this.onAdd, this, {target: this});
+        this.on('remove', this.onRemove, this, {target: this});
+
+        this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
+        this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this);
+        if(this.enableTabScroll){
+            this.mon(this.strip, 'mousewheel', this.onWheel, this);
+        }
+    },
+
+    // private
+    findTargets : function(e){
+        var item = null;
+        var itemEl = e.getTarget('li', this.strip);
+        if(itemEl){
+            item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]);
+            if(item.disabled){
+                return {
+                    close : null,
+                    item : null,
+                    el : null
+                };
+            }
+        }
+        return {
+            close : e.getTarget('.x-tab-strip-close', this.strip),
+            item : item,
+            el : itemEl
+        };
+    },
+
+    // private
+    onStripMouseDown : function(e){
+        if(e.button !== 0){
+            return;
+        }
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.close){
+            if (t.item.fireEvent('beforeclose', t.item) !== false) {
+                t.item.fireEvent('close', t.item);
+                this.remove(t.item);
+            }
+            return;
+        }
+        if(t.item && t.item != this.activeTab){
+            this.setActiveTab(t.item);
+        }
+    },
+
+    // private
+    onStripContextMenu : function(e){
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.item){
+            this.fireEvent('contextmenu', this, t.item, e);
+        }
+    },
+
+    /**
+     * True to scan the markup in this tab panel for <tt>{@link #autoTabs}</tt> using the
+     * <tt>{@link #autoTabSelector}</tt>
+     * @param {Boolean} removeExisting True to remove existing tabs
+     */
+    readTabs : function(removeExisting){
+        if(removeExisting === true){
+            this.items.each(function(item){
+                this.remove(item);
+            }, this);
+        }
+        var tabs = this.el.query(this.autoTabSelector);
+        for(var i = 0, len = tabs.length; i < len; i++){
+            var tab = tabs[i];
+            var title = tab.getAttribute('title');
+            tab.removeAttribute('title');
+            this.add({
+                title: title,
+                contentEl: tab
+            });
+        }
+    },
+
+    // private
+    initTab : function(item, index){
+        var before = this.strip.dom.childNodes[index];
+        var p = this.getTemplateArgs(item);
+        var el = before ?
+                 this.itemTpl.insertBefore(before, p) :
+                 this.itemTpl.append(this.strip, p);
+
+        Ext.fly(el).addClassOnOver('x-tab-strip-over');
+
+        if(item.tabTip){
+            Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip;
+        }
+        item.tabEl = el;
+
+        item.on('disable', this.onItemDisabled, this);
+        item.on('enable', this.onItemEnabled, this);
+        item.on('titlechange', this.onItemTitleChanged, this);
+        item.on('iconchange', this.onItemIconChanged, this);
+        item.on('beforeshow', this.onBeforeShowItem, this);
+    },
+
+    /**
+     * <p>Provides template arguments for rendering a tab selector item in the tab strip.</p>
+     * <p>This method returns an object hash containing properties used by the TabPanel's <tt>{@link #itemTpl}</tt>
+     * to create a formatted, clickable tab selector element. The properties which must be returned
+     * are:</p><div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc">A unique identifier which links to the item</div></li>
+     * <li><b>text</b> : String<div class="sub-desc">The text to display</div></li>
+     * <li><b>cls</b> : String<div class="sub-desc">The CSS class name</div></li>
+     * <li><b>iconCls</b> : String<div class="sub-desc">A CSS class to provide appearance for an icon.</div></li>
+     * </ul></div>
+     * @param {BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip.
+     * @return {Object} An object hash containing the properties required to render the selector element.
+     */
+    getTemplateArgs : function(item) {
+        var cls = item.closable ? 'x-tab-strip-closable' : '';
+        if(item.disabled){
+            cls += ' x-item-disabled';
+        }
+        if(item.iconCls){
+            cls += ' x-tab-with-icon';
+        }
+        if(item.tabCls){
+            cls += ' ' + item.tabCls;
+        }
+
+        return {
+            id: this.id + this.idDelimiter + item.getItemId(),
+            text: item.title,
+            cls: cls,
+            iconCls: item.iconCls || ''
+        };
+    },
+
+    // private
+    onAdd : function(tp, item, index){
+        this.initTab(item, index);
+        if(this.items.getCount() == 1){
+            this.syncSize();
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
+        if(existing){
+            this.setActiveTab(item);
+            return false;
+        }
+        Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
+        var es = item.elements;
+        item.elements = es ? es.replace(',header', '') : es;
+        item.border = (item.border === true);
+    },
+
+    // private
+    onRemove : function(tp, item){
+        Ext.destroy(Ext.get(this.getTabEl(item)));
+        this.stack.remove(item);
+        item.un('disable', this.onItemDisabled, this);
+        item.un('enable', this.onItemEnabled, this);
+        item.un('titlechange', this.onItemTitleChanged, this);
+        item.un('iconchange', this.onItemIconChanged, this);
+        item.un('beforeshow', this.onBeforeShowItem, this);
+        if(item == this.activeTab){
+            var next = this.stack.next();
+            if(next){
+                this.setActiveTab(next);
+            }else if(this.items.getCount() > 0){
+                this.setActiveTab(0);
+            }else{
+                this.activeTab = null;
+            }
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeShowItem : function(item){
+        if(item != this.activeTab){
+            this.setActiveTab(item);
+            return false;
+        }
+    },
+
+    // private
+    onItemDisabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).addClass('x-item-disabled');
+        }
+        this.stack.remove(item);
+    },
+
+    // private
+    onItemEnabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).removeClass('x-item-disabled');
+        }
+    },
+
+    // private
+    onItemTitleChanged : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title;
+        }
+    },
+
+    //private
+    onItemIconChanged : function(item, iconCls, oldCls){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text').replaceClass(oldCls, iconCls);
+        }
+    },
+
+    /**
+     * Gets the DOM element for the tab strip item which activates the child panel with the specified
+     * ID. Access this to change the visual treatment of the item, for example by changing the CSS class name.
+     * @param {Panel/Number/String} tab The tab component, or the tab's index, or the tabs id or itemId.
+     * @return {HTMLElement} The DOM node
+     */
+    getTabEl : function(item){
+        return document.getElementById(this.id + this.idDelimiter + this.getComponent(item).getItemId());
+    },
+
+    // private
+    onResize : function(){
+        Ext.TabPanel.superclass.onResize.apply(this, arguments);
+        this.delegateUpdates();
+    },
+
+    /**
+     * Suspends any internal calculations or scrolling while doing a bulk operation. See {@link #endUpdate}
+     */
+    beginUpdate : function(){
+        this.suspendUpdates = true;
+    },
+
+    /**
+     * Resumes calculations and scrolling at the end of a bulk operation. See {@link #beginUpdate}
+     */
+    endUpdate : function(){
+        this.suspendUpdates = false;
+        this.delegateUpdates();
+    },
+
+    /**
+     * Hides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    hideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = 'none';
+            this.delegateUpdates();
+        }
+        this.stack.remove(item);
+    },
+
+    /**
+     * Unhides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    unhideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = '';
+            this.delegateUpdates();
+        }
+    },
+
+    // private
+    delegateUpdates : function(){
+        if(this.suspendUpdates){
+            return;
+        }
+        if(this.resizeTabs && this.rendered){
+            this.autoSizeTabs();
+        }
+        if(this.enableTabScroll && this.rendered){
+            this.autoScrollTabs();
+        }
+    },
+
+    // private
+    autoSizeTabs : function(){
+        var count = this.items.length;
+        var ce = this.tabPosition != 'bottom' ? 'header' : 'footer';
+        var ow = this[ce].dom.offsetWidth;
+        var aw = this[ce].dom.clientWidth;
+
+        if(!this.resizeTabs || count < 1 || !aw){ // !aw for display:none
+            return;
+        }
+
+        var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); // -4 for float errors in IE
+        this.lastTabWidth = each;
+        var lis = this.strip.query("li:not([className^=x-tab-edge])");
+        for(var i = 0, len = lis.length; i < len; i++) {
+            var li = lis[i];
+            var inner = Ext.fly(li).child('.x-tab-strip-inner', true);
+            var tw = li.offsetWidth;
+            var iw = inner.offsetWidth;
+            inner.style.width = (each - (tw-iw)) + 'px';
+        }
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        if(this.header){
+            this.header.setWidth(w);
+        }
+        if(this.footer){
+            this.footer.setWidth(w);
+        }
+        return w;
+    },
+
+    /**
+     * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which
+     * can <tt>return false</tt> to cancel the tab change.
+     * @param {String/Number} item
+     * The id or tab Panel to activate. This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link Ext.Container#items items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     */
+    setActiveTab : function(item){
+        item = this.getComponent(item);
+        if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeTab = item;
+            return;
+        }
+        if(this.activeTab != item){
+            if(this.activeTab){
+                var oldEl = this.getTabEl(this.activeTab);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-tab-strip-active');
+                }
+                this.activeTab.fireEvent('deactivate', this.activeTab);
+            }
+            var el = this.getTabEl(item);
+            Ext.fly(el).addClass('x-tab-strip-active');
+            this.activeTab = item;
+            this.stack.add(item);
+
+            this.layout.setActiveItem(item);
+            if(this.scrolling){
+                this.scrollToTab(item, this.animScroll);
+            }
+
+            item.fireEvent('activate', item);
+            this.fireEvent('tabchange', this, item);
+        }
+    },
+
+    /**
+     * Gets the currently active tab.
+     * @return {Panel} The active tab
+     */
+    getActiveTab : function(){
+        return this.activeTab || null;
+    },
+
+    /**
+     * Gets the specified tab by id.
+     * @param {String} id The tab id
+     * @return {Panel} The tab
+     */
+    getItem : function(item){
+        return this.getComponent(item);
+    },
+
+    // private
+    autoScrollTabs : function(){
+        this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
+        var count = this.items.length;
+        var ow = this.pos.dom.offsetWidth;
+        var tw = this.pos.dom.clientWidth;
+
+        var wrap = this.stripWrap;
+        var wd = wrap.dom;
+        var cw = wd.offsetWidth;
+        var pos = this.getScrollPos();
+        var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos;
+
+        if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues
+            return;
+        }
+        if(l <= tw){
+            wd.scrollLeft = 0;
+            wrap.setWidth(tw);
+            if(this.scrolling){
+                this.scrolling = false;
+                this.pos.removeClass('x-tab-scrolling');
+                this.scrollLeft.hide();
+                this.scrollRight.hide();
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '';
+                    wd.style.marginRight = '';
+                }
+            }
+        }else{
+            if(!this.scrolling){
+                this.pos.addClass('x-tab-scrolling');
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '18px';
+                    wd.style.marginRight = '18px';
+                }
+            }
+            tw -= wrap.getMargins('lr');
+            wrap.setWidth(tw > 20 ? tw : 20);
+            if(!this.scrolling){
+                if(!this.scrollLeft){
+                    this.createScrollers();
+                }else{
+                    this.scrollLeft.show();
+                    this.scrollRight.show();
+                }
+            }
+            this.scrolling = true;
+            if(pos > (l-tw)){ // ensure it stays within bounds
+                wd.scrollLeft = l-tw;
+            }else{ // otherwise, make sure the active tab is still visible
+                this.scrollToTab(this.activeTab, false);
+            }
+            this.updateScrollButtons();
+        }
+    },
+
+    // private
+    createScrollers : function(){
+        this.pos.addClass('x-tab-scrolling-' + this.tabPosition);
+        var h = this.stripWrap.dom.offsetHeight;
+
+        // left
+        var sl = this.pos.insertFirst({
+            cls:'x-tab-scroller-left'
+        });
+        sl.setHeight(h);
+        sl.addClassOnOver('x-tab-scroller-left-over');
+        this.leftRepeater = new Ext.util.ClickRepeater(sl, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollLeft,
+            scope: this
+        });
+        this.scrollLeft = sl;
+
+        // right
+        var sr = this.pos.insertFirst({
+            cls:'x-tab-scroller-right'
+        });
+        sr.setHeight(h);
+        sr.addClassOnOver('x-tab-scroller-right-over');
+        this.rightRepeater = new Ext.util.ClickRepeater(sr, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollRight,
+            scope: this
+        });
+        this.scrollRight = sr;
+    },
+
+    // private
+    getScrollWidth : function(){
+        return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos();
+    },
+
+    // private
+    getScrollPos : function(){
+        return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0;
+    },
+
+    // private
+    getScrollArea : function(){
+        return parseInt(this.stripWrap.dom.clientWidth, 10) || 0;
+    },
+
+    // private
+    getScrollAnim : function(){
+        return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this};
+    },
+
+    // private
+    getScrollIncrement : function(){
+        return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100);
+    },
+
+    /**
+     * Scrolls to a particular tab if tab scrolling is enabled
+     * @param {Panel} item The item to scroll to
+     * @param {Boolean} animate True to enable animations
+     */
+
+    scrollToTab : function(item, animate){
+        if(!item){ return; }
+        var el = this.getTabEl(item);
+        var pos = this.getScrollPos(), area = this.getScrollArea();
+        var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos;
+        var right = left + el.offsetWidth;
+        if(left < pos){
+            this.scrollTo(left, animate);
+        }else if(right > (pos + area)){
+            this.scrollTo(right - area, animate);
+        }
+    },
+
+    // private
+    scrollTo : function(pos, animate){
+        this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false);
+        if(!animate){
+            this.updateScrollButtons();
+        }
+    },
+
+    onWheel : function(e){
+        var d = e.getWheelDelta()*this.wheelIncrement*-1;
+        e.stopEvent();
+
+        var pos = this.getScrollPos();
+        var newpos = pos + d;
+        var sw = this.getScrollWidth()-this.getScrollArea();
+
+        var s = Math.max(0, Math.min(sw, newpos));
+        if(s != pos){
+            this.scrollTo(s, false);
+        }
+    },
+
+    // private
+    onScrollRight : function(){
+        var sw = this.getScrollWidth()-this.getScrollArea();
+        var pos = this.getScrollPos();
+        var s = Math.min(sw, pos + this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    onScrollLeft : function(){
+        var pos = this.getScrollPos();
+        var s = Math.max(0, pos - this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    updateScrollButtons : function(){
+        var pos = this.getScrollPos();
+        this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled');
+        this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('x-tab-scroller-right-disabled');
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.items){
+            this.items.each(function(item){
+                if(item && item.tabEl){
+                    Ext.get(item.tabEl).removeAllListeners();
+                    item.tabEl = null;
+                }
+            }, this);
+        }
+        if(this.strip){
+            this.strip.removeAllListeners();
+        }
+        Ext.TabPanel.superclass.beforeDestroy.apply(this);
+    }
+
+    /**
+     * @cfg {Boolean} collapsible
+     * @hide
+     */
+    /**
+     * @cfg {String} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property title
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Array} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapsed
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+});
+Ext.reg('tabpanel', Ext.TabPanel);
+
+/**
+ * See {@link #setActiveTab}. Sets the specified tab as the active tab. This method fires
+ * the {@link #beforetabchange} event which can <tt>return false</tt> to cancel the tab change.
+ * @param {String/Panel} tab The id or tab Panel to activate
+ * @method activate
+ */
+Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab;
+
+// private utility class used by TabPanel
+Ext.TabPanel.AccessStack = function(){
+    var items = [];
+    return {
+        add : function(item){
+            items.push(item);
+            if(items.length > 10){
+                items.shift();
+            }
+        },
+
+        remove : function(item){
+            var s = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                if(items[i] != item){
+                    s.push(items[i]);
+                }
+            }
+            items = s;
+        },
+
+        next : function(){
+            return items.pop();
+        }
+    };
+};/**
+ * @class Ext.Button
+ * @extends Ext.BoxComponent
+ * Simple Button class
+ * @cfg {String} text The button text to be used as innerHTML (html tags are accepted)
+ * @cfg {String} icon The path to an image to display in the button (the image will be set as the background-image
+ * CSS property of the button by default, so if you want a mixed icon/text button, set cls:'x-btn-text-icon')
+ * @cfg {Function} handler A function called when the button is clicked (can be used instead of click event).
+ * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+ * <li><code>b</code> : Button<div class="sub-desc">This Button.</div></li>
+ * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+ * </ul></div>
+ * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the handler is executed. Defaults to this Button.
+ * @cfg {Number} minWidth The minimum width for this button (used to give a set of buttons a common width).
+ * See also {@link Ext.Panel}.<tt>{@link Ext.Panel#minButtonWidth minButtonWidth}</tt>.
+ * @cfg {String/Object} tooltip The tooltip for the button - can be a string to be used as innerHTML (html tags are accepted) or QuickTips config object
+ * @cfg {Boolean} hidden True to start hidden (defaults to false)
+ * @cfg {Boolean} disabled True to start disabled (defaults to false)
+ * @cfg {Boolean} pressed True to start pressed (only if enableToggle = true)
+ * @cfg {String} toggleGroup The group this toggle button is a member of (only 1 per group can be pressed)
+ * @cfg {Boolean/Object} repeat True to repeat fire the click event while the mouse is down. This can also be
+ * a {@link Ext.util.ClickRepeater ClickRepeater} config object (defaults to false).
+ * @constructor
+ * Create a new button
+ * @param {Object} config The config object
+ * @xtype button
+ */
+Ext.Button = Ext.extend(Ext.BoxComponent, {
+    /**
+     * Read-only. True if this button is hidden
+     * @type Boolean
+     */
+    hidden : false,
+    /**
+     * Read-only. True if this button is disabled
+     * @type Boolean
+     */
+    disabled : false,
+    /**
+     * Read-only. True if this button is pressed (only if enableToggle = true)
+     * @type Boolean
+     */
+    pressed : false,
+    /**
+     * The Button's owner {@link Ext.Panel} (defaults to undefined, and is set automatically when
+     * the Button is added to a container).  Read-only.
+     * @type Ext.Panel
+     * @property ownerCt
+     */
+
+    /**
+     * @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined)
+     */
+
+    /**
+     * @cfg {Boolean} allowDepress
+     * False to not allow a pressed Button to be depressed (defaults to undefined). Only valid when {@link #enableToggle} is true.
+     */
+
+    /**
+     * @cfg {Boolean} enableToggle
+     * True to enable pressed/not pressed toggling (defaults to false)
+     */
+    enableToggle: false,
+    /**
+     * @cfg {Function} toggleHandler
+     * Function called when a Button with {@link #enableToggle} set to true is clicked. Two arguments are passed:<ul class="mdetail-params">
+     * <li><b>button</b> : Ext.Button<div class="sub-desc">this Button object</div></li>
+     * <li><b>state</b> : Boolean<div class="sub-desc">The next state if the Button, true means pressed.</div></li>
+     * </ul>
+     */
+    /**
+     * @cfg {Mixed} menu
+     * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined).
+     */
+    /**
+     * @cfg {String} menuAlign
+     * The position to align the menu to (see {@link Ext.Element#alignTo} for more details, defaults to 'tl-bl?').
+     */
+    menuAlign : 'tl-bl?',
+
+    /**
+     * @cfg {String} overflowText If used in a {@link Ext.Toolbar Toolbar}, the
+     * text to be used if this item is shown in the overflow menu. See also
+     * {@link Ext.Toolbar.Item}.<code>{@link Ext.Toolbar.Item#overflowText overflowText}</code>.
+     */
+    /**
+     * @cfg {String} iconCls
+     * A css class which sets a background image to be used as the icon for this button
+     */
+    /**
+     * @cfg {String} type
+     * submit, reset or button - defaults to 'button'
+     */
+    type : 'button',
+
+    // private
+    menuClassTarget: 'tr:nth(2)',
+
+    /**
+     * @cfg {String} clickEvent
+     * The type of event to map to the button's event handler (defaults to 'click')
+     */
+    clickEvent : 'click',
+
+    /**
+     * @cfg {Boolean} handleMouseEvents
+     * False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
+     */
+    handleMouseEvents : true,
+
+    /**
+     * @cfg {String} tooltipType
+     * The type of tooltip to use. Either 'qtip' (default) for QuickTips or 'title' for title attribute.
+     */
+    tooltipType : 'qtip',
+
+    /**
+     * @cfg {String} buttonSelector
+     * <p>(Optional) A {@link Ext.DomQuery DomQuery} selector which is used to extract the active, clickable element from the
+     * DOM structure created.</p>
+     * <p>When a custom {@link #template} is used, you  must ensure that this selector results in the selection of
+     * a focussable element.</p>
+     * <p>Defaults to <b><tt>"button:first-child"</tt></b>.</p>
+     */
+    buttonSelector : 'button:first-child',
+
+    /**
+     * @cfg {String} scale
+     * <p>(Optional) The size of the Button. Three values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'small'<div class="sub-desc">Results in the button element being 16px high.</div></li>
+     * <li>'medium'<div class="sub-desc">Results in the button element being 24px high.</div></li>
+     * <li>'large'<div class="sub-desc">Results in the button element being 32px high.</div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'small'</tt></b>.</p>
+     */
+    scale: 'small',
+
+    /**
+     * @cfg {String} iconAlign
+     * <p>(Optional) The side of the Button box to render the icon. Four values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'top'<div class="sub-desc"></div></li>
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * <li>'left'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'left'</tt></b>.</p>
+     */
+    iconAlign : 'left',
+
+    /**
+     * @cfg {String} arrowAlign
+     * <p>(Optional) The side of the Button box to render the arrow if the button has an associated {@link #menu}.
+     * Two values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'right'</tt></b>.</p>
+     */
+    arrowAlign : 'right',
+
+    /**
+     * @cfg {Ext.Template} template (Optional)
+     * <p>A {@link Ext.Template Template} used to create the Button's DOM structure.</p>
+     * Instances, or subclasses which need a different DOM structure may provide a different
+     * template layout in conjunction with an implementation of {@link #getTemplateArgs}.
+     * @type Ext.Template
+     * @property template
+     */
+    /**
+     * @cfg {String} cls
+     * A CSS class string to apply to the button's main element.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object associated with this Button when configured with the {@link #menu} config option.
+     */
+
+    initComponent : function(){
+        Ext.Button.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this button is clicked
+             * @param {Button} this
+             * @param {EventObject} e The click event
+             */
+            'click',
+            /**
+             * @event toggle
+             * Fires when the 'pressed' state of this button changes (only if enableToggle = true)
+             * @param {Button} this
+             * @param {Boolean} pressed
+             */
+            'toggle',
+            /**
+             * @event mouseover
+             * Fires when the mouse hovers over the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseout',
+            /**
+             * @event menushow
+             * If this button has a menu, this event fires when it is shown
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menushow',
+            /**
+             * @event menuhide
+             * If this button has a menu, this event fires when it is hidden
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menuhide',
+            /**
+             * @event menutriggerover
+             * If this button has a menu, this event fires when the mouse enters the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerover',
+            /**
+             * @event menutriggerout
+             * If this button has a menu, this event fires when the mouse leaves the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerout'
+        );
+        if(this.menu){
+            this.menu = Ext.menu.MenuMgr.get(this.menu);
+        }
+        if(Ext.isString(this.toggleGroup)){
+            this.enableToggle = true;
+        }
+    },
+
+/**
+  * <p>This method returns an object which provides substitution parameters for the {@link #template Template} used
+  * to create this Button's DOM structure.</p>
+  * <p>Instances or subclasses which use a different Template to create a different DOM structure may need to provide their
+  * own implementation of this method.</p>
+  * <p>The default implementation which provides data for the default {@link #template} returns an Array containing the
+  * following items:</p><div class="mdetail-params"><ul>
+  * <li>The Button's {@link #text}</li>
+  * <li>The &lt;button&gt;'s {@link #type}</li>
+  * <li>The {@link iconCls} applied to the &lt;button&gt; {@link #btnEl element}</li>
+  * <li>The {@link #cls} applied to the Button's main {@link #getEl Element}</li>
+  * <li>A CSS class name controlling the Button's {@link #scale} and {@link #iconAlign icon alignment}</li>
+  * <li>A CSS class name which applies an arrow to the Button if configured with a {@link #menu}</li>
+  * </ul></div>
+  * @return {Object} Substitution data for a Template.
+ */
+    getTemplateArgs : function(){
+        var cls = (this.cls || '');
+        cls += (this.iconCls || this.icon) ? (this.text ? ' x-btn-text-icon' : ' x-btn-icon') : ' x-btn-noicon';
+        if(this.pressed){
+            cls += ' x-btn-pressed';
+        }
+        return [this.text || '&#160;', this.type, this.iconCls || '', cls, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass()];
+    },
+
+    // protected
+    getMenuClass : function(){
+        return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.template){
+            if(!Ext.Button.buttonTemplate){
+                // hideous table template
+                Ext.Button.buttonTemplate = new Ext.Template(
+                    '<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">',
+                    '<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',
+                    "</tbody></table>");
+                Ext.Button.buttonTemplate.compile();
+            }
+            this.template = Ext.Button.buttonTemplate;
+        }
+
+        var btn, targs = this.getTemplateArgs();
+
+        if(position){
+            btn = this.template.insertBefore(position, targs, true);
+        }else{
+            btn = this.template.append(ct, targs, true);
+        }
+        /**
+         * An {@link Ext.Element Element} encapsulating the Button's clickable element. By default,
+         * this references a <tt>&lt;button&gt;</tt> element. Read only.
+         * @type Ext.Element
+         * @property btnEl
+         */
+        this.btnEl = btn.child(this.buttonSelector);
+        this.mon(this.btnEl, {
+            scope: this,
+            focus: this.onFocus,
+            blur: this.onBlur
+        });
+
+        this.initButtonEl(btn, this.btnEl);
+
+        Ext.ButtonToggleMgr.register(this);
+    },
+
+    // private
+    initButtonEl : function(btn, btnEl){
+        this.el = btn;
+
+        if(this.id){
+            this.el.dom.id = this.el.id = this.id;
+        }
+        if(this.icon){
+            btnEl.setStyle('background-image', 'url(' +this.icon +')');
+        }
+        if(this.tabIndex !== undefined){
+            btnEl.dom.tabIndex = this.tabIndex;
+        }
+        if(this.tooltip){
+            this.setTooltip(this.tooltip, true);
+        }
+
+        if(this.handleMouseEvents){
+            this.mon(btn, {
+                scope: this,
+                mouseover: this.onMouseOver,
+                mousedown: this.onMouseDown
+            });
+            
+            // new functionality for monitoring on the document level
+            //this.mon(btn, 'mouseout', this.onMouseOut, this);
+        }
+
+        if(this.menu){
+            this.mon(this.menu, {
+                scope: this,
+                show: this.onMenuShow,
+                hide: this.onMenuHide
+            });
+        }
+
+        if(this.repeat){
+            var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {});
+            this.mon(repeater, 'click', this.onClick, this);
+        }
+        
+        this.mon(btn, this.clickEvent, this.onClick, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Button.superclass.afterRender.call(this);
+        this.doAutoWidth();
+    },
+
+    /**
+     * Sets the CSS class that provides a background image to use as the button's icon.  This method also changes
+     * the value of the {@link iconCls} config internally.
+     * @param {String} cls The CSS class providing the icon image
+     * @return {Ext.Button} this
+     */
+    setIconClass : function(cls){
+        if(this.el){
+            this.btnEl.replaceClass(this.iconCls, cls);
+        }
+        this.iconCls = cls;
+        return this;
+    },
+
+    /**
+     * Sets the tooltip for this Button.
+     * @param {String/Object} tooltip. This may be:<div class="mdesc-details"><ul>
+     * <li><b>String</b> : A string to be used as innerHTML (html tags are accepted) to show in a tooltip</li>
+     * <li><b>Object</b> : A configuration object for {@link Ext.QuickTips#register}.</li>
+     * </ul></div>
+     * @return {Ext.Button} this
+     */
+    setTooltip : function(tooltip, /* private */ initial){
+        if(this.rendered){
+            if(!initial){
+                this.clearTip();
+            }
+            if(Ext.isObject(tooltip)){
+                Ext.QuickTips.register(Ext.apply({
+                      target: this.btnEl.id
+                }, tooltip));
+                this.tooltip = tooltip;
+            }else{
+                this.btnEl.dom[this.tooltipType] = tooltip;
+            }
+        }else{
+            this.tooltip = tooltip;
+        }
+        return this;
+    },
+    
+    // private
+    clearTip: function(){
+        if(Ext.isObject(this.tooltip)){
+            Ext.QuickTips.unregister(this.btnEl);
+        }
+    },
+    
+    // private
+    beforeDestroy: function(){
+        if(this.rendered){
+            this.clearTip();
+        }
+        Ext.destroy(this.menu, this.repeater);
+    },
+
+    // private
+    onDestroy : function(){
+        var doc = Ext.getDoc();
+        doc.un('mouseover', this.monitorMouseOver, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        if(this.rendered){
+            Ext.ButtonToggleMgr.unregister(this);
+        }
+    },
+
+    // private
+    doAutoWidth : function(){
+        if(this.el && this.text && this.width === undefined){
+            this.el.setWidth('auto');
+            if(Ext.isIE7 && Ext.isStrict){
+                var ib = this.btnEl;
+                if(ib && ib.getWidth() > 20){
+                    ib.clip();
+                    ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr'));
+                }
+            }
+            if(this.minWidth){
+                if(this.el.getWidth() < this.minWidth){
+                    this.el.setWidth(this.minWidth);
+                }
+            }
+        }
+    },
+
+    /**
+     * Assigns this Button's click handler
+     * @param {Function} handler The function to call when the button is clicked
+     * @param {Object} scope (optional) Scope for the function passed in
+     * @return {Ext.Button} this
+     */
+    setHandler : function(handler, scope){
+        this.handler = handler;
+        this.scope = scope;
+        return this;
+    },
+
+    /**
+     * Sets this Button's text
+     * @param {String} text The button text
+     * @return {Ext.Button} this
+     */
+    setText : function(text){
+        this.text = text;
+        if(this.el){
+            this.el.child('td.x-btn-mc ' + this.buttonSelector).update(text);
+        }
+        this.doAutoWidth();
+        return this;
+    },
+
+    /**
+     * Gets the text for this Button
+     * @return {String} The button text
+     */
+    getText : function(){
+        return this.text;
+    },
+
+    /**
+     * If a state it passed, it becomes the pressed state otherwise the current state is toggled.
+     * @param {Boolean} state (optional) Force a particular state
+     * @param {Boolean} supressEvent (optional) True to stop events being fired when calling this method.
+     * @return {Ext.Button} this
+     */
+    toggle : function(state, suppressEvent){
+        state = state === undefined ? !this.pressed : !!state;
+        if(state != this.pressed){
+            this.el[state ? 'addClass' : 'removeClass']('x-btn-pressed');
+            this.pressed = state;
+            if(!suppressEvent){
+                this.fireEvent('toggle', this, state);
+                if(this.toggleHandler){
+                    this.toggleHandler.call(this.scope || this, this, state);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Focus the button
+     */
+    focus : function(){
+        this.btnEl.focus();
+    },
+
+    // private
+    onDisable : function(){
+        this.onDisableChange(true);
+    },
+
+    // private
+    onEnable : function(){
+        this.onDisableChange(false);
+    },
+    
+    onDisableChange : function(disabled){
+        if(this.el){
+            if(!Ext.isIE6 || !this.text){
+                this.el[disabled ? 'addClass' : 'removeClass'](this.disabledClass);
+            }
+            this.el.dom.disabled = disabled;
+        }
+        this.disabled = disabled;
+    },
+
+    /**
+     * Show this button's menu (if it has one)
+     */
+    showMenu : function(){
+        if(this.rendered && this.menu){
+            if(this.tooltip){
+                Ext.QuickTips.getQuickTip().cancelShow(this.btnEl);
+            }
+            this.menu.show(this.el, this.menuAlign);
+        }
+        return this;
+    },
+
+    /**
+     * Hide this button's menu (if it has one)
+     */
+    hideMenu : function(){
+        if(this.menu){
+            this.menu.hide();
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the button has a menu and it is visible
+     * @return {Boolean}
+     */
+    hasVisibleMenu : function(){
+        return this.menu && this.menu.isVisible();
+    },
+
+    // private
+    onClick : function(e){
+        if(e){
+            e.preventDefault();
+        }
+        if(e.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, e);
+            if(this.handler){
+                //this.el.removeClass('x-btn-over');
+                this.handler.call(this.scope || this, this, e);
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    onMouseOver : function(e){
+        if(!this.disabled){
+            var internal = e.within(this.el,  true);
+            if(!internal){
+                this.el.addClass('x-btn-over');
+                if(!this.monitoringMouseOver){
+                    Ext.getDoc().on('mouseover', this.monitorMouseOver, this);
+                    this.monitoringMouseOver = true;
+                }
+                this.fireEvent('mouseover', this, e);
+            }
+            if(this.isMenuTriggerOver(e, internal)){
+                this.fireEvent('menutriggerover', this, this.menu, e);
+            }
+        }
+    },
+
+    // private
+    monitorMouseOver : function(e){
+        if(e.target != this.el.dom && !e.within(this.el)){
+            if(this.monitoringMouseOver){
+                Ext.getDoc().un('mouseover', this.monitorMouseOver, this);
+                this.monitoringMouseOver = false;
+            }
+            this.onMouseOut(e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        var internal = e.within(this.el) && e.target != this.el.dom;
+        this.el.removeClass('x-btn-over');
+        this.fireEvent('mouseout', this, e);
+        if(this.isMenuTriggerOut(e, internal)){
+            this.fireEvent('menutriggerout', this, this.menu, e);
+        }
+    },
+    // private
+    onFocus : function(e){
+        if(!this.disabled){
+            this.el.addClass('x-btn-focus');
+        }
+    },
+    // private
+    onBlur : function(e){
+        this.el.removeClass('x-btn-focus');
+    },
+
+    // private
+    getClickEl : function(e, isUp){
+       return this.el;
+    },
+
+    // private
+    onMouseDown : function(e){
+        if(!this.disabled && e.button === 0){
+            this.getClickEl(e).addClass('x-btn-click');
+            Ext.getDoc().on('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMouseUp : function(e){
+        if(e.button === 0){
+            this.getClickEl(e, true).removeClass('x-btn-click');
+            Ext.getDoc().un('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMenuShow : function(e){
+        this.ignoreNextClick = 0;
+        this.el.addClass('x-btn-menu-active');
+        this.fireEvent('menushow', this, this.menu);
+    },
+    // private
+    onMenuHide : function(e){
+        this.el.removeClass('x-btn-menu-active');
+        this.ignoreNextClick = this.restoreClick.defer(250, this);
+        this.fireEvent('menuhide', this, this.menu);
+    },
+
+    // private
+    restoreClick : function(){
+        this.ignoreNextClick = 0;
+    }
+
+
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('button', Ext.Button);
+
+// Private utility class used by Button
+Ext.ButtonToggleMgr = function(){
+   var groups = {};
+
+   function toggleGroup(btn, state){
+       if(state){
+           var g = groups[btn.toggleGroup];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != btn){
+                   g[i].toggle(false);
+               }
+           }
+       }
+   }
+
+   return {
+       register : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(!g){
+               g = groups[btn.toggleGroup] = [];
+           }
+           g.push(btn);
+           btn.on('toggle', toggleGroup);
+       },
+
+       unregister : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(g){
+               g.remove(btn);
+               btn.un('toggle', toggleGroup);
+           }
+       },
+
+       /**
+        * Gets the pressed button in the passed group or null
+        * @param {String} group
+        * @return Button
+        */
+       getPressed : function(group){
+           var g = groups[group];
+           if(g){
+               for(var i = 0, len = g.length; i < len; i++){
+                   if(g[i].pressed === true){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();/**
+ * @class Ext.SplitButton
+ * @extends Ext.Button
+ * A split button that provides a built-in dropdown arrow that can fire an event separately from the default
+ * click event of the button.  Typically this would be used to display a dropdown menu that provides additional
+ * options to the primary button action, but any custom handler can provide the arrowclick implementation.  Example usage:
+ * <pre><code>
+// display a dropdown menu:
+new Ext.SplitButton({
+	renderTo: 'button-ct', // the container id
+   	text: 'Options',
+   	handler: optionsHandler, // handle a click on the button itself
+   	menu: new Ext.menu.Menu({
+        items: [
+        	// these items will render as dropdown menu items when the arrow is clicked:
+	        {text: 'Item 1', handler: item1Handler},
+	        {text: 'Item 2', handler: item2Handler}
+        ]
+   	})
+});
+
+// Instead of showing a menu, you provide any type of custom
+// functionality you want when the dropdown arrow is clicked:
+new Ext.SplitButton({
+	renderTo: 'button-ct',
+   	text: 'Options',
+   	handler: optionsHandler,
+   	arrowHandler: myCustomHandler
+});
+</code></pre>
+ * @cfg {Function} arrowHandler A function called when the arrow button is clicked (can be used instead of click event)
+ * @cfg {String} arrowTooltip The title attribute of the arrow
+ * @constructor
+ * Create a new menu button
+ * @param {Object} config The config object
+ * @xtype splitbutton
+ */
+Ext.SplitButton = Ext.extend(Ext.Button, {
+	// private
+    arrowSelector : 'em',
+    split: true,
+
+    // private
+    initComponent : function(){
+        Ext.SplitButton.superclass.initComponent.call(this);
+        /**
+         * @event arrowclick
+         * Fires when this button's arrow is clicked
+         * @param {MenuButton} this
+         * @param {EventObject} e The click event
+         */
+        this.addEvents("arrowclick");
+    },
+
+    // private
+    onRender : function(){
+        Ext.SplitButton.superclass.onRender.apply(this, arguments);
+        if(this.arrowTooltip){
+            this.el.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip;
+        }
+    },
+
+    /**
+     * Sets this button's arrow click handler.
+     * @param {Function} handler The function to call when the arrow is clicked
+     * @param {Object} scope (optional) Scope for the function passed above
+     */
+    setArrowHandler : function(handler, scope){
+        this.arrowHandler = handler;
+        this.scope = scope;
+    },
+
+    getMenuClass : function(){
+        return 'x-btn-split' + (this.arrowAlign == 'bottom' ? '-bottom' : '');
+    },
+
+    isClickOnArrow : function(e){
+        return this.arrowAlign != 'bottom' ?
+               e.getPageX() > this.el.child(this.buttonSelector).getRegion().right :
+               e.getPageY() > this.el.child(this.buttonSelector).getRegion().bottom;
+    },
+
+    // private
+    onClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            if(this.isClickOnArrow(e)){
+                if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){
+                    this.showMenu();
+                }
+                this.fireEvent("arrowclick", this, e);
+                if(this.arrowHandler){
+                    this.arrowHandler.call(this.scope || this, this, e);
+                }
+            }else{
+                if(this.enableToggle){
+                    this.toggle();
+                }
+                this.fireEvent("click", this, e);
+                if(this.handler){
+                    this.handler.call(this.scope || this, this, e);
+                }
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e){
+        return this.menu && e.target.tagName == 'em';
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && e.target.tagName != 'em';
+    }
+});
+
+Ext.reg('splitbutton', Ext.SplitButton);/**
+ * @class Ext.CycleButton
+ * @extends Ext.SplitButton
+ * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements.  The button automatically
+ * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's
+ * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the
+ * button displays the dropdown menu just like a normal SplitButton.  Example usage:
+ * <pre><code>
+var btn = new Ext.CycleButton({
+    showText: true,
+    prependText: 'View as ',
+    items: [{
+        text:'text only',
+        iconCls:'view-text',
+        checked:true
+    },{
+        text:'HTML',
+        iconCls:'view-html'
+    }],
+    changeHandler:function(btn, item){
+        Ext.Msg.alert('Change View', item.text);
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new split button
+ * @param {Object} config The config object
+ * @xtype cycle
+ */
+Ext.CycleButton = Ext.extend(Ext.SplitButton, {
+    /**
+     * @cfg {Array} items An array of {@link Ext.menu.CheckItem} <b>config</b> objects to be used when creating the
+     * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'})
+     */
+    /**
+     * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false)
+     */
+    /**
+     * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the
+     * button's text (only applies when showText = true, defaults to '')
+     */
+    /**
+     * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu
+     * item in the button's menu has changed.  If this callback is not supplied, the SplitButton will instead
+     * fire the {@link #change} event on active item change.  The changeHandler function will be called with the
+     * following argument list: (SplitButton this, Ext.menu.CheckItem item)
+     */
+    /**
+     * @cfg {String} forceIcon A css class which sets an image to be used as the static icon for this button.  This
+     * icon will always be displayed regardless of which item is selected in the dropdown list.  This overrides the 
+     * default behavior of changing the button's icon to match the selected item's icon on change.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices.
+     */
+
+    // private
+    getItemText : function(item){
+        if(item && this.showText === true){
+            var text = '';
+            if(this.prependText){
+                text += this.prependText;
+            }
+            text += item.text;
+            return text;
+        }
+        return undefined;
+    },
+
+    /**
+     * Sets the button's active menu item.
+     * @param {Ext.menu.CheckItem} item The item to activate
+     * @param {Boolean} suppressEvent True to prevent the button's change event from firing (defaults to false)
+     */
+    setActiveItem : function(item, suppressEvent){
+        if(typeof item != 'object'){
+            item = this.menu.items.get(item);
+        }
+        if(item){
+            if(!this.rendered){
+                this.text = this.getItemText(item);
+                this.iconCls = item.iconCls;
+            }else{
+                var t = this.getItemText(item);
+                if(t){
+                    this.setText(t);
+                }
+                this.setIconClass(item.iconCls);
+            }
+            this.activeItem = item;
+            if(!item.checked){
+                item.setChecked(true, true);
+            }
+            if(this.forceIcon){
+                this.setIconClass(this.forceIcon);
+            }
+            if(!suppressEvent){
+                this.fireEvent('change', this, item);
+            }
+        }
+    },
+
+    /**
+     * Gets the currently active menu item.
+     * @return {Ext.menu.CheckItem} The active item
+     */
+    getActiveItem : function(){
+        return this.activeItem;
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the button's active menu item has changed.  Note that if a {@link #changeHandler} function
+             * is set on this CycleButton, it will be called instead on active item change and this change event will
+             * not be fired.
+             * @param {Ext.CycleButton} this
+             * @param {Ext.menu.CheckItem} item The menu item that was selected
+             */
+            "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 checked;
+        for(var i = 0, len = this.itemCount; i < len; i++){
+            var item = this.items[i];
+            item.group = item.group || this.id;
+            item.itemIndex = i;
+            item.checkHandler = this.checkHandler;
+            item.scope = this;
+            item.checked = item.checked || false;
+            this.menu.items.push(item);
+            if(item.checked){
+                checked = item;
+            }
+        }
+        this.setActiveItem(checked, true);
+        Ext.CycleButton.superclass.initComponent.call(this);
+
+        this.on('click', this.toggleSelected, this);
+    },
+
+    // private
+    checkHandler : function(item, pressed){
+        if(pressed){
+            this.setActiveItem(item);
+        }
+    },
+
+    /**
+     * This is normally called internally on button click, but can be called externally to advance the button's
+     * active item programmatically to the next one in the menu.  If the current item is the last one in the menu
+     * the active item will be set to the first item in the menu.
+     */
+    toggleSelected : function(){
+        this.menu.render();
+        
+        var nextIdx, checkItem;
+        for (var i = 1; i < this.itemCount; i++) {
+            nextIdx = (this.activeItem.itemIndex + i) % this.itemCount;
+            // check the potential item
+            checkItem = this.menu.items.itemAt(nextIdx);
+            // if its not disabled then check it.
+            if (!checkItem.disabled) {
+                checkItem.setChecked(true);
+                break;
+            }
+        }
+    }
+});
+Ext.reg('cycle', Ext.CycleButton);/**
+ * @class Ext.layout.ToolbarLayout
+ * @extends Ext.layout.ContainerLayout
+ * Layout manager implicitly used by Ext.Toolbar.
+ */
+Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize : true,
+    triggerWidth : 18,
+    lastOverflow : false,
+
+    noItemsMenuText : '<div class="x-toolbar-no-items">(None)</div>',
+    // private
+    onLayout : function(ct, target){
+        if(!this.leftTr){
+            target.addClass('x-toolbar-layout-ct');
+            target.insertHtml('beforeEnd',
+                 '<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');
+            this.leftTr = target.child('tr.x-toolbar-left-row', true);
+            this.rightTr = target.child('tr.x-toolbar-right-row', true);
+            this.extrasTr = target.child('tr.x-toolbar-extras-row', true);
+        }
+        var side = this.leftTr;
+        var pos = 0;
+
+        var items = ct.items.items;
+        for(var i = 0, len = items.length, c; i < len; i++, pos++) {
+            c = items[i];
+            if(c.isFill){
+                side = this.rightTr;
+                pos = -1;
+            }else if(!c.rendered){
+                c.render(this.insertCell(c, side, pos));
+            }else{
+                if(!c.xtbHidden && !this.isValidParent(c, side.childNodes[pos])){
+                    var td = this.insertCell(c, side, pos);
+                    td.appendChild(c.getDomPositionEl().dom);
+                    c.container = Ext.get(td);
+                }
+            }
+        }
+        //strip extra empty cells
+        this.cleanup(this.leftTr);
+        this.cleanup(this.rightTr);
+        this.cleanup(this.extrasTr);
+        this.fitToSize(target);
+    },
+
+    cleanup : function(row){
+        var cn = row.childNodes;
+        for(var i = cn.length-1, c; i >= 0 && (c = cn[i]); i--){
+            if(!c.firstChild){
+                row.removeChild(c);
+            }
+        }
+    },
+
+    insertCell : function(c, side, pos){
+        var td = document.createElement('td');
+        td.className='x-toolbar-cell';
+        side.insertBefore(td, side.childNodes[pos]||null);
+        return td;
+    },
+
+    hideItem : function(item){
+        var h = (this.hiddens = this.hiddens || []);
+        h.push(item);
+        item.xtbHidden = true;
+        item.xtbWidth = item.getDomPositionEl().dom.parentNode.offsetWidth;
+        item.hide();
+    },
+
+    unhideItem : function(item){
+        item.show();
+        item.xtbHidden = false;
+        this.hiddens.remove(item);
+        if(this.hiddens.length < 1){
+            delete this.hiddens;
+        }
+    },
+
+    getItemWidth : function(c){
+        return c.hidden ? (c.xtbWidth || 0) : c.getDomPositionEl().dom.parentNode.offsetWidth;
+    },
+
+    fitToSize : function(t){
+        if(this.container.enableOverflow === false){
+            return;
+        }
+        var w = t.dom.clientWidth;
+        var lw = this.lastWidth || 0;
+        this.lastWidth = w;
+        var iw = t.dom.firstChild.offsetWidth;
+
+        var clipWidth = w - this.triggerWidth;
+        var hideIndex = -1;
+
+        if(iw > w || (this.hiddens && w >= lw)){
+            var i, items = this.container.items.items, len = items.length, c;
+            var loopWidth = 0;
+            for(i = 0; i < len; i++) {
+                c = items[i];
+                if(!c.isFill){
+                    loopWidth += this.getItemWidth(c);
+                    if(loopWidth > clipWidth){
+                        if(!c.xtbHidden){
+                            this.hideItem(c);
+                        }
+                    }else{
+                        if(c.xtbHidden){
+                            this.unhideItem(c);
+                        }
+                    }
+                }
+            }
+        }
+        if(this.hiddens){
+            this.initMore();
+            if(!this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, true);
+                this.lastOverflow = true;
+            }
+        }else if(this.more){
+            this.clearMenu();
+            this.more.destroy();
+            delete this.more;
+            if(this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, false);
+                this.lastOverflow = false;
+            }
+        }
+    },
+
+    createMenuConfig : function(c, hideOnClick){
+        var cfg = Ext.apply({}, c.initialConfig),
+            group = c.toggleGroup;
+
+        Ext.apply(cfg, {
+            text: c.overflowText || c.text,
+            iconCls: c.iconCls,
+            icon: c.icon,
+            itemId: c.itemId,
+            disabled: c.disabled,
+            handler: c.handler,
+            scope: c.scope,
+            menu: c.menu,
+            hideOnClick: hideOnClick
+        });
+        if(group || c.enableToggle){
+            Ext.apply(cfg, {
+                group: group,
+                checked: c.pressed,
+                listeners: {
+                    checkchange: function(item, checked){
+                        c.toggle(checked);
+                    }
+                }
+            });
+        }
+        delete cfg.xtype;
+        delete cfg.id;
+        return cfg;
+    },
+
+    // private
+    addComponentToMenu : function(m, c){
+        if(c instanceof Ext.Toolbar.Separator){
+            m.add('-');
+        }else if(Ext.isFunction(c.isXType)){
+            if(c.isXType('splitbutton')){
+                m.add(this.createMenuConfig(c, true));
+            }else if(c.isXType('button')){
+                m.add(this.createMenuConfig(c, !c.menu));
+            }else if(c.isXType('buttongroup')){
+                c.items.each(function(item){
+                     this.addComponentToMenu(m, item);
+                }, this);
+            }
+        }
+    },
+
+    clearMenu : function(){
+        var m = this.moreMenu;
+        if(m && m.items){
+            this.moreMenu.items.each(function(item){
+                delete item.menu;
+            });
+        }
+    },
+
+    // private
+    beforeMoreShow : function(m){
+        var h = this.container.items.items,
+            len = h.length,
+            c,
+            prev,
+            needsSep = function(group, item){
+                return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator);
+            };
+
+        this.clearMenu();
+        m.removeAll();
+        for(var i = 0; i < len; i++){
+            c = h[i];
+            if(c.xtbHidden){
+                if(prev && (needsSep(c, prev) || needsSep(prev, c))){
+                    m.add('-');
+                }
+                this.addComponentToMenu(m, c);
+                prev = c;
+            }
+        }
+        // put something so the menu isn't empty
+        // if no compatible items found
+        if(m.items.length < 1){
+            m.add(this.noItemsMenuText);
+        }
+    },
+
+    initMore : function(){
+        if(!this.more){
+            this.moreMenu = new Ext.menu.Menu({
+                listeners: {
+                    beforeshow: this.beforeMoreShow,
+                    scope: this
+                }
+            });
+            this.more = new Ext.Button({
+                iconCls: 'x-toolbar-more-icon',
+                cls: 'x-toolbar-more',
+                menu: this.moreMenu
+            });
+            var td = this.insertCell(this.more, this.extrasTr, 100);
+            this.more.render(td);
+        }
+    },
+
+    destroy : function(){
+        Ext.destroy(this.more, this.moreMenu);
+        Ext.layout.ToolbarLayout.superclass.destroy.call(this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
+
+/**
+ * @class Ext.Toolbar
+ * @extends Ext.Container
+ * <p>Basic Toolbar class. Although the <tt>{@link Ext.Container#defaultType defaultType}</tt> for Toolbar
+ * is <tt>{@link Ext.Button button}</tt>, Toolbar elements (child items for the Toolbar container) may
+ * be virtually any type of Component. Toolbar elements can be created explicitly via their constructors,
+ * or implicitly via their xtypes, and can be <tt>{@link #add}</tt>ed dynamically.</p>
+ * <p>Some items have shortcut strings for creation:</p>
+ * <pre>
+<u>Shortcut</u>  <u>xtype</u>          <u>Class</u>                  <u>Description</u>
+'->'      'tbfill'       {@link Ext.Toolbar.Fill}       begin using the right-justified button container
+'-'       'tbseparator'  {@link Ext.Toolbar.Separator}  add a vertical separator bar between toolbar items
+' '       'tbspacer'     {@link Ext.Toolbar.Spacer}     add horiztonal space between elements
+ * </pre>
+ *
+ * Example usage of various elements:
+ * <pre><code>
+var tb = new Ext.Toolbar({
+    renderTo: document.body,
+    width: 600,
+    height: 100,
+    items: [
+        {
+            // xtype: 'button', // default for Toolbars, same as 'tbbutton'
+            text: 'Button'
+        },
+        {
+            xtype: 'splitbutton', // same as 'tbsplitbutton'
+            text: 'Split Button'
+        },
+        // begin using the right-justified button container
+        '->', // same as {xtype: 'tbfill'}, // Ext.Toolbar.Fill
+        {
+            xtype: 'textfield',
+            name: 'field1',
+            emptyText: 'enter search term'
+        },
+        // add a vertical separator bar between toolbar items
+        '-', // same as {xtype: 'tbseparator'} to create Ext.Toolbar.Separator
+        'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.Toolbar.TextItem
+        {xtype: 'tbspacer'},// same as ' ' to create Ext.Toolbar.Spacer
+        'text 2',
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'text 3'
+    ]
+});
+ * </code></pre>
+ * Example adding a ComboBox within a menu of a button:
+ * <pre><code>
+// ComboBox creation
+var combo = new Ext.form.ComboBox({
+    store: new Ext.data.ArrayStore({
+        autoDestroy: true,
+        fields: ['initials', 'fullname'],
+        data : [
+            ['FF', 'Fred Flintstone'],
+            ['BR', 'Barney Rubble']
+        ]
+    }),
+    displayField: 'fullname',
+    typeAhead: true,
+    mode: 'local',
+    forceSelection: true,
+    triggerAction: 'all',
+    emptyText: 'Select a name...',
+    selectOnFocus: true,
+    width: 135,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon' //use iconCls if placing within menu to shift to right side of menu
+});
+
+// put ComboBox in a Menu
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+
+// add a Button with the menu
+tb.add({
+        text:'Button w/ Menu',
+        menu: menu  // assign menu by instance
+    });
+tb.doLayout();
+ * </code></pre>
+ * @constructor
+ * Creates a new Toolbar
+ * @param {Object/Array} config A config object or an array of buttons to <tt>{@link #add}</tt>
+ * @xtype toolbar
+ */
+Ext.Toolbar = function(config){
+    if(Ext.isArray(config)){
+        config = {items: config, layout: 'toolbar'};
+    } else {
+        config = Ext.apply({
+            layout: 'toolbar'
+        }, config);
+        if(config.buttons) {
+            config.items = config.buttons;
+        }
+    }
+    Ext.Toolbar.superclass.constructor.call(this, config);
+};
+
+(function(){
+
+var T = Ext.Toolbar;
+
+Ext.extend(T, Ext.Container, {
+
+    defaultType: 'button',
+
+    trackMenus : true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+    toolbarCls: 'x-toolbar',
+
+    initComponent : function(){
+        T.superclass.initComponent.call(this);
+
+        /**
+         * @event overflowchange
+         * Fires after the overflow state has changed.
+         * @param {Object} c The Container
+         * @param {Boolean} lastOverflow overflow state
+         */
+        this.addEvents('overflowchange');
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            if(!this.autoCreate){
+                this.autoCreate = {
+                    cls: this.toolbarCls + ' x-small-editor'
+                };
+            }
+            this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position);
+        }
+    },
+
+    /**
+     * Adds element(s) to the toolbar -- this function takes a variable number of
+     * arguments of mixed type and adds them to the toolbar.
+     * @param {Mixed} arg1 The following types of arguments are all valid:<br />
+     * <ul>
+     * <li>{@link Ext.Button} config: A valid button config object (equivalent to {@link #addButton})</li>
+     * <li>HtmlElement: Any standard HTML element (equivalent to {@link #addElement})</li>
+     * <li>Field: Any form field (equivalent to {@link #addField})</li>
+     * <li>Item: Any subclass of {@link Ext.Toolbar.Item} (equivalent to {@link #addItem})</li>
+     * <li>String: Any generic string (gets wrapped in a {@link Ext.Toolbar.TextItem}, equivalent to {@link #addText}).
+     * Note that there are a few special strings that are treated differently as explained next.</li>
+     * <li>'-': Creates a separator element (equivalent to {@link #addSeparator})</li>
+     * <li>' ': Creates a spacer element (equivalent to {@link #addSpacer})</li>
+     * <li>'->': Creates a fill element (equivalent to {@link #addFill})</li>
+     * </ul>
+     * @param {Mixed} arg2
+     * @param {Mixed} etc.
+     * @method add
+     */
+
+    // private
+    lookupComponent : function(c){
+        if(Ext.isString(c)){
+            if(c == '-'){
+                c = new T.Separator();
+            }else if(c == ' '){
+                c = new T.Spacer();
+            }else if(c == '->'){
+                c = new T.Fill();
+            }else{
+                c = new T.TextItem(c);
+            }
+            this.applyDefaults(c);
+        }else{
+            if(c.isFormField || c.render){ // some kind of form field, some kind of Toolbar.Item
+                c = this.constructItem(c);
+            }else if(c.tag){ // DomHelper spec
+                c = new T.Item({autoEl: c});
+            }else if(c.tagName){ // element
+                c = new T.Item({el:c});
+            }else if(Ext.isObject(c)){ // must be button config?
+                c = c.xtype ? this.constructItem(c) : this.constructButton(c);
+            }
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.Toolbar.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(c.events){
+                Ext.applyIf(c.initialConfig, d);
+                Ext.apply(c, d);
+            }else{
+                Ext.applyIf(c, d);
+            }
+        }
+        return c;
+    },
+
+    // private
+    constructItem : function(item, type){
+        return Ext.create(item, type || this.defaultType);
+    },
+
+    /**
+     * Adds a separator
+     * @return {Ext.Toolbar.Item} The separator {@link Ext.Toolbar.Item item}
+     */
+    addSeparator : function(){
+        return this.add(new T.Separator());
+    },
+
+    /**
+     * Adds a spacer element
+     * @return {Ext.Toolbar.Spacer} The spacer item
+     */
+    addSpacer : function(){
+        return this.add(new T.Spacer());
+    },
+
+    /**
+     * Forces subsequent additions into the float:right toolbar
+     */
+    addFill : function(){
+        this.add(new T.Fill());
+    },
+
+    /**
+     * Adds any standard HTML element to the toolbar
+     * @param {Mixed} el The element or id of the element to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addElement : function(el){
+        return this.addItem(new T.Item({el:el}));
+    },
+
+    /**
+     * Adds any Toolbar.Item or subclass
+     * @param {Ext.Toolbar.Item} item
+     * @return {Ext.Toolbar.Item} The item
+     */
+    addItem : function(item){
+        return Ext.Toolbar.superclass.add.apply(this, arguments);
+    },
+
+    /**
+     * Adds a button (or buttons). See {@link Ext.Button} for more info on the config.
+     * @param {Object/Array} config A button config or array of configs
+     * @return {Ext.Button/Array}
+     */
+    addButton : function(config){
+        if(Ext.isArray(config)){
+            var buttons = [];
+            for(var i = 0, len = config.length; i < len; i++) {
+                buttons.push(this.addButton(config[i]));
+            }
+            return buttons;
+        }
+        return this.add(this.constructButton(config));
+    },
+
+    /**
+     * Adds text to the toolbar
+     * @param {String} text The text to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addText : function(text){
+        return this.addItem(new T.TextItem(text));
+    },
+
+    /**
+     * Adds a new element to the toolbar from the passed {@link Ext.DomHelper} config
+     * @param {Object} config
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addDom : function(config){
+        return this.add(new T.Item({autoEl: config}));
+    },
+
+    /**
+     * Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
+     * been rendered yet. For a field that has already been rendered, use {@link #addElement}.
+     * @param {Ext.form.Field} field
+     * @return {Ext.Toolbar.Item}
+     */
+    addField : function(field){
+        return this.add(field);
+    },
+
+    /**
+     * Inserts any {@link Ext.Toolbar.Item}/{@link Ext.Button} at the specified index.
+     * @param {Number} index The index where the item is to be inserted
+     * @param {Object/Ext.Toolbar.Item/Ext.Button/Array} item The button, or button config object to be
+     * inserted, or an array of buttons/configs.
+     * @return {Ext.Button/Item}
+     */
+    insertButton : function(index, item){
+        if(Ext.isArray(item)){
+            var buttons = [];
+            for(var i = 0, len = item.length; i < len; i++) {
+               buttons.push(this.insertButton(index + i, item[i]));
+            }
+            return buttons;
+        }
+        return Ext.Toolbar.superclass.insert.call(this, index, item);
+    },
+
+    // private
+    initMenuTracking : function(item){
+        if(this.trackMenus && item.menu){
+            this.mon(item, {
+                'menutriggerover' : this.onButtonTriggerOver,
+                'menushow' : this.onButtonMenuShow,
+                'menuhide' : this.onButtonMenuHide,
+                scope: this
+            });
+        }
+    },
+
+    // private
+    constructButton : function(item){
+        var b = item.events ? item : this.constructItem(item, item.split ? 'splitbutton' : this.defaultType);
+        this.initMenuTracking(b);
+        return b;
+    },
+
+    // private
+    onDisable : function(){
+        this.items.each(function(item){
+             if(item.disable){
+                 item.disable();
+             }
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.items.each(function(item){
+             if(item.enable){
+                 item.enable();
+             }
+        });
+    },
+
+    // private
+    onButtonTriggerOver : function(btn){
+        if(this.activeMenuBtn && this.activeMenuBtn != btn){
+            this.activeMenuBtn.hideMenu();
+            btn.showMenu();
+            this.activeMenuBtn = btn;
+        }
+    },
+
+    // private
+    onButtonMenuShow : function(btn){
+        this.activeMenuBtn = btn;
+    },
+
+    // private
+    onButtonMenuHide : function(btn){
+        delete this.activeMenuBtn;
+    }
+});
+Ext.reg('toolbar', Ext.Toolbar);
+
+/**
+ * @class Ext.Toolbar.Item
+ * @extends Ext.BoxComponent
+ * The base class that other non-interacting Toolbar Item classes should extend in order to
+ * get some basic common toolbar item functionality.
+ * @constructor
+ * Creates a new Item
+ * @param {HTMLElement} el
+ * @xtype tbitem
+ */
+T.Item = Ext.extend(Ext.BoxComponent, {
+    hideParent: true, //  Hiding a Toolbar.Item hides its containing TD
+    enable:Ext.emptyFn,
+    disable:Ext.emptyFn,
+    focus:Ext.emptyFn
+    /**
+     * @cfg {String} overflowText Text to be used for the menu if the item is overflowed.
+     */
+});
+Ext.reg('tbitem', T.Item);
+
+/**
+ * @class Ext.Toolbar.Separator
+ * @extends Ext.Toolbar.Item
+ * A simple class that adds a vertical separator bar between toolbar items
+ * (css class:<tt>'xtb-sep'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbseparator'}, // or '-'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Separator
+ * @xtype tbseparator
+ */
+T.Separator = Ext.extend(T.Item, {
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position);
+    }
+});
+Ext.reg('tbseparator', T.Separator);
+
+/**
+ * @class Ext.Toolbar.Spacer
+ * @extends Ext.Toolbar.Item
+ * A simple element that adds extra horizontal space between items in a toolbar.
+ * By default a 2px wide space is added via css specification:<pre><code>
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+ * </code></pre>
+ * <p>Example usage:</p>
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbspacer'}, // or ' '
+        'Item 2',
+        // space width is also configurable via javascript
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'Item 3'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Spacer
+ * @xtype tbspacer
+ */
+T.Spacer = Ext.extend(T.Item, {
+    /**
+     * @cfg {Number} width
+     * The width of the spacer in pixels (defaults to 2px via css style <tt>.x-toolbar .xtb-spacer</tt>).
+     */
+
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position);
+    }
+});
+Ext.reg('tbspacer', T.Spacer);
+
+/**
+ * @class Ext.Toolbar.Fill
+ * @extends Ext.Toolbar.Spacer
+ * A non-rendering placeholder item which instructs the Toolbar's Layout to begin using
+ * the right-justified button container.
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbfill'}, // or '->'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Fill
+ * @xtype tbfill
+ */
+T.Fill = Ext.extend(T.Item, {
+    // private
+    render : Ext.emptyFn,
+    isFill : true
+});
+Ext.reg('tbfill', T.Fill);
+
+/**
+ * @class Ext.Toolbar.TextItem
+ * @extends Ext.Toolbar.Item
+ * A simple class that renders text directly into a toolbar
+ * (with css class:<tt>'xtb-text'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new TextItem
+ * @param {String/Object} text A text string, or a config object containing a <tt>text</tt> property
+ * @xtype tbtext
+ */
+T.TextItem = Ext.extend(T.Item, {
+    constructor: function(config){
+        if (Ext.isString(config)) {
+            config = { autoEl: {cls: 'xtb-text', html: config }};
+        } else {
+            config.autoEl = {cls: 'xtb-text', html: config.text || ''};
+        }
+        T.TextItem.superclass.constructor.call(this, config);
+    },
+    /**
+     * Updates this item's text, setting the text to be used as innerHTML.
+     * @param {String} t The text to display (html accepted).
+     */
+    setText : function(t) {
+        if (this.rendered) {
+            this.el.dom.innerHTML = t;
+        } else {
+            this.autoEl.html = t;
+        }
+    }
+});
+Ext.reg('tbtext', T.TextItem);
+
+// backwards compat
+T.Button = Ext.extend(Ext.Button, {});
+T.SplitButton = Ext.extend(Ext.SplitButton, {});
+Ext.reg('tbbutton', T.Button);
+Ext.reg('tbsplit', T.SplitButton);
+
+})();
+/**
+ * @class Ext.ButtonGroup
+ * @extends Ext.Panel
+ * Container for a group of buttons. Example usage:
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Panel with Button Group',
+    width: 300,
+    height:200,
+    renderTo: document.body,
+    html: 'whatever',
+    tbar: [{
+        xtype: 'buttongroup',
+        {@link #columns}: 3,
+        title: 'Clipboard',
+        items: [{
+            text: 'Paste',
+            scale: 'large',
+            rowspan: 3, iconCls: 'add',
+            iconAlign: 'top',
+            cls: 'x-btn-as-arrow'
+        },{
+            xtype:'splitbutton',
+            text: 'Menu Button',
+            scale: 'large',
+            rowspan: 3,
+            iconCls: 'add',
+            iconAlign: 'top',
+            arrowAlign:'bottom',
+            menu: [{text: 'Menu Item 1'}]
+        },{
+            xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+        },{
+            text: 'Copy', iconCls: 'add16'
+        },{
+            text: 'Format', iconCls: 'add16'
+        }]
+    }]
+});
+ * </code></pre>
+ * @xtype buttongroup
+ */
+Ext.ButtonGroup = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} columns The <tt>columns</tt> configuration property passed to the
+     * {@link #layout configured layout manager}. See {@link Ext.layout.TableLayout#columns}.
+     */
+    /**
+     * @cfg {String} baseCls  Defaults to <tt>'x-btn-group'</tt>.  See {@link Ext.Panel#baseCls}.
+     */
+    baseCls: 'x-btn-group',
+    /**
+     * @cfg {String} layout  Defaults to <tt>'table'</tt>.  See {@link Ext.Container#layout}.
+     */
+    layout:'table',
+    defaultType: 'button',
+    /**
+     * @cfg {Boolean} frame  Defaults to <tt>true</tt>.  See {@link Ext.Panel#frame}.
+     */
+    frame: true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+
+    initComponent : function(){
+        this.layoutConfig = this.layoutConfig || {};
+        Ext.applyIf(this.layoutConfig, {
+            columns : this.columns
+        });
+        if(!this.title){
+            this.addClass('x-btn-group-notitle');
+        }
+        this.on('afterlayout', this.onAfterLayout, this);
+        Ext.ButtonGroup.superclass.initComponent.call(this);
+    },
+
+    applyDefaults : function(c){
+        c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c);
+        var d = this.internalDefaults;
+        if(c.events){
+            Ext.applyIf(c.initialConfig, d);
+            Ext.apply(c, d);
+        }else{
+            Ext.applyIf(c, d);
+        }
+        return c;
+    },
+
+    onAfterLayout : function(){
+        var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth;
+        this.body.setWidth(bodyWidth);
+        this.el.setWidth(bodyWidth + this.getFrameWidth());
+    }
+    /**
+     * @cfg {Array} tools  @hide
+     */
+});
+
+Ext.reg('buttongroup', Ext.ButtonGroup);
+/**
+ * @class Ext.PagingToolbar
+ * @extends Ext.Toolbar
+ * <p>As the amount of records increases, the time required for the browser to render
+ * them increases. Paging is used to reduce the amount of data exchanged with the client.
+ * Note: if there are more records/rows than can be viewed in the available screen area, vertical
+ * scrollbars will be added.</p>
+ * <p>Paging is typically handled on the server side (see exception below). The client sends
+ * parameters to the server side, which the server needs to interpret and then respond with the
+ * approprate data.</p>
+ * <p><b>Ext.PagingToolbar</b> is a specialized toolbar that is bound to a {@link Ext.data.Store}
+ * and provides automatic paging control. This Component {@link Ext.data.Store#load load}s blocks
+ * of data into the <tt>{@link #store}</tt> by passing {@link Ext.data.Store#paramNames paramNames} used for
+ * paging criteria.</p>
+ * <p>PagingToolbar is typically used as one of the Grid's toolbars:</p>
+ * <pre><code>
+Ext.QuickTips.init(); // to display button quicktips
+
+var myStore = new Ext.data.Store({
+    ...
+});
+
+var myPageSize = 25;  // server script should only send back 25 items
+
+var grid = new Ext.grid.GridPanel({
+    ...
+    store: myStore,
+    bbar: new Ext.PagingToolbar({
+        {@link #store}: myStore,       // grid and PagingToolbar using same store
+        {@link #displayInfo}: true,
+        {@link #pageSize}: myPageSize,
+        {@link #prependButtons}: true,
+        items: [
+            'text 1'
+        ]
+    })
+});
+ * </code></pre>
+ *
+ * <p>To use paging, pass the paging requirements to the server when the store is first loaded.</p>
+ * <pre><code>
+store.load({
+    params: {
+        start: 0,          // specify params for the first page load if using paging
+        limit: myPageSize,
+        foo:   'bar'
+    }
+});
+ * </code></pre>
+ * <p><u>Paging with Local Data</u></p>
+ * <p>Paging can also be accomplished with local data using extensions:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><a href="http://extjs.com/forum/showthread.php?t=57386">Ext.ux.data.PagingStore</a></li>
+ * <li>Paging Memory Proxy (examples/ux/PagingMemoryProxy.js)</li>
+ * </ul></div>
+ * @constructor
+ * Create a new PagingToolbar
+ * @param {Object} config The config object
+ * @xtype paging
+ */
+(function() {
+
+var T = Ext.Toolbar;
+
+Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} the paging toolbar should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} displayInfo
+     * <tt>true</tt> to display the displayMsg (defaults to <tt>false</tt>)
+     */
+    /**
+     * @cfg {Number} pageSize
+     * The number of records to display per page (defaults to <tt>20</tt>)
+     */
+    pageSize : 20,
+    /**
+     * @cfg {Boolean} prependButtons
+     * <tt>true</tt> to insert any configured <tt>items</tt> <i>before</i> the paging buttons.
+     * Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} displayMsg
+     * The paging status message to display (defaults to <tt>'Displaying {0} - {1} of {2}'</tt>).
+     * Note that this string is formatted using the braced numbers <tt>{0}-{2}</tt> as tokens
+     * that are replaced by the values for start, end and total respectively. These tokens should
+     * be preserved when overriding this string if showing those values is desired.
+     */
+    displayMsg : 'Displaying {0} - {1} of {2}',
+    /**
+     * @cfg {String} emptyMsg
+     * The message to display when no records are found (defaults to 'No data to display')
+     */
+    emptyMsg : 'No data to display',
+    /**
+     * @cfg {String} beforePageText
+     * The text displayed before the input item (defaults to <tt>'Page'</tt>).
+     */
+    beforePageText : 'Page',
+    /**
+     * @cfg {String} afterPageText
+     * Customizable piece of the default paging text (defaults to <tt>'of {0}'</tt>). Note that
+     * this string is formatted using <tt>{0}</tt> as a token that is replaced by the number of
+     * total pages. This token should be preserved when overriding this string if showing the
+     * total page count is desired.
+     */
+    afterPageText : 'of {0}',
+    /**
+     * @cfg {String} firstText
+     * The quicktip text displayed for the first page button (defaults to <tt>'First Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    firstText : 'First Page',
+    /**
+     * @cfg {String} prevText
+     * The quicktip text displayed for the previous page button (defaults to <tt>'Previous Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    prevText : 'Previous Page',
+    /**
+     * @cfg {String} nextText
+     * The quicktip text displayed for the next page button (defaults to <tt>'Next Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    nextText : 'Next Page',
+    /**
+     * @cfg {String} lastText
+     * The quicktip text displayed for the last page button (defaults to <tt>'Last Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    lastText : 'Last Page',
+    /**
+     * @cfg {String} refreshText
+     * The quicktip text displayed for the Refresh button (defaults to <tt>'Refresh'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    refreshText : 'Refresh',
+
+    /**
+     * @deprecated
+     * <b>The defaults for these should be set in the data store.</b>
+     * Object mapping of parameter names used for load calls, initially set to:
+     * <pre>{start: 'start', limit: 'limit'}</pre>
+     */
+
+    /**
+     * The number of records to display per page.  See also <tt>{@link #cursor}</tt>.
+     * @type Number
+     * @property pageSize
+     */
+
+    /**
+     * Indicator for the record position.  This property might be used to get the active page
+     * number for example:<pre><code>
+     * // t is reference to the paging toolbar instance
+     * var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
+     * </code></pre>
+     * @type Number
+     * @property cursor
+     */
+
+    initComponent : function(){
+        var pagingItems = [this.first = new T.Button({
+            tooltip: this.firstText,
+            overflowText: this.firstText,
+            iconCls: 'x-tbar-page-first',
+            disabled: true,
+            handler: this.moveFirst,
+            scope: this
+        }), this.prev = new T.Button({
+            tooltip: this.prevText,
+            overflowText: this.prevText,
+            iconCls: 'x-tbar-page-prev',
+            disabled: true,
+            handler: this.movePrevious,
+            scope: this
+        }), '-', this.beforePageText,
+        this.inputItem = new Ext.form.NumberField({
+            cls: 'x-tbar-page-number',
+            allowDecimals: false,
+            allowNegative: false,
+            enableKeyEvents: true,
+            selectOnFocus: true,
+            listeners: {
+                scope: this,
+                keydown: this.onPagingKeyDown,
+                blur: this.onPagingBlur
+            }
+        }), this.afterTextItem = new T.TextItem({
+            text: String.format(this.afterPageText, 1)
+        }), '-', this.next = new T.Button({
+            tooltip: this.nextText,
+            overflowText: this.nextText,
+            iconCls: 'x-tbar-page-next',
+            disabled: true,
+            handler: this.moveNext,
+            scope: this
+        }), this.last = new T.Button({
+            tooltip: this.lastText,
+            overflowText: this.lastText,
+            iconCls: 'x-tbar-page-last',
+            disabled: true,
+            handler: this.moveLast,
+            scope: this
+        }), '-', this.refresh = new T.Button({
+            tooltip: this.refreshText,
+            overflowText: this.refreshText,
+            iconCls: 'x-tbar-loading',
+            handler: this.refresh,
+            scope: this
+        })];
+
+
+        var userItems = this.items || this.buttons || [];
+        if (this.prependButtons) {
+            this.items = userItems.concat(pagingItems);
+        }else{
+            this.items = pagingItems.concat(userItems);
+        }
+        delete this.buttons;
+        if(this.displayInfo){
+            this.items.push('->');
+            this.items.push(this.displayItem = new T.TextItem({}));
+        }
+        Ext.PagingToolbar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the active page has been changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} pageData An object that has these properties:<ul>
+             * <li><code>total</code> : Number <div class="sub-desc">The total number of records in the dataset as
+             * returned by the server</div></li>
+             * <li><code>activePage</code> : Number <div class="sub-desc">The current page number</div></li>
+             * <li><code>pages</code> : Number <div class="sub-desc">The total number of pages (calculated from
+             * the total number of records in the dataset as returned by the server and the current {@link #pageSize})</div></li>
+             * </ul>
+             */
+            'change',
+            /**
+             * @event beforechange
+             * Fires just before the active page is changed.
+             * Return false to prevent the active page from being changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} params An object hash of the parameters which the PagingToolbar will send when
+             * loading the required page. This will contain:<ul>
+             * <li><code>start</code> : Number <div class="sub-desc">The starting row number for the next page of records to
+             * be retrieved from the server</div></li>
+             * <li><code>limit</code> : Number <div class="sub-desc">The number of records to be retrieved from the server</div></li>
+             * </ul>
+             * <p>(note: the names of the <b>start</b> and <b>limit</b> properties are determined
+             * by the store's {@link Ext.data.Store#paramNames paramNames} property.)</p>
+             * <p>Parameters may be added as required in the event handler.</p>
+             */
+            'beforechange'
+        );
+        this.on('afterlayout', this.onFirstLayout, this, {single: true});
+        this.cursor = 0;
+        this.bindStore(this.store);
+    },
+
+    // private
+    onFirstLayout : function(){
+        if(this.dsLoaded){
+            this.onLoad.apply(this, this.dsLoaded);
+        }
+    },
+
+    // private
+    updateInfo : function(){
+        if(this.displayItem){
+            var count = this.store.getCount();
+            var msg = count == 0 ?
+                this.emptyMsg :
+                String.format(
+                    this.displayMsg,
+                    this.cursor+1, this.cursor+count, this.store.getTotalCount()
+                );
+            this.displayItem.setText(msg);
+        }
+    },
+
+    // private
+    onLoad : function(store, r, o){
+        if(!this.rendered){
+            this.dsLoaded = [store, r, o];
+            return;
+        }
+        var p = this.getParams();
+        this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0;
+        var d = this.getPageData(), ap = d.activePage, ps = d.pages;
+
+        this.afterTextItem.setText(String.format(this.afterPageText, d.pages));
+        this.inputItem.setValue(ap);
+        this.first.setDisabled(ap == 1);
+        this.prev.setDisabled(ap == 1);
+        this.next.setDisabled(ap == ps);
+        this.last.setDisabled(ap == ps);
+        this.refresh.enable();
+        this.updateInfo();
+        this.fireEvent('change', this, d);
+    },
+
+    // private
+    getPageData : function(){
+        var total = this.store.getTotalCount();
+        return {
+            total : total,
+            activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize),
+            pages :  total < this.pageSize ? 1 : Math.ceil(total/this.pageSize)
+        };
+    },
+
+    /**
+     * Change the active page
+     * @param {Integer} page The page to display
+     */
+    changePage : function(page){
+        this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount()));
+    },
+
+    // private
+    onLoadError : function(){
+        if(!this.rendered){
+            return;
+        }
+        this.refresh.enable();
+    },
+
+    // private
+    readPage : function(d){
+        var v = this.inputItem.getValue(), pageNum;
+        if (!v || isNaN(pageNum = parseInt(v, 10))) {
+            this.inputItem.setValue(d.activePage);
+            return false;
+        }
+        return pageNum;
+    },
+
+    onPagingFocus : function(){
+        this.inputItem.select();
+    },
+
+    //private
+    onPagingBlur : function(e){
+        this.inputItem.setValue(this.getPageData().activePage);
+    },
+
+    // private
+    onPagingKeyDown : function(field, e){
+        var k = e.getKey(), d = this.getPageData(), pageNum;
+        if (k == e.RETURN) {
+            e.stopEvent();
+            pageNum = this.readPage(d);
+            if(pageNum !== false){
+                pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1;
+                this.doLoad(pageNum * this.pageSize);
+            }
+        }else if (k == e.HOME || k == e.END){
+            e.stopEvent();
+            pageNum = k == e.HOME ? 1 : d.pages;
+            field.setValue(pageNum);
+        }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){
+            e.stopEvent();
+            if((pageNum = this.readPage(d))){
+                var increment = e.shiftKey ? 10 : 1;
+                if(k == e.DOWN || k == e.PAGEDOWN){
+                    increment *= -1;
+                }
+                pageNum += increment;
+                if(pageNum >= 1 & pageNum <= d.pages){
+                    field.setValue(pageNum);
+                }
+            }
+        }
+    },
+
+    // private
+    getParams : function(){
+        //retain backwards compat, allow params on the toolbar itself, if they exist.
+        return this.paramNames || this.store.paramNames;
+    },
+
+    // private
+    beforeLoad : function(){
+        if(this.rendered && this.refresh){
+            this.refresh.disable();
+        }
+    },
+
+    // private
+    doLoad : function(start){
+        var o = {}, pn = this.getParams();
+        o[pn.start] = start;
+        o[pn.limit] = this.pageSize;
+        if(this.fireEvent('beforechange', this, o) !== false){
+            this.store.load({params:o});
+        }
+    },
+
+    /**
+     * Move to the first page, has the same effect as clicking the 'first' button.
+     */
+    moveFirst : function(){
+        this.doLoad(0);
+    },
+
+    /**
+     * Move to the previous page, has the same effect as clicking the 'previous' button.
+     */
+    movePrevious : function(){
+        this.doLoad(Math.max(0, this.cursor-this.pageSize));
+    },
+
+    /**
+     * Move to the next page, has the same effect as clicking the 'next' button.
+     */
+    moveNext : function(){
+        this.doLoad(this.cursor+this.pageSize);
+    },
+
+    /**
+     * Move to the last page, has the same effect as clicking the 'last' button.
+     */
+    moveLast : function(){
+        var total = this.store.getTotalCount(),
+            extra = total % this.pageSize;
+
+        this.doLoad(extra ? (total - extra) : total - this.pageSize);
+    },
+
+    /**
+     * Refresh the current page, has the same effect as clicking the 'refresh' button.
+     */
+    refresh : function(){
+        this.doLoad(this.cursor);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store}
+     * @param {Store} store The store to bind to this toolbar
+     * @param {Boolean} initial (Optional) true to not remove listeners
+     */
+    bindStore : function(store, initial){
+        var doLoad;
+        if(!initial && this.store){
+            this.store.un('beforeload', this.beforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoadError, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.beforeLoad,
+                load: this.onLoad,
+                exception: this.onLoadError
+            });
+            doLoad = store.getCount() > 0;
+        }
+        this.store = store;
+        if(doLoad){
+            this.onLoad(store, null, {});
+        }
+    },
+
+    /**
+     * Unbinds the paging toolbar from the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to unbind
+     */
+    unbind : function(store){
+        this.bindStore(null);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to bind
+     */
+    bind : function(store){
+        this.bindStore(store);
+    },
+
+    // private
+    onDestroy : function(){
+        this.bindStore(null);
+        Ext.PagingToolbar.superclass.onDestroy.call(this);
+    }
+});
+
+})();
+Ext.reg('paging', Ext.PagingToolbar);/**
+ * @class Ext.History
+ * @extends Ext.util.Observable
+ * History management component that allows you to register arbitrary tokens that signify application
+ * history state on navigation actions.  You can then handle the history {@link #change} event in order
+ * to reset your application UI to the appropriate state when the user navigates forward or backward through
+ * the browser history stack.
+ * @singleton
+ */
+Ext.History = (function () {
+    var iframe, hiddenField;
+    var ready = false;
+    var currentToken;
+
+    function getHash() {
+        var href = top.location.href, i = href.indexOf("#");
+        return i >= 0 ? href.substr(i + 1) : null;
+    }
+
+    function doSave() {
+        hiddenField.value = currentToken;
+    }
+
+    function handleStateChange(token) {
+        currentToken = token;
+        Ext.History.fireEvent('change', token);
+    }
+
+    function updateIFrame (token) {
+        var html = ['<html><body><div id="state">',token,'</div></body></html>'].join('');
+        try {
+            var doc = iframe.contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    function checkIFrame() {
+        if (!iframe.contentWindow || !iframe.contentWindow.document) {
+            setTimeout(checkIFrame, 10);
+            return;
+        }
+
+        var doc = iframe.contentWindow.document;
+        var elem = doc.getElementById("state");
+        var token = elem ? elem.innerText : null;
+
+        var hash = getHash();
+
+        setInterval(function () {
+
+            doc = iframe.contentWindow.document;
+            elem = doc.getElementById("state");
+
+            var newtoken = elem ? elem.innerText : null;
+
+            var newHash = getHash();
+
+            if (newtoken !== token) {
+                token = newtoken;
+                handleStateChange(token);
+                top.location.hash = token;
+                hash = token;
+                doSave();
+            } else if (newHash !== hash) {
+                hash = newHash;
+                updateIFrame(newHash);
+            }
+
+        }, 50);
+
+        ready = true;
+
+        Ext.History.fireEvent('ready', Ext.History);
+    }
+
+    function startUp() {
+        currentToken = hiddenField.value ? hiddenField.value : getHash();
+
+        if (Ext.isIE) {
+            checkIFrame();
+        } else {
+            var hash = getHash();
+            setInterval(function () {
+                var newHash = getHash();
+                if (newHash !== hash) {
+                    hash = newHash;
+                    handleStateChange(hash);
+                    doSave();
+                }
+            }, 50);
+            ready = true;
+            Ext.History.fireEvent('ready', Ext.History);
+        }
+    }
+
+    return {
+        /**
+         * The id of the hidden field required for storing the current history token.
+         * @type String
+         * @property
+         */
+        fieldId: 'x-history-field',
+        /**
+         * The id of the iframe required by IE to manage the history stack.
+         * @type String
+         * @property
+         */
+        iframeId: 'x-history-frame',
+        
+        events:{},
+
+        /**
+         * Initialize the global History instance.
+         * @param {Boolean} onReady (optional) A callback function that will be called once the history
+         * component is fully initialized.
+         * @param {Object} scope (optional) The callback scope
+         */
+        init: function (onReady, scope) {
+            if(ready) {
+                Ext.callback(onReady, scope, [this]);
+                return;
+            }
+            if(!Ext.isReady){
+                Ext.onReady(function(){
+                    Ext.History.init(onReady, scope);
+                });
+                return;
+            }
+            hiddenField = Ext.getDom(Ext.History.fieldId);
+            if (Ext.isIE) {
+                iframe = Ext.getDom(Ext.History.iframeId);
+            }
+            this.addEvents('ready', 'change');
+            if(onReady){
+                this.on('ready', onReady, scope, {single:true});
+            }
+            startUp();
+        },
+
+        /**
+         * Add a new token to the history stack. This can be any arbitrary value, although it would
+         * commonly be the concatenation of a component id and another id marking the specifc history
+         * state of that component.  Example usage:
+         * <pre><code>
+// Handle tab changes on a TabPanel
+tabPanel.on('tabchange', function(tabPanel, tab){
+    Ext.History.add(tabPanel.id + ':' + tab.id);
+});
+</code></pre>
+         * @param {String} token The value that defines a particular application-specific history state
+         * @param {Boolean} preventDuplicates When true, if the passed token matches the current token
+         * it will not save a new history step. Set to false if the same state can be saved more than once
+         * at the same history stack location (defaults to true).
+         */
+        add: function (token, preventDup) {
+            if(preventDup !== false){
+                if(this.getToken() == token){
+                    return true;
+                }
+            }
+            if (Ext.isIE) {
+                return updateIFrame(token);
+            } else {
+                top.location.hash = token;
+                return true;
+            }
+        },
+
+        /**
+         * Programmatically steps back one step in browser history (equivalent to the user pressing the Back button).
+         */
+        back: function(){
+            history.go(-1);
+        },
+
+        /**
+         * Programmatically steps forward one step in browser history (equivalent to the user pressing the Forward button).
+         */
+        forward: function(){
+            history.go(1);
+        },
+
+        /**
+         * Retrieves the currently-active history token.
+         * @return {String} The token
+         */
+        getToken: function() {
+            return ready ? currentToken : getHash();
+        }
+    };
+})();
+Ext.apply(Ext.History, new Ext.util.Observable());/**
+ * @class Ext.Tip
+ * @extends Ext.Panel
+ * This is the base class for {@link Ext.QuickTip} and {@link Ext.Tooltip} that provides the basic layout and
+ * positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned
+ * tips that are displayed programmatically, or it can be extended to provide custom tip implementations.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.Tip = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Boolean} closable True to render a close tool button into the tooltip header (defaults to false).
+     */
+    /**
+     * @cfg {Number} width
+     * Width in pixels of the tip (defaults to auto).  Width will be ignored if it exceeds the bounds of
+     * {@link #minWidth} or {@link #maxWidth}.  The maximum supported value is 500.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the tip in pixels (defaults to 40).
+     */
+    minWidth : 40,
+    /**
+     * @cfg {Number} maxWidth The maximum width of the tip in pixels (defaults to 300).  The maximum supported value is 500.
+     */
+    maxWidth : 300,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides").
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} defaultAlign <b>Experimental</b>. The default {@link Ext.Element#alignTo} anchor position value
+     * for this tip relative to its element of origin (defaults to "tl-bl?").
+     */
+    defaultAlign : "tl-bl?",
+    autoRender: true,
+    quickShowInterval : 250,
+
+    // private panel overrides
+    frame:true,
+    hidden:true,
+    baseCls: 'x-tip',
+    floating:{shadow:true,shim:true,useDisplay:true,constrain:false},
+    autoHeight:true,
+
+    closeAction: 'hide',
+
+    // private
+    initComponent : function(){
+        Ext.Tip.superclass.initComponent.call(this);
+        if(this.closable && !this.title){
+            this.elements += ',header';
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Tip.superclass.afterRender.call(this);
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction],
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Shows this tip at the specified XY position.  Example usage:
+     * <pre><code>
+// Show the tip at x:50 and y:100
+tip.showAt([50,100]);
+</code></pre>
+     * @param {Array} xy An array containing the x and y coordinates
+     */
+    showAt : function(xy){
+        Ext.Tip.superclass.show.call(this);
+        if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){
+            this.doAutoWidth();
+        }
+        if(this.constrainPosition){
+            xy = this.el.adjustForConstraints(xy);
+        }
+        this.setPagePosition(xy[0], xy[1]);
+    },
+
+    // protected
+    doAutoWidth : function(){
+        var bw = this.body.getTextWidth();
+        if(this.title){
+            bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
+        }
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");
+        this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
+        
+        // IE7 repaint bug on initial show
+        if(Ext.isIE7 && !this.repainted){
+            this.el.repaint();
+            this.repainted = true;
+        }
+    },
+
+    /**
+     * <b>Experimental</b>. Shows this tip at a position relative to another element using a standard {@link Ext.Element#alignTo}
+     * anchor position value.  Example usage:
+     * <pre><code>
+// Show the tip at the default position ('tl-br?')
+tip.showBy('my-el');
+
+// Show the tip's top-left corner anchored to the element's top-right corner
+tip.showBy('my-el', 'tl-tr');
+</code></pre>
+     * @param {Mixed} el An HTMLElement, Ext.Element or string id of the target element to align to
+     * @param {String} position (optional) A valid {@link Ext.Element#alignTo} anchor position (defaults to 'tl-br?' or
+     * {@link #defaultAlign} if specified).
+     */
+    showBy : function(el, pos){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign));
+    },
+
+    initDraggable : function(){
+        this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+        this.header.addClass('x-tip-draggable');
+    }
+});
+
+// private - custom Tip DD implementation
+Ext.Tip.DD = function(tip, config){
+    Ext.apply(this, config);
+    this.tip = tip;
+    Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id);
+    this.setHandleElId(tip.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(e){
+        this.tip.el.enableShadow(true);
+    }
+});/**
+ * @class Ext.ToolTip
+ * @extends Ext.Tip
+ * A standard tooltip implementation for providing additional information when hovering over a target element.
+ * @constructor
+ * Create a new Tooltip
+ * @param {Object} config The configuration options
+ */
+Ext.ToolTip = Ext.extend(Ext.Tip, {
+    /**
+     * When a Tooltip is configured with the {@link #delegate} option to cause selected child elements of the {@link #target}
+     * Element to each trigger a seperate show event, this property is set to the DOM element which triggered the show.
+     * @type DOMElement
+     * @property triggerElement
+     */
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to monitor for mouseover events to trigger
+     * showing this ToolTip.
+     */
+    /**
+     * @cfg {Boolean} autoHide True to automatically hide the tooltip after the mouse exits the target element
+     * or after the {@link #dismissDelay} has expired if set (defaults to true).  If {@link closable} = true a close
+     * tool button will be rendered into the tooltip header.
+     */
+    /**
+     * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays after the mouse enters the
+     * target element (defaults to 500)
+     */
+    showDelay: 500,
+    /**
+     * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the target element but before the
+     * tooltip actually hides (defaults to 200).  Set to 0 for the tooltip to hide immediately.
+     */
+    hideDelay: 200,
+    /**
+     * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip automatically hides (defaults to 5000).
+     * To disable automatic hiding, set dismissDelay = 0.
+     */
+    dismissDelay: 5000,
+    /**
+     * @cfg {Array} mouseOffset An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
+     */
+    /**
+     * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
+     */
+    trackMouse : false,
+    /**
+     * @cfg {Boolean} anchorToTarget True to anchor the tooltip to the target element, false to
+     * anchor it relative to the mouse coordinates (defaults to true).  When anchorToTarget is
+     * true, use {@link #defaultAlign} to control tooltip alignment to the target element.  When
+     * anchorToTarget is false, use {@link #anchorPosition} instead to control alignment.
+     */
+    anchorToTarget: true,
+    /**
+     * @cfg {Number} anchorOffset A numeric pixel value used to offset the default position of the
+     * anchor arrow (defaults to 0).  When the anchor position is on the top or bottom of the tooltip,
+     * anchorOffset will be used as a horizontal offset.  Likewise, when the anchor position is on the
+     * left or right side, anchorOffset will be used as a vertical offset.
+     */
+    anchorOffset: 0,
+    /**
+     * @cfg {String} delegate <p>Optional. A {@link Ext.DomQuery DomQuery} selector which allows selection of individual elements
+     * within the {@link #target} element to trigger showing and hiding the ToolTip as the mouse moves within the target.</p>
+     * <p>When specified, the child element of the target which caused a show event is placed into the {@link #triggerElement} property
+     * before the ToolTip is shown.</p>
+     * <p>This may be useful when a Component has regular, repeating elements in it, each of which need a Tooltip which contains
+     * information specific to that element. For example:</p><pre><code>
+var myGrid = new Ext.grid.gridPanel(gridConfig);
+myGrid.on('render', function(grid) {
+    var store = grid.getStore();  // Capture the Store.
+    var view = grid.getView();    // Capture the GridView.
+    myGrid.tip = new Ext.ToolTip({
+        target: view.mainBody,    // The overall target element.
+        delegate: '.x-grid3-row', // Each grid row causes its own seperate show and hide.
+        trackMouse: true,         // Moving within the row should not hide the tip.
+        renderTo: document.body,  // Render immediately so that tip.body can be referenced prior to the first show.
+        listeners: {              // Change content dynamically depending on which element triggered the show.
+            beforeshow: function updateTipBody(tip) {
+                var rowIndex = view.findRowIndex(tip.triggerElement);
+                tip.body.dom.innerHTML = "Over Record ID " + store.getAt(rowIndex).id;
+            }
+        }
+    });
+});</code></pre>
+     */
+
+    // private
+    targetCounter: 0,
+
+    constrainPosition: false,
+
+    // private
+    initComponent: function(){
+        Ext.ToolTip.superclass.initComponent.call(this);
+        this.lastActive = new Date();
+        this.initTarget(this.target);
+        this.origAnchor = this.anchor;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ToolTip.superclass.onRender.call(this, ct, position);
+        this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition();
+        this.anchorEl = this.el.createChild({
+            cls: 'x-tip-anchor ' + this.anchorCls
+        });
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ToolTip.superclass.afterRender.call(this);
+        this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1);
+    },
+
+    /**
+     * Binds this ToolTip to the specified element. The tooltip will be displayed when the mouse moves over the element.
+     * @param {Mixed} t The Element, HtmlElement, or ID of an element to bind to
+     */
+    initTarget : function(target){
+        var t;
+        if((t = Ext.get(target))){
+            if(this.target){
+                this.target = Ext.get(this.target);
+                this.target.un('mouseover', this.onTargetOver, this);
+                this.target.un('mouseout', this.onTargetOut, this);
+                this.target.un('mousemove', this.onMouseMove, this);
+            }
+            this.mon(t, {
+                mouseover: this.onTargetOver,
+                mouseout: this.onTargetOut,
+                mousemove: this.onMouseMove,
+                scope: this
+            });
+            this.target = t;
+        }
+        if(this.anchor){
+            this.anchorTarget = this.target;
+        }
+    },
+
+    // private
+    onMouseMove : function(e){
+        var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true;
+        if (t) {
+            this.targetXY = e.getXY();
+            if (t === this.triggerElement) {
+                if(!this.hidden && this.trackMouse){
+                    this.setPagePosition(this.getTargetXY());
+                }
+            } else {
+                this.hide();
+                this.lastActive = new Date(0);
+                this.onTargetOver(e);
+            }
+        } else if (!this.closable && this.isVisible()) {
+            this.hide();
+        }
+    },
+
+    // private
+    getTargetXY : function(){
+        if(this.anchor){
+            this.targetCounter++;
+            var offsets = this.getOffsets();
+            var xy = (this.anchorToTarget && !this.trackMouse) ?
+                this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) :
+                this.targetXY;
+
+            var dw = Ext.lib.Dom.getViewWidth()-5;
+            var dh = Ext.lib.Dom.getViewHeight()-5;
+            var scrollX = (document.documentElement.scrollLeft || document.body.scrollLeft || 0)+5;
+            var scrollY = (document.documentElement.scrollTop || document.body.scrollTop || 0)+5;
+
+            var axy = [xy[0] + offsets[0], xy[1] + offsets[1]];
+            var sz = this.getSize();
+            this.anchorEl.removeClass(this.anchorCls);
+
+            if(this.targetCounter < 2){
+                if(axy[0] < scrollX){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'l-r';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'left';
+                    return this.getTargetXY();
+                }
+                if(axy[0]+sz.width > dw){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'r-l';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'right';
+                    return this.getTargetXY();
+                }
+                if(axy[1] < scrollY){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 't-b';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'top';
+                    return this.getTargetXY();
+                }
+                if(axy[1]+sz.height > dh){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'b-t';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'bottom';
+                    return this.getTargetXY();
+                }
+            }
+
+            this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition();
+            this.anchorEl.addClass(this.anchorCls);
+            this.targetCounter = 0;
+            return axy;
+        }else{
+            var mouseOffset = this.getMouseOffset();
+            return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]];
+        }
+    },
+
+    getMouseOffset : function(){
+        var offset = this.anchor ? [0,0] : [15,18];
+        if(this.mouseOffset){
+            offset[0] += this.mouseOffset[0];
+            offset[1] += this.mouseOffset[1];
+        }
+        return offset;
+    },
+
+    // private
+    getAnchorPosition : function(){
+        if(this.anchor){
+            this.tipAnchor = this.anchor.charAt(0);
+        }else{
+            var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);
+            if(!m){
+               throw "AnchorTip.defaultAlign is invalid";
+            }
+            this.tipAnchor = m[1].charAt(0);
+        }
+
+        switch(this.tipAnchor){
+            case 't': return 'top';
+            case 'b': return 'bottom';
+            case 'r': return 'right';
+        }
+        return 'left';
+    },
+
+    // private
+    getAnchorAlign : function(){
+        switch(this.anchor){
+            case 'top'  : return 'tl-bl';
+            case 'left' : return 'tl-tr';
+            case 'right': return 'tr-tl';
+            default     : return 'bl-tl';
+        }
+    },
+
+    // private
+    getOffsets: function(){
+        var offsets, ap = this.getAnchorPosition().charAt(0);
+        if(this.anchorToTarget && !this.trackMouse){
+            switch(ap){
+                case 't':
+                    offsets = [0, 9];
+                    break;
+                case 'b':
+                    offsets = [0, -13];
+                    break;
+                case 'r':
+                    offsets = [-13, 0];
+                    break;
+                default:
+                    offsets = [9, 0];
+                    break;
+            }
+        }else{
+            switch(ap){
+                case 't':
+                    offsets = [-15-this.anchorOffset, 30];
+                    break;
+                case 'b':
+                    offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight];
+                    break;
+                case 'r':
+                    offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset];
+                    break;
+                default:
+                    offsets = [25, -13-this.anchorOffset];
+                    break;
+            }
+        }
+        var mouseOffset = this.getMouseOffset();
+        offsets[0] += mouseOffset[0];
+        offsets[1] += mouseOffset[1];
+
+        return offsets;
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        var t = e.getTarget(this.delegate);
+        if (t) {
+            this.triggerElement = t;
+            this.clearTimer('hide');
+            this.targetXY = e.getXY();
+            this.delayShow();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // private
+    delayHide : function(){
+        if(!this.hidden && !this.hideTimer){
+            this.hideTimer = this.hide.defer(this.hideDelay, this);
+        }
+    },
+
+    /**
+     * Hides this tooltip if visible.
+     */
+    hide: function(){
+        this.clearTimer('dismiss');
+        this.lastActive = new Date();
+        if(this.anchorEl){
+            this.anchorEl.hide();
+        }
+        Ext.ToolTip.superclass.hide.call(this);
+        delete this.triggerElement;
+    },
+
+    /**
+     * Shows this tooltip at the current event target XY position.
+     */
+    show : function(){
+        if(this.anchor){
+            // pre-show it off screen so that the el will have dimensions
+            // for positioning calcs when getting xy next
+            this.showAt([-1000,-1000]);
+            this.origConstrainPosition = this.constrainPosition;
+            this.constrainPosition = false;
+            this.anchor = this.origAnchor;
+        }
+        this.showAt(this.getTargetXY());
+
+        if(this.anchor){
+            this.syncAnchor();
+            this.anchorEl.show();
+            this.constrainPosition = this.origConstrainPosition;
+        }else{
+            this.anchorEl.hide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        this.lastActive = new Date();
+        this.clearTimers();
+        Ext.ToolTip.superclass.showAt.call(this, xy);
+        if(this.dismissDelay && this.autoHide !== false){
+            this.dismissTimer = this.hide.defer(this.dismissDelay, this);
+        }
+    },
+
+    // private
+    syncAnchor : function(){
+        var anchorPos, targetPos, offset;
+        switch(this.tipAnchor.charAt(0)){
+            case 't':
+                anchorPos = 'b';
+                targetPos = 'tl';
+                offset = [20+this.anchorOffset, 2];
+                break;
+            case 'r':
+                anchorPos = 'l';
+                targetPos = 'tr';
+                offset = [-2, 11+this.anchorOffset];
+                break;
+            case 'b':
+                anchorPos = 't';
+                targetPos = 'bl';
+                offset = [20+this.anchorOffset, -2];
+                break;
+            default:
+                anchorPos = 'r';
+                targetPos = 'tl';
+                offset = [2, 11+this.anchorOffset];
+                break;
+        }
+        this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset);
+    },
+
+    // private
+    setPagePosition : function(x, y){
+        Ext.ToolTip.superclass.setPagePosition.call(this, x, y);
+        if(this.anchor){
+            this.syncAnchor();
+        }
+    },
+
+    // private
+    clearTimer : function(name){
+        name = name + 'Timer';
+        clearTimeout(this[name]);
+        delete this[name];
+    },
+
+    // private
+    clearTimers : function(){
+        this.clearTimer('show');
+        this.clearTimer('dismiss');
+        this.clearTimer('hide');
+    },
+
+    // private
+    onShow : function(){
+        Ext.ToolTip.superclass.onShow.call(this);
+        Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onHide : function(){
+        Ext.ToolTip.superclass.onHide.call(this);
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onDocMouseDown : function(e){
+        if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){
+            this.disable();
+            this.enable.defer(100, this);
+        }
+    },
+
+    // private
+    onDisable : function(){
+        this.clearTimers();
+        this.hide();
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        if(this.contstrainPosition){
+            var ay = this.targetXY[1], h = this.getSize().height;
+            if(y <= ay && (y+h) >= ay){
+                y = ay-h-5;
+            }
+        }
+        return {x : x, y: y};
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+        Ext.ToolTip.superclass.onDestroy.call(this);
+    }
+});/**
+ * @class Ext.QuickTip
+ * @extends Ext.ToolTip
+ * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global
+ * {@link Ext.QuickTips} instance.  See the QuickTips class header for additional usage details and examples.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.QuickTip = Ext.extend(Ext.ToolTip, {
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document).
+     */
+    /**
+     * @cfg {Boolean} interceptTitles True to automatically use the element's DOM title value if available (defaults to false).
+     */
+    interceptTitles : false,
+
+    // private
+    tagConfig : {
+        namespace : "ext",
+        attribute : "qtip",
+        width : "qwidth",
+        target : "target",
+        title : "qtitle",
+        hide : "hide",
+        cls : "qclass",
+        align : "qalign",
+        anchor : "anchor"
+    },
+
+    // private
+    initComponent : function(){
+        this.target = this.target || Ext.getDoc();
+        this.targets = this.targets || {};
+        Ext.QuickTip.superclass.initComponent.call(this);
+    },
+
+    /**
+     * Configures a new quick tip instance and assigns it to a target element.  The following config values are
+     * supported (for example usage, see the {@link Ext.QuickTips} class header):
+     * <div class="mdetail-params"><ul>
+     * <li>autoHide</li>
+     * <li>cls</li>
+     * <li>dismissDelay (overrides the singleton value)</li>
+     * <li>target (required)</li>
+     * <li>text (required)</li>
+     * <li>title</li>
+     * <li>width</li></ul></div>
+     * @param {Object} config The config object
+     */
+    register : function(config){
+        var cs = Ext.isArray(config) ? config : arguments;
+        for(var i = 0, len = cs.length; i < len; i++){
+            var c = cs[i];
+            var target = c.target;
+            if(target){
+                if(Ext.isArray(target)){
+                    for(var j = 0, jlen = target.length; j < jlen; j++){
+                        this.targets[Ext.id(target[j])] = c;
+                    }
+                } else{
+                    this.targets[Ext.id(target)] = c;
+                }
+            }
+        }
+    },
+
+    /**
+     * Removes this quick tip from its element and destroys it.
+     * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+     */
+    unregister : function(el){
+        delete this.targets[Ext.id(el)];
+    },
+    
+    /**
+     * Hides a visible tip or cancels an impending show for a particular element.
+     * @param {String/HTMLElement/Element} el The element that is the target of the tip.
+     */
+    cancelShow: function(el){
+        var at = this.activeTarget;
+        el = Ext.get(el).dom;
+        if(this.isVisible()){
+            if(at && at.el == el){
+                this.hide();
+            }
+        }else if(at && at.el == el){
+            this.clearTimer('show');
+        }
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled){
+            return;
+        }
+        this.targetXY = e.getXY();
+        var t = e.getTarget();
+        if(!t || t.nodeType !== 1 || t == document || t == document.body){
+            return;
+        }
+        if(this.activeTarget && t == this.activeTarget.el){
+            this.clearTimer('hide');
+            this.show();
+            return;
+        }
+        if(t && this.targets[t.id]){
+            this.activeTarget = this.targets[t.id];
+            this.activeTarget.el = t;
+            this.anchor = this.activeTarget.anchor;
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+            return;
+        }
+        
+        var ttp, et = Ext.fly(t), cfg = this.tagConfig;
+        var ns = cfg.namespace;
+        if(this.interceptTitles && t.title){
+            ttp = t.title;
+            t.qtip = ttp;
+            t.removeAttribute("title");
+            e.preventDefault();
+        } else{
+            ttp = t.qtip || et.getAttribute(cfg.attribute, ns);
+        }
+        if(ttp){
+            var autoHide = et.getAttribute(cfg.hide, ns);
+            this.activeTarget = {
+                el: t,
+                text: ttp,
+                width: et.getAttribute(cfg.width, ns),
+                autoHide: autoHide != "user" && autoHide !== 'false',
+                title: et.getAttribute(cfg.title, ns),
+                cls: et.getAttribute(cfg.cls, ns),
+                align: et.getAttribute(cfg.align, ns)
+                
+            };
+            this.anchor = et.getAttribute(cfg.anchor, ns);
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        var t = this.activeTarget;
+        if(t){
+            if(!this.rendered){
+                this.render(Ext.getBody());
+                this.activeTarget = t;
+            }
+            if(t.width){
+                this.setWidth(t.width);
+                this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth()));
+                this.measureWidth = false;
+            } else{
+                this.measureWidth = true;
+            }
+            this.setTitle(t.title || '');
+            this.body.update(t.text);
+            this.autoHide = t.autoHide;
+            this.dismissDelay = t.dismissDelay || this.dismissDelay;
+            if(this.lastCls){
+                this.el.removeClass(this.lastCls);
+                delete this.lastCls;
+            }
+            if(t.cls){
+                this.el.addClass(t.cls);
+                this.lastCls = t.cls;
+            }
+            if(this.anchor){
+                this.constrainPosition = false;
+            }else if(t.align){ // TODO: this doesn't seem to work consistently
+                xy = this.el.getAlignToXY(t.el, t.align);
+                this.constrainPosition = false;
+            }else{
+                this.constrainPosition = true;
+            }
+        }
+        Ext.QuickTip.superclass.showAt.call(this, xy);
+    },
+
+    // inherit docs
+    hide: function(){
+        delete this.activeTarget;
+        Ext.QuickTip.superclass.hide.call(this);
+    }
+});/**
+ * @class Ext.QuickTips
+ * <p>Provides attractive and customizable tooltips for any element. The QuickTips
+ * singleton is used to configure and manage tooltips globally for multiple elements
+ * in a generic manner.  To create individual tooltips with maximum customizability,
+ * you should consider either {@link Ext.Tip} or {@link Ext.ToolTip}.</p>
+ * <p>Quicktips can be configured via tag attributes directly in markup, or by
+ * registering quick tips programmatically via the {@link #register} method.</p>
+ * <p>The singleton's instance of {@link Ext.QuickTip} is available via
+ * {@link #getQuickTip}, and supports all the methods, and all the all the
+ * configuration properties of Ext.QuickTip. These settings will apply to all
+ * tooltips shown by the singleton.</p>
+ * <p>Below is the summary of the configuration properties which can be used.
+ * For detailed descriptions see {@link #getQuickTip}</p>
+ * <p><b>QuickTips singleton configs (all are optional)</b></p>
+ * <div class="mdetail-params"><ul><li>dismissDelay</li>
+ * <li>hideDelay</li>
+ * <li>maxWidth</li>
+ * <li>minWidth</li>
+ * <li>showDelay</li>
+ * <li>trackMouse</li></ul></div>
+ * <p><b>Target element configs (optional unless otherwise noted)</b></p>
+ * <div class="mdetail-params"><ul><li>autoHide</li>
+ * <li>cls</li>
+ * <li>dismissDelay (overrides singleton value)</li>
+ * <li>target (required)</li>
+ * <li>text (required)</li>
+ * <li>title</li>
+ * <li>width</li></ul></div>
+ * <p>Here is an example showing how some of these config options could be used:</p>
+ * <pre><code>
+// Init the singleton.  Any tag-based quick tips will start working.
+Ext.QuickTips.init();
+
+// Apply a set of config properties to the singleton
+Ext.apply(Ext.QuickTips.getQuickTip(), {
+    maxWidth: 200,
+    minWidth: 100,
+    showDelay: 50,
+    trackMouse: true
+});
+
+// Manually register a quick tip for a specific element
+Ext.QuickTips.register({
+    target: 'my-div',
+    title: 'My Tooltip',
+    text: 'This tooltip was added in code',
+    width: 100,
+    dismissDelay: 20
+});
+</code></pre>
+ * <p>To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with
+ * the <b>ext:</b> namespace.  The HTML element itself is automatically set as the quick tip target. Here is the summary
+ * of supported attributes (optional unless otherwise noted):</p>
+ * <ul><li><b>hide</b>: Specifying "user" is equivalent to setting autoHide = false.  Any other value will be the
+ * same as autoHide = true.</li>
+ * <li><b>qclass</b>: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).</li>
+ * <li><b>qtip (required)</b>: The quick tip text (equivalent to the 'text' target element config).</li>
+ * <li><b>qtitle</b>: The quick tip title (equivalent to the 'title' target element config).</li>
+ * <li><b>qwidth</b>: The quick tip width (equivalent to the 'width' target element config).</li></ul>
+ * <p>Here is an example of configuring an HTML element to display a tooltip from markup:</p>
+ * <pre><code>
+// Add a quick tip to an HTML button
+&lt;input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
+     ext:qtip="This is a quick tip from markup!">&lt;/input>
+</code></pre>
+ * @singleton
+ */
+Ext.QuickTips = function(){
+    var tip, locks = [];
+    return {
+        /**
+         * Initialize the global QuickTips instance and prepare any quick tips.
+         * @param {Boolean} autoRender True to render the QuickTips container immediately to preload images. (Defaults to true) 
+         */
+        init : function(autoRender){
+            if(!tip){
+                if(!Ext.isReady){
+                    Ext.onReady(function(){
+                        Ext.QuickTips.init(autoRender);
+                    });
+                    return;
+                }
+                tip = new Ext.QuickTip({elements:'header,body'});
+                if(autoRender !== false){
+                    tip.render(Ext.getBody());
+                }
+            }
+        },
+
+        /**
+         * Enable quick tips globally.
+         */
+        enable : function(){
+            if(tip){
+                locks.pop();
+                if(locks.length < 1){
+                    tip.enable();
+                }
+            }
+        },
+
+        /**
+         * Disable quick tips globally.
+         */
+        disable : function(){
+            if(tip){
+                tip.disable();
+            }
+            locks.push(1);
+        },
+
+        /**
+         * Returns true if quick tips are enabled, else false.
+         * @return {Boolean}
+         */
+        isEnabled : function(){
+            return tip !== undefined && !tip.disabled;
+        },
+
+        /**
+         * Gets the global QuickTips instance.
+         */
+        getQuickTip : function(){
+            return tip;
+        },
+
+        /**
+         * Configures a new quick tip instance and assigns it to a target element.  See
+         * {@link Ext.QuickTip#register} for details.
+         * @param {Object} config The config object
+         */
+        register : function(){
+            tip.register.apply(tip, arguments);
+        },
+
+        /**
+         * Removes any registered quick tip from the target element and destroys it.
+         * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+         */
+        unregister : function(){
+            tip.unregister.apply(tip, arguments);
+        },
+
+        /**
+         * Alias of {@link #register}.
+         * @param {Object} config The config object
+         */
+        tips :function(){
+            tip.register.apply(tip, arguments);
+        }
+    }
+}();/**
+ * @class Ext.tree.TreePanel
+ * @extends Ext.Panel
+ * <p>The TreePanel provides tree-structured UI representation of tree-structured data.</p>
+ * <p>{@link Ext.tree.TreeNode TreeNode}s added to the TreePanel may each contain metadata
+ * used by your application in their {@link Ext.tree.TreeNode#attributes attributes} property.</p>
+ * <p><b>A TreePanel must have a {@link #root} node before it is rendered.</b> This may either be
+ * specified using the {@link #root} config option, or using the {@link #setRootNode} method.
+ * <p>An example of tree rendered to an existing div:</p><pre><code>
+var tree = new Ext.tree.TreePanel({
+    renderTo: 'tree-div',
+    useArrows: true,
+    autoScroll: true,
+    animate: true,
+    enableDD: true,
+    containerScroll: true,
+    border: false,
+    // auto create TreeLoader
+    dataUrl: 'get-nodes.php',
+
+    root: {
+        nodeType: 'async',
+        text: 'Ext JS',
+        draggable: false,
+        id: 'source'
+    }
+});
+
+tree.getRootNode().expand();
+ * </code></pre>
+ * <p>The example above would work with a data packet similar to this:</p><pre><code>
+[{
+    "text": "adapter",
+    "id": "source\/adapter",
+    "cls": "folder"
+}, {
+    "text": "dd",
+    "id": "source\/dd",
+    "cls": "folder"
+}, {
+    "text": "debug.js",
+    "id": "source\/debug.js",
+    "leaf": true,
+    "cls": "file"
+}]
+ * </code></pre>
+ * <p>An example of tree within a Viewport:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        xtype: 'treepanel',
+        width: 200,
+        autoScroll: true,
+        split: true,
+        loader: new Ext.tree.TreeLoader(),
+        root: new Ext.tree.AsyncTreeNode({
+            expanded: true,
+            children: [{
+                text: 'Menu Option 1',
+                leaf: true
+            }, {
+                text: 'Menu Option 2',
+                leaf: true
+            }, {
+                text: 'Menu Option 3',
+                leaf: true
+            }]
+        }),
+        rootVisible: false,
+        listeners: {
+            click: function(n) {
+                Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
+            }
+        }
+    }, {
+        region: 'center',
+        xtype: 'tabpanel',
+        // remaining code not shown ...
+    }]
+});
+</code></pre>
+ *
+ * @cfg {Ext.tree.TreeNode} root The root node for the tree.
+ * @cfg {Boolean} rootVisible <tt>false</tt> to hide the root node (defaults to <tt>true</tt>)
+ * @cfg {Boolean} lines <tt>false</tt> to disable tree lines (defaults to <tt>true</tt>)
+ * @cfg {Boolean} enableDD <tt>true</tt> to enable drag and drop
+ * @cfg {Boolean} enableDrag <tt>true</tt> to enable just drag
+ * @cfg {Boolean} enableDrop <tt>true</tt> to enable just drop
+ * @cfg {Object} dragConfig Custom config to pass to the {@link Ext.tree.TreeDragZone} instance
+ * @cfg {Object} dropConfig Custom config to pass to the {@link Ext.tree.TreeDropZone} instance
+ * @cfg {String} ddGroup The DD group this TreePanel belongs to
+ * @cfg {Boolean} ddAppendOnly <tt>true</tt> if the tree should only allow append drops (use for trees which are sorted)
+ * @cfg {Boolean} ddScroll <tt>true</tt> to enable body scrolling
+ * @cfg {Boolean} containerScroll <tt>true</tt> to register this container with ScrollManager
+ * @cfg {Boolean} hlDrop <tt>false</tt> to disable node highlight on drop (defaults to the value of {@link Ext#enableFx})
+ * @cfg {String} hlColor The color of the node highlight (defaults to <tt>'C3DAF9'</tt>)
+ * @cfg {Boolean} animate <tt>true</tt> to enable animated expand/collapse (defaults to the value of {@link Ext#enableFx})
+ * @cfg {Boolean} singleExpand <tt>true</tt> if only 1 node per branch may be expanded
+ * @cfg {Object} selModel A tree selection model to use with this TreePanel (defaults to an {@link Ext.tree.DefaultSelectionModel})
+ * @cfg {Boolean} trackMouseOver <tt>false</tt> to disable mouse over highlighting
+ * @cfg {Ext.tree.TreeLoader} loader A {@link Ext.tree.TreeLoader} for use with this TreePanel
+ * @cfg {String} pathSeparator The token used to separate sub-paths in path strings (defaults to <tt>'/'</tt>)
+ * @cfg {Boolean} useArrows <tt>true</tt> to use Vista-style arrows in the tree (defaults to <tt>false</tt>)
+ * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+ *
+ * @constructor
+ * @param {Object} config
+ * @xtype treepanel
+ */
+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);
+        }
+
+        // initialize the loader
+        var l = this.loader;
+        if(!l){
+            l = new Ext.tree.TreeLoader({
+                dataUrl: this.dataUrl,
+                requestMethod: this.requestMethod
+            });
+        }else if(typeof l == 'object' && !l.load){
+            l = new Ext.tree.TreeLoader(l);
+        }
+        this.loader = l;
+
+        this.nodeHash = {};
+
+        /**
+        * The root node of this tree.
+        * @type Ext.tree.TreeNode
+        * @property root
+        */
+        if(this.root){
+            var r = this.root;
+            delete this.root;
+            this.setRootNode(r);
+        }
+
+
+        this.addEvents(
+
+            /**
+            * @event append
+            * Fires when a new child node is appended to a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The newly appended node
+            * @param {Number} index The index of the newly appended node
+            */
+           "append",
+           /**
+            * @event remove
+            * Fires when a child node is removed from a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node removed
+            */
+           "remove",
+           /**
+            * @event movenode
+            * Fires when a node is moved to a new location in the tree
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node moved
+            * @param {Node} oldParent The old parent of this node
+            * @param {Node} newParent The new parent of this node
+            * @param {Number} index The index it was moved to
+            */
+           "movenode",
+           /**
+            * @event insert
+            * Fires when a new child node is inserted in a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node inserted
+            * @param {Node} refNode The child node the node was inserted before
+            */
+           "insert",
+           /**
+            * @event beforeappend
+            * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be appended
+            */
+           "beforeappend",
+           /**
+            * @event beforeremove
+            * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be removed
+            */
+           "beforeremove",
+           /**
+            * @event beforemovenode
+            * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node being moved
+            * @param {Node} oldParent The parent of the node
+            * @param {Node} newParent The new parent the node is moving to
+            * @param {Number} index The index it is being moved to
+            */
+           "beforemovenode",
+           /**
+            * @event beforeinsert
+            * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be inserted
+            * @param {Node} refNode The child node the node is being inserted before
+            */
+            "beforeinsert",
+
+            /**
+            * @event beforeload
+            * Fires before a node is loaded, return false to cancel
+            * @param {Node} node The node being loaded
+            */
+            "beforeload",
+            /**
+            * @event load
+            * Fires when a node is loaded
+            * @param {Node} node The node that was loaded
+            */
+            "load",
+            /**
+            * @event textchange
+            * Fires when the text for a node is changed
+            * @param {Node} node The node
+            * @param {String} text The new text
+            * @param {String} oldText The old text
+            */
+            "textchange",
+            /**
+            * @event beforeexpandnode
+            * Fires before a node is expanded, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforeexpandnode",
+            /**
+            * @event beforecollapsenode
+            * Fires before a node is collapsed, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforecollapsenode",
+            /**
+            * @event expandnode
+            * Fires when a node is expanded
+            * @param {Node} node The node
+            */
+            "expandnode",
+            /**
+            * @event disabledchange
+            * Fires when the disabled status of a node changes
+            * @param {Node} node The node
+            * @param {Boolean} disabled
+            */
+            "disabledchange",
+            /**
+            * @event collapsenode
+            * Fires when a node is collapsed
+            * @param {Node} node The node
+            */
+            "collapsenode",
+            /**
+            * @event beforeclick
+            * Fires before click processing on a node. Return false to cancel the default action.
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "beforeclick",
+            /**
+            * @event click
+            * Fires when a node is clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "click",
+            /**
+            * @event checkchange
+            * Fires when a node with a checkbox's checked property changes
+            * @param {Node} this This node
+            * @param {Boolean} checked
+            */
+            "checkchange",
+            /**
+            * @event dblclick
+            * Fires when a node is double clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "dblclick",
+            /**
+            * @event contextmenu
+            * Fires when a node is right clicked. To display a context menu in response to this
+            * event, first create a Menu object (see {@link Ext.menu.Menu} for details), then add
+            * a handler for this event:<pre><code>
+new Ext.tree.TreePanel({
+    title: 'My TreePanel',
+    root: new Ext.tree.AsyncTreeNode({
+        text: 'The Root',
+        children: [
+            { text: 'Child node 1', leaf: true },
+            { text: 'Child node 2', leaf: true }
+        ]
+    }),
+    contextMenu: new Ext.menu.Menu({
+        items: [{
+            id: 'delete-node',
+            text: 'Delete Node'
+        }],
+        listeners: {
+            itemclick: function(item) {
+                switch (item.id) {
+                    case 'delete-node':
+                        var n = item.parentMenu.contextNode;
+                        if (n.parentNode) {
+                            n.remove();
+                        }
+                        break;
+                }
+            }
+        }
+    }),
+    listeners: {
+        contextmenu: function(node, e) {
+//          Register the context node with the menu so that a Menu Item's handler function can access
+//          it via its {@link Ext.menu.BaseItem#parentMenu parentMenu} property.
+            node.select();
+            var c = node.getOwnerTree().contextMenu;
+            c.contextNode = node;
+            c.showAt(e.getXY());
+        }
+    }
+});
+</code></pre>
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "contextmenu",
+            /**
+            * @event beforechildrenrendered
+            * Fires right before the child nodes for a node are rendered
+            * @param {Node} node The node
+            */
+            "beforechildrenrendered",
+           /**
+             * @event startdrag
+             * Fires when a node starts being dragged
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "startdrag",
+            /**
+             * @event enddrag
+             * Fires when a drag operation is complete
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "enddrag",
+            /**
+             * @event dragdrop
+             * Fires when a dragged node is dropped on a valid DD target
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {DD} dd The dd it was dropped on
+             * @param {event} e The raw browser event
+             */
+            "dragdrop",
+            /**
+             * @event beforenodedrop
+             * Fires when a DD object is dropped on a node in this tree for preprocessing. Return false to cancel the drop. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source <b>OR</b> you can supply node(s)
+             * to be inserted by setting them on this object.</li>
+             * <li>cancel - Set this to true to cancel the drop.</li>
+             * <li>dropStatus - If the default drop action is cancelled but the drop is valid, setting this to true
+             * will prevent the animated "repair" from appearing.</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "beforenodedrop",
+            /**
+             * @event nodedrop
+             * Fires after a DD object is dropped on a node in this tree. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Dropped node(s).</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "nodedrop",
+             /**
+             * @event nodedragover
+             * Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed. The dragOverEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source.</li>
+             * <li>cancel - Set this to true to signal drop not allowed.</li>
+             * </ul>
+             * @param {Object} dragOverEvent
+             */
+            "nodedragover"
+        );
+        if(this.singleExpand){
+            this.on("beforeexpandnode", this.restrictExpand, this);
+        }
+    },
+
+    // private
+    proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){
+        if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){
+            ename = ename+'node';
+        }
+        // args inline for performance while bubbling events
+        return this.fireEvent(ename, a1, a2, a3, a4, a5, a6);
+    },
+
+
+    /**
+     * Returns this root node for this tree
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree. If the TreePanel has already rendered a root node, the
+     * previous root node (and all of its descendants) are destroyed before the new root node is rendered.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        Ext.destroy(this.root);
+        if(!node.render){ // attributes passed
+            node = this.loader.createNode(node);
+        }
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        if(!this.rootVisible){
+            var uiP = node.attributes.uiProvider;
+            node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node);
+        }
+        if (this.innerCt) {
+            this.innerCt.update('');
+            this.afterRender();
+        }
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    // private
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    },
+
+    // private
+    restrictExpand : function(node){
+        var p = node.parentNode;
+        if(p){
+            if(p.expandedChild && p.expandedChild.parentNode == p){
+                p.expandedChild.collapse();
+            }
+            p.expandedChild = node;
+        }
+    },
+
+    /**
+     * Retrieve an array of checked nodes, or an array of a specific attribute of checked nodes (e.g. "id")
+     * @param {String} attribute (optional) Defaults to null (return the actual nodes)
+     * @param {TreeNode} startNode (optional) The node to start from, defaults to the root
+     * @return {Array}
+     */
+    getChecked : function(a, startNode){
+        startNode = startNode || this.root;
+        var r = [];
+        var f = function(){
+            if(this.attributes.checked){
+                r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a]));
+            }
+        };
+        startNode.cascade(f);
+        return r;
+    },
+
+    /**
+     * Returns the container element for this TreePanel.
+     * @return {Element} The container element for this TreePanel.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the default {@link Ext.tree.TreeLoader} for this TreePanel.
+     * @return {Ext.tree.TreeLoader} The TreeLoader for this TreePanel.
+     */
+    getLoader : function(){
+        return this.loader;
+    },
+
+    /**
+     * Expand all nodes
+     */
+    expandAll : function(){
+        this.root.expand(true);
+    },
+
+    /**
+     * Collapse all nodes
+     */
+    collapseAll : function(){
+        this.root.collapse(true);
+    },
+
+    /**
+     * Returns the selection model used by this TreePanel.
+     * @return {TreeSelectionModel} The selection model used by this TreePanel
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.tree.DefaultSelectionModel();
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Expands a specified path in this TreePanel. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the expand is complete. The callback will be called with
+     * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded.
+     */
+    expandPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var curNode = this.root;
+        if(curNode.attributes[attr] != keys[1]){ // invalid root
+            if(callback){
+                callback(false, null);
+            }
+            return;
+        }
+        var index = 1;
+        var f = function(){
+            if(++index == keys.length){
+                if(callback){
+                    callback(true, curNode);
+                }
+                return;
+            }
+            var c = curNode.findChild(attr, keys[index]);
+            if(!c){
+                if(callback){
+                    callback(false, curNode);
+                }
+                return;
+            }
+            curNode = c;
+            c.expand(false, false, f);
+        };
+        curNode.expand(false, false, f);
+    },
+
+    /**
+     * Selects the node in this tree at the specified path. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the selection is complete. The callback will be called with
+     * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node.
+     */
+    selectPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var v = keys.pop();
+        if(keys.length > 0){
+            var f = function(success, node){
+                if(success && node){
+                    var n = node.findChild(attr, v);
+                    if(n){
+                        n.select();
+                        if(callback){
+                            callback(true, n);
+                        }
+                    }else if(callback){
+                        callback(false, n);
+                    }
+                }else{
+                    if(callback){
+                        callback(false, n);
+                    }
+                }
+            };
+            this.expandPath(keys.join(this.pathSeparator), attr, f);
+        }else{
+            this.root.select();
+            if(callback){
+                callback(true, this.root);
+            }
+        }
+    },
+
+    /**
+     * Returns the underlying Element for this tree
+     * @return {Ext.Element} The Element
+     */
+    getTreeEl : function(){
+        return this.body;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.tree.TreePanel.superclass.onRender.call(this, ct, position);
+        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")});
+    },
+
+    // private
+    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){
+           /**
+            * The dropZone used by this tree if drop is enabled (see {@link #enableDD} or {@link #enableDrop})
+            * @property dropZone
+            * @type Ext.tree.TreeDropZone
+            */
+             this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || {
+               ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true
+           });
+        }
+        if((this.enableDD || this.enableDrag) && !this.dragZone){
+           /**
+            * The dragZone used by this tree if drag is enabled (see {@link #enableDD} or {@link #enableDrag})
+            * @property dragZone
+            * @type Ext.tree.TreeDragZone
+            */
+            this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || {
+               ddGroup: this.ddGroup || "TreeDD",
+               scroll: this.ddScroll
+           });
+        }
+        this.getSelectionModel().init(this);
+    },
+
+    // private
+    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);
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoDestroy
+     * @hide
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {Object} defaults
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideBorders
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} items
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} monitorResize
+     * @hide
+     */
+    /**
+     * @property items
+     * @hide
+     */
+    /**
+     * @method cascade
+     * @hide
+     */
+    /**
+     * @method doLayout
+     * @hide
+     */
+    /**
+     * @method find
+     * @hide
+     */
+    /**
+     * @method findBy
+     * @hide
+     */
+    /**
+     * @method findById
+     * @hide
+     */
+    /**
+     * @method findByType
+     * @hide
+     */
+    /**
+     * @method getComponent
+     * @hide
+     */
+    /**
+     * @method getLayout
+     * @hide
+     */
+    /**
+     * @method getUpdater
+     * @hide
+     */
+    /**
+     * @method insert
+     * @hide
+     */
+    /**
+     * @method load
+     * @hide
+     */
+    /**
+     * @method remove
+     * @hide
+     */
+    /**
+     * @event add
+     * @hide
+     */
+    /**
+     * @method removeAll
+     * @hide
+     */
+    /**
+     * @event afterLayout
+     * @hide
+     */
+    /**
+     * @event beforeadd
+     * @hide
+     */
+    /**
+     * @event beforeremove
+     * @hide
+     */
+    /**
+     * @event remove
+     * @hide
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+
+Ext.tree.TreePanel.nodeTypes = {};
+
+Ext.reg('treepanel', Ext.tree.TreePanel);Ext.tree.TreeEventModel = function(tree){
+    this.tree = tree;
+    this.tree.on('render', this.initEvents, this);
+}
+
+Ext.tree.TreeEventModel.prototype = {
+    initEvents : function(){
+        var el = this.tree.getTreeEl();
+        el.on('click', this.delegateClick, this);
+        if(this.tree.trackMouseOver !== false){
+            this.tree.innerCt.on('mouseover', this.delegateOver, this);
+            this.tree.innerCt.on('mouseout', this.delegateOut, this);
+        }
+        el.on('dblclick', this.delegateDblClick, this);
+        el.on('contextmenu', this.delegateContextMenu, this);
+    },
+
+    getNode : function(e){
+        var t;
+        if(t = e.getTarget('.x-tree-node-el', 10)){
+            var id = Ext.fly(t, '_treeEvents').getAttribute('tree-node-id', 'ext');
+            if(id){
+                return this.tree.getNodeById(id);
+            }
+        }
+        return null;
+    },
+
+    getNodeTarget : function(e){
+        var t = e.getTarget('.x-tree-node-icon', 1);
+        if(!t){
+            t = e.getTarget('.x-tree-node-el', 6);
+        }
+        return t;
+    },
+
+    delegateOut : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            var n = this.getNode(e);
+            this.onIconOut(e, n);
+            if(n == this.lastEcOver){
+                delete this.lastEcOver;
+            }
+        }
+        if((t = this.getNodeTarget(e)) && !e.within(t, true)){
+            this.onNodeOut(e, this.getNode(e));
+        }
+    },
+
+    delegateOver : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF
+            Ext.getBody().on('mouseover', this.trackExit, this);
+            this.trackingDoc = true;
+        }
+        if(this.lastEcOver){ // prevent hung highlight
+            this.onIconOut(e, this.lastEcOver);
+            delete this.lastEcOver;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.lastEcOver = this.getNode(e);
+            this.onIconOver(e, this.lastEcOver);
+        }
+        if(t = this.getNodeTarget(e)){
+            this.onNodeOver(e, this.getNode(e));
+        }
+    },
+
+    trackExit : function(e){
+        if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){
+            this.onNodeOut(e, this.lastOverNode);
+            delete this.lastOverNode;
+            Ext.getBody().un('mouseover', this.trackExit, this);
+            this.trackingDoc = false;
+        }
+    },
+
+    delegateClick : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+
+        if(e.getTarget('input[type=checkbox]', 1)){
+            this.onCheckboxClick(e, this.getNode(e));
+        }
+        else if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.onIconClick(e, this.getNode(e));
+        }
+        else if(this.getNodeTarget(e)){
+            this.onNodeClick(e, this.getNode(e));
+        }
+    },
+
+    delegateDblClick : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeDblClick(e, this.getNode(e));
+        }
+    },
+
+    delegateContextMenu : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeContextMenu(e, this.getNode(e));
+        }
+    },
+
+    onNodeClick : function(e, node){
+        node.ui.onClick(e);
+    },
+
+    onNodeOver : function(e, node){
+        this.lastOverNode = node;
+        node.ui.onOver(e);
+    },
+
+    onNodeOut : function(e, node){
+        node.ui.onOut(e);
+    },
+
+    onIconOver : function(e, node){
+        node.ui.addClass('x-tree-ec-over');
+    },
+
+    onIconOut : function(e, node){
+        node.ui.removeClass('x-tree-ec-over');
+    },
+
+    onIconClick : function(e, node){
+        node.ui.ecClick(e);
+    },
+
+    onCheckboxClick : function(e, node){
+        node.ui.onCheckChange(e);
+    },
+
+    onNodeDblClick : function(e, node){
+        node.ui.onDblClick(e);
+    },
+
+    onNodeContextMenu : function(e, node){
+        node.ui.onContextMenu(e);
+    },
+
+    beforeEvent : function(e){
+        if(this.disabled){
+            e.stopEvent();
+            return false;
+        }
+        return true;
+    },
+
+    disable: function(){
+        this.disabled = true;
+    },
+
+    enable: function(){
+        this.disabled = false;
+    }
+};/**
+ * @class Ext.tree.DefaultSelectionModel
+ * @extends Ext.util.Observable
+ * The default single selection for a TreePanel.
+ */
+Ext.tree.DefaultSelectionModel = function(config){
+   this.selNode = null;
+   
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected node changes
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        */
+       "selectionchange",
+
+       /**
+        * @event beforeselect
+        * Fires before the selected node changes, return false to cancel the change
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        * @param {TreeNode} node the old selection
+        */
+       "beforeselect"
+   );
+
+    Ext.apply(this, config);
+    Ext.tree.DefaultSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        this.select(node);
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @return {TreeNode} The selected node
+     */
+    select : function(node){
+        var last = this.selNode;
+        if(node == last){
+            node.ui.onSelectedChange(true);
+        }else if(this.fireEvent('beforeselect', this, node, last) !== false){
+            if(last){
+                last.ui.onSelectedChange(false);
+            }
+            this.selNode = node;
+            node.ui.onSelectedChange(true);
+            this.fireEvent("selectionchange", this, node, last);
+        }
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selNode == node){
+            this.clearSelections();
+        }    
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(){
+        var n = this.selNode;
+        if(n){
+            n.ui.onSelectedChange(false);
+            this.selNode = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+        return n;
+    },
+    
+    /**
+     * Get the selected node
+     * @return {TreeNode} The selected node
+     */
+    getSelectedNode : function(){
+        return this.selNode;    
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selNode == node;  
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectPrevious : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        var ps = s.previousSibling;
+        if(ps){
+            if(!ps.isExpanded() || ps.childNodes.length < 1){
+                return this.select(ps);
+            } else{
+                var lc = ps.lastChild;
+                while(lc && lc.isExpanded() && lc.childNodes.length > 0){
+                    lc = lc.lastChild;
+                }
+                return this.select(lc);
+            }
+        } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){
+            return this.select(s.parentNode);
+        }
+        return null;
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectNext : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        if(s.firstChild && s.isExpanded()){
+             return this.select(s.firstChild);
+         }else if(s.nextSibling){
+             return this.select(s.nextSibling);
+         }else if(s.parentNode){
+            var newS = null;
+            s.parentNode.bubble(function(){
+                if(this.nextSibling){
+                    newS = this.getOwnerTree().selModel.select(this.nextSibling);
+                    return false;
+                }
+            });
+            return newS;
+         }
+        return null;
+    },
+
+    onKeyDown : function(e){
+        var s = this.selNode || this.lastSelNode;
+        // undesirable, but required
+        var sm = this;
+        if(!s){
+            return;
+        }
+        var k = e.getKey();
+        switch(k){
+             case e.DOWN:
+                 e.stopEvent();
+                 this.selectNext();
+             break;
+             case e.UP:
+                 e.stopEvent();
+                 this.selectPrevious();
+             break;
+             case e.RIGHT:
+                 e.preventDefault();
+                 if(s.hasChildNodes()){
+                     if(!s.isExpanded()){
+                         s.expand();
+                     }else if(s.firstChild){
+                         this.select(s.firstChild, e);
+                     }
+                 }
+             break;
+             case e.LEFT:
+                 e.preventDefault();
+                 if(s.hasChildNodes() && s.isExpanded()){
+                     s.collapse();
+                 }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){
+                     this.select(s.parentNode, e);
+                 }
+             break;
+        };
+    }
+});
+
+/**
+ * @class Ext.tree.MultiSelectionModel
+ * @extends Ext.util.Observable
+ * Multi selection for a TreePanel.
+ */
+Ext.tree.MultiSelectionModel = function(config){
+   this.selNodes = [];
+   this.selMap = {};
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected nodes change
+        * @param {MultiSelectionModel} this
+        * @param {Array} nodes Array of the selected nodes
+        */
+       "selectionchange"
+   );
+    Ext.apply(this, config);
+    Ext.tree.MultiSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        if(e.ctrlKey && this.isSelected(node)){
+            this.unselect(node);
+        }else{
+            this.select(node, e, e.ctrlKey);
+        }
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @param {EventObject} e (optional) An event associated with the selection
+     * @param {Boolean} keepExisting True to retain existing selections
+     * @return {TreeNode} The selected node
+     */
+    select : function(node, e, keepExisting){
+        if(keepExisting !== true){
+            this.clearSelections(true);
+        }
+        if(this.isSelected(node)){
+            this.lastSelNode = node;
+            return node;
+        }
+        this.selNodes.push(node);
+        this.selMap[node.id] = node;
+        this.lastSelNode = node;
+        node.ui.onSelectedChange(true);
+        this.fireEvent("selectionchange", this, this.selNodes);
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selMap[node.id]){
+            node.ui.onSelectedChange(false);
+            var sn = this.selNodes;
+            var index = sn.indexOf(node);
+            if(index != -1){
+                this.selNodes.splice(index, 1);
+            }
+            delete this.selMap[node.id];
+            this.fireEvent("selectionchange", this, this.selNodes);
+        }
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(suppressEvent){
+        var sn = this.selNodes;
+        if(sn.length > 0){
+            for(var i = 0, len = sn.length; i < len; i++){
+                sn[i].ui.onSelectedChange(false);
+            }
+            this.selNodes = [];
+            this.selMap = {};
+            if(suppressEvent !== true){
+                this.fireEvent("selectionchange", this, this.selNodes);
+            }
+        }
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selMap[node.id] ? true : false;  
+    },
+    
+    /**
+     * Returns an array of the selected nodes
+     * @return {Array}
+     */
+    getSelectedNodes : function(){
+        return this.selNodes;    
+    },
+
+    onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown,
+
+    selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext,
+
+    selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious
+});/**
+ * @class Ext.data.Tree
+ * @extends Ext.util.Observable
+ * Represents a tree data structure and bubbles all the events for its nodes. The nodes
+ * in the tree have most standard DOM functionality.
+ * @constructor
+ * @param {Node} root (optional) The root node
+ */
+Ext.data.Tree = function(root){
+   this.nodeHash = {};
+   /**
+    * The root node for this tree
+    * @type Node
+    */
+   this.root = null;
+   if(root){
+       this.setRootNode(root);
+   }
+   this.addEvents(
+       /**
+        * @event append
+        * Fires when a new child node is appended to a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append",
+       /**
+        * @event remove
+        * Fires when a child node is removed from a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node removed
+        */
+       "remove",
+       /**
+        * @event move
+        * Fires when a node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node moved
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move",
+       /**
+        * @event insert
+        * Fires when a new child node is inserted in a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert",
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend",
+       /**
+        * @event beforeremove
+        * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove",
+       /**
+        * @event beforemove
+        * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node being moved
+        * @param {Node} oldParent The parent of the node
+        * @param {Node} newParent The new parent the node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove",
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert"
+   );
+
+    Ext.data.Tree.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Tree, Ext.util.Observable, {
+    /**
+     * @cfg {String} pathSeparator
+     * The token used to separate paths in node ids (defaults to '/').
+     */
+    pathSeparator: "/",
+
+    // private
+    proxyNodeEvent : function(){
+        return this.fireEvent.apply(this, arguments);
+    },
+
+    /**
+     * Returns the root node for this tree.
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id.
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    }
+});
+
+/**
+ * @class Ext.data.Node
+ * @extends Ext.util.Observable
+ * @cfg {Boolean} leaf true if this node is a leaf and does not have children
+ * @cfg {String} id The id for this node. If one is not specified, one is generated.
+ * @constructor
+ * @param {Object} attributes The attributes/config for the node
+ */
+Ext.data.Node = function(attributes){
+    /**
+     * The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
+     * @type {Object}
+     */
+    this.attributes = attributes || {};
+    this.leaf = this.attributes.leaf;
+    /**
+     * The node id. @type String
+     */
+    this.id = this.attributes.id;
+    if(!this.id){
+        this.id = Ext.id(null, "xnode-");
+        this.attributes.id = this.id;
+    }
+    /**
+     * All child nodes of this node. @type Array
+     */
+    this.childNodes = [];
+    if(!this.childNodes.indexOf){ // indexOf is a must
+        this.childNodes.indexOf = function(o){
+            for(var i = 0, len = this.length; i < len; i++){
+                if(this[i] == o){
+                    return i;
+                }
+            }
+            return -1;
+        };
+    }
+    /**
+     * The parent node for this node. @type Node
+     */
+    this.parentNode = null;
+    /**
+     * The first direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.firstChild = null;
+    /**
+     * The last direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.lastChild = null;
+    /**
+     * The node immediately preceding this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.previousSibling = null;
+    /**
+     * The node immediately following this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.nextSibling = null;
+
+    this.addEvents({
+       /**
+        * @event append
+        * Fires when a new child node is appended
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append" : true,
+       /**
+        * @event remove
+        * Fires when a child node is removed
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The removed node
+        */
+       "remove" : true,
+       /**
+        * @event move
+        * Fires when this node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move" : true,
+       /**
+        * @event insert
+        * Fires when a new child node is inserted.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert" : true,
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend" : true,
+       /**
+        * @event beforeremove
+        * Fires before a child is removed, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove" : true,
+       /**
+        * @event beforemove
+        * Fires before this node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The parent of this node
+        * @param {Node} newParent The new parent this node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove" : true,
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert" : true
+   });
+    this.listeners = this.attributes.listeners;
+    Ext.data.Node.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Node, Ext.util.Observable, {
+    // private
+    fireEvent : function(evtName){
+        // first do standard event for this node
+        if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){
+            return false;
+        }
+        // then bubble it up to the tree if the event wasn't cancelled
+        var ot = this.getOwnerTree();
+        if(ot){
+            if(ot.proxyNodeEvent.apply(ot, arguments) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Returns true if this node is a leaf
+     * @return {Boolean}
+     */
+    isLeaf : function(){
+        return this.leaf === true;
+    },
+
+    // private
+    setFirstChild : function(node){
+        this.firstChild = node;
+    },
+
+    //private
+    setLastChild : function(node){
+        this.lastChild = node;
+    },
+
+
+    /**
+     * Returns true if this node is the last child of its parent
+     * @return {Boolean}
+     */
+    isLast : function(){
+       return (!this.parentNode ? true : this.parentNode.lastChild == this);
+    },
+
+    /**
+     * Returns true if this node is the first child of its parent
+     * @return {Boolean}
+     */
+    isFirst : function(){
+       return (!this.parentNode ? true : this.parentNode.firstChild == this);
+    },
+
+    /**
+     * Returns true if this node has one or more child nodes, else false.
+     * @return {Boolean}
+     */
+    hasChildNodes : function(){
+        return !this.isLeaf() && this.childNodes.length > 0;
+    },
+    
+    /**
+     * Returns true if this node has one or more child nodes, or if the <tt>expandable</tt>
+     * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false.
+     * @return {Boolean}
+     */
+    isExpandable : function(){
+        return this.attributes.expandable || this.hasChildNodes();
+    },
+
+    /**
+     * Insert node(s) as the last child node of this node.
+     * @param {Node/Array} node The node or Array of nodes to append
+     * @return {Node} The appended node if single append, or null if an array was passed
+     */
+    appendChild : function(node){
+        var multi = false;
+        if(Ext.isArray(node)){
+            multi = node;
+        }else if(arguments.length > 1){
+            multi = arguments;
+        }
+        // if passed an array or multiple args do them one by one
+        if(multi){
+            for(var i = 0, len = multi.length; i < len; i++) {
+            	this.appendChild(multi[i]);
+            }
+        }else{
+            if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){
+                return false;
+            }
+            var index = this.childNodes.length;
+            var oldParent = node.parentNode;
+            // it's a move, make sure we move it cleanly
+            if(oldParent){
+                if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){
+                    return false;
+                }
+                oldParent.removeChild(node);
+            }
+            index = this.childNodes.length;
+            if(index === 0){
+                this.setFirstChild(node);
+            }
+            this.childNodes.push(node);
+            node.parentNode = this;
+            var ps = this.childNodes[index-1];
+            if(ps){
+                node.previousSibling = ps;
+                ps.nextSibling = node;
+            }else{
+                node.previousSibling = null;
+            }
+            node.nextSibling = null;
+            this.setLastChild(node);
+            node.setOwnerTree(this.getOwnerTree());
+            this.fireEvent("append", this.ownerTree, this, node, index);
+            if(oldParent){
+                node.fireEvent("move", this.ownerTree, node, oldParent, this, index);
+            }
+            return node;
+        }
+    },
+
+    /**
+     * Removes a child node from this node.
+     * @param {Node} node The node to remove
+     * @return {Node} The removed node
+     */
+    removeChild : function(node){
+        var index = this.childNodes.indexOf(node);
+        if(index == -1){
+            return false;
+        }
+        if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){
+            return false;
+        }
+
+        // remove it from childNodes collection
+        this.childNodes.splice(index, 1);
+
+        // update siblings
+        if(node.previousSibling){
+            node.previousSibling.nextSibling = node.nextSibling;
+        }
+        if(node.nextSibling){
+            node.nextSibling.previousSibling = node.previousSibling;
+        }
+
+        // update child refs
+        if(this.firstChild == node){
+            this.setFirstChild(node.nextSibling);
+        }
+        if(this.lastChild == node){
+            this.setLastChild(node.previousSibling);
+        }
+
+        node.setOwnerTree(null);
+        // clear any references from the node
+        node.parentNode = null;
+        node.previousSibling = null;
+        node.nextSibling = null;
+        this.fireEvent("remove", this.ownerTree, this, node);
+        return node;
+    },
+
+    /**
+     * Inserts the first node before the second node in this nodes childNodes collection.
+     * @param {Node} node The node to insert
+     * @param {Node} refNode The node to insert before (if null the node is appended)
+     * @return {Node} The inserted node
+     */
+    insertBefore : function(node, refNode){
+        if(!refNode){ // like standard Dom, refNode can be null for append
+            return this.appendChild(node);
+        }
+        // nothing to do
+        if(node == refNode){
+            return false;
+        }
+
+        if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){
+            return false;
+        }
+        var index = this.childNodes.indexOf(refNode);
+        var oldParent = node.parentNode;
+        var refIndex = index;
+
+        // when moving internally, indexes will change after remove
+        if(oldParent == this && this.childNodes.indexOf(node) < index){
+            refIndex--;
+        }
+
+        // it's a move, make sure we move it cleanly
+        if(oldParent){
+            if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){
+                return false;
+            }
+            oldParent.removeChild(node);
+        }
+        if(refIndex === 0){
+            this.setFirstChild(node);
+        }
+        this.childNodes.splice(refIndex, 0, node);
+        node.parentNode = this;
+        var ps = this.childNodes[refIndex-1];
+        if(ps){
+            node.previousSibling = ps;
+            ps.nextSibling = node;
+        }else{
+            node.previousSibling = null;
+        }
+        node.nextSibling = refNode;
+        refNode.previousSibling = node;
+        node.setOwnerTree(this.getOwnerTree());
+        this.fireEvent("insert", this.ownerTree, this, node, refNode);
+        if(oldParent){
+            node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode);
+        }
+        return node;
+    },
+
+    /**
+     * Removes this node from its parent
+     * @return {Node} this
+     */
+    remove : function(){
+        this.parentNode.removeChild(this);
+        return this;
+    },
+
+    /**
+     * Returns the child node at the specified index.
+     * @param {Number} index
+     * @return {Node}
+     */
+    item : function(index){
+        return this.childNodes[index];
+    },
+
+    /**
+     * Replaces one child node in this node with another.
+     * @param {Node} newChild The replacement node
+     * @param {Node} oldChild The node to replace
+     * @return {Node} The replaced node
+     */
+    replaceChild : function(newChild, oldChild){
+        var s = oldChild ? oldChild.nextSibling : null;
+        this.removeChild(oldChild);
+        this.insertBefore(newChild, s);
+        return oldChild;
+    },
+
+    /**
+     * Returns the index of a child node
+     * @param {Node} node
+     * @return {Number} The index of the node or -1 if it was not found
+     */
+    indexOf : function(child){
+        return this.childNodes.indexOf(child);
+    },
+
+    /**
+     * Returns the tree this node is in.
+     * @return {Tree}
+     */
+    getOwnerTree : function(){
+        // if it doesn't have one, look for one
+        if(!this.ownerTree){
+            var p = this;
+            while(p){
+                if(p.ownerTree){
+                    this.ownerTree = p.ownerTree;
+                    break;
+                }
+                p = p.parentNode;
+            }
+        }
+        return this.ownerTree;
+    },
+
+    /**
+     * Returns depth of this node (the root node has a depth of 0)
+     * @return {Number}
+     */
+    getDepth : function(){
+        var depth = 0;
+        var p = this;
+        while(p.parentNode){
+            ++depth;
+            p = p.parentNode;
+        }
+        return depth;
+    },
+
+    // private
+    setOwnerTree : function(tree){
+        // if it is a move, we need to update everyone
+        if(tree != this.ownerTree){
+            if(this.ownerTree){
+                this.ownerTree.unregisterNode(this);
+            }
+            this.ownerTree = tree;
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].setOwnerTree(tree);
+            }
+            if(tree){
+                tree.registerNode(this);
+            }
+        }
+    },
+    
+    /**
+     * Changes the id of this node.
+     * @param {String} id The new id for the node.
+     */
+    setId: function(id){
+        if(id !== this.id){
+            var t = this.ownerTree;
+            if(t){
+                t.unregisterNode(this);
+            }
+            this.id = id;
+            if(t){
+                t.registerNode(this);
+            }
+            this.onIdChange(id);
+        }
+    },
+    
+    // private
+    onIdChange: Ext.emptyFn,
+
+    /**
+     * Returns the path for this node. The path can be used to expand or select this node programmatically.
+     * @param {String} attr (optional) The attr to use for the path (defaults to the node's id)
+     * @return {String} The path
+     */
+    getPath : function(attr){
+        attr = attr || "id";
+        var p = this.parentNode;
+        var b = [this.attributes[attr]];
+        while(p){
+            b.unshift(p.attributes[attr]);
+            p = p.parentNode;
+        }
+        var sep = this.getOwnerTree().pathSeparator;
+        return sep + b.join(sep);
+    },
+
+    /**
+     * Bubbles up the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.parentNode;
+        }
+    },
+
+    /**
+     * Cascades down the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].cascade(fn, scope, args);
+            }
+        }
+    },
+
+    /**
+     * Interates the child nodes of this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the iteration stops.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    eachChild : function(fn, scope, args){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.apply(scope || this, args || [cs[i]]) === false){
+        	    break;
+        	}
+        }
+    },
+
+    /**
+     * Finds the first child that has the attribute with the specified value.
+     * @param {String} attribute The attribute name
+     * @param {Mixed} value The value to search for
+     * @return {Node} The found child or null if none was found
+     */
+    findChild : function(attribute, value){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(cs[i].attributes[attribute] == value){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Finds the first child by a custom function. The child matches if the function passed
+     * returns true.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Node} The found child or null if none was found
+     */
+    findChildBy : function(fn, scope){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.call(scope||cs[i], cs[i]) === true){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Sorts this nodes children using the supplied sort function
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     */
+    sort : function(fn, scope){
+        var cs = this.childNodes;
+        var len = cs.length;
+        if(len > 0){
+            var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn;
+            cs.sort(sortFn);
+            for(var i = 0; i < len; i++){
+                var n = cs[i];
+                n.previousSibling = cs[i-1];
+                n.nextSibling = cs[i+1];
+                if(i === 0){
+                    this.setFirstChild(n);
+                }
+                if(i == len-1){
+                    this.setLastChild(n);
+                }
+            }
+        }
+    },
+
+    /**
+     * Returns true if this node is an ancestor (at any point) of the passed node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    contains : function(node){
+        return node.isAncestor(this);
+    },
+
+    /**
+     * Returns true if the passed node is an ancestor (at any point) of this node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    isAncestor : function(node){
+        var p = this.parentNode;
+        while(p){
+            if(p == node){
+                return true;
+            }
+            p = p.parentNode;
+        }
+        return false;
+    },
+
+    toString : function(){
+        return "[Node"+(this.id?" "+this.id:"")+"]";
+    }
+});/**
+ * @class Ext.tree.TreeNode
+ * @extends Ext.data.Node
+ * @cfg {String} text The text for this node
+ * @cfg {Boolean} expanded true to start the node expanded
+ * @cfg {Boolean} allowDrag False to make this node undraggable if {@link #draggable} = true (defaults to true)
+ * @cfg {Boolean} allowDrop False if this node cannot have child nodes dropped on it (defaults to true)
+ * @cfg {Boolean} disabled true to start the node disabled
+ * @cfg {String} icon The path to an icon for the node. The preferred way to do this
+ * is to use the cls or iconCls attributes and add the icon via a CSS background image.
+ * @cfg {String} cls A css class to be added to the node
+ * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images
+ * @cfg {String} href URL of the link used for the node (defaults to #)
+ * @cfg {String} hrefTarget target frame for the link
+ * @cfg {Boolean} hidden True to render hidden. (Defaults to false).
+ * @cfg {String} qtip An Ext QuickTip for the node
+ * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty
+ * @cfg {String} qtipCfg An Ext QuickTip config for the node (used instead of qtip)
+ * @cfg {Boolean} singleClickExpand True for single click expand on this node
+ * @cfg {Function} uiProvider A UI <b>class</b> to use for this node (defaults to Ext.tree.TreeNodeUI)
+ * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox
+ * (defaults to undefined with no checkbox rendered)
+ * @cfg {Boolean} draggable True to make this node draggable (defaults to false)
+ * @cfg {Boolean} isTarget False to not allow this node to act as a drop target (defaults to true)
+ * @cfg {Boolean} allowChildren False to not allow this node to have child nodes (defaults to true)
+ * @cfg {Boolean} editable False to not allow this node to be edited by an (@link Ext.tree.TreeEditor} (defaults to true)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node
+ */
+Ext.tree.TreeNode = function(attributes){
+    attributes = attributes || {};
+    if(typeof attributes == "string"){
+        attributes = {text: attributes};
+    }
+    this.childrenRendered = false;
+    this.rendered = false;
+    Ext.tree.TreeNode.superclass.constructor.call(this, attributes);
+    this.expanded = attributes.expanded === true;
+    this.isTarget = attributes.isTarget !== false;
+    this.draggable = attributes.draggable !== false && attributes.allowDrag !== false;
+    this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false;
+
+    /**
+     * Read-only. The text for this node. To change it use setText().
+     * @type String
+     */
+    this.text = attributes.text;
+    /**
+     * True if this node is disabled.
+     * @type Boolean
+     */
+    this.disabled = attributes.disabled === true;
+    /**
+     * True if this node is hidden.
+     * @type Boolean
+     */
+    this.hidden = attributes.hidden === true;
+
+    this.addEvents(
+        /**
+        * @event textchange
+        * Fires when the text for this node is changed
+        * @param {Node} this This node
+        * @param {String} text The new text
+        * @param {String} oldText The old text
+        */
+        "textchange",
+        /**
+        * @event beforeexpand
+        * Fires before this node is expanded, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforeexpand",
+        /**
+        * @event beforecollapse
+        * Fires before this node is collapsed, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforecollapse",
+        /**
+        * @event expand
+        * Fires when this node is expanded
+        * @param {Node} this This node
+        */
+        "expand",
+        /**
+        * @event disabledchange
+        * Fires when the disabled status of this node changes
+        * @param {Node} this This node
+        * @param {Boolean} disabled
+        */
+        "disabledchange",
+        /**
+        * @event collapse
+        * Fires when this node is collapsed
+        * @param {Node} this This node
+        */
+        "collapse",
+        /**
+        * @event beforeclick
+        * Fires before click processing. Return false to cancel the default action.
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "beforeclick",
+        /**
+        * @event click
+        * Fires when this node is clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "click",
+        /**
+        * @event checkchange
+        * Fires when a node with a checkbox's checked property changes
+        * @param {Node} this This node
+        * @param {Boolean} checked
+        */
+        "checkchange",
+        /**
+        * @event dblclick
+        * Fires when this node is double clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "dblclick",
+        /**
+        * @event contextmenu
+        * Fires when this node is right clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "contextmenu",
+        /**
+        * @event beforechildrenrendered
+        * Fires right before the child nodes for this node are rendered
+        * @param {Node} this This node
+        */
+        "beforechildrenrendered"
+    );
+
+    var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;
+
+    /**
+     * Read-only. The UI for this node
+     * @type TreeNodeUI
+     */
+    this.ui = new uiClass(this);
+};
+Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
+    preventHScroll: true,
+    /**
+     * Returns true if this node is expanded
+     * @return {Boolean}
+     */
+    isExpanded : function(){
+        return this.expanded;
+    },
+
+/**
+ * Returns the UI object for this node.
+ * @return {TreeNodeUI} The object which is providing the user interface for this tree
+ * node. Unless otherwise specified in the {@link #uiProvider}, this will be an instance
+ * of {@link Ext.tree.TreeNodeUI}
+ */
+    getUI : function(){
+        return this.ui;
+    },
+
+    getLoader : function(){
+        var owner;
+        return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : new Ext.tree.TreeLoader());
+    },
+
+    // private override
+    setFirstChild : function(node){
+        var of = this.firstChild;
+        Ext.tree.TreeNode.superclass.setFirstChild.call(this, node);
+        if(this.childrenRendered && of && node != of){
+            of.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // private override
+    setLastChild : function(node){
+        var ol = this.lastChild;
+        Ext.tree.TreeNode.superclass.setLastChild.call(this, node);
+        if(this.childrenRendered && ol && node != ol){
+            ol.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // these methods are overridden to provide lazy rendering support
+    // private override
+    appendChild : function(n){
+        if(!n.render && !Ext.isArray(n)){
+            n = this.getLoader().createNode(n);
+        }
+        var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n);
+        if(node && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return node;
+    },
+
+    // private override
+    removeChild : function(node){
+        this.ownerTree.getSelectionModel().unselect(node);
+        Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments);
+        // if it's been rendered remove dom node
+        if(this.childrenRendered){
+            node.ui.remove();
+        }
+        if(this.childNodes.length < 1){
+            this.collapse(false, false);
+        }else{
+            this.ui.updateExpandIcon();
+        }
+        if(!this.firstChild && !this.isHiddenRoot()) {
+            this.childrenRendered = false;
+        }
+        return node;
+    },
+
+    // private override
+    insertBefore : function(node, refNode){
+        if(!node.render){ 
+            node = this.getLoader().createNode(node);
+        }
+        var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode);
+        if(newNode && refNode && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return newNode;
+    },
+
+    /**
+     * Sets the text for this node
+     * @param {String} text
+     */
+    setText : function(text){
+        var oldText = this.text;
+        this.text = text;
+        this.attributes.text = text;
+        if(this.rendered){ // event without subscribing
+            this.ui.onTextChange(this, text, oldText);
+        }
+        this.fireEvent("textchange", this, text, oldText);
+    },
+
+    /**
+     * Triggers selection of this node
+     */
+    select : function(){
+        this.getOwnerTree().getSelectionModel().select(this);
+    },
+
+    /**
+     * Triggers deselection of this node
+     */
+    unselect : function(){
+        this.getOwnerTree().getSelectionModel().unselect(this);
+    },
+
+    /**
+     * Returns true if this node is selected
+     * @return {Boolean}
+     */
+    isSelected : function(){
+        return this.getOwnerTree().getSelectionModel().isSelected(this);
+    },
+
+    /**
+     * Expand this node.
+     * @param {Boolean} deep (optional) True to expand all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    expand : function(deep, anim, callback, scope){
+        if(!this.expanded){
+            if(this.fireEvent("beforeexpand", this, deep, anim) === false){
+                return;
+            }
+            if(!this.childrenRendered){
+                this.renderChildren();
+            }
+            this.expanded = true;
+            if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animExpand(function(){
+                    this.fireEvent("expand", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.expandChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.expand();
+                this.fireEvent("expand", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else{
+           this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            this.expandChildNodes(true);
+        }
+    },
+    
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isHiddenRoot : function(){
+        return this.isRoot && !this.getOwnerTree().rootVisible;
+    },
+
+    /**
+     * Collapse this node.
+     * @param {Boolean} deep (optional) True to collapse all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    collapse : function(deep, anim, callback, scope){
+        if(this.expanded && !this.isHiddenRoot()){
+            if(this.fireEvent("beforecollapse", this, deep, anim) === false){
+                return;
+            }
+            this.expanded = false;
+            if((this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animCollapse(function(){
+                    this.fireEvent("collapse", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.collapseChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.collapse();
+                this.fireEvent("collapse", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else if(!this.expanded){
+            this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].collapse(true, false);
+            }
+        }
+    },
+
+    // private
+    delayedExpand : function(delay){
+        if(!this.expandProcId){
+            this.expandProcId = this.expand.defer(delay, this);
+        }
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+        }
+        this.expandProcId = false;
+    },
+
+    /**
+     * Toggles expanded/collapsed state of the node
+     */
+    toggle : function(){
+        if(this.expanded){
+            this.collapse();
+        }else{
+            this.expand();
+        }
+    },
+
+    /**
+     * Ensures all parent nodes are expanded, and if necessary, scrolls
+     * the node into view.
+     * @param {Function} callback (optional) A function to call when the node has been made visible.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    ensureVisible : function(callback, scope){
+        var tree = this.getOwnerTree();
+        tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){
+            var node = tree.getNodeById(this.id);  // Somehow if we don't do this, we lose changes that happened to node in the meantime
+            tree.getTreeEl().scrollChildIntoView(node.ui.anchor);
+            this.runCallback(callback, scope || this, [this]);
+        }.createDelegate(this));
+    },
+
+    /**
+     * Expand all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes
+     */
+    expandChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].expand(deep);
+        }
+    },
+
+    /**
+     * Collapse all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also collapse their child nodes
+     */
+    collapseChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].collapse(deep);
+        }
+    },
+
+    /**
+     * Disables this node
+     */
+    disable : function(){
+        this.disabled = true;
+        this.unselect();
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, true);
+        }
+        this.fireEvent("disabledchange", this, true);
+    },
+
+    /**
+     * Enables this node
+     */
+    enable : function(){
+        this.disabled = false;
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, false);
+        }
+        this.fireEvent("disabledchange", this, false);
+    },
+
+    // private
+    renderChildren : function(suppressEvent){
+        if(suppressEvent !== false){
+            this.fireEvent("beforechildrenrendered", this);
+        }
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].render(true);
+        }
+        this.childrenRendered = true;
+    },
+
+    // private
+    sort : function(fn, scope){
+        Ext.tree.TreeNode.superclass.sort.apply(this, arguments);
+        if(this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].render(true);
+            }
+        }
+    },
+
+    // private
+    render : function(bulkRender){
+        this.ui.render(bulkRender);
+        if(!this.rendered){
+            // make sure it is registered
+            this.getOwnerTree().registerNode(this);
+            this.rendered = true;
+            if(this.expanded){
+                this.expanded = false;
+                this.expand(false, false);
+            }
+        }
+    },
+
+    // private
+    renderIndent : function(deep, refresh){
+        if(refresh){
+            this.ui.childIndent = null;
+        }
+        this.ui.renderIndent();
+        if(deep === true && this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].renderIndent(true, refresh);
+            }
+        }
+    },
+
+    beginUpdate : function(){
+        this.childrenRendered = false;
+    },
+
+    endUpdate : function(){
+        if(this.expanded && this.rendered){
+            this.renderChildren();
+        }
+    },
+
+    destroy : function(){
+        if(this.childNodes){
+            for(var i = 0,l = this.childNodes.length; i < l; i++){
+                this.childNodes[i].destroy();
+            }
+            this.childNodes = null;
+        }
+        if(this.ui.destroy){
+            this.ui.destroy();
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        this.ui.onIdChange(id);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;/**
+ * @class Ext.tree.AsyncTreeNode
+ * @extends Ext.tree.TreeNode
+ * @cfg {TreeLoader} loader A TreeLoader to be used by this node (defaults to the loader defined on the tree)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node 
+ */
+ Ext.tree.AsyncTreeNode = function(config){
+    this.loaded = config && config.loaded === true;
+    this.loading = false;
+    Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments);
+    /**
+    * @event beforeload
+    * Fires before this node is loaded, return false to cancel
+    * @param {Node} this This node
+    */
+    this.addEvents('beforeload', 'load');
+    /**
+    * @event load
+    * Fires when this node is loaded
+    * @param {Node} this This node
+    */
+    /**
+     * The loader used by this node (defaults to using the tree's defined loader)
+     * @type TreeLoader
+     * @property loader
+     */
+};
+Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
+    expand : function(deep, anim, callback, scope){
+        if(this.loading){ // if an async load is already running, waiting til it's done
+            var timer;
+            var f = function(){
+                if(!this.loading){ // done loading
+                    clearInterval(timer);
+                    this.expand(deep, anim, callback, scope);
+                }
+            }.createDelegate(this);
+            timer = setInterval(f, 200);
+            return;
+        }
+        if(!this.loaded){
+            if(this.fireEvent("beforeload", this) === false){
+                return;
+            }
+            this.loading = true;
+            this.ui.beforeLoad(this);
+            var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader();
+            if(loader){
+                loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback, scope]), this);
+                return;
+            }
+        }
+        Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node is currently loading
+     * @return {Boolean}
+     */
+    isLoading : function(){
+        return this.loading;  
+    },
+    
+    loadComplete : function(deep, anim, callback, scope){
+        this.loading = false;
+        this.loaded = true;
+        this.ui.afterLoad(this);
+        this.fireEvent("load", this);
+        this.expand(deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node has been loaded
+     * @return {Boolean}
+     */
+    isLoaded : function(){
+        return this.loaded;
+    },
+    
+    hasChildNodes : function(){
+        if(!this.isLeaf() && !this.loaded){
+            return true;
+        }else{
+            return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this);
+        }
+    },
+
+    /**
+     * Trigger a reload for this node
+     * @param {Function} callback
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    reload : function(callback, scope){
+        this.collapse(false, false);
+        while(this.firstChild){
+            this.removeChild(this.firstChild).destroy();
+        }
+        this.childrenRendered = false;
+        this.loaded = false;
+        if(this.isHiddenRoot()){
+            this.expanded = false;
+        }
+        this.expand(false, false, callback, scope);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;/**
+ * @class Ext.tree.TreeNodeUI
+ * This class provides the default UI implementation for Ext TreeNodes.
+ * The TreeNode UI implementation is separate from the
+ * tree implementation, and allows customizing of the appearance of
+ * tree nodes.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ * <p>
+ * This class provides access to the user interface components of an Ext TreeNode, through
+ * {@link Ext.tree.TreeNode#getUI}
+ */
+Ext.tree.TreeNodeUI = function(node){
+    this.node = node;
+    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 = {
+    // private
+    removeChild : function(node){
+        if(this.rendered){
+            this.ctNode.removeChild(node.ui.getEl());
+        } 
+    },
+
+    // private
+    beforeLoad : function(){
+         this.addClass("x-tree-node-loading");
+    },
+
+    // private
+    afterLoad : function(){
+         this.removeClass("x-tree-node-loading");
+    },
+
+    // private
+    onTextChange : function(node, text, oldText){
+        if(this.rendered){
+            this.textNode.innerHTML = text;
+        }
+    },
+
+    // private
+    onDisableChange : function(node, state){
+        this.disabled = state;
+		if (this.checkbox) {
+			this.checkbox.disabled = state;
+		}        
+        if(state){
+            this.addClass("x-tree-node-disabled");
+        }else{
+            this.removeClass("x-tree-node-disabled");
+        } 
+    },
+
+    // private
+    onSelectedChange : function(state){
+        if(state){
+            this.focus();
+            this.addClass("x-tree-selected");
+        }else{
+            //this.blur();
+            this.removeClass("x-tree-selected");
+        }
+    },
+
+    // private
+    onMove : function(tree, node, oldParent, newParent, index, refNode){
+        this.childIndent = null;
+        if(this.rendered){
+            var targetNode = newParent.ui.getContainer();
+            if(!targetNode){//target not rendered
+                this.holder = document.createElement("div");
+                this.holder.appendChild(this.wrap);
+                return;
+            }
+            var insertBefore = refNode ? refNode.ui.getEl() : null;
+            if(insertBefore){
+                targetNode.insertBefore(this.wrap, insertBefore);
+            }else{
+                targetNode.appendChild(this.wrap);
+            }
+            this.node.renderIndent(true, oldParent != newParent);
+        }
+    },
+
+/**
+ * Adds one or more CSS classes to the node's UI element.
+ * Duplicate classes are automatically filtered out.
+ * @param {String/Array} className The CSS class to add, or an array of classes
+ */
+    addClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).addClass(cls);
+        }
+    },
+
+/**
+ * Removes one or more CSS classes from the node's UI element.
+ * @param {String/Array} className The CSS class to remove, or an array of classes
+ */
+    removeClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).removeClass(cls);  
+        }
+    },
+
+    // private
+    remove : function(){
+        if(this.rendered){
+            this.holder = document.createElement("div");
+            this.holder.appendChild(this.wrap);
+        }  
+    },
+
+    // private
+    fireEvent : function(){
+        return this.node.fireEvent.apply(this.node, arguments);  
+    },
+
+    // private
+    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 ot = this.node.getOwnerTree();
+        var dd = ot.enableDD || ot.enableDrag || ot.enableDrop;
+        if(dd && (!this.node.isRoot || ot.rootVisible)){
+            Ext.dd.Registry.register(this.elNode, {
+                node: this.node,
+                handles: this.getDDHandles(),
+                isHandle: false
+            });
+        }
+    },
+
+    // private
+    getDDHandles : function(){
+        return [this.iconNode, this.textNode, this.elNode];
+    },
+
+/**
+ * Hides this node.
+ */
+    hide : function(){
+        this.node.hidden = true;
+        if(this.wrap){
+            this.wrap.style.display = "none";
+        }
+    },
+
+/**
+ * Shows this node.
+ */
+    show : function(){
+        this.node.hidden = false;
+        if(this.wrap){
+            this.wrap.style.display = "";
+        } 
+    },
+
+    // private
+    onContextMenu : function(e){
+        if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) {
+            e.preventDefault();
+            this.focus();
+            this.fireEvent("contextmenu", this.node, e);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        if(this.dropping){
+            e.stopEvent();
+            return;
+        }
+        if(this.fireEvent("beforeclick", this.node, e) !== false){
+            var a = e.getTarget('a');
+            if(!this.disabled && this.node.attributes.href && a){
+                this.fireEvent("click", this.node, e);
+                return;
+            }else if(a && e.ctrlKey){
+                e.stopEvent();
+            }
+            e.preventDefault();
+            if(this.disabled){
+                return;
+            }
+
+            if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){
+                this.node.toggle();
+            }
+
+            this.fireEvent("click", this.node, e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        e.preventDefault();
+        if(this.disabled){
+            return;
+        }
+        if(this.checkbox){
+            this.toggleCheck();
+        }
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+        this.fireEvent("dblclick", this.node, e);
+    },
+
+    onOver : function(e){
+        this.addClass('x-tree-node-over');
+    },
+
+    onOut : function(e){
+        this.removeClass('x-tree-node-over');
+    },
+
+    // private
+    onCheckChange : function(){
+        var checked = this.checkbox.checked;
+		// fix for IE6
+		this.checkbox.defaultChecked = checked;		
+        this.node.attributes.checked = checked;
+        this.fireEvent('checkchange', this.node, checked);
+    },
+
+    // private
+    ecClick : function(e){
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+    },
+
+    // private
+    startDrop : function(){
+        this.dropping = true;
+    },
+    
+    // delayed drop so the click event doesn't get fired on a drop
+    endDrop : function(){ 
+       setTimeout(function(){
+           this.dropping = false;
+       }.createDelegate(this), 50); 
+    },
+
+    // private
+    expand : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "";
+    },
+
+    // private
+    focus : function(){
+        if(!this.node.preventHScroll){
+            try{this.anchor.focus();
+            }catch(e){}
+        }else{
+            try{
+                var noscroll = this.node.getOwnerTree().getTreeEl().dom;
+                var l = noscroll.scrollLeft;
+                this.anchor.focus();
+                noscroll.scrollLeft = l;
+            }catch(e){}
+        }
+    },
+
+/**
+ * Sets the checked status of the tree node to the passed value, or, if no value was passed,
+ * toggles the checked status. If the node was rendered with no checkbox, this has no effect.
+ * @param {Boolean} (optional) The new checked status.
+ */
+    toggleCheck : function(value){
+        var cb = this.checkbox;
+        if(cb){
+            cb.checked = (value === undefined ? !cb.checked : value);
+            this.onCheckChange();
+        }
+    },
+
+    // private
+    blur : function(){
+        try{
+            this.anchor.blur();
+        }catch(e){} 
+    },
+
+    // private
+    animExpand : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.stopFx();
+        if(!this.node.isExpandable()){
+            this.updateExpandIcon();
+            this.ctNode.style.display = "";
+            Ext.callback(callback);
+            return;
+        }
+        this.animating = true;
+        this.updateExpandIcon();
+        
+        ct.slideIn('t', {
+           callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    highlight : function(){
+        var tree = this.node.getOwnerTree();
+        Ext.fly(this.wrap).highlight(
+            tree.hlColor || "C3DAF9",
+            {endColor: tree.hlBaseColor}
+        );
+    },
+
+    // private
+    collapse : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "none";
+    },
+
+    // private
+    animCollapse : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.enableDisplayMode('block');
+        ct.stopFx();
+
+        this.animating = true;
+        this.updateExpandIcon();
+
+        ct.slideOut('t', {
+            callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    getContainer : function(){
+        return this.ctNode;  
+    },
+
+    // private
+    getEl : function(){
+        return this.wrap;  
+    },
+
+    // private
+    appendDDGhost : function(ghostNode){
+        ghostNode.appendChild(this.elNode.cloneNode(true));
+    },
+
+    // private
+    getDDRepairXY : function(){
+        return Ext.lib.Dom.getXY(this.iconNode);
+    },
+
+    // private
+    onRender : function(){
+        this.render();    
+    },
+
+    // private
+    render : function(bulkRender){
+        var n = this.node, a = n.attributes;
+        var targetNode = n.parentNode ? 
+              n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom;
+        
+        if(!this.rendered){
+            this.rendered = true;
+
+            this.renderElements(n, a, targetNode, bulkRender);
+
+            if(a.qtip){
+               if(this.textNode.setAttributeNS){
+                   this.textNode.setAttributeNS("ext", "qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttributeNS("ext", "qtitle", a.qtipTitle);
+                   }
+               }else{
+                   this.textNode.setAttribute("ext:qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttribute("ext:qtitle", a.qtipTitle);
+                   }
+               } 
+            }else if(a.qtipCfg){
+                a.qtipCfg.target = Ext.id(this.textNode);
+                Ext.QuickTips.register(a.qtipCfg);
+            }
+            this.initEvents();
+            if(!this.node.expanded){
+                this.updateExpandIcon(true);
+            }
+        }else{
+            if(bulkRender === true) {
+                targetNode.appendChild(this.wrap);
+            }
+        }
+    },
+
+    // private
+    renderElements : function(n, a, targetNode, bulkRender){
+        // add some indent caching, this helps performance when rendering a large tree
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var cb = typeof a.checked == 'boolean';
+
+        var href = a.href ? a.href : Ext.isGecko ? "" : "#";
+        var buf = ['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.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="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
+            cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '',
+            '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',
+             a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>",
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>"].join('');
+
+        var nel;
+        if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf);
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf);
+        }
+        
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        var index = 3;
+        if(cb){
+            this.checkbox = cs[3];
+			// fix for IE6
+			this.checkbox.defaultChecked = this.checkbox.checked;						
+            index++;
+        }
+        this.anchor = cs[index];
+        this.textNode = cs[index].firstChild;
+    },
+
+/**
+ * Returns the &lt;a> element that provides focus for the node's UI.
+ * @return {HtmlElement} The DOM anchor element.
+ */
+    getAnchor : function(){
+        return this.anchor;
+    },
+    
+/**
+ * Returns the text node.
+ * @return {HtmlNode} The DOM text node.
+ */
+    getTextEl : function(){
+        return this.textNode;
+    },
+    
+/**
+ * Returns the icon &lt;img> element.
+ * @return {HtmlElement} The DOM image element.
+ */
+    getIconEl : function(){
+        return this.iconNode;
+    },
+
+/**
+ * Returns the checked status of the node. If the node was rendered with no
+ * checkbox, it returns false.
+ * @return {Boolean} The checked flag.
+ */
+    isChecked : function(){
+        return this.checkbox ? this.checkbox.checked : false; 
+    },
+
+    // private
+    updateExpandIcon : function(){
+        if(this.rendered){
+            var n = this.node, c1, c2;
+            var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
+            var hasChild = n.hasChildNodes();
+            if(hasChild || n.attributes.expandable){
+                if(n.expanded){
+                    cls += "-minus";
+                    c1 = "x-tree-node-collapsed";
+                    c2 = "x-tree-node-expanded";
+                }else{
+                    cls += "-plus";
+                    c1 = "x-tree-node-expanded";
+                    c2 = "x-tree-node-collapsed";
+                }
+                if(this.wasLeaf){
+                    this.removeClass("x-tree-node-leaf");
+                    this.wasLeaf = false;
+                }
+                if(this.c1 != c1 || this.c2 != c2){
+                    Ext.fly(this.elNode).replaceClass(c1, c2);
+                    this.c1 = c1; this.c2 = c2;
+                }
+            }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 ecc = "x-tree-ec-icon "+cls;
+            if(this.ecc != ecc){
+                this.ecNode.className = ecc;
+                this.ecc = ecc;
+            }
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        if(this.rendered){
+            this.elNode.setAttribute('ext:tree-node-id', id);
+        }
+    },
+
+    // private
+    getChildIndent : function(){
+        if(!this.childIndent){
+            var buf = [];
+            var p = this.node;
+            while(p){
+                if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){
+                    if(!p.isLast()) {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />');
+                    } else {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />');
+                    }
+                }
+                p = p.parentNode;
+            }
+            this.childIndent = buf.join("");
+        }
+        return this.childIndent;
+    },
+
+    // private
+    renderIndent : function(){
+        if(this.rendered){
+            var indent = "";
+            var p = this.node.parentNode;
+            if(p){
+                indent = p.ui.getChildIndent();
+            }
+            if(this.indentMarkup != indent){ // don't rerender if not required
+                this.indentNode.innerHTML = indent;
+                this.indentMarkup = indent;
+            }
+            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;
+        
+        if (this.holder){
+             delete this.wrap;
+             Ext.removeNode(this.holder);
+             delete this.holder;
+        }else{
+            Ext.removeNode(this.wrap);
+            delete this.wrap;
+        }
+    }
+};
+
+/**
+ * @class Ext.tree.RootTreeNodeUI
+ * This class provides the default UI implementation for <b>root</b> Ext TreeNodes.
+ * The RootTreeNode UI implementation allows customizing the appearance of the root tree node.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ */
+Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    // private
+    render : function(){
+        if(!this.rendered){
+            var targetNode = this.node.ownerTree.innerCt.dom;
+            this.node.expanded = true;
+            targetNode.innerHTML = '<div class="x-tree-root-node"></div>';
+            this.wrap = this.ctNode = targetNode.firstChild;
+        }
+    },
+    collapse : Ext.emptyFn,
+    expand : Ext.emptyFn
+});/**
+ * @class Ext.tree.TreeLoader
+ * @extends Ext.util.Observable
+ * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child
+ * nodes from a specified URL. The response must be a JavaScript Array definition
+ * whose elements are node definition objects. e.g.:
+ * <pre><code>
+    [{
+        id: 1,
+        text: 'A leaf Node',
+        leaf: true
+    },{
+        id: 2,
+        text: 'A folder Node',
+        children: [{
+            id: 3,
+            text: 'A child Node',
+            leaf: true
+        }]
+   }]
+</code></pre>
+ * <br><br>
+ * A server request is sent, and child nodes are loaded only when a node is expanded.
+ * The loading node's id is passed to the server under the parameter name "node" to
+ * enable the server to produce the correct child nodes.
+ * <br><br>
+ * To pass extra parameters, an event handler may be attached to the "beforeload"
+ * event, and the parameters specified in the TreeLoader's baseParams property:
+ * <pre><code>
+    myTreeLoader.on("beforeload", function(treeLoader, node) {
+        this.baseParams.category = node.attributes.category;
+    }, this);
+</code></pre>
+ * This would pass an HTTP parameter called "category" to the server containing
+ * the value of the Node's "category" attribute.
+ * @constructor
+ * Creates a new Treeloader.
+ * @param {Object} config A config object containing config properties.
+ */
+Ext.tree.TreeLoader = function(config){
+    this.baseParams = {};
+    Ext.apply(this, config);
+
+    this.addEvents(
+        /**
+         * @event beforeload
+         * Fires before a network request is made to retrieve the Json text which specifies a node's children.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} callback The callback function specified in the {@link #load} call.
+         */
+        "beforeload",
+        /**
+         * @event load
+         * Fires when the node has been successfuly loaded.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "load",
+        /**
+         * @event loadexception
+         * Fires if the network request failed.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "loadexception"
+    );
+    Ext.tree.TreeLoader.superclass.constructor.call(this);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+};
+
+Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
+    /**
+    * @cfg {String} dataUrl The URL from which to request a Json string which
+    * specifies an array of node definition objects representing the child nodes
+    * to be loaded.
+    */
+    /**
+     * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+     */
+    /**
+     * @cfg {String} url Equivalent to {@link #dataUrl}.
+     */
+    /**
+     * @cfg {Boolean} preloadChildren If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.
+     */
+    /**
+    * @cfg {Object} baseParams (optional) An object containing properties which
+    * specify HTTP parameters to be passed to each request for child nodes.
+    */
+    /**
+    * @cfg {Object} baseAttrs (optional) An object containing attributes to be added to all nodes
+    * created by this loader. If the attributes sent by the server have an attribute in this object,
+    * they take priority.
+    */
+    /**
+    * @cfg {Object} uiProviders (optional) An object containing properties which
+    * specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional
+    * <i>uiProvider</i> attribute of a returned child node is a string rather
+    * than a reference to a TreeNodeUI implementation, then that string value
+    * is used as a property name in the uiProviders object.
+    */
+    uiProviders : {},
+
+    /**
+    * @cfg {Boolean} clearOnLoad (optional) Default to true. Remove previously existing
+    * child nodes before loading.
+    */
+    clearOnLoad : true,
+
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. Only used when using directFn.
+     * A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used when using directFn.
+     * Send parameters as a collection of named arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.
+     */
+    directFn : undefined,
+
+    /**
+     * Load an {@link Ext.tree.TreeNode} from the URL specified in the constructor.
+     * This is called automatically when a node is expanded, but may be used to reload
+     * a node (or append new children if the {@link #clearOnLoad} option is false.)
+     * @param {Ext.tree.TreeNode} node
+     * @param {Function} callback
+     * @param (Object) scope
+     */
+    load : function(node, callback, scope){
+        if(this.clearOnLoad){
+            while(node.firstChild){
+                node.removeChild(node.firstChild);
+            }
+        }
+        if(this.doPreload(node)){ // preloaded json children
+            this.runCallback(callback, scope || node, []);
+        }else if(this.directFn || this.dataUrl || this.url){
+            this.requestData(node, callback, scope || node);
+        }
+    },
+
+    doPreload : function(node){
+        if(node.attributes.children){
+            if(node.childNodes.length < 1){ // preloaded?
+                var cs = node.attributes.children;
+                node.beginUpdate();
+                for(var i = 0, len = cs.length; i < len; i++){
+                    var cn = node.appendChild(this.createNode(cs[i]));
+                    if(this.preloadChildren){
+                        this.doPreload(cn);
+                    }
+                }
+                node.endUpdate();
+            }
+            return true;
+        }
+        return false;
+    },
+
+    getParams: function(node){
+        var buf = [], bp = this.baseParams;
+        if(this.directFn){
+            buf.push(node.id);
+            if(bp){
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        buf.push(bp[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    buf.push(bp);
+                }
+            }
+            return buf;
+        }else{
+            for(var key in bp){
+                if(!Ext.isFunction(bp[key])){
+                    buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&");
+                }
+            }
+            buf.push("node=", encodeURIComponent(node.id));
+            return buf.join("");
+        }
+    },
+
+    requestData : function(node, callback, scope){
+        if(this.fireEvent("beforeload", this, node, callback) !== false){
+            if(this.directFn){
+                var args = this.getParams(node);
+                args.push(this.processDirectResponse.createDelegate(this, [{callback: callback, node: node, scope: scope}], true));
+                this.directFn.apply(window, args);
+            }else{
+                this.transId = Ext.Ajax.request({
+                    method:this.requestMethod,
+                    url: this.dataUrl||this.url,
+                    success: this.handleResponse,
+                    failure: this.handleFailure,
+                    scope: this,
+                    argument: {callback: callback, node: node, scope: scope},
+                    params: this.getParams(node)
+                });
+            }
+        }else{
+            // if the load is cancelled, make sure we notify
+            // the node that we are done
+            this.runCallback(callback, scope || node, []);
+        }
+    },
+
+    processDirectResponse: function(result, response, args){
+        if(response.status){
+            this.handleResponse({
+                responseData: Ext.isArray(result) ? result : null,
+                responseText: result,
+                argument: args
+            });
+        }else{
+            this.handleFailure({
+                argument: args
+            });
+        }
+    },
+
+    // private
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isLoading : function(){
+        return !!this.transId;
+    },
+
+    abort : function(){
+        if(this.isLoading()){
+            Ext.Ajax.abort(this.transId);
+        }
+    },
+
+    /**
+    * <p>Override this function for custom TreeNode node implementation, or to
+    * modify the attributes at creation time.</p>
+    * Example:<pre><code>
+new Ext.tree.TreePanel({
+    ...
+    new Ext.tree.TreeLoader({
+        url: 'dataUrl',
+        createNode: function(attr) {
+//          Allow consolidation consignments to have
+//          consignments dropped into them.
+            if (attr.isConsolidation) {
+                attr.iconCls = 'x-consol',
+                attr.allowDrop = true;
+            }
+            return Ext.tree.TreeLoader.prototype.call(this, attr);
+        }
+    }),
+    ...
+});
+</code></pre>
+    * @param attr {Object} The attributes from which to create the new node.
+    */
+    createNode : function(attr){
+        // apply baseAttrs, nice idea Corey!
+        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, scope){
+        var json = response.responseText;
+        try {
+            var o = response.responseData || Ext.decode(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();
+            this.runCallback(callback, scope || node, [node]);
+        }catch(e){
+            this.handleFailure(response);
+        }
+    },
+
+    handleResponse : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.processResponse(response, a.node, a.callback, a.scope);
+        this.fireEvent("load", this, a.node, response);
+    },
+
+    handleFailure : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.fireEvent("loadexception", this, a.node, response);
+        this.runCallback(a.callback, a.scope || a.node, [a.node]);
+    }
+});/**
+ * @class Ext.tree.TreeFilter
+ * Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes
+ * @param {TreePanel} tree
+ * @param {Object} config (optional)
+ */
+Ext.tree.TreeFilter = function(tree, config){
+    this.tree = tree;
+    this.filtered = {};
+    Ext.apply(this, config);
+};
+
+Ext.tree.TreeFilter.prototype = {
+    clearBlank:false,
+    reverse:false,
+    autoClear:false,
+    remove:false,
+
+     /**
+     * Filter the data by a specific attribute.
+     * @param {String/RegExp} value Either string that the attribute value
+     * should start with or a RegExp to test against the attribute
+     * @param {String} attr (optional) The attribute passed in your node's attributes collection. Defaults to "text".
+     * @param {TreeNode} startNode (optional) The node to start the filter at.
+     */
+    filter : function(value, attr, startNode){
+        attr = attr || "text";
+        var f;
+        if(typeof value == "string"){
+            var vlen = value.length;
+            // auto clear empty filter
+            if(vlen == 0 && this.clearBlank){
+                this.clear();
+                return;
+            }
+            value = value.toLowerCase();
+            f = function(n){
+                return n.attributes[attr].substr(0, vlen).toLowerCase() == value;
+            };
+        }else if(value.exec){ // regex?
+            f = function(n){
+                return value.test(n.attributes[attr]);
+            };
+        }else{
+            throw 'Illegal filter type, must be string or regex';
+        }
+        this.filterBy(f, null, startNode);
+	},
+
+    /**
+     * Filter by a function. The passed function will be called with each
+     * node in the tree (or from the startNode). If the function returns true, the node is kept
+     * otherwise it is filtered. If a node is filtered, its children are also filtered.
+     * @param {Function} fn The filter function
+     * @param {Object} scope (optional) The scope of the function (defaults to the current node)
+     */
+    filterBy : function(fn, scope, startNode){
+        startNode = startNode || this.tree.root;
+        if(this.autoClear){
+            this.clear();
+        }
+        var af = this.filtered, rv = this.reverse;
+        var f = function(n){
+            if(n == startNode){
+                return true;
+            }
+            if(af[n.id]){
+                return false;
+            }
+            var m = fn.call(scope || n, n);
+            if(!m || rv){
+                af[n.id] = n;
+                n.ui.hide();
+                return false;
+            }
+            return true;
+        };
+        startNode.cascade(f);
+        if(this.remove){
+           for(var id in af){
+               if(typeof id != "function"){
+                   var n = af[id];
+                   if(n && n.parentNode){
+                       n.parentNode.removeChild(n);
+                   }
+               }
+           }
+        }
+    },
+
+    /**
+     * Clears the current filter. Note: with the "remove" option
+     * set a filter cannot be cleared.
+     */
+    clear : function(){
+        var t = this.tree;
+        var af = this.filtered;
+        for(var id in af){
+            if(typeof id != "function"){
+                var n = af[id];
+                if(n){
+                    n.ui.show();
+                }
+            }
+        }
+        this.filtered = {};
+    }
+};
+/**
+ * @class Ext.tree.TreeSorter
+ * Provides sorting of nodes in a {@link Ext.tree.TreePanel}.  The TreeSorter automatically monitors events on the 
+ * associated TreePanel that might affect the tree's sort order (beforechildrenrendered, append, insert and textchange).
+ * Example usage:<br />
+ * <pre><code>
+new Ext.tree.TreeSorter(myTree, {
+    folderSort: true,
+    dir: "desc",
+    sortType: function(node) {
+        // sort by a custom, typed attribute:
+        return parseInt(node.id, 10);
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} config
+ */
+Ext.tree.TreeSorter = function(tree, config){
+    /**
+     * @cfg {Boolean} folderSort True to sort leaf nodes under non-leaf nodes (defaults to false)
+     */
+    /** 
+     * @cfg {String} property The named attribute on the node to sort by (defaults to "text").  Note that this 
+     * property is only used if no {@link #sortType} function is specified, otherwise it is ignored.
+     */
+    /** 
+     * @cfg {String} dir The direction to sort ("asc" or "desc," case-insensitive, defaults to "asc")
+     */
+    /** 
+     * @cfg {String} leafAttr The attribute used to determine leaf nodes when {@link #folderSort} = true (defaults to "leaf")
+     */
+    /** 
+     * @cfg {Boolean} caseSensitive true for case-sensitive sort (defaults to false)
+     */
+    /** 
+     * @cfg {Function} sortType A custom "casting" function used to convert node values before sorting.  The function
+     * will be called with a single parameter (the {@link Ext.tree.TreeNode} being evaluated) and is expected to return
+     * the node's sort value cast to the specific data type required for sorting.  This could be used, for example, when
+     * a node's text (or other attribute) should be sorted as a date or numeric value.  See the class description for 
+     * example usage.  Note that if a sortType is specified, any {@link #property} config will be ignored.
+     */
+    
+    Ext.apply(this, config);
+    tree.on("beforechildrenrendered", this.doSort, this);
+    tree.on("append", this.updateSort, this);
+    tree.on("insert", this.updateSort, this);
+    tree.on("textchange", this.updateSortParent, this);
+    
+    var dsc = this.dir && this.dir.toLowerCase() == "desc";
+    var p = this.property || "text";
+    var sortType = this.sortType;
+    var fs = this.folderSort;
+    var cs = this.caseSensitive === true;
+    var leafAttr = this.leafAttr || 'leaf';
+
+    this.sortFn = function(n1, n2){
+        if(fs){
+            if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){
+                return 1;
+            }
+            if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){
+                return -1;
+            }
+        }
+    	var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
+    	var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
+    	if(v1 < v2){
+			return dsc ? +1 : -1;
+		}else if(v1 > v2){
+			return dsc ? -1 : +1;
+        }else{
+	    	return 0;
+        }
+    };
+};
+
+Ext.tree.TreeSorter.prototype = {
+    doSort : function(node){
+        node.sort(this.sortFn);
+    },
+    
+    compareNodes : function(n1, n2){
+        return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1);
+    },
+    
+    updateSort : function(tree, node){
+        if(node.childrenRendered){
+            this.doSort.defer(1, this, [node]);
+        }
+    },
+    
+    updateSortParent : function(node){
+		var p = node.parentNode;
+		if(p && p.childrenRendered){
+            this.doSort.defer(1, this, [p]);
+        }
+    }
+};/**
+ * @class Ext.tree.TreeDropZone
+ * @extends Ext.dd.DropZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dropping
+ * @param {Object} config
+ */
+if(Ext.dd.DropZone){
+    
+Ext.tree.TreeDropZone = function(tree, config){
+    /**
+     * @cfg {Boolean} allowParentInsert
+     * Allow inserting a dragged node between an expanded parent node and its first child that will become a
+     * sibling of the parent when dropped (defaults to false)
+     */
+    this.allowParentInsert = config.allowParentInsert || false;
+    /**
+     * @cfg {String} allowContainerDrop
+     * True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)
+     */
+    this.allowContainerDrop = config.allowContainerDrop || false;
+    /**
+     * @cfg {String} appendOnly
+     * True if the tree should only allow append drops (use for trees which are sorted, defaults to false)
+     */
+    this.appendOnly = config.appendOnly || false;
+
+    Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config);
+    /**
+    * The TreePanel for this drop zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+    /**
+    * Arbitrary data that can be associated with this tree and will be included in the event object that gets
+    * passed to any nodedragover event handler (defaults to {})
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.dragOverData = {};
+    // private
+    this.lastInsertClass = "x-tree-no-status";
+};
+
+Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    /**
+     * @cfg {String} expandDelay
+     * The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node
+     * over the target (defaults to 1000)
+     */
+    expandDelay : 1000,
+
+    // private
+    expandNode : function(node){
+        if(node.hasChildNodes() && !node.isExpanded()){
+            node.expand(false, null, this.triggerCacheRefresh.createDelegate(this));
+        }
+    },
+
+    // private
+    queueExpand : function(node){
+        this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]);
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+            this.expandProcId = false;
+        }
+    },
+
+    // private
+    isValidDropPoint : function(n, pt, dd, e, data){
+        if(!n || !data){ return false; }
+        var targetNode = n.node;
+        var dropNode = data.node;
+        // default drop rules
+        if(!(targetNode && targetNode.isTarget && pt)){
+            return false;
+        }
+        if(pt == "append" && targetNode.allowChildren === false){
+            return false;
+        }
+        if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){
+            return false;
+        }
+        if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){
+            return false;
+        }
+        // reuse the object
+        var overEvent = this.dragOverData;
+        overEvent.tree = this.tree;
+        overEvent.target = targetNode;
+        overEvent.data = data;
+        overEvent.point = pt;
+        overEvent.source = dd;
+        overEvent.rawEvent = e;
+        overEvent.dropNode = dropNode;
+        overEvent.cancel = false;  
+        var result = this.tree.fireEvent("nodedragover", overEvent);
+        return overEvent.cancel === false && result !== false;
+    },
+
+    // private
+    getDropPoint : function(e, n, dd){
+        var tn = n.node;
+        if(tn.isRoot){
+            return tn.allowChildren !== false ? "append" : false; // always append for root
+        }
+        var dragEl = n.ddel;
+        var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight;
+        var y = Ext.lib.Event.getPageY(e);
+        var noAppend = tn.allowChildren === false || tn.isLeaf();
+        if(this.appendOnly || tn.parentNode.allowChildren === false){
+            return noAppend ? false : "append";
+        }
+        var noBelow = false;
+        if(!this.allowParentInsert){
+            noBelow = tn.hasChildNodes() && tn.isExpanded();
+        }
+        var q = (b - t) / (noAppend ? 2 : 3);
+        if(y >= t && y < (t + q)){
+            return "above";
+        }else if(!noBelow && (noAppend || y >= b-q && y <= b)){
+            return "below";
+        }else{
+            return "append";
+        }
+    },
+
+    // private
+    onNodeEnter : function(n, dd, e, data){
+        this.cancelExpand();
+    },
+    
+    onContainerOver : function(dd, e, data) {
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            return this.dropAllowed;
+        }
+        return this.dropNotAllowed;
+    },
+
+    // private
+    onNodeOver : function(n, dd, e, data){
+        var pt = this.getDropPoint(e, n, dd);
+        var node = n.node;
+        
+        // auto node expand check
+        if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){
+            this.queueExpand(node);
+        }else if(pt != "append"){
+            this.cancelExpand();
+        }
+        
+        // set the insert point style on the target node
+        var returnCls = this.dropNotAllowed;
+        if(this.isValidDropPoint(n, pt, dd, e, data)){
+           if(pt){
+               var el = n.ddel;
+               var cls;
+               if(pt == "above"){
+                   returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-above";
+               }else if(pt == "below"){
+                   returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-below";
+               }else{
+                   returnCls = "x-tree-drop-ok-append";
+                   cls = "x-tree-drag-append";
+               }
+               if(this.lastInsertClass != cls){
+                   Ext.fly(el).replaceClass(this.lastInsertClass, cls);
+                   this.lastInsertClass = cls;
+               }
+           }
+       }
+       return returnCls;
+    },
+
+    // private
+    onNodeOut : function(n, dd, e, data){
+        this.cancelExpand();
+        this.removeDropIndicators(n);
+    },
+
+    // private
+    onNodeDrop : function(n, dd, e, data){
+        var point = this.getDropPoint(e, n, dd);
+        var targetNode = n.node;
+        targetNode.ui.startDrop();
+        if(!this.isValidDropPoint(n, point, dd, e, data)){
+            targetNode.ui.endDrop();
+            return false;
+        }
+        // first try to find the drop node
+        var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null);
+        return this.processDrop(targetNode, data, point, dd, e, dropNode);
+    },
+    
+    onContainerDrop : function(dd, e, data){
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            var targetNode = this.tree.getRootNode();       
+            targetNode.ui.startDrop();
+            var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null);
+            return this.processDrop(targetNode, data, 'append', dd, e, dropNode);
+        }
+        return false;
+    },
+    
+    // private
+    processDrop: function(target, data, point, dd, e, dropNode){
+        var dropEvent = {
+            tree : this.tree,
+            target: target,
+            data: data,
+            point: point,
+            source: dd,
+            rawEvent: e,
+            dropNode: dropNode,
+            cancel: !dropNode,
+            dropStatus: false
+        };
+        var retval = this.tree.fireEvent("beforenodedrop", dropEvent);
+        if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){
+            target.ui.endDrop();
+            return dropEvent.dropStatus;
+        }
+    
+        target = dropEvent.target;
+        if(point == 'append' && !target.isExpanded()){
+            target.expand(false, null, function(){
+                this.completeDrop(dropEvent);
+            }.createDelegate(this));
+        }else{
+            this.completeDrop(dropEvent);
+        }
+        return true;
+    },
+
+    // private
+    completeDrop : function(de){
+        var ns = de.dropNode, p = de.point, t = de.target;
+        if(!Ext.isArray(ns)){
+            ns = [ns];
+        }
+        var n;
+        for(var i = 0, len = ns.length; i < len; i++){
+            n = ns[i];
+            if(p == "above"){
+                t.parentNode.insertBefore(n, t);
+            }else if(p == "below"){
+                t.parentNode.insertBefore(n, t.nextSibling);
+            }else{
+                t.appendChild(n);
+            }
+        }
+        n.ui.focus();
+        if(Ext.enableFx && this.tree.hlDrop){
+            n.ui.highlight();
+        }
+        t.ui.endDrop();
+        this.tree.fireEvent("nodedrop", de);
+    },
+
+    // private
+    afterNodeMoved : function(dd, data, e, targetNode, dropNode){
+        if(Ext.enableFx && this.tree.hlDrop){
+            dropNode.ui.focus();
+            dropNode.ui.highlight();
+        }
+        this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e);
+    },
+
+    // private
+    getTree : function(){
+        return this.tree;
+    },
+
+    // private
+    removeDropIndicators : function(n){
+        if(n && n.ddel){
+            var el = n.ddel;
+            Ext.fly(el).removeClass([
+                    "x-tree-drag-insert-above",
+                    "x-tree-drag-insert-below",
+                    "x-tree-drag-append"]);
+            this.lastInsertClass = "_noclass";
+        }
+    },
+
+    // private
+    beforeDragDrop : function(target, e, id){
+        this.cancelExpand();
+        return true;
+    },
+
+    // private
+    afterRepair : function(data){
+        if(data && Ext.enableFx){
+            data.node.ui.highlight();
+        }
+        this.hideProxy();
+    }    
+});
+
+}/**
+ * @class Ext.tree.TreeDragZone
+ * @extends Ext.dd.DragZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dragging
+ * @param {Object} config
+ */
+if(Ext.dd.DragZone){
+Ext.tree.TreeDragZone = function(tree, config){
+    Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config);
+    /**
+    * The TreePanel for this drag zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+};
+
+Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    // private
+    onBeforeDrag : function(data, e){
+        var n = data.node;
+        return n && n.draggable && !n.disabled;
+    },
+
+    // private
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.tree.getSelectionModel().select(data.node);
+        this.tree.eventModel.disable();
+        this.proxy.update("");
+        data.node.ui.appendDDGhost(this.proxy.ghost.dom);
+        this.tree.fireEvent("startdrag", this.tree, data.node, e);
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return data.node.ui.getDDRepairXY();
+    },
+
+    // private
+    onEndDrag : function(data, e){
+        this.tree.eventModel.enable.defer(100, this.tree.eventModel);
+        this.tree.fireEvent("enddrag", this.tree, data.node, e);
+    },
+
+    // private
+    onValidDrop : function(dd, e, id){
+        this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e);
+        this.hideProxy();
+    },
+
+    // private
+    beforeInvalidDrop : function(e, id){
+        // this scrolls the original position back into view
+        var sm = this.tree.getSelectionModel();
+        sm.clearSelections();
+        sm.select(this.dragData.node);
+    },
+    
+    // private
+    afterRepair : function(){
+        if (Ext.enableFx && this.tree.hlDrop) {
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    }
+});
+}/**
+ * @class Ext.tree.TreeEditor
+ * @extends Ext.Editor
+ * Provides editor functionality for inline tree node editing.  Any valid {@link Ext.form.Field} subclass can be used
+ * as the editor field.
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} fieldConfig (optional) Either a prebuilt {@link Ext.form.Field} instance or a Field config object
+ * that will be applied to the default field instance (defaults to a {@link Ext.form.TextField}).
+ * @param {Object} config (optional) A TreeEditor config object
+ */
+Ext.tree.TreeEditor = function(tree, fc, config){
+    fc = fc || {};
+    var field = fc.events ? fc : new Ext.form.TextField(fc);
+    Ext.tree.TreeEditor.superclass.constructor.call(this, field, config);
+
+    this.tree = tree;
+
+    if(!tree.rendered){
+        tree.on('render', this.initEditor, this);
+    }else{
+        this.initEditor(tree);
+    }
+};
+
+Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "l-l").
+     */
+    alignment: "l-l",
+    // inherit
+    autoSize: false,
+    /**
+     * @cfg {Boolean} hideEl
+     * True to hide the bound element while the editor is displayed (defaults to false)
+     */
+    hideEl : false,
+    /**
+     * @cfg {String} cls
+     * CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")
+     */
+    cls: "x-small-editor x-tree-editor",
+    /**
+     * @cfg {Boolean} shim
+     * True to shim the editor if selects/iframes could be displayed beneath it (defaults to false)
+     */
+    shim:false,
+    // inherit
+    shadow:"frame",
+    /**
+     * @cfg {Number} maxWidth
+     * The maximum width in pixels of the editor field (defaults to 250).  Note that if the maxWidth would exceed
+     * the containing tree element's size, it will be automatically limited for you to the container width, taking
+     * scroll and client offsets into account prior to each edit.
+     */
+    maxWidth: 250,
+    /**
+     * @cfg {Number} editDelay The number of milliseconds between clicks to register a double-click that will trigger
+     * editing on the current node (defaults to 350).  If two clicks occur on the same node within this time span,
+     * the editor for the node will display, otherwise it will be processed as a regular click.
+     */
+    editDelay : 350,
+
+    initEditor : function(tree){
+        tree.on('beforeclick', this.beforeNodeClick, this);
+        tree.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);
+    },
+
+    // private
+    fitToTree : function(ed, el){
+        var td = this.tree.getTreeEl().dom, nd = el.dom;
+        if(td.scrollLeft >  nd.offsetLeft){ // ensure the node left point is visible
+            td.scrollLeft = nd.offsetLeft;
+        }
+        var w = Math.min(
+                this.maxWidth,
+                (td.clientWidth > 20 ? td.clientWidth : td.offsetWidth) - Math.max(0, nd.offsetLeft-td.scrollLeft) - /*cushion*/5);
+        this.setSize(w, '');
+    },
+
+    /**
+     * Edit the text of the passed {@link Ext.tree.TreeNode TreeNode}.
+     * @param node {Ext.tree.TreeNode} The TreeNode to edit. The TreeNode must be {@link Ext.tree.TreeNode#editable editable}.
+     */
+    triggerEdit : function(node, defer){
+        this.completeEdit();
+		if(node.attributes.editable !== false){
+           /**
+            * The {@link Ext.tree.TreeNode TreeNode} this editor is bound to. Read-only.
+            * @type Ext.tree.TreeNode
+            * @property editNode
+            */
+			this.editNode = node;
+            if(this.tree.autoScroll){
+                Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
+            }
+            var value = node.text || '';
+            if (!Ext.isGecko && Ext.isEmpty(node.text)){
+                node.setText('&#160;');
+            }
+            this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]);
+            return false;
+        }
+    },
+
+    // private
+    bindScroll : function(){
+        this.tree.getTreeEl().on('scroll', this.cancelEdit, this);
+    },
+
+    // private
+    beforeNodeClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+        if(this.tree.getSelectionModel().isSelected(node)){
+            e.stopEvent();
+            return this.triggerEdit(node);
+        }
+    },
+
+    onNodeDblClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+    },
+
+    // private
+    updateNode : function(ed, value){
+        this.tree.getTreeEl().un('scroll', this.cancelEdit, this);
+        this.editNode.setText(value);
+    },
+
+    // private
+    onHide : function(){
+        Ext.tree.TreeEditor.superclass.onHide.call(this);
+        if(this.editNode){
+            this.editNode.ui.focus.defer(50, this.editNode.ui);
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var k = e.getKey();
+        if(k == e.ESC){
+            e.stopEvent();
+            this.cancelEdit();
+        }else if(k == e.ENTER && !e.hasModifier()){
+            e.stopEvent();
+            this.completeEdit();
+        }
+    }
+});/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+
+var swfobject = function() {
+    
+    var UNDEF = "undefined",
+        OBJECT = "object",
+        SHOCKWAVE_FLASH = "Shockwave Flash",
+        SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+        FLASH_MIME_TYPE = "application/x-shockwave-flash",
+        EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+        ON_READY_STATE_CHANGE = "onreadystatechange",
+        
+        win = window,
+        doc = document,
+        nav = navigator,
+        
+        plugin = false,
+        domLoadFnArr = [main],
+        regObjArr = [],
+        objIdArr = [],
+        listenersArr = [],
+        storedAltContent,
+        storedAltContentId,
+        storedCallbackFn,
+        storedCallbackObj,
+        isDomLoaded = false,
+        isExpressInstallActive = false,
+        dynamicStylesheet,
+        dynamicStylesheetMedia,
+        autoHideShow = true,
+    
+    /* Centralized function for browser feature detection
+        - User agent string detection is only used when no good alternative is possible
+        - Is executed directly for optimal performance
+    */  
+    ua = function() {
+        var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+            u = nav.userAgent.toLowerCase(),
+            p = nav.platform.toLowerCase(),
+            windows = p ? /win/.test(p) : /win/.test(u),
+            mac = p ? /mac/.test(p) : /mac/.test(u),
+            webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+            ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+            playerVersion = [0,0,0],
+            d = null;
+        if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+            d = nav.plugins[SHOCKWAVE_FLASH].description;
+            if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+                plugin = true;
+                ie = false; // cascaded feature detection for Internet Explorer
+                d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+                playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+                playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+                playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+            }
+        }
+        else if (typeof win.ActiveXObject != UNDEF) {
+            try {
+                var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+                if (a) { // a will return null when ActiveX is disabled
+                    d = a.GetVariable("$version");
+                    if (d) {
+                        ie = true; // cascaded feature detection for Internet Explorer
+                        d = d.split(" ")[1].split(",");
+                        playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+            }
+            catch(e) {}
+        }
+        return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+    }(),
+    
+    /* Cross-browser onDomLoad
+        - Will fire an event as soon as the DOM of a web page is loaded
+        - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+        - Regular onload serves as fallback
+    */ 
+    onDomLoad = function() {
+        if (!ua.w3) { return; }
+        if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically 
+            callDomLoadFunctions();
+        }
+        if (!isDomLoaded) {
+            if (typeof doc.addEventListener != UNDEF) {
+                doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+            }       
+            if (ua.ie && ua.win) {
+                doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+                    if (doc.readyState == "complete") {
+                        doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+                        callDomLoadFunctions();
+                    }
+                });
+                if (win == top) { // if not inside an iframe
+                    (function(){
+                        if (isDomLoaded) { return; }
+                        try {
+                            doc.documentElement.doScroll("left");
+                        }
+                        catch(e) {
+                            setTimeout(arguments.callee, 0);
+                            return;
+                        }
+                        callDomLoadFunctions();
+                    })();
+                }
+            }
+            if (ua.wk) {
+                (function(){
+                    if (isDomLoaded) { return; }
+                    if (!/loaded|complete/.test(doc.readyState)) {
+                        setTimeout(arguments.callee, 0);
+                        return;
+                    }
+                    callDomLoadFunctions();
+                })();
+            }
+            addLoadEvent(callDomLoadFunctions);
+        }
+    }();
+    
+    function callDomLoadFunctions() {
+        if (isDomLoaded) { return; }
+        try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+            var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+            t.parentNode.removeChild(t);
+        }
+        catch (e) { return; }
+        isDomLoaded = true;
+        var dl = domLoadFnArr.length;
+        for (var i = 0; i < dl; i++) {
+            domLoadFnArr[i]();
+        }
+    }
+    
+    function addDomLoadEvent(fn) {
+        if (isDomLoaded) {
+            fn();
+        }
+        else { 
+            domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+        }
+    }
+    
+    /* Cross-browser onload
+        - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+        - Will fire an event as soon as a web page including all of its assets are loaded 
+     */
+    function addLoadEvent(fn) {
+        if (typeof win.addEventListener != UNDEF) {
+            win.addEventListener("load", fn, false);
+        }
+        else if (typeof doc.addEventListener != UNDEF) {
+            doc.addEventListener("load", fn, false);
+        }
+        else if (typeof win.attachEvent != UNDEF) {
+            addListener(win, "onload", fn);
+        }
+        else if (typeof win.onload == "function") {
+            var fnOld = win.onload;
+            win.onload = function() {
+                fnOld();
+                fn();
+            };
+        }
+        else {
+            win.onload = fn;
+        }
+    }
+    
+    /* Main function
+        - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+    */
+    function main() { 
+        if (plugin) {
+            testPlayerVersion();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Detect the Flash Player version for non-Internet Explorer browsers
+        - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+          a. Both release and build numbers can be detected
+          b. Avoid wrong descriptions by corrupt installers provided by Adobe
+          c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+        - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+    */
+    function testPlayerVersion() {
+        var b = doc.getElementsByTagName("body")[0];
+        var o = createElement(OBJECT);
+        o.setAttribute("type", FLASH_MIME_TYPE);
+        var t = b.appendChild(o);
+        if (t) {
+            var counter = 0;
+            (function(){
+                if (typeof t.GetVariable != UNDEF) {
+                    var d = t.GetVariable("$version");
+                    if (d) {
+                        d = d.split(" ")[1].split(",");
+                        ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+                else if (counter < 10) {
+                    counter++;
+                    setTimeout(arguments.callee, 10);
+                    return;
+                }
+                b.removeChild(o);
+                t = null;
+                matchVersions();
+            })();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Perform Flash Player and SWF version matching; static publishing only
+    */
+    function matchVersions() {
+        var rl = regObjArr.length;
+        if (rl > 0) {
+            for (var i = 0; i < rl; i++) { // for each registered object element
+                var id = regObjArr[i].id;
+                var cb = regObjArr[i].callbackFn;
+                var cbObj = {success:false, id:id};
+                if (ua.pv[0] > 0) {
+                    var obj = getElementById(id);
+                    if (obj) {
+                        if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+                            setVisibility(id, true);
+                            if (cb) {
+                                cbObj.success = true;
+                                cbObj.ref = getObjectById(id);
+                                cb(cbObj);
+                            }
+                        }
+                        else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+                            var att = {};
+                            att.data = regObjArr[i].expressInstall;
+                            att.width = obj.getAttribute("width") || "0";
+                            att.height = obj.getAttribute("height") || "0";
+                            if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+                            if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+                            // parse HTML object param element's name-value pairs
+                            var par = {};
+                            var p = obj.getElementsByTagName("param");
+                            var pl = p.length;
+                            for (var j = 0; j < pl; j++) {
+                                if (p[j].getAttribute("name").toLowerCase() != "movie") {
+                                    par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+                                }
+                            }
+                            showExpressInstall(att, par, id, cb);
+                        }
+                        else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+                            displayAltContent(obj);
+                            if (cb) { cb(cbObj); }
+                        }
+                    }
+                }
+                else {  // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+                    setVisibility(id, true);
+                    if (cb) {
+                        var o = getObjectById(id); // test whether there is an HTML object element or not
+                        if (o && typeof o.SetVariable != UNDEF) { 
+                            cbObj.success = true;
+                            cbObj.ref = o;
+                        }
+                        cb(cbObj);
+                    }
+                }
+            }
+        }
+    }
+    
+    function getObjectById(objectIdStr) {
+        var r = null;
+        var o = getElementById(objectIdStr);
+        if (o && o.nodeName == "OBJECT") {
+            if (typeof o.SetVariable != UNDEF) {
+                r = o;
+            }
+            else {
+                var n = o.getElementsByTagName(OBJECT)[0];
+                if (n) {
+                    r = n;
+                }
+            }
+        }
+        return r;
+    }
+    
+    /* Requirements for Adobe Express Install
+        - only one instance can be active at a time
+        - fp 6.0.65 or higher
+        - Win/Mac OS only
+        - no Webkit engines older than version 312
+    */
+    function canExpressInstall() {
+        return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+    }
+    
+    /* Show the Adobe Express Install dialog
+        - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+    */
+    function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+        isExpressInstallActive = true;
+        storedCallbackFn = callbackFn || null;
+        storedCallbackObj = {success:false, id:replaceElemIdStr};
+        var obj = getElementById(replaceElemIdStr);
+        if (obj) {
+            if (obj.nodeName == "OBJECT") { // static publishing
+                storedAltContent = abstractAltContent(obj);
+                storedAltContentId = null;
+            }
+            else { // dynamic publishing
+                storedAltContent = obj;
+                storedAltContentId = replaceElemIdStr;
+            }
+            att.id = EXPRESS_INSTALL_ID;
+            if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+            if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+            doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+            var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+                fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+            if (typeof par.flashvars != UNDEF) {
+                par.flashvars += "&" + fv;
+            }
+            else {
+                par.flashvars = fv;
+            }
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            if (ua.ie && ua.win && obj.readyState != 4) {
+                var newObj = createElement("div");
+                replaceElemIdStr += "SWFObjectNew";
+                newObj.setAttribute("id", replaceElemIdStr);
+                obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        obj.parentNode.removeChild(obj);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            createSWF(att, par, replaceElemIdStr);
+        }
+    }
+    
+    /* Functions to abstract and display alternative content
+    */
+    function displayAltContent(obj) {
+        if (ua.ie && ua.win && obj.readyState != 4) {
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            var el = createElement("div");
+            obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+            el.parentNode.replaceChild(abstractAltContent(obj), el);
+            obj.style.display = "none";
+            (function(){
+                if (obj.readyState == 4) {
+                    obj.parentNode.removeChild(obj);
+                }
+                else {
+                    setTimeout(arguments.callee, 10);
+                }
+            })();
+        }
+        else {
+            obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+        }
+    } 
+
+    function abstractAltContent(obj) {
+        var ac = createElement("div");
+        if (ua.win && ua.ie) {
+            ac.innerHTML = obj.innerHTML;
+        }
+        else {
+            var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+            if (nestedObj) {
+                var c = nestedObj.childNodes;
+                if (c) {
+                    var cl = c.length;
+                    for (var i = 0; i < cl; i++) {
+                        if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+                            ac.appendChild(c[i].cloneNode(true));
+                        }
+                    }
+                }
+            }
+        }
+        return ac;
+    }
+    
+    /* Cross-browser dynamic SWF creation
+    */
+    function createSWF(attObj, parObj, id) {
+        var r, el = getElementById(id);
+        if (ua.wk && ua.wk < 312) { return r; }
+        if (el) {
+            if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+                attObj.id = id;
+            }
+            if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+                var att = "";
+                for (var i in attObj) {
+                    if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+                        if (i.toLowerCase() == "data") {
+                            parObj.movie = attObj[i];
+                        }
+                        else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            att += ' class="' + attObj[i] + '"';
+                        }
+                        else if (i.toLowerCase() != "classid") {
+                            att += ' ' + i + '="' + attObj[i] + '"';
+                        }
+                    }
+                }
+                var par = "";
+                for (var j in parObj) {
+                    if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+                        par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+                    }
+                }
+                el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+                objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+                r = getElementById(attObj.id);  
+            }
+            else { // well-behaving browsers
+                var o = createElement(OBJECT);
+                o.setAttribute("type", FLASH_MIME_TYPE);
+                for (var m in attObj) {
+                    if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+                        if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            o.setAttribute("class", attObj[m]);
+                        }
+                        else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+                            o.setAttribute(m, attObj[m]);
+                        }
+                    }
+                }
+                for (var n in parObj) {
+                    if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+                        createObjParam(o, n, parObj[n]);
+                    }
+                }
+                el.parentNode.replaceChild(o, el);
+                r = o;
+            }
+        }
+        return r;
+    }
+    
+    function createObjParam(el, pName, pValue) {
+        var p = createElement("param");
+        p.setAttribute("name", pName);  
+        p.setAttribute("value", pValue);
+        el.appendChild(p);
+    }
+    
+    /* Cross-browser SWF removal
+        - Especially needed to safely and completely remove a SWF in Internet Explorer
+    */
+    function removeSWF(id) {
+        var obj = getElementById(id);
+        if (obj && obj.nodeName == "OBJECT") {
+            if (ua.ie && ua.win) {
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        removeObjectInIE(id);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            else {
+                obj.parentNode.removeChild(obj);
+            }
+        }
+    }
+    
+    function removeObjectInIE(id) {
+        var obj = getElementById(id);
+        if (obj) {
+            for (var i in obj) {
+                if (typeof obj[i] == "function") {
+                    obj[i] = null;
+                }
+            }
+            obj.parentNode.removeChild(obj);
+        }
+    }
+    
+    /* Functions to optimize JavaScript compression
+    */
+    function getElementById(id) {
+        var el = null;
+        try {
+            el = doc.getElementById(id);
+        }
+        catch (e) {}
+        return el;
+    }
+    
+    function createElement(el) {
+        return doc.createElement(el);
+    }
+    
+    /* Updated attachEvent function for Internet Explorer
+        - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+    */  
+    function addListener(target, eventType, fn) {
+        target.attachEvent(eventType, fn);
+        listenersArr[listenersArr.length] = [target, eventType, fn];
+    }
+    
+    /* Flash Player and SWF content version matching
+    */
+    function hasPlayerVersion(rv) {
+        var pv = ua.pv, v = rv.split(".");
+        v[0] = parseInt(v[0], 10);
+        v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+        v[2] = parseInt(v[2], 10) || 0;
+        return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+    }
+    
+    /* Cross-browser dynamic CSS creation
+        - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+    */  
+    function createCSS(sel, decl, media, newStyle) {
+        if (ua.ie && ua.mac) { return; }
+        var h = doc.getElementsByTagName("head")[0];
+        if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+        var m = (media && typeof media == "string") ? media : "screen";
+        if (newStyle) {
+            dynamicStylesheet = null;
+            dynamicStylesheetMedia = null;
+        }
+        if (!dynamicStylesheet || dynamicStylesheetMedia != m) { 
+            // create dynamic stylesheet + get a global reference to it
+            var s = createElement("style");
+            s.setAttribute("type", "text/css");
+            s.setAttribute("media", m);
+            dynamicStylesheet = h.appendChild(s);
+            if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+                dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+            }
+            dynamicStylesheetMedia = m;
+        }
+        // add style rule
+        if (ua.ie && ua.win) {
+            if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+                dynamicStylesheet.addRule(sel, decl);
+            }
+        }
+        else {
+            if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+                dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+            }
+        }
+    }
+    
+    function setVisibility(id, isVisible) {
+        if (!autoHideShow) { return; }
+        var v = isVisible ? "visible" : "hidden";
+        if (isDomLoaded && getElementById(id)) {
+            getElementById(id).style.visibility = v;
+        }
+        else {
+            createCSS("#" + id, "visibility:" + v);
+        }
+    }
+
+    /* Filter to avoid XSS attacks
+    */
+    function urlEncodeIfNecessary(s) {
+        var regex = /[\\\"<>\.;]/;
+        var hasBadChars = regex.exec(s) != null;
+        return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+    }
+    
+    /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+    */
+    var cleanup = function() {
+        if (ua.ie && ua.win) {
+            window.attachEvent("onunload", function() {
+                // remove listeners to avoid memory leaks
+                var ll = listenersArr.length;
+                for (var i = 0; i < ll; i++) {
+                    listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+                }
+                // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+                var il = objIdArr.length;
+                for (var j = 0; j < il; j++) {
+                    removeSWF(objIdArr[j]);
+                }
+                // cleanup library's main closures to avoid memory leaks
+                for (var k in ua) {
+                    ua[k] = null;
+                }
+                ua = null;
+                for (var l in swfobject) {
+                    swfobject[l] = null;
+                }
+                swfobject = null;
+            });
+        }
+    }();
+    
+    return {
+        /* Public API
+            - Reference: http://code.google.com/p/swfobject/wiki/documentation
+        */ 
+        registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+            if (ua.w3 && objectIdStr && swfVersionStr) {
+                var regObj = {};
+                regObj.id = objectIdStr;
+                regObj.swfVersion = swfVersionStr;
+                regObj.expressInstall = xiSwfUrlStr;
+                regObj.callbackFn = callbackFn;
+                regObjArr[regObjArr.length] = regObj;
+                setVisibility(objectIdStr, false);
+            }
+            else if (callbackFn) {
+                callbackFn({success:false, id:objectIdStr});
+            }
+        },
+        
+        getObjectById: function(objectIdStr) {
+            if (ua.w3) {
+                return getObjectById(objectIdStr);
+            }
+        },
+        
+        embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+            var callbackObj = {success:false, id:replaceElemIdStr};
+            if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+                setVisibility(replaceElemIdStr, false);
+                addDomLoadEvent(function() {
+                    widthStr += ""; // auto-convert to string
+                    heightStr += "";
+                    var att = {};
+                    if (attObj && typeof attObj === OBJECT) {
+                        for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+                            att[i] = attObj[i];
+                        }
+                    }
+                    att.data = swfUrlStr;
+                    att.width = widthStr;
+                    att.height = heightStr;
+                    var par = {}; 
+                    if (parObj && typeof parObj === OBJECT) {
+                        for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+                            par[j] = parObj[j];
+                        }
+                    }
+                    if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+                        for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+                            if (typeof par.flashvars != UNDEF) {
+                                par.flashvars += "&" + k + "=" + flashvarsObj[k];
+                            }
+                            else {
+                                par.flashvars = k + "=" + flashvarsObj[k];
+                            }
+                        }
+                    }
+                    if (hasPlayerVersion(swfVersionStr)) { // create SWF
+                        var obj = createSWF(att, par, replaceElemIdStr);
+                        if (att.id == replaceElemIdStr) {
+                            setVisibility(replaceElemIdStr, true);
+                        }
+                        callbackObj.success = true;
+                        callbackObj.ref = obj;
+                    }
+                    else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+                        att.data = xiSwfUrlStr;
+                        showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+                        return;
+                    }
+                    else { // show alternative content
+                        setVisibility(replaceElemIdStr, true);
+                    }
+                    if (callbackFn) { callbackFn(callbackObj); }
+                });
+            }
+            else if (callbackFn) { callbackFn(callbackObj); }
+        },
+        
+        switchOffAutoHideShow: function() {
+            autoHideShow = false;
+        },
+        
+        ua: ua,
+        
+        getFlashPlayerVersion: function() {
+            return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+        },
+        
+        hasFlashPlayerVersion: hasPlayerVersion,
+        
+        createSWF: function(attObj, parObj, replaceElemIdStr) {
+            if (ua.w3) {
+                return createSWF(attObj, parObj, replaceElemIdStr);
+            }
+            else {
+                return undefined;
+            }
+        },
+        
+        showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+            if (ua.w3 && canExpressInstall()) {
+                showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+            }
+        },
+        
+        removeSWF: function(objElemIdStr) {
+            if (ua.w3) {
+                removeSWF(objElemIdStr);
+            }
+        },
+        
+        createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+            if (ua.w3) {
+                createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+            }
+        },
+        
+        addDomLoadEvent: addDomLoadEvent,
+        
+        addLoadEvent: addLoadEvent,
+        
+        getQueryParamValue: function(param) {
+            var q = doc.location.search || doc.location.hash;
+            if (q) {
+                if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+                if (param == null) {
+                    return urlEncodeIfNecessary(q);
+                }
+                var pairs = q.split("&");
+                for (var i = 0; i < pairs.length; i++) {
+                    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+                        return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+                    }
+                }
+            }
+            return "";
+        },
+        
+        // For internal usage only
+        expressInstallCallback: function() {
+            if (isExpressInstallActive) {
+                var obj = getElementById(EXPRESS_INSTALL_ID);
+                if (obj && storedAltContent) {
+                    obj.parentNode.replaceChild(storedAltContent, obj);
+                    if (storedAltContentId) {
+                        setVisibility(storedAltContentId, true);
+                        if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+                    }
+                    if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+                }
+                isExpressInstallActive = false;
+            } 
+        }
+    };
+}();
+/**
+ * @class Ext.FlashComponent
+ * @extends Ext.BoxComponent
+ * @constructor
+ * @xtype flash
+ */
+Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} flashVersion
+     * Indicates the version the flash content was published for. Defaults to <tt>'9.0.45'</tt>.
+     */
+    flashVersion : '9.0.45',
+
+    /**
+     * @cfg {String} backgroundColor
+     * The background color of the chart. Defaults to <tt>'#ffffff'</tt>.
+     */
+    backgroundColor: '#ffffff',
+
+    /**
+     * @cfg {String} wmode
+     * The wmode of the flash object. This can be used to control layering. Defaults to <tt>'opaque'</tt>.
+     */
+    wmode: 'opaque',
+
+    /**
+     * @cfg {String} url
+     * The URL of the chart to include. Defaults to <tt>undefined</tt>.
+     */
+    url: undefined,
+    swfId : undefined,
+    swfWidth: '100%',
+    swfHeight: '100%',
+
+    /**
+     * @cfg {Boolean} expressInstall
+     * True to prompt the user to install flash if not installed. Note that this uses
+     * Ext.FlashComponent.EXPRESS_INSTALL_URL, which should be set to the local resource. Defaults to <tt>false</tt>.
+     */
+    expressInstall: false,
+
+    initComponent : function(){
+        Ext.FlashComponent.superclass.initComponent.call(this);
+
+        this.addEvents('initialize');
+    },
+
+    onRender : function(){
+        Ext.FlashComponent.superclass.onRender.apply(this, arguments);
+
+        var params = {
+            allowScriptAccess: 'always',
+            bgcolor: this.backgroundColor,
+            wmode: this.wmode
+        }, vars = {
+            allowedDomain: document.location.hostname,
+            elementID: this.getId(),
+            eventHandler: 'Ext.FlashEventProxy.onEvent'
+        };
+
+        new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
+            this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
+
+        this.swf = Ext.getDom(this.id);
+        this.el = Ext.get(this.swf);
+    },
+
+    getSwfId : function(){
+        return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID));
+    },
+
+    getId : function(){
+        return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID));
+    },
+
+    onFlashEvent : function(e){
+        switch(e.type){
+            case "swfReady":
+                this.initSwf();
+                return;
+            case "log":
+                return;
+        }
+        e.component = this;
+        this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e);
+    },
+
+    initSwf : function(){
+        this.onSwfReady(!!this.isInitialized);
+        this.isInitialized = true;
+        this.fireEvent('initialize', this);
+    },
+
+    beforeDestroy: function(){
+        if(this.rendered){
+            swfobject.removeSWF(this.swf.id);
+        }
+        Ext.FlashComponent.superclass.beforeDestroy.call(this);
+    },
+
+    onSwfReady : Ext.emptyFn
+});
+
+/**
+ * Sets the url for installing flash if it doesn't exist. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';
+
+Ext.reg('flash', Ext.FlashComponent);/**
+ * @class Ext.FlashProxy
+ * @singleton
+ */
+Ext.FlashEventProxy = {
+    onEvent : function(id, e){
+        var fp = Ext.getCmp(id);
+        if(fp){
+            fp.onFlashEvent(e);
+        }else{
+            arguments.callee.defer(10, this, [id, e]);
+        }
+    }
+}/**
+ * @class Ext.chart.Chart
+ * @extends Ext.FlashComponent
+ * The Ext.chart package provides the capability to visualize data with flash based charting.
+ * Each chart binds directly to an Ext.data.Store enabling automatic updates of the chart.
+ * @constructor
+ * @xtype chart
+ */
+ 
+ Ext.chart.Chart = Ext.extend(Ext.FlashComponent, {
+    refreshBuffer: 100,
+
+    /**
+     * @cfg {Object} chartStyle
+     * Sets styles for this chart. Contains a number of default values. Modifying this property will override
+     * the base styles on the chart.
+     */
+    chartStyle: {
+        padding: 10,
+        animationEnabled: true,
+        font: {
+            name: 'Tahoma',
+            color: 0x444444,
+            size: 11
+        },
+        dataTip: {
+            padding: 5,
+            border: {
+                color: 0x99bbe8,
+                size:1
+            },
+            background: {
+                color: 0xDAE7F6,
+                alpha: .9
+            },
+            font: {
+                name: 'Tahoma',
+                color: 0x15428B,
+                size: 10,
+                bold: true
+            }
+        }
+    },
+    
+    /**
+     * @cfg {String} url
+     * The url to load the chart from. This defaults to Ext.chart.Chart.CHART_URL, which should
+     * be modified to point to the local charts resource.
+     */
+    
+    /**
+     * @cfg {Object} extraStyle
+     * Contains extra styles that will be added or overwritten to the default chartStyle. Defaults to <tt>null</tt>.
+     */
+    extraStyle: null,
+    
+    /**
+     * @cfg {Boolean} disableCaching
+     * True to add a "cache buster" to the end of the chart url. Defaults to true for Opera and IE.
+     */
+    disableCaching: Ext.isIE || Ext.isOpera,
+    disableCacheParam: '_dc',
+
+    initComponent : function(){
+        Ext.chart.Chart.superclass.initComponent.call(this);
+        if(!this.url){
+            this.url = Ext.chart.Chart.CHART_URL;
+        }
+        if(this.disableCaching){
+            this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime()));
+        }
+        this.addEvents(
+            'itemmouseover',
+            'itemmouseout',
+            'itemclick',
+            'itemdoubleclick',
+            'itemdragstart',
+            'itemdrag',
+            'itemdragend'
+        );
+        this.store = Ext.StoreMgr.lookup(this.store);
+    },
+
+    /**
+     * Sets a single style value on the Chart instance.
+     *
+     * @param name {String} Name of the Chart style value to change.
+     * @param value {Object} New value to pass to the Chart style.
+     */
+     setStyle: function(name, value){
+         this.swf.setStyle(name, Ext.encode(value));
+     },
+
+    /**
+     * Resets all styles on the Chart instance.
+     *
+     * @param styles {Object} Initializer for all Chart styles.
+     */
+    setStyles: function(styles){
+        this.swf.setStyles(Ext.encode(styles));
+    },
+
+    /**
+     * Sets the styles on all series in the Chart.
+     *
+     * @param styles {Array} Initializer for all Chart series styles.
+     */
+    setSeriesStyles: function(styles){
+        var s = [];
+        Ext.each(styles, function(style){
+            s.push(Ext.encode(style));
+        });
+        this.swf.setSeriesStyles(s);
+    },
+
+    setCategoryNames : function(names){
+        this.swf.setCategoryNames(names);
+    },
+
+    setTipRenderer : function(fn){
+        var chart = this;
+        this.tipFnName = this.createFnProxy(function(item, index, series){
+            var record = chart.store.getAt(index);
+            return fn(chart, record, index, series);
+        }, this.tipFnName);
+        this.swf.setDataTipFunction(this.tipFnName);
+    },
+
+    setSeries : function(series){
+        this.series = series;
+        this.refresh();
+    },
+
+    /**
+     * Changes the data store bound to this chart and refreshes it.
+     * @param {Store} store The store to bind to this chart
+     */
+    bindStore : function(store, initial){
+        if(!initial && this.store){
+            this.store.un("datachanged", this.refresh, this);
+            this.store.un("add", this.delayRefresh, this);
+            this.store.un("remove", this.delayRefresh, this);
+            this.store.un("update", this.delayRefresh, this);
+            this.store.un("clear", this.refresh, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                datachanged: this.refresh,
+                add: this.delayRefresh,
+                remove: this.delayRefresh,
+                update: this.delayRefresh,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store && !initial){
+            this.refresh();
+        }
+    },
+
+    onSwfReady : function(isReset){
+        Ext.chart.Chart.superclass.onSwfReady.call(this, isReset);
+        this.swf.setType(this.type);
+
+        if(this.chartStyle){
+            this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle));
+        }
+
+        if(this.categoryNames){
+            this.setCategoryNames(this.categoryNames);
+        }
+
+        if(this.tipRenderer){
+            this.setTipRenderer(this.tipRenderer);
+        }
+        if(!isReset){
+            this.bindStore(this.store, true);
+        }
+        this.refresh.defer(10, this);
+    },
+
+    delayRefresh : function(){
+        if(!this.refreshTask){
+            this.refreshTask = new Ext.util.DelayedTask(this.refresh, this);
+        }
+        this.refreshTask.delay(this.refreshBuffer);
+    },
+
+    refresh : function(){
+        var styleChanged = false;
+        // convert the store data into something YUI charts can understand
+        var data = [], rs = this.store.data.items;
+        for(var j = 0, len = rs.length; j < len; j++){
+            data[j] = rs[j].data;
+        }
+        //make a copy of the series definitions so that we aren't
+        //editing them directly.
+        var dataProvider = [];
+        var seriesCount = 0;
+        var currentSeries = null;
+        var i = 0;
+        if(this.series){
+            seriesCount = this.series.length;
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = this.series[i];
+                var clonedSeries = {};
+                for(var prop in currentSeries){
+                    if(prop == "style" && currentSeries.style !== null){
+                        clonedSeries.style = Ext.encode(currentSeries.style);
+                        styleChanged = true;
+                        //we don't want to modify the styles again next time
+                        //so null out the style property.
+                        // this causes issues
+                        // currentSeries.style = null;
+                    } else{
+                        clonedSeries[prop] = currentSeries[prop];
+                    }
+                }
+                dataProvider.push(clonedSeries);
+            }
+        }
+
+        if(seriesCount > 0){
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = dataProvider[i];
+                if(!currentSeries.type){
+                    currentSeries.type = this.type;
+                }
+                currentSeries.dataProvider = data;
+            }
+        } else{
+            dataProvider.push({type: this.type, dataProvider: data});
+        }
+        this.swf.setDataProvider(dataProvider);
+    },
+
+    createFnProxy : function(fn, old){
+        if(old){
+            delete window[old];
+        }
+        var fnName = "extFnProxy" + (++Ext.chart.Chart.PROXY_FN_ID);
+        window[fnName] = fn;
+        return fnName;
+    },
+    
+    onDestroy: function(){
+        Ext.chart.Chart.superclass.onDestroy.call(this);
+        delete window[this.tipFnName];
+    }
+});
+Ext.reg('chart', Ext.chart.Chart);
+Ext.chart.Chart.PROXY_FN_ID = 0;
+
+/**
+ * Sets the url to load the chart from. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf';
+
+/**
+ * @class Ext.chart.PieChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype piechart
+ */
+Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, {
+    type: 'pie',
+
+    onSwfReady : function(isReset){
+        Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset);
+
+        this.setDataField(this.dataField);
+        this.setCategoryField(this.categoryField);
+    },
+
+    setDataField : function(field){
+        this.dataField = field;
+        this.swf.setDataField(field);
+    },
+
+    setCategoryField : function(field){
+        this.categoryField = field;
+        this.swf.setCategoryField(field);
+    }
+});
+Ext.reg('piechart', Ext.chart.PieChart);
+
+/**
+ * @class Ext.chart.CartesianChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype cartesianchart
+ */
+Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, {
+    onSwfReady : function(isReset){
+        Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset);
+
+        if(this.xField){
+            this.setXField(this.xField);
+        }
+        if(this.yField){
+            this.setYField(this.yField);
+        }
+        if(this.xAxis){
+            this.setXAxis(this.xAxis);
+        }
+        if(this.yAxis){
+            this.setYAxis(this.yAxis);
+        }
+    },
+
+    setXField : function(value){
+        this.xField = value;
+        this.swf.setHorizontalField(value);
+    },
+
+    setYField : function(value){
+        this.yField = value;
+        this.swf.setVerticalField(value);
+    },
+
+    setXAxis : function(value){
+        this.xAxis = this.createAxis('xAxis', value);
+        this.swf.setHorizontalAxis(this.xAxis);
+    },
+
+    setYAxis : function(value){
+        this.yAxis = this.createAxis('yAxis', value);
+        this.swf.setVerticalAxis(this.yAxis);
+    },
+
+    createAxis : function(axis, value){
+        var o = Ext.apply({}, value), oldFn = null;
+        if(this[axis]){
+            oldFn = this[axis].labelFunction;
+        }
+        if(o.labelRenderer){
+            var fn = o.labelRenderer;
+            o.labelFunction = this.createFnProxy(function(v){
+                return fn(v);
+            }, oldFn);
+            delete o.labelRenderer;
+        }
+        return o;
+    }
+});
+Ext.reg('cartesianchart', Ext.chart.CartesianChart);
+
+/**
+ * @class Ext.chart.LineChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype linechart
+ */
+Ext.chart.LineChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'line'
+});
+Ext.reg('linechart', Ext.chart.LineChart);
+
+/**
+ * @class Ext.chart.ColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype columnchart
+ */
+Ext.chart.ColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'column'
+});
+Ext.reg('columnchart', Ext.chart.ColumnChart);
+
+/**
+ * @class Ext.chart.StackedColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedcolumnchart
+ */
+Ext.chart.StackedColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackcolumn'
+});
+Ext.reg('stackedcolumnchart', Ext.chart.StackedColumnChart);
+
+/**
+ * @class Ext.chart.BarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype barchart
+ */
+Ext.chart.BarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'bar'
+});
+Ext.reg('barchart', Ext.chart.BarChart);
+
+/**
+ * @class Ext.chart.StackedBarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedbarchart
+ */
+Ext.chart.StackedBarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackbar'
+});
+Ext.reg('stackedbarchart', Ext.chart.StackedBarChart);
+
+
+
+/**
+ * @class Ext.chart.Axis
+ * Defines a CartesianChart's vertical or horizontal axis.
+ * @constructor
+ */
+Ext.chart.Axis = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.chart.Axis.prototype =
+{
+    /**
+     * The type of axis.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The direction in which the axis is drawn. May be "horizontal" or "vertical".
+     *
+     * @property orientation
+     * @type String
+     */
+    orientation: "horizontal",
+
+    /**
+     * If true, the items on the axis will be drawn in opposite direction.
+     *
+     * @property reverse
+     * @type Boolean
+     */
+    reverse: false,
+
+    /**
+     * A string reference to the globally-accessible function that may be called to
+     * determine each of the label values for this axis.
+     *
+     * @property labelFunction
+     * @type String
+     */
+    labelFunction: null,
+
+    /**
+     * If true, labels that overlap previously drawn labels on the axis will be hidden.
+     *
+     * @property hideOverlappingLabels
+     * @type Boolean
+     */
+    hideOverlappingLabels: true
+};
+
+/**
+ * @class Ext.chart.NumericAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in numeric values.
+ * @constructor
+ */
+Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, {
+    type: "numeric",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Number
+     */
+    minimum: NaN,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: NaN,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property minorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true,
+
+    /**
+     * If true, and the bounds are calculated automatically, either the minimum or
+     * maximum will be set to zero.
+     *
+     * @property alwaysShowZero
+     * @type Boolean
+     */
+    alwaysShowZero: true,
+
+    /**
+     * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
+     *
+     * @property scale
+     * @type String
+     */
+    scale: "linear"
+});
+
+/**
+ * @class Ext.chart.TimeAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in time-based values.
+ * @constructor
+ */
+Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, {
+    type: "time",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Date
+     */
+    minimum: null,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: null,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The time unit used by the majorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    majorTimeUnit: null,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * The time unit used by the minorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    minorTimeUnit: null,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true
+});
+
+/**
+ * @class Ext.chart.CategoryAxis
+ * @extends Ext.chart.Axis
+ * A type of axis that displays items in categories.
+ * @constructor
+ */
+Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, {
+    type: "category",
+
+    /**
+     * A list of category names to display along this axis.
+     *
+     * @property categoryNames
+     * @type Array
+     */
+    categoryNames: null
+});
+
+/**
+ * @class Ext.chart.Series
+ * Series class for the charts widget.
+ * @constructor
+ */
+Ext.chart.Series = function(config) { Ext.apply(this, config); };
+
+Ext.chart.Series.prototype =
+{
+    /**
+     * The type of series.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The human-readable name of the series.
+     *
+     * @property displayName
+     * @type String
+     */
+    displayName: null
+};
+
+/**
+ * @class Ext.chart.CartesianSeries
+ * @extends Ext.chart.Series
+ * CartesianSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, {
+    /**
+     * The field used to access the x-axis value from the items from the data source.
+     *
+     * @property xField
+     * @type String
+     */
+    xField: null,
+
+    /**
+     * The field used to access the y-axis value from the items from the data source.
+     *
+     * @property yField
+     * @type String
+     */
+    yField: null
+});
+
+/**
+ * @class Ext.chart.ColumnSeries
+ * @extends Ext.chart.CartesianSeries
+ * ColumnSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.ColumnSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "column"
+});
+
+/**
+ * @class Ext.chart.LineSeries
+ * @extends Ext.chart.CartesianSeries
+ * LineSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.LineSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "line"
+});
+
+/**
+ * @class Ext.chart.BarSeries
+ * @extends Ext.chart.CartesianSeries
+ * BarSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.BarSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "bar"
+});
+
+
+/**
+ * @class Ext.chart.PieSeries
+ * @extends Ext.chart.Series
+ * PieSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, {
+    type: "pie",
+    dataField: null,
+    categoryField: null
+});/**
+ * @class Ext.layout.MenuLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.</p>
+ */
+ Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize: true,
+
+    setContainer : function(ct){
+        this.monitorResize = !ct.floating;
+        Ext.layout.MenuLayout.superclass.setContainer.call(this, ct);
+    },
+
+    renderItem : function(c, position, target){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate(
+                '<li id="{itemId}" class="{itemCls}">',
+                    '<tpl if="needsIcon">',
+                        '<img src="{icon}" class="{iconCls}"/>',
+                    '</tpl>',
+                '</li>'
+            );
+        }
+
+        if(c && !c.rendered){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            var a = this.getItemArgs(c);
+
+//          The Component's positionEl is the <li> it is rendered into
+            c.render(c.positionEl = position ?
+                this.itemTpl.insertBefore(position, a, true) :
+                this.itemTpl.append(target, a, true));
+
+//          Link the containing <li> to the item.
+            c.positionEl.menuItemId = c.itemId || c.id;
+
+//          If rendering a regular Component, and it needs an icon,
+//          move the Component rightwards.
+            if (!a.isMenuItem && a.needsIcon) {
+                c.positionEl.addClass('x-menu-list-item-indent');
+            }
+        }else if(c && !this.isValidParent(c, target)){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getActionEl().dom, position || null);
+        }
+    },
+
+    getItemArgs: function(c) {
+        var isMenuItem = c instanceof Ext.menu.Item;
+        return {
+            isMenuItem: isMenuItem,
+            needsIcon: !isMenuItem && (c.icon || c.iconCls),
+            icon: c.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: 'x-menu-item-icon ' + (c.iconCls || ''),
+            itemId: 'x-menu-el-' + c.id,
+            itemCls: 'x-menu-list-item ' + (this.extraCls || '')
+        };
+    },
+
+//  Valid if the Component is in a <li> which is part of our target <ul>
+    isValidParent: function(c, target) {
+        return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target);
+    },
+
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+        this.doAutoSize();
+    },
+
+    doAutoSize : function(){
+        var ct = this.container, w = ct.width;
+        if(ct.floating){
+            if(w){
+                ct.setWidth(w);
+            }else if(Ext.isIE){
+                ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8) ? 'auto' : ct.minWidth);
+                var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc
+                ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr'));
+            }
+        }
+    }
+});
+Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
+
+/**
+ * @class Ext.menu.Menu
+ * @extends Ext.Container
+ * <p>A menu object.  This is the container to which you may add menu items.  Menu can also serve as a base class
+ * when you want a specialized menu based off of another component (like {@link Ext.menu.DateMenu} for example).</p>
+ * <p>Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Component}s.</p>
+ * <p>To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items}
+ * specify <tt>iconCls: 'no-icon'</tt>.  This reserves a space for an icon, and indents the Component in line
+ * with the other menu items.  See {@link Ext.form.ComboBox}.{@link Ext.form.ComboBox#getListParent getListParent}
+ * for an example.</p>
+ * <p>By default, Menus are absolutely positioned, floating Components. By configuring a Menu with
+ * <b><tt>{@link #floating}:false</tt></b>, a Menu may be used as child of a Container.</p>
+ *
+ * @xtype menu
+ */
+Ext.menu.Menu = Ext.extend(Ext.Container, {
+    /**
+     * @cfg {Object} defaults
+     * A config object that will be applied to all items added to this container either via the {@link #items}
+     * config or via the {@link #add} method.  The defaults config can contain any number of
+     * name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the menu.
+     */
+    /**
+     * @cfg {Mixed} items
+     * An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items},
+     * or general {@link Ext.Component Component}s.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120)
+     */
+    minWidth : 120,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides")
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of
+     * this menu (defaults to "tl-tr?")
+     */
+    subMenuAlign : "tl-tr?",
+    /**
+     * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu
+     * relative to its element of origin (defaults to "tl-bl?")
+     */
+    defaultAlign : "tl-bl?",
+    /**
+     * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false)
+     */
+    allowOtherMenus : false,
+    /**
+     * @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays
+     * a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false).
+     */
+    ignoreParentClicks : false,
+    /**
+     * @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true).
+     */
+    enableScrolling: true,
+    /**
+     * @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null).
+     */
+    maxHeight: null,
+    /**
+     * @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24).
+     */
+    scrollIncrement: 24,
+    /**
+     * @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true).
+     */
+    showSeparator: true,
+    /**
+     * @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to
+     * change the default Menu popup position after aligning according to the {@link #defaultAlign}
+     * configuration. Defaults to <tt>[0, 0]</tt>.
+     */
+    defaultOffsets : [0, 0],
+
+
+    /**
+     * @cfg {Boolean} floating
+     * May be specified as false to create a Menu which may be used as a child item of another Container
+     * instead of a free-floating {@link Ext.Layer Layer}. (defaults to true).
+     */
+    floating: true,         // Render as a Layer by default
+
+    // private
+    hidden: true,
+    layout: 'menu',
+    hideMode: 'offsets',    // Important for laying out Components
+    scrollerHeight: 8,
+    autoLayout: true,       // Provided for backwards compat
+    defaultType: 'menuitem',
+
+    initComponent: function(){
+        if(Ext.isArray(this.initialConfig)){
+            Ext.apply(this, {items:this.initialConfig});
+        }
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this menu is clicked (or when the enter key is pressed while it is active)
+             * @param {Ext.menu.Menu} this
+            * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event mouseover
+             * Fires when the mouse is hovering over this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseout',
+            /**
+             * @event itemclick
+             * Fires when a menu item contained in this menu is clicked
+             * @param {Ext.menu.BaseItem} baseItem The BaseItem that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'itemclick'
+        );
+        Ext.menu.MenuMgr.register(this);
+        if(this.floating){
+            Ext.EventManager.onWindowResize(this.hide, this);
+        }else{
+            if(this.initialConfig.hidden !== false){
+                this.hidden = false;
+            }
+            this.internalDefaults = {hideOnClick: false};
+        }
+        Ext.menu.Menu.superclass.initComponent.call(this);
+        if(this.autoLayout){
+            this.on({
+                add: this.doLayout,
+                remove: this.doLayout,
+                scope: this
+            });
+        }
+    },
+
+    //private
+    getLayoutTarget : function() {
+        return this.ul;
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!ct){
+            ct = Ext.getBody();
+        }
+
+        var dh = {
+            id: this.getId(),
+            cls: 'x-menu ' + ((this.floating) ? 'x-menu-floating x-layer ' : '') + (this.cls || '') + (this.plain ? ' x-menu-plain' : '') + (this.showSeparator ? '' : ' x-menu-nosep'),
+            style: this.style,
+            cn: [
+                {tag: 'a', cls: 'x-menu-focus', href: '#', onclick: 'return false;', tabIndex: '-1'},
+                {tag: 'ul', cls: 'x-menu-list'}
+            ]
+        };
+        if(this.floating){
+            this.el = new Ext.Layer({
+                shadow: this.shadow,
+                dh: dh,
+                constrain: false,
+                parentEl: ct,
+                zindex:15000
+            });
+        }else{
+            this.el = ct.createChild(dh);
+        }
+        Ext.menu.Menu.superclass.onRender.call(this, ct, position);
+
+        if(!this.keyNav){
+            this.keyNav = new Ext.menu.MenuNav(this);
+        }
+        // generic focus element
+        this.focusEl = this.el.child('a.x-menu-focus');
+        this.ul = this.el.child('ul.x-menu-list');
+        this.mon(this.ul, {
+            scope: this,
+            click: this.onClick,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+        if(this.enableScrolling){
+            this.mon(this.el, {
+                scope: this,
+                delegate: '.x-menu-scroller',
+                click: this.onScroll,
+                mouseover: this.deactivateActive
+            });
+        }
+    },
+
+    // private
+    findTargetItem : function(e){
+        var t = e.getTarget(".x-menu-list-item", this.ul, true);
+        if(t && t.menuItemId){
+            return this.items.get(t.menuItemId);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.isFormField){
+                this.setActiveItem(t);
+            }else{
+                if(t.menu && this.ignoreParentClicks){
+                    t.expandMenu();
+                    e.preventDefault();
+                }else if(t.onClick){
+                    t.onClick(e);
+                    this.fireEvent("click", this, t, e);
+                }
+            }
+        }
+    },
+
+    // private
+    setActiveItem : function(item, autoExpand){
+        if(item != this.activeItem){
+            this.deactivateActive();
+            if((this.activeItem = item).isFormField){
+                item.focus();
+            }else{
+                item.activate(autoExpand);
+            }
+        }else if(autoExpand){
+            item.expandMenu();
+        }
+    },
+
+    deactivateActive: function(){
+        var a = this.activeItem;
+        if(a){
+            if(a.isFormField){
+                //Fields cannot deactivate, but Combos must collapse
+                if(a.collapse){
+                    a.collapse();
+                }
+            }else{
+                a.deactivate();
+            }
+            delete this.activeItem;
+        }
+    },
+
+    // private
+    tryActivate : function(start, step){
+        var items = this.items;
+        for(var i = start, len = items.length; i >= 0 && i < len; i+= step){
+            var item = items.get(i);
+            if(!item.disabled && (item.canActivate || item.isFormField)){
+                this.setActiveItem(item, false);
+                return item;
+            }
+        }
+        return false;
+    },
+
+    // private
+    onMouseOver : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.canActivate && !t.disabled){
+                this.setActiveItem(t, true);
+            }
+        }
+        this.over = true;
+        this.fireEvent("mouseover", this, e, t);
+    },
+
+    // private
+    onMouseOut : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t == this.activeItem && t.shouldDeactivate && t.shouldDeactivate(e)){
+                this.activeItem.deactivate();
+                delete this.activeItem;
+            }
+        }
+        this.over = false;
+        this.fireEvent("mouseout", this, e, t);
+    },
+
+    // private
+    onScroll: function(e, t){
+        if(e){
+            e.stopEvent();
+        }
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        ul.scrollTop += this.scrollIncrement * (top ? -1 : 1);
+        if(top ? ul.scrollTop <= 0 : ul.scrollTop + this.activeMax >= ul.scrollHeight){
+           this.onScrollerOut(null, t);
+        }
+    },
+
+    // private
+    onScrollerIn: function(e, t){
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){
+            Ext.fly(t).addClass(['x-menu-item-active', 'x-menu-scroller-active']);
+        }
+    },
+
+    // private
+    onScrollerOut: function(e, t){
+        Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']);
+    },
+
+    /**
+     * Displays this menu relative to another element
+     * @param {Mixed} element The element to align to
+     * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to
+     * the element (defaults to this.defaultAlign)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    show : function(el, pos, parentMenu){
+        if(this.floating){
+            this.parentMenu = parentMenu;
+            if(!this.el){
+                this.render();
+                this.doLayout(false, true);
+            }
+            if(this.fireEvent('beforeshow', this) !== false){
+                this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign, this.defaultOffsets), parentMenu, false);
+            }
+        }else{
+            Ext.menu.Menu.superclass.show.call(this);
+        }
+    },
+
+    /**
+     * Displays this menu at a specific xy position
+     * @param {Array} xyPosition Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    showAt : function(xy, parentMenu, /* private: */_e){
+        this.parentMenu = parentMenu;
+        if(!this.el){
+            this.render();
+        }
+        this.el.setXY(xy);
+        if(this.enableScrolling){
+            this.constrainScroll(xy[1]);
+        }
+        this.el.show();
+        Ext.menu.Menu.superclass.onShow.call(this);
+        if(Ext.isIE){
+            this.layout.doAutoSize();
+            if(!Ext.isIE8){
+                this.el.repaint();
+            }
+        }
+        this.hidden = false;
+        this.focus();
+        this.fireEvent("show", this);
+    },
+
+    constrainScroll: function(y){
+        var max, full = this.ul.setHeight('auto').getHeight();
+        if(this.floating){
+            max = this.maxHeight ? this.maxHeight : Ext.fly(this.el.dom.parentNode).getViewSize().height - y;
+        }else{
+            max = this.getHeight();
+        }
+        if(full > max && max > 0){
+            this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0);
+            this.ul.setHeight(this.activeMax);
+            this.createScrollers();
+            this.el.select('.x-menu-scroller').setDisplayed('');
+        }else{
+            this.ul.setHeight(full);
+            this.el.select('.x-menu-scroller').setDisplayed('none');
+        }
+        this.ul.dom.scrollTop = 0;
+    },
+
+    createScrollers: function(){
+        if(!this.scroller){
+            this.scroller = {
+                pos: 0,
+                top: this.el.insertFirst({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-top',
+                    html: '&#160;'
+                }),
+                bottom: this.el.createChild({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-bottom',
+                    html: '&#160;'
+                })
+            };
+            this.scroller.top.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.topRepeater = new Ext.util.ClickRepeater(this.scroller.top, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.top], false)
+                }
+            });
+            this.scroller.bottom.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.bottomRepeater = new Ext.util.ClickRepeater(this.scroller.bottom, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.bottom], false)
+                }
+            });
+        }
+    },
+
+    onLayout: function(){
+        if(this.isVisible()){
+            if(this.enableScrolling){
+                this.constrainScroll(this.el.getTop());
+            }
+            if(this.floating){
+                this.el.sync();
+            }
+        }
+    },
+
+    focus : function(){
+        if(!this.hidden){
+            this.doFocus.defer(50, this);
+        }
+    },
+
+    doFocus : function(){
+        if(!this.hidden){
+            this.focusEl.focus();
+        }
+    },
+
+    /**
+     * Hides this menu and optionally all parent menus
+     * @param {Boolean} deep (optional) True to hide all parent menus recursively, if any (defaults to false)
+     */
+    hide : function(deep){
+        this.deepHide = deep;
+        Ext.menu.Menu.superclass.hide.call(this);
+        delete this.deepHide;
+    },
+
+    // private
+    onHide: function(){
+        Ext.menu.Menu.superclass.onHide.call(this);
+        this.deactivateActive();
+        if(this.el && this.floating){
+            this.el.hide();
+        }
+        if(this.deepHide === true && this.parentMenu){
+            this.parentMenu.hide(true);
+        }
+    },
+
+    // private
+    lookupComponent: function(c){
+         if(Ext.isString(c)){
+            c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c);
+             this.applyDefaults(c);
+         }else{
+            if(Ext.isObject(c)){
+                c = this.getMenuItem(c);
+            }else if(c.tagName || c.el){ // element. Wrap it.
+                c = new Ext.BoxComponent({
+                    el: c
+                });
+            }
+         }
+         return c;
+    },
+
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.menu.Menu.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(d){
+                if(c.events){
+                    Ext.applyIf(c.initialConfig, d);
+                    Ext.apply(c, d);
+                }else{
+                    Ext.applyIf(c, d);
+                }
+            }
+        }
+        return c;
+    },
+
+    // private
+    getMenuItem: function(config){
+       if(!config.isXType){
+            if(!config.xtype && Ext.isBoolean(config.checked)){
+                return new Ext.menu.CheckItem(config)
+            }
+            return Ext.create(config, this.defaultType);
+        }
+        return config;
+    },
+
+    /**
+     * Adds a separator bar to the menu
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addSeparator : function(){
+        return this.add(new Ext.menu.Separator());
+    },
+
+    /**
+     * Adds an {@link Ext.Element} object to the menu
+     * @param {Mixed} el The element or DOM node to add, or its id
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addElement : function(el){
+        return this.add(new Ext.menu.BaseItem(el));
+    },
+
+    /**
+     * Adds an existing object based on {@link Ext.menu.BaseItem} to the menu
+     * @param {Ext.menu.Item} item The menu item to add
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addItem : function(item){
+        return this.add(item);
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.Item} based an the supplied config object and adds it to the menu
+     * @param {Object} config A MenuItem config object
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addMenuItem : function(config){
+        return this.add(this.getMenuItem(config));
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.TextItem} with the supplied text and adds it to the menu
+     * @param {String} text The text to display in the menu item
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addText : function(text){
+        return this.add(new Ext.menu.TextItem(text));
+    },
+
+    //private
+    onDestroy : function(){
+        Ext.menu.Menu.superclass.onDestroy.call(this);
+        Ext.menu.MenuMgr.unregister(this);
+        Ext.EventManager.removeResizeListener(this.hide, this);
+        if(this.keyNav) {
+            this.keyNav.disable();
+        }
+        var s = this.scroller;
+        if(s){
+            Ext.destroy(s.topRepeater, s.bottomRepeater, s.top, s.bottom);
+        }
+    }
+});
+
+Ext.reg('menu', Ext.menu.Menu);
+
+// MenuNav is a private utility class used internally by the Menu
+Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){
+    function up(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){
+            m.tryActivate(m.items.length-1, -1);
+        }
+    }
+    function down(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){
+            m.tryActivate(0, 1);
+        }
+    }
+    return {
+        constructor: function(menu){
+            Ext.menu.MenuNav.superclass.constructor.call(this, menu.el);
+            this.scope = this.menu = menu;
+        },
+
+        doRelay : function(e, h){
+            var k = e.getKey();
+//          Keystrokes within a form Field (e.g.: down in a Combo) do not navigate. Allow only TAB
+            if (this.menu.activeItem && this.menu.activeItem.isFormField && k != e.TAB) {
+                return false;
+            }
+            if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){
+                this.menu.tryActivate(0, 1);
+                return false;
+            }
+            return h.call(this.scope || this, e, this.menu);
+        },
+
+        tab: function(e, m) {
+            e.stopEvent();
+            if (e.shiftKey) {
+                up(e, m);
+            } else {
+                down(e, m);
+            }
+        },
+
+        up : up,
+
+        down : down,
+
+        right : function(e, m){
+            if(m.activeItem){
+                m.activeItem.expandMenu(true);
+            }
+        },
+
+        left : function(e, m){
+            m.hide();
+            if(m.parentMenu && m.parentMenu.activeItem){
+                m.parentMenu.activeItem.activate();
+            }
+        },
+
+        enter : function(e, m){
+            if(m.activeItem){
+                e.stopPropagation();
+                m.activeItem.onClick(e);
+                m.fireEvent("click", this, m.activeItem);
+                return true;
+            }
+        }
+    };
+}());/**
+ * @class Ext.menu.MenuMgr
+ * Provides a common registry of all menu items on a page so that they can be easily accessed by id.
+ * @singleton
+ */
+Ext.menu.MenuMgr = function(){
+   var menus, active, groups = {}, attached = false, lastShow = new Date();
+
+   // private - called when first menu is created
+   function init(){
+       menus = {};
+       active = new Ext.util.MixedCollection();
+       Ext.getDoc().addKeyListener(27, function(){
+           if(active.length > 0){
+               hideAll();
+           }
+       });
+   }
+
+   // private
+   function hideAll(){
+       if(active && active.length > 0){
+           var c = active.clone();
+           c.each(function(m){
+               m.hide();
+           });
+       }
+   }
+
+   // private
+   function onHide(m){
+       active.remove(m);
+       if(active.length < 1){
+           Ext.getDoc().un("mousedown", onMouseDown);
+           attached = false;
+       }
+   }
+
+   // private
+   function onShow(m){
+       var last = active.last();
+       lastShow = new Date();
+       active.add(m);
+       if(!attached){
+           Ext.getDoc().on("mousedown", onMouseDown);
+           attached = true;
+       }
+       if(m.parentMenu){
+          m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3);
+          m.parentMenu.activeChild = m;
+       }else if(last && last.isVisible()){
+          m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3);
+       }
+   }
+
+   // private
+   function onBeforeHide(m){
+       if(m.activeChild){
+           m.activeChild.hide();
+       }
+       if(m.autoHideTimer){
+           clearTimeout(m.autoHideTimer);
+           delete m.autoHideTimer;
+       }
+   }
+
+   // private
+   function onBeforeShow(m){
+       var pm = m.parentMenu;
+       if(!pm && !m.allowOtherMenus){
+           hideAll();
+       }else if(pm && pm.activeChild){
+           pm.activeChild.hide();
+       }
+   }
+
+   // private
+   function onMouseDown(e){
+       if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
+           hideAll();
+       }
+   }
+
+   // private
+   function onBeforeCheck(mi, state){
+       if(state){
+           var g = groups[mi.group];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != mi){
+                   g[i].setChecked(false);
+               }
+           }
+       }
+   }
+
+   return {
+
+       /**
+        * Hides all menus that are currently visible
+        */
+       hideAll : function(){
+            hideAll();  
+       },
+
+       // private
+       register : function(menu){
+           if(!menus){
+               init();
+           }
+           menus[menu.id] = menu;
+           menu.on("beforehide", onBeforeHide);
+           menu.on("hide", onHide);
+           menu.on("beforeshow", onBeforeShow);
+           menu.on("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menu);
+               menu.on("checkchange", onCheck);
+           }
+       },
+
+        /**
+         * Returns a {@link Ext.menu.Menu} object
+         * @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will
+         * be used to generate and return a new Menu instance.
+         * @return {Ext.menu.Menu} The specified menu, or null if none are found
+         */
+       get : function(menu){
+           if(typeof menu == "string"){ // menu id
+               if(!menus){  // not initialized, no menus to return
+                   return null;
+               }
+               return menus[menu];
+           }else if(menu.events){  // menu instance
+               return menu;
+           }else if(typeof menu.length == 'number'){ // array of menu items?
+               return new Ext.menu.Menu({items:menu});
+           }else{ // otherwise, must be a config
+               return Ext.create(menu, 'menu');
+           }
+       },
+
+       // private
+       unregister : function(menu){
+           delete menus[menu.id];
+           menu.un("beforehide", onBeforeHide);
+           menu.un("hide", onHide);
+           menu.un("beforeshow", onBeforeShow);
+           menu.un("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               groups[g].remove(menu);
+               menu.un("checkchange", onCheck);
+           }
+       },
+
+       // private
+       registerCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menuItem);
+               menuItem.on("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       // private
+       unregisterCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               groups[g].remove(menuItem);
+               menuItem.un("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       getCheckedItem : function(groupId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].checked){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       },
+
+       setCheckedItem : function(groupId, itemId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].id == itemId){
+                       g[i].setChecked(true);
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();
+/**
+ * @class Ext.menu.BaseItem
+ * @extends Ext.Component
+ * The base class for all items that render into menus.  BaseItem provides default rendering, activated state
+ * management and base configuration options shared by all menu components.
+ * @constructor
+ * Creates a new BaseItem
+ * @param {Object} config Configuration options
+ * @xtype menubaseitem
+ */
+Ext.menu.BaseItem = function(config){
+    Ext.menu.BaseItem.superclass.constructor.call(this, config);
+
+    this.addEvents(
+        /**
+         * @event click
+         * Fires when this item is clicked
+         * @param {Ext.menu.BaseItem} this
+         * @param {Ext.EventObject} e
+         */
+        'click',
+        /**
+         * @event activate
+         * Fires when this item is activated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'activate',
+        /**
+         * @event deactivate
+         * Fires when this item is deactivated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'deactivate'
+    );
+
+    if(this.handler){
+        this.on("click", this.handler, this.scope);
+    }
+};
+
+Ext.extend(Ext.menu.BaseItem, Ext.Component, {
+    /**
+     * @property parentMenu
+     * @type Ext.menu.Menu
+     * The parent Menu of this Item.
+     */
+    /**
+     * @cfg {Function} handler
+     * A function that will handle the click event of this menu item (optional).
+     * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>b</code> : Item<div class="sub-desc">This menu Item.</div></li>
+     * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope
+     * The scope (<tt><b>this</b></tt> reference) in which the handler function will be called.
+     */
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to false)
+     */
+    canActivate : false,
+    /**
+     * @cfg {String} activeClass The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
+     */
+    activeClass : "x-menu-item-active",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to true)
+     */
+    hideOnClick : true,
+    /**
+     * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100)
+     */
+    clickHideDelay : 1,
+
+    // private
+    ctype : "Ext.menu.BaseItem",
+
+    // private
+    actionMode : "container",
+
+    // private
+    onRender : function(container, position){
+        Ext.menu.BaseItem.superclass.onRender.apply(this, arguments);
+        if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){
+            this.parentMenu = this.ownerCt;
+        }else{
+            this.container.addClass('x-menu-list-item');
+            this.mon(this.el, 'click', this.onClick, this);
+            this.mon(this.el, 'mouseenter', this.activate, this);
+            this.mon(this.el, 'mouseleave', this.deactivate, this);
+        }
+    },
+
+    /**
+     * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler}
+     * config property).  If an existing handler is already registered, it will be unregistered for you.
+     * @param {Function} handler The function that should be called on click
+     * @param {Object} scope The scope that should be passed to the handler
+     */
+    setHandler : function(handler, scope){
+        if(this.handler){
+            this.un("click", this.handler, this.scope);
+        }
+        this.on("click", this.handler = handler, this.scope = scope);
+    },
+
+    // private
+    onClick : function(e){
+        if(!this.disabled && this.fireEvent("click", this, e) !== false
+                && (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){
+            this.handleClick(e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    activate : function(){
+        if(this.disabled){
+            return false;
+        }
+        var li = this.container;
+        li.addClass(this.activeClass);
+        this.region = li.getRegion().adjust(2, 2, -2, -2);
+        this.fireEvent("activate", this);
+        return true;
+    },
+
+    // private
+    deactivate : function(){
+        this.container.removeClass(this.activeClass);
+        this.fireEvent("deactivate", this);
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        return !this.region || !this.region.contains(e.getPoint());
+    },
+
+    // private
+    handleClick : function(e){
+        if(this.hideOnClick){
+            this.parentMenu.hide.defer(this.clickHideDelay, this.parentMenu, [true]);
+        }
+    },
+
+    // private. Do nothing
+    expandMenu : Ext.emptyFn,
+
+    // private. Do nothing
+    hideMenu : Ext.emptyFn
+});
+Ext.reg('menubaseitem', Ext.menu.BaseItem);/**
+ * @class Ext.menu.TextItem
+ * @extends Ext.menu.BaseItem
+ * Adds a static text string to a menu, usually used as either a heading or group separator.
+ * @constructor
+ * Creates a new TextItem
+ * @param {Object/String} config If config is a string, it is used as the text to display, otherwise it
+ * is applied as a config object (and should contain a <tt>text</tt> property).
+ * @xtype menutextitem
+ */
+Ext.menu.TextItem = function(cfg){
+    if(typeof cfg == 'string'){
+        cfg = {text: cfg}
+    }
+    Ext.menu.TextItem.superclass.constructor.call(this, cfg);
+};
+
+Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} text The text to display for this item (defaults to '')
+     */
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    /**
+     * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text")
+     */
+    itemCls : "x-menu-text",
+
+    // private
+    onRender : function(){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = this.text;
+        this.el = s;
+        Ext.menu.TextItem.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menutextitem', Ext.menu.TextItem);/**
+ * @class Ext.menu.Separator
+ * @extends Ext.menu.BaseItem
+ * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
+ * add one of these by using "-" in you call to add() or in your items config rather than creating one directly.
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype menuseparator
+ */
+Ext.menu.Separator = function(config){
+    Ext.menu.Separator.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep")
+     */
+    itemCls : "x-menu-sep",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    
+    /** 
+     * @cfg {String} activeClass
+     * @hide 
+     */
+    activeClass: '',
+
+    // private
+    onRender : function(li){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = "&#160;";
+        this.el = s;
+        li.addClass("x-menu-sep-li");
+        Ext.menu.Separator.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menuseparator', Ext.menu.Separator);/**
+ * @class Ext.menu.Item
+ * @extends Ext.menu.BaseItem
+ * A base class for all menu items that require menu-related functionality (like sub-menus) and are not static
+ * display items.  Item extends the base functionality of {@link Ext.menu.BaseItem} by adding menu-specific
+ * activation and click handling.
+ * @constructor
+ * Creates a new Item
+ * @param {Object} config Configuration options
+ * @xtype menuitem
+ */
+Ext.menu.Item = function(config){
+    Ext.menu.Item.superclass.constructor.call(this, config);
+    if(this.menu){
+        this.menu = Ext.menu.MenuMgr.get(this.menu);
+    }
+};
+Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, {
+    /**
+     * @property menu
+     * @type Ext.menu.Menu
+     * The submenu associated with this Item if one was configured.
+     */
+    /**
+     * @cfg {Mixed} menu (optional) Either an instance of {@link Ext.menu.Menu} or the config object for an
+     * {@link Ext.menu.Menu} which acts as the submenu when this item is activated.
+     */
+    /**
+     * @cfg {String} icon The path to an icon to display in this item (defaults to Ext.BLANK_IMAGE_URL).  If
+     * icon is specified {@link #iconCls} should not be.
+     */
+    /**
+     * @cfg {String} iconCls A CSS class that specifies a background image that will be used as the icon for
+     * this item (defaults to '').  If iconCls is specified {@link #icon} should not be.
+     */
+    /**
+     * @cfg {String} text The text to display in this item (defaults to '').
+     */
+    /**
+     * @cfg {String} href The href attribute to use for the underlying anchor link (defaults to '#').
+     */
+    /**
+     * @cfg {String} hrefTarget The target attribute to use for the underlying anchor link (defaults to '').
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for menu items (defaults to 'x-menu-item')
+     */
+    itemCls : 'x-menu-item',
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to true)
+     */
+    canActivate : true,
+    /**
+     * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200)
+     */
+    showDelay: 200,
+    // doc'd in BaseItem
+    hideDelay: 200,
+
+    // private
+    ctype: 'Ext.menu.Item',
+
+    // private
+    onRender : function(container, position){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
+                '<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"',
+                    '<tpl if="hrefTarget">',
+                        ' target="{hrefTarget}"',
+                    '</tpl>',
+                 '>',
+                     '<img src="{icon}" class="x-menu-item-icon {iconCls}"/>',
+                     '<span class="x-menu-item-text">{text}</span>',
+                 '</a>'
+             );
+        }
+        var a = this.getTemplateArgs();
+        this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true);
+        this.iconEl = this.el.child('img.x-menu-item-icon');
+        this.textEl = this.el.child('.x-menu-item-text');
+        Ext.menu.Item.superclass.onRender.call(this, container, position);
+    },
+
+    getTemplateArgs: function() {
+        return {
+            id: this.id,
+            cls: this.itemCls + (this.menu ?  ' x-menu-item-arrow' : '') + (this.cls ?  ' ' + this.cls : ''),
+            href: this.href || '#',
+            hrefTarget: this.hrefTarget,
+            icon: this.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: this.iconCls || '',
+            text: this.itemText||this.text||'&#160;'
+        };
+    },
+
+    /**
+     * Sets the text to display in this menu item
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.text = text||'&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+            this.parentMenu.layout.doAutoSize();
+        }
+    },
+
+    /**
+     * Sets the CSS class to apply to the item's icon element
+     * @param {String} cls The CSS class to apply
+     */
+    setIconClass : function(cls){
+        var oldCls = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered){
+            this.iconEl.replaceClass(oldCls, this.iconCls);
+        }
+    },
+    
+    //private
+    beforeDestroy: function(){
+        if (this.menu){
+            this.menu.destroy();
+        }
+        Ext.menu.Item.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    handleClick : function(e){
+        if(!this.href){ // if no link defined, stop the event automatically
+            e.stopEvent();
+        }
+        Ext.menu.Item.superclass.handleClick.apply(this, arguments);
+    },
+
+    // private
+    activate : function(autoExpand){
+        if(Ext.menu.Item.superclass.activate.apply(this, arguments)){
+            this.focus();
+            if(autoExpand){
+                this.expandMenu();
+            }
+        }
+        return true;
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){
+            if(this.menu && this.menu.isVisible()){
+                return !this.menu.getEl().getRegion().contains(e.getPoint());
+            }
+            return true;
+        }
+        return false;
+    },
+
+    // private
+    deactivate : function(){
+        Ext.menu.Item.superclass.deactivate.apply(this, arguments);
+        this.hideMenu();
+    },
+
+    // private
+    expandMenu : function(autoActivate){
+        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, [autoActivate]);
+            }else if (this.menu.isVisible() && autoActivate){
+                this.menu.tryActivate(0, 1);
+            }
+        }
+    },
+
+    // private
+    deferExpand : function(autoActivate){
+        delete this.showTimer;
+        this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu);
+        if(autoActivate){
+            this.menu.tryActivate(0, 1);
+        }
+    },
+
+    // private
+    hideMenu : function(){
+        clearTimeout(this.showTimer);
+        delete this.showTimer;
+        if(!this.hideTimer && this.menu && this.menu.isVisible()){
+            this.hideTimer = this.deferHide.defer(this.hideDelay, this);
+        }
+    },
+
+    // private
+    deferHide : function(){
+        delete this.hideTimer;
+        if(this.menu.over){
+            this.parentMenu.setActiveItem(this, false);
+        }else{
+            this.menu.hide();
+        }
+    }
+});
+Ext.reg('menuitem', Ext.menu.Item);/**
+ * @class Ext.menu.CheckItem
+ * @extends Ext.menu.Item
+ * Adds a menu item that contains a checkbox by default, but can also be part of a radio group.
+ * @constructor
+ * Creates a new CheckItem
+ * @param {Object} config Configuration options
+ * @xtype menucheckitem
+ */
+Ext.menu.CheckItem = function(config){
+    Ext.menu.CheckItem.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+         * @event beforecheckchange
+         * Fires before the checked value is set, providing an opportunity to cancel if needed
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The new checked value that will be set
+         */
+        "beforecheckchange" ,
+        /**
+         * @event checkchange
+         * Fires after the checked value has been set
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The checked value that was set
+         */
+        "checkchange"
+    );
+    /**
+     * A function that handles the checkchange event.  The function is undefined by default, but if an implementation
+     * is provided, it will be called automatically when the checkchange event fires.
+     * @param {Ext.menu.CheckItem} this
+     * @param {Boolean} checked The checked value that was set
+     * @method checkHandler
+     */
+    if(this.checkHandler){
+        this.on('checkchange', this.checkHandler, this.scope);
+    }
+    Ext.menu.MenuMgr.registerCheckable(this);
+};
+Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, {
+    /**
+     * @cfg {String} group
+     * All check items with the same group name will automatically be grouped into a single-select
+     * radio button group (defaults to '')
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item")
+     */
+    itemCls : "x-menu-item x-menu-check-item",
+    /**
+     * @cfg {String} groupClass The default CSS class to use for radio group check items (defaults to "x-menu-group-item")
+     */
+    groupClass : "x-menu-group-item",
+
+    /**
+     * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false).  Note that
+     * if this checkbox is part of a radio group (group = true) only the last item in the group that is
+     * initialized with checked = true will be rendered as checked.
+     */
+    checked: false,
+
+    // private
+    ctype: "Ext.menu.CheckItem",
+
+    // private
+    onRender : function(c){
+        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);
+        }
+    },
+
+    // private
+    destroy : function(){
+        Ext.menu.MenuMgr.unregisterCheckable(this);
+        Ext.menu.CheckItem.superclass.destroy.apply(this, arguments);
+    },
+
+    /**
+     * Set the checked state of this item
+     * @param {Boolean} checked The new checked value
+     * @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false)
+     */
+    setChecked : function(state, suppressEvent){
+        if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){
+            if(this.container){
+                this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked");
+            }
+            this.checked = state;
+            if(suppressEvent !== true){
+                this.fireEvent("checkchange", this, state);
+            }
+        }
+    },
+
+    // private
+    handleClick : function(e){
+       if(!this.disabled && !(this.checked && this.group)){// disable unselect on radio item
+           this.setChecked(!this.checked);
+       }
+       Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments);
+    }
+});
+Ext.reg('menucheckitem', Ext.menu.CheckItem);/**
+ * @class Ext.menu.DateMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.DatePicker} Component.
+ * @xtype datemenu
+ */
+ Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a date is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property picker
+     * @type DatePicker
+     * The {@link Ext.DatePicker} instance for this DateMenu
+     */
+    cls: 'x-date-menu',
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+
+    initComponent: function(){
+        this.on('beforeshow', this.onBeforeShow, this);
+        if(this.strict = (Ext.isIE7 && Ext.isStrict)){
+            this.on('show', this.onShow, this, {single: true, delay: 20});
+        }
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.picker = new Ext.DatePicker(Ext.apply({
+                internalRender: this.strict || !Ext.isIE,
+                ctCls: 'x-menu-date-item'
+            }, this.initialConfig))
+        });
+        this.picker.purgeListeners();
+        Ext.menu.DateMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.picker, ["select"]);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this);
+        }
+    },
+
+    menuHide: function() {
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    },
+
+    onBeforeShow: function(){
+        if(this.picker){
+            this.picker.hideMonthPicker(true);
+        }
+    },
+
+    onShow: function(){
+        var el = this.picker.getEl();
+        el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode
+    }
+ });
+ Ext.reg('datemenu', Ext.menu.DateMenu);/**
+ * @class Ext.menu.ColorMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.ColorPalette} Component.
+ * @xtype colormenu
+ */
+ Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a color is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property palette
+     * @type ColorPalette
+     * The {@link Ext.ColorPalette} instance for this ColorMenu
+     */
+    
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+    
+    initComponent: function(){
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.palette = new Ext.ColorPalette(this.initialConfig)
+        });
+        this.palette.purgeListeners();
+        Ext.menu.ColorMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.palette, ['select']);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this)
+        }
+    },
+
+    menuHide: function(){
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    }
+});
+Ext.reg('colormenu', Ext.menu.ColorMenu);/**
+ * @class Ext.form.Field
+ * @extends Ext.BoxComponent
+ * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
+ * @constructor
+ * Creates a new Field
+ * @param {Object} config Configuration options
+ * @xtype field
+ */
+Ext.form.Field = Ext.extend(Ext.BoxComponent,  {
+    /**
+     * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password, file (defaults
+     * to "text"). The types "file" and "password" must be used to render those field types currently -- there are
+     * no separate Ext components for those. Note that if you use <tt>inputType:'file'</tt>, {@link #emptyText}
+     * is not supported and should be avoided.
+     */
+    /**
+     * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered,
+     * not those which are built via applyTo (defaults to undefined).
+     */
+    /**
+     * @cfg {Mixed} value A value to initialize this field with (defaults to undefined).
+     */
+    /**
+     * @cfg {String} name The field's HTML name attribute (defaults to "").
+     * <b>Note</b>: this property must be set if this field is to be automatically included with
+     * {@link Ext.form.BasicForm#submit form submit()}.
+     */
+    /**
+     * @cfg {String} cls A custom CSS class to apply to the field's underlying element (defaults to "").
+     */
+
+    /**
+     * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
+     */
+    invalidClass : "x-form-invalid",
+    /**
+     * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided
+     * (defaults to "The value in this field is invalid")
+     */
+    invalidText : "The value in this field is invalid",
+    /**
+     * @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to "x-form-focus")
+     */
+    focusClass : "x-form-focus",
+    /**
+     * @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable
+      automatic validation (defaults to "keyup").
+     */
+    validationEvent : "keyup",
+    /**
+     * @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true).
+     */
+    validateOnBlur : true,
+    /**
+     * @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation
+     * is initiated (defaults to 250)
+     */
+    validationDelay : 250,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "20", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "off"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field")
+     */
+    fieldClass : "x-form-field",
+    /**
+     * @cfg {String} msgTarget The location where error text should display.  Should be one of the following values
+     * (defaults to 'qtip'):
+     *<pre>
+Value         Description
+-----------   ----------------------------------------------------------------------
+qtip          Display a quick tip when the user hovers over the field
+title         Display a default browser title attribute popup
+under         Add a block div beneath the field containing the error text
+side          Add an error icon to the right of the field with a popup on hover
+[element id]  Add the error text directly to the innerHTML of the specified element
+</pre>
+     */
+    msgTarget : 'qtip',
+    /**
+     * @cfg {String} msgFx <b>Experimental</b> The effect used when displaying a validation message under the field
+     * (defaults to 'normal').
+     */
+    msgFx : 'normal',
+    /**
+     * @cfg {Boolean} readOnly <tt>true</tt> to mark the field as readOnly in HTML
+     * (defaults to <tt>false</tt>).
+     * <br><p><b>Note</b>: this only sets the element's readOnly DOM attribute.
+     * Setting <code>readOnly=true</code>, for example, will not disable triggering a
+     * ComboBox or DateField; it gives you the option of forcing the user to choose
+     * via the trigger without typing in the text box. To hide the trigger use
+     * <code>{@link Ext.form.TriggerField#hideTrigger hideTrigger}</code>.</p>
+     */
+    readOnly : false,
+    /**
+     * @cfg {Boolean} disabled True to disable the field (defaults to false).
+     * <p>Be aware that conformant with the <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.12.1">HTML specification</a>,
+     * disabled Fields will not be {@link Ext.form.BasicForm#submit submitted}.</p>
+     */
+    disabled : false,
+
+    // private
+    isFormField : true,
+
+    // private
+    hasFocus : false,
+
+    // private
+    initComponent : function(){
+        Ext.form.Field.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event focus
+             * Fires when this field receives input focus.
+             * @param {Ext.form.Field} this
+             */
+            'focus',
+            /**
+             * @event blur
+             * Fires when this field loses input focus.
+             * @param {Ext.form.Field} this
+             */
+            'blur',
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.
+             * To handle other keys see {@link Ext.Panel#keys} or {@link Ext.KeyMap}.
+             * You can check {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * For example: <pre><code>
+var form = new Ext.form.FormPanel({
+    ...
+    items: [{
+            fieldLabel: 'Field 1',
+            name: 'field1',
+            allowBlank: false
+        },{
+            fieldLabel: 'Field 2',
+            name: 'field2',
+            listeners: {
+                specialkey: function(field, e){
+                    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
+                    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
+                    if (e.{@link Ext.EventObject#getKey getKey()} == e.ENTER) {
+                        var form = field.ownerCt.getForm();
+                        form.submit();
+                    }
+                }
+            }
+        }
+    ],
+    ...
+});
+             * </code></pre>
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            'specialkey',
+            /**
+             * @event change
+             * Fires just before the field blurs if the field value has changed.
+             * @param {Ext.form.Field} this
+             * @param {Mixed} newValue The new value
+             * @param {Mixed} oldValue The original value
+             */
+            'change',
+            /**
+             * @event invalid
+             * Fires after the field has been marked as invalid.
+             * @param {Ext.form.Field} this
+             * @param {String} msg The validation message
+             */
+            'invalid',
+            /**
+             * @event valid
+             * Fires after the field has been validated with no errors.
+             * @param {Ext.form.Field} this
+             */
+            'valid'
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}
+     * attribute of the field if available.
+     * @return {String} name The field {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}  
+     */
+    getName: function(){
+        return this.rendered && this.el.dom.name ? this.el.dom.name : this.name || this.id || '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var cfg = this.getAutoCreate();
+
+            if(!cfg.name){
+                cfg.name = this.name || this.id;
+            }
+            if(this.inputType){
+                cfg.type = this.inputType;
+            }
+            this.autoEl = cfg;
+        }
+        Ext.form.Field.superclass.onRender.call(this, ct, position);
+        
+        var type = this.el.dom.type;
+        if(type){
+            if(type == 'password'){
+                type = 'text';
+            }
+            this.el.addClass('x-form-'+type);
+        }
+        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]);
+    },
+
+    // private
+    getItemCt : function(){
+        return this.el.up('.x-form-item', 4);
+    },
+
+    // private
+    initValue : function(){
+        if(this.value !== undefined){
+            this.setValue(this.value);
+        }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){
+            this.setValue(this.el.dom.value);
+        }
+        /**
+         * The original value of the field as configured in the {@link #value} configuration, or
+         * as loaded by the last form load operation if the form's {@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+         * setting is <code>true</code>.
+         * @type mixed
+         * @property originalValue
+         */
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * <p>Returns true if the value of this Field has been changed from its original value.
+     * Will return false if the field is disabled or has not been rendered yet.</p>
+     * <p>Note that if the owning {@link Ext.form.BasicForm form} was configured with
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     * then the <i>original value</i> is updated when the values are loaded by
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#setValues setValues}.</p>
+     * @return {Boolean} True if this field has been changed from its original value (and
+     * is not disabled), false otherwise.
+     */
+    isDirty : function() {
+        if(this.disabled || !this.rendered) {
+            return false;
+        }
+        return String(this.getValue()) !== String(this.originalValue);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.form.Field.superclass.afterRender.call(this);
+        this.initEvents();
+        this.initValue();
+    },
+
+    // private
+    fireKey : function(e){
+        if(e.isSpecialKey()){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    /**
+     * Resets the current field value to the originally loaded value and clears any validation messages.
+     * See {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     */
+    reset : function(){
+        this.setValue(this.originalValue);
+        this.clearInvalid();
+    },
+
+    // private
+    initEvents : function(){
+        this.mon(this.el, Ext.EventManager.useKeydown ? "keydown" : "keypress", this.fireKey,  this);
+        this.mon(this.el, 'focus', this.onFocus, this);
+
+        // fix weird FF/Win editor issue when changing OS window focus
+        var o = this.inEditor && Ext.isWindows && Ext.isGecko ? {buffer:10} : null;
+        this.mon(this.el, 'blur', this.onBlur, this, o);
+    },
+
+    // private
+    onFocus : function(){
+        if(this.focusClass){
+            this.el.addClass(this.focusClass);
+        }
+        if(!this.hasFocus){
+            this.hasFocus = true;
+            this.startValue = this.getValue();
+            this.fireEvent("focus", this);
+        }
+    },
+
+    // private
+    beforeBlur : Ext.emptyFn,
+
+    // private
+    onBlur : function(){
+        this.beforeBlur();
+        if(this.focusClass){
+            this.el.removeClass(this.focusClass);
+        }
+        this.hasFocus = false;
+        if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){
+            this.validate();
+        }
+        var v = this.getValue();
+        if(String(v) !== String(this.startValue)){
+            this.fireEvent('change', this, v, this.startValue);
+        }
+        this.fireEvent("blur", this);
+    },
+
+    /**
+     * Returns whether or not the field value is currently valid
+     * @param {Boolean} preventMark True to disable marking the field invalid
+     * @return {Boolean} True if the value is valid, else false
+     */
+    isValid : function(preventMark){
+        if(this.disabled){
+            return true;
+        }
+        var restore = this.preventMark;
+        this.preventMark = preventMark === true;
+        var v = this.validateValue(this.processValue(this.getRawValue()));
+        this.preventMark = restore;
+        return v;
+    },
+
+    /**
+     * Validates the field value
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validate : function(){
+        if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){
+            this.clearInvalid();
+            return true;
+        }
+        return false;
+    },
+
+    // protected - should be overridden by subclasses if necessary to prepare raw values for validation
+    processValue : function(value){
+        return value;
+    },
+
+    // private
+    // Subclasses should provide the validation implementation by overriding this
+    validateValue : function(value){
+        return true;
+    },
+
+    /**
+     * Mark this field as invalid, using {@link #msgTarget} to determine how to display the error and
+     * applying {@link #invalidClass} to the field's element.
+     * @param {String} msg (optional) The validation message (defaults to {@link #invalidText})
+     */
+    markInvalid : function(msg){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        msg = msg || this.invalidText;
+
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.mark(this, msg);
+        }else if(this.msgTarget){
+            this.el.addClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = msg;
+                t.style.display = this.msgDisplay;
+            }
+        }
+        this.fireEvent('invalid', this, msg);
+    },
+
+    /**
+     * Clear any invalid styles/messages for this field
+     */
+    clearInvalid : function(){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        this.el.removeClass(this.invalidClass);
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.clear(this);
+        }else if(this.msgTarget){
+            this.el.removeClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = '';
+                t.style.display = 'none';
+            }
+        }
+        this.fireEvent('valid', this);
+    },
+
+    // private
+    getMessageHandler : function(){
+        return Ext.form.MessageTargets[this.msgTarget];
+    },
+
+    // private
+    getErrorCt : function(){
+        return this.el.findParent('.x-form-element', 5, true) || // use form element wrap if available
+            this.el.findParent('.x-form-field-wrap', 5, true);   // else direct field wrap
+    },
+
+    // private
+    alignErrorIcon : function(){
+        this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]);
+    },
+
+    /**
+     * Returns the raw data value which may or may not be a valid, defined value.  To return a normalized value see {@link #getValue}.
+     * @return {Mixed} value The field value
+     */
+    getRawValue : function(){
+        var v = this.rendered ? this.el.getValue() : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Returns the normalized data value (undefined or emptyText will be returned as '').  To return the raw value see {@link #getRawValue}.
+     * @return {Mixed} value The field value
+     */
+    getValue : function(){
+        if(!this.rendered) {
+            return this.value;
+        }
+        var v = this.el.getValue();
+        if(v === this.emptyText || v === undefined){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Sets the underlying DOM field's value directly, bypassing validation.  To set the value with validation see {@link #setValue}.
+     * @param {Mixed} value The value to set
+     * @return {Mixed} value The field value that is set
+     */
+    setRawValue : function(v){
+        return (this.el.dom.value = (Ext.isEmpty(v) ? '' : v));
+    },
+
+    /**
+     * Sets a data value into the field and validates it.  To set the value directly without validation see {@link #setRawValue}.
+     * @param {Mixed} value The value to set
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        this.value = v;
+        if(this.rendered){
+            this.el.dom.value = (Ext.isEmpty(v) ? '' : v);
+            this.validate();
+        }
+        return this;
+    },
+
+    // private, does not work for all fields
+    append : function(v){
+         this.setValue([this.getValue(), v].join(''));
+    },
+
+    // private
+    adjustSize : function(w, h){
+        var s = Ext.form.Field.superclass.adjustSize.call(this, w, h);
+        s.width = this.adjustWidth(this.el.dom.tagName, s.width);
+        if(this.offsetCt){
+            var ct = this.getItemCt();
+            s.width -= ct.getFrameWidth('lr');
+            s.height -= ct.getFrameWidth('tb');
+        }
+        return s;
+    },
+
+    // private
+    adjustWidth : function(tag, w){
+        if(typeof w == 'number' && (Ext.isIE && (Ext.isIE6 || !Ext.isStrict)) && /input|textarea/i.test(tag) && !this.inEditor){
+            return w - 3;
+        }
+        return w;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+     */
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+
+Ext.form.MessageTargets = {
+    'qtip' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.qtip = msg;
+            field.el.dom.qclass = 'x-form-invalid-tip';
+            if(Ext.QuickTips){ // fix for floating editors interacting with DND
+                Ext.QuickTips.enable();
+            }
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            field.el.dom.qtip = '';
+        }
+    },
+    'title' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.title = msg;
+        },
+        clear: function(field){
+            field.el.dom.title = '';
+        }
+    },
+    'under' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorEl){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorEl = elp.createChild({cls:'x-form-invalid-msg'});
+                field.errorEl.setWidth(elp.getWidth(true)-20);
+            }
+            field.errorEl.update(msg);
+            Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorEl){
+                Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    },
+    'side' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorIcon){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
+            }
+            field.alignErrorIcon();
+            field.errorIcon.dom.qtip = msg;
+            field.errorIcon.dom.qclass = 'x-form-invalid-tip';
+            field.errorIcon.show();
+            field.on('resize', field.alignErrorIcon, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorIcon){
+                field.errorIcon.dom.qtip = '';
+                field.errorIcon.hide();
+                field.un('resize', field.alignErrorIcon, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    }
+};
+
+// anything other than normal should be considered experimental
+Ext.form.Field.msgFx = {
+    normal : {
+        show: function(msgEl, f){
+            msgEl.setDisplayed('block');
+        },
+
+        hide : function(msgEl, f){
+            msgEl.setDisplayed(false).update('');
+        }
+    },
+
+    slide : {
+        show: function(msgEl, f){
+            msgEl.slideIn('t', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('t', {stopFx:true,useDisplay:true});
+        }
+    },
+
+    slideRight : {
+        show: function(msgEl, f){
+            msgEl.fixDisplay();
+            msgEl.alignTo(f.el, 'tl-tr');
+            msgEl.slideIn('l', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('l', {stopFx:true,useDisplay:true});
+        }
+    }
+};
+Ext.reg('field', Ext.form.Field);
+/**
+ * @class Ext.form.TextField
+ * @extends Ext.form.Field
+ * <p>Basic text field.  Can be used as a direct replacement for traditional text inputs,
+ * or as the base class for more sophisticated input controls (like {@link Ext.form.TextArea}
+ * and {@link Ext.form.ComboBox}).</p>
+ * <p><b><u>Validation</u></b></p>
+ * <p>Field validation is processed in a particular order.  If validation fails at any particular
+ * step the validation routine halts.</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>1. Field specific validator</b>
+ * <div class="sub-desc">
+ * <p>If a field is configured with a <code>{@link Ext.form.TextField#validator validator}</code> function,
+ * it will be passed the current field value.  The <code>{@link Ext.form.TextField#validator validator}</code>
+ * function is expected to return boolean <tt>true</tt> if the value is valid or return a string to
+ * represent the invalid message if invalid.</p>
+ * </div></li>
+ * <li><b>2. Built in Validation</b>
+ * <div class="sub-desc">
+ * <p>Basic validation is affected with the following configuration properties:</p>
+ * <pre>
+ * <u>Validation</u>    <u>Invalid Message</u>
+ * <code>{@link Ext.form.TextField#allowBlank allowBlank}    {@link Ext.form.TextField#emptyText emptyText}</code>
+ * <code>{@link Ext.form.TextField#minLength minLength}     {@link Ext.form.TextField#minLengthText minLengthText}</code>
+ * <code>{@link Ext.form.TextField#maxLength maxLength}     {@link Ext.form.TextField#maxLengthText maxLengthText}</code>
+ * </pre>
+ * </div></li>
+ * <li><b>3. Preconfigured Validation Types (VTypes)</b>
+ * <div class="sub-desc">
+ * <p>Using VTypes offers a convenient way to reuse validation. If a field is configured with a
+ * <code>{@link Ext.form.TextField#vtype vtype}</code>, the corresponding {@link Ext.form.VTypes VTypes}
+ * validation function will be used for validation.  If invalid, either the field's
+ * <code>{@link Ext.form.TextField#vtypeText vtypeText}</code> or the VTypes vtype Text property will be
+ * used for the invalid message.  Keystrokes on the field will be filtered according to the VTypes
+ * vtype Mask property.</p>
+ * </div></li>
+ * <li><b>4. Field specific regex test</b>
+ * <div class="sub-desc">
+ * <p>Each field may also specify a <code>{@link Ext.form.TextField#regex regex}</code> test.
+ * The invalid message for this test is configured with
+ * <code>{@link Ext.form.TextField#regexText regexText}</code>.</p>
+ * </div></li>
+ * <li><b>Alter Validation Behavior</b>
+ * <div class="sub-desc">
+ * <p>Validation behavior for each field can be configured:</p><ul>
+ * <li><code>{@link Ext.form.TextField#invalidText invalidText}</code> : the default validation message to
+ * show if any validation step above does not provide a message when invalid</li>
+ * <li><code>{@link Ext.form.TextField#maskRe maskRe}</code> : filter out keystrokes before any validation occurs</li>
+ * <li><code>{@link Ext.form.TextField#stripCharsRe stripCharsRe}</code> : filter characters after being typed in,
+ * but before being validated</li>
+ * <li><code>{@link Ext.form.Field#invalidClass invalidClass}</code> : alternate style when invalid</li>
+ * <li><code>{@link Ext.form.Field#validateOnBlur validateOnBlur}</code>,
+ * <code>{@link Ext.form.Field#validationDelay validationDelay}</code>, and
+ * <code>{@link Ext.form.Field#validationEvent validationEvent}</code> : modify how/when validation is triggered</li>
+ * </ul>
+ * </div></li>
+ * </ul></div>
+ * @constructor
+ * Creates a new TextField
+ * @param {Object} config Configuration options
+ * @xtype textfield
+ */
+Ext.form.TextField = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} vtypeText A custom error message to display in place of the default message provided
+     * for the <b><code>{@link #vtype}</code></b> currently set for this field (defaults to <tt>''</tt>).  <b>Note</b>:
+     * only applies if <b><code>{@link #vtype}</code></b> is set, else ignored.
+     */
+    /**
+     * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
+     * before validation (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
+     * (defaults to <tt>false</tt>)
+     */
+    grow : false,
+    /**
+     * @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>30</tt>)
+     */
+    growMin : 30,
+    /**
+     * @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>800</tt>)
+     */
+    growMax : 800,
+    /**
+     * @cfg {String} vtype A validation type name as defined in {@link Ext.form.VTypes} (defaults to <tt>null</tt>)
+     */
+    vtype : null,
+    /**
+     * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
+     * not match (defaults to <tt>null</tt>)
+     */
+    maskRe : null,
+    /**
+     * @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
+     * to <tt>false</tt>)
+     */
+    disableKeyFilter : false,
+    /**
+     * @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
+     * <tt>true</tt>)
+     */
+    allowBlank : true,
+    /**
+     * @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
+     */
+    minLength : 0,
+    /**
+     * @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE).
+     * This behavior is intended to provide instant feedback to the user by improving usability to allow pasting
+     * and editing or overtyping and back tracking. To restrict the maximum number of characters that can be
+     * entered into the field use <tt><b>{@link Ext.form.Field#autoCreate autoCreate}</b></tt> to add
+     * any attributes you want to a field, for example:<pre><code>
+var myField = new Ext.form.NumberField({
+    id: 'mobile',
+    anchor:'90%',
+    fieldLabel: 'Mobile',
+    maxLength: 16, // for validation
+    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'}
+});
+</code></pre>
+     */
+    maxLength : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minLengthText Error text to display if the <b><tt>{@link #minLength minimum length}</tt></b>
+     * validation fails (defaults to <tt>'The minimum length for this field is {minLength}'</tt>)
+     */
+    minLengthText : 'The minimum length for this field is {0}',
+    /**
+     * @cfg {String} maxLengthText Error text to display if the <b><tt>{@link #maxLength maximum length}</tt></b>
+     * validation fails (defaults to <tt>'The maximum length for this field is {maxLength}'</tt>)
+     */
+    maxLengthText : 'The maximum length for this field is {0}',
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
+     * receives input focus (defaults to <tt>false</tt>)
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} blankText The error text to display if the <b><tt>{@link #allowBlank}</tt></b> validation
+     * fails (defaults to <tt>'This field is required'</tt>)
+     */
+    blankText : 'This field is required',
+    /**
+     * @cfg {Function} validator A custom validation function to be called during field validation
+     * (defaults to <tt>null</tt>). If specified, this function will be called first, allowing the
+     * developer to override the default validation process. This function will be passed the current
+     * field value and expected to return boolean <tt>true</tt> if the value is valid or a string
+     * error message if invalid.
+     */
+    validator : null,
+    /**
+     * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation
+     * (defaults to <tt>null</tt>). If the test fails, the field will be marked invalid using
+     * <b><tt>{@link #regexText}</tt></b>.
+     */
+    regex : null,
+    /**
+     * @cfg {String} regexText The error text to display if <b><tt>{@link #regex}</tt></b> is used and the
+     * test fails during validation (defaults to <tt>''</tt>)
+     */
+    regexText : '',
+    /**
+     * @cfg {String} emptyText The default text to place into an empty field (defaults to <tt>null</tt>).
+     * <b>Note</b>: that this value will be submitted to the server if this field is enabled and configured
+     * with a {@link #name}.
+     */
+    emptyText : null,
+    /**
+     * @cfg {String} emptyClass The CSS class to apply to an empty field to style the <b><tt>{@link #emptyText}</tt></b>
+     * (defaults to <tt>'x-form-empty-field'</tt>).  This class is automatically added and removed as needed
+     * depending on the current field value.
+     */
+    emptyClass : 'x-form-empty-field',
+
+    /**
+     * @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input
+     * field (defaults to <tt>false</tt>)
+     */
+
+    initComponent : function(){
+        Ext.form.TextField.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event autosize
+             * Fires when the <tt><b>{@link #autoSize}</b></tt> function is triggered. The field may or
+             * may not have actually changed size according to the default logic, but this event provides
+             * a hook for the developer to apply additional logic at runtime to resize the field if needed.
+             * @param {Ext.form.Field} this This text field
+             * @param {Number} width The new field width
+             */
+            'autosize',
+
+            /**
+             * @event keydown
+             * Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+            /**
+             * @event keyup
+             * Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keyup',
+            /**
+             * @event keypress
+             * Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keypress'
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.TextField.superclass.initEvents.call(this);
+        if(this.validationEvent == 'keyup'){
+            this.validationTask = new Ext.util.DelayedTask(this.validate, this);
+            this.mon(this.el, 'keyup', this.filterValidation, this);
+        }
+        else if(this.validationEvent !== false){
+        	this.mon(this.el, this.validationEvent, this.validate, this, {buffer: this.validationDelay});
+        }
+        if(this.selectOnFocus || this.emptyText){
+            this.on('focus', this.preFocus, this);
+            
+            this.mon(this.el, 'mousedown', function(){
+                if(!this.hasFocus){
+                    this.el.on('mouseup', function(e){
+                        e.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.mon(this.el, 'keypress', this.filterKeys, this);
+        }
+        if(this.grow){
+        	this.mon(this.el, 'keyup', this.onKeyUpBuffered, this, {buffer: 50});
+			this.mon(this.el, 'click', this.autoSize, this);
+        }
+        if(this.enableKeyEvents){
+        	this.mon(this.el, 'keyup', this.onKeyUp, this);
+        	this.mon(this.el, 'keydown', this.onKeyDown, this);
+        	this.mon(this.el, 'keypress', this.onKeyPress, this);
+        }
+    },
+
+    processValue : function(value){
+        if(this.stripCharsRe){
+            var newValue = value.replace(this.stripCharsRe, '');
+            if(newValue !== value){
+                this.setRawValue(newValue);
+                return newValue;
+            }
+        }
+        return value;
+    },
+
+    filterValidation : function(e){
+        if(!e.isNavKeyPress()){
+            this.validationTask.delay(this.validationDelay);
+        }
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.form.TextField.superclass.onDisable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = 'on';
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.form.TextField.superclass.onEnable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = '';
+        }
+    },
+
+    // private
+    onKeyUpBuffered : function(e){
+        if(!e.isNavKeyPress()){
+            this.autoSize();
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        this.fireEvent('keyup', this, e);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', this, e);
+    },
+
+    // private
+    onKeyPress : function(e){
+        this.fireEvent('keypress', this, e);
+    },
+
+    /**
+     * Resets the current field value to the originally-loaded value and clears any validation messages.
+     * Also adds <tt><b>{@link #emptyText}</b></tt> and <tt><b>{@link #emptyClass}</b></tt> if the
+     * original value was blank.
+     */
+    reset : function(){
+        Ext.form.TextField.superclass.reset.call(this);
+        this.applyEmptyText();
+    },
+
+    applyEmptyText : function(){
+        if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){
+            this.setRawValue(this.emptyText);
+            this.el.addClass(this.emptyClass);
+        }
+    },
+
+    // private
+    preFocus : function(){
+        var el = this.el;
+        if(this.emptyText){
+            if(el.dom.value == this.emptyText){
+                this.setRawValue('');
+            }
+            el.removeClass(this.emptyClass);
+        }
+        if(this.selectOnFocus){
+            (function(){
+                el.dom.select();
+            }).defer(this.inEditor && Ext.isIE ? 50 : 0);    
+        }
+    },
+
+    // private
+    postBlur : function(){
+        this.applyEmptyText();
+    },
+
+    // private
+    filterKeys : function(e){
+        // special keys don't generate charCodes, so leave them alone
+        if(e.ctrlKey || e.isSpecialKey()){
+            return;
+        }
+        
+        if(!this.maskRe.test(String.fromCharCode(e.getCharCode()))){
+            e.stopEvent();
+        }
+    },
+
+    setValue : function(v){
+        if(this.emptyText && this.el && !Ext.isEmpty(v)){
+            this.el.removeClass(this.emptyClass);
+        }
+        Ext.form.TextField.superclass.setValue.apply(this, arguments);
+        this.applyEmptyText();
+        this.autoSize();
+        return this;
+    },
+
+    /**
+     * Validates a value according to the field's validation rules and marks the field as invalid
+     * if the validation fails
+     * @param {Mixed} value The value to validate
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validateValue : function(value){
+        if(Ext.isFunction(this.validator)){
+            var msg = this.validator(value);
+            if(msg !== true){
+                this.markInvalid(msg);
+                return false;
+            }
+        }
+        if(value.length < 1 || value === this.emptyText){ // if it's blank
+             if(this.allowBlank){
+                 this.clearInvalid();
+                 return true;
+             }else{
+                 this.markInvalid(this.blankText);
+                 return false;
+             }
+        }
+        if(value.length < this.minLength){
+            this.markInvalid(String.format(this.minLengthText, this.minLength));
+            return false;
+        }
+        if(value.length > this.maxLength){
+            this.markInvalid(String.format(this.maxLengthText, this.maxLength));
+            return false;
+        }	
+        if(this.vtype){
+            var vt = Ext.form.VTypes;
+            if(!vt[this.vtype](value, this)){
+                this.markInvalid(this.vtypeText || vt[this.vtype +'Text']);
+                return false;
+            }
+        }
+        if(this.regex && !this.regex.test(value)){
+            this.markInvalid(this.regexText);
+            return false;
+        }
+        return true;
+    },
+
+    /**
+     * Selects text in this field
+     * @param {Number} start (optional) The index where the selection should start (defaults to 0)
+     * @param {Number} end (optional) The index where the selection should end (defaults to the text length)
+     */
+    selectText : function(start, end){
+        var v = this.getRawValue();
+        var doFocus = false;
+        if(v.length > 0){
+            start = start === undefined ? 0 : start;
+            end = end === undefined ? v.length : end;
+            var d = this.el.dom;
+            if(d.setSelectionRange){
+                d.setSelectionRange(start, end);
+            }else if(d.createTextRange){
+                var range = d.createTextRange();
+                range.moveStart('character', start);
+                range.moveEnd('character', end-v.length);
+                range.select();
+            }
+            doFocus = Ext.isGecko || Ext.isOpera;
+        }else{
+            doFocus = true;
+        }
+        if(doFocus){
+            this.focus();
+        }
+    },
+
+    /**
+     * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed.
+     * This only takes effect if <tt><b>{@link #grow}</b> = true</tt>, and fires the {@link #autosize} event.
+     */
+    autoSize : function(){
+        if(!this.grow || !this.rendered){
+            return;
+        }
+        if(!this.metrics){
+            this.metrics = Ext.util.TextMetrics.createInstance(this.el);
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var d = document.createElement('div');
+        d.appendChild(document.createTextNode(v));
+        v = d.innerHTML;
+        d = null;
+        Ext.removeNode(d);
+        v += '&#160;';
+        var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + /* add extra padding */ 10, this.growMin));
+        this.el.setWidth(w);
+        this.fireEvent('autosize', this, w);
+    },
+	
+	onDestroy: function(){
+		if(this.validationTask){
+			this.validationTask.cancel();
+			this.validationTask = null;
+		}
+		Ext.form.TextField.superclass.onDestroy.call(this);
+	}
+});
+Ext.reg('textfield', Ext.form.TextField);
+/**
+ * @class Ext.form.TriggerField
+ * @extends Ext.form.TextField
+ * Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default).
+ * The trigger has no default action, so you must assign a function to implement the trigger click handler by
+ * overriding {@link #onTriggerClick}. You can create a TriggerField directly, as it renders exactly like a combobox
+ * for which you can provide a custom implementation.  For example:
+ * <pre><code>
+var trigger = new Ext.form.TriggerField();
+trigger.onTriggerClick = myTriggerFn;
+trigger.applyToMarkup('my-field');
+</code></pre>
+ *
+ * However, in general you will most likely want to use TriggerField as the base class for a reusable component.
+ * {@link Ext.form.DateField} and {@link Ext.form.ComboBox} are perfect examples of this.
+ * 
+ * @constructor
+ * Create a new TriggerField.
+ * @param {Object} config Configuration options (valid {@Ext.form.TextField} config options will also be applied
+ * to the base TextField)
+ * @xtype trigger
+ */
+Ext.form.TriggerField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the
+     * trigger element for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to act as the trigger button for a TriggerField.</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing, positioning
+     * and appearance of the trigger.  Defaults to:</p>
+     * <pre><code>{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}</code></pre>
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "16", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"},
+    /**
+     * @cfg {Boolean} hideTrigger <tt>true</tt> to hide the trigger element and display only the base
+     * text field (defaults to <tt>false</tt>)
+     */
+    hideTrigger:false,
+    /**
+     * @cfg {Boolean} editable <tt>false</tt> to prevent the user from typing text directly into the field,
+     * the field will only respond to a click on the trigger to set the value. (defaults to <tt>true</tt>)
+     */
+    editable: true,
+    /**
+     * @cfg {String} wrapFocusClass The class added to the to the wrap of the trigger element. Defaults to
+     * <tt>x-trigger-wrap-focus</tt>.
+     */
+    wrapFocusClass: 'x-trigger-wrap-focus',
+    /**
+     * @hide 
+     * @method autoSize
+     */
+    autoSize: Ext.emptyFn,
+    // private
+    monitorTab : true,
+    // private
+    deferHeight : true,
+    // private
+    mimicing : false,
+    
+    actionMode: 'wrap',
+
+    // private
+    onResize : function(w, h){
+        Ext.form.TriggerField.superclass.onResize.call(this, w, h);
+        if(typeof w == 'number'){
+            this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth()));
+        }
+        this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
+    },
+
+    // private
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon : function(){
+        if(this.wrap){
+            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.TriggerField.superclass.onRender.call(this, ct, position);
+
+        this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-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());
+        }
+        if(!this.editable){
+            this.editable = true;
+            this.setEditable(false);
+        }
+    },
+
+    afterRender : function(){
+        Ext.form.TriggerField.superclass.afterRender.call(this);
+    },
+
+    // private
+    initTrigger : function(){
+    	this.mon(this.trigger, 'click', this.onTriggerClick, this, {preventDefault:true});
+        this.trigger.addClassOnOver('x-form-trigger-over');
+        this.trigger.addClassOnClick('x-form-trigger-click');
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.trigger, this.wrap);
+        if (this.mimicing){
+            Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        }
+        Ext.form.TriggerField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    onFocus : function(){
+        Ext.form.TriggerField.superclass.onFocus.call(this);
+        if(!this.mimicing){
+            this.wrap.addClass(this.wrapFocusClass);
+            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);
+            }
+        }
+    },
+
+    // private
+    checkTab : function(e){
+        if(e.getKey() == e.TAB){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        // do nothing
+    },
+
+    // private
+    mimicBlur : function(e){
+        if(!this.wrap.contains(e.target) && this.validateBlur(e)){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    triggerBlur : function(){
+        this.mimicing = false;
+        Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        if(this.monitorTab && this.el){
+            this.el.un("keydown", this.checkTab, this);
+        }
+        Ext.form.TriggerField.superclass.onBlur.call(this);
+        if(this.wrap){
+            this.wrap.removeClass(this.wrapFocusClass);
+        }
+    },
+
+    beforeBlur : Ext.emptyFn, 
+    
+    /**
+     * Allow or prevent the user from directly editing the field text.  If false is passed,
+     * the user will only be able to modify the field using the trigger.  This method
+     * is the runtime equivalent of setting the 'editable' config option at config time.
+     * @param {Boolean} value True to allow the user to directly edit the field text
+     */
+    setEditable : function(value){
+        if(value == this.editable){
+            return;
+        }
+        this.editable = value;
+        if(!value){
+            this.el.addClass('x-trigger-noedit').on('click', this.onTriggerClick, this).dom.setAttribute('readOnly', true);
+        }else{
+            this.el.removeClass('x-trigger-noedit').un('click', this.onTriggerClick,  this).dom.removeAttribute('readOnly');
+        }
+    },
+
+    // private
+    // This should be overriden by any subclass that needs to check whether or not the field can be blurred.
+    validateBlur : function(e){
+        return true;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function.  See Ext.form.ComboBox and Ext.form.DateField for
+     * sample implementations.
+     * @method
+     * @param {EventObject} e
+     */
+    onTriggerClick : Ext.emptyFn
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+});
+
+/**
+ * @class Ext.form.TwinTriggerField
+ * @extends Ext.form.TriggerField
+ * TwinTriggerField is not a public class to be used directly.  It is meant as an abstract base class
+ * to be extended by an implementing class.  For an example of implementing this class, see the custom
+ * SearchField implementation here:
+ * <a href="http://extjs.com/deploy/ext/examples/form/custom.html">http://extjs.com/deploy/ext/examples/form/custom.html</a>
+ */
+Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the trigger elements
+     * for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to contain the two trigger elements for this Field.
+     * Each trigger element must be marked by the CSS class <tt>x-form-trigger</tt> (also see
+     * <tt>{@link #trigger1Class}</tt> and <tt>{@link #trigger2Class}</tt>).</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing,
+     * positioning and appearance of the triggers.</p>
+     */
+    /**
+     * @cfg {String} trigger1Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {String} trigger2Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+
+    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(index){
+        return this.triggers[index];
+    },
+
+    initTrigger : function(){
+        var ts = this.trigger.select('.x-form-trigger', true);
+        this.wrap.setStyle('overflow', 'hidden');
+        var triggerField = this;
+        ts.each(function(t, all, index){
+            t.hide = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = 'none';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            t.show = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = '';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            var triggerIndex = 'Trigger'+(index+1);
+
+            if(this['hide'+triggerIndex]){
+                t.dom.style.display = 'none';
+            }
+            this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true});
+            t.addClassOnOver('x-form-trigger-over');
+            t.addClassOnClick('x-form-trigger-click');
+        }, this);
+        this.triggers = ts.elements;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger1Click : Ext.emptyFn,
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger2Click : Ext.emptyFn
+});
+Ext.reg('trigger', Ext.form.TriggerField);/**
+ * @class Ext.form.TextArea
+ * @extends Ext.form.TextField
+ * Multiline text field.  Can be used as a direct replacement for traditional textarea fields, plus adds
+ * support for auto-sizing.
+ * @constructor
+ * Creates a new TextArea
+ * @param {Object} config Configuration options
+ * @xtype textarea
+ */
+Ext.form.TextArea = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {Number} growMin The minimum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>60</tt>)
+     */
+    growMin : 60,
+    /**
+     * @cfg {Number} growMax The maximum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>1000</tt>)
+     */
+    growMax: 1000,
+    growAppend : '&#160;\n&#160;',
+    growPad : Ext.isWebKit ? -6 : 0,
+
+    enterIsSpecial : false,
+
+    /**
+     * @cfg {Boolean} preventScrollbars <tt>true</tt> to prevent scrollbars from appearing regardless of how much text is
+     * in the field (equivalent to setting overflow: hidden, defaults to <tt>false</tt>)
+     */
+    preventScrollbars: false,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "textarea", style: "width:100px;height:60px;", autocomplete: "off"}</code></pre>
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.defaultAutoCreate = {
+                tag: "textarea",
+                style:"width:100px;height:60px;",
+                autocomplete: "off"
+            };
+        }
+        Ext.form.TextArea.superclass.onRender.call(this, ct, position);
+        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(){
+        Ext.destroy(this.textSizeEl);
+        Ext.form.TextArea.superclass.onDestroy.call(this);
+    },
+
+    fireKey : function(e){
+        if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        if(!e.isNavKeyPress() || e.getKey() == e.ENTER){
+            this.autoSize();
+        }
+        Ext.form.TextArea.superclass.onKeyUp.call(this, e);
+    },
+
+    /**
+     * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed.
+     * This only takes effect if grow = true, and fires the {@link #autosize} event if the height changes.
+     */
+    autoSize: function(){
+        if(!this.grow || !this.textSizeEl){
+            return;
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var ts = this.textSizeEl;
+        ts.innerHTML = '';
+        ts.appendChild(document.createTextNode(v));
+        v = ts.innerHTML;
+        Ext.fly(ts).setWidth(this.el.getWidth());
+        if(v.length < 1){
+            v = "&#160;&#160;";
+        }else{
+            v += this.growAppend;
+            if(Ext.isIE){
+                v = v.replace(/\n/g, '<br />');
+            }
+        }
+        ts.innerHTML = v;
+        var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin) + this.growPad);
+        if(h != this.lastHeight){
+            this.lastHeight = h;
+            this.el.setHeight(h);
+            this.fireEvent("autosize", this, h);
+        }
+    }
+});
+Ext.reg('textarea', Ext.form.TextArea);/**
+ * @class Ext.form.NumberField
+ * @extends Ext.form.TextField
+ * Numeric text field that provides automatic keystroke filtering and numeric validation.
+ * @constructor
+ * Creates a new NumberField
+ * @param {Object} config Configuration options
+ * @xtype numberfield
+ */
+Ext.form.NumberField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {RegExp} stripCharsRe @hide
+     */
+    /**
+     * @cfg {RegExp} maskRe @hide
+     */
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field")
+     */
+    fieldClass: "x-form-field x-form-num-field",
+    /**
+     * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true)
+     */
+    allowDecimals : true,
+    /**
+     * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.')
+     */
+    decimalSeparator : ".",
+    /**
+     * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2)
+     */
+    decimalPrecision : 2,
+    /**
+     * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true)
+     */
+    allowNegative : true,
+    /**
+     * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
+     */
+    minValue : Number.NEGATIVE_INFINITY,
+    /**
+     * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE)
+     */
+    maxValue : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}")
+     */
+    minText : "The minimum value for this field is {0}",
+    /**
+     * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}")
+     */
+    maxText : "The maximum value for this field is {0}",
+    /**
+     * @cfg {String} nanText Error text to display if the value is not a valid number.  For example, this can happen
+     * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number")
+     */
+    nanText : "{0} is not a valid number",
+    /**
+     * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789').
+     */
+    baseChars : "0123456789",
+
+    // private
+    initEvents : function(){
+        var allowed = this.baseChars + '';
+        if (this.allowDecimals) {
+            allowed += this.decimalSeparator;
+        }
+        if (this.allowNegative) {
+            allowed += '-';
+        }
+        this.maskRe = new RegExp('[' + Ext.escapeRe(allowed) + ']');
+        Ext.form.NumberField.superclass.initEvents.call(this);
+    },
+
+    // private
+    validateValue : function(value){
+        if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        value = String(value).replace(this.decimalSeparator, ".");
+        if(isNaN(value)){
+            this.markInvalid(String.format(this.nanText, value));
+            return false;
+        }
+        var num = this.parseValue(value);
+        if(num < this.minValue){
+            this.markInvalid(String.format(this.minText, this.minValue));
+            return false;
+        }
+        if(num > 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(v){
+    	v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, "."));
+        v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator);
+        return Ext.form.NumberField.superclass.setValue.call(this, v);
+    },
+
+    // private
+    parseValue : function(value){
+        value = parseFloat(String(value).replace(this.decimalSeparator, "."));
+        return isNaN(value) ? '' : value;
+    },
+
+    // private
+    fixPrecision : function(value){
+        var nan = isNaN(value);
+        if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
+           return nan ? '' : value;
+        }
+        return parseFloat(parseFloat(value).toFixed(this.decimalPrecision));
+    },
+
+    beforeBlur : function(){
+        var v = this.parseValue(this.getRawValue());
+        if(!Ext.isEmpty(v)){
+            this.setValue(this.fixPrecision(v));
+        }
+    }
+});
+Ext.reg('numberfield', Ext.form.NumberField);/**
+ * @class Ext.form.DateField
+ * @extends Ext.form.TriggerField
+ * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation.
+ * @constructor
+ * Create a new DateField
+ * @param {Object} config
+ * @xtype datefield
+ */
+Ext.form.DateField = Ext.extend(Ext.form.TriggerField,  {
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : "m/d/Y",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "<tt>|</tt>" to try when parsing a user input value and it
+     * does not match the defined format (defaults to
+     * <tt>'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'</tt>).
+     */
+    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",
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : "Disabled",
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : "Disabled",
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before <tt>{@link #minValue}</tt> (defaults to
+     * <tt>'The date in this field must be after {minValue}'</tt>).
+     */
+    minText : "The date in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the date in the cell is after <tt>{@link #maxValue}</tt> (defaults to
+     * <tt>'The date in this field must be before {maxValue}'</tt>).
+     */
+    maxText : "The date in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the date in the field is invalid (defaults to
+     * <tt>'{value} is not a valid date - it must be in the format {format}'</tt>).
+     */
+    invalidText : "{0} is not a valid date - it must be in the format {1}",
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-date-trigger'</tt> which displays a calendar icon).
+     */
+    triggerClass : 'x-form-date-trigger',
+    /**
+     * @cfg {Boolean} showToday
+     * <tt>false</tt> to hide the footer area of the DatePicker containing the Today button and disable
+     * the keyboard handler for spacebar that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0 based (defaults to null). Some examples:<pre><code>
+// disable Sunday and Saturday:
+disabledDays:  [0, 6]
+// disable weekdays:
+disabledDays: [1,2,3,4,5]
+     * </code></pre>
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:<pre><code>
+// disable these exact dates:
+disabledDates: ["03/08/2003", "09/16/2003"]
+// disable these days for every year:
+disabledDates: ["03/08", "09/16"]
+// only match the beginning (useful if you are using short years):
+disabledDates: ["^03/08"]
+// disable every day in March 2006:
+disabledDates: ["03/../2006"]
+// disable every day in every March:
+disabledDates: ["^03"]
+     * </code></pre>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a {@link #format date format} that has "." in
+     * it, you will have to escape the dot when restricting dates. For example: <tt>["03\\.08\\.03"]</tt>.
+     */
+    /**
+     * @cfg {String/Object} autoCreate
+     * A {@link Ext.DomHelper DomHelper element specification object}, or <tt>true</tt> for the default element
+     * specification object:<pre><code>
+     * autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
+     * </code></pre>
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"},
+
+    initComponent : function(){
+        Ext.form.DateField.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected via the date picker.
+             * @param {Ext.form.DateField} this
+             * @param {Date} date The date that was selected
+             */
+            'select'
+        );
+
+        if(Ext.isString(this.minValue)){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(Ext.isString(this.maxValue)){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+        this.disabledDatesRE = null;
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1, 
+                re = "(?:";
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array} disabledDates An array of date strings (see the <tt>{@link #disabledDates}</tt> config
+     * for details on supported values) used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        this.disabledDates = dd;
+        this.initDisabledDays();
+        if(this.menu){
+            this.menu.picker.setDisabledDates(this.disabledDatesRE);
+        }
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the <tt>{@link #disabledDays}</tt>
+     * config for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        if(this.menu){
+            this.menu.picker.setDisabledDays(dd);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #minValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinValue : function(dt){
+        this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMinDate(this.minValue);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #maxValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxValue : function(dt){
+        this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMaxDate(this.maxValue);
+        }
+    },
+
+    // private
+    validateValue : function(value){
+        value = this.formatDate(value);
+        if(!Ext.form.DateField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        var svalue = value;
+        value = this.parseDate(value);
+        if(!value){
+            this.markInvalid(String.format(this.invalidText, svalue, this.format));
+            return false;
+        }
+        var time = value.getTime();
+        if(this.minValue && time < this.minValue.getTime()){
+            this.markInvalid(String.format(this.minText, this.formatDate(this.minValue)));
+            return false;
+        }
+        if(this.maxValue && time > this.maxValue.getTime()){
+            this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue)));
+            return false;
+        }
+        if(this.disabledDays){
+            var day = value.getDay();
+            for(var i = 0; i < this.disabledDays.length; i++) {
+                if(day === this.disabledDays[i]){
+                    this.markInvalid(this.disabledDaysText);
+                    return false;
+                }
+            }
+        }
+        var fvalue = this.formatDate(value);
+        if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){
+            this.markInvalid(String.format(this.disabledDatesText, fvalue));
+            return false;
+        }
+        return true;
+    },
+
+    // private
+    // Provides logic to override the default TriggerField.validateBlur which just returns true
+    validateBlur : function(){
+        return !this.menu || !this.menu.isVisible();
+    },
+
+    /**
+     * Returns the current date value of the date field.
+     * @return {Date} The date value
+     */
+    getValue : function(){
+        return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || "";
+    },
+
+    /**
+     * Sets the value of the date field.  You can pass a date object or any string that can be
+     * parsed into a valid date, using <tt>{@link #format}</tt> as the date format, according
+     * to the same rules as {@link Date#parseDate} (the default format used is <tt>"m/d/Y"</tt>).
+     * <br />Usage:
+     * <pre><code>
+//All of these calls set the same date value (May 4, 2006)
+
+//Pass a date object:
+var dt = new Date('5/4/2006');
+dateField.setValue(dt);
+
+//Pass a date string (default format):
+dateField.setValue('05/04/2006');
+
+//Pass a date string (custom format):
+dateField.format = 'Y-m-d';
+dateField.setValue('2006-05-04');
+</code></pre>
+     * @param {String/Date} date The date or valid date string
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(date){
+        return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date)));
+    },
+
+    // private
+    parseDate : function(value){
+        if(!value || Ext.isDate(value)){
+            return value;
+        }
+        var v = Date.parseDate(value, this.format);
+        if(!v && this.altFormats){
+            if(!this.altFormatsArray){
+                this.altFormatsArray = this.altFormats.split("|");
+            }
+            for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){
+                v = Date.parseDate(value, this.altFormatsArray[i]);
+            }
+        }
+        return v;
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.menu);
+        Ext.form.DateField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    formatDate : function(date){
+        return Ext.isDate(date) ? date.dateFormat(this.format) : date;
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function to display the DatePicker
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.menu == null){
+            this.menu = new Ext.menu.DateMenu({
+                hideOnClick: false
+            });
+        }
+        this.onFocus();
+        Ext.apply(this.menu.picker,  {
+            minDate : this.minValue,
+            maxDate : this.maxValue,
+            disabledDatesRE : this.disabledDatesRE,
+            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.picker.setValue(this.getValue() || new Date());
+        this.menu.show(this.el, "tl-bl?");
+        this.menuEvents('on');
+    },
+    
+    //private
+    menuEvents: function(method){
+        this.menu[method]('select', this.onSelect, this);
+        this.menu[method]('hide', this.onMenuHide, this);
+        this.menu[method]('show', this.onFocus, this);
+    },
+    
+    onSelect: function(m, d){
+        this.setValue(d);
+        this.fireEvent('select', this, d);
+        this.menu.hide();
+    },
+    
+    onMenuHide: function(){
+        this.focus(false, 60);
+        this.menuEvents('un');
+    },
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v);
+        }
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('datefield', Ext.form.DateField);/**
+ * @class Ext.form.DisplayField
+ * @extends Ext.form.Field
+ * A display-only text field which is not validated and not submitted.
+ * @constructor
+ * Creates a new DisplayField.
+ * @param {Object} config Configuration options
+ * @xtype displayfield
+ */
+Ext.form.DisplayField = Ext.extend(Ext.form.Field,  {
+    validationEvent : false,
+    validateOnBlur : false,
+    defaultAutoCreate : {tag: "div"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to <tt>"x-form-display-field"</tt>)
+     */
+    fieldClass : "x-form-display-field",
+    /**
+     * @cfg {Boolean} htmlEncode <tt>false</tt> to skip HTML-encoding the text when rendering it (defaults to
+     * <tt>false</tt>). This might be useful if you want to include tags in the field's innerHTML rather than
+     * rendering them as string literals per the default logic.
+     */
+    htmlEncode: false,
+
+    // private
+    initEvents : Ext.emptyFn,
+
+    isValid : function(){
+        return true;
+    },
+
+    validate : function(){
+        return true;
+    },
+
+    getRawValue : function(){
+        var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlDecode(v);
+        }
+        return v;
+    },
+
+    getValue : function(){
+        return this.getRawValue();
+    },
+    
+    getName: function() {
+        return this.name;
+    },
+
+    setRawValue : function(v){
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlEncode(v);
+        }
+        return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v);
+    },
+
+    setValue : function(v){
+        this.setRawValue(v);
+        return this;
+    }
+    /** 
+     * @cfg {String} inputType 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} disabled 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} readOnly 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} validateOnBlur 
+     * @hide
+     */
+    /** 
+     * @cfg {Number} validationDelay 
+     * @hide
+     */
+    /** 
+     * @cfg {String/Boolean} validationEvent 
+     * @hide
+     */
+});
+
+Ext.reg('displayfield', Ext.form.DisplayField);
+/**
+ * @class Ext.form.ComboBox
+ * @extends Ext.form.TriggerField
+ * <p>A combobox control with support for autocomplete, remote-loading, paging and many other features.</p>
+ * <p>A ComboBox works in a similar manner to a traditional HTML &lt;select> field. The difference is
+ * that to submit the {@link #valueField}, you must specify a {@link #hiddenName} to create a hidden input
+ * field to hold the value of the valueField. The <i>{@link #displayField}</i> is shown in the text field
+ * which is named according to the {@link #name}.</p>
+ * <p><b><u>Events</u></b></p>
+ * <p>To do something when something in ComboBox is selected, configure the select event:<pre><code>
+var cb = new Ext.form.ComboBox({
+    // all of your config options
+    listeners:{
+         scope: yourScope,
+         'select': yourFunction
+    }
+});
+
+// Alternatively, you can assign events after the object is created:
+var cb = new Ext.form.ComboBox(yourOptions);
+cb.on('select', yourFunction, yourScope);
+ * </code></pre></p>
+ *
+ * <p><b><u>ComboBox in Grid</u></b></p>
+ * <p>If using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a {@link Ext.grid.Column#renderer renderer}
+ * will be needed to show the displayField when the editor is not active.  Set up the renderer manually, or implement
+ * a reusable render, for example:<pre><code>
+// create reusable renderer
+Ext.util.Format.comboRenderer = function(combo){
+    return function(value){
+        var record = combo.findRecord(combo.{@link #valueField}, value);
+        return record ? record.get(combo.{@link #displayField}) : combo.{@link #valueNotFoundText};
+    }
+}
+
+// create the combo instance
+var combo = new Ext.form.ComboBox({
+    {@link #typeAhead}: true,
+    {@link #triggerAction}: 'all',
+    {@link #lazyRender}:true,
+    {@link #mode}: 'local',
+    {@link #store}: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]
+    }),
+    {@link #valueField}: 'myId',
+    {@link #displayField}: 'displayText'
+});
+
+// snippet of column model used within grid
+var cm = new Ext.grid.ColumnModel([{
+       ...
+    },{
+       header: "Some Header",
+       dataIndex: 'whatever',
+       width: 130,
+       editor: combo, // specify reference to combo instance
+       renderer: Ext.util.Format.comboRenderer(combo) // pass combo instance to reusable renderer
+    },
+    ...
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Filtering</u></b></p>
+ * <p>A ComboBox {@link #doQuery uses filtering itself}, for information about filtering the ComboBox
+ * store manually see <tt>{@link #lastQuery}</tt>.</p>
+ * @constructor
+ * Create a new ComboBox.
+ * @param {Object} config Configuration options
+ * @xtype combo
+ */
+Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} transform The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox.
+     * Note that if you specify this and the combo is going to be in an {@link Ext.form.BasicForm} or
+     * {@link Ext.form.FormPanel}, you must also set <tt>{@link #lazyRender} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} lazyRender <tt>true</tt> to prevent the ComboBox from rendering until requested
+     * (should always be used when rendering into an {@link Ext.Editor} (e.g. {@link Ext.grid.EditorGridPanel Grids}),
+     * defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or <tt>true</tt> for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "24", autocomplete: "off"}</code></pre>
+     */
+    /**
+     * @cfg {Ext.data.Store/Array} store The data source to which this combo is bound (defaults to <tt>undefined</tt>).
+     * Acceptable values for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
+     * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
+     * <div class="mdetail-params"><ul>
+     * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
+     * A 1-dimensional array will automatically be expanded (each array item will be the combo
+     * {@link #valueField value} and {@link #displayField text})</div></li>
+     * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
+     * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
+     * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
+     * </div></li></ul></div></li></ul></div>
+     * <p>See also <tt>{@link #mode}</tt>.</p>
+     */
+    /**
+     * @cfg {String} title If supplied, a header element is created containing this text and added into the top of
+     * the dropdown list (defaults to undefined, with no header element)
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"},
+    /**
+     * @cfg {Number} listWidth The width (used as a parameter to {@link Ext.Element#setWidth}) of the dropdown
+     * list (defaults to the width of the ComboBox field).  See also <tt>{@link #minListWidth}
+     */
+    /**
+     * @cfg {String} displayField The underlying {@link Ext.data.Field#name data field name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'text'</tt> if
+     * {@link #transform transforming a select} a select).
+     * <p>See also <tt>{@link #valueField}</tt>.</p>
+     * <p><b>Note</b>: if using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a
+     * {@link Ext.grid.Column#renderer renderer} will be needed to show the displayField when the editor is not
+     * active.</p>
+     */
+    /**
+     * @cfg {String} valueField The underlying {@link Ext.data.Field#name data value name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'value'</tt> if
+     * {@link #transform transforming a select}).
+     * <p><b>Note</b>: use of a <tt>valueField</tt> requires the user to make a selection in order for a value to be
+     * mapped.  See also <tt>{@link #hiddenName}</tt>, <tt>{@link #hiddenValue}</tt>, and <tt>{@link #displayField}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the
+     * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically
+     * post during a form submission.  See also {@link #valueField}.
+     * <p><b>Note</b>: the hidden field's id will also default to this name if {@link #hiddenId} is not specified.
+     * The ComboBox {@link Ext.Component#id id} and the <tt>{@link #hiddenId}</tt> <b>should be different</b>, since
+     * no two DOM nodes should share the same id.  So, if the ComboBox <tt>{@link Ext.form.Field#name name}</tt> and
+     * <tt>hiddenName</tt> are the same, you should specify a unique <tt>{@link #hiddenId}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenId If <tt>{@link #hiddenName}</tt> is specified, <tt>hiddenId</tt> can also be provided
+     * to give the hidden field a unique id (defaults to the <tt>{@link #hiddenName}</tt>).  The <tt>hiddenId</tt>
+     * and combo {@link Ext.Component#id id} should be different, since no two DOM
+     * nodes should share the same id.
+     */
+    /**
+     * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is
+     * specified to contain the selected {@link #valueField}, from the Store. Defaults to the configured
+     * <tt>{@link Ext.form.Field#value value}</tt>.
+     */
+    /**
+     * @cfg {String} listClass The CSS class to add to the predefined <tt>'x-combo-list'</tt> class
+     * applied the dropdown list element (defaults to '').
+     */
+    listClass : '',
+    /**
+     * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list
+     * (defaults to <tt>'x-combo-selected'</tt>)
+     */
+    selectedClass : 'x-combo-selected',
+    /**
+     * @cfg {String} listEmptyText The empty text to display in the data view if no items are found.
+     * (defaults to '')
+     */
+    listEmptyText: '',
+    /**
+     * @cfg {String} triggerClass An additional CSS class used to style the trigger button.  The trigger will always
+     * get the class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-arrow-trigger'</tt> which displays a downward arrow icon).
+     */
+    triggerClass : 'x-form-arrow-trigger',
+    /**
+     * @cfg {Boolean/String} shadow <tt>true</tt> or <tt>"sides"</tt> for the default effect, <tt>"frame"</tt> for
+     * 4-way shadow, and <tt>"drop"</tt> for bottom-right
+     */
+    shadow : 'sides',
+    /**
+     * @cfg {String} listAlign A valid anchor position value. See <tt>{@link Ext.Element#alignTo}</tt> for details
+     * on supported anchor positions (defaults to <tt>'tl-bl?'</tt>)
+     */
+    listAlign : 'tl-bl?',
+    /**
+     * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown
+     * (defaults to <tt>300</tt>)
+     */
+    maxHeight : 300,
+    /**
+     * @cfg {Number} minHeight The minimum height in pixels of the dropdown list when the list is constrained by its
+     * distance to the viewport edges (defaults to <tt>90</tt>)
+     */
+    minHeight : 90,
+    /**
+     * @cfg {String} triggerAction The action to execute when the trigger is clicked.
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'query'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">{@link #doQuery run the query} using the {@link Ext.form.Field#getRawValue raw value}.</p></li>
+     * <li><b><tt>'all'</tt></b> :
+     * <p class="sub-desc">{@link #doQuery run the query} specified by the <tt>{@link #allQuery}</tt> config option</p></li>
+     * </ul></div>
+     * <p>See also <code>{@link #queryParam}</code>.</p>
+     */
+    triggerAction : 'query',
+    /**
+     * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and
+     * {@link #typeAhead} activate (defaults to <tt>4</tt> if <tt>{@link #mode} = 'remote'</tt> or <tt>0</tt> if
+     * <tt>{@link #mode} = 'local'</tt>, does not apply if
+     * <tt>{@link Ext.form.TriggerField#editable editable} = false</tt>).
+     */
+    minChars : 4,
+    /**
+     * @cfg {Boolean} typeAhead <tt>true</tt> to populate and autoselect the remainder of the text being
+     * typed after a configurable delay ({@link #typeAheadDelay}) if it matches a known value (defaults
+     * to <tt>false</tt>)
+     */
+    typeAhead : false,
+    /**
+     * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and
+     * sending the query to filter the dropdown list (defaults to <tt>500</tt> if <tt>{@link #mode} = 'remote'</tt>
+     * or <tt>10</tt> if <tt>{@link #mode} = 'local'</tt>)
+     */
+    queryDelay : 500,
+    /**
+     * @cfg {Number} pageSize If greater than <tt>0</tt>, a {@link Ext.PagingToolbar} is displayed in the
+     * footer of the dropdown list and the {@link #doQuery filter queries} will execute with page start and
+     * {@link Ext.PagingToolbar#pageSize limit} parameters. Only applies when <tt>{@link #mode} = 'remote'</tt>
+     * (defaults to <tt>0</tt>).
+     */
+    pageSize : 0,
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to select any existing text in the field immediately on focus.
+     * Only applies when <tt>{@link Ext.form.TriggerField#editable editable} = true</tt> (defaults to
+     * <tt>false</tt>).
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} queryParam Name of the query ({@link Ext.data.Store#baseParam baseParam} name for the store)
+     * as it will be passed on the querystring (defaults to <tt>'query'</tt>)
+     */
+    queryParam : 'query',
+    /**
+     * @cfg {String} loadingText The text to display in the dropdown list while data is loading.  Only applies
+     * when <tt>{@link #mode} = 'remote'</tt> (defaults to <tt>'Loading...'</tt>)
+     */
+    loadingText : 'Loading...',
+    /**
+     * @cfg {Boolean} resizable <tt>true</tt> to add a resize handle to the bottom of the dropdown list
+     * (creates an {@link Ext.Resizable} with 'se' {@link Ext.Resizable#pinned pinned} handles).
+     * Defaults to <tt>false</tt>.
+     */
+    resizable : false,
+    /**
+     * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if
+     * <tt>{@link #resizable} = true</tt> (defaults to <tt>8</tt>)
+     */
+    handleHeight : 8,
+    /**
+     * @cfg {String} allQuery The text query to send to the server to return all records for the list
+     * with no filtering (defaults to '')
+     */
+    allQuery: '',
+    /**
+     * @cfg {String} mode Acceptable values are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'remote'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">Automatically loads the <tt>{@link #store}</tt> the <b>first</b> time the trigger
+     * is clicked. If you do not want the store to be automatically loaded the first time the trigger is
+     * clicked, set to <tt>'local'</tt> and manually load the store.  To force a requery of the store
+     * <b>every</b> time the trigger is clicked see <tt>{@link #lastQuery}</tt>.</p></li>
+     * <li><b><tt>'local'</tt></b> :
+     * <p class="sub-desc">ComboBox loads local data</p>
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    renderTo: document.body,
+    mode: 'local',
+    store: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',  // numeric value is the key
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]  // data is local
+    }),
+    valueField: 'myId',
+    displayField: 'displayText',
+    triggerAction: 'all'
+});
+     * </code></pre></li>
+     * </ul></div>
+     */
+    mode: 'remote',
+    /**
+     * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to <tt>70</tt>, will
+     * be ignored if <tt>{@link #listWidth}</tt> has a higher value)
+     */
+    minListWidth : 70,
+    /**
+     * @cfg {Boolean} forceSelection <tt>true</tt> to restrict the selected value to one of the values in the list,
+     * <tt>false</tt> to allow the user to set arbitrary text into the field (defaults to <tt>false</tt>)
+     */
+    forceSelection : false,
+    /**
+     * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed
+     * if <tt>{@link #typeAhead} = true</tt> (defaults to <tt>250</tt>)
+     */
+    typeAheadDelay : 250,
+    /**
+     * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in
+     * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined). If this
+     * default text is used, it means there is no value set and no validation will occur on this field.
+     */
+
+    /**
+     * @cfg {Boolean} lazyInit <tt>true</tt> to not initialize the list for this combo until the field is focused
+     * (defaults to <tt>true</tt>)
+     */
+    lazyInit : true,
+
+    /**
+     * The value of the match string used to filter the store. Delete this property to force a requery.
+     * Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'remote',
+    ...
+    listeners: {
+        // delete the previous query in the beforequery event or set
+        // combo.lastQuery = null (this will reload the store the next time it expands)
+        beforequery: function(qe){
+            delete qe.combo.lastQuery;
+        }
+    }
+});
+     * </code></pre>
+     * To make sure the filter in the store is not cleared the first time the ComboBox trigger is used
+     * configure the combo with <tt>lastQuery=''</tt>. Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'local',
+    triggerAction: 'all',
+    lastQuery: ''
+});
+     * </code></pre>
+     * @property lastQuery
+     * @type String
+     */
+
+    // private
+    initComponent : function(){
+        Ext.form.ComboBox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event expand
+             * Fires when the dropdown list is expanded
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'expand',
+            /**
+             * @event collapse
+             * Fires when the dropdown list is collapsed
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'collapse',
+            /**
+             * @event beforeselect
+             * Fires before a list item is selected. Return false to cancel the selection.
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'beforeselect',
+            /**
+             * @event select
+             * Fires when a list item is selected
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'select',
+            /**
+             * @event beforequery
+             * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's
+             * cancel property to true.
+             * @param {Object} queryEvent An object that has these properties:<ul>
+             * <li><code>combo</code> : Ext.form.ComboBox <div class="sub-desc">This combo box</div></li>
+             * <li><code>query</code> : String <div class="sub-desc">The query</div></li>
+             * <li><code>forceAll</code> : Boolean <div class="sub-desc">True to force "all" query</div></li>
+             * <li><code>cancel</code> : Boolean <div class="sub-desc">Set to true to cancel the query</div></li>
+             * </ul>
+             */
+            'beforequery'
+        );
+        if(this.transform){
+            var s = Ext.getDom(this.transform);
+            if(!this.hiddenName){
+                this.hiddenName = s.name;
+            }
+            if(!this.store){
+                this.mode = 'local';
+                var d = [], opts = s.options;
+                for(var i = 0, len = opts.length;i < len; i++){
+                    var o = opts[i],
+                        value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text;
+                    if(o.selected && Ext.isEmpty(this.value, true)) {
+                        this.value = value;
+                    }
+                    d.push([value, o.text]);
+                }
+                this.store = new Ext.data.ArrayStore({
+                    'id': 0,
+                    fields: ['value', 'text'],
+                    data : d,
+                    autoDestroy: true
+                });
+                this.valueField = 'value';
+                this.displayField = 'text';
+            }
+            s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference
+            if(!this.lazyRender){
+                this.target = true;
+                this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate);
+                this.render(this.el.parentNode, s);
+                Ext.removeNode(s); // remove it
+            }else{
+                Ext.removeNode(s); // remove it
+            }
+        }
+        //auto-configure store from local array data
+        else if(this.store){
+            this.store = Ext.StoreMgr.lookup(this.store);
+            if(this.store.autoCreated){
+                this.displayField = this.valueField = 'field1';
+                if(!this.store.expandData){
+                    this.displayField = 'field2';
+                }
+                this.mode = 'local';
+            }
+        }
+
+        this.selectedIndex = -1;
+        if(this.mode == 'local'){
+            if(!Ext.isDefined(this.initialConfig.queryDelay)){
+                this.queryDelay = 10;
+            }
+            if(!Ext.isDefined(this.initialConfig.minChars)){
+                this.minChars = 0;
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.ComboBox.superclass.onRender.call(this, ct, position);
+        if(this.hiddenName){
+            this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName,
+                    id: (this.hiddenId||this.hiddenName)}, 'before', true);
+
+            // prevent input submission
+            this.el.dom.removeAttribute('name');
+        }
+        if(Ext.isGecko){
+            this.el.dom.setAttribute('autocomplete', 'off');
+        }
+
+        if(!this.lazyInit){
+            this.initList();
+        }else{
+            this.on('focus', this.initList, this, {single: true});
+        }
+    },
+
+    // private
+    initValue : function(){
+        Ext.form.ComboBox.superclass.initValue.call(this);
+        if(this.hiddenField){
+            this.hiddenField.value =
+                Ext.isDefined(this.hiddenValue) ? this.hiddenValue :
+                Ext.isDefined(this.value) ? this.value : '';
+        }
+    },
+
+    // private
+    initList : function(){
+        if(!this.list){
+            var cls = 'x-combo-list';
+
+            this.list = new Ext.Layer({
+                parentEl: this.getListParent(),
+                shadow: this.shadow,
+                cls: [cls, this.listClass].join(' '),
+                constrain:false
+            });
+
+            var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth);
+            this.list.setSize(lw, 0);
+            this.list.swallowEvent('mousewheel');
+            this.assetHeight = 0;
+            if(this.syncFont !== false){
+                this.list.setStyle('font-size', this.el.getStyle('font-size'));
+            }
+            if(this.title){
+                this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
+                this.assetHeight += this.header.getHeight();
+            }
+
+            this.innerList = this.list.createChild({cls:cls+'-inner'});
+            this.mon(this.innerList, 'mouseover', this.onViewOver, this);
+            this.mon(this.innerList, 'mousemove', this.onViewMove, this);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+
+            if(this.pageSize){
+                this.footer = this.list.createChild({cls:cls+'-ft'});
+                this.pageTb = new Ext.PagingToolbar({
+                    store: this.store,
+                    pageSize: this.pageSize,
+                    renderTo:this.footer
+                });
+                this.assetHeight += this.footer.getHeight();
+            }
+
+            if(!this.tpl){
+                /**
+                * @cfg {String/Ext.XTemplate} tpl <p>The template string, or {@link Ext.XTemplate} instance to
+                * use to display each item in the dropdown list. The dropdown list is displayed in a
+                * DataView. See {@link #view}.</p>
+                * <p>The default template string is:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div class="x-combo-list-item">{' + this.displayField + '}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>Override the default value to create custom UI layouts for items in the list.
+                * For example:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>The template <b>must</b> contain one or more substitution parameters using field
+                * names from the Combo's</b> {@link #store Store}. In the example above an
+                * <pre>ext:qtip</pre> attribute is added to display other fields from the Store.</p>
+                * <p>To preserve the default visual look of list items, add the CSS class name
+                * <pre>x-combo-list-item</pre> to the template's container element.</p>
+                * <p>Also see {@link #itemSelector} for additional details.</p>
+                */
+                this.tpl = '<tpl for="."><div class="'+cls+'-item">{' + this.displayField + '}</div></tpl>';
+                /**
+                 * @cfg {String} itemSelector
+                 * <p>A simple CSS selector (e.g. div.some-class or span:first-child) that will be
+                 * used to determine what nodes the {@link #view Ext.DataView} which handles the dropdown
+                 * display will be working with.</p>
+                 * <p><b>Note</b>: this setting is <b>required</b> if a custom XTemplate has been
+                 * specified in {@link #tpl} which assigns a class other than <pre>'x-combo-list-item'</pre>
+                 * to dropdown list items</b>
+                 */
+            }
+
+            /**
+            * The {@link Ext.DataView DataView} used to display the ComboBox's options.
+            * @type Ext.DataView
+            */
+            this.view = new Ext.DataView({
+                applyTo: this.innerList,
+                tpl: this.tpl,
+                singleSelect: true,
+                selectedClass: this.selectedClass,
+                itemSelector: this.itemSelector || '.' + cls + '-item',
+                emptyText: this.listEmptyText
+            });
+
+            this.mon(this.view, 'click', this.onViewClick, this);
+
+            this.bindStore(this.store, true);
+
+            if(this.resizable){
+                this.resizer = new Ext.Resizable(this.list,  {
+                   pinned:true, handles:'se'
+                });
+                this.mon(this.resizer, 'resize', function(r, w, h){
+                    this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight;
+                    this.listWidth = w;
+                    this.innerList.setWidth(w - this.list.getFrameWidth('lr'));
+                    this.restrictHeight();
+                }, this);
+
+                this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px');
+            }
+        }
+    },
+
+    /**
+     * <p>Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.</p>
+     * A custom implementation may be provided as a configuration option if the floating list needs to be rendered
+     * to a different Element. An example might be rendering the list inside a Menu so that clicking
+     * the list does not hide the Menu:<pre><code>
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: ['initials', 'fullname'],
+    data : [
+        ['FF', 'Fred Flintstone'],
+        ['BR', 'Barney Rubble']
+    ]
+});
+
+var combo = new Ext.form.ComboBox({
+    store: store,
+    displayField: 'fullname',
+    emptyText: 'Select a name...',
+    forceSelection: true,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon', //use iconCls if placing within menu to shift to right side of menu
+    mode: 'local',
+    selectOnFocus: true,
+    triggerAction: 'all',
+    typeAhead: true,
+    width: 135
+});
+
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+</code></pre>
+     */
+    getListParent : function() {
+        return document.body;
+    },
+
+    /**
+     * Returns the store associated with this combo.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    // private
+    bindStore : function(store, initial){
+        if(this.store && !initial){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.collapse, this);
+            if(this.store !== store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+            if(!store){
+                this.store = null;
+                if(this.view){
+                    this.view.bindStore(null);
+                }
+            }
+        }
+        if(store){
+            if(!initial) {
+                this.lastQuery = null;
+                if(this.pageTb) {
+                    this.pageTb.bindStore(store);
+                }
+            }
+
+            this.store = Ext.StoreMgr.lookup(store);
+            this.store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                load: this.onLoad,
+                exception: this.collapse
+            });
+
+            if(this.view){
+                this.view.bindStore(store);
+            }
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.ComboBox.superclass.initEvents.call(this);
+
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up" : function(e){
+                this.inKeyMode = true;
+                this.selectPrev();
+            },
+
+            "down" : function(e){
+                if(!this.isExpanded()){
+                    this.onTriggerClick();
+                }else{
+                    this.inKeyMode = true;
+                    this.selectNext();
+                }
+            },
+
+            "enter" : function(e){
+                this.onViewClick();
+                this.delayedCheck = true;
+                this.unsetDelayCheck.defer(10, this);
+            },
+
+            "esc" : function(e){
+                this.collapse();
+            },
+
+            "tab" : function(e){
+                this.onViewClick(false);
+                return true;
+            },
+
+            scope : this,
+
+            doRelay : function(foo, bar, hname){
+                if(hname == 'down' || this.scope.isExpanded()){
+                   return Ext.KeyNav.prototype.doRelay.apply(this, arguments);
+                }
+                return true;
+            },
+
+            forceKeyDown : true
+        });
+        this.queryDelay = Math.max(this.queryDelay || 10,
+                this.mode == 'local' ? 10 : 250);
+        this.dqTask = new Ext.util.DelayedTask(this.initQuery, this);
+        if(this.typeAhead){
+            this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this);
+        }
+        if(this.editable !== false && !this.enableKeyEvents){
+            this.mon(this.el, 'keyup', this.onKeyUp, this);
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        if (this.dqTask){
+            this.dqTask.cancel();
+            this.dqTask = null;
+        }
+        this.bindStore(null);
+        Ext.destroy(
+            this.resizer,
+            this.view,
+            this.pageTb,
+            this.list
+        );
+        Ext.form.ComboBox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    unsetDelayCheck : function(){
+        delete this.delayedCheck;
+    },
+
+    // private
+    fireKey : function(e){
+        var fn = function(ev){
+            if (ev.isNavKeyPress() && !this.isExpanded() && !this.delayedCheck) {
+                this.fireEvent("specialkey", this, ev);
+            }
+        };
+        //For some reason I can't track down, the events fire in a different order in webkit.
+        //Need a slight delay here
+        if(this.inEditor && Ext.isWebKit && e.getKey() == e.TAB){
+            fn.defer(10, this, [new Ext.EventObjectImpl(e)]);
+        }else{
+            fn.call(this, e);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.ComboBox.superclass.onResize.apply(this, arguments);
+        if(this.list && !Ext.isDefined(this.listWidth)){
+            var lw = Math.max(w, this.minListWidth);
+            this.list.setWidth(lw);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.form.ComboBox.superclass.onEnable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = false;
+        }
+    },
+
+    // private
+    onDisable : function(){
+        Ext.form.ComboBox.superclass.onDisable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = true;
+        }
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        this.innerList.update(this.loadingText ?
+               '<div class="loading-indicator">'+this.loadingText+'</div>' : '');
+        this.restrictHeight();
+        this.selectedIndex = -1;
+    },
+
+    // private
+    onLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        if(this.store.getCount() > 0){
+            this.expand();
+            this.restrictHeight();
+            if(this.lastQuery == this.allQuery){
+                if(this.editable){
+                    this.el.dom.select();
+                }
+                if(!this.selectByValue(this.value, true)){
+                    this.select(0, true);
+                }
+            }else{
+                this.selectNext();
+                if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){
+                    this.taTask.delay(this.typeAheadDelay);
+                }
+            }
+        }else{
+            this.onEmptyResults();
+        }
+        //this.el.focus();
+    },
+
+    // private
+    onTypeAhead : function(){
+        if(this.store.getCount() > 0){
+            var r = this.store.getAt(0);
+            var newValue = r.data[this.displayField];
+            var len = newValue.length;
+            var selStart = this.getRawValue().length;
+            if(selStart != len){
+                this.setRawValue(newValue);
+                this.selectText(selStart, newValue.length);
+            }
+        }
+    },
+
+    // private
+    onSelect : function(record, index){
+        if(this.fireEvent('beforeselect', this, record, index) !== false){
+            this.setValue(record.data[this.valueField || this.displayField]);
+            this.collapse();
+            this.fireEvent('select', this, record, index);
+        }
+    },
+
+    // inherit docs
+    getName: function(){
+        var hf = this.hiddenField;
+        return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this);
+    },
+
+    /**
+     * Returns the currently selected field value or empty string if no value is set.
+     * @return {String} value The selected value
+     */
+    getValue : function(){
+        if(this.valueField){
+            return Ext.isDefined(this.value) ? this.value : '';
+        }else{
+            return Ext.form.ComboBox.superclass.getValue.call(this);
+        }
+    },
+
+    /**
+     * Clears any text/value currently set in the field
+     */
+    clearValue : function(){
+        if(this.hiddenField){
+            this.hiddenField.value = '';
+        }
+        this.setRawValue('');
+        this.lastSelectionText = '';
+        this.applyEmptyText();
+        this.value = '';
+    },
+
+    /**
+     * Sets the specified value into the field.  If the value finds a match, the corresponding record text
+     * will be displayed in the field.  If the value does not match the data value of an existing item,
+     * and the valueNotFoundText config option is defined, it will be displayed as the default field text.
+     * Otherwise the field will be blank (although the value will still be set).
+     * @param {String} value The value to match
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var text = v;
+        if(this.valueField){
+            var r = this.findRecord(this.valueField, v);
+            if(r){
+                text = r.data[this.displayField];
+            }else if(Ext.isDefined(this.valueNotFoundText)){
+                text = this.valueNotFoundText;
+            }
+        }
+        this.lastSelectionText = text;
+        if(this.hiddenField){
+            this.hiddenField.value = v;
+        }
+        Ext.form.ComboBox.superclass.setValue.call(this, text);
+        this.value = v;
+        return this;
+    },
+
+    // private
+    findRecord : function(prop, value){
+        var record;
+        if(this.store.getCount() > 0){
+            this.store.each(function(r){
+                if(r.data[prop] == value){
+                    record = r;
+                    return false;
+                }
+            });
+        }
+        return record;
+    },
+
+    // private
+    onViewMove : function(e, t){
+        this.inKeyMode = false;
+    },
+
+    // private
+    onViewOver : function(e, t){
+        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
+            return;
+        }
+        var item = this.view.findItemFromChild(t);
+        if(item){
+            var index = this.view.indexOf(item);
+            this.select(index, false);
+        }
+    },
+
+    // private
+    onViewClick : function(doFocus){
+        var index = this.view.getSelectedIndexes()[0];
+        var r = this.store.getAt(index);
+        if(r){
+            this.onSelect(r, index);
+        }
+        if(doFocus !== false){
+            this.el.focus();
+        }
+    },
+
+    // private
+    restrictHeight : function(){
+        this.innerList.dom.style.height = '';
+        var inner = this.innerList.dom;
+        var pad = this.list.getFrameWidth('tb')+(this.resizable?this.handleHeight:0)+this.assetHeight;
+        var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight);
+        var ha = this.getPosition()[1]-Ext.getBody().getScroll().top;
+        var hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height;
+        var space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5;
+        h = Math.min(h, space, this.maxHeight);
+
+        this.innerList.setHeight(h);
+        this.list.beginUpdate();
+        this.list.setHeight(h+pad);
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.endUpdate();
+    },
+
+    // private
+    onEmptyResults : function(){
+        this.collapse();
+    },
+
+    /**
+     * Returns true if the dropdown list is expanded, else false.
+     */
+    isExpanded : function(){
+        return this.list && this.list.isVisible();
+    },
+
+    /**
+     * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {String} value The data value of the item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     * @return {Boolean} True if the value matched an item in the list, else false
+     */
+    selectByValue : function(v, scrollIntoView){
+        if(!Ext.isEmpty(v, true)){
+            var r = this.findRecord(this.valueField || this.displayField, v);
+            if(r){
+                this.select(this.store.indexOf(r), scrollIntoView);
+                return true;
+            }
+        }
+        return false;
+    },
+
+    /**
+     * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {Number} index The zero-based index of the list item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     */
+    select : function(index, scrollIntoView){
+        this.selectedIndex = index;
+        this.view.select(index);
+        if(scrollIntoView !== false){
+            var el = this.view.getNode(index);
+            if(el){
+                this.innerList.scrollChildIntoView(el, false);
+            }
+        }
+    },
+
+    // private
+    selectNext : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex < ct-1){
+                this.select(this.selectedIndex+1);
+            }
+        }
+    },
+
+    // private
+    selectPrev : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex !== 0){
+                this.select(this.selectedIndex-1);
+            }
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        var k = e.getKey();
+        if(this.editable !== false && (k == e.BACKSPACE || !e.isSpecialKey())){
+            this.lastKey = k;
+            this.dqTask.delay(this.queryDelay);
+        }
+        Ext.form.ComboBox.superclass.onKeyUp.call(this, e);
+    },
+
+    // private
+    validateBlur : function(){
+        return !this.list || !this.list.isVisible();
+    },
+
+    // private
+    initQuery : function(){
+        this.doQuery(this.getRawValue());
+    },
+
+    // private
+    beforeBlur : function(){
+        var val = this.getRawValue();
+        if(this.forceSelection){
+            if(val.length > 0 && val != this.emptyText){
+               this.el.dom.value = Ext.isDefined(this.lastSelectionText) ? this.lastSelectionText : '';
+                this.applyEmptyText();
+            }else{
+                this.clearValue();
+            }
+        }else{
+            var rec = this.findRecord(this.displayField, val);
+            if(rec){
+                val = rec.get(this.valueField || this.displayField);
+            }
+            this.setValue(val);
+        }
+    },
+
+    /**
+     * Execute a query to filter the dropdown list.  Fires the {@link #beforequery} event prior to performing the
+     * query allowing the query action to be canceled if needed.
+     * @param {String} query The SQL query to execute
+     * @param {Boolean} forceAll <tt>true</tt> to force the query to execute even if there are currently fewer
+     * characters in the field than the minimum specified by the <tt>{@link #minChars}</tt> config option.  It
+     * also clears any filter previously saved in the current store (defaults to <tt>false</tt>)
+     */
+    doQuery : function(q, forceAll){
+        q = Ext.isEmpty(q) ? '' : q;
+        var qe = {
+            query: q,
+            forceAll: forceAll,
+            combo: this,
+            cancel:false
+        };
+        if(this.fireEvent('beforequery', qe)===false || qe.cancel){
+            return false;
+        }
+        q = qe.query;
+        forceAll = qe.forceAll;
+        if(forceAll === true || (q.length >= this.minChars)){
+            if(this.lastQuery !== q){
+                this.lastQuery = q;
+                if(this.mode == 'local'){
+                    this.selectedIndex = -1;
+                    if(forceAll){
+                        this.store.clearFilter();
+                    }else{
+                        this.store.filter(this.displayField, q);
+                    }
+                    this.onLoad();
+                }else{
+                    this.store.baseParams[this.queryParam] = q;
+                    this.store.load({
+                        params: this.getParams(q)
+                    });
+                    this.expand();
+                }
+            }else{
+                this.selectedIndex = -1;
+                this.onLoad();
+            }
+        }
+    },
+
+    // private
+    getParams : function(q){
+        var p = {};
+        //p[this.queryParam] = q;
+        if(this.pageSize){
+            p.start = 0;
+            p.limit = this.pageSize;
+        }
+        return p;
+    },
+
+    /**
+     * Hides the dropdown list if it is currently expanded. Fires the {@link #collapse} event on completion.
+     */
+    collapse : function(){
+        if(!this.isExpanded()){
+            return;
+        }
+        this.list.hide();
+        Ext.getDoc().un('mousewheel', this.collapseIf, this);
+        Ext.getDoc().un('mousedown', this.collapseIf, this);
+        this.fireEvent('collapse', this);
+    },
+
+    // private
+    collapseIf : function(e){
+        if(!e.within(this.wrap) && !e.within(this.list)){
+            this.collapse();
+        }
+    },
+
+    /**
+     * Expands the dropdown list if it is currently hidden. Fires the {@link #expand} event on completion.
+     */
+    expand : function(){
+        if(this.isExpanded() || !this.hasFocus){
+            return;
+        }
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.show();
+        if(Ext.isGecko2){
+            this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac
+        }
+        Ext.getDoc().on({
+            scope: this,
+            mousewheel: this.collapseIf,
+            mousedown: this.collapseIf
+        });
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.isExpanded()){
+            this.collapse();
+            this.el.focus();
+        }else {
+            this.onFocus({});
+            if(this.triggerAction == 'all') {
+                this.doQuery(this.allQuery, true);
+            } else {
+                this.doQuery(this.getRawValue());
+            }
+            this.el.focus();
+        }
+    }
+
+    /**
+     * @hide
+     * @method autoSize
+     */
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+
+});
+Ext.reg('combo', Ext.form.ComboBox);/**
+ * @class Ext.form.Checkbox
+ * @extends Ext.form.Field
+ * Single checkbox field.  Can be used as a direct replacement for traditional checkbox fields.
+ * @constructor
+ * Creates a new Checkbox
+ * @param {Object} config Configuration options
+ * @xtype checkbox
+ */
+Ext.form.Checkbox = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined)
+     */
+    focusClass : undefined,
+    /**
+     * @cfg {String} fieldClass The default CSS class for the checkbox (defaults to 'x-form-field')
+     */
+    fieldClass : 'x-form-field',
+    /**
+     * @cfg {Boolean} checked <tt>true</tt> if the checkbox should render initially checked (defaults to <tt>false</tt>)
+     */
+    checked : false,
+    /**
+     * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
+     * {tag: 'input', type: 'checkbox', autocomplete: 'off'})
+     */
+    defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'},
+    /**
+     * @cfg {String} boxLabel The text that appears beside the checkbox
+     */
+    /**
+     * @cfg {String} inputValue The value that should go into the generated input element's value attribute
+     */
+    /**
+     * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of 
+     * handling the check event). The handler is passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>checkbox</b> : Ext.form.Checkbox<div class="sub-desc">The Checkbox being toggled.</div></li>
+     * <li><b>checked</b> : Boolean<div class="sub-desc">The new checked state of the checkbox.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope An object to use as the scope ('this' reference) of the {@link #handler} function
+     * (defaults to this Checkbox).
+     */
+
+    // private
+    actionMode : 'wrap',
+    
+	// private
+    initComponent : function(){
+        Ext.form.Checkbox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event check
+             * Fires when the checkbox is checked or unchecked.
+             * @param {Ext.form.Checkbox} this This checkbox
+             * @param {Boolean} checked The new checked value
+             */
+            'check'
+        );
+    },
+
+    // private
+    onResize : function(){
+        Ext.form.Checkbox.superclass.onResize.apply(this, arguments);
+        if(!this.boxLabel && !this.fieldLabel){
+            this.el.alignTo(this.wrap, 'c-c');
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.Checkbox.superclass.initEvents.call(this);
+        this.mon(this.el, 'click', this.onClick, this);
+        this.mon(this.el, 'change', this.onClick, this);
+    },
+
+	// private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        this.wrap = this.el.wrap({cls: 'x-form-check-wrap'});
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        }
+        if(this.checked){
+            this.setValue(true);
+        }else{
+            this.checked = this.el.dom.checked;
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.destroy(this.wrap);
+        Ext.form.Checkbox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    initValue : function() {
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Returns the checked state of the checkbox.
+     * @return {Boolean} True if checked, else false
+     */
+    getValue : function(){
+        if(this.rendered){
+            return this.el.dom.checked;
+        }
+        return false;
+    },
+
+	// private
+    onClick : function(){
+        if(this.el.dom.checked != this.checked){
+            this.setValue(this.el.dom.checked);
+        }
+    },
+
+    /**
+     * Sets the checked state of the checkbox, fires the 'check' event, and calls a
+     * <code>{@link #handler}</code> (if configured).
+     * @param {Boolean/String} checked The following values will check the checkbox:
+     * <code>true, 'true', '1', or 'on'</code>. Any other value will uncheck the checkbox.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var checked = this.checked ;
+        this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on');
+        if(this.rendered){
+            this.el.dom.checked = this.checked;
+            this.el.dom.defaultChecked = this.checked;
+        }
+        if(checked != this.checked){
+            this.fireEvent('check', this, this.checked);
+            if(this.handler){
+                this.handler.call(this.scope || this, this, this.checked);
+            }
+        }
+        return this;
+    }
+});
+Ext.reg('checkbox', Ext.form.Checkbox);
+/**
+ * @class Ext.form.CheckboxGroup
+ * @extends Ext.form.Field
+ * <p>A grouping container for {@link Ext.form.Checkbox} controls.</p>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var myCheckboxGroup = new Ext.form.CheckboxGroup({
+    id:'myGroup',
+    xtype: 'checkboxgroup',
+    fieldLabel: 'Single Column',
+    itemCls: 'x-check-group-alt',
+    // Put all controls in a single column with width 100%
+    columns: 1,
+    items: [
+        {boxLabel: 'Item 1', name: 'cb-col-1'},
+        {boxLabel: 'Item 2', name: 'cb-col-2', checked: true},
+        {boxLabel: 'Item 3', name: 'cb-col-3'}
+    ]
+});
+ * </code></pre>
+ * @constructor
+ * Creates a new CheckboxGroup
+ * @param {Object} config Configuration options
+ * @xtype checkboxgroup
+ */
+Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Array} items An Array of {@link Ext.form.Checkbox Checkbox}es or Checkbox config objects
+     * to arrange in the group.
+     */
+    /**
+     * @cfg {String/Number/Array} columns Specifies the number of columns to use when displaying grouped
+     * checkbox/radio controls using automatic layout.  This config can take several types of values:
+     * <ul><li><b>'auto'</b> : <p class="sub-desc">The controls will be rendered one per column on one row and the width
+     * of each column will be evenly distributed based on the width of the overall field container. This is the default.</p></li>
+     * <li><b>Number</b> : <p class="sub-desc">If you specific a number (e.g., 3) that number of columns will be 
+     * created and the contained controls will be automatically distributed based on the value of {@link #vertical}.</p></li>
+     * <li><b>Array</b> : Object<p class="sub-desc">You can also specify an array of column widths, mixing integer
+     * (fixed width) and float (percentage width) values as needed (e.g., [100, .25, .75]). Any integer values will
+     * be rendered first, then any float values will be calculated as a percentage of the remaining space. Float
+     * values do not have to add up to 1 (100%) although if you want the controls to take up the entire field
+     * container you should do so.</p></li></ul>
+     */
+    columns : 'auto',
+    /**
+     * @cfg {Boolean} vertical True to distribute contained controls across columns, completely filling each column 
+     * top to bottom before starting on the next column.  The number of controls in each column will be automatically
+     * calculated to keep columns as even as possible.  The default value is false, so that controls will be added
+     * to columns one at a time, completely filling each row left to right before starting on the next row.
+     */
+    vertical : false,
+    /**
+     * @cfg {Boolean} allowBlank False to validate that at least one item in the group is checked (defaults to true).
+     * If no items are selected at validation time, {@link @blankText} will be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails (defaults to "You must 
+     * select at least one item in this group")
+     */
+    blankText : "You must select at least one item in this group",
+    
+    // private
+    defaultType : 'checkbox',
+    
+    // private
+    groupCls : 'x-form-check-group',
+    
+    // private
+    initComponent: function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires when the state of a child checkbox changes.
+             * @param {Ext.form.CheckboxGroup} this
+             * @param {Array} checked An array containing the checked boxes.
+             */
+            'change'
+        );   
+        Ext.form.CheckboxGroup.superclass.initComponent.call(this);
+    },
+    
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var panelCfg = {
+                cls: this.groupCls,
+                layout: 'column',
+                border: false,
+                renderTo: ct
+            };
+            var colCfg = {
+                defaultType: this.defaultType,
+                layout: 'form',
+                border: false,
+                defaults: {
+                    hideLabel: true,
+                    anchor: '100%'
+                }
+            };
+            
+            if(this.items[0].items){
+                
+                // The container has standard ColumnLayout configs, so pass them in directly
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: this.items.length},
+                    defaults: this.defaults,
+                    items: this.items
+                });
+                for(var i=0, len=this.items.length; i<len; i++){
+                    Ext.applyIf(this.items[i], colCfg);
+                }
+                
+            }else{
+                
+                // The container has field item configs, so we have to generate the column
+                // panels first then move the items into the columns as needed.
+                
+                var numCols, cols = [];
+                
+                if(typeof this.columns == 'string'){ // 'auto' so create a col per item
+                    this.columns = this.items.length;
+                }
+                if(!Ext.isArray(this.columns)){
+                    var cs = [];
+                    for(var i=0; i<this.columns; i++){
+                        cs.push((100/this.columns)*.01); // distribute by even %
+                    }
+                    this.columns = cs;
+                }
+                
+                numCols = this.columns.length;
+                
+                // Generate the column configs with the correct width setting
+                for(var i=0; i<numCols; i++){
+                    var cc = Ext.apply({items:[]}, colCfg);
+                    cc[this.columns[i] <= 1 ? 'columnWidth' : 'width'] = this.columns[i];
+                    if(this.defaults){
+                        cc.defaults = Ext.apply(cc.defaults || {}, this.defaults)
+                    }
+                    cols.push(cc);
+                };
+                
+                // Distribute the original items into the columns
+                if(this.vertical){
+                    var rows = Math.ceil(this.items.length / numCols), ri = 0;
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        if(i>0 && i%rows==0){
+                            ri++;
+                        }
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ri].items.push(this.items[i]);
+                    };
+                }else{
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        var ci = i % numCols;
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ci].items.push(this.items[i]);
+                    };
+                }
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: numCols},
+                    items: cols
+                });
+            }
+            
+            this.panel = new Ext.Panel(panelCfg);
+            this.panel.ownerCt = this;
+            this.el = this.panel.getEl();
+            
+            if(this.forId && this.itemCls){
+                var l = this.el.up(this.itemCls).child('label', true);
+                if(l){
+                    l.setAttribute('htmlFor', this.forId);
+                }
+            }
+            
+            var fields = this.panel.findBy(function(c){
+                return c.isFormField;
+            }, this);
+            
+            this.items = new Ext.util.MixedCollection();
+            this.items.addAll(fields);
+        }
+        Ext.form.CheckboxGroup.superclass.onRender.call(this, ct, position);
+    },
+    
+    afterRender : function(){
+        Ext.form.CheckboxGroup.superclass.afterRender.call(this);
+        if(this.values){
+            this.setValue.apply(this, this.values);
+            delete this.values;
+        }
+        this.eachItem(function(item){
+            item.on('check', this.fireChecked, this);
+            item.inGroup = true;
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        //ugly method required to layout hidden items
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    fireChecked: function(){
+        var arr = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                arr.push(item);
+            }
+        });
+        this.fireEvent('change', this, arr);
+    },
+    
+    // private
+    validateValue : function(value){
+        if(!this.allowBlank){
+            var blank = true;
+            this.eachItem(function(f){
+                if(f.checked){
+                    return (blank = false);
+                }
+            });
+            if(blank){
+                this.markInvalid(this.blankText);
+                return false;
+            }
+        }
+        return true;
+    },
+    
+    // private
+    onDisable : function(){
+        this.eachItem(function(item){
+            item.disable();
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.eachItem(function(item){
+            item.enable();
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    onResize : function(w, h){
+        this.panel.setSize(w, h);
+        this.panel.doLayout();
+    },
+    
+    // inherit docs from Field
+    reset : function(){
+        Ext.form.CheckboxGroup.superclass.reset.call(this);
+        this.eachItem(function(c){
+            if(c.reset){
+                c.reset();
+            }
+        });
+    },
+    
+    /**
+     * {@link Ext.form.Checkbox#setValue Set the value(s)} of an item or items
+     * in the group. Examples illustrating how this method may be called:
+     * <pre><code>
+// call with name and value
+myCheckboxGroup.setValue('cb-col-1', true);
+// call with an array of boolean values 
+myCheckboxGroup.setValue([true, false, false]);
+// call with an object literal specifying item:value pairs
+myCheckboxGroup.setValue({
+    'cb-col-2': false,
+    'cb-col-3': true
+});
+// use comma separated string to set items with name to true (checked)
+myCheckboxGroup.setValue('cb-col-1,cb-col-3');
+     * </code></pre>
+     * See {@link Ext.form.Checkbox#setValue} for additional information.
+     * @param {Mixed} id The checkbox to check, or as described by example shown.
+     * @param {Boolean} value (optional) The value to set the item.
+     * @return {Ext.form.CheckboxGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length == 1){
+                if(Ext.isArray(id)){
+                    //an array of boolean values
+                    Ext.each(id, function(val, idx){
+                        var item = this.items.itemAt(idx);
+                        if(item){
+                            item.setValue(val);
+                        }
+                    }, this);
+                }else if(Ext.isObject(id)){
+                    //set of name/value pairs
+                    for(var i in id){
+                        var f = this.getBox(i);
+                        if(f){
+                            f.setValue(id[i]);
+                        }
+                    }
+                }else{
+                    this.setValueForItem(id);
+                }
+            }else{
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                }
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    onDestroy: function(){
+        Ext.destroy(this.panel);
+        Ext.form.CheckboxGroup.superclass.onDestroy.call(this);
+
+    },
+    
+    setValueForItem : function(val){
+        val = String(val).split(',');
+        this.eachItem(function(item){
+            if(val.indexOf(item.inputValue)> -1){
+                item.setValue(true);
+            }
+        });
+    },
+    
+    // private
+    getBox : function(id){
+        var box = null;
+        this.eachItem(function(f){
+            if(id == f || f.dataIndex == id || f.id == id || f.getName() == id){
+                box = f;
+                return false;
+            }
+        });
+        return box;
+    },
+    
+    /**
+     * Gets an array of the selected {@link Ext.form.Checkbox} in the group.
+     * @return {Array} An array of the selected checkboxes.
+     */
+    getValue : function(){
+        var out = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                out.push(item);
+            }
+        });
+        return out;
+    },
+    
+    // private
+    eachItem: function(fn){
+        if(this.items && this.items.each){
+            this.items.each(fn, this);
+        }
+    },
+    
+    /**
+     * @cfg {String} name
+     * @hide
+     */
+    /**
+     * @method initValue
+     * @hide
+     */
+    initValue : Ext.emptyFn,
+    /**
+     * @method getValue
+     * @hide
+     */
+    getValue : Ext.emptyFn,
+    /**
+     * @method getRawValue
+     * @hide
+     */
+    getRawValue : Ext.emptyFn,
+    
+    /**
+     * @method setRawValue
+     * @hide
+     */
+    setRawValue : Ext.emptyFn
+    
+});
+
+Ext.reg('checkboxgroup', Ext.form.CheckboxGroup);
+/**
+ * @class Ext.form.Radio
+ * @extends Ext.form.Checkbox
+ * Single radio field.  Same as Checkbox, but provided as a convenience for automatically setting the input type.
+ * Radio grouping is handled automatically by the browser if you give each radio in a group the same name.
+ * @constructor
+ * Creates a new Radio
+ * @param {Object} config Configuration options
+ * @xtype radio
+ */
+Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
+    inputType: 'radio',
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    /**
+     * If this radio is part of a group, it will return the selected value
+     * @return {String}
+     */
+    getGroupValue : function(){
+    	var p = this.el.up('form') || Ext.getBody();
+        var c = p.child('input[name='+this.el.dom.name+']:checked', true);
+        return c ? c.value : null;
+    },
+
+    // private
+    onClick : function(){
+    	if(this.el.dom.checked != this.checked){
+			var els = this.getCheckEl().select('input[name=' + this.el.dom.name + ']');
+			els.each(function(el){
+				if(el.dom.id == this.id){
+					this.setValue(true);
+				}else{
+					Ext.getCmp(el.dom.id).setValue(false);
+				}
+			}, this);
+		}
+    },
+
+    /**
+     * Sets either the checked/unchecked status of this Radio, or, if a string value
+     * is passed, checks a sibling Radio of the same name whose value is the value specified.
+     * @param value {String/Boolean} Checked value, or the value of the sibling radio button to check.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+    	if (typeof v == 'boolean') {
+            Ext.form.Radio.superclass.setValue.call(this, v);
+        } else {
+            var r = this.getCheckEl().child('input[name=' + this.el.dom.name + '][value=' + v + ']', true);
+            if(r){
+                Ext.getCmp(r.id).setValue(true);
+            }
+        }
+        return this;
+    },
+    
+    // private
+    getCheckEl: function(){
+        if(this.inGroup){
+            return this.el.up('.x-form-radio-group')
+        }
+        return this.el.up('form') || Ext.getBody();
+    }
+});
+Ext.reg('radio', Ext.form.Radio);
+/**
+ * @class Ext.form.RadioGroup
+ * @extends Ext.form.CheckboxGroup
+ * A grouping container for {@link Ext.form.Radio} controls.
+ * @constructor
+ * Creates a new RadioGroup
+ * @param {Object} config Configuration options
+ * @xtype radiogroup
+ */
+Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
+    /**
+     * @cfg {Boolean} allowBlank True to allow every item in the group to be blank (defaults to true).
+     * If allowBlank = false and no items are selected at validation time, {@link @blankText} will
+     * be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails
+     * (defaults to 'You must select one item in this group')
+     */
+    blankText : 'You must select one item in this group',
+    
+    // private
+    defaultType : 'radio',
+    
+    // private
+    groupCls : 'x-form-radio-group',
+    
+    /**
+     * @event change
+     * Fires when the state of a child radio changes.
+     * @param {Ext.form.RadioGroup} this
+     * @param {Ext.form.Radio} checked The checked radio
+     */
+    
+    /**
+     * Gets the selected {@link Ext.form.Radio} in the group, if it exists.
+     * @return {Ext.form.Radio} The selected radio.
+     */
+    getValue : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        return out;
+    },
+    
+    /**
+     * Sets the checked radio in the group.
+     * @param {String/Ext.form.Radio} id The radio to check.
+     * @param {Boolean} value The value to set the radio.
+     * @return {Ext.form.RadioGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length > 1){
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                    if(f.checked){
+                        this.eachItem(function(item){
+                            if (item !== f){
+                                item.setValue(false);
+                            }
+                        });
+                    }
+                }
+            }else{
+                this.setValueForItem(id);
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    fireChecked : function(){
+        if(!this.checkTask){
+            this.checkTask = new Ext.util.DelayedTask(this.bufferChecked, this);
+        }
+        this.checkTask.delay(10);
+    },
+    
+    // private
+    bufferChecked : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        this.fireEvent('change', this, out);
+    },
+    
+    onDestroy : function(){
+        if(this.checkTask){
+            this.checkTask.cancel();
+            this.checkTask = null;
+        }
+        Ext.form.RadioGroup.superclass.onDestroy.call(this);
+    }
+
+});
+
+Ext.reg('radiogroup', Ext.form.RadioGroup);
+/**
+ * @class Ext.form.Hidden
+ * @extends Ext.form.Field
+ * A basic hidden field for storing hidden values in forms that need to be passed in the form submit.
+ * @constructor
+ * Create a new Hidden field.
+ * @param {Object} config Configuration options
+ * @xtype hidden
+ */
+Ext.form.Hidden = Ext.extend(Ext.form.Field, {
+    // private
+    inputType : 'hidden',
+
+    // private
+    onRender : function(){
+        Ext.form.Hidden.superclass.onRender.apply(this, arguments);
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    // These are all private overrides
+    setSize : Ext.emptyFn,
+    setWidth : Ext.emptyFn,
+    setHeight : Ext.emptyFn,
+    setPosition : Ext.emptyFn,
+    setPagePosition : Ext.emptyFn,
+    markInvalid : Ext.emptyFn,
+    clearInvalid : Ext.emptyFn
+});
+Ext.reg('hidden', Ext.form.Hidden);/**
+ * @class Ext.form.BasicForm
+ * @extends Ext.util.Observable
+ * <p>Encapsulates the DOM &lt;form> element at the heart of the {@link Ext.form.FormPanel FormPanel} class, and provides
+ * input field management, validation, submission, and form loading services.</p>
+ * <p>By default, Ext Forms are submitted through Ajax, using an instance of {@link Ext.form.Action.Submit}.
+ * To enable normal browser submission of an Ext Form, use the {@link #standardSubmit} config option.</p>
+ * <p><b><u>File Uploads</u></b></p>
+ * <p>{@link #fileUpload File uploads} are not performed using Ajax submission, that
+ * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+ * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+ * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+ * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+ * but removed after the return data has been gathered.</p>
+ * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+ * server is using JSON to send the return object, then the
+ * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+ * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+ * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+ * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+ * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+ * is created containing a <tt>responseText</tt> property in order to conform to the
+ * requirements of event handlers and callbacks.</p>
+ * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+ * and some server technologies (notably JEE) may require some custom processing in order to
+ * retrieve parameter names and parameter values from the packet content.</p>
+ * @constructor
+ * @param {Mixed} el The form element or its id
+ * @param {Object} config Configuration options
+ */
+Ext.form.BasicForm = function(el, config){
+    Ext.apply(this, config);
+    if(Ext.isString(this.paramOrder)){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    /*
+     * @property items
+     * A {@link Ext.util.MixedCollection MixedCollection) containing all the Ext.form.Fields in this form.
+     * @type MixedCollection
+     */
+    this.items = new Ext.util.MixedCollection(false, function(o){
+        return o.itemId || o.id || (o.id = Ext.id());
+    });
+    this.addEvents(
+        /**
+         * @event beforeaction
+         * Fires before any action is performed. Return false to cancel the action.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} to be performed
+         */
+        'beforeaction',
+        /**
+         * @event actionfailed
+         * Fires when an action fails.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that failed
+         */
+        'actionfailed',
+        /**
+         * @event actioncomplete
+         * Fires when an action is completed.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that completed
+         */
+        'actioncomplete'
+    );
+
+    if(el){
+        this.initEl(el);
+    }
+    Ext.form.BasicForm.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.form.BasicForm, Ext.util.Observable, {
+    /**
+     * @cfg {String} method
+     * The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
+     */
+    /**
+     * @cfg {DataReader} reader
+     * An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read
+     * data when executing 'load' actions. This is optional as there is built-in
+     * support for processing JSON.  For additional information on using an XMLReader
+     * see the example provided in examples/form/xml-form.html.
+     */
+    /**
+     * @cfg {DataReader} errorReader
+     * <p>An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to
+     * read field error messages returned from 'submit' actions. This is optional
+     * as there is built-in support for processing JSON.</p>
+     * <p>The Records which provide messages for the invalid Fields must use the
+     * Field name (or id) as the Record ID, and must contain a field called 'msg'
+     * which contains the error message.</p>
+     * <p>The errorReader does not have to be a full-blown implementation of a
+     * DataReader. It simply needs to implement a <tt>read(xhr)</tt> function
+     * which returns an Array of Records in an object with the following
+     * structure:</p><pre><code>
+{
+    records: recordArray
+}
+</code></pre>
+     */
+    /**
+     * @cfg {String} url
+     * The URL to use for form actions if one isn't supplied in the
+     * <code>{@link #doAction doAction} options</code>.
+     */
+    /**
+     * @cfg {Boolean} fileUpload
+     * Set to true if this form is a file upload.
+     * <p>File uploads are not performed using normal 'Ajax' techniques, that is they are <b>not</b>
+     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     */
+    /**
+     * @cfg {Object} baseParams
+     * <p>Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     */
+    /**
+     * @cfg {Number} timeout Timeout for form actions in seconds (default is 30 seconds).
+     */
+    timeout: 30,
+
+    /**
+     * @cfg {Object} api (Optional) If specified load and submit actions will be handled
+     * with {@link Ext.form.Action.DirectLoad} and {@link Ext.form.Action.DirectSubmit}.
+     * Methods which have been imported by Ext.Direct can be specified here to load and submit
+     * forms.
+     * Such as the following:<pre><code>
+api: {
+    load: App.ss.MyProfile.load,
+    submit: App.ss.MyProfile.submit
+}
+</code></pre>
+     * <p>Load actions can use <code>{@link #paramOrder}</code> or <code>{@link #paramsAsHash}</code>
+     * to customize how the load method is invoked.
+     * Submit actions will always use a standard form submit. The formHandler configuration must
+     * be set on the associated server-side method which has been imported by Ext.Direct</p>
+     */
+
+    /**
+     * @cfg {Array/String} paramOrder <p>A list of params to be executed server side.
+     * Defaults to <tt>undefined</tt>. Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration.</p>
+     * <br><p>Specify the params in the order in which they must be executed on the
+     * server-side as either (1) an Array of String values, or (2) a String of params
+     * delimited by either whitespace, comma, or pipe. For example,
+     * any of the following would be acceptable:</p><pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration. Send parameters as a collection of named
+     * arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+
+    // private
+    activeAction : null,
+
+    /**
+     * @cfg {Boolean} trackResetOnLoad If set to <tt>true</tt>, {@link #reset}() resets to the last loaded
+     * or {@link #setValues}() data instead of when the form was first created.  Defaults to <tt>false</tt>.
+     */
+    trackResetOnLoad : false,
+
+    /**
+     * @cfg {Boolean} standardSubmit If set to true, standard HTML form submits are used instead of XHR (Ajax) style
+     * form submissions. (defaults to false)<br>
+     * <p><b>Note:</b> When using standardSubmit, the options to {@link #submit} are ignored because Ext's
+     * Ajax infrastracture is bypassed. To pass extra parameters (baseParams and params), you will need to
+     * create hidden fields within the form.</p>
+     * <p>The url config option is also bypassed, so set the action as well:</p>
+     * <pre><code>
+PANEL.getForm().getEl().dom.action = 'URL'
+     * </code></pre>
+     * An example encapsulating the above:
+     * <pre><code>
+new Ext.FormPanel({
+    standardSubmit: true,
+    baseParams: {
+        foo: 'bar'
+    },
+    url: 'myProcess.php',
+    items: [{
+        xtype: 'textfield',
+        name: 'userName'
+    }],
+    buttons: [{
+        text: 'Save',
+        handler: function(){
+            var O = this.ownerCt;
+            if (O.getForm().isValid()) {
+                if (O.url)
+                    O.getForm().getEl().dom.action = O.url;
+                if (O.baseParams) {
+                    for (i in O.baseParams) {
+                        O.add({
+                            xtype: 'hidden',
+                            name: i,
+                            value: O.baseParams[i]
+                        })
+                    }
+                    O.doLayout();
+                }
+                O.getForm().submit();
+            }
+        }
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
+     * element by passing it or its id or mask the form itself by passing in true.
+     * @type Mixed
+     * @property waitMsgTarget
+     */
+
+    // private
+    initEl : function(el){
+        this.el = Ext.get(el);
+        this.id = this.el.id || Ext.id();
+        if(!this.standardSubmit){
+            this.el.on('submit', this.onSubmit, this);
+        }
+        this.el.addClass('x-form');
+    },
+
+    /**
+     * Get the HTML form Element
+     * @return Ext.Element
+     */
+    getEl: function(){
+        return this.el;
+    },
+
+    // private
+    onSubmit : function(e){
+        e.stopEvent();
+    },
+
+    // private
+    destroy: function() {
+        this.items.each(function(f){
+            Ext.destroy(f);
+        });
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+        this.purgeListeners();
+    },
+
+    /**
+     * Returns true if client-side validation on the form is successful.
+     * @return Boolean
+     */
+    isValid : function(){
+        var valid = true;
+        this.items.each(function(f){
+           if(!f.validate()){
+               valid = false;
+           }
+        });
+        return valid;
+    },
+
+    /**
+     * <p>Returns true if any fields in this form have changed from their original values.</p>
+     * <p>Note that if this BasicForm was configured with {@link #trackResetOnLoad} then the
+     * Fields' <i>original values</i> are updated when the values are loaded by {@link #setValues}
+     * or {@link #loadRecord}.</p>
+     * @return Boolean
+     */
+    isDirty : function(){
+        var dirty = false;
+        this.items.each(function(f){
+           if(f.isDirty()){
+               dirty = true;
+               return false;
+           }
+        });
+        return dirty;
+    },
+
+    /**
+     * Performs a predefined action ({@link Ext.form.Action.Submit} or
+     * {@link Ext.form.Action.Load}) or a custom extension of {@link Ext.form.Action}
+     * to perform application-specific processing.
+     * @param {String/Object} actionName The name of the predefined action type,
+     * or instance of {@link Ext.form.Action} to perform.
+     * @param {Object} options (optional) The options to pass to the {@link Ext.form.Action}.
+     * All of the config options listed below are supported by both the
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * actions unless otherwise noted (custom actions could also accept
+     * other config options):<ul>
+     *
+     * <li><b>url</b> : String<div class="sub-desc">The url for the action (defaults
+     * to the form's {@link #url}.)</div></li>
+     *
+     * <li><b>method</b> : String<div class="sub-desc">The form method to use (defaults
+     * to the form's method, or POST if not defined)</div></li>
+     *
+     * <li><b>params</b> : String/Object<div class="sub-desc"><p>The params to pass
+     * (defaults to the form's baseParams, or none if not defined)</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     *
+     * <li><b>headers</b> : Object<div class="sub-desc">Request headers to set for the action
+     * (defaults to the form's default headers)</div></li>
+     *
+     * <li><b>success</b> : Function<div class="sub-desc">The callback that will
+     * be invoked after a successful response (see top of
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * for a description of what constitutes a successful response).
+     * The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>failure</b> : Function<div class="sub-desc">The callback that will be invoked after a
+     * failed transaction attempt. The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : The {@link Ext.form.BasicForm} that requested the action.</li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#failureType failureType}</tt></li>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the
+     * callback functions (The <tt>this</tt> reference for the callback functions).</div></li>
+     *
+     * <li><b>clientValidation</b> : Boolean<div class="sub-desc">Submit Action only.
+     * Determines whether a Form's fields are validated in a final call to
+     * {@link Ext.form.BasicForm#isValid isValid} prior to submission. Set to <tt>false</tt>
+     * to prevent this. If undefined, pre-submission field validation is performed.</div></li></ul>
+     *
+     * @return {BasicForm} this
+     */
+    doAction : function(action, options){
+        if(Ext.isString(action)){
+            action = new Ext.form.Action.ACTION_TYPES[action](this, options);
+        }
+        if(this.fireEvent('beforeaction', this, action) !== false){
+            this.beforeAction(action);
+            action.run.defer(100, action);
+        }
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Submit submit action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details).<br>
+     * <p><b>Note:</b> this is ignored when using the {@link #standardSubmit} option.</p>
+     * <p>The following code:</p><pre><code>
+myFormPanel.getForm().submit({
+    clientValidation: true,
+    url: 'updateConsignment.php',
+    params: {
+        newStatus: 'delivered'
+    },
+    success: function(form, action) {
+       Ext.Msg.alert('Success', action.result.msg);
+    },
+    failure: function(form, action) {
+        switch (action.failureType) {
+            case Ext.form.Action.CLIENT_INVALID:
+                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
+                break;
+            case Ext.form.Action.CONNECT_FAILURE:
+                Ext.Msg.alert('Failure', 'Ajax communication failed');
+                break;
+            case Ext.form.Action.SERVER_INVALID:
+               Ext.Msg.alert('Failure', action.result.msg);
+       }
+    }
+});
+</code></pre>
+     * would process the following server response for a successful submission:<pre><code>
+{
+    "success":true, // note this is Boolean, not string
+    "msg":"Consignment updated"
+}
+</code></pre>
+     * and the following server response for a failed submission:<pre><code>
+{
+    "success":false, // note this is Boolean, not string
+    "msg":"You do not have permission to perform this operation"
+}
+</code></pre>
+     * @return {BasicForm} this
+     */
+    submit : function(options){
+        if(this.standardSubmit){
+            var v = this.isValid();
+            if(v){
+                this.el.dom.submit();
+            }
+            return v;
+        }
+        var submitAction = String.format('{0}submit', this.api ? 'direct' : '');
+        this.doAction(submitAction, options);
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Load load action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details)
+     * @return {BasicForm} this
+     */
+    load : function(options){
+        var loadAction = String.format('{0}load', this.api ? 'direct' : '');
+        this.doAction(loadAction, options);
+        return this;
+    },
+
+    /**
+     * Persists the values in this form into the passed {@link Ext.data.Record} object in a beginEdit/endEdit block.
+     * @param {Record} record The record to edit
+     * @return {BasicForm} this
+     */
+    updateRecord : function(record){
+        record.beginEdit();
+        var fs = record.fields;
+        fs.each(function(f){
+            var field = this.findField(f.name);
+            if(field){
+                record.set(f.name, field.getValue());
+            }
+        }, this);
+        record.endEdit();
+        return this;
+    },
+
+    /**
+     * Loads an {@link Ext.data.Record} into this form by calling {@link #setValues} with the
+     * {@link Ext.data.Record#data record data}.
+     * See also {@link #trackResetOnLoad}.
+     * @param {Record} record The record to load
+     * @return {BasicForm} this
+     */
+    loadRecord : function(record){
+        this.setValues(record.data);
+        return this;
+    },
+
+    // private
+    beforeAction : function(action){
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.mask(o.waitMsg, 'x-mask-loading');
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget = Ext.get(this.waitMsgTarget);
+                this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading');
+            }else{
+                Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...');
+            }
+        }
+    },
+
+    // private
+    afterAction : function(action, success){
+        this.activeAction = null;
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.unmask();
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget.unmask();
+            }else{
+                Ext.MessageBox.updateProgress(1);
+                Ext.MessageBox.hide();
+            }
+        }
+        if(success){
+            if(o.reset){
+                this.reset();
+            }
+            Ext.callback(o.success, o.scope, [this, action]);
+            this.fireEvent('actioncomplete', this, action);
+        }else{
+            Ext.callback(o.failure, o.scope, [this, action]);
+            this.fireEvent('actionfailed', this, action);
+        }
+    },
+
+    /**
+     * Find a {@link Ext.form.Field} in this form.
+     * @param {String} id The value to search for (specify either a {@link Ext.Component#id id},
+     * {@link Ext.grid.Column#dataIndex dataIndex}, {@link Ext.form.Field#getName name or hiddenName}).
+     * @return Field
+     */
+    findField : function(id){
+        var field = this.items.get(id);
+        if(!Ext.isObject(field)){
+            this.items.each(function(f){
+                if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){
+                    field = f;
+                    return false;
+                }
+            });
+        }
+        return field || null;
+    },
+
+
+    /**
+     * Mark fields in this form invalid in bulk.
+     * @param {Array/Object} errors Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}
+     * @return {BasicForm} this
+     */
+    markInvalid : function(errors){
+        if(Ext.isArray(errors)){
+            for(var i = 0, len = errors.length; i < len; i++){
+                var fieldError = errors[i];
+                var f = this.findField(fieldError.id);
+                if(f){
+                    f.markInvalid(fieldError.msg);
+                }
+            }
+        }else{
+            var field, id;
+            for(id in errors){
+                if(!Ext.isFunction(errors[id]) && (field = this.findField(id))){
+                    field.markInvalid(errors[id]);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Set values for fields in this form in bulk.
+     * @param {Array/Object} values Either an array in the form:<pre><code>
+[{id:'clientName', value:'Fred. Olsen Lines'},
+ {id:'portOfLoading', value:'FXT'},
+ {id:'portOfDischarge', value:'OSL'} ]</code></pre>
+     * or an object hash of the form:<pre><code>
+{
+    clientName: 'Fred. Olsen Lines',
+    portOfLoading: 'FXT',
+    portOfDischarge: 'OSL'
+}</code></pre>
+     * @return {BasicForm} this
+     */
+    setValues : function(values){
+        if(Ext.isArray(values)){ // array of objects
+            for(var i = 0, len = values.length; i < len; i++){
+                var v = values[i];
+                var f = this.findField(v.id);
+                if(f){
+                    f.setValue(v.value);
+                    if(this.trackResetOnLoad){
+                        f.originalValue = f.getValue();
+                    }
+                }
+            }
+        }else{ // object hash
+            var field, id;
+            for(id in values){
+                if(!Ext.isFunction(values[id]) && (field = this.findField(id))){
+                    field.setValue(values[id]);
+                    if(this.trackResetOnLoad){
+                        field.originalValue = field.getValue();
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * <p>Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
+     * If multiple fields exist with the same name they are returned as an array.</p>
+     * <p><b>Note:</b> The values are collected from all enabled HTML input elements within the form, <u>not</u> from
+     * the Ext Field objects. This means that all returned values are Strings (or Arrays of Strings) and that the
+     * value can potentially be the emptyText of a field.</p>
+     * @param {Boolean} asString (optional) Pass true to return the values as a string. (defaults to false, returning an Object)
+     * @return {String/Object}
+     */
+    getValues : function(asString){
+        var fs = Ext.lib.Ajax.serializeForm(this.el.dom);
+        if(asString === true){
+            return fs;
+        }
+        return Ext.urlDecode(fs);
+    },
+
+    getFieldValues : function(){
+        var o = {};
+        this.items.each(function(f){
+           o[f.getName()] = f.getValue();
+        });
+        return o;
+    },
+
+    /**
+     * Clears all invalid messages in this form.
+     * @return {BasicForm} this
+     */
+    clearInvalid : function(){
+        this.items.each(function(f){
+           f.clearInvalid();
+        });
+        return this;
+    },
+
+    /**
+     * Resets this form.
+     * @return {BasicForm} this
+     */
+    reset : function(){
+        this.items.each(function(f){
+            f.reset();
+        });
+        return this;
+    },
+
+    /**
+     * Add Ext.form Components to this form's Collection. This does not result in rendering of
+     * the passed Component, it just enables the form to validate Fields, and distribute values to
+     * Fields.
+     * <p><b>You will not usually call this function. In order to be rendered, a Field must be added
+     * to a {@link Ext.Container Container}, usually an {@link Ext.form.FormPanel FormPanel}.
+     * The FormPanel to which the field is added takes care of adding the Field to the BasicForm's
+     * collection.</b></p>
+     * @param {Field} field1
+     * @param {Field} field2 (optional)
+     * @param {Field} etc (optional)
+     * @return {BasicForm} this
+     */
+    add : function(){
+        this.items.addAll(Array.prototype.slice.call(arguments, 0));
+        return this;
+    },
+
+
+    /**
+     * Removes a field from the items collection (does NOT remove its markup).
+     * @param {Field} field
+     * @return {BasicForm} this
+     */
+    remove : function(field){
+        this.items.remove(field);
+        return this;
+    },
+
+    /**
+     * Iterates through the {@link Ext.form.Field Field}s which have been {@link #add add}ed to this BasicForm,
+     * checks them for an id attribute, and calls {@link Ext.form.Field#applyToMarkup} on the existing dom element with that id.
+     * @return {BasicForm} this
+     */
+    render : function(){
+        this.items.each(function(f){
+            if(f.isFormField && !f.rendered && document.getElementById(f.id)){ // if the element exists
+                f.applyToMarkup(f.id);
+            }
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#apply} for all fields in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyToFields : function(o){
+        this.items.each(function(f){
+           Ext.apply(f, o);
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#applyIf} for all field in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyIfToFields : function(o){
+        this.items.each(function(f){
+           Ext.applyIf(f, o);
+        });
+        return this;
+    },
+
+    callFieldMethod : function(fnName, args){
+        args = args || [];
+        this.items.each(function(f){
+            if(Ext.isFunction(f[fnName])){
+                f[fnName].apply(f, args);
+            }
+        });
+        return this;
+    }
+});
+
+// back compat
+Ext.BasicForm = Ext.form.BasicForm;/**
+ * @class Ext.form.FormPanel
+ * @extends Ext.Panel
+ * <p>Standard form container.</p>
+ * 
+ * <p><b><u>Layout</u></b></p>
+ * <p>By default, FormPanel is configured with <tt>layout:'form'</tt> to use an {@link Ext.layout.FormLayout}
+ * layout manager, which styles and renders fields and labels correctly. When nesting additional Containers
+ * within a FormPanel, you should ensure that any descendant Containers which host input Fields use the
+ * {@link Ext.layout.FormLayout} layout manager.</p>
+ * 
+ * <p><b><u>BasicForm</u></b></p>
+ * <p>Although <b>not listed</b> as configuration options of FormPanel, the FormPanel class accepts all
+ * of the config options required to configure its internal {@link Ext.form.BasicForm} for:
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.BasicForm#fileUpload file uploads}</li>
+ * <li>functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form</li>
+ * </ul></div>
+ *  
+ * <p><b>Note</b>: If subclassing FormPanel, any configuration options for the BasicForm must be applied to
+ * the <tt><b>initialConfig</b></tt> property of the FormPanel. Applying {@link Ext.form.BasicForm BasicForm}
+ * configuration settings to <b><tt>this</tt></b> will <b>not</b> affect the BasicForm's configuration.</p>
+ * 
+ * <p><b><u>Form Validation</u></b></p>
+ * <p>For information on form validation see the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.TextField}</li>
+ * <li>{@link Ext.form.VTypes}</li>
+ * <li>{@link Ext.form.BasicForm#doAction BasicForm.doAction <b>clientValidation</b> notes}</li>
+ * <li><tt>{@link Ext.form.FormPanel#monitorValid monitorValid}</tt></li>
+ * </ul></div>
+ * 
+ * <p><b><u>Form Submission</u></b></p>
+ * <p>By default, Ext Forms are submitted through Ajax, using {@link Ext.form.Action}. To enable normal browser
+ * submission of the {@link Ext.form.BasicForm BasicForm} contained in this FormPanel, see the
+ * <tt><b>{@link Ext.form.BasicForm#standardSubmit standardSubmit}</b></tt> option.</p>
+ * 
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype form
+ */
+Ext.FormPanel = Ext.extend(Ext.Panel, {
+	/**
+	 * @cfg {String} formId (optional) The id of the FORM tag (defaults to an auto-generated id).
+	 */
+    /**
+     * @cfg {Boolean} hideLabels
+     * <p><tt>true</tt> to hide field labels by default (sets <tt>display:none</tt>). Defaults to
+     * <tt>false</tt>.</p>
+     * <p>Also see {@link Ext.Component}.<tt>{@link Ext.Component#hideLabel hideLabel}</tt>.
+     */
+    /**
+     * @cfg {Number} labelPad
+     * The default padding in pixels for field labels (defaults to <tt>5</tt>). <tt>labelPad</tt> only
+     * applies if <tt>{@link #labelWidth}</tt> is also specified, otherwise it will be ignored.
+     */
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.Component}.<tt>{@link Ext.Component#labelSeparator labelSeparator}</tt>
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels in pixels. This property cascades to child containers
+     * and can be overridden on any child container (e.g., a fieldset can specify a different <tt>labelWidth</tt>
+     * for its fields) (defaults to <tt>100</tt>).
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the x-form-item of fields. This property cascades to child containers.
+     */
+    /**
+     * @cfg {Array} buttons
+     * An array of {@link Ext.Button}s or {@link Ext.Button} configs used to add buttons to the footer of this FormPanel.<br>
+     * <p>Buttons in the footer of a FormPanel may be configured with the option <tt>formBind: true</tt>. This causes
+     * the form's {@link #monitorValid valid state monitor task} to enable/disable those Buttons depending on
+     * the form's valid/invalid state.</p>
+     */
+
+
+    /**
+     * @cfg {Number} minButtonWidth Minimum width of all buttons in pixels (defaults to <tt>75</tt>).
+     */
+    minButtonWidth : 75,
+
+    /**
+     * @cfg {String} labelAlign The label alignment value used for the <tt>text-align</tt> specification
+     * for the <b>container</b>. Valid values are <tt>"left</tt>", <tt>"top"</tt> or <tt>"right"</tt>
+     * (defaults to <tt>"left"</tt>). This property cascades to child <b>containers</b> and can be
+     * overridden on any child <b>container</b> (e.g., a fieldset can specify a different <tt>labelAlign</tt>
+     * for its fields).
+     */
+    labelAlign : 'left',
+
+    /**
+     * @cfg {Boolean} monitorValid If <tt>true</tt>, the form monitors its valid state <b>client-side</b> and
+     * regularly fires the {@link #clientvalidation} event passing that state.<br>
+     * <p>When monitoring valid state, the FormPanel enables/disables any of its configured
+     * {@link #buttons} which have been configured with <code>formBind: true</code> depending
+     * on whether the {@link Ext.form.BasicForm#isValid form is valid} or not. Defaults to <tt>false</tt></p>
+     */
+    monitorValid : false,
+
+    /**
+     * @cfg {Number} monitorPoll The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
+     */
+    monitorPoll : 200,
+
+    /**
+     * @cfg {String} layout Defaults to <tt>'form'</tt>.  Normally this configuration property should not be altered. 
+     * For additional details see {@link Ext.layout.FormLayout} and {@link Ext.Container#layout Ext.Container.layout}.
+     */
+    layout : 'form',
+
+    // private
+    initComponent : function(){
+        this.form = this.createForm();
+        Ext.FormPanel.superclass.initComponent.call(this);
+
+        this.bodyCfg = {
+            tag: 'form',
+            cls: this.baseCls + '-body',
+            method : this.method || 'POST',
+            id : this.formId || Ext.id()
+        };
+        if(this.fileUpload) {
+            this.bodyCfg.enctype = 'multipart/form-data';
+        }
+        this.initItems();
+        
+        this.addEvents(
+            /**
+             * @event clientvalidation
+             * If the monitorValid config option is true, this event fires repetitively to notify of valid state
+             * @param {Ext.form.FormPanel} this
+             * @param {Boolean} valid true if the form has passed client-side validation
+             */
+            'clientvalidation'
+        );
+
+        this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']);
+    },
+
+    // private
+    createForm : function(){
+        var config = Ext.applyIf({listeners: {}}, this.initialConfig);
+        return new Ext.form.BasicForm(null, config);
+    },
+
+    // private
+    initFields : function(){
+        var f = this.form;
+        var formPanel = this;
+        var fn = function(c){
+            if(formPanel.isField(c)){
+                f.add(c);
+            }if(c.isFieldWrap){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                f.add(c.field);
+            }else if(c.doLayout && c != formPanel){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                //each check required for check/radio groups.
+                if(c.items && c.items.each){
+                    c.items.each(fn, this);
+                }
+            }
+        };
+        this.items.each(fn, this);
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.form.el;
+    },
+
+    /**
+     * Provides access to the {@link Ext.form.BasicForm Form} which this Panel contains.
+     * @return {Ext.form.BasicForm} The {@link Ext.form.BasicForm Form} which this Panel contains.
+     */
+    getForm : function(){
+        return this.form;
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.initFields();
+        Ext.FormPanel.superclass.onRender.call(this, ct, position);
+        this.form.initEl(this.body);
+    },
+    
+    // private
+    beforeDestroy : function(){
+        this.stopMonitoring();
+        Ext.FormPanel.superclass.beforeDestroy.call(this);
+        /*
+         * Clear the items here to prevent them being destroyed again.
+         * Don't move this behaviour to BasicForm because it can be used
+         * on it's own.
+         */
+        this.form.items.clear();
+        Ext.destroy(this.form);
+    },
+
+	// Determine if a Component is usable as a form Field.
+    isField : function(c) {
+        return !!c.setValue && !!c.getValue && !!c.markInvalid && !!c.clearInvalid;
+    },
+
+    // private
+    initEvents : function(){
+        Ext.FormPanel.superclass.initEvents.call(this);
+        this.on('remove', this.onRemove, this);
+        this.on('add', this.onAdd, this);
+        if(this.monitorValid){ // initialize after render
+            this.startMonitoring();
+        }
+    },
+    
+    // private
+    onAdd : function(ct, c) {
+		// If a single form Field, add it
+        if (this.isField(c)) {
+            this.form.add(c);
+		// If a Container, add any Fields it might contain
+        } else if (c.findBy) {
+            Ext.applyIf(c, {
+                labelAlign: c.ownerCt.labelAlign,
+                labelWidth: c.ownerCt.labelWidth,
+                itemCls: c.ownerCt.itemCls
+            });
+            this.form.add.apply(this.form, c.findBy(this.isField));
+        }
+    },
+	
+    // private
+    onRemove : function(ct, c) {
+		// If a single form Field, remove it
+        if (this.isField(c)) {
+            Ext.destroy(c.container.up('.x-form-item'));
+        	this.form.remove(c);
+		// If a Container, remove any Fields it might contain
+        } else if (c.findByType) {
+            Ext.each(c.findBy(this.isField), this.form.remove, this.form);
+        }
+    },
+
+    /**
+     * Starts monitoring of the valid state of this form. Usually this is done by passing the config
+     * option "monitorValid"
+     */
+    startMonitoring : function(){
+        if(!this.validTask){
+            this.validTask = new Ext.util.TaskRunner();
+            this.validTask.start({
+                run : this.bindHandler,
+                interval : this.monitorPoll || 200,
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Stops monitoring of the valid state of this form
+     */
+    stopMonitoring : function(){
+        if(this.validTask){
+            this.validTask.stopAll();
+            this.validTask = null;
+        }
+    },
+
+    /**
+     * This is a proxy for the underlying BasicForm's {@link Ext.form.BasicForm#load} call.
+     * @param {Object} options The options to pass to the action (see {@link Ext.form.BasicForm#doAction} for details)
+     */
+    load : function(){
+        this.form.load.apply(this.form, arguments);  
+    },
+
+    // private
+    onDisable : function(){
+        Ext.FormPanel.superclass.onDisable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.disable();
+            });
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.FormPanel.superclass.onEnable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.enable();
+            });
+        }
+    },
+
+    // private
+    bindHandler : function(){
+        var valid = true;
+        this.form.items.each(function(f){
+            if(!f.isValid(true)){
+                valid = false;
+                return false;
+            }
+        });
+        if(this.fbar){
+            var fitems = this.fbar.items.items;
+            for(var i = 0, len = fitems.length; i < len; i++){
+                var btn = fitems[i];
+                if(btn.formBind === true && btn.disabled === valid){
+                    btn.setDisabled(!valid);
+                }
+            }
+        }
+        this.fireEvent('clientvalidation', this, valid);
+    }
+});
+Ext.reg('form', Ext.FormPanel);
+
+Ext.form.FormPanel = Ext.FormPanel;
+
+/**
+ * @class Ext.form.FieldSet
+ * @extends Ext.Panel
+ * Standard container used for grouping items within a {@link Ext.form.FormPanel form}.
+ * <pre><code>
+var form = new Ext.FormPanel({
+    title: 'Simple Form with FieldSets',
+    labelWidth: 75, // label settings here cascade unless overridden
+    url: 'save-form.php',
+    frame:true,
+    bodyStyle:'padding:5px 5px 0',
+    width: 700,
+    renderTo: document.body,
+    layout:'column', // arrange items in columns
+    defaults: {      // defaults applied to items
+        layout: 'form',
+        border: false,
+        bodyStyle: 'padding:4px'
+    },
+    items: [{
+        // Fieldset in Column 1
+        xtype:'fieldset',
+        columnWidth: 0.5,
+        title: 'Fieldset 1',
+        collapsible: true,
+        autoHeight:true,
+        defaults: {
+            anchor: '-20' // leave room for error icon
+        },
+        defaultType: 'textfield',
+        items :[{
+                fieldLabel: 'Field 1'
+            }, {
+                fieldLabel: 'Field 2'
+            }, {
+                fieldLabel: 'Field 3'
+            }
+        ]
+    },{
+        // Fieldset in Column 2 - Panel inside
+        xtype:'fieldset',
+        title: 'Show Panel', // title, header, or checkboxToggle creates fieldset header
+        autoHeight:true,
+        columnWidth: 0.5,
+        checkboxToggle: true,
+        collapsed: true, // fieldset initially collapsed
+        layout:'anchor',
+        items :[{
+            xtype: 'panel',
+            anchor: '100%',
+            title: 'Panel inside a fieldset',
+            frame: true,
+            height: 100
+        }]
+    }]
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype fieldset
+ */
+Ext.form.FieldSet = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Mixed} checkboxToggle <tt>true</tt> to render a checkbox into the fieldset frame just
+     * in front of the legend to expand/collapse the fieldset when the checkbox is toggled. (defaults
+     * to <tt>false</tt>).
+     * <p>A {@link Ext.DomHelper DomHelper} element spec may also be specified to create the checkbox.
+     * If <tt>true</tt> is specified, the default DomHelper config object used to create the element
+     * is:</p><pre><code>
+     * {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}
+     * </code></pre>   
+     */
+    /**
+     * @cfg {String} checkboxName The name to assign to the fieldset's checkbox if <tt>{@link #checkboxToggle} = true</tt>
+     * (defaults to <tt>'[checkbox id]-checkbox'</tt>).
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <tt>true</tt> to make the fieldset collapsible and have the expand/collapse toggle button automatically
+     * rendered into the legend element, <tt>false</tt> to keep the fieldset statically sized with no collapse
+     * button (defaults to <tt>false</tt>). Another option is to configure <tt>{@link #checkboxToggle}</tt>.
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels. This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the <tt>x-form-item</tt> of fields (see 
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} for details).
+     * This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the fieldset (defaults to <tt>'x-fieldset'</tt>).
+     */
+    baseCls : 'x-fieldset',
+    /**
+     * @cfg {String} layout The {@link Ext.Container#layout} to use inside the fieldset (defaults to <tt>'form'</tt>).
+     */
+    layout : 'form',
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>false</tt>).
+     */
+    animCollapse : false,
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('fieldset');
+            this.el.id = this.id;
+            if (this.title || this.header || this.checkboxToggle) {
+                this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header';
+            }
+        }
+
+        Ext.form.FieldSet.superclass.onRender.call(this, ct, position);
+
+        if(this.checkboxToggle){
+            var o = typeof this.checkboxToggle == 'object' ?
+                    this.checkboxToggle :
+                    {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'};
+            this.checkbox = this.header.insertFirst(o);
+            this.checkbox.dom.checked = !this.collapsed;
+            this.mon(this.checkbox, 'click', this.onCheckClick, this);
+        }
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = false;
+        }
+        Ext.form.FieldSet.superclass.onCollapse.call(this, doAnim, animArg);
+
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = true;
+        }
+        Ext.form.FieldSet.superclass.onExpand.call(this, doAnim, animArg);
+    },
+
+    /**
+     * This function is called by the fieldset's checkbox when it is toggled (only applies when
+     * checkboxToggle = true).  This method should never be called externally, but can be
+     * overridden to provide custom behavior when the checkbox is toggled if needed.
+     */
+    onCheckClick : function(){
+        this[this.checkbox.dom.checked ? 'expand' : 'collapse']();
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} border
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapseFirst
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {String} disabledClass
+     * @hide
+     */
+    /**
+     * @cfg {String} elements
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} floating
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} footer
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} frame
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {String} iconCls
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * @hide
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} shim
+     * @hide
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * @hide
+     */
+    /**
+     * @cfg {String} tabTip
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {String} xtype
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property footer
+     * @hide
+     */
+    /**
+     * @method focus
+     * @hide
+     */
+    /**
+     * @method getBottomToolbar
+     * @hide
+     */
+    /**
+     * @method getTopToolbar
+     * @hide
+     */
+    /**
+     * @method setIconClass
+     * @hide
+     */
+    /**
+     * @event activate
+     * @hide
+     */
+    /**
+     * @event beforeclose
+     * @hide
+     */
+    /**
+     * @event bodyresize
+     * @hide
+     */
+    /**
+     * @event close
+     * @hide
+     */
+    /**
+     * @event deactivate
+     * @hide
+     */
+});
+Ext.reg('fieldset', Ext.form.FieldSet);
+/**
+ * @class Ext.form.HtmlEditor
+ * @extends Ext.form.Field
+ * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be 
+ * automatically hidden when needed.  These are noted in the config options where appropriate.
+ * <br><br>The editor's toolbar buttons have tooltips defined in the {@link #buttonTips} property, but they are not 
+ * enabled by default unless the global {@link Ext.QuickTips} singleton is {@link Ext.QuickTips#init initialized}.
+ * <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
+ * supported by this editor.</b>
+ * <br><br>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
+ * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
+ * <br><br>Example usage:
+ * <pre><code>
+// Simple example rendered with default options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.form.HtmlEditor({
+    renderTo: Ext.getBody(),
+    width: 800,
+    height: 300
+});
+
+// Passed via xtype into a container and with custom options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.Panel({
+    title: 'HTML Editor',
+    renderTo: Ext.getBody(),
+    width: 600,
+    height: 300,
+    frame: true,
+    layout: 'fit',
+    items: {
+        xtype: 'htmleditor',
+        enableColors: false,
+        enableAlignments: false
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new HtmlEditor
+ * @param {Object} config
+ * @xtype htmleditor
+ */
+
+Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true)
+     */
+    enableFormat : true,
+    /**
+     * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true)
+     */
+    enableFontSize : true,
+    /**
+     * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true)
+     */
+    enableColors : true,
+    /**
+     * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true)
+     */
+    enableAlignments : true,
+    /**
+     * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
+     */
+    enableLists : true,
+    /**
+     * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true)
+     */
+    enableSourceEdit : true,
+    /**
+     * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true)
+     */
+    enableLinks : true,
+    /**
+     * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true)
+     */
+    enableFont : true,
+    /**
+     * @cfg {String} createLinkText The default text for the create link prompt
+     */
+    createLinkText : 'Please enter the URL for the link:',
+    /**
+     * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /)
+     */
+    defaultLinkValue : 'http:/'+'/',
+    /**
+     * @cfg {Array} fontFamilies An array of available font families
+     */
+    fontFamilies : [
+        'Arial',
+        'Courier New',
+        'Tahoma',
+        'Times New Roman',
+        'Verdana'
+    ],
+    defaultFont: 'tahoma',
+    /**
+     * @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to &#8203; (Zero-width space), &nbsp; (Non-breaking space) in Opera and IE6).
+     */
+    defaultValue: (Ext.isOpera || Ext.isIE6) ? '&nbsp;' : '&#8203;',
+
+    // private properties
+    actionMode: 'wrap',
+    validationEvent : false,
+    deferHeight: true,
+    initialized : false,
+    activated : false,
+    sourceEditMode : false,
+    onFocus : Ext.emptyFn,
+    iframePad:3,
+    hideMode:'offsets',
+    defaultAutoCreate : {
+        tag: "textarea",
+        style:"width:500px;height:300px;",
+        autocomplete: "off"
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event initialize
+             * Fires when the editor is fully initialized (including the iframe)
+             * @param {HtmlEditor} this
+             */
+            'initialize',
+            /**
+             * @event activate
+             * Fires when the editor is first receives the focus. Any insertion must wait
+             * until after this event.
+             * @param {HtmlEditor} this
+             */
+            'activate',
+             /**
+             * @event beforesync
+             * Fires before the textarea is updated with content from the editor iframe. Return false
+             * to cancel the sync.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforesync',
+             /**
+             * @event beforepush
+             * Fires before the iframe editor is updated with content from the textarea. Return false
+             * to cancel the push.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforepush',
+             /**
+             * @event sync
+             * Fires when the textarea is updated with content from the editor iframe.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'sync',
+             /**
+             * @event push
+             * Fires when the iframe editor is updated with content from the textarea.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'push',
+             /**
+             * @event editmodechange
+             * Fires when the editor switches edit modes
+             * @param {HtmlEditor} this
+             * @param {Boolean} sourceEdit True if source edit, false if standard editing.
+             */
+            'editmodechange'
+        )
+    },
+
+    // private
+    createFontOptions : function(){
+        var buf = [], fs = this.fontFamilies, ff, lc;
+        for(var i = 0, len = fs.length; i< len; i++){
+            ff = fs[i];
+            lc = ff.toLowerCase();
+            buf.push(
+                '<option value="',lc,'" style="font-family:',ff,';"',
+                    (this.defaultFont == lc ? ' selected="true">' : '>'),
+                    ff,
+                '</option>'
+            );
+        }
+        return buf.join('');
+    },
+    
+    /*
+     * Protected method that will not generally be called directly. It
+     * is called when the editor creates its toolbar. Override this method if you need to
+     * add custom toolbar buttons.
+     * @param {HtmlEditor} editor
+     */
+    createToolbar : function(editor){
+        
+        var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
+        
+        function btn(id, toggle, handler){
+            return {
+                itemId : id,
+                cls : 'x-btn-icon',
+                iconCls: 'x-edit-'+id,
+                enableToggle:toggle !== false,
+                scope: editor,
+                handler:handler||editor.relayBtnCmd,
+                clickEvent:'mousedown',
+                tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
+                overflowText: editor.buttonTips[id].title || undefined,
+                tabIndex:-1
+            };
+        }
+
+        // build the toolbar
+        var tb = new Ext.Toolbar({
+            renderTo:this.wrap.dom.firstChild
+        });
+
+        // stop form submits
+        this.mon(tb.el, 'click', function(e){
+            e.preventDefault();
+        });
+
+        if(this.enableFont && !Ext.isSafari2){
+            this.fontSelect = tb.el.createChild({
+                tag:'select',
+                cls:'x-font-select',
+                html: this.createFontOptions()
+            });
+            this.mon(this.fontSelect, 'change', function(){
+                var font = this.fontSelect.dom.value;
+                this.relayCmd('fontname', font);
+                this.deferFocus();
+            }, this);
+
+            tb.add(
+                this.fontSelect.dom,
+                '-'
+            );
+        }
+
+        if(this.enableFormat){
+            tb.add(
+                btn('bold'),
+                btn('italic'),
+                btn('underline')
+            );
+        }
+
+        if(this.enableFontSize){
+            tb.add(
+                '-',
+                btn('increasefontsize', false, this.adjustFont),
+                btn('decreasefontsize', false, this.adjustFont)
+            );
+        }
+
+        if(this.enableColors){
+            tb.add(
+                '-', {
+                    itemId:'forecolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-forecolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        allowReselect: true,
+                        focus: Ext.emptyFn,
+                        value:'000000',
+                        plain:true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                this.deferFocus();
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }, {
+                    itemId:'backcolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-backcolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        focus: Ext.emptyFn,
+                        value:'FFFFFF',
+                        plain:true,
+                        allowReselect: true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                if(Ext.isGecko){
+                                    this.execCmd('useCSS', false);
+                                    this.execCmd('hilitecolor', color);
+                                    this.execCmd('useCSS', true);
+                                    this.deferFocus();
+                                }else{
+                                    this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                    this.deferFocus();
+                                }
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }
+            );
+        }
+
+        if(this.enableAlignments){
+            tb.add(
+                '-',
+                btn('justifyleft'),
+                btn('justifycenter'),
+                btn('justifyright')
+            );
+        }
+
+        if(!Ext.isSafari2){
+            if(this.enableLinks){
+                tb.add(
+                    '-',
+                    btn('createlink', false, this.createLink)
+                );
+            }
+
+            if(this.enableLists){
+                tb.add(
+                    '-',
+                    btn('insertorderedlist'),
+                    btn('insertunorderedlist')
+                );
+            }
+            if(this.enableSourceEdit){
+                tb.add(
+                    '-',
+                    btn('sourceedit', true, function(btn){
+                        this.toggleSourceEdit(!this.sourceEditMode);
+                    })
+                );
+            }
+        }
+
+        this.tb = tb;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. It
+     * is called when the editor initializes the iframe with HTML contents. Override this method if you
+     * want to change the initialization markup of the iframe (e.g. to add stylesheets).
+     */
+    getDocMarkup : function(){
+        return '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';
+    },
+
+    // private
+    getEditorBody : function(){
+        return this.doc.body || this.doc.documentElement;
+    },
+
+    // private
+    getDoc : function(){
+        return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document);
+    },
+
+    // private
+    getWin : function(){
+        return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name];
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
+        this.el.dom.style.border = '0 none';
+        this.el.dom.setAttribute('tabIndex', -1);
+        this.el.addClass('x-hidden');
+        if(Ext.isIE){ // fix IE 1px bogus margin
+            this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')
+        }
+        this.wrap = this.el.wrap({
+            cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'}
+        });
+
+        this.createToolbar(this);
+
+        this.disableItems(true);
+        // is this needed?
+        // this.tb.doLayout();
+
+        this.createIFrame();
+
+        if(!this.width){
+            var sz = this.el.getSize();
+            this.setSize(sz.width, this.height || sz.height);
+        }
+    },
+
+    createIFrame: function(){
+        var iframe = document.createElement('iframe');
+        iframe.name = Ext.id();
+        iframe.frameBorder = '0';
+        iframe.src = Ext.isIE ? Ext.SSL_SECURE_URL : "javascript:;";
+        this.wrap.dom.appendChild(iframe);
+
+        this.iframe = iframe;
+
+        this.monitorTask = Ext.TaskMgr.start({
+            run: this.checkDesignMode,
+            scope: this,
+            interval:100
+        });
+    },
+
+    initFrame : function(){
+        Ext.TaskMgr.stop(this.monitorTask);
+        this.doc = this.getDoc();
+        this.win = this.getWin();
+
+        this.doc.open();
+        this.doc.write(this.getDocMarkup());
+        this.doc.close();
+
+        var task = { // must defer to wait for browser to be ready
+            run : function(){
+                if(this.doc.body || this.doc.readyState == 'complete'){
+                    Ext.TaskMgr.stop(task);
+                    this.doc.designMode="on";
+                    this.initEditor.defer(10, this);
+                }
+            },
+            interval : 10,
+            duration:10000,
+            scope: this
+        };
+        Ext.TaskMgr.start(task);
+    },
+
+
+    checkDesignMode : function(){
+        if(this.wrap && this.wrap.dom.offsetWidth){
+            var doc = this.getDoc();
+            if(!doc){
+                return;
+            }
+            if(!doc.editorInitialized || String(doc.designMode).toLowerCase() != 'on'){
+                this.initFrame();
+            }
+        }
+    },
+    
+    disableItems: function(disabled){
+        if(this.fontSelect){
+            this.fontSelect.dom.disabled = disabled;
+        }
+        this.tb.items.each(function(item){
+            if(item.itemId != 'sourceedit'){
+                item.setDisabled(disabled);
+            }
+        });
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
+        if(this.el && this.iframe){
+            if(typeof w == 'number'){
+                var aw = w - this.wrap.getFrameWidth('lr');
+                this.el.setWidth(this.adjustWidth('textarea', aw));
+                this.tb.setWidth(aw);
+                this.iframe.style.width = Math.max(aw, 0) + 'px';
+            }
+            if(typeof h == 'number'){
+                var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight();
+                this.el.setHeight(this.adjustWidth('textarea', ah));
+                this.iframe.style.height = Math.max(ah, 0) + 'px';
+                if(this.doc){
+                    this.getEditorBody().style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px';
+                }
+            }
+        }
+    },
+
+    /**
+     * Toggles the editor between standard and source edit mode.
+     * @param {Boolean} sourceEdit (optional) True for source edit, false for standard
+     */
+    toggleSourceEdit : function(sourceEditMode){
+        if(sourceEditMode === undefined){
+            sourceEditMode = !this.sourceEditMode;
+        }
+        this.sourceEditMode = sourceEditMode === true;
+        var btn = this.tb.items.get('sourceedit');
+        if(btn.pressed !== this.sourceEditMode){
+            btn.toggle(this.sourceEditMode);
+            if(!btn.xtbHidden){
+                return;
+            }
+        }
+        if(this.sourceEditMode){
+            this.disableItems(true);
+            this.syncValue();
+            this.iframe.className = 'x-hidden';
+            this.el.removeClass('x-hidden');
+            this.el.dom.removeAttribute('tabIndex');
+            this.el.focus();
+        }else{
+            if(this.initialized){
+                this.disableItems(false);
+            }
+            this.pushValue();
+            this.iframe.className = '';
+            this.el.addClass('x-hidden');
+            this.el.dom.setAttribute('tabIndex', -1);
+            this.deferFocus();
+        }
+        var lastSize = this.lastSize;
+        if(lastSize){
+            delete this.lastSize;
+            this.setSize(lastSize);
+        }
+        this.fireEvent('editmodechange', this, this.sourceEditMode);
+    },
+
+    // private used internally
+    createLink : function(){
+        var url = prompt(this.createLinkText, this.defaultLinkValue);
+        if(url && url != 'http:/'+'/'){
+            this.relayCmd('createlink', url);
+        }
+    },
+
+    // private (for BoxComponent)
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private (for BoxComponent)
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private (for BoxComponent)
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // docs inherit from Field
+    setValue : function(v){
+        Ext.form.HtmlEditor.superclass.setValue.call(this, v);
+        this.pushValue();
+        return this;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. If you need/want
+     * custom HTML cleanup, this is the method you should override.
+     * @param {String} html The HTML to be cleaned
+     * @return {String} The cleaned HTML
+     */
+    cleanHtml : function(html){
+        html = String(html);
+        if(html.length > 5){
+            if(Ext.isWebKit){ // strip safari nonsense
+                html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
+            }
+        }
+        if(html == this.defaultValue){
+            html = '';
+        }
+        return html;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Syncs the contents
+     * of the editor iframe with the textarea.
+     */
+    syncValue : function(){
+        if(this.initialized){
+            var bd = this.getEditorBody();
+            var html = bd.innerHTML;
+            if(Ext.isWebKit){
+                var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
+                var m = bs.match(/text-align:(.*?);/i);
+                if(m && m[1]){
+                    html = '<div style="'+m[0]+'">' + html + '</div>';
+                }
+            }
+            html = this.cleanHtml(html);
+            if(this.fireEvent('beforesync', this, html) !== false){
+                this.el.dom.value = html;
+                this.fireEvent('sync', this, html);
+            }
+        }
+    },
+    
+    //docs inherit from Field
+    getValue : function() {
+        this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
+        return Ext.form.HtmlEditor.superclass.getValue.call(this);
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Pushes the value of the textarea
+     * into the iframe editor.
+     */
+    pushValue : function(){
+        if(this.initialized){
+            var v = this.el.dom.value;
+            if(!this.activated && v.length < 1){
+                v = this.defaultValue;
+            }
+            if(this.fireEvent('beforepush', this, v) !== false){
+                this.getEditorBody().innerHTML = v;
+                if(Ext.isGecko){
+                    // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
+                    var d = this.doc,
+                        mode = d.designMode.toLowerCase();
+                    
+                    d.designMode = mode.toggle('on', 'off');
+                    d.designMode = mode;
+                }
+                this.fireEvent('push', this, v);
+            }
+        }
+    },
+
+    // private
+    deferFocus : function(){
+        this.focus.defer(10, this);
+    },
+
+    // docs inherit from Field
+    focus : function(){
+        if(this.win && !this.sourceEditMode){
+            this.win.focus();
+        }else{
+            this.el.focus();
+        }
+    },
+
+    // private
+    initEditor : function(){
+        //Destroying the component during/before initEditor can cause issues.
+        try{
+            var dbody = this.getEditorBody();
+            var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat');
+            ss['background-attachment'] = 'fixed'; // w3c
+            dbody.bgProperties = 'fixed'; // ie
+
+            Ext.DomHelper.applyStyles(dbody, ss);
+
+            if(this.doc){
+                try{
+                    Ext.EventManager.removeAll(this.doc);
+                }catch(e){}
+            }
+
+            this.doc = this.getDoc();
+
+            Ext.EventManager.on(this.doc, {
+                'mousedown': this.onEditorEvent,
+                'dblclick': this.onEditorEvent,
+                'click': this.onEditorEvent,
+                'keyup': this.onEditorEvent,
+                buffer:100,
+                scope: this
+            });
+
+            if(Ext.isGecko){
+                Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this);
+            }
+            if(Ext.isIE || Ext.isWebKit || Ext.isOpera){
+                Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this);
+            }
+            this.initialized = true;
+            this.fireEvent('initialize', this);
+            this.doc.editorInitialized = true;
+            this.pushValue();
+        }catch(e){}
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.monitorTask){
+            Ext.TaskMgr.stop(this.monitorTask);
+        }
+        if(this.rendered){
+            Ext.destroy(this.tb);
+            if(this.wrap){
+                this.wrap.dom.innerHTML = '';
+                this.wrap.remove();
+            }
+        }
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+ 
+        if(this.doc){
+            try{
+                Ext.EventManager.removeAll(this.doc);
+                for (var prop in this.doc){
+                   delete this.doc[prop];
+                }
+            }catch(e){}
+        }
+        this.purgeListeners();
+    },
+
+    // private
+    onFirstFocus : function(){
+        this.activated = true;
+        this.disableItems(false);
+        if(Ext.isGecko){ // prevent silly gecko errors
+            this.win.focus();
+            var s = this.win.getSelection();
+            if(!s.focusNode || s.focusNode.nodeType != 3){
+                var r = s.getRangeAt(0);
+                r.selectNodeContents(this.getEditorBody());
+                r.collapse(true);
+                this.deferFocus();
+            }
+            try{
+                this.execCmd('useCSS', true);
+                this.execCmd('styleWithCSS', false);
+            }catch(e){}
+        }
+        this.fireEvent('activate', this);
+    },
+
+    // private
+    adjustFont: function(btn){
+        var adjust = btn.itemId == 'increasefontsize' ? 1 : -1;
+
+        var v = parseInt(this.doc.queryCommandValue('FontSize') || 2, 10);
+        if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
+            // Safari 3 values
+            // 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
+            if(v <= 10){
+                v = 1 + adjust;
+            }else if(v <= 13){
+                v = 2 + adjust;
+            }else if(v <= 16){
+                v = 3 + adjust;
+            }else if(v <= 18){
+                v = 4 + adjust;
+            }else if(v <= 24){
+                v = 5 + adjust;
+            }else {
+                v = 6 + adjust;
+            }
+            v = v.constrain(1, 6);
+        }else{
+            if(Ext.isSafari){ // safari
+                adjust *= 2;
+            }
+            v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
+        }
+        this.execCmd('FontSize', v);
+    },
+
+    // private
+    onEditorEvent : function(e){
+        this.updateToolbar();
+    },
+
+
+    /**
+     * Protected method that will not generally be called directly. It triggers
+     * a toolbar update by reading the markup state of the current selection in the editor.
+     */
+    updateToolbar: function(){
+
+        if(!this.activated){
+            this.onFirstFocus();
+            return;
+        }
+
+        var btns = this.tb.items.map, doc = this.doc;
+
+        if(this.enableFont && !Ext.isSafari2){
+            var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
+            if(name != this.fontSelect.dom.value){
+                this.fontSelect.dom.value = name;
+            }
+        }
+        if(this.enableFormat){
+            btns.bold.toggle(doc.queryCommandState('bold'));
+            btns.italic.toggle(doc.queryCommandState('italic'));
+            btns.underline.toggle(doc.queryCommandState('underline'));
+        }
+        if(this.enableAlignments){
+            btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
+            btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
+            btns.justifyright.toggle(doc.queryCommandState('justifyright'));
+        }
+        if(!Ext.isSafari2 && this.enableLists){
+            btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
+            btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
+        }
+        
+        Ext.menu.MenuMgr.hideAll();
+
+        this.syncValue();
+    },
+
+    // private
+    relayBtnCmd : function(btn){
+        this.relayCmd(btn.itemId);
+    },
+
+    /**
+     * Executes a Midas editor command on the editor document and performs necessary focus and
+     * toolbar updates. <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    relayCmd : function(cmd, value){
+        (function(){
+            this.focus();
+            this.execCmd(cmd, value);
+            this.updateToolbar();
+        }).defer(10, this);
+    },
+
+    /**
+     * Executes a Midas editor command directly on the editor document.
+     * For visual commands, you should use {@link #relayCmd} instead.
+     * <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    execCmd : function(cmd, value){
+        this.doc.execCommand(cmd, false, value === undefined ? null : value);
+        this.syncValue();
+    },
+
+    // private
+    applyCommand : function(e){
+        if(e.ctrlKey){
+            var c = e.getCharCode(), cmd;
+            if(c > 0){
+                c = String.fromCharCode(c);
+                switch(c){
+                    case 'b':
+                        cmd = 'bold';
+                    break;
+                    case 'i':
+                        cmd = 'italic';
+                    break;
+                    case 'u':
+                        cmd = 'underline';
+                    break;
+                }
+                if(cmd){
+                    this.win.focus();
+                    this.execCmd(cmd);
+                    this.deferFocus();
+                    e.preventDefault();
+                }
+            }
+        }
+    },
+
+    /**
+     * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
+     * to insert text.
+     * @param {String} text
+     */
+    insertAtCursor : function(text){
+        if(!this.activated){
+            return;
+        }
+        if(Ext.isIE){
+            this.win.focus();
+            var r = this.doc.selection.createRange();
+            if(r){
+                r.collapse(true);
+                r.pasteHTML(text);
+                this.syncValue();
+                this.deferFocus();
+            }
+        }else if(Ext.isGecko || Ext.isOpera){
+            this.win.focus();
+            this.execCmd('InsertHTML', text);
+            this.deferFocus();
+        }else if(Ext.isWebKit){
+            this.execCmd('InsertText', text);
+            this.deferFocus();
+        }
+    },
+
+    // private
+    fixKeys : function(){ // load time branching for fastest keydown performance
+        if(Ext.isIE){
+            return function(e){
+                var k = e.getKey(), r;
+                if(k == e.TAB){
+                    e.stopEvent();
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        r.collapse(true);
+                        r.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
+                        this.deferFocus();
+                    }
+                }else if(k == e.ENTER){
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        var target = r.parentElement();
+                        if(!target || target.tagName.toLowerCase() != 'li'){
+                            e.stopEvent();
+                            r.pasteHTML('<br />');
+                            r.collapse(false);
+                            r.select();
+                        }
+                    }
+                }
+            };
+        }else if(Ext.isOpera){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.win.focus();
+                    this.execCmd('InsertHTML','&nbsp;&nbsp;&nbsp;&nbsp;');
+                    this.deferFocus();
+                }
+            };
+        }else if(Ext.isWebKit){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.execCmd('InsertText','\t');
+                    this.deferFocus();
+                }
+             };
+        }
+    }(),
+
+    /**
+     * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>
+     * @return {Ext.Toolbar}
+     */
+    getToolbar : function(){
+        return this.tb;
+    },
+
+    /**
+     * Object collection of toolbar tooltips for the buttons in the editor. The key
+     * is the command id associated with that button and the value is a valid QuickTips object.
+     * For example:
+<pre><code>
+{
+    bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+    },
+    italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+    },
+    ...
+</code></pre>
+    * @type Object
+     */
+    buttonTips : {
+        bold : {
+            title: 'Bold (Ctrl+B)',
+            text: 'Make the selected text bold.',
+            cls: 'x-html-editor-tip'
+        },
+        italic : {
+            title: 'Italic (Ctrl+I)',
+            text: 'Make the selected text italic.',
+            cls: 'x-html-editor-tip'
+        },
+        underline : {
+            title: 'Underline (Ctrl+U)',
+            text: 'Underline the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        increasefontsize : {
+            title: 'Grow Text',
+            text: 'Increase the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        decreasefontsize : {
+            title: 'Shrink Text',
+            text: 'Decrease the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        backcolor : {
+            title: 'Text Highlight Color',
+            text: 'Change the background color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        forecolor : {
+            title: 'Font Color',
+            text: 'Change the color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyleft : {
+            title: 'Align Text Left',
+            text: 'Align text to the left.',
+            cls: 'x-html-editor-tip'
+        },
+        justifycenter : {
+            title: 'Center Text',
+            text: 'Center text in the editor.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyright : {
+            title: 'Align Text Right',
+            text: 'Align text to the right.',
+            cls: 'x-html-editor-tip'
+        },
+        insertunorderedlist : {
+            title: 'Bullet List',
+            text: 'Start a bulleted list.',
+            cls: 'x-html-editor-tip'
+        },
+        insertorderedlist : {
+            title: 'Numbered List',
+            text: 'Start a numbered list.',
+            cls: 'x-html-editor-tip'
+        },
+        createlink : {
+            title: 'Hyperlink',
+            text: 'Make the selected text a hyperlink.',
+            cls: 'x-html-editor-tip'
+        },
+        sourceedit : {
+            title: 'Source Edit',
+            text: 'Switch to source editing mode.',
+            cls: 'x-html-editor-tip'
+        }
+    }
+
+    // hide stuff that is not compatible
+    /**
+     * @event blur
+     * @hide
+     */
+    /**
+     * @event change
+     * @hide
+     */
+    /**
+     * @event focus
+     * @hide
+     */
+    /**
+     * @event specialkey
+     * @hide
+     */
+    /**
+     * @cfg {String} fieldClass @hide
+     */
+    /**
+     * @cfg {String} focusClass @hide
+     */
+    /**
+     * @cfg {String} autoCreate @hide
+     */
+    /**
+     * @cfg {String} inputType @hide
+     */
+    /**
+     * @cfg {String} invalidClass @hide
+     */
+    /**
+     * @cfg {String} invalidText @hide
+     */
+    /**
+     * @cfg {String} msgFx @hide
+     */
+    /**
+     * @cfg {String} validateOnBlur @hide
+     */
+    /**
+     * @cfg {Boolean} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} applyTo @hide
+     */
+    /**
+     * @cfg {String} autoHeight  @hide
+     */
+    /**
+     * @cfg {String} autoWidth  @hide
+     */
+    /**
+     * @cfg {String} cls  @hide
+     */
+    /**
+     * @cfg {String} disabled  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} msgTarget  @hide
+     */
+    /**
+     * @cfg {String} readOnly  @hide
+     */
+    /**
+     * @cfg {String} style  @hide
+     */
+    /**
+     * @cfg {String} validationDelay  @hide
+     */
+    /**
+     * @cfg {String} validationEvent  @hide
+     */
+    /**
+     * @cfg {String} tabIndex  @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method validate
+     * @hide
+     */
+    /**
+     * @event valid
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+    /**
+     * @cfg keys
+     * @hide
+     */
+});
+Ext.reg('htmleditor', Ext.form.HtmlEditor);/**
+ * @class Ext.form.TimeField
+ * @extends Ext.form.ComboBox
+ * Provides a time input field with a time dropdown and automatic time validation.  Example usage:
+ * <pre><code>
+new Ext.form.TimeField({
+    minValue: '9:00 AM',
+    maxValue: '6:00 PM',
+    increment: 30
+});
+</code></pre>
+ * @constructor
+ * Create a new TimeField
+ * @param {Object} config
+ * @xtype timefield
+ */
+Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    minValue : null,
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    maxValue : null,
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before minValue (defaults to
+     * 'The time in this field must be equal to or after {0}').
+     */
+    minText : "The time in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the time is after maxValue (defaults to
+     * 'The time in this field must be equal to or before {0}').
+     */
+    maxText : "The time in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the time in the field is invalid (defaults to
+     * '{value} is not a valid time').
+     */
+    invalidText : "{0} is not a valid time",
+    /**
+     * @cfg {String} format
+     * The default time format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to 'g:i A', e.g., '3:15 PM').  For 24-hour time
+     * format try 'H:i' instead.
+     */
+    format : "g:i A",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
+     * format (defaults to 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H').
+     */
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",
+    /**
+     * @cfg {Number} increment
+     * The number of minutes between each time value in the list (defaults to 15).
+     */
+    increment: 15,
+
+    // private override
+    mode: 'local',
+    // private override
+    triggerAction: 'all',
+    // private override
+    typeAhead: false,
+    
+    // private - This is the date to use when generating time values in the absence of either minValue
+    // or maxValue.  Using the current date causes DST issues on DST boundary dates, so this is an 
+    // arbitrary "safe" date that can be any date aside from DST boundary dates.
+    initDate: '1/1/2008',
+
+    // private
+    initComponent : function(){
+        if(typeof this.minValue == "string"){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(typeof this.maxValue == "string"){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+
+        if(!this.store){
+            var min = this.parseDate(this.minValue) || new Date(this.initDate).clearTime();
+            var max = this.parseDate(this.maxValue) || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1);
+            var times = [];
+            while(min <= max){
+                times.push(min.dateFormat(this.format));
+                min = min.add('mi', this.increment);
+            }
+            this.store = times;
+        }
+        Ext.form.TimeField.superclass.initComponent.call(this);
+    },
+
+    // inherited docs
+    getValue : function(){
+        var v = Ext.form.TimeField.superclass.getValue.call(this);
+        return this.formatDate(this.parseDate(v)) || '';
+    },
+
+    // inherited docs
+    setValue : function(value){
+        return Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value)));
+    },
+
+    // private overrides
+    validateValue : Ext.form.DateField.prototype.validateValue,
+    parseDate : Ext.form.DateField.prototype.parseDate,
+    formatDate : Ext.form.DateField.prototype.formatDate,
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v.dateFormat(this.format));
+        }
+        Ext.form.TimeField.superclass.beforeBlur.call(this);
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('timefield', Ext.form.TimeField);/**
+ * @class Ext.form.Label
+ * @extends Ext.BoxComponent
+ * Basic Label field.
+ * @constructor
+ * Creates a new Label
+ * @param {Ext.Element/String/Object} config The configuration options.  If an element is passed, it is set as the internal
+ * element and its id used as the component id.  If a string is passed, it is assumed to be the id of an existing element
+ * and is used as the component id.  Otherwise, it is assumed to be a standard config object and is applied to the component.
+ * @xtype label
+ */
+Ext.form.Label = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} text The plain text to display within the label (defaults to ''). If you need to include HTML
+     * tags within the label's innerHTML, use the {@link #html} config instead.
+     */
+    /**
+     * @cfg {String} forId The id of the input element to which this label will be bound via the standard HTML 'for'
+     * attribute. If not specified, the attribute will not be added to the label.
+     */
+    /**
+     * @cfg {String} html An HTML fragment that will be used as the label's innerHTML (defaults to '').
+     * Note that if {@link #text} is specified it will take precedence and this value will be ignored.
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('label');
+            this.el.id = this.getId();
+            this.el.innerHTML = this.text ? Ext.util.Format.htmlEncode(this.text) : (this.html || '');
+            if(this.forId){
+                this.el.setAttribute('for', this.forId);
+            }
+        }
+        Ext.form.Label.superclass.onRender.call(this, ct, position);
+    },
+
+    /**
+     * Updates the label's innerHTML with the specified string.
+     * @param {String} text The new label text
+     * @param {Boolean} encode (optional) False to skip HTML-encoding the text when rendering it
+     * to the label (defaults to true which encodes the value). This might be useful if you want to include
+     * tags in the label's innerHTML rather than rendering them as string literals per the default logic.
+     * @return {Label} this
+     */
+    setText : function(t, encode){
+        var e = encode === false;
+        this[!e ? 'text' : 'html'] = t;
+        delete this[e ? 'text' : 'html'];
+        if(this.rendered){
+            this.el.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t;
+        }
+        return this;
+    }
+});
+
+Ext.reg('label', Ext.form.Label);/**
+ * @class Ext.form.Action
+ * <p>The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * the Form needs to perform an action such as submit or load. The Configuration options
+ * listed for this class are set through the Form's action methods: {@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}</p>
+ * <p>The instance of Action which performed the action is passed to the success
+ * and failure callbacks of the Form's action methods ({@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}),
+ * and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and
+ * {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers.</p>
+ */
+Ext.form.Action = function(form, options){
+    this.form = form;
+    this.options = options || {};
+};
+
+/**
+ * Failure type returned when client side validation of the Form fails
+ * thus aborting a submit action. Client side validation is performed unless
+ * {@link #clientValidation} is explicitly set to <tt>false</tt>.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CLIENT_INVALID = 'client';
+/**
+ * <p>Failure type returned when server side processing fails and the {@link #result}'s
+ * <tt style="font-weight:bold">success</tt> property is set to <tt>false</tt>.</p>
+ * <p>In the case of a form submission, field-specific error messages may be returned in the
+ * {@link #result}'s <tt style="font-weight:bold">errors</tt> property.</p>
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.SERVER_INVALID = 'server';
+/**
+ * Failure type returned when a communication error happens when attempting
+ * to send a request to the remote server. The {@link #response} may be examined to
+ * provide further information.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CONNECT_FAILURE = 'connect';
+/**
+ * Failure type returned when the response's <tt style="font-weight:bold">success</tt>
+ * property is set to <tt>false</tt>, or no field values are returned in the response's
+ * <tt style="font-weight:bold">data</tt> property.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.LOAD_FAILURE = 'load';
+
+Ext.form.Action.prototype = {
+/**
+ * @cfg {String} url The URL that the Action is to invoke.
+ */
+/**
+ * @cfg {Boolean} reset When set to <tt><b>true</b></tt>, causes the Form to be
+ * {@link Ext.form.BasicForm.reset reset} on Action success. If specified, this happens
+ * <b>before</b> the {@link #success} callback is called and before the Form's
+ * {@link Ext.form.BasicForm.actioncomplete actioncomplete} event fires.
+ */
+/**
+ * @cfg {String} method The HTTP method to use to access the requested URL. Defaults to the
+ * {@link Ext.form.BasicForm}'s method, or if that is not specified, the underlying DOM form's method.
+ */
+/**
+ * @cfg {Mixed} params <p>Extra parameter values to pass. These are added to the Form's
+ * {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form's
+ * input fields.</p>
+ * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+ */
+/**
+ * @cfg {Number} timeout The number of seconds to wait for a server response before
+ * failing with the {@link #failureType} as {@link #Action.CONNECT_FAILURE}. If not specified,
+ * defaults to the configured <tt>{@link Ext.form.BasicForm#timeout timeout}</tt> of the
+ * {@link Ext.form.BasicForm form}.
+ */
+/**
+ * @cfg {Function} success The function to call when a valid success return packet is recieved.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Function} failure The function to call when a failure packet was recieved, or when an
+ * error ocurred in the Ajax communication.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax
+ * error ocurred, the failure type will be in {@link #failureType}. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Object} scope The scope in which to call the callback functions (The <tt>this</tt> reference
+ * for the callback functions).
+ */
+/**
+ * @cfg {String} waitMsg The message to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+/**
+ * @cfg {String} waitTitle The title to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+
+/**
+ * The type of action this Action instance performs.
+ * Currently only "submit" and "load" are supported.
+ * @type {String}
+ */
+    type : 'default',
+/**
+ * The type of failure detected will be one of these: {@link #CLIENT_INVALID},
+ * {@link #SERVER_INVALID}, {@link #CONNECT_FAILURE}, or {@link #LOAD_FAILURE}.  Usage:
+ * <pre><code>
+var fp = new Ext.form.FormPanel({
+...
+buttons: [{
+    text: 'Save',
+    formBind: true,
+    handler: function(){
+        if(fp.getForm().isValid()){
+            fp.getForm().submit({
+                url: 'form-submit.php',
+                waitMsg: 'Submitting your data...',
+                success: function(form, action){
+                    // server responded with success = true
+                    var result = action.{@link #result};
+                },
+                failure: function(form, action){
+                    if (action.{@link #failureType} === Ext.form.Action.{@link #CONNECT_FAILURE}) {
+                        Ext.Msg.alert('Error',
+                            'Status:'+action.{@link #response}.status+': '+
+                            action.{@link #response}.statusText);
+                    }
+                    if (action.failureType === Ext.form.Action.{@link #SERVER_INVALID}){
+                        // server responded with success = false
+                        Ext.Msg.alert('Invalid', action.{@link #result}.errormsg);
+                    }
+                }
+            });
+        }
+    }
+},{
+    text: 'Reset',
+    handler: function(){
+        fp.getForm().reset();
+    }
+}]
+ * </code></pre>
+ * @property failureType
+ * @type {String}
+ */
+ /**
+ * The XMLHttpRequest object used to perform the action.
+ * @property response
+ * @type {Object}
+ */
+ /**
+ * The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
+ * other, action-specific properties.
+ * @property result
+ * @type {Object}
+ */
+
+    // interface method
+    run : function(options){
+
+    },
+
+    // interface method
+    success : function(response){
+
+    },
+
+    // interface method
+    handleResponse : function(response){
+
+    },
+
+    // default connection failure
+    failure : function(response){
+        this.response = response;
+        this.failureType = Ext.form.Action.CONNECT_FAILURE;
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    // shared code among all Actions to validate that there was a response
+    // with either responseText or responseXml
+    processResponse : function(response){
+        this.response = response;
+        if(!response.responseText && !response.responseXML){
+            return true;
+        }
+        this.result = this.handleResponse(response);
+        return this.result;
+    },
+
+    // utility functions used internally
+    getUrl : function(appendParams){
+        var url = this.options.url || this.form.url || this.form.el.dom.action;
+        if(appendParams){
+            var p = this.getParams();
+            if(p){
+                url = Ext.urlAppend(url, p);
+            }
+        }
+        return url;
+    },
+
+    // private
+    getMethod : function(){
+        return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase();
+    },
+
+    // private
+    getParams : function(){
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        if(p){
+            if(typeof p == "object"){
+                p = Ext.urlEncode(Ext.applyIf(p, bp));
+            }else if(typeof p == 'string' && bp){
+                p += '&' + Ext.urlEncode(bp);
+            }
+        }else if(bp){
+            p = Ext.urlEncode(bp);
+        }
+        return p;
+    },
+
+    // private
+    createCallback : function(opts){
+        var opts = opts || {};
+        return {
+            success: this.success,
+            failure: this.failure,
+            scope: this,
+            timeout: (opts.timeout*1000) || (this.form.timeout*1000),
+            upload: this.form.fileUpload ? this.success : undefined
+        };
+    }
+};
+
+/**
+ * @class Ext.form.Action.Submit
+ * @extends Ext.form.Action
+ * <p>A class which handles submission of data from {@link Ext.form.BasicForm Form}s
+ * and processes the returned response.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#submit submit}ting.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet may contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean
+ * <div class="sub-desc">The <code>success</code> property is required.</div></li>
+ * <li><b><code>errors</code></b> property : Object
+ * <div class="sub-desc"><div class="sub-desc">The <code>errors</code> property,
+ * which is optional, contains error messages for invalid fields.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so a typical response
+ * packet may look like this:</p><pre><code>
+{
+    success: false,
+    errors: {
+        clientCode: "Client not found",
+        portOfLoading: "This field must not be null"
+    }
+}</code></pre>
+ * <p>Other data may be placed into the response for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ * <p>Alternatively, if an {@link #errorReader} is specified as an {@link Ext.data.XmlReader XmlReader}:</p><pre><code>
+    errorReader: new Ext.data.XmlReader({
+            record : 'field',
+            success: '@success'
+        }, [
+            'id', 'msg'
+        ]
+    )
+</code></pre>
+ * <p>then the results may be sent back in XML format:</p><pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;message success="false"&gt;
+&lt;errors&gt;
+    &lt;field&gt;
+        &lt;id&gt;clientCode&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Code not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+    &lt;field&gt;
+        &lt;id&gt;portOfLoading&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Port not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+&lt;/errors&gt;
+&lt;/message&gt;
+</code></pre>
+ * <p>Other elements may be placed into the response XML for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The XML document is available in the {@link #errorReader}'s {@link Ext.data.XmlReader#xmlData xmlData} property.</p>
+ */
+Ext.form.Action.Submit = function(form, options){
+    Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
+};
+
+Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
+    /**
+     * @cfg {Ext.data.DataReader} errorReader <p><b>Optional. JSON is interpreted with
+     * no need for an errorReader.</b></p>
+     * <p>A Reader which reads a single record from the returned data. The DataReader's
+     * <b>success</b> property specifies how submission success is determined. The Record's
+     * data provides the error messages to apply to any invalid form Fields.</p>
+     */
+    /**
+     * @cfg {boolean} clientValidation Determines whether a Form's fields are validated
+     * in a final call to {@link Ext.form.BasicForm#isValid isValid} prior to submission.
+     * Pass <tt>false</tt> in the Form's submit options to prevent this. If not defined, pre-submission field validation
+     * is performed.
+     */
+    type : 'submit',
+
+    // private
+    run : function(){
+        var o = this.options;
+        var method = this.getMethod();
+        var isGet = method == 'GET';
+        if(o.clientValidation === false || this.form.isValid()){
+            Ext.Ajax.request(Ext.apply(this.createCallback(o), {
+                form:this.form.el.dom,
+                url:this.getUrl(isGet),
+                method: method,
+                headers: o.headers,
+                params:!isGet ? this.getParams() : null,
+                isUpload: this.form.fileUpload
+            }));
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || result.success){
+            this.form.afterAction(this, true);
+            return;
+        }
+        if(result.errors){
+            this.form.markInvalid(result.errors);
+            this.failureType = Ext.form.Action.SERVER_INVALID;
+        }
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.errorReader){
+            var rs = this.form.errorReader.read(response);
+            var errors = [];
+            if(rs.records){
+                for(var i = 0, len = rs.records.length; i < len; i++) {
+                    var r = rs.records[i];
+                    errors[i] = r.data;
+                }
+            }
+            if(errors.length < 1){
+                errors = null;
+            }
+            return {
+                success : rs.success,
+                errors : errors
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+/**
+ * @class Ext.form.Action.Load
+ * @extends Ext.form.Action
+ * <p>A class which handles loading of data from a server into the Fields of an {@link Ext.form.BasicForm}.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#load load}ing.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet <b>must</b> contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean</li>
+ * <li><b><code>data</code></b> property : Object</li>
+ * <div class="sub-desc">The <code>data</code> property contains the values of Fields to load.
+ * The individual value object for each Field is passed to the Field's
+ * {@link Ext.form.Field#setValue setValue} method.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so for the following form load call:<pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    title: 'Client and routing info',
+    items: [{
+        fieldLabel: 'Client',
+        name: 'clientName'
+    }, {
+        fieldLabel: 'Port of loading',
+        name: 'portOfLoading'
+    }, {
+        fieldLabel: 'Port of discharge',
+        name: 'portOfDischarge'
+    }]
+});
+myFormPanel.{@link Ext.form.FormPanel#getForm getForm}().{@link Ext.form.BasicForm#load load}({
+    url: '/getRoutingInfo.php',
+    params: {
+        consignmentRef: myConsignmentRef
+    },
+    failure: function(form, action() {
+        Ext.Msg.alert("Load failed", action.result.errorMessage);
+    }
+});
+</code></pre>
+ * a <b>success response</b> packet may look like this:</p><pre><code>
+{
+    success: true,
+    data: {
+        clientName: "Fred. Olsen Lines",
+        portOfLoading: "FXT",
+        portOfDischarge: "OSL"
+    }
+}</code></pre>
+ * while a <b>failure response</b> packet may look like this:</p><pre><code>
+{
+    success: false,
+    errorMessage: "Consignment reference not found"
+}</code></pre>
+ * <p>Other data may be placed into the response for processing the {@link Ext.form.BasicForm Form}'s
+ * callback or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ */
+Ext.form.Action.Load = function(form, options){
+    Ext.form.Action.Load.superclass.constructor.call(this, form, options);
+    this.reader = this.form.reader;
+};
+
+Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
+    // private
+    type : 'load',
+
+    // private
+    run : function(){
+        Ext.Ajax.request(Ext.apply(
+                this.createCallback(this.options), {
+                    method:this.getMethod(),
+                    url:this.getUrl(false),
+                    headers: this.options.headers,
+                    params:this.getParams()
+        }));
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || !result.success || !result.data){
+            this.failureType = Ext.form.Action.LOAD_FAILURE;
+            this.form.afterAction(this, false);
+            return;
+        }
+        this.form.clearInvalid();
+        this.form.setValues(result.data);
+        this.form.afterAction(this, true);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.reader){
+            var rs = this.form.reader.read(response);
+            var data = rs.records && rs.records[0] ? rs.records[0].data : null;
+            return {
+                success : rs.success,
+                data : data
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+
+/**
+ * @class Ext.form.Action.DirectLoad
+ * @extends Ext.form.Action.Load
+ * Provides Ext.direct support for loading form data. This example illustrates usage
+ * of Ext.Direct to load a submit a form through Ext.Direct.
+ * <pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    // configs for FormPanel
+    title: 'Basic Information',
+    border: false,
+    padding: 10,
+    buttons:[{
+        text: 'Submit',
+        handler: function(){
+            basicInfo.getForm().submit({
+                params: {
+                    uid: 5
+                }
+            });
+        }
+    }],
+    
+    // configs apply to child items
+    defaults: {anchor: '100%'},
+    defaultType: 'textfield',
+    items: [
+        // form fields go here
+    ],
+    
+    // configs for BasicForm
+    api: {
+        load: Profile.getBasicInfo,
+        // The server-side must mark the submit handler as a 'formHandler'
+        submit: Profile.updateBasicInfo
+    },    
+    paramOrder: ['uid']
+});
+
+// load the form
+myFormPanel.getForm().load({
+    params: {
+        uid: 5
+    }
+});
+ * </code></pre>
+ */
+Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, {
+    constructor: function(form, opts) {        
+        Ext.form.Action.DirectLoad.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directload',
+    
+    run : function(){
+        var args = this.getParams();
+        args.push(this.success, this);                
+        this.form.api.load.apply(window, args);
+    },
+    
+    getParams: function() {
+        var buf = [], o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        var paramOrder = this.form.paramOrder;
+        if(paramOrder){
+            for(var i = 0, len = paramOrder.length; i < len; i++){
+                buf.push(o[paramOrder[i]]);
+            }
+        }else if(this.form.paramsAsHash){
+            buf.push(o);
+        }
+        return buf;
+    },
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+/**
+ * @class Ext.form.Action.DirectSubmit
+ * @extends Ext.form.Action.Submit
+ * Provides Ext.direct support for submitting form data.
+ * See {@link Ext.form.Action.DirectLoad}.
+ */
+Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, {
+    constructor: function(form, opts) {
+        Ext.form.Action.DirectSubmit.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directsubmit',
+    // override of Submit
+    run : function(){
+        var o = this.options;
+        if(o.clientValidation === false || this.form.isValid()){
+            // tag on any additional params to be posted in the
+            // form scope
+            this.success.params = this.getParams();
+            this.form.api.submit(this.form.el.dom, this.success, this);
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+    
+    getParams: function() {
+        var o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        return o;
+    },    
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+
+Ext.form.Action.ACTION_TYPES = {
+    'load' : Ext.form.Action.Load,
+    'submit' : Ext.form.Action.Submit,
+    'directload': Ext.form.Action.DirectLoad,
+    'directsubmit': Ext.form.Action.DirectSubmit
+};
+/**
+ * @class Ext.form.VTypes
+ * <p>This is a singleton object which contains a set of commonly used field validation functions.
+ * The validations provided are basic and intended to be easily customizable and extended.</p>
+ * <p>To add custom VTypes specify the <code>{@link Ext.form.TextField#vtype vtype}</code> validation
+ * test function, and optionally specify any corresponding error text to display and any keystroke
+ * filtering mask to apply. For example:</p>
+ * <pre><code>
+// custom Vtype for vtype:'time'
+var timeTest = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
+Ext.apply(Ext.form.VTypes, {
+    //  vtype validation function
+    time: function(val, field) {
+        return timeTest.test(val);
+    },
+    // vtype Text property: The error text to display when the validation function returns false
+    timeText: 'Not a valid time.  Must be in the format "12:34 PM".',
+    // vtype Mask property: The keystroke filter mask
+    timeMask: /[\d\s:amp]/i
+});
+ * </code></pre>
+ * Another example: 
+ * <pre><code>
+// custom Vtype for vtype:'IPAddress'
+Ext.apply(Ext.form.VTypes, {
+    IPAddress:  function(v) {
+        return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
+    },
+    IPAddressText: 'Must be a numeric IP address',
+    IPAddressMask: /[\d\.]/i
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.form.VTypes = function(){
+    // closure these in so they are only created once.
+    var alpha = /^[a-zA-Z_]+$/;
+    var alphanum = /^[a-zA-Z0-9_]+$/;
+    var email = /^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;
+    var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+
+    // All these messages and functions are configurable
+    return {
+        /**
+         * The function used to validate email addresses.  Note that this is a very basic validation -- complete
+         * validation per the email RFC specifications is very complex and beyond the scope of this class, although
+         * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
+         * section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> 
+         * for additional information.  This implementation is intended to validate the following emails:<tt>
+         * 'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'
+         * </tt>.
+         * @param {String} value The email address
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'email' : function(v){
+            return email.test(v);
+        },
+        /**
+         * The error text to display when the email validation function returns false.  Defaults to:
+         * <tt>'This field should be an e-mail address in the format "user@example.com"'</tt>
+         * @type String
+         */
+        'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
+        /**
+         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for 
+         * information about more complex email validation. Defaults to:
+         * <tt>/[a-z0-9_\.\-@]/i</tt>
+         * @type RegExp
+         */
+        'emailMask' : /[a-z0-9_\.\-@]/i,
+
+        /**
+         * The function used to validate URLs
+         * @param {String} value The URL
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'url' : function(v){
+            return url.test(v);
+        },
+        /**
+         * The error text to display when the url validation function returns false.  Defaults to:
+         * <tt>'This field should be a URL in the format "http:/'+'/www.example.com"'</tt>
+         * @type String
+         */
+        'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+        
+        /**
+         * The function used to validate alpha values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alpha' : function(v){
+            return alpha.test(v);
+        },
+        /**
+         * The error text to display when the alpha validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters and _'</tt>
+         * @type String
+         */
+        'alphaText' : 'This field should only contain letters and _',
+        /**
+         * The keystroke filter mask to be applied on alpha input.  Defaults to:
+         * <tt>/[a-z_]/i</tt>
+         * @type RegExp
+         */
+        'alphaMask' : /[a-z_]/i,
+
+        /**
+         * The function used to validate alphanumeric values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alphanum' : function(v){
+            return alphanum.test(v);
+        },
+        /**
+         * The error text to display when the alphanumeric validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters, numbers and _'</tt>
+         * @type String
+         */
+        'alphanumText' : 'This field should only contain letters, numbers and _',
+        /**
+         * The keystroke filter mask to be applied on alphanumeric input.  Defaults to:
+         * <tt>/[a-z0-9_]/i</tt>
+         * @type RegExp
+         */
+        'alphanumMask' : /[a-z0-9_]/i
+    };
+}();/**
+ * @class Ext.grid.GridPanel
+ * @extends Ext.Panel
+ * <p>This class represents the primary interface of a component based grid control to represent data
+ * in a tabular format of rows and columns. The GridPanel is composed of the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>{@link Ext.data.Store Store}</b> : The Model holding the data records (rows)
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.ColumnModel Column model}</b> : Column makeup
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.GridView View}</b> : Encapsulates the user interface 
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.AbstractSelectionModel selection model}</b> : Selection behavior 
+ * <div class="sub-desc"></div></li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    {@link #store}: new (@link Ext.data.Store}({
+        {@link Ext.data.Store#autoDestroy autoDestroy}: true,
+        {@link Ext.data.Store#reader reader}: reader,
+        {@link Ext.data.Store#data data}: xg.dummyData
+    }),
+    {@link #columns}: [
+        {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'},
+        {header: 'Price', width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+        {header: 'Change', width: 120, sortable: true, dataIndex: 'change'},
+        {header: '% Change', width: 120, sortable: true, dataIndex: 'pctChange'},
+        // instead of specifying renderer: Ext.util.Format.dateRenderer('m/d/Y') use xtype
+        {header: 'Last Updated', width: 135, sortable: true, dataIndex: 'lastChange', xtype: 'datecolumn', format: 'M d, Y'}
+    ],
+    {@link #viewConfig}: {
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+
+//      Return CSS class to apply to rows depending upon data values
+        {@link Ext.grid.GridView#getRowClass getRowClass}: function(record, index) {
+            var c = record.{@link Ext.data.Record#get get}('change');
+            if (c < 0) {
+                return 'price-fall';
+            } else if (c > 0) {
+                return 'price-rise';
+            }
+        }
+    },
+    {@link #sm}: new Ext.grid.RowSelectionModel({singleSelect:true}),
+    width: 600,
+    height: 300,
+    frame: true,
+    title: 'Framed with Row Selection and Horizontal Scrolling',
+    iconCls: 'icon-grid'
+});
+ * </code></pre>
+ * <p><b><u>Notes:</u></b></p>
+ * <div class="mdetail-params"><ul>
+ * <li>Although this class inherits many configuration options from base classes, some of them
+ * (such as autoScroll, autoWidth, layout, items, etc) are not used by this class, and will
+ * have no effect.</li>
+ * <li>A grid <b>requires</b> a width in which to scroll its columns, and a height in which to
+ * scroll its rows. These dimensions can either be set explicitly through the
+ * <tt>{@link Ext.BoxComponent#height height}</tt> and <tt>{@link Ext.BoxComponent#width width}</tt>
+ * configuration options or implicitly set by using the grid as a child item of a
+ * {@link Ext.Container Container} which will have a {@link Ext.Container#layout layout manager}
+ * provide the sizing of its child items (for example the Container of the Grid may specify
+ * <tt>{@link Ext.Container#layout layout}:'fit'</tt>).</li>
+ * <li>To access the data in a Grid, it is necessary to use the data model encapsulated
+ * by the {@link #store Store}. See the {@link #cellclick} event for more details.</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype grid
+ */
+Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {String} autoExpandColumn
+     * <p>The <tt>{@link Ext.grid.Column#id id}</tt> of a {@link Ext.grid.Column column} in
+     * this grid that should expand to fill unused space. This value specified here can not
+     * be <tt>0</tt>.</p>
+     * <br><p><b>Note</b>: If the Grid's {@link Ext.grid.GridView view} is configured with
+     * <tt>{@link Ext.grid.GridView#forceFit forceFit}=true</tt> the <tt>autoExpandColumn</tt>
+     * is ignored. See {@link Ext.grid.Column}.<tt>{@link Ext.grid.Column#width width}</tt>
+     * for additional details.</p>
+     * <p>See <tt>{@link #autoExpandMax}</tt> and <tt>{@link #autoExpandMin}</tt> also.</p>
+     */
+    autoExpandColumn : false,
+    /**
+     * @cfg {Number} autoExpandMax The maximum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>1000</tt>.
+     */
+    autoExpandMax : 1000,
+    /**
+     * @cfg {Number} autoExpandMin The minimum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>50</tt>.
+     */
+    autoExpandMin : 50,
+    /**
+     * @cfg {Boolean} columnLines <tt>true</tt> to add css for column separation lines.
+     * Default is <tt>false</tt>.
+     */
+    columnLines : false,
+    /**
+     * @cfg {Object} cm Shorthand for <tt>{@link #colModel}</tt>.
+     */
+    /**
+     * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required).
+     */
+    /**
+     * @cfg {Array} columns An array of {@link Ext.grid.Column columns} to auto create a
+     * {@link Ext.grid.ColumnModel}.  The ColumnModel may be explicitly created via the
+     * <tt>{@link #colModel}</tt> configuration property.
+     */
+    /**
+     * @cfg {String} ddGroup The DD group this GridPanel belongs to. Defaults to <tt>'GridDD'</tt> if not specified.
+     */
+    /**
+     * @cfg {String} ddText
+     * Configures the text in the drag proxy.  Defaults to:
+     * <pre><code>
+     * ddText : '{0} selected row{1}'
+     * </code></pre>
+     * <tt>{0}</tt> is replaced with the number of selected rows.
+     */
+    ddText : '{0} selected row{1}',
+    /**
+     * @cfg {Boolean} deferRowRender <P>Defaults to <tt>true</tt> to enable deferred row rendering.</p>
+     * <p>This allows the GridPanel to be initially rendered empty, with the expensive update of the row
+     * structure deferred so that layouts with GridPanels appear more quickly.</p>
+     */
+    deferRowRender : true,
+    /**
+     * @cfg {Boolean} disableSelection <p><tt>true</tt> to disable selections in the grid. Defaults to <tt>false</tt>.</p>
+     * <p>Ignored if a {@link #selModel SelectionModel} is specified.</p>
+     */
+    /**
+     * @cfg {Boolean} enableColumnResize <tt>false</tt> to turn off column resizing for the whole grid. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} enableColumnHide Defaults to <tt>true</tt> to enable hiding of columns with the header context menu.
+     */
+    enableColumnHide : true,
+    /**
+     * @cfg {Boolean} enableColumnMove Defaults to <tt>true</tt> to enable drag and drop reorder of columns. <tt>false</tt>
+     * to turn off column reordering via drag drop.
+     */
+    enableColumnMove : true,
+    /**
+     * @cfg {Boolean} enableDragDrop <p>Enables dragging of the selected rows of the GridPanel. Defaults to <tt>false</tt>.</p>
+     * <p>Setting this to <b><tt>true</tt></b> causes this GridPanel's {@link #getView GridView} to
+     * create an instance of {@link Ext.grid.GridDragZone}. <b>Note</b>: this is available only <b>after</b>
+     * the Grid has been rendered as the GridView's <tt>{@link Ext.grid.GridView#dragZone dragZone}</tt>
+     * property.</p>
+     * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of
+     * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} are able
+     * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.</p>
+     */
+    enableDragDrop : false,
+    /**
+     * @cfg {Boolean} enableHdMenu Defaults to <tt>true</tt> to enable the drop down button for menu in the headers.
+     */
+    enableHdMenu : true,
+    /**
+     * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to <code>false</code>.
+     */
+    /**
+     * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while
+     * loading. Defaults to <code>false</code>.
+     */
+    loadMask : false,
+    /**
+     * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if <tt>autoHeight</tt> is not on.
+     */
+    /**
+     * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to <tt>25</tt>.
+     */
+    minColumnWidth : 25,
+    /**
+     * @cfg {Object} sm Shorthand for <tt>{@link #selModel}</tt>.
+     */
+    /**
+     * @cfg {Object} selModel Any subclass of {@link Ext.grid.AbstractSelectionModel} that will provide
+     * the selection model for the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified).
+     */
+    /**
+     * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} stripeRows <tt>true</tt> to stripe the rows. Default is <tt>false</tt>.
+     * <p>This causes the CSS class <tt><b>x-grid3-row-alt</b></tt> to be added to alternate rows of
+     * the grid. A default CSS rule is provided which sets a background colour, but you can override this
+     * with a rule which either overrides the <b>background-color</b> style using the '!important'
+     * modifier, or which uses a CSS selector of higher specificity.</p>
+     */
+    stripeRows : false,
+    /**
+     * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is <tt>true</tt>
+     * for GridPanel, but <tt>false</tt> for EditorGridPanel.
+     */
+    trackMouseOver : true,
+    /**
+     * @cfg {Array} stateEvents
+     * An array of events that, when fired, should trigger this component to save its state.
+     * Defaults to:<pre><code>
+     * stateEvents: ['columnmove', 'columnresize', 'sortchange']
+     * </code></pre>
+     * <p>These can be any types of events supported by this component, including browser or
+     * custom events (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See {@link Ext.Component#stateful} for an explanation of saving and restoring
+     * Component state.</p>
+     */
+    stateEvents : ['columnmove', 'columnresize', 'sortchange'],
+    /**
+     * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set
+     * before a call to {@link Ext.Component#render render()}.
+     */
+    view : null,
+    /**
+     * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view.  Any of
+     * the config options available for {@link Ext.grid.GridView} can be specified here. This option
+     * is ignored if <tt>{@link #view}</tt> is specified.
+     */
+
+    // private
+    rendered : false,
+    // private
+    viewReady : false,
+
+    // private
+    initComponent : function(){
+        Ext.grid.GridPanel.superclass.initComponent.call(this);
+
+        if(this.columnLines){
+            this.cls = (this.cls || '') + ' x-grid-with-col-lines';
+        }
+        // override any provided value since it isn't valid
+        // and is causing too many bug reports ;)
+        this.autoScroll = false;
+        this.autoWidth = false;
+
+        if(Ext.isArray(this.columns)){
+            this.colModel = new Ext.grid.ColumnModel(this.columns);
+            delete this.columns;
+        }
+
+        // check and correct shorthanded configs
+        if(this.ds){
+            this.store = this.ds;
+            delete this.ds;
+        }
+        if(this.cm){
+            this.colModel = this.cm;
+            delete this.cm;
+        }
+        if(this.sm){
+            this.selModel = this.sm;
+            delete this.sm;
+        }
+        this.store = Ext.StoreMgr.lookup(this.store);
+
+        this.addEvents(
+            // raw events
+            /**
+             * @event click
+             * The raw click event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event dblclick
+             * The raw dblclick event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'dblclick',
+            /**
+             * @event contextmenu
+             * The raw contextmenu event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'contextmenu',
+            /**
+             * @event mousedown
+             * The raw mousedown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mousedown',
+            /**
+             * @event mouseup
+             * The raw mouseup event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseup',
+            /**
+             * @event mouseover
+             * The raw mouseover event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * The raw mouseout event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseout',
+            /**
+             * @event keypress
+             * The raw keypress event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keypress',
+            /**
+             * @event keydown
+             * The raw keydown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+
+            // custom events
+            /**
+             * @event cellmousedown
+             * Fires before a cell is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellmousedown',
+            /**
+             * @event rowmousedown
+             * Fires before a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowmousedown',
+            /**
+             * @event headermousedown
+             * Fires before a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headermousedown',
+
+            /**
+             * @event cellclick
+             * Fires when a cell is clicked.
+             * The data for the cell is drawn from the {@link Ext.data.Record Record}
+             * for this row. To access the data in the listener function use the
+             * following technique:
+             * <pre><code>
+function(grid, rowIndex, columnIndex, e) {
+    var record = grid.getStore().getAt(rowIndex);  // Get the Record
+    var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
+    var data = record.get(fieldName);
+}
+</code></pre>
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellclick',
+            /**
+             * @event celldblclick
+             * Fires when a cell is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'celldblclick',
+            /**
+             * @event rowclick
+             * Fires when a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowclick',
+            /**
+             * @event rowdblclick
+             * Fires when a row is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowdblclick',
+            /**
+             * @event headerclick
+             * Fires when a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerclick',
+            /**
+             * @event headerdblclick
+             * Fires when a header cell is double clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerdblclick',
+            /**
+             * @event rowcontextmenu
+             * Fires when a row is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowcontextmenu',
+            /**
+             * @event cellcontextmenu
+             * Fires when a cell is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} cellIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellcontextmenu',
+            /**
+             * @event headercontextmenu
+             * Fires when a header is right clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headercontextmenu',
+            /**
+             * @event bodyscroll
+             * Fires when the body element is scrolled
+             * @param {Number} scrollLeft
+             * @param {Number} scrollTop
+             */
+            'bodyscroll',
+            /**
+             * @event columnresize
+             * Fires when the user resizes a column
+             * @param {Number} columnIndex
+             * @param {Number} newSize
+             */
+            'columnresize',
+            /**
+             * @event columnmove
+             * Fires when the user moves a column
+             * @param {Number} oldIndex
+             * @param {Number} newIndex
+             */
+            'columnmove',
+            /**
+             * @event sortchange
+             * Fires when the grid's store sort changes
+             * @param {Grid} this
+             * @param {Object} sortInfo An object with the keys field and direction
+             */
+            'sortchange',
+            /**
+             * @event reconfigure
+             * Fires when the grid is reconfigured with a new store and/or column model.
+             * @param {Grid} this
+             * @param {Ext.data.Store} store The new store
+             * @param {Ext.grid.ColumnModel} colModel The new column model
+             */
+            'reconfigure'
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);
+
+        var c = this.body;
+
+        this.el.addClass('x-grid-panel');
+
+        var view = this.getView();
+        view.init(this);
+
+        this.mon(c, {
+            mousedown: this.onMouseDown,
+            click: this.onClick,
+            dblclick: this.onDblClick,
+            contextmenu: this.onContextMenu,
+            keydown: this.onKeyDown,
+            scope: this
+        });
+
+        this.relayEvents(c, ['mousedown','mouseup','mouseover','mouseout','keypress']);
+
+        this.getSelectionModel().init(this);
+        this.view.render();
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.GridPanel.superclass.initEvents.call(this);
+
+        if(this.loadMask){
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({store:this.store}, this.loadMask));
+        }
+    },
+
+    initStateEvents : function(){
+        Ext.grid.GridPanel.superclass.initStateEvents.call(this);
+        this.mon(this.colModel, 'hiddenchange', this.saveState, this, {delay: 100});
+    },
+
+    applyState : function(state){
+        var cm = this.colModel;
+        var cs = state.columns;
+        if(cs){
+            for(var i = 0, len = cs.length; i < len; i++){
+                var s = cs[i];
+                var c = cm.getColumnById(s.id);
+                if(c){
+                    c.hidden = s.hidden;
+                    c.width = s.width;
+                    var oldIndex = cm.getIndexById(s.id);
+                    if(oldIndex != i){
+                        cm.moveColumn(oldIndex, i);
+                    }
+                }
+            }
+        }
+        if(state.sort && this.store){
+            this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction);
+        }
+        delete state.columns;
+        delete state.sort;
+        Ext.grid.GridPanel.superclass.applyState.call(this, state);
+    },
+
+    getState : function(){
+        var o = {columns: []};
+        for(var i = 0, c; (c = this.colModel.config[i]); i++){
+            o.columns[i] = {
+                id: c.id,
+                width: c.width
+            };
+            if(c.hidden){
+                o.columns[i].hidden = true;
+            }
+        }
+        if(this.store){
+            var ss = this.store.getSortState();
+            if(ss){
+                o.sort = ss;
+            }
+        }
+        return o;
+    },
+
+    // private
+    afterRender : function(){
+        Ext.grid.GridPanel.superclass.afterRender.call(this);
+        this.view.layout();
+        if(this.deferRowRender){
+            this.view.afterRender.defer(10, this.view);
+        }else{
+            this.view.afterRender();
+        }
+        this.viewReady = true;
+    },
+
+    /**
+     * <p>Reconfigures the grid to use a different Store and Column Model
+     * and fires the 'reconfigure' event. The View will be bound to the new
+     * objects and refreshed.</p>
+     * <p>Be aware that upon reconfiguring a GridPanel, certain existing settings <i>may</i> become
+     * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the
+     * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound
+     * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring
+     * with the new data.</p>
+     * @param {Ext.data.Store} store The new {@link Ext.data.Store} object
+     * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object
+     */
+    reconfigure : function(store, colModel){
+        if(this.loadMask){
+            this.loadMask.destroy();
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({}, {store:store}, this.initialConfig.loadMask));
+        }
+        this.view.initData(store, colModel);
+        this.store = store;
+        this.colModel = colModel;
+        if(this.rendered){
+            this.view.refresh(true);
+        }
+        this.fireEvent('reconfigure', this, store, colModel);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', e);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.rendered){
+            var c = this.body;
+            c.removeAllListeners();
+            c.update('');
+            Ext.destroy(this.view, this.loadMask);
+        }else if(this.store && this.store.autoDestroy){
+            this.store.destroy();
+        }
+        Ext.destroy(this.colModel, this.selModel);
+        this.store = this.selModel = this.colModel = this.view = this.loadMask = null;
+        Ext.grid.GridPanel.superclass.onDestroy.call(this);
+    },
+
+    // private
+    processEvent : function(name, e){
+        this.fireEvent(name, e);
+        var t = e.getTarget();
+        var v = this.view;
+        var header = v.findHeaderIndex(t);
+        if(header !== false){
+            this.fireEvent('header' + name, this, header, e);
+        }else{
+            var row = v.findRowIndex(t);
+            var cell = v.findCellIndex(t);
+            if(row !== false){
+                this.fireEvent('row' + name, this, row, e);
+                if(cell !== false){
+                    this.fireEvent('cell' + name, this, row, cell, e);
+                }
+            }
+        }
+    },
+
+    // private
+    onClick : function(e){
+        this.processEvent('click', e);
+    },
+
+    // private
+    onMouseDown : function(e){
+        this.processEvent('mousedown', e);
+    },
+
+    // private
+    onContextMenu : function(e, t){
+        this.processEvent('contextmenu', e);
+    },
+
+    // private
+    onDblClick : function(e){
+        this.processEvent('dblclick', e);
+    },
+
+    // private
+    walkCells : function(row, col, step, fn, scope){
+        var cm = this.colModel, clen = cm.getColumnCount();
+        var ds = this.store, rlen = ds.getCount(), first = true;
+        if(step < 0){
+            if(col < 0){
+                row--;
+                first = false;
+            }
+            while(row >= 0){
+                if(!first){
+                    col = clen-1;
+                }
+                first = false;
+                while(col >= 0){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col--;
+                }
+                row--;
+            }
+        } else {
+            if(col >= clen){
+                row++;
+                first = false;
+            }
+            while(row < rlen){
+                if(!first){
+                    col = 0;
+                }
+                first = false;
+                while(col < clen){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col++;
+                }
+                row++;
+            }
+        }
+        return null;
+    },
+
+    // private
+    onResize : function(){
+        Ext.grid.GridPanel.superclass.onResize.apply(this, arguments);
+        if(this.viewReady){
+            this.view.layout();
+        }
+    },
+
+    /**
+     * Returns the grid's underlying element.
+     * @return {Element} The element
+     */
+    getGridEl : function(){
+        return this.body;
+    },
+
+    // private for compatibility, overridden by editor grid
+    stopEditing : Ext.emptyFn,
+
+    /**
+     * Returns the grid's selection model configured by the <code>{@link #selModel}</code>
+     * configuration option. If no selection model was configured, this will create
+     * and return a {@link Ext.grid.RowSelectionModel RowSelectionModel}.
+     * @return {SelectionModel}
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.grid.RowSelectionModel(
+                    this.disableSelection ? {selectRow: Ext.emptyFn} : null);
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Returns the grid's data store.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Returns the grid's ColumnModel.
+     * @return {Ext.grid.ColumnModel} The column model
+     */
+    getColumnModel : function(){
+        return this.colModel;
+    },
+
+    /**
+     * Returns the grid's GridView object.
+     * @return {Ext.grid.GridView} The grid view
+     */
+    getView : function(){
+        if(!this.view){
+            this.view = new Ext.grid.GridView(this.viewConfig);
+        }
+        return this.view;
+    },
+    /**
+     * Called to get grid's drag proxy text, by default returns this.ddText.
+     * @return {String} The text
+     */
+    getDragDropText : function(){
+        var count = this.selModel.getCount();
+        return String.format(this.ddText, count, count == 1 ? '' : 's');
+    }
+
+    /** 
+     * @cfg {String/Number} activeItem 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoDestroy 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object/String/Function} autoLoad 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoWidth 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean/Number} bufferResize 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} defaultType 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} defaults 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} hideBorders 
+     * @hide 
+     */
+    /** 
+     * @cfg {Mixed} items 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} layout 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} layoutConfig 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} monitorResize 
+     * @hide 
+     */
+    /** 
+     * @property items 
+     * @hide 
+     */
+    /** 
+     * @method add 
+     * @hide 
+     */
+    /** 
+     * @method cascade 
+     * @hide 
+     */
+    /** 
+     * @method doLayout 
+     * @hide 
+     */
+    /** 
+     * @method find 
+     * @hide 
+     */
+    /** 
+     * @method findBy 
+     * @hide 
+     */
+    /** 
+     * @method findById 
+     * @hide 
+     */
+    /** 
+     * @method findByType 
+     * @hide 
+     */
+    /** 
+     * @method getComponent 
+     * @hide 
+     */
+    /** 
+     * @method getLayout 
+     * @hide 
+     */
+    /** 
+     * @method getUpdater 
+     * @hide 
+     */
+    /** 
+     * @method insert 
+     * @hide 
+     */
+    /** 
+     * @method load 
+     * @hide 
+     */
+    /** 
+     * @method remove 
+     * @hide 
+     */
+    /** 
+     * @event add 
+     * @hide 
+     */
+    /** 
+     * @event afterLayout 
+     * @hide 
+     */
+    /** 
+     * @event beforeadd 
+     * @hide 
+     */
+    /** 
+     * @event beforeremove 
+     * @hide 
+     */
+    /** 
+     * @event remove 
+     * @hide 
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} autoScroll  @hide
+     */
+    /**
+     * @cfg {String} bodyBorder  @hide
+     */
+    /**
+     * @cfg {String} bodyStyle  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+Ext.reg('grid', Ext.grid.GridPanel);/**
+ * @class Ext.grid.GridView
+ * @extends Ext.util.Observable
+ * <p>This class encapsulates the user interface of an {@link Ext.grid.GridPanel}.
+ * Methods of this class may be used to access user interface elements to enable
+ * special display effects. Do not change the DOM structure of the user interface.</p>
+ * <p>This class does not provide ways to manipulate the underlying data. The data
+ * model of a Grid is held in an {@link Ext.data.Store}.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GridView = function(config){
+    Ext.apply(this, config);
+    // These events are only used internally by the grid components
+    this.addEvents(
+        /**
+         * @event beforerowremoved
+         * Internal UI Event. Fired before a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row to be removed.
+         * @param {Ext.data.Record} record The Record to be removed
+         */
+        "beforerowremoved",
+        /**
+         * @event beforerowsinserted
+         * Internal UI Event. Fired before rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first row to be inserted.
+         * @param {Number} lastRow The index of the last row to be inserted.
+         */
+        "beforerowsinserted",
+        /**
+         * @event beforerefresh
+         * Internal UI Event. Fired before the view is refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "beforerefresh",
+        /**
+         * @event rowremoved
+         * Internal UI Event. Fired after a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row that was removed.
+         * @param {Ext.data.Record} record The Record that was removed
+         */
+        "rowremoved",
+        /**
+         * @event rowsinserted
+         * Internal UI Event. Fired after rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first inserted.
+         * @param {Number} lastRow The index of the last row inserted.
+         */
+        "rowsinserted",
+        /**
+         * @event rowupdated
+         * Internal UI Event. Fired after a row has been updated.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the row updated.
+         * @param {Ext.data.record} record The Record backing the row updated.
+         */
+        "rowupdated",
+        /**
+         * @event refresh
+         * Internal UI Event. Fired after the GridView's body has been refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "refresh"
+    );
+    Ext.grid.GridView.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.GridView, Ext.util.Observable, {
+    /**
+     * Override this function to apply custom CSS classes to rows during rendering.  You can also supply custom
+     * parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
+     * parameter.  This function should return the CSS class name (or empty string '' for none) that will be added
+     * to the row's wrapping div.  To apply multiple class names, simply return them space-delimited within the string
+     * (e.g., 'my-class another-class'). Example usage:
+    <pre><code>
+viewConfig: {
+    forceFit: true,
+    showPreview: true, // custom property
+    enableRowBody: true, // required to create a second, full-width row to show expanded Record data
+    getRowClass: function(record, rowIndex, rp, ds){ // rp = rowParams
+        if(this.showPreview){
+            rp.body = '&lt;p>'+record.data.excerpt+'&lt;/p>';
+            return 'x-grid3-row-expanded';
+        }
+        return 'x-grid3-row-collapsed';
+    }
+},     
+    </code></pre>
+     * @param {Record} record The {@link Ext.data.Record} corresponding to the current row.
+     * @param {Number} index The row index.
+     * @param {Object} rowParams A config object that is passed to the row template during rendering that allows
+     * customization of various aspects of a grid row.
+     * <p>If {@link #enableRowBody} is configured <b><tt></tt>true</b>, then the following properties may be set
+     * by this function, and will be used to render a full-width expansion row below each grid row:</p>
+     * <ul>
+     * <li><code>body</code> : String <div class="sub-desc">An HTML fragment to be used as the expansion row's body content (defaults to '').</div></li>
+     * <li><code>bodyStyle</code> : String <div class="sub-desc">A CSS style specification that will be applied to the expansion row's &lt;tr> element. (defaults to '').</div></li>
+     * </ul>
+     * The following property will be passed in, and may be appended to:
+     * <ul>
+     * <li><code>tstyle</code> : String <div class="sub-desc">A CSS style specification that willl be applied to the &lt;table> element which encapsulates
+     * both the standard grid row, and any expansion row.</div></li>
+     * </ul>
+     * @param {Store} store The {@link Ext.data.Store} this grid is bound to
+     * @method getRowClass
+     * @return {String} a CSS class name to add to the row.
+     */
+    /**
+     * @cfg {Boolean} enableRowBody True to add a second TR element per row that can be used to provide a row body
+     * that spans beneath the data row.  Use the {@link #getRowClass} method's rowParams config to customize the row body.
+     */
+    /**
+     * @cfg {String} emptyText Default text (html tags are accepted) to display in the grid body when no rows
+     * are available (defaults to ''). This value will be used to update the <tt>{@link #mainBody}</tt>:
+    <pre><code>
+    this.mainBody.update('&lt;div class="x-grid-empty">' + this.emptyText + '&lt;/div>');
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} headersDisabled True to disable the grid column headers (defaults to <tt>false</tt>). 
+     * Use the {@link Ext.grid.ColumnModel ColumnModel} <tt>{@link Ext.grid.ColumnModel#menuDisabled menuDisabled}</tt>
+     * config to disable the <i>menu</i> for individual columns.  While this config is true the
+     * following will be disabled:<div class="mdetail-params"><ul>
+     * <li>clicking on header to sort</li>
+     * <li>the trigger to reveal the menu.</li>
+     * </ul></div>
+     */
+    /**
+     * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations
+     * of the template methods of DragZone to enable dragging of the selected rows of a GridPanel.
+     * See {@link Ext.grid.GridDragZone} for details.</p>
+     * <p>This will <b>only</b> be present:<div class="mdetail-params"><ul>
+     * <li><i>if</i> the owning GridPanel was configured with {@link Ext.grid.GridPanel#enableDragDrop enableDragDrop}: <tt>true</tt>.</li>
+     * <li><i>after</i> the owning GridPanel has been rendered.</li>
+     * </ul></div>
+     * @property dragZone
+     * @type {Ext.grid.GridDragZone}
+     */
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer <tt>{@link #emptyText}</tt> being applied until the store's
+     * first load (defaults to <tt>true</tt>).
+     */
+    deferEmptyText : true,
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the vertical scrollbar
+     * (defaults to <tt>19</tt> pixels).
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean} autoFill
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * when the grid is <b>initially rendered</b>.  The 
+     * {@link Ext.grid.Column#width initially configured width}</tt> of each column will be adjusted
+     * to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually
+     * or programmatically), the other columns in the grid will <b>not</b> be resized to fit the grid width.
+     * See <tt>{@link #forceFit}</tt> also.
+     */
+    autoFill : false,
+    /**
+     * @cfg {Boolean} forceFit
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * at <b>all times</b>.  The {@link Ext.grid.Column#width initially configured width}</tt> of each
+     * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are
+     * later resized (manually or programmatically), the other columns in the grid <b>will</b> be resized
+     * to fit the grid width. See <tt>{@link #autoFill}</tt> also.
+     */
+    forceFit : false,
+    /**
+     * @cfg {Array} sortClasses The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+    /**
+     * @cfg {String} sortAscText The text displayed in the "Sort Ascending" menu item (defaults to <tt>"Sort Ascending"</tt>)
+     */
+    sortAscText : "Sort Ascending",
+    /**
+     * @cfg {String} sortDescText The text displayed in the "Sort Descending" menu item (defaults to <tt>"Sort Descending"</tt>)
+     */
+    sortDescText : "Sort Descending",
+    /**
+     * @cfg {String} columnsText The text displayed in the "Columns" menu item (defaults to <tt>"Columns"</tt>)
+     */
+    columnsText : "Columns",
+
+    /**
+     * @cfg {String} selectedRowClass The CSS class applied to a selected row (defaults to <tt>"x-grid3-row-selected"</tt>). An
+     * example overriding the default styling:
+    <pre><code>
+    .x-grid3-row-selected {background-color: yellow;}
+    </code></pre>
+     * Note that this only controls the row, and will not do anything for the text inside it.  To style inner
+     * facets (like text) use something like:
+    <pre><code>
+    .x-grid3-row-selected .x-grid3-cell-inner {
+        color: #FFCC00;
+    }
+    </code></pre>
+     * @type String
+     */
+    selectedRowClass : "x-grid3-row-selected",
+
+    // private
+    borderWidth : 2,
+    tdClass : 'x-grid3-cell',
+    hdCls : 'x-grid3-hd',
+    markDirty : true,
+
+    /**
+     * @cfg {Number} cellSelectorDepth The number of levels to search for cells in event delegation (defaults to <tt>4</tt>)
+     */
+    cellSelectorDepth : 4,
+    /**
+     * @cfg {Number} rowSelectorDepth The number of levels to search for rows in event delegation (defaults to <tt>10</tt>)
+     */
+    rowSelectorDepth : 10,
+
+    /**
+     * @cfg {String} cellSelector The selector used to find cells internally (defaults to <tt>'td.x-grid3-cell'</tt>)
+     */
+    cellSelector : 'td.x-grid3-cell',
+    /**
+     * @cfg {String} rowSelector The selector used to find rows internally (defaults to <tt>'div.x-grid3-row'</tt>)
+     */
+    rowSelector : 'div.x-grid3-row',
+    
+    // private
+    firstRowCls: 'x-grid3-row-first',
+    lastRowCls: 'x-grid3-row-last',
+    rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,
+
+    /* -------------------------------- UI Specific ----------------------------- */
+
+    // private
+    initTemplates : function(){
+        var ts = this.templates || {};
+        if(!ts.master){
+            ts.master = new Ext.Template(
+                    '<div class="x-grid3" hidefocus="true">',
+                        '<div class="x-grid3-viewport">',
+                            '<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>',
+                            '<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',
+                        '</div>',
+                        '<div class="x-grid3-resize-marker">&#160;</div>',
+                        '<div class="x-grid3-resize-proxy">&#160;</div>',
+                    '</div>'
+                    );
+        }
+
+        if(!ts.header){
+            ts.header = new Ext.Template(
+                    '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',
+                    '</table>'
+                    );
+        }
+
+        if(!ts.hcell){
+            ts.hcell = new Ext.Template(
+                    '<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">', this.grid.enableHdMenu ? '<a class="x-grid3-hd-btn" href="#"></a>' : '',
+                    '{value}<img class="x-grid3-sort-icon" src="', Ext.BLANK_IMAGE_URL, '" />',
+                    '</div></td>'
+                    );
+        }
+
+        if(!ts.body){
+            ts.body = new Ext.Template('{rows}');
+        }
+
+        if(!ts.row){
+            ts.row = new Ext.Template(
+                    '<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<tbody><tr>{cells}</tr>',
+                    (this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''),
+                    '</tbody></table></div>'
+                    );
+        }
+
+        if(!ts.cell){
+            ts.cell = new Ext.Template(
+                    '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>',
+                    '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',
+                    '</td>'
+                    );
+        }
+
+        for(var k in ts){
+            var t = ts[k];
+            if(t && typeof t.compile == 'function' && !t.compiled){
+                t.disableFormats = true;
+                t.compile();
+            }
+        }
+
+        this.templates = ts;
+        this.colRe = new RegExp("x-grid3-td-([^\\s]+)", "");
+    },
+
+    // private
+    fly : function(el){
+        if(!this._flyweight){
+            this._flyweight = new Ext.Element.Flyweight(document.body);
+        }
+        this._flyweight.dom = el;
+        return this._flyweight;
+    },
+
+    // private
+    getEditorParent : function(){
+        return this.scroller.dom;
+    },
+
+    // private
+    initElements : function(){
+        var E = Ext.Element;
+
+        var el = this.grid.getGridEl().dom.firstChild;
+        var cs = el.childNodes;
+
+        this.el = new E(el);
+
+        this.mainWrap = new E(cs[0]);
+        this.mainHd = new E(this.mainWrap.dom.firstChild);
+
+        if(this.grid.hideHeaders){
+            this.mainHd.setDisplayed(false);
+        }
+
+        this.innerHd = this.mainHd.dom.firstChild;
+        this.scroller = new E(this.mainWrap.dom.childNodes[1]);
+        if(this.forceFit){
+            this.scroller.setStyle('overflow-x', 'hidden');
+        }
+        /**
+         * <i>Read-only</i>. The GridView's body Element which encapsulates all rows in the Grid.
+         * This {@link Ext.Element Element} is only available after the GridPanel has been rendered.
+         * @type Ext.Element
+         * @property mainBody
+         */
+        this.mainBody = new E(this.scroller.dom.firstChild);
+
+        this.focusEl = new E(this.scroller.dom.childNodes[1]);
+        this.focusEl.swallowEvent("click", true);
+
+        this.resizeMarker = new E(cs[1]);
+        this.resizeProxy = new E(cs[2]);
+    },
+
+    // private
+    getRows : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // finder methods, used with delegation
+
+    // private
+    findCell : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid column which contains the passed element.</p>
+ * See also {@link #findRowIndex}
+ * @param {Element} el The target element
+ * @return The column index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findCellIndex : function(el, requiredCls){
+        var cell = this.findCell(el);
+        if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){
+            return this.getCellIndex(cell);
+        }
+        return false;
+    },
+
+    // private
+    getCellIndex : function(el){
+        if(el){
+            var m = el.className.match(this.colRe);
+            if(m && m[1]){
+                return this.cm.getIndexById(m[1]);
+            }
+        }
+        return false;
+    },
+
+    // private
+    findHeaderCell : function(el){
+        var cell = this.findCell(el);
+        return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null;
+    },
+
+    // private
+    findHeaderIndex : function(el){
+        return this.findCellIndex(el, this.hdCls);
+    },
+
+/**
+ * Return the HtmlElement representing the grid row which contains the passed element.
+ * @param {Element} el The target element
+ * @return The row element, or null if the target element is not within a row of this GridView.
+ */
+    findRow : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid row which contains the passed element.</p>
+ * See also {@link #findCellIndex}
+ * @param {Element} el The target element
+ * @return The row index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findRowIndex : function(el){
+        var r = this.findRow(el);
+        return r ? r.rowIndex : false;
+    },
+
+    // getter methods for fetching elements dynamically in the grid
+
+/**
+ * Return the <tt>&lt;div></tt> HtmlElement which represents a Grid row for the specified index.
+ * @param {Number} index The row index
+ * @return {HtmlElement} The div element.
+ */
+    getRow : function(row){
+        return this.getRows()[row];
+    },
+
+/**
+ * Returns the grid's <tt>&lt;td></tt> HtmlElement at the specified coordinates.
+ * @param {Number} row The row index in which to find the cell.
+ * @param {Number} col The column index of the cell.
+ * @return {HtmlElement} The td at the specified coordinates.
+ */
+    getCell : function(row, col){
+        return this.getRow(row).getElementsByTagName('td')[col];
+    },
+
+/**
+ * Return the <tt>&lt;td></tt> HtmlElement which represents the Grid's header cell for the specified column index.
+ * @param {Number} index The column index
+ * @return {HtmlElement} The td element.
+ */
+    getHeaderCell : function(index){
+      return this.mainHd.dom.getElementsByTagName('td')[index];
+    },
+
+    // manipulating elements
+
+    // private - use getRowClass to apply custom row classes
+    addRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).addClass(cls);
+        }
+    },
+
+    // private
+    removeRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).removeClass(cls);
+        }
+    },
+
+    // private
+    removeRow : function(row){
+        Ext.removeNode(this.getRow(row));
+        this.syncFocusEl(row);
+    },
+    
+    // private
+    removeRows : function(firstRow, lastRow){
+        var bd = this.mainBody.dom;
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            Ext.removeNode(bd.childNodes[firstRow]);
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // scrolling stuff
+
+    // private
+    getScrollState : function(){
+        var sb = this.scroller.dom;
+        return {left: sb.scrollLeft, top: sb.scrollTop};
+    },
+
+    // private
+    restoreScroll : function(state){
+        var sb = this.scroller.dom;
+        sb.scrollLeft = state.left;
+        sb.scrollTop = state.top;
+    },
+
+    /**
+     * Scrolls the grid to the top
+     */
+    scrollToTop : function(){
+        this.scroller.dom.scrollTop = 0;
+        this.scroller.dom.scrollLeft = 0;
+    },
+
+    // private
+    syncScroll : function(){
+      this.syncHeaderScroll();
+      var mb = this.scroller.dom;
+        this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop);
+    },
+
+    // private
+    syncHeaderScroll : function(){
+        var mb = this.scroller.dom;
+        this.innerHd.scrollLeft = mb.scrollLeft;
+        this.innerHd.scrollLeft = mb.scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore)
+    },
+
+    // private
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.mainHd.select('td').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    // private
+    updateAllColumnWidths : function(){
+        var tw = this.getTotalWidth(),
+            clen = this.cm.getColumnCount(),
+            ws = [],
+            len,
+            i;
+        for(i = 0; i < clen; i++){
+            ws[i] = this.getColumnWidth(i);
+        }
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        for(i = 0; i < clen; i++){
+            var hd = this.getHeaderCell(i);
+            hd.style.width = ws[i];
+        }
+
+        var ns = this.getRows(), row, trow;
+        for(i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                trow = row.firstChild.rows[0];
+                for (var j = 0; j < clen; j++) {
+                   trow.childNodes[j].style.width = ws[j];
+                }
+            }
+        }
+
+        this.onAllColumnWidthsUpdated(ws, tw);
+    },
+
+    // private
+    updateColumnWidth : function(col, width){
+        var w = this.getColumnWidth(col);
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var hd = this.getHeaderCell(col);
+        hd.style.width = w;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.width = w;
+            }
+        }
+
+        this.onColumnWidthUpdated(col, w, tw);
+    },
+
+    // private
+    updateColumnHidden : function(col, hidden){
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var display = hidden ? 'none' : '';
+
+        var hd = this.getHeaderCell(col);
+        hd.style.display = display;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.display = display;
+            }
+        }
+
+        this.onColumnHiddenUpdated(col, hidden, tw);
+        delete this.lastViewWidth; // force recalc
+        this.layout();
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
+        var tstyle = 'width:'+this.getTotalWidth()+';';
+        // buffers
+        var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r;
+        for(var j = 0, len = rs.length; j < len; j++){
+            r = rs[j]; cb = [];
+            var rowIndex = (j+startRow);
+            for(var i = 0; i < colCount; i++){
+                c = cs[i];
+                p.id = c.id;
+                p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+                p.attr = p.cellAttr = "";
+                p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
+                p.style = c.style;
+                if(Ext.isEmpty(p.value)){
+                    p.value = "&#160;";
+                }
+                if(this.markDirty && r.dirty && typeof r.modified[c.name] !== 'undefined'){
+                    p.css += ' x-grid3-dirty-cell';
+                }
+                cb[cb.length] = ct.apply(p);
+            }
+            var alt = [];
+            if(stripe && ((rowIndex+1) % 2 === 0)){
+                alt[0] = "x-grid3-row-alt";
+            }
+            if(r.dirty){
+                alt[1] = " x-grid3-dirty-row";
+            }
+            rp.cols = colCount;
+            if(this.getRowClass){
+                alt[2] = this.getRowClass(r, rowIndex, rp, ds);
+            }
+            rp.alt = alt.join(" ");
+            rp.cells = cb.join("");
+            buf[buf.length] =  rt.apply(rp);
+        }
+        return buf.join("");
+    },
+
+    // private
+    processRows : function(startRow, skipStripe){
+        if(!this.ds || this.ds.getCount() < 1){
+            return;
+        }
+        var rows = this.getRows();
+        skipStripe = skipStripe || !this.grid.stripeRows;
+        startRow = startRow || 0;
+        Ext.each(rows, function(row, idx){
+            row.rowIndex = idx;
+            row.className = row.className.replace(this.rowClsRe, ' ');
+            if (!skipStripe && (idx + 1) % 2 === 0) {
+                row.className += ' x-grid3-row-alt';
+            }
+        });
+        // add first/last-row classes
+        if(startRow === 0){
+            Ext.fly(rows[0]).addClass(this.firstRowCls);
+        }
+        Ext.fly(rows[rows.length - 1]).addClass(this.lastRowCls);
+    },
+
+    afterRender : function(){
+        if(!this.ds || !this.cm){
+            return;
+        }
+        this.mainBody.dom.innerHTML = this.renderRows() || '&#160;';
+        this.processRows(0, true);
+
+        if(this.deferEmptyText !== true){
+            this.applyEmptyText();
+        }
+    },
+
+    // private
+    renderUI : function(){
+
+        var header = this.renderHeaders();
+        var body = this.templates.body.apply({rows:'&#160;'});
+
+
+        var html = this.templates.master.apply({
+            body: body,
+            header: header,
+            ostyle: 'width:'+this.getOffsetWidth()+';',
+            bstyle: 'width:'+this.getTotalWidth()+';'
+        });
+
+        var g = this.grid;
+
+        g.getGridEl().dom.innerHTML = html;
+
+        this.initElements();
+
+        // get mousedowns early
+        Ext.fly(this.innerHd).on("click", this.handleHdDown, this);
+        this.mainHd.on({
+            scope: this,
+            mouseover: this.handleHdOver,
+            mouseout: this.handleHdOut,
+            mousemove: this.handleHdMove
+        });
+
+        this.scroller.on('scroll', this.syncScroll,  this);
+        if(g.enableColumnResize !== false){
+            this.splitZone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableColumnMove){
+            this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd);
+            this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableHdMenu !== false){
+            this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"});
+            this.hmenu.add(
+                {itemId:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"},
+                {itemId:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"}
+            );
+            if(g.enableColumnHide !== false){
+                this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"});
+                this.colMenu.on({
+                    scope: this,
+                    beforeshow: this.beforeColMenuShow,
+                    itemclick: this.handleHdMenuClick
+                });
+                this.hmenu.add('-', {
+                    itemId:"columns",
+                    hideOnClick: false,
+                    text: this.columnsText,
+                    menu: this.colMenu,
+                    iconCls: 'x-cols-icon'
+                });
+            }
+            this.hmenu.on("itemclick", this.handleHdMenuClick, this);
+        }
+
+        if(g.trackMouseOver){
+            this.mainBody.on({
+                scope: this,
+                mouseover: this.onRowOver,
+                mouseout: this.onRowOut
+            });
+        }
+
+        if(g.enableDragDrop || g.enableDrag){
+            this.dragZone = new Ext.grid.GridDragZone(g, {
+                ddGroup : g.ddGroup || 'GridDD'
+            });
+        }
+
+        this.updateHeaderSortState();
+
+    },
+
+    // private
+    layout : function(){
+        if(!this.mainBody){
+            return; // not rendered
+        }
+        var g = this.grid;
+        var c = g.getGridEl();
+        var csize = c.getSize(true);
+        var vw = csize.width;
+
+        if(!g.hideHeaders && (vw < 20 || csize.height < 20)){ // display: none?
+            return;
+        }
+        
+        if(g.autoHeight){
+            this.scroller.dom.style.overflow = 'visible';
+            if(Ext.isWebKit){
+                this.scroller.dom.style.position = 'static';
+            }
+        }else{
+            this.el.setSize(csize.width, csize.height);
+
+            var hdHeight = this.mainHd.getHeight();
+            var vh = csize.height - (hdHeight);
+
+            this.scroller.setSize(vw, vh);
+            if(this.innerHd){
+                this.innerHd.style.width = (vw)+'px';
+            }
+        }
+        if(this.forceFit){
+            if(this.lastViewWidth != vw){
+                this.fitColumns(false, false);
+                this.lastViewWidth = vw;
+            }
+        }else {
+            this.autoExpand();
+            this.syncHeaderScroll();
+        }
+        this.onLayout(vw, vh);
+    },
+
+    // template functions for subclasses and plugins
+    // these functions include precalculated values
+    onLayout : function(vw, vh){
+        // do nothing
+    },
+
+    onColumnWidthUpdated : function(col, w, tw){
+        //template method
+    },
+
+    onAllColumnWidthsUpdated : function(ws, tw){
+        //template method
+    },
+
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        // template method
+    },
+
+    updateColumnText : function(col, text){
+        // template method
+    },
+
+    afterMove : function(colIndex){
+        // template method
+    },
+
+    /* ----------------------------------- Core Specific -------------------------------------------*/
+    // private
+    init : function(grid){
+        this.grid = grid;
+
+        this.initTemplates();
+        this.initData(grid.store, grid.colModel);
+        this.initUI(grid);
+    },
+
+    // private
+    getColumnId : function(index){
+      return this.cm.getColumnId(index);
+    },
+    
+    // private 
+    getOffsetWidth : function() {
+        return (this.cm.getTotalWidth() + this.scrollOffset) + 'px';
+    },
+
+    // private
+    renderHeaders : function(){
+        var cm = this.cm, 
+            ts = this.templates,
+            ct = ts.hcell,
+            cb = [], 
+            p = {},
+            len = cm.getColumnCount(),
+            last = len - 1;
+            
+        for(var i = 0; i < len; i++){
+            p.id = cm.getColumnId(i);
+            p.value = cm.getColumnHeader(i) || "";
+            p.style = this.getColumnStyle(i, true);
+            p.tooltip = this.getColumnTooltip(i);
+            p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+            if(cm.config[i].align == 'right'){
+                p.istyle = 'padding-right:16px';
+            } else {
+                delete p.istyle;
+            }
+            cb[cb.length] = ct.apply(p);
+        }
+        return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'});
+    },
+
+    // private
+    getColumnTooltip : function(i){
+        var tt = this.cm.getColumnTooltip(i);
+        if(tt){
+            if(Ext.QuickTips.isEnabled()){
+                return 'ext:qtip="'+tt+'"';
+            }else{
+                return 'title="'+tt+'"';
+            }
+        }
+        return "";
+    },
+
+    // private
+    beforeUpdate : function(){
+        this.grid.stopEditing(true);
+    },
+
+    // private
+    updateHeaders : function(){
+        this.innerHd.firstChild.innerHTML = this.renderHeaders();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = this.getTotalWidth();
+    },
+
+    /**
+     * Focuses the specified row.
+     * @param {Number} row The row index
+     */
+    focusRow : function(row){
+        this.focusCell(row, 0, false);
+    },
+
+    /**
+     * Focuses the specified cell.
+     * @param {Number} row The row index
+     * @param {Number} col The column index
+     */
+    focusCell : function(row, col, hscroll){
+        this.syncFocusEl(this.ensureVisible(row, col, hscroll));
+        if(Ext.isGecko){
+            this.focusEl.focus();
+        }else{
+            this.focusEl.focus.defer(1, this.focusEl);
+        }
+    },
+
+    resolveCell : function(row, col, hscroll){
+        if(typeof row != "number"){
+            row = row.rowIndex;
+        }
+        if(!this.ds){
+            return null;
+        }
+        if(row < 0 || row >= this.ds.getCount()){
+            return null;
+        }
+        col = (col !== undefined ? col : 0);
+
+        var rowEl = this.getRow(row),
+            cm = this.cm,
+            colCount = cm.getColumnCount(),
+            cellEl;
+        if(!(hscroll === false && col === 0)){
+            while(col < colCount && cm.isHidden(col)){
+                col++;
+            }
+            cellEl = this.getCell(row, col);
+        }
+
+        return {row: rowEl, cell: cellEl};
+    },
+
+    getResolvedXY : function(resolved){
+        if(!resolved){
+            return null;
+        }
+        var s = this.scroller.dom, c = resolved.cell, r = resolved.row;
+        return c ? Ext.fly(c).getXY() : [this.el.getX(), Ext.fly(r).getY()];
+    },
+
+    syncFocusEl : function(row, col, hscroll){
+        var xy = row;
+        if(!Ext.isArray(xy)){
+            row = Math.min(row, Math.max(0, this.getRows().length-1));
+            xy = this.getResolvedXY(this.resolveCell(row, col, hscroll));
+        }
+        this.focusEl.setXY(xy||this.scroller.getXY());
+    },
+
+    ensureVisible : function(row, col, hscroll){
+        var resolved = this.resolveCell(row, col, hscroll);
+        if(!resolved || !resolved.row){
+            return;
+        }
+
+        var rowEl = resolved.row, 
+            cellEl = resolved.cell,
+            c = this.scroller.dom,
+            ctop = 0,
+            p = rowEl, 
+            stop = this.el.dom;
+            
+        while(p && p != stop){
+            ctop += p.offsetTop;
+            p = p.offsetParent;
+        }
+        ctop -= this.mainHd.dom.offsetHeight;
+
+        var cbot = ctop + rowEl.offsetHeight,
+            ch = c.clientHeight,
+            sbot = stop + ch;
+            
+        stop = parseInt(c.scrollTop, 10);
+        
+
+        if(ctop < stop){
+          c.scrollTop = ctop;
+        }else if(cbot > sbot){
+            c.scrollTop = cbot-ch;
+        }
+
+        if(hscroll !== false){
+            var cleft = parseInt(cellEl.offsetLeft, 10);
+            var cright = cleft + cellEl.offsetWidth;
+
+            var sleft = parseInt(c.scrollLeft, 10);
+            var sright = sleft + c.clientWidth;
+            if(cleft < sleft){
+                c.scrollLeft = cleft;
+            }else if(cright > sright){
+                c.scrollLeft = cright-c.clientWidth;
+            }
+        }
+        return this.getResolvedXY(resolved);
+    },
+
+    // private
+    insertRows : function(dm, firstRow, lastRow, isUpdate){
+        var last = dm.getCount() - 1;
+        if(!isUpdate && firstRow === 0 && lastRow >= last){
+            this.refresh();
+        }else{
+            if(!isUpdate){
+                this.fireEvent("beforerowsinserted", this, firstRow, lastRow);
+            }
+            var html = this.renderRows(firstRow, lastRow),
+                before = this.getRow(firstRow);
+            if(before){
+                if(firstRow === 0){
+                    Ext.fly(this.getRow(0)).removeClass(this.firstRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeBegin', before, html);
+            }else{
+                var r = this.getRow(last - 1);
+                if(r){
+                    Ext.fly(r).removeClass(this.lastRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html);
+            }
+            if(!isUpdate){
+                this.fireEvent("rowsinserted", this, firstRow, lastRow);
+                this.processRows(firstRow);
+            }else if(firstRow === 0 || firstRow >= last){
+                //ensure first/last row is kept after an update.
+                Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls);
+            }
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // private
+    deleteRows : function(dm, firstRow, lastRow){
+        if(dm.getRowCount()<1){
+            this.refresh();
+        }else{
+            this.fireEvent("beforerowsdeleted", this, firstRow, lastRow);
+
+            this.removeRows(firstRow, lastRow);
+
+            this.processRows(firstRow);
+            this.fireEvent("rowsdeleted", this, firstRow, lastRow);
+        }
+    },
+
+    // private
+    getColumnStyle : function(col, isHeader){
+        var style = !isHeader ? (this.cm.config[col].css || '') : '';
+        style += 'width:'+this.getColumnWidth(col)+';';
+        if(this.cm.isHidden(col)){
+            style += 'display:none;';
+        }
+        var align = this.cm.config[col].align;
+        if(align){
+            style += 'text-align:'+align+';';
+        }
+        return style;
+    },
+
+    // private
+    getColumnWidth : function(col){
+        var w = this.cm.getColumnWidth(col);
+        if(typeof w == 'number'){
+            return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px';
+        }
+        return w;
+    },
+
+    // private
+    getTotalWidth : function(){
+        return this.cm.getTotalWidth()+'px';
+    },
+
+    // private
+    fitColumns : function(preventRefresh, onlyExpand, omitColumn){
+        var cm = this.cm, i;
+        var tw = cm.getTotalWidth(false);
+        var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+
+        if(aw < 20){ // not initialized, so don't screw up the default widths
+            return;
+        }
+        var extra = aw - tw;
+
+        if(extra === 0){
+            return false;
+        }
+
+        var vc = cm.getColumnCount(true);
+        var ac = vc-(typeof omitColumn == 'number' ? 1 : 0);
+        if(ac === 0){
+            ac = 1;
+            omitColumn = undefined;
+        }
+        var colCount = cm.getColumnCount();
+        var cols = [];
+        var extraCol = 0;
+        var width = 0;
+        var w;
+        for (i = 0; i < colCount; i++){
+            if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){
+                w = cm.getColumnWidth(i);
+                cols.push(i);
+                extraCol = i;
+                cols.push(w);
+                width += w;
+            }
+        }
+        var frac = (aw - cm.getTotalWidth())/width;
+        while (cols.length){
+            w = cols.pop();
+            i = cols.pop();
+            cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true);
+        }
+
+        if((tw = cm.getTotalWidth(false)) > aw){
+            var adjustCol = ac != vc ? omitColumn : extraCol;
+             cm.setColumnWidth(adjustCol, Math.max(1,
+                     cm.getColumnWidth(adjustCol)- (tw-aw)), true);
+        }
+
+        if(preventRefresh !== true){
+            this.updateAllColumnWidths();
+        }
+
+
+        return true;
+    },
+
+    // private
+    autoExpand : function(preventUpdate){
+        var g = this.grid, cm = this.cm;
+        if(!this.userResized && g.autoExpandColumn){
+            var tw = cm.getTotalWidth(false);
+            var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+            if(tw != aw){
+                var ci = cm.getIndexById(g.autoExpandColumn);
+                var currentWidth = cm.getColumnWidth(ci);
+                var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax);
+                if(cw != currentWidth){
+                    cm.setColumnWidth(ci, cw, true);
+                    if(preventUpdate !== true){
+                        this.updateColumnWidth(ci, cw);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getColumnData : function(){
+        // build a map for all the columns
+        var cs = [], cm = this.cm, colCount = cm.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            var name = cm.getDataIndex(i);
+            cs[i] = {
+                name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name),
+                renderer : cm.getRenderer(i),
+                id : cm.getColumnId(i),
+                style : this.getColumnStyle(i)
+            };
+        }
+        return cs;
+    },
+
+    // private
+    renderRows : function(startRow, endRow){
+        // pull in all the crap needed to render rows
+        var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows;
+        var colCount = cm.getColumnCount();
+
+        if(ds.getCount() < 1){
+            return "";
+        }
+
+        var cs = this.getColumnData();
+
+        startRow = startRow || 0;
+        endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow;
+
+        // records to render
+        var rs = ds.getRange(startRow, endRow);
+
+        return this.doRender(cs, rs, ds, startRow, colCount, stripe);
+    },
+
+    // private
+    renderBody : function(){
+        var markup = this.renderRows() || '&#160;';
+        return this.templates.body.apply({rows: markup});
+    },
+
+    // private
+    refreshRow : function(record){
+        var ds = this.ds, index;
+        if(typeof record == 'number'){
+            index = record;
+            record = ds.getAt(index);
+            if(!record){
+                return;
+            }
+        }else{
+            index = ds.indexOf(record);
+            if(index < 0){
+                return;
+            }
+        }
+        this.insertRows(ds, index, index, true);
+        this.getRow(index).rowIndex = index;
+        this.onRemove(ds, record, index+1, true);
+        this.fireEvent("rowupdated", this, index, record);
+    },
+
+    /**
+     * Refreshs the grid UI
+     * @param {Boolean} headersToo (optional) True to also refresh the headers
+     */
+    refresh : function(headersToo){
+        this.fireEvent("beforerefresh", this);
+        this.grid.stopEditing(true);
+
+        var result = this.renderBody();
+        this.mainBody.update(result).setWidth(this.getTotalWidth());
+        if(headersToo === true){
+            this.updateHeaders();
+            this.updateHeaderSortState();
+        }
+        this.processRows(0, true);
+        this.layout();
+        this.applyEmptyText();
+        this.fireEvent("refresh", this);
+    },
+
+    // private
+    applyEmptyText : function(){
+        if(this.emptyText && !this.hasRows()){
+            this.mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>');
+        }
+    },
+
+    // private
+    updateHeaderSortState : function(){
+        var state = this.ds.getSortState();
+        if(!state){
+            return;
+        }
+        if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){
+            this.grid.fireEvent('sortchange', this.grid, state);
+        }
+        this.sortState = state;
+        var sortColumn = this.cm.findColumnIndex(state.field);
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    // private
+    destroy : function(){
+        if(this.colMenu){
+            Ext.menu.MenuMgr.unregister(this.colMenu);
+            this.colMenu.destroy();
+            delete this.colMenu;
+        }
+        if(this.hmenu){
+            Ext.menu.MenuMgr.unregister(this.hmenu);
+            this.hmenu.destroy();
+            delete this.hmenu;
+        }
+        if(this.grid.enableColumnMove){
+            var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            if(dds){
+                for(var dd in dds){
+                    if(!dds[dd].config.isTarget && dds[dd].dragElId){
+                        var elid = dds[dd].dragElId;
+                        dds[dd].unreg();
+                        Ext.get(elid).remove();
+                    } else if(dds[dd].config.isTarget){
+                        dds[dd].proxyTop.remove();
+                        dds[dd].proxyBottom.remove();
+                        dds[dd].unreg();
+                    }
+                    if(Ext.dd.DDM.locationCache[dd]){
+                        delete Ext.dd.DDM.locationCache[dd];
+                    }
+                }
+                delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            }
+        }
+
+        if(this.dragZone){
+            this.dragZone.unreg();
+        }
+        
+        Ext.fly(this.innerHd).removeAllListeners();
+        Ext.removeNode(this.innerHd);
+        
+        Ext.destroy(this.resizeMarker, this.resizeProxy, this.focusEl, this.mainBody, 
+                    this.scroller, this.mainHd, this.mainWrap, this.dragZone, 
+                    this.splitZone, this.columnDrag, this.columnDrop);
+
+        this.initData(null, null);
+        Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        this.purgeListeners();
+    },
+
+    // private
+    onDenyColumnHide : function(){
+
+    },
+
+    // private
+    render : function(){
+        if(this.autoFill){
+            var ct = this.grid.ownerCt;
+            if (ct && ct.getLayout()){
+                ct.on('afterlayout', function(){ 
+                    this.fitColumns(true, true);
+                    this.updateHeaders(); 
+                }, this, {single: true}); 
+            }else{ 
+                this.fitColumns(true, true); 
+            }
+        }else if(this.forceFit){
+            this.fitColumns(true, false);
+        }else if(this.grid.autoExpandColumn){
+            this.autoExpand(true);
+        }
+
+        this.renderUI();
+    },
+
+    /* --------------------------------- Model Events and Handlers --------------------------------*/
+    // private
+    initData : function(ds, cm){
+        if(this.ds){
+            this.ds.un("load", this.onLoad, this);
+            this.ds.un("datachanged", this.onDataChange, this);
+            this.ds.un("add", this.onAdd, this);
+            this.ds.un("remove", this.onRemove, this);
+            this.ds.un("update", this.onUpdate, this);
+            this.ds.un("clear", this.onClear, this);
+            if(this.ds !== ds && this.ds.autoDestroy){
+                this.ds.destroy();
+            }
+        }
+        if(ds){
+            ds.on({
+                scope: this,
+                load: this.onLoad,
+                datachanged: this.onDataChange,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.onClear
+            });
+        }
+        this.ds = ds;
+
+        if(this.cm){
+            this.cm.un("configchange", this.onColConfigChange, this);
+            this.cm.un("widthchange", this.onColWidthChange, this);
+            this.cm.un("headerchange", this.onHeaderChange, this);
+            this.cm.un("hiddenchange", this.onHiddenChange, this);
+            this.cm.un("columnmoved", this.onColumnMove, this);
+        }
+        if(cm){
+            delete this.lastViewWidth;
+            cm.on({
+                scope: this,
+                configchange: this.onColConfigChange,
+                widthchange: this.onColWidthChange,
+                headerchange: this.onHeaderChange,
+                hiddenchange: this.onHiddenChange,
+                columnmoved: this.onColumnMove
+            });
+        }
+        this.cm = cm;
+    },
+
+    // private
+    onDataChange : function(){
+        this.refresh();
+        this.updateHeaderSortState();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onClear : function(){
+        this.refresh();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        this.refreshRow(record);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        this.insertRows(ds, index, index + (records.length-1));
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        if(isUpdate !== true){
+            this.fireEvent("beforerowremoved", this, index, record);
+        }
+        this.removeRow(index);
+        if(isUpdate !== true){
+            this.processRows(index);
+            this.applyEmptyText();
+            this.fireEvent("rowremoved", this, index, record);
+        }
+    },
+
+    // private
+    onLoad : function(){
+        this.scrollToTop();
+    },
+
+    // private
+    onColWidthChange : function(cm, col, width){
+        this.updateColumnWidth(col, width);
+    },
+
+    // private
+    onHeaderChange : function(cm, col, text){
+        this.updateHeaders();
+    },
+
+    // private
+    onHiddenChange : function(cm, col, hidden){
+        this.updateColumnHidden(col, hidden);
+    },
+
+    // private
+    onColumnMove : function(cm, oldIndex, newIndex){
+        this.indexMap = null;
+        var s = this.getScrollState();
+        this.refresh(true);
+        this.restoreScroll(s);
+        this.afterMove(newIndex);
+        this.grid.fireEvent('columnmove', oldIndex, newIndex);
+    },
+
+    // private
+    onColConfigChange : function(){
+        delete this.lastViewWidth;
+        this.indexMap = null;
+        this.refresh(true);
+    },
+
+    /* -------------------- UI Events and Handlers ------------------------------ */
+    // private
+    initUI : function(grid){
+        grid.on("headerclick", this.onHeaderClick, this);
+    },
+
+    // private
+    initEvents : function(){
+    },
+
+    // private
+    onHeaderClick : function(g, index){
+        if(this.headersDisabled || !this.cm.isSortable(index)){
+            return;
+        }
+        g.stopEditing(true);
+        g.store.sort(this.cm.getDataIndex(index));
+    },
+
+    // private
+    onRowOver : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false){
+            this.addRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    onRowOut : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false && !e.within(this.getRow(row), true)){
+            this.removeRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    handleWheel : function(e){
+        e.stopPropagation();
+    },
+
+    // private
+    onRowSelect : function(row){
+        this.addRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onRowDeselect : function(row){
+        this.removeRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onCellSelect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).addClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onCellDeselect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).removeClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onColumnSplitterMoved : function(i, w){
+        this.userResized = true;
+        var cm = this.grid.colModel;
+        cm.setColumnWidth(i, w, true);
+
+        if(this.forceFit){
+            this.fitColumns(true, false, i);
+            this.updateAllColumnWidths();
+        }else{
+            this.updateColumnWidth(i, w);
+            this.syncHeaderScroll();
+        }
+
+        this.grid.fireEvent("columnresize", i, w);
+    },
+
+    // private
+    handleHdMenuClick : function(item){
+        var index = this.hdCtxIndex;
+        var cm = this.cm, ds = this.ds;
+        switch(item.itemId){
+            case "asc":
+                ds.sort(cm.getDataIndex(index), "ASC");
+                break;
+            case "desc":
+                ds.sort(cm.getDataIndex(index), "DESC");
+                break;
+            default:
+                index = cm.getIndexById(item.itemId.substr(4));
+                if(index != -1){
+                    if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){
+                        this.onDenyColumnHide();
+                        return false;
+                    }
+                    cm.setHidden(index, item.checked);
+                }
+        }
+        return true;
+    },
+
+    // private
+    isHideableColumn : function(c){
+        return !c.hidden && !c.fixed;
+    },
+
+    // private
+    beforeColMenuShow : function(){
+        var cm = this.cm,  colCount = cm.getColumnCount();
+        this.colMenu.removeAll();
+        for(var i = 0; i < colCount; i++){
+            if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){
+                this.colMenu.add(new Ext.menu.CheckItem({
+                    itemId: "col-"+cm.getColumnId(i),
+                    text: cm.getColumnHeader(i),
+                    checked: !cm.isHidden(i),
+                    hideOnClick:false,
+                    disabled: cm.config[i].hideable === false
+                }));
+            }
+        }
+    },
+
+    // private
+    handleHdDown : function(e, t){
+        if(Ext.fly(t).hasClass('x-grid3-hd-btn')){
+            e.stopEvent();
+            var hd = this.findHeaderCell(t);
+            Ext.fly(hd).addClass('x-grid3-hd-menu-open');
+            var index = this.getCellIndex(hd);
+            this.hdCtxIndex = index;
+            var ms = this.hmenu.items, cm = this.cm;
+            ms.get("asc").setDisabled(!cm.isSortable(index));
+            ms.get("desc").setDisabled(!cm.isSortable(index));
+            this.hmenu.on("hide", function(){
+                Ext.fly(hd).removeClass('x-grid3-hd-menu-open');
+            }, this, {single:true});
+            this.hmenu.show(t, "tl-bl?");
+        }
+    },
+
+    // private
+    handleHdOver : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && !this.headersDisabled){
+            this.activeHd = hd;
+            this.activeHdIndex = this.getCellIndex(hd);
+            var fly = this.fly(hd);
+            this.activeHdRegion = fly.getRegion();
+            if(!this.cm.isMenuDisabled(this.activeHdIndex)){
+                fly.addClass("x-grid3-hd-over");
+                this.activeHdBtn = fly.child('.x-grid3-hd-btn');
+                if(this.activeHdBtn){
+                    this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
+                }
+            }
+        }
+    },
+
+    // private
+    handleHdMove : function(e, t){
+        if(this.activeHd && !this.headersDisabled){
+            var hw = this.splitHandleWidth || 5;
+            var r = this.activeHdRegion;
+            var x = e.getPageX();
+            var ss = this.activeHd.style;
+            if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported
+            }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize';
+            }else{
+                ss.cursor = '';
+            }
+        }
+    },
+
+    // private
+    handleHdOut : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && (!Ext.isIE || !e.within(hd, true))){
+            this.activeHd = null;
+            this.fly(hd).removeClass("x-grid3-hd-over");
+            hd.style.cursor = '';
+        }
+    },
+
+    // private
+    hasRows : function(){
+        var fc = this.mainBody.dom.firstChild;
+        return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty';
+    },
+
+    // back compat
+    bind : function(d, c){
+        this.initData(d, c);
+    }
+});
+
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridView.SplitDragZone = function(grid, hd){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.marker = this.view.resizeMarker;
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.scroll = false;
+    this.hw = this.view.splitHandleWidth || 5;
+};
+Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, {
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        var h = this.view.mainWrap.getHeight();
+        this.marker.setHeight(h);
+        this.marker.show();
+        this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]);
+        this.proxy.setHeight(h);
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var t = this.view.findHeaderCell(e.getTarget());
+        if(t){
+            var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1];
+            var exy = e.getXY(), ex = exy[0];
+            var w = t.offsetWidth, adjust = false;
+            if((ex - x) <= this.hw){
+                adjust = -1;
+            }else if((x+w) - ex <= this.hw){
+                adjust = 0;
+            }
+            if(adjust !== false){
+                this.cm = this.grid.colModel;
+                var ci = this.view.getCellIndex(t);
+                if(adjust == -1){
+                  if (ci + adjust < 0) {
+                    return;
+                  }
+                    while(this.cm.isHidden(ci+adjust)){
+                        --adjust;
+                        if(ci+adjust < 0){
+                            return;
+                        }
+                    }
+                }
+                this.cellIndex = ci+adjust;
+                this.split = t.dom;
+                if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                    Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+                }
+            }else if(this.view.columnDrag){
+                this.view.columnDrag.callHandleMouseDown(e);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.marker.hide();
+        var v = this.view;
+        var endX = Math.max(this.minX, e.getPageX());
+        var diff = endX - this.startPos;
+        v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd);
+    if(hd2){
+        this.setHandleElId(Ext.id(hd));
+        this.setOuterHandleElId(Ext.id(hd2));
+    }
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, {
+    maxDragWidth: 120,
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var h = this.view.findHeaderCell(t);
+        if(h){
+            return {ddel: h.firstChild, header:h};
+        }
+        return false;
+    },
+
+    onInitDrag : function(e){
+        this.view.headersDisabled = true;
+        var clone = this.dragData.ddel.cloneNode(true);
+        clone.id = Ext.id();
+        clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px";
+        this.proxy.update(clone);
+        return true;
+    },
+
+    afterValidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    afterInvalidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    }
+});
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDropZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    // split the proxies so they don't interfere with mouse events
+    this.proxyTop = Ext.DomHelper.append(document.body, {
+        cls:"col-move-top", html:"&#160;"
+    }, true);
+    this.proxyBottom = Ext.DomHelper.append(document.body, {
+        cls:"col-move-bottom", html:"&#160;"
+    }, true);
+    this.proxyTop.hide = this.proxyBottom.hide = function(){
+        this.setLeftTop(-100,-100);
+        this.setStyle("visibility", "hidden");
+    };
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    // temporarily disabled
+    //Ext.dd.ScrollManager.register(this.view.scroller.dom);
+    Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);
+};
+Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, {
+    proxyOffsets : [-4, -9],
+    fly: Ext.Element.fly,
+
+    getTargetFromEvent : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var cindex = this.view.findCellIndex(t);
+        if(cindex !== false){
+            return this.view.getHeaderCell(cindex);
+        }
+    },
+
+    nextVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.nextSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.nextSibling;
+        }
+        return null;
+    },
+
+    prevVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.prevSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.prevSibling;
+        }
+        return null;
+    },
+
+    positionIndicator : function(h, n, e){
+        var x = Ext.lib.Event.getPageX(e);
+        var r = Ext.lib.Dom.getRegion(n.firstChild);
+        var px, pt, py = r.top + this.proxyOffsets[1];
+        if((r.right - x) <= (r.right-r.left)/2){
+            px = r.right+this.view.borderWidth;
+            pt = "after";
+        }else{
+            px = r.left;
+            pt = "before";
+        }
+
+        if(this.grid.colModel.isFixed(this.view.getCellIndex(n))){
+            return false;
+        }
+
+        px +=  this.proxyOffsets[0];
+        this.proxyTop.setLeftTop(px, py);
+        this.proxyTop.show();
+        if(!this.bottomOffset){
+            this.bottomOffset = this.view.mainHd.getHeight();
+        }
+        this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset);
+        this.proxyBottom.show();
+        return pt;
+    },
+
+    onNodeEnter : function(n, dd, e, data){
+        if(data.header != n){
+            this.positionIndicator(data.header, n, e);
+        }
+    },
+
+    onNodeOver : function(n, dd, e, data){
+        var result = false;
+        if(data.header != n){
+            result = this.positionIndicator(data.header, n, e);
+        }
+        if(!result){
+            this.proxyTop.hide();
+            this.proxyBottom.hide();
+        }
+        return result ? this.dropAllowed : this.dropNotAllowed;
+    },
+
+    onNodeOut : function(n, dd, e, data){
+        this.proxyTop.hide();
+        this.proxyBottom.hide();
+    },
+
+    onNodeDrop : function(n, dd, e, data){
+        var h = data.header;
+        if(h != n){
+            var cm = this.grid.colModel;
+            var x = Ext.lib.Event.getPageX(e);
+            var r = Ext.lib.Dom.getRegion(n.firstChild);
+            var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before";
+            var oldIndex = this.view.getCellIndex(h);
+            var newIndex = this.view.getCellIndex(n);
+            if(pt == "after"){
+                newIndex++;
+            }
+            if(oldIndex < newIndex){
+                newIndex--;
+            }
+            cm.moveColumn(oldIndex, newIndex);
+            this.grid.fireEvent("columnmove", oldIndex, newIndex);
+            return true;
+        }
+        return false;
+    }
+});
+
+
+Ext.grid.GridView.ColumnDragZone = function(grid, hd){
+    Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);
+    this.proxy.el.addClass('x-grid3-col-dd');
+};
+
+Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, {
+    handleMouseDown : function(e){
+
+    },
+
+    callHandleMouseDown : function(e){
+        Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e);
+    }
+});// private
+// This is a support class used internally by the Grid components
+Ext.grid.SplitDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.setHandleElId(Ext.id(hd));
+    this.setOuterHandleElId(Ext.id(hd2));
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, {
+    fly: Ext.Element.fly,
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        this.proxy.setHeight(this.view.mainWrap.getHeight());
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var ev = Ext.EventObject.setEvent(e);
+        var t = this.fly(ev.getTarget());
+        if(t.hasClass("x-grid-split")){
+            this.cellIndex = this.view.getCellIndex(t.dom);
+            this.split = t.dom;
+            this.cm = this.grid.colModel;
+            if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.view.headersDisabled = false;
+        var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e));
+        var diff = endX - this.startPos;
+        this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});/**
+ * @class Ext.grid.GridDragZone
+ * @extends Ext.dd.DragZone
+ * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations of two of the
+ * template methods of DragZone to enable dragging of the selected rows of a GridPanel.</p>
+ * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's template method implementations of
+ * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+ * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}</p> are able
+ * to process the {@link #getDragData data} which is provided.
+ */
+Ext.grid.GridDragZone = function(grid, config){
+    this.view = grid.getView();
+    Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config);
+    this.scroll = false;
+    this.grid = grid;
+    this.ddel = document.createElement('div');
+    this.ddel.className = 'x-grid-dd-wrap';
+};
+
+Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
+    ddGroup : "GridDD",
+
+    /**
+     * <p>The provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.</p>
+     * <p>This data is available for processing in the {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} methods of a cooperating {@link Ext.dd.DropZone DropZone}.</p>
+     * <p>The data object contains the following properties:<ul>
+     * <li><b>grid</b> : Ext.Grid.GridPanel<div class="sub-desc">The GridPanel from which the data is being dragged.</div></li>
+     * <li><b>ddel</b> : htmlElement<div class="sub-desc">An htmlElement which provides the "picture" of the data being dragged.</div></li>
+     * <li><b>rowIndex</b> : Number<div class="sub-desc">The index of the row which receieved the mousedown gesture which triggered the drag.</div></li>
+     * <li><b>selections</b> : Array<div class="sub-desc">An Array of the selected Records which are being dragged from the GridPanel.</div></li>
+     * </ul></p>
+     */
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var rowIndex = this.view.findRowIndex(t);
+        if(rowIndex !== false){
+            var sm = this.grid.selModel;
+            if(!sm.isSelected(rowIndex) || e.hasModifier()){
+                sm.handleMouseDown(this.grid, rowIndex, e);
+            }
+            return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()};
+        }
+        return false;
+    },
+
+    /**
+     * <p>The provided implementation of the onInitDrag method. Sets the <tt>innerHTML</tt> of the drag proxy which provides the "picture"
+     * of the data being dragged.</p>
+     * <p>The <tt>innerHTML</tt> data is found by calling the owning GridPanel's {@link Ext.grid.GridPanel#getDragDropText getDragDropText}.</p>
+     */
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.ddel.innerHTML = this.grid.getDragDropText();
+        this.proxy.update(this.ddel);
+        // fire start drag?
+    },
+
+    /**
+     * An empty immplementation. Implement this to provide behaviour after a repair of an invalid drop. An implementation might highlight
+     * the selected rows to show that they have not been dragged.
+     */
+    afterRepair : function(){
+        this.dragging = false;
+    },
+
+    /**
+     * <p>An empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.</p>
+     * <p>Called before a repair of an invalid drop to get the XY to animate to.</p>
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e, data){
+        return false;
+    },
+
+    onEndDrag : function(data, e){
+        // fire end drag?
+    },
+
+    onValidDrop : function(dd, e, id){
+        // fire drag drop?
+        this.hideProxy();
+    },
+
+    beforeInvalidDrop : function(e, id){
+
+    }
+});
+/**
+ * @class Ext.grid.ColumnModel
+ * @extends Ext.util.Observable
+ * <p>After the data has been read into the client side cache (<b>{@link Ext.data.Store Store}</b>),
+ * the ColumnModel is used to configure how and what parts of that data will be displayed in the
+ * vertical slices (columns) of the grid. The Ext.grid.ColumnModel Class is the default implementation
+ * of a ColumnModel used by implentations of {@link Ext.grid.GridPanel GridPanel}.</p>
+ * <p>Data is mapped into the store's records and then indexed into the ColumnModel using the
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt>:</p>
+ * <pre><code>
+{data source} == mapping ==> {data store} == <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> ==> {ColumnModel}
+ * </code></pre>
+ * <p>Each {@link Ext.grid.Column Column} in the grid's ColumnModel is configured with a
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt> to specify how the data within
+ * each record in the store is indexed into the ColumnModel.</p>
+ * <p>There are two ways to initialize the ColumnModel class:</p>
+ * <p><u>Initialization Method 1: an Array</u></p>
+<pre><code>
+ var colModel = new Ext.grid.ColumnModel([
+    { header: "Ticker", width: 60, sortable: true},
+    { header: "Company Name", width: 150, sortable: true, id: 'company'},
+    { header: "Market Cap.", width: 100, sortable: true},
+    { header: "$ Sales", width: 100, sortable: true, renderer: money},
+    { header: "Employees", width: 100, sortable: true, resizable: false}
+ ]);
+ </code></pre>
+ * <p>The ColumnModel may be initialized with an Array of {@link Ext.grid.Column} column configuration
+ * objects to define the initial layout / display of the columns in the Grid. The order of each
+ * {@link Ext.grid.Column} column configuration object within the specified Array defines the initial
+ * order of the column display.  A Column's display may be initially hidden using the
+ * <tt>{@link Ext.grid.Column#hidden hidden}</tt></b> config property (and then shown using the column
+ * header menu).  Field's that are not included in the ColumnModel will not be displayable at all.</p>
+ * <p>How each column in the grid correlates (maps) to the {@link Ext.data.Record} field in the
+ * {@link Ext.data.Store Store} the column draws its data from is configured through the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b>.  If the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> is not explicitly defined (as shown in the
+ * example above) it will use the column configuration's index in the Array as the index.</p>
+ * <p>See <b><tt>{@link Ext.grid.Column}</tt></b> for additional configuration options for each column.</p>
+ * <p><u>Initialization Method 2: an Object</u></p>
+ * <p>In order to use configuration options from <tt>Ext.grid.ColumnModel</tt>, an Object may be used to
+ * initialize the ColumnModel.  The column configuration Array will be specified in the <tt><b>{@link #columns}</b></tt>
+ * config property. The <tt><b>{@link #defaults}</b></tt> config property can be used to apply defaults
+ * for all columns, e.g.:</p><pre><code>
+ var colModel = new Ext.grid.ColumnModel({
+    columns: [
+        { header: "Ticker", width: 60, menuDisabled: false},
+        { header: "Company Name", width: 150, id: 'company'},
+        { header: "Market Cap."},
+        { header: "$ Sales", renderer: money},
+        { header: "Employees", resizable: false}
+    ],
+    defaults: {
+        sortable: true,
+        menuDisabled: true,
+        width: 100
+    },
+    listeners: {
+        {@link #hiddenchange}: function(cm, colIndex, hidden) {
+            saveConfig(colIndex, hidden);
+        }
+    }
+});
+ </code></pre>
+ * <p>In both examples above, the ability to apply a CSS class to all cells in a column (including the
+ * header) is demonstrated through the use of the <b><tt>{@link Ext.grid.Column#id id}</tt></b> config
+ * option. This column could be styled by including the following css:</p><pre><code>
+ //add this css *after* the core css is loaded
+.x-grid3-td-company {
+    color: red; // entire column will have red font
+}
+// modify the header row only, adding an icon to the column header
+.x-grid3-hd-company {
+    background: transparent
+        url(../../resources/images/icons/silk/building.png)
+        no-repeat 3px 3px ! important;
+        padding-left:20px;
+}
+ </code></pre>
+ * Note that the "Company Name" column could be specified as the
+ * <b><tt>{@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></b>.
+ * @constructor
+ * @param {Mixed} config Specify either an Array of {@link Ext.grid.Column} configuration objects or specify
+ * a configuration Object (see introductory section discussion utilizing Initialization Method 2 above).
+ */
+Ext.grid.ColumnModel = function(config){
+    /**
+     * An Array of {@link Ext.grid.Column Column definition} objects representing the configuration
+     * of this ColumnModel.  See {@link Ext.grid.Column} for the configuration properties that may
+     * be specified.
+     * @property config
+     * @type Array
+     */
+    if(config.columns){
+        Ext.apply(this, config);
+        this.setConfig(config.columns, true);
+    }else{
+        this.setConfig(config, true);
+    }
+    this.addEvents(
+        /**
+         * @event widthchange
+         * Fires when the width of a column is programmaticially changed using
+         * <code>{@link #setColumnWidth}</code>.
+         * Note internal resizing suppresses the event from firing. See also
+         * {@link Ext.grid.GridPanel}.<code>{@link #columnresize}</code>.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Number} newWidth The new width
+         */
+        "widthchange",
+        /**
+         * @event headerchange
+         * Fires when the text of a header changes.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {String} newText The new header text
+         */
+        "headerchange",
+        /**
+         * @event hiddenchange
+         * Fires when a column is hidden or "unhidden".
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Boolean} hidden true if hidden, false otherwise
+         */
+        "hiddenchange",
+        /**
+         * @event columnmoved
+         * Fires when a column is moved.
+         * @param {ColumnModel} this
+         * @param {Number} oldIndex
+         * @param {Number} newIndex
+         */
+        "columnmoved",
+        /**
+         * @event configchange
+         * Fires when the configuration is changed
+         * @param {ColumnModel} this
+         */
+        "configchange"
+    );
+    Ext.grid.ColumnModel.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, {
+    /**
+     * @cfg {Number} defaultWidth (optional) The width of columns which have no <tt>{@link #width}</tt>
+     * specified (defaults to <tt>100</tt>).  This property shall preferably be configured through the
+     * <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultWidth: 100,
+    /**
+     * @cfg {Boolean} defaultSortable (optional) Default sortable of columns which have no
+     * sortable specified (defaults to <tt>false</tt>).  This property shall preferably be configured
+     * through the <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultSortable: false,
+    /**
+     * @cfg {Array} columns An Array of object literals.  The config options defined by
+     * <b>{@link Ext.grid.Column}</b> are the options which may appear in the object literal for each
+     * individual column definition.
+     */
+    /**
+     * @cfg {Object} defaults Object literal which will be used to apply {@link Ext.grid.Column}
+     * configuration options to all <tt><b>{@link #columns}</b></tt>.  Configuration options specified with
+     * individual {@link Ext.grid.Column column} configs will supersede these <tt><b>{@link #defaults}</b></tt>.
+     */
+
+    /**
+     * Returns the id of the column at the specified index.
+     * @param {Number} index The column index
+     * @return {String} the id
+     */
+    getColumnId : function(index){
+        return this.config[index].id;
+    },
+
+    getColumnAt : function(index){
+        return this.config[index];
+    },
+
+    /**
+     * <p>Reconfigures this column model according to the passed Array of column definition objects.
+     * For a description of the individual properties of a column definition object, see the
+     * <a href="#Ext.grid.ColumnModel-configs">Config Options</a>.</p>
+     * <p>Causes the {@link #configchange} event to be fired. A {@link Ext.grid.GridPanel GridPanel}
+     * using this ColumnModel will listen for this event and refresh its UI automatically.</p>
+     * @param {Array} config Array of Column definition objects.
+     * @param {Boolean} initial Specify <tt>true</tt> to bypass cleanup which deletes the <tt>totalWidth</tt>
+     * and destroys existing editors.
+     */
+    setConfig : function(config, initial){
+        var i, c, len;
+        if(!initial){ // cleanup
+            delete this.totalWidth;
+            for(i = 0, len = this.config.length; i < len; i++){
+                c = this.config[i];
+                if(c.editor){
+                    c.editor.destroy();
+                }
+            }
+        }
+
+        // backward compatibility
+        this.defaults = Ext.apply({
+            width: this.defaultWidth,
+            sortable: this.defaultSortable
+        }, this.defaults);
+
+        this.config = config;
+        this.lookup = {};
+        // if no id, create one
+        for(i = 0, len = config.length; i < len; i++){
+            c = Ext.applyIf(config[i], this.defaults);
+            if(!c.isColumn){
+                var cls = Ext.grid.Column.types[c.xtype || 'gridcolumn'];
+                c = new cls(c);
+                config[i] = c;
+            }
+            this.lookup[c.id] = c;
+        }
+        if(!initial){
+            this.fireEvent('configchange', this);
+        }
+    },
+
+    /**
+     * Returns the column for a specified id.
+     * @param {String} id The column id
+     * @return {Object} the column
+     */
+    getColumnById : function(id){
+        return this.lookup[id];
+    },
+
+    /**
+     * Returns the index for a specified column id.
+     * @param {String} id The column id
+     * @return {Number} the index, or -1 if not found
+     */
+    getIndexById : function(id){
+        for(var i = 0, len = this.config.length; i < len; i++){
+            if(this.config[i].id == id){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Moves a column from one position to another.
+     * @param {Number} oldIndex The index of the column to move.
+     * @param {Number} newIndex The position at which to reinsert the coolumn.
+     */
+    moveColumn : function(oldIndex, newIndex){
+        var c = this.config[oldIndex];
+        this.config.splice(oldIndex, 1);
+        this.config.splice(newIndex, 0, c);
+        this.dataMap = null;
+        this.fireEvent("columnmoved", this, oldIndex, newIndex);
+    },
+
+    /**
+     * Returns the number of columns.
+     * @param {Boolean} visibleOnly Optional. Pass as true to only include visible columns.
+     * @return {Number}
+     */
+    getColumnCount : function(visibleOnly){
+        if(visibleOnly === true){
+            var c = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(!this.isHidden(i)){
+                    c++;
+                }
+            }
+            return c;
+        }
+        return this.config.length;
+    },
+
+    /**
+     * Returns the column configs that return true by the passed function that is called
+     * with (columnConfig, index)
+<pre><code>
+// returns an array of column config objects for all hidden columns
+var columns = grid.getColumnModel().getColumnsBy(function(c){
+  return c.hidden;
+});
+</code></pre>
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Array} result
+     */
+    getColumnsBy : function(fn, scope){
+        var r = [];
+        for(var i = 0, len = this.config.length; i < len; i++){
+            var c = this.config[i];
+            if(fn.call(scope||this, c, i) === true){
+                r[r.length] = c;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Returns true if the specified column is sortable.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isSortable : function(col){
+        return this.config[col].sortable;
+    },
+
+    /**
+     * Returns true if the specified column menu is disabled.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isMenuDisabled : function(col){
+        return !!this.config[col].menuDisabled;
+    },
+
+    /**
+     * Returns the rendering (formatting) function defined for the column.
+     * @param {Number} col The column index.
+     * @return {Function} The function used to render the cell. See {@link #setRenderer}.
+     */
+    getRenderer : function(col){
+        if(!this.config[col].renderer){
+            return Ext.grid.ColumnModel.defaultRenderer;
+        }
+        return this.config[col].renderer;
+    },
+
+    /**
+     * Sets the rendering (formatting) function for a column.  See {@link Ext.util.Format} for some
+     * default formatting functions.
+     * @param {Number} col The column index
+     * @param {Function} fn The function to use to process the cell's raw data
+     * to return HTML markup for the grid view. The render function is called with
+     * the following parameters:<ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container element <i>within</i> the table cell
+     * (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record was extracted.</p></li></ul>
+     */
+    setRenderer : function(col, fn){
+        this.config[col].renderer = fn;
+    },
+
+    /**
+     * Returns the width for the specified column.
+     * @param {Number} col The column index
+     * @return {Number}
+     */
+    getColumnWidth : function(col){
+        return this.config[col].width;
+    },
+
+    /**
+     * Sets the width for a column.
+     * @param {Number} col The column index
+     * @param {Number} width The new width
+     * @param {Boolean} suppressEvent True to suppress firing the <code>{@link #widthchange}</code>
+     * event. Defaults to false.
+     */
+    setColumnWidth : function(col, width, suppressEvent){
+        this.config[col].width = width;
+        this.totalWidth = null;
+        if(!suppressEvent){
+             this.fireEvent("widthchange", this, col, width);
+        }
+    },
+
+    /**
+     * Returns the total width of all columns.
+     * @param {Boolean} includeHidden True to include hidden column widths
+     * @return {Number}
+     */
+    getTotalWidth : function(includeHidden){
+        if(!this.totalWidth){
+            this.totalWidth = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(includeHidden || !this.isHidden(i)){
+                    this.totalWidth += this.getColumnWidth(i);
+                }
+            }
+        }
+        return this.totalWidth;
+    },
+
+    /**
+     * Returns the header for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnHeader : function(col){
+        return this.config[col].header;
+    },
+
+    /**
+     * Sets the header for a column.
+     * @param {Number} col The column index
+     * @param {String} header The new header
+     */
+    setColumnHeader : function(col, header){
+        this.config[col].header = header;
+        this.fireEvent("headerchange", this, col, header);
+    },
+
+    /**
+     * Returns the tooltip for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnTooltip : function(col){
+            return this.config[col].tooltip;
+    },
+    /**
+     * Sets the tooltip for a column.
+     * @param {Number} col The column index
+     * @param {String} tooltip The new tooltip
+     */
+    setColumnTooltip : function(col, tooltip){
+            this.config[col].tooltip = tooltip;
+    },
+
+    /**
+     * Returns the dataIndex for the specified column.
+<pre><code>
+// Get field name for the column
+var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
+</code></pre>
+     * @param {Number} col The column index
+     * @return {String} The column's dataIndex
+     */
+    getDataIndex : function(col){
+        return this.config[col].dataIndex;
+    },
+
+    /**
+     * Sets the dataIndex for a column.
+     * @param {Number} col The column index
+     * @param {String} dataIndex The new dataIndex
+     */
+    setDataIndex : function(col, dataIndex){
+        this.config[col].dataIndex = dataIndex;
+    },
+
+    /**
+     * Finds the index of the first matching column for the given dataIndex.
+     * @param {String} col The dataIndex to find
+     * @return {Number} The column index, or -1 if no match was found
+     */
+    findColumnIndex : function(dataIndex){
+        var c = this.config;
+        for(var i = 0, len = c.length; i < len; i++){
+            if(c[i].dataIndex == dataIndex){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Returns true if the cell is editable.
+<pre><code>
+var store = new Ext.data.Store({...});
+var colModel = new Ext.grid.ColumnModel({
+  columns: [...],
+  isCellEditable: function(col, row) {
+    var record = store.getAt(row);
+    if (record.get('readonly')) { // replace with your condition
+      return false;
+    }
+    return Ext.grid.ColumnModel.prototype.isCellEditable.call(this, col, row);
+  }
+});
+var grid = new Ext.grid.GridPanel({
+  store: store,
+  colModel: colModel,
+  ...
+});
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Boolean}
+     */
+    isCellEditable : function(colIndex, rowIndex){
+        return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false;
+    },
+
+    /**
+     * Returns the editor defined for the cell/column.
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor} The {@link Ext.Editor Editor} that was created to wrap
+     * the {@link Ext.form.Field Field} used to edit the cell.
+     */
+    getCellEditor : function(colIndex, rowIndex){
+        return this.config[colIndex].getCellEditor(rowIndex);
+    },
+
+    /**
+     * Sets if a column is editable.
+     * @param {Number} col The column index
+     * @param {Boolean} editable True if the column is editable
+     */
+    setEditable : function(col, editable){
+        this.config[col].editable = editable;
+    },
+
+
+    /**
+     * Returns true if the column is hidden.
+     * @param {Number} colIndex The column index
+     * @return {Boolean}
+     */
+    isHidden : function(colIndex){
+        return this.config[colIndex].hidden;
+    },
+
+
+    /**
+     * Returns true if the column width cannot be changed
+     */
+    isFixed : function(colIndex){
+        return this.config[colIndex].fixed;
+    },
+
+    /**
+     * Returns true if the column can be resized
+     * @return {Boolean}
+     */
+    isResizable : function(colIndex){
+        return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true;
+    },
+    /**
+     * Sets if a column is hidden.
+<pre><code>
+myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Boolean} hidden True if the column is hidden
+     */
+    setHidden : function(colIndex, hidden){
+        var c = this.config[colIndex];
+        if(c.hidden !== hidden){
+            c.hidden = hidden;
+            this.totalWidth = null;
+            this.fireEvent("hiddenchange", this, colIndex, hidden);
+        }
+    },
+
+    /**
+     * Sets the editor for a column and destroys the prior editor.
+     * @param {Number} col The column index
+     * @param {Object} editor The editor object
+     */
+    setEditor : function(col, editor){
+        Ext.destroy(this.config[col].editor);
+        this.config[col].editor = editor;
+    },
+
+    /**
+     * Destroys this column model by purging any event listeners, and removing any editors.
+     */
+    destroy : function(){
+        for(var i = 0, c = this.config, len = c.length; i < len; i++){
+            Ext.destroy(c[i].editor);
+        }
+        this.purgeListeners();
+    }
+});
+
+// private
+Ext.grid.ColumnModel.defaultRenderer = function(value){
+    if(typeof value == "string" && value.length < 1){
+        return "&#160;";
+    }
+    return value;
+};/**
+ * @class Ext.grid.AbstractSelectionModel
+ * @extends Ext.util.Observable
+ * Abstract base class for grid SelectionModels.  It provides the interface that should be
+ * implemented by descendant classes.  This class should not be directly instantiated.
+ * @constructor
+ */
+Ext.grid.AbstractSelectionModel = function(){
+    this.locked = false;
+    Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable,  {
+    /**
+     * The GridPanel for which this SelectionModel is handling selection. Read-only.
+     * @type Object
+     * @property grid
+     */
+
+    /** @ignore Called by the grid automatically. Do not call directly. */
+    init : function(grid){
+        this.grid = grid;
+        this.initEvents();
+    },
+
+    /**
+     * Locks the selections.
+     */
+    lock : function(){
+        this.locked = true;
+    },
+
+    /**
+     * Unlocks the selections.
+     */
+    unlock : function(){
+        this.locked = false;
+    },
+
+    /**
+     * Returns true if the selections are locked.
+     * @return {Boolean}
+     */
+    isLocked : function(){
+        return this.locked;
+    },
+    
+    destroy: function(){
+        this.purgeListeners();
+    }
+});/**
+ * @class Ext.grid.RowSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * The default SelectionModel used by {@link Ext.grid.GridPanel}.
+ * It supports multiple selections and keyboard selection/navigation. The objects stored
+ * as selections and returned by {@link #getSelected}, and {@link #getSelections} are
+ * the {@link Ext.data.Record Record}s which provide the data for the selected rows.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.RowSelectionModel = function(config){
+    Ext.apply(this, config);
+    this.selections = new Ext.util.MixedCollection(false, function(o){
+        return o.id;
+    });
+
+    this.last = false;
+    this.lastActive = false;
+
+    this.addEvents(
+        /**
+         * @event selectionchange
+         * Fires when the selection changes
+         * @param {SelectionModel} this
+         */
+        "selectionchange",
+        /**
+         * @event beforerowselect
+         * Fires before a row is selected, return false to cancel the selection.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The index to be selected
+         * @param {Boolean} keepExisting False if other selections will be cleared
+         * @param {Record} record The record to be selected
+         */
+        "beforerowselect",
+        /**
+         * @event rowselect
+         * Fires when a row is selected.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The selected index
+         * @param {Ext.data.Record} r The selected record
+         */
+        "rowselect",
+        /**
+         * @event rowdeselect
+         * Fires when a row is deselected.  To prevent deselection
+         * {@link Ext.grid.AbstractSelectionModel#lock lock the selections}. 
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex
+         * @param {Record} record
+         */
+        "rowdeselect"
+    );
+
+    Ext.grid.RowSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel,  {
+    /**
+     * @cfg {Boolean} singleSelect
+     * <tt>true</tt> to allow selection of only one row at a time (defaults to <tt>false</tt>
+     * allowing multiple selections)
+     */
+    singleSelect : false,
+
+    /**
+     * @cfg {Boolean} moveEditorOnEnter
+     * <tt>false</tt> to turn off moving the editor to the next row down when the enter key is pressed
+     * or the next row up when shift + enter keys are pressed.
+     */
+    // private
+    initEvents : function(){
+
+        if(!this.grid.enableDragDrop && !this.grid.enableDrag){
+            this.grid.on("rowmousedown", this.handleMouseDown, this);
+        }else{ // allow click to work like normal
+            this.grid.on("rowclick", function(grid, rowIndex, e) {
+                if(e.button === 0 && !e.shiftKey && !e.ctrlKey) {
+                    this.selectRow(rowIndex, false);
+                    grid.view.focusRow(rowIndex);
+                }
+            }, this);
+        }
+
+        this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), {
+            "up" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectPrevious(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive-1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            "down" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectNext(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive+1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            scope: this
+        });
+
+        var view = this.grid.view;
+        view.on("refresh", this.onRefresh, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("rowremoved", this.onRemove, this);
+    },
+
+    // private
+    onRefresh : function(){
+        var ds = this.grid.store, index;
+        var s = this.getSelections();
+        this.clearSelections(true);
+        for(var i = 0, len = s.length; i < len; i++){
+            var r = s[i];
+            if((index = ds.indexOfId(r.id)) != -1){
+                this.selectRow(index, true);
+            }
+        }
+        if(s.length != this.selections.getCount()){
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    onRemove : function(v, index, r){
+        if(this.selections.remove(r) !== false){
+            this.fireEvent('selectionchange', this);
+        }
+    },
+
+    // private
+    onRowUpdated : function(v, index, r){
+        if(this.isSelected(r)){
+            v.onRowSelect(index);
+        }
+    },
+
+    /**
+     * Select records.
+     * @param {Array} records The records to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectRecords : function(records, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        var ds = this.grid.store;
+        for(var i = 0, len = records.length; i < len; i++){
+            this.selectRow(ds.indexOf(records[i]), true);
+        }
+    },
+
+    /**
+     * Gets the number of selected rows.
+     * @return {Number}
+     */
+    getCount : function(){
+        return this.selections.length;
+    },
+
+    /**
+     * Selects the first row in the grid.
+     */
+    selectFirstRow : function(){
+        this.selectRow(0);
+    },
+
+    /**
+     * Select the last row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectLastRow : function(keepExisting){
+        this.selectRow(this.grid.store.getCount() - 1, keepExisting);
+    },
+
+    /**
+     * Selects the row immediately following the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a next row, else <tt>false</tt>
+     */
+    selectNext : function(keepExisting){
+        if(this.hasNext()){
+            this.selectRow(this.last+1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Selects the row that precedes the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a previous row, else <tt>false</tt>
+     */
+    selectPrevious : function(keepExisting){
+        if(this.hasPrevious()){
+            this.selectRow(this.last-1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Returns true if there is a next record to select
+     * @return {Boolean}
+     */
+    hasNext : function(){
+        return this.last !== false && (this.last+1) < this.grid.store.getCount();
+    },
+
+    /**
+     * Returns true if there is a previous record to select
+     * @return {Boolean}
+     */
+    hasPrevious : function(){
+        return !!this.last;
+    },
+
+
+    /**
+     * Returns the selected records
+     * @return {Array} Array of selected records
+     */
+    getSelections : function(){
+        return [].concat(this.selections.items);
+    },
+
+    /**
+     * Returns the first selected record.
+     * @return {Record}
+     */
+    getSelected : function(){
+        return this.selections.itemAt(0);
+    },
+
+    /**
+     * Calls the passed function with each selection. If the function returns
+     * <tt>false</tt>, iteration is stopped and this function returns
+     * <tt>false</tt>. Otherwise it returns <tt>true</tt>.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Boolean} true if all selections were iterated
+     */
+    each : function(fn, scope){
+        var s = this.getSelections();
+        for(var i = 0, len = s.length; i < len; i++){
+            if(fn.call(scope || this, s[i], i) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Clears all selections if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * @param {Boolean} fast (optional) <tt>true</tt> to bypass the
+     * conditional checks and events described in {@link #deselectRow}.
+     */
+    clearSelections : function(fast){
+        if(this.isLocked()){
+            return;
+        }
+        if(fast !== true){
+            var ds = this.grid.store;
+            var s = this.selections;
+            s.each(function(r){
+                this.deselectRow(ds.indexOfId(r.id));
+            }, this);
+            s.clear();
+        }else{
+            this.selections.clear();
+        }
+        this.last = false;
+    },
+
+
+    /**
+     * Selects all rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. 
+     */
+    selectAll : function(){
+        if(this.isLocked()){
+            return;
+        }
+        this.selections.clear();
+        for(var i = 0, len = this.grid.store.getCount(); i < len; i++){
+            this.selectRow(i, true);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selections.length > 0;
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified row is selected.
+     * @param {Number/Record} index The record or index of the record to check
+     * @return {Boolean}
+     */
+    isSelected : function(index){
+        var r = typeof index == "number" ? this.grid.store.getAt(index) : index;
+        return (r && this.selections.key(r.id) ? true : false);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified record id is selected.
+     * @param {String} id The id of record to check
+     * @return {Boolean}
+     */
+    isIdSelected : function(id){
+        return (this.selections.key(id) ? true : false);
+    },
+
+    // private
+    handleMouseDown : function(g, rowIndex, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        var view = this.grid.getView();
+        if(e.shiftKey && !this.singleSelect && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, rowIndex, e.ctrlKey);
+            this.last = last; // reset the last
+            view.focusRow(rowIndex);
+        }else{
+            var isSelected = this.isSelected(rowIndex);
+            if(e.ctrlKey && isSelected){
+                this.deselectRow(rowIndex);
+            }else if(!isSelected || this.getCount() > 1){
+                this.selectRow(rowIndex, e.ctrlKey || e.shiftKey);
+                view.focusRow(rowIndex);
+            }
+        }
+    },
+
+    /**
+     * Selects multiple rows.
+     * @param {Array} rows Array of the indexes of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep
+     * existing selections (defaults to <tt>false</tt>)
+     */
+    selectRows : function(rows, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        for(var i = 0, len = rows.length; i < len; i++){
+            this.selectRow(rows[i], true);
+        }
+    },
+
+    /**
+     * Selects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * All rows in between startRow and endRow are also selected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(startRow, endRow, keepExisting){
+        var i;
+        if(this.isLocked()){
+            return;
+        }
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        if(startRow <= endRow){
+            for(i = startRow; i <= endRow; i++){
+                this.selectRow(i, true);
+            }
+        }else{
+            for(i = startRow; i >= endRow; i--){
+                this.selectRow(i, true);
+            }
+        }
+    },
+
+    /**
+     * Deselects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.  
+     * All rows in between startRow and endRow are also deselected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     */
+    deselectRange : function(startRow, endRow, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        for(var i = startRow; i <= endRow; i++){
+            this.deselectRow(i, preventViewNotify);
+        }
+    },
+
+    /**
+     * Selects a row.  Before selecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked} and fires the
+     * {@link #beforerowselect} event.  If these checks are satisfied the row
+     * will be selected and followed up by  firing the {@link #rowselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} row The index of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    selectRow : function(index, keepExisting, preventViewNotify){
+        if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){
+            return;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){
+            if(!keepExisting || this.singleSelect){
+                this.clearSelections();
+            }
+            this.selections.add(r);
+            this.last = this.lastActive = index;
+            if(!preventViewNotify){
+                this.grid.getView().onRowSelect(index);
+            }
+            this.fireEvent("rowselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    /**
+     * Deselects a row.  Before deselecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked}.
+     * If this check is satisfied the row will be deselected and followed up by
+     * firing the {@link #rowdeselect} and {@link #selectionchange} events.
+     * @param {Number} row The index of the row to deselect
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    deselectRow : function(index, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        if(this.last == index){
+            this.last = false;
+        }
+        if(this.lastActive == index){
+            this.lastActive = false;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r){
+            this.selections.remove(r);
+            if(!preventViewNotify){
+                this.grid.getView().onRowDeselect(index);
+            }
+            this.fireEvent("rowdeselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    restoreLast : function(){
+        if(this._last){
+            this.last = this._last;
+        }
+    },
+
+    // private
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    // private
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        var shift = e.shiftKey;
+        if(k == e.TAB){
+            e.stopEvent();
+            ed.completeEdit();
+            if(shift){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+        }else if(k == e.ENTER){
+            e.stopEvent();
+            ed.completeEdit();
+            if(this.moveEditorOnEnter !== false){
+                if(shift){
+                    newCell = g.walkCells(ed.row - 1, ed.col, -1, this.acceptsNav, this);
+                }else{
+                    newCell = g.walkCells(ed.row + 1, ed.col, 1, this.acceptsNav, this);
+                }
+            }
+        }else if(k == e.ESC){
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    },
+    
+    destroy: function(){
+        if(this.rowNav){
+            this.rowNav.disable();
+            this.rowNav = null;
+        }
+        Ext.grid.RowSelectionModel.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.grid.Column
+ * <p>This class encapsulates column configuration data to be used in the initialization of a
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>While subclasses are provided to render data in different ways, this class renders a passed
+ * data field unchanged and is usually used for textual columns.</p>
+ */
+Ext.grid.Column = function(config){
+    Ext.apply(this, config);
+
+    if(typeof this.renderer == 'string'){
+        this.renderer = Ext.util.Format[this.renderer];
+    } else if(Ext.isObject(this.renderer)){
+        this.scope = this.renderer.scope;
+        this.renderer = this.renderer.fn;
+    }
+    this.renderer = this.renderer.createDelegate(this.scope || config);
+
+    if(this.id === undefined){
+        this.id = ++Ext.grid.Column.AUTO_ID;
+    }
+    if(this.editor){
+        this.editor = Ext.create(this.editor, 'textfield');
+    }
+};
+
+Ext.grid.Column.AUTO_ID = 0;
+
+Ext.grid.Column.prototype = {
+    /**
+     * @cfg {Boolean} editable Optional. Defaults to <tt>true</tt>, enabling the configured
+     * <tt>{@link #editor}</tt>.  Set to <tt>false</tt> to initially disable editing on this column.
+     * The initial configuration may be dynamically altered using
+     * {@link Ext.grid.ColumnModel}.{@link Ext.grid.ColumnModel#setEditable setEditable()}.
+     */
+    /**
+     * @cfg {String} id Optional. A name which identifies this column (defaults to the column's initial
+     * ordinal position.) The <tt>id</tt> is used to create a CSS <b>class</b> name which is applied to all
+     * table cells (including headers) in that column (in this context the <tt>id</tt> does not need to be
+     * unique). The class name takes the form of <pre>x-grid3-td-<b>id</b></pre>
+     * Header cells will also receive this class name, but will also have the class <pre>x-grid3-hd</pre>
+     * So, to target header cells, use CSS selectors such as:<pre>.x-grid3-hd-row .x-grid3-td-<b>id</b></pre>
+     * The {@link Ext.grid.GridPanel#autoExpandColumn} grid config option references the column via this
+     * unique identifier.
+     */
+    /**
+     * @cfg {String} header Optional. The header text to be used as innerHTML
+     * (html tags are accepted) to display in the Grid view.  <b>Note</b>: to
+     * have a clickable header with no text displayed use <tt>'&#160;'</tt>.
+     */
+    /**
+     * @cfg {Boolean} groupable Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to disable the header menu item to group by the column selected. Defaults to <tt>true</tt>,
+     * which enables the header menu group option.  Set to <tt>false</tt> to disable (but still show) the
+     * group option in the header menu for the column. See also <code>{@link #groupName}</code>.
+     */
+    /**
+     * @cfg {String} groupName Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text with which to prefix the group field value in the group header line.
+     * See also {@link #groupRenderer} and
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#showGroupName showGroupName}.
+     */
+    /**
+     * @cfg {Function} groupRenderer <p>Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the function used to format the grouping field value for display in the group
+     * {@link #groupName header}.  If a <tt><b>groupRenderer</b></tt> is not specified, the configured
+     * <tt><b>{@link #renderer}</b></tt> will be called; if a <tt><b>{@link #renderer}</b></tt> is also not specified
+     * the new value of the group field will be used.</p>
+     * <p>The called function (either the <tt><b>groupRenderer</b></tt> or <tt><b>{@link #renderer}</b></tt>) will be
+     * passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>v</b> : Object<p class="sub-desc">The new value of the group field.</p></li>
+     * <li><b>unused</b> : undefined<p class="sub-desc">Unused parameter.</p></li>
+     * <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">The column index of the group field.</p></li>
+     * <li><b>ds</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
+     * </ul></div></p>
+     * <p>The function should return a string value.</p>
+     */
+    /**
+     * @cfg {String} emptyGroupText Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text to display when there is an empty group value. Defaults to the
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#emptyGroupText emptyGroupText}.
+     */
+    /**
+     * @cfg {String} dataIndex <p><b>Required</b>. The name of the field in the
+     * grid's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from
+     * which to draw the column's value.</p>
+     */
+    /**
+     * @cfg {Number} width
+     * Optional. The initial width in pixels of the column.
+     * The width of each column can also be affected if any of the following are configured:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#forceFit forceFit}</tt>
+     * <div class="sub-desc">
+     * <p>By specifying <tt>forceFit:true</tt>, {@link #fixed non-fixed width} columns will be
+     * re-proportioned (based on the relative initial widths) to fill the width of the grid so
+     * that no horizontal scrollbar is shown.</p>
+     * </div></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#autoFill autoFill}</tt></li>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#minColumnWidth minColumnWidth}</tt></li>
+     * <br><p><b>Note</b>: when the width of each column is determined, a space on the right side
+     * is reserved for the vertical scrollbar.  The
+     * {@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#scrollOffset scrollOffset}</tt>
+     * can be modified to reduce or eliminate the reserved offset.</p>
+     */
+    /**
+     * @cfg {Boolean} sortable Optional. <tt>true</tt> if sorting is to be allowed on this column.
+     * Defaults to the value of the {@link #defaultSortable} property.
+     * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}.
+     */
+    /**
+     * @cfg {Boolean} fixed Optional. <tt>true</tt> if the column width cannot be changed.  Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} resizable Optional. <tt>false</tt> to disable column resizing. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} menuDisabled Optional. <tt>true</tt> to disable the column menu. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} hidden Optional. <tt>true</tt> to hide the column. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip.  If Quicktips
+     * are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the
+     * header's HTML title attribute. Defaults to ''.
+     */
+    /**
+     * @cfg {Mixed} renderer
+     * <p>For an alternative to specifying a renderer see <code>{@link #xtype}</code></p>
+     * <p>Optional. A renderer is an 'interceptor' method which can be used transform data (value,
+     * appearance, etc.) before it is rendered). This may be specified in either of three ways:
+     * <div class="mdetail-params"><ul>
+     * <li>A renderer function used to return HTML markup for a cell given the cell's data value.</li>
+     * <li>A string which references a property name of the {@link Ext.util.Format} class which
+     * provides a renderer function.</li>
+     * <li>An object specifying both the renderer function, and its execution scope (<tt><b>this</b></tt>
+     * reference) e.g.:<pre style="margin-left:1.2em"><code>
+{
+    fn: this.gridRenderer,
+    scope: this
+}
+</code></pre></li></ul></div>
+     * If not specified, the default renderer uses the raw data value.</p>
+     * <p>For information about the renderer function (passed parameters, etc.), see
+     * {@link Ext.grid.ColumnModel#setRenderer}. An example of specifying renderer function inline:</p><pre><code>
+var companyColumn = {
+   header: 'Company Name',
+   dataIndex: 'company',
+   renderer: function(value, metaData, record, rowIndex, colIndex, store) {
+      // provide the logic depending on business rules
+      // name of your own choosing to manipulate the cell depending upon
+      // the data in the underlying Record object.
+      if (value == 'whatever') {
+          //metaData.css : String : A CSS class name to add to the TD element of the cell.
+          //metaData.attr : String : An html attribute definition string to apply to
+          //                         the data container element within the table
+          //                         cell (e.g. 'style="color:red;"').
+          metaData.css = 'name-of-css-class-you-will-define';
+      }
+      return value;
+   }
+}
+     * </code></pre>
+     * See also {@link #scope}.
+     */
+    /**
+     * @cfg {String} xtype Optional. A String which references a predefined {@link Ext.grid.Column} subclass
+     * type which is preconfigured with an appropriate <code>{@link #renderer}</code> to be easily
+     * configured into a ColumnModel. The predefined {@link Ext.grid.Column} subclass types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>gridcolumn</tt></b> : {@link Ext.grid.Column} (<b>Default</b>)<p class="sub-desc"></p></li>
+     * <li><b><tt>booleancolumn</tt></b> : {@link Ext.grid.BooleanColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>numbercolumn</tt></b> : {@link Ext.grid.NumberColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>datecolumn</tt></b> : {@link Ext.grid.DateColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>templatecolumn</tt></b> : {@link Ext.grid.TemplateColumn}<p class="sub-desc"></p></li>
+     * </ul></div>
+     * <p>Configuration properties for the specified <code>xtype</code> may be specified with
+     * the Column configuration properties, for example:</p>
+     * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    columns: [{
+        header: 'Last Updated',
+        dataIndex: 'lastChange',
+        width: 85,
+        sortable: true,
+        //renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+        xtype: 'datecolumn', // use xtype instead of renderer
+        format: 'M/d/Y' // configuration property for {@link Ext.grid.DateColumn}
+    }, {
+        ...
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} scope Optional. The scope (<tt><b>this</b></tt> reference) in which to execute the
+     * renderer.  Defaults to the Column configuration object.
+     */
+    /**
+     * @cfg {String} align Optional. Set the CSS text-align property of the column.  Defaults to undefined.
+     */
+    /**
+     * @cfg {String} css Optional. An inline style definition string which is applied to all table cells in the column
+     * (excluding headers). Defaults to undefined.
+     */
+    /**
+     * @cfg {Boolean} hideable Optional. Specify as <tt>false</tt> to prevent the user from hiding this column
+     * (defaults to true).  To disallow column hiding globally for all columns in the grid, use
+     * {@link Ext.grid.GridPanel#enableColumnHide} instead.
+     */
+    /**
+     * @cfg {Ext.form.Field} editor Optional. The {@link Ext.form.Field} to use when editing values in this column
+     * if editing is supported by the grid. See <tt>{@link #editable}</tt> also.
+     */
+
+    // private. Used by ColumnModel to avoid reprocessing
+    isColumn : true,
+    /**
+     * Optional. A function which returns displayable data when passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container
+     * element <i>within</i> the table cell (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was
+     * extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record
+     * was extracted.</p></li>
+     * </ul></div>
+     * @property renderer
+     * @type Function
+     */
+    renderer : function(value){
+        if(typeof value == 'string' && value.length < 1){
+            return '&#160;';
+        }
+        return value;
+    },
+
+    // private
+    getEditor: function(rowIndex){
+        return this.editable !== false ? this.editor : null;
+    },
+
+    /**
+     * Returns the {@link Ext.Editor editor} defined for this column that was created to wrap the {@link Ext.form.Field Field}
+     * used to edit the cell.
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor}
+     */
+    getCellEditor: function(rowIndex){
+        var editor = this.getEditor(rowIndex);
+        if(editor){
+            if(!editor.startEdit){
+                if(!editor.gridEditor){
+                    editor.gridEditor = new Ext.grid.GridEditor(editor);
+                }
+                return editor.gridEditor;
+            }else if(editor.startEdit){
+                return editor;
+            }
+        }
+        return null;
+    }
+};
+
+/**
+ * @class Ext.grid.BooleanColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders boolean data fields.  See the {@link Ext.grid.ColumnModel#xtype xtype}
+ * config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} trueText
+     * The string returned by the renderer when the column value is not falsey (defaults to <tt>'true'</tt>).
+     */
+    trueText: 'true',
+    /**
+     * @cfg {String} falseText
+     * The string returned by the renderer when the column value is falsey (but not undefined) (defaults to
+     * <tt>'false'</tt>).
+     */
+    falseText: 'false',
+    /**
+     * @cfg {String} undefinedText
+     * The string returned by the renderer when the column value is undefined (defaults to <tt>'&#160;'</tt>).
+     */
+    undefinedText: '&#160;',
+
+    constructor: function(cfg){
+        Ext.grid.BooleanColumn.superclass.constructor.call(this, cfg);
+        var t = this.trueText, f = this.falseText, u = this.undefinedText;
+        this.renderer = function(v){
+            if(v === undefined){
+                return u;
+            }
+            if(!v || v === 'false'){
+                return f;
+            }
+            return t;
+        };
+    }
+});
+
+/**
+ * @class Ext.grid.NumberColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a numeric data field according to a {@link #format} string.  See the
+ * {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column
+     * (defaults to <tt>'0,000.00'</tt>).
+     */
+    format : '0,000.00',
+    constructor: function(cfg){
+        Ext.grid.NumberColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.numberRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.DateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a passed date according to the default locale, or a configured
+ * {@link #format}. See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel}
+ * for more details.</p>
+ */
+Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Date#format} to format a Date for this Column
+     * (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : 'm/d/Y',
+    constructor: function(cfg){
+        Ext.grid.DateColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.dateRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.TemplateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a value by processing a {@link Ext.data.Record Record}'s
+ * {@link Ext.data.Record#data data} using a {@link #tpl configured} {@link Ext.XTemplate XTemplate}.
+ * See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more
+ * details.</p>
+ */
+Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String/XTemplate} tpl
+     * An {@link Ext.XTemplate XTemplate}, or an XTemplate <i>definition string</i> to use to process a
+     * {@link Ext.data.Record Record}'s {@link Ext.data.Record#data data} to produce a column's rendered value.
+     */
+    constructor: function(cfg){
+        Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);
+        var tpl = typeof Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);
+        this.renderer = function(value, p, r){
+            return tpl.apply(r.data);
+        };
+        this.tpl = tpl;
+    }
+});
+
+/*
+ * @property types
+ * @type Object
+ * @member Ext.grid.Column
+ * @static
+ * <p>An object containing predefined Column classes keyed by a mnemonic code which may be referenced
+ * by the {@link Ext.grid.ColumnModel#xtype xtype} config option of ColumnModel.</p>
+ * <p>This contains the following properties</p><div class="mdesc-details"><ul>
+ * <li>gridcolumn : <b>{@link Ext.grid.Column Column constructor}</b></li>
+ * <li>booleancolumn : <b>{@link Ext.grid.BooleanColumn BooleanColumn constructor}</b></li>
+ * <li>numbercolumn : <b>{@link Ext.grid.NumberColumn NumberColumn constructor}</b></li>
+ * <li>datecolumn : <b>{@link Ext.grid.DateColumn DateColumn constructor}</b></li>
+ * <li>templatecolumn : <b>{@link Ext.grid.TemplateColumn TemplateColumn constructor}</b></li>
+ * </ul></div>
+ */
+Ext.grid.Column.types = {
+    gridcolumn : Ext.grid.Column,
+    booleancolumn: Ext.grid.BooleanColumn,
+    numbercolumn: Ext.grid.NumberColumn,
+    datecolumn: Ext.grid.DateColumn,
+    templatecolumn: Ext.grid.TemplateColumn
+};/**
+ * @class Ext.grid.RowNumberer
+ * This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides
+ * an automatic row numbering column.
+ * <br>Usage:<br>
+ <pre><code>
+ // This is a typical column config with the first column providing row numbers
+ var colModel = new Ext.grid.ColumnModel([
+    new Ext.grid.RowNumberer(),
+    {header: "Name", width: 80, sortable: true},
+    {header: "Code", width: 50, sortable: true},
+    {header: "Description", width: 200, sortable: true}
+ ]);
+ </code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.RowNumberer = function(config){
+    Ext.apply(this, config);
+    if(this.rowspan){
+        this.renderer = this.renderer.createDelegate(this);
+    }
+};
+
+Ext.grid.RowNumberer.prototype = {
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row
+     * number column (defaults to '').
+     */
+    header: "",
+    /**
+     * @cfg {Number} width The default width in pixels of the row number column (defaults to 23).
+     */
+    width: 23,
+    /**
+     * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false).
+     * @hide
+     */
+    sortable: false,
+
+    // private
+    fixed:true,
+    menuDisabled:true,
+    dataIndex: '',
+    id: 'numberer',
+    rowspan: undefined,
+
+    // private
+    renderer : function(v, p, record, rowIndex){
+        if(this.rowspan){
+            p.cellAttr = 'rowspan="'+this.rowspan+'"';
+        }
+        return rowIndex+1;
+    }
+};/**
+ * @class Ext.grid.CheckboxSelectionModel
+ * @extends Ext.grid.RowSelectionModel
+ * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows.
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
+
+    /**
+     * @cfg {Boolean} checkOnly <tt>true</tt> if rows can only be selected by clicking on the
+     * checkbox column (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the
+     * checkbox column.  Defaults to:<pre><code>
+     * '&lt;div class="x-grid3-hd-checker">&#38;#160;&lt;/div>'</tt>
+     * </code></pre>
+     * The default CSS class of <tt>'x-grid3-hd-checker'</tt> displays a checkbox in the header
+     * and provides support for automatic check all/none behavior on header click. This string
+     * can be replaced by any valid HTML fragment, including a simple text string (e.g.,
+     * <tt>'Select Rows'</tt>), but the automatic check all/none behavior will only work if the
+     * <tt>'x-grid3-hd-checker'</tt> class is supplied.
+     */
+    header: '<div class="x-grid3-hd-checker">&#160;</div>',
+    /**
+     * @cfg {Number} width The default width in pixels of the checkbox column (defaults to <tt>20</tt>).
+     */
+    width: 20,
+    /**
+     * @cfg {Boolean} sortable <tt>true</tt> if the checkbox column is sortable (defaults to
+     * <tt>false</tt>).
+     */
+    sortable: false,
+
+    // private
+    menuDisabled:true,
+    fixed:true,
+    dataIndex: '',
+    id: 'checker',
+
+    constructor: function(){
+        Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments);
+
+        if(this.checkOnly){
+            this.handleMouseDown = Ext.emptyFn;
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
+        this.grid.on('render', function(){
+            var view = this.grid.getView();
+            view.mainBody.on('mousedown', this.onMouseDown, this);
+            Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this);
+
+        }, this);
+    },
+
+    // private
+    onMouseDown : function(e, t){
+        if(e.button === 0 && t.className == 'x-grid3-row-checker'){ // Only fire if left-click
+            e.stopEvent();
+            var row = e.getTarget('.x-grid3-row');
+            if(row){
+                var index = row.rowIndex;
+                if(this.isSelected(index)){
+                    this.deselectRow(index);
+                }else{
+                    this.selectRow(index, true);
+                }
+            }
+        }
+    },
+
+    // private
+    onHdMouseDown : function(e, t){
+        if(t.className == 'x-grid3-hd-checker'){
+            e.stopEvent();
+            var hd = Ext.fly(t.parentNode);
+            var isChecked = hd.hasClass('x-grid3-hd-checker-on');
+            if(isChecked){
+                hd.removeClass('x-grid3-hd-checker-on');
+                this.clearSelections();
+            }else{
+                hd.addClass('x-grid3-hd-checker-on');
+                this.selectAll();
+            }
+        }
+    },
+
+    // private
+    renderer : function(v, p, record){
+        return '<div class="x-grid3-row-checker">&#160;</div>';
+    }
+});/**
+ * @class Ext.grid.CellSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * This class provides the basic implementation for <i>single</i> <b>cell</b> selection in a grid.
+ * The object stored as the selection contains the following properties:
+ * <div class="mdetail-params"><ul>
+ * <li><b>cell</b> : see {@link #getSelectedCell} 
+ * <li><b>record</b> : Ext.data.record The {@link Ext.data.Record Record}
+ * which provides the data for the row containing the selection</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The object containing the configuration of this model.
+ */
+Ext.grid.CellSelectionModel = function(config){
+    Ext.apply(this, config);
+
+    this.selection = null;
+
+    this.addEvents(
+        /**
+	     * @event beforecellselect
+	     * Fires before a cell is selected, return false to cancel the selection.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "beforecellselect",
+        /**
+	     * @event cellselect
+	     * Fires when a cell is selected.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "cellselect",
+        /**
+	     * @event selectionchange
+	     * Fires when the active selection changes.
+	     * @param {SelectionModel} this
+	     * @param {Object} selection null for no selection or an object with two properties
+         * <div class="mdetail-params"><ul>
+         * <li><b>cell</b> : see {@link #getSelectedCell} 
+         * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record Record}
+         * which provides the data for the row containing the selection</p></li>
+         * </ul></div>
+	     */
+	    "selectionchange"
+    );
+
+    Ext.grid.CellSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel,  {
+
+    /** @ignore */
+    initEvents : function(){
+        this.grid.on("cellmousedown", this.handleMouseDown, this);
+        this.grid.getGridEl().on(Ext.EventManager.useKeydown ? "keydown" : "keypress", this.handleKeyDown, this);
+        var view = this.grid.view;
+        view.on("refresh", this.onViewChange, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("beforerowremoved", this.clearSelections, this);
+        view.on("beforerowsinserted", this.clearSelections, this);
+        if(this.grid.isEditor){
+            this.grid.on("beforeedit", this.beforeEdit,  this);
+        }
+    },
+
+	//private
+    beforeEdit : function(e){
+        this.select(e.row, e.column, false, true, e.record);
+    },
+
+	//private
+    onRowUpdated : function(v, index, r){
+        if(this.selection && this.selection.record == r){
+            v.onCellSelect(index, this.selection.cell[1]);
+        }
+    },
+
+	//private
+    onViewChange : function(){
+        this.clearSelections(true);
+    },
+
+	/**
+     * Returns an array containing the row and column indexes of the currently selected cell
+     * (e.g., [0, 0]), or null if none selected. The array has elements:
+     * <div class="mdetail-params"><ul>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The index of the selected row</p></li>
+     * <li><b>cellIndex</b> : Number<p class="sub-desc">The index of the selected cell. 
+     * Due to possible column reordering, the cellIndex should <b>not</b> be used as an
+     * index into the Record's data. Instead, use the cellIndex to determine the <i>name</i>
+     * of the selected cell and use the field name to retrieve the data value from the record:<pre><code>
+// get name
+var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
+// get data value based on name
+var data = record.get(fieldName);
+     * </code></pre></p></li>
+     * </ul></div>
+     * @return {Array} An array containing the row and column indexes of the selected cell, or null if none selected.
+	 */
+    getSelectedCell : function(){
+        return this.selection ? this.selection.cell : null;
+    },
+
+    /**
+     * If anything is selected, clears all selections and fires the selectionchange event.
+     * @param {Boolean} preventNotify <tt>true</tt> to prevent the gridview from
+     * being notified about the change.
+     */
+    clearSelections : function(preventNotify){
+        var s = this.selection;
+        if(s){
+            if(preventNotify !== true){
+                this.grid.view.onCellDeselect(s.cell[0], s.cell[1]);
+            }
+            this.selection = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selection ? true : false;
+    },
+
+    /** @ignore */
+    handleMouseDown : function(g, row, cell, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        this.select(row, cell);
+    },
+
+    /**
+     * Selects a cell.  Before selecting a cell, fires the
+     * {@link #beforecellselect} event.  If this check is satisfied the cell
+     * will be selected and followed up by  firing the {@link #cellselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} rowIndex The index of the row to select
+     * @param {Number} colIndex The index of the column to select
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     * @param {Boolean} preventFocus (optional) Whether to prevent the cell at
+     * the specified rowIndex / colIndex from being focused.
+     * @param {Ext.data.Record} r (optional) The record to select
+     */
+    select : function(rowIndex, colIndex, preventViewNotify, preventFocus, /*internal*/ r){
+        if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){
+            this.clearSelections();
+            r = r || this.grid.store.getAt(rowIndex);
+            this.selection = {
+                record : r,
+                cell : [rowIndex, colIndex]
+            };
+            if(!preventViewNotify){
+                var v = this.grid.getView();
+                v.onCellSelect(rowIndex, colIndex);
+                if(preventFocus !== true){
+                    v.focusCell(rowIndex, colIndex);
+                }
+            }
+            this.fireEvent("cellselect", this, rowIndex, colIndex);
+            this.fireEvent("selectionchange", this, this.selection);
+        }
+    },
+
+	//private
+    isSelectable : function(rowIndex, colIndex, cm){
+        return !cm.isHidden(colIndex);
+    },
+
+    /** @ignore */
+    handleKeyDown : function(e){
+        if(!e.isNavKeyPress()){
+            return;
+        }
+        var g = this.grid, s = this.selection;
+        if(!s){
+            e.stopEvent();
+            var cell = g.walkCells(0, 0, 1, this.isSelectable,  this);
+            if(cell){
+                this.select(cell[0], cell[1]);
+            }
+            return;
+        }
+        var sm = this;
+        var walk = function(row, col, step){
+            return g.walkCells(row, col, step, sm.isSelectable,  sm);
+        };
+        var k = e.getKey(), r = s.cell[0], c = s.cell[1];
+        var newCell;
+
+        switch(k){
+             case e.TAB:
+                 if(e.shiftKey){
+                     newCell = walk(r, c-1, -1);
+                 }else{
+                     newCell = walk(r, c+1, 1);
+                 }
+             break;
+             case e.DOWN:
+                 newCell = walk(r+1, c, 1);
+             break;
+             case e.UP:
+                 newCell = walk(r-1, c, -1);
+             break;
+             case e.RIGHT:
+                 newCell = walk(r, c+1, 1);
+             break;
+             case e.LEFT:
+                 newCell = walk(r, c-1, -1);
+             break;
+             case e.ENTER:
+                 if(g.isEditor && !g.editing){
+                    g.startEditing(r, c);
+                    e.stopEvent();
+                    return;
+                }
+             break;
+        }
+        if(newCell){
+            this.select(newCell[0], newCell[1]);
+            e.stopEvent();
+        }
+    },
+
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        if(k == e.TAB){
+            if(e.shiftKey){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+            e.stopEvent();
+        }else if(k == e.ENTER){
+            ed.completeEdit();
+            e.stopEvent();
+        }else if(k == e.ESC){
+        	e.stopEvent();
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    }
+});/**
+ * @class Ext.grid.EditorGridPanel
+ * @extends Ext.grid.GridPanel
+ * <p>This class extends the {@link Ext.grid.GridPanel GridPanel Class} to provide cell editing
+ * on selected {@link Ext.grid.Column columns}. The editable columns are specified by providing
+ * an {@link Ext.grid.ColumnModel#editor editor} in the {@link Ext.grid.Column column configuration}.</p>
+ * <p>Editability of columns may be controlled programatically by inserting an implementation
+ * of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into the
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>Editing is performed on the value of the <i>field</i> specified by the column's
+ * <tt>{@link Ext.grid.ColumnModel#dataIndex dataIndex}</tt> in the backing {@link Ext.data.Store Store}
+ * (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display
+ * transformed data, this must be accounted for).</p>
+ * <p>If a value-to-description mapping is used to render a column, then a {@link Ext.form.Field#ComboBox ComboBox}
+ * which uses the same {@link Ext.form.Field#valueField value}-to-{@link Ext.form.Field#displayFieldField description}
+ * mapping would be an appropriate editor.</p>
+ * If there is a more complex mismatch between the visible data in the grid, and the editable data in
+ * the {@link Edt.data.Store Store}, then code to transform the data both before and after editing can be
+ * injected using the {@link #beforeedit} and {@link #afteredit} events.
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype editorgrid
+ */
+Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
+    /**
+     * @cfg {Number} clicksToEdit
+     * <p>The number of clicks on a cell required to display the cell's editor (defaults to 2).</p>
+     * <p>Setting this option to 'auto' means that mousedown <i>on the selected cell</i> starts
+     * editing that cell.</p>
+     */
+    clicksToEdit: 2,
+    
+    /**
+    * @cfg {Boolean} forceValidation
+    * True to force validation even if the value is unmodified (defaults to false)
+    */
+    forceValidation: false,
+
+    // private
+    isEditor : true,
+    // private
+    detectEdit: false,
+
+	/**
+	 * @cfg {Boolean} autoEncode
+	 * True to automatically HTML encode and decode values pre and post edit (defaults to false)
+	 */
+	autoEncode : false,
+
+	/**
+	 * @cfg {Boolean} trackMouseOver @hide
+	 */
+    // private
+    trackMouseOver: false, // causes very odd FF errors
+
+    // private
+    initComponent : function(){
+        Ext.grid.EditorGridPanel.superclass.initComponent.call(this);
+
+        if(!this.selModel){
+            /**
+             * @cfg {Object} selModel Any subclass of AbstractSelectionModel that will provide the selection model for
+             * the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified).
+             */
+            this.selModel = new Ext.grid.CellSelectionModel();
+        }
+
+        this.activeEditor = null;
+
+	    this.addEvents(
+            /**
+             * @event beforeedit
+             * Fires before cell editing is triggered. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value for the field being edited.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "beforeedit",
+            /**
+             * @event afteredit
+             * Fires after a cell is edited. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * </ul>
+             *
+             * <pre><code> 
+grid.on('afteredit', afterEdit, this );
+
+function afterEdit(e) {
+    // execute an XHR to send/commit data to the server, in callback do (if successful):
+    e.record.commit();
+}; 
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "afteredit",
+            /**
+             * @event validateedit
+             * Fires after a cell is edited, but before the value is set in the record. Return false
+             * to cancel the change. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * Usage example showing how to remove the red triangle (dirty record indicator) from some
+             * records (not all).  By observing the grid's validateedit event, it can be cancelled if
+             * the edit occurs on a targeted row (for example) and then setting the field's new value
+             * in the Record directly:
+             * <pre><code> 
+grid.on('validateedit', function(e) {
+  var myTargetRow = 6;
+ 
+  if (e.row == myTargetRow) {
+    e.cancel = true;
+    e.record.data[e.field] = e.value;
+  }
+});
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "validateedit"
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.EditorGridPanel.superclass.initEvents.call(this);
+
+        this.on("bodyscroll", this.stopEditing, this, [true]);
+        this.on("columnresize", this.stopEditing, this, [true]);
+
+        if(this.clicksToEdit == 1){
+            this.on("cellclick", this.onCellDblClick, this);
+        }else {
+            if(this.clicksToEdit == 'auto' && this.view.mainBody){
+                this.view.mainBody.on("mousedown", this.onAutoEditClick, this);
+            }
+            this.on("celldblclick", this.onCellDblClick, this);
+        }
+    },
+
+    // private
+    onCellDblClick : function(g, row, col){
+        this.startEditing(row, col);
+    },
+
+    // private
+    onAutoEditClick : function(e, t){
+        if(e.button !== 0){
+            return;
+        }
+        var row = this.view.findRowIndex(t);
+        var col = this.view.findCellIndex(t);
+        if(row !== false && col !== false){
+            this.stopEditing();
+            if(this.selModel.getSelectedCell){ // cell sm
+                var sc = this.selModel.getSelectedCell();
+                if(sc && sc[0] === row && sc[1] === col){
+                    this.startEditing(row, col);
+                }
+            }else{
+                if(this.selModel.isSelected(row)){
+                    this.startEditing(row, col);
+                }
+            }
+        }
+    },
+
+    // private
+    onEditComplete : function(ed, value, startValue){
+        this.editing = false;
+        this.activeEditor = null;
+        ed.un("specialkey", this.selModel.onEditorKey, this.selModel);
+		var r = ed.record;
+        var field = this.colModel.getDataIndex(ed.col);
+        value = this.postEditValue(value, startValue, r, field);
+        if(this.forceValidation === true || String(value) !== String(startValue)){
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                originalValue: startValue,
+                value: value,
+                row: ed.row,
+                column: ed.col,
+                cancel:false
+            };
+            if(this.fireEvent("validateedit", e) !== false && !e.cancel && String(value) !== String(startValue)){
+                r.set(field, e.value);
+                delete e.cancel;
+                this.fireEvent("afteredit", e);
+            }
+        }
+        this.view.focusCell(ed.row, ed.col);
+    },
+
+    /**
+     * Starts editing the specified for the specified row/column
+     * @param {Number} rowIndex
+     * @param {Number} colIndex
+     */
+    startEditing : function(row, col){
+        this.stopEditing();
+        if(this.colModel.isCellEditable(col, row)){
+            this.view.ensureVisible(row, col, true);
+            var r = this.store.getAt(row);
+            var field = this.colModel.getDataIndex(col);
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                value: r.data[field],
+                row: row,
+                column: col,
+                cancel:false
+            };
+            if(this.fireEvent("beforeedit", e) !== false && !e.cancel){
+                this.editing = true;
+                var ed = this.colModel.getCellEditor(col, row);
+                if(!ed){
+                    return;
+                }
+                if(!ed.rendered){
+                    ed.render(this.view.getEditorParent(ed));
+                }
+                (function(){ // complex but required for focus issues in safari, ie and opera
+                    ed.row = row;
+                    ed.col = col;
+                    ed.record = r;
+                    ed.on("complete", this.onEditComplete, this, {single: true});
+                    ed.on("specialkey", this.selModel.onEditorKey, this.selModel);
+                    /**
+                     * The currently active editor or null
+                      * @type Ext.Editor
+                     */
+                    this.activeEditor = ed;
+                    var v = this.preEditValue(r, field);
+                    ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v);
+                }).defer(50, this);
+            }
+        }
+    },
+
+    // private
+    preEditValue : function(r, field){
+        var value = r.data[field];
+        return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value;
+    },
+
+    // private
+	postEditValue : function(value, originalValue, r, field){
+		return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value;
+	},
+
+    /**
+     * Stops any active editing
+     * @param {Boolean} cancel (optional) True to cancel any changes
+     */
+    stopEditing : function(cancel){
+        if(this.activeEditor){
+            this.activeEditor[cancel === true ? 'cancelEdit' : 'completeEdit']();
+        }
+        this.activeEditor = null;
+    }
+});
+Ext.reg('editorgrid', Ext.grid.EditorGridPanel);// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridEditor = function(field, config){
+    Ext.grid.GridEditor.superclass.constructor.call(this, field, config);
+    field.monitorTab = false;
+};
+
+Ext.extend(Ext.grid.GridEditor, Ext.Editor, {
+    alignment: "tl-tl",
+    autoSize: "width",
+    hideEl : false,
+    cls: "x-small-editor x-grid-editor",
+    shim:false,
+    shadow:false
+});/**
+ * @class Ext.grid.PropertyRecord
+ * A specific {@link Ext.data.Record} type that represents a name/value pair and is made to work with the
+ * {@link Ext.grid.PropertyGrid}.  Typically, PropertyRecords do not need to be created directly as they can be
+ * created implicitly by simply using the appropriate data configs either via the {@link Ext.grid.PropertyGrid#source}
+ * config property or by calling {@link Ext.grid.PropertyGrid#setSource}.  However, if the need arises, these records
+ * can also be created explicitly as shwon below.  Example usage:
+ * <pre><code>
+var rec = new Ext.grid.PropertyRecord({
+    name: 'Birthday',
+    value: new Date(Date.parse('05/26/1972'))
+});
+// Add record to an already populated grid
+grid.store.addSorted(rec);
+</code></pre>
+ * @constructor
+ * @param {Object} config A data object in the format: {name: [name], value: [value]}.  The specified value's type
+ * will be read automatically by the grid to determine the type of editor to use when displaying it.
+ */
+Ext.grid.PropertyRecord = Ext.data.Record.create([
+    {name:'name',type:'string'}, 'value'
+]);
+
+/**
+ * @class Ext.grid.PropertyStore
+ * @extends Ext.util.Observable
+ * A custom wrapper for the {@link Ext.grid.PropertyGrid}'s {@link Ext.data.Store}. This class handles the mapping
+ * between the custom data source objects supported by the grid and the {@link Ext.grid.PropertyRecord} format
+ * required for compatibility with the underlying store. Generally this class should not need to be used directly --
+ * the grid's data should be accessed from the underlying store via the {@link #store} property.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyStore = function(grid, source){
+    this.grid = grid;
+    this.store = new Ext.data.Store({
+        recordType : Ext.grid.PropertyRecord
+    });
+    this.store.on('update', this.onUpdate,  this);
+    if(source){
+        this.setSource(source);
+    }
+    Ext.grid.PropertyStore.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, {
+    // protected - should only be called by the grid.  Use grid.setSource instead.
+    setSource : function(o){
+        this.source = o;
+        this.store.removeAll();
+        var data = [];
+        for(var k in o){
+            if(this.isEditableValue(o[k])){
+                data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k));
+            }
+        }
+        this.store.loadRecords({records: data}, {}, true);
+    },
+
+    // private
+    onUpdate : function(ds, record, type){
+        if(type == Ext.data.Record.EDIT){
+            var v = record.data.value;
+            var oldValue = record.modified.value;
+            if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){
+                this.source[record.id] = v;
+                record.commit();
+                this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue);
+            }else{
+                record.reject();
+            }
+        }
+    },
+
+    // private
+    getProperty : function(row){
+       return this.store.getAt(row);
+    },
+
+    // private
+    isEditableValue: function(val){
+        if(Ext.isDate(val)){
+            return true;
+        }
+        return !(Ext.isObject(val) || Ext.isFunction(val));
+    },
+
+    // private
+    setValue : function(prop, value){
+        this.source[prop] = value;
+        this.store.getById(prop).set('value', value);
+    },
+
+    // protected - should only be called by the grid.  Use grid.getSource instead.
+    getSource : function(){
+        return this.source;
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyColumnModel
+ * @extends Ext.grid.ColumnModel
+ * A custom column model for the {@link Ext.grid.PropertyGrid}.  Generally it should not need to be used directly.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyColumnModel = function(grid, store){
+    var g = Ext.grid,
+        f = Ext.form;
+        
+    this.grid = grid;
+    g.PropertyColumnModel.superclass.constructor.call(this, [
+        {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true},
+        {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true}
+    ]);
+    this.store = store;
+
+    var bfield = new f.Field({
+        autoCreate: {tag: 'select', children: [
+            {tag: 'option', value: 'true', html: 'true'},
+            {tag: 'option', value: 'false', html: 'false'}
+        ]},
+        getValue : function(){
+            return this.el.value == 'true';
+        }
+    });
+    this.editors = {
+        'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})),
+        'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})),
+        'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})),
+        'boolean' : new g.GridEditor(bfield)
+    };
+    this.renderCellDelegate = this.renderCell.createDelegate(this);
+    this.renderPropDelegate = this.renderProp.createDelegate(this);
+};
+
+Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, {
+    // private - strings used for locale support
+    nameText : 'Name',
+    valueText : 'Value',
+    dateFormat : 'm/j/Y',
+
+    // private
+    renderDate : function(dateVal){
+        return dateVal.dateFormat(this.dateFormat);
+    },
+
+    // private
+    renderBool : function(bVal){
+        return bVal ? 'true' : 'false';
+    },
+
+    // private
+    isCellEditable : function(colIndex, rowIndex){
+        return colIndex == 1;
+    },
+
+    // private
+    getRenderer : function(col){
+        return col == 1 ?
+            this.renderCellDelegate : this.renderPropDelegate;
+    },
+
+    // private
+    renderProp : function(v){
+        return this.getPropertyName(v);
+    },
+
+    // private
+    renderCell : function(val){
+        var rv = val;
+        if(Ext.isDate(val)){
+            rv = this.renderDate(val);
+        }else if(typeof val == 'boolean'){
+            rv = this.renderBool(val);
+        }
+        return Ext.util.Format.htmlEncode(rv);
+    },
+
+    // private
+    getPropertyName : function(name){
+        var pn = this.grid.propertyNames;
+        return pn && pn[name] ? pn[name] : name;
+    },
+
+    // private
+    getCellEditor : function(colIndex, rowIndex){
+        var p = this.store.getProperty(rowIndex),
+            n = p.data.name, 
+            val = p.data.value;
+        if(this.grid.customEditors[n]){
+            return this.grid.customEditors[n];
+        }
+        if(Ext.isDate(val)){
+            return this.editors.date;
+        }else if(typeof val == 'number'){
+            return this.editors.number;
+        }else if(typeof val == 'boolean'){
+            return this.editors['boolean'];
+        }else{
+            return this.editors.string;
+        }
+    },
+
+    // inherit docs
+    destroy : function(){
+        Ext.grid.PropertyColumnModel.superclass.destroy.call(this);
+        for(var ed in this.editors){
+            Ext.destroy(ed);
+        }
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyGrid
+ * @extends Ext.grid.EditorGridPanel
+ * A specialized grid implementation intended to mimic the traditional property grid as typically seen in
+ * development IDEs.  Each row in the grid represents a property of some object, and the data is stored
+ * as a set of name/value pairs in {@link Ext.grid.PropertyRecord}s.  Example usage:
+ * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    title: 'Properties Grid',
+    autoHeight: true,
+    width: 300,
+    renderTo: 'grid-ct',
+    source: {
+        "(name)": "My Object",
+        "Created": new Date(Date.parse('10/15/2006')),
+        "Available": false,
+        "Version": .01,
+        "Description": "A test object"
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {Object} config The grid config object
+ */
+Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
+    /**
+    * @cfg {Object} propertyNames An object containing property name/display name pairs.
+    * If specified, the display name will be shown in the name column instead of the property name.
+    */
+    /**
+    * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details).
+    */
+    /**
+    * @cfg {Object} customEditors An object containing name/value pairs of custom editor type definitions that allow
+    * the grid to support additional types of editable fields.  By default, the grid supports strongly-typed editing
+    * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and
+    * associated with a custom input control by specifying a custom editor.  The name of the editor
+    * type should correspond with the name of the property that will use the editor.  Example usage:
+    * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    ...
+    customEditors: {
+        'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))
+    },
+    source: {
+        'Start Time': '10:00 AM'
+    }
+});
+</code></pre>
+    */
+
+    // private config overrides
+    enableColumnMove:false,
+    stripeRows:false,
+    trackMouseOver: false,
+    clicksToEdit:1,
+    enableHdMenu : false,
+    viewConfig : {
+        forceFit:true
+    },
+
+    // private
+    initComponent : function(){
+        this.customEditors = this.customEditors || {};
+        this.lastEditRow = null;
+        var store = new Ext.grid.PropertyStore(this);
+        this.propStore = store;
+        var cm = new Ext.grid.PropertyColumnModel(this, store);
+        store.store.sort('name', 'ASC');
+        this.addEvents(
+            /**
+             * @event beforepropertychange
+             * Fires before a property value changes.  Handlers can return false to cancel the property change
+             * (this will internally call {@link Ext.data.Record#reject} on the property's record).
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'beforepropertychange',
+            /**
+             * @event propertychange
+             * Fires after a property value has changed.
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'propertychange'
+        );
+        this.cm = cm;
+        this.ds = store.store;
+        Ext.grid.PropertyGrid.superclass.initComponent.call(this);
+
+		this.mon(this.selModel, 'beforecellselect', function(sm, rowIndex, colIndex){
+            if(colIndex === 0){
+                this.startEditing.defer(200, this, [rowIndex, 1]);
+                return false;
+            }
+        }, this);
+    },
+
+    // private
+    onRender : function(){
+        Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments);
+
+        this.getGridEl().addClass('x-props-grid');
+    },
+
+    // private
+    afterRender: function(){
+        Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments);
+        if(this.source){
+            this.setSource(this.source);
+        }
+    },
+
+    /**
+     * Sets the source data object containing the property data.  The data object can contain one or more name/value
+     * pairs representing all of the properties of an object to display in the grid, and this data will automatically
+     * be loaded into the grid's {@link #store}.  The values should be supplied in the proper data type if needed,
+     * otherwise string type will be assumed.  If the grid already contains data, this method will replace any
+     * existing data.  See also the {@link #source} config value.  Example usage:
+     * <pre><code>
+grid.setSource({
+    "(name)": "My Object",
+    "Created": new Date(Date.parse('10/15/2006')),  // date type
+    "Available": false,  // boolean type
+    "Version": .01,      // decimal type
+    "Description": "A test object"
+});
+</code></pre>
+     * @param {Object} source The data object
+     */
+    setSource : function(source){
+        this.propStore.setSource(source);
+    },
+
+    /**
+     * Gets the source data object containing the property data.  See {@link #setSource} for details regarding the
+     * format of the data object.
+     * @return {Object} The data object
+     */
+    getSource : function(){
+        return this.propStore.getSource();
+    }
+});
+Ext.reg("propertygrid", Ext.grid.PropertyGrid);
+/**
+ * @class Ext.grid.GroupingView
+ * @extends Ext.grid.GridView
+ * Adds the ability for single level grouping to the grid. A {@link Ext.data.GroupingStore GroupingStore}
+ * must be used to enable grouping.  Some grouping characteristics may also be configured at the
+ * {@link Ext.grid.Column Column level}<div class="mdetail-params"><ul>
+ * <li><code>{@link Ext.grid.Column#emptyGroupText emptyGroupText}</li>
+ * <li><code>{@link Ext.grid.Column#groupable groupable}</li>
+ * <li><code>{@link Ext.grid.Column#groupName groupName}</li>
+ * <li><code>{@link Ext.grid.Column#groupRender groupRender}</li>
+ * </ul></div>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    // A groupingStore is required for a GroupingView
+    store: new {@link Ext.data.GroupingStore}({
+        autoDestroy: true,
+        reader: reader,
+        data: xg.dummyData,
+        sortInfo: {field: 'company', direction: 'ASC'},
+        {@link Ext.data.GroupingStore#groupOnSort groupOnSort}: true,
+        {@link Ext.data.GroupingStore#remoteGroup remoteGroup}: true,
+        {@link Ext.data.GroupingStore#groupField groupField}: 'industry'
+    }),
+    colModel: new {@link Ext.grid.ColumnModel}({
+        columns:[
+            {id:'company',header: 'Company', width: 60, dataIndex: 'company'},
+            // {@link Ext.grid.Column#groupable groupable}, {@link Ext.grid.Column#groupName groupName}, {@link Ext.grid.Column#groupRender groupRender} are also configurable at column level
+            {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price', {@link Ext.grid.Column#groupable groupable}: false},
+            {header: 'Change', dataIndex: 'change', renderer: Ext.util.Format.usMoney},
+            {header: 'Industry', dataIndex: 'industry'},
+            {header: 'Last Updated', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            menuDisabled: false,
+            width: 20
+        }
+    }),
+
+    view: new Ext.grid.GroupingView({
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+        // custom grouping text template to display the number of items per group
+        {@link #groupTextTpl}: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+
+    frame:true,
+    width: 700,
+    height: 450,
+    collapsible: true,
+    animCollapse: false,
+    title: 'Grouping Example',
+    iconCls: 'icon-grid',
+    renderTo: document.body
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
+
+    /**
+     * @cfg {String} groupByText Text displayed in the grid header menu for grouping by a column
+     * (defaults to 'Group By This Field').
+     */
+    groupByText : 'Group By This Field',
+    /**
+     * @cfg {String} showGroupsText Text displayed in the grid header for enabling/disabling grouping
+     * (defaults to 'Show in Groups').
+     */
+    showGroupsText : 'Show in Groups',
+    /**
+     * @cfg {Boolean} hideGroupedColumn <tt>true</tt> to hide the column that is currently grouped (defaults to <tt>false</tt>)
+     */
+    hideGroupedColumn : false,
+    /**
+     * @cfg {Boolean} showGroupName If <tt>true</tt> will display a prefix plus a ': ' before the group field value
+     * in the group header line.  The prefix will consist of the <tt><b>{@link Ext.grid.Column#groupName groupName}</b></tt>
+     * (or the configured <tt><b>{@link Ext.grid.Column#header header}</b></tt> if not provided) configured in the
+     * {@link Ext.grid.Column} for each set of grouped rows (defaults to <tt>true</tt>).
+     */
+    showGroupName : true,
+    /**
+     * @cfg {Boolean} startCollapsed <tt>true</tt> to start all groups collapsed (defaults to <tt>false</tt>)
+     */
+    startCollapsed : false,
+    /**
+     * @cfg {Boolean} enableGrouping <tt>false</tt> to disable grouping functionality (defaults to <tt>true</tt>)
+     */
+    enableGrouping : true,
+    /**
+     * @cfg {Boolean} enableGroupingMenu <tt>true</tt> to enable the grouping control in the column menu (defaults to <tt>true</tt>)
+     */
+    enableGroupingMenu : true,
+    /**
+     * @cfg {Boolean} enableNoGroups <tt>true</tt> to allow the user to turn off grouping (defaults to <tt>true</tt>)
+     */
+    enableNoGroups : true,
+    /**
+     * @cfg {String} emptyGroupText The text to display when there is an empty group value (defaults to <tt>'(None)'</tt>).
+     * May also be specified per column, see {@link Ext.grid.Column}.{@link Ext.grid.Column#emptyGroupText emptyGroupText}.
+     */
+    emptyGroupText : '(None)',
+    /**
+     * @cfg {Boolean} ignoreAdd <tt>true</tt> to skip refreshing the view when new rows are added (defaults to <tt>false</tt>)
+     */
+    ignoreAdd : false,
+    /**
+     * @cfg {String} groupTextTpl The template used to render the group header (defaults to <tt>'{text}'</tt>).
+     * This is used to format an object which contains the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>group</b> : String<p class="sub-desc">The <i>rendered</i> value of the group field.
+     * By default this is the unchanged value of the group field. If a <tt><b>{@link Ext.grid.Column#groupRenderer groupRenderer}</b></tt>
+     * is specified, it is the result of a call to that function.</p></li>
+     * <li><b>gvalue</b> : Object<p class="sub-desc">The <i>raw</i> value of the group field.</p></li>
+     * <li><b>text</b> : String<p class="sub-desc">The configured header (as described in <tt>{@link #showGroupName})</tt>
+     * if <tt>{@link #showGroupName}</tt> is <tt>true</tt>) plus the <i>rendered</i> group field value.</p></li>
+     * <li><b>groupId</b> : String<p class="sub-desc">A unique, generated ID which is applied to the
+     * View Element which contains the group.</p></li>
+     * <li><b>startRow</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>rs</b> : Array<p class="sub-desc">Contains a single element: The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>cls</b> : String<p class="sub-desc">The generated class name string to apply to the group header Element.</p></li>
+     * <li><b>style</b> : String<p class="sub-desc">The inline style rules to apply to the group header Element.</p></li>
+     * </ul></div></p>
+     * See {@link Ext.XTemplate} for information on how to format data using a template. Possible usage:<pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    view: new Ext.grid.GroupingView({
+        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+});
+     * </code></pre>
+     */
+    groupTextTpl : '{text}',
+    /**
+     * @cfg {Function} groupRenderer This property must be configured in the {@link Ext.grid.Column} for
+     * each column.
+     */
+
+    // private
+    gidSeed : 1000,
+
+    // private
+    initTemplates : function(){
+        Ext.grid.GroupingView.superclass.initTemplates.call(this);
+        this.state = {};
+
+        var sm = this.grid.getSelectionModel();
+        sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect',
+                this.onBeforeRowSelect, this);
+
+        if(!this.startGroup){
+            this.startGroup = new Ext.XTemplate(
+                '<div id="{groupId}" class="x-grid-group {cls}">',
+                    '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">', this.groupTextTpl ,'</div></div>',
+                    '<div id="{groupId}-bd" class="x-grid-group-body">'
+            );
+        }
+        this.startGroup.compile();
+        this.endGroup = '</div></div>';
+    },
+
+    // private
+    findGroup : function(el){
+        return Ext.fly(el).up('.x-grid-group', this.mainBody.dom);
+    },
+
+    // private
+    getGroups : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // private
+    onAdd : function(){
+        if(this.enableGrouping && !this.ignoreAdd){
+            var ss = this.getScrollState();
+            this.refresh();
+            this.restoreScroll(ss);
+        }else if(!this.enableGrouping){
+            Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments);
+        }
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments);
+        var g = document.getElementById(record._groupId);
+        if(g && g.childNodes[1].childNodes.length < 1){
+            Ext.removeNode(g);
+        }
+        this.applyEmptyText();
+    },
+
+    // private
+    refreshRow : function(record){
+        if(this.ds.getCount()==1){
+            this.refresh();
+        }else{
+            this.isUpdating = true;
+            Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
+            this.isUpdating = false;
+        }
+    },
+
+    // private
+    beforeMenuShow : function(){
+        var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false;
+        if((item = items.get('groupBy'))){
+            item.setDisabled(disabled);
+        }
+        if((item = items.get('showGroups'))){
+            item.setDisabled(disabled);
+		    item.setChecked(!!this.getGroupField(), true);
+        }
+    },
+
+    // private
+    renderUI : function(){
+        Ext.grid.GroupingView.superclass.renderUI.call(this);
+        this.mainBody.on('mousedown', this.interceptMouse, this);
+
+        if(this.enableGroupingMenu && this.hmenu){
+            this.hmenu.add('-',{
+                itemId:'groupBy',
+                text: this.groupByText,
+                handler: this.onGroupByClick,
+                scope: this,
+                iconCls:'x-group-by-icon'
+            });
+            if(this.enableNoGroups){
+                this.hmenu.add({
+                    itemId:'showGroups',
+                    text: this.showGroupsText,
+                    checked: true,
+                    checkHandler: this.onShowGroupsClick,
+                    scope: this
+                });
+            }
+            this.hmenu.on('beforeshow', this.beforeMenuShow, this);
+        }
+    },
+
+    // private
+    onGroupByClick : function(){
+        this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));
+        this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups
+    },
+
+    // private
+    onShowGroupsClick : function(mi, checked){
+        if(checked){
+            this.onGroupByClick();
+        }else{
+            this.grid.store.clearGrouping();
+        }
+    },
+
+    /**
+     * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed.
+     * @param {String} groupId The groupId assigned to the group (see getGroupId)
+     * @param {Boolean} expanded (optional)
+     */
+    toggleGroup : function(group, expanded){
+        this.grid.stopEditing(true);
+        group = Ext.getDom(group);
+        var gel = Ext.fly(group);
+        expanded = expanded !== undefined ?
+                expanded : gel.hasClass('x-grid-group-collapsed');
+
+        this.state[gel.dom.id] = expanded;
+        gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed');
+    },
+
+    /**
+     * Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed.
+     * @param {Boolean} expanded (optional)
+     */
+    toggleAllGroups : function(expanded){
+        var groups = this.getGroups();
+        for(var i = 0, len = groups.length; i < len; i++){
+            this.toggleGroup(groups[i], expanded);
+        }
+    },
+
+    /**
+     * Expands all grouped rows.
+     */
+    expandAllGroups : function(){
+        this.toggleAllGroups(true);
+    },
+
+    /**
+     * Collapses all grouped rows.
+     */
+    collapseAllGroups : function(){
+        this.toggleAllGroups(false);
+    },
+
+    // private
+    interceptMouse : function(e){
+        var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
+        if(hd){
+            e.stopEvent();
+            this.toggleGroup(hd.parentNode);
+        }
+    },
+
+    // private
+    getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){
+        var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v);
+        if(g === ''){
+            g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText;
+        }
+        return g;
+    },
+
+    // private
+    getGroupField : function(){
+        return this.grid.store.getGroupState();
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.grid.GroupingView.superclass.afterRender.call(this);
+        if(this.grid.deferRowRender){
+            this.updateGroupWidths();
+        }
+    },
+
+    // private
+    renderRows : function(){
+        var groupField = this.getGroupField();
+        var eg = !!groupField;
+        // if they turned off grouping and the last grouped field is hidden
+        if(this.hideGroupedColumn) {
+            var colIndex = this.cm.findColumnIndex(groupField);
+            if(!eg && this.lastGroupField !== undefined) {
+                this.mainBody.update('');
+                this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false);
+                delete this.lastGroupField;
+            }else if (eg && this.lastGroupField === undefined) {
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) {
+                this.mainBody.update('');
+                var oldIndex = this.cm.findColumnIndex(this.lastGroupField);
+                this.cm.setHidden(oldIndex, false);
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }
+        }
+        return Ext.grid.GroupingView.superclass.renderRows.apply(
+                    this, arguments);
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        if(rs.length < 1){
+            return '';
+        }
+        var groupField = this.getGroupField(),
+            colIndex = this.cm.findColumnIndex(groupField),
+            g;
+
+        this.enableGrouping = !!groupField;
+
+        if(!this.enableGrouping || this.isUpdating){
+            return Ext.grid.GroupingView.superclass.doRender.apply(
+                    this, arguments);
+        }
+        var gstyle = 'width:'+this.getTotalWidth()+';';
+
+        var gidPrefix = this.grid.getGridEl().id;
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var prefix = this.showGroupName ?
+                     (cfg.groupName || cfg.header)+': ' : '';
+
+        var groups = [], curGroup, i, len, gid;
+        for(i = 0, len = rs.length; i < len; i++){
+            var rowIndex = startRow + i,
+                r = rs[i],
+                gvalue = r.data[groupField];
+                
+                g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds);
+            if(!curGroup || curGroup.group != g){
+                gid = gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(g);
+               	// if state is defined use it, however state is in terms of expanded
+				// so negate it, otherwise use the default.
+				var isCollapsed  = typeof this.state[gid] !== 'undefined' ? !this.state[gid] : this.startCollapsed;
+				var gcls = isCollapsed ? 'x-grid-group-collapsed' : '';	
+                curGroup = {
+                    group: g,
+                    gvalue: gvalue,
+                    text: prefix + g,
+                    groupId: gid,
+                    startRow: rowIndex,
+                    rs: [r],
+                    cls: gcls,
+                    style: gstyle
+                };
+                groups.push(curGroup);
+            }else{
+                curGroup.rs.push(r);
+            }
+            r._groupId = gid;
+        }
+
+        var buf = [];
+        for(i = 0, len = groups.length; i < len; i++){
+            g = groups[i];
+            this.doGroupStart(buf, g, cs, ds, colCount);
+            buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call(
+                    this, cs, g.rs, ds, g.startRow, colCount, stripe);
+
+            this.doGroupEnd(buf, g, cs, ds, colCount);
+        }
+        return buf.join('');
+    },
+
+    /**
+     * Dynamically tries to determine the groupId of a specific value
+     * @param {String} value
+     * @return {String} The group id
+     */
+    getGroupId : function(value){
+        var gidPrefix = this.grid.getGridEl().id;
+        var groupField = this.getGroupField();
+        var colIndex = this.cm.findColumnIndex(groupField);
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds);
+        return gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(value);
+    },
+
+    // private
+    doGroupStart : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.startGroup.apply(g);
+    },
+
+    // private
+    doGroupEnd : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.endGroup;
+    },
+
+    // private
+    getRows : function(){
+        if(!this.enableGrouping){
+            return Ext.grid.GroupingView.superclass.getRows.call(this);
+        }
+        var r = [];
+        var g, gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            g = gs[i].childNodes[1].childNodes;
+            for(var j = 0, jlen = g.length; j < jlen; j++){
+                r[r.length] = g[j];
+            }
+        }
+        return r;
+    },
+
+    // private
+    updateGroupWidths : function(){
+        if(!this.enableGrouping || !this.hasRows()){
+            return;
+        }
+        var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px';
+        var gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            gs[i].firstChild.style.width = tw;
+        }
+    },
+
+    // private
+    onColumnWidthUpdated : function(col, w, tw){
+        Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onAllColumnWidthsUpdated : function(ws, tw){
+        Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onLayout : function(){
+        this.updateGroupWidths();
+    },
+
+    // private
+    onBeforeRowSelect : function(sm, rowIndex){
+        if(!this.enableGrouping){
+            return;
+        }
+        var row = this.getRow(rowIndex);
+        if(row && !row.offsetParent){
+            var g = this.findGroup(row);
+            this.toggleGroup(g, true);
+        }
+    }
+});
+// private
+Ext.grid.GroupingView.GROUP_ID = 1000;
Index: trunk/web/addons/job_monarch/lib/extjs-30/ext-all.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/ext-all.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/ext-all.js	(revision 625)
@@ -0,0 +1,11 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.DomHelper=function(){var s=null,j=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,l=/^table|tbody|tr|td$/i,p,m="afterbegin",n="afterend",c="beforebegin",o="beforeend",a="<table>",h="</table>",b=a+"<tbody>",i="</tbody>"+h,k=b+"<tr>",r="</tr>"+i;function g(w,y,x,z,v,t){var u=p.insertHtml(z,Ext.getDom(w),q(y));return x?Ext.get(u,true):u}function q(y){var v="",u,x,w,t,z;if(typeof y=="string"){v=y}else{if(Ext.isArray(y)){Ext.each(y,function(A){v+=q(A)})}else{v+="<"+(y.tag=y.tag||"div");Ext.iterate(y,function(A,B){if(!/tag|children|cn|html$/i.test(A)){if(Ext.isObject(B)){v+=" "+A+"='";Ext.iterate(B,function(D,C){v+=D+":"+C+";"});v+="'"}else{v+=" "+({cls:"class",htmlFor:"for"}[A]||A)+"='"+B+"'"}}});if(j.test(y.tag)){v+="/>"}else{v+=">";if((z=y.children||y.cn)){v+=q(z)}else{if(y.html){v+=y.html}}v+="</"+y.tag+">"}}}return v}function e(y,w,v,x){s.innerHTML=[w,v,x].join("");var t=-1,u=s;while(++t<y){u=u.firstChild}return u}function d(t,u,w,v){var x,y;s=s||document.createElement("div");if(t=="td"&&(u==m||u==o)||!/td|tr|tbody/i.test(t)&&(u==c||u==n)){return}y=u==c?w:u==n?w.nextSibling:u==m?w.firstChild:null;if(u==c||u==n){w=w.parentNode}if(t=="td"||(t=="tr"&&(u==o||u==m))){x=e(4,k,v,r)}else{if((t=="tbody"&&(u==o||u==m))||(t=="tr"&&(u==c||u==n))){x=e(3,b,v,i)}else{x=e(2,a,v,h)}}w.insertBefore(x,y);return x}p={markup:function(t){return q(t)},insertHtml:function(y,t,z){var x={},v,B,A,C,w,u;y=y.toLowerCase();x[c]=["BeforeBegin","previousSibling"];x[n]=["AfterEnd","nextSibling"];if(t.insertAdjacentHTML){if(l.test(t.tagName)&&(u=d(t.tagName.toLowerCase(),y,t,z))){return u}x[m]=["AfterBegin","firstChild"];x[o]=["BeforeEnd","lastChild"];if((v=x[y])){t.insertAdjacentHTML(v[0],z);return t[v[1]]}}else{A=t.ownerDocument.createRange();B="setStart"+(/end/i.test(y)?"After":"Before");if(x[y]){A[B](t);C=A.createContextualFragment(z);t.parentNode.insertBefore(C,y==c?t:t.nextSibling);return t[(y==c?"previous":"next")+"Sibling"]}else{w=(y==m?"first":"last")+"Child";if(t.firstChild){A[B](t[w]);C=A.createContextualFragment(z);if(y==m){t.insertBefore(C,t.firstChild)}else{t.appendChild(C)}}else{t.innerHTML=z}return t[w]}}throw'Illegal insertion point -> "'+y+'"'},insertBefore:function(t,v,u){return g(t,v,u,c)},insertAfter:function(t,v,u){return g(t,v,u,n,"nextSibling")},insertFirst:function(t,v,u){return g(t,v,u,m,"firstChild")},append:function(t,v,u){return g(t,v,u,o,"",true)},overwrite:function(t,v,u){t=Ext.getDom(t);t.innerHTML=q(v);return u?Ext.get(t.firstChild):t.firstChild},createHtml:q};return p}();Ext.apply(Ext.DomHelper,function(){var d,a="afterbegin",g="afterend",h="beforebegin",c="beforeend";function e(l,n,m,p,k,i){l=Ext.getDom(l);var j;if(d.useDom){j=b(n,null);if(i){l.appendChild(j)}else{(k=="firstChild"?l:l.parentNode).insertBefore(j,l[k]||l)}}else{j=Ext.DomHelper.insertHtml(p,l,Ext.DomHelper.createHtml(n))}return m?Ext.get(j,true):j}function b(p,j){var l,m=document,k,i,n,q;if(Ext.isArray(p)){l=m.createDocumentFragment();Ext.each(p,function(o){b(o,l)})}else{if(Ext.isString(p)){l=m.createTextNode(p)}else{l=m.createElement(p.tag||"div");k=!!l.setAttribute;Ext.iterate(p,function(o,r){if(!/tag|children|cn|html|style/.test(o)){if(o=="cls"){l.className=r}else{if(k){l.setAttribute(o,r)}else{l[o]=r}}}});d.applyStyles(l,p.style);if((q=p.children||p.cn)){b(q,l)}else{if(p.html){l.innerHTML=p.html}}}}if(j){j.appendChild(l)}return l}d={createTemplate:function(j){var i=Ext.DomHelper.createHtml(j);return new Ext.Template(i)},useDom:false,applyStyles:function(m,n){if(n){var k=0,j,l;m=Ext.fly(m);if(Ext.isFunction(n)){n=n.call()}if(Ext.isString(n)){n=n.trim().split(/\s*(?::|;)\s*/);for(j=n.length;k<j;){m.setStyle(n[k++],n[k++])}}else{if(Ext.isObject(n)){m.setStyle(n)}}}},insertBefore:function(i,k,j){return e(i,k,j,h)},insertAfter:function(i,k,j){return e(i,k,j,g,"nextSibling")},insertFirst:function(i,k,j){return e(i,k,j,a,"firstChild")},append:function(i,k,j){return e(i,k,j,c,"",true)},createDom:b};return d}());Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.apply(Ext.Template.prototype,{applyTemplate:function(b){var g=this,a=g.disableFormats!==true,e=Ext.util.Format,c=g;if(g.compiled){return g.compiled(b)}function d(j,l,p,k){if(p&&a){if(p.substr(0,5)=="this."){return c.call(p.substr(5),b[l],b)}else{if(k){var o=/^\s*['"](.*)["']\s*$/;k=k.split(",");for(var n=0,h=k.length;n<h;n++){k[n]=k[n].replace(o,"$1")}k=[b[l]].concat(k)}else{k=[b[l]]}return e[p].apply(e,k)}}else{return b[l]!==undefined?b[l]:""}}return g.html.replace(g.re,d)},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var me=this,fm=Ext.util.Format,useF=me.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"}if(Ext.isGecko){body="this.compiled = function(values){ return '"+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return me},call:function(c,b,a){return this[c](b,a)}});Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(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=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;(function(){var i=Ext.util,l=Ext.toArray,k=Ext.each,a=Ext.isObject,h=true,j=false;i.Observable=function(){var m=this,n=m.events;if(m.listeners){m.on(m.listeners);delete m.listeners}m.events=n||{}};i.Observable.prototype=function(){var n=/^(?:scope|delay|buffer|single)$/,m=function(o){return o.toLowerCase()};return{fireEvent:function(){var o=l(arguments),r=m(o[0]),s=this,p=h,u=s.events[r],t,v;if(s.eventsSuspended===h){if(t=s.suspendedEventsQueue){t.push(o)}}else{if(a(u)&&u.bubble){if(u.fire.apply(u,o.slice(1))===j){return j}v=s.getBubbleTarget&&s.getBubbleTarget();if(v&&v.enableBubble){v.enableBubble(r);return v.fireEvent.apply(v,o)}}else{if(a(u)){o.shift();p=u.fire.apply(u,o)}}}return p},addListener:function(r,u,w,q){var t=this,s,x,v,p;if(a(r)){q=r;for(s in q){x=q[s];if(!n.test(s)){t.addListener(s,x.fn||x,x.scope||q.scope,x.fn?x:q)}}}else{r=m(r);p=t.events[r]||h;if(typeof p=="boolean"){t.events[r]=p=new i.Event(t,r)}p.addListener(u,w,a(q)?q:{})}},removeListener:function(o,q,p){var r=this.events[m(o)];if(a(r)){r.removeListener(q,p)}},purgeListeners:function(){var q=this.events,o,p;for(p in q){o=q[p];if(a(o)){o.clearListeners()}}},addEvents:function(q){var p=this;p.events=p.events||{};if(typeof q=="string"){k(arguments,function(o){p.events[o]=p.events[o]||h})}else{Ext.applyIf(p.events,q)}},hasListener:function(o){var p=this.events[o];return a(p)&&p.listeners.length>0},suspendEvents:function(o){this.eventsSuspended=h;if(o){this.suspendedEventsQueue=[]}},resumeEvents:function(){var o=this;o.eventsSuspended=!delete o.suspendedEventQueue;k(o.suspendedEventsQueue,function(p){o.fireEvent.apply(o,p)})}}}();var e=i.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;i.Observable.releaseCapture=function(m){m.fireEvent=e.fireEvent};function g(n,p,m){return function(){if(p.target==arguments[0]){n.apply(m,l(arguments))}}}function c(p,q,n){var m=new i.DelayedTask();return function(){m.delay(q.buffer,p,n,l(arguments))}}function d(o,p,n,m){return function(){p.removeListener(n,m);return o.apply(m,arguments)}}function b(n,p,m){return function(){var o=l(arguments);(function(){n.apply(m,o)}).defer(p.delay||10)}}i.Event=function(n,m){this.name=m;this.obj=n;this.listeners=[]};i.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.push(m)}},createListener:function(q,p,r){r=r||{},p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=g(n,r,p)}if(r.delay){n=b(n,r,p)}if(r.single){n=d(n,this,q,p)}if(r.buffer){n=c(n,r,p)}m.fireFn=n;return m},findListener:function(p,o){var n,m=-1;k(this.listeners,function(q,r){n=q.scope;if(q.fn==p&&(n==o||n==this.obj)){m=r;return j}},this);return m},isListening:function(n,m){return this.findListener(n,m)!=-1},removeListener:function(p,o){var n,q=this,m=j;if((n=q.findListener(p,o))!=-1){if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.splice(n,1);m=h}return m},clearListeners:function(){this.listeners=[]},fire:function(){var o=this,n=l(arguments),m=h;k(o.listeners,function(p){o.firing=h;if(p.fireFn.apply(p.scope||o.obj||window,n)===j){return m=o.firing=j}});o.firing=j;return m}}})();Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if(!Ext.isEmpty(c=l.apply(k||h,e))){if(Ext.isObject(c)){d=!Ext.isEmpty(c.returnValue)?c.returnValue:c;g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var e=Ext.toArray(arguments);d=c=undefined;g=false;Ext.each(i.before,function(k){b(k.fn,k.scope,e);if(g){return d}});if(!Ext.isEmpty(c=i.originalFn.apply(h,e))){d=c}Ext.each(i.after,function(k){b(k.fn,k.scope,e);if(g){return d}});return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(h,c,b){var g=a.call(this,h),d=false;Ext.each(g.before,function(j,k,e){if(j.fn==c&&j.scope==b){e.splice(k,1);d=true;return false}});if(!d){Ext.each(g.after,function(j,k,e){if(j.fn==c&&j.scope==b){e.splice(k,1);return false}})}},relayEvents:function(e,b){var d=this;function c(g){return function(){return d.fireEvent.apply(d,[g].concat(Ext.toArray(arguments)))}}Ext.each(b,function(g){d.events[g]=d.events[g]||true;e.on(g,c(g),d)})},enableBubble:function(b){var c=this;b=Ext.isArray(b)?b:Ext.toArray(arguments);Ext.each(b,function(d){d=d.toLowerCase();var e=c.events[d]||true;if(typeof e=="boolean"){e=new Ext.util.Event(c,d);c.events[d]=e}e.bubble=true})}}}());Ext.util.Observable.capture=function(c,b,a){c.fireEvent=c.fireEvent.createInterceptor(b,a)};Ext.util.Observable.observeClass=function(a){Ext.apply(a,new Ext.util.Observable());a.prototype.fireEvent=function(){return(a.fireEvent.apply(a,arguments)!==false)&&(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false)}};Ext.EventManager=function(){var t,m,j=false,l=Ext.lib.Event,n=Ext.lib.Dom,b=document,u=window,g="ie-deferred-loader",o="DOMContentLoaded",e={},h=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function k(A,w,z,y,x){var C=Ext.id(A),B=e[C]=e[C]||{};(B[w]=B[w]||[]).push([z,y,x]);l.on(A,w,y);if(w=="mousewheel"&&A.addEventListener){var v=["DOMMouseScroll",y,false];A.addEventListener.apply(A,v);l.on(window,"unload",function(){A.removeEventListener.apply(A,v)})}if(w=="mousedown"&&A==document){Ext.EventManager.stoppedMouseDownEvent.addListener(y)}}function c(){if(!j){Ext.isReady=j=true;if(m){clearInterval(m)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(o,c,false)}if(Ext.isIE){var v=b.getElementById(g);if(v){v.onreadystatechange=null;v.parentNode.removeChild(v)}}if(t){t.fire();t.clearListeners()}}}function a(){var v="complete";t=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(o,c,false)}else{if(Ext.isIE){b.write("<script id="+g+' defer="defer" src="//:"><\/script>');b.getElementById(g).onreadystatechange=function(){if(this.readyState==v){c()}}}else{if(Ext.isWebKit){m=setInterval(function(){if(b.readyState==v){c()}},10)}}}l.on(u,"load",c)}function r(v,w){return function(){var x=Ext.toArray(arguments);if(w.target==Ext.EventObject.setEvent(x[0]).target){v.apply(this,x)}}}function s(w,x){var v=new Ext.util.DelayedTask(w);return function(y){v.delay(x.buffer,w,null,[new Ext.EventObjectImpl(y)])}}function p(z,y,v,x,w){return function(A){Ext.EventManager.removeListener(y,v,x,w);z(A)}}function d(v,w){return function(x){x=new Ext.EventObjectImpl(x);setTimeout(function(){v(x)},w.delay||10)}}function i(x,w,v,B,A){var C=!Ext.isObject(v)?{}:v,z=Ext.getDom(x);B=B||C.fn;A=A||C.scope;if(!z){throw'Error listening for "'+w+'". Element "'+x+"\" doesn't exist."}function y(E){if(!Ext){return}E=Ext.EventObject.setEvent(E);var D;if(C.delegate){if(!(D=E.getTarget(C.delegate,z))){return}}else{D=E.target}if(C.stopEvent){E.stopEvent()}if(C.preventDefault){E.preventDefault()}if(C.stopPropagation){E.stopPropagation()}if(C.normalized){E=E.browserEvent}B.call(A||z,E,D,C)}if(C.target){y=r(y,C)}if(C.delay){y=d(y,C)}if(C.single){y=p(y,z,w,B,A)}if(C.buffer){y=s(y,C)}k(z,w,B,y,A);return y}var q={addListener:function(x,v,z,y,w){if(Ext.isObject(v)){var C=v,A,B;for(A in C){B=C[A];if(!h.test(A)){if(Ext.isFunction(B)){i(x,A,C,B,C.scope)}else{i(x,A,B)}}}}else{i(x,v,w,z,y)}},removeListener:function(w,v,A,z){var y=Ext.getDom(w),B=Ext.id(y),x;Ext.each((e[B]||{})[v],function(D,E,C){if(Ext.isArray(D)&&D[0]==A&&(!z||D[2]==z)){l.un(y,v,x=D[1]);C.splice(E,1);return false}});if(v=="mousewheel"&&y.addEventListener&&x){y.removeEventListener("DOMMouseScroll",x,false)}if(v=="mousedown"&&y==b&&x){Ext.EventManager.stoppedMouseDownEvent.removeListener(x)}},removeAll:function(w){var y=Ext.id(w=Ext.getDom(w)),x=e[y],v;for(v in x){if(x.hasOwnProperty(v)){Ext.each(x[v],function(z){l.un(w,v,z.wrap)})}}e[y]=null},onDocumentReady:function(x,w,v){if(j){t.addListener(x,w,v);t.fire();t.clearListeners()}else{if(!t){a()}v=v||{};v.delay=v.delay||1;t.addListener(x,w,v)}},elHash:e};q.on=q.addListener;q.un=q.removeListener;q.stoppedMouseDownEvent=new Ext.util.Event();return q}();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.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")))}else{if(Ext.isChrome){b.push("ext-chrome")}}if(Ext.isMac){b.push("ext-mac")}if(Ext.isLinux){b.push("ext-linux")}if(Ext.isStrict||Ext.isBorderBox){var d=c.parentNode;if(d){d.className+=Ext.isStrict?" ext-strict":" ext-border-box"}}c.className+=b.join(" ");return true};if(!a()){Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d)}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g)}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0]}return d},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopEvent(d.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopPropagation(d.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120}else{if(d.detail){g=-d.detail/3}}return g},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e))}return false}};return new Ext.EventObjectImpl()}();Ext.apply(Ext.EventManager,function(){var c,j,e,b,a=Ext.lib.Dom,k=Ext.lib.Event,i=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,h=0,g=0,d=Ext.isSafari?Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1]||2)>=3.1:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(g!=m||h!=l){c.fire(h=l,g=m)}},onWindowResize:function(n,m,l){if(!c){c=new Ext.util.Event();j=new Ext.util.DelayedTask(this.doResizeEvent);k.on(window,"resize",this.fireWindowResize,this)}c.addListener(n,m,l)},fireWindowResize:function(){if(c){if((Ext.isIE||Ext.isAir)&&j){j.delay(50)}else{c.fire(a.getViewWidth(),a.getViewHeight())}}},onTextResize:function(o,n,l){if(!e){e=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){e.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(o,n,l)},removeResizeListener:function(m,l){if(c){c.removeListener(m,l)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{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,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=45)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});(function(){var i=document;Ext.Element=function(n,o){var p=typeof n=="string"?i.getElementById(n):n,q;if(!p){return null}q=p.id;if(!o&&q&&Ext.Element.cache[q]){return Ext.Element.cache[q]}this.dom=p;this.id=q||Ext.id(p)};var a=Ext.lib.Dom,e=Ext.DomHelper,l=Ext.lib.Event,d=Ext.lib.Anim,g=Ext.Element;g.prototype={set:function(s,p){var q=this.dom,n,r;for(n in s){r=s[n];if(n!="style"&&!Ext.isFunction(r)){if(n=="cls"){q.className=r}else{if(s.hasOwnProperty(n)){if(p||!!q.setAttribute){q.setAttribute(n,r)}else{q[n]=r}}}}}if(s.style){Ext.DomHelper.applyStyles(q,s.style)}return this},defaultUnit:"px",is:function(n){return Ext.DomQuery.is(this.dom,n)},focus:function(q,p){var n=this,p=p||n.dom;try{if(Number(q)){n.focus.defer(q,null,[null,p])}else{p.focus()}}catch(o){}return n},blur:function(){try{this.dom.blur()}catch(n){}return this},getValue:function(n){var o=this.dom.value;return n?parseInt(o,10):o},addListener:function(n,q,p,o){Ext.EventManager.on(this.dom,n,q,p||this,o);return this},removeListener:function(n,p,o){Ext.EventManager.removeListener(this.dom,n,p,o||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},addUnits:function(n){if(n===""||n=="auto"||n===undefined){n=n||""}else{if(!isNaN(n)||!j.test(n)){n=n+(this.defaultUnit||"px")}}return n},load:function(o,p,n){Ext.Ajax.request(Ext.apply({params:p,url:o.url||o,callback:n,el:this.dom,indicatorText:o.indicatorText||""},Ext.isObject(o)?o:{}));return this},isBorderBox:function(){return h[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var n=this,o=n.dom;n.removeAllListeners();delete g.cache[o.id];delete g.dataCache[o.id];Ext.removeNode(o)},hover:function(o,n,q,p){var r=this;r.on("mouseenter",o,q||r.dom,p);r.on("mouseleave",n,q||r.dom,p);return r},contains:function(n){return !n?false:Ext.lib.Dom.isAncestor(this.dom,n.dom?n.dom:n)},getAttributeNS:function(o,n){return this.getAttribute(n,o)},getAttribute:Ext.isIE?function(n,p){var q=this.dom,o=typeof q[p+":"+n];if(["undefined","unknown"].indexOf(o)==-1){return q[p+":"+n]}return q[n]}:function(n,o){var p=this.dom;return p.getAttributeNS(o,n)||p.getAttribute(o+":"+n)||p.getAttribute(n)||p[n]},update:function(n){this.dom.innerHTML=n;return this}};var m=g.prototype;g.addMethods=function(n){Ext.apply(m,n)};m.on=m.addListener;m.un=m.removeListener;m.autoBoxAdjust=true;var j=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;g.cache={};g.dataCache={};g.get=function(o){var n,r,q;if(!o){return null}if(typeof o=="string"){if(!(r=i.getElementById(o))){return null}if(n=g.cache[o]){n.dom=r}else{n=g.cache[o]=new g(r)}return n}else{if(o.tagName){if(!(q=o.id)){q=Ext.id(o)}if(n=g.cache[q]){n.dom=o}else{n=g.cache[q]=new g(o)}return n}else{if(o instanceof g){if(o!=c){o.dom=i.getElementById(o.id)||o.dom;g.cache[o.id]=o}return o}else{if(o.isComposite){return o}else{if(Ext.isArray(o)){return g.select(o)}else{if(o==i){if(!c){var p=function(){};p.prototype=g.prototype;c=new p();c.dom=i}return c}}}}}}return null};g.data=function(o,n,p){var q=g.dataCache[o.id];if(!q){q=g.dataCache[o.id]={}}if(arguments.length==2){return q[n]}else{q[n]=p}};function k(){if(!Ext.enableGarbageCollector){clearInterval(g.collectorThread)}else{var n,o,p;for(n in g.cache){o=g.cache[n];p=o.dom;if(!p||!p.parentNode||(!p.offsetParent&&!i.getElementById(n))){delete g.cache[n];if(p&&Ext.enableListenerCollection){Ext.EventManager.removeAll(p)}}}}}g.collectorThreadId=setInterval(k,30000);var b=function(){};b.prototype=g.prototype;g.Flyweight=function(n){this.dom=n};g.Flyweight.prototype=new b();g.Flyweight.prototype.isFlyweight=true;g._flyweights={};g.fly=function(p,n){var o=null;n=n||"_global";if(p=Ext.getDom(p)){(g._flyweights[n]=g._flyweights[n]||new g.Flyweight()).dom=p;o=g._flyweights[n]}return o};Ext.get=g.get;Ext.fly=g.fly;var h=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){h.button=1}Ext.EventManager.on(window,"unload",function(){delete g.cache;delete g.dataCache;delete g._flyweights})})();Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!/\S/.test(g.nodeValue)){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(Ext.isFunction(callback)){callback()}return this}var id=Ext.id(),dom=this.dom;html+='<span id="'+id+'"></span>';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];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])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(Ext.isFunction(callback)){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},createProxy:function(a,e,d){a=Ext.isObject(a)?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.uncache=function(e){for(var d=0,c=arguments,b=c.length;d<b;d++){if(c[d]){delete Ext.Element.cache[c[d].id||c[d]]}}};Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,g,c,a,i,j){var h=this,e=h.dom;function d(){Ext.fly(e).alignTo(b,g,c,a);Ext.callback(j,Ext.fly(e))}Ext.EventManager.onWindowResize(d,h);if(!Ext.isEmpty(i)){Ext.EventManager.on(window,"scroll",d,h,{buffer:!isNaN(i)?i:50})}d.call(h);return h},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(A=="?"?"tl-bl?":(!/-/.test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(n<E){n=z?v.right:E}if(l+F>G+D){l=u?v.top-F:G+D-F}if(l<D){l=u?v.bottom:D}}return[n,l]},alignTo:function(c,a,e,b){var d=this;return d.setXY(d.getAlignToXY(c,a,e),d.preanim&&!!b?d.preanim(arguments,3):false)},adjustForConstraints:function(c,a,b){return this.getConstrainToXY(a||document,false,b,c)||c},getConstrainToXY:function(b,a,c,e){var d={top:0,left:0,bottom:0,right:0};return function(i,z,k,m){i=Ext.get(i);k=k?Ext.applyIf(k,d):d;var v,C,u=0,t=0;if(i.dom==document.body||i.dom==document){v=Ext.lib.Dom.getViewWidth();C=Ext.lib.Dom.getViewHeight()}else{v=i.dom.clientWidth;C=i.dom.clientHeight;if(!z){var r=i.getXY();u=r[0];t=r[1]}}var q=i.getScroll();u+=k.left+q.left;t+=k.top+q.top;v-=k.right;C-=k.bottom;var A=u+v;var g=t+C;var j=m||(!z?this.getXY():[this.getLeft(true),this.getTop(true)]);var o=j[0],n=j[1];var p=this.dom.offsetWidth,B=this.dom.offsetHeight;var l=false;if((o+p)>A){o=A-p;l=true}if((n+B)>g){n=g-B;l=true}if(o<u){o=u;l=true}if(n<t){n=t;l=true}return l?[o,n]:false}}(),getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(a){return this.alignTo(a||document,"c-c")}});Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k<l&&j!=g&&j!=i){if(e.is(j,m)){return h?a(j):j}k++;j=j.parentNode}return null},findParentNode:function(j,i,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(j,i,g):null},up:function(h,g){return this.findParentNode(h,g,true)},select:function(g,h){return Ext.Element.select(g,h,this.dom)},query:function(g,h){return e.select(g,this.dom)},child:function(g,h){var i=e.selectNode(g,this.dom);return h?i:a(i)},down:function(g,h){var i=e.selectNode(" > "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods(function(){var d=Ext.getDom,a=Ext.get,c=Ext.DomHelper,b=function(e){return(e.nodeType||e.dom||typeof e=="string")};return{appendChild:function(e){return a(e).appendTo(this)},appendTo:function(e){d(e).appendChild(this.dom);return this},insertBefore:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e);return this},insertAfter:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e.nextSibling);return this},insertFirst:function(g,e){g=g||{};if(b(g)){g=d(g);this.dom.insertBefore(g,this.dom.firstChild);return !e?a(g):g}else{return this.createChild(g,this.dom.firstChild,e)}},replace:function(e){e=a(e);this.insertBefore(e);e.remove();return this},replaceWith:function(g){var h=this,e=Ext.Element;if(b(g)){g=d(g);h.dom.parentNode.insertBefore(g,h.dom)}else{g=c.insertBefore(h.dom,g)}delete e.cache[h.id];Ext.removeNode(h.dom);h.id=Ext.id(h.dom=g);return e.cache[h.id]=h},createChild:function(g,e,h){g=g||{tag:"div"};return e?c.insertBefore(e,g,h!==true):c[!this.dom.firstChild?"overwrite":"append"](this.dom,g,h!==true)},wrap:function(e,g){var h=c.insertBefore(this.dom,e||{tag:"div"},!g);h.dom?h.dom.appendChild(this.dom):h.appendChild(this.dom);return h},insertHtml:function(g,h,e){var i=c.insertHtml(g,this.dom,h);return e?Ext.get(i):i}}}());Ext.apply(Ext.Element.prototype,function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{insertSibling:function(h,e,g){var i=this,d;if(Ext.isArray(h)){Ext.each(h,function(j){d=i.insertSibling(j,e,g)});return d}e=(e||"before").toLowerCase();h=h||{};if(h.nodeType||h.dom){d=i.dom.parentNode.insertBefore(c(h),e=="before"?i.dom:i.dom.nextSibling);if(!g){d=a(d)}}else{if(e=="after"&&!i.dom.nextSibling){d=b.append(i.dom.parentNode,h,!g)}else{d=b[e=="after"?"insertAfter":"insertBefore"](i.dom,h,!g)}}return d}}}());Ext.Element.addMethods(function(){var h={},y=/(-[a-z])/gi,b={},t=document.defaultView,v=Ext.isIE?"styleFloat":"cssFloat",D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,d="padding",c="margin",z="border",u="-left",r="-right",x="-top",o="-bottom",j="-width",s=Math,A="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:z+u+j,r:z+r+j,t:z+x+j,b:z+o+j},g={l:d+u,r:d+r,t:d+x,b:d+o},a={l:c+u,r:c+r,t:c+x,b:c+o},E=Ext.Element.data;function q(F,G){return G.charAt(1).toUpperCase()}function p(G,F){var H=0;Ext.each(G.match(/\w/g),function(I){if(I=parseInt(this.getStyle(F[I]),10)){H+=s.abs(I)}},this);return H}function w(F){return h[F]||(h[F]=F=="float"?v:F.replace(y,q))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(F){var G=this;Ext.each(F,function(H){G.dom.className+=(!G.hasClass(H)&&H?" "+H:"")});return G},radioClass:function(F){Ext.each(this.dom.parentNode.childNodes,function(G){if(G.nodeType==1){Ext.fly(G,"_internal").removeClass(F)}});return this.addClass(F)},removeClass:function(F){var G=this;if(G.dom.className){Ext.each(F,function(H){G.dom.className=G.dom.className.replace(b[H]=b[H]||new RegExp("(?:^|\\s+)"+H+"(?:\\s+|$)","g")," ")})}return G},toggleClass:function(F){return this.hasClass(F)?this.removeClass(F):this.addClass(F)},hasClass:function(F){return F&&(" "+this.dom.className+" ").indexOf(" "+F+" ")!=-1},replaceClass:function(G,F){return this.removeClass(G).addClass(F)},isStyle:function(F,G){return this.getStyle(F)==G},getStyle:function(){return t&&t.getComputedStyle?function(I){var H=this.dom,F,G;if(H==document){return null}I=w(I);return(F=H.style[I])?F:(G=t.getComputedStyle(H,""))?G[I]:null}:function(J){var H=this.dom,F,G;if(H==document){return null}if(J=="opacity"){if(H.style.filter.match){if(F=H.style.filter.match(D)){var I=parseFloat(F[1]);if(!isNaN(I)){return I?I/100:0}}}return 1}J=w(J);return H.style[J]||((G=H.currentStyle)?G[J]:null)}}(),getColor:function(F,G,K){var I=this.getStyle(F),H=K||"#",J;if(!I||/transparent|inherit/.test(I)){return G}if(/^r/.test(I)){Ext.each(I.slice(4,I.length-1).split(","),function(L){J=parseInt(L,10);H+=(J<16?"0":"")+J.toString(16)})}else{I=I.replace("#","");H+=I.length==3?I.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):I}return(H.length>5?H.toLowerCase():G)},setStyle:function(J,I){var G,H,F;if(!Ext.isObject(J)){G={};G[J]=I;J=G}for(H in J){I=J[H];H=="opacity"?this.setOpacity(I):this.dom.style[w(H)]=I}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,I=G.dom,F=s.max(I.offsetHeight,I.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,I=H.dom,F=s.max(I.offsetWidth,I.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return p.call(this,F,i)},getPadding:function(F){return p.call(this,F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,A);F.setStyle(n,A);F.setStyle(m,A)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:p,margins:a}}());Ext.Element.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>';Ext.Element.addMethods(function(){var a="_internal";return{applyStyles:function(b){Ext.DomHelper.applyStyles(this.dom,b);return this},getStyles:function(){var b={};Ext.each(arguments,function(c){b[c]=this.getStyle(c)},this);return b},getStyleSize:function(){var g=this,b,e,i=this.dom,c=i.style;if(c.width&&c.width!="auto"){b=parseInt(c.width,10);if(g.isBorderBox()){b-=g.getFrameWidth("lr")}}if(c.height&&c.height!="auto"){e=parseInt(c.height,10);if(g.isBorderBox()){e-=g.getFrameWidth("tb")}}return{width:b||g.getWidth(true),height:e||g.getHeight(true)}},setOverflow:function(b){var c=this.dom;if(b=="auto"&&Ext.isMac&&Ext.isGecko2){c.style.overflow="hidden";(function(){c.style.overflow="auto"}).defer(1)}else{c.style.overflow=b}},boxWrap:function(b){b=b||"x-box";var c=Ext.get(this.insertHtml("beforeBegin","<div class='"+b+"'>"+String.format(Ext.Element.boxMarkup,b)+"</div>"));Ext.DomQuery.selectNode("."+b+"-mc",c.dom).appendChild(this.dom);return c},setSize:function(d,b,c){var e=this;if(Ext.isObject(d)){b=d.height;d=d.width}d=e.adjustWidth(d);b=e.adjustHeight(b);if(!c||!e.anim){e.dom.style.width=e.addUnits(d);e.dom.style.height=e.addUnits(b)}else{e.anim({width:{to:d},height:{to:b}},e.preanim(arguments,2))}return e},getComputedHeight:function(){var c=this,b=Math.max(c.dom.offsetHeight,c.dom.clientHeight);if(!b){b=parseInt(c.getStyle("height"),10)||0;if(!c.isBorderBox()){b+=c.getFrameWidth("tb")}}return b},getComputedWidth:function(){var b=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!b){b=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){b+=this.getFrameWidth("lr")}}return b},getFrameWidth:function(c,b){return b&&this.isBorderBox()?0:(this.getPadding(c)+this.getBorderWidth(c))},addClassOnOver:function(b){this.hover(function(){Ext.fly(this,a).addClass(b)},function(){Ext.fly(this,a).removeClass(b)});return this},addClassOnFocus:function(b){this.on("focus",function(){Ext.fly(this,a).addClass(b)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(b)},this.dom);return this},addClassOnClick:function(b){var c=this.dom;this.on("mousedown",function(){Ext.fly(c,a).addClass(b);var g=Ext.getDoc(),e=function(){Ext.fly(c,a).removeClass(b);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var e=document,g=this.dom,c=Ext.lib.Dom,b=(g==e||g==e.body);return{width:(b?c.getViewWidth():g.clientWidth),height:(b?c.getViewHeight():g.clientHeight)}},getSize:function(b){return{width:this.getWidth(b),height:this.getHeight(b)}},repaint:function(){var b=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(b).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(c){var d=this,b,e={t:"top",l:"left",r:"right",b:"bottom"},g={};if(!c){for(b in d.margins){g[e[b]]=parseInt(d.getStyle(d.margins[b]),10)||0}return g}else{return d.addStyles.call(d,c,d.margins)}}}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";function l(n,m,o){return this.preanim&&!!m?this.preanim(n,o):false}Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(m){var p=this.getXY(),n=Ext.fly(m,"_internal").getXY();return[p[0]-n[0],p[1]-n[1]]},setX:function(m,n){return this.setXY([m,this.getY()],l.call(this,arguments,n,1))},setY:function(n,m){return this.setXY([this.getX(),n],l.call(this,arguments,m,1))},setLeft:function(m){this.setStyle(b,this.addUnits(m));return this},setTop:function(m){this.setStyle(d,this.addUnits(m));return this},setRight:function(m){this.setStyle(g,this.addUnits(m));return this},setBottom:function(m){this.setStyle(i,this.addUnits(m));return this},setXY:function(o,m){var n=this;if(!m||!n.anim){a.setXY(n.dom,o)}else{n.anim({points:{to:o}},n.preanim(arguments,1),"motion")}return n},setLocation:function(m,o,n){return this.setXY([m,o],l.call(this,arguments,n,2))},moveTo:function(m,o,n){return this.setXY([m,o],l.call(this,arguments,n,2))},getLeft:function(m){return !m?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(m){var n=this;return !m?n.getX()+n.getWidth():(n.getLeft(true)+n.getWidth())||0},getTop:function(m){return !m?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(m){var n=this;return !m?n.getY()+n.getHeight():(n.getTop(true)+n.getHeight())||0},position:function(q,p,m,o){var n=this;if(!q&&n.isStyle(h,c)){n.setStyle(h,e)}else{if(q){n.setStyle(h,q)}}if(p){n.setStyle(k,p)}if(m||o){n.setXY([m||false,o||false])}},clearPositioning:function(m){m=m||"";this.setStyle({left:m,right:m,top:m,bottom:m,"z-index":"",position:c});return this},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)}},setPositioning:function(m){var o=this,n=o.dom.style;o.setStyle(m);if(m.right==j){n.right=""}if(m.bottom==j){n.bottom=""}return o},translatePoints:function(m,u){u=isNaN(m[1])?u:m[1];m=isNaN(m[0])?m:m[0];var q=this,r=q.isStyle(h,e),s=q.getXY(),n=parseInt(q.getStyle(b),10),p=parseInt(q.getStyle(d),10);n=!isNaN(n)?n:(r?0:q.dom.offsetLeft);p=!isNaN(p)?p:(r?0:q.dom.offsetTop);return{left:(m-s[0]+n),top:(u-s[1]+p)}},animTest:l})})();Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.addMethods({scrollTo:function(c,e,b){var a=/top/i,h="scroll"+(a.test(c)?"Top":"Left"),d=this,g=d.dom;if(!b||!d.anim){g[h]=e}else{d.anim({scroll:{to:a.test(h)?[g[h],e]:[e,g[h]]}},d.preanim(arguments,2),"scroll")}return d},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||u<m){p.scrollTop=u}else{if(q>j){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||k<s){p.scrollLeft=k}else{if(d>n){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",j="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,i=function(m){var l=g(m,a);if(l===undefined){g(m,a,l="")}return l},k=function(n){var l=g(n,c);if(l===undefined){g(n,c,l=1)}return l};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(l){g(this.dom,c,l);return this},animate:function(m,o,n,p,l){this.anim(m,{duration:o,callback:n,easing:p},l);return this},anim:function(o,p,m,r,n,l){m=m||"run";p=p||{};var q=this,s=Ext.lib.Anim[m](q.dom,o,(p.duration||r)||0.35,(p.easing||n)||"easeOut",function(){if(l){l.call(q)}if(p.callback){p.callback.call(p.scope||q,q,p)}},q);p.anim=s;return s},preanim:function(l,m){return !l[m]?false:(Ext.isObject(l[m])?l[m]:{duration:l[m+1],callback:l[m+2],easing:l[m+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,j)},setVisible:function(p,m){var n=this,o=n.dom,l=k(this.dom)==e;if(!m||!n.anim){if(l){n.setDisplayed(p)}else{n.fixDisplay();o.style.visibility=p?"visible":b}}else{if(p){n.setOpacity(0.01);n.setVisible(true)}n.anim({opacity:{to:(p?1:0)}},n.preanim(arguments,1),null,0.35,"easeIn",function(){if(!p){o.style[l?d:h]=(l)?j:b;Ext.fly(o).setOpacity(1)}})}return n},toggle:function(l){var m=this;m.setVisible(!m.isVisible(),m.preanim(arguments,0));return m},setDisplayed:function(l){if(typeof l=="boolean"){l=l?i(this.dom):j}this.setStyle(d,l);return this},fixDisplay:function(){var l=this;if(l.isStyle(d,j)){l.setStyle(h,b);l.setStyle(d,i(this.dom));if(l.isStyle(d,j)){l.setStyle(d,"block")}}},hide:function(l){this.setVisible(false,this.preanim(arguments,0));return this},show:function(l){this.setVisible(true,this.preanim(arguments,0));return this}}}());Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!/body/i.test(k.tagName)){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(p.getStyle("position")=="static"){p.addClass(g)}if((i=e(l,"maskMsg"))){i.remove()}if((i=e(l,"mask"))){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined)}k.removeClass([c,g])},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";if(Ext.isIE&&Ext.isSecure){i.src=Ext.SSL_SECURE_URL}j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(!Ext.isObject(b)||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{visbility:w,position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=this;if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(B,E,D){var C=this.dom;p(C).clearPositioning();p(C).setPositioning(E);if(!D.wrap){B.parentNode.insertBefore(C,B);p(B).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,E=B.id,D=!C.concurrent;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(D){c(E).shift()}if(C.callback){C.callback.call(C.scope,p(B))}if(D){p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getCount:function(){return this.elements.length},add:function(b){if(b){if(Ext.isArray(b)){this.elements=this.elements.concat(b)}else{var a=this.elements;Ext.each(b,function(c){a.push(c)})}}return this},invoke:function(d,a){var b=this.elements,c=this.el;Ext.each(b,function(g){c.dom=g;Ext.Element.prototype[d].apply(c,a)});return this},item:function(a){var b=this;if(!b.elements[a]){return null}b.el.dom=b.elements[a];return b.el},addListener:function(a,d,c,b){Ext.each(this.elements,function(g){Ext.EventManager.on(g,a,d,c||g,b)});return this},each:function(c,b){var d=this,a=d.el;Ext.each(d.elements,function(h,g){a.dom=h;return c.call(b||a,a,d,g)});return d},indexOf:function(a){return this.elements.indexOf(Ext.getDom(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},fill:function(a){this.elements=[];this.add(a);return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},filter:function(a){var b=[];this.each(function(c){if(c.is(a)){b[b.length]=c.dom}});this.fill(b);return this},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=function(b,a){this.elements=[];this.add(b,a)};Ext.extend(Ext.CompositeElement,Ext.CompositeElementLite,{invoke:function(b,a){Ext.each(this.elements,function(c){Ext.Element.prototype[b].apply(c,a)});return this},add:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},item:function(a){return this.elements[a]||null},indexOf:function(a){return this.elements.indexOf(Ext.get(a))},filter:function(a){var c=this,b=[];Ext.each(c.elements,function(d){if(d.is(a)){b.push(Ext.get(d))}});c.elements=b;return c},each:function(b,a){Ext.each(this.elements,function(d,c){return b.call(a||d,d,this,c)},this);return this}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var c="beforerequest",l="requestcomplete",k="requestexception",e=undefined,i="load",h="POST",j="GET",g=window;Ext.data.Connection=function(m){Ext.apply(this,m);this.addEvents(c,l,k);Ext.data.Connection.superclass.constructor.call(this)};function b(m){this.transId=false;var n=m.argument.options;m.argument=n?n.argument:null;this.fireEvent(l,this,m,n);if(n.success){n.success.call(n.scope,m,n)}if(n.callback){n.callback.call(n.scope,n,true,m)}}function d(m,o){this.transId=false;var n=m.argument.options;m.argument=n?n.argument:null;this.fireEvent(k,this,m,n,o);if(n.failure){n.failure.call(n.scope,m,n)}if(n.callback){n.callback.call(n.scope,n,false,m)}}function a(t,m,n){var p=Ext.id(),z=document,u=z.createElement("iframe"),q=Ext.getDom(t.form),y=[],x,s="multipart/form-data",r={target:q.target,method:q.method,encoding:q.encoding,enctype:q.enctype,action:q.action};Ext.apply(u,{id:p,name:p,className:"x-hidden",src:Ext.SSL_SECURE_URL});z.body.appendChild(u);if(Ext.isIE){document.frames[p].name=p}Ext.apply(q,{target:p,method:h,enctype:s,encoding:s,action:n||r.action});m=Ext.urlDecode(m,false);for(var w in m){if(m.hasOwnProperty(w)){x=z.createElement("input");x.type="hidden";x.value=m[x.name=w];q.appendChild(x);y.push(x)}}function v(){var B=this,A={responseText:"",responseXML:null,argument:t.argument},E,D;try{E=u.contentWindow.document||u.contentDocument||g.frames[p].document;if(E){if(E.body){if(/textarea/i.test((D=E.body.firstChild||{}).tagName)){A.responseText=D.value}else{A.responseText=E.body.innerHTML}}A.responseXML=E.XMLDocument||E}}catch(C){}Ext.EventManager.removeListener(u,i,v,B);B.fireEvent(l,B,A,t);function o(H,G,F){if(Ext.isFunction(H)){H.apply(G,F)}}o(t.success,t.scope,[A,t]);o(t.callback,t.scope,[t,true,A]);if(!B.debugUploads){setTimeout(function(){Ext.removeNode(u)},100)}}Ext.EventManager.on(u,i,v,this);q.submit();Ext.apply(q,r);Ext.each(y,function(o){Ext.removeNode(o)})}Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(s){var v=this;if(v.fireEvent(c,v,s)){if(s.el){if(!Ext.isEmpty(s.indicatorText)){v.indicatorText='<div class="loading-indicator">'+s.indicatorText+"</div>"}if(v.indicatorText){Ext.getDom(s.el).innerHTML=v.indicatorText}s.success=(Ext.isFunction(s.success)?s.success:function(){}).createInterceptor(function(o){Ext.getDom(s.el).innerHTML=o.responseText})}var q=s.params,n=s.url||v.url,m,t={success:b,failure:d,scope:v,argument:{options:s},timeout:s.timeout||v.timeout},r,w;if(Ext.isFunction(q)){q=q.call(s.scope||g,s)}q=Ext.urlEncode(v.extraParams,Ext.isObject(q)?Ext.urlEncode(q):q);if(Ext.isFunction(n)){n=n.call(s.scope||g,s)}if((r=Ext.getDom(s.form))){n=n||r.action;if(s.isUpload||/multipart\/form-data/i.test(r.getAttribute("enctype"))){return a.call(v,s,q,n)}w=Ext.lib.Ajax.serializeForm(r);q=q?(q+"&"+w):w}m=s.method||v.method||((q||s.xmlData||s.jsonData)?h:j);if(m===j&&(v.disableCaching&&s.disableCaching!==false)||s.disableCaching===true){var u=s.disableCachingParam||v.disableCachingParam;n=Ext.urlAppend(n,u+"="+(new Date().getTime()))}s.headers=Ext.apply(s.headers||{},v.defaultHeaders||{});if(s.autoAbort===true||v.autoAbort){v.abort()}if((m==j||s.xmlData||s.jsonData)&&q){n=Ext.urlAppend(n,q);q=""}return(v.transId=Ext.lib.Ajax.request(m,n,t,q,s))}else{return s.callback?s.callback.apply(s.scope,[s,e,e]):null}},isLoading:function(m){return m?Ext.lib.Ajax.isCallInProgress(m):!!this.transId},abort:function(m){if(m||this.isLoading()){Ext.lib.Ajax.abort(m||this.transId)}}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='<div class="loading-indicator">'+h.text+"</div>"}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>',loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false")};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},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(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.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 k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":Date.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=new Date(o,c-1,n,k,g,j,e);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parseDate:function(d,g,c){var e=Date.parseFunctions;if(e[g]==null){Date.createParser(g)}return e[g](d,Ext.isDefined(c)?c:Date.useStrict)},getFormatCode:function(d){var c=Date.formatCodes[d];if(c){c=typeof c=="function"?c():c;Date.formatCodes[d]=c}return c||("'"+String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+String.escape(e)+"'")}else{g.push(Date.getFormatCode(e))}}}Date.formatFunctions[h]=new Function("return "+g.join("+"))},createParser:function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = y >= 0? y : Ext.num(def.y, dt.getFullYear());","m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());","d = d >= 0? d : Ext.num(def.d, dt.getDate());","h  = h || Ext.num(def.h, dt.getHours());","i  = i || Ext.num(def.i, dt.getMinutes());","s  = s || Ext.num(def.s, dt.getSeconds());","ms = ms || Ext.num(def.ms, dt.getMilliseconds());","if(z >= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j<m.length;++j){d=m.charAt(j);if(!k&&d=="\\"){k=true}else{if(k){k=false;l.push(String.escape(d))}else{var h=a(d,n);n+=h.g;l.push(h.s);if(h.g&&h.c){g.push(h.c)}}}}Date.parseRegexes[e]=new RegExp("^"+l.join("")+"$","i");Date.parseFunctions[m]=new Function("input","strict",b(c,e,g.join("")))}}(),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 c=[],d=0;d<7;c.push(Date.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.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:1,c:"z = parseInt(results[{0}], 10);\n",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 c=[],d=0;d<12;c.push(Date.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a("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 a("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 a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("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),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","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),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","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:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})}());Ext.apply(Date.prototype,{dateFormat:function(a){if(Date.formatFunctions[a]==null){Date.createFormat(a)}return Date.formatFunctions[a].call(this)},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.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var c=0,b=0,e=this.clone(),a=this.getMonth();for(c=0,e.setMonth(0);c<a;e.setMonth(++c)){b+=e.getDaysInMonth()}return b+this.getDate()-1},getWeekOfYear:function(){var a=86400000,b=7*a;return function(){var d=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/a,c=Math.floor(d/7),e=new Date(c*b).getUTCFullYear();return c-Math.floor(Date.UTC(e,0,7)/b)+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(){return this.getLastDateOfMonth().getDay()},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){var a=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var b=this.getMonth();return b==1&&this.isLeapYear()?29:a[b]}}(),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())},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset()},clearTime:function(g){if(g){return this.clone().clearTime()}var b=this.getDate();this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(this.getDate()!=b){for(var a=1,e=this.add(Date.HOUR,a);e.getDate()!=b;a++,e=this.add(Date.HOUR,a)){}this.setDate(b);this.setHours(e.getHours())}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&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};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){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d<a;d++){this.add(b[d])}}else{for(var c in e){if(this.allowFunctions||typeof e[c]!="function"){this.add(c,e[c])}}}},each:function(e,d){var b=[].concat(this.items);for(var c=0,a=b.length;c<a;c++){if(e.call(d||b[c],b[c],c,a)===false){break}}},eachKey:function(d,c){for(var b=0,a=this.keys.length;b<a;b++){d.call(c||window,this.keys[b],this.items[b],b,a)}},find:function(d,c){for(var b=0,a=this.items.length;b<a;b++){if(d.call(c||window,this.items[b],this.keys[b])){return this.items[b]}}return null},insert:function(a,b,c){if(arguments.length==2){c=arguments[1];b=this.getKey(c)}if(this.containsKey(b)){this.suspendEvents();this.removeKey(b);this.resumeEvents()}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(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return !Ext.isFunction(c)||this.allowFunctions?c: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(m,a,l){var e,g,d=String(a).toUpperCase()=="DESC"?-1:1,j=[],b=this.keys,h=this.items;l=l||function(i,c){return i-c};for(e=0,g=h.length;e<g;e++){j[j.length]={key:b[e],value:h[e],index:e}}j.sort(function(i,c){var k=l(i[m],c[m])*d;if(k===0){k=(i.index<c.index?-1:1)}return k});for(e=0,g=j.length;e<g;e++){h[e]=j[e].value;b[e]=j[e].key}this.fireEvent("sort",this)},sort:function(a,b){this._sort("value",a,b)},keySort:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})},getRange:function(e,a){var b=this.items;if(b.length<1){return[]}e=e||0;a=Math.min(typeof a=="undefined"?this.length-1:a,this.length-1);var c,d=[];if(e<=a){for(c=e;c<=a;c++){d[d.length]=b[c]}}else{for(c=e;c>=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){h.add(b[c],d[c])}}return h},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(g,e,h){var b=this.keys,d=this.items;for(var c=(h||0),a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){return c}}return -1},createValueMatcher:function(b,c,a){if(!b.exec){b=String(b);b=new RegExp((c===true?"":"^")+Ext.escapeRe(b),a?"":"i")}return b},clone:function(){var e=new Ext.util.MixedCollection();var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){e.add(b[c],d[c])}e.getKey=this.getKey;return e}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Object.prototype.toString.apply(o)==="[object Date]"){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(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},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+'"'},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(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json){if(!dc){dc=isNative()?JSON.parse:doDecode}return dc(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,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2);var index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{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)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length)}else{if(2<psplit.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+format)}else{v=v.toFixed(0)}}var fnum=v.toString();if(hasComma){psplit=fnum.split(".");var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3}parr[parr.length]=cnum.substr(i,n);m-=1}fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1]}}return(neg?"-":"")+format.replace(/[\d,?\.?]+/,fnum)},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format)}},plural:function(v,s,p){return v+" "+(v==1?s:(p?p:s+"s"))},nl2br:function(v){return v===undefined||v===null?"":v.replace(/\n/g,"<br/>")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var w=this,i=w.html,p=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^<tpl\b[^>]*?for="(.*?)"/,t=/^<tpl\b[^>]*?if="(.*?)"/,v=/^<tpl\b[^>]*?exec="(.*?)"/,q,o=0,j=[],n="values",u="parent",k="xindex",l="xcount",e="return ",c="with(values){ ";i=["<tpl>",i,"</tpl>"].join("");while((q=i.match(p))){var b=q[0].match(d),a=q[0].match(t),y=q[0].match(v),g=null,h=null,r=null,x=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(n,u,k,l,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(y){g=y&&y[1]?y[1]:null;if(g){r=new Function(n,u,k,l,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(x){switch(x){case".":x=new Function(n,u,c+e+n+"; }");break;case"..":x=new Function(n,u,c+e+u+"; }");break;default:x=new Function(n,u,c+e+x+"; }")}}j.push({id:o,target:x,exec:r,test:h,body:q[1]||""});i=i.replace(q[0],"{xtpl"+o+"}");++o}Ext.each(j,function(m){w.compileTpl(m)});w.master=j[j.length-1];w.tpls=j};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,i,h,d,c){var g=this,e,k=g.tpls[a],j,b=[];if((k.test&&!k.test.call(g,i,h,d,c))||(k.exec&&k.exec.call(g,i,h,d,c))){return""}j=k.target?k.target.call(g,i,h):i;e=j.length;h=k.target?i:h;if(k.target&&Ext.isArray(j)){Ext.each(j,function(l,m){b[b.length]=k.compiled.call(g,l,h,m+1,e)});return b.join("")}return k.compiled.call(g,j,h,d,c)},compileTpl:function(tpl){var fm=Ext.util.Format,useF=this.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(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+"'"}function codeFn(m,code){return"'"+sep+"("+code+")"+sep+"'"}if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(a){a=Ext.getDom(a);return new Ext.XTemplate(a.value||a.innerHTML)};Ext.util.CSS=function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{createStyleSheet:function(i,l){var h;var g=c.getElementsByTagName("head")[0];var k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=c.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){this.removeStyleSheet(h);var g=c.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",h);g.setAttribute("href",e);c.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(h){if(!d){d={}}try{var k=h.cssRules||h.rules;for(var g=k.length-1;g>=0;--g){d[k[g].selectorText]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j<g;j++){try{this.cacheStyleSheet(k[j])}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j]]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){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");if(!this.disabled){this.disabled=true;this.enable()}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,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.purgeListeners()},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.isKeydown()){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.isKeydown()){this.el.un("keydown",this.relay,this)}else{this.el.un("keydown",this.prepareEvent,this);this.el.un("keypress",this.relay,this)}this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};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(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c<d;c++){h.push(e.charCodeAt(c))}k=h}var a=Ext.isArray(k);var i=function(o){if(this.checkModifiers(b,o)){var m=o.getKey();if(a){for(var n=0,j=k.length;n<j;n++){if(k[n]==m){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o);return}}}else{if(m==k){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o)}}}};this.bindings.push(i)},checkModifiers:function(b,h){var j,d,g=["shift","ctrl","alt"];for(var c=0,a=g.length;c<a;++c){d=g[c];j=b[d];if(!(j===undefined||(j===h[d+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(typeof b=="object"&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},handleKeyDown:function(g){if(this.enabled){var c=this.bindings;for(var d=0,a=c.length;d<a;d++){c[d].call(this,g)}}},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}},setDisabled:function(a){this[a?"disable":"enable"]()}};Ext.util.TextMetrics=function(){var a;return{measure:function(b,c,d){if(!a){a=Ext.util.TextMetrics.Instance(b,d)}a.bind(b);a.setFixedWidth(d||"auto");return a.getSize(c)},createInstance:function(b,c){return Ext.util.TextMetrics.Instance(b,c)}}}();Ext.util.TextMetrics.Instance=function(b,d){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.position("absolute");c.setLeftTop(-1000,-1000);c.hide();if(d){c.setWidth(d)}var a={getSize:function(g){c.update(g);var e=c.getSize();c.update("");return e},bind:function(e){c.setStyle(Ext.fly(e).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(e){c.setWidth(e)},getWidth:function(e){c.dom.style.width="auto";return this.getSize(e).width},getHeight:function(e){return this.getSize(e).height}};a.bind(b);return a};Ext.Element.addMethods({getTextWidth:function(c,b,a){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width).constrain(b||0,a||1000000)}});Ext.util.Cookies={set:function(c,e){var a=arguments;var i=arguments.length;var b=(i>2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return Ext.util.Cookies.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a){if(Ext.util.Cookies.get(a)){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT"}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}};Ext.handleError=function(a){throw a};Ext.Error=function(a){this.message=(this.lang[a])?this.lang[a]:a};Ext.Error.prototype=new Error();Ext.apply(Ext.Error.prototype,{lang:{},name:"Ext.Error",getName:function(){return this.name},getMessage:function(){return this.message},toJson:function(){return Ext.encode(this)}});Ext.ComponentMgr=function(){var c=new Ext.util.MixedCollection();var b={};var a={};return{register:function(d){c.add(d)},unregister:function(d){c.remove(d)},get:function(d){return c.get(d)},onAvailable:function(g,e,d){c.on("add",function(h,i){if(i.id==g){e.call(d||i,i);c.un("add",e,d)}})},all:c,isRegistered:function(d){return b[d]!==undefined},registerType:function(e,d){b[e]=d;d.xtype=e},create:function(d,e){return d.render?d:new b[d.xtype||e](d)},registerPlugin:function(e,d){a[e]=d;d.ptype=e},createPlugin:function(d,e){return new a[d.ptype||e](d)}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create;Ext.Component=function(b){b=b||{};if(b.initialConfig){if(b.isAction){this.baseAction=b}b=b.initialConfig}else{if(b.tagName||b.dom||Ext.isString(b)){b={applyTo:b,id:b.id||b}}}this.initialConfig=b;Ext.apply(this,b);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","afterrender","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,{disabled:false,hidden:false,autoEl:"div",disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initPlugin:function(a){if(a.ptype&&!Ext.isFunction(a.init)){a=Ext.ComponentMgr.createPlugin(a)}else{if(Ext.isString(a)){a=Ext.ComponentMgr.createPlugin({ptype: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(Ext.isNumber(a)){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}if(this.overCls){this.el.addClassOnOver(this.overCls)}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.doHide()}if(this.disabled){this.disable(true)}if(this.stateful!==false){this.initStateEvents()}this.initRef();this.fireEvent("afterrender",this)}return this},initRef:function(){if(this.ref){var d=this.ref.split("/");var c=d.length,b=0;var a=this;while(b<c){if(a.ownerCt){a=a.ownerCt}b++}a[d[--b]]=this}},initState:function(a){if(Ext.state.Manager){var c=this.getStateId();if(c){var b=Ext.state.Manager.get(c);if(b){if(this.fireEvent("beforestaterestore",this,b)!==false){this.applyState(b);this.fireEvent("staterestore",this,b)}}}}},getStateId:function(){return this.stateId||((this.id.indexOf("ext-comp-")==0||this.id.indexOf("ext-gen")==0)?null:this.id)},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&&this.stateful!==false){var b=this.getStateId();if(b){var a=this.getState();if(this.fireEvent("beforestatesave",this,a)!==false){Ext.state.Manager.set(b,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}return this},removeClass:function(a){if(this.el){this.el.removeClass(a)}else{if(this.cls){this.cls=this.cls.split(" ").remove(a).join(" ")}}return this},onRender:function(b,a){if(!this.el&&this.autoEl){if(Ext.isString(this.autoEl)){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)}}},getAutoCreate:function(){var a=Ext.isObject(this.autoCreate)?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.removeMode=="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(Ext.isNumber(a)?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(a){if(this.rendered){this.onDisable()}this.disabled=true;if(a!==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){return this[a?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender){this.render(Ext.isBoolean(this.autoRender)?Ext.getBody():this.autoRender)}if(this.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){this.getVisibiltyEl().removeClass("x-hide-"+this.hideMode)},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.doHide();this.fireEvent("hide",this)}return this},doHide:function(){this.hidden=true;if(this.rendered){this.onHide()}},onHide:function(){this.getVisibiltyEl().addClass("x-hide-"+this.hideMode)},getVisibiltyEl:function(){return this.hideParent?this.container:this.getActionEl()},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(){return this.rendered&&this.getVisibiltyEl().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){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.constructor.xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.constructor.xtype==b},getXTypes:function(){var a=this.constructor;if(!a.xtypes){var d=[],b=this;while(b&&b.constructor.xtype){d.unshift(b.constructor.xtype);b=b.constructor.superclass}a.xtypeChain=d;a.xtypes=d.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 Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.findParentBy(function(b){return b.constructor.xtype===a})},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl()},purgeListeners:function(){Ext.Component.superclass.purgeListeners.call(this);if(this.mons){this.on("beforedestroy",this.clearMons,this,{single:true})}},clearMons:function(){Ext.each(this.mons,function(a){a.item.un(a.ename,a.fn,a.scope)},this);this.mons=[]},mon:function(g,b,d,c,a){if(!this.mons){this.mons=[];this.on("beforedestroy",this.clearMons,this,{single:true})}if(Ext.isObject(b)){var j=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var i=b;for(var h in i){if(j.test(h)){continue}if(Ext.isFunction(i[h])){this.mons.push({item:g,ename:h,fn:i[h],scope:i.scope});g.on(h,i[h],i.scope,i)}else{this.mons.push({item:g,ename:h,fn:i[h],scope:i.scope});g.on(h,i[h])}}return}this.mons.push({item:g,ename:b,fn:d,scope:c});g.on(b,d,c,a)},mun:function(h,c,g,e){var j,d;for(var b=0,a=this.mons.length;b<a;++b){d=this.mons[b];if(h===d.item&&c==d.ename&&g===d.fn&&e===d.scope){this.mons.splice(b,1);h.un(c,g,e);j=true;break}}return j},nextSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a!=-1&&a+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(a+1)}}return null},previousSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a>0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]};Ext.Action.prototype={isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;c<a;c++){d[c][e].apply(d[c],b)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){this.items.remove(a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments)}};(function(){Ext.Layer=function(d,c){d=d||{};var e=Ext.DomHelper;var h=d.parentEl,g=h?Ext.getDom(h):document.body;if(c){this.dom=Ext.getDom(c)}if(!this.dom){var i=d.dh||{tag:"div",cls:"x-layer"};this.dom=e.append(g,i)}if(d.cls){this.addClass(d.cls)}this.constrain=d.constrain!==false;this.setVisibilityMode(Ext.Element.VISIBILITY);if(d.id){this.id=this.dom.id=d.id}else{this.id=Ext.id(this.dom)}this.zindex=d.zindex||this.getZIndex();this.position("absolute",this.zindex);if(d.shadow){this.shadowOffset=d.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:d.shadow})}else{this.shadowOffset=0}this.useShim=d.shim!==false&&Ext.useShims;this.useDisplay=d.useDisplay;this.hide()};var a=Ext.Element.prototype;var b=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11000},getShim:function(){if(!this.useShim){return null}if(this.shim){return this.shim}var d=b.shift();if(!d){d=this.createShim();d.enableDisplayMode("block");d.dom.style.display="none";d.dom.style.visibility="visible"}var c=this.dom.parentNode;if(d.dom.parentNode!=c){c.insertBefore(d.dom,this.dom)}d.setStyle("z-index",this.getZIndex()-2);this.shim=d;return d},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);b.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(c){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(c){this.sync(true)}}},sync:function(c){var k=this.shadow;if(!this.updating&&this.isVisible()&&(k||this.useShim)){var g=this.getShim();var j=this.getWidth(),e=this.getHeight();var d=this.getLeft(true),m=this.getTop(true);if(k&&!this.shadowDisabled){if(c&&!k.isVisible()){k.show(this)}else{k.realign(d,m,j,e)}if(g){if(c){g.show()}var i=k.adjusts,n=g.dom.style;n.left=(Math.min(d,d+i.l))+"px";n.top=(Math.min(m,m+i.t))+"px";n.width=(j+i.w)+"px";n.height=(e+i.h)+"px"}}else{if(g){if(c){g.show()}g.setSize(j,e);g.setLeftTop(d,m)}}}},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 j=Ext.lib.Dom.getViewWidth(),d=Ext.lib.Dom.getViewHeight();var o=Ext.getDoc().getScroll();var n=this.getXY();var k=n[0],i=n[1];var c=this.shadowOffset;var l=this.dom.offsetWidth+c,e=this.dom.offsetHeight+c;var g=false;if((k+l)>j+o.left){k=j-l-c;g=true}if((i+e)>d+o.top){i=d-e-c;g=true}if(k<o.left){k=o.left;g=true}if(i<o.top){i=o.top;g=true}if(g){if(this.avoidY){var m=this.avoidY;if(i<=m&&(i+e)>=m){i=m-e-5}}n=[k,i];this.storeXY(n);a.setXY.call(this,n);this.sync()}}return this},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,k,l,j){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(l){l()}}.createDelegate(this);a.setVisible.call(this,true,true,k,g,j)}else{if(!i){this.hideUnders(true)}var g=l;if(h){g=function(){this.hideAction();if(l){l()}}.createDelegate(this)}a.setVisible.call(this,i,h,k,g,j);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(j,h,k,l,i){this.fixDisplay();this.beforeAction();this.storeXY(j);var g=this.createCB(l);a.setXY.call(this,j,h,k,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,j,k,i){this.setXY([g,this.getY()],h,j,k,i);return this},setY:function(k,g,i,j,h){this.setXY([this.getX(),k],g,i,j,h);return this},setSize:function(j,k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setSize.call(this,j,k,i,m,g,l);if(!i){g()}return this},setWidth:function(i,h,k,l,j){this.beforeAction();var g=this.createCB(l);a.setWidth.call(this,i,h,k,g,j);if(!h){g()}return this},setHeight:function(j,i,l,m,k){this.beforeAction();var g=this.createCB(m);a.setHeight.call(this,j,i,l,g,k);if(!i){g()}return this},setBounds:function(o,m,p,i,n,k,l,j){this.beforeAction();var g=this.createCB(l);if(!n){this.storeXY([o,m]);a.setXY.call(this,[o,m]);a.setSize.call(this,p,i,n,k,g,j);g()}else{a.setBounds.call(this,o,m,p,i,n,k,g,j)}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)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=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=e;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=(e*2);c.l=-e;c.t=e-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=(e*2);c.l=c.t=-e;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,r,q,g){if(!this.el){return}var n=this.adjusts,k=this.el.dom,u=k.style;var i=0;u.left=(b+n.l)+"px";u.top=(r+n.t)+"px";var p=(q+n.w),e=(g+n.h),j=p+"px",o=e+"px";if(u.width!=j||u.height!=o){u.width=j;u.height=o;if(!Ext.isIE){var m=k.childNodes;var c=Math.max(0,(p-12))+"px";m[0].childNodes[1].style.width=c;m[1].childNodes[1].style.width=c;m[2].childNodes[1].style.width=c;m[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,d){if(typeof b=="object"){d=b.height;b=b.width}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d);var g=c.width,a=c.height;if(g!==undefined||a!==undefined){var e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();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,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().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.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);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){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});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,{bufferResize:100,autoDestroy:true,forceLayout:false,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");this.enableBubble("add","remove");var a=this.items;if(a){delete this.items;if(Ext.isArray(a)&&a.length>0){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(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}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)}}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(a){this.initItems();var b=arguments.length>1;if(b||Ext.isArray(a)){Ext.each(b?arguments:a,function(g){this.add(g)},this);return}var e=this.lookupComponent(this.applyDefaults(a));var d=this.items.length;if(this.fireEvent("beforeadd",this,e,d)!==false&&this.onBeforeAdd(e)!==false){this.items.add(e);e.ownerCt=this;this.fireEvent("add",this,e,d)}return e},insert:function(g,e){this.initItems();var d=arguments,b=d.length;if(b>2){for(var h=b-1;h>=1;--h){this.insert(g,d[h])}return}var j=this.lookupComponent(this.applyDefaults(e));if(j.ownerCt==this&&this.items.indexOf(j)<g){--g}if(this.fireEvent("beforeadd",this,j,g)!==false&&this.onBeforeAdd(j)!==false){this.items.insert(g,j);j.ownerCt=this;this.fireEvent("add",this,j,g)}return j},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){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.items.remove(d);delete d.ownerCt;if(b===true||(b!==false&&this.autoDestroy)){d.destroy()}if(this.layout&&this.layout.activeItem==d){delete this.layout.activeItem}this.fireEvent("remove",this,d)}return d},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d<a;++d){e=g[d];this.remove(e,c);if(e.ownerCt!==this){b.push(e)}}return b},getComponent:function(a){if(Ext.isObject(a)){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.create(a,this.defaultType)},doLayout:function(g,e){var k=this.rendered,j=this.forceLayout;if(!this.isVisible()||this.collapsed){this.deferLayout=this.deferLayout||!g;if(!(e||j)){return}g=g&&!this.deferLayout}else{delete this.deferLayout}if(k&&this.layout){this.layout.layout()}if(g!==true&&this.items){var d=this.items.items;for(var b=0,a=d.length;b<a;b++){var h=d[b];if(h.doLayout){h.forceLayout=j;h.doLayout()}}}if(k){this.onLayout(g,e)}delete this.forceLayout},onLayout:Ext.emptyFn,onShow:function(){Ext.Container.superclass.onShow.call(this);if(this.deferLayout!==undefined){this.doLayout(true)}},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)}Ext.destroy(this.layout);Ext.Container.superclass.beforeDestroy.call(this)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},cascade:function(g,e,b){if(g.apply(e||this,b||[this])!==false){if(this.items){var d=this.items.items;for(var c=0,a=d.length;c<a;c++){if(d[c].cascade){d[c].cascade(g,e,b)}else{g.apply(e||d[c],b||[d[c]])}}}}return this},findById:function(c){var a,b=this;this.cascade(function(d){if(b!=d&&d.id===c){a=d;return false}});return a||null},findByType:function(b,a){return this.findBy(function(d){return d.isXType(b,a)})},find:function(b,a){return this.findBy(function(d){return d[b]===a})},findBy:function(d,c){var a=[],b=this;this.cascade(function(e){if(b!=e&&d.call(c||e,e,b)===true){a.push(e)}});return a},get:function(a){return this.items.get(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(b,a){return a&&b.getDomPositionEl().dom.parentNode==(a.dom||a)},renderAll:function(e,g){var b=e.items.items;for(var d=0,a=b.length;d<a;d++){var h=b[d];if(h&&(!h.rendered||!this.isValidParent(h,g))){this.renderItem(h,d,g)}}},renderItem:function(d,a,b){if(d&&!d.rendered){d.render(b,a);this.configureItem(d,a)}else{if(d&&!this.isValidParent(d,b)){if(typeof a=="number"){a=b.dom.childNodes[a]}b.dom.insertBefore(d.getDomPositionEl().dom,a||null);d.container=b;this.configureItem(d,a)}}},configureItem:function(d,a){if(this.extraCls){var b=d.getPositionEl?d.getPositionEl():d;b.addClass(this.extraCls)}if(this.renderHidden&&d!=this.activeItem){d.hide()}if(d.doLayout){d.doLayout(false,this.forceLayout)}},onResize:function(){if(this.container.collapsed){return}var a=this.container.bufferResize;if(a){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.runLayout,this);this.resizeBuffer=typeof a=="number"?a:100}this.resizeTask.delay(this.resizeBuffer)}else{this.runLayout()}},runLayout:function(){this.layout();this.container.onLayout()},setContainer:function(a){if(this.monitorResize&&a!=this.container){if(this.container){this.container.un("resize",this.onResize,this);this.container.un("bodyresize",this.onResize,this)}if(a){a.on({scope:this,resize:this.onResize,bodyresize:this.onResize})}}this.container=a},parseMargins:function(b){if(typeof b=="number"){b=b.toString()}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]}if(a==3){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}},fieldTpl:(function(){var a=new Ext.Template('<div class="x-form-item {itemCls}" tabIndex="-1">','<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>','<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">','</div><div class="{clearCls}"></div>',"</div>");a.disableFormats=true;return a.compile()})(),destroy:Ext.emptyFn};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(a,c){Ext.layout.FitLayout.superclass.onLayout.call(this,a,c);if(!this.container.collapsed){var b=(Ext.isIE6&&Ext.isStrict&&c.dom==document.body)?c.getViewSize():c.getStyleSize();this.setItemSize(this.activeItem||a.items.itemAt(0),b)}},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,layoutOnCardChange:false,renderHidden:true,constructor:function(a){Ext.layout.CardLayout.superclass.constructor.call(this,a);this.forceLayout=(this.deferredRender===false)},setActiveItem:function(a){a=this.container.getComponent(a);if(this.activeItem!=a){if(this.activeItem){this.activeItem.hide()}this.activeItem=a;a.show();this.container.doLayout();if(this.layoutOnCardChange&&a.doLayout){a.doLayout()}}},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(k,n){Ext.layout.AnchorLayout.superclass.onLayout.call(this,k,n);var t=this.getAnchorViewSize(k,n);var r=t.width,j=t.height;if(r<20&&j<20){return}var d,p;if(k.anchorSize){if(typeof k.anchorSize=="number"){d=k.anchorSize}else{d=k.anchorSize.width;p=k.anchorSize.height}}else{d=k.initialConfig.width;p=k.initialConfig.height}var m=k.items.items,l=m.length,g,o,q,e,b;for(g=0;g<l;g++){o=m[g];if(o.anchor){q=o.anchorSpec;if(!q){var s=o.anchor.split(" ");o.anchorSpec=q={right:this.parseAnchor(s[0],o.initialConfig.width,d),bottom:this.parseAnchor(s[1],o.initialConfig.height,p)}}e=q.right?this.adjustWidthAnchor(q.right(r),o):undefined;b=q.bottom?this.adjustHeightAnchor(q.bottom(j),o):undefined;if(e||b){o.setSize(e||undefined,b||undefined)}}}},parseAnchor:function(c,h,b){if(c&&c!="none"){var e;if(/^(r|right|b|bottom)$/i.test(c)){var g=b-h;return function(a){if(a!==e){e=a;return a-g}}}else{if(c.indexOf("%")!=-1){var d=parseFloat(c.replace("%",""))*0.01;return function(a){if(a!==e){e=a;return Math.floor(a*d)}}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){if(a!==e){e=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.getPositionEl?b.getPositionEl():b.getEl()).dom.parentNode==this.innerCt.dom},onLayout:function(d,j){var e=d.items.items,g=e.length,k,a;if(!this.innerCt){j.addClass("x-column-layout-ct");this.innerCt=j.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}this.renderAll(d,this.innerCt);var n=Ext.isIE&&j.dom!=Ext.getBody().dom?j.getStyleSize():j.getViewSize();if(n.width<1&&n.height<1){return}var l=n.width-j.getPadding("lr")-this.scrollOffset,b=n.height-j.getPadding("tb"),m=l;this.innerCt.setWidth(l);for(a=0;a<g;a++){k=e[a];if(!k.columnWidth){m-=(k.getSize().width+k.getEl().getMargins("lr"))}}m=m<0?0:m;for(a=0;a<g;a++){k=e[a];if(k.columnWidth){k.setSize(Math.floor(k.columnWidth*m)-k.getEl().getMargins("lr"))}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(d,H){var g;if(!this.rendered){H.addClass("x-border-layout-ct");var v=d.items.items;g=[];for(var A=0,B=v.length;A<B;A++){var E=v[A];var l=E.region;if(E.collapsed){g.push(E)}E.collapsed=false;if(!E.rendered){E.cls=E.cls?E.cls+" x-border-panel":"x-border-panel";E.render(H,A)}this[l]=l!="center"&&E.split?new Ext.layout.BorderLayout.SplitRegion(this,E.initialConfig,l):new Ext.layout.BorderLayout.Region(this,E.initialConfig,l);this[l].render(H,E)}this.rendered=true}var u=H.getViewSize();if(u.width<20||u.height<20){if(g){this.restoreCollapsed=g}return}else{if(this.restoreCollapsed){g=this.restoreCollapsed;delete this.restoreCollapsed}}var r=u.width,C=u.height;var q=r,z=C,o=0,p=0;var x=this.north,t=this.south,k=this.west,D=this.east,E=this.center;if(!E&&Ext.layout.BorderLayout.WARN!==false){throw"No center region defined in BorderLayout "+d.id}if(x&&x.isVisible()){var G=x.getSize();var y=x.getMargins();G.width=r-(y.left+y.right);G.x=y.left;G.y=y.top;o=G.height+G.y+y.bottom;z-=o;x.applyLayout(G)}if(t&&t.isVisible()){var G=t.getSize();var y=t.getMargins();G.width=r-(y.left+y.right);G.x=y.left;var F=(G.height+y.top+y.bottom);G.y=C-F+y.top;z-=F;t.applyLayout(G)}if(k&&k.isVisible()){var G=k.getSize();var y=k.getMargins();G.height=z-(y.top+y.bottom);G.x=y.left;G.y=o+y.top;var a=(G.width+y.left+y.right);p+=a;q-=a;k.applyLayout(G)}if(D&&D.isVisible()){var G=D.getSize();var y=D.getMargins();G.height=z-(y.top+y.bottom);var a=(G.width+y.left+y.right);G.x=r-a+y.left;G.y=o+y.top;q-=a;D.applyLayout(G)}if(E){var y=E.getMargins();var j={x:p+y.left,y:o+y.top,width:q-(y.left+y.right),height:z-(y.top+y.bottom)};E.applyLayout(j)}if(g){for(var A=0,B=g.length;A<B;A++){g[A].collapse(false)}}if(Ext.isIE&&Ext.isStrict){H.repaint()}},destroy:function(){var b=["north","south","east","west"];for(var a=0;a<b.length;a++){var c=this[b[a]];if(c){if(c.destroy){c.destroy()}else{if(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},floatingZIndex:100,isCollapsed:false,render:function(b,c){this.panel=c;c.el.enableDisplayMode();this.targetEl=b;this.el=c.el;var a=c.getState,d=this.position;c.getState=function(){return Ext.apply(a.call(c)||{},this.state)}.createDelegate(this);if(d!="center"){c.allowQueuedExpand=false;c.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible||this.floatable){c.collapseEl="el";c.slideAnchor=this.getSlideAnchor()}if(c.tools&&c.tools.toggle){c.tools.toggle.addClass("x-tool-collapse-"+d);c.tools.toggle.addClassOnOver("x-tool-collapse-"+d+"-over")}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var b=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){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.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],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",this.floatingZIndex)},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",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");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.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;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},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=a.labelSeparator||this.labelSeparator;a.labelWidth=a.labelWidth||100;if(typeof a.labelWidth=="number"){var b=(typeof a.labelPad=="number"?a.labelPad:5);this.labelAdjust=a.labelWidth+b;this.labelStyle="width:"+a.labelWidth+"px;";this.elementStyle="padding-left:"+(a.labelWidth+b)+"px"}if(a.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d<a;++d){if(c[d]){b+=c[d];if(b.substr(-1,1)!=";"){b+=";"}}}return b},renderItem:function(e,a,d){if(e&&!e.rendered&&(e.isFormField||e.fieldLabel)&&e.inputType!="hidden"){var b=this.getTemplateArgs(e);if(typeof a=="number"){a=d.dom.childNodes[a]||null}if(a){this.fieldTpl.insertBefore(a,b)}else{this.fieldTpl.append(d,b)}e.render("x-form-el-"+e.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},getTemplateArgs:function(b){var a=!b.fieldLabel||b.hideLabel;return{id:b.id,label:b.fieldLabel,labelStyle:b.labelStyle||this.labelStyle||"",elementStyle:this.elementStyle||"",labelSeparator:a?"":(typeof b.labelSeparator=="undefined"?this.labelSeparator:b.labelSeparator),itemCls:(b.itemCls||this.container.itemCls||"")+(b.hideLabel?" x-hide-label":""),clearCls:b.clearCls||"x-form-clear-left"}},adjustWidthAnchor:function(b,a){return b-(a.isFormField||a.fieldLabel?(a.hideLabel?0:this.labelAdjust):0)},isValidParent:function(b,a){return true}});Ext.Container.LAYOUTS.form=Ext.layout.FormLayout;Ext.layout.AccordionLayout=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&&this.activeItem!=a){a.collapsed=true}}Ext.layout.AccordionLayout.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(c,b){if(this.fill&&c){var a=0;this.container.items.each(function(d){if(d!=c){a+=d.header.getHeight()}});b.height-=a;c.setSize(b)}},setActiveItem:function(a){a=this.container.getComponent(a);if(this.activeItem!=a){if(a.rendered&&a.collapsed){a.expand()}else{this.activeItem=a}}}});Ext.Container.LAYOUTS.accordion=Ext.layout.AccordionLayout;Ext.layout.Accordion=Ext.layout.AccordionLayout;Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,tableAttrs:null,setContainer:function(a){Ext.layout.TableLayout.superclass.setContainer.call(this,a);this.currentRow=0;this.currentColumn=0;this.cells=[]},onLayout:function(d,g){var e=d.items.items,a=e.length,h,b;if(!this.table){g.addClass("x-table-layout-ct");this.table=g.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}this.renderAll(d,g)},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(j){var a=this.getNextNonSpan(this.currentColumn,this.currentRow);var g=this.currentColumn=a[0],e=this.currentRow=a[1];for(var i=e;i<e+(j.rowspan||1);i++){if(!this.cells[i]){this.cells[i]=[]}for(var d=g;d<g+(j.colspan||1);d++){this.cells[i][d]=true}}var h=document.createElement("td");if(j.cellId){h.id=j.cellId}var b="x-table-layout-cell";if(j.cellCls){b+=" "+j.cellCls}h.className=b;if(j.colspan){h.colSpan=j.colspan}if(j.rowspan){h.rowSpan=j.rowspan}this.getRow(e).appendChild(h);return h},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,d){if(e&&!e.rendered){e.render(this.getNextCell(e));if(this.extraCls){var b=e.getPositionEl?e.getPositionEl():e;b.addClass(this.extraCls)}}},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",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,scrollOffset:0,extraCls:"x-box-item",ctCls:"x-box-layout-ct",innerCls:"x-box-inner",isValidParent:function(b,a){return b.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(e,j){var g=e.items.items,b=g.length,k,d,h=b-1,a;if(!this.innerCt){j.addClass(this.ctCls);this.innerCt=j.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding)}this.renderAll(e,this.innerCt)},renderItem:function(a){if(typeof a.margins=="string"){a.margins=this.parseMargins(a.margins)}else{if(!a.margins){a.margins=this.defaultMargins}}Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments)},getTargetSize:function(a){return(Ext.isIE6&&Ext.isStrict&&a.dom==document.body)?a.getStyleSize():a.getViewSize()},getItems:function(b){var a=[];b.items.each(function(d){if(d.isVisible()){a.push(d)}});return a}});Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",onLayout:function(e,E){Ext.layout.VBoxLayout.superclass.onLayout.call(this,e,E);var g=this.getItems(e),j,m,q,r=this.getTargetSize(E),k=r.width-E.getPadding("lr")-this.scrollOffset,y=r.height-E.getPadding("tb"),s=this.padding.left,n=this.padding.top,i=this.pack=="start",v=["stretch","stretchmax"].indexOf(this.align)==-1,B=k-(this.padding.left+this.padding.right),o=0,A=0,u=0,C=0,d=0;Ext.each(g,function(h){j=h.margins;u+=h.flex||0;m=h.getHeight();q=j.top+j.bottom;o+=m+q;C+=q+(h.flex?0:m);A=Math.max(A,h.getWidth()+j.left+j.right)});o=y-o-this.padding.top-this.padding.bottom;var a=A+this.padding.left+this.padding.right;switch(this.align){case"stretch":this.innerCt.setSize(k,y);break;case"stretchmax":case"left":this.innerCt.setSize(a,y);break;case"center":this.innerCt.setSize(k=Math.max(k,a),y);break}var c=Math.max(0,y-this.padding.top-this.padding.bottom-C),D=c,z=[],x=[],p=0,b=Math.max(0,k-this.padding.left-this.padding.right);Ext.each(g,function(h){if(i&&h.flex){m=Math.floor(c*(h.flex/u));D-=m;z.push(m)}});if(this.pack=="center"){n+=o?o/2:0}else{if(this.pack=="end"){n+=o}}Ext.each(g,function(h){j=h.margins;n+=j.top;h.setPosition(s+j.left,n);if(i&&h.flex){m=Math.max(0,z[p++]+(D-->0?1:0));if(v){x.push(h.getWidth())}h.setSize(b,m)}else{m=h.getHeight()}n+=m+j.bottom});p=0;Ext.each(g,function(l){j=l.margins;if(this.align=="stretch"){l.setWidth((B-(j.left+j.right)).constrain(l.minWidth||0,l.maxWidth||1000000))}else{if(this.align=="stretchmax"){l.setWidth((A-(j.left+j.right)).constrain(l.minWidth||0,l.maxWidth||1000000))}else{if(this.align=="center"){var h=b-(l.getWidth()+j.left+j.right);if(h>0){l.setPosition(s+j.left+(h/2),l.y)}}if(i&&l.flex){l.setWidth(x[p++])}}}},this)}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",onLayout:function(d,E){Ext.layout.HBoxLayout.superclass.onLayout.call(this,d,E);var e=this.getItems(d),j,c,q,r=this.getTargetSize(E),m=r.width-E.getPadding("lr")-this.scrollOffset,B=r.height-E.getPadding("tb"),u=this.padding.left,o=this.padding.top,i=this.pack=="start",z=["stretch","stretchmax"].indexOf(this.align)==-1,n=B-(this.padding.top+this.padding.bottom),C=0,s=0,v=0,b=0,g=0;Ext.each(e,function(h){j=h.margins;v+=h.flex||0;c=h.getWidth();q=j.left+j.right;C+=c+q;b+=q+(h.flex?0:c);s=Math.max(s,h.getHeight()+j.top+j.bottom)});C=m-C-this.padding.left-this.padding.right;var y=s+this.padding.top+this.padding.bottom;switch(this.align){case"stretch":this.innerCt.setSize(m,B);break;case"stretchmax":case"top":this.innerCt.setSize(m,y);break;case"middle":this.innerCt.setSize(m,B=Math.max(B,y));break}var x=Math.max(0,m-this.padding.left-this.padding.right-b),D=x,k=[],A=[],p=0,a=Math.max(0,B-this.padding.top-this.padding.bottom);Ext.each(e,function(h){if(i&&h.flex){c=Math.floor(x*(h.flex/v));D-=c;k.push(c)}});if(this.pack=="center"){u+=C?C/2:0}else{if(this.pack=="end"){u+=C}}Ext.each(e,function(h){j=h.margins;u+=j.left;h.setPosition(u,o+j.top);if(i&&h.flex){c=Math.max(0,k[p++]+(D-->0?1:0));if(z){A.push(h.getHeight())}h.setSize(c,a)}else{c=h.getWidth()}u+=c+j.right});p=0;Ext.each(e,function(t){var h=t.margins;if(this.align=="stretch"){t.setHeight((n-(h.top+h.bottom)).constrain(t.minHeight||0,t.maxHeight||1000000))}else{if(this.align=="stretchmax"){t.setHeight((s-(h.top+h.bottom)).constrain(t.minHeight||0,t.maxHeight||1000000))}else{if(this.align=="middle"){var l=a-(t.getHeight()+h.top+h.bottom);if(l>0){t.setPosition(t.x,o+h.top+(l/2))}}if(i&&t.flex){t.setHeight(A[p++])}}}},this)}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;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",preventBodyReset:false,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","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}if(this.tbar){this.elements+=",tbar";if(Ext.isObject(this.tbar)){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(Ext.isObject(this.bbar)){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){this.elements+=",footer";var c=this.buttons;this.buttons=[];for(var b=0,a=c.length;b<a;b++){if(c[b].render){this.buttons.push(c[b])}else{if(c[b].xtype){this.buttons.push(Ext.create(c[b],"button"))}else{this.addButton(c[b])}}}}if(this.fbar){this.elements+=",footer"}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))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,i=a.dom,k;a.addClass(this.baseCls);if(i.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var j=this.bwrap?this.bwrap:a;this.tbar=j.down("."+this.tbarCls);this.body=j.down("."+this.bodyCls);this.bbar=j.down("."+this.bbarCls);this.footer=j.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.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",i.firstChild.firstChild.firstChild);this.createElement("bwrap",i);k=this.bwrap.dom;var c=i.childNodes[1],b=i.childNodes[2];k.appendChild(c);k.appendChild(b);var l=k.firstChild.firstChild.firstChild;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",k.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",i);this.createElement("bwrap",i);k=this.bwrap.dom;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",k);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(this.padding!==undefined){this.body.setStyle("padding",this.body.addUnits(this.padding))}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")}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.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var h=this.tools;this.tools={};this.addTool.apply(this,h)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){this.fbar=new Ext.Toolbar({items:this.buttons,toolbarCls:"x-panel-fbar"})}this.toolbars=[];if(this.fbar){this.fbar=Ext.create(this.fbar,"toolbar");this.fbar.enableOverflow=false;if(this.fbar.items){this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this)}this.fbar.toolbarCls="x-panel-fbar";var m=this.footer.createChild({cls:"x-panel-btns x-panel-btns-"+this.buttonAlign});this.fbar.ownerCt=this;this.fbar.render(m);m.createChild({cls:"x-clear"});this.toolbars.push(this.fbar)}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar)}else{if(!this.topToolbar.events){this.topToolbar=Ext.create(this.topToolbar,"toolbar")}}this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar);this.toolbars.push(this.topToolbar)}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar)}else{if(!this.bottomToolbar.events){this.bottomToolbar=Ext.create(this.bottomToolbar,"toolbar")}}this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar);this.toolbars.push(this.bottomToolbar)}Ext.each(this.toolbars,function(d){d.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this)},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var d=this.header.dom;var c=d.firstChild&&String(d.firstChild.tagName).toLowerCase()=="img"?d.firstChild:null;if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{Ext.DomHelper.insertBefore(d.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.isObject(a)?a:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(a,d,c){var e={handler:d,scope:c,minWidth:this.minButtonWidth,hideParent:true};if(typeof a=="string"){e.text=a}else{Ext.apply(e,a)}var b=new Ext.Button(e);if(!this.buttons){this.buttons=[]}this.buttons.push(b);return b},addTool:function(){if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g<c;g++){var b=d[g];if(!this.tools[b.id]){var j="x-tool-"+b.id+"-over";var e=this.toolTemplate.insertFirst((b.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),b,true);this.tools[b.id]=e;e.enableDisplayMode("block");this.mon(e,"click",this.createToolHandler(e,b,j,this));if(b.on){this.mon(e,b.on)}if(b.hidden){e.hide()}if(b.qtip){if(Ext.isObject(b.qtip)){Ext.QuickTips.register(Ext.apply({target:e.id},b.qtip))}else{e.dom.qtip=b.qtip}}e.addClassOnOver(j)}}},onLayout:function(){if(this.toolbars.length>0){this.duringLayout=true;Ext.each(this.toolbars,function(a){a.doLayout()});delete this.duringLayout;this.syncHeight()}},syncHeight:function(){if(!(this.autoHeight||this.duringLayout)){var d=this.lastSize;if(d&&!Ext.isEmpty(d.height)){var b=d.height,c=this.el.getHeight();if(b!="auto"&&b!=c){var e=this.body,a=e.getHeight();c=Math.max(a+b-c,0);if(a>0&&a!=c){e.setHeight(c);if(Ext.isIE&&c<=0){return}var g=e.getSize();this.fireEvent("bodyresize",g.width,g.height)}}}}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}this.setAutoScroll();if(this.html){this.body.update(Ext.isObject(this.html)?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,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,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();if(this.deferLayout!==undefined){this.doLayout(true)}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(b,c){if(b!==undefined||c!==undefined){if(!this.collapsed){if(typeof b=="number"){b=this.adjustBodyWidth(b-this.getFrameWidth());if(this.tbar){this.tbar.setWidth(b);if(this.topToolbar){this.topToolbar.setSize(b)}}if(this.bbar){this.bbar.setWidth(b);if(this.bottomToolbar){this.bottomToolbar.setSize(b)}}if(this.fbar){var d=this.fbar,e=1,a=Ext.isStrict;if(this.buttonAlign=="left"){e=b-d.container.getFrameWidth("lr")}else{if(Ext.isIE||Ext.isWebKit){if(!(this.buttonAlign=="center"&&Ext.isWebKit)&&(!a||(!Ext.isIE8&&a))){(function(){d.setWidth(d.getEl().child(".x-toolbar-ct").getWidth())}).defer(1)}else{e="auto"}}else{e="auto"}}d.setWidth(e)}this.body.setWidth(b)}else{if(b=="auto"){this.body.setWidth(b)}}if(typeof c=="number"){c=Math.max(0,this.adjustBodyHeight(c-this.getFrameHeight()));this.body.setHeight(c)}else{if(c=="auto"){this.body.setHeight(c)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:b,height:c};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,b,c)}this.syncShadow()},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.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")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var c=this.el.dom.firstChild;var d=this.bwrap.dom.lastChild;a+=(c.offsetHeight+d.offsetHeight);var b=this.bwrap.dom.firstChild.firstChild.firstChild;a+=Ext.fly(b).getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child("span"))}}Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);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.toolbars);Ext.Panel.superclass.beforeDestroy.call(this)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{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:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}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.mon(this.field,"specialkey",this.onSpecialKey,this);if(this.swallowKeys){this.field.el.swallowEvent(["keydown","keypress"])}this.field.show();this.mon(this.field,"blur",this.onBlur,this);if(this.field.grow){this.mon(this.field,"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.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);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);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},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(){Ext.destroy(this.field);this.field=null}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=function(a){Ext.ColorPalette.superclass.constructor.call(this,a);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(b,a){var c=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');var d=document.createElement("div");d.id=this.getId();d.className=this.itemCls;c.overwrite(d,this.colors);b.dom.insertBefore(d,a);this.el=Ext.get(d);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"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 d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.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.BoxComponent,{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",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 b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);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)}},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['<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>'],c=this.dayNames,h;for(h=0;h<7;h++){var k=this.startDay+h;if(k>6){k=k-7}a.push("<th><span>",c[k].substr(0,1),"</span></th>")}a[a.length]="</tr></thead><tbody><tr>";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]="</tr><tr>"}a[a.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'}a.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 j=document.createElement("div");j.className="x-date-picker";j.innerHTML=a.join("");e.dom.insertBefore(j,b);this.el=Ext.get(j);this.eventEl=Ext.get(j.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});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.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},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="#">',Date.getShortMonthName(b),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',Date.getShortMonthName(b+6),"</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.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(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(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&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(H,B){var a=this.activeDate,p=this.isVisible();this.activeDate=H;if(!B&&a&&this.el){var o=H.getTime();if(a.getMonth()==H.getMonth()&&a.getFullYear()==H.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==o){d.addClass("x-date-selected");if(p){Ext.fly(d.dom.firstChild).focus(50)}return false}});return}}var k=H.getDaysInMonth();var q=H.getFirstDateOfMonth();var g=q.getDay()-this.startDay;if(g<=this.startDay){g+=7}var C=H.add("mo",-1);var h=C.getDaysInMonth()-g;var e=this.cells.elements;var r=this.textNodes;k+=g;var z=86400000;var E=(new Date(C.getFullYear(),C.getMonth(),h)).clearTime();var D=new Date().clearTime().getTime();var v=H.clearTime().getTime();var u=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var y=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var G=this.disabledDatesRE;var s=this.disabledDatesText;var J=this.disabledDays?this.disabledDays.join(""):false;var F=this.disabledDaysText;var A=this.format;if(this.showToday){var m=new Date().clearTime();var c=(m<u||m>y||(G&&A&&G.test(m.dateFormat(A)))||(J&&J.indexOf(m.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var l=function(K,d){d.title="";var i=E.getTime();d.firstChild.dateValue=i;if(i==D){d.className+=" x-date-today";d.title=K.todayText}if(i==v){d.className+=" x-date-selected";if(p){Ext.fly(d.firstChild).focus(50)}}if(i<u){d.className=" x-date-disabled";d.title=K.minText;return}if(i>y){d.className=" x-date-disabled";d.title=K.maxText;return}if(J){if(J.indexOf(E.getDay())!=-1){d.title=F;d.className=" x-date-disabled"}}if(G&&A){var w=E.dateFormat(A);if(G.test(w)){d.title=s.replace("%0",w);d.className=" x-date-disabled"}}};var x=0;for(;x<g;x++){r[x].innerHTML=(++h);E.setDate(E.getDate()+1);e[x].className="x-date-prevday";l(this,e[x])}for(;x<k;x++){var b=x-g+1;r[x].innerHTML=(b);E.setDate(E.getDate()+1);e[x].className="x-date-active";l(this,e[x])}var I=0;for(;x<42;x++){r[x].innerHTML=(++I);E.setDate(E.getDate()+1);e[x].className="x-date-nextday";l(this,e[x])}this.mbtn.setText(this.monthNames[H.getMonth()]+" "+H.getFullYear());if(!this.internalRender){var j=this.el.dom.firstChild;var n=j.offsetWidth;this.el.setWidth(n+this.el.getBorderWidth("lr"));Ext.fly(j).setWidth(n);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){j.rows[0].cells[1].style.width=(n-(j.rows[0].cells[0].offsetWidth+j.rows[0].cells[2].offsetWidth))+"px";this.secondPass=true;this.update.defer(10,this,[H])}}},beforeDestroy:function(){if(this.rendered){this.keyNav.disable();this.keyNav=null;Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn)}}});Ext.reg("datepicker",Ext.DatePicker);Ext.LoadMask=function(c,b){this.el=Ext.get(c);Ext.apply(this,b);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("exception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var a=this.el.getUpdater();a.showLoadIndicator=false;a.on("beforeupdate",this.onBeforeLoad,this);a.on("update",this.onLoad,this);a.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoad,this)}else{var a=this.el.getUpdater();a.un("beforeupdate",this.onBeforeLoad,this);a.un("update",this.onLoad,this);a.un("failure",this.onLoad,this)}}};Ext.Slider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}Ext.Slider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.vertical){Ext.apply(this,Ext.Slider.Vertical)}},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{cls:"x-slider-thumb"},{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};Ext.Slider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();this.thumb=this.innerEl.first();this.halfThumb=(this.vertical?this.thumb.getHeight():this.thumb.getWidth())/2;this.focusEl=this.thumb.next();this.initEvents()},initEvents:function(){this.thumb.addClassOnOver("x-slider-thumb-over");this.mon(this.el,{scope:this,mousedown:this.onMouseDown,keydown:this.onKeyDown});this.focusEl.swallowEvent("click",true);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.thumb);this.on("beforedestroy",this.tracker.destroy,this.tracker)},onMouseDown:function(b){if(this.disabled){return}if(this.clickToChange&&b.target!=this.thumb.dom){var a=this.innerEl.translatePoints(b.getXY());this.onClickChange(a)}this.focus()},onClickChange:function(a){if(a.top>this.clickRange[0]&&a.top<this.clickRange[1]){this.setValue(Ext.util.Format.round(this.reverseValue(a.left),this.decimalPrecision),undefined,true)}},onKeyDown:function(b){if(this.disabled){b.preventDefault();return}var a=b.getKey();switch(a){case b.UP:case b.RIGHT:b.stopEvent();if(b.ctrlKey){this.setValue(this.maxValue,undefined,true)}else{this.setValue(this.value+this.keyIncrement,undefined,true)}break;case b.DOWN:case b.LEFT:b.stopEvent();if(b.ctrlKey){this.setValue(this.minValue,undefined,true)}else{this.setValue(this.value-this.keyIncrement,undefined,true)}break;default:b.preventDefault()}},doSnap:function(b){if(!this.increment||this.increment==1||!b){return b}var d=b,c=this.increment;var a=b%c;if(a!=0){d-=a;if(a*2>c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);if(this.value!==undefined){var a=this.normalizeValue(this.value);if(a!==this.value){delete this.value;this.setValue(a,false)}else{this.moveThumb(this.translateValue(a),false)}}},getRatio:function(){var a=this.innerEl.getWidth();var b=this.maxValue-this.minValue;return b==0?a:(a/b)},normalizeValue:function(a){a=this.doSnap(a);a=Ext.util.Format.round(a,this.decimalPrecision);a=a.constrain(this.minValue,this.maxValue);return a},setValue:function(b,a,c){b=this.normalizeValue(b);if(b!==this.value&&this.fireEvent("beforechange",this,b,this.value)!==false){this.value=b;this.moveThumb(this.translateValue(b),a!==false);this.fireEvent("change",this,b);if(c){this.fireEvent("changecomplete",this,b)}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+this.halfThumb+(this.minValue*a))/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setLeft(b)}else{this.thumb.shift({left:b,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onBeforeDragStart:function(a){return !this.disabled},onDragStart:function(a){this.thumb.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,a)},onDrag:function(a){var b=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Ext.util.Format.round(this.reverseValue(b.left),this.decimalPrecision),false);this.fireEvent("drag",this,a)},onDragEnd:function(a){this.thumb.removeClass("x-slider-thumb-drag");this.dragging=false;this.fireEvent("dragend",this,a);if(this.dragStartValue!=this.value){this.fireEvent("changecomplete",this,this.value)}},onResize:function(a,b){this.innerEl.setWidth(a-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb()},onDisable:function(){Ext.Slider.superclass.onDisable.call(this);this.thumb.addClass(this.disabledClass);if(Ext.isIE){var a=this.thumb.getXY();this.thumb.hide();this.innerEl.addClass(this.disabledClass).dom.disabled=true;if(!this.thumbHolder){this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass})}this.thumbHolder.show().setXY(a)}},onEnable:function(){Ext.Slider.superclass.onEnable.call(this);this.thumb.removeClass(this.disabledClass);if(Ext.isIE){this.innerEl.removeClass(this.disabledClass).dom.disabled=false;if(this.thumbHolder){this.thumbHolder.hide()}this.thumb.show();this.syncThumb()}},syncThumb:function(){if(this.rendered){this.moveThumb(this.translateValue(this.value))}},getValue:function(){return this.value}});Ext.reg("slider",Ext.Slider);Ext.Slider.Vertical={onResize:function(a,b){this.innerEl.setHeight(b-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var b=this.innerEl.getHeight();var a=this.maxValue-this.minValue;return b/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setBottom(b)}else{this.thumb.shift({bottom:b,stopFx:true,duration:0.35})}},onDrag:function(b){var c=this.innerEl.translatePoints(this.tracker.getXY());var a=this.innerEl.getHeight()-c.top;this.setValue(this.minValue+Ext.util.Format.round(a/this.getRatio(),this.decimalPrecision),false);this.fireEvent("drag",this,b)},onClickChange:function(b){if(b.left>this.clickRange[0]&&b.left<this.clickRange[1]){var a=this.innerEl.getHeight()-b.top;this.setValue(this.minValue+Ext.util.Format.round(a/this.getRatio(),this.decimalPrecision),undefined,true)}}};Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:false,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(d,a){var c=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(a===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(j,h,o){if(typeof h=="number"){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var l=Ext.get(this.getEl()).getBox();var d=Ext.get(j);var n=d.getScroll();var k,e=d.dom;if(e==document.body){k={x:n.left,y:n.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var m=d.getXY();k={x:m[0]+n.left,y:m[1]+n.top,width:e.clientWidth,height:e.clientHeight}}var i=l.y-k.y;var g=l.x-k.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),k.width-g-l.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),k.height-i-l.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e<c;++e){if(this.invalidHandleClasses[e]==d){delete this.invalidHandleClasses[e]}}},isValidHandleChild:function(h){var g=true;var k;try{k=h.nodeName.toUpperCase()}catch(j){k=h.nodeName}g=g&&!this.invalidHandleTypes[k];g=g&&!this.invalidHandleIds[h.id];for(var d=0,c=this.invalidHandleClasses.length;g&&d<c;++d){g=!Ext.fly(h).hasClass(this.invalidHandleClasses[d])}return g},setXTicks:function(g,c){this.xTicks=[];this.xTickSize=c;var e={};for(var d=this.initPageX;d>=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(k,g){if(!g){return k}else{if(g[0]>=k){return g[0]}else{for(var d=0,c=g.length;d<c;++d){var e=d+1;if(g[e]&&g[e]>=k){var j=k-g[d];var h=g[e]-k;return(h>j)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&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(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;d<b;++d){if(c[d].id==e.id){return true}}return false},isTypeOfDD:function(b){return(b&&b.__ygDragDrop)},isHandle:function(c,b){return(this.handleIds[c]&&this.handleIds[c][b])},getDDById:function(c){for(var b in this.ids){if(this.ids[b][c]){return this.ids[b][c]}}return null},handleMouseDown:function(d,c){if(Ext.QuickTips){Ext.QuickTips.disable()}if(this.dragCurrent){this.handleMouseUp(d)}this.currentTarget=d.getTarget();this.dragCurrent=c;var b=c.getEl();this.startX=d.getPageX();this.startY=d.getPageY();this.deltaX=this.startX-b.offsetLeft;this.deltaY=this.startY-b.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var e=Ext.dd.DDM;e.startDrag(e.startX,e.startY)},this.clickTimeThresh)},startDrag:function(b,c){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(b,c);this.dragCurrent.startDrag(b,c)}this.dragThreshMet=true},handleMouseUp:function(b){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}else{}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(b){if(this.stopPropagation){b.stopPropagation()}if(this.preventDefault){b.preventDefault()}},stopDrag:function(b){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(b);this.dragCurrent.endDrag(b)}this.dragCurrent.onMouseUp(b)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(d){if(!this.dragCurrent){return true}if(Ext.isIE&&(d.button!==0&&d.button!==1&&d.button!==2)){this.stopEvent(d);return this.handleMouseUp(d)}if(!this.dragThreshMet){var c=Math.abs(this.startX-d.getPageX());var b=Math.abs(this.startY-d.getPageY());if(c>this.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(n,o){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=n.getPoint();var b=[];var g=[];var l=[];var j=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(r,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var p in q.groups){if("string"!=typeof p){continue}for(h in this.ids[p]){var k=this.ids[p][h];if(!this.isTypeOfDD(k)){continue}if(k.isTarget&&!k.isLocked()&&((k!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,k,this.mode)){if(o){j.push(k)}else{if(!b[k.id]){d.push(k)}else{l.push(k)}this.dragOvers[k.id]=k}}}}}if(this.mode){if(g.length){q.b4DragOut(n,g);q.onDragOut(n,g)}if(d.length){q.onDragEnter(n,d)}if(l.length){q.b4DragOver(n,l);q.onDragOver(n,l)}if(j.length){q.b4DragDrop(n,j);q.onDragDrop(n,j)}}else{var m=0;for(h=0,m=g.length;h<m;++h){q.b4DragOut(n,g[h].id);q.onDragOut(n,g[h].id)}for(h=0,m=d.length;h<m;++h){q.onDragEnter(n,d[h].id)}for(h=0,m=l.length;h<m;++h){q.b4DragOver(n,l[h].id);q.onDragOver(n,l[h].id)}for(h=0,m=j.length;h<m;++h){q.b4DragDrop(n,j[h].id);q.onDragDrop(n,j[h].id)}}if(o&&!j.length){q.onInvalidDrop(n)}},getBestMatch:function(d){var g=null;var c=d.length;if(c==1){g=d[0]}else{for(var e=0;e<c;++e){var b=d[e];if(b.cursorIsOver){g=b;break}else{if(!g||g.overlap.getArea()<b.overlap.getArea()){g=b}}}}return g},refreshCache:function(c){for(var b in c){if("string"!=typeof b){continue}for(var d in this.ids[b]){var e=this.ids[b][d];if(this.isTypeOfDD(e)){var g=this.getLocation(e);if(g){this.locationCache[e.id]=g}else{delete this.locationCache[e.id]}}}}},verifyEl:function(c){if(c){var b;if(Ext.isIE){try{b=c.offsetParent}catch(d){}}else{b=c.offsetParent}if(b){return true}}return false},getLocation:function(j){if(!this.isTypeOfDD(j)){return null}var h=j.getEl(),n,g,d,p,o,q,c,m,i;try{n=Ext.lib.Dom.getXY(h)}catch(k){}if(!n){return null}g=n[0];d=g+h.offsetWidth;p=n[1];o=p+h.offsetHeight;q=p-j.padding[0];c=d+j.padding[1];m=o+j.padding[2];i=g-j.padding[3];return new Ext.lib.Region(q,c,m,i)},isOverTarget:function(k,b,d){var g=this.locationCache[b.id];if(!g||!this.useCache){g=this.getLocation(b);this.locationCache[b.id]=g}if(!g){return false}b.cursorIsOver=g.contains(k);var j=this.dragCurrent;if(!j||!j.getTargetCoord||(!d&&!j.constrainX&&!j.constrainY)){return b.cursorIsOver}b.overlap=null;var h=j.getTargetCoord(k.x,k.y);var c=j.getDragEl();var e=new Ext.lib.Region(h.y,h.x+c.offsetWidth,h.y+c.offsetHeight,h.x);var i=e.intersect(g);if(i){b.overlap=i;return(d)?true:b.cursorIsOver}else{return false}},_onUnload:function(c,b){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var b in this.elementCache){delete this.elementCache[b]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(c){var b=this.elementCache[c];if(!b||!b.el){b=this.elementCache[c]=new this.ElementWrapper(Ext.getDom(c))}return b},getElement:function(b){return Ext.getDom(b)},getCss:function(c){var b=Ext.getDom(c);return(b)?b.style:null},ElementWrapper:function(b){this.el=b||null;this.id=this.el&&b.id;this.css=this.el&&b.style},getPosX:function(b){return Ext.lib.Dom.getX(b)},getPosY:function(b){return Ext.lib.Dom.getY(b)},swapNode:function(d,b){if(d.swapNode){d.swapNode(b)}else{var e=b.parentNode;var c=b.nextSibling;if(c==d){e.insertBefore(d,b)}else{if(b==d.nextSibling){e.insertBefore(b,d)}else{d.parentNode.replaceChild(b,d);e.insertBefore(d,c)}}}},getScroll:function(){var d,b,e=document.documentElement,c=document.body;if(e&&(e.scrollTop||e.scrollLeft)){d=e.scrollTop;b=e.scrollLeft}else{if(c){d=c.scrollTop;b=c.scrollLeft}else{}}return{top:d,left:b}},getStyle:function(c,b){return Ext.fly(c).getStyle(b)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(b,d){var c=Ext.lib.Dom.getXY(d);Ext.lib.Dom.setXY(b,c)},numericSort:function(d,c){return(d-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,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(c,b){if(this.fireEvent("mousedown",this,c)!==false&&this.onBeforeStart(c)!==false){this.startXY=this.lastXY=c.getXY();this.dragTarget=this.delegate?b:this.el.dom;if(this.preventDefault!==false){c.preventDefault()}var a=Ext.getDoc();a.on("mouseup",this.onMouseUp,this);a.on("mousemove",this.onMouseMove,this);a.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart()}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc();b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();var a=this.active;this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c);var a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(l){b=null;a()};var j=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var l=Ext.dd.ScrollManager;var m=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:l.increment;if(!l.animate){if(i.el.scroll(i.dir,m)){j()}}else{i.el.scroll(i.dir,m,true,l.animDuration,j)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(m,l){a();i.el=m;i.dir=l;var n=(m.ddScrollConfig&&m.ddScrollConfig.frequency)?m.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;i.id=setInterval(d,n)};var k=function(o,q){if(q||!c.dragCurrent){return}var s=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;s.refreshCache()}var t=Ext.lib.Event.getXY(o);var u=new Ext.lib.Point(t[0],t[1]);for(var m in e){var n=e[m],l=n._region;var p=n.ddScrollConfig?n.ddScrollConfig:s;if(l&&l.contains(u)&&n.isScrollable()){if(l.bottom-u.y<=p.vthresh){if(i.el!=n){g(n,"down")}return}else{if(l.right-u.x<=p.hthresh){if(i.el!=n){g(n,"left")}return}else{if(u.y-l.top<=p.vthresh){if(i.el!=n){g(n,"up")}return}else{if(u.x-l.left<=p.hthresh){if(i.el!=n){g(n,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(k,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m<l;m++){this.register(n[m])}}else{n=Ext.get(n);e[n.id]=n}},unregister:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m<l;m++){this.unregister(n[m])}}else{n=Ext.get(n);delete e[n.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var l in e){if(typeof e[l]=="object"){e[l]._region=e[l].getRegion()}}}}}();Ext.dd.Registry=function(){var d={};var b={};var a=0;var c=function(g,e){if(typeof g=="string"){return g}var h=g.id;if(!h&&e!==false){h="extdd-"+(++a);g.id=h}return h};return{register:function(j,k){k=k||{};if(typeof j=="string"){j=document.getElementById(j)}k.ddel=j;d[c(j)]=k;if(k.isHandle!==false){b[k.ddel.id]=k}if(k.handles){var h=k.handles;for(var g=0,e=h.length;g<e;g++){b[c(h[g])]=k}}},unregister:function(j){var l=c(j,false);var k=d[l];if(k){delete d[l];if(k.handles){var h=k.handles;for(var g=0,e=h.length;g<e;g++){delete b[c(h[g],false)]}}}},getHandle:function(e){if(typeof e!="string"){e=e.id}return b[e]},getHandleFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?b[g.id]:null},getTarget:function(e){if(typeof e!="string"){e=e.id}return d[e]},getTargetFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?d[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("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.el.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addClass("x-dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.shift({duration:this.repairDuration||0.5,easing:"easeOut",xy:b,stopFx:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null}};Ext.dd.DragSource=function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy()}Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});this.dragging=false};Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropMgr.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")}this.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)}});Ext.dd.DropTarget=function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:true})};Ext.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addClass(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeClass(this.overClass)}},notifyDrop:function(a,c,b){return false}});Ext.dd.DragZone=function(b,a){Ext.dd.DragZone.superclass.constructor.call(this,b,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}};Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()}});Ext.dd.DropZone=function(b,a){Ext.dd.DropZone.superclass.constructor.call(this,b,a)};Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.Element.addMethods({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});Ext.data.Api=(function(){var a={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(b){return(Ext.data.Api.actions[b])?true:false},getVerb:function(b){if(a[b]){return a[b]}for(var c in this.actions){if(this.actions[c]===b){a[b]=c;break}}return(a[b]!==undefined)?a[b]:null},isValid:function(b){var e=[];var d=this.actions;for(var c in b){if(!(c in d)){e.push(c)}}return(!e.length)?true:e},hasUniqueUrl:function(c,g){var b=(c.api[g])?c.api[g].url:null;var e=true;for(var d in c.api){if((e=(d===g)?true:(c.api[d].url!=b)?true:false)===false){break}}return e},prepare:function(b){if(!b.api){b.api={}}for(var d in this.actions){var c=this.actions[d];b.api[c]=b.api[c]||b.url||b.directFn;if(typeof(b.api[c])=="string"){b.api[c]={url:b.api[c]}}}},restify:function(b){b.restful=true;for(var c in this.restActions){b.api[this.actions[c]].method=this.restActions[c]}}}})();Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url.  Please review your proxy configuration.",execute:'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'}});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,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b<a;b++){d.fields.add(new Ext.data.Field(e[b]))}c.getField=function(g){return d.fields.get(g)};return c};Ext.data.Record.PREFIX="ext-record";Ext.data.Record.AUTO_ID=1;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.id=function(a){a.phantom=true;return[Ext.data.Record.PREFIX,"-",Ext.data.Record.AUTO_ID++].join("")};Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,phantom:false,join:function(a){this.store=a},set:function(b,c){var a=(typeof c==="object");if(!a&&String(this.data[b])===String(c)){return}else{if(a&&Ext.encode(this.data[b])===Ext.encode(c)){return}}this.dirty=true;if(!this.modified){this.modified={}}if(typeof this.modified[b]=="undefined"){this.modified[b]=this.data[b]}this.data[b]=c;if(!this.editing){this.afterEdit()}},afterEdit:function(){if(this.store){this.store.afterEdit(this)}},afterReject:function(){if(this.store){this.store.afterReject(this)}},afterCommit:function(){if(this.store){this.store.afterCommit(this)}},get:function(a){return this.data[a]},beginEdit:function(){this.editing=true;this.modified=this.modified||{}},cancelEdit:function(){this.editing=false;delete this.modified},endEdit:function(){this.editing=false;if(this.dirty){this.afterEdit()}},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(b!==true){this.afterReject()}},commit:function(a){this.dirty=false;delete this.modified;this.editing=false;if(a!==true){this.afterCommit()}},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))},isValid:function(){return this.fields.find(function(a){return(a.allowBlank===false&&Ext.isEmpty(this.data[a.name]))?true:false},this)?false:true},markDirty:function(){this.dirty=true;if(!this.modified){this.modified={}}this.fields.each(function(a){this.modified[a.name]=this.data[a.name]},this)}};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(e){if(Ext.isArray(e)){var b=["field1"],d=!Ext.isArray(e[0]);if(!d){for(var c=2,a=e[0].length;c<=a;++c){b.push("field"+c)}}return new Ext.data.ArrayStore({fields:b,data:e,expandData:d,autoDestroy:true,autoCreated:true})}return Ext.isObject(e)?(e.events?e:Ext.create(e,"store")):this.get(e)},getKey:function(a){return a.storeId}});Ext.data.Store=function(a){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(b){return b.id};this.baseParams={};this.removed=[];if(a&&a.data){this.inlineData=a.data;delete a.data}Ext.apply(this,a);this.paramNames=Ext.applyIf(this.paramNames||{},this.defaultParamNames);if(this.url&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url})}if(this.restful===true&&this.proxy){this.batch=false;Ext.data.Api.restify(this.proxy)}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType}if(this.reader.onMetaChange){this.reader.onMetaChange=this.onMetaChange.createDelegate(this)}if(this.writer){this.writer.meta=this.reader.meta;this.pruneModifiedRecords=true}}if(this.recordType){this.fields=this.recordType.prototype.fields}this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","exception","beforeload","load","loadexception","beforewrite","write");if(this.proxy){this.relayEvents(this.proxy,["loadexception","exception"])}if(this.writer){this.on({scope:this,add:this.createRecords,remove:this.destroyRecord,update:this.updateRecord})}this.sortToggle={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir)}else{if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction)}}Ext.data.Store.superclass.constructor.call(this);if(this.id){this.storeId=this.id;delete this.id}if(this.storeId){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,{writer:undefined,remoteSort:false,autoDestroy:false,pruneModifiedRecords:false,lastOptions:null,autoSave:true,batch:true,restful:false,paramNames:undefined,defaultParamNames:{start:"start",limit:"limit",sort:"sort",dir:"dir"},destroy:function(){if(this.storeId){Ext.StoreMgr.unregister(this)}this.data=null;Ext.destroy(this.proxy);this.reader=this.writer=null;this.purgeListeners()},add:function(b){b=[].concat(b);if(b.length<1){return}for(var d=0,a=b.length;d<a;d++){b[d].join(this)}var c=this.data.length;this.data.addAll(b);if(this.snapshot){this.snapshot.addAll(b)}this.fireEvent("add",this,b,c)},addSorted:function(a){var b=this.findInsertIndex(a);this.insert(b,a)},remove:function(a){var b=this.data.indexOf(a);if(b>-1){this.data.removeAt(b);if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(){this.data.clear();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}this.fireEvent("clear",this)},insert:function(c,b){b=[].concat(b);for(var d=0,a=b.length;d<a;d++){this.data.insert(c,b[d]);b[d].join(this)}this.fireEvent("add",this,b,c)},indexOf:function(a){return this.data.indexOf(a)},indexOfId:function(a){return this.data.indexOfKey(a)},getById:function(a){return this.data.key(a)},getAt:function(a){return this.data.itemAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},storeOptions:function(a){a=Ext.apply({},a);delete a.callback;delete a.scope;this.lastOptions=a},load:function(b){b=b||{};this.storeOptions(b);if(this.sortInfo&&this.remoteSort){var a=this.paramNames;b.params=b.params||{};b.params[a.sort]=this.sortInfo.field;b.params[a.dir]=this.sortInfo.direction}try{return this.execute("read",null,b)}catch(c){this.handleException(c);return false}},updateRecord:function(b,a,c){if(c==Ext.data.Record.EDIT&&this.autoSave===true&&(!a.phantom||(a.phantom&&a.isValid))){this.save()}},createRecords:function(c,b,d){for(var e=0,a=b.length;e<a;e++){if(b[e].phantom&&b[e].isValid()){b[e].markDirty();this.modified.push(b[e])}}if(this.autoSave===true){this.save()}},destroyRecord:function(b,a,c){if(this.modified.indexOf(a)!=-1){this.modified.remove(a)}if(!a.phantom){this.removed.push(a);a.lastIndex=c;if(this.autoSave===true){this.save()}}},execute:function(d,a,b){if(!Ext.data.Api.isAction(d)){throw new Ext.data.Api.Error("execute",d)}b=Ext.applyIf(b||{},{params:{}});var c=true;if(d==="read"){c=this.fireEvent("beforeload",this,b)}else{if(this.writer.listful===true&&this.restful!==true){a=(Ext.isArray(a))?a:[a]}else{if(Ext.isArray(a)&&a.length==1){a=a.shift()}}if((c=this.fireEvent("beforewrite",this,d,a,b))!==false){this.writer.write(d,b.params,a)}}if(c!==false){var e=Ext.apply({},b.params,this.baseParams);if(this.writer&&this.proxy.url&&!this.proxy.restful&&!Ext.data.Api.hasUniqueUrl(this.proxy,d)){e.xaction=d}this.proxy.request(Ext.data.Api.actions[d],a,e,this.reader,this.createCallback(d,a),this,b)}return c},save:function(){if(!this.writer){throw new Ext.data.Store.Error("writer-undefined")}if(this.removed.length){this.doTransaction("destroy",this.removed)}var a=[].concat(this.getModifiedRecords());if(!a.length){return true}var c=[];for(var b=a.length-1;b>=0;b--){if(a[b].phantom===true){var d=a.splice(b,1).shift();if(d.isValid()){c.push(d)}}else{if(!a[b].isValid()){a.splice(b,1)}}}if(c.length){this.doTransaction("create",c)}if(a.length){this.doTransaction("update",a)}return true},doTransaction:function(d,b){function e(g){try{this.execute(d,g)}catch(h){this.handleException(h)}}if(this.batch===false){for(var c=0,a=b.length;c<a;c++){e.call(this,b[c])}}else{e.call(this,b)}},createCallback:function(b,a){var c=Ext.data.Api.actions;return(b=="read")?this.loadRecords:function(e,d,g){this["on"+Ext.util.Format.capitalize(b)+"Records"](g,a,e);if(g===true){this.fireEvent("write",this,b,e,d,a)}}},clearModified:function(a){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d<a;d++){this.reMap(b[d])}}else{delete this.data.map[b._phid];this.data.map[b.id]=b;var c=this.data.keys.indexOf(b._phid);this.data.keys.splice(c,1,b.id);delete b._phid}},onCreateRecords:function(d,a,b){if(d===true){try{this.reader.realize(a,b);this.reMap(a)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onCreateRecords(d,a,b)}}}},onUpdateRecords:function(d,a,b){if(d===true){try{this.reader.update(a,b)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onUpdateRecords(d,a,b)}}}},onDestroyRecords:function(e,b,d){b=(b instanceof Ext.data.Record)?[b]:b;for(var c=0,a=b.length;c<a;c++){this.removed.splice(this.removed.indexOf(b[c]),1)}if(e===false){for(c=b.length-1;c>=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(h,b,g){if(!h||g===false){if(g!==false){this.fireEvent("load",this,[],b)}if(b.callback){b.callback.call(b.scope||this,[],b,false,h)}return}var e=h.records,d=h.totalRecords||e.length;if(!b||b.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var c=0,a=e.length;c<a;c++){e[c].join(this)}if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.data.clear();this.data.addAll(e);this.totalLength=d;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(d,this.data.length+e.length);this.add(e)}this.fireEvent("load",this,e,b);if(b.callback){b.callback.call(b.scope||this,e,b,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if(this.sortInfo&&!this.remoteSort){var a=this.sortInfo,b=a.field;this.sortData(b,a.direction)}},sortData:function(c,d){d=d||"ASC";var a=this.fields.get(c).sortType;var b=function(g,e){var i=a(g.data[c]),h=a(e.data[c]);return i>h?1:(i<h?-1:0)};this.data.sort(d,b);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(d,b)}},setDefaultSort:function(b,a){a=a?a.toUpperCase():"ASC";this.sortInfo={field:b,direction:a};this.sortToggle[b]=a},sort:function(e,c){var d=this.fields.get(e);if(!d){return false}if(!c){if(this.sortInfo&&this.sortInfo.field==d.name){c=(this.sortToggle[d.name]||"ASC").toggle("ASC","DESC")}else{c=d.sortDir}}var b=(this.sortToggle)?this.sortToggle[d.name]:null;var a=(this.sortInfo)?this.sortInfo:null;this.sortToggle[d.name]=c;this.sortInfo={field:d.name,direction:c};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this)}else{if(!this.load(this.lastOptions)){if(b){this.sortToggle[d.name]=b}if(a){this.sortInfo=a}}}},each:function(b,a){this.data.each(b,a)},getModifiedRecords:function(){return this.modified},createFilterFn:function(c,b,d,a){if(Ext.isEmpty(b,false)){return false}b=this.data.createValueMatcher(b,d,a);return function(e){return b.test(e.data[c])}},sum:function(e,g,a){var c=this.data.items,b=0;g=g||0;a=(a||a===0)?a:c.length-1;for(var d=g;d<=a;d++){b+=(c[d].data[e]||0)}return b},filter:function(d,c,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.filterBy(b):this.clearFilter()},filterBy:function(b,a){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(b,a||this);this.fireEvent("datachanged",this)},query:function(d,c,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.queryBy(b):this.data.clone()},queryBy:function(b,a){var c=this.snapshot||this.data;return c.filterBy(b,a||this)},find:function(d,c,g,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.data.findIndexBy(b,null,g):-1},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)===a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(j,k,b){var h=(b===true&&this.snapshot)?this.snapshot.items:this.data.items;var m,n,a=[],c={};for(var e=0,g=h.length;e<g;e++){m=h[e].data[j];n=String(m);if((k||!Ext.isEmpty(m))&&!c[n]){c[n]=true;a[a.length]=m}}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;if(b.sortInfo){this.sortInfo=b.sortInfo}else{if(this.sortInfo&&!this.fields.get(this.sortInfo.field)){delete this.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},setBaseParam:function(a,b){this.baseParams=this.baseParams||{};this.baseParams[a]=b}});Ext.reg("store",Ext.data.Store);Ext.data.Store.Error=Ext.extend(Ext.Error,{name:"Ext.data.Store"});Ext.apply(Ext.data.Store.Error.prototype,{lang:{"writer-undefined":"Attempted to execute a write-action without a DataWriter installed."}});Ext.data.Field=function(d){if(typeof d=="string"){d={name:d}}Ext.apply(this,d);if(!this.type){this.type="auto"}var c=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=c[this.sortType]}if(!this.sortType){switch(this.type){case"string":this.sortType=c.asUCString;break;case"date":this.sortType=c.asDate;break;default:this.sortType=c.none}}var e=/[\$,%]/g;if(!this.convert){var b,a=this.dateFormat;switch(this.type){case"":case"auto":case undefined:b=function(g){return g};break;case"string":b=function(g){return(g===undefined||g===null)?"":String(g)};break;case"int":b=function(g){return g!==undefined&&g!==null&&g!==""?parseInt(String(g).replace(e,""),10):""};break;case"float":b=function(g){return g!==undefined&&g!==null&&g!==""?parseFloat(String(g).replace(e,""),10):""};break;case"bool":case"boolean":b=function(g){return g===true||g==="true"||g==1};break;case"date":b=function(h){if(!h){return""}if(Ext.isDate(h)){return h}if(a){if(a=="timestamp"){return new Date(h*1000)}if(a=="time"){return new Date(parseInt(h,10))}return Date.parseDate(h,a)}var g=Date.parse(h);return g?new Date(g):null};break}this.convert=b}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true};Ext.data.DataReader=function(a,b){this.meta=a;this.recordType=Ext.isArray(b)?Ext.data.Record.create(b):b};Ext.data.DataReader.prototype={buildExtractors:Ext.emptyFn,realize:function(b,d){if(Ext.isArray(b)){for(var c=b.length-1;c>=0;c--){if(Ext.isArray(d)){this.realize(b.splice(c,1).shift(),d.splice(c,1).shift())}else{this.realize(b.splice(c,1).shift(),d)}}}else{if(Ext.isArray(d)&&d.length==1){d=d.shift()}if(!this.isData(d)){throw new Ext.data.DataReader.Error("realize",b)}this.buildExtractors();var a=this.extractValues(d,b.fields.items,b.fields.items.length);b.phantom=false;b._phid=b.id;b.id=d[this.meta.idProperty];b.data=a;b.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){a.commit();throw new Ext.data.DataReader.Error("update",a)}this.buildExtractors();a.data=this.extractValues(Ext.apply(a.data,c),a.fields.items,a.fields.items.length);a.commit()}},isData:function(a){return(a&&Ext.isObject(a)&&!Ext.isEmpty(a[this.meta.idProperty]))?true:false}};Ext.data.DataReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataReader"});Ext.apply(Ext.data.DataReader.Error.prototype,{lang:{update:"#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",realize:"#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.","invalid-response":"#readResponse received an invalid response from the server."}});Ext.data.DataWriter=function(a){Ext.apply(this,a)};Ext.data.DataWriter.prototype={writeAllFields:false,listful:false,write:function(b,c,a){this.render(b,a,c,this[b](a))},render:Ext.emptyFn,update:function(a){var d={};if(Ext.isArray(a)){var c=[],b=[];Ext.each(a,function(e){b.push(e.id);c.push(this.updateRecord(e))},this);d[this.meta.idProperty]=b;d[this.meta.root]=c}else{if(a instanceof Ext.data.Record){d[this.meta.idProperty]=a.id;d[this.meta.root]=this.updateRecord(a)}}return d},updateRecord:Ext.emptyFn,create:function(a){var c={};if(Ext.isArray(a)){var b=[];Ext.each(a,function(d){b.push(this.createRecord(d))},this);c[this.meta.root]=b}else{if(a instanceof Ext.data.Record){c[this.meta.root]=this.createRecord(a)}}return c},createRecord:Ext.emptyFn,destroy:function(a){var d={};if(Ext.isArray(a)){var c=[],b=[];Ext.each(a,function(e){c.push(this.destroyRecord(e))},this);d[this.meta.root]=c}else{if(a instanceof Ext.data.Record){d[this.meta.root]=this.destroyRecord(a)}}return d},destroyRecord:Ext.emptyFn,toHash:function(e){var d=e.fields.map,c={},b=(this.writeAllFields===false&&e.phantom===false)?e.getChanges():e.data,a;Ext.iterate(b,function(h,g){if((a=d[h])){c[a.mapping?a.mapping:a.name]=g}});c[this.meta.idProperty]=e.id;return c}};Ext.data.DataProxy=function(a){a=a||{};this.api=a.api;this.url=a.url;this.restful=a.restful;this.listeners=a.listeners;this.prettyUrls=a.prettyUrls;try{Ext.data.Api.prepare(this)}catch(b){if(b instanceof Ext.data.Api.Error){b.toConsole()}}this.addEvents("exception","beforeload","load","loadexception","beforewrite","write");Ext.data.DataProxy.superclass.constructor.call(this)};Ext.extend(Ext.data.DataProxy,Ext.util.Observable,{restful:false,setApi:function(){if(arguments.length==1){var a=Ext.data.Api.isValid(arguments[0]);if(a===true){this.api=arguments[0]}else{throw new Ext.data.Api.Error("invalid",a)}}else{if(arguments.length==2){if(!Ext.data.Api.isAction(arguments[0])){throw new Ext.data.Api.Error("invalid",arguments[0])}this.api[arguments[0]]=arguments[1]}}Ext.data.Api.prepare(this)},isApiAction:function(a){return(this.api[a])?true:false},request:function(e,b,g,a,h,d,c){if(!this.api[e]&&!this.load){throw new Ext.data.DataProxy.Error("action-undefined",e)}g=g||{};if((e===Ext.data.Api.actions.read)?this.fireEvent("beforeload",this,g):this.fireEvent("beforewrite",this,e,b,g)!==false){this.doRequest.apply(this,arguments)}else{h.call(d||this,null,c,false)}},load:null,doRequest:function(e,b,g,a,h,d,c){this.load(g,a,h,d,c)},buildUrl:function(d,b){b=b||null;var c=(this.api[d])?this.api[d].url:this.url;if(!c){throw new Ext.data.Api.Error("invalid-url",d)}var e=null;var a=c.match(/(.*)(\.\w+)$/);if(a){e=a[2];c=a[1]}if((this.prettyUrls===true||this.restful===true)&&b instanceof Ext.data.Record&&!b.phantom){c+="/"+b.id}if(e){c+=e}return c},destroy:function(){this.purgeListeners()}});Ext.data.DataProxy.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataProxy"});Ext.apply(Ext.data.DataProxy.Error.prototype,{lang:{"action-undefined":"DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.","api-invalid":"Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions."}});Ext.data.ScriptTagProxy=function(a){Ext.apply(this,a);Ext.data.ScriptTagProxy.superclass.constructor.call(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,doRequest:function(e,g,d,h,j,k,l){var c=Ext.urlEncode(Ext.apply(d,this.extraParams));var b=this.buildUrl(e,g);if(!b){throw new Ext.data.Api.Error("invalid-url",b)}b=Ext.urlAppend(b,c);if(this.nocache){b=Ext.urlAppend(b,"_dc="+(new Date().getTime()))}var a=++Ext.data.ScriptTagProxy.TRANS_ID;var m={id:a,action:e,cb:"stcCallback"+a,scriptId:"stcScript"+a,params:d,arg:l,url:b,callback:j,scope:k,reader:h};window[m.cb]=this.createCallback(e,g,m);b+=String.format("&{0}={1}",this.callbackParam,m.cb);if(this.autoAbort!==false){this.abort()}m.timeoutId=this.handleFailure.defer(this.timeout,this,[m]);var i=document.createElement("script");i.setAttribute("src",b);i.setAttribute("type","text/javascript");i.setAttribute("id",m.scriptId);this.head.appendChild(i);this.trans=m},createCallback:function(d,b,c){var a=this;return function(e){a.trans=false;a.destroyTrans(c,true);if(d===Ext.data.Api.actions.read){a.onRead.call(a,d,c,e)}else{a.onWrite.call(a,d,c,e,b)}}},onRead:function(d,c,b){var a;try{a=c.reader.readRecords(b)}catch(g){this.fireEvent("loadexception",this,c,b,g);this.fireEvent("exception",this,"response",d,c,b,g);c.callback.call(c.scope||window,null,c.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,c,b);this.fireEvent("exception",this,"remote",d,c,b,null)}else{this.fireEvent("load",this,b,c.arg)}c.callback.call(c.scope||window,a,c.arg,a.success)},onWrite:function(g,d,c,b){var a=d.reader;try{a.readResponse(g,c)}catch(h){this.fireEvent("exception",this,"response",g,d,c,h);d.callback.call(d.scope||window,null,c,false);return}if(!c[a.meta.successProperty]===true){this.fireEvent("exception",this,"remote",g,d,c,b);d.callback.call(d.scope||window,null,c,false);return}this.fireEvent("write",this,g,c[a.meta.root],c,b,d.arg);d.callback.call(d.scope||window,c[a.meta.root],c,true)},isLoading:function(){return this.trans?true:false},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans)}},destroyTrans:function(b,a){this.head.removeChild(document.getElementById(b.scriptId));clearTimeout(b.timeoutId);if(a){window[b.cb]=undefined;try{delete window[b.cb]}catch(c){}}else{window[b.cb]=function(){window[b.cb]=undefined;try{delete window[b.cb]}catch(d){}}}},handleFailure:function(a){this.trans=false;this.destroyTrans(a,false);if(a.action===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,null,a.arg)}this.fireEvent("exception",this,"response",a.action,{response:null,options:a.arg});a.callback.call(a.scope||window,null,a.arg,false)},destroy:function(){this.abort();Ext.data.ScriptTagProxy.superclass.destroy.call(this)}});Ext.data.HttpProxy=function(a){Ext.data.HttpProxy.superclass.constructor.call(this,a);this.conn=a;this.conn.url=null;this.useAjax=!a||!a.events;var c=Ext.data.Api.actions;this.activeRequest={};for(var b in c){this.activeRequest[c[b]]=undefined}};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},setUrl:function(a,b){this.conn.url=a;if(b===true){this.url=a;Ext.data.Api.prepare(this)}},doRequest:function(g,d,i,c,b,e,a){var h={method:(this.api[g])?this.api[g]["method"]:undefined,request:{callback:b,scope:e,arg:a},reader:c,callback:this.createCallback(g,d),scope:this};if(typeof(i[c.meta.root])==="object"){h.jsonData=i}else{h.params=i||{}}if(this.conn.url===null){this.conn.url=this.buildUrl(g,d)}else{if(this.restful===true&&d instanceof Ext.data.Record&&!d.phantom){this.conn.url+="/"+d.id}}if(this.useAjax){Ext.applyIf(h,this.conn);if(this.activeRequest[g]){}this.activeRequest[g]=Ext.Ajax.request(h)}else{this.conn.request(h)}this.conn.url=null},createCallback:function(b,a){return function(e,d,c){this.activeRequest[b]=undefined;if(!d){if(b===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,e,c)}this.fireEvent("exception",this,"response",b,e,c);e.request.callback.call(e.request.scope,null,e.request.arg,false);return}if(b===Ext.data.Api.actions.read){this.onRead(b,e,c)}else{this.onWrite(b,e,c,a)}}},onRead:function(d,h,b){var a;try{a=h.reader.read(b)}catch(g){this.fireEvent("loadexception",this,h,b,g);this.fireEvent("exception",this,"response",d,h,b,g);h.request.callback.call(h.request.scope,null,h.request.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,h,b);var c=h.reader.readResponse(d,b);this.fireEvent("exception",this,"remote",d,h,c,null)}else{this.fireEvent("load",this,h,h.request.arg)}h.request.callback.call(h.request.scope,a,h.request.arg,a.success)},onWrite:function(g,i,c,b){var a=i.reader;var d;try{d=a.readResponse(g,c)}catch(h){this.fireEvent("exception",this,"response",g,i,c,h);i.request.callback.call(i.request.scope,null,i.request.arg,false);return}if(d[a.meta.successProperty]===false){this.fireEvent("exception",this,"remote",g,i,d,b)}else{this.fireEvent("write",this,g,d[a.meta.root],d,b,i.request.arg)}i.request.callback.call(i.request.scope,d[a.meta.root],d,d[a.meta.successProperty])},destroy:function(){if(!this.useAjax){this.conn.abort()}else{if(this.activeRequest){var b=Ext.data.Api.actions;for(var a in b){if(this.activeRequest[b[a]]){Ext.Ajax.abort(this.activeRequest[b[a]])}}}}Ext.data.HttpProxy.superclass.destroy.call(this)}});Ext.data.MemoryProxy=function(b){var a={};a[Ext.data.Api.actions.read]=true;Ext.data.MemoryProxy.superclass.constructor.call(this,{api:a});this.data=b};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{doRequest:function(b,c,a,d,h,i,j){a=a||{};var k;try{k=d.readRecords(this.data)}catch(g){this.fireEvent("loadexception",this,null,j,g);this.fireEvent("exception",this,"response",b,j,null,g);h.call(i,null,j,false);return}h.call(i,k,j,true)}});Ext.data.JsonWriter=function(a){Ext.data.JsonWriter.superclass.constructor.call(this,a);if(this.returnJson!=undefined){this.encode=this.returnJson}};Ext.extend(Ext.data.JsonWriter,Ext.data.DataWriter,{returnJson:undefined,encode:true,render:function(c,a,d,b){Ext.apply(d,b);if(this.encode===true){if(Ext.isArray(a)&&b[this.meta.idProperty]){d[this.meta.idProperty]=Ext.encode(d[this.meta.idProperty])}d[this.meta.root]=Ext.encode(d[this.meta.root])}},createRecord:function(a){return this.toHash(a)},updateRecord:function(a){return this.toHash(a)},destroyRecord:function(a){return a.id}});Ext.data.JsonReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:"id",successProperty:"success",totalProperty:"total"});Ext.data.JsonReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(a){var b=a.responseText;var c=Ext.decode(b);if(!c){throw {message:"JsonReader.read: Json object not found"}}return this.readRecords(c)},onMetaChange:function(a,c,b){},simpleAccess:function(b,a){return b[a]},getJsonAccessor:function(){var a=/[\[\.]/;return function(c){try{return(a.test(c))?new Function("obj","return obj."+c):function(d){return d[c]}}catch(b){}return Ext.emptyFn}}(),readRecords:function(a){this.jsonData=a;if(a.metaData){delete this.ef;this.meta=a.metaData;this.recordType=Ext.data.Record.create(a.metaData.fields);this.onMetaChange(this.meta,this.recordType,a)}var u=this.meta,m=this.recordType,h=m.prototype.fields,t=h.items,p=h.length,q;this.buildExtractors();var l=this.getRoot(a),k=l.length,j=k,r=true;if(u.totalProperty){q=parseInt(this.getTotal(a),10);if(!isNaN(q)){j=q}}if(u.successProperty){q=this.getSuccess(a);if(q===false||q==="false"){r=false}}var d=[];for(var e=0;e<k;e++){var b=l[e];var g=new m(this.extractValues(b,t,p),this.getId(b));g.json=b;d[e]=g}return{success:r,records:d,totalRecords:j}},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.getJsonAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.getJsonAccessor(l.successProperty)}this.getRoot=l.root?this.getJsonAccessor(l.root):function(g){return g};if(l.id||l.idProperty){var d=this.getJsonAccessor(l.id||l.idProperty);this.getId=function(i){var g=d(i);return(g===undefined||g==="")?null:g}}else{this.getId=function(){return null}}var c=[];for(var b=0;b<j;b++){e=k[b];var a=(e.mapping!==undefined&&e.mapping!==null)?e.mapping:e.name;c.push(this.getJsonAccessor(a))}this.ef=c},extractValues:function(h,d,a){var g,c={};for(var e=0;e<a;e++){g=d[e];var b=this.ef[e](h);c[g.name]=g.convert((b!==undefined)?b:g.defaultValue,h)}return c},readResponse:function(b,a){var c=(a.responseText!==undefined)?Ext.decode(a.responseText):a;if(!c){throw new Ext.data.JsonReader.Error("response")}if(Ext.isEmpty(c[this.meta.successProperty])){throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty)}if((b===Ext.data.Api.actions.create||b===Ext.data.Api.actions.update)){if(Ext.isEmpty(c[this.meta.root])){throw new Ext.data.JsonReader.Error("root-emtpy",this.meta.root)}else{if(c[this.meta.root]===undefined){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}this.ef=this.buildExtractors();return c}});Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.JsonReader"});Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',"root-undefined-response":'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',"root-undefined-config":'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',"idProperty-undefined":'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',"root-emtpy":'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'}});Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(q){this.arrayData=q;var h=this.meta,d=h?Ext.num(h.idIndex,h.id):null,b=this.recordType,p=b.prototype.fields,y=[],e;if(!this.getRoot){this.getRoot=h.root?this.getJsonAccessor(h.root):function(i){return i};if(h.totalProperty){this.getTotal=this.getJsonAccessor(h.totalProperty)}}var t=this.getRoot(q);for(var x=0;x<t.length;x++){var r=t[x];var a={};var m=((d||d===0)&&r[d]!==undefined&&r[d]!==""?r[d]:null);for(var w=0,l=p.length;w<l;w++){var z=p.items[w];var u=z.mapping!==undefined&&z.mapping!==null?z.mapping:w;e=r[u]!==undefined?r[u]:z.defaultValue;e=z.convert(e,r);a[z.name]=e}var c=new b(a,m);c.json=r;y[y.length]=c}var g=y.length;if(h.totalProperty){e=parseInt(this.getTotal(q),10);if(!isNaN(e)){g=e}}return{records:y,totalRecords:g}}});Ext.data.ArrayStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.ArrayStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.ArrayReader(a)}))},loadData:function(e,b){if(this.expandData===true){var d=[];for(var c=0,a=e.length;c<a;c++){d[d.length]=[e[c]]}e=d}Ext.data.ArrayStore.superclass.loadData.call(this,e,b)}});Ext.reg("arraystore",Ext.data.ArrayStore);Ext.data.SimpleStore=Ext.data.ArrayStore;Ext.reg("simplestore",Ext.data.SimpleStore);Ext.data.JsonStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.JsonReader(a)}))}});Ext.reg("jsonstore",Ext.data.JsonStore);Ext.data.XmlWriter=Ext.extend(Ext.data.DataWriter,{render:function(c,a,d,b){},createRecord:function(a){},updateRecord:function(a){},destroyRecord:function(a){}});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(z){this.xmlData=z;var s=z.documentElement||z;var l=Ext.DomQuery;var b=this.recordType,p=b.prototype.fields;var d=this.meta.idPath||this.meta.id;var h=0,e=true;if(this.meta.totalRecords){h=l.selectNumber(this.meta.totalRecords,s,0)}if(this.meta.success){var o=l.selectValue(this.meta.success,s,true);e=o!==false&&o!=="false"}var w=[];var A=l.select(this.meta.record,s);for(var u=0,x=A.length;u<x;u++){var r=A[u];var a={};var m=d?l.selectValue(d,r):undefined;for(var t=0,k=p.length;t<k;t++){var y=p.items[t];var g=l.selectValue(Ext.value(y.mapping,y.name,true),r,y.defaultValue);g=y.convert(g,r);a[y.name]=g}var c=new b(a,m);c.node=r;w[w.length]=c}return{success:e,records:w,totalRecords:h||w.length}},readResponse:Ext.emptyFn});Ext.data.XmlStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.XmlReader(a)}))}});Ext.reg("xmlstore",Ext.data.XmlStore);Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.GroupingStore.superclass.constructor.call(this,a);this.applyGroupField()},remoteGroup:false,groupOnSort:false,groupDir:"ASC",clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams){delete this.baseParams.groupBy}var a=this.lastOptions;if(a&&a.params){delete a.params.groupBy}this.reload()}else{this.applySort();this.fireEvent("datachanged",this)}},groupBy:function(d,b,c){c=c?(String(c).toUpperCase()=="DESC"?"DESC":"ASC"):this.groupDir;if(this.groupField==d&&this.groupDir==c&&!b){return}this.groupField=d;this.groupDir=c;this.applyGroupField();if(this.groupOnSort){this.sort(d,c);return}if(this.remoteGroup){this.reload()}else{var a=this.sortInfo||{};if(a.field!=d||a.direction!=c){this.applySort()}else{this.sortData(d,c)}this.fireEvent("datachanged",this)}},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}this.baseParams.groupBy=this.groupField;this.baseParams.groupDir=this.groupDir}},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.groupDir!=this.sortInfo.direction)){this.sortData(this.groupField,this.groupDir)}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);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.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,k,l,n){var j=[];var h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:j.push(a[e.meta.root]);break;case Ext.data.Api.actions.read:if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d<g;d++){j.push(a[this.paramOrder[d]])}}else{if(this.paramsAsHash){j.push(a)}}break;case Ext.data.Api.actions.update:j.push(a[e.meta.idProperty]);j.push(a[e.meta.root]);break;case Ext.data.Api.actions.destroy:j.push(a[e.meta.root]);break}var m={params:a||{},callback:k,scope:l,arg:n,reader:e};j.push(this.createCallback(b,c,m),this);h.apply(window,j)},createCallback:function(c,a,b){return function(d,e){if(!e.status){if(c===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,b,e,null)}this.fireEvent("exception",this,"remote",c,b,e,null);b.callback.call(b.scope,null,b.arg,false);return}if(c===Ext.data.Api.actions.read){this.onRead(c,b,d,e)}else{this.onWrite(c,b,d,e,a)}}},onRead:function(g,e,a,d){var b;try{b=e.reader.readRecords(a)}catch(c){this.fireEvent("loadexception",this,e,d,c);this.fireEvent("exception",this,"response",g,e,d,c);e.callback.call(e.scope,null,e.arg,false);return}this.fireEvent("load",this,d,e.arg);e.callback.call(e.scope,b,e.arg,true)},onWrite:function(e,d,a,c,b){this.fireEvent("write",this,e,a,c,b,d.arg);d.callback.call(d.scope,a,c,true)}});Ext.data.DirectStore=function(a){a.batchTransactions=false;Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(a,{proxy:(typeof(a.proxy)=="undefined")?new Ext.data.DirectProxy(Ext.copyTo({},a,"paramOrder,paramsAsHash,directFn,api")):a.proxy,reader:(typeof(a.reader)=="undefined"&&typeof(a.fields)=="object")?new Ext.data.JsonReader(Ext.copyTo({},a,"totalProperty,root,idProperty"),a.fields):a.reader}))};Ext.extend(Ext.data.DirectStore,Ext.data.Store,{});Ext.reg("directstore",Ext.data.DirectStore);Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){this.addEvents("event","exception");this.transactions={};this.providers={}},addProvider:function(e){var c=arguments;if(c.length>1){for(var d=0,b=c.length;d<b;d++){this.addProvider(c[d])}return}if(!e.events){e=new Ext.Direct.PROVIDERS[e.type](e)}e.id=e.id||Ext.id();this.providers[e.id]=e;e.on("data",this.onProviderData,this);e.on("exception",this.onProviderException,this);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return this.providers[a]},removeProvider:function(b){var a=b.id?b:this.providers[b.id];a.un("data",this.onProviderData,this);a.un("exception",this.onProviderException,this);delete this.providers[a.id];return a},addTransaction:function(a){this.transactions[a.tid]=a;return a},removeTransaction:function(a){delete this.transactions[a.tid||a];return a},getTransaction:function(a){return this.transactions[a.tid||a]},onProviderData:function(d,c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.onProviderData(d,c[b])}return}if(c.name&&c.name!="event"&&c.name!="exception"){this.fireEvent(c.name,c)}else{if(c.type=="exception"){this.fireEvent("exception",c)}}this.fireEvent("event",c,d)},createEvent:function(a,b){return new Ext.Direct.eventTypes[a.type](Ext.apply(a,b))}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={};Ext.Direct.Transaction=function(a){Ext.apply(this,a);this.tid=++Ext.Direct.TID;this.retryCount=0};Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}};Ext.Direct.Event=function(a){Ext.apply(this,a)};Ext.Direct.Event.prototype={status:true,getData:function(){return this.data}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:"rpc",getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid)}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:"exception"});Ext.Direct.eventTypes={rpc:Ext.Direct.RemotingEvent,event:Ext.Direct.Event,exception:Ext.Direct.ExceptionEvent};Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(a){Ext.apply(this,a);this.addEvents("connect","disconnect","data","exception");Ext.direct.Provider.superclass.constructor.call(this,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(typeof a.responseText=="object"){return a.responseText}return Ext.decode(a.responseText)}return null},getEvents:function(j){var g=null;try{g=this.parseResponse(j)}catch(h){var d=new Ext.Direct.ExceptionEvent({data:h,xhr:j,code:Ext.Direct.exceptions.PARSE,message:"Error parsing json response: \n\n "+g});return[d]}var c=[];if(Ext.isArray(g)){for(var b=0,a=g.length;b<a;b++){c.push(Ext.Direct.createEvent(g[b]))}}else{c.push(Ext.Direct.createEvent(g))}return c}});Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(a){Ext.direct.PollingProvider.superclass.constructor.call(this,a);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent("beforepoll",this)!==false){if(typeof this.url=="function"){this.url(this.baseParams)}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams})}}},interval:this.interval,scope:this});this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing PollingProvider, no url configured."}}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;this.fireEvent("disconnect",this)}},onData:function(d,j,h){if(j){var c=this.getEvents(h);for(var b=0,a=c.length;b<a;b++){var g=c[b];this.fireEvent("data",this,g)}}else{var g=new Ext.Direct.ExceptionEvent({data:g,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:h});this.fireEvent("data",this,g)}}});Ext.Direct.PROVIDERS.polling=Ext.direct.PollingProvider;Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{enableBuffer:10,maxRetries:1,constructor:function(a){Ext.direct.RemotingProvider.superclass.constructor.call(this,a);this.addEvents("beforecall","call");this.namespace=(typeof this.namespace==="string")?Ext.ns(this.namespace):this.namespace||window;this.transactions={};this.callBuffer=[]},initAPI:function(){var h=this.actions;for(var j in h){var d=this.namespace[j]||(this.namespace[j]={});var e=h[j];for(var g=0,b=e.length;g<b;g++){var a=e[g];d[a.name]=this.createMethod(j,a)}}},isConnected:function(){return !!this.connected},connect:function(){if(this.url){this.initAPI();this.connected=true;this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing RemotingProvider, no url configured."}}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent("disconnect",this)}},onData:function(a,h,j){if(h){var k=this.getEvents(j);for(var b=0,c=k.length;b<c;b++){var d=k[b];var l=this.getTransaction(d);this.fireEvent("data",this,d);if(l){this.doCallback(l,d,true);Ext.Direct.removeTransaction(l)}}}else{var g=[].concat(a.ts);for(var b=0,c=g.length;b<c;b++){var l=this.getTransaction(g[b]);if(l&&l.retryCount<this.maxRetries){l.retry()}else{var d=new Ext.Direct.ExceptionEvent({data:d,transaction:l,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:j});this.fireEvent("data",this,d);if(l){this.doCallback(l,d,false);Ext.Direct.removeTransaction(l)}}}}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.tid}},doSend:function(d){var g={url:this.url,callback:this.onData,scope:this,ts:d};var b;if(Ext.isArray(d)){b=[];for(var c=0,a=d.length;c<a;c++){b.push(this.getCallData(d[c]))}}else{b=this.getCallData(d)}if(this.enableUrlEncode){var e={};e[typeof this.enableUrlEncode=="string"?this.enableUrlEncode:"data"]=Ext.encode(b);g.params=e}else{g.jsonData=b}Ext.Ajax.request(g)},combineAndSend:function(){var a=this.callBuffer.length;if(a>0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(typeof this.enableBuffer=="number"?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d)}},doForm:function(j,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:j,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:j,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb;var a=g.result||g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var k=this.el.getStyle("position");if(k!="absolute"&&k!="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 o=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var j=0,l=o.length;j<l;j++){if(o[j]&&c[o[j]]){var n=c[o[j]];this[n]=new Ext.Resizable.Handle(this,n,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 m=this.west,h=this.east,a=this.north,o=this.south;if(b&&(m||a)){b.position("relative");b.setLeft(m?m.el.getWidth():0);b.setTop(a?a.el.getHeight():0)}this.adjustments=[(h?-h.el.getWidth():0)+(m?-m.el.getWidth():0),(a?-a.el.getHeight():0)+(o?-o.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,{adjustments:[0,0],animate:false,disableTrackOver:false,draggable:false,duration:0.35,dynamic:false,easing:"easeOutStrong",enabled:true,handles:false,multiDirectional:false,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:5,minWidth:5,maxHeight:10000,maxWidth:10000,minX:0,minY:0,pinned:false,preserveRatio:false,resizeChild:false,transparent: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({scope:this,mousemove:this.onMouseMove,mouseup:this.onMouseUp})}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){this.activeHandle=null;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 d=this.el;var e=this.resizeChild;var c=this.adjustments;if(d.dom.offsetWidth){var a=d.getSize(true);e.setSize(a.width+c[0],a.height+c[1])}if(Ext.isIE){setTimeout(function(){if(d.dom.offsetWidth){var g=d.getSize(true);e.setSize(g.width+c[0],g.height+c[1])}},10)}}},snap:function(c,e,b){if(!e||!c){return c}var d=c;var a=c%e;if(a>0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return a},constrain:function(b,c,a,d){if(b-c<a){c=b-a}else{if(b-c>d){c=b-d}}return c},onMouseMove:function(z){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(z.getPoint())){return}var t=this.curSize||this.startBox,l=this.startBox.x,k=this.startBox.y,c=l,b=k,m=t.width,u=t.height,d=m,o=u,n=this.minWidth,A=this.minHeight,s=this.maxWidth,D=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,B=z.getXY(),r=-(this.startPoint[0]-Math.max(this.minX,B[0])),p=-(this.startPoint[1]-Math.max(this.minY,B[1])),j=this.activeHandle.position,E,g;switch(j){case"east":m+=r;m=Math.min(Math.max(n,m),s);break;case"south":u+=p;u=Math.min(Math.max(A,u),D);break;case"southeast":m+=r;u+=p;m=Math.min(Math.max(n,m),s);u=Math.min(Math.max(A,u),D);break;case"north":p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"west":r=this.constrain(m,r,n,s);l+=r;m-=r;break;case"northeast":m+=r;m=Math.min(Math.max(n,m),s);p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"northwest":r=this.constrain(m,r,n,s);p=this.constrain(u,p,A,D);k+=p;u-=p;l+=r;m-=r;break;case"southwest":r=this.constrain(m,r,n,s);u+=p;u=Math.min(Math.max(A,u),D);l+=r;m-=r;break}var q=this.snap(m,i,n);var C=this.snap(u,a,A);if(q!=m||C!=u){switch(j){case"northeast":k-=C-u;break;case"north":k-=C-u;break;case"southwest":l-=q-m;break;case"west":l-=q-m;break;case"northwest":l-=q-m;k-=C-u;break}m=q;u=C}if(this.preserveRatio){switch(j){case"southeast":case"east":u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);break;case"south":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"northeast":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"north":E=m;m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);l+=(E-m)/2;break;case"southwest":u=o*(m/d);u=Math.min(Math.max(A,u),D);E=m;m=d*(u/o);l+=E-m;break;case"west":g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);k+=(g-u)/2;E=m;m=d*(u/o);l+=E-m;break;case"northwest":E=m;g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);k+=g-u;l+=E-m;break}}this.proxy.setBounds(l,k,m,u);if(this.dynamic){this.resizeElement()}}catch(v){}}},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(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(c,e,b,d){if(!this.tpl){var a=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});a.compile();Ext.Resizable.Handle.prototype.tpl=a}this.position=e;this.rz=c;this.el=this.tpl.append(c.el.dom,[this.position],true);this.el.unselectable();if(d){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!b){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}};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)},destroy:function(){Ext.destroy(this.el);this.el=null}};Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,initHidden:true,monitorResize:true,elements:"header,body",frame:true,floating:true,initComponent:function(){Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(this.initHidden===false){this.show()}else{this.hidden=true}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},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();this.mon(this.mask,"click",this.focus,this)}this.initTools()},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.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);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(){if(this.rendered){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this)}Ext.destroy(this.focusEl,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.mon(this.header,"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();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"&&this.fbar){c=this.fbar.items.get(a)}else{if(b=="string"){c=Ext.getCmp(a)}else{c=a}}}c=c||this.focusEl;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 this}if(this.fireEvent("beforeshow",this)===false){return this}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()}return this},afterShow:function(b){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();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}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.createDelegate(this,[true],false);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.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}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(!this.activeGhost){return}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);return 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)}return 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)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize();this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this)}this.doAnchor=function(){this.alignTo(c,e,d)};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}this.doAnchor();return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){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 g={};var d=[];var e=null;var c=function(j,i){return(!j._lastAccess||j._lastAccess<i._lastAccess)?-1:1};var h=function(){var l=d,j=l.length;if(j>0){l.sort(c);var k=l[0].manager.zseed;for(var m=0;m<j;m++){var n=l[m];if(n&&!n.hidden){n.setZIndex(k+(m*10))}}}a()};var b=function(i){if(i!=e){if(e){e.setActive(false)}e=i;if(i){i.setActive(true)}}};var a=function(){for(var j=d.length-1;j>=0;--j){if(!d[j].hidden){b(d[j]);return}}b(null)};return{zseed:9000,register:function(i){g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(l,k){var m=[];for(var j=d.length-1;j>=0;--j){var n=d[j];if(l.call(k||n,n)!==false){m.push(n)}}return m},each:function(j,i){for(var k in g){if(g[k]&&typeof g[k]!="function"){if(j.call(i||g[k],g[k])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var s,b,o,r;var h,k,q,a,l,n,i,g;var p,t,m,c="";var d=function(v){if(s.isVisible()){s.hide();u();Ext.callback(b.fn,b.scope||window,[v,t.dom.value,b],1)}};var u=function(){if(b&&b.cls){s.el.removeClass(b.cls)}l.reset()};var e=function(x,v,w){if(b&&b.closable!==false){s.hide();u()}if(w){w.stopEvent()}};var j=function(v){var x=0;if(!v){p.ok.hide();p.cancel.hide();p.yes.hide();p.no.hide();return x}s.footer.dom.style.display="";for(var w in p){if(typeof p[w]!="function"){if(v[w]){p[w].show();p[w].setText(typeof v[w]=="string"?v[w]:Ext.MessageBox.buttonText[w]);x+=p[w].el.getWidth()+15}else{p[w].hide()}}}return x};return{getDialog:function(v){if(!s){s=new Ext.Window({autoCreate:true,title:v,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){d("no")}else{d("cancel")}}});p={};var w=this.buttonText;p.ok=s.addButton(w.ok,d.createCallback("ok"));p.yes=s.addButton(w.yes,d.createCallback("yes"));p.no=s.addButton(w.no,d.createCallback("no"));p.cancel=s.addButton(w.cancel,d.createCallback("cancel"));p.ok.hideMode=p.yes.hideMode=p.no.hideMode=p.cancel.hideMode="offsets";s.render(document.body);s.getEl().addClass("x-window-dlg");o=s.mask;h=s.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>'});i=Ext.get(h.dom.firstChild);var x=h.dom.childNodes[1];k=Ext.get(x.firstChild);q=Ext.get(x.childNodes[2].firstChild);q.enableDisplayMode();q.addKeyListener([10,13],function(){if(s.isVisible()&&b&&b.buttons){if(b.buttons.ok){d("ok")}else{if(b.buttons.yes){d("yes")}}}});a=Ext.get(x.childNodes[2].childNodes[1]);a.enableDisplayMode();l=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return s},updateText:function(z){if(!s.isVisible()&&!b.width){s.setSize(this.maxWidth,100)}k.update(z||"&#160;");var x=c!=""?(i.getWidth()+i.getMargins("lr")):0;var B=k.getWidth()+k.getMargins("lr");var y=s.getFrameWidth("lr");var A=s.body.getFrameWidth("lr");if(Ext.isIE&&x>0){x+=3}var v=Math.max(Math.min(b.width||x+B+y+A,this.maxWidth),Math.max(b.minWidth||this.minWidth,m||0));if(b.prompt===true){t.setWidth(v-x-y-A)}if(b.progress===true||b.wait===true){l.setSize(v-x-y-A)}if(Ext.isIE&&v==m){v+=4}s.setSize(v,"auto").center();return this},updateProgress:function(w,v,x){l.updateProgress(w,v);if(x){this.updateText(x)}return this},isVisible:function(){return s&&s.isVisible()},hide:function(){var v=s?s.activeGhost:null;if(this.isVisible()||v){s.hide();u();if(v){s.unghost(false,false)}}return this},show:function(y){if(this.isVisible()){this.hide()}b=y;var z=this.getDialog(b.title||"&#160;");z.setTitle(b.title||"&#160;");var v=(b.closable!==false&&b.progress!==true&&b.wait!==true);z.tools.close.setDisplayed(v);t=q;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){q.hide();a.show();a.setHeight(typeof b.multiline=="number"?b.multiline:this.defaultTextHeight);t=a}else{q.show();a.hide()}}else{q.hide();a.hide()}t.dom.value=b.value||"";if(b.prompt){z.focusEl=t}else{var x=b.buttons;var w=null;if(x&&x.ok){w=p.ok}else{if(x&&x.yes){w=p.yes}}if(w){z.focusEl=w}}if(b.iconCls){z.setIconClass(b.iconCls)}this.setIcon(b.icon);if(b.cls){z.el.addClass(b.cls)}z.proxyDrag=b.proxyDrag===true;z.modal=b.modal!==false;z.mask=b.modal!==false?o:false;z.on("show",function(){z.keyMap.setDisabled(v!==true);z.doLayout();this.setIcon(b.icon);m=j(b.buttons);l.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.wait===true){l.wait(b.waitConfig)}},this,{single:true});if(!z.isVisible()){document.body.appendChild(s.el.dom);z.setAnimateTarget(b.animEl);z.show(b.animEl)}return this},setIcon:function(v){if(v&&v!=""){i.removeClass("x-hidden");i.replaceClass(c,v);h.addClass("x-dlg-icon");c=v}else{i.replaceClass(c,"x-hidden");h.removeClass("x-dlg-icon");c=""}return this},progress:function(x,w,v){this.show({title:x,msg:w,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:v});return this},wait:function(x,w,v){this.show({title:w,msg:x,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:v});return this},alert:function(y,x,w,v){this.show({title:y,msg:x,buttons:this.OK,fn:w,scope:v});return this},confirm:function(y,x,w,v){this.show({title:y,msg:x,buttons:this.YESNO,fn:w,scope:v,icon:this.QUESTION});return this},prompt:function(A,z,x,w,v,y){this.show({title:A,msg:z,buttons:this.OKCANCEL,fn:x,minWidth:250,scope:w,prompt:true,multiline:v,value:y});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:110,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;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 l=/^(a|n|d|b|s|o)\:(.*)$/;var c=l.exec(unescape(a));if(!c||!c[1]){return}var g=c[1];var j=c[2];switch(g){case"n":return parseFloat(j);case"d":return new Date(Date.parse(j));case"b":return(j=="1");case"a":var h=[];var k=j.split("^");for(var b=0,d=k.length;b<d;b++){h.push(this.decodeValue(k[b]))}return h;case"o":var h={};var k=j.split("^");for(var b=0,d=k.length;b<d;b++){var e=k[b].split("=");h[e[0]]=this.decodeValue(e[1])}return h;default:return j}},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 g="";for(var e=0,a=c.length;e<a;e++){g+=this.encodeValue(c[e]);if(e!=a-1){g+="^"}}b="a:"+g}else{if(typeof c=="object"){var g="";for(var d in c){if(typeof c[d]!="function"&&c[d]!==undefined){g+=d+"="+this.encodeValue(c[d])+"^"}}b="o:"+g.substring(0,g.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 d={};var h=document.cookie+";";var b=/\s?(.*?)=(.*?);/g;var g;while((g=b.exec(h))!=null){var a=g[1];var e=g[2];if(a&&a.substring(0,3)=="ys-"){d[a.substr(3)]=this.decodeValue(e)}}return d},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(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.bindStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);var b=this.getTemplateTarget();b.update("");var a=this.store.getRange();if(a.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){b.update(this.emptyText)}this.all.clear()}else{this.tpl.overwrite(b,this.collectData(a,0));this.all.fill(Ext.query(this.itemSelector,b.dom));this.updateIndexes(0)}this.hasSkippedEmptyText=true},getTemplateTarget:function(){return this.el},prepareData:function(a){return a},collectData:function(b,e){var d=[];for(var c=0,a=b.length;c<a;c++){d[d.length]=this.prepareData(b[c].data,e+c,b[c])}return d},bufferRender:function(a){var b=document.createElement("div");this.tpl.overwrite(b,this.collectData(a));return Ext.query(this.itemSelector,b)},onUpdate:function(g,a){var b=this.store.indexOf(a);var e=this.isSelected(b);var c=this.all.elements[b];var d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e<this.all.getCount()){h=this.all.item(e).insertSibling(c,"before",true);b.splice.apply(b,[e,0].concat(c))}else{h=this.all.last().insertSibling(c,"after",true);b.push.apply(b,c)}this.updateIndexes(e)},onRemove:function(c,a,b){this.deselect(b);this.all.removeElement(b,true);this.updateIndexes(b);if(this.store.getCount()===0){this.refresh()}},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(d,c){var b=this.all.elements;d=d||0;c=c||((c===0)?0:(b.length-1));for(var a=d;a<=c;a++){b[a].viewIndex=a}},getStore:function(){return this.store},bindStore: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!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.refresh,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh})}this.store=a;if(a){this.refresh()}},findItemFromChild:function(a){return Ext.fly(a).findParent(this.itemSelector,this.getTemplateTarget())},onClick:function(c){var b=c.getTarget(this.itemSelector,this.getTemplateTarget());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.onContainerClick(c)}}},onContainerClick:function(a){this.clearSelections()},onContextMenu:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("contextmenu",this,this.indexOf(a),a,b)}else{this.fireEvent("containercontextmenu",this,b)}},onDblClick:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("dblclick",this,this.indexOf(a),a,b)}},onMouseOver:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());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,true)){Ext.fly(this.lastItem).removeClass(this.overClass);this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,a);delete this.lastItem}}},onItemClick:function(b,a,c){if(this.fireEvent("beforeclick",this,a,b,c)===false){return false}if(this.multiSelect){this.doMultiSelection(b,a,c);c.preventDefault()}else{if(this.singleSelect){this.doSingleSelection(b,a,c);c.preventDefault()}}return true},doSingleSelection:function(b,a,c){if(c.ctrlKey&&this.isSelected(a)){this.deselect(a)}else{this.select(a,false)}},doMultiSelection:function(c,a,d){if(d.shiftKey&&this.last!==false){var b=this.last;this.selectRange(b,a,d.ctrlKey);this.last=b}else{if((d.ctrlKey||this.simpleSelect)&&this.isSelected(a)){this.deselect(a)}else{this.select(a,d.ctrlKey||d.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var b=[],d=this.selected.elements;for(var c=0,a=d.length;c<a;c++){b.push(d[c].viewIndex)}return b},getSelectedRecords:function(){var d=[],c=this.selected.elements;for(var b=0,a=c.length;b<a;b++){d[d.length]=this.store.getAt(c[b].viewIndex)}return d},getRecords:function(b){var e=[],d=b;for(var c=0,a=d.length;c<a;c++){e[e.length]=this.store.getAt(d[c].viewIndex)}return e},getRecord:function(a){return this.store.getAt(a.viewIndex)},clearSelections:function(a,b){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c<a;c++){this.select(d[c],true,true)}if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var e=this.getNode(d);if(!g){this.clearSelections(true)}if(e&&!this.isSelected(e)){if(this.fireEvent("beforeselect",this,e,this.selected.elements)!==false){Ext.fly(e).addClass(this.selectedClass);this.selected.add(e);this.last=e.viewIndex;if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}}}},selectRange:function(c,a,b){if(!b){this.clearSelections(true)}this.select(this.getNodes(c,a),true)},getNode:function(a){if(Ext.isString(a)){return document.getElementById(a)}else{if(Ext.isNumber(a)){return this.all.elements[a]}}return a},getNodes:function(e,a){var d=this.all.elements;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;var b=[],c;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:19,columnResize:true,columnSort:true,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.ListView.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.ListView.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>")}if(!this.tpl){this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>")}var k=this.columns,g=0,h=0,l=k.length;for(var e=0;e<l;e++){var m=k[e];if(!m.tpl){m.tpl=new Ext.XTemplate("{"+m.dataIndex+"}")}else{if(Ext.isString(m.tpl)){m.tpl=new Ext.XTemplate(m.tpl)}}m.align=m.align||"left";if(Ext.isNumber(m.width)){m.width*=100;g+=m.width;h++}}if(h<l){var b=l-h;if(g<100){var a=((100-g)/b);for(var d=0;d<l;d++){var m=k[d];if(!Ext.isNumber(m.width)){m.width=a}}}}Ext.ListView.superclass.initComponent.call(this)},onRender:function(){Ext.ListView.superclass.onRender.apply(this,arguments);this.internalTpl.overwrite(this.el,{columns:this.columns});this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild);this.innerHd=Ext.get(this.el.dom.firstChild.firstChild);if(this.hideHeaders){this.el.dom.firstChild.style.display="none"}},getTemplateTarget:function(){return this.innerBody},collectData:function(){var a=Ext.ListView.superclass.collectData.apply(this,arguments);return{columns:this.columns,rows:a}},verifyInternalSize:function(){if(this.lastSize){this.onResize(this.lastSize.width,this.lastSize.height)}},onResize:function(b,d){var e=this.innerBody.dom;var g=this.innerHd.dom;if(!e){return}var c=e.parentNode;if(Ext.isNumber(b)){var a=b-this.scrollOffset;if(this.reserveScrollOffset||((c.offsetWidth-c.clientWidth)>10)){e.style.width=a+"px";g.style.width=a+"px"}else{e.style.width=b+"px";g.style.width=b+"px";setTimeout(function(){if((c.offsetWidth-c.clientWidth)>10){e.style.width=a+"px";g.style.width=a+"px"}},10)}}if(Ext.isNumber(d=="number")){c.style.height=(d-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(e){e=e.dom||e;var a=e.parentNode,d=a.parentNode.childNodes;for(var b=0,g;g=d[b];b++){if(g==a){return b}}return -1},setHdWidths:function(){var c=this.innerHd.dom.getElementsByTagName("div");for(var b=0,d=this.columns,a=d.length;b<a;b++){c[b].style.width=d[b].width+"%"}}});Ext.reg("listview",Ext.ListView);Ext.ListView.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:0.05,constructor:function(a){Ext.apply(this,a);Ext.ListView.ColumnResizer.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"mousemove",this.handleHdMove,this);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(a.innerHd);a.on("beforedestroy",this.tracker.destroy,this.tracker)},handleHdMove:function(j,g){var b=5;var a=j.getPageX();var i=j.getTarget("em",3,true);if(i){var h=i.getRegion();var d=i.dom.style;var c=i.dom.parentNode;if(a-h.left<=b&&c!=c.parentNode.firstChild){this.activeHd=Ext.get(c.previousSibling.firstChild);d.cursor=Ext.isWebKit?"e-resize":"col-resize"}else{if(h.right-a<=b&&c!=c.parentNode.lastChild.previousSibling){this.activeHd=i;d.cursor=Ext.isWebKit?"w-resize":"col-resize"}else{delete this.activeHd;d.cursor=""}}}},onBeforeStart:function(a){this.dragHd=this.activeHd;return !!this.dragHd},onStart:function(c){this.view.disableHeaders=true;this.proxy=this.view.el.createChild({cls:"x-list-resizer"});this.proxy.setHeight(this.view.el.getHeight());var a=this.tracker.getXY()[0];var b=this.view.innerHd.getWidth();this.hdX=this.dragHd.getX();this.hdIndex=this.view.findHeaderIndex(this.dragHd);this.proxy.setX(this.hdX);this.proxy.setWidth(a-this.hdX);this.minWidth=b*this.minPct;this.maxWidth=b-(this.minWidth*(this.view.columns.length-1-this.hdIndex))},onDrag:function(b){var a=this.tracker.getXY()[0];this.proxy.setWidth((a-this.hdX).constrain(this.minWidth,this.maxWidth))},onEnd:function(l){var j=this.proxy.getWidth();this.proxy.remove();var h=this.hdIndex;var o=this.view,g=o.columns,k=g.length;var q=this.view.innerHd.getWidth(),d=this.minPct*100;var r=Math.ceil((j*100)/q);var p=g[h].width-r;var n=Math.floor(p/(k-1-h));var m=p-(n*(k-1-h));for(var c=h+1;c<k;c++){var b=g[c].width+n;var a=Math.max(d,b);if(b!=a){m+=b-a}g[c].width=a}g[h].width=r;g[h+1].width+=m;delete this.dragHd;this.view.setHdWidths();this.view.refresh();setTimeout(function(){o.disableHeaders=false},100)}});Ext.ListView.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(a){Ext.apply(this,a);Ext.ListView.Sorter.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"click",this.onHdClick,this);a.innerHd.setStyle("cursor","pointer");a.mon(a.store,"datachanged",this.updateSortState,this);this.updateSortState.defer(10,this,[a.store])},updateSortState:function(c){var g=c.getSortState();if(!g){return}this.sortState=g;var e=this.view.columns,h=-1;for(var d=0,a=e.length;d<a;d++){if(e[d].dataIndex==g.field){h=d;break}}if(h!=-1){var b=g.direction;this.updateSortIcon(h,b)}},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.view.innerHd.select("em").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},onHdClick:function(c){var b=c.getTarget("em",3);if(b&&!this.view.disableHeaders){var a=this.view.findHeaderIndex(b);this.view.store.sort(this.view.columns[a].dataIndex)}}});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(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig)));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()},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var g=this.tabPosition=="top"?"header":"footer";this[g].addClass("x-tab-panel-"+g+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);this.stripSpacer=b.createChild({cls:"x-tab-strip-spacer"},e);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge"});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var d=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this,{target:this});this.on("remove",this.onRemove,this,{target:this});this.mon(this.strip,"mousedown",this.onStripMouseDown,this);this.mon(this.strip,"contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.mon(this.strip,"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){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b<a;b++){var e=c[b];var g=e.getAttribute("title");e.removeAttribute("title");this.add({title:g,contentEl:e})}},initTab:function(c,a){var d=this.strip.dom.childNodes[a];var e=this.getTemplateArgs(c);var b=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);Ext.fly(b).addClassOnOver("x-tab-strip-over");if(c.tabTip){Ext.fly(b).child("span.x-tab-strip-text",true).qtip=c.tabTip}c.tabEl=b;c.on("disable",this.onItemDisabled,this);c.on("enable",this.onItemEnabled,this);c.on("titlechange",this.onItemTitleChanged,this);c.on("iconchange",this.onItemIconChanged,this);c.on("beforeshow",this.onBeforeShowItem,this)},getTemplateArgs:function(b){var a=b.closable?"x-tab-strip-closable":"";if(b.disabled){a+=" x-item-disabled"}if(b.iconCls){a+=" x-tab-with-icon"}if(b.tabCls){a+=" "+b.tabCls}return{id:this.id+this.idDelimiter+b.getItemId(),text:b.title,cls:a,iconCls:b.iconCls||""}},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.destroy(Ext.get(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("iconchange",this.onItemIconChanged,this);b.un("beforeshow",this.onBeforeShowItem,this);if(b==this.activeTab){var a=this.stack.next();if(a){this.setActiveTab(a)}else{if(this.items.getCount()>0){this.setActiveTab(0)}else{this.activeTab=null}}}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}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){Ext.fly(b).child("span.x-tab-strip-text").replaceClass(c,a)}},getTabEl:function(a){return document.getElementById(this.id+this.idDelimiter+this.getComponent(a).getItemId())},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 h=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||h<1||!a){return}var k=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=k;var m=this.strip.query("li:not([className^=x-tab-edge])");for(var e=0,j=m.length;e<j;e++){var l=m[e];var n=Ext.fly(l).child(".x-tab-strip-inner",true);var g=l.offsetWidth;var d=n.offsetWidth;n.style.width=(k-(g-d))+"px"}},adjustBodyWidth:function(a){if(this.header){this.header.setWidth(a)}if(this.footer){this.footer.setWidth(a)}return a},setActiveTab:function(c){c=this.getComponent(c);if(!c||this.fireEvent("beforetabchange",this,c,this.activeTab)===false){return}if(!this.rendered){this.activeTab=c;return}if(this.activeTab!=c){if(this.activeTab){var a=this.getTabEl(this.activeTab);if(a){Ext.fly(a).removeClass("x-tab-strip-active")}this.activeTab.fireEvent("deactivate",this.activeTab)}var b=this.getTabEl(c);Ext.fly(b).addClass("x-tab-strip-active");this.activeTab=c;this.stack.add(c);this.layout.setActiveItem(c);if(this.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(){this.pos=this.tabPosition=="bottom"?this.footer:this.header;var h=this.items.length;var d=this.pos.dom.offsetWidth;var c=this.pos.dom.clientWidth;var g=this.stripWrap;var e=g.dom;var b=e.offsetWidth;var i=this.getScrollPos();var a=this.edge.getOffsetsTo(this.stripWrap)[0]+i;if(!this.enableTabScroll||h<1||b<20){return}if(a<=c){e.scrollLeft=0;g.setWidth(c);if(this.scrolling){this.scrolling=false;this.pos.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="";e.style.marginRight=""}}}else{if(!this.scrolling){this.pos.addClass("x-tab-scrolling");if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="18px";e.style.marginRight="18px"}}c-=g.getMargins("lr");g.setWidth(c>20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.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.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e);var h=this.getScrollPos(),d=this.getScrollArea();var g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h;var b=g+c.offsetWidth;if(g<h){this.scrollTo(g,a)}else{if(b>(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(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")},beforeDestroy:function(){if(this.items){this.items.each(function(a){if(a&&a.tabEl){Ext.get(a.tabEl).removeAllListeners();a.tabEl=null}},this)}if(this.strip){this.strip.removeAllListeners()}Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c<b;c++){if(a[c]!=e){d.push(a[c])}}a=d},next:function(){return a.pop()}}};Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",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(Ext.isString(this.toggleGroup)){this.enableToggle=true}},getTemplateArgs:function(){var a=(this.cls||"");a+=(this.iconCls||this.icon)?(this.text?" x-btn-text-icon":" x-btn-icon"):" x-btn-noicon";if(this.pressed){a+=" x-btn-pressed"}return[this.text||"&#160;",this.type,this.iconCls||"",a,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass()]},getMenuClass:function(){return this.menu?(this.arrowAlign!="bottom"?"x-btn-arrow":"x-btn-arrow-bottom"):""},onRender:function(c,a){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;if(this.id){this.el.dom.id=this.el.id=this.id}if(this.icon){c.setStyle("background-image","url("+this.icon+")")}if(this.tabIndex!==undefined){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onClick,this)}this.mon(b,this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.doAutoWidth()},setIconClass:function(a){if(this.el){this.btnEl.replaceClass(this.iconCls,a)}this.iconCls=a;return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}Ext.destroy(this.menu,this.repeater)},onDestroy:function(){var a=Ext.getDoc();a.un("mouseover",this.monitorMouseOver,this);a.un("mouseup",this.onMouseUp,this);if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},doAutoWidth:function(){if(this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;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;return this},setText:function(a){this.text=a;if(this.el){this.el.child("td.x-btn-mc "+this.buttonSelector).update(a)}this.doAutoWidth();return this},getText:function(){return this.text},toggle:function(b,a){b=b===undefined?!this.pressed:!!b;if(b!=this.pressed){this.el[b?"addClass":"removeClass"]("x-btn-pressed");this.pressed=b;if(!a){this.fireEvent("toggle",this,b);if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,b)}}}return this},focus:function(){this.btnEl.focus()},onDisable:function(){this.onDisableChange(true)},onEnable:function(){this.onDisableChange(false)},onDisableChange:function(a){if(this.el){if(!Ext.isIE6||!this.text){this.el[a?"addClass":"removeClass"](this.disabledClass)}this.el.dom.disabled=a}this.disabled=a},showMenu:function(){if(this.rendered&&this.menu){if(this.tooltip){Ext.QuickTips.getQuickTip().cancelShow(this.btnEl)}this.menu.show(this.el,this.menuAlign)}return this},hideMenu:function(){if(this.menu){this.menu.hide()}return this},hasVisibleMenu:function(){return this.menu&&this.menu.isVisible()},onClick:function(a){if(a){a.preventDefault()}if(a.button!==0){return}if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,a);if(this.handler){this.handler.call(this.scope||this,this,a)}}},isMenuTriggerOver:function(b,a){return this.menu&&!a},isMenuTriggerOut:function(b,a){return this.menu&&!a},onMouseOver:function(b){if(!this.disabled){var a=b.within(this.el,true);if(!a){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=true}this.fireEvent("mouseover",this,b)}if(this.isMenuTriggerOver(b,a)){this.fireEvent("menutriggerover",this,this.menu,b)}}},monitorMouseOver:function(a){if(a.target!=this.el.dom&&!a.within(this.el)){if(this.monitoringMouseOver){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=false}this.onMouseOut(a)}},onMouseOut:function(b){var a=b.within(this.el)&&b.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,b);if(this.isMenuTriggerOut(b,a)){this.fireEvent("menutriggerout",this,this.menu,b)}},onFocus:function(a){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(a){this.el.removeClass("x-btn-focus")},getClickEl:function(b,a){return this.el},onMouseDown:function(a){if(!this.disabled&&a.button===0){this.getClickEl(a).addClass("x-btn-click");Ext.getDoc().on("mouseup",this.onMouseUp,this)}},onMouseUp:function(a){if(a.button===0){this.getClickEl(a,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this)}},onMenuShow:function(a){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)},onMenuHide:function(a){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu)},restoreClick:function(){this.ignoreNextClick=0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var a={};function b(e,j){if(j){var h=a[e.toggleGroup];for(var d=0,c=h.length;d<c;d++){if(h[d]!=e){h[d].toggle(false)}}}}return{register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){d.remove(c);c.un("toggle",b)}},getPressed:function(h){var e=a[h];if(e){for(var d=0,c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}}();Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"em",split:true,initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);this.addEvents("arrowclick")},onRender:function(){Ext.SplitButton.superclass.onRender.apply(this,arguments);if(this.arrowTooltip){this.el.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},getMenuClass:function(){return"x-btn-split"+(this.arrowAlign=="bottom"?"-bottom":"")},isClickOnArrow:function(a){return this.arrowAlign!="bottom"?a.getPageX()>this.el.child(this.buttonSelector).getRegion().right:a.getPageY()>this.el.child(this.buttonSelector).getRegion().bottom},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{if(this.enableToggle){this.toggle()}this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName=="em"},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!="em"}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(typeof c!="object"){c=this.menu.items.get(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,true)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var d;for(var b=0,a=this.itemCount;b<a;b++){var c=this.items[b];c.group=c.group||this.id;c.itemIndex=b;c.checkHandler=this.checkHandler;c.scope=this;c.checked=c.checked||false;this.menu.items.push(c);if(c.checked){d=c}}this.setActiveItem(d,true);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){this.menu.render();var c,a;for(var b=1;b<this.itemCount;b++){c=(this.activeItem.itemIndex+b)%this.itemCount;a=this.menu.items.itemAt(c);if(!a.disabled){a.setChecked(true);break}}}});Ext.reg("cycle",Ext.CycleButton);Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,triggerWidth:18,lastOverflow:false,noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',onLayout:function(d,g){if(!this.leftTr){g.addClass("x-toolbar-layout-ct");g.insertHtml("beforeEnd",'<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');this.leftTr=g.child("tr.x-toolbar-left-row",true);this.rightTr=g.child("tr.x-toolbar-right-row",true);this.extrasTr=g.child("tr.x-toolbar-extras-row",true)}var h=this.leftTr;var l=0;var j=d.items.items;for(var b=0,e=j.length,k;b<e;b++,l++){k=j[b];if(k.isFill){h=this.rightTr;l=-1}else{if(!k.rendered){k.render(this.insertCell(k,h,l))}else{if(!k.xtbHidden&&!this.isValidParent(k,h.childNodes[l])){var a=this.insertCell(k,h,l);a.appendChild(k.getDomPositionEl().dom);k.container=Ext.get(a)}}}}this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(g)},cleanup:function(b){var e=b.childNodes;for(var a=e.length-1,d;a>=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,a,d){var b=document.createElement("td");b.className="x-toolbar-cell";a.insertBefore(b,a.childNodes[d]||null);return b},hideItem:function(b){var a=(this.hiddens=this.hiddens||[]);a.push(b);b.xtbHidden=true;b.xtbWidth=b.getDomPositionEl().dom.parentNode.offsetWidth;b.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddens.remove(a);if(this.hiddens.length<1){delete this.hiddens}},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getDomPositionEl().dom.parentNode.offsetWidth},fitToSize:function(n){if(this.container.enableOverflow===false){return}var m=n.dom.clientWidth;var b=this.lastWidth||0;this.lastWidth=m;var d=n.dom.firstChild.offsetWidth;var l=m-this.triggerWidth;var k=-1;if(d>m||(this.hiddens&&m>=b)){var e,h=this.container.items.items,g=h.length,j;var a=0;for(e=0;e<g;e++){j=h[e];if(!j.isFill){a+=this.getItemWidth(j);if(a>l){if(!j.xtbHidden){this.hideItem(j)}}else{if(j.xtbHidden){this.unhideItem(j)}}}}}if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(e,b){var a=Ext.apply({},e.initialConfig),d=e.toggleGroup;Ext.apply(a,{text:e.overflowText||e.text,iconCls:e.iconCls,icon:e.icon,itemId:e.itemId,disabled:e.disabled,handler:e.handler,scope:e.scope,menu:e.menu,hideOnClick:b});if(d||e.enableToggle){Ext.apply(a,{group:d,checked:e.pressed,listeners:{checkchange:function(g,c){e.toggle(c)}}})}delete a.xtype;delete a.id;return a},addComponentToMenu:function(a,b){if(b instanceof Ext.Toolbar.Separator){a.add("-")}else{if(Ext.isFunction(b.isXType)){if(b.isXType("splitbutton")){a.add(this.createMenuConfig(b,true))}else{if(b.isXType("button")){a.add(this.createMenuConfig(b,!b.menu))}else{if(b.isXType("buttongroup")){b.items.each(function(c){this.addComponentToMenu(a,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){this.moreMenu.items.each(function(b){delete b.menu})}},beforeMoreShow:function(b){var g=this.container.items.items,a=g.length,k,j,d=function(h,c){return h.isXType("buttongroup")&&!(c instanceof Ext.Toolbar.Separator)};this.clearMenu();b.removeAll();for(var e=0;e<a;e++){k=g[e];if(k.xtbHidden){if(j&&(d(k,j)||d(j,k))){b.add("-")}this.addComponentToMenu(b,k);j=k}}if(b.items.length<1){b.add(this.noItemsMenuText)}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.moreMenu});var a=this.insertCell(this.more,this.extrasTr,100);this.more.render(a)}},destroy:function(){Ext.destroy(this.more,this.moreMenu);Ext.layout.ToolbarLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.toolbar=Ext.layout.ToolbarLayout;Ext.Toolbar=function(a){if(Ext.isArray(a)){a={items:a,layout:"toolbar"}}else{a=Ext.apply({layout:"toolbar"},a);if(a.buttons){a.items=a.buttons}}Ext.Toolbar.superclass.constructor.call(this,a)};(function(){var a=Ext.Toolbar;Ext.extend(a,Ext.Container,{defaultType:"button",trackMenus:true,internalDefaults:{removeMode:"container",hideParent:true},toolbarCls:"x-toolbar",initComponent:function(){a.superclass.initComponent.call(this);this.addEvents("overflowchange")},onRender:function(c,b){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+" x-small-editor"}}this.el=c.createChild(Ext.apply({id:this.id},this.autoCreate),b)}},lookupComponent:function(b){if(Ext.isString(b)){if(b=="-"){b=new a.Separator()}else{if(b==" "){b=new a.Spacer()}else{if(b=="->"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.constructItem(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.constructItem(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},constructItem:function(c,b){return Ext.create(c,b||this.defaultType)},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return Ext.Toolbar.superclass.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d<b;d++){e.push(this.addButton(c[d]))}return e}return this.add(this.constructButton(c))},addText:function(b){return this.addItem(new a.TextItem(b))},addDom:function(b){return this.add(new a.Item({autoEl:b}))},addField:function(b){return this.add(b)},insertButton:function(c,g){if(Ext.isArray(g)){var e=[];for(var d=0,b=g.length;d<b;d++){e.push(this.insertButton(c+d,g[d]))}return e}return Ext.Toolbar.superclass.insert.call(this,c,g)},initMenuTracking:function(b){if(this.trackMenus&&b.menu){this.mon(b,{menutriggerover:this.onButtonTriggerOver,menushow:this.onButtonMenuShow,menuhide:this.onButtonMenuHide,scope:this})}},constructButton:function(d){var c=d.events?d:this.constructItem(d,d.split?"splitbutton":this.defaultType);this.initMenuTracking(c);return c},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg("tbitem",a.Item);a.Separator=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"span",cls:"xtb-sep"},b)}});Ext.reg("tbseparator",a.Separator);a.Spacer=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"div",cls:"xtb-spacer",style:this.width?"width:"+this.width+"px":""},b)}});Ext.reg("tbspacer",a.Spacer);a.Fill=Ext.extend(a.Item,{render:Ext.emptyFn,isFill:true});Ext.reg("tbfill",a.Fill);a.TextItem=Ext.extend(a.Item,{constructor:function(b){if(Ext.isString(b)){b={autoEl:{cls:"xtb-text",html:b}}}else{b.autoEl={cls:"xtb-text",html:b.text||""}}a.TextItem.superclass.constructor.call(this,b)},setText:function(b){if(this.rendered){this.el.dom.innerHTML=b}else{this.autoEl.html=b}}});Ext.reg("tbtext",a.TextItem);a.Button=Ext.extend(Ext.Button,{});a.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg("tbbutton",a.Button);Ext.reg("tbsplit",a.SplitButton)})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:"x-btn-group",layout:"table",defaultType:"button",frame:true,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass("x-btn-group-notitle")}this.on("afterlayout",this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this)},applyDefaults:function(b){b=Ext.ButtonGroup.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}return b},onAfterLayout:function(){var a=this.body.getFrameWidth("lr")+this.body.dom.firstChild.offsetWidth;this.body.setWidth(a);this.el.setWidth(a+this.getFrameWidth())}});Ext.reg("buttongroup",Ext.ButtonGroup);(function(){var a=Ext.Toolbar;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",initComponent:function(){var c=[this.first=new a.Button({tooltip:this.firstText,overflowText:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.moveFirst,scope:this}),this.prev=new a.Button({tooltip:this.prevText,overflowText:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.movePrevious,scope:this}),"-",this.beforePageText,this.inputItem=new Ext.form.NumberField({cls:"x-tbar-page-number",allowDecimals:false,allowNegative:false,enableKeyEvents:true,selectOnFocus:true,listeners:{scope:this,keydown:this.onPagingKeyDown,blur:this.onPagingBlur}}),this.afterTextItem=new a.TextItem({text:String.format(this.afterPageText,1)}),"-",this.next=new a.Button({tooltip:this.nextText,overflowText:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.moveNext,scope:this}),this.last=new a.Button({tooltip:this.lastText,overflowText:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.moveLast,scope:this}),"-",this.refresh=new a.Button({tooltip:this.refreshText,overflowText:this.refreshText,iconCls:"x-tbar-loading",handler:this.refresh,scope:this})];var b=this.items||this.buttons||[];if(this.prependButtons){this.items=b.concat(c)}else{this.items=c.concat(b)}delete this.buttons;if(this.displayInfo){this.items.push("->");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,j){if(!this.rendered){this.dsLoaded=[b,e,j];return}var g=this.getParams();this.cursor=(j.params&&j.params[g.start])?j.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b<this.pageSize?1:Math.ceil(b/this.pageSize)}},changePage:function(b){this.doLoad(((b-1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onLoadError:function(){if(!this.rendered){return}this.refresh.enable()},readPage:function(e){var b=this.inputItem.getValue(),c;if(!b||isNaN(c=parseInt(b,10))){this.inputItem.setValue(e.activePage);return false}return c},onPagingFocus:function(){this.inputItem.select()},onPagingBlur:function(b){this.inputItem.setValue(this.getPageData().activePage)},onPagingKeyDown:function(i,h){var c=h.getKey(),j=this.getPageData(),g;if(c==h.RETURN){h.stopEvent();g=this.readPage(j);if(g!==false){g=Math.min(Math.max(1,g),j.pages)-1;this.doLoad(g*this.pageSize)}}else{if(c==h.HOME||c==h.END){h.stopEvent();g=c==h.HOME?1:j.pages;i.setValue(g)}else{if(c==h.UP||c==h.PAGEUP||c==h.DOWN||c==h.PAGEDOWN){h.stopEvent();if((g=this.readPage(j))){var b=h.shiftKey?10:1;if(c==h.DOWN||c==h.PAGEDOWN){b*=-1}g+=b;if(g>=1&g<=j.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},refresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this);if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=c.getCount()>0}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var k=false;var d;function g(){var l=top.location.href,m=l.indexOf("#");return m>=0?l.substr(m+1):null}function a(){c.value=d}function h(l){d=l;Ext.History.fireEvent("change",l)}function i(m){var l=['<html><body><div id="state">',m,"</div></body></html>"].join("");try{var o=e.contentWindow.document;o.open();o.write(l);o.close();return true}catch(n){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var o=e.contentWindow.document;var m=o.getElementById("state");var l=m?m.innerText:null;var n=g();setInterval(function(){o=e.contentWindow.document;m=o.getElementById("state");var q=m?m.innerText:null;var p=g();if(q!==l){l=q;h(l);top.location.hash=l;n=l;a()}else{if(p!==n){n=p;i(p)}}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}function j(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var l=g();setInterval(function(){var m=g();if(m!==l){l=m;h(l);a()}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(m,l){if(k){Ext.callback(m,l,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(m,l)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(m){this.on("ready",m,l,{single:true})}j()},add:function(l,m){if(m!==false){if(this.getToken()==l){return true}}if(Ext.isIE){return i(l)}else{top.location.hash=l;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return k?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());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,closeAction:"hide",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[this.closeAction],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,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1)},initTarget:function(b){var a;if((a=Ext.get(b))){if(this.target){this.target=Ext.get(this.target);this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.anchor){this.targetCounter++;var c=this.getOffsets();var j=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY;var a=Ext.lib.Dom.getViewWidth()-5;var g=Ext.lib.Dom.getViewHeight()-5;var i=(document.documentElement.scrollLeft||document.body.scrollLeft||0)+5;var h=(document.documentElement.scrollTop||document.body.scrollTop||0)+5;var b=[j[0]+c[0],j[1]+c[1]];var e=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]<i){if(this.anchorToTarget){this.defaultAlign="l-r";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="left";return this.getTargetXY()}if(b[0]+e.width>a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]<h){if(this.anchorToTarget){this.defaultAlign="t-b";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="top";return this.getTargetXY()}if(b[1]+e.height>g){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.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();if(this.anchorEl){this.anchorEl.hide()}Ext.ToolTip.superclass.hide.call(this);delete this.triggerElement},show:function(){if(this.anchor){this.showAt([-1000,-1000]);this.origConstrainPosition=this.constrainPosition;this.constrainPosition=false;this.anchor=this.origAnchor}this.showAt(this.getTargetXY());if(this.anchor){this.syncAnchor();this.anchorEl.show();this.constrainPosition=this.origConstrainPosition}else{this.anchorEl.hide()}},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)}},syncAnchor:function(){var a,b,c;switch(this.tipAnchor.charAt(0)){case"t":a="b";b="tl";c=[20+this.anchorOffset,2];break;case"r":a="l";b="tr";c=[-2,11+this.anchorOffset];break;case"b":a="t";b="bl";c=[20+this.anchorOffset,-2];break;default:a="r";b="tl";c=[2,11+this.anchorOffset];break}this.anchorEl.alignTo(this.el,a+"-"+b,c)},setPagePosition:function(a,b){Ext.ToolTip.superclass.setPagePosition.call(this,a,b);if(this.anchor){this.syncAnchor()}},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!==true&&!this.closable&&!a.within(this.el.dom)){this.disable();this.enable.defer(100,this)}},onDisable:function(){this.clearTimers();this.hide()},adjustPosition:function(a,d){if(this.contstrainPosition){var c=this.targetXY[1],b=this.getSize().height;if(d<=c&&(d+b)>=c){d=c-b-5}}return{x:a,y:d}},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(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",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g<a;g++){var l=h[g];var k=l.target;if(k){if(Ext.isArray(k)){for(var d=0,b=k.length;d<b;d++){this.targets[Ext.id(k[d])]=l}}else{this.targets[Ext.id(k)]=l}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(b){var a=this.activeTarget;b=Ext.get(b).dom;if(this.isVisible()){if(a&&a.el==b){this.hide()}}else{if(a&&a.el==b){this.clearTimer("show")}}},onTargetOver:function(i){if(this.disabled){return}this.targetXY=i.getXY();var c=i.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.anchor=this.activeTarget.anchor;if(this.anchor){this.anchorTarget=c}this.delayShow();return}var g,h=Ext.fly(c),b=this.tagConfig;var d=b.namespace;if(this.interceptTitles&&c.title){g=c.title;c.qtip=g;c.removeAttribute("title");i.preventDefault()}else{g=c.qtip||h.getAttribute(b.attribute,d)}if(g){var a=h.getAttribute(b.hide,d);this.activeTarget={el:c,text:g,width:h.getAttribute(b.width,d),autoHide:a!="user"&&a!=="false",title:h.getAttribute(b.title,d),cls:h.getAttribute(b.cls,d),align:h.getAttribute(b.align,d)};this.anchor=h.getAttribute(b.anchor,d);if(this.anchor){this.anchorTarget=c}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(this.anchor){this.constrainPosition=false}else{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,requestMethod:this.requestMethod})}else{if(typeof a=="object"&&!a.load){a=new Ext.tree.TreeLoader(a)}}this.loader=a;this.nodeHash={};if(this.root){var b=this.root;delete this.root;this.setRootNode(b)}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,h,g,e,d){if(c=="collapse"||c=="expand"||c=="beforecollapse"||c=="beforeexpand"||c=="move"||c=="beforemove"){c=c+"node"}return this.fireEvent(c,b,a,h,g,e,d)},getRootNode:function(){return this.root},setRootNode:function(b){Ext.destroy(this.root);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)}if(this.innerCt){this.innerCt.update("");this.afterRender()}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 d=[];var e=function(){if(this.attributes.checked){d.push(!b?this:(b=="id"?this.id:this.attributes[b]))}};c.cascade(e);return d},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(g,a,h){a=a||"id";var d=g.split(this.pathSeparator);var c=this.root;if(c.attributes[a]!=d[1]){if(h){h(false,null)}return}var b=1;var e=function(){if(++b==d.length){if(h){h(true,c)}return}var i=c.findChild(a,d[b]);if(!i){if(h){h(false,c)}return}c=i;i.expand(false,false,e)};c.expand(false,false,e)},selectPath:function(e,a,g){a=a||"id";var c=e.split(this.pathSeparator);var b=c.pop();if(c.length>0){var d=function(i,h){if(i&&h){var j=h.findChild(a,b);if(j){j.select();if(g){g(true,j)}}else{if(g){g(false,j)}}}else{if(g){g(false,j)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(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){this.tree.innerCt.on("mouseover",this.delegateOver,this);this.tree.innerCt.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").getAttribute("tree-node-id","ext");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(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}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))}},trackExit:function(a){if(this.lastOverNode&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode);delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},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){this.lastOverNode=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(b==a){b.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,b,a)!==false){if(a){a.ui.onSelectedChange(false)}this.selNode=b;b.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,b,a)}}return b},unselect:function(a){if(this.selNode==a){this.clearSelections()}},clearSelections:function(){var a=this.selNode;if(a){a.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return a},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(){var a=this.selNode||this.lastSelNode;if(!a){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c)}else{var b=c.lastChild;while(b&&b.isExpanded()&&b.childNodes.length>0){b=b.lastChild}return this.select(b)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode)}}return null},selectNext:function(){var b=this.selNode||this.lastSelNode;if(!b){return null}if(b.firstChild&&b.isExpanded()){return this.select(b.firstChild)}else{if(b.nextSibling){return this.select(b.nextSibling)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(a){this.tree=a;a.getTreeEl().on("keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c<a;c++){d[c].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(b!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(a){return this.selMap[a.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});Ext.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,"xnode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf){this.childNodes.indexOf=function(d){for(var c=0,b=this.length;c<b;c++){if(this[c]==d){return c}}return -1}}this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(b){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false}var a=this.getOwnerTree();if(a){if(a.proxyNodeEvent.apply(a,arguments)===false){return false}}return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d<a;d++){this.appendChild(g[d])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,e)===false){return false}var b=this.childNodes.length;var c=e.parentNode;if(c){if(e.fireEvent("beforemove",e.getOwnerTree(),e,c,this,b)===false){return false}c.removeChild(e)}b=this.childNodes.length;if(b===0){this.setFirstChild(e)}this.childNodes.push(e);e.parentNode=this;var h=this.childNodes[b-1];if(h){e.previousSibling=h;h.nextSibling=e}else{e.previousSibling=null}e.nextSibling=null;this.setLastChild(e);e.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,e,b);if(c){e.fireEvent("move",this.ownerTree,e,c,this,b)}return e}},removeChild:function(b){var a=this.childNodes.indexOf(b);if(a==-1){return false}if(this.fireEvent("beforeremove",this.ownerTree,this,b)===false){return false}this.childNodes.splice(a,1);if(b.previousSibling){b.previousSibling.nextSibling=b.nextSibling}if(b.nextSibling){b.nextSibling.previousSibling=b.previousSibling}if(this.firstChild==b){this.setFirstChild(b.nextSibling)}if(this.lastChild==b){this.setLastChild(b.previousSibling)}b.setOwnerTree(null);b.parentNode=null;b.previousSibling=null;b.nextSibling=null;this.fireEvent("remove",this.ownerTree,this,b);return b},insertBefore:function(d,a){if(!a){return this.appendChild(d)}if(d==a){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,d,a)===false){return false}var b=this.childNodes.indexOf(a);var c=d.parentNode;var e=b;if(c==this&&this.childNodes.indexOf(d)<b){e--}if(c){if(d.fireEvent("beforemove",d.getOwnerTree(),d,c,this,b,a)===false){return false}c.removeChild(d)}if(e===0){this.setFirstChild(d)}this.childNodes.splice(e,0,d);d.parentNode=this;var g=this.childNodes[e-1];if(g){d.previousSibling=g;g.nextSibling=d}else{d.previousSibling=null}d.nextSibling=a;a.previousSibling=d;d.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,d,a);if(c){d.fireEvent("move",this.ownerTree,d,c,this,e,a)}return d},remove:function(){this.parentNode.removeChild(this);return this},item:function(a){return this.childNodes[a]},replaceChild:function(a,c){var b=c?c.nextSibling:null;this.removeChild(c);this.insertBefore(a,b);return c},indexOf:function(a){return this.childNodes.indexOf(a)},getOwnerTree:function(){if(!this.ownerTree){var a=this;while(a){if(a.ownerTree){this.ownerTree=a.ownerTree;break}a=a.parentNode}}return this.ownerTree},getDepth:function(){var b=0;var a=this;while(a.parentNode){++b;a=a.parentNode}return b},setOwnerTree:function(b){if(b!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)}this.ownerTree=b;var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].setOwnerTree(b)}if(b){b.registerNode(this)}}},setId:function(b){if(b!==this.id){var a=this.ownerTree;if(a){a.unregisterNode(this)}this.id=b;if(a){a.registerNode(this)}this.onIdChange(b)}},onIdChange:Ext.emptyFn,getPath:function(c){c=c||"id";var e=this.parentNode;var a=[this.attributes[c]];while(e){a.unshift(e.attributes[c]);e=e.parentNode}var d=this.getOwnerTree().pathSeparator;return d+a.join(d)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(g,e,b){if(g.apply(e||this,b||[this])!==false){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].cascade(g,e,b)}}},eachChild:function(g,e,b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){if(g.apply(e||this,b||[d[c]])===false){break}}},findChild:function(d,e){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(c[b].attributes[d]==e){return c[b]}}return null},findChildBy:function(e,d){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(e.call(d||c[b],c[b])===true){return c[b]}}return null},sort:function(e,d){var c=this.childNodes;var a=c.length;if(a>0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b<a;b++){var h=c[b];h.previousSibling=c[b-1];h.nextSibling=c[b+1];if(b===0){this.setFirstChild(h)}if(b==a-1){this.setLastChild(h)}}}},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.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.hidden=a.hidden===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.call(this,c,a);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,c,d,b){if(!this.expanded){if(this.fireEvent("beforeexpand",this,a,c)===false){return}if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&c!==false)||c){this.ui.animExpand(function(){this.fireEvent("expand",this);this.runCallback(d,b||this,[this]);if(a===true){this.expandChildNodes(true)}}.createDelegate(this));return}else{this.ui.expand();this.fireEvent("expand",this);this.runCallback(d,b||this,[this])}}else{this.runCallback(d,b||this,[this])}if(a===true){this.expandChildNodes(true)}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,b)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(b,g,h,e){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);this.runCallback(h,e||this,[this]);if(b===true){this.collapseChildNodes(true)}}.createDelegate(this));return}else{this.ui.collapse();this.fireEvent("collapse",this);this.runCallback(h,e||this,[this])}}else{if(!this.expanded){this.runCallback(h,e||this,[this])}}if(b===true){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(true,false)}}},delayedExpand:function(a){if(!this.expandProcId){this.expandProcId=this.expand.defer(a,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(c,b){var a=this.getOwnerTree();a.expandPath(this.parentNode?this.parentNode.getPath():this.getPath(),false,function(){var d=a.getNodeById(this.id);a.getTreeEl().scrollChildIntoView(d.ui.anchor);this.runCallback(c,b||this,[this])}.createDelegate(this))},expandChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].expand(b)}},collapseChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(b)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(b){if(b!==false){this.fireEvent("beforechildrenrendered",this)}var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].render(true)}this.childrenRendered=true},sort:function(e,d){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){c[b].render(true)}}},render:function(a){this.ui.render(a);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(b,e){if(e){this.ui.childIndent=null}this.ui.renderIndent();if(b===true&&this.childrenRendered){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].renderIndent(true,e)}}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded&&this.rendered){this.renderChildren()}},destroy:function(){if(this.childNodes){for(var b=0,a=this.childNodes.length;b<a;b++){this.childNodes[b].destroy()}this.childNodes=null}if(this.ui.destroy){this.ui.destroy()}},onIdChange:function(a){this.ui.onIdChange(a)}});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,c){if(this.loading){var g;var d=function(){if(!this.loading){clearInterval(g);this.expand(b,e,h,c)}}.createDelegate(this);g=setInterval(d,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,c]),this);return}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,b,e,h,c)},isLoading:function(){return this.loading},loadComplete:function(a,c,d,b){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(a,c,d,b)},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(b,a){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild).destroy()}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,b,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,h,e,g,d,b){this.childIndent=null;if(this.rendered){var i=g.ui.getContainer();if(!i){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return}var c=b?b.ui.getEl():null;if(c){i.insertBefore(this.wrap,c)}else{i.appendChild(this.wrap)}this.node.renderIndent(true,e!=g)}},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{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 e=this.node,b=e.attributes;var d=e.parentNode?e.parentNode.ui.getContainer():e.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(e,b,d,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){d.appendChild(this.wrap)}}},renderElements:function(e,k,j,l){this.indentMarkup=e.parentNode?e.parentNode.ui.getChildIndent():"";var g=typeof k.checked=="boolean";var c=k.href?k.href:Ext.isGecko?"":"#";var d=['<li class="x-tree-node"><div ext:tree-node-id="',e.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',k.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="',k.icon||this.emptyIcon,'" class="x-tree-node-icon',(k.icon?" x-tree-node-inline-icon":""),(k.iconCls?" "+k.iconCls:""),'" unselectable="on" />',g?('<input class="x-tree-node-cb" type="checkbox" '+(k.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',c,'" tabIndex="1" ',k.hrefTarget?' target="'+k.hrefTarget+'"':"",'><span unselectable="on">',e.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var b;if(l!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",j,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].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,d,c;var a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow";var e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},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;if(this.holder){delete this.wrap;Ext.removeNode(this.holder);delete this.holder}else{Ext.removeNode(this.wrap);delete this.wrap}}};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);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b<a;b++){var e=d.appendChild(this.createNode(c[b]));if(this.preloadChildren){this.doPreload(e)}}d.endUpdate()}return true}return false},getParams:function(g){var b=[],e=this.baseParams;if(this.directFn){b.push(g.id);if(e){if(this.paramOrder){for(var d=0,a=this.paramOrder.length;d<a;d++){b.push(e[this.paramOrder[d]])}}else{if(this.paramsAsHash){b.push(e)}}}return b}else{for(var c in e){if(!Ext.isFunction(e[c])){b.push(encodeURIComponent(c),"=",encodeURIComponent(e[c]),"&")}}b.push("node=",encodeURIComponent(g.id));return b.join("")}},requestData:function(c,d,b){if(this.fireEvent("beforeload",this,c,d)!==false){if(this.directFn){var a=this.getParams(c);a.push(this.processDirectResponse.createDelegate(this,[{callback:d,node:c,scope:b}],true));this.directFn.apply(window,a)}else{this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:d,node:c,scope:b},params:this.getParams(c)})}}else{this.runCallback(d,b||c,[])}},processDirectResponse:function(a,b,c){if(b.status){this.handleResponse({responseData:Ext.isArray(a)?a:null,responseText:a,argument:c})}else{this.handleFailure({argument:c})}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,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(d,c,k,l){var m=d.responseText;try{var a=d.responseData||Ext.decode(m);c.beginUpdate();for(var g=0,h=a.length;g<h;g++){var b=this.createNode(a[g]);if(b){c.appendChild(b)}}c.endUpdate();this.runCallback(k,l||c,[c])}catch(j){this.handleFailure(d)}},handleResponse:function(c){this.transId=false;var b=c.argument;this.processResponse(c,b.node,b.callback,b.scope);this.fireEvent("load",this,b.node,c)},handleFailure:function(c){this.transId=false;var b=c.argument;this.fireEvent("loadexception",this,b.node,c);this.runCallback(b.callback,b.scope||b.node,[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(d,a,b){a=a||"text";var c;if(typeof d=="string"){var e=d.length;if(e==0&&this.clearBlank){this.clear();return}d=d.toLowerCase();c=function(g){return g.attributes[a].substr(0,e).toLowerCase()==d}}else{if(d.exec){c=function(g){return d.test(g.attributes[a])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(c,null,b)},filterBy:function(d,c,b){b=b||this.tree.root;if(this.autoClear){this.clear()}var a=this.filtered,i=this.reverse;var e=function(k){if(k==b){return true}if(a[k.id]){return false}var j=d.call(c||k,k);if(!j||i){a[k.id]=k;k.ui.hide();return false}return true};b.cascade(e);if(this.remove){for(var h in a){if(typeof h!="function"){var g=a[h];if(g&&g.parentNode){g.parentNode.removeChild(g)}}}}},clear:function(){var b=this.tree;var a=this.filtered;for(var d in a){if(typeof d!="function"){var c=a[d];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 e=this.dir&&this.dir.toLowerCase()=="desc";var g=this.property||"text";var h=this.sortType;var a=this.folderSort;var d=this.caseSensitive===true;var i=this.leafAttr||"leaf";this.sortFn=function(k,j){if(a){if(k.attributes[i]&&!j.attributes[i]){return 1}if(!k.attributes[i]&&j.attributes[i]){return -1}}var m=h?h(k):(d?k.attributes[g]:k.attributes[g].toUpperCase());var l=h?h(j):(d?j.attributes[g]:j.attributes[g].toUpperCase());if(m<l){return e?+1:-1}else{if(m>l){return e?-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=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),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,k,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&k)){return false}if(k=="append"&&g.allowChildren===false){return false}if((k=="above"||k=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=k;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var j=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&j!==false},getDropPoint:function(h,g,l){var m=g.node;if(m.isRoot){return m.allowChildren!==false?"append":false}var c=g.ddel;var o=Ext.lib.Dom.getY(c),j=o+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var k=m.allowChildren===false||m.isLeaf();if(this.appendOnly||m.parentNode.allowChildren===false){return k?false:"append"}var d=false;if(!this.allowParentInsert){d=m.hasChildNodes()&&m.isExpanded()}var a=(j-o)/(k?2:3);if(i>=o&&i<(o+a)){return"above"}else{if(!d&&(k||i>=j-a&&i<=j)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var k=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&k=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(k!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,k,i,h,g)){if(k){var a=b.ddel;var j;if(k=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";j="x-tree-drag-insert-above"}else{if(k=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";j="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";j="x-tree-drag-append"}}if(this.lastInsertClass!=j){Ext.fly(a).replaceClass(this.lastInsertClass,j);this.lastInsertClass=j}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(j,h,b,a,i,d){var g={tree:this.tree,target:j,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){j.ui.endDrop();return g.dropStatus}j=g.target;if(b=="append"&&!j.isExpanded()){j.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;b<a;b++){g=d[b];if(e=="above"){c.parentNode.insertBefore(g,c)}else{if(e=="below"){c.parentNode.insertBefore(g,c.nextSibling)}else{c.appendChild(g)}}}g.ui.focus();if(Ext.enableFx&&this.tree.hlDrop){g.ui.highlight()}c.ui.endDrop();this.tree.fireEvent("nodedrop",h)},afterNodeMoved:function(a,c,g,d,b){if(Ext.enableFx&&this.tree.hlDrop){b.ui.focus();b.ui.highlight()}this.tree.fireEvent("nodedrop",this.tree,d,c,a,g)},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.innerCt,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 d=c.events?c:new Ext.form.TextField(c);Ext.tree.TreeEditor.superclass.constructor.call(this,d,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 e=this.tree.getTreeEl().dom,d=c.dom;if(e.scrollLeft>d.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText("&#160;")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);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()}}}});
+/* SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+var swfobject=function(){var E="undefined",s="object",T="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",r="application/x-shockwave-flash",S="SWFObjectExprInst",y="onreadystatechange",P=window,k=document,u=navigator,U=false,V=[i],p=[],O=[],J=[],m,R,F,C,K=false,a=false,o,H,n=true,N=function(){var ab=typeof k.getElementById!=E&&typeof k.getElementsByTagName!=E&&typeof k.createElement!=E,ai=u.userAgent.toLowerCase(),Z=u.platform.toLowerCase(),af=Z?/win/.test(Z):/win/.test(ai),ad=Z?/mac/.test(Z):/mac/.test(ai),ag=/webkit/.test(ai)?parseFloat(ai.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Y=!+"\v1",ah=[0,0,0],ac=null;if(typeof u.plugins!=E&&typeof u.plugins[T]==s){ac=u.plugins[T].description;if(ac&&!(typeof u.mimeTypes!=E&&u.mimeTypes[r]&&!u.mimeTypes[r].enabledPlugin)){U=true;Y=false;ac=ac.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ah[0]=parseInt(ac.replace(/^(.*)\..*$/,"$1"),10);ah[1]=parseInt(ac.replace(/^.*\.(.*)\s.*$/,"$1"),10);ah[2]=/[a-zA-Z]/.test(ac)?parseInt(ac.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof P.ActiveXObject!=E){try{var ae=new ActiveXObject(X);if(ae){ac=ae.GetVariable("$version");if(ac){Y=true;ac=ac.split(" ")[1].split(",");ah=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}}catch(aa){}}}return{w3:ab,pv:ah,wk:ag,ie:Y,win:af,mac:ad}}(),l=function(){if(!N.w3){return}if((typeof k.readyState!=E&&k.readyState=="complete")||(typeof k.readyState==E&&(k.getElementsByTagName("body")[0]||k.body))){g()}if(!K){if(typeof k.addEventListener!=E){k.addEventListener("DOMContentLoaded",g,false)}if(N.ie&&N.win){k.attachEvent(y,function(){if(k.readyState=="complete"){k.detachEvent(y,arguments.callee);g()}});if(P==top){(function(){if(K){return}try{k.documentElement.doScroll("left")}catch(Y){setTimeout(arguments.callee,0);return}g()})()}}if(N.wk){(function(){if(K){return}if(!/loaded|complete/.test(k.readyState)){setTimeout(arguments.callee,0);return}g()})()}t(g)}}();function g(){if(K){return}try{var aa=k.getElementsByTagName("body")[0].appendChild(D("span"));aa.parentNode.removeChild(aa)}catch(ab){return}K=true;var Y=V.length;for(var Z=0;Z<Y;Z++){V[Z]()}}function L(Y){if(K){Y()}else{V[V.length]=Y}}function t(Z){if(typeof P.addEventListener!=E){P.addEventListener("load",Z,false)}else{if(typeof k.addEventListener!=E){k.addEventListener("load",Z,false)}else{if(typeof P.attachEvent!=E){j(P,"onload",Z)}else{if(typeof P.onload=="function"){var Y=P.onload;P.onload=function(){Y();Z()}}else{P.onload=Z}}}}}function i(){if(U){W()}else{I()}}function W(){var Y=k.getElementsByTagName("body")[0];var ab=D(s);ab.setAttribute("type",r);var aa=Y.appendChild(ab);if(aa){var Z=0;(function(){if(typeof aa.GetVariable!=E){var ac=aa.GetVariable("$version");if(ac){ac=ac.split(" ")[1].split(",");N.pv=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}else{if(Z<10){Z++;setTimeout(arguments.callee,10);return}}Y.removeChild(ab);aa=null;I()})()}else{I()}}function I(){var ah=p.length;if(ah>0){for(var ag=0;ag<ah;ag++){var Z=p[ag].id;var ac=p[ag].callbackFn;var ab={success:false,id:Z};if(N.pv[0]>0){var af=c(Z);if(af){if(G(p[ag].swfVersion)&&!(N.wk&&N.wk<312)){x(Z,true);if(ac){ab.success=true;ab.ref=A(Z);ac(ab)}}else{if(p[ag].expressInstall&&B()){var aj={};aj.data=p[ag].expressInstall;aj.width=af.getAttribute("width")||"0";aj.height=af.getAttribute("height")||"0";if(af.getAttribute("class")){aj.styleclass=af.getAttribute("class")}if(af.getAttribute("align")){aj.align=af.getAttribute("align")}var ai={};var Y=af.getElementsByTagName("param");var ad=Y.length;for(var ae=0;ae<ad;ae++){if(Y[ae].getAttribute("name").toLowerCase()!="movie"){ai[Y[ae].getAttribute("name")]=Y[ae].getAttribute("value")}}Q(aj,ai,Z,ac)}else{q(af);if(ac){ac(ab)}}}}}else{x(Z,true);if(ac){var aa=A(Z);if(aa&&typeof aa.SetVariable!=E){ab.success=true;ab.ref=aa}ac(ab)}}}}}function A(ab){var Y=null;var Z=c(ab);if(Z&&Z.nodeName=="OBJECT"){if(typeof Z.SetVariable!=E){Y=Z}else{var aa=Z.getElementsByTagName(s)[0];if(aa){Y=aa}}}return Y}function B(){return !a&&G("6.0.65")&&(N.win||N.mac)&&!(N.wk&&N.wk<312)}function Q(ab,ac,Y,aa){a=true;F=aa||null;C={success:false,id:Y};var af=c(Y);if(af){if(af.nodeName=="OBJECT"){m=h(af);R=null}else{m=af;R=Y}ab.id=S;if(typeof ab.width==E||(!/%$/.test(ab.width)&&parseInt(ab.width,10)<310)){ab.width="310"}if(typeof ab.height==E||(!/%$/.test(ab.height)&&parseInt(ab.height,10)<137)){ab.height="137"}k.title=k.title.slice(0,47)+" - Flash Player Installation";var ae=N.ie&&N.win?"ActiveX":"PlugIn",ad="MMredirectURL="+P.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ae+"&MMdoctitle="+k.title;if(typeof ac.flashvars!=E){ac.flashvars+="&"+ad}else{ac.flashvars=ad}if(N.ie&&N.win&&af.readyState!=4){var Z=D("div");Y+="SWFObjectNew";Z.setAttribute("id",Y);af.parentNode.insertBefore(Z,af);af.style.display="none";(function(){if(af.readyState==4){af.parentNode.removeChild(af)}else{setTimeout(arguments.callee,10)}})()}v(ab,ac,Y)}}function q(Z){if(N.ie&&N.win&&Z.readyState!=4){var Y=D("div");Z.parentNode.insertBefore(Y,Z);Y.parentNode.replaceChild(h(Z),Y);Z.style.display="none";(function(){if(Z.readyState==4){Z.parentNode.removeChild(Z)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.replaceChild(h(Z),Z)}}function h(ad){var ab=D("div");if(N.win&&N.ie){ab.innerHTML=ad.innerHTML}else{var Z=ad.getElementsByTagName(s)[0];if(Z){var ae=Z.childNodes;if(ae){var Y=ae.length;for(var aa=0;aa<Y;aa++){if(!(ae[aa].nodeType==1&&ae[aa].nodeName=="PARAM")&&!(ae[aa].nodeType==8)){ab.appendChild(ae[aa].cloneNode(true))}}}}}return ab}function v(aj,ah,Z){var Y,ab=c(Z);if(N.wk&&N.wk<312){return Y}if(ab){if(typeof aj.id==E){aj.id=Z}if(N.ie&&N.win){var ai="";for(var af in aj){if(aj[af]!=Object.prototype[af]){if(af.toLowerCase()=="data"){ah.movie=aj[af]}else{if(af.toLowerCase()=="styleclass"){ai+=' class="'+aj[af]+'"'}else{if(af.toLowerCase()!="classid"){ai+=" "+af+'="'+aj[af]+'"'}}}}}var ag="";for(var ae in ah){if(ah[ae]!=Object.prototype[ae]){ag+='<param name="'+ae+'" value="'+ah[ae]+'" />'}}ab.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ai+">"+ag+"</object>";O[O.length]=aj.id;Y=c(aj.id)}else{var aa=D(s);aa.setAttribute("type",r);for(var ad in aj){if(aj[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="styleclass"){aa.setAttribute("class",aj[ad])}else{if(ad.toLowerCase()!="classid"){aa.setAttribute(ad,aj[ad])}}}}for(var ac in ah){if(ah[ac]!=Object.prototype[ac]&&ac.toLowerCase()!="movie"){e(aa,ac,ah[ac])}}ab.parentNode.replaceChild(aa,ab);Y=aa}}return Y}function e(aa,Y,Z){var ab=D("param");ab.setAttribute("name",Y);ab.setAttribute("value",Z);aa.appendChild(ab)}function z(Z){var Y=c(Z);if(Y&&Y.nodeName=="OBJECT"){if(N.ie&&N.win){Y.style.display="none";(function(){if(Y.readyState==4){b(Z)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.removeChild(Y)}}}function b(aa){var Z=c(aa);if(Z){for(var Y in Z){if(typeof Z[Y]=="function"){Z[Y]=null}}Z.parentNode.removeChild(Z)}}function c(aa){var Y=null;try{Y=k.getElementById(aa)}catch(Z){}return Y}function D(Y){return k.createElement(Y)}function j(aa,Y,Z){aa.attachEvent(Y,Z);J[J.length]=[aa,Y,Z]}function G(aa){var Z=N.pv,Y=aa.split(".");Y[0]=parseInt(Y[0],10);Y[1]=parseInt(Y[1],10)||0;Y[2]=parseInt(Y[2],10)||0;return(Z[0]>Y[0]||(Z[0]==Y[0]&&Z[1]>Y[1])||(Z[0]==Y[0]&&Z[1]==Y[1]&&Z[2]>=Y[2]))?true:false}function w(ad,Z,ae,ac){if(N.ie&&N.mac){return}var ab=k.getElementsByTagName("head")[0];if(!ab){return}var Y=(ae&&typeof ae=="string")?ae:"screen";if(ac){o=null;H=null}if(!o||H!=Y){var aa=D("style");aa.setAttribute("type","text/css");aa.setAttribute("media",Y);o=ab.appendChild(aa);if(N.ie&&N.win&&typeof k.styleSheets!=E&&k.styleSheets.length>0){o=k.styleSheets[k.styleSheets.length-1]}H=Y}if(N.ie&&N.win){if(o&&typeof o.addRule==s){o.addRule(ad,Z)}}else{if(o&&typeof k.createTextNode!=E){o.appendChild(k.createTextNode(ad+" {"+Z+"}"))}}}function x(aa,Y){if(!n){return}var Z=Y?"visible":"hidden";if(K&&c(aa)){c(aa).style.visibility=Z}else{w("#"+aa,"visibility:"+Z)}}function M(Z){var aa=/[\\\"<>\.;]/;var Y=aa.exec(Z)!=null;return Y&&typeof encodeURIComponent!=E?encodeURIComponent(Z):Z}var d=function(){if(N.ie&&N.win){window.attachEvent("onunload",function(){var ad=J.length;for(var ac=0;ac<ad;ac++){J[ac][0].detachEvent(J[ac][1],J[ac][2])}var aa=O.length;for(var ab=0;ab<aa;ab++){z(O[ab])}for(var Z in N){N[Z]=null}N=null;for(var Y in swfobject){swfobject[Y]=null}swfobject=null})}}();return{registerObject:function(ac,Y,ab,aa){if(N.w3&&ac&&Y){var Z={};Z.id=ac;Z.swfVersion=Y;Z.expressInstall=ab;Z.callbackFn=aa;p[p.length]=Z;x(ac,false)}else{if(aa){aa({success:false,id:ac})}}},getObjectById:function(Y){if(N.w3){return A(Y)}},embedSWF:function(ac,ai,af,ah,Z,ab,aa,ae,ag,ad){var Y={success:false,id:ai};if(N.w3&&!(N.wk&&N.wk<312)&&ac&&ai&&af&&ah&&Z){x(ai,false);L(function(){af+="";ah+="";var ak={};if(ag&&typeof ag===s){for(var am in ag){ak[am]=ag[am]}}ak.data=ac;ak.width=af;ak.height=ah;var an={};if(ae&&typeof ae===s){for(var al in ae){an[al]=ae[al]}}if(aa&&typeof aa===s){for(var aj in aa){if(typeof an.flashvars!=E){an.flashvars+="&"+aj+"="+aa[aj]}else{an.flashvars=aj+"="+aa[aj]}}}if(G(Z)){var ao=v(ak,an,ai);if(ak.id==ai){x(ai,true)}Y.success=true;Y.ref=ao}else{if(ab&&B()){ak.data=ab;Q(ak,an,ai,ad);return}else{x(ai,true)}}if(ad){ad(Y)}})}else{if(ad){ad(Y)}}},switchOffAutoHideShow:function(){n=false},ua:N,getFlashPlayerVersion:function(){return{major:N.pv[0],minor:N.pv[1],release:N.pv[2]}},hasFlashPlayerVersion:G,createSWF:function(aa,Z,Y){if(N.w3){return v(aa,Z,Y)}else{return undefined}},showExpressInstall:function(aa,ab,Y,Z){if(N.w3&&B()){Q(aa,ab,Y,Z)}},removeSWF:function(Y){if(N.w3){z(Y)}},createCSS:function(ab,aa,Z,Y){if(N.w3){w(ab,aa,Z,Y)}},addDomLoadEvent:L,addLoadEvent:t,getQueryParamValue:function(ab){var aa=k.location.search||k.location.hash;if(aa){if(/\?/.test(aa)){aa=aa.split("?")[1]}if(ab==null){return M(aa)}var Z=aa.split("&");for(var Y=0;Y<Z.length;Y++){if(Z[Y].substring(0,Z[Y].indexOf("="))==ab){return M(Z[Y].substring((Z[Y].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var Y=c(S);if(Y&&m){Y.parentNode.replaceChild(m,Y);if(R){x(R,true);if(N.ie&&N.win){m.style.display="block"}}if(F){F(C)}}a=false}}}}();Ext.FlashComponent=Ext.extend(Ext.BoxComponent,{flashVersion:"9.0.45",backgroundColor:"#ffffff",wmode:"opaque",url:undefined,swfId:undefined,swfWidth:"100%",swfHeight:"100%",expressInstall:false,initComponent:function(){Ext.FlashComponent.superclass.initComponent.call(this);this.addEvents("initialize")},onRender:function(){Ext.FlashComponent.superclass.onRender.apply(this,arguments);var b={allowScriptAccess:"always",bgcolor:this.backgroundColor,wmode:this.wmode},a={allowedDomain:document.location.hostname,elementID:this.getId(),eventHandler:"Ext.FlashEventProxy.onEvent"};new swfobject.embedSWF(this.url,this.id,this.swfWidth,this.swfHeight,this.flashVersion,this.expressInstall?Ext.FlashComponent.EXPRESS_INSTALL_URL:undefined,a,b);this.swf=Ext.getDom(this.id);this.el=Ext.get(this.swf)},getSwfId:function(){return this.swfId||(this.swfId="extswf"+(++Ext.Component.AUTO_ID))},getId:function(){return this.id||(this.id="extflashcmp"+(++Ext.Component.AUTO_ID))},onFlashEvent:function(a){switch(a.type){case"swfReady":this.initSwf();return;case"log":return}a.component=this;this.fireEvent(a.type.toLowerCase().replace(/event$/,""),a)},initSwf:function(){this.onSwfReady(!!this.isInitialized);this.isInitialized=true;this.fireEvent("initialize",this)},beforeDestroy:function(){if(this.rendered){swfobject.removeSWF(this.swf.id)}Ext.FlashComponent.superclass.beforeDestroy.call(this)},onSwfReady:Ext.emptyFn});Ext.FlashComponent.EXPRESS_INSTALL_URL="http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf";Ext.reg("flash",Ext.FlashComponent);Ext.FlashEventProxy={onEvent:function(c,b){var a=Ext.getCmp(c);if(a){a.onFlashEvent(b)}else{arguments.callee.defer(10,this,[c,b])}}};Ext.chart.Chart=Ext.extend(Ext.FlashComponent,{refreshBuffer:100,chartStyle:{padding:10,animationEnabled:true,font:{name:"Tahoma",color:4473924,size:11},dataTip:{padding:5,border:{color:10075112,size:1},background:{color:14346230,alpha:0.9},font:{name:"Tahoma",color:1393291,size:10,bold:true}}},extraStyle:null,disableCaching:Ext.isIE||Ext.isOpera,disableCacheParam:"_dc",initComponent:function(){Ext.chart.Chart.superclass.initComponent.call(this);if(!this.url){this.url=Ext.chart.Chart.CHART_URL}if(this.disableCaching){this.url=Ext.urlAppend(this.url,String.format("{0}={1}",this.disableCacheParam,new Date().getTime()))}this.addEvents("itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend");this.store=Ext.StoreMgr.lookup(this.store)},setStyle:function(a,b){this.swf.setStyle(a,Ext.encode(b))},setStyles:function(a){this.swf.setStyles(Ext.encode(a))},setSeriesStyles:function(b){var a=[];Ext.each(b,function(c){a.push(Ext.encode(c))});this.swf.setSeriesStyles(a)},setCategoryNames:function(a){this.swf.setCategoryNames(a)},setTipRenderer:function(b){var a=this;this.tipFnName=this.createFnProxy(function(g,d,e){var c=a.store.getAt(d);return b(a,c,d,e)},this.tipFnName);this.swf.setDataTipFunction(this.tipFnName)},setSeries:function(a){this.series=a;this.refresh()},bindStore:function(a,b){if(!b&&this.store){this.store.un("datachanged",this.refresh,this);this.store.un("add",this.delayRefresh,this);this.store.un("remove",this.delayRefresh,this);this.store.un("update",this.delayRefresh,this);this.store.un("clear",this.refresh,this);if(a!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,datachanged:this.refresh,add:this.delayRefresh,remove:this.delayRefresh,update:this.delayRefresh,clear:this.refresh})}this.store=a;if(a&&!b){this.refresh()}},onSwfReady:function(a){Ext.chart.Chart.superclass.onSwfReady.call(this,a);this.swf.setType(this.type);if(this.chartStyle){this.setStyles(Ext.apply(this.extraStyle||{},this.chartStyle))}if(this.categoryNames){this.setCategoryNames(this.categoryNames)}if(this.tipRenderer){this.setTipRenderer(this.tipRenderer)}if(!a){this.bindStore(this.store,true)}this.refresh.defer(10,this)},delayRefresh:function(){if(!this.refreshTask){this.refreshTask=new Ext.util.DelayedTask(this.refresh,this)}this.refreshTask.delay(this.refreshBuffer)},refresh:function(){var m=false;var k=[],c=this.store.data.items;for(var g=0,l=c.length;g<l;g++){k[g]=c[g].data}var e=[];var d=0;var n=null;var h=0;if(this.series){d=this.series.length;for(h=0;h<d;h++){n=this.series[h];var b={};for(var a in n){if(a=="style"&&n.style!==null){b.style=Ext.encode(n.style);m=true}else{b[a]=n[a]}}e.push(b)}}if(d>0){for(h=0;h<d;h++){n=e[h];if(!n.type){n.type=this.type}n.dataProvider=k}}else{e.push({type:this.type,dataProvider:k})}this.swf.setDataProvider(e)},createFnProxy:function(b,a){if(a){delete window[a]}var c="extFnProxy"+(++Ext.chart.Chart.PROXY_FN_ID);window[c]=b;return c},onDestroy:function(){Ext.chart.Chart.superclass.onDestroy.call(this);delete window[this.tipFnName]}});Ext.reg("chart",Ext.chart.Chart);Ext.chart.Chart.PROXY_FN_ID=0;Ext.chart.Chart.CHART_URL="http://yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf";Ext.chart.PieChart=Ext.extend(Ext.chart.Chart,{type:"pie",onSwfReady:function(a){Ext.chart.PieChart.superclass.onSwfReady.call(this,a);this.setDataField(this.dataField);this.setCategoryField(this.categoryField)},setDataField:function(a){this.dataField=a;this.swf.setDataField(a)},setCategoryField:function(a){this.categoryField=a;this.swf.setCategoryField(a)}});Ext.reg("piechart",Ext.chart.PieChart);Ext.chart.CartesianChart=Ext.extend(Ext.chart.Chart,{onSwfReady:function(a){Ext.chart.CartesianChart.superclass.onSwfReady.call(this,a);if(this.xField){this.setXField(this.xField)}if(this.yField){this.setYField(this.yField)}if(this.xAxis){this.setXAxis(this.xAxis)}if(this.yAxis){this.setYAxis(this.yAxis)}},setXField:function(a){this.xField=a;this.swf.setHorizontalField(a)},setYField:function(a){this.yField=a;this.swf.setVerticalField(a)},setXAxis:function(a){this.xAxis=this.createAxis("xAxis",a);this.swf.setHorizontalAxis(this.xAxis)},setYAxis:function(a){this.yAxis=this.createAxis("yAxis",a);this.swf.setVerticalAxis(this.yAxis)},createAxis:function(c,d){var e=Ext.apply({},d),a=null;if(this[c]){a=this[c].labelFunction}if(e.labelRenderer){var b=e.labelRenderer;e.labelFunction=this.createFnProxy(function(g){return b(g)},a);delete e.labelRenderer}return e}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear"});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.layout.MenuLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,setContainer:function(a){this.monitorResize=!a.floating;Ext.layout.MenuLayout.superclass.setContainer.call(this,a)},renderItem:function(g,b,e){if(!this.itemTpl){this.itemTpl=Ext.layout.MenuLayout.prototype.itemTpl=new Ext.XTemplate('<li id="{itemId}" class="{itemCls}">','<tpl if="needsIcon">','<img src="{icon}" class="{iconCls}"/>',"</tpl>","</li>")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.itemId||g.id;if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(b){var a=b instanceof Ext.menu.Item;return{isMenuItem:a,needsIcon:!a&&(b.icon||b.iconCls),icon:b.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(b.iconCls||""),itemId:"x-menu-el-"+b.id,itemCls:"x-menu-list-item "+(this.extraCls||"")}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){this.renderAll(a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],floating:true,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){this.on({add:this.doLayout,remove:this.doLayout,scope:this})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:15000})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},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=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c<a;c+=e){var d=b.get(c);if(!d.disabled&&(d.canActivate||d.isFormField)){this.setActiveItem(d,false);return d}}return false},onMouseOver:function(b){var a=this.findTargetItem(b);if(a){if(a.canActivate&&!a.disabled){this.setActiveItem(a,true)}}this.over=true;this.fireEvent("mouseover",this,b,a)},onMouseOut:function(b){var a=this.findTargetItem(b);if(a){if(a==this.activeItem&&a.shouldDeactivate&&a.shouldDeactivate(b)){this.activeItem.deactivate();delete this.activeItem}}this.over=false;this.fireEvent("mouseout",this,b,a)},onScroll:function(d,b){if(d){d.stopEvent()}var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");a.scrollTop+=this.scrollIncrement*(c?-1:1);if(c?a.scrollTop<=0:a.scrollTop+this.activeMax>=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMax<a.scrollHeight){Ext.fly(b).addClass(["x-menu-item-active","x-menu-scroller-active"])}},onScrollerOut:function(b,a){Ext.fly(a).removeClass(["x-menu-item-active","x-menu-scroller-active"])},show:function(b,c,a){if(this.floating){this.parentMenu=a;if(!this.el){this.render();this.doLayout(false,true)}if(this.fireEvent("beforeshow",this)!==false){this.showAt(this.el.getAlignToXY(b,c||this.defaultAlign,this.defaultOffsets),a,false)}}else{Ext.menu.Menu.superclass.show.call(this)}},showAt:function(c,b,a){this.parentMenu=b;if(!this.el){this.render()}this.el.setXY(c);if(this.enableScrolling){this.constrainScroll(c[1])}this.el.show();Ext.menu.Menu.superclass.onShow.call(this);if(Ext.isIE){this.layout.doAutoSize();if(!Ext.isIE8){this.el.repaint()}}this.hidden=false;this.focus();this.fireEvent("show",this)},constrainScroll:function(c){var a,b=this.ul.setHeight("auto").getHeight();if(this.floating){a=this.maxHeight?this.maxHeight:Ext.fly(this.el.dom.parentNode).getViewSize().height-c}else{a=this.getHeight()}if(b>a&&a>0){this.activeMax=a-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(b);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:"&#160;"}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:"&#160;"})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}if(this.deepHide===true&&this.parentMenu){this.parentMenu.hide(true)}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem(a))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);Ext.EventManager.removeResizeListener(this.hide,this);if(this.keyNav){this.keyNav.disable()}var a=this.scroller;if(a){Ext.destroy(a.topRepeater,a.bottomRepeater,a.top,a.bottom)}}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var g,d,c={},a=false,l=new Date();function n(){g={};d=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(d.length>0){i()}})}function i(){if(d&&d.length>0){var o=d.clone();o.each(function(p){p.hide()})}}function e(o){d.remove(o);if(d.length<1){Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=d.last();l=new Date();d.add(o);if(!a){Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function b(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function h(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){i()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&d.length>0&&!o.getTarget(".x-menu")){i()}}function j(p,s){if(s){var r=c[p.group];for(var q=0,o=r.length;q<o;q++){if(r[q]!=p){r[q].setChecked(false)}}}}return{hideAll:function(){i()},register:function(p){if(!g){n()}g[p.id]=p;p.on("beforehide",b);p.on("hide",e);p.on("beforeshow",h);p.on("show",k);var o=p.group;if(o&&p.events.checkchange){if(!c[o]){c[o]=[]}c[o].push(p);p.on("checkchange",onCheck)}},get:function(o){if(typeof o=="string"){if(!g){return null}return g[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(p){delete g[p.id];p.un("beforehide",b);p.un("hide",e);p.un("beforeshow",h);p.un("show",k);var o=p.group;if(o&&p.events.checkchange){c[o].remove(p);p.un("checkchange",onCheck)}},registerCheckable:function(o){var p=o.group;if(p){if(!c[p]){c[p]=[]}c[p].push(o);o.on("beforecheckchange",j)}},unregisterCheckable:function(o){var p=o.group;if(p){c[p].remove(o);o.un("beforecheckchange",j)}},getCheckedItem:function(q){var r=c[q];if(r){for(var p=0,o=r.length;p<o;p++){if(r[p].checked){return r[p]}}}return null},setCheckedItem:function(q,s){var r=c[q];if(r){for(var p=0,o=r.length;p<o;p++){if(r[p].id==s){r[p].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,clickHideDelay:1,ctype:"Ext.menu.BaseItem",actionMode:"container",onRender:function(b,a){Ext.menu.BaseItem.superclass.onRender.apply(this,arguments);if(this.ownerCt&&this.ownerCt instanceof Ext.menu.Menu){this.parentMenu=this.ownerCt}else{this.container.addClass("x-menu-list-item");this.mon(this.el,"click",this.onClick,this);this.mon(this.el,"mouseenter",this.activate,this);this.mon(this.el,"mouseleave",this.deactivate,this)}},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&&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.clickHideDelay,this.parentMenu,[true])}},expandMenu:Ext.emptyFn,hideMenu:Ext.emptyFn});Ext.reg("menubaseitem",Ext.menu.BaseItem);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.reg("menutextitem",Ext.menu.TextItem);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,activeClass:"",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.reg("menuseparator",Ext.menu.Separator);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(d,b){if(!this.itemTpl){this.itemTpl=Ext.menu.Item.prototype.itemTpl=new Ext.XTemplate('<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"','<tpl if="hrefTarget">',' target="{hrefTarget}"',"</tpl>",">",'<img src="{icon}" class="x-menu-item-icon {iconCls}"/>','<span class="x-menu-item-text">{text}</span>',"</a>")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||"&#160;"}},setText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){if(this.menu){this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},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.reg("menuitem",Ext.menu.Item);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.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.apply({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item"},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(this.initialConfig)});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);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.name||this.id||""},onRender:function(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.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}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])},getItemCt:function(){return this.el.up(".x-form-item",4)},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){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.mon(this.el,Ext.EventManager.useKeydown?"keydown":"keypress",this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);var a=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.mon(this.el,"blur",this.onBlur,this,a)},onFocus:function(){if(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(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}c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}this.fireEvent("invalid",this,c)},clearInvalid:function(){if(!this.rendered||this.preventMark){return}this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}this.fireEvent("valid",this)},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},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])},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=(Ext.isEmpty(a)?"":a))},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))},adjustSize:function(a,d){var c=Ext.form.Field.superclass.adjustSize.call(this,a,d);c.width=this.adjustWidth(this.el.dom.tagName,c.width);if(this.offsetCt){var b=this.getItemCt();c.width-=b.getFrameWidth("lr");c.height-=b.getFrameWidth("tb")}return c},adjustWidth:function(a,b){if(typeof b=="number"&&(Ext.isIE&&(Ext.isIE6||!Ext.isStrict))&&/input|textarea/i.test(a)&&!this.inEditor){return b-3}return b}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.errorEl.setWidth(a.getWidth(true)-20)}b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"})}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show();b.on("resize",b.alignErrorIcon,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide();a.un("resize",a.alignErrorIcon,a)}else{a.el.dom.title=""}}}};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.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.mon(this.el,"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.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this);this.mon(this.el,"keydown",this.onKeyDown,this);this.mon(this.el,"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)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},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.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("")}a.removeClass(this.emptyClass)}if(this.selectOnFocus){(function(){a.dom.select()}).defer(this.inEditor&&Ext.isIE?50:0)}},postBlur:function(){this.applyEmptyText()},filterKeys:function(a){if(a.ctrlKey||a.isSpecialKey()){return}if(!this.maskRe.test(String.fromCharCode(a.getCharCode()))){a.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},validateValue:function(a){if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){this.markInvalid(c);return false}}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 b=Ext.form.VTypes;if(!b[this.vtype](a,this)){this.markInvalid(this.vtypeText||b[this.vtype+"Text"]);return false}}if(this.regex&&!this.regex.test(a)){this.markInvalid(this.regexText);return false}return true},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},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;Ext.removeNode(e);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)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});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,editable:true,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",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 x-form-field-trigger-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())}if(!this.editable){this.editable=true;this.setEditable(false)}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this)},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this)}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);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){this.el.un("keydown",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,setEditable:function(a){if(a==this.editable){return}this.editable=a;if(!a){this.el.addClass("x-trigger-noedit").on("click",this.onTriggerClick,this).dom.setAttribute("readOnly",true)}else{this.el.removeClass("x-trigger-noedit").un("click",this.onTriggerClick,this).dom.removeAttribute("readOnly")}},validateBlur:function(a){return true},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(d,g,c){d.hide=function(){var h=b.wrap.getWidth();this.dom.style.display="none";b.el.setWidth(h-b.trigger.getWidth())};d.show=function(){var h=b.wrap.getWidth();this.dom.style.display="";b.el.setWidth(h-b.trigger.getWidth())};var e="Trigger"+(c+1);if(this["hide"+e]){d.dom.style.display="none"}this.mon(d,"click",this["on"+e+"Click"],this,{preventDefault:true});d.addClassOnOver("x-form-trigger-over");d.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:Ext.isWebKit?-6: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(){Ext.destroy(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 d=this.textSizeEl;d.innerHTML="";d.appendChild(document.createTextNode(a));a=d.innerHTML;Ext.fly(d).setWidth(this.el.getWidth());if(a.length<1){a="&#160;&#160;"}else{a+=this.growAppend;if(Ext.isIE){a=a.replace(/\n/g,"<br />")}}d.innerHTML=a;var b=Math.min(this.growMax,Math.max(d.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(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}this.maskRe=new RegExp("["+Ext.escapeRe(a)+"]");Ext.form.NumberField.superclass.initEvents.call(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);return 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(!Ext.isEmpty(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);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);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=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},validateValue:function(e){e=this.formatDate(e);if(!Ext.form.DateField.superclass.validateValue.call(this,e)){return false}if(e.length<1){return true}var c=e;e=this.parseDate(e);if(!e){this.markInvalid(String.format(this.invalidText,c,this.format));return false}var g=e.getTime();if(this.minValue&&g<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false}if(this.maxValue&&g>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var a=e.getDay();for(var b=0;b<this.disabledDays.length;b++){if(a===this.disabledDays[b]){this.markInvalid(this.disabledDaysText);return false}}}var d=this.formatDate(e);if(this.disabledDatesRE&&this.disabledDatesRE.test(d)){this.markInvalid(String.format(this.disabledDatesText,d));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){return Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},parseDate:function(d){if(!d||Ext.isDate(d)){return d}var b=Date.parseDate(d,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(d,this.altFormatsArray[c])}}return b},onDestroy:function(){Ext.destroy(this.menu);Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(a){return Ext.isDate(a)?a.dateFormat(this.format):a},onTriggerClick:function(){if(this.disabled){return}if(this.menu==null){this.menu=new Ext.menu.DateMenu({hideOnClick:false})}this.onFocus();Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,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.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?");this.menuEvents("on")},menuEvents:function(a){this.menu[a]("select",this.onSelect,this);this.menu[a]("hide",this.onMenuHide,this);this.menu[a]("show",this.onFocus,this)},onSelect:function(a,b){this.setValue(b);this.fireEvent("select",this,b);this.menu.hide()},onMenuHide:function(){this.focus(false,60);this.menuEvents("un")},beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a)}}});Ext.reg("datefield",Ext.form.DateField);Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:Ext.emptyFn,isValid:function(){return true},validate:function(){return true},getRawValue:function(){var a=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,"");if(a===this.emptyText){a=""}if(this.htmlEncode){a=Ext.util.Format.htmlDecode(a)}return a},getValue:function(){return this.getRawValue()},getName:function(){return this.name},setRawValue:function(a){if(this.htmlEncode){a=Ext.util.Format.htmlEncode(a)}return this.rendered?(this.el.dom.innerHTML=(Ext.isEmpty(a)?"":a)):(this.value=a)},setValue:function(a){this.setRawValue(a);return this}});Ext.reg("displayfield",Ext.form.DisplayField);Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",listEmptyText:"",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,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){var c=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=c.name}if(!this.store){this.mode="local";var j=[],e=c.options;for(var b=0,a=e.length;b<a;b++){var h=e[b],g=(h.hasAttribute?h.hasAttribute("value"):h.getAttributeNode("value").specified)?h.value:h.text;if(h.selected&&Ext.isEmpty(this.value,true)){this.value=g}j.push([g,h.text])}this.store=new Ext.data.ArrayStore({id:0,fields:["value","text"],data:j,autoDestroy:true});this.valueField="value";this.displayField="text"}c.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(c,this.autoCreate||this.defaultAutoCreate);this.render(this.el.parentNode,c);Ext.removeNode(c)}else{Ext.removeNode(c)}}else{if(this.store){this.store=Ext.StoreMgr.lookup(this.store);if(this.store.autoCreated){this.displayField=this.valueField="field1";if(!this.store.expandData){this.displayField="field2"}this.mode="local"}}}this.selectedIndex=-1;if(this.mode=="local"){if(!Ext.isDefined(this.initialConfig.queryDelay)){this.queryDelay=10}if(!Ext.isDefined(this.initialConfig.minChars)){this.minChars=0}}},onRender:function(b,a){Ext.form.ComboBox.superclass.onRender.call(this,b,a);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);this.el.dom.removeAttribute("name")}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off")}if(!this.lazyInit){this.initList()}else{this.on("focus",this.initList,this,{single:true})}},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this);if(this.hiddenField){this.hiddenField.value=Ext.isDefined(this.hiddenValue)?this.hiddenValue:Ext.isDefined(this.value)?this.value:""}},initList:function(){if(!this.list){var a="x-combo-list";this.list=new Ext.Layer({parentEl:this.getListParent(),shadow:this.shadow,cls:[a,this.listClass].join(" "),constrain:false});var b=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setSize(b,0);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.syncFont!==false){this.list.setStyle("font-size",this.el.getStyle("font-size"))}if(this.title){this.header=this.list.createChild({cls:a+"-hd",html:this.title});this.assetHeight+=this.header.getHeight()}this.innerList=this.list.createChild({cls:a+"-inner"});this.mon(this.innerList,"mouseover",this.onViewOver,this);this.mon(this.innerList,"mousemove",this.onViewMove,this);this.innerList.setWidth(b-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:a+"-ft"});this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});this.assetHeight+=this.footer.getHeight()}if(!this.tpl){this.tpl='<tpl for="."><div class="'+a+'-item">{'+this.displayField+"}</div></tpl>"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText});this.mon(this.view,"click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(e,c,d){this.maxHeight=d-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=c;this.innerList.setWidth(c-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this);if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this)},esc:function(a){this.collapse()},tab:function(a){this.onViewClick(false);return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false&&!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.form.ComboBox.superclass.onDestroy.call(this)},unsetDelayCheck:function(){delete this.delayedCheck},fireKey:function(b){var a=function(c){if(c.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){this.fireEvent("specialkey",this,c)}};if(this.inEditor&&Ext.isWebKit&&b.getKey()==b.TAB){a.defer(10,this,[new Ext.EventObjectImpl(b)])}else{a.call(this,b)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&!Ext.isDefined(this.listWidth)){var c=Math.max(a,this.minListWidth);this.list.setWidth(c);this.innerList.setWidth(c-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=a}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0];var c=this.store.getAt(a);if(c){this.onSelect(c,a)}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom;var e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight;var c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight);var a=this.getPosition()[1]-Ext.getBody().getScroll().top;var g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height;var d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate()},onEmptyResults:function(){this.collapse()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex<a-1){this.select(this.selectedIndex+1)}}}},selectPrev:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){var b=this.getRawValue();if(this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.isDefined(this.lastSelectionText)?this.lastSelectionText:"";this.applyEmptyText()}else{this.clearValue()}}else{var a=this.findRecord(this.displayField,b);if(a){b=a.get(this.valueField||this.displayField)}this.setValue(b)}},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={};if(this.pageSize){b.start=0;b.limit=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}this.list.alignTo(this.wrap,this.listAlign);this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}Ext.getDoc().on({scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,"click",this.onClick,this);this.mon(this.el,"change",this.onClick,this)},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return false},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var b=this.checked;this.checked=(a===true||a==="true"||a=="1"||String(a).toLowerCase()=="on");if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(b!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(j,g){if(!this.el){var p={cls:this.groupCls,layout:"column",border:false,renderTo:j};var a={defaultType:this.defaultType,layout:"form",border:false,defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(p,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,m=this.items.length;e<m;e++){Ext.applyIf(this.items[e],a)}}else{var d,n=[];if(typeof this.columns=="string"){this.columns=this.items.length}if(!Ext.isArray(this.columns)){var k=[];for(var e=0;e<this.columns;e++){k.push((100/this.columns)*0.01)}this.columns=k}d=this.columns.length;for(var e=0;e<d;e++){var b=Ext.apply({items:[]},a);b[this.columns[e]<=1?"columnWidth":"width"]=this.columns[e];if(this.defaults){b.defaults=Ext.apply(b.defaults||{},this.defaults)}n.push(b)}if(this.vertical){var r=Math.ceil(this.items.length/d),o=0;for(var e=0,m=this.items.length;e<m;e++){if(e>0&&e%r==0){o++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[o].items.push(this.items[e])}}else{for(var e=0,m=this.items.length;e<m;e++){var q=e%d;if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[q].items.push(this.items[e])}}Ext.apply(p,{layoutConfig:{columns:d},items:n})}this.panel=new Ext.Panel(p);this.panel.ownerCt=this;this.el=this.panel.getEl();if(this.forId&&this.itemCls){var c=this.el.up(this.itemCls).child("label",true);if(c){c.setAttribute("htmlFor",this.forId)}}var h=this.panel.findBy(function(i){return i.isFormField},this);this.items=new Ext.util.MixedCollection();this.items.addAll(h)}Ext.form.CheckboxGroup.superclass.onRender.call(this,j,g)},afterRender:function(){Ext.form.CheckboxGroup.superclass.afterRender.call(this);if(this.values){this.setValue.apply(this,this.values);delete this.values}this.eachItem(function(a){a.on("check",this.fireChecked,this);a.inGroup=true})},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;this.panel.doLayout()}},fireChecked:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});this.fireEvent("change",this,a)},validateValue:function(a){if(!this.allowBlank){var b=true;this.eachItem(function(c){if(c.checked){return(b=false)}});if(b){this.markInvalid(this.blankText);return false}}return true},onDisable:function(){this.eachItem(function(a){a.disable()})},onEnable:function(){this.eachItem(function(a){a.enable()})},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;this.panel.doLayout()}},onResize:function(a,b){this.panel.setSize(a,b);this.panel.doLayout()},reset:function(){Ext.form.CheckboxGroup.superclass.reset.call(this);this.eachItem(function(a){if(a.reset){a.reset()}})},setValue:function(d,c){if(this.rendered){if(arguments.length==1){if(Ext.isArray(d)){Ext.each(d,function(h,e){var g=this.items.itemAt(e);if(g){g.setValue(h)}},this)}else{if(Ext.isObject(d)){for(var a in d){var b=this.getBox(a);if(b){b.setValue(d[a])}}}else{this.setValueForItem(d)}}}else{var b=this.getBox(d);if(b){b.setValue(c)}}}else{this.values=arguments}return this},onDestroy:function(){Ext.destroy(this.panel);Ext.form.CheckboxGroup.superclass.onDestroy.call(this)},setValueForItem:function(a){a=String(a).split(",");this.eachItem(function(b){if(a.indexOf(b.inputValue)>-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(a){if(this.items&&this.items.each){this.items.each(a,this)}},initValue:Ext.emptyFn,getValue:Ext.emptyFn,getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var a=this.el.up("form")||Ext.getBody();var b=a.child("input[name="+this.el.dom.name+"]:checked",true);return b?b.value:null},onClick:function(){if(this.el.dom.checked!=this.checked){var a=this.getCheckEl().select("input[name="+this.el.dom.name+"]");a.each(function(b){if(b.dom.id==this.id){this.setValue(true)}else{Ext.getCmp(b.dom.id).setValue(false)}},this)}},setValue:function(a){if(typeof a=="boolean"){Ext.form.Radio.superclass.setValue.call(this,a)}else{var b=this.getCheckEl().child("input[name="+this.el.dom.name+"][value="+a+"]",true);if(b){Ext.getCmp(b.id).setValue(true)}}return this},getCheckEl:function(){if(this.inGroup){return this.el.up(".x-form-radio-group")}return this.el.up("form")||Ext.getBody()}});Ext.reg("radio",Ext.form.Radio);Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:true,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group",getValue:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});return a},setValue:function(c,b){if(this.rendered){if(arguments.length>1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}}else{this.values=arguments}return this},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.itemId||c.id||(c.id=Ext.id())});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,paramOrder:undefined,paramsAsHash:false,activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(){this.items.each(function(a){Ext.destroy(a)});if(this.el){this.el.removeAllListeners();this.el.remove()}this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){if(this.standardSubmit){var a=this.isValid();if(a){this.el.dom.submit()}return a}var c=String.format("{0}submit",this.api?"direct":"");this.doAction(c,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields;a.each(function(c){var d=this.findField(c.name);if(d){b.set(c.name,d.getValue())}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle||"Please Wait...")}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(b){var a=this.items.get(b);if(!Ext.isObject(a)){this.items.each(function(c){if(c.isFormField&&(c.dataIndex==b||c.id==b||c.getName()==b)){a=c;return false}})}return a||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c<a;c++){var b=h[c];var d=this.findField(b.id);if(d){d.markInvalid(b.msg)}}}else{var e,g;for(g in h){if(!Ext.isFunction(h[g])&&(e=this.findField(g))){e.markInvalid(h[g])}}}return this},setValues:function(c){if(Ext.isArray(c)){for(var d=0,a=c.length;d<a;d++){var b=c[d];var e=this.findField(b.id);if(e){e.setValue(b.value);if(this.trackResetOnLoad){e.originalValue=e.getValue()}}}}else{var g,h;for(h in c){if(!Ext.isFunction(c[h])&&(g=this.findField(h))){g.setValue(c[h]);if(this.trackResetOnLoad){g.originalValue=g.getValue()}}}}return this},getValues:function(b){var a=Ext.lib.Ajax.serializeForm(this.el.dom);if(b===true){return a}return Ext.urlDecode(a)},getFieldValues:function(){var a={};this.items.each(function(b){a[b.getName()]=b.getValue()});return a},clearInvalid:function(){this.items.each(function(a){a.clearInvalid()});return this},reset:function(){this.items.each(function(a){a.reset()});return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(a){this.items.remove(a);return this},render:function(){this.items.each(function(a){if(a.isFormField&&!a.rendered&&document.getElementById(a.id)){a.applyToMarkup(a.id)}});return this},applyToFields:function(a){this.items.each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.items.each(function(b){Ext.applyIf(b,a)});return this},callFieldMethod:function(b,a){a=a||[];this.items.each(function(c){if(Ext.isFunction(c[b])){c[b].apply(c,a)}});return this}});Ext.BasicForm=Ext.form.BasicForm;Ext.FormPanel=Ext.extend(Ext.Panel,{minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();Ext.FormPanel.superclass.initComponent.call(this);this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype="multipart/form-data"}this.initItems();this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){var a=Ext.applyIf({listeners:{}},this.initialConfig);return new Ext.form.BasicForm(null,a)},initFields:function(){var c=this.form;var a=this;var b=function(d){if(a.isField(d)){c.add(d)}if(d.isFieldWrap){Ext.applyIf(d,{labelAlign:d.ownerCt.labelAlign,labelWidth:d.ownerCt.labelWidth,itemCls:d.ownerCt.itemCls});c.add(d.field)}else{if(d.doLayout&&d!=a){Ext.applyIf(d,{labelAlign:d.ownerCt.labelAlign,labelWidth:d.ownerCt.labelWidth,itemCls:d.ownerCt.itemCls});if(d.items&&d.items.each){d.items.each(b,this)}}}};this.items.each(b,this)},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(b,a){this.initFields();Ext.FormPanel.superclass.onRender.call(this,b,a);this.form.initEl(this.body)},beforeDestroy:function(){this.stopMonitoring();Ext.FormPanel.superclass.beforeDestroy.call(this);this.form.items.clear();Ext.destroy(this.form)},isField:function(a){return !!a.setValue&&!!a.getValue&&!!a.markInvalid&&!!a.clearInvalid},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.on("remove",this.onRemove,this);this.on("add",this.onAdd,this);if(this.monitorValid){this.startMonitoring()}},onAdd:function(a,b){if(this.isField(b)){this.form.add(b)}else{if(b.findBy){Ext.applyIf(b,{labelAlign:b.ownerCt.labelAlign,labelWidth:b.ownerCt.labelWidth,itemCls:b.ownerCt.itemCls});this.form.add.apply(this.form,b.findBy(this.isField))}}},onRemove:function(a,b){if(this.isField(b)){Ext.destroy(b.container.up(".x-form-item"));this.form.remove(b)}else{if(b.findByType){Ext.each(b.findBy(this.isField),this.form.remove,this.form)}}},startMonitoring:function(){if(!this.validTask){this.validTask=new Ext.util.TaskRunner();this.validTask.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){if(this.validTask){this.validTask.stopAll();this.validTask=null}},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form){this.form.items.each(function(){this.disable()})}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form){this.form.items.each(function(){this.enable()})}},bindHandler:function(){var e=true;this.form.items.each(function(g){if(!g.isValid(true)){e=false;return false}});if(this.fbar){var b=this.fbar.items.items;for(var d=0,a=b.length;d<a;d++){var c=b[d];if(c.formBind===true&&c.disabled===e){c.setDisabled(!e)}}}this.fireEvent("clientvalidation",this,e)}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",animCollapse:false,onRender:function(b,a){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;if(this.title||this.header||this.checkboxToggle){this.el.appendChild(document.createElement("legend")).className="x-fieldset-header"}}Ext.form.FieldSet.superclass.onRender.call(this,b,a);if(this.checkboxToggle){var c=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};this.checkbox=this.header.insertFirst(c);this.checkbox.dom.checked=!this.collapsed;this.mon(this.checkbox,"click",this.onCheckClick,this)}},onCollapse:function(a,b){if(this.checkbox){this.checkbox.dom.checked=false}Ext.form.FieldSet.superclass.onCollapse.call(this,a,b)},onExpand:function(a,b){if(this.checkbox){this.checkbox.dom.checked=true}Ext.form.FieldSet.superclass.onExpand.call(this,a,b)},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet);Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&nbsp;":"&#8203;",actionMode:"wrap",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange")},createFontOptions:function(){var d=[],b=this.fontFamilies,c,g;for(var e=0,a=b.length;e<a;e++){c=b[e];g=c.toLowerCase();d.push('<option value="',g,'" style="font-family:',c,';"',(this.defaultFont==g?' selected="true">':">"),c,"</option>")}return d.join("")},createToolbar:function(d){var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function c(h,e,g){return{itemId:h,cls:"x-btn-icon",iconCls:"x-edit-"+h,enableToggle:e!==false,scope:d,handler:g||d.relayBtnCmd,clickEvent:"mousedown",tooltip:a?d.buttonTips[h]||undefined:undefined,overflowText:d.buttonTips[h].title||undefined,tabIndex:-1}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});this.mon(b.el,"click",function(g){g.preventDefault()});if(this.enableFont&&!Ext.isSafari2){this.fontSelect=b.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.mon(this.fontSelect,"change",function(){var e=this.fontSelect.dom.value;this.relayCmd("fontname",e);this.deferFocus()},this);b.add(this.fontSelect.dom,"-")}if(this.enableFormat){b.add(c("bold"),c("italic"),c("underline"))}if(this.enableFontSize){b.add("-",c("increasefontsize",false,this.adjustFont),c("decreasefontsize",false,this.adjustFont))}if(this.enableColors){b.add("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?d.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(g,e){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+e:e);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?d.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(g,e){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",e);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+e:e);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){b.add("-",c("justifyleft"),c("justifycenter"),c("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){b.add("-",c("createlink",false,this.createLink))}if(this.enableLists){b.add("-",c("insertorderedlist"),c("insertunorderedlist"))}if(this.enableSourceEdit){b.add("-",c("sourceedit",true,function(e){this.toggleSourceEdit(!this.sourceEditMode)}))}}this.tb=b},getDocMarkup:function(){return'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>'},getEditorBody:function(){return this.doc.body||this.doc.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);this.doc=this.getDoc();this.win=this.getWin();this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var a={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(a);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||String(a.designMode).toLowerCase()!="on"){this.initFrame()}}},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.itemId!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof b=="number"){var d=b-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",d));this.tb.setWidth(d);this.iframe.style.width=Math.max(d,0)+"px"}if(typeof c=="number"){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",a));this.iframe.style.height=Math.max(a,0)+"px";if(this.doc){this.getEditorBody().style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(a){if(a===undefined){a=!this.sourceEditMode}this.sourceEditMode=a===true;var c=this.tb.items.get("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized){this.disableItems(false)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var b=this.lastSize;if(b){delete this.lastSize;this.setSize(b)}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(a.length>5){if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}}if(a==this.defaultValue){a=""}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='<div style="'+a[0]+'">'+c+"</div>"}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){var c=this.doc,b=c.designMode.toLowerCase();c.designMode=b.toggle("on","off");c.designMode=b}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var b=this.getEditorBody();var a=this.el.getStyles("font-size","font-family","background-image","background-repeat");a["background-attachment"]="fixed";b.bgProperties="fixed";Ext.DomHelper.applyStyles(b,a);if(this.doc){try{Ext.EventManager.removeAll(this.doc)}catch(c){}}this.doc=this.getDoc();Ext.EventManager.on(this.doc,{mousedown:this.onEditorEvent,dblclick:this.onEditorEvent,click:this.onEditorEvent,keyup:this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this)}this.initialized=true;this.fireEvent("initialize",this);this.doc.editorInitialized=true;this.pushValue()}catch(c){}},onDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}if(this.el){this.el.removeAllListeners();this.el.remove()}if(this.doc){try{Ext.EventManager.removeAll(this.doc);for(var b in this.doc){delete this.doc[b]}}catch(a){}}this.purgeListeners()},onFirstFocus:function(){this.activated=true;this.disableItems(false);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var c=b.itemId=="increasefontsize"?1:-1;var a=parseInt(this.doc.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+c}else{if(a<=13){a=2+c}else{if(a<=16){a=3+c}else{if(a<=18){a=4+c}else{if(a<=24){a=5+c}else{a=6+c}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){c*=2}a=Math.max(1,a+c)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.doc;if(this.enableFont&&!Ext.isSafari2){var a=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.itemId)},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){this.doc.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(b){if(!this.activated){return}if(Ext.isIE){this.win.focus();var a=this.doc.selection.createRange();if(a){a.collapse(true);a.pasteHTML(b);this.syncValue();this.deferFocus()}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",b);this.deferFocus()}else{if(Ext.isWebKit){this.execCmd("InsertText",b);this.deferFocus()}}}},fixKeys:function(){if(Ext.isIE){return function(d){var a=d.getKey(),b;if(a==d.TAB){d.stopEvent();b=this.doc.selection.createRange();if(b){b.collapse(true);b.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}else{if(a==d.ENTER){b=this.doc.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){d.stopEvent();b.pasteHTML("<br />");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}if(!this.store){var b=this.parseDate(this.minValue)||new Date(this.initDate).clearTime();var a=this.parseDate(this.maxValue)||new Date(this.initDate).clearTime().add("mi",(24*60)-1);var c=[];while(b<=a){c.push(b.dateFormat(this.format));b=b.add("mi",this.increment)}this.store=c}Ext.form.TimeField.superclass.initComponent.call(this)},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a.dateFormat(this.format))}Ext.form.TimeField.superclass.beforeBlur.call(this)}});Ext.reg("timefield",Ext.form.TimeField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(b,a){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");if(this.forId){this.el.setAttribute("for",this.forId)}}Ext.form.Label.superclass.onRender.call(this,b,a)},setText:function(a,b){var c=b===false;this[!c?"text":"html"]=a;delete this[c?"text":"html"];if(this.rendered){this.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(a):a}return this}});Ext.reg("label",Ext.form.Label);Ext.form.Action=function(b,a){this.form=b;this.options=a||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(a){},success:function(a){},handleResponse:function(a){},failure:function(a){this.response=a;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}this.result=this.handleResponse(a);return this.result},getUrl:function(c){var a=this.options.url||this.form.url||this.form.el.dom.action;if(c){var b=this.getParams();if(b){a=Ext.urlAppend(a,b)}}return a},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var a=this.form.baseParams;var b=this.options.params;if(b){if(typeof b=="object"){b=Ext.urlEncode(Ext.applyIf(b,a))}else{if(typeof b=="string"&&a){b+="&"+Ext.urlEncode(a)}}}else{if(a){b=Ext.urlEncode(a)}}return b},createCallback:function(a){var a=a||{};return{success:this.success,failure:this.failure,scope:this,timeout:(a.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(b,a){Ext.form.Action.Submit.superclass.constructor.call(this,b,a)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var b=this.options;var c=this.getMethod();var a=c=="GET";if(b.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(b),{form:this.form.el.dom,url:this.getUrl(a),method:c,headers:b.headers,params:!a?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(b.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(b){var a=this.processResponse(b);if(a===true||a.success){this.form.afterAction(this,true);return}if(a.errors){this.form.markInvalid(a.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(c){if(this.form.errorReader){var b=this.form.errorReader.read(c);var g=[];if(b.records){for(var d=0,a=b.records.length;d<a;d++){var e=b.records[d];g[d]=e.data}}if(g.length<1){g=null}return{success:b.success,errors:g}}return Ext.decode(c.responseText)}});Ext.form.Action.Load=function(b,a){Ext.form.Action.Load.superclass.constructor.call(this,b,a);this.reader=this.form.reader};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}))},success:function(b){var a=this.processResponse(b);if(a===true||!a.success||!a.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return}this.form.clearInvalid();this.form.setValues(a.data);this.form.afterAction(this,true)},handleResponse:function(b){if(this.form.reader){var a=this.form.reader.read(b);var c=a.records&&a.records[0]?a.records[0].data:null;return{success:a.success,data:c}}return Ext.decode(b.responseText)}});Ext.form.Action.DirectLoad=Ext.extend(Ext.form.Action.Load,{constructor:function(b,a){Ext.form.Action.DirectLoad.superclass.constructor.call(this,b,a)},type:"directload",run:function(){var a=this.getParams();a.push(this.success,this);this.form.api.load.apply(window,a)},getParams:function(){var c=[],h={};var e=this.form.baseParams;var g=this.options.params;Ext.apply(h,g,e);var b=this.form.paramOrder;if(b){for(var d=0,a=b.length;d<a;d++){c.push(h[b[d]])}}else{if(this.form.paramsAsHash){c.push(h)}}return c},processResponse:function(a){this.result=a;return a}});Ext.form.Action.DirectSubmit=Ext.extend(Ext.form.Action.Submit,{constructor:function(b,a){Ext.form.Action.DirectSubmit.superclass.constructor.call(this,b,a)},type:"directsubmit",run:function(){var a=this.options;if(a.clientValidation===false||this.form.isValid()){this.success.params=this.getParams();this.form.api.submit(this.form.el.dom,this.success,this)}else{if(a.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},getParams:function(){var c={};var a=this.form.baseParams;var b=this.options.params;Ext.apply(c,b,a);return c},processResponse:function(a){this.result=a;return a}});Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit,directload:Ext.form.Action.DirectLoad,directsubmit:Ext.form.Action.DirectSubmit};Ext.form.VTypes=function(){var c=/^[a-zA-Z_]+$/;var d=/^[a-zA-Z0-9_]+$/;var b=/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;var a=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}();Ext.grid.GridPanel=Ext.extend(Ext.Panel,{autoExpandColumn:false,autoExpandMax:1000,autoExpandMin:50,columnLines:false,ddText:"{0} selected row{1}",deferRowRender:true,enableColumnHide:true,enableColumnMove:true,enableDragDrop:false,enableHdMenu:true,loadMask:false,minColumnWidth:25,stripeRows:false,trackMouseOver:true,stateEvents:["columnmove","columnresize","sortchange"],view:null,rendered:false,viewReady:false,initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);if(this.columnLines){this.cls=(this.cls||"")+" x-grid-with-col-lines"}this.autoScroll=false;this.autoWidth=false;if(Ext.isArray(this.columns)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","bodyscroll","columnresize","columnmove","sortchange","reconfigure")},onRender:function(d,a){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var e=this.body;this.el.addClass("x-grid-panel");var b=this.getView();b.init(this);this.mon(e,{mousedown:this.onMouseDown,click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,keydown:this.onKeyDown,scope:this});this.relayEvents(e,["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);this.view.render()},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask){this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))}},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.mon(this.colModel,"hiddenchange",this.saveState,this,{delay:100})},applyState:function(h){var b=this.colModel;var g=h.columns;if(g){for(var d=0,a=g.length;d<a;d++){var e=g[d];var k=b.getColumnById(e.id);if(k){k.hidden=e.hidden;k.width=e.width;var j=b.getIndexById(e.id);if(j!=d){b.moveColumn(j,d)}}}}if(h.sort&&this.store){this.store[this.store.remoteSort?"setDefaultSort":"sort"](h.sort.field,h.sort.direction)}delete h.columns;delete h.sort;Ext.grid.GridPanel.superclass.applyState.call(this,h)},getState:function(){var d={columns:[]};for(var b=0,e;(e=this.colModel.config[b]);b++){d.columns[b]={id:e.id,width:e.width};if(e.hidden){d.columns[b].hidden=true}}if(this.store){var a=this.store.getSortState();if(a){d.sort=a}}return d},afterRender:function(){Ext.grid.GridPanel.superclass.afterRender.call(this);this.view.layout();if(this.deferRowRender){this.view.afterRender.defer(10,this.view)}else{this.view.afterRender()}this.viewReady=true},reconfigure:function(a,b){if(this.loadMask){this.loadMask.destroy();this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},{store:a},this.initialConfig.loadMask))}this.view.initData(a,b);this.store=a;this.colModel=b;if(this.rendered){this.view.refresh(true)}this.fireEvent("reconfigure",this,a,b)},onKeyDown:function(a){this.fireEvent("keydown",a)},onDestroy:function(){if(this.rendered){var a=this.body;a.removeAllListeners();a.update("");Ext.destroy(this.view,this.loadMask)}else{if(this.store&&this.store.autoDestroy){this.store.destroy()}}Ext.destroy(this.colModel,this.selModel);this.store=this.selModel=this.colModel=this.view=this.loadMask=null;Ext.grid.GridPanel.superclass.onDestroy.call(this)},processEvent:function(c,g){this.fireEvent(c,g);var d=g.getTarget();var b=this.view;var i=b.findHeaderIndex(d);if(i!==false){this.fireEvent("header"+c,this,i,g)}else{var h=b.findRowIndex(d);var a=b.findCellIndex(d);if(h!==false){this.fireEvent("row"+c,this,h,g);if(a!==false){this.fireEvent("cell"+c,this,h,a,g)}}}},onClick:function(a){this.processEvent("click",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onContextMenu:function(b,a){this.processEvent("contextmenu",b)},onDblClick:function(a){this.processEvent("dblclick",a)},walkCells:function(k,c,b,e,j){var i=this.colModel,g=i.getColumnCount();var a=this.store,h=a.getCount(),d=true;if(b<0){if(c<0){k--;d=false}while(k>=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(j||this,k,c,i)===true){return[k,c]}c--}k--}}else{if(c>=g){k++;d=false}while(k<h){if(!d){c=0}d=false;while(c<g){if(e.call(j||this,k,c,i)===true){return[k,c]}c++}k++}}return null},onResize:function(){Ext.grid.GridPanel.superclass.onResize.apply(this,arguments);if(this.viewReady){this.view.layout()}},getGridEl:function(){return this.body},stopEditing:Ext.emptyFn,getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.grid.RowSelectionModel(this.disableSelection?{selectRow:Ext.emptyFn}:null)}return this.selModel},getStore:function(){return this.store},getColumnModel:function(){return this.colModel},getView:function(){if(!this.view){this.view=new Ext.grid.GridView(this.viewConfig)}return this.view},getDragDropText:function(){var a=this.selModel.getCount();return String.format(this.ddText,a,a==1?"":"s")}});Ext.reg("grid",Ext.grid.GridPanel);Ext.grid.GridView=function(a){Ext.apply(this,a);this.addEvents("beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh");Ext.grid.GridView.superclass.constructor.call(this)};Ext.extend(Ext.grid.GridView,Ext.util.Observable,{deferEmptyText:true,scrollOffset:19,autoFill:false,forceFit:false,sortClasses:["sort-asc","sort-desc"],sortAscText:"Sort Ascending",sortDescText:"Sort Descending",columnsText:"Columns",selectedRowClass:"x-grid3-row-selected",borderWidth:2,tdClass:"x-grid3-cell",hdCls:"x-grid3-hd",markDirty:true,cellSelectorDepth:4,rowSelectorDepth:10,cellSelector:"td.x-grid3-cell",rowSelector:"div.x-grid3-row",firstRowCls:"x-grid3-row-first",lastRowCls:"x-grid3-row-last",rowClsRe:/(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,initTemplates:function(){var c=this.templates||{};if(!c.master){c.master=new Ext.Template('<div class="x-grid3" hidefocus="true">','<div class="x-grid3-viewport">','<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>','<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',"</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>")}if(!c.header){c.header=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">','<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',"</table>")}if(!c.hcell){c.hcell=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"",'{value}<img class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div></td>")}if(!c.body){c.body=new Ext.Template("{rows}")}if(!c.row){c.row=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table></div>")}if(!c.cell){c.cell=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',"</td>")}for(var a in c){var b=c[a];if(b&&typeof b.compile=="function"&&!b.compiled){b.disableFormats=true;b.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var c=Ext.Element;var b=this.grid.getGridEl().dom.firstChild;var a=b.childNodes;this.el=new c(b);this.mainWrap=new c(a[0]);this.mainHd=new c(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders){this.mainHd.setDisplayed(false)}this.innerHd=this.mainHd.dom.firstChild;this.scroller=new c(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new c(this.scroller.dom.firstChild);this.focusEl=new c(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new c(a[1]);this.resizeProxy=new c(a[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(c,b){var a=this.findCell(c);if(a&&(!b||this.fly(a).hasClass(b))){return this.getCellIndex(a)}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return this.getRow(b).getElementsByTagName("td")[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom;for(var d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.scroller.dom;this.innerHd.scrollLeft=a.scrollLeft;this.innerHd.scrollLeft=a.scrollLeft},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.mainHd.select("td").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},updateAllColumnWidths:function(){var d=this.getTotalWidth(),l=this.cm.getColumnCount(),g=[],e,b;for(b=0;b<l;b++){g[b]=this.getColumnWidth(b)}this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;for(b=0;b<l;b++){var c=this.getHeaderCell(b);c.style.width=g[b]}var k=this.getRows(),m,h;for(b=0,e=k.length;b<e;b++){m=k[b];m.style.width=d;if(m.firstChild){m.firstChild.style.width=d;h=m.firstChild.rows[0];for(var a=0;a<l;a++){h.childNodes[a].style.width=g[a]}}}this.onAllColumnWidthsUpdated(g,d)},updateColumnWidth:function(b,a){var j=this.getColumnWidth(b);var e=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=e;this.mainBody.dom.style.width=e;var d=this.getHeaderCell(b);d.style.width=j;var h=this.getRows(),k;for(var c=0,g=h.length;c<g;c++){k=h[c];k.style.width=e;if(k.firstChild){k.firstChild.style.width=e;k.firstChild.rows[0].childNodes[b].style.width=j}}this.onColumnWidthUpdated(b,j,e)},updateColumnHidden:function(a,e){var d=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;var h=e?"none":"";var c=this.getHeaderCell(a);c.style.display=h;var j=this.getRows(),k;for(var b=0,g=j.length;b<g;b++){k=j[b];k.style.width=d;if(k.firstChild){k.firstChild.style.width=d;k.firstChild.rows[0].childNodes[a].style.display=h}}this.onColumnHiddenUpdated(a,e,d);delete this.lastViewWidth;this.layout()},doRender:function(g,k,s,a,q,w){var b=this.templates,e=b.cell,h=b.row,l=q-1;var d="width:"+this.getTotalWidth()+";";var z=[],t,A,u={},m={tstyle:d},o;for(var v=0,y=k.length;v<y;v++){o=k[v];t=[];var n=(v+a);for(var x=0;x<q;x++){A=g[x];u.id=A.id;u.css=x===0?"x-grid3-cell-first ":(x==l?"x-grid3-cell-last ":"");u.attr=u.cellAttr="";u.value=A.renderer(o.data[A.name],u,o,n,x,s);u.style=A.style;if(Ext.isEmpty(u.value)){u.value="&#160;"}if(this.markDirty&&o.dirty&&typeof o.modified[A.name]!=="undefined"){u.css+=" x-grid3-dirty-cell"}t[t.length]=e.apply(u)}var B=[];if(w&&((n+1)%2===0)){B[0]="x-grid3-row-alt"}if(o.dirty){B[1]=" x-grid3-dirty-row"}m.cols=q;if(this.getRowClass){B[2]=this.getRowClass(o,n,m,s)}m.alt=B.join(" ");m.cells=t.join("");z[z.length]=h.apply(m)}return z.join("")},processRows:function(a,c){if(!this.ds||this.ds.getCount()<1){return}var b=this.getRows();c=c||!this.grid.stripeRows;a=a||0;Ext.each(b,function(e,d){e.rowIndex=d;e.className=e.className.replace(this.rowClsRe," ");if(!c&&(d+1)%2===0){e.className+=" x-grid3-row-alt"}});if(a===0){Ext.fly(b[0]).addClass(this.firstRowCls)}Ext.fly(b[b.length-1]).addClass(this.lastRowCls)},afterRender:function(){if(!this.ds||!this.cm){return}this.mainBody.dom.innerHTML=this.renderRows()||"&#160;";this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText()}},renderUI:function(){var d=this.renderHeaders();var a=this.templates.body.apply({rows:"&#160;"});var b=this.templates.master.apply({body:a,header:d,ostyle:"width:"+this.getOffsetWidth()+";",bstyle:"width:"+this.getTotalWidth()+";"});var c=this.grid;c.getGridEl().dom.innerHTML=b;this.initElements();Ext.fly(this.innerHd).on("click",this.handleHdDown,this);this.mainHd.on({scope:this,mouseover:this.handleHdOver,mouseout:this.handleHdOut,mousemove:this.handleHdMove});this.scroller.on("scroll",this.syncScroll,this);if(c.enableColumnResize!==false){this.splitZone=new Ext.grid.GridView.SplitDragZone(c,this.mainHd.dom)}if(c.enableColumnMove){this.columnDrag=new Ext.grid.GridView.ColumnDragZone(c,this.innerHd);this.columnDrop=new Ext.grid.HeaderDropZone(c,this.mainHd.dom)}if(c.enableHdMenu!==false){this.hmenu=new Ext.menu.Menu({id:c.id+"-hctx"});this.hmenu.add({itemId:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{itemId:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});if(c.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:c.id+"-hcols-menu"});this.colMenu.on({scope:this,beforeshow:this.beforeColMenuShow,itemclick:this.handleHdMenuClick});this.hmenu.add("-",{itemId:"columns",hideOnClick:false,text:this.columnsText,menu:this.colMenu,iconCls:"x-cols-icon"})}this.hmenu.on("itemclick",this.handleHdMenuClick,this)}if(c.trackMouseOver){this.mainBody.on({scope:this,mouseover:this.onRowOver,mouseout:this.onRowOut})}if(c.enableDragDrop||c.enableDrag){this.dragZone=new Ext.grid.GridDragZone(c,{ddGroup:c.ddGroup||"GridDD"})}this.updateHeaderSortState()},layout:function(){if(!this.mainBody){return}var d=this.grid;var i=d.getGridEl();var a=i.getSize(true);var b=a.width;if(!d.hideHeaders&&(b<20||a.height<20)){return}if(d.autoHeight){this.scroller.dom.style.overflow="visible";if(Ext.isWebKit){this.scroller.dom.style.position="static"}}else{this.el.setSize(a.width,a.height);var h=this.mainHd.getHeight();var e=a.height-(h);this.scroller.setSize(b,e);if(this.innerHd){this.innerHd.style.width=(b)+"px"}}if(this.forceFit){if(this.lastViewWidth!=b){this.fitColumns(false,false);this.lastViewWidth=b}}else{this.autoExpand();this.syncHeaderScroll()}this.onLayout(b,e)},onLayout:function(a,b){},onColumnWidthUpdated:function(c,a,b){},onAllColumnWidthsUpdated:function(a,b){},onColumnHiddenUpdated:function(b,c,a){},updateColumnText:function(a,b){},afterMove:function(a){},init:function(a){this.grid=a;this.initTemplates();this.initData(a.store,a.colModel);this.initUI(a)},getColumnId:function(a){return this.cm.getColumnId(a)},getOffsetWidth:function(){return(this.cm.getTotalWidth()+this.scrollOffset)+"px"},renderHeaders:function(){var c=this.cm,h=this.templates,e=h.hcell,b=[],j={},a=c.getColumnCount(),g=a-1;for(var d=0;d<a;d++){j.id=c.getColumnId(d);j.value=c.getColumnHeader(d)||"";j.style=this.getColumnStyle(d,true);j.tooltip=this.getColumnTooltip(d);j.css=d===0?"x-grid3-cell-first ":(d==g?"x-grid3-cell-last ":"");if(c.config[d].align=="right"){j.istyle="padding-right:16px"}else{delete j.istyle}b[b.length]=e.apply(j)}return h.header.apply({cells:b.join(""),tstyle:"width:"+this.getTotalWidth()+";"})},getColumnTooltip:function(a){var b=this.cm.getColumnTooltip(a);if(b){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+b+'"'}else{return'title="'+b+'"'}}return""},beforeUpdate:function(){this.grid.stopEditing(true)},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=this.getTotalWidth()},focusRow:function(a){this.focusCell(a,0,false)},focusCell:function(c,a,b){this.syncFocusEl(this.ensureVisible(c,a,b));if(Ext.isGecko){this.focusEl.focus()}else{this.focusEl.focus.defer(1,this.focusEl)}},resolveCell:function(h,d,g){if(typeof h!="number"){h=h.rowIndex}if(!this.ds){return null}if(h<0||h>=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),a=this.cm,e=a.getColumnCount(),b;if(!(g===false&&d===0)){while(d<e&&a.isHidden(d)){d++}b=this.getCell(h,d)}return{row:c,cell:b}},getResolvedXY:function(a){if(!a){return null}var b=this.scroller.dom,e=a.cell,d=a.row;return e?Ext.fly(e).getXY():[this.el.getX(),Ext.fly(d).getY()]},syncFocusEl:function(d,a,c){var b=d;if(!Ext.isArray(b)){d=Math.min(d,Math.max(0,this.getRows().length-1));b=this.getResolvedXY(this.resolveCell(d,a,c))}this.focusEl.setXY(b||this.scroller.getXY())},ensureVisible:function(t,g,e){var r=this.resolveCell(t,g,e);if(!r||!r.row){return}var k=r.row,h=r.cell,n=this.scroller.dom,s=0,d=k,o=this.el.dom;while(d&&d!=o){s+=d.offsetTop;d=d.offsetParent}s-=this.mainHd.dom.offsetHeight;var q=s+k.offsetHeight,a=n.clientHeight,m=o+a;o=parseInt(n.scrollTop,10);if(s<o){n.scrollTop=s}else{if(q>m){n.scrollTop=q-a}}if(e!==false){var l=parseInt(h.offsetLeft,10);var j=l+h.offsetWidth;var i=parseInt(n.scrollLeft,10);var b=i+n.clientWidth;if(l<i){n.scrollLeft=l}else{if(j>b){n.scrollLeft=j-n.clientWidth}}}return this.getResolvedXY(r)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.refresh()}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.fireEvent("rowsinserted",this,i,e);this.processRows(i)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(a,c){var b=!c?(this.cm.config[a].css||""):"";b+="width:"+this.getColumnWidth(a)+";";if(this.cm.isHidden(a)){b+="display:none;"}var d=this.cm.config[a].align;if(d){b+="text-align:"+d+";"}return b},getColumnWidth:function(b){var a=this.cm.getColumnWidth(b);if(typeof a=="number"){return(Ext.isBorderBox?a:(a-this.borderWidth>0?a-this.borderWidth:0))+"px"}return a},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(d,h,j){var q=this.cm,k;var l=q.getTotalWidth(false);var a=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(a<20){return}var e=a-l;if(e===0){return false}var m=q.getColumnCount(true);var s=m-(typeof j=="number"?1:0);if(s===0){s=1;j=undefined}var r=q.getColumnCount();var o=[];var n=0;var c=0;var p;for(k=0;k<r;k++){if(!q.isHidden(k)&&!q.isFixed(k)&&k!==j){p=q.getColumnWidth(k);o.push(k);n=k;o.push(p);c+=p}}var b=(a-q.getTotalWidth())/c;while(o.length){p=o.pop();k=o.pop();q.setColumnWidth(k,Math.max(this.grid.minColumnWidth,Math.floor(p+p*b)),true)}if((l=q.getTotalWidth(false))>a){var g=s!=m?j:n;q.setColumnWidth(g,Math.max(1,q.getColumnWidth(g)-(l-a)),true)}if(d!==true){this.updateAllColumnWidths()}return true},autoExpand:function(b){var i=this.grid,a=this.cm;if(!this.userResized&&i.autoExpandColumn){var d=a.getTotalWidth(false);var j=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(d!=j){var h=a.getIndexById(i.autoExpandColumn);var e=a.getColumnWidth(h);var c=Math.min(Math.max(((j-d)+e),i.autoExpandMin),i.autoExpandMax);if(c!=e){a.setColumnWidth(h,c,true);if(b!==true){this.updateColumnWidth(h,c)}}}}},getColumnData:function(){var d=[],a=this.cm,e=a.getColumnCount();for(var c=0;c<e;c++){var b=a.getDataIndex(c);d[c]={name:(typeof b=="undefined"?this.ds.fields.get(c).name:b),renderer:a.getRenderer(c),id:a.getColumnId(c),style:this.getColumnStyle(c)}}return d},renderRows:function(j,c){var d=this.grid,h=d.colModel,a=d.store,k=d.stripeRows;var i=h.getColumnCount();if(a.getCount()<1){return""}var e=this.getColumnData();j=j||0;c=typeof c=="undefined"?a.getCount()-1:c;var b=a.getRange(j,c);return this.doRender(e,b,a,j,i,k)},renderBody:function(){var a=this.renderRows()||"&#160;";return this.templates.body.apply({rows:a})},refreshRow:function(a){var c=this.ds,b;if(typeof a=="number"){b=a;a=c.getAt(b);if(!a){return}}else{b=c.indexOf(a);if(b<0){return}}this.insertRows(c,b,b,true);this.getRow(b).rowIndex=b;this.onRemove(c,a,b+1,true);this.fireEvent("rowupdated",this,b,a)},refresh:function(b){this.fireEvent("beforerefresh",this);this.grid.stopEditing(true);var a=this.renderBody();this.mainBody.update(a).setWidth(this.getTotalWidth());if(b===true){this.updateHeaders();this.updateHeaderSortState()}this.processRows(0,true);this.layout();this.applyEmptyText();this.fireEvent("refresh",this)},applyEmptyText:function(){if(this.emptyText&&!this.hasRows()){this.mainBody.update('<div class="x-grid-empty">'+this.emptyText+"</div>")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},destroy:function(){if(this.colMenu){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu}if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu}if(this.grid.enableColumnMove){var c=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(c){for(var a in c){if(!c[a].config.isTarget&&c[a].dragElId){var b=c[a].dragElId;c[a].unreg();Ext.get(b).remove()}else{if(c[a].config.isTarget){c[a].proxyTop.remove();c[a].proxyBottom.remove();c[a].unreg()}}if(Ext.dd.DDM.locationCache[a]){delete Ext.dd.DDM.locationCache[a]}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}if(this.dragZone){this.dragZone.unreg()}Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);Ext.destroy(this.resizeMarker,this.resizeProxy,this.focusEl,this.mainBody,this.scroller,this.mainHd,this.mainWrap,this.dragZone,this.splitZone,this.columnDrag,this.columnDrop);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);this.purgeListeners()},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders()},this,{single:true})}else{this.fitColumns(true,true)}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},initData:function(b,a){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);if(this.ds!==b&&this.ds.autoDestroy){this.ds.destroy()}}if(b){b.on({scope:this,load:this.onLoad,datachanged:this.onDataChange,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.onClear})}this.ds=b;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this)}if(a){delete this.lastViewWidth;a.on({scope:this,configchange:this.onColConfigChange,widthchange:this.onColWidthChange,headerchange:this.onHeaderChange,hiddenchange:this.onHiddenChange,columnmoved:this.onColumnMove})}this.cm=a},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(c,a,b){this.insertRows(c,b,b+(a.length-1))},onRemove:function(d,a,b,c){if(c!==true){this.fireEvent("beforerowremoved",this,b,a)}this.removeRow(b);if(c!==true){this.processRows(b);this.applyEmptyText();this.fireEvent("rowremoved",this,b,a)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,d,b){this.indexMap=null;var c=this.getScrollState();this.refresh(true);this.restoreScroll(c);this.afterMove(b);this.grid.fireEvent("columnmove",d,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:function(){},onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c;if((c=this.findRowIndex(a))!==false){this.addRowClass(c,"x-grid3-row-over")}},onRowOut:function(b,a){var c;if((c=this.findRowIndex(a))!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,"x-grid3-row-over")}},handleWheel:function(a){a.stopPropagation()},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(c,b){this.userResized=true;var a=this.grid.colModel;a.setColumnWidth(c,b,true);if(this.forceFit){this.fitColumns(true,false,c);this.updateAllColumnWidths()}else{this.updateColumnWidth(c,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",c,b)},handleHdMenuClick:function(c){var b=this.hdCtxIndex;var a=this.cm,d=this.ds;switch(c.itemId){case"asc":d.sort(a.getDataIndex(b),"ASC");break;case"desc":d.sort(a.getDataIndex(b),"DESC");break;default:b=a.getIndexById(c.itemId.substr(4));if(b!=-1){if(c.checked&&a.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}a.setHidden(b,c.checked)}}return true},isHideableColumn:function(a){return !a.hidden&&!a.fixed},beforeColMenuShow:function(){var a=this.cm,c=a.getColumnCount();this.colMenu.removeAll();for(var b=0;b<c;b++){if(a.config[b].fixed!==true&&a.config[b].hideable!==false){this.colMenu.add(new Ext.menu.CheckItem({itemId:"col-"+a.getColumnId(b),text:a.getColumnHeader(b),checked:!a.isHidden(b),hideOnClick:false,disabled:a.config[b].hideable===false}))}}},handleHdDown:function(h,d){if(Ext.fly(d).hasClass("x-grid3-hd-btn")){h.stopEvent();var g=this.findHeaderCell(d);Ext.fly(g).addClass("x-grid3-hd-menu-open");var c=this.getCellIndex(g);this.hdCtxIndex=c;var b=this.hmenu.items,a=this.cm;b.get("asc").setDisabled(!a.isSortable(c));b.get("desc").setDisabled(!a.isSortable(c));this.hmenu.on("hide",function(){Ext.fly(g).removeClass("x-grid3-hd-menu-open")},this,{single:true});this.hmenu.show(d,"tl-bl?")}},handleHdOver:function(d,a){var c=this.findHeaderCell(a);if(c&&!this.headersDisabled){this.activeHd=c;this.activeHdIndex=this.getCellIndex(c);var b=this.fly(c);this.activeHdRegion=b.getRegion();if(!this.cm.isMenuDisabled(this.activeHdIndex)){b.addClass("x-grid3-hd-over");this.activeHdBtn=b.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(c.firstChild.offsetHeight-1)+"px"}}}},handleHdMove:function(h,d){if(this.activeHd&&!this.headersDisabled){var b=this.splitHandleWidth||5;var g=this.activeHdRegion;var a=h.getPageX();var c=this.activeHd.style;if(a-g.left<=b&&this.cm.isResizable(this.activeHdIndex-1)){c.cursor=Ext.isAir?"move":Ext.isWebKit?"e-resize":"col-resize"}else{if(g.right-a<=(!this.activeHdBtn?b:2)&&this.cm.isResizable(this.activeHdIndex)){c.cursor=Ext.isAir?"move":Ext.isWebKit?"w-resize":"col-resize"}else{c.cursor=""}}}},handleHdOut:function(c,a){var b=this.findHeaderCell(a);if(b&&(!Ext.isIE||!c.within(b,true))){this.activeHd=null;this.fly(b).removeClass("x-grid3-hd-over");b.style.cursor=""}},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5};Ext.extend(Ext.grid.GridView.SplitDragZone,Ext.dd.DDProxy,{b4StartDrag:function(a,e){this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex);var c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},handleMouseDown:function(a){var i=this.view.findHeaderCell(a.getTarget());if(i){var l=this.view.fly(i).getXY(),d=l[0],c=l[1];var j=a.getXY(),b=j[0];var h=i.offsetWidth,g=false;if((b-d)<=this.hw){g=-1}else{if((d+h)-b<=this.hw){g=0}}if(g!==false){this.cm=this.grid.colModel;var k=this.view.getCellIndex(i);if(g==-1){if(k+g<0){return}while(this.cm.isHidden(k+g)){--g;if(k+g<0){return}}}this.cellIndex=k+g;this.split=i.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(d){this.marker.hide();var a=this.view;var b=Math.max(this.minX,d.getPageX());var c=b-this.startPos;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+c);setTimeout(function(){a.headersDisabled=false},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.HeaderDragZone=function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false};Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(c){var a=Ext.lib.Event.getTarget(c);var b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){var a=this.view;setTimeout(function(){a.headersDisabled=false},50)},afterInvalidDrop:function(){var a=this.view;setTimeout(function(){a.headersDisabled=false},50)}});Ext.grid.HeaderDropZone=function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)};Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c);var b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,k,j){var a=Ext.lib.Event.getPageX(j);var g=Ext.lib.Dom.getRegion(k.firstChild);var c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(k))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,m,g,c){var d=c.header;if(d!=b){var k=this.grid.colModel;var j=Ext.lib.Event.getPageX(g);var a=Ext.lib.Dom.getRegion(b.firstChild);var o=(a.right-j)<=((a.right-a.left)/2)?"after":"before";var i=this.view.getCellIndex(d);var l=this.view.getCellIndex(b);if(o=="after"){l++}if(i<l){l--}k.moveColumn(i,l);this.grid.fireEvent("columnmove",i,l);return true}return false}});Ext.grid.GridView.ColumnDragZone=function(a,b){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,a,b,null);this.proxy.el.addClass("x-grid3-col-dd")};Ext.extend(Ext.grid.GridView.ColumnDragZone,Ext.grid.HeaderDragZone,{handleMouseDown:function(a){},callHandleMouseDown:function(a){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,a)}});Ext.grid.SplitDragZone=function(a,c,b){this.grid=a;this.view=a.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,c,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b));this.scroll=false};Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(a,d){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var b=this.cm.getColumnWidth(this.cellIndex);var c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,d)},handleMouseDown:function(c){var b=Ext.EventObject.setEvent(c);var a=this.fly(b.getTarget());if(a.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(a.dom);this.split=a.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}},endDrag:function(c){this.view.headersDisabled=false;var a=Math.max(this.minX,Ext.lib.Event.getPageX(c));var b=a-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+b)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.GridDragZone=function(b,a){this.view=b.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,a);this.scroll=false;this.grid=b;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(b){var a=Ext.lib.Event.getTarget(b);var d=this.view.findRowIndex(a);if(d!==false){var c=this.grid.selModel;if(!c.isSelected(d)||b.hasModifier()){c.handleMouseDown(this.grid,d,b)}return{grid:this.grid,ddel:this.ddel,rowIndex:d,selections:c.getSelections()}}return false},onInitDrag:function(b){var a=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=false},getRepairXY:function(b,a){return false},onEndDrag:function(a,b){},onValidDrop:function(a,b,c){this.hideProxy()},beforeInvalidDrop:function(a,b){}});Ext.grid.ColumnModel=function(a){if(a.columns){Ext.apply(this,a);this.setConfig(a.columns,true)}else{this.setConfig(a,true)}this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{defaultWidth:100,defaultSortable:false,getColumnId:function(a){return this.config[a].id},getColumnAt:function(a){return this.config[a]},setConfig:function(e,d){var g,h,a;if(!d){delete this.totalWidth;for(g=0,a=this.config.length;g<a;g++){h=this.config[g];if(h.editor){h.editor.destroy()}}}this.defaults=Ext.apply({width:this.defaultWidth,sortable:this.defaultSortable},this.defaults);this.config=e;this.lookup={};for(g=0,a=e.length;g<a;g++){h=Ext.applyIf(e[g],this.defaults);if(!h.isColumn){var b=Ext.grid.Column.types[h.xtype||"gridcolumn"];h=new b(h);e[g]=h}this.lookup[h.id]=h}if(!d){this.fireEvent("configchange",this)}},getColumnById:function(a){return this.lookup[a]},getIndexById:function(c){for(var b=0,a=this.config.length;b<a;b++){if(this.config[b].id==c){return b}}return -1},moveColumn:function(d,a){var b=this.config[d];this.config.splice(d,1);this.config.splice(a,0,b);this.dataMap=null;this.fireEvent("columnmoved",this,d,a)},getColumnCount:function(d){if(d===true){var e=0;for(var b=0,a=this.config.length;b<a;b++){if(!this.isHidden(b)){e++}}return e}return this.config.length},getColumnsBy:function(e,d){var g=[];for(var b=0,a=this.config.length;b<a;b++){var h=this.config[b];if(e.call(d||this,h,b)===true){g[g.length]=h}}return g},isSortable:function(a){return this.config[a].sortable},isMenuDisabled:function(a){return !!this.config[a].menuDisabled},getRenderer:function(a){if(!this.config[a].renderer){return Ext.grid.ColumnModel.defaultRenderer}return this.config[a].renderer},setRenderer:function(a,b){this.config[a].renderer=b},getColumnWidth:function(a){return this.config[a].width},setColumnWidth:function(b,c,a){this.config[b].width=c;this.totalWidth=null;if(!a){this.fireEvent("widthchange",this,b,c)}},getTotalWidth:function(b){if(!this.totalWidth){this.totalWidth=0;for(var c=0,a=this.config.length;c<a;c++){if(b||!this.isHidden(c)){this.totalWidth+=this.getColumnWidth(c)}}}return this.totalWidth},getColumnHeader:function(a){return this.config[a].header},setColumnHeader:function(a,b){this.config[a].header=b;this.fireEvent("headerchange",this,a,b)},getColumnTooltip:function(a){return this.config[a].tooltip},setColumnTooltip:function(a,b){this.config[a].tooltip=b},getDataIndex:function(a){return this.config[a].dataIndex},setDataIndex:function(a,b){this.config[a].dataIndex=b},findColumnIndex:function(d){var e=this.config;for(var b=0,a=e.length;b<a;b++){if(e[b].dataIndex==d){return b}}return -1},isCellEditable:function(a,b){return(this.config[a].editable||(typeof this.config[a].editable=="undefined"&&this.config[a].editor))?true:false},getCellEditor:function(a,b){return this.config[a].getCellEditor(b)},setEditable:function(a,b){this.config[a].editable=b},isHidden:function(a){return this.config[a].hidden},isFixed:function(a){return this.config[a].fixed},isResizable:function(a){return a>=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){Ext.destroy(this.config[a].editor);this.config[a].editor=b},destroy:function(){for(var b=0,d=this.config,a=d.length;b<a;b++){Ext.destroy(d[b].editor)}this.purgeListeners()}});Ext.grid.ColumnModel.defaultRenderer=function(a){if(typeof a=="string"&&a.length<1){return"&#160;"}return a};Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(a){this.grid=a;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},destroy:function(){this.purgeListeners()}});Ext.grid.RowSelectionModel=function(a){Ext.apply(this,a);this.selections=new Ext.util.MixedCollection(false,function(b){return b.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("rowmousedown",this.handleMouseDown,this)}else{this.grid.on("rowclick",function(b,d,c){if(c.button===0&&!c.shiftKey&&!c.ctrlKey){this.selectRow(d,false);b.view.focusRow(d)}},this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{up:function(c){if(!c.shiftKey||this.singleSelect){this.selectPrevious(false)}else{if(this.last!==false&&this.lastActive!==false){var b=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(b!==false){this.last=b}}else{this.selectFirstRow()}}},down:function(c){if(!c.shiftKey||this.singleSelect){this.selectNext(false)}else{if(this.last!==false&&this.lastActive!==false){var b=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(b!==false){this.last=b}}else{this.selectFirstRow()}}},scope:this});var a=this.grid.view;a.on("refresh",this.onRefresh,this);a.on("rowupdated",this.onRowUpdated,this);a.on("rowremoved",this.onRemove,this)},onRefresh:function(){var g=this.grid.store,b;var d=this.getSelections();this.clearSelections(true);for(var c=0,a=d.length;c<a;c++){var e=d[c];if((b=g.indexOfId(e.id))!=-1){this.selectRow(b,true)}}if(d.length!=this.selections.getCount()){this.fireEvent("selectionchange",this)}},onRemove:function(a,b,c){if(this.selections.remove(c)!==false){this.fireEvent("selectionchange",this)}},onRowUpdated:function(a,b,c){if(this.isSelected(c)){a.onRowSelect(b)}},selectRecords:function(b,e){if(!e){this.clearSelections()}var d=this.grid.store;for(var c=0,a=b.length;c<a;c++){this.selectRow(d.indexOf(b[c]),true)}},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(a){this.selectRow(this.grid.store.getCount()-1,a)},selectNext:function(a){if(this.hasNext()){this.selectRow(this.last+1,a);this.grid.getView().focusRow(this.last);return true}return false},selectPrevious:function(a){if(this.hasPrevious()){this.selectRow(this.last-1,a);this.grid.getView().focusRow(this.last);return true}return false},hasNext:function(){return this.last!==false&&(this.last+1)<this.grid.store.getCount()},hasPrevious:function(){return !!this.last},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},each:function(e,d){var c=this.getSelections();for(var b=0,a=c.length;b<a;b++){if(e.call(d||this,c[b],b)===false){return false}}return true},clearSelections:function(a){if(this.isLocked()){return}if(a!==true){var c=this.grid.store;var b=this.selections;b.each(function(d){this.deselectRow(c.indexOfId(d.id))},this);b.clear()}else{this.selections.clear()}this.last=false},selectAll:function(){if(this.isLocked()){return}this.selections.clear();for(var b=0,a=this.grid.store.getCount();b<a;b++){this.selectRow(b,true)}},hasSelection:function(){return this.selections.length>0},isSelected:function(a){var b=typeof a=="number"?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b<a;b++){this.selectRow(c[b],true)}},selectRange:function(b,a,d){var c;if(this.isLocked()){return}if(!d){this.clearSelections()}if(b<=a){for(c=b;c<=a;c++){this.selectRow(c,true)}}else{for(c=b;c>=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(i,h){var c=h.getKey(),j,d=this.grid,b=d.activeEditor;var a=h.shiftKey;if(c==h.TAB){h.stopEvent();b.completeEdit();if(a){j=d.walkCells(b.row,b.col-1,-1,this.acceptsNav,this)}else{j=d.walkCells(b.row,b.col+1,1,this.acceptsNav,this)}}else{if(c==h.ENTER){h.stopEvent();b.completeEdit();if(this.moveEditorOnEnter!==false){if(a){j=d.walkCells(b.row-1,b.col,-1,this.acceptsNav,this)}else{j=d.walkCells(b.row+1,b.col,1,this.acceptsNav,this)}}}else{if(c==h.ESC){b.cancelEdit()}}}if(j){d.startEditing(j[0],j[1])}},destroy:function(){if(this.rowNav){this.rowNav.disable();this.rowNav=null}Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=function(a){Ext.apply(this,a);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}this.renderer=this.renderer.createDelegate(this.scope||a);if(this.id===undefined){this.id=++Ext.grid.Column.AUTO_ID}if(this.editor){this.editor=Ext.create(this.editor,"textfield")}};Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={isColumn:true,renderer:function(a){if(typeof a=="string"&&a.length<1){return"&#160;"}return a},getEditor:function(a){return this.editable!==false?this.editor:null},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}return a.gridEditor}else{if(a.startEdit){return a}}}return null}};Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=typeof Ext.isObject(this.tpl)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn};Ext.grid.RowNumberer=function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}};Ext.grid.RowNumberer.prototype={header:"",width:23,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}};Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'<div class="x-grid3-hd-checker">&#160;</div>',width:20,sortable:false,menuDisabled:true,fixed:true,dataIndex:"",id:"checker",constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var a=this.grid.getView();a.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(a.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'<div class="x-grid3-row-checker">&#160;</div>'}});Ext.grid.CellSelectionModel=function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.EventManager.useKeydown?"keydown":"keypress",this.handleKeyDown,this);var a=this.grid.view;a.on("refresh",this.onViewChange,this);a.on("rowupdated",this.onRowUpdated,this);a.on("beforerowremoved",this.clearSelections,this);a.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},handleKeyDown:function(j){if(!j.isNavKeyPress()){return}var i=this.grid,o=this.selection;if(!o){j.stopEvent();var n=i.walkCells(0,0,1,this.isSelectable,this);if(n){this.select(n[0],n[1])}return}var b=this;var m=function(g,c,e){return i.walkCells(g,c,e,b.isSelectable,b)};var d=j.getKey(),a=o.cell[0],l=o.cell[1];var h;switch(d){case j.TAB:if(j.shiftKey){h=m(a,l-1,-1)}else{h=m(a,l+1,1)}break;case j.DOWN:h=m(a+1,l,1);break;case j.UP:h=m(a-1,l,-1);break;case j.RIGHT:h=m(a,l+1,1);break;case j.LEFT:h=m(a,l-1,-1);break;case j.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,l);j.stopEvent();return}break}if(h){this.select(h[0],h[1]);j.stopEvent()}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(h,d){var b=d.getKey(),i,c=this.grid,a=c.activeEditor;if(b==d.TAB){if(d.shiftKey){i=c.walkCells(a.row,a.col-1,-1,this.acceptsNav,this)}else{i=c.walkCells(a.row,a.col+1,1,this.acceptsNav,this)}d.stopEvent()}else{if(b==d.ENTER){a.completeEdit();d.stopEvent()}else{if(b==d.ESC){d.stopEvent();a.cancelEdit()}}}if(i){c.startEditing(i[0],i[1])}}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this,[true]);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{if(this.clicksToEdit=="auto"&&this.view.mainBody){this.view.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b);var a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.activeEditor=null;b.un("specialkey",this.selModel.onEditorKey,this.selModel);var c=b.record;var h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(h,b){this.stopEditing();if(this.colModel.isCellEditable(b,h)){this.view.ensureVisible(h,b,true);var c=this.store.getAt(h);var g=this.colModel.getDataIndex(b);var d={grid:this,record:c,field:g,value:c.data[g],row:h,column:b,cancel:false};if(this.fireEvent("beforeedit",d)!==false&&!d.cancel){this.editing=true;var a=this.colModel.getCellEditor(b,h);if(!a){return}if(!a.rendered){a.render(this.view.getEditorParent(a))}(function(){a.row=h;a.col=b;a.record=c;a.on("complete",this.onEditComplete,this,{single:true});a.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=a;var e=this.preEditValue(c,g);a.startEdit(this.view.getCell(h,b).firstChild,e===undefined?"":e)}).defer(50,this)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&typeof b=="string"?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&typeof c=="string"?Ext.util.Format.htmlEncode(c):c},stopEditing:function(a){if(this.activeEditor){this.activeEditor[a===true?"cancelEdit":"completeEdit"]()}this.activeEditor=null}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)};Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){if(Ext.isDate(a)){return true}return !(Ext.isObject(a)||Ext.isFunction(a))},setValue:function(b,a){this.source[b]=a;this.store.getById(b).set("value",a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]},getValue:function(){return this.el.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a)};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)};Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return a?"true":"false"},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(a){var b=a;if(Ext.isDate(a)){b=this.renderDate(a)}else{if(typeof a=="boolean"){b=this.renderBool(a)}}return Ext.util.Format.htmlEncode(b)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);for(var a in this.editors){Ext.destroy(a)}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",gidSeed:1000,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('<div id="{groupId}" class="x-grid-group {cls}">','<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">',this.groupTextTpl,"</div></div>",'<div id="{groupId}-bd" class="x-grid-group-body">')}this.startGroup.compile();this.endGroup="</div></div>"},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var a=this.getScrollState();this.refresh();this.restoreScroll(a)}else{if(!this.enableGrouping){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(!!this.getGroupField(),true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.beforeMenuShow()},onShowGroupsClick:function(a,b){if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping()}},toggleGroup:function(c,b){this.grid.stopEditing(true);c=Ext.getDom(c);var a=Ext.fly(c);b=b!==undefined?b:a.hasClass("x-grid-group-collapsed");this.state[a.dom.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){this.toggleGroup(b[d],c)}},expandAllGroups:function(){this.toggleAllGroups(true)},collapseAllGroups:function(){this.toggleAllGroups(false)},interceptMouse:function(b){var a=b.getTarget(".x-grid-group-hd",this.mainBody);if(a){b.stopEvent();this.toggleGroup(a.parentNode)}},getGroup:function(a,d,h,i,b,e){var c=h?h(a,{},d,i,b,e):String(a);if(c===""){c=this.cm.config[b].emptyGroupText||this.emptyGroupText}return c},getGroupField:function(){return this.grid.store.getGroupState()},afterRender:function(){Ext.grid.GroupingView.superclass.afterRender.call(this);if(this.grid.deferRowRender){this.updateGroupWidths()}},renderRows:function(){var a=this.getGroupField();var d=!!a;if(this.hideGroupedColumn){var b=this.cm.findColumnIndex(a);if(!d&&this.lastGroupField!==undefined){this.mainBody.update("");this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField),false);delete this.lastGroupField}else{if(d&&this.lastGroupField===undefined){this.lastGroupField=a;this.cm.setHidden(b,true)}else{if(d&&this.lastGroupField!==undefined&&a!==this.lastGroupField){this.mainBody.update("");var c=this.cm.findColumnIndex(this.lastGroupField);this.cm.setHidden(c,false);this.lastGroupField=a;this.cm.setHidden(b,true)}}}}return Ext.grid.GroupingView.superclass.renderRows.apply(this,arguments)},doRender:function(d,j,t,a,s,v){if(j.length<1){return""}var C=this.getGroupField(),q=this.cm.findColumnIndex(C),z;this.enableGrouping=!!C;if(!this.enableGrouping||this.isUpdating){return Ext.grid.GroupingView.superclass.doRender.apply(this,arguments)}var k="width:"+this.getTotalWidth()+";";var u=this.grid.getGridEl().id;var h=this.cm.config[q];var b=h.groupRenderer||h.renderer;var w=this.showGroupName?(h.groupName||h.header)+": ":"";var B=[],n,x,y,p;for(x=0,y=j.length;x<y;x++){var m=a+x,o=j[x],e=o.data[C];z=this.getGroup(e,o,b,m,q,t);if(!n||n.group!=z){p=u+"-gp-"+C+"-"+Ext.util.Format.htmlEncode(z);var c=typeof this.state[p]!=="undefined"?!this.state[p]:this.startCollapsed;var l=c?"x-grid-group-collapsed":"";n={group:z,gvalue:e,text:w+z,groupId:p,startRow:m,rs:[o],cls:l,style:k};B.push(n)}else{n.rs.push(o)}o._groupId=p}var A=[];for(x=0,y=B.length;x<y;x++){z=B[x];this.doGroupStart(A,z,d,t,s);A[A.length]=Ext.grid.GroupingView.superclass.doRender.call(this,d,z.rs,t,z.startRow,s,v);this.doGroupEnd(A,z,d,t,s)}return A.join("")},getGroupId:function(g){var d=this.grid.getGridEl().id;var c=this.getGroupField();var e=this.cm.findColumnIndex(c);var b=this.cm.config[e];var h=b.groupRenderer||b.renderer;var a=this.getGroup(g,{data:{}},h,0,e,this.ds);return d+"-gp-"+c+"-"+Ext.util.Format.htmlEncode(g)},doGroupStart:function(a,d,b,e,c){a[a.length]=this.startGroup.apply(d)},doGroupEnd:function(a,d,b,e,c){a[a.length]=this.endGroup},getRows:function(){if(!this.enableGrouping){return Ext.grid.GroupingView.superclass.getRows.call(this)}var k=[];var h,c=this.getGroups();for(var e=0,a=c.length;e<a;e++){h=c[e].childNodes[1].childNodes;for(var d=0,b=h.length;d<b;d++){k[k.length]=h[d]}}return k},updateGroupWidths:function(){if(!this.enableGrouping||!this.hasRows()){return}var c=Math.max(this.cm.getTotalWidth(),this.el.dom.offsetWidth-this.scrollOffset)+"px";var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){b[d].firstChild.style.width=c}},onColumnWidthUpdated:function(c,a,b){Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this,c,a,b);this.updateGroupWidths()},onAllColumnWidthsUpdated:function(a,b){Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this,a,b);this.updateGroupWidths()},onColumnHiddenUpdated:function(b,c,a){Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this,b,c,a);this.updateGroupWidths()},onLayout:function(){this.updateGroupWidths()},onBeforeRowSelect:function(d,c){if(!this.enableGrouping){return}var b=this.getRow(c);if(b&&!b.offsetParent){var a=this.findGroup(b);this.toggleGroup(a,true)}}});Ext.grid.GroupingView.GROUP_ID=1000;
Index: trunk/web/addons/job_monarch/lib/extjs-30/license.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/license.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/license.txt	(revision 625)
@@ -0,0 +1,42 @@
+Ext JS - JavaScript Library
+Copyright (c) 2006-2009, Ext JS, LLC
+All rights reserved.
+licensing@extjs.com
+
+http://extjs.com/license
+
+Open Source License
+------------------------------------------------------------------------------------------
+Ext is licensed under the terms of the Open Source GPL 3.0 license. 
+
+http://www.gnu.org/licenses/gpl.html
+
+There are several FLOSS exceptions available for use with this release for
+open source applications that are distributed under a license other than the GPL.
+
+* Open Source License Exception for Applications
+
+  http://extjs.com/products/floss-exception.php
+
+* Open Source License Exception for Development
+
+  http://extjs.com/products/ux-exception.php
+
+
+Commercial License
+------------------------------------------------------------------------------------------
+This is the appropriate option if you are creating proprietary applications and you are 
+not prepared to distribute and share the source code of your application under the 
+GPL v3 license. Please visit http://extjs.com/license for more details.
+
+
+OEM / Reseller License
+------------------------------------------------------------------------------------------
+For more details, please visit: http://extjs.com/license.
+
+--
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation-debug.js	(revision 625)
@@ -0,0 +1,11287 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ComponentMgr
+ * <p>Provides a registry of all Components (instances of {@link Ext.Component} or any subclass
+ * thereof) on a page so that they can be easily accessed by {@link Ext.Component component}
+ * {@link Ext.Component#id id} (see {@link #get}, or the convenience method {@link Ext#getCmp Ext.getCmp}).</p>
+ * <p>This object also provides a registry of available Component <i>classes</i>
+ * indexed by a mnemonic code known as the Component's {@link Ext.Component#xtype xtype}.
+ * The <tt>{@link Ext.Component#xtype xtype}</tt> provides a way to avoid instantiating child Components
+ * when creating a full, nested config object for a complete Ext page.</p>
+ * <p>A child Component may be specified simply as a <i>config object</i>
+ * as long as the correct <tt>{@link Ext.Component#xtype xtype}</tt> is specified so that if and when the Component
+ * needs rendering, the correct type can be looked up for lazy instantiation.</p>
+ * <p>For a list of all available <tt>{@link Ext.Component#xtype xtypes}</tt>, see {@link Ext.Component}.</p>
+ * @singleton
+ */
+Ext.ComponentMgr = function(){
+    var all = new Ext.util.MixedCollection();
+    var types = {};
+    var ptypes = {};
+
+    return {
+        /**
+         * Registers a component.
+         * @param {Ext.Component} c The component
+         */
+        register : function(c){
+            all.add(c);
+        },
+
+        /**
+         * Unregisters a component.
+         * @param {Ext.Component} c The component
+         */
+        unregister : function(c){
+            all.remove(c);
+        },
+
+        /**
+         * Returns a component by {@link Ext.Component#id id}.
+         * For additional details see {@link Ext.util.MixedCollection#get}.
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+         */
+        get : function(id){
+            return all.get(id);
+        },
+
+        /**
+         * Registers a function that will be called when a specified component is added to ComponentMgr
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @param {Function} fn The callback function
+         * @param {Object} scope The scope of the callback
+         */
+        onAvailable : function(id, fn, scope){
+            all.on("add", function(index, o){
+                if(o.id == id){
+                    fn.call(scope || o, o);
+                    all.un("add", fn, scope);
+                }
+            });
+        },
+
+        /**
+         * The MixedCollection used internally for the component cache. An example usage may be subscribing to
+         * events on the MixedCollection to monitor addition or removal.  Read-only.
+         * @type {MixedCollection}
+         */
+        all : all,
+        
+        /**
+         * Checks if a Component type is registered.
+         * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up
+         * @return {Boolean} Whether the type is registered.
+         */
+        isRegistered : function(xtype){
+            return types[xtype] !== undefined;    
+        },
+
+        /**
+         * <p>Registers a new Component constructor, keyed by a new
+         * {@link Ext.Component#xtype}.</p>
+         * <p>Use this method (or its alias {@link Ext#reg Ext.reg}) to register new
+         * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying
+         * child Components.
+         * see {@link Ext.Container#items}</p>
+         * @param {String} xtype The mnemonic string by which the Component class may be looked up.
+         * @param {Constructor} cls The new Component class.
+         */
+        registerType : function(xtype, cls){
+            types[xtype] = cls;
+            cls.xtype = xtype;
+        },
+
+        /**
+         * Creates a new Component from the specified config object using the
+         * config object's {@link Ext.component#xtype xtype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Component you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Component type if
+         * the config object does not contain a <tt>xtype</tt>. (Optional if the config contains a <tt>xtype</tt>).
+         * @return {Ext.Component} The newly instantiated Component.
+         */
+        create : function(config, defaultType){
+            return config.render ? config : new types[config.xtype || defaultType](config);
+        },
+
+        /**
+         * <p>Registers a new Plugin constructor, keyed by a new
+         * {@link Ext.Component#ptype}.</p>
+         * <p>Use this method (or its alias {@link Ext#preg Ext.preg}) to register new
+         * plugins for {@link Ext.Component}s so that lazy instantiation may be used when specifying
+         * Plugins.</p>
+         * @param {String} ptype The mnemonic string by which the Plugin class may be looked up.
+         * @param {Constructor} cls The new Plugin class.
+         */
+        registerPlugin : function(ptype, cls){
+            ptypes[ptype] = cls;
+            cls.ptype = ptype;
+        },
+
+        /**
+         * Creates a new Plugin from the specified config object using the
+         * config object's {@link Ext.component#ptype ptype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Plugin you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Plugin type if
+         * the config object does not contain a <tt>ptype</tt>. (Optional if the config contains a <tt>ptype</tt>).
+         * @return {Ext.Component} The newly instantiated Plugin.
+         */
+        createPlugin : function(config, defaultType){
+            return new ptypes[config.ptype || defaultType](config);
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerType}
+ * @param {String} xtype The {@link Ext.component#xtype mnemonic string} by which the Component class
+ * may be looked up.
+ * @param {Constructor} cls The new Component class.
+ * @member Ext
+ * @method reg
+ */
+Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerPlugin}
+ * @param {String} ptype The {@link Ext.component#ptype mnemonic string} by which the Plugin class
+ * may be looked up.
+ * @param {Constructor} cls The new Plugin class.
+ * @member Ext
+ * @method preg
+ */
+Ext.preg = Ext.ComponentMgr.registerPlugin;
+Ext.create = Ext.ComponentMgr.create;
+/**
+ * @class Ext.Component
+ * @extends Ext.util.Observable
+ * <p>Base class for all Ext components.  All subclasses of Component may participate in the automated
+ * Ext component lifecycle of creation, rendering and destruction which is provided by the {@link Ext.Container Container} class.
+ * Components may be added to a Container through the {@link Ext.Container#items items} config option at the time the Container is created,
+ * or they may be added dynamically via the {@link Ext.Container#add add} method.</p>
+ * <p>The Component base class has built-in support for basic hide/show and enable/disable behavior.</p>
+ * <p>All Components are registered with the {@link Ext.ComponentMgr} on construction so that they can be referenced at any time via
+ * {@link Ext#getCmp}, passing the {@link #id}.</p>
+ * <p>All user-developed visual widgets that are required to participate in automated lifecycle and size management should subclass Component (or
+ * {@link Ext.BoxComponent} if managed box model handling is required, ie height and width management).</p>
+ * <p>See the <a href="http://extjs.com/learn/Tutorial:Creating_new_UI_controls">Creating new UI controls</a> tutorial for details on how
+ * and to either extend or augment ExtJs base classes to create custom Components.</p>
+ * <p>Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the
+ * xtype like {@link #getXType} and {@link #isXType}. This is the list of all valid xtypes:</p>
+ * <pre>
+xtype            Class
+-------------    ------------------
+box              {@link Ext.BoxComponent}
+button           {@link Ext.Button}
+buttongroup      {@link Ext.ButtonGroup}
+colorpalette     {@link Ext.ColorPalette}
+component        {@link Ext.Component}
+container        {@link Ext.Container}
+cycle            {@link Ext.CycleButton}
+dataview         {@link Ext.DataView}
+datepicker       {@link Ext.DatePicker}
+editor           {@link Ext.Editor}
+editorgrid       {@link Ext.grid.EditorGridPanel}
+flash            {@link Ext.FlashComponent}
+grid             {@link Ext.grid.GridPanel}
+listview         {@link Ext.ListView}
+panel            {@link Ext.Panel}
+progress         {@link Ext.ProgressBar}
+propertygrid     {@link Ext.grid.PropertyGrid}
+slider           {@link Ext.Slider}
+spacer           {@link Ext.Spacer}
+splitbutton      {@link Ext.SplitButton}
+tabpanel         {@link Ext.TabPanel}
+treepanel        {@link Ext.tree.TreePanel}
+viewport         {@link Ext.ViewPort}
+window           {@link Ext.Window}
+
+Toolbar components
+---------------------------------------
+paging           {@link Ext.PagingToolbar}
+toolbar          {@link Ext.Toolbar}
+tbbutton         {@link Ext.Toolbar.Button}        (deprecated; use button)
+tbfill           {@link Ext.Toolbar.Fill}
+tbitem           {@link Ext.Toolbar.Item}
+tbseparator      {@link Ext.Toolbar.Separator}
+tbspacer         {@link Ext.Toolbar.Spacer}
+tbsplit          {@link Ext.Toolbar.SplitButton}   (deprecated; use splitbutton)
+tbtext           {@link Ext.Toolbar.TextItem}
+
+Menu components
+---------------------------------------
+menu             {@link Ext.menu.Menu}
+colormenu        {@link Ext.menu.ColorMenu}
+datemenu         {@link Ext.menu.DateMenu}
+menubaseitem     {@link Ext.menu.BaseItem}
+menucheckitem    {@link Ext.menu.CheckItem}
+menuitem         {@link Ext.menu.Item}
+menuseparator    {@link Ext.menu.Separator}
+menutextitem     {@link Ext.menu.TextItem}
+
+Form components
+---------------------------------------
+form             {@link Ext.FormPanel}
+checkbox         {@link Ext.form.Checkbox}
+checkboxgroup    {@link Ext.form.CheckboxGroup}
+combo            {@link Ext.form.ComboBox}
+datefield        {@link Ext.form.DateField}
+displayfield     {@link Ext.form.DisplayField}
+field            {@link Ext.form.Field}
+fieldset         {@link Ext.form.FieldSet}
+hidden           {@link Ext.form.Hidden}
+htmleditor       {@link Ext.form.HtmlEditor}
+label            {@link Ext.form.Label}
+numberfield      {@link Ext.form.NumberField}
+radio            {@link Ext.form.Radio}
+radiogroup       {@link Ext.form.RadioGroup}
+textarea         {@link Ext.form.TextArea}
+textfield        {@link Ext.form.TextField}
+timefield        {@link Ext.form.TimeField}
+trigger          {@link Ext.form.TriggerField}
+
+Chart components
+---------------------------------------
+chart            {@link Ext.chart.Chart}
+barchart         {@link Ext.chart.BarChart}
+cartesianchart   {@link Ext.chart.CartesianChart}
+columnchart      {@link Ext.chart.ColumnChart}
+linechart        {@link Ext.chart.LineChart}
+piechart         {@link Ext.chart.PieChart}
+
+Store xtypes
+---------------------------------------
+arraystore       {@link Ext.data.ArrayStore}
+directstore      {@link Ext.data.DirectStore}
+groupingstore    {@link Ext.data.GroupingStore}
+jsonstore        {@link Ext.data.JsonStore}
+simplestore      {@link Ext.data.SimpleStore}      (deprecated; use arraystore)
+store            {@link Ext.data.Store}
+xmlstore         {@link Ext.data.XmlStore}
+</pre>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options may be specified as either:
+ * <div class="mdetail-params"><ul>
+ * <li><b>an element</b> :
+ * <p class="sub-desc">it is set as the internal element and its id used as the component id</p></li>
+ * <li><b>a string</b> :
+ * <p class="sub-desc">it is assumed to be the id of an existing element and is used as the component id</p></li>
+ * <li><b>anything else</b> :
+ * <p class="sub-desc">it is assumed to be a standard config object and is applied to the component</p></li>
+ * </ul></div>
+ */
+Ext.Component = function(config){
+    config = config || {};
+    if(config.initialConfig){
+        if(config.isAction){           // actions
+            this.baseAction = config;
+        }
+        config = config.initialConfig; // component cloning / action set up
+    }else if(config.tagName || config.dom || Ext.isString(config)){ // element object
+        config = {applyTo: config, id: config.id || config};
+    }
+
+    /**
+     * This Component's initial configuration specification. Read-only.
+     * @type Object
+     * @property initialConfig
+     */
+    this.initialConfig = config;
+
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event disable
+         * Fires after the component is disabled.
+         * @param {Ext.Component} this
+         */
+        'disable',
+        /**
+         * @event enable
+         * Fires after the component is enabled.
+         * @param {Ext.Component} this
+         */
+        'enable',
+        /**
+         * @event beforeshow
+         * Fires before the component is shown by calling the {@link #show} method.
+         * Return false from an event handler to stop the show.
+         * @param {Ext.Component} this
+         */
+        'beforeshow',
+        /**
+         * @event show
+         * Fires after the component is shown when calling the {@link #show} method.
+         * @param {Ext.Component} this
+         */
+        'show',
+        /**
+         * @event beforehide
+         * Fires before the component is hidden by calling the {@link #hide} method.
+         * Return false from an event handler to stop the hide.
+         * @param {Ext.Component} this
+         */
+        'beforehide',
+        /**
+         * @event hide
+         * Fires after the component is hidden.
+         * Fires after the component is hidden when calling the {@link #hide} method.
+         * @param {Ext.Component} this
+         */
+        'hide',
+        /**
+         * @event beforerender
+         * Fires before the component is {@link #rendered}. Return false from an
+         * event handler to stop the {@link #render}.
+         * @param {Ext.Component} this
+         */
+        'beforerender',
+        /**
+         * @event render
+         * Fires after the component markup is {@link #rendered}.
+         * @param {Ext.Component} this
+         */
+        'render',
+        /**
+         * @event afterrender
+         * <p>Fires after the component rendering is finished.</p>
+         * <p>The afterrender event is fired after this Component has been {@link #rendered}, been postprocesed
+         * by any afterRender method defined for the Component, and, if {@link #stateful}, after state
+         * has been restored.</p>
+         * @param {Ext.Component} this
+         */
+        'afterrender',
+        /**
+         * @event beforedestroy
+         * Fires before the component is {@link #destroy}ed. Return false from an event handler to stop the {@link #destroy}.
+         * @param {Ext.Component} this
+         */
+        'beforedestroy',
+        /**
+         * @event destroy
+         * Fires after the component is {@link #destroy}ed.
+         * @param {Ext.Component} this
+         */
+        'destroy',
+        /**
+         * @event beforestaterestore
+         * Fires before the state of the component is restored. Return false from an event handler to stop the restore.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. If this
+         * event is not vetoed, then the state object is passed to <b><tt>applyState</tt></b>. By default,
+         * that simply copies property values into this Component. The method maybe overriden to
+         * provide custom state restoration.
+         */
+        'beforestaterestore',
+        /**
+         * @event staterestore
+         * Fires after the state of the component is restored.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. This is passed
+         * to <b><tt>applyState</tt></b>. By default, that simply copies property values into this
+         * Component. The method maybe overriden to provide custom state restoration.
+         */
+        'staterestore',
+        /**
+         * @event beforestatesave
+         * Fires before the state of the component is saved to the configured state provider. Return false to stop the save.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        'beforestatesave',
+        /**
+         * @event statesave
+         * Fires after the state of the component is saved to the configured state provider.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        '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 i = 0, len = this.plugins.length; i < len; i++){
+                this.plugins[i] = this.initPlugin(this.plugins[i]);
+            }
+        }else{
+            this.plugins = this.initPlugin(this.plugins);
+        }
+    }
+
+    if(this.stateful !== false){
+        this.initState(config);
+    }
+
+    if(this.applyTo){
+        this.applyToMarkup(this.applyTo);
+        delete this.applyTo;
+    }else if(this.renderTo){
+        this.render(this.renderTo);
+        delete this.renderTo;
+    }
+};
+
+// private
+Ext.Component.AUTO_ID = 1000;
+
+Ext.extend(Ext.Component, Ext.util.Observable, {
+	// Configs below are used for all Components when rendered by FormLayout.
+    /**
+     * @cfg {String} fieldLabel <p>The label text to display next to this Component (defaults to '').</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
+     * has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout manager (e.g.
+     * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>).</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelStyle <p>A CSS style specification string to apply directly to this field's
+     * label.  Defaults to the container's labelStyle value if set (e.g.,
+     * <tt>{@link Ext.layout.FormLayout#labelStyle}</tt> , or '').</p>
+     * <br><p><b>Note</b>: see the note for <code>{@link #clearCls}</code>.</p><br>
+     * <p>Also see <code>{@link #hideLabel}</code> and
+     * <code>{@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</code></p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name',
+        labelStyle: 'font-weight:bold;'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelSeparator <p>The separator to display after the text of each
+     * <tt>{@link #fieldLabel}</tt>.  This property may be configured at various levels.
+     * The order of precedence is:
+     * <div class="mdetail-params"><ul>
+     * <li>field / component level</li>
+     * <li>container level</li>
+     * <li>{@link Ext.layout.FormLayout#labelSeparator layout level} (defaults to colon <tt>':'</tt>)</li>
+     * </ul></div>
+     * To display no separator for this field's label specify empty string ''.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    layoutConfig: {
+        labelSeparator: '~'   // layout config has lowest priority (defaults to ':')
+    },
+    {@link Ext.layout.FormLayout#labelSeparator labelSeparator}: '>>',     // config at container level
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Field 1',
+        labelSeparator: '...' // field/component level config supersedes others
+    },{
+        xtype: 'textfield',
+        fieldLabel: 'Field 2' // labelSeparator will be '='
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideLabel <p><tt>true</tt> to completely hide the label element
+     * ({@link #fieldLabel label} and {@link #labelSeparator separator}). Defaults to <tt>false</tt>.
+     * By default, even if you do not specify a <tt>{@link #fieldLabel}</tt> the space will still be
+     * reserved so that the field will line up with other fields that do have labels.
+     * Setting this to <tt>true</tt> will cause the field to not reserve that space.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield'
+        hideLabel: true
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} clearCls <p>The CSS class used to to apply to the special clearing div rendered
+     * directly after each form field wrapper to provide field clearing (defaults to
+     * <tt>'x-form-clear-left'</tt>).</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container
+     * which has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout
+     * manager (e.g. {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) and either a
+     * <tt>{@link #fieldLabel}</tt> is specified or <tt>isFormField=true</tt> is specified.</p><br>
+     * <p>See {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} also.</p>
+     */
+    /**
+     * @cfg {String} itemCls <p>An additional CSS class to apply to the div wrapping the form item
+     * element of this field.  If supplied, <tt>itemCls</tt> at the <b>field</b> level will override
+     * the default <tt>itemCls</tt> supplied at the <b>container</b> level. The value specified for
+     * <tt>itemCls</tt> will be added to the default class (<tt>'x-form-item'</tt>).</p>
+     * <p>Since it is applied to the item wrapper (see
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}), it allows
+     * you to write standard CSS rules that can apply to the field, the label (if specified), or
+     * any other element within the markup for the field.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #fieldLabel}</tt>.</p><br>
+     * Example use:<pre><code>
+// Apply a style to the field's label:
+&lt;style>
+    .required .x-form-item-label {font-weight:bold;color:red;}
+&lt;/style>
+
+new Ext.FormPanel({
+	height: 100,
+	renderTo: Ext.getBody(),
+	items: [{
+		xtype: 'textfield',
+		fieldLabel: 'Name',
+		itemCls: 'required' //this label will be styled
+	},{
+		xtype: 'textfield',
+		fieldLabel: 'Favorite Color'
+	}]
+});
+</code></pre>
+     */
+
+	// Configs below are used for all Components when rendered by AnchorLayout.
+    /**
+     * @cfg {String} anchor <p><b>Note</b>: this config is only used when this Component is rendered
+     * by a Container which has been configured to use an <b>{@link Ext.layout.AnchorLayout AnchorLayout}</b>
+     * based layout manager, for example:<div class="mdetail-params"><ul>
+     * <li>{@link Ext.form.FormPanel}</li>
+     * <li>specifying <code>layout: 'anchor' // or 'form', or 'absolute'</code></li>
+     * </ul></div></p>
+     * <p>See {@link Ext.layout.AnchorLayout}.{@link Ext.layout.AnchorLayout#anchor anchor} also.</p>
+     */
+
+    /**
+     * @cfg {String} id
+     * <p>The <b>unique</b> id of this component (defaults to an {@link #getId auto-assigned id}).
+     * You should assign an id if you need to be able to access the component later and you do
+     * not have an object reference available (e.g., using {@link Ext}.{@link Ext#getCmp getCmp}).</p>
+     * <p>Note that this id will also be used as the element id for the containing HTML element
+     * that is rendered to the page for this component. This allows you to write id-based CSS
+     * rules to style the specific instance of this component uniquely, and also to select
+     * sub-elements using this component's id as the parent.</p>
+     * <p><b>Note</b>: to avoid complications imposed by a unique <tt>id</tt> also see
+     * <code>{@link #itemId}</code> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <code>{@link #ownerCt}</code>.</p>
+     */
+    /**
+     * @cfg {String} itemId
+     * <p>An <tt>itemId</tt> can be used as an alternative way to get a reference to a component
+     * when no object reference is available.  Instead of using an <code>{@link #id}</code> with
+     * {@link Ext}.{@link Ext#getCmp getCmp}, use <code>itemId</code> with
+     * {@link Ext.Container}.{@link Ext.Container#getComponent getComponent} which will retrieve
+     * <code>itemId</code>'s or <tt>{@link #id}</tt>'s. Since <code>itemId</code>'s are an index to the
+     * container's internal MixedCollection, the <code>itemId</code> is scoped locally to the container --
+     * avoiding potential conflicts with {@link Ext.ComponentMgr} which requires a <b>unique</b>
+     * <code>{@link #id}</code>.</p>
+     * <pre><code>
+var c = new Ext.Panel({ //
+    {@link Ext.BoxComponent#height height}: 300,
+    {@link #renderTo}: document.body,
+    {@link Ext.Container#layout layout}: 'auto',
+    {@link Ext.Container#items items}: [
+        {
+            itemId: 'p1',
+            {@link Ext.Panel#title title}: 'Panel 1',
+            {@link Ext.BoxComponent#height height}: 150
+        },
+        {
+            itemId: 'p2',
+            {@link Ext.Panel#title title}: 'Panel 2',
+            {@link Ext.BoxComponent#height height}: 150
+        }
+    ]
+})
+p1 = c.{@link Ext.Container#getComponent getComponent}('p1'); // not the same as {@link Ext#getCmp Ext.getCmp()}
+p2 = p1.{@link #ownerCt}.{@link Ext.Container#getComponent getComponent}('p2'); // reference via a sibling
+     * </code></pre>
+     * <p>Also see <tt>{@link #id}</tt> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <tt>{@link #ownerCt}</tt>.</p>
+     */
+    /**
+     * @cfg {String} xtype
+     * The registered <tt>xtype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a child item of a Container is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>xtype</tt> will be looked up at render time up to determine what
+     * type of child Component to create.<br><br>
+     * The predefined xtypes are listed {@link Ext.Component here}.
+     * <br><br>
+     * If you subclass Components to create your own Components, you may register
+     * them using {@link Ext.ComponentMgr#registerType} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} ptype
+     * The registered <tt>ptype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a Plugin is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>ptype</tt> will be looked up at render time up to determine what
+     * type of Plugin to create.<br><br>
+     * If you create your own Plugins, you may register them using
+     * {@link Ext.ComponentMgr#registerPlugin} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} cls
+     * An optional extra CSS class that will be added to this component's Element (defaults to '').  This can be
+     * useful for adding customized styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} overCls
+     * An optional extra CSS class that will be added to this component's Element when the mouse moves
+     * over the Element, and removed when the mouse moves out. (defaults to '').  This can be
+     * useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} style
+     * A custom style specification to be applied to this component's Element.  Should be a valid argument to
+     * {@link Ext.Element#applyStyles}.
+     * <pre><code>
+new Ext.Panel({
+    title: 'Some Title',
+    renderTo: Ext.getBody(),
+    width: 400, height: 300,
+    layout: 'form',
+    items: [{
+        xtype: 'textarea',
+        style: {
+            width: '95%',
+            marginBottom: '10px'
+        }
+    },
+        new Ext.Button({
+            text: 'Send',
+            minWidth: '100',
+            style: {
+                marginBottom: '10px'
+            }
+        })
+    ]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} ctCls
+     * <p>An optional extra CSS class that will be added to this component's container. This can be useful for
+     * adding customized styles to the container or any of its children using standard CSS rules.  See
+     * {@link Ext.layout.ContainerLayout}.{@link Ext.layout.ContainerLayout#extraCls extraCls} also.</p>
+     * <p><b>Note</b>: <tt>ctCls</tt> defaults to <tt>''</tt> except for the following class
+     * which assigns a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-layout-ct'</tt></li>
+     * </ul></div>
+     * To configure the above Class with an extra CSS class append to the default.  For example,
+     * for BoxLayout (Hbox and Vbox):<pre><code>
+     * ctCls: 'x-box-layout-ct custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this component disabled (default is false).
+     */
+    disabled : false,
+    /**
+     * @cfg {Boolean} hidden
+     * Render this component hidden (default is false). If <tt>true</tt>, the
+     * {@link #hide} method will be called internally.
+     */
+    hidden : false,
+    /**
+     * @cfg {Object/Array} plugins
+     * An object or array of objects that will provide custom functionality for this component.  The only
+     * requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.
+     * When a component is created, if any plugins are available, the component will call the init method on each
+     * plugin, passing a reference to itself.  Each plugin can then call methods or respond to events on the
+     * component as needed to provide its functionality.
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
+     * that is already present in the document that specifies some structural markup for this
+     * component.</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">When <tt>applyTo</tt> is used, constituent parts of the component can also be specified
+     * by id or CSS class name within the main element, and the component being created may attempt
+     * to create its subcomponents from that markup if applicable.</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * <div class="sub-desc">If applyTo is specified, any value passed for {@link #renderTo} will be ignored and the target
+     * element's parent node will automatically be used as the component's container.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Mixed} renderTo
+     * <p>Specify the id of the element, a DOM element or an existing Element that this component
+     * will be rendered into.</p><div><ul>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">Do <u>not</u> use this option if the Component is to be a child item of
+     * a {@link Ext.Container Container}. It is the responsibility of the
+     * {@link Ext.Container Container}'s {@link Ext.Container#layout layout manager}
+     * to render and manage its child items.</div>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * </ul></li>
+     * </ul></div>
+     * <p>See <tt>{@link #render}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} stateful
+     * <p>A flag which causes the Component to attempt to restore the state of
+     * internal properties from a saved state on startup. The component must have
+     * either a <code>{@link #stateId}</code> or <code>{@link #id}</code> assigned
+     * for state to be managed. Auto-generated ids are not guaranteed to be stable
+     * across page loads and cannot be relied upon to save and restore the same
+     * state for a component.<p>
+     * <p>For state saving to work, the state manager's provider must have been
+     * set to an implementation of {@link Ext.state.Provider} which overrides the
+     * {@link Ext.state.Provider#set set} and {@link Ext.state.Provider#get get}
+     * methods to save and recall name/value pairs. A built-in implementation,
+     * {@link Ext.state.CookieProvider} is available.</p>
+     * <p>To set the state provider for the current page:</p>
+     * <pre><code>
+Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
+    expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
+}));
+     * </code></pre>
+     * <p>A stateful Component attempts to save state when one of the events
+     * listed in the <code>{@link #stateEvents}</code> configuration fires.</p>
+     * <p>To save state, a stateful Component first serializes its state by
+     * calling <b><code>getState</code></b>. By default, this function does
+     * nothing. The developer must provide an implementation which returns an
+     * object hash which represents the Component's restorable state.</p>
+     * <p>The value yielded by getState is passed to {@link Ext.state.Manager#set}
+     * which uses the configured {@link Ext.state.Provider} to save the object
+     * keyed by the Component's <code>{@link stateId}</code>, or, if that is not
+     * specified, its <code>{@link #id}</code>.</p>
+     * <p>During construction, a stateful Component attempts to <i>restore</i>
+     * its state by calling {@link Ext.state.Manager#get} passing the
+     * <code>{@link #stateId}</code>, or, if that is not specified, the
+     * <code>{@link #id}</code>.</p>
+     * <p>The resulting object is passed to <b><code>applyState</code></b>.
+     * The default implementation of <code>applyState</code> simply copies
+     * properties into the object, but a developer may override this to support
+     * more behaviour.</p>
+     * <p>You can perform extra processing on state save and restore by attaching
+     * handlers to the {@link #beforestaterestore}, {@link #staterestore},
+     * {@link #beforestatesave} and {@link #statesave} events.</p>
+     */
+    /**
+     * @cfg {String} stateId
+     * The unique id for this component to use for state management purposes
+     * (defaults to the component id if one was set, otherwise null if the
+     * component is using a generated id).
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Array} stateEvents
+     * <p>An array of events that, when fired, should trigger this component to
+     * save its state (defaults to none). <code>stateEvents</code> may be any type
+     * of event supported by this component, including browser or custom events
+     * (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Mixed} autoEl
+     * <p>A tag name or {@link Ext.DomHelper DomHelper} spec used to create the {@link #getEl Element} which will
+     * encapsulate this Component.</p>
+     * <p>You do not normally need to specify this. For the base classes {@link Ext.Component}, {@link Ext.BoxComponent},
+     * and {@link Ext.Container}, this defaults to <b><tt>'div'</tt></b>. The more complex Ext classes use a more complex
+     * DOM structure created by their own onRender methods.</p>
+     * <p>This is intended to allow the developer to create application-specific utility Components encapsulated by
+     * different DOM elements. Example usage:</p><pre><code>
+{
+    xtype: 'box',
+    autoEl: {
+        tag: 'img',
+        src: 'http://www.example.com/example.jpg'
+    }
+}, {
+    xtype: 'box',
+    autoEl: {
+        tag: 'blockquote',
+        html: 'autoEl is cool!'
+    }
+}, {
+    xtype: 'container',
+    autoEl: 'ul',
+    cls: 'ux-unordered-list',
+    items: {
+        xtype: 'box',
+        autoEl: 'li',
+        html: 'First list item'
+    }
+}
+</code></pre>
+     */
+    autoEl : 'div',
+
+    /**
+     * @cfg {String} disabledClass
+     * CSS class added to the component when it is disabled (defaults to 'x-item-disabled').
+     */
+    disabledClass : 'x-item-disabled',
+    /**
+     * @cfg {Boolean} allowDomMove
+     * Whether the component can move the Dom node when rendering (defaults to true).
+     */
+    allowDomMove : true,
+    /**
+     * @cfg {Boolean} autoShow
+     * True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
+     * them on render (defaults to false).
+     */
+    autoShow : false,
+    /**
+     * @cfg {String} hideMode
+     * <p>How this component should be hidden. Supported values are <tt>'visibility'</tt>
+     * (css visibility), <tt>'offsets'</tt> (negative offset position) and <tt>'display'</tt>
+     * (css display).</p>
+     * <br><p><b>Note</b>: the default of <tt>'display'</tt> is generally preferred
+     * since items are automatically laid out when they are first shown (no sizing
+     * is done while hidden).</p>
+     */
+    hideMode : 'display',
+    /**
+     * @cfg {Boolean} hideParent
+     * True to hide and show the component's container when hide/show is called on the component, false to hide
+     * and show the component itself (defaults to false).  For example, this can be used as a shortcut for a hide
+     * button on a window by setting hide:true on the button when adding it to its parent container.
+     */
+    hideParent : false,
+    /**
+     * <p>The {@link Ext.Element} which encapsulates this Component. Read-only.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the <code>{@link #autoEl}</code> config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link Ext.util.Observable#listeners listeners}
+     * config for a suggestion, or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * <p>See also <tt>{@link #getEl getEl}</p>
+     * @type Ext.Element
+     * @property el
+     */
+    /**
+     * The component's owner {@link Ext.Container} (defaults to undefined, and is set automatically when
+     * the component is added to a container).  Read-only.
+     * <p><b>Note</b>: to access items within the container see <tt>{@link #itemId}</tt>.</p>
+     * @type Ext.Container
+     * @property ownerCt
+     */
+    /**
+     * True if this component is hidden. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component is disabled. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component has been rendered. Read-only.
+     * @type Boolean
+     * @property
+     */
+    rendered : false,
+
+    // private
+    ctype : 'Ext.Component',
+
+    // private
+    actionMode : 'el',
+
+    // private
+    getActionEl : function(){
+        return this[this.actionMode];
+    },
+
+    initPlugin : function(p){
+        if(p.ptype && !Ext.isFunction(p.init)){
+            p = Ext.ComponentMgr.createPlugin(p);
+        }else if(Ext.isString(p)){
+            p = Ext.ComponentMgr.createPlugin({
+                ptype: p
+            });
+        }
+        p.init(this);
+        return p;
+    },
+
+    /* // protected
+     * Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default).
+     * <pre><code>
+// Traditional constructor:
+Ext.Foo = function(config){
+    // call superclass constructor:
+    Ext.Foo.superclass.constructor.call(this, config);
+
+    this.addEvents({
+        // add events
+    });
+};
+Ext.extend(Ext.Foo, Ext.Bar, {
+   // class body
+}
+
+// initComponent replaces the constructor:
+Ext.Foo = Ext.extend(Ext.Bar, {
+    initComponent : function(){
+        // call superclass initComponent
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents({
+            // add events
+        });
+    }
+}
+</code></pre>
+     */
+    initComponent : Ext.emptyFn,
+
+    /**
+     * <p>Render this Component into the passed HTML element.</p>
+     * <p><b>If you are using a {@link Ext.Container Container} object to house this Component, then
+     * do not use the render method.</b></p>
+     * <p>A Container's child Components are rendered by that Container's
+     * {@link Ext.Container#layout layout} manager when the Container is first rendered.</p>
+     * <p>Certain layout managers allow dynamic addition of child components. Those that do
+     * include {@link Ext.layout.CardLayout}, {@link Ext.layout.AnchorLayout},
+     * {@link Ext.layout.FormLayout}, {@link Ext.layout.TableLayout}.</p>
+     * <p>If the Container is already rendered when a new child Component is added, you may need to call
+     * the Container's {@link Ext.Container#doLayout doLayout} to refresh the view which causes any
+     * unrendered child Components to be rendered. This is required so that you can add multiple
+     * child components if needed while only refreshing the layout once.</p>
+     * <p>When creating complex UIs, it is important to remember that sizing and positioning
+     * of child items is the responsibility of the Container's {@link Ext.Container#layout layout} manager.
+     * If you expect child items to be sized in response to user interactions, you must
+     * configure the Container with a layout manager which creates and manages the type of layout you
+     * have in mind.</p>
+     * <p><b>Omitting the Container's {@link Ext.Container#layout layout} config means that a basic
+     * layout manager is used which does nothing but render child components sequentially into the
+     * Container. No sizing or positioning will be performed in this situation.</b></p>
+     * @param {Element/HTMLElement/String} container (optional) The element this Component should be
+     * rendered into. If it is being created from existing markup, this should be omitted.
+     * @param {String/Number} position (optional) The element ID or DOM node index within the container <b>before</b>
+     * which this component will be inserted (defaults to appending to the end of the container)
+     */
+    render : function(container, position){
+        if(!this.rendered && this.fireEvent('beforerender', this) !== false){
+            if(!container && this.el){
+                this.el = Ext.get(this.el);
+                container = this.el.dom.parentNode;
+                this.allowDomMove = false;
+            }
+            this.container = Ext.get(container);
+            if(this.ctCls){
+                this.container.addClass(this.ctCls);
+            }
+            this.rendered = true;
+            if(position !== undefined){
+                if(Ext.isNumber(position)){
+                    position = this.container.dom.childNodes[position];
+                }else{
+                    position = Ext.getDom(position);
+                }
+            }
+            this.onRender(this.container, position || 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;
+            }
+            if(this.overCls){
+                this.el.addClassOnOver(this.overCls);
+            }
+            this.fireEvent('render', this);
+            this.afterRender(this.container);
+            if(this.hidden){
+                // call this so we don't fire initial hide events.
+                this.doHide();
+            }
+            if(this.disabled){
+                // pass silent so the event doesn't fire the first time.
+                this.disable(true);
+            }
+
+            if(this.stateful !== false){
+                this.initStateEvents();
+            }
+            this.initRef();
+            this.fireEvent('afterrender', this);
+        }
+        return this;
+    },
+
+    initRef : function(){
+        /**
+         * @cfg {String} ref
+         * <p>A path specification, relative to the Component's {@link #ownerCt} specifying into which
+         * ancestor Container to place a named reference to this Component.</p>
+         * <p>The ancestor axis can be traversed by using '/' characters in the path.
+         * For example, to put a reference to a Toolbar Button into <i>the Panel which owns the Toolbar</i>:</p><pre><code>
+var myGrid = new Ext.grid.EditorGridPanel({
+    title: 'My EditorGridPanel',
+    store: myStore,
+    colModel: myColModel,
+    tbar: [{
+        text: 'Save',
+        handler: saveChanges,
+        disabled: true,
+        ref: '../saveButton'
+    }],
+    listeners: {
+        afteredit: function() {
+//          The button reference is in the GridPanel
+            myGrid.saveButton.enable();
+        }
+    }
+});
+</code></pre>
+         * <p>In the code above, if the ref had been <code>'saveButton'</code> the reference would
+         * have been placed into the Toolbar. Each '/' in the ref moves up one level from the
+         * Component's {@link #ownerCt}.</p>
+         */
+        if(this.ref){
+            var levels = this.ref.split('/');
+            var last = levels.length, i = 0;
+            var t = this;
+            while(i < last){
+                if(t.ownerCt){
+                    t = t.ownerCt;
+                }
+                i++;
+            }
+            t[levels[--i]] = this;
+        }
+    },
+
+    // private
+    initState : function(config){
+        if(Ext.state.Manager){
+            var id = this.getStateId();
+            if(id){
+                var state = Ext.state.Manager.get(id);
+                if(state){
+                    if(this.fireEvent('beforestaterestore', this, state) !== false){
+                        this.applyState(state);
+                        this.fireEvent('staterestore', this, state);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getStateId : function(){
+        return this.stateId || ((this.id.indexOf('ext-comp-') == 0 || this.id.indexOf('ext-gen') == 0) ? null : this.id);
+    },
+
+    // private
+    initStateEvents : function(){
+        if(this.stateEvents){
+            for(var i = 0, e; e = this.stateEvents[i]; i++){
+                this.on(e, this.saveState, this, {delay:100});
+            }
+        }
+    },
+
+    // private
+    applyState : function(state, config){
+        if(state){
+            Ext.apply(this, state);
+        }
+    },
+
+    // private
+    getState : function(){
+        return null;
+    },
+
+    // private
+    saveState : function(){
+        if(Ext.state.Manager && this.stateful !== false){
+            var id = this.getStateId();
+            if(id){
+                var state = this.getState();
+                if(this.fireEvent('beforestatesave', this, state) !== false){
+                    Ext.state.Manager.set(id, state);
+                    this.fireEvent('statesave', this, state);
+                }
+            }
+        }
+    },
+
+    /**
+     * Apply this component to existing markup that is valid. With this function, no call to render() is required.
+     * @param {String/HTMLElement} el
+     */
+    applyToMarkup : function(el){
+        this.allowDomMove = false;
+        this.el = Ext.get(el);
+        this.render(this.el.dom.parentNode);
+    },
+
+    /**
+     * Adds a CSS class to the component's underlying element.
+     * @param {string} cls The CSS class name to add
+     * @return {Ext.Component} this
+     */
+    addClass : function(cls){
+        if(this.el){
+            this.el.addClass(cls);
+        }else{
+            this.cls = this.cls ? this.cls + ' ' + cls : cls;
+        }
+        return this;
+    },
+
+    /**
+     * Removes a CSS class from the component's underlying element.
+     * @param {string} cls The CSS class name to remove
+     * @return {Ext.Component} this
+     */
+    removeClass : function(cls){
+        if(this.el){
+            this.el.removeClass(cls);
+        }else if(this.cls){
+            this.cls = this.cls.split(' ').remove(cls).join(' ');
+        }
+        return this;
+    },
+
+    // private
+    // default function is not really useful
+    onRender : function(ct, position){
+        if(!this.el && this.autoEl){
+            if(Ext.isString(this.autoEl)){
+                this.el = document.createElement(this.autoEl);
+            }else{
+                var div = document.createElement('div');
+                Ext.DomHelper.overwrite(div, this.autoEl);
+                this.el = div.firstChild;
+            }
+            if (!this.el.id) {
+                this.el.id = this.getId();
+            }
+        }
+        if(this.el){
+            this.el = Ext.get(this.el);
+            if(this.allowDomMove !== false){
+                ct.dom.insertBefore(this.el.dom, position);
+            }
+        }
+    },
+
+    // private
+    getAutoCreate : function(){
+        var cfg = Ext.isObject(this.autoCreate) ?
+                      this.autoCreate : Ext.apply({}, this.defaultAutoCreate);
+        if(this.id && !cfg.id){
+            cfg.id = this.id;
+        }
+        return cfg;
+    },
+
+    // private
+    afterRender : Ext.emptyFn,
+
+    /**
+     * Destroys this component by purging any event listeners, removing the component's element from the DOM,
+     * removing the component from its {@link Ext.Container} (if applicable) and unregistering it from
+     * {@link Ext.ComponentMgr}.  Destruction is generally handled automatically by the framework and this method
+     * should usually not need to be called directly.
+     *
+     */
+    destroy : function(){
+        if(this.fireEvent('beforedestroy', this) !== false){
+            this.beforeDestroy();
+            if(this.rendered){
+                this.el.removeAllListeners();
+                this.el.remove();
+                if(this.actionMode == 'container' || this.removeMode == 'container'){
+                    this.container.remove();
+                }
+            }
+            this.onDestroy();
+            Ext.ComponentMgr.unregister(this);
+            this.fireEvent('destroy', this);
+            this.purgeListeners();
+        }
+    },
+
+    // private
+    beforeDestroy : Ext.emptyFn,
+
+    // private
+    onDestroy  : Ext.emptyFn,
+
+    /**
+     * <p>Returns the {@link Ext.Element} which encapsulates this Component.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the {@link #autoEl} config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link #listeners} config for a suggestion,
+     * or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * @return {Ext.Element} The Element which encapsulates this Component.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the <code>id</code> of this component or automatically generates and
+     * returns an <code>id</code> if an <code>id</code> is not defined yet:<pre><code>
+     * 'ext-comp-' + (++Ext.Component.AUTO_ID)
+     * </code></pre>
+     * @return {String} id
+     */
+    getId : function(){
+        return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID));
+    },
+
+    /**
+     * Returns the <code>{@link #itemId}</code> of this component.  If an
+     * <code>{@link #itemId}</code> was not assigned through configuration the
+     * <code>id</code> is returned using <code>{@link #getId}</code>.
+     * @return {String}
+     */
+    getItemId : function(){
+        return this.itemId || this.getId();
+    },
+
+    /**
+     * Try to focus this component.
+     * @param {Boolean} selectText (optional) If applicable, true to also select the text in this component
+     * @param {Boolean/Number} delay (optional) Delay the focus this number of milliseconds (true for 10 milliseconds)
+     * @return {Ext.Component} this
+     */
+    focus : function(selectText, delay){
+        if(delay){
+            this.focus.defer(Ext.isNumber(delay) ? delay : 10, this, [selectText, false]);
+            return;
+        }
+        if(this.rendered){
+            this.el.focus();
+            if(selectText === true){
+                this.el.dom.select();
+            }
+        }
+        return this;
+    },
+
+    // private
+    blur : function(){
+        if(this.rendered){
+            this.el.blur();
+        }
+        return this;
+    },
+
+    /**
+     * Disable this component and fire the 'disable' event.
+     * @return {Ext.Component} this
+     */
+    disable : function(/* private */ silent){
+        if(this.rendered){
+            this.onDisable();
+        }
+        this.disabled = true;
+        if(silent !== true){
+            this.fireEvent('disable', this);
+        }
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        this.getActionEl().addClass(this.disabledClass);
+        this.el.dom.disabled = true;
+    },
+
+    /**
+     * Enable this component and fire the 'enable' event.
+     * @return {Ext.Component} this
+     */
+    enable : function(){
+        if(this.rendered){
+            this.onEnable();
+        }
+        this.disabled = false;
+        this.fireEvent('enable', this);
+        return this;
+    },
+
+    // private
+    onEnable : function(){
+        this.getActionEl().removeClass(this.disabledClass);
+        this.el.dom.disabled = false;
+    },
+
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     * @return {Ext.Component} this
+     */
+    setDisabled : function(disabled){
+        return this[disabled ? 'disable' : 'enable']();
+    },
+
+    /**
+     * Show this component.  Listen to the '{@link #beforeshow}' event and return
+     * <tt>false</tt> to cancel showing the component.  Fires the '{@link #show}'
+     * event after showing the component.
+     * @return {Ext.Component} this
+     */
+    show : function(){
+        if(this.fireEvent('beforeshow', this) !== false){
+            this.hidden = false;
+            if(this.autoRender){
+                this.render(Ext.isBoolean(this.autoRender) ? Ext.getBody() : this.autoRender);
+            }
+            if(this.rendered){
+                this.onShow();
+            }
+            this.fireEvent('show', this);
+        }
+        return this;
+    },
+
+    // private
+    onShow : function(){
+        this.getVisibiltyEl().removeClass('x-hide-' + this.hideMode);
+    },
+
+    /**
+     * Hide this component.  Listen to the '{@link #beforehide}' event and return
+     * <tt>false</tt> to cancel hiding the component.  Fires the '{@link #hide}'
+     * event after hiding the component. Note this method is called internally if
+     * the component is configured to be <code>{@link #hidden}</code>.
+     * @return {Ext.Component} this
+     */
+    hide : function(){
+        if(this.fireEvent('beforehide', this) !== false){
+            this.doHide();
+            this.fireEvent('hide', this);
+        }
+        return this;
+    },
+
+    // private
+    doHide: function(){
+        this.hidden = true;
+        if(this.rendered){
+            this.onHide();
+        }
+    },
+
+    // private
+    onHide : function(){
+        this.getVisibiltyEl().addClass('x-hide-' + this.hideMode);
+    },
+
+    // private
+    getVisibiltyEl : function(){
+        return this.hideParent ? this.container : this.getActionEl();
+    },
+
+    /**
+     * Convenience function to hide or show this component by boolean.
+     * @param {Boolean} visible True to show, false to hide
+     * @return {Ext.Component} this
+     */
+    setVisible : function(visible){
+        return this[visible ? 'show' : 'hide']();
+    },
+
+    /**
+     * Returns true if this component is visible.
+     * @return {Boolean} True if this component is visible, false otherwise.
+     */
+    isVisible : function(){
+        return this.rendered && this.getVisibiltyEl().isVisible();
+    },
+
+    /**
+     * Clone the current component using the original config values passed into this instance by default.
+     * @param {Object} overrides A new config containing any properties to override in the cloned version.
+     * An id property can be passed on this object, otherwise one will be generated to avoid duplicates.
+     * @return {Ext.Component} clone The cloned copy of this component
+     */
+    cloneConfig : function(overrides){
+        overrides = overrides || {};
+        var id = overrides.id || Ext.id();
+        var cfg = Ext.applyIf(overrides, this.initialConfig);
+        cfg.id = id; // prevent dup id
+        return new this.constructor(cfg);
+    },
+
+    /**
+     * Gets the xtype for this component as registered with {@link Ext.ComponentMgr}. For a list of all
+     * available xtypes, see the {@link Ext.Component} header. Example usage:
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXType());  // alerts 'textfield'
+</code></pre>
+     * @return {String} The xtype
+     */
+    getXType : function(){
+        return this.constructor.xtype;
+    },
+
+    /**
+     * <p>Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
+     * from the xtype (default) or whether it is directly of the xtype specified (shallow = true).</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>For a list of all available xtypes, see the {@link Ext.Component} header.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+var isText = t.isXType('textfield');        // true
+var isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
+</code></pre>
+     * @param {String} xtype The xtype to check for this Component
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Boolean} True if this component descends from the specified xtype, false otherwise.
+     */
+    isXType : function(xtype, shallow){
+        //assume a string by default
+        if (Ext.isFunction(xtype)){
+            xtype = xtype.xtype; //handle being passed the class, e.g. Ext.Component
+        }else if (Ext.isObject(xtype)){
+            xtype = xtype.constructor.xtype; //handle being passed an instance
+        }
+
+        return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype;
+    },
+
+    /**
+     * <p>Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all
+     * available xtypes, see the {@link Ext.Component} header.</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXTypes());  // alerts 'component/box/field/textfield'
+</code></pre>
+     * @return {String} The xtype hierarchy string
+     */
+    getXTypes : function(){
+        var tc = this.constructor;
+        if(!tc.xtypes){
+            var c = [], sc = this;
+            while(sc && sc.constructor.xtype){
+                c.unshift(sc.constructor.xtype);
+                sc = sc.constructor.superclass;
+            }
+            tc.xtypeChain = c;
+            tc.xtypes = c.join('/');
+        }
+        return tc.xtypes;
+    },
+
+    /**
+     * Find a container above this component at any level by a custom function. If the passed function returns
+     * true, the container will be returned.
+     * @param {Function} fn The custom function to call with the arguments (container, this component).
+     * @return {Ext.Container} The first Container for which the custom function returns true
+     */
+    findParentBy : function(fn) {
+        for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt);
+        return p || null;
+    },
+
+    /**
+     * Find a container above this component at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @return {Ext.Container} The first Container which matches the given xtype or class
+     */
+    findParentByType : function(xtype) {
+        return Ext.isFunction(xtype) ?
+            this.findParentBy(function(p){
+                return p.constructor === xtype;
+            }) :
+            this.findParentBy(function(p){
+                return p.constructor.xtype === xtype;
+            });
+    },
+
+    getDomPositionEl : function(){
+        return this.getPositionEl ? this.getPositionEl() : this.getEl();
+    },
+
+    // private
+    purgeListeners : function(){
+        Ext.Component.superclass.purgeListeners.call(this);
+        if(this.mons){
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+    },
+
+    // private
+    clearMons : function(){
+        Ext.each(this.mons, function(m){
+            m.item.un(m.ename, m.fn, m.scope);
+        }, this);
+        this.mons = [];
+    },
+
+    // internal function for auto removal of assigned event handlers on destruction
+    mon : function(item, ename, fn, scope, opt){
+        if(!this.mons){
+            this.mons = [];
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+
+        if(Ext.isObject(ename)){
+        	var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+            var o = ename;
+            for(var e in o){
+                if(propRe.test(e)){
+                    continue;
+                }
+                if(Ext.isFunction(o[e])){
+                    // shared options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e], o.scope, o);
+                }else{
+                    // individual options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e]);
+                }
+            }
+            return;
+        }
+
+
+        this.mons.push({
+            item: item, ename: ename, fn: fn, scope: scope
+        });
+        item.on(ename, fn, scope, opt);
+    },
+
+    // protected, opposite of mon
+    mun : function(item, ename, fn, scope){
+        var found, mon;
+        for(var i = 0, len = this.mons.length; i < len; ++i){
+            mon = this.mons[i];
+            if(item === mon.item && ename == mon.ename && fn === mon.fn && scope === mon.scope){
+                this.mons.splice(i, 1);
+                item.un(ename, fn, scope);
+                found = true;
+                break;
+            }
+        }
+        return found;
+    },
+
+    /**
+     * Returns the next component in the owning container
+     * @return Ext.Component
+     */
+    nextSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index != -1 && index+1 < this.ownerCt.items.getCount()){
+                return this.ownerCt.items.itemAt(index+1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Returns the previous component in the owning container
+     * @return Ext.Component
+     */
+    previousSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index > 0){
+                return this.ownerCt.items.itemAt(index-1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy.
+     * @return {Ext.Container} the Container which owns this Component.
+     */
+    getBubbleTarget : function(){
+        return this.ownerCt;
+    }
+});
+
+Ext.reg('component', Ext.Component);
+/**
+ * @class Ext.Action
+ * <p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
+ * can be usefully shared among multiple components.  Actions let you share handlers, configuration options and UI
+ * updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button}
+ * and {@link Ext.menu.Menu} components).</p>
+ * <p>Aside from supporting the config object interface, any component that needs to use Actions must also support
+ * the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),
+ * setDisabled(boolean), setVisible(boolean) and setHandler(function).</p>
+ * Example usage:<br>
+ * <pre><code>
+// Define the shared action.  Each component below will have the same
+// display text and icon, and will display the same message on click.
+var action = new Ext.Action({
+    {@link #text}: 'Do something',
+    {@link #handler}: function(){
+        Ext.Msg.alert('Click', 'You did something.');
+    },
+    {@link #iconCls}: 'do-something',
+    {@link #itemId}: 'myAction'
+});
+
+var panel = new Ext.Panel({
+    title: 'Actions',
+    width: 500,
+    height: 300,
+    tbar: [
+        // Add the action directly to a toolbar as a menu button
+        action,
+        {
+            text: 'Action Menu',
+            // Add the action to a menu as a text item
+            menu: [action]
+        }
+    ],
+    items: [
+        // Add the action to the panel body as a standard button
+        new Ext.Button(action)
+    ],
+    renderTo: Ext.getBody()
+});
+
+// Change the text for all components using the action
+action.setText('Something else');
+
+// Reference an action through a container using the itemId
+var btn = panel.getComponent('myAction');
+var aRef = btn.baseAction;
+aRef.setText('New text');
+</code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.Action = function(config){
+    this.initialConfig = config;
+    this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
+    this.items = [];
+}
+
+Ext.Action.prototype = {
+    /**
+     * @cfg {String} text The text to set for all components using this action (defaults to '').
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon for
+     * all components using this action (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'do-something'
+
+// css class that specifies background image to be used as the icon image:
+.do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} disabled True to disable all components using this action, false to enable them (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} hidden True to hide all components using this action, false to show them (defaults to false).
+     */
+    /**
+     * @cfg {Function} handler The function that will be invoked by each component tied to this action
+     * when the component's primary event is triggered (defaults to undefined).
+     */
+    /**
+     * @cfg {String} itemId
+     * See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.
+     */
+    /**
+     * @cfg {Object} scope The scope in which the {@link #handler} function will execute.
+     */
+
+    // private
+    isAction : true,
+
+    /**
+     * Sets the text to be displayed by all components using this action.
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.initialConfig.text = text;
+        this.callEach('setText', [text]);
+    },
+
+    /**
+     * Gets the text currently displayed by all components using this action.
+     */
+    getText : function(){
+        return this.initialConfig.text;
+    },
+
+    /**
+     * Sets the icon CSS class for all components using this action.  The class should supply
+     * a background image that will be used as the icon image.
+     * @param {String} cls The CSS class supplying the icon image
+     */
+    setIconClass : function(cls){
+        this.initialConfig.iconCls = cls;
+        this.callEach('setIconClass', [cls]);
+    },
+
+    /**
+     * Gets the icon CSS class currently used by all components using this action.
+     */
+    getIconClass : function(){
+        return this.initialConfig.iconCls;
+    },
+
+    /**
+     * Sets the disabled state of all components using this action.  Shortcut method
+     * for {@link #enable} and {@link #disable}.
+     * @param {Boolean} disabled True to disable the component, false to enable it
+     */
+    setDisabled : function(v){
+        this.initialConfig.disabled = v;
+        this.callEach('setDisabled', [v]);
+    },
+
+    /**
+     * Enables all components using this action.
+     */
+    enable : function(){
+        this.setDisabled(false);
+    },
+
+    /**
+     * Disables all components using this action.
+     */
+    disable : function(){
+        this.setDisabled(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently disabled, else returns false.  
+     */
+    isDisabled : function(){
+        return this.initialConfig.disabled;
+    },
+
+    /**
+     * Sets the hidden state of all components using this action.  Shortcut method
+     * for <code>{@link #hide}</code> and <code>{@link #show}</code>.
+     * @param {Boolean} hidden True to hide the component, false to show it
+     */
+    setHidden : function(v){
+        this.initialConfig.hidden = v;
+        this.callEach('setVisible', [!v]);
+    },
+
+    /**
+     * Shows all components using this action.
+     */
+    show : function(){
+        this.setHidden(false);
+    },
+
+    /**
+     * Hides all components using this action.
+     */
+    hide : function(){
+        this.setHidden(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently hidden, else returns false.  
+     */
+    isHidden : function(){
+        return this.initialConfig.hidden;
+    },
+
+    /**
+     * Sets the function that will be called by each component using this action when its primary event is triggered.
+     * @param {Function} fn The function that will be invoked by the action's components.  The function
+     * will be called with no arguments.
+     * @param {Object} scope The scope in which the function will execute
+     */
+    setHandler : function(fn, scope){
+        this.initialConfig.handler = fn;
+        this.initialConfig.scope = scope;
+        this.callEach('setHandler', [fn, scope]);
+    },
+
+    /**
+     * Executes the specified function once for each component currently tied to this action.  The function passed
+     * in should accept a single argument that will be an object that supports the basic Action config/method interface.
+     * @param {Function} fn The function to execute for each component
+     * @param {Object} scope The scope in which the function will execute
+     */
+    each : function(fn, scope){
+        Ext.each(this.items, fn, scope);
+    },
+
+    // private
+    callEach : function(fnName, args){
+        var cs = this.items;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i][fnName].apply(cs[i], args);
+        }
+    },
+
+    // private
+    addComponent : function(comp){
+        this.items.push(comp);
+        comp.on('destroy', this.removeComponent, this);
+    },
+
+    // private
+    removeComponent : function(comp){
+        this.items.remove(comp);
+    },
+
+    /**
+     * Executes this action manually using the handler function specified in the original config object
+     * or the handler function set with <code>{@link #setHandler}</code>.  Any arguments passed to this
+     * function will be passed on to the handler function.
+     * @param {Mixed} arg1 (optional) Variable number of arguments passed to the handler function
+     * @param {Mixed} arg2 (optional)
+     * @param {Mixed} etc... (optional)
+     */
+    execute : function(){
+        this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
+    }
+};
+/**
+ * @class Ext.Layer
+ * @extends Ext.Element
+ * An extended {@link Ext.Element} object that supports a shadow and shim, constrain to viewport and
+ * automatic maintaining of shadow/shim positions.
+ * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true)
+ * @cfg {String/Boolean} shadow True to automatically create an {@link Ext.Shadow}, or a string indicating the
+ * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false)
+ * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: 'div', cls: 'x-layer'}).
+ * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true)
+ * @cfg {String} cls CSS class to add to the element
+ * @cfg {Number} zindex Starting z-index (defaults to 11000)
+ * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 4)
+ * @cfg {Boolean} useDisplay
+ * Defaults to use css offsets to hide the Layer. Specify <tt>true</tt>
+ * to use css style <tt>'display:none;'</tt> to hide the Layer.
+ * @constructor
+ * @param {Object} config An object with config options.
+ * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it.
+ */
+(function(){
+Ext.Layer = function(config, existingEl){
+    config = config || {};
+    var dh = Ext.DomHelper;
+    var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body;
+    if(existingEl){
+        this.dom = Ext.getDom(existingEl);
+    }
+    if(!this.dom){
+        var o = config.dh || {tag: 'div', cls: 'x-layer'};
+        this.dom = dh.append(pel, o);
+    }
+    if(config.cls){
+        this.addClass(config.cls);
+    }
+    this.constrain = config.constrain !== false;
+    this.setVisibilityMode(Ext.Element.VISIBILITY);
+    if(config.id){
+        this.id = this.dom.id = config.id;
+    }else{
+        this.id = Ext.id(this.dom);
+    }
+    this.zindex = config.zindex || this.getZIndex();
+    this.position('absolute', this.zindex);
+    if(config.shadow){
+        this.shadowOffset = config.shadowOffset || 4;
+        this.shadow = new Ext.Shadow({
+            offset : this.shadowOffset,
+            mode : config.shadow
+        });
+    }else{
+        this.shadowOffset = 0;
+    }
+    this.useShim = config.shim !== false && Ext.useShims;
+    this.useDisplay = config.useDisplay;
+    this.hide();
+};
+
+var supr = Ext.Element.prototype;
+
+// shims are shared among layer to keep from having 100 iframes
+var shims = [];
+
+Ext.extend(Ext.Layer, Ext.Element, {
+
+    getZIndex : function(){
+        return this.zindex || parseInt((this.getShim() || this).getStyle('z-index'), 10) || 11000;
+    },
+
+    getShim : function(){
+        if(!this.useShim){
+            return null;
+        }
+        if(this.shim){
+            return this.shim;
+        }
+        var shim = shims.shift();
+        if(!shim){
+            shim = this.createShim();
+            shim.enableDisplayMode('block');
+            shim.dom.style.display = 'none';
+            shim.dom.style.visibility = 'visible';
+        }
+        var pn = this.dom.parentNode;
+        if(shim.dom.parentNode != pn){
+            pn.insertBefore(shim.dom, this.dom);
+        }
+        shim.setStyle('z-index', this.getZIndex()-2);
+        this.shim = shim;
+        return shim;
+    },
+
+    hideShim : function(){
+        if(this.shim){
+            this.shim.setDisplayed(false);
+            shims.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(show){
+        if(this.shadow){
+            this.shadowDisabled = false;
+            this.shadowOffset = this.lastShadowOffset;
+            delete this.lastShadowOffset;
+            if(show){
+                this.sync(true);
+            }
+        }
+    },
+
+    // private
+    // this code can execute repeatedly in milliseconds (i.e. during a drag) so
+    // code size was sacrificed for effeciency (e.g. no getBox/setBox, no XY calls)
+    sync : function(doShow){
+        var sw = this.shadow;
+        if(!this.updating && this.isVisible() && (sw || this.useShim)){
+            var sh = this.getShim();
+
+            var w = this.getWidth(),
+                h = this.getHeight();
+
+            var l = this.getLeft(true),
+                t = this.getTop(true);
+
+            if(sw && !this.shadowDisabled){
+                if(doShow && !sw.isVisible()){
+                    sw.show(this);
+                }else{
+                    sw.realign(l, t, w, h);
+                }
+                if(sh){
+                    if(doShow){
+                       sh.show();
+                    }
+                    // fit the shim behind the shadow, so it is shimmed too
+                    var a = sw.adjusts, s = sh.dom.style;
+                    s.left = (Math.min(l, l+a.l))+'px';
+                    s.top = (Math.min(t, t+a.t))+'px';
+                    s.width = (w+a.w)+'px';
+                    s.height = (h+a.h)+'px';
+                }
+            }else if(sh){
+                if(doShow){
+                   sh.show();
+                }
+                sh.setSize(w, h);
+                sh.setLeftTop(l, t);
+            }
+
+        }
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    beginUpdate : function(){
+        this.updating = true;
+    },
+
+    // private
+    endUpdate : function(){
+        this.updating = false;
+        this.sync(true);
+    },
+
+    // private
+    hideUnders : function(negOffset){
+        if(this.shadow){
+            this.shadow.hide();
+        }
+        this.hideShim();
+    },
+
+    // private
+    constrainXY : function(){
+        if(this.constrain){
+            var vw = Ext.lib.Dom.getViewWidth(),
+                vh = Ext.lib.Dom.getViewHeight();
+            var s = Ext.getDoc().getScroll();
+
+            var xy = this.getXY();
+            var x = xy[0], y = xy[1];
+            var so = this.shadowOffset;
+            var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so;
+            // only move it if it needs it
+            var moved = false;
+            // first validate right/bottom
+            if((x + w) > vw+s.left){
+                x = vw - w - so;
+                moved = true;
+            }
+            if((y + h) > vh+s.top){
+                y = vh - h - so;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < s.left){
+                x = s.left;
+                moved = true;
+            }
+            if(y < s.top){
+                y = s.top;
+                moved = true;
+            }
+            if(moved){
+                if(this.avoidY){
+                    var ay = this.avoidY;
+                    if(y <= ay && (y+h) >= ay){
+                        y = ay-h-5;
+                    }
+                }
+                xy = [x, y];
+                this.storeXY(xy);
+                supr.setXY.call(this, xy);
+                this.sync();
+            }
+        }
+        return this;
+    },
+
+    isVisible : function(){
+        return this.visible;
+    },
+
+    // private
+    showAction : function(){
+        this.visible = true; // track visibility to prevent getStyle calls
+        if(this.useDisplay === true){
+            this.setDisplayed('');
+        }else if(this.lastXY){
+            supr.setXY.call(this, this.lastXY);
+        }else if(this.lastLT){
+            supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]);
+        }
+    },
+
+    // private
+    hideAction : function(){
+        this.visible = false;
+        if(this.useDisplay === true){
+            this.setDisplayed(false);
+        }else{
+            this.setLeftTop(-10000,-10000);
+        }
+    },
+
+    // overridden Element method
+    setVisible : function(v, a, d, c, e){
+        if(v){
+            this.showAction();
+        }
+        if(a && v){
+            var cb = function(){
+                this.sync(true);
+                if(c){
+                    c();
+                }
+            }.createDelegate(this);
+            supr.setVisible.call(this, true, true, d, cb, e);
+        }else{
+            if(!v){
+                this.hideUnders(true);
+            }
+            var cb = c;
+            if(a){
+                cb = function(){
+                    this.hideAction();
+                    if(c){
+                        c();
+                    }
+                }.createDelegate(this);
+            }
+            supr.setVisible.call(this, v, a, d, cb, e);
+            if(v){
+                this.sync(true);
+            }else if(!a){
+                this.hideAction();
+            }
+        }
+        return this;
+    },
+
+    storeXY : function(xy){
+        delete this.lastLT;
+        this.lastXY = xy;
+    },
+
+    storeLeftTop : function(left, top){
+        delete this.lastXY;
+        this.lastLT = [left, top];
+    },
+
+    // private
+    beforeFx : function(){
+        this.beforeAction();
+        return Ext.Layer.superclass.beforeFx.apply(this, arguments);
+    },
+
+    // private
+    afterFx : function(){
+        Ext.Layer.superclass.afterFx.apply(this, arguments);
+        this.sync(this.isVisible());
+    },
+
+    // private
+    beforeAction : function(){
+        if(!this.updating && this.shadow){
+            this.shadow.hide();
+        }
+    },
+
+    // overridden Element method
+    setLeft : function(left){
+        this.storeLeftTop(left, this.getTop(true));
+        supr.setLeft.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setTop : function(top){
+        this.storeLeftTop(this.getLeft(true), top);
+        supr.setTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setLeftTop : function(left, top){
+        this.storeLeftTop(left, top);
+        supr.setLeftTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setXY : function(xy, a, d, c, e){
+        this.fixDisplay();
+        this.beforeAction();
+        this.storeXY(xy);
+        var cb = this.createCB(c);
+        supr.setXY.call(this, xy, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // private
+    createCB : function(c){
+        var el = this;
+        return function(){
+            el.constrainXY();
+            el.sync(true);
+            if(c){
+                c();
+            }
+        };
+    },
+
+    // overridden Element method
+    setX : function(x, a, d, c, e){
+        this.setXY([x, this.getY()], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setY : function(y, a, d, c, e){
+        this.setXY([this.getX(), y], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setSize : function(w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setSize.call(this, w, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setWidth : function(w, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setWidth.call(this, w, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setHeight : function(h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setHeight.call(this, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setBounds : function(x, y, w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        if(!a){
+            this.storeXY([x, y]);
+            supr.setXY.call(this, [x, y]);
+            supr.setSize.call(this, w, h, a, d, cb, e);
+            cb();
+        }else{
+            supr.setBounds.call(this, x, y, w, h, a, d, cb, e);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically
+     * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow
+     * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index).
+     * @param {Number} zindex The new z-index to set
+     * @return {this} The Layer
+     */
+    setZIndex : function(zindex){
+        this.zindex = zindex;
+        this.setStyle('z-index', zindex + 2);
+        if(this.shadow){
+            this.shadow.setZIndex(zindex + 1);
+        }
+        if(this.shim){
+            this.shim.setStyle('z-index', zindex);
+        }
+        return this;
+    }
+});
+})();/**
+ * @class Ext.Shadow
+ * Simple class that can provide a shadow effect for any element.  Note that the element MUST be absolutely positioned,
+ * and the shadow does not provide any shimming.  This should be used only in simple cases -- for more advanced
+ * functionality that can also provide the same shadow effect, see the {@link Ext.Layer} class.
+ * @constructor
+ * Create a new Shadow
+ * @param {Object} config The config object
+ */
+Ext.Shadow = function(config){
+    Ext.apply(this, config);
+    if(typeof this.mode != "string"){
+        this.mode = this.defaultMode;
+    }
+    var o = this.offset, a = {h: 0};
+    var rad = Math.floor(this.offset/2);
+    switch(this.mode.toLowerCase()){ // all this hideous nonsense calculates the various offsets for shadows
+        case "drop":
+            a.w = 0;
+            a.l = a.t = o;
+            a.t -= 1;
+            if(Ext.isIE){
+                a.l -= this.offset + rad;
+                a.t -= this.offset + rad;
+                a.w -= rad;
+                a.h -= rad;
+                a.t += 1;
+            }
+        break;
+        case "sides":
+            a.w = (o*2);
+            a.l = -o;
+            a.t = o-1;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= this.offset + rad;
+                a.l += 1;
+                a.w -= (this.offset - rad)*2;
+                a.w -= rad + 1;
+                a.h -= 1;
+            }
+        break;
+        case "frame":
+            a.w = a.h = (o*2);
+            a.l = a.t = -o;
+            a.t += 1;
+            a.h -= 2;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= (this.offset - rad);
+                a.l += 1;
+                a.w -= (this.offset + rad + 1);
+                a.h -= (this.offset + rad);
+                a.h += 1;
+            }
+        break;
+    };
+
+    this.adjusts = a;
+};
+
+Ext.Shadow.prototype = {
+    /**
+     * @cfg {String} mode
+     * The shadow display mode.  Supports the following options:<div class="mdetail-params"><ul>
+     * <li><b><tt>sides</tt></b> : Shadow displays on both sides and bottom only</li>
+     * <li><b><tt>frame</tt></b> : Shadow displays equally on all four sides</li>
+     * <li><b><tt>drop</tt></b> : Traditional bottom-right drop shadow</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {String} offset
+     * The number of pixels to offset the shadow from the element (defaults to <tt>4</tt>)
+     */
+    offset: 4,
+
+    // private
+    defaultMode: "drop",
+
+    /**
+     * Displays the shadow under the target element
+     * @param {Mixed} targetEl The id or element under which the shadow should display
+     */
+    show : function(target){
+        target = Ext.get(target);
+        if(!this.el){
+            this.el = Ext.Shadow.Pool.pull();
+            if(this.el.dom.nextSibling != target.dom){
+                this.el.insertBefore(target);
+            }
+        }
+        this.el.setStyle("z-index", this.zIndex || parseInt(target.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(
+            target.getLeft(true),
+            target.getTop(true),
+            target.getWidth(),
+            target.getHeight()
+        );
+        this.el.dom.style.display = "block";
+    },
+
+    /**
+     * Returns true if the shadow is visible, else false
+     */
+    isVisible : function(){
+        return this.el ? true : false;  
+    },
+
+    /**
+     * Direct alignment when values are already available. Show must be called at least once before
+     * calling this method to ensure it is initialized.
+     * @param {Number} left The target element left position
+     * @param {Number} top The target element top position
+     * @param {Number} width The target element width
+     * @param {Number} height The target element height
+     */
+    realign : function(l, t, w, h){
+        if(!this.el){
+            return;
+        }
+        var a = this.adjusts, d = this.el.dom, s = d.style;
+        var iea = 0;
+        s.left = (l+a.l)+"px";
+        s.top = (t+a.t)+"px";
+        var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px";
+        if(s.width != sws || s.height != shs){
+            s.width = sws;
+            s.height = shs;
+            if(!Ext.isIE){
+                var cn = d.childNodes;
+                var sww = Math.max(0, (sw-12))+"px";
+                cn[0].childNodes[1].style.width = sww;
+                cn[1].childNodes[1].style.width = sww;
+                cn[2].childNodes[1].style.width = sww;
+                cn[1].style.height = Math.max(0, (sh-12))+"px";
+            }
+        }
+    },
+
+    /**
+     * Hides this shadow
+     */
+    hide : function(){
+        if(this.el){
+            this.el.dom.style.display = "none";
+            Ext.Shadow.Pool.push(this.el);
+            delete this.el;
+        }
+    },
+
+    /**
+     * Adjust the z-index of this shadow
+     * @param {Number} zindex The new z-index
+     */
+    setZIndex : function(z){
+        this.zIndex = z;
+        if(this.el){
+            this.el.setStyle("z-index", z);
+        }
+    }
+};
+
+// Private utility class that manages the internal Shadow cache
+Ext.Shadow.Pool = function(){
+    var p = [];
+    var markup = 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 sh = p.shift();
+            if(!sh){
+                sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup));
+                sh.autoBoxAdjust = false;
+            }
+            return sh;
+        },
+
+        push : function(sh){
+            p.push(sh);
+        }
+    };
+}();/**
+ * @class Ext.BoxComponent
+ * @extends Ext.Component
+ * <p>Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.</p>
+ * <p>BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly
+ * within the Component rendering model.</p>
+ * <p>A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing
+ * element, or one that is created to your specifications at render time. Usually, to participate in layouts,
+ * a Component will need to be a <b>Box</b>Component in order to have its width and height managed.</p>
+ * <p>To use a pre-existing element as a BoxComponent, configure it so that you preset the <b>el</b> property to the
+ * element to reference:<pre><code>
+var pageHeader = new Ext.BoxComponent({
+    el: 'my-header-div'
+});</code></pre>
+ * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.</p>
+ * <p>To create a BoxComponent based around a HTML element to be created at render time, use the
+ * {@link Ext.Component#autoEl autoEl} config option which takes the form of a
+ * {@link Ext.DomHelper DomHelper} specification:<pre><code>
+var myImage = new Ext.BoxComponent({
+    autoEl: {
+        tag: 'img',
+        src: '/images/my-image.jpg'
+    }
+});</code></pre></p>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options.
+ * @xtype box
+ */
+Ext.BoxComponent = Ext.extend(Ext.Component, {
+
+    // Configs below are used for all Components when rendered by BorderLayout.
+    /**
+     * @cfg {String} region <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * layout manager (e.g. specifying <tt>layout:'border'</tt>).</p><br>
+     * <p>See {@link Ext.layout.BorderLayout} also.</p>
+     */
+    // margins config is used when a BoxComponent is rendered by BorderLayout or BoxLayout.
+    /**
+     * @cfg {Object} margins <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * or one of the two <b>{@link Ext.layout.BoxLayout BoxLayout} subclasses.</b></p>
+     * <p>An object containing margins to apply to this BoxComponent in the
+     * format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Number} x
+     * The local x (left) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} y
+     * The local y (top) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageX
+     * The page level x coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageY
+     * The page level y coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} height
+     * The height of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Number} width
+     * The width of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <p>True to use height:'auto', false to use fixed height (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components inherit this config option, not all will
+     * function as expected with a height of 'auto'. Setting autoHeight:true means that the
+     * browser will manage height based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the height, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the height might
+     * result in elements needing to be synchronized with the new height. Example:</p><pre><code>
+var w = new Ext.Window({
+    title: 'Window',
+    width: 600,
+    autoHeight: true,
+    items: {
+        title: 'Collapse Me',
+        height: 400,
+        collapsible: true,
+        border: false,
+        listeners: {
+            beforecollapse: function() {
+                w.el.shadow.hide();
+            },
+            beforeexpand: function() {
+                w.el.shadow.hide();
+            },
+            collapse: function() {
+                w.syncShadow();
+            },
+            expand: function() {
+                w.syncShadow();
+            }
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * <p>True to use width:'auto', false to use fixed width (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components  inherit this config option, not all will
+     * function as expected with a width of 'auto'. Setting autoWidth:true means that the
+     * browser will manage width based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the width, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the width might
+     * result in elements needing to be synchronized with the new width. For example, where the target element is:</p><pre><code>
+&lt;div id='grid-container' style='margin-left:25%;width:50%'>&lt;/div>
+</code></pre>
+     * A Panel rendered into that target element must listen for browser window resize in order to relay its
+      * child items when the browser changes its width:<pre><code>
+var myPanel = new Ext.Panel({
+    renderTo: 'grid-container',
+    monitorResize: true, // relay on browser resize
+    title: 'Panel',
+    height: 400,
+    autoWidth: true,
+    layout: 'hbox',
+    layoutConfig: {
+        align: 'stretch'
+    },
+    defaults: {
+        flex: 1
+    },
+    items: [{
+        title: 'Box 1',
+    }, {
+        title: 'Box 2'
+    }, {
+        title: 'Box 3'
+    }],
+});
+</code></pre>
+     */
+
+    /* // private internal config
+     * {Boolean} deferHeight
+     * True to defer height calculations to an external component, false to allow this component to set its own
+     * height (defaults to false).
+     */
+
+    // private
+    initComponent : function(){
+        Ext.BoxComponent.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event resize
+             * Fires after the component is resized.
+             * @param {Ext.Component} this
+             * @param {Number} adjWidth The box-adjusted width that was set
+             * @param {Number} adjHeight The box-adjusted height that was set
+             * @param {Number} rawWidth The width that was originally specified
+             * @param {Number} rawHeight The height that was originally specified
+             */
+            'resize',
+            /**
+             * @event move
+             * Fires after the component is moved.
+             * @param {Ext.Component} this
+             * @param {Number} x The new x position
+             * @param {Number} y The new y position
+             */
+            'move'
+        );
+    },
+
+    // private, set in afterRender to signify that the component has been rendered
+    boxReady : false,
+    // private, used to defer height settings to subclasses
+    deferHeight: false,
+
+    /**
+     * Sets the width and height of this BoxComponent. This method fires the {@link #resize} event. This method can accept
+     * either width and height as separate arguments, or you can pass a size object like <code>{width:10, height:20}</code>.
+     * @param {Mixed} width The new width to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+     * <li><code>undefined</code> to leave the width unchanged.</li>
+     * </ul></div>
+     * @param {Mixed} height The new height to set (not required if a size object is passed as the first arg).
+     * This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * <li><code>undefined</code> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setSize : function(w, h){
+        // support for standard size objects
+        if(typeof w == 'object'){
+            h = w.height;
+            w = w.width;
+        }
+        // not rendered
+        if(!this.boxReady){
+            this.width = w;
+            this.height = h;
+            return this;
+        }
+
+        // prevent recalcs when not needed
+        if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
+            return this;
+        }
+        this.lastSize = {width: w, height: h};
+        var adj = this.adjustSize(w, h);
+        var aw = adj.width, ah = adj.height;
+        if(aw !== undefined || ah !== undefined){ // this code is nasty but performs better with floaters
+            var rz = this.getResizeEl();
+            if(!this.deferHeight && aw !== undefined && ah !== undefined){
+                rz.setSize(aw, ah);
+            }else if(!this.deferHeight && ah !== undefined){
+                rz.setHeight(ah);
+            }else if(aw !== undefined){
+                rz.setWidth(aw);
+            }
+            this.onResize(aw, ah, w, h);
+            this.fireEvent('resize', this, aw, ah, w, h);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the width of the component.  This method fires the {@link #resize} event.
+     * @param {Number} width The new width to setThis may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setWidth : function(width){
+        return this.setSize(width);
+    },
+
+    /**
+     * Sets the height of the component.  This method fires the {@link #resize} event.
+     * @param {Number} height The new height to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style.</li>
+     * <li><i>undefined</i> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setHeight : function(height){
+        return this.setSize(undefined, height);
+    },
+
+    /**
+     * Gets the current size of the component's underlying element.
+     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+     */
+    getSize : function(){
+        return this.getResizeEl().getSize();
+    },
+
+    /**
+     * Gets the current width of the component's underlying element.
+     * @return {Number}
+     */
+    getWidth : function(){
+        return this.getResizeEl().getWidth();
+    },
+
+    /**
+     * Gets the current height of the component's underlying element.
+     * @return {Number}
+     */
+    getHeight : function(){
+        return this.getResizeEl().getHeight();
+    },
+
+    /**
+     * Gets the current size of the component's underlying element, including space taken by its margins.
+     * @return {Object} An object containing the element's size {width: (element width + left/right margins), height: (element height + top/bottom margins)}
+     */
+    getOuterSize : function(){
+        var el = this.getResizeEl();
+        return {width: el.getWidth() + el.getMargins('lr'),
+                height: el.getHeight() + el.getMargins('tb')};
+    },
+
+    /**
+     * Gets the current XY position of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Array} The XY position of the element (e.g., [100, 200])
+     */
+    getPosition : function(local){
+        var el = this.getPositionEl();
+        if(local === true){
+            return [el.getLeft(true), el.getTop(true)];
+        }
+        return this.xy || el.getXY();
+    },
+
+    /**
+     * Gets the current box measurements of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+    getBox : function(local){
+        var pos = this.getPosition(local);
+        var s = this.getSize();
+        s.x = pos[0];
+        s.y = pos[1];
+        return s;
+    },
+
+    /**
+     * Sets the current box measurements of the component's underlying element.
+     * @param {Object} box An object in the format {x, y, width, height}
+     * @return {Ext.BoxComponent} this
+     */
+    updateBox : function(box){
+        this.setSize(box.width, box.height);
+        this.setPagePosition(box.x, box.y);
+        return this;
+    },
+
+    /**
+     * <p>Returns the outermost Element of this Component which defines the Components overall size.</p>
+     * <p><i>Usually</i> this will return the same Element as <code>{@link #getEl}</code>,
+     * but in some cases, a Component may have some more wrapping Elements around its main
+     * active Element.</p>
+     * <p>An example is a ComboBox. It is encased in a <i>wrapping</i> Element which
+     * contains both the <code>&lt;input></code> Element (which is what would be returned
+     * by its <code>{@link #getEl}</code> method, <i>and</i> the trigger button Element.
+     * This Element is returned as the <code>resizeEl</code>.
+     */
+    getResizeEl : function(){
+        return this.resizeEl || this.el;
+    },
+
+    // protected
+    getPositionEl : function(){
+        return this.positionEl || this.el;
+    },
+
+    /**
+     * Sets the left and top of the component.  To set the page XY position instead, use {@link #setPagePosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} left The new left
+     * @param {Number} top The new top
+     * @return {Ext.BoxComponent} this
+     */
+    setPosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.x = x;
+        this.y = y;
+        if(!this.boxReady){
+            return this;
+        }
+        var adj = this.adjustPosition(x, y);
+        var ax = adj.x, ay = adj.y;
+
+        var el = this.getPositionEl();
+        if(ax !== undefined || ay !== undefined){
+            if(ax !== undefined && ay !== undefined){
+                el.setLeftTop(ax, ay);
+            }else if(ax !== undefined){
+                el.setLeft(ax);
+            }else if(ay !== undefined){
+                el.setTop(ay);
+            }
+            this.onPosition(ax, ay);
+            this.fireEvent('move', this, ax, ay);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the page XY position of the component.  To set the left and top instead, use {@link #setPosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     * @return {Ext.BoxComponent} this
+     */
+    setPagePosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.pageX = x;
+        this.pageY = y;
+        if(!this.boxReady){
+            return;
+        }
+        if(x === undefined || y === undefined){ // cannot translate undefined points
+            return;
+        }
+        var p = this.getPositionEl().translatePoints(x, y);
+        this.setPosition(p.left, p.top);
+        return this;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.BoxComponent.superclass.onRender.call(this, ct, position);
+        if(this.resizeEl){
+            this.resizeEl = Ext.get(this.resizeEl);
+        }
+        if(this.positionEl){
+            this.positionEl = Ext.get(this.positionEl);
+        }
+    },
+
+    // private
+    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);
+        }
+    },
+
+    /**
+     * Force the component's size to recalculate based on the underlying element's current height and width.
+     * @return {Ext.BoxComponent} this
+     */
+    syncSize : function(){
+        delete this.lastSize;
+        this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight());
+        return this;
+    },
+
+    /* // protected
+     * Called after the component is resized, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a resize occurs.
+     * @param {Number} adjWidth The box-adjusted width that was set
+     * @param {Number} adjHeight The box-adjusted height that was set
+     * @param {Number} rawWidth The width that was originally specified
+     * @param {Number} rawHeight The height that was originally specified
+     */
+    onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
+
+    },
+
+    /* // protected
+     * Called after the component is moved, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a move occurs.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     */
+    onPosition : function(x, y){
+
+    },
+
+    // private
+    adjustSize : function(w, h){
+        if(this.autoWidth){
+            w = 'auto';
+        }
+        if(this.autoHeight){
+            h = 'auto';
+        }
+        return {width : w, height: h};
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        return {x : x, y: y};
+    }
+});
+Ext.reg('box', Ext.BoxComponent);
+
+
+/**
+ * @class Ext.Spacer
+ * @extends Ext.BoxComponent
+ * <p>Used to provide a sizable space in a layout.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Spacer = Ext.extend(Ext.BoxComponent, {
+    autoEl:'div'
+});
+Ext.reg('spacer', Ext.Spacer);/**
+ * @class Ext.SplitBar
+ * @extends Ext.util.Observable
+ * Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized).
+ * <br><br>
+ * Usage:
+ * <pre><code>
+var split = new Ext.SplitBar("elementToDrag", "elementToSize",
+                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
+split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
+split.minSize = 100;
+split.maxSize = 600;
+split.animate = true;
+split.on('moved', splitterMoved);
+</code></pre>
+ * @constructor
+ * Create a new SplitBar
+ * @param {Mixed} dragElement The element to be dragged and act as the SplitBar.
+ * @param {Mixed} resizingElement The element to be resized based on where the SplitBar element is dragged
+ * @param {Number} orientation (optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+ * @param {Number} placement (optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or  
+                        Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial
+                        position of the SplitBar).
+ */
+Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
+    
+    /** @private */
+    this.el = Ext.get(dragElement, true);
+    this.el.dom.unselectable = "on";
+    /** @private */
+    this.resizingEl = Ext.get(resizingElement, true);
+
+    /**
+     * @private
+     * The orientation of the split. Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+     * Note: If this is changed after creating the SplitBar, the placement property must be manually updated
+     * @type Number
+     */
+    this.orientation = orientation || Ext.SplitBar.HORIZONTAL;
+    
+    /**
+     * The increment, in pixels by which to move this SplitBar. When <i>undefined</i>, the SplitBar moves smoothly.
+     * @type Number
+     * @property tickSize
+     */
+    /**
+     * The minimum size of the resizing element. (Defaults to 0)
+     * @type Number
+     */
+    this.minSize = 0;
+    
+    /**
+     * The maximum size of the resizing element. (Defaults to 2000)
+     * @type Number
+     */
+    this.maxSize = 2000;
+    
+    /**
+     * Whether to animate the transition to the new size
+     * @type Boolean
+     */
+    this.animate = false;
+    
+    /**
+     * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
+     * @type Boolean
+     */
+    this.useShim = false;
+    
+    /** @private */
+    this.shim = null;
+    
+    if(!existingProxy){
+        /** @private */
+        this.proxy = Ext.SplitBar.createProxy(this.orientation);
+    }else{
+        this.proxy = Ext.get(existingProxy).dom;
+    }
+    /** @private */
+    this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id});
+    
+    /** @private */
+    this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dragSpecs = {};
+    
+    /**
+     * @private The adapter to use to positon and resize elements
+     */
+    this.adapter = new Ext.SplitBar.BasicLayoutAdapter();
+    this.adapter.init(this);
+    
+    if(this.orientation == Ext.SplitBar.HORIZONTAL){
+        /** @private */
+        this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
+        this.el.addClass("x-splitbar-h");
+    }else{
+        /** @private */
+        this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
+        this.el.addClass("x-splitbar-v");
+    }
+    
+    this.addEvents(
+        /**
+         * @event resize
+         * Fires when the splitter is moved (alias for {@link #moved})
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "resize",
+        /**
+         * @event moved
+         * Fires when the splitter is moved
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "moved",
+        /**
+         * @event beforeresize
+         * Fires before the splitter is dragged
+         * @param {Ext.SplitBar} this
+         */
+        "beforeresize",
+
+        "beforeapply"
+    );
+
+    Ext.SplitBar.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.SplitBar, Ext.util.Observable, {
+    onStartProxyDrag : function(x, y){
+        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 size = this.adapter.getElementSize(this);
+        this.activeMinSize = this.getMinimumSize();
+        this.activeMaxSize = this.getMaximumSize();
+        var c1 = size - this.activeMinSize;
+        var c2 = Math.max(this.activeMaxSize - size, 0);
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(
+                this.placement == Ext.SplitBar.LEFT ? c1 : c2, 
+                this.placement == Ext.SplitBar.LEFT ? c2 : c1,
+                this.tickSize
+            );
+            this.dd.setYConstraint(0, 0);
+        }else{
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(0, 0);
+            this.dd.setYConstraint(
+                this.placement == Ext.SplitBar.TOP ? c1 : c2, 
+                this.placement == Ext.SplitBar.TOP ? c2 : c1,
+                this.tickSize
+            );
+         }
+        this.dragSpecs.startSize = size;
+        this.dragSpecs.startPoint = [x, y];
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y);
+    },
+    
+    /** 
+     * @private Called after the drag operation by the DDProxy
+     */
+    onEndProxyDrag : function(e){
+        Ext.get(this.proxy).setDisplayed(false);
+        var endPoint = Ext.lib.Event.getXY(e);
+        if(this.overlay){
+            Ext.destroy(this.overlay);
+            delete this.overlay;
+        }
+        var newSize;
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.LEFT ?
+                    endPoint[0] - this.dragSpecs.startPoint[0] :
+                    this.dragSpecs.startPoint[0] - endPoint[0]
+                );
+        }else{
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.TOP ?
+                    endPoint[1] - this.dragSpecs.startPoint[1] :
+                    this.dragSpecs.startPoint[1] - endPoint[1]
+                );
+        }
+        newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize);
+        if(newSize != this.dragSpecs.startSize){
+            if(this.fireEvent('beforeapply', this, newSize) !== false){
+                this.adapter.setElementSize(this, newSize);
+                this.fireEvent("moved", this, newSize);
+                this.fireEvent("resize", this, newSize);
+            }
+        }
+    },
+    
+    /**
+     * Get the adapter this SplitBar uses
+     * @return The adapter object
+     */
+    getAdapter : function(){
+        return this.adapter;
+    },
+    
+    /**
+     * Set the adapter this SplitBar uses
+     * @param {Object} adapter A SplitBar adapter object
+     */
+    setAdapter : function(adapter){
+        this.adapter = adapter;
+        this.adapter.init(this);
+    },
+    
+    /**
+     * Gets the minimum size for the resizing element
+     * @return {Number} The minimum size
+     */
+    getMinimumSize : function(){
+        return this.minSize;
+    },
+    
+    /**
+     * Sets the minimum size for the resizing element
+     * @param {Number} minSize The minimum size
+     */
+    setMinimumSize : function(minSize){
+        this.minSize = minSize;
+    },
+    
+    /**
+     * Gets the maximum size for the resizing element
+     * @return {Number} The maximum size
+     */
+    getMaximumSize : function(){
+        return this.maxSize;
+    },
+    
+    /**
+     * Sets the maximum size for the resizing element
+     * @param {Number} maxSize The maximum size
+     */
+    setMaximumSize : function(maxSize){
+        this.maxSize = maxSize;
+    },
+    
+    /**
+     * Sets the initialize size for the resizing element
+     * @param {Number} size The initial size
+     */
+    setCurrentSize : function(size){
+        var oldAnimate = this.animate;
+        this.animate = false;
+        this.adapter.setElementSize(this, size);
+        this.animate = oldAnimate;
+    },
+    
+    /**
+     * Destroy this splitbar. 
+     * @param {Boolean} removeEl True to remove the element
+     */
+    destroy : function(removeEl){
+		Ext.destroy(this.shim, Ext.get(this.proxy));
+        this.dd.unreg();
+        if(removeEl){
+            this.el.remove();
+        }
+		this.purgeListeners();
+    }
+});
+
+/**
+ * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color.
+ */
+Ext.SplitBar.createProxy = function(dir){
+    var proxy = new Ext.Element(document.createElement("div"));
+    proxy.unselectable();
+    var cls = 'x-splitbar-proxy';
+    proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v'));
+    document.body.appendChild(proxy.dom);
+    return proxy.dom;
+};
+
+/** 
+ * @class Ext.SplitBar.BasicLayoutAdapter
+ * Default Adapter. It assumes the splitter and resizing element are not positioned
+ * elements and only gets/sets the width of the element. Generally used for table based layouts.
+ */
+Ext.SplitBar.BasicLayoutAdapter = function(){
+};
+
+Ext.SplitBar.BasicLayoutAdapter.prototype = {
+    // do nothing for now
+    init : function(s){
+    
+    },
+    /**
+     * Called before drag operations to get the current size of the resizing element. 
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     */
+     getElementSize : function(s){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            return s.resizingEl.getWidth();
+        }else{
+            return s.resizingEl.getHeight();
+        }
+    },
+    
+    /**
+     * Called after drag operations to set the size of the resizing element.
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     * @param {Number} newSize The new size to set
+     * @param {Function} onComplete A function to be invoked when resizing is complete
+     */
+    setElementSize : function(s, newSize, onComplete){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            if(!s.animate){
+                s.resizingEl.setWidth(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }else{
+            
+            if(!s.animate){
+                s.resizingEl.setHeight(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }
+    }
+};
+
+/** 
+ *@class Ext.SplitBar.AbsoluteLayoutAdapter
+ * @extends Ext.SplitBar.BasicLayoutAdapter
+ * Adapter that  moves the splitter element to align with the resized sizing element. 
+ * Used with an absolute positioned SplitBar.
+ * @param {Mixed} container The container that wraps around the absolute positioned content. If it's
+ * document.body, make sure you assign an id to the body element.
+ */
+Ext.SplitBar.AbsoluteLayoutAdapter = function(container){
+    this.basic = new Ext.SplitBar.BasicLayoutAdapter();
+    this.container = Ext.get(container);
+};
+
+Ext.SplitBar.AbsoluteLayoutAdapter.prototype = {
+    init : function(s){
+        this.basic.init(s);
+    },
+    
+    getElementSize : function(s){
+        return this.basic.getElementSize(s);
+    },
+    
+    setElementSize : function(s, newSize, onComplete){
+        this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s]));
+    },
+    
+    moveSplitter : function(s){
+        var yes = Ext.SplitBar;
+        switch(s.placement){
+            case yes.LEFT:
+                s.el.setX(s.resizingEl.getRight());
+                break;
+            case yes.RIGHT:
+                s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px");
+                break;
+            case yes.TOP:
+                s.el.setY(s.resizingEl.getBottom());
+                break;
+            case yes.BOTTOM:
+                s.el.setY(s.resizingEl.getTop() - s.el.getHeight());
+                break;
+        }
+    }
+};
+
+/**
+ * Orientation constant - Create a vertical SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.VERTICAL = 1;
+
+/**
+ * Orientation constant - Create a horizontal SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.HORIZONTAL = 2;
+
+/**
+ * Placement constant - The resizing element is to the left of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.LEFT = 1;
+
+/**
+ * Placement constant - The resizing element is to the right of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.RIGHT = 2;
+
+/**
+ * Placement constant - The resizing element is positioned above the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.TOP = 3;
+
+/**
+ * Placement constant - The resizing element is positioned under splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.BOTTOM = 4;
+/**
+ * @class Ext.Container
+ * @extends Ext.BoxComponent
+ * <p>Base class for any {@link Ext.BoxComponent} that may contain other Components. Containers handle the
+ * basic behavior of containing items, namely adding, inserting and removing items.</p>
+ *
+ * <p>The most commonly used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}.
+ * If you do not need the capabilities offered by the aforementioned classes you can create a lightweight
+ * Container to be encapsulated by an HTML element to your specifications by using the
+ * <tt><b>{@link Ext.Component#autoEl autoEl}</b></tt> config option. This is a useful technique when creating
+ * embedded {@link Ext.layout.ColumnLayout column} layouts inside {@link Ext.form.FormPanel FormPanels}
+ * for example.</p>
+ *
+ * <p>The code below illustrates both how to explicitly create a Container, and how to implicitly
+ * create one using the <b><tt>'container'</tt></b> xtype:<pre><code>
+// explicitly create a Container
+var embeddedColumns = new Ext.Container({
+    autoEl: 'div',  // This is the default
+    layout: 'column',
+    defaults: {
+        // implicitly create Container by specifying xtype
+        xtype: 'container',
+        autoEl: 'div', // This is the default.
+        layout: 'form',
+        columnWidth: 0.5,
+        style: {
+            padding: '10px'
+        }
+    },
+//  The two items below will be Ext.Containers, each encapsulated by a &lt;DIV> element.
+    items: [{
+        items: {
+            xtype: 'datefield',
+            name: 'startDate',
+            fieldLabel: 'Start date'
+        }
+    }, {
+        items: {
+            xtype: 'datefield',
+            name: 'endDate',
+            fieldLabel: 'End date'
+        }
+    }]
+});</code></pre></p>
+ *
+ * <p><u><b>Layout</b></u></p>
+ * <p>Container classes delegate the rendering of child Components to a layout
+ * manager class which must be configured into the Container using the
+ * <code><b>{@link #layout}</b></code> configuration property.</p>
+ * <p>When either specifying child <code>{@link #items}</code> of a Container,
+ * or dynamically {@link #add adding} Components to a Container, remember to
+ * consider how you wish the Container to arrange those child elements, and
+ * whether those child elements need to be sized using one of Ext's built-in
+ * <b><code>{@link #layout}</code></b> schemes. By default, Containers use the
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme which only
+ * renders child components, appending them one after the other inside the
+ * Container, and <b>does not apply any sizing</b> at all.</p>
+ * <p>A common mistake is when a developer neglects to specify a
+ * <b><code>{@link #layout}</code></b> (e.g. widgets like GridPanels or
+ * TreePanels are added to Containers for which no <tt><b>{@link #layout}</b></tt>
+ * has been specified). If a Container is left to use the default
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme, none of its
+ * child components will be resized, or changed in any way when the Container
+ * is resized.</p>
+ * <p>Certain layout managers allow dynamic addition of child components.
+ * Those that do include {@link Ext.layout.CardLayout},
+ * {@link Ext.layout.AnchorLayout}, {@link Ext.layout.FormLayout}, and
+ * {@link Ext.layout.TableLayout}. For example:<pre><code>
+//  Create the GridPanel.
+var myNewGrid = new Ext.grid.GridPanel({
+    store: myStore,
+    columns: myColumnModel,
+    title: 'Results', // the title becomes the title of the tab
+});
+
+myTabPanel.add(myNewGrid); // {@link Ext.TabPanel} implicitly uses {@link Ext.layout.CardLayout CardLayout}
+myTabPanel.{@link Ext.TabPanel#setActiveTab setActiveTab}(myNewGrid);
+ * </code></pre></p>
+ * <p>The example above adds a newly created GridPanel to a TabPanel. Note that
+ * a TabPanel uses {@link Ext.layout.CardLayout} as its layout manager which
+ * means all its child items are sized to {@link Ext.layout.FitLayout fit}
+ * exactly into its client area.
+ * <p><b><u>Overnesting is a common problem</u></b>.
+ * An example of overnesting occurs when a GridPanel is added to a TabPanel
+ * by wrapping the GridPanel <i>inside</i> a wrapping Panel (that has no
+ * <tt><b>{@link #layout}</b></tt> specified) and then add that wrapping Panel
+ * to the TabPanel. The point to realize is that a GridPanel <b>is</b> a
+ * Component which can be added directly to a Container. If the wrapping Panel
+ * has no <tt><b>{@link #layout}</b></tt> configuration, then the overnested
+ * GridPanel will not be sized as expected.<p>
+</code></pre>
+ *
+ * <p><u><b>Adding via remote configuration</b></u></p>
+ *
+ * <p>A server side script can be used to add Components which are generated dynamically on the server.
+ * An example of adding a GridPanel to a TabPanel where the GridPanel is generated by the server
+ * based on certain parameters:
+ * </p><pre><code>
+// execute an Ajax request to invoke server side script:
+Ext.Ajax.request({
+    url: 'gen-invoice-grid.php',
+    // send additional parameters to instruct server script
+    params: {
+        startDate: Ext.getCmp('start-date').getValue(),
+        endDate: Ext.getCmp('end-date').getValue()
+    },
+    // process the response object to add it to the TabPanel:
+    success: function(xhr) {
+        var newComponent = eval(xhr.responseText); // see discussion below
+        myTabPanel.add(newComponent); // add the component to the TabPanel
+        myTabPanel.setActiveTab(newComponent);
+    },
+    failure: function() {
+        Ext.Msg.alert("Grid create failed", "Server communication failure");
+    }
+});
+</code></pre>
+ * <p>The server script needs to return an executable Javascript statement which, when processed
+ * using <tt>eval()</tt>, will return either a config object with an {@link Ext.Component#xtype xtype},
+ * or an instantiated Component. The server might return this for example:</p><pre><code>
+(function() {
+    function formatDate(value){
+        return value ? value.dateFormat('M d, Y') : '';
+    };
+
+    var store = new Ext.data.Store({
+        url: 'get-invoice-data.php',
+        baseParams: {
+            startDate: '01/01/2008',
+            endDate: '01/31/2008'
+        },
+        reader: new Ext.data.JsonReader({
+            record: 'transaction',
+            idProperty: 'id',
+            totalRecords: 'total'
+        }, [
+           'customer',
+           'invNo',
+           {name: 'date', type: 'date', dateFormat: 'm/d/Y'},
+           {name: 'value', type: 'float'}
+        ])
+    });
+
+    var grid = new Ext.grid.GridPanel({
+        title: 'Invoice Report',
+        bbar: new Ext.PagingToolbar(store),
+        store: store,
+        columns: [
+            {header: "Customer", width: 250, dataIndex: 'customer', sortable: true},
+            {header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},
+            {header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},
+            {header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}
+        ],
+    });
+    store.load();
+    return grid;  // return instantiated component
+})();
+</code></pre>
+ * <p>When the above code fragment is passed through the <tt>eval</tt> function in the success handler
+ * of the Ajax request, the code is executed by the Javascript processor, and the anonymous function
+ * runs, and returns the instantiated grid component.</p>
+ * <p>Note: since the code above is <i>generated</i> by a server script, the <tt>baseParams</tt> for
+ * the Store, the metadata to allow generation of the Record layout, and the ColumnModel
+ * can all be generated into the code since these are all known on the server.</p>
+ *
+ * @xtype container
+ */
+Ext.Container = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {Boolean} monitorResize
+     * True to automatically monitor window resize events to handle anything that is sensitive to the current size
+     * of the viewport.  This value is typically managed by the chosen <code>{@link #layout}</code> and should not need
+     * to be set manually.
+     */
+    /**
+     * @cfg {String/Object} layout
+     * When creating complex UIs, it is important to remember that sizing and
+     * positioning of child items is the responsibility of the Container's
+     * layout manager. If you expect child items to be sized in response to
+     * user interactions, <b>you must specify a layout manager</b> which
+     * creates and manages the type of layout you have in mind.  For example:<pre><code>
+new Ext.Window({
+    width:300, height: 300,
+    layout: 'fit', // explicitly set layout manager: override the default (layout:'auto')
+    items: [{
+        title: 'Panel inside a Window'
+    }]
+}).show();
+     * </code></pre>
+     * <p>Omitting the {@link #layout} config means that the
+     * {@link Ext.layout.ContainerLayout default layout manager} will be used which does
+     * nothing but render child components sequentially into the Container (no sizing or
+     * positioning will be performed in this situation).</p>
+     * <p>The layout manager class for this container may be specified as either as an
+     * Object or as a String:</p>
+     * <div><ul class="mdetail-params">
+     *
+     * <li><u>Specify as an Object</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: {
+    type: 'vbox',
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     *
+     * <li><tt><b>type</b></tt></li>
+     * <br/><p>The layout type to be used for this container.  If not specified,
+     * a default {@link Ext.layout.ContainerLayout} will be created and used.</p>
+     * <br/><p>Valid layout <tt>type</tt> values are:</p>
+     * <div class="sub-desc"><ul class="mdetail-params">
+     * <li><tt><b>{@link Ext.layout.AbsoluteLayout absolute}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AccordionLayout accordion}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AnchorLayout anchor}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ContainerLayout auto}</b></tt> &nbsp;&nbsp;&nbsp; <b>Default</b></li>
+     * <li><tt><b>{@link Ext.layout.BorderLayout border}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.CardLayout card}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ColumnLayout column}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FitLayout fit}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FormLayout form}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.HBoxLayout hbox}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.MenuLayout menu}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.TableLayout table}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ToolbarLayout toolbar}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.VBoxLayout vbox}</b></tt></li>
+     * </ul></div>
+     *
+     * <li>Layout specific configuration properties</li>
+     * <br/><p>Additional layout specific configuration properties may also be
+     * specified. For complete details regarding the valid config options for
+     * each layout type, see the layout class corresponding to the <tt>type</tt>
+     * specified.</p>
+     *
+     * </ul></div>
+     *
+     * <li><u>Specify as a String</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: 'vbox',
+layoutConfig: {
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     * <li><tt><b>layout</b></tt></li>
+     * <br/><p>The layout <tt>type</tt> to be used for this container (see list
+     * of valid layout type values above).</p><br/>
+     * <li><tt><b>{@link #layoutConfig}</b></tt></li>
+     * <br/><p>Additional layout specific configuration properties. For complete
+     * details regarding the valid config options for each layout type, see the
+     * layout class corresponding to the <tt>layout</tt> specified.</p>
+     * </ul></div></ul></div>
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * This is a config object containing properties specific to the chosen
+     * <b><code>{@link #layout}</code></b> if <b><code>{@link #layout}</code></b>
+     * has been specified as a <i>string</i>.</p>
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer
+     * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers
+     * with a large quantity of sub-components for which frequent layout calls would be expensive.
+     */
+    bufferResize: 100,
+    
+    /**
+     * @cfg {String/Number} activeItem
+     * A string component id or the numeric index of the component that should be initially activated within the
+     * container's layout on render.  For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first
+     * item in the container's collection).  activeItem only applies to layout styles that can display
+     * items one at a time (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} and
+     * {@link Ext.layout.FitLayout}).  Related to {@link Ext.layout.ContainerLayout#activeItem}.
+     */
+    /**
+     * @cfg {Object/Array} items
+     * <pre><b>** IMPORTANT</b>: be sure to specify a <b><code>{@link #layout}</code> ! **</b></pre>
+     * <p>A single item, or an array of child Components to be added to this container,
+     * for example:</p>
+     * <pre><code>
+// specifying a single item
+items: {...},
+layout: 'fit',    // specify a layout!
+
+// specifying multiple items
+items: [{...}, {...}],
+layout: 'anchor', // specify a layout!
+     * </code></pre>
+     * <p>Each item may be:</p>
+     * <div><ul class="mdetail-params">
+     * <li>any type of object based on {@link Ext.Component}</li>
+     * <li>a fully instanciated object or</li>
+     * <li>an object literal that:</li>
+     * <div><ul class="mdetail-params">
+     * <li>has a specified <code>{@link Ext.Component#xtype xtype}</code></li>
+     * <li>the {@link Ext.Component#xtype} specified is associated with the Component
+     * desired and should be chosen from one of the available xtypes as listed
+     * in {@link Ext.Component}.</li>
+     * <li>If an <code>{@link Ext.Component#xtype xtype}</code> is not explicitly
+     * specified, the {@link #defaultType} for that Container is used.</li>
+     * <li>will be "lazily instanciated", avoiding the overhead of constructing a fully
+     * instanciated Component object</li>
+     * </ul></div></ul></div>
+     * <p><b>Notes</b>:</p>
+     * <div><ul class="mdetail-params">
+     * <li>Ext uses lazy rendering. Child Components will only be rendered
+     * should it become necessary. Items are automatically laid out when they are first
+     * shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.</li>
+     * <li>Do not specify <code>{@link Ext.Panel#contentEl contentEl}</code>/
+     * <code>{@link Ext.Panel#html html}</code> with <code>items</code>.</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} defaults
+     * <p>A config object that will be applied to all components added to this container either via the {@link #items}
+     * config or via the {@link #add} or {@link #insert} methods.  The <tt>defaults</tt> config can contain any
+     * number of name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the container.  For example, to automatically apply padding to the body of each of a set of
+     * contained {@link Ext.Panel} items, you could pass: <tt>defaults: {bodyStyle:'padding:15px'}</tt>.</p><br/>
+     * <p><b>Note</b>: <tt>defaults</tt> will not be applied to config objects if the option is already specified.
+     * For example:</p><pre><code>
+defaults: {               // defaults are applied to items, not the container
+    autoScroll:true
+},
+items: [
+    {
+        xtype: 'panel',   // defaults <b>do not</b> have precedence over
+        id: 'panel1',     // options in config objects, so the defaults
+        autoScroll: false // will not be applied here, panel1 will be autoScroll:false
+    },
+    new Ext.Panel({       // defaults <b>do</b> have precedence over options
+        id: 'panel2',     // options in components, so the defaults
+        autoScroll: false // will be applied here, panel2 will be autoScroll:true.
+    })
+]
+     * </code></pre>
+     */
+
+
+    /** @cfg {Boolean} autoDestroy
+     * If true the container will automatically destroy any contained component that is removed from it, else
+     * destruction must be handled manually (defaults to true).
+     */
+    autoDestroy : true,
+
+    /** @cfg {Boolean} forceLayout
+     * If true the container will force a layout initially even if hidden or collapsed. This option
+     * is useful for forcing forms to render in collapsed or hidden containers. (defaults to false).
+     */
+    forceLayout: false,
+
+    /** @cfg {Boolean} hideBorders
+     * True to hide the borders of each contained component, false to defer to the component's existing
+     * border settings (defaults to false).
+     */
+    /** @cfg {String} defaultType
+     * <p>The default {@link Ext.Component xtype} of child Components to create in this Container when
+     * a child item is specified as a raw configuration object, rather than as an instantiated Component.</p>
+     * <p>Defaults to <tt>'panel'</tt>, except {@link Ext.menu.Menu} which defaults to <tt>'menuitem'</tt>,
+     * and {@link Ext.Toolbar} and {@link Ext.ButtonGroup} which default to <tt>'button'</tt>.</p>
+     */
+    defaultType : 'panel',
+
+    // private
+    initComponent : function(){
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event afterlayout
+             * Fires when the components in this container are arranged by the associated layout manager.
+             * @param {Ext.Container} this
+             * @param {ContainerLayout} layout The ContainerLayout implementation for this container
+             */
+            'afterlayout',
+            /**
+             * @event beforeadd
+             * Fires before any {@link Ext.Component} is added or inserted into the container.
+             * A handler can return false to cancel the add.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being added
+             * @param {Number} index The index at which the component will be added to the container's items collection
+             */
+            'beforeadd',
+            /**
+             * @event beforeremove
+             * Fires before any {@link Ext.Component} is removed from the container.  A handler can return
+             * false to cancel the remove.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being removed
+             */
+            'beforeremove',
+            /**
+             * @event add
+             * @bubbles
+             * Fires after any {@link Ext.Component} is added or inserted into the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was added
+             * @param {Number} index The index at which the component was added to the container's items collection
+             */
+            'add',
+            /**
+             * @event remove
+             * @bubbles
+             * Fires after any {@link Ext.Component} is removed from the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was removed
+             */
+            'remove'
+        );
+
+		this.enableBubble('add', 'remove');
+
+        /**
+         * The collection of components in this container as a {@link Ext.util.MixedCollection}
+         * @type MixedCollection
+         * @property items
+         */
+        var items = this.items;
+        if(items){
+            delete this.items;
+            if(Ext.isArray(items) && items.length > 0){
+                this.add.apply(this, items);
+            }else{
+                this.add(items);
+            }
+        }
+    },
+
+    // private
+    initItems : function(){
+        if(!this.items){
+            this.items = new Ext.util.MixedCollection(false, this.getComponentId);
+            this.getLayout(); // initialize the layout
+        }
+    },
+
+    // private
+    setLayout : function(layout){
+        if(this.layout && this.layout != layout){
+            this.layout.setContainer(null);
+        }
+        this.initItems();
+        this.layout = layout;
+        layout.setContainer(this);
+    },
+
+    // private
+    render : function(){
+        Ext.Container.superclass.render.apply(this, arguments);
+        if(this.layout){
+            if(Ext.isObject(this.layout) && !this.layout.layout){
+                this.layoutConfig = this.layout;
+                this.layout = this.layoutConfig.type;
+            }
+            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 item = this.activeItem;
+                delete this.activeItem;
+                this.layout.setActiveItem(item);
+            }
+        }
+        if(!this.ownerCt){
+            // force a layout if no ownerCt is set
+            this.doLayout(false, true);
+        }
+        if(this.monitorResize === true){
+            Ext.EventManager.onWindowResize(this.doLayout, this, [false]);
+        }
+    },
+
+    /**
+     * <p>Returns the Element to be used to contain the child Components of this Container.</p>
+     * <p>An implementation is provided which returns the Container's {@link #getEl Element}, but
+     * if there is a more complex structure to a Container, this may be overridden to return
+     * the element into which the {@link #layout layout} renders child Components.</p>
+     * @return {Ext.Element} The Element to render child Components into.
+     */
+    getLayoutTarget : function(){
+        return this.el;
+    },
+
+    // private - used as the key lookup function for the items collection
+    getComponentId : function(comp){
+        return comp.getItemId();
+    },
+
+    /**
+     * <p>Adds {@link Ext.Component Component}(s) to this Container.</p>
+     * <br><p><b>Description</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>Fires the {@link #beforeadd} event before adding</li>
+     * <li>The Container's {@link #defaults default config values} will be applied
+     * accordingly (see <code>{@link #defaults}</code> for details).</li>
+     * <li>Fires the {@link #add} event after the component has been added.</li>
+     * </ul></div>
+     * <br><p><b>Notes</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>If the Container is <i>already rendered</i> when <tt>add</tt>
+     * is called, you may need to call {@link #doLayout} to refresh the view which causes
+     * any unrendered child Components to be rendered. This is required so that you can
+     * <tt>add</tt> multiple child components if needed while only refreshing the layout
+     * once. For example:<pre><code>
+var tb = new {@link Ext.Toolbar}();
+tb.render(document.body);  // toolbar is rendered
+tb.add({text:'Button 1'}); // add multiple items ({@link #defaultType} for {@link Ext.Toolbar Toolbar} is 'button')
+tb.add({text:'Button 2'});
+tb.{@link #doLayout}();             // refresh the layout
+     * </code></pre></li>
+     * <li><i>Warning:</i> Containers directly managed by the BorderLayout layout manager
+     * may not be removed or added.  See the Notes for {@link Ext.layout.BorderLayout BorderLayout}
+     * for more details.</li>
+     * </ul></div>
+     * @param {Object/Array} component
+     * <p>Either a single component or an Array of components to add.  See
+     * <code>{@link #items}</code> for additional information.</p>
+     * @param {Object} (Optional) component_2
+     * @param {Object} (Optional) component_n
+     * @return {Ext.Component} component The Component (or config object) that was added.
+     */
+    add : function(comp){
+        this.initItems();
+        var args = arguments.length > 1;
+        if(args || Ext.isArray(comp)){
+            Ext.each(args ? arguments : comp, function(c){
+                this.add(c);
+            }, this);
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+        var pos = this.items.length;
+        if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){
+            this.items.add(c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, pos);
+        }
+        return c;
+    },
+
+    /**
+     * Inserts a Component into this Container at a specified index. Fires the
+     * {@link #beforeadd} event before inserting, then fires the {@link #add} event after the
+     * Component has been inserted.
+     * @param {Number} index The index at which the Component will be inserted
+     * into the Container's items collection
+     * @param {Ext.Component} component The child Component to insert.<br><br>
+     * Ext uses lazy rendering, and will only render the inserted Component should
+     * it become necessary.<br><br>
+     * A Component config object may be passed in order to avoid the overhead of
+     * constructing a real Component object if lazy rendering might mean that the
+     * inserted Component will not be rendered immediately. To take advantage of
+     * this 'lazy instantiation', set the {@link Ext.Component#xtype} config
+     * property to the registered type of the Component wanted.<br><br>
+     * For a list of all available xtypes, see {@link Ext.Component}.
+     * @return {Ext.Component} component The Component (or config object) that was
+     * inserted with the Container's default config values applied.
+     */
+    insert : function(index, comp){
+        this.initItems();
+        var a = arguments, len = a.length;
+        if(len > 2){
+            for(var i = len-1; i >= 1; --i) {
+                this.insert(index, a[i]);
+            }
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+
+        if(c.ownerCt == this && this.items.indexOf(c) < index){
+            --index;
+        }
+
+        if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){
+            this.items.insert(index, c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, index);
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(this.defaults){
+            if(typeof c == 'string'){
+                c = Ext.ComponentMgr.get(c);
+                Ext.apply(c, this.defaults);
+            }else if(!c.events){
+                Ext.applyIf(c, this.defaults);
+            }else{
+                Ext.apply(c, this.defaults);
+            }
+        }
+        return c;
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        if(item.ownerCt){
+            item.ownerCt.remove(item, false);
+        }
+        if(this.hideBorders === true){
+            item.border = (item.border === true);
+        }
+    },
+
+    /**
+     * Removes a component from this container.  Fires the {@link #beforeremove} event before removing, then fires
+     * the {@link #remove} event after the component has been removed.
+     * @param {Component/String} component The component reference or id to remove.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Ext.Component} component The Component that was removed.
+     */
+    remove : function(comp, autoDestroy){
+        this.initItems();
+        var c = this.getComponent(comp);
+        if(c && this.fireEvent('beforeremove', this, c) !== false){
+            this.items.remove(c);
+            delete c.ownerCt;
+            if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){
+                c.destroy();
+            }
+            if(this.layout && this.layout.activeItem == c){
+                delete this.layout.activeItem;
+            }
+            this.fireEvent('remove', this, c);
+        }
+        return c;
+    },
+
+    /**
+     * Removes all components from this container.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Array} Array of the destroyed components
+     */
+    removeAll: function(autoDestroy){
+        this.initItems();
+        var item, rem = [], items = [];
+        this.items.each(function(i){
+            rem.push(i);
+        });
+        for (var i = 0, len = rem.length; i < len; ++i){
+            item = rem[i];
+            this.remove(item, autoDestroy);
+            if(item.ownerCt !== this){
+                items.push(item);
+            }
+        }
+        return items;
+    },
+
+    /**
+     * Examines this container's <code>{@link #items}</code> <b>property</b>
+     * and gets a direct child component of this container.
+     * @param {String/Number} comp This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link #items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     * @return Ext.Component The component (if found).
+     */
+    getComponent : function(comp){
+        if(Ext.isObject(comp)){
+            return comp;
+        }
+        return this.items.get(comp);
+    },
+
+    // private
+    lookupComponent : function(comp){
+        if(typeof comp == 'string'){
+            return Ext.ComponentMgr.get(comp);
+        }else if(!comp.events){
+            return this.createComponent(comp);
+        }
+        return comp;
+    },
+
+    // private
+    createComponent : function(config){
+        return Ext.create(config, this.defaultType);
+    },
+
+    /**
+     * Force this container's layout to be recalculated. A call to this function is required after adding a new component
+     * to an already rendered container, or possibly after changing sizing/position properties of child components.
+     * @param {Boolean} shallow (optional) True to only calc the layout of this component, and let child components auto
+     * calc layouts as required (defaults to false, which calls doLayout recursively for each subcontainer)
+     * @param {Boolean} force (optional) True to force a layout to occur, even if the item is hidden.
+     * @return {Ext.Container} this
+     */
+    doLayout: function(shallow, force){
+        var rendered = this.rendered,
+            forceLayout = this.forceLayout;
+
+        if(!this.isVisible() || this.collapsed){
+            this.deferLayout = this.deferLayout || !shallow;
+            if(!(force || forceLayout)){
+                return;
+            }
+            shallow = shallow && !this.deferLayout;
+        } else {
+            delete this.deferLayout;
+        }
+        if(rendered && this.layout){
+            this.layout.layout();
+        }
+        if(shallow !== true && this.items){
+            var cs = this.items.items;
+            for(var i = 0, len = cs.length; i < len; i++){
+                var c = cs[i];
+                if(c.doLayout){
+                    c.forceLayout = forceLayout;
+                    c.doLayout();
+                }
+            }
+        }
+        if(rendered){
+            this.onLayout(shallow, force);
+        }
+        delete this.forceLayout;
+    },
+
+    //private
+    onLayout : Ext.emptyFn,
+
+    onShow : function(){
+        Ext.Container.superclass.onShow.call(this);
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+    },
+
+    /**
+     * Returns the layout currently in use by the container.  If the container does not currently have a layout
+     * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout.
+     * @return {ContainerLayout} layout The container's layout
+     */
+    getLayout : function(){
+        if(!this.layout){
+            var layout = new Ext.layout.ContainerLayout(this.layoutConfig);
+            this.setLayout(layout);
+        }
+        return this.layout;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.items){
+            Ext.destroy.apply(Ext, this.items.items);
+        }
+        if(this.monitorResize){
+            Ext.EventManager.removeResizeListener(this.doLayout, this);
+        }
+        Ext.destroy(this.layout);
+        Ext.Container.superclass.beforeDestroy.call(this);
+    },
+
+    /**
+     * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current component)
+     * @return {Ext.Container} this
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.ownerCt;
+        }
+        return this;
+    },
+
+    /**
+     * Cascades down the component/container heirarchy from this component (called first), calling the specified function with
+     * each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current component)
+     * @param {Array} args (optional) The args to call the function with (defaults to passing the current component)
+     * @return {Ext.Container} this
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            if(this.items){
+                var cs = this.items.items;
+                for(var i = 0, len = cs.length; i < len; i++){
+                    if(cs[i].cascade){
+                        cs[i].cascade(fn, scope, args);
+                    }else{
+                        fn.apply(scope || cs[i], args || [cs[i]]);
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Find a component under this container at any level by id
+     * @param {String} id
+     * @return Ext.Component
+     */
+    findById : function(id){
+        var m, ct = this;
+        this.cascade(function(c){
+            if(ct != c && c.id === id){
+                m = c;
+                return false;
+            }
+        });
+        return m || null;
+    },
+
+    /**
+     * Find a component under this container at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Array} Array of Ext.Components
+     */
+    findByType : function(xtype, shallow){
+        return this.findBy(function(c){
+            return c.isXType(xtype, shallow);
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by property
+     * @param {String} prop
+     * @param {String} value
+     * @return {Array} Array of Ext.Components
+     */
+    find : function(prop, value){
+        return this.findBy(function(c){
+            return c[prop] === value;
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by a custom function. If the passed function returns
+     * true, the component will be included in the results. The passed function is called with the arguments (component, this container).
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional)
+     * @return {Array} Array of Ext.Components
+     */
+    findBy : function(fn, scope){
+        var m = [], ct = this;
+        this.cascade(function(c){
+            if(ct != c && fn.call(scope || c, c, ct) === true){
+                m.push(c);
+            }
+        });
+        return m;
+    },
+
+    /**
+     * Get a component contained by this container (alias for items.get(key))
+     * @param {String/Number} key The index or id of the component
+     * @return {Ext.Component} Ext.Component
+     */
+    get : function(key){
+        return this.items.get(key);
+    }
+});
+
+Ext.Container.LAYOUTS = {};
+Ext.reg('container', Ext.Container);
+/**
+ * @class Ext.layout.ContainerLayout
+ * <p>The ContainerLayout class is the default layout manager delegated by {@link Ext.Container} to
+ * render any child Components when no <tt>{@link Ext.Container#layout layout}</tt> is configured into
+ * a {@link Ext.Container Container}. ContainerLayout provides the basic foundation for all other layout
+ * classes in Ext. It simply renders all child Components into the Container, performing no sizing or
+ * positioning services. To utilize a layout that provides sizing and positioning of child Components,
+ * specify an appropriate <tt>{@link Ext.Container#layout layout}</tt>.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ */
+Ext.layout.ContainerLayout = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.layout.ContainerLayout.prototype = {
+    /**
+     * @cfg {String} extraCls
+     * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
+     * customized styles to the container or any of its children using standard CSS rules. See
+     * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.</p>
+     * <p><b>Note</b>: <tt>extraCls</tt> defaults to <tt>''</tt> except for the following classes
+     * which assign a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.AbsoluteLayout Absolute Layout} : <tt>'x-abs-layout-item'</tt></li>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-item'</tt></li>
+     * <li>{@link Ext.layout.ColumnLayout Column Layout} : <tt>'x-column'</tt></li>
+     * </ul></div>
+     * To configure the above Classes with an extra CSS class append to the default.  For example,
+     * for ColumnLayout:<pre><code>
+     * extraCls: 'x-column custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} renderHidden
+     * True to hide each contained item on render (defaults to false).
+     */
+
+    /**
+     * A reference to the {@link Ext.Component} that is active.  For example, <pre><code>
+     * if(myPanel.layout.activeItem.id == 'item-1') { ... }
+     * </code></pre>
+     * <tt>activeItem</tt> only applies to layout styles that can display items one at a time
+     * (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout}
+     * and {@link Ext.layout.FitLayout}).  Read-only.  Related to {@link Ext.Container#activeItem}.
+     * @type {Ext.Component}
+     * @property activeItem
+     */
+
+    // private
+    monitorResize:false,
+    // private
+    activeItem : null,
+
+    // private
+    layout : function(){
+        var target = this.container.getLayoutTarget();
+        this.onLayout(this.container, target);
+        this.container.fireEvent('afterlayout', this.container, this);
+    },
+
+    // private
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+    },
+
+    // private
+    isValidParent : function(c, target){
+		return target && c.getDomPositionEl().dom.parentNode == (target.dom || target);
+    },
+
+    // private
+    renderAll : function(ct, target){
+        var items = ct.items.items;
+        for(var i = 0, len = items.length; i < len; i++) {
+            var c = items[i];
+            if(c && (!c.rendered || !this.isValidParent(c, target))){
+                this.renderItem(c, i, target);
+            }
+        }
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(target, position);
+            this.configureItem(c, position);
+        }else if(c && !this.isValidParent(c, target)){
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getDomPositionEl().dom, position || null);
+            c.container = target;
+            this.configureItem(c, position);
+        }
+    },
+    
+    // private
+    configureItem: function(c, position){
+        if(this.extraCls){
+            var t = c.getPositionEl ? c.getPositionEl() : c;
+            t.addClass(this.extraCls);
+        }
+        if (this.renderHidden && c != this.activeItem) {
+            c.hide();
+        }
+        if(c.doLayout){
+            c.doLayout(false, this.forceLayout);
+        }
+    },
+
+    // private
+    onResize: function(){
+        if(this.container.collapsed){
+            return;
+        }
+        var b = this.container.bufferResize;
+        if(b){
+            if(!this.resizeTask){
+                this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this);
+                this.resizeBuffer = typeof b == 'number' ? b : 100;
+            }
+            this.resizeTask.delay(this.resizeBuffer);
+        }else{
+            this.runLayout();
+        }
+    },
+    
+    // private
+    runLayout: function(){
+        this.layout();
+        this.container.onLayout();
+    },
+
+    // private
+    setContainer : function(ct){
+        if(this.monitorResize && ct != this.container){
+            if(this.container){
+                this.container.un('resize', this.onResize, this);
+                this.container.un('bodyresize', this.onResize, this);
+            }
+            if(ct){
+                ct.on({
+                    scope: this,
+                    resize: this.onResize,
+                    bodyresize: this.onResize
+                });
+            }
+        }
+        this.container = ct;
+    },
+
+    // private
+    parseMargins : function(v){
+        if(typeof v == 'number'){
+            v = v.toString();
+        }
+        var ms = v.split(' ');
+        var len = ms.length;
+        if(len == 1){
+            ms[1] = ms[0];
+            ms[2] = ms[0];
+            ms[3] = ms[0];
+        }
+        if(len == 2){
+            ms[2] = ms[0];
+            ms[3] = ms[1];
+        }
+        if(len == 3){
+            ms[3] = ms[1];
+        }
+        return {
+            top:parseInt(ms[0], 10) || 0,
+            right:parseInt(ms[1], 10) || 0,
+            bottom:parseInt(ms[2], 10) || 0,
+            left:parseInt(ms[3], 10) || 0
+        };
+    },
+
+    /**
+     * The {@link Template Ext.Template} used by Field rendering layout classes (such as
+     * {@link Ext.layout.FormLayout}) to create the DOM structure of a fully wrapped,
+     * labeled and styled form Field. A default Template is supplied, but this may be
+     * overriden to create custom field structures. The template processes values returned from
+     * {@link Ext.layout.FormLayout#getTemplateArgs}.
+     * @property fieldTpl
+     * @type Ext.Template
+     */
+    fieldTpl: (function() {
+        var t = new Ext.Template(
+            '<div class="x-form-item {itemCls}" tabIndex="-1">',
+                '<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
+                '<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">',
+                '</div><div class="{clearCls}"></div>',
+            '</div>'
+        );
+        t.disableFormats = true;
+        return t.compile();
+    })(),
+	
+    /*
+     * Destroys this layout. This is a template method that is empty by default, but should be implemented
+     * by subclasses that require explicit destruction to purge event handlers or remove DOM nodes.
+     * @protected
+     */
+    destroy : Ext.emptyFn
+};
+Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout;/**
+ * @class Ext.layout.FitLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a base class for layouts that contain <b>a single item</b> that automatically expands to fill the layout's
+ * container.  This class is intended to be extended or created via the <tt>layout:'fit'</tt> {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>FitLayout does not have any direct config options (other than inherited ones).  To fit a panel to a container
+ * using FitLayout, simply set layout:'fit' on the container and add a single panel to it.  If the container has
+ * multiple panels, only the first one will be displayed.  Example usage:</p>
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Fit Layout',
+    layout:'fit',
+    items: {
+        title: 'Inner Panel',
+        html: '&lt;p&gt;This is the inner panel content&lt;/p&gt;',
+        border: false
+    }
+});
+</code></pre>
+ */
+Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target);
+        if(!this.container.collapsed){
+            var sz = (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getViewSize() : target.getStyleSize();
+            this.setItemSize(this.activeItem || ct.items.itemAt(0), sz);
+        }
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(item && size.height > 0){ // display none?
+            item.setSize(size);
+        }
+    }
+});
+Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;/**
+ * @class Ext.layout.CardLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be
+ * visible at any given time.  This layout style is most commonly used for wizards, tab implementations, etc.
+ * This class is intended to be extended or created via the layout:'card' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>The CardLayout's focal method is {@link #setActiveItem}.  Since only one panel is displayed at a time,
+ * the only way to move from one Component to the next is by calling setActiveItem, passing the id or index of
+ * the next panel to display.  The layout itself does not provide a user interface for handling this navigation,
+ * so that functionality must be provided by the developer.</p>
+ * <p>In the following example, a simplistic wizard setup is demonstrated.  A button bar is added
+ * to the footer of the containing panel to provide navigation buttons.  The buttons will be handled by a
+ * common navigation routine -- for this example, the implementation of that routine has been ommitted since
+ * it can be any type of custom logic.  Note that other uses of a CardLayout (like a tab control) would require a
+ * completely different implementation.  For serious implementations, a better approach would be to extend
+ * CardLayout to provide the custom functionality needed.  Example usage:</p>
+ * <pre><code>
+var navHandler = function(direction){
+    // This routine could contain business logic required to manage the navigation steps.
+    // It would call setActiveItem as needed, manage navigation button state, handle any
+    // branching logic that might be required, handle alternate actions like cancellation
+    // or finalization, etc.  A complete wizard implementation could get pretty
+    // sophisticated depending on the complexity required, and should probably be
+    // done as a subclass of CardLayout in a real-world implementation.
+};
+
+var card = new Ext.Panel({
+    title: 'Example Wizard',
+    layout:'card',
+    activeItem: 0, // make sure the active item is set on the container config!
+    bodyStyle: 'padding:15px',
+    defaults: {
+        // applied to each contained panel
+        border:false
+    },
+    // just an example of one possible navigation scheme, using buttons
+    bbar: [
+        {
+            id: 'move-prev',
+            text: 'Back',
+            handler: navHandler.createDelegate(this, [-1]),
+            disabled: true
+        },
+        '->', // greedy spacer so that the buttons are aligned to each side
+        {
+            id: 'move-next',
+            text: 'Next',
+            handler: navHandler.createDelegate(this, [1])
+        }
+    ],
+    // the panels (or "cards") within the layout
+    items: [{
+        id: 'card-0',
+        html: '&lt;h1&gt;Welcome to the Wizard!&lt;/h1&gt;&lt;p&gt;Step 1 of 3&lt;/p&gt;'
+    },{
+        id: 'card-1',
+        html: '&lt;p&gt;Step 2 of 3&lt;/p&gt;'
+    },{
+        id: 'card-2',
+        html: '&lt;h1&gt;Congratulations!&lt;/h1&gt;&lt;p&gt;Step 3 of 3 - Complete&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} deferredRender
+     * True to render each contained item at the time it becomes active, false to render all contained items
+     * as soon as the layout is rendered (defaults to false).  If there is a significant amount of content or
+     * a lot of heavy controls being rendered into panels that are not displayed by default, setting this to
+     * true might improve performance.
+     */
+    deferredRender : false,
+    
+    /**
+     * @cfg {Boolean} layoutOnCardChange
+     * True to force a layout of the active item when the active card is changed. Defaults to false.
+     */
+    layoutOnCardChange : false,
+
+    /**
+     * @cfg {Boolean} renderHidden @hide
+     */
+    // private
+    renderHidden : true,
+    
+    constructor: function(config){
+        Ext.layout.CardLayout.superclass.constructor.call(this, config);
+        this.forceLayout = (this.deferredRender === false);
+    },
+
+    /**
+     * Sets the active (visible) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(this.activeItem){
+                this.activeItem.hide();
+            }
+            this.activeItem = item;
+            item.show();
+            this.container.doLayout();
+            if(this.layoutOnCardChange && item.doLayout){
+                item.doLayout();
+            }
+        }
+    },
+
+    // private
+    renderAll : function(ct, target){
+        if(this.deferredRender){
+            this.renderItem(this.activeItem, undefined, target);
+        }else{
+            Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target);
+        }
+    }
+});
+Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;/**
+ * @class Ext.layout.AnchorLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a layout that enables anchoring of contained elements relative to the container's dimensions.
+ * If the container is resized, all anchored items are automatically rerendered according to their
+ * <b><tt>{@link #anchor}</tt></b> rules.</p>
+ * <p>This class is intended to be extended or created via the layout:'anchor' {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>AnchorLayout does not have any direct config options (other than inherited ones). By default,
+ * AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the
+ * container using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>.
+ * If anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating
+ * anchor measurements based on it instead, allowing the container to be sized independently of the anchoring
+ * logic if necessary.  For example:</p>
+ * <pre><code>
+var viewport = new Ext.Viewport({
+    layout:'anchor',
+    anchorSize: {width:800, height:600},
+    items:[{
+        title:'Item 1',
+        html:'Content 1',
+        width:800,
+        anchor:'right 20%'
+    },{
+        title:'Item 2',
+        html:'Content 2',
+        width:300,
+        anchor:'50% 30%'
+    },{
+        title:'Item 3',
+        html:'Content 3',
+        width:600,
+        anchor:'-100 50%'
+    }]
+});
+ * </code></pre>
+ */
+Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {String} anchor
+     * <p>This configuation option is to be applied to <b>child <tt>items</tt></b> of a container managed by
+     * this layout (ie. configured with <tt>layout:'anchor'</tt>).</p><br/>
+     * 
+     * <p>This value is what tells the layout how an item should be anchored to the container. <tt>items</tt>
+     * added to an AnchorLayout accept an anchoring-specific config property of <b>anchor</b> which is a string
+     * containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').
+     * The following types of anchor values are supported:<div class="mdetail-params"><ul>
+     * 
+     * <li><b>Percentage</b> : Any value between 1 and 100, expressed as a percentage.<div class="sub-desc">
+     * The first anchor is the percentage width that the item should take up within the container, and the
+     * second is the percentage height.  For example:<pre><code>
+// two values specified
+anchor: '100% 50%' // render item complete width of the container and
+                   // 1/2 height of the container
+// one value specified
+anchor: '100%'     // the width value; the height will default to auto
+     * </code></pre></div></li>
+     * 
+     * <li><b>Offsets</b> : Any positive or negative integer value.<div class="sub-desc">
+     * This is a raw adjustment where the first anchor is the offset from the right edge of the container,
+     * and the second is the offset from the bottom edge. For example:<pre><code>
+// two values specified
+anchor: '-50 -100' // render item the complete width of the container
+                   // minus 50 pixels and
+                   // the complete height minus 100 pixels.
+// one value specified
+anchor: '-50'      // anchor value is assumed to be the right offset value
+                   // bottom offset will default to 0
+     * </code></pre></div></li>
+     * 
+     * <li><b>Sides</b> : Valid values are <tt>'right'</tt> (or <tt>'r'</tt>) and <tt>'bottom'</tt>
+     * (or <tt>'b'</tt>).<div class="sub-desc">
+     * Either the container must have a fixed size or an anchorSize config value defined at render time in
+     * order for these to have any effect.</div></li>
+     *
+     * <li><b>Mixed</b> : <div class="sub-desc">
+     * Anchor values can also be mixed as needed.  For example, to render the width offset from the container
+     * right edge by 50 pixels and 75% of the container's height use:
+     * <pre><code>
+anchor: '-50 75%' 
+     * </code></pre></div></li>
+     * 
+     * 
+     * </ul></div>
+     */
+    
+    // private
+    monitorResize:true,
+
+    // private
+    getAnchorViewSize : function(ct, target){
+        return target.dom == document.body ?
+                   target.getViewSize() : target.getStyleSize();
+    },
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target);
+
+        var size = this.getAnchorViewSize(ct, target);
+
+        var w = size.width, h = size.height;
+
+        if(w < 20 && h < 20){
+            return;
+        }
+
+        // find the container anchoring size
+        var aw, ah;
+        if(ct.anchorSize){
+            if(typeof ct.anchorSize == 'number'){
+                aw = ct.anchorSize;
+            }else{
+                aw = ct.anchorSize.width;
+                ah = ct.anchorSize.height;
+            }
+        }else{
+            aw = ct.initialConfig.width;
+            ah = ct.initialConfig.height;
+        }
+
+        var cs = ct.items.items, len = cs.length, i, c, a, cw, ch;
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.anchor){
+                a = c.anchorSpec;
+                if(!a){ // cache all anchor values
+                    var vs = c.anchor.split(' ');
+                    c.anchorSpec = a = {
+                        right: this.parseAnchor(vs[0], c.initialConfig.width, aw),
+                        bottom: this.parseAnchor(vs[1], c.initialConfig.height, ah)
+                    };
+                }
+                cw = a.right ? this.adjustWidthAnchor(a.right(w), c) : undefined;
+                ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h), c) : undefined;
+
+                if(cw || ch){
+                    c.setSize(cw || undefined, ch || undefined);
+                }
+            }
+        }
+    },
+
+    // private
+    parseAnchor : function(a, start, cstart){
+        if(a && a != 'none'){
+            var last;
+            if(/^(r|right|b|bottom)$/i.test(a)){   // standard anchor
+                var diff = cstart - start;
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return v - diff;
+                    }
+                }
+            }else if(a.indexOf('%') != -1){
+                var ratio = parseFloat(a.replace('%', ''))*.01;   // percentage
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return Math.floor(v*ratio);
+                    }
+                }
+            }else{
+                a = parseInt(a, 10);
+                if(!isNaN(a)){                            // simple offset adjustment
+                    return function(v){
+                        if(v !== last){
+                            last = v;
+                            return v + a;
+                        }
+                    }
+                }
+            }
+        }
+        return false;
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return value;
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout;/**
+ * @class Ext.layout.ColumnLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is the layout style of choice for creating structural layouts in a multi-column format where the width of
+ * each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content.
+ * This class is intended to be extended or created via the layout:'column' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>ColumnLayout does not have any direct config options (other than inherited ones), but it does support a
+ * specific config property of <b><tt>columnWidth</tt></b> that can be included in the config of any panel added to it.  The
+ * layout will use the columnWidth (if present) or width of each panel during layout to determine how to size each panel.
+ * If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).</p>
+ * <p>The width property is always evaluated as pixels, and must be a number greater than or equal to 1.
+ * The columnWidth property is always evaluated as a percentage, and must be a decimal value greater than 0 and
+ * less than 1 (e.g., .25).</p>
+ * <p>The basic rules for specifying column widths are pretty simple.  The logic makes two passes through the
+ * set of contained panels.  During the first layout pass, all panels that either have a fixed width or none
+ * specified (auto) are skipped, but their widths are subtracted from the overall container width.  During the second
+ * pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on
+ * the total <b>remaining</b> container width.  In other words, percentage width panels are designed to fill the space
+ * left over by all the fixed-width and/or auto-width panels.  Because of this, while you can specify any number of columns
+ * with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your
+ * layout may not render as expected.  Example usage:</p>
+ * <pre><code>
+// All columns are percentages -- they must add up to 1
+var p = new Ext.Panel({
+    title: 'Column Layout - Percentage Only',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        columnWidth: .25 
+    },{
+        title: 'Column 2',
+        columnWidth: .6
+    },{
+        title: 'Column 3',
+        columnWidth: .15
+    }]
+});
+
+// Mix of width and columnWidth -- all columnWidth values must add up
+// to 1. The first column will take up exactly 120px, and the last two
+// columns will fill the remaining container width.
+var p = new Ext.Panel({
+    title: 'Column Layout - Mixed',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        width: 120
+    },{
+        title: 'Column 2',
+        columnWidth: .8
+    },{
+        title: 'Column 3',
+        columnWidth: .2
+    }]
+});
+</code></pre>
+ */
+Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    
+    extraCls: 'x-column',
+
+    scrollOffset : 0,
+
+    // private
+    isValidParent : function(c, target){
+        return (c.getPositionEl ? c.getPositionEl() : c.getEl()).dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.innerCt){
+            target.addClass('x-column-layout-ct');
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:'x-column-inner'});
+            this.innerCt.createChild({cls:'x-clear'});
+        }
+        this.renderAll(ct, this.innerCt);
+
+        var size = Ext.isIE && target.dom != Ext.getBody().dom ? target.getStyleSize() : target.getViewSize();
+
+        if(size.width < 1 && size.height < 1){ // display none?
+            return;
+        }
+
+        var w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            pw = w;
+
+        this.innerCt.setWidth(w);
+        
+        // some columns can be percentages while others are fixed
+        // so we need to make 2 passes
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(!c.columnWidth){
+                pw -= (c.getSize().width + c.getEl().getMargins('lr'));
+            }
+        }
+
+        pw = pw < 0 ? 0 : pw;
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.columnWidth){
+                c.setSize(Math.floor(c.columnWidth*pw) - c.getEl().getMargins('lr'));
+            }
+        }
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout;/**
+ * @class Ext.layout.BorderLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a multi-pane, application-oriented UI layout style that supports multiple
+ * nested panels, automatic {@link Ext.layout.BorderLayout.Region#split split} bars between
+ * {@link Ext.layout.BorderLayout.Region#BorderLayout.Region regions} and built-in
+ * {@link Ext.layout.BorderLayout.Region#collapsible expanding and collapsing} of regions.</p>
+ * <p>This class is intended to be extended or created via the <tt>layout:'border'</tt>
+ * {@link Ext.Container#layout} config, and should generally not need to be created directly
+ * via the new keyword.</p>
+ * <p>BorderLayout does not have any direct config options (other than inherited ones).
+ * All configuration options available for customizing the BorderLayout are at the
+ * {@link Ext.layout.BorderLayout.Region} and {@link Ext.layout.BorderLayout.SplitRegion}
+ * levels.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var myBorderPanel = new Ext.Panel({
+    {@link Ext.Component#renderTo renderTo}: document.body,
+    {@link Ext.BoxComponent#width width}: 700,
+    {@link Ext.BoxComponent#height height}: 500,
+    {@link Ext.Panel#title title}: 'Border Layout',
+    {@link Ext.Container#layout layout}: 'border',
+    {@link Ext.Container#items items}: [{
+        {@link Ext.Panel#title title}: 'South Region is resizable',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'south',     // position for region
+        {@link Ext.BoxComponent#height height}: 100,
+        {@link Ext.layout.BorderLayout.Region#split split}: true,         // enable resizing
+        {@link Ext.SplitBar#minSize minSize}: 75,         // defaults to {@link Ext.layout.BorderLayout.Region#minHeight 50} 
+        {@link Ext.SplitBar#maxSize maxSize}: 150,
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '0 5 5 5'
+    },{
+        // xtype: 'panel' implied by default
+        {@link Ext.Panel#title title}: 'West Region is collapsible',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}:'west',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 0 0 5',
+        {@link Ext.BoxComponent#width width}: 200,
+        {@link Ext.layout.BorderLayout.Region#collapsible collapsible}: true,   // make collapsible
+        {@link Ext.layout.BorderLayout.Region#cmargins cmargins}: '5 5 0 5', // adjust top margin when collapsed
+        {@link Ext.Component#id id}: 'west-region-container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.Panel#unstyled unstyled}: true
+    },{
+        {@link Ext.Panel#title title}: 'Center Region',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'center',     // center region is required, no width/height specified
+        {@link Ext.Component#xtype xtype}: 'container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 5 0 0'
+    }]
+});
+</code></pre>
+ * <p><b><u>Notes</u></b>:</p><div class="mdetail-params"><ul>
+ * <li>Any container using the BorderLayout <b>must</b> have a child item with <tt>region:'center'</tt>.
+ * The child item in the center region will always be resized to fill the remaining space not used by
+ * the other regions in the layout.</li>
+ * <li>Any child items with a region of <tt>west</tt> or <tt>east</tt> must have <tt>width</tt> defined
+ * (an integer representing the number of pixels that the region should take up).</li>
+ * <li>Any child items with a region of <tt>north</tt> or <tt>south</tt> must have <tt>height</tt> defined.</li>
+ * <li>The regions of a BorderLayout are <b>fixed at render time</b> and thereafter, its child Components may not be removed or added</b>.  To add/remove
+ * Components within a BorderLayout, have them wrapped by an additional Container which is directly
+ * managed by the BorderLayout.  If the region is to be collapsible, the Container used directly
+ * by the BorderLayout manager should be a Panel.  In the following example a Container (an Ext.Panel)
+ * is added to the west region:
+ * <div style="margin-left:16px"><pre><code>
+wrc = {@link Ext#getCmp Ext.getCmp}('west-region-container');
+wrc.{@link Ext.Panel#removeAll removeAll}();
+wrc.{@link Ext.Container#add add}({
+    title: 'Added Panel',
+    html: 'Some content'
+});
+wrc.{@link Ext.Container#doLayout doLayout}();
+ * </code></pre></div>
+ * </li>
+ * <li> To reference a {@link Ext.layout.BorderLayout.Region Region}:
+ * <div style="margin-left:16px"><pre><code>
+wr = myBorderPanel.layout.west;
+ * </code></pre></div>
+ * </li>
+ * </ul></div>
+ */
+Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    // private
+    rendered : false,
+
+    // private
+    onLayout : function(ct, target){
+        var collapsed;
+        if(!this.rendered){
+            target.addClass('x-border-layout-ct');
+            var items = ct.items.items;
+            collapsed = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                var c = items[i];
+                var pos = c.region;
+                if(c.collapsed){
+                    collapsed.push(c);
+                }
+                c.collapsed = false;
+                if(!c.rendered){
+                    c.cls = c.cls ? c.cls +' x-border-panel' : 'x-border-panel';
+                    c.render(target, i);
+                }
+                this[pos] = pos != 'center' && c.split ?
+                    new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) :
+                    new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos);
+                this[pos].render(target, c);
+            }
+            this.rendered = true;
+        }
+
+        var size = target.getViewSize();
+        if(size.width < 20 || size.height < 20){ // display none?
+            if(collapsed){
+                this.restoreCollapsed = collapsed;
+            }
+            return;
+        }else if(this.restoreCollapsed){
+            collapsed = this.restoreCollapsed;
+            delete this.restoreCollapsed;
+        }
+
+        var w = size.width, h = size.height;
+        var centerW = w, centerH = h, centerY = 0, centerX = 0;
+
+        var n = this.north, s = this.south, west = this.west, e = this.east, c = this.center;
+        if(!c && Ext.layout.BorderLayout.WARN !== false){
+            throw 'No center region defined in BorderLayout ' + ct.id;
+        }
+
+        if(n && n.isVisible()){
+            var b = n.getSize();
+            var m = n.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            b.y = m.top;
+            centerY = b.height + b.y + m.bottom;
+            centerH -= centerY;
+            n.applyLayout(b);
+        }
+        if(s && s.isVisible()){
+            var b = s.getSize();
+            var m = s.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            var totalHeight = (b.height + m.top + m.bottom);
+            b.y = h - totalHeight + m.top;
+            centerH -= totalHeight;
+            s.applyLayout(b);
+        }
+        if(west && west.isVisible()){
+            var b = west.getSize();
+            var m = west.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            b.x = m.left;
+            b.y = centerY + m.top;
+            var totalWidth = (b.width + m.left + m.right);
+            centerX += totalWidth;
+            centerW -= totalWidth;
+            west.applyLayout(b);
+        }
+        if(e && e.isVisible()){
+            var b = e.getSize();
+            var m = e.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            var totalWidth = (b.width + m.left + m.right);
+            b.x = w - totalWidth + m.left;
+            b.y = centerY + m.top;
+            centerW -= totalWidth;
+            e.applyLayout(b);
+        }
+        if(c){
+            var m = c.getMargins();
+            var centerBox = {
+                x: centerX + m.left,
+                y: centerY + m.top,
+                width: centerW - (m.left+m.right),
+                height: centerH - (m.top+m.bottom)
+            };
+            c.applyLayout(centerBox);
+        }
+        if(collapsed){
+            for(var i = 0, len = collapsed.length; i < len; i++){
+                collapsed[i].collapse(false);
+            }
+        }
+        if(Ext.isIE && Ext.isStrict){ // workaround IE strict repainting issue
+            target.repaint();
+        }
+    },
+
+    destroy: function() {
+        var r = ['north', 'south', 'east', 'west'];
+        for (var i = 0; i < r.length; i++) {
+            var region = this[r[i]];
+            if(region){
+                if(region.destroy){
+                    region.destroy();
+                }else if (region.split){
+                    region.split.destroy(true);
+                }
+            }
+        }
+        Ext.layout.BorderLayout.superclass.destroy.call(this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.BorderLayout.Region
+ * <p>This is a region of a {@link Ext.layout.BorderLayout BorderLayout} that acts as a subcontainer
+ * within the layout.  Each region has its own {@link Ext.layout.ContainerLayout layout} that is
+ * independent of other regions and the containing BorderLayout, and can be any of the
+ * {@link Ext.layout.ContainerLayout valid Ext layout types}.</p>
+ * <p>Region size is managed automatically and cannot be changed by the user -- for
+ * {@link #split resizable regions}, see {@link Ext.layout.BorderLayout.SplitRegion}.</p>
+ * @constructor
+ * Create a new Region.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: <tt>north</tt>, <tt>south</tt>,
+ * <tt>east</tt>, <tt>west</tt> and <tt>center</tt>.  Every {@link Ext.layout.BorderLayout BorderLayout}
+ * <b>must have a center region</b> for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.Region = function(layout, config, pos){
+    Ext.apply(this, config);
+    this.layout = layout;
+    this.position = pos;
+    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 || {},
+                pos == 'north' || pos == 'south' ? this.defaultNSCMargins : this.defaultEWCMargins);
+        }
+    }
+};
+
+Ext.layout.BorderLayout.Region.prototype = {
+    /**
+     * @cfg {Boolean} animFloat
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel that will close again once the user mouses out of that panel (or clicks out if
+     * <tt>{@link #autoHide} = false</tt>).  Setting <tt>{@link #animFloat} = false</tt> will
+     * prevent the open and close of these floated panels from being animated (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {Boolean} autoHide
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel.  If <tt>autoHide = true</tt>, the panel will automatically hide after the user mouses
+     * out of the panel.  If <tt>autoHide = false</tt>, the panel will continue to display until the
+     * user clicks outside of the panel (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {String} collapseMode
+     * <tt>collapseMode</tt> supports two configuration values:<div class="mdetail-params"><ul>
+     * <li><b><tt>undefined</tt></b> (default)<div class="sub-desc">By default, {@link #collapsible}
+     * regions are collapsed by clicking the expand/collapse tool button that renders into the region's
+     * title bar.</div></li>
+     * <li><b><tt>'mini'</tt></b><div class="sub-desc">Optionally, when <tt>collapseMode</tt> is set to
+     * <tt>'mini'</tt> the region's split bar will also display a small collapse button in the center of
+     * the bar. In <tt>'mini'</tt> mode the region will collapse to a thinner bar than in normal mode.
+     * </div></li>
+     * </ul></div></p>
+     * <p><b>Note</b>: if a collapsible region does not have a title bar, then set <tt>collapseMode =
+     * 'mini'</tt> and <tt>{@link #split} = true</tt> in order for the region to be {@link #collapsible}
+     * by the user as the expand/collapse tool button (that would go in the title bar) will not be rendered.</p>
+     * <p>See also <tt>{@link #cmargins}</tt>.</p>
+     */
+    /**
+     * @cfg {Object} margins
+     * An object containing margins to apply to the region when in the expanded state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} cmargins
+     * An object containing margins to apply to the region when in the collapsed state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values.</p>
+     * <p><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></p>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <p><tt>true</tt> to allow the user to collapse this region (defaults to <tt>false</tt>).  If
+     * <tt>true</tt>, an expand/collapse tool button will automatically be rendered into the title
+     * bar of the region, otherwise the button will not be shown.</p>
+     * <p><b>Note</b>: that a title bar is required to display the collapse/expand toggle button -- if
+     * no <tt>title</tt> is specified for the region's panel, the region will only be collapsible if
+     * <tt>{@link #collapseMode} = 'mini'</tt> and <tt>{@link #split} = true</tt>.
+     */
+    collapsible : false,
+    /**
+     * @cfg {Boolean} split
+     * <p><tt>true</tt> to create a {@link Ext.layout.BorderLayout.SplitRegion SplitRegion} and 
+     * display a 5px wide {@link Ext.SplitBar} between this region and its neighbor, allowing the user to
+     * resize the regions dynamically.  Defaults to <tt>false</tt> creating a
+     * {@link Ext.layout.BorderLayout.Region Region}.</p><br>
+     * <p><b>Notes</b>:</p><div class="mdetail-params"><ul>
+     * <li>this configuration option is ignored if <tt>region='center'</tt></li> 
+     * <li>when <tt>split == true</tt>, it is common to specify a
+     * <tt>{@link Ext.SplitBar#minSize minSize}</tt> and <tt>{@link Ext.SplitBar#maxSize maxSize}</tt>
+     * for the {@link Ext.BoxComponent BoxComponent} representing the region. These are not native
+     * configs of {@link Ext.BoxComponent BoxComponent}, and are used only by this class.</li>
+     * <li>if <tt>{@link #collapseMode} = 'mini'</tt> requires <tt>split = true</tt> to reserve space
+     * for the collapse tool</tt></li> 
+     * </ul></div> 
+     */
+    split:false,
+    /**
+     * @cfg {Boolean} floatable
+     * <tt>true</tt> to allow clicking a collapsed region's bar to display the region's panel floated
+     * above the layout, <tt>false</tt> to force the user to fully expand a collapsed region by
+     * clicking the expand button to see it again (defaults to <tt>true</tt>).
+     */
+    floatable: true,
+    /**
+     * @cfg {Number} minWidth
+     * <p>The minimum allowable width in pixels for this region (defaults to <tt>50</tt>).
+     * <tt>maxWidth</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minWidth</tt> / <tt>maxWidth</tt>.</p>
+     */
+    minWidth:50,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum allowable height in pixels for this region (defaults to <tt>50</tt>)
+     * <tt>maxHeight</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minHeight</tt> / <tt>maxHeight</tt>.</p>
+     */
+    minHeight:50,
+
+    // private
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    // private
+    defaultNSCMargins : {left:5,top:5,right:5,bottom:5},
+    // private
+    defaultEWCMargins : {left:5,top:0,right:5,bottom:0},
+    floatingZIndex: 100,
+
+    /**
+     * True if this region is collapsed. Read-only.
+     * @type Boolean
+     * @property
+     */
+    isCollapsed : false,
+
+    /**
+     * This region's panel.  Read-only.
+     * @type Ext.Panel
+     * @property panel
+     */
+    /**
+     * This region's layout.  Read-only.
+     * @type Layout
+     * @property layout
+     */
+    /**
+     * This region's layout position (north, south, east, west or center).  Read-only.
+     * @type String
+     * @property position
+     */
+
+    // private
+    render : function(ct, p){
+        this.panel = p;
+        p.el.enableDisplayMode();
+        this.targetEl = ct;
+        this.el = p.el;
+
+        var gs = p.getState, ps = this.position;
+        p.getState = function(){
+            return Ext.apply(gs.call(p) || {}, this.state);
+        }.createDelegate(this);
+
+        if(ps != 'center'){
+            p.allowQueuedExpand = false;
+            p.on({
+                beforecollapse: this.beforeCollapse,
+                collapse: this.onCollapse,
+                beforeexpand: this.beforeExpand,
+                expand: this.onExpand,
+                hide: this.onHide,
+                show: this.onShow,
+                scope: this
+            });
+            if(this.collapsible || this.floatable){
+                p.collapseEl = 'el';
+                p.slideAnchor = this.getSlideAnchor();
+            }
+            if(p.tools && p.tools.toggle){
+                p.tools.toggle.addClass('x-tool-collapse-'+ps);
+                p.tools.toggle.addClassOnOver('x-tool-collapse-'+ps+'-over');
+            }
+        }
+    },
+
+    // private
+    getCollapsedEl : function(){
+        if(!this.collapsedEl){
+            if(!this.toolTemplate){
+                var tt = new Ext.Template(
+                     '<div class="x-tool x-tool-{id}">&#160;</div>'
+                );
+                tt.disableFormats = true;
+                tt.compile();
+                Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt;
+            }
+            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 {
+                if(this.collapsible !== false && !this.hideCollapseTool) {
+                    var t = this.toolTemplate.append(
+                            this.collapsedEl.dom,
+                            {id:'expand-'+this.position}, true);
+                    t.addClassOnOver('x-tool-expand-'+this.position+'-over');
+                    t.on('click', this.onExpandClick, this, {stopEvent:true});
+                }
+                if(this.floatable !== false || this.titleCollapse){
+                   this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
+                   this.collapsedEl.on("click", this[this.floatable ? 'collapseClick' : 'onExpandClick'], this);
+                }
+            }
+        }
+        return this.collapsedEl;
+    },
+
+    // private
+    onExpandClick : function(e){
+        if(this.isSlid){
+            this.afterSlideIn();
+            this.panel.expand(false);
+        }else{
+            this.panel.expand();
+        }
+    },
+
+    // private
+    onCollapseClick : function(e){
+        this.panel.collapse();
+    },
+
+    // private
+    beforeCollapse : function(p, animate){
+        this.lastAnim = animate;
+        if(this.splitEl){
+            this.splitEl.hide();
+        }
+        this.getCollapsedEl().show();
+        this.panel.el.setStyle('z-index', 100);
+        this.isCollapsed = true;
+        this.layout.layout();
+    },
+
+    // private
+    onCollapse : function(animate){
+        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:.2});
+        }
+        this.state.collapsed = true;
+        this.panel.saveState();
+    },
+
+    // private
+    beforeExpand : function(animate){
+        var c = this.getCollapsedEl();
+        this.el.show();
+        if(this.position == 'east' || this.position == 'west'){
+            this.panel.setSize(undefined, c.getHeight());
+        }else{
+            this.panel.setSize(c.getWidth(), undefined);
+        }
+        c.hide();
+        c.dom.style.visibility = 'hidden';
+        this.panel.el.setStyle('z-index', this.floatingZIndex);
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    collapseClick : function(e){
+        if(this.isSlid){
+           e.stopPropagation();
+           this.slideIn();
+        }else{
+           e.stopPropagation();
+           this.slideOut();
+        }
+    },
+
+    // private
+    onHide : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().hide();
+        }else if(this.splitEl){
+            this.splitEl.hide();
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().show();
+        }else if(this.splitEl){
+            this.splitEl.show();
+        }
+    },
+
+    /**
+     * True if this region is currently visible, else false.
+     * @return {Boolean}
+     */
+    isVisible : function(){
+        return !this.panel.hidden;
+    },
+
+    /**
+     * Returns the current margins for this region.  If the region is collapsed, the
+     * {@link #cmargins} (collapsed margins) value will be returned, otherwise the
+     * {@link #margins} value will be returned.
+     * @return {Object} An object containing the element's margins: <tt>{left: (left
+     * margin), top: (top margin), right: (right margin), bottom: (bottom margin)}</tt>
+     */
+    getMargins : function(){
+        return this.isCollapsed && this.cmargins ? this.cmargins : this.margins;
+    },
+
+    /**
+     * Returns the current size of this region.  If the region is collapsed, the size of the
+     * collapsedEl will be returned, otherwise the size of the region's panel will be returned.
+     * @return {Object} An object containing the element's size: <tt>{width: (element width),
+     * height: (element height)}</tt>
+     */
+    getSize : function(){
+        return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize();
+    },
+
+    /**
+     * Sets the specified panel as the container element for this region.
+     * @param {Ext.Panel} panel The new panel
+     */
+    setPanel : function(panel){
+        this.panel = panel;
+    },
+
+    /**
+     * Returns the minimum allowable width for this region.
+     * @return {Number} The minimum width
+     */
+    getMinWidth: function(){
+        return this.minWidth;
+    },
+
+    /**
+     * Returns the minimum allowable height for this region.
+     * @return {Number} The minimum height
+     */
+    getMinHeight: function(){
+        return this.minHeight;
+    },
+
+    // private
+    applyLayoutCollapsed : function(box){
+        var ce = this.getCollapsedEl();
+        ce.setLeftTop(box.x, box.y);
+        ce.setSize(box.width, box.height);
+    },
+
+    // private
+    applyLayout : function(box){
+        if(this.isCollapsed){
+            this.applyLayoutCollapsed(box);
+        }else{
+            this.panel.setPosition(box.x, box.y);
+            this.panel.setSize(box.width, box.height);
+        }
+    },
+
+    // private
+    beforeSlide: function(){
+        this.panel.beforeEffect();
+    },
+
+    // private
+    afterSlide : function(){
+        this.panel.afterEffect();
+    },
+
+    // private
+    initAutoHide : function(){
+        if(this.autoHide !== false){
+            if(!this.autoHideHd){
+                var st = new Ext.util.DelayedTask(this.slideIn, this);
+                this.autoHideHd = {
+                    "mouseout": function(e){
+                        if(!e.within(this.el, true)){
+                            st.delay(500);
+                        }
+                    },
+                    "mouseover" : function(e){
+                        st.cancel();
+                    },
+                    scope : this
+                };
+            }
+            this.el.on(this.autoHideHd);
+        }
+    },
+
+    // private
+    clearAutoHide : function(){
+        if(this.autoHide !== false){
+            this.el.un("mouseout", this.autoHideHd.mouseout);
+            this.el.un("mouseover", this.autoHideHd.mouseover);
+        }
+    },
+
+    // private
+    clearMonitor : function(){
+        Ext.getDoc().un("click", this.slideInIf, this);
+    },
+
+    /**
+     * If this Region is {@link #floatable}, this method slides this Region into full visibility <i>over the top
+     * of the center Region</i> where it floats until either {@link #slideIn} is called, or other regions of the layout
+     * are clicked, or the mouse exits the Region.
+     */
+    slideOut : function(){
+        if(this.isSlid || this.el.hasActiveFx()){
+            return;
+        }
+        this.isSlid = true;
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.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", this.floatingZIndex+2);
+        this.panel.el.replaceClass('x-panel-collapsed', 'x-panel-floating');
+        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);
+        }
+    },
+
+    // private
+    afterSlideIn : function(){
+        this.clearAutoHide();
+        this.isSlid = false;
+        this.clearMonitor();
+        this.el.setStyle("z-index", "");
+        this.panel.el.replaceClass('x-panel-floating', 'x-panel-collapsed');
+        this.el.dom.style.left = this.restoreLT[0];
+        this.el.dom.style.top = this.restoreLT[1];
+
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.toggle.show();
+        }
+    },
+
+    /**
+     * If this Region is {@link #floatable}, and this Region has been slid into floating visibility, then this method slides
+     * this region back into its collapsed state.
+     */
+    slideIn : function(cb){
+        if(!this.isSlid || this.el.hasActiveFx()){
+            Ext.callback(cb);
+            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(cb);
+                },
+                scope: this,
+                block: true
+            });
+        }else{
+            this.el.hide();
+            this.afterSlideIn();
+        }
+    },
+
+    // private
+    slideInIf : function(e){
+        if(!e.within(this.el)){
+            this.slideIn();
+        }
+    },
+
+    // private
+    anchors : {
+        "west" : "left",
+        "east" : "right",
+        "north" : "top",
+        "south" : "bottom"
+    },
+
+    // private
+    sanchors : {
+        "west" : "l",
+        "east" : "r",
+        "north" : "t",
+        "south" : "b"
+    },
+
+    // private
+    canchors : {
+        "west" : "tl-tr",
+        "east" : "tr-tl",
+        "north" : "tl-bl",
+        "south" : "bl-tl"
+    },
+
+    // private
+    getAnchor : function(){
+        return this.anchors[this.position];
+    },
+
+    // private
+    getCollapseAnchor : function(){
+        return this.canchors[this.position];
+    },
+
+    // private
+    getSlideAnchor : function(){
+        return this.sanchors[this.position];
+    },
+
+    // private
+    getAlignAdj : function(){
+        var cm = 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;
+        }
+    },
+
+    // private
+    getExpandAdj : function(){
+        var c = this.collapsedEl, cm = this.cmargins;
+        switch(this.position){
+            case "west":
+                return [-(cm.right+c.getWidth()+cm.left), 0];
+            break;
+            case "east":
+                return [cm.right+c.getWidth()+cm.left, 0];
+            break;
+            case "north":
+                return [0, -(cm.top+cm.bottom+c.getHeight())];
+            break;
+            case "south":
+                return [0, cm.top+cm.bottom+c.getHeight()];
+            break;
+        }
+    }
+};
+
+/**
+ * @class Ext.layout.BorderLayout.SplitRegion
+ * @extends Ext.layout.BorderLayout.Region
+ * <p>This is a specialized type of {@link Ext.layout.BorderLayout.Region BorderLayout region} that
+ * has a built-in {@link Ext.SplitBar} for user resizing of regions.  The movement of the split bar
+ * is configurable to move either {@link #tickSize smooth or incrementally}.</p>
+ * @constructor
+ * Create a new SplitRegion.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: north, south, east, west and center.  Every
+ * BorderLayout must have a center region for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){
+    Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos);
+    // prevent switch
+    this.applyLayout = this.applyFns[pos];
+};
+
+Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, {
+    /**
+     * @cfg {Number} tickSize
+     * The increment, in pixels by which to move this Region's {@link Ext.SplitBar SplitBar}.
+     * By default, the {@link Ext.SplitBar SplitBar} moves smoothly.
+     */
+    /**
+     * @cfg {String} splitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible non-collapsible} region's split bar
+     * (defaults to <tt>"Drag to resize."</tt>).  Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    splitTip : "Drag to resize.",
+    /**
+     * @cfg {String} collapsibleSplitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible collapsible} region's split bar
+     * (defaults to "Drag to resize. Double click to hide."). Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    collapsibleSplitTip : "Drag to resize. Double click to hide.",
+    /**
+     * @cfg {Boolean} useSplitTips
+     * <tt>true</tt> to display a tooltip when the user hovers over a region's split bar
+     * (defaults to <tt>false</tt>).  The tooltip text will be the value of either
+     * <tt>{@link #splitTip}</tt> or <tt>{@link #collapsibleSplitTip}</tt> as appropriate.
+     */
+    useSplitTips : false,
+
+    // private
+    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'
+        }
+    },
+
+    // private
+    applyFns : {
+        west : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            this.panel.setPosition(box.x, box.y);
+            var sw = sd.offsetWidth;
+            s.left = (box.x+box.width-sw)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        east : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sw = sd.offsetWidth;
+            this.panel.setPosition(box.x+sw, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        north : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y+box.height-sh)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        },
+        south : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y+sh);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        }
+    },
+
+    // private
+    render : function(ct, p){
+        Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p);
+
+        var ps = this.position;
+
+        this.splitEl = ct.createChild({
+            cls: "x-layout-split x-layout-split-"+ps, html: "&#160;",
+            id: this.panel.id + '-xsplit'
+        });
+
+        if(this.collapseMode == 'mini'){
+            this.miniSplitEl = this.splitEl.createChild({
+                cls: "x-layout-mini x-layout-mini-"+ps, html: "&#160;"
+            });
+            this.miniSplitEl.addClassOnOver('x-layout-mini-over');
+            this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true});
+        }
+
+        var s = this.splitSettings[ps];
+
+        this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation);
+        this.split.tickSize = this.tickSize;
+        this.split.placement = s.placement;
+        this.split.getMaximumSize = this[s.maxFn].createDelegate(this);
+        this.split.minSize = this.minSize || this[s.minProp];
+        this.split.on("beforeapply", this.onSplitMove, this);
+        this.split.useShim = this.useShim === true;
+        this.maxSize = this.maxSize || this[s.maxProp];
+
+        if(p.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);
+        }
+    },
+
+    //docs inherit from superclass
+    getSize : function(){
+        if(this.isCollapsed){
+            return this.collapsedEl.getSize();
+        }
+        var s = this.panel.getSize();
+        if(this.position == 'north' || this.position == 'south'){
+            s.height += this.splitEl.dom.offsetHeight;
+        }else{
+            s.width += this.splitEl.dom.offsetWidth;
+        }
+        return s;
+    },
+
+    // private
+    getHMaxSize : function(){
+         var cmax = this.maxSize || 10000;
+         var center = this.layout.center;
+         return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth());
+    },
+
+    // private
+    getVMaxSize : function(){
+        var cmax = this.maxSize || 10000;
+        var center = this.layout.center;
+        return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight());
+    },
+
+    // private
+    onSplitMove : function(split, newSize){
+        var s = this.panel.getSize();
+        this.lastSplitSize = newSize;
+        if(this.position == 'north' || this.position == 'south'){
+            this.panel.setSize(s.width, newSize);
+            this.state.height = newSize;
+        }else{
+            this.panel.setSize(newSize, s.height);
+            this.state.width = newSize;
+        }
+        this.layout.layout();
+        this.panel.saveState();
+        return false;
+    },
+
+    /**
+     * Returns a reference to the split bar in use by this region.
+     * @return {Ext.SplitBar} The split bar
+     */
+    getSplitBar : function(){
+        return this.split;
+    },
+
+    // inherit docs
+    destroy : function() {
+        Ext.destroy(
+            this.miniSplitEl,
+            this.split,
+            this.splitEl
+        );
+    }
+});
+
+Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout;/**
+ * @class Ext.layout.FormLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This layout manager is specifically designed for rendering and managing child Components of
+ * {@link Ext.form.FormPanel forms}. It is responsible for rendering the labels of
+ * {@link Ext.form.Field Field}s.</p>
+ *
+ * <p>This layout manager is used when a Container is configured with the <tt>layout:'form'</tt>
+ * {@link Ext.Container#layout layout} config option, and should generally not need to be created directly
+ * via the new keyword. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ *
+ * <p>In an application, it will usually be preferrable to use a {@link Ext.form.FormPanel FormPanel}
+ * (which is configured with FormLayout as its layout class by default) since it also provides built-in
+ * functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form.</p>
+ *
+ * <p>A {@link Ext.Container Container} <i>using</i> the FormLayout layout manager (e.g.
+ * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) can also accept the following
+ * layout-specific config properties:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.form.FormPanel#hideLabels hideLabels}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelAlign labelAlign}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelPad labelPad}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelWidth labelWidth}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component (including Fields) managed by FormLayout accepts the following as a config option:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#anchor anchor}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component managed by FormLayout may be rendered as a form field (with an associated label) by
+ * configuring it with a non-null <b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b>. Components configured
+ * in this way may be configured with the following options which affect the way the FormLayout renders them:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#clearCls clearCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#hideLabel hideLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#itemCls itemCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelStyle labelStyle}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Example usage:</p>
+ * <pre><code>
+// Required if showing validation messages
+Ext.QuickTips.init();
+
+// While you can create a basic Panel with layout:'form', practically
+// you should usually use a FormPanel to also get its form functionality
+// since it already creates a FormLayout internally.
+var form = new Ext.form.FormPanel({
+    title: 'Form Layout',
+    bodyStyle: 'padding:15px',
+    width: 350,
+    defaultType: 'textfield',
+    defaults: {
+        // applied to each contained item
+        width: 230,
+        msgTarget: 'side'
+    },
+    items: [{
+            fieldLabel: 'First Name',
+            name: 'first',
+            allowBlank: false,
+            {@link Ext.Component#labelSeparator labelSeparator}: ':' // override labelSeparator layout config
+        },{
+            fieldLabel: 'Last Name',
+            name: 'last'
+        },{
+            fieldLabel: 'Email',
+            name: 'email',
+            vtype:'email'
+        }, {
+            xtype: 'textarea',
+            hideLabel: true,     // override hideLabels layout config
+            name: 'msg',
+            anchor: '100% -53'
+        }
+    ],
+    buttons: [
+        {text: 'Save'},
+        {text: 'Cancel'}
+    ],
+    layoutConfig: {
+        {@link #labelSeparator}: '~' // superseded by assignment below
+    },
+    // config options applicable to container when layout='form':
+    hideLabels: false,
+    labelAlign: 'left',   // or 'right' or 'top'
+    {@link Ext.form.FormPanel#labelSeparator labelSeparator}: '>>', // takes precedence over layoutConfig value
+    labelWidth: 65,       // defaults to 100
+    labelPad: 8           // defaults to 5, must specify labelWidth to be honored
+});
+</code></pre>
+ */
+Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.form.FormPanel}.{@link Ext.form.FormPanel#labelSeparator labelSeparator}.  Configuration
+     * of this property at the <b>container</b> level takes precedence.
+     */
+    labelSeparator : ':',
+
+    /**
+     * Read only. The CSS style specification string added to field labels in this layout if not
+     * otherwise {@link Ext.Component#labelStyle specified by each contained field}.
+     * @type String
+     * @property labelStyle
+     */
+
+    // private
+    setContainer : function(ct){
+        Ext.layout.FormLayout.superclass.setContainer.call(this, ct);
+        if(ct.labelAlign){
+            ct.addClass('x-form-label-'+ct.labelAlign);
+        }
+
+        if(ct.hideLabels){
+            this.labelStyle = "display:none";
+            this.elementStyle = "padding-left:0;";
+            this.labelAdjust = 0;
+        }else{
+            this.labelSeparator = ct.labelSeparator || this.labelSeparator;
+            ct.labelWidth = ct.labelWidth || 100;
+            if(typeof ct.labelWidth == 'number'){
+                var pad = (typeof ct.labelPad == 'number' ? ct.labelPad : 5);
+                this.labelAdjust = ct.labelWidth+pad;
+                this.labelStyle = "width:"+ct.labelWidth+"px;";
+                this.elementStyle = "padding-left:"+(ct.labelWidth+pad)+'px';
+            }
+            if(ct.labelAlign == 'top'){
+                this.labelStyle = "width:auto;";
+                this.labelAdjust = 0;
+                this.elementStyle = "padding-left:0;";
+            }
+        }
+    },
+
+    //private
+    getLabelStyle: function(s){
+        var ls = '', items = [this.labelStyle, s];
+        for (var i = 0, len = items.length; i < len; ++i){
+            if (items[i]){
+                ls += items[i];
+                if (ls.substr(-1, 1) != ';'){
+                    ls += ';'
+                }
+            }
+        }
+        return ls;
+    },
+
+    /**
+     * @cfg {Ext.Template} fieldTpl
+     * A {@link Ext.Template#compile compile}d {@link Ext.Template} for rendering
+     * the fully wrapped, labeled and styled form Field. Defaults to:</p><pre><code>
+new Ext.Template(
+    &#39;&lt;div class="x-form-item {itemCls}" tabIndex="-1">&#39;,
+        &#39;&lt;&#108;abel for="{id}" style="{labelStyle}" class="x-form-item-&#108;abel">{&#108;abel}{labelSeparator}&lt;/&#108;abel>&#39;,
+        &#39;&lt;div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">&#39;,
+        &#39;&lt;/div>&lt;div class="{clearCls}">&lt;/div>&#39;,
+    '&lt;/div>'
+);
+</code></pre>
+     * <p>This may be specified to produce a different DOM structure when rendering form Fields.</p>
+     * <p>A description of the properties within the template follows:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * <p>Also see <tt>{@link #getTemplateArgs}</tt></p>
+     */
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
+            var args = this.getTemplateArgs(c);
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position] || null;
+            }
+            if(position){
+                this.fieldTpl.insertBefore(position, args);
+            }else{
+                this.fieldTpl.append(target, args);
+            }
+            c.render('x-form-el-'+c.id);
+        }else {
+            Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments);
+        }
+    },
+
+    /**
+     * <p>Provides template arguments for rendering the fully wrapped, labeled and styled form Field.</p>
+     * <p>This method returns an object hash containing properties used by the layout's {@link #fieldTpl}
+     * to create a correctly wrapped, labeled and styled form Field. This may be overriden to
+     * create custom layouts. The properties which must be returned are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * @param field The {@link Field Ext.form.Field} being rendered.
+     * @return An object hash containing the properties required to render the Field.
+     */
+    getTemplateArgs: function(field) {
+        var noLabelSep = !field.fieldLabel || field.hideLabel;
+        return {
+            id: field.id,
+            label: field.fieldLabel,
+            labelStyle: field.labelStyle||this.labelStyle||'',
+            elementStyle: this.elementStyle||'',
+            labelSeparator: noLabelSep ? '' : (typeof field.labelSeparator == 'undefined' ? this.labelSeparator : field.labelSeparator),
+            itemCls: (field.itemCls||this.container.itemCls||'') + (field.hideLabel ? ' x-hide-label' : ''),
+            clearCls: field.clearCls || 'x-form-clear-left'
+        };
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value - (comp.isFormField || comp.fieldLabel  ? (comp.hideLabel ? 0 : this.labelAdjust) : 0);
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout;/**
+ * @class Ext.layout.AccordionLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This is a layout that contains multiple panels in an expandable accordion style such that only
+ * <b>one panel can be open at any given time</b>.  Each panel has built-in support for expanding and collapsing.
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var accordion = new Ext.Panel({
+    title: 'Accordion Layout',
+    layout:'accordion',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle: 'padding:15px'
+    },
+    layoutConfig: {
+        // layout-specific configs go here
+        titleCollapse: false,
+        animate: true,
+        activeOnTop: true
+    },
+    items: [{
+        title: 'Panel 1',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 2',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 3',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} fill
+     * True to adjust the active item's height to fill the available space in the container, false to use the
+     * item's current height, or auto height if not explicitly set (defaults to true).
+     */
+    fill : true,
+    /**
+     * @cfg {Boolean} autoWidth
+     * True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).
+     * Note that some components, in particular the {@link Ext.grid.GridPanel grid}, will not function properly within
+     * layouts if they have auto width, so in such cases this config should be set to false.
+     */
+    autoWidth : true,
+    /**
+     * @cfg {Boolean} titleCollapse
+     * True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow
+     * expand/collapse only when the toggle tool button is clicked (defaults to true).  When set to false,
+     * {@link #hideCollapseTool} should be false also.
+     */
+    titleCollapse : true,
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false).
+     * When set to true, {@link #titleCollapse} should be true also.
+     */
+    hideCollapseTool : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools
+     * in the contained panels' title bars, false to render it last (defaults to false).
+     */
+    collapseFirst : false,
+    /**
+     * @cfg {Boolean} animate
+     * True to slide the contained panels open and closed during expand/collapse using animation, false to open and
+     * close directly with no animation (defaults to false).  Note: to defer to the specific config setting of each
+     * contained panel for this property, set this to undefined at the layout level.
+     */
+    animate : false,
+    /**
+     * @cfg {Boolean} sequence
+     * <b>Experimental</b>. If animate is set to true, this will result in each animation running in sequence.
+     */
+    sequence : false,
+    /**
+     * @cfg {Boolean} activeOnTop
+     * True to swap the position of each panel as it is expanded so that it becomes the first item in the container,
+     * false to keep the panels in the rendered order. <b>This is NOT compatible with "animate:true"</b> (defaults to false).
+     */
+    activeOnTop : false,
+
+    renderItem : function(c){
+        if(this.animate === false){
+            c.animCollapse = false;
+        }
+        c.collapsible = true;
+        if(this.autoWidth){
+            c.autoWidth = true;
+        }
+        if(this.titleCollapse){
+            c.titleCollapse = true;
+        }
+        if(this.hideCollapseTool){
+            c.hideCollapseTool = true;
+        }
+        if(this.collapseFirst !== undefined){
+            c.collapseFirst = this.collapseFirst;
+        }
+        if(!this.activeItem && !c.collapsed){
+            this.activeItem = c;
+        }else if(this.activeItem && this.activeItem != c){
+            c.collapsed = true;
+        }
+        Ext.layout.AccordionLayout.superclass.renderItem.apply(this, arguments);
+        c.header.addClass('x-accordion-hd');
+        c.on('beforeexpand', this.beforeExpand, this);
+    },
+
+    // private
+    beforeExpand : function(p, anim){
+        var ai = this.activeItem;
+        if(ai){
+            if(this.sequence){
+                delete this.activeItem;
+                if (!ai.collapsed){
+                    ai.collapse({callback:function(){
+                        p.expand(anim || true);
+                    }, scope: this});
+                    return false;
+                }
+            }else{
+                ai.collapse(this.animate);
+            }
+        }
+        this.activeItem = p;
+        if(this.activeOnTop){
+            p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild);
+        }
+        this.layout();
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(this.fill && item){
+            var hh = 0;
+            this.container.items.each(function(p){
+                if(p != item){
+                    hh += p.header.getHeight();
+                }    
+            });
+            size.height -= hh;
+            item.setSize(size);
+        }
+    },
+
+    /**
+     * Sets the active (expanded) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(item.rendered && item.collapsed){
+                item.expand();
+            }else{
+                this.activeItem = item;
+            }
+        }
+
+    }
+});
+Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout;
+
+//backwards compat
+Ext.layout.Accordion = Ext.layout.AccordionLayout;/**
+ * @class Ext.layout.TableLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This layout allows you to easily render content into an HTML table.  The total number of columns can be
+ * specified, and rowspan and colspan can be used to create complex layouts within the table.
+ * This class is intended to be extended or created via the layout:'table' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>Note that when creating a layout via config, the layout-specific config properties must be passed in via
+ * the {@link Ext.Container#layoutConfig} object which will then be applied internally to the layout.  In the
+ * case of TableLayout, the only valid layout config property is {@link #columns}.  However, the items added to a
+ * TableLayout can supply the following table-specific config properties:</p>
+ * <ul>
+ * <li><b>rowspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>colspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>cellId</b> An id applied to the table cell containing the item.</li>
+ * <li><b>cellCls</b> A CSS class name added to the table cell containing the item.</li>
+ * </ul>
+ * <p>The basic concept of building up a TableLayout is conceptually very similar to building up a standard
+ * HTML table.  You simply add each panel (or "cell") that you want to include along with any span attributes
+ * specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts.
+ * Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the
+ * total column count in the layoutConfig and start adding panels in their natural order from left to right,
+ * top to bottom.  The layout will automatically figure out, based on the column count, rowspans and colspans,
+ * how to position each panel within the table.  Just like with HTML tables, your rowspans and colspans must add
+ * up correctly in your overall layout or you'll end up with missing and/or extra cells!  Example usage:</p>
+ * <pre><code>
+// This code will generate a layout table that is 3 columns by 2 rows
+// with some spanning included.  The basic layout will be:
+// +--------+-----------------+
+// |   A    |   B             |
+// |        |--------+--------|
+// |        |   C    |   D    |
+// +--------+--------+--------+
+var table = new Ext.Panel({
+    title: 'Table Layout',
+    layout:'table',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle:'padding:20px'
+    },
+    layoutConfig: {
+        // The total column count must be specified here
+        columns: 3
+    },
+    items: [{
+        html: '&lt;p&gt;Cell A content&lt;/p&gt;',
+        rowspan: 2
+    },{
+        html: '&lt;p&gt;Cell B content&lt;/p&gt;',
+        colspan: 2
+    },{
+        html: '&lt;p&gt;Cell C content&lt;/p&gt;',
+        cellCls: 'highlight'
+    },{
+        html: '&lt;p&gt;Cell D content&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Number} columns
+     * The total number of columns to create in the table for this layout.  If not specified, all Components added to
+     * this layout will be rendered into a single row using one column per Component.
+     */
+
+    // private
+    monitorResize:false,
+
+    /**
+     * @cfg {Object} tableAttrs
+     * <p>An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification
+     * used to create the layout's <tt>&lt;table&gt;</tt> element. Example:</p><pre><code>
+{
+    xtype: 'panel',
+    layout: 'table',
+    layoutConfig: {
+        tableAttrs: {
+        	style: {
+        		width: '100%'
+        	}
+        },
+        columns: 3
+    }
+}</code></pre>
+     */
+    tableAttrs:null,
+    
+    // private
+    setContainer : function(ct){
+        Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
+
+        this.currentRow = 0;
+        this.currentColumn = 0;
+        this.cells = [];
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.table){
+            target.addClass('x-table-layout-ct');
+
+            this.table = target.createChild(
+                Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
+        }
+        this.renderAll(ct, target);
+    },
+
+    // private
+    getRow : function(index){
+        var row = this.table.tBodies[0].childNodes[index];
+        if(!row){
+            row = document.createElement('tr');
+            this.table.tBodies[0].appendChild(row);
+        }
+        return row;
+    },
+
+    // private
+    getNextCell : function(c){
+        var cell = this.getNextNonSpan(this.currentColumn, this.currentRow);
+        var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1];
+        for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){
+            if(!this.cells[rowIndex]){
+                this.cells[rowIndex] = [];
+            }
+            for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){
+                this.cells[rowIndex][colIndex] = true;
+            }
+        }
+        var td = document.createElement('td');
+        if(c.cellId){
+            td.id = c.cellId;
+        }
+        var cls = 'x-table-layout-cell';
+        if(c.cellCls){
+            cls += ' ' + c.cellCls;
+        }
+        td.className = cls;
+        if(c.colspan){
+            td.colSpan = c.colspan;
+        }
+        if(c.rowspan){
+            td.rowSpan = c.rowspan;
+        }
+        this.getRow(curRow).appendChild(td);
+        return td;
+    },
+    
+    // private
+    getNextNonSpan: function(colIndex, rowIndex){
+        var cols = this.columns;
+        while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) {
+            if(cols && colIndex >= cols){
+                rowIndex++;
+                colIndex = 0;
+            }else{
+                colIndex++;
+            }
+        }
+        return [colIndex, rowIndex];
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(this.getNextCell(c));
+            if(this.extraCls){
+                var t = c.getPositionEl ? c.getPositionEl() : c;
+                t.addClass(this.extraCls);
+            }
+        }
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;/**
+ * @class Ext.layout.AbsoluteLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
+ * ability for x/y positioning using the standard x and y component config options.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var form = new Ext.form.FormPanel({
+    title: 'Absolute Layout',
+    layout:'absolute',
+    layoutConfig: {
+        // layout-specific configs go here
+        extraCls: 'x-abs-layout-item',
+    },
+    baseCls: 'x-plain',
+    url:'save-form.php',
+    defaultType: 'textfield',
+    items: [{
+        x: 0,
+        y: 5,
+        xtype:'label',
+        text: 'Send To:'
+    },{
+        x: 60,
+        y: 0,
+        name: 'to',
+        anchor:'100%'  // anchor width by percentage
+    },{
+        x: 0,
+        y: 35,
+        xtype:'label',
+        text: 'Subject:'
+    },{
+        x: 60,
+        y: 30,
+        name: 'subject',
+        anchor: '100%'  // anchor width by percentage
+    },{
+        x:0,
+        y: 60,
+        xtype: 'textarea',
+        name: 'msg',
+        anchor: '100% 100%'  // anchor width and height
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    extraCls: 'x-abs-layout-item',
+
+    onLayout : function(ct, target){
+        target.position();
+        this.paddingLeft = target.getPadding('l');
+        this.paddingTop = target.getPadding('t');
+
+        Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return  value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;
+/**
+ * @class Ext.layout.BoxLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.</p>
+ */
+Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Object} defaultMargins
+     * <p>If the individual contained items do not have a <tt>margins</tt>
+     * property specified, the default margins from this property will be
+     * applied to each item.</p>
+     * <br><p>This property may be specified as an object containing margins
+     * to apply in the format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>This property may also be specified as a string containing
+     * space-separated, numeric margin values. The order of the sides associated
+     * with each value matches the way CSS processes margin values:</p>
+     * <div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the
+     * first value and the right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left
+     * and right are set to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and
+     * left, respectively.</li>
+     * </ul></div>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    /**
+     * @cfg {String} padding
+     * Defaults to <tt>'0'</tt>. Sets the padding to be applied to all child items managed by this
+     * container's layout. 
+     */
+    padding : '0',
+    // documented in subclasses
+    pack : 'start',
+
+    // private
+    monitorResize : true,
+    scrollOffset : 0,
+    extraCls : 'x-box-item',
+    ctCls : 'x-box-layout-ct',
+    innerCls : 'x-box-inner',
+
+    // private
+    isValidParent : function(c, target){
+        return c.getEl().dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm;
+
+        if(!this.innerCt){
+            target.addClass(this.ctCls);
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:this.innerCls});
+            this.padding = this.parseMargins(this.padding); 
+        }
+        this.renderAll(ct, this.innerCt);
+    },
+
+    // private
+    renderItem : function(c){
+        if(typeof c.margins == 'string'){
+            c.margins = this.parseMargins(c.margins);
+        }else if(!c.margins){
+            c.margins = this.defaultMargins;
+        }
+        Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments);
+    },
+
+    getTargetSize : function(target){
+        return (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getStyleSize() : target.getViewSize();
+    },
+    
+    getItems: function(ct){
+        var items = [];
+        ct.items.each(function(c){
+            if(c.isVisible()){
+                items.push(c);
+            }
+        });
+        return items;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.VBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items vertically
+ */
+Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>left</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned horizontally
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are aligned horizontally at the
+     * <b>mid-width</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched horizontally to fill
+     * the width of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched horizontally to
+     * the size of the largest item.</div></li>
+     * </ul></div>
+     */
+    align : 'left', // left, center, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>top</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-height</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>bottom</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>vertically</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.VBoxLayout.superclass.onLayout.call(this, ct, target);
+                    
+        
+        var cs = this.getItems(ct), cm, ch, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchWidth = w - (this.padding.left + this.padding.right),
+            extraHeight = 0,
+            maxWidth = 0,
+            totalFlex = 0,
+            flexHeight = 0,
+            usedHeight = 0;
+            
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            ch = c.getHeight();
+            margin = cm.top + cm.bottom;
+            extraHeight += ch + margin;
+            flexHeight += margin + (c.flex ? 0 : ch);
+            maxWidth = Math.max(maxWidth, c.getWidth() + cm.left + cm.right);
+        });
+        extraHeight = h - extraHeight - this.padding.top - this.padding.bottom;
+        
+        var innerCtWidth = maxWidth + this.padding.left + this.padding.right;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'left':
+                this.innerCt.setSize(innerCtWidth, h);
+                break;
+            case 'center':
+                this.innerCt.setSize(w = Math.max(w, innerCtWidth), h);
+                break;
+        }
+
+        var availHeight = Math.max(0, h - this.padding.top - this.padding.bottom - flexHeight),
+            leftOver = availHeight,
+            heights = [],
+            restore = [],
+            idx = 0,
+            availableWidth = Math.max(0, w - this.padding.left - this.padding.right);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                ch = Math.floor(availHeight * (c.flex / totalFlex));
+                leftOver -= ch;
+                heights.push(ch);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            t += extraHeight ? extraHeight / 2 : 0;
+        }else if(this.pack == 'end'){
+            t += extraHeight;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            t += cm.top;
+            c.setPosition(l + cm.left, t);
+            if(isStart && c.flex){
+                ch = Math.max(0, heights[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getWidth());
+                }
+                c.setSize(availableWidth, ch);
+            }else{
+                ch = c.getHeight();
+            }
+            t += ch + cm.bottom;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setWidth((stretchWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setWidth((maxWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else{
+                if(this.align == 'center'){
+                    var diff = availableWidth - (c.getWidth() + cm.left + cm.right);
+                    if(diff > 0){
+                        c.setPosition(l + cm.left + (diff/2), c.y);
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setWidth(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout;
+
+/**
+ * @class Ext.layout.HBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items horizontally
+ */
+Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>top</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned vertically
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>middle</tt></b> : <div class="sub-desc">child items are aligned vertically at the
+     * <b>mid-height</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched vertically to fill
+     * the height of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched vertically to
+     * the size of the largest item.</div></li>
+     */
+    align : 'top', // top, middle, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>left</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-width</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>right</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>horizontally</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.HBoxLayout.superclass.onLayout.call(this, ct, target);
+        
+        var cs = this.getItems(ct), cm, cw, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchHeight = h - (this.padding.top + this.padding.bottom),
+            extraWidth = 0,
+            maxHeight = 0,
+            totalFlex = 0,
+            flexWidth = 0,
+            usedWidth = 0;
+        
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            cw = c.getWidth();
+            margin = cm.left + cm.right;
+            extraWidth += cw + margin;
+            flexWidth += margin + (c.flex ? 0 : cw);
+            maxHeight = Math.max(maxHeight, c.getHeight() + cm.top + cm.bottom);
+        });
+        extraWidth = w - extraWidth - this.padding.left - this.padding.right;
+        
+        var innerCtHeight = maxHeight + this.padding.top + this.padding.bottom;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'top':
+                this.innerCt.setSize(w, innerCtHeight);
+                break;
+            case 'middle':
+                this.innerCt.setSize(w, h = Math.max(h, innerCtHeight));
+                break;
+        }
+        
+
+        var availWidth = Math.max(0, w - this.padding.left - this.padding.right - flexWidth),
+            leftOver = availWidth,
+            widths = [],
+            restore = [],
+            idx = 0,
+            availableHeight = Math.max(0, h - this.padding.top - this.padding.bottom);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                cw = Math.floor(availWidth * (c.flex / totalFlex));
+                leftOver -= cw;
+                widths.push(cw);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            l += extraWidth ? extraWidth / 2 : 0;
+        }else if(this.pack == 'end'){
+            l += extraWidth;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            l += cm.left;
+            c.setPosition(l, t + cm.top);
+            if(isStart && c.flex){
+                cw = Math.max(0, widths[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getHeight());
+                }
+                c.setSize(cw, availableHeight);
+            }else{
+                cw = c.getWidth();
+            }
+            l += cw + cm.right;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            var cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setHeight((stretchHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setHeight((maxHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else{
+                if(this.align == 'middle'){
+                    var diff = availableHeight - (c.getHeight() + cm.top + cm.bottom);
+                    if(diff > 0){
+                        c.setPosition(c.x, t + cm.top + (diff/2));
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setHeight(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;
+/**
+ * @class Ext.Viewport
+ * @extends Ext.Container
+ * <p>A specialized container representing the viewable application area (the browser viewport).</p>
+ * <p>The Viewport renders itself to the document body, and automatically sizes itself to the size of
+ * the browser viewport and manages window resizing. There may only be one Viewport created
+ * in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s
+ * added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add}
+ * method of any of its child Panels may themselves have a layout.</p>
+ * <p>The Viewport does not provide scrolling, so child Panels within the Viewport should provide
+ * for scrolling if needed using the {@link #autoScroll} config.</p>
+ * <p>An example showing a classic application border layout:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'north',
+        html: '&lt;h1 class="x-panel-header">Page Title&lt;/h1>',
+        autoHeight: true,
+        border: false,
+        margins: '0 0 5 0'
+    }, {
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        width: 200
+        // the west region might typically utilize a {@link Ext.tree.TreePanel TreePanel} or a Panel with {@link Ext.layout.AccordionLayout Accordion layout} 
+    }, {
+        region: 'south',
+        title: 'Title for Panel',
+        collapsible: true,
+        html: 'Information goes here',
+        split: true,
+        height: 100,
+        minHeight: 100
+    }, {
+        region: 'east',
+        title: 'Title for the Grid Panel',
+        collapsible: true,
+        split: true,
+        width: 200,
+        xtype: 'grid',
+        // remaining grid configuration not shown ...
+        // notice that the GridPanel is added directly as the region
+        // it is not "overnested" inside another Panel
+    }, {
+        region: 'center',
+        xtype: 'tabpanel', // TabPanel itself has no title
+        items: {
+            title: 'Default Tab',
+            html: 'The first tab\'s content. Others may be added dynamically'
+        }
+    }]
+});
+</code></pre>
+ * @constructor
+ * Create a new Viewport
+ * @param {Object} config The config object
+ * @xtype viewport
+ */
+Ext.Viewport = Ext.extend(Ext.Container, {
+	/*
+	 * Privatize config options which, if used, would interfere with the
+	 * correct operation of the Viewport as the sole manager of the
+	 * layout of the document body.
+	 */
+    /**
+     * @cfg {Mixed} applyTo @hide
+	 */
+    /**
+     * @cfg {Boolean} allowDomMove @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Mixed} renderTo @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Number} height @hide
+	 */
+    /**
+     * @cfg {Number} width @hide
+	 */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} autoWidth @hide
+	 */
+    /**
+     * @cfg {Boolean} deferHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} monitorResize @hide
+	 */
+    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(w, h){
+        this.fireEvent('resize', this, w, h, w, h);
+    }
+});
+Ext.reg('viewport', Ext.Viewport);/**
+ * @class Ext.Panel
+ * @extends Ext.Container
+ * <p>Panel is a container that has specific functionality and structural components that make
+ * it the perfect building block for application-oriented user interfaces.</p>
+ * <p>Panels are, by virtue of their inheritance from {@link Ext.Container}, capable
+ * of being configured with a {@link Ext.Container#layout layout}, and containing child Components.</p>
+ * <p>When either specifying child {@link Ext.Component#items items} of a Panel, or dynamically {@link Ext.Container#add adding} Components
+ * to a Panel, remember to consider how you wish the Panel to arrange those child elements, and whether
+ * those child elements need to be sized using one of Ext's built-in <tt><b>{@link Ext.Container#layout layout}</b></tt> schemes. By
+ * default, Panels use the {@link Ext.layout.ContainerLayout ContainerLayout} scheme. This simply renders
+ * child components, appending them one after the other inside the Container, and <b>does not apply any sizing</b>
+ * at all.</p>
+ * <p>A Panel may also contain {@link #bbar bottom} and {@link #tbar top} toolbars, along with separate
+ * {@link #header}, {@link #footer} and {@link #body} sections (see {@link #frame} for additional
+ * information).</p>
+ * <p>Panel also provides built-in {@link #collapsible expandable and collapsible behavior}, along with
+ * a variety of {@link #tools prebuilt tool buttons} that can be wired up to provide other customized
+ * behavior.  Panels can be easily dropped into any {@link Ext.Container Container} or layout, and the
+ * layout and rendering pipeline is {@link Ext.Container#add completely managed by the framework}.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype panel
+ */
+Ext.Panel = Ext.extend(Ext.Container, {
+    /**
+     * The Panel's header {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the {@link #title} and {@link #tools}</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property header
+     */
+    /**
+     * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content.
+     * The content may be specified in the {@link #html} config, or it may be loaded using the
+     * {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only.
+     * <p>If this is used to load visible HTML elements in either way, then
+     * the Panel may not be used as a Layout for hosting nested Panels.</p>
+     * <p>If this Panel is intended to be used as the host of a Layout (See {@link #layout}
+     * then the body Element must not be loaded or changed - it is under the control
+     * of the Panel's Layout.
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property body
+     */
+    /**
+     * The Panel's bwrap {@link Ext.Element Element} used to contain other Panel elements
+     * (tbar, body, bbar, footer). See {@link #bodyCfg}. Read-only.
+     * @type Ext.Element
+     * @property bwrap
+     */
+    /**
+     * True if this panel is collapsed. Read-only.
+     * @type Boolean
+     * @property collapsed
+     */
+    /**
+     * @cfg {Object} bodyCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object may be specified for any
+     * Panel Element.</p>
+     * <p>By default, the Default element in the table below will be used for the html markup to
+     * create a child element with the commensurate Default class name (<tt>baseCls</tt> will be
+     * replaced by <tt>{@link #baseCls}</tt>):</p>
+     * <pre>
+     * Panel      Default  Default             Custom      Additional       Additional
+     * Element    element  class               element     class            style
+     * ========   ==========================   =========   ==============   ===========
+     * {@link #header}     div      {@link #baseCls}+'-header'   {@link #headerCfg}   headerCssClass   headerStyle
+     * {@link #bwrap}      div      {@link #baseCls}+'-bwrap'     {@link #bwrapCfg}    bwrapCssClass    bwrapStyle
+     * + tbar     div      {@link #baseCls}+'-tbar'       {@link #tbarCfg}     tbarCssClass     tbarStyle
+     * + {@link #body}     div      {@link #baseCls}+'-body'       {@link #bodyCfg}     {@link #bodyCssClass}     {@link #bodyStyle}
+     * + bbar     div      {@link #baseCls}+'-bbar'       {@link #bbarCfg}     bbarCssClass     bbarStyle
+     * + {@link #footer}   div      {@link #baseCls}+'-footer'   {@link #footerCfg}   footerCssClass   footerStyle
+     * </pre>
+     * <p>Configuring a Custom element may be used, for example, to force the {@link #body} Element
+     * to use a different form of markup than is created by default. An example of this might be
+     * to {@link Ext.Element#createChild create a child} Panel containing a custom content, such as
+     * a header, or forcing centering of all Panel content by having the body be a &lt;center&gt;
+     * element:</p>
+     * <pre><code>
+new Ext.Panel({
+    title: 'Message Title',
+    renderTo: Ext.getBody(),
+    width: 200, height: 130,
+    <b>bodyCfg</b>: {
+        tag: 'center',
+        cls: 'x-panel-body',  // Default class not applied if Custom element specified
+        html: 'Message'
+    },
+    footerCfg: {
+        tag: 'h2',
+        cls: 'x-panel-footer'        // same as the Default class
+        html: 'footer html'
+    },
+    footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass}
+    footerStyle:    'background-color:red' // see {@link #bodyStyle}
+});
+     * </code></pre>
+     * <p>The example above also explicitly creates a <tt>{@link #footer}</tt> with custom markup and
+     * styling applied.</p>
+     */
+    /**
+     * @cfg {Object} headerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #header} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bwrapCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bwrap} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} tbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #tbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} footerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #footer} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} closable
+     * Panels themselves do not directly support being closed, but some Panel subclasses do (like
+     * {@link Ext.Window}) or a Panel Class within an {@link Ext.TabPanel}.  Specify <tt>true</tt>
+     * to enable closing in such situations. Defaults to <tt>false</tt>.
+     */
+    /**
+     * The Panel's footer {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the Panel's <tt>{@link #buttons}</tt> or <tt>{@link #fbar}</tt>.</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property footer
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in
+     * the document that specifies some panel-specific structural markup.  When <tt>applyTo</tt> is used,
+     * constituent parts of the panel can be specified by CSS class name within the main element, and the panel
+     * will automatically create those components from that markup. Any required components not specified in the
+     * markup will be autogenerated if necessary.</p>
+     * <p>The following class names are supported (baseCls will be replaced by {@link #baseCls}):</p>
+     * <ul><li>baseCls + '-header'</li>
+     * <li>baseCls + '-header-text'</li>
+     * <li>baseCls + '-bwrap'</li>
+     * <li>baseCls + '-tbar'</li>
+     * <li>baseCls + '-body'</li>
+     * <li>baseCls + '-bbar'</li>
+     * <li>baseCls + '-footer'</li></ul>
+     * <p>Using this config, a call to render() is not required.  If applyTo is specified, any value passed for
+     * {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the
+     * panel's container.</p>
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * <p>The top toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the top toolbar after render, use {@link #getTopToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not</b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Object/Array} bbar
+     * <p>The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the bottom toolbar after render, use {@link #getBottomToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /** @cfg {Object/Array} fbar
+     * <p>A {@link Ext.Toolbar Toolbar} object, a Toolbar config, or an array of
+     * {@link Ext.Button Button}s/{@link Ext.Button Button} configs, describing a {@link Ext.Toolbar Toolbar} to be rendered into this Panel's footer element.</p>
+     * <p>After render, the <code>fbar</code> property will be an {@link Ext.Toolbar Toolbar} instance.</p>
+     * <p>If <tt>{@link #buttons}</tt> are specified, they will supersede the <tt>fbar</tt> configuration property.</p>
+     * The Panel's <tt>{@link #buttonAlign}</tt> configuration affects the layout of these items, for example:
+     * <pre><code>
+var w = new Ext.Window({
+    height: 250,
+    width: 500,
+    bbar: new Ext.Toolbar({
+        items: [{
+            text: 'bbar Left'
+        },'->',{
+            text: 'bbar Right'
+        }]
+    }),
+    {@link #buttonAlign}: 'left', // anything but 'center' or 'right' and you can use "-", and "->"
+                                  // to control the alignment of fbar items
+    fbar: [{
+        text: 'fbar Left'
+    },'->',{
+        text: 'fbar Right'
+    }]
+}).show();
+     * </code></pre>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Boolean} header
+     * <tt>true</tt> to create the Panel's header element explicitly, <tt>false</tt> to skip creating
+     * it.  If a <tt>{@link #title}</tt> is set the header will be created automatically, otherwise it will not.
+     * If a <tt>{@link #title}</tt> is set but <tt>header</tt> is explicitly set to <tt>false</tt>, the header
+     * will not be rendered.
+     */
+    /**
+     * @cfg {Boolean} footer
+     * <tt>true</tt> to create the footer element explicitly, false to skip creating it. The footer
+     * will be created automatically if <tt>{@link #buttons}</tt> or a <tt>{@link #fbar}</tt> have
+     * been configured.  See <tt>{@link #bodyCfg}</tt> for an example.
+     */
+    /**
+     * @cfg {String} title
+     * The title text to be used as innerHTML (html tags are accepted) to display in the panel
+     * <tt>{@link #header}</tt> (defaults to ''). When a <tt>title</tt> is specified the
+     * <tt>{@link #header}</tt> element will automatically be created and displayed unless
+     * {@link #header} is explicitly set to <tt>false</tt>.  If you do not want to specify a
+     * <tt>title</tt> at config time, but you may want one later, you must either specify a non-empty
+     * <tt>title</tt> (a blank space ' ' will do) or <tt>header:true</tt> so that the container
+     * element will get created.
+     */
+    /**
+     * @cfg {Array} buttons
+     * <tt>buttons</tt> will be used as <tt>{@link Ext.Container#items items}</tt> for the toolbar in
+     * the footer (<tt>{@link #fbar}</tt>). Typically the value of this configuration property will be
+     * an array of {@link Ext.Button}s or {@link Ext.Button} configuration objects.
+     * If an item is configured with <tt>minWidth</tt> or the Panel is configured with <tt>minButtonWidth</tt>,
+     * that width will be applied to the item.
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * A valid url spec according to the Updater {@link Ext.Updater#update} method.
+     * If autoLoad is not null, the panel will attempt to load its contents
+     * immediately upon render.<p>
+     * The URL will become the default URL for this panel's {@link #body} element,
+     * so it may be {@link Ext.Element#refresh refresh}ed at any time.</p>
+     */
+    /**
+     * @cfg {Boolean} frame
+     * <tt>false</tt> by default to render with plain 1px square borders. <tt>true</tt> to render with
+     * 9 elements, complete with custom rounded corners (also see {@link Ext.Element#boxWrap}).
+     * <p>The template generated for each condition is depicted below:</p><pre><code>
+     *
+// frame = false
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+
+    &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:false)&lt;/span>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+    &lt;/div>
+&lt;/div>
+
+// frame = true (create 9 elements)
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+    &lt;div class="x-panel-tl">&lt;div class="x-panel-tr">&lt;div class="x-panel-tc">
+        &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:true)&lt;/span>&lt;/div>
+    &lt;/div>&lt;/div>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-ml">&lt;div class="x-panel-mr">&lt;div class="x-panel-mc">
+            &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+        &lt;/div>&lt;/div>&lt;/div>
+
+        &lt;div class="x-panel-bl">&lt;div class="x-panel-br">&lt;div class="x-panel-bc"/>
+        &lt;/div>&lt;/div>&lt;/div>
+&lt;/div>
+     * </code></pre>
+     */
+    /**
+     * @cfg {Boolean} border
+     * True to display the borders of the panel's body element, false to hide them (defaults to true).  By default,
+     * the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false.
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * True to display an interior border on the body element of the panel, false to hide it (defaults to true).
+     * This only applies when {@link #border} == true.  If border == true and bodyBorder == false, the border will display
+     * as a 1px wide inset border, giving the entire body element an inset appearance.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyCssClass
+     * Additional css class selector to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#addClass} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyStyle
+     * Custom CSS styles to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#applyStyles} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'my-icon'
+
+// css class that specifies background image to be used as the icon image:
+.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
+     * the header tool button area, false to keep the panel statically sized with no button (defaults to false).
+     */
+    /**
+     * @cfg {Array} tools
+     * An array of tool button configs to be added to the header tool area. When rendered, each tool is
+     * stored as an {@link Ext.Element Element} referenced by a public property called <tt><b></b>tools.<i>&lt;tool-type&gt;</i></tt>
+     * <p>Each tool config may contain the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc"><b>Required.</b> The type
+     * of tool to create. By default, this assigns a CSS class of the form <tt>x-tool-<i>&lt;tool-type&gt;</i></tt> to the
+     * resulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below.
+     * The developer may implement custom tools by supplying alternate CSS rules and background images:
+     * <ul>
+     * <div class="x-tool x-tool-toggle" style="float:left; margin-right:5;"> </div><div><tt> toggle</tt> (Created by default when {@link #collapsible} is <tt>true</tt>)</div>
+     * <div class="x-tool x-tool-close" style="float:left; margin-right:5;"> </div><div><tt> close</tt></div>
+     * <div class="x-tool x-tool-minimize" style="float:left; margin-right:5;"> </div><div><tt> minimize</tt></div>
+     * <div class="x-tool x-tool-maximize" style="float:left; margin-right:5;"> </div><div><tt> maximize</tt></div>
+     * <div class="x-tool x-tool-restore" style="float:left; margin-right:5;"> </div><div><tt> restore</tt></div>
+     * <div class="x-tool x-tool-gear" style="float:left; margin-right:5;"> </div><div><tt> gear</tt></div>
+     * <div class="x-tool x-tool-pin" style="float:left; margin-right:5;"> </div><div><tt> pin</tt></div>
+     * <div class="x-tool x-tool-unpin" style="float:left; margin-right:5;"> </div><div><tt> unpin</tt></div>
+     * <div class="x-tool x-tool-right" style="float:left; margin-right:5;"> </div><div><tt> right</tt></div>
+     * <div class="x-tool x-tool-left" style="float:left; margin-right:5;"> </div><div><tt> left</tt></div>
+     * <div class="x-tool x-tool-up" style="float:left; margin-right:5;"> </div><div><tt> up</tt></div>
+     * <div class="x-tool x-tool-down" style="float:left; margin-right:5;"> </div><div><tt> down</tt></div>
+     * <div class="x-tool x-tool-refresh" style="float:left; margin-right:5;"> </div><div><tt> refresh</tt></div>
+     * <div class="x-tool x-tool-minus" style="float:left; margin-right:5;"> </div><div><tt> minus</tt></div>
+     * <div class="x-tool x-tool-plus" style="float:left; margin-right:5;"> </div><div><tt> plus</tt></div>
+     * <div class="x-tool x-tool-help" style="float:left; margin-right:5;"> </div><div><tt> help</tt></div>
+     * <div class="x-tool x-tool-search" style="float:left; margin-right:5;"> </div><div><tt> search</tt></div>
+     * <div class="x-tool x-tool-save" style="float:left; margin-right:5;"> </div><div><tt> save</tt></div>
+     * <div class="x-tool x-tool-print" style="float:left; margin-right:5;"> </div><div><tt> print</tt></div>
+     * </ul></div></li>
+     * <li><b>handler</b> : Function<div class="sub-desc"><b>Required.</b> The function to
+     * call when clicked. Arguments passed are:<ul>
+     * <li><b>event</b> : Ext.EventObject<div class="sub-desc">The click event.</div></li>
+     * <li><b>toolEl</b> : Ext.Element<div class="sub-desc">The tool Element.</div></li>
+     * <li><b>panel</b> : Ext.Panel<div class="sub-desc">The host Panel</div></li>
+     * <li><b>tc</b> : Ext.Panel<div class="sub-desc">The tool configuration object</div></li>
+     * </ul></div></li>
+     * <li><b>stopEvent</b> : Boolean<div class="sub-desc">Defaults to true. Specify as false to allow click event to propagate.</div></li>
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the handler.</div></li>
+     * <li><b>qtip</b> : String/Object<div class="sub-desc">A tip string, or
+     * a config argument to {@link Ext.QuickTip#register}</div></li>
+     * <li><b>hidden</b> : Boolean<div class="sub-desc">True to initially render hidden.</div></li>
+     * <li><b>on</b> : Object<div class="sub-desc">A listener config object specifiying
+     * event listeners in the format of an argument to {@link #addListener}</div></li>
+     * </ul></div>
+     * <p>Note that, apart from the toggle tool which is provided when a panel is collapsible, these
+     * tools only provide the visual button. Any required functionality must be provided by adding
+     * handlers that implement the necessary behavior.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+tools:[{
+    id:'refresh',
+    qtip: 'Refresh form Data',
+    // hidden:true,
+    handler: function(event, toolEl, panel){
+        // refresh logic
+    }
+},
+{
+    id:'help',
+    qtip: 'Get Help',
+    handler: function(event, toolEl, panel){
+        // whatever
+    }
+}]
+</code></pre>
+     * <p>For the custom id of <tt>'help'</tt> define two relevant css classes with a link to
+     * a 15x15 image:</p>
+     * <pre><code>
+.x-tool-help {background-image: url(images/help.png);}
+.x-tool-help-over {background-image: url(images/help_over.png);}
+// if using an image sprite:
+.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}
+.x-tool-help-over {background-position:-15px 0;}
+</code></pre>
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * <p>A Template used to create {@link #tools} in the {@link #header} Element. Defaults to:</p><pre><code>
+new Ext.Template('&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>')</code></pre>
+     * <p>This may may be overridden to provide a custom DOM structure for tools based upon a more
+     * complex XTemplate. The template's data is a single tool configuration object (Not the entire Array)
+     * as specified in {@link #tools}.  In the following example an &lt;a> tag is used to provide a
+     * visual indication when hovering over the tool:</p><pre><code>
+var win = new Ext.Window({
+    tools: [{
+        id: 'download',
+        href: '/MyPdfDoc.pdf'
+    }],
+    toolTemplate: new Ext.XTemplate(
+        '&lt;tpl if="id==\'download\'">',
+            '&lt;a class="x-tool x-tool-pdf" href="{href}">&lt;/a>',
+        '&lt;/tpl>',
+        '&lt;tpl if="id!=\'download\'">',
+            '&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>',
+        '&lt;/tpl>'
+    ),
+    width:500,
+    height:300,
+    closeAction:'hide'
+});</code></pre>
+     * <p>Note that the CSS class "x-tool-pdf" should have an associated style rule which provides an
+     * appropriate background image, something like:</p>
+    <pre><code>
+    a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * <tt>true</tt> to hide the expand/collapse toggle button when <code>{@link #collapsible} == true</code>,
+     * <tt>false</tt> to display it (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * <tt>true</tt> to allow expanding and collapsing the panel (when <tt>{@link #collapsible} = true</tt>)
+     * by clicking anywhere in the header bar, <tt>false</tt>) to allow it only by clicking to tool button
+     * (defaults to <tt>false</tt>)). If this panel is a child item of a border layout also see the
+     * {@link Ext.layout.BorderLayout.Region BorderLayout.Region}
+     * <tt>{@link Ext.layout.BorderLayout.Region#floatable floatable}</tt> config option.
+     */
+    /**
+     * @cfg {Boolean} autoScroll
+     * <tt>true</tt> to use overflow:'auto' on the panel's body element and show scroll bars automatically when
+     * necessary, <tt>false</tt> to clip any overflowing content (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Mixed} floating
+     * <p>This property is used to configure the underlying {@link Ext.Layer}. Acceptable values for this
+     * configuration property are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>false</tt></b> : <b>Default.</b><div class="sub-desc">Display the panel inline where it is
+     * rendered.</div></li>
+     * <li><b><tt>true</tt></b> : <div class="sub-desc">Float the panel (absolute position it with automatic
+     * shimming and shadow).<ul>
+     * <div class="sub-desc">Setting floating to true will create an Ext.Layer for this panel and display the
+     * panel at negative offsets so that it is hidden.</div>
+     * <div class="sub-desc">Since the panel will be absolute positioned, the position must be set explicitly
+     * <i>after</i> render (e.g., <tt>myPanel.setPosition(100,100);</tt>).</div>
+     * <div class="sub-desc"><b>Note</b>: when floating a panel you should always assign a fixed width,
+     * otherwise it will be auto width and will expand to fill to the right edge of the viewport.</div>
+     * </ul></div></li>
+     * <li><b><tt>{@link Ext.Layer object}</tt></b> : <div class="sub-desc">The specified object will be used
+     * as the configuration object for the {@link Ext.Layer} that will be created.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * <tt>true</tt> (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the
+     * panel, <tt>false</tt> to display no shadow (defaults to <tt>'sides'</tt>).  Note that this option
+     * only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * The number of pixels to offset the shadow if displayed (defaults to <tt>4</tt>). Note that this
+     * option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} shim
+     * <tt>false</tt> to disable the iframe shim in browsers which need one (defaults to <tt>true</tt>).
+     * Note that this option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {String/Object} html
+     * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use as the panel's body
+     * content (defaults to ''). The HTML content is added by the Panel's {@link #afterRender} method,
+     * and so the document will not contain this HTML at the time the {@link #render} event is fired.
+     * This content is inserted into the body <i>before</i> any configured {@link #contentEl} is appended.
+     */
+    /**
+     * @cfg {String} contentEl
+     * <p>Specify the <tt>id</tt> of an existing HTML node to use as the panel's body content
+     * (defaults to '').</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">This config option is used to take an existing HTML element and place it in the body
+     * of a new panel (it simply moves the specified DOM element into the body element of the Panel
+     * <i>when the Panel is rendered</i> to use as the content (it is not going to be the
+     * actual panel itself).</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">The specified HTML Element is appended to the Panel's {@link #body} Element by the
+     * Panel's {@link #afterRender} method <i>after any configured {@link #html HTML} has
+     * been inserted</i>, and so the document will not contain this HTML at the time the
+     * {@link #render} event is fired.</div>
+     * <div class="sub-desc">The specified HTML element used will not participate in any layout scheme that the
+     * Panel may use. It's just HTML. Layouts operate on child items.</div>
+     * <div class="sub-desc">Add either the <tt>x-hidden</tt> or the <tt>x-hide-display</tt> CSS class to
+     * prevent a brief flicker of the content before it is rendered to the panel.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object/Array} keys
+     * A {@link Ext.KeyMap} config object (in the format expected by {@link Ext.KeyMap#addBinding}
+     * used to assign custom key handling to this panel (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean/Object} draggable
+     * <p><tt>true</tt> to enable dragging of this Panel (defaults to <tt>false</tt>).</p>
+     * <p>For custom drag/drop implementations, an <b>Ext.Panel.DD</b> config could also be passed
+     * in this config instead of <tt>true</tt>. Ext.Panel.DD is an internal, undocumented class which
+     * moves a proxy Element around in place of the Panel's element, but provides no other behaviour
+     * during dragging or on drop. It is a subclass of {@link Ext.dd.DragSource}, so behaviour may be
+     * added by implementing the interface methods of {@link Ext.dd.DragDrop} e.g.:
+     * <pre><code>
+new Ext.Panel({
+    title: 'Drag me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    draggable: {
+//      Config option of Ext.Panel.DD class.
+//      It&#39;s a floating Panel, so do not show a placeholder proxy in the original position.
+        insertProxy: false,
+
+//      Called for each mousemove event while dragging the DD object.
+        onDrag : function(e){
+//          Record the x,y position of the drag proxy so that we can
+//          position the Panel at end of drag.
+            var pel = this.proxy.getEl();
+            this.x = pel.getLeft(true);
+            this.y = pel.getTop(true);
+
+//          Keep the Shadow aligned if there is one.
+            var s = this.panel.getEl().shadow;
+            if (s) {
+                s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
+            }
+        },
+
+//      Called on the mouseup event.
+        endDrag : function(e){
+            this.panel.setPosition(this.x, this.y);
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {String} tabTip
+     * A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over
+     * the tab of a Ext.Panel which is an item of a {@link Ext.TabPanel}. {@link Ext.QuickTips}.init()
+     * must be called in order for the tips to render.
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this panel disabled (default is <tt>false</tt>). An important note when using the disabled
+     * config on panels is that IE will often fail to initialize the disabled mask element correectly if
+     * the panel's layout has not yet completed by the time the Panel is disabled during the render process.
+     * If you experience this issue, you may need to instead use the {@link #afterlayout} event to initialize
+     * the disabled state:
+     * <pre><code>
+new Ext.Panel({
+    ...
+    listeners: {
+        'afterlayout': {
+            fn: function(p){
+                p.disable();
+            },
+            single: true // important, as many layouts can occur
+        }
+    }
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <tt>true</tt> to use height:'auto', <tt>false</tt> to use fixed height (defaults to <tt>false</tt>).
+     * <b>Note</b>: Setting <tt>autoHeight:true</tt> means that the browser will manage the panel's height
+     * based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
+     * manages dimensions (<tt>fit</tt>, <tt>border</tt>, etc.) then setting <tt>autoHeight:true</tt>
+     * can cause issues with scrolling and will not generally work as expected since the panel will take
+     * on the height of its contents rather than the height required by the Ext layout.
+     */
+
+
+    /**
+     * @cfg {String} baseCls
+     * The base CSS class to apply to this panel's element (defaults to <tt>'x-panel'</tt>).
+     * <p>Another option available by default is to specify <tt>'x-plain'</tt> which strips all styling
+     * except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     * See <tt>{@link #unstyled}</tt> also.</p>
+     */
+    baseCls : 'x-panel',
+    /**
+     * @cfg {String} collapsedCls
+     * A CSS class to add to the panel's element after it has been collapsed (defaults to
+     * <tt>'x-panel-collapsed'</tt>).
+     */
+    collapsedCls : 'x-panel-collapsed',
+    /**
+     * @cfg {Boolean} maskDisabled
+     * <tt>true</tt> to mask the panel when it is {@link #disabled}, <tt>false</tt> to not mask it (defaults
+     * to <tt>true</tt>).  Either way, the panel will always tell its contained elements to disable themselves
+     * when it is disabled, but masking the panel can provide an additional visual cue that the panel is
+     * disabled.
+     */
+    maskDisabled : true,
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>true</tt> if the {@link Ext.Fx} class is available, otherwise <tt>false</tt>).
+     */
+    animCollapse : Ext.enableFx,
+    /**
+     * @cfg {Boolean} headerAsText
+     * <tt>true</tt> to display the panel <tt>{@link #title}</tt> in the <tt>{@link #header}</tt>,
+     * <tt>false</tt> to hide it (defaults to <tt>true</tt>).
+     */
+    headerAsText : true,
+    /**
+     * @cfg {String} buttonAlign
+     * The alignment of any {@link #buttons} added to this panel.  Valid values are <tt>'right'</tt>,
+     * <tt>'left'</tt> and <tt>'center'</tt> (defaults to <tt>'right'</tt>).
+     */
+    buttonAlign : 'right',
+    /**
+     * @cfg {Boolean} collapsed
+     * <tt>true</tt> to render the panel collapsed, <tt>false</tt> to render it expanded (defaults to
+     * <tt>false</tt>).
+     */
+    collapsed : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * <tt>true</tt> to make sure the collapse/expand toggle button always renders first (to the left of)
+     * any other tools in the panel's title bar, <tt>false</tt> to render it last (defaults to <tt>true</tt>).
+     */
+    collapseFirst : true,
+    /**
+     * @cfg {Number} minButtonWidth
+     * Minimum width in pixels of all {@link #buttons} in this panel (defaults to <tt>75</tt>)
+     */
+    minButtonWidth : 75,
+    /**
+     * @cfg {Boolean} unstyled
+     * Overrides the <tt>{@link #baseCls}</tt> setting to <tt>{@link #baseCls} = 'x-plain'</tt> which renders
+     * the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     */
+    /**
+     * @cfg {String} elements
+     * A comma-delimited list of panel elements to initialize when the panel is rendered.  Normally, this list will be
+     * generated automatically based on the items added to the panel at config time, but sometimes it might be useful to
+     * make sure a structural element is rendered even if not specified at config time (for example, you may want
+     * to add a button or toolbar dynamically after the panel has been rendered).  Adding those elements to this
+     * list will allocate the required placeholders in the panel when it is rendered.  Valid values are<div class="mdetail-params"><ul>
+     * <li><tt>header</tt></li>
+     * <li><tt>tbar</tt> (top bar)</li>
+     * <li><tt>body</tt></li>
+     * <li><tt>bbar</tt> (bottom bar)</li>
+     * <li><tt>footer</tt></li>
+     * </ul></div>
+     * Defaults to '<tt>body</tt>'.
+     */
+    elements : 'body',
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * Defaults to <tt>false</tt>.  When set to <tt>true</tt>, an extra css class <tt>'x-panel-normal'</tt>
+     * will be added to the panel's element, effectively applying css styles suggested by the W3C
+     * (see http://www.w3.org/TR/CSS21/sample.html) to the Panel's <b>body</b> element (not the header,
+     * footer, etc.).
+     */
+    preventBodyReset : false,
+
+    // protected - these could be used to customize the behavior of the window,
+    // but changing them would not be useful without further mofifications and
+    // could lead to unexpected or undesirable results.
+    toolTarget : 'header',
+    collapseEl : 'bwrap',
+    slideAnchor : 't',
+    disabledClass : '',
+
+    // private, notify box this class will handle heights
+    deferHeight : true,
+    // private
+    expandDefaults: {
+        duration : 0.25
+    },
+    // private
+    collapseDefaults : {
+        duration : 0.25
+    },
+
+    // private
+    initComponent : function(){
+        Ext.Panel.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event bodyresize
+             * Fires after the Panel has been resized.
+             * @param {Ext.Panel} p the Panel which has been resized.
+             * @param {Number} width The Panel's new width.
+             * @param {Number} height The Panel's new height.
+             */
+            'bodyresize',
+            /**
+             * @event titlechange
+             * Fires after the Panel title has been {@link #title set} or {@link #setTitle changed}.
+             * @param {Ext.Panel} p the Panel which has had its title changed.
+             * @param {String} The new title.
+             */
+            'titlechange',
+            /**
+             * @event iconchange
+             * Fires after the Panel icon class has been {@link #iconCls set} or {@link #setIconClass changed}.
+             * @param {Ext.Panel} p the Panel which has had its {@link #iconCls icon class} changed.
+             * @param {String} The new icon class.
+             * @param {String} The old icon class.
+             */
+            'iconchange',
+            /**
+             * @event collapse
+             * Fires after the Panel has been collapsed.
+             * @param {Ext.Panel} p the Panel that has been collapsed.
+             */
+            'collapse',
+            /**
+             * @event expand
+             * Fires after the Panel has been expanded.
+             * @param {Ext.Panel} p The Panel that has been expanded.
+             */
+            'expand',
+            /**
+             * @event beforecollapse
+             * Fires before the Panel is collapsed.  A handler can return false to cancel the collapse.
+             * @param {Ext.Panel} p the Panel being collapsed.
+             * @param {Boolean} animate True if the collapse is animated, else false.
+             */
+            'beforecollapse',
+            /**
+             * @event beforeexpand
+             * Fires before the Panel is expanded.  A handler can return false to cancel the expand.
+             * @param {Ext.Panel} p The Panel being expanded.
+             * @param {Boolean} animate True if the expand is animated, else false.
+             */
+            'beforeexpand',
+            /**
+             * @event beforeclose
+             * Fires before the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.  This event only
+             * applies to such subclasses.
+             * A handler can return false to cancel the close.
+             * @param {Ext.Panel} p The Panel being closed.
+             */
+            'beforeclose',
+            /**
+             * @event close
+             * Fires after the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.
+             * @param {Ext.Panel} p The Panel that has been closed.
+             */
+            'close',
+            /**
+             * @event activate
+             * Fires after the Panel has been visually activated.
+             * Note that Panels do not directly support being activated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been activated.
+             */
+            'activate',
+            /**
+             * @event deactivate
+             * Fires after the Panel has been visually deactivated.
+             * Note that Panels do not directly support being deactivated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been deactivated.
+             */
+            'deactivate'
+        );
+
+        if(this.unstyled){
+            this.baseCls = 'x-plain';
+        }
+
+        // shortcuts
+        if(this.tbar){
+            this.elements += ',tbar';
+            if(Ext.isObject(this.tbar)){
+                this.topToolbar = this.tbar;
+            }
+            delete this.tbar;
+        }
+        if(this.bbar){
+            this.elements += ',bbar';
+            if(Ext.isObject(this.bbar)){
+                this.bottomToolbar = this.bbar;
+            }
+            delete this.bbar;
+        }
+
+        if(this.header === true){
+            this.elements += ',header';
+            delete this.header;
+        }else if(this.headerCfg || (this.title && this.header !== false)){
+            this.elements += ',header';
+        }
+
+        if(this.footerCfg || this.footer === true){
+            this.elements += ',footer';
+            delete this.footer;
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+            var btns = this.buttons;
+            /**
+             * This Panel's Array of buttons as created from the <tt>{@link #buttons}</tt>
+             * config property. Read only.
+             * @type Array
+             * @property buttons
+             */
+            this.buttons = [];
+            for(var i = 0, len = btns.length; i < len; i++) {
+                if(btns[i].render){ // button instance
+                    this.buttons.push(btns[i]);
+                }else if(btns[i].xtype){
+                    this.buttons.push(Ext.create(btns[i], 'button'));
+                }else{
+                    this.addButton(btns[i]);
+                }
+            }
+        }
+        if(this.fbar){
+            this.elements += ',footer';
+        }
+        if(this.autoLoad){
+            this.on('render', this.doAutoLoad, this, {delay:10});
+        }
+    },
+
+    // private
+    createElement : function(name, pnode){
+        if(this[name]){
+            pnode.appendChild(this[name].dom);
+            return;
+        }
+
+        if(name === 'bwrap' || this.elements.indexOf(name) != -1){
+            if(this[name+'Cfg']){
+                this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']);
+            }else{
+                var el = document.createElement('div');
+                el.className = this[name+'Cls'];
+                this[name] = Ext.get(pnode.appendChild(el));
+            }
+            if(this[name+'CssClass']){
+                this[name].addClass(this[name+'CssClass']);
+            }
+            if(this[name+'Style']){
+                this[name].applyStyles(this[name+'Style']);
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Panel.superclass.onRender.call(this, ct, position);
+        this.createClasses();
+
+        var el = this.el,
+            d = el.dom,
+            bw;
+        el.addClass(this.baseCls);
+        if(d.firstChild){ // existing markup
+            this.header = el.down('.'+this.headerCls);
+            this.bwrap = el.down('.'+this.bwrapCls);
+            var cp = this.bwrap ? this.bwrap : el;
+            this.tbar = cp.down('.'+this.tbarCls);
+            this.body = cp.down('.'+this.bodyCls);
+            this.bbar = cp.down('.'+this.bbarCls);
+            this.footer = cp.down('.'+this.footerCls);
+            this.fromMarkup = true;
+        }
+        if (this.preventBodyReset === true) {
+            el.addClass('x-panel-reset');
+        }
+        if(this.cls){
+            el.addClass(this.cls);
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+        }
+
+        // This block allows for maximum flexibility and performance when using existing markup
+
+        // framing requires special markup
+        if(this.frame){
+            el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls));
+
+            this.createElement('header', d.firstChild.firstChild.firstChild);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            var ml = d.childNodes[1], bl = d.childNodes[2];
+            bw.appendChild(ml);
+            bw.appendChild(bl);
+
+            var mc = bw.firstChild.firstChild.firstChild;
+            this.createElement('tbar', mc);
+            this.createElement('body', mc);
+            this.createElement('bbar', mc);
+            this.createElement('footer', bw.lastChild.firstChild.firstChild);
+
+            if(!this.footer){
+                this.bwrap.dom.lastChild.className += ' x-panel-nofooter';
+            }
+        }else{
+            this.createElement('header', d);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            this.createElement('tbar', bw);
+            this.createElement('body', bw);
+            this.createElement('bbar', bw);
+            this.createElement('footer', bw);
+
+            if(!this.header){
+                this.body.addClass(this.bodyCls + '-noheader');
+                if(this.tbar){
+                    this.tbar.addClass(this.tbarCls + '-noheader');
+                }
+            }
+        }
+
+        if(this.padding !== undefined) {
+            this.body.setStyle('padding', this.body.addUnits(this.padding));
+        }
+
+        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');
+        }
+
+        this.bwrap.enableDisplayMode('block');
+
+        if(this.header){
+            this.header.unselectable();
+
+            // for tools, we need to wrap any existing header markup
+            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.mon(this.header, 'click', this.toggleCollapse, this);
+                this.header.setStyle('cursor', 'pointer');
+            }
+        }
+        if(this.tools){
+            var ts = this.tools;
+            this.tools = {};
+            this.addTool.apply(this, ts);
+        }else{
+            this.tools = {};
+        }
+
+        if(this.buttons && this.buttons.length > 0){
+            this.fbar = new Ext.Toolbar({
+                items: this.buttons,
+                toolbarCls: 'x-panel-fbar'
+            });
+        }
+        this.toolbars = [];
+        if(this.fbar){
+            this.fbar = Ext.create(this.fbar, 'toolbar');
+            this.fbar.enableOverflow = false;
+            if(this.fbar.items){
+                this.fbar.items.each(function(c){
+                    c.minWidth = c.minWidth || this.minButtonWidth;
+                }, this);
+            }
+            this.fbar.toolbarCls = 'x-panel-fbar';
+
+            var bct = this.footer.createChild({cls: 'x-panel-btns x-panel-btns-'+this.buttonAlign});
+            this.fbar.ownerCt = this;
+            this.fbar.render(bct);
+            bct.createChild({cls:'x-clear'});
+            this.toolbars.push(this.fbar);
+        }
+
+        if(this.tbar && this.topToolbar){
+            if(Ext.isArray(this.topToolbar)){
+                this.topToolbar = new Ext.Toolbar(this.topToolbar);
+            }else if(!this.topToolbar.events){
+                this.topToolbar = Ext.create(this.topToolbar, 'toolbar');
+            }
+            this.topToolbar.ownerCt = this;
+            this.topToolbar.render(this.tbar);
+            this.toolbars.push(this.topToolbar);
+        }
+        if(this.bbar && this.bottomToolbar){
+            if(Ext.isArray(this.bottomToolbar)){
+                this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar);
+            }else if(!this.bottomToolbar.events){
+                this.bottomToolbar = Ext.create(this.bottomToolbar, 'toolbar');
+            }
+            this.bottomToolbar.ownerCt = this;
+            this.bottomToolbar.render(this.bbar);
+            this.toolbars.push(this.bottomToolbar);
+        }
+        Ext.each(this.toolbars, function(tb){
+            tb.on({
+                scope: this,
+                afterlayout: this.syncHeight,
+                remove: this.syncHeight
+            });
+        }, this);
+    },
+
+    /**
+     * Sets the CSS class that provides the icon image for this panel.  This method will replace any existing
+     * icon class if one has already been set and fire the {@link #iconchange} event after completion.
+     * @param {String} cls The new CSS class name
+     */
+    setIconClass : function(cls){
+        var old = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered && this.header){
+            if(this.frame){
+                this.header.addClass('x-panel-icon');
+                this.header.replaceClass(old, this.iconCls);
+            }else{
+                var hd = this.header.dom;
+                var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null;
+                if(img){
+                    Ext.fly(img).replaceClass(old, this.iconCls);
+                }else{
+                    Ext.DomHelper.insertBefore(hd.firstChild, {
+                        tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls
+                    });
+                 }
+            }
+        }
+        this.fireEvent('iconchange', this, cls, old);
+    },
+
+    // private
+    makeFloating : function(cfg){
+        this.floating = true;
+        this.el = new Ext.Layer(
+            Ext.isObject(cfg) ? cfg : {
+                shadow: this.shadow !== undefined ? this.shadow : 'sides',
+                shadowOffset: this.shadowOffset,
+                constrain:false,
+                shim: this.shim === false ? false : undefined
+            }, this.el
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the top (<tt>{@link #tbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getTopToolbar : function(){
+        return this.topToolbar;
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the bottom (<tt>{@link #bbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getBottomToolbar : function(){
+        return this.bottomToolbar;
+    },
+
+    /**
+     * Adds a button to this panel.  Note that this method must be called prior to rendering.  The preferred
+     * approach is to add buttons via the {@link #buttons} config.
+     * @param {String/Object} config A valid {@link Ext.Button} config.  A string will become the text for a default
+     * button config, an object will be treated as a button config object.
+     * @param {Function} handler The function to be called on button {@link Ext.Button#click}
+     * @param {Object} scope The scope to use for the button handler function
+     * @return {Ext.Button} The button that was added
+     */
+    addButton : function(config, handler, scope){
+        var bc = {
+            handler: handler,
+            scope: scope,
+            minWidth: this.minButtonWidth,
+            hideParent:true
+        };
+        if(typeof config == "string"){
+            bc.text = config;
+        }else{
+            Ext.apply(bc, config);
+        }
+        var btn = new Ext.Button(bc);
+        if(!this.buttons){
+            this.buttons = [];
+        }
+        this.buttons.push(btn);
+        return btn;
+    },
+
+    // private
+    addTool : function(){
+        if(!this[this.toolTarget]) { // no where to render tools!
+            return;
+        }
+        if(!this.toolTemplate){
+            // initialize the global tool template on first use
+            var tt = new Ext.Template(
+                 '<div class="x-tool x-tool-{id}">&#160;</div>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.Panel.prototype.toolTemplate = tt;
+        }
+        for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+            var tc = a[i];
+            if(!this.tools[tc.id]){
+                var overCls = 'x-tool-'+tc.id+'-over';
+                var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), tc, true);
+                this.tools[tc.id] = t;
+                t.enableDisplayMode('block');
+                this.mon(t, 'click',  this.createToolHandler(t, tc, overCls, this));
+                if(tc.on){
+                    this.mon(t, tc.on);
+                }
+                if(tc.hidden){
+                    t.hide();
+                }
+                if(tc.qtip){
+                    if(Ext.isObject(tc.qtip)){
+                        Ext.QuickTips.register(Ext.apply({
+                              target: t.id
+                        }, tc.qtip));
+                    } else {
+                        t.dom.qtip = tc.qtip;
+                    }
+                }
+                t.addClassOnOver(overCls);
+            }
+        }
+    },
+
+    onLayout : function(){
+        if(this.toolbars.length > 0){
+            this.duringLayout = true;
+            Ext.each(this.toolbars, function(tb){
+                tb.doLayout();
+            });
+            delete this.duringLayout;
+            this.syncHeight();
+        }
+    },
+
+    syncHeight : function(){
+        if(!(this.autoHeight || this.duringLayout)){
+            var last = this.lastSize;
+            if(last && !Ext.isEmpty(last.height)){
+                var old = last.height, h = this.el.getHeight();
+                if(old != 'auto' && old != h){
+                    var bd = this.body, bdh = bd.getHeight();
+                    h = Math.max(bdh + old - h, 0);
+                    if(bdh > 0 && bdh != h){
+                        bd.setHeight(h);
+                        if(Ext.isIE && h <= 0){
+                            return;
+                        }
+                        var sz = bd.getSize();
+                        this.fireEvent('bodyresize', sz.width, sz.height);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.floating){
+            return this.el.show();
+        }
+        Ext.Panel.superclass.onShow.call(this);
+    },
+
+    // private
+    onHide : function(){
+        if(this.floating){
+            return this.el.hide();
+        }
+        Ext.Panel.superclass.onHide.call(this);
+    },
+
+    // private
+    createToolHandler : function(t, tc, overCls, panel){
+        return function(e){
+            t.removeClass(overCls);
+            if(tc.stopEvent !== false){
+                e.stopEvent();
+            }
+            if(tc.handler){
+                tc.handler.call(tc.scope || t, e, t, panel, tc);
+            }
+        };
+    },
+
+    // private
+    afterRender : function(){
+        if(this.floating && !this.hidden){
+            this.el.show();
+        }
+        if(this.title){
+            this.setTitle(this.title);
+        }
+        this.setAutoScroll();
+        if(this.html){
+            this.body.update(Ext.isObject(this.html) ?
+                             Ext.DomHelper.markup(this.html) :
+                             this.html);
+            delete this.html;
+        }
+        if(this.contentEl){
+            var ce = Ext.getDom(this.contentEl);
+            Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']);
+            this.body.dom.appendChild(ce);
+        }
+        if(this.collapsed){
+            this.collapsed = false;
+            this.collapse(false);
+        }
+        Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last
+        this.initEvents();
+    },
+
+    // private
+    setAutoScroll : function(){
+        if(this.rendered && this.autoScroll){
+            var el = this.body || this.el;
+            if(el){
+                el.setOverflow('auto');
+            }
+        }
+    },
+
+    // private
+    getKeyMap : function(){
+        if(!this.keyMap){
+            this.keyMap = new Ext.KeyMap(this.el, this.keys);
+        }
+        return this.keyMap;
+    },
+
+    // private
+    initEvents : function(){
+        if(this.keys){
+            this.getKeyMap();
+        }
+        if(this.draggable){
+            this.initDraggable();
+        }
+    },
+
+    // private
+    initDraggable : function(){
+        /**
+         * <p>If this Panel is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DragSource} which handles dragging the Panel.</p>
+         * The developer must provide implementations of the abstract methods of {@link Ext.dd.DragSource}
+         * in order to supply behaviour for each stage of the drag/drop process. See {@link #draggable}.
+         * @type Ext.dd.DragSource.
+         * @property dd
+         */
+        this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+    },
+
+    // private
+    beforeEffect : function(){
+        if(this.floating){
+            this.el.beforeAction();
+        }
+        this.el.addClass('x-panel-animated');
+    },
+
+    // private
+    afterEffect : function(){
+        this.syncShadow();
+        this.el.removeClass('x-panel-animated');
+    },
+
+    // private - wraps up an animation param with internal callbacks
+    createEffect : function(a, cb, scope){
+        var o = {
+            scope:scope,
+            block:true
+        };
+        if(a === true){
+            o.callback = cb;
+            return o;
+        }else if(!a.callback){
+            o.callback = cb;
+        }else { // wrap it up
+            o.callback = function(){
+                cb.call(scope);
+                Ext.callback(a.callback, a.scope);
+            };
+        }
+        return Ext.applyIf(o, a);
+    },
+
+    /**
+     * Collapses the panel body so that it becomes hidden.  Fires the {@link #beforecollapse} event which will
+     * cancel the collapse action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    collapse : function(animate){
+        if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.beforeEffect();
+        this.onCollapse(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideOut(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this),
+                        this.collapseDefaults));
+        }else{
+            this[this.collapseEl].hide();
+            this.afterCollapse();
+        }
+    },
+
+    // private
+    afterCollapse : function(){
+        this.collapsed = true;
+        this.el.addClass(this.collapsedCls);
+        this.afterEffect();
+        this.fireEvent('collapse', this);
+    },
+
+    /**
+     * Expands the panel body so that it becomes visible.  Fires the {@link #beforeexpand} event which will
+     * cancel the expand action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    expand : function(animate){
+        if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.el.removeClass(this.collapsedCls);
+        this.beforeEffect();
+        this.onExpand(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideIn(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
+                        this.expandDefaults));
+        }else{
+            this[this.collapseEl].show();
+            this.afterExpand();
+        }
+    },
+
+    // private
+    afterExpand : function(){
+        this.collapsed = false;
+        this.afterEffect();
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    toggleCollapse : function(animate){
+        this[this.collapsed ? 'expand' : 'collapse'](animate);
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.mask();
+        }
+        Ext.Panel.superclass.onDisable.call(this);
+    },
+
+    // private
+    onEnable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.unmask();
+        }
+        Ext.Panel.superclass.onEnable.call(this);
+    },
+
+    // private
+    onResize : function(w, h){
+        if(w !== undefined || h !== undefined){
+            if(!this.collapsed){
+                if(typeof w == 'number'){
+                    w = this.adjustBodyWidth(w - this.getFrameWidth());
+                    if(this.tbar){
+                        this.tbar.setWidth(w);
+                        if(this.topToolbar){
+                            this.topToolbar.setSize(w);
+                        }
+                    }
+                    if(this.bbar){
+                        this.bbar.setWidth(w);
+                        if(this.bottomToolbar){
+                            this.bottomToolbar.setSize(w);
+                        }
+                    }
+                    if(this.fbar){
+                        var f = this.fbar,
+                            fWidth = 1,
+                            strict = Ext.isStrict;
+                        if(this.buttonAlign == 'left'){
+                           fWidth = w - f.container.getFrameWidth('lr');
+                        }else{
+                            //center/right alignment off in webkit
+                            if(Ext.isIE || Ext.isWebKit){
+                                //center alignment ok on webkit.
+                                //right broken in both, center on IE
+                                if(!(this.buttonAlign == 'center' && Ext.isWebKit) && (!strict || (!Ext.isIE8 && strict))){
+                                    (function(){
+                                        f.setWidth(f.getEl().child('.x-toolbar-ct').getWidth());
+                                    }).defer(1);
+                                }else{
+                                    fWidth = 'auto';
+                                }
+                            }else{
+                                fWidth = 'auto';
+                            }
+                        }
+                        f.setWidth(fWidth);
+                    }
+                    this.body.setWidth(w);
+                }else if(w == 'auto'){
+                    this.body.setWidth(w);
+                }
+
+                if(typeof h == 'number'){
+                    h = Math.max(0, this.adjustBodyHeight(h - this.getFrameHeight()));
+                    this.body.setHeight(h);
+                }else if(h == 'auto'){
+                    this.body.setHeight(h);
+                }
+
+                if(this.disabled && this.el._mask){
+                    this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
+                }
+            }else{
+                this.queuedBodySize = {width: w, height: h};
+                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, w, h);
+        }
+        this.syncShadow();
+    },
+
+    // private
+    adjustBodyHeight : function(h){
+        return h;
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        return w;
+    },
+
+    // private
+    onPosition : function(){
+        this.syncShadow();
+    },
+
+    /**
+     * Returns the width in pixels of the framing elements of this panel (not including the body width).  To
+     * retrieve the body width see {@link #getInnerWidth}.
+     * @return {Number} The frame width
+     */
+    getFrameWidth : function(){
+        var w = this.el.getFrameWidth('lr')+this.bwrap.getFrameWidth('lr');
+
+        if(this.frame){
+            var l = this.bwrap.dom.firstChild;
+            w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r'));
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            w += Ext.fly(mc).getFrameWidth('lr');
+        }
+        return w;
+    },
+
+    /**
+     * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and
+     * header and footer elements, but not including the body height).  To retrieve the body height see {@link #getInnerHeight}.
+     * @return {Number} The frame height
+     */
+    getFrameHeight : function(){
+        var h  = this.el.getFrameWidth('tb')+this.bwrap.getFrameWidth('tb');
+        h += (this.tbar ? this.tbar.getHeight() : 0) +
+             (this.bbar ? this.bbar.getHeight() : 0);
+
+        if(this.frame){
+            var hd = this.el.dom.firstChild;
+            var ft = this.bwrap.dom.lastChild;
+            h += (hd.offsetHeight + ft.offsetHeight);
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            h += Ext.fly(mc).getFrameWidth('tb');
+        }else{
+            h += (this.header ? this.header.getHeight() : 0) +
+                (this.footer ? this.footer.getHeight() : 0);
+        }
+        return h;
+    },
+
+    /**
+     * Returns the width in pixels of the body element (not including the width of any framing elements).
+     * For the frame width see {@link #getFrameWidth}.
+     * @return {Number} The body width
+     */
+    getInnerWidth : function(){
+        return this.getSize().width - this.getFrameWidth();
+    },
+
+    /**
+     * Returns the height in pixels of the body element (not including the height of any framing elements).
+     * For the frame height see {@link #getFrameHeight}.
+     * @return {Number} The body height
+     */
+    getInnerHeight : function(){
+        return this.getSize().height - this.getFrameHeight();
+    },
+
+    // private
+    syncShadow : function(){
+        if(this.floating){
+            this.el.sync(true);
+        }
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.body;
+    },
+
+    /**
+     * <p>Sets the title text for the panel and optionally the {@link #iconCls icon class}.</p>
+     * <p>In order to be able to set the title, a header element must have been created
+     * for the Panel. This is triggered either by configuring the Panel with a non-blank <tt>{@link #title}</tt>,
+     * or configuring it with <tt><b>{@link #header}: true</b></tt>.</p>
+     * @param {String} title The title text to set
+     * @param {String} iconCls (optional) {@link #iconCls iconCls} A user-defined CSS class that provides the icon image for this panel
+     */
+    setTitle : function(title, iconCls){
+        this.title = title;
+        if(this.header && this.headerAsText){
+            this.header.child('span').update(title);
+        }
+        if(iconCls){
+            this.setIconClass(iconCls);
+        }
+        this.fireEvent('titlechange', this, title);
+        return this;
+    },
+
+    /**
+     * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body.
+     * @return {Ext.Updater} The Updater
+     */
+    getUpdater : function(){
+        return this.body.getUpdater();
+    },
+
+     /**
+     * Loads this content panel immediately with content returned from an XHR call.
+     * @param {Object/String/Function} config A config object containing any of the following options:
+<pre><code>
+panel.load({
+    url: "your-url.php",
+    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+    callback: yourFunction,
+    scope: yourObject, // optional scope for the callback
+    discardUrl: false,
+    nocache: false,
+    text: "Loading...",
+    timeout: 30,
+    scripts: false
+});
+</code></pre>
+     * The only required property is url. The optional properties nocache, text and scripts
+     * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their
+     * associated property on this panel Updater instance.
+     * @return {Ext.Panel} this
+     */
+    load : function(){
+        var um = this.body.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.header){
+            this.header.removeAllListeners();
+            if(this.headerAsText){
+                Ext.Element.uncache(this.header.child('span'));
+            }
+        }
+        Ext.Element.uncache(
+            this.header,
+            this.tbar,
+            this.bbar,
+            this.footer,
+            this.body,
+            this.bwrap
+        );
+        if(this.tools){
+            for(var k in this.tools){
+                Ext.destroy(this.tools[k]);
+            }
+        }
+        if(this.buttons){
+            for(var b in this.buttons){
+                Ext.destroy(this.buttons[b]);
+            }
+        }
+        Ext.destroy(this.toolbars);
+        Ext.Panel.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    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';
+    },
+
+    // private
+    createGhost : function(cls, useShim, appendTo){
+        var el = document.createElement('div');
+        el.className = 'x-panel-ghost ' + (cls ? cls : '');
+        if(this.header){
+            el.appendChild(this.el.dom.firstChild.cloneNode(true));
+        }
+        Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight());
+        el.style.width = this.el.dom.offsetWidth + 'px';;
+        if(!appendTo){
+            this.container.dom.appendChild(el);
+        }else{
+            Ext.getDom(appendTo).appendChild(el);
+        }
+        if(useShim !== false && this.el.useShim !== false){
+            var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el);
+            layer.show();
+            return layer;
+        }else{
+            return new Ext.Element(el);
+        }
+    },
+
+    // private
+    doAutoLoad : function(){
+        var u = this.body.getUpdater();
+        if(this.renderer){
+            u.setRenderer(this.renderer);
+        }
+        u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad});
+    },
+
+    /**
+     * Retrieve a tool by id.
+     * @param {String} id
+     * @return {Object} tool
+     */
+    getTool : function(id) {
+        return this.tools[id];
+    }
+
+/**
+ * @cfg {String} autoEl @hide
+ */
+});
+Ext.reg('panel', Ext.Panel);
+/**
+ * @class Ext.Editor
+ * @extends Ext.Component
+ * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
+ * @constructor
+ * Create a new Editor
+ * @param {Object} config The config object
+ * @xtype editor
+ */
+Ext.Editor = function(field, config){
+    if(field.field){
+        this.field = Ext.create(field.field, 'textfield');
+        config = Ext.apply({}, field); // copy so we don't disturb original config
+        delete config.field;
+    }else{
+        this.field = field;
+    }
+    Ext.Editor.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.Editor, Ext.Component, {
+    /**
+    * @cfg {Ext.form.Field} field
+    * The Field object (or descendant) or config object for field
+    */
+    /**
+     * @cfg {Boolean} allowBlur
+     * True to {@link #completeEdit complete the editing process} if in edit mode when the
+     * field is blurred. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean/String} autoSize
+     * True for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only,
+     * or "height" to adopt the height only (defaults to false)
+     */
+    /**
+     * @cfg {Boolean} revertInvalid
+     * True to automatically revert the field value and cancel the edit when the user completes an edit and the field
+     * validation fails (defaults to true)
+     */
+    /**
+     * @cfg {Boolean} ignoreNoChange
+     * True to skip the edit completion process (no save, no events fired) if the user completes an edit and
+     * the value has not changed (defaults to false).  Applies only to string values - edits for other data types
+     * will never be ignored.
+     */
+    /**
+     * @cfg {Boolean} hideEl
+     * False to keep the bound element visible while the editor is displayed (defaults to true)
+     */
+    /**
+     * @cfg {Mixed} value
+     * The data value of the underlying field (defaults to "")
+     */
+    value : "",
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?").
+     */
+    alignment: "c-c?",
+    /**
+     * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "frame")
+     */
+    shadow : "frame",
+    /**
+     * @cfg {Boolean} constrain True to constrain the editor to the viewport
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true)
+     */
+    swallowKeys : true,
+    /**
+     * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed (defaults to false)
+     */
+    completeOnEnter : false,
+    /**
+     * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed (defaults to false)
+     */
+    cancelOnEsc : false,
+    /**
+     * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false)
+     */
+    updateEl : false,
+
+    initComponent : function(){
+        Ext.Editor.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforestartedit
+             * Fires when editing is initiated, but before the value changes.  Editing can be canceled by returning
+             * false from the handler of this event.
+             * @param {Editor} this
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The field value being set
+             */
+            "beforestartedit",
+            /**
+             * @event startedit
+             * Fires when this editor is displayed
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The starting field value
+             */
+            "startedit",
+            /**
+             * @event beforecomplete
+             * Fires after a change has been made to the field, but before the change is reflected in the underlying
+             * field.  Saving the change to the field can be canceled by returning false from the handler of this event.
+             * Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this
+             * event will not fire since no edit actually occurred.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "beforecomplete",
+            /**
+             * @event complete
+             * Fires after editing is complete and any changed value has been written to the underlying field.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "complete",
+            /**
+             * @event canceledit
+             * Fires after editing has been canceled and the editor's value has been reset.
+             * @param {Editor} this
+             * @param {Mixed} value The user-entered field value that was discarded
+             * @param {Mixed} startValue The original field value that was set back into the editor after cancel
+             */
+            "canceledit",
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.  You can check
+             * {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            "specialkey"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.el = new Ext.Layer({
+            shadow: this.shadow,
+            cls: "x-editor",
+            parentEl : ct,
+            shim : this.shim,
+            shadowOffset: this.shadowOffset || 4,
+            id: this.id,
+            constrain: this.constrain
+        });
+        if(this.zIndex){
+            this.el.setZIndex(this.zIndex);
+        }
+        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.mon(this.field, "specialkey", this.onSpecialKey, this);
+        if(this.swallowKeys){
+            this.field.el.swallowEvent(['keydown','keypress']);
+        }
+        this.field.show();
+        this.mon(this.field, "blur", this.onBlur, this);
+        if(this.field.grow){
+        	this.mon(this.field, "autosize", this.el.sync,  this.el, {delay:1});
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var key = e.getKey();
+        if(this.completeOnEnter && key == e.ENTER){
+            e.stopEvent();
+            this.completeEdit();
+        }else if(this.cancelOnEsc && key == e.ESC){
+            this.cancelEdit();
+        }else{
+            this.fireEvent('specialkey', field, e);
+        }
+        if(this.field.triggerBlur && (key == e.ENTER || key == e.ESC || key == e.TAB)){
+            this.field.triggerBlur();
+        }
+    },
+
+    /**
+     * Starts the editing process and shows the editor.
+     * @param {Mixed} el The element to edit
+     * @param {String} value (optional) A value to initialize the editor with. If a value is not provided, it defaults
+      * to the innerHTML of el.
+     */
+    startEdit : function(el, value){
+        if(this.editing){
+            this.completeEdit();
+        }
+        this.boundEl = Ext.get(el);
+        var v = value !== undefined ? value : this.boundEl.dom.innerHTML;
+        if(!this.rendered){
+            this.render(this.parentEl || document.body);
+        }
+        if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){
+            return;
+        }
+        this.startValue = v;
+        this.field.setValue(v);
+        this.doAutoSize();
+        this.el.alignTo(this.boundEl, this.alignment);
+        this.editing = true;
+        this.show();
+    },
+
+    // private
+    doAutoSize : function(){
+        if(this.autoSize){
+            var sz = this.boundEl.getSize();
+            switch(this.autoSize){
+                case "width":
+                    this.setSize(sz.width,  "");
+                break;
+                case "height":
+                    this.setSize("",  sz.height);
+                break;
+                default:
+                    this.setSize(sz.width,  sz.height);
+            }
+        }
+    },
+
+    /**
+     * Sets the height and width of this editor.
+     * @param {Number} width The new width
+     * @param {Number} height The new height
+     */
+    setSize : function(w, h){
+        delete this.field.lastSize;
+        this.field.setSize(w, h);
+        if(this.el){
+            if(Ext.isGecko2 || Ext.isOpera){
+                // prevent layer scrollbars
+                this.el.setSize(w, h);
+            }
+            this.el.sync();
+        }
+    },
+
+    /**
+     * Realigns the editor to the bound field based on the current alignment config value.
+     */
+    realign : function(){
+        this.el.alignTo(this.boundEl, this.alignment);
+    },
+
+    /**
+     * Ends the editing process, persists the changed value to the underlying field, and hides the editor.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after edit (defaults to false)
+     */
+    completeEdit : function(remainVisible){
+        if(!this.editing){
+            return;
+        }
+        var v = this.getValue();
+        if(!this.field.isValid()){
+            if(this.revertInvalid !== false){
+                this.cancelEdit(remainVisible);
+            }
+            return;
+        }
+        if(String(v) === String(this.startValue) && this.ignoreNoChange){
+            this.hideEdit(remainVisible);
+            return;
+        }
+        if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){
+            v = this.getValue();
+            if(this.updateEl && this.boundEl){
+                this.boundEl.update(v);
+            }
+            this.hideEdit(remainVisible);
+            this.fireEvent("complete", this, v, this.startValue);
+        }
+    },
+
+    // private
+    onShow : function(){
+        this.el.show();
+        if(this.hideEl !== false){
+            this.boundEl.hide();
+        }
+        this.field.show();
+        if(Ext.isIE && !this.fixIEFocus){ // IE has problems with focusing the first time
+            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();
+        }
+    },
+
+    /**
+     * Cancels the editing process and hides the editor without persisting any changes.  The field value will be
+     * reverted to the original starting value.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after
+     * cancel (defaults to false)
+     */
+    cancelEdit : function(remainVisible){
+        if(this.editing){
+            var v = this.getValue();
+            this.setValue(this.startValue);
+            this.hideEdit(remainVisible);
+            this.fireEvent("canceledit", this, v, this.startValue);
+        }
+    },
+    
+    // private
+    hideEdit: function(remainVisible){
+        if(remainVisible !== true){
+            this.editing = false;
+            this.hide();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        if(this.allowBlur !== true && this.editing){
+            this.completeEdit();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    /**
+     * Sets the data value of the editor
+     * @param {Mixed} value Any valid value supported by the underlying field
+     */
+    setValue : function(v){
+        this.field.setValue(v);
+    },
+
+    /**
+     * Gets the data value of the editor
+     * @return {Mixed} The data value
+     */
+    getValue : function(){
+        return this.field.getValue();
+    },
+
+    beforeDestroy : function(){
+        Ext.destroy(this.field);
+        this.field = null;
+    }
+});
+Ext.reg('editor', Ext.Editor);/**
+ * @class Ext.ColorPalette
+ * @extends Ext.Component
+ * Simple color palette class for choosing colors.  The palette can be rendered to any container.<br />
+ * Here's an example of typical usage:
+ * <pre><code>
+var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
+cp.render('my-div');
+
+cp.on('select', function(palette, selColor){
+    // do something with selColor
+});
+</code></pre>
+ * @constructor
+ * Create a new ColorPalette
+ * @param {Object} config The config object
+ * @xtype colorpalette
+ */
+Ext.ColorPalette = function(config){
+    Ext.ColorPalette.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+	     * @event select
+	     * Fires when a color is selected
+	     * @param {ColorPalette} this
+	     * @param {String} color The 6-digit color hex code (without the # symbol)
+	     */
+        'select'
+    );
+
+    if(this.handler){
+        this.on("select", this.handler, this.scope, true);
+    }
+};
+Ext.extend(Ext.ColorPalette, Ext.Component, {
+	/**
+	 * @cfg {String} tpl An existing XTemplate instance to be used in place of the default template for rendering the component.
+	 */
+    /**
+     * @cfg {String} itemCls
+     * The CSS class to apply to the containing element (defaults to "x-color-palette")
+     */
+    itemCls : "x-color-palette",
+    /**
+     * @cfg {String} value
+     * The initial color to highlight (should be a valid 6-digit color hex code without the # symbol).  Note that
+     * the hex codes are case-sensitive.
+     */
+    value : null,
+    clickEvent:'click',
+    // private
+    ctype: "Ext.ColorPalette",
+
+    /**
+     * @cfg {Boolean} allowReselect If set to true then reselecting a color that is already selected fires the {@link #select} event
+     */
+    allowReselect : false,
+
+    /**
+     * <p>An array of 6-digit color hex code strings (without the # symbol).  This array can contain any number
+     * of colors, and each hex code should be unique.  The width of the palette is controlled via CSS by adjusting
+     * the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number
+     * of colors with the width setting until the box is symmetrical.</p>
+     * <p>You can override individual colors if needed:</p>
+     * <pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors[0] = "FF0000";  // change the first box to red
+</code></pre>
+
+Or you can provide a custom array of your own for complete control:
+<pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors = ["000000", "993300", "333300"];
+</code></pre>
+     * @type Array
+     */
+    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"
+    ],
+
+    // private
+    onRender : function(container, position){
+        var t = 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 el = document.createElement("div");
+        el.id = this.getId();
+        el.className = this.itemCls;
+        t.overwrite(el, this.colors);
+        container.dom.insertBefore(el, position);
+        this.el = Ext.get(el);
+        this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'});
+        if(this.clickEvent != 'click'){
+        	this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true});
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ColorPalette.superclass.afterRender.call(this);
+        if(this.value){
+            var s = this.value;
+            this.value = null;
+            this.select(s);
+        }
+    },
+
+    // private
+    handleClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
+            this.select(c.toUpperCase());
+        }
+    },
+
+    /**
+     * Selects the specified color in the palette (fires the {@link #select} event)
+     * @param {String} color A valid 6-digit color hex code (# will be stripped if included)
+     */
+    select : function(color){
+        color = color.replace("#", "");
+        if(color != this.value || this.allowReselect){
+            var el = this.el;
+            if(this.value){
+                el.child("a.color-"+this.value).removeClass("x-color-palette-sel");
+            }
+            el.child("a.color-"+color).addClass("x-color-palette-sel");
+            this.value = color;
+            this.fireEvent("select", this, color);
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('colorpalette', Ext.ColorPalette);/**
+ * @class Ext.DatePicker
+ * @extends Ext.Component
+ * Simple date picker class.
+ * @constructor
+ * Create a new DatePicker
+ * @param {Object} config The config object
+ * @xtype datepicker
+ */
+Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} todayText
+     * The text to display on the button that selects the current date (defaults to <tt>'Today'</tt>)
+     */
+    todayText : 'Today',
+    /**
+     * @cfg {String} okText
+     * The text to display on the ok button (defaults to <tt>'&#160;OK&#160;'</tt> to give the user extra clicking room)
+     */
+    okText : '&#160;OK&#160;',
+    /**
+     * @cfg {String} cancelText
+     * The text to display on the cancel button (defaults to <tt>'Cancel'</tt>)
+     */
+    cancelText : 'Cancel',
+    /**
+     * @cfg {String} todayTip
+     * The tooltip to display for the button that selects the current date (defaults to <tt>'{current date} (Spacebar)'</tt>)
+     */
+    todayTip : '{0} (Spacebar)',
+    /**
+     * @cfg {String} minText
+     * The error text to display if the minDate validation fails (defaults to <tt>'This date is before the minimum date'</tt>)
+     */
+    minText : 'This date is before the minimum date',
+    /**
+     * @cfg {String} maxText
+     * The error text to display if the maxDate validation fails (defaults to <tt>'This date is after the maximum date'</tt>)
+     */
+    maxText : 'This date is after the maximum date',
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/y'</tt>).
+     */
+    format : 'm/d/y',
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : 'Disabled',
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : 'Disabled',
+    /**
+     * @cfg {Array} monthNames
+     * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
+     */
+    monthNames : Date.monthNames,
+    /**
+     * @cfg {Array} dayNames
+     * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
+     */
+    dayNames : Date.dayNames,
+    /**
+     * @cfg {String} nextText
+     * The next month navigation button tooltip (defaults to <tt>'Next Month (Control+Right)'</tt>)
+     */
+    nextText : 'Next Month (Control+Right)',
+    /**
+     * @cfg {String} prevText
+     * The previous month navigation button tooltip (defaults to <tt>'Previous Month (Control+Left)'</tt>)
+     */
+    prevText : 'Previous Month (Control+Left)',
+    /**
+     * @cfg {String} monthYearText
+     * The header month selector tooltip (defaults to <tt>'Choose a month (Control+Up/Down to move years)'</tt>)
+     */
+    monthYearText : 'Choose a month (Control+Up/Down to move years)',
+    /**
+     * @cfg {Number} startDay
+     * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
+     */
+    startDay : 0,
+    /**
+     * @cfg {Boolean} showToday
+     * False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
+     * that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date} minDate
+     * Minimum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Date} maxDate
+     * Maximum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
+     */
+    /**
+     * @cfg {RegExp} disabledDatesRE
+     * JavaScript regular expression used to disable a pattern of dates (defaults to null).  The {@link #disabledDates}
+     * config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
+     * disabledDates value.
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:
+     * <ul>
+     * <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
+     * <li>['03/08', '09/16'] would disable those days for every year</li>
+     * <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
+     * <li>['03/../2006'] would disable every day in March 2006</li>
+     * <li>['^03'] would disable every day in every March</li>
+     * </ul>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
+     * escape the dot when restricting dates. For example: ['03\\.08\\.03'].
+     */
+
+    // private
+    initComponent : function(){
+        Ext.DatePicker.superclass.initComponent.call(this);
+
+        this.value = this.value ?
+                 this.value.clearTime() : new Date().clearTime();
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected
+             * @param {DatePicker} this
+             * @param {Date} date The selected date
+             */
+            'select'
+        );
+
+        if(this.handler){
+            this.on('select', this.handler,  this.scope || this);
+        }
+
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(!this.disabledDatesRE && this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1,
+                re = '(?:';
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array/RegExp} disabledDates An array of date strings (see the {@link #disabledDates} config
+     * for details on supported values), or a JavaScript regular expression used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        if(Ext.isArray(dd)){
+            this.disabledDates = dd;
+            this.disabledDatesRE = null;
+        }else{
+            this.disabledDatesRE = dd;
+        }
+        this.initDisabledDays();
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the {@link #disabledDays} config
+     * for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #minDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinDate : function(dt){
+        this.minDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #maxDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxDate : function(dt){
+        this.maxDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Sets the value of the date field
+     * @param {Date} value The date to set
+     */
+    setValue : function(value){
+        var old = this.value;
+        this.value = value.clearTime(true);
+        if(this.el){
+            this.update(this.value);
+        }
+    },
+
+    /**
+     * Gets the current selected value of the date field
+     * @return {Date} The selected date
+     */
+    getValue : function(){
+        return this.value;
+    },
+
+    // private
+    focus : function(){
+        if(this.el){
+            this.update(this.activeDate);
+        }
+    },
+    
+    // private
+    onEnable: function(initial){
+        Ext.DatePicker.superclass.onEnable.call(this);    
+        this.doDisabled(false);
+        this.update(initial ? this.value : this.activeDate);
+        if(Ext.isIE){
+            this.el.repaint();
+        }
+        
+    },
+    
+    // private
+    onDisable: function(){
+        Ext.DatePicker.superclass.onDisable.call(this);   
+        this.doDisabled(true);
+        if(Ext.isIE && !Ext.isIE8){
+            /* Really strange problem in IE6/7, when disabled, have to explicitly
+             * repaint each of the nodes to get them to display correctly, simply
+             * calling repaint on the main element doesn't appear to be enough.
+             */
+             Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){
+                 Ext.fly(el).repaint();
+             });
+        }
+    },
+    
+    // private
+    doDisabled: function(disabled){
+        this.keyNav.setDisabled(disabled);
+        this.prevRepeater.setDisabled(disabled);
+        this.nextRepeater.setDisabled(disabled);
+        if(this.showToday){
+            this.todayKeyListener.setDisabled(disabled);
+            this.todayBtn.setDisabled(disabled);
+        }
+    },
+
+    // private
+    onRender : function(container, position){
+        var m = [
+             '<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>'],
+                dn = this.dayNames,
+                i;
+        for(i = 0; i < 7; i++){
+            var d = this.startDay+i;
+            if(d > 6){
+                d = d-7;
+            }
+            m.push('<th><span>', dn[d].substr(0,1), '</span></th>');
+        }
+        m[m.length] = '</tr></thead><tbody><tr>';
+        for(i = 0; i < 42; i++) {
+            if(i % 7 === 0 && i !== 0){
+                m[m.length] = '</tr><tr>';
+            }
+            m[m.length] = '<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';
+        }
+        m.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 el = document.createElement('div');
+        el.className = 'x-date-picker';
+        el.innerHTML = m.join('');
+
+        container.dom.insertBefore(el, position);
+
+        this.el = Ext.get(el);
+        this.eventEl = Ext.get(el.firstChild);
+
+        this.prevRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-left a'), {
+            handler: this.showPrevMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.nextRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-right a'), {
+            handler: this.showNextMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.monthPicker = this.el.down('div.x-date-mp');
+        this.monthPicker.enableDisplayMode('block');
+
+        this.keyNav = new Ext.KeyNav(this.eventEl, {
+            'left' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevMonth();
+                }else{
+                    this.update(this.activeDate.add('d', -1));    
+                }
+            },
+
+            'right' : function(e){
+                if(e.ctrlKey){
+                    this.showNextMonth();
+                }else{
+                    this.update(this.activeDate.add('d', 1));    
+                }
+            },
+
+            'up' : function(e){
+                if(e.ctrlKey){
+                    this.showNextYear();
+                }else{
+                    this.update(this.activeDate.add('d', -7));
+                }
+            },
+
+            'down' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevYear();
+                }else{
+                    this.update(this.activeDate.add('d', 7));
+                }
+            },
+
+            'pageUp' : function(e){
+                this.showNextMonth();
+            },
+
+            'pageDown' : function(e){
+                this.showPrevMonth();
+            },
+
+            'enter' : function(e){
+                e.stopPropagation();
+                return true;
+            },
+
+            scope : this
+        });
+
+        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.el.child('em').addClass('x-btn-arrow');
+
+        if(this.showToday){
+            this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday,  this);
+            var today = (new Date()).dateFormat(this.format);
+            this.todayBtn = new Ext.Button({
+                renderTo: this.el.child('td.x-date-bottom', true),
+                text: String.format(this.todayText, today),
+                tooltip: String.format(this.todayTip, today),
+                handler: this.selectToday,
+                scope: this
+            });
+        }
+        this.mon(this.eventEl, 'mousewheel', this.handleMouseWheel, this);
+        this.mon(this.eventEl, 'click', this.handleDateClick,  this, {delegate: 'a.x-date-date'});
+        this.mon(this.mbtn, 'click', this.showMonthPicker, this);
+        this.onEnable(true);
+    },
+
+    // private
+    createMonthPicker : function(){
+        if(!this.monthPicker.dom.firstChild){
+            var buf = ['<table border="0" cellspacing="0">'];
+            for(var i = 0; i < 6; i++){
+                buf.push(
+                    '<tr><td class="x-date-mp-month"><a href="#">', Date.getShortMonthName(i), '</a></td>',
+                    '<td class="x-date-mp-month x-date-mp-sep"><a href="#">', Date.getShortMonthName(i + 6), '</a></td>',
+                    i === 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>'
+                );
+            }
+            buf.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(buf.join(''));
+
+            this.mon(this.monthPicker, 'click', this.onMonthClick, this);
+            this.mon(this.monthPicker, '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(m, a, i){
+                i += 1;
+                if((i%2) === 0){
+                    m.dom.xmonth = 5 + Math.round(i * 0.5);
+                }else{
+                    m.dom.xmonth = Math.round((i-1) * 0.5);
+                }
+            });
+        }
+    },
+
+    // private
+    showMonthPicker : function(){
+        if(!this.disabled){
+            this.createMonthPicker();
+            var size = this.el.getSize();
+            this.monthPicker.setSize(size);
+            this.monthPicker.child('table').setSize(size);
+
+            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});
+        }
+    },
+
+    // private
+    updateMPYear : function(y){
+        this.mpyear = y;
+        var ys = this.mpYears.elements;
+        for(var i = 1; i <= 10; i++){
+            var td = ys[i-1], y2;
+            if((i%2) === 0){
+                y2 = y + Math.round(i * 0.5);
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }else{
+                y2 = y - (5-Math.round(i * 0.5));
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }
+            this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        }
+    },
+
+    // private
+    updateMPMonth : function(sm){
+        this.mpMonths.each(function(m, a, i){
+            m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        });
+    },
+
+    // private
+    selectMPMonth : function(m){
+
+    },
+
+    // private
+    onMonthClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if(el.is('button.x-date-mp-cancel')){
+            this.hideMonthPicker();
+        }
+        else if(el.is('button.x-date-mp-ok')){
+            var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate());
+            if(d.getMonth() != this.mpSelMonth){
+                // 'fix' the JS rolling date conversion if needed
+                d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth();
+            }
+            this.update(d);
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-month', 2))){
+            this.mpMonths.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelMonth = pn.dom.xmonth;
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.mpYears.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelYear = pn.dom.xyear;
+        }
+        else if(el.is('a.x-date-mp-prev')){
+            this.updateMPYear(this.mpyear-10);
+        }
+        else if(el.is('a.x-date-mp-next')){
+            this.updateMPYear(this.mpyear+10);
+        }
+    },
+
+    // private
+    onMonthDblClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if((pn = el.up('td.x-date-mp-month', 2))){
+            this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+    },
+
+    // private
+    hideMonthPicker : function(disableAnim){
+        if(this.monthPicker){
+            if(disableAnim === true){
+                this.monthPicker.hide();
+            }else{
+                this.monthPicker.slideOut('t', {duration:0.2});
+            }
+        }
+    },
+
+    // private
+    showPrevMonth : function(e){
+        this.update(this.activeDate.add('mo', -1));
+    },
+
+    // private
+    showNextMonth : function(e){
+        this.update(this.activeDate.add('mo', 1));
+    },
+
+    // private
+    showPrevYear : function(){
+        this.update(this.activeDate.add('y', -1));
+    },
+
+    // private
+    showNextYear : function(){
+        this.update(this.activeDate.add('y', 1));
+    },
+
+    // private
+    handleMouseWheel : function(e){
+        e.stopEvent();
+        if(!this.disabled){
+            var delta = e.getWheelDelta();
+            if(delta > 0){
+                this.showPrevMonth();
+            } else if(delta < 0){
+                this.showNextMonth();
+            }
+        }
+    },
+
+    // private
+    handleDateClick : function(e, t){
+        e.stopEvent();
+        if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){
+            this.setValue(new Date(t.dateValue));
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    selectToday : function(){
+        if(this.todayBtn && !this.todayBtn.disabled){
+            this.setValue(new Date().clearTime());
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    update : function(date, forceRefresh){
+        var vd = this.activeDate, vis = this.isVisible();
+        this.activeDate = date;
+        if(!forceRefresh && vd && this.el){
+            var t = date.getTime();
+            if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){
+                this.cells.removeClass('x-date-selected');
+                this.cells.each(function(c){
+                   if(c.dom.firstChild.dateValue == t){
+                       c.addClass('x-date-selected');
+                       if(vis){
+                           Ext.fly(c.dom.firstChild).focus(50);
+                       }
+                       return false;
+                   }
+                });
+                return;
+            }
+        }
+        var days = date.getDaysInMonth();
+        var firstOfMonth = date.getFirstDateOfMonth();
+        var startingPos = firstOfMonth.getDay()-this.startDay;
+
+        if(startingPos <= this.startDay){
+            startingPos += 7;
+        }
+
+        var pm = date.add('mo', -1);
+        var prevStart = pm.getDaysInMonth()-startingPos;
+
+        var cells = this.cells.elements;
+        var textEls = this.textNodes;
+        days += startingPos;
+
+        // convert everything to numbers so it's fast
+        var day = 86400000;
+        var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime();
+        var today = new Date().clearTime().getTime();
+        var sel = date.clearTime().getTime();
+        var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY;
+        var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY;
+        var ddMatch = this.disabledDatesRE;
+        var ddText = this.disabledDatesText;
+        var ddays = this.disabledDays ? this.disabledDays.join('') : false;
+        var ddaysText = this.disabledDaysText;
+        var format = this.format;
+
+        if(this.showToday){
+            var td = new Date().clearTime();
+            var disable = (td < min || td > max ||
+                (ddMatch && format && ddMatch.test(td.dateFormat(format))) ||
+                (ddays && ddays.indexOf(td.getDay()) != -1));
+
+            if(!this.disabled){
+                this.todayBtn.setDisabled(disable);
+                this.todayKeyListener[disable ? 'disable' : 'enable']();
+            }
+        }
+
+        var setCellClass = function(cal, cell){
+            cell.title = '';
+            var t = d.getTime();
+            cell.firstChild.dateValue = t;
+            if(t == today){
+                cell.className += ' x-date-today';
+                cell.title = cal.todayText;
+            }
+            if(t == sel){
+                cell.className += ' x-date-selected';
+                if(vis){
+                    Ext.fly(cell.firstChild).focus(50);
+                }
+            }
+            // disabling
+            if(t < min) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.minText;
+                return;
+            }
+            if(t > max) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.maxText;
+                return;
+            }
+            if(ddays){
+                if(ddays.indexOf(d.getDay()) != -1){
+                    cell.title = ddaysText;
+                    cell.className = ' x-date-disabled';
+                }
+            }
+            if(ddMatch && format){
+                var fvalue = d.dateFormat(format);
+                if(ddMatch.test(fvalue)){
+                    cell.title = ddText.replace('%0', fvalue);
+                    cell.className = ' x-date-disabled';
+                }
+            }
+        };
+
+        var i = 0;
+        for(; i < startingPos; i++) {
+            textEls[i].innerHTML = (++prevStart);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-prevday';
+            setCellClass(this, cells[i]);
+        }
+        for(; i < days; i++){
+            var intDay = i - startingPos + 1;
+            textEls[i].innerHTML = (intDay);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-active';
+            setCellClass(this, cells[i]);
+        }
+        var extraDays = 0;
+        for(; i < 42; i++) {
+             textEls[i].innerHTML = (++extraDays);
+             d.setDate(d.getDate()+1);
+             cells[i].className = 'x-date-nextday';
+             setCellClass(this, cells[i]);
+        }
+
+        this.mbtn.setText(this.monthNames[date.getMonth()] + ' ' + date.getFullYear());
+
+        if(!this.internalRender){
+            var main = this.el.dom.firstChild;
+            var w = main.offsetWidth;
+            this.el.setWidth(w + this.el.getBorderWidth('lr'));
+            Ext.fly(main).setWidth(w);
+            this.internalRender = true;
+            // opera does not respect the auto grow header center column
+            // then, after it gets a width opera refuses to recalculate
+            // without a second pass
+            if(Ext.isOpera && !this.secondPass){
+                main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px';
+                this.secondPass = true;
+                this.update.defer(10, this, [date]);
+            }
+        }
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.rendered){
+            this.keyNav.disable();
+            this.keyNav = null;
+            Ext.destroy(
+                this.leftClickRpt,
+                this.rightClickRpt,
+                this.monthPicker,
+                this.eventEl,
+                this.mbtn,
+                this.todayBtn
+            );
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+Ext.reg('datepicker', Ext.DatePicker);
+/**
+ * @class Ext.LoadMask
+ * A simple utility class for generically masking elements while loading data.  If the {@link #store}
+ * config option is specified, the masking will be automatically synchronized with the store's loading
+ * process and the mask element will be cached for reuse.  For all other elements, this mask will replace the
+ * element's Updater load indicator and will be destroyed after the initial load.
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic mask:
+var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
+myMask.show();
+</code></pre>
+ * @constructor
+ * Create a new LoadMask
+ * @param {Mixed} el The element or DOM node, or its id
+ * @param {Object} config The config object
+ */
+Ext.LoadMask = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(this.store){
+        this.store.on('beforeload', this.onBeforeLoad, this);
+        this.store.on('load', this.onLoad, this);
+        this.store.on('exception', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, false);
+    }else{
+        var um = this.el.getUpdater();
+        um.showLoadIndicator = false; // disable the default indicator
+        um.on('beforeupdate', this.onBeforeLoad, this);
+        um.on('update', this.onLoad, this);
+        um.on('failure', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, true);
+    }
+};
+
+Ext.LoadMask.prototype = {
+    /**
+     * @cfg {Ext.data.Store} store
+     * Optional Store to which the mask is bound. The mask is displayed when a load request is issued, and
+     * hidden on either load sucess, or load fail.
+     */
+    /**
+     * @cfg {Boolean} removeMask
+     * True to create a single-use mask that is automatically destroyed after loading (useful for page loads),
+     * False to persist the mask element reference for multiple uses (e.g., for paged data widgets).  Defaults to false.
+     */
+    /**
+     * @cfg {String} msg
+     * The text to display in a centered loading message box (defaults to 'Loading...')
+     */
+    msg : 'Loading...',
+    /**
+     * @cfg {String} msgCls
+     * The CSS class to apply to the loading message element (defaults to "x-mask-loading")
+     */
+    msgCls : 'x-mask-loading',
+
+    /**
+     * Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false)
+     * @type Boolean
+     */
+    disabled: false,
+
+    /**
+     * Disables the mask to prevent it from being displayed
+     */
+    disable : function(){
+       this.disabled = true;
+    },
+
+    /**
+     * Enables the mask so that it can be displayed
+     */
+    enable : function(){
+        this.disabled = false;
+    },
+
+    // private
+    onLoad : function(){
+        this.el.unmask(this.removeMask);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.disabled){
+            this.el.mask(this.msg, this.msgCls);
+        }
+    },
+
+    /**
+     * Show this LoadMask over the configured Element.
+     */
+    show: function(){
+        this.onBeforeLoad();
+    },
+
+    /**
+     * Hide this LoadMask.
+     */
+    hide: function(){
+        this.onLoad();
+    },
+
+    // private
+    destroy : function(){
+        if(this.store){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoad, this);
+        }else{
+            var um = this.el.getUpdater();
+            um.un('beforeupdate', this.onBeforeLoad, this);
+            um.un('update', this.onLoad, this);
+            um.un('failure', this.onLoad, this);
+        }
+    }
+};/**
+ * @class Ext.Slider
+ * @extends Ext.BoxComponent
+ * Slider which supports vertical or horizontal orientation, keyboard adjustments,
+ * configurable snapping, axis clicking and animation. Can be added as an item to
+ * any container. Example usage:
+<pre><code>
+new Ext.Slider({
+    renderTo: Ext.getBody(),
+    width: 200,
+    value: 50,
+    increment: 10,
+    minValue: 0,
+    maxValue: 100
+});
+</code></pre>
+ */
+Ext.Slider = Ext.extend(Ext.BoxComponent, {
+	/**
+	 * @cfg {Number} value The value to initialize the slider with. Defaults to minValue.
+	 */
+	/**
+	 * @cfg {Boolean} vertical Orient the Slider vertically rather than horizontally, defaults to false.
+	 */
+    vertical: false,
+	/**
+	 * @cfg {Number} minValue The minimum value for the Slider. Defaults to 0.
+	 */
+    minValue: 0,
+	/**
+	 * @cfg {Number} maxValue The maximum value for the Slider. Defaults to 100.
+	 */
+    maxValue: 100,
+    /**
+     * @cfg {Number/Boolean} decimalPrecision.
+     * <p>The number of decimal places to which to round the Slider's value. Defaults to 0.</p>
+     * <p>To disable rounding, configure as <tt><b>false</b></tt>.</p>
+     */
+    decimalPrecision: 0,
+	/**
+	 * @cfg {Number} keyIncrement How many units to change the Slider when adjusting with keyboard navigation. Defaults to 1. If the increment config is larger, it will be used instead.
+	 */
+    keyIncrement: 1,
+	/**
+	 * @cfg {Number} increment How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping'.
+	 */
+    increment: 0,
+	// private
+    clickRange: [5,15],
+	/**
+	 * @cfg {Boolean} clickToChange Determines whether or not clicking on the Slider axis will change the slider. Defaults to true
+	 */
+    clickToChange : true,
+	/**
+	 * @cfg {Boolean} animate Turn on or off animation. Defaults to true
+	 */
+    animate: true,
+
+    /**
+     * True while the thumb is in a drag operation
+     * @type boolean
+     */
+    dragging: false,
+
+    // private override
+    initComponent : function(){
+        if(!Ext.isDefined(this.value)){
+            this.value = this.minValue;
+        }
+        Ext.Slider.superclass.initComponent.call(this);
+        this.keyIncrement = Math.max(this.increment, this.keyIncrement);
+        this.addEvents(
+            /**
+             * @event beforechange
+             * Fires before the slider value is changed. By returning false from an event handler,
+             * you can cancel the event and prevent the slider from changing.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider is being changed to.
+			 * @param {Number} oldValue The old value which the slider was previously.
+             */
+			'beforechange',
+			/**
+			 * @event change
+			 * Fires when the slider value is changed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'change',
+			/**
+			 * @event changecomplete
+			 * Fires when the slider value is changed by the user and any drag operations have completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'changecomplete',
+			/**
+			 * @event dragstart
+             * Fires after a drag operation has started.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragstart',
+			/**
+			 * @event drag
+             * Fires continuously during the drag operation while the mouse is moving.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'drag',
+			/**
+			 * @event dragend
+             * Fires after the drag operation has completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragend'
+		);
+
+        if(this.vertical){
+            Ext.apply(this, Ext.Slider.Vertical);
+        }
+    },
+
+	// private override
+    onRender : function(){
+        this.autoEl = {
+            cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'),
+            cn:{cls:'x-slider-end',cn:{cls:'x-slider-inner',cn:[{cls:'x-slider-thumb'},{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}]}}
+        };
+        Ext.Slider.superclass.onRender.apply(this, arguments);
+        this.endEl = this.el.first();
+        this.innerEl = this.endEl.first();
+        this.thumb = this.innerEl.first();
+        this.halfThumb = (this.vertical ? this.thumb.getHeight() : this.thumb.getWidth())/2;
+        this.focusEl = this.thumb.next();
+        this.initEvents();
+    },
+
+	// private override
+    initEvents : function(){
+        this.thumb.addClassOnOver('x-slider-thumb-over');
+        this.mon(this.el, {
+            scope: this,
+            mousedown: this.onMouseDown,
+            keydown: this.onKeyDown
+        });
+
+        this.focusEl.swallowEvent("click", true);
+
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeDragStart.createDelegate(this),
+            onStart: this.onDragStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onDragEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(this.thumb);
+        this.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+	// private override
+    onMouseDown : function(e){
+        if(this.disabled) {return;}
+        if(this.clickToChange && e.target != this.thumb.dom){
+            var local = this.innerEl.translatePoints(e.getXY());
+            this.onClickChange(local);
+        }
+        this.focus();
+    },
+
+	// private
+    onClickChange : function(local){
+        if(local.top > this.clickRange[0] && local.top < this.clickRange[1]){
+            this.setValue(Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true);
+        }
+    },
+
+	// private
+    onKeyDown : function(e){
+        if(this.disabled){e.preventDefault();return;}
+        var k = e.getKey();
+        switch(k){
+            case e.UP:
+            case e.RIGHT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.maxValue, undefined, true);
+                }else{
+                    this.setValue(this.value+this.keyIncrement, undefined, true);
+                }
+            break;
+            case e.DOWN:
+            case e.LEFT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.minValue, undefined, true);
+                }else{
+                    this.setValue(this.value-this.keyIncrement, undefined, true);
+                }
+            break;
+            default:
+                e.preventDefault();
+        }
+    },
+
+	// private
+    doSnap : function(value){
+        if(!this.increment || this.increment == 1 || !value) {
+            return value;
+        }
+        var newValue = value, inc = this.increment;
+        var m = value % inc;
+        if(m != 0){
+            newValue -= m;
+            if(m * 2 > inc){
+                newValue += inc;
+            }else if(m * 2 < -inc){
+                newValue -= inc;
+            }
+        }
+        return newValue.constrain(this.minValue,  this.maxValue);
+    },
+
+	// private
+    afterRender : function(){
+        Ext.Slider.superclass.afterRender.apply(this, arguments);
+        if(this.value !== undefined){
+            var v = this.normalizeValue(this.value);
+            if(v !== this.value){
+                delete this.value;
+                this.setValue(v, false);
+            }else{
+                this.moveThumb(this.translateValue(v), false);
+            }
+        }
+    },
+
+	// private
+    getRatio : function(){
+        var w = this.innerEl.getWidth();
+        var v = this.maxValue - this.minValue;
+        return v == 0 ? w : (w/v);
+    },
+
+	// private
+    normalizeValue : function(v){
+        v = this.doSnap(v);
+        v = Ext.util.Format.round(v, this.decimalPrecision);
+        v = v.constrain(this.minValue, this.maxValue);
+        return v;
+    },
+
+	/**
+	 * Programmatically sets the value of the Slider. Ensures that the value is constrained within
+	 * the minValue and maxValue.
+	 * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue)
+	 * @param {Boolean} animate Turn on or off animation, defaults to true
+	 */
+    setValue : function(v, animate, changeComplete){
+        v = this.normalizeValue(v);
+        if(v !== this.value && this.fireEvent('beforechange', this, v, this.value) !== false){
+            this.value = v;
+            this.moveThumb(this.translateValue(v), animate !== false);
+            this.fireEvent('change', this, v);
+            if(changeComplete){
+                this.fireEvent('changecomplete', this, v);
+            }
+        }
+    },
+
+	// private
+    translateValue : function(v){
+        var ratio = this.getRatio();
+        return (v * ratio)-(this.minValue * ratio)-this.halfThumb;
+    },
+
+	reverseValue : function(pos){
+        var ratio = this.getRatio();
+        return (pos+this.halfThumb+(this.minValue * ratio))/ratio;
+    },
+
+	// private
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setLeft(v);
+        }else{
+            this.thumb.shift({left: v, stopFx: true, duration:.35});
+        }
+    },
+
+	// private
+    focus : function(){
+        this.focusEl.focus(10);
+    },
+
+	// private
+    onBeforeDragStart : function(e){
+        return !this.disabled;
+    },
+
+	// private
+    onDragStart: function(e){
+        this.thumb.addClass('x-slider-thumb-drag');
+        this.dragging = true;
+        this.dragStartValue = this.value;
+        this.fireEvent('dragstart', this, e);
+    },
+
+	// private
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        this.setValue(Ext.util.Format.round(this.reverseValue(pos.left), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+	// private
+    onDragEnd: function(e){
+        this.thumb.removeClass('x-slider-thumb-drag');
+        this.dragging = false;
+        this.fireEvent('dragend', this, e);
+        if(this.dragStartValue != this.value){
+            this.fireEvent('changecomplete', this, this.value);
+        }
+    },
+
+	// private
+    onResize : function(w, h){
+        this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r')));
+        this.syncThumb();
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.Slider.superclass.onDisable.call(this);
+        this.thumb.addClass(this.disabledClass);
+        if(Ext.isIE){
+            //IE breaks when using overflow visible and opacity other than 1.
+            //Create a place holder for the thumb and display it.
+            var xy = this.thumb.getXY();
+            this.thumb.hide();
+            this.innerEl.addClass(this.disabledClass).dom.disabled = true;
+            if (!this.thumbHolder){
+                this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass});    
+            }
+            this.thumbHolder.show().setXY(xy);
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.Slider.superclass.onEnable.call(this);
+        this.thumb.removeClass(this.disabledClass);
+        if(Ext.isIE){
+            this.innerEl.removeClass(this.disabledClass).dom.disabled = false;
+            if (this.thumbHolder){
+                this.thumbHolder.hide();
+            }
+            this.thumb.show();
+            this.syncThumb();
+        }
+    },
+    
+    /**
+     * Synchronizes the thumb position to the proper proportion of the total component width based
+     * on the current slider {@link #value}.  This will be called automatically when the Slider
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the Slider if necessary.
+     */
+    syncThumb : function(){
+        if(this.rendered){
+            this.moveThumb(this.translateValue(this.value));
+        }
+    },
+
+	/**
+	 * Returns the current value of the slider
+	 * @return {Number} The current value of the slider
+	 */
+    getValue : function(){
+        return this.value;
+    }
+});
+Ext.reg('slider', Ext.Slider);
+
+// private class to support vertical sliders
+Ext.Slider.Vertical = {
+    onResize : function(w, h){
+        this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b')));
+        this.syncThumb();
+    },
+
+    getRatio : function(){
+        var h = this.innerEl.getHeight();
+        var v = this.maxValue - this.minValue;
+        return h/v;
+    },
+
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setBottom(v);
+        }else{
+            this.thumb.shift({bottom: v, stopFx: true, duration:.35});
+        }
+    },
+
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        var bottom = this.innerEl.getHeight()-pos.top;
+        this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+    onClickChange : function(local){
+        if(local.left > this.clickRange[0] && local.left < this.clickRange[1]){
+            var bottom = this.innerEl.getHeight()-local.top;
+            this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), undefined, true);
+        }
+    }
+};/**
+ * @class Ext.ProgressBar
+ * @extends Ext.BoxComponent
+ * <p>An updateable progress bar component.  The progress bar supports two different modes: manual and automatic.</p>
+ * <p>In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the
+ * progress bar as needed from your own code.  This method is most appropriate when you want to show progress
+ * throughout an operation that has predictable points of interest at which you can update the control.</p>
+ * <p>In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it
+ * once the operation is complete.  You can optionally have the progress bar wait for a specific amount of time
+ * and then clear itself.  Automatic mode is most appropriate for timed operations or asynchronous operations in
+ * which you have no need for indicating intermediate progress.</p>
+ * @cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+ * @cfg {String} text The progress bar text (defaults to '')
+ * @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress
+ * bar's internal text element)
+ * @cfg {String} id The progress bar element's id (defaults to an auto-generated id)
+ * @xtype progress
+ */
+Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
+   /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
+    */
+    baseCls : 'x-progress',
+    
+    /**
+    * @cfg {Boolean} animate
+    * True to animate the progress bar during transitions (defaults to false)
+    */
+    animate : false,
+
+    // private
+    waitTimer : null,
+
+    // private
+    initComponent : function(){
+        Ext.ProgressBar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event update
+             * Fires after each update interval
+             * @param {Ext.ProgressBar} this
+             * @param {Number} The current progress value
+             * @param {String} The current progress text
+             */
+            "update"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        var tpl = new Ext.Template(
+            '<div class="{cls}-wrap">',
+                '<div class="{cls}-inner">',
+                    '<div class="{cls}-bar">',
+                        '<div class="{cls}-text">',
+                            '<div>&#160;</div>',
+                        '</div>',
+                    '</div>',
+                    '<div class="{cls}-text {cls}-text-back">',
+                        '<div>&#160;</div>',
+                    '</div>',
+                '</div>',
+            '</div>'
+        );
+
+        this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true)
+        	: tpl.append(ct, {cls: this.baseCls}, true);
+		        
+        if(this.id){
+            this.el.dom.id = this.id;
+        }
+        var inner = this.el.dom.firstChild;
+        this.progressBar = Ext.get(inner.firstChild);
+
+        if(this.textEl){
+            //use an external text el
+            this.textEl = Ext.get(this.textEl);
+            delete this.textTopEl;
+        }else{
+            //setup our internal layered text els
+            this.textTopEl = Ext.get(this.progressBar.dom.firstChild);
+            var textBackEl = Ext.get(inner.childNodes[1]);
+            this.textTopEl.setStyle("z-index", 99).addClass('x-hidden');
+            this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]);
+            this.textEl.setWidth(inner.offsetWidth);
+        }
+        this.progressBar.setHeight(inner.offsetHeight);
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.ProgressBar.superclass.afterRender.call(this);
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }else{
+            this.updateText(this.text);
+        }
+    },
+
+    /**
+     * Updates the progress bar value, and optionally its text.  If the text argument is not specified,
+     * any existing text value will be unchanged.  To blank out existing text, pass ''.  Note that even
+     * if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for
+     * determining when the progress is complete and calling {@link #reset} to clear and/or hide the control.
+     * @param {Float} value (optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @param {Boolean} animate (optional) Whether to animate the transition of the progress bar. If this value is
+     * not specified, the default for the class is used (default to false)
+     * @return {Ext.ProgressBar} this
+     */
+    updateProgress : function(value, text, animate){
+        this.value = value || 0;
+        if(text){
+            this.updateText(text);
+        }
+        if(this.rendered){
+            var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);
+            this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
+            if(this.textTopEl){
+                //textTopEl should be the same width as the bar so overflow will clip as the bar moves
+                this.textTopEl.removeClass('x-hidden').setWidth(w);
+            }
+        }
+        this.fireEvent('update', this, value, text);
+        return this;
+    },
+
+    /**
+     * Initiates an auto-updating progress bar.  A duration can be specified, in which case the progress
+     * bar will automatically reset after a fixed amount of time and optionally call a callback function
+     * if specified.  If no duration is passed in, then the progress bar will run indefinitely and must
+     * be manually cleared by calling {@link #reset}.  The wait method accepts a config object with
+     * the following properties:
+     * <pre>
+Property   Type          Description
+---------- ------------  ----------------------------------------------------------------------
+duration   Number        The length of time in milliseconds that the progress bar should
+                         run before resetting itself (defaults to undefined, in which case it
+                         will run indefinitely until reset is called)
+interval   Number        The length of time in milliseconds between each progress update
+                         (defaults to 1000 ms)
+animate    Boolean       Whether to animate the transition of the progress bar. If this value is
+                         not specified, the default for the class is used.                                                   
+increment  Number        The number of progress update segments to display within the progress
+                         bar (defaults to 10).  If the bar reaches the end and is still
+                         updating, it will automatically wrap back to the beginning.
+text       String        Optional text to display in the progress bar element (defaults to '').
+fn         Function      A callback function to execute after the progress bar finishes auto-
+                         updating.  The function will be called with no arguments.  This function
+                         will be ignored if duration is not specified since in that case the
+                         progress bar can only be stopped programmatically, so any required function
+                         should be called by the same code after it resets the progress bar.
+scope      Object        The scope that is passed to the callback function (only applies when
+                         duration and fn are both passed).
+</pre>
+         *
+         * Example usage:
+         * <pre><code>
+var p = new Ext.ProgressBar({
+   renderTo: 'my-el'
+});
+
+//Wait for 5 seconds, then update the status el (progress bar will auto-reset)
+p.wait({
+   interval: 100, //bar will move fast!
+   duration: 5000,
+   increment: 15,
+   text: 'Updating...',
+   scope: this,
+   fn: function(){
+      Ext.fly('status').update('Done!');
+   }
+});
+
+//Or update indefinitely until some async action completes, then reset manually
+p.wait();
+myAction.on('complete', function(){
+    p.reset();
+    Ext.fly('status').update('Done!');
+});
+</code></pre>
+     * @param {Object} config (optional) Configuration options
+     * @return {Ext.ProgressBar} this
+     */
+    wait : function(o){
+        if(!this.waitTimer){
+            var scope = this;
+            o = o || {};
+            this.updateText(o.text);
+            this.waitTimer = Ext.TaskMgr.start({
+                run: function(i){
+                    var inc = o.increment || 10;
+                    this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);
+                },
+                interval: o.interval || 1000,
+                duration: o.duration,
+                onStop: function(){
+                    if(o.fn){
+                        o.fn.apply(o.scope || this);
+                    }
+                    this.reset();
+                },
+                scope: scope
+            });
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the progress bar is currently in a {@link #wait} operation
+     * @return {Boolean} True if waiting, else false
+     */
+    isWaiting : function(){
+        return this.waitTimer !== null;
+    },
+
+    /**
+     * Updates the progress bar text.  If specified, textEl will be updated, otherwise the progress
+     * bar itself will display the updated text.
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @return {Ext.ProgressBar} this
+     */
+    updateText : function(text){
+        this.text = text || '&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+        }
+        return this;
+    },
+    
+    /**
+     * Synchronizes the inner bar width to the proper proportion of the total componet width based
+     * on the current progress {@link #value}.  This will be called automatically when the ProgressBar
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the ProgressBar if necessary.
+     */
+    syncProgressBar : function(){
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the size of the progress bar.
+     * @param {Number} width The new width in pixels
+     * @param {Number} height The new height in pixels
+     * @return {Ext.ProgressBar} this
+     */
+    setSize : function(w, h){
+        Ext.ProgressBar.superclass.setSize.call(this, w, h);
+        if(this.textTopEl){
+            var inner = this.el.dom.firstChild;
+            this.textEl.setSize(inner.offsetWidth, inner.offsetHeight);
+        }
+        this.syncProgressBar();
+        return this;
+    },
+
+    /**
+     * Resets the progress bar value to 0 and text to empty string.  If hide = true, the progress
+     * bar will also be hidden (using the {@link #hideMode} property internally).
+     * @param {Boolean} hide (optional) True to hide the progress bar (defaults to false)
+     * @return {Ext.ProgressBar} this
+     */
+    reset : function(hide){
+        this.updateProgress(0);
+        if(this.textTopEl){
+            this.textTopEl.addClass('x-hidden');
+        }
+        if(this.waitTimer){
+            this.waitTimer.onStop = null; //prevent recursion
+            Ext.TaskMgr.stop(this.waitTimer);
+            this.waitTimer = null;
+        }
+        if(hide === true){
+            this.hide();
+        }
+        return this;
+    }
+});
+Ext.reg('progress', Ext.ProgressBar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/cmp-foundation.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ComponentMgr=function(){var c=new Ext.util.MixedCollection();var b={};var a={};return{register:function(d){c.add(d)},unregister:function(d){c.remove(d)},get:function(d){return c.get(d)},onAvailable:function(f,e,d){c.on("add",function(g,h){if(h.id==f){e.call(d||h,h);c.un("add",e,d)}})},all:c,isRegistered:function(d){return b[d]!==undefined},registerType:function(e,d){b[e]=d;d.xtype=e},create:function(d,e){return d.render?d:new b[d.xtype||e](d)},registerPlugin:function(e,d){a[e]=d;d.ptype=e},createPlugin:function(d,e){return new a[d.ptype||e](d)}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create;Ext.Component=function(b){b=b||{};if(b.initialConfig){if(b.isAction){this.baseAction=b}b=b.initialConfig}else{if(b.tagName||b.dom||Ext.isString(b)){b={applyTo:b,id:b.id||b}}}this.initialConfig=b;Ext.apply(this,b);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","afterrender","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,{disabled:false,hidden:false,autoEl:"div",disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initPlugin:function(a){if(a.ptype&&!Ext.isFunction(a.init)){a=Ext.ComponentMgr.createPlugin(a)}else{if(Ext.isString(a)){a=Ext.ComponentMgr.createPlugin({ptype: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(Ext.isNumber(a)){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}if(this.overCls){this.el.addClassOnOver(this.overCls)}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.doHide()}if(this.disabled){this.disable(true)}if(this.stateful!==false){this.initStateEvents()}this.initRef();this.fireEvent("afterrender",this)}return this},initRef:function(){if(this.ref){var d=this.ref.split("/");var c=d.length,b=0;var a=this;while(b<c){if(a.ownerCt){a=a.ownerCt}b++}a[d[--b]]=this}},initState:function(a){if(Ext.state.Manager){var c=this.getStateId();if(c){var b=Ext.state.Manager.get(c);if(b){if(this.fireEvent("beforestaterestore",this,b)!==false){this.applyState(b);this.fireEvent("staterestore",this,b)}}}}},getStateId:function(){return this.stateId||((this.id.indexOf("ext-comp-")==0||this.id.indexOf("ext-gen")==0)?null:this.id)},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&&this.stateful!==false){var b=this.getStateId();if(b){var a=this.getState();if(this.fireEvent("beforestatesave",this,a)!==false){Ext.state.Manager.set(b,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}return this},removeClass:function(a){if(this.el){this.el.removeClass(a)}else{if(this.cls){this.cls=this.cls.split(" ").remove(a).join(" ")}}return this},onRender:function(b,a){if(!this.el&&this.autoEl){if(Ext.isString(this.autoEl)){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)}}},getAutoCreate:function(){var a=Ext.isObject(this.autoCreate)?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.removeMode=="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(Ext.isNumber(a)?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(a){if(this.rendered){this.onDisable()}this.disabled=true;if(a!==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){return this[a?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender){this.render(Ext.isBoolean(this.autoRender)?Ext.getBody():this.autoRender)}if(this.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){this.getVisibiltyEl().removeClass("x-hide-"+this.hideMode)},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.doHide();this.fireEvent("hide",this)}return this},doHide:function(){this.hidden=true;if(this.rendered){this.onHide()}},onHide:function(){this.getVisibiltyEl().addClass("x-hide-"+this.hideMode)},getVisibiltyEl:function(){return this.hideParent?this.container:this.getActionEl()},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(){return this.rendered&&this.getVisibiltyEl().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){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.constructor.xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.constructor.xtype==b},getXTypes:function(){var a=this.constructor;if(!a.xtypes){var d=[],b=this;while(b&&b.constructor.xtype){d.unshift(b.constructor.xtype);b=b.constructor.superclass}a.xtypeChain=d;a.xtypes=d.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 Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.findParentBy(function(b){return b.constructor.xtype===a})},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl()},purgeListeners:function(){Ext.Component.superclass.purgeListeners.call(this);if(this.mons){this.on("beforedestroy",this.clearMons,this,{single:true})}},clearMons:function(){Ext.each(this.mons,function(a){a.item.un(a.ename,a.fn,a.scope)},this);this.mons=[]},mon:function(f,b,d,c,a){if(!this.mons){this.mons=[];this.on("beforedestroy",this.clearMons,this,{single:true})}if(Ext.isObject(b)){var i=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var h=b;for(var g in h){if(i.test(g)){continue}if(Ext.isFunction(h[g])){this.mons.push({item:f,ename:g,fn:h[g],scope:h.scope});f.on(g,h[g],h.scope,h)}else{this.mons.push({item:f,ename:g,fn:h[g],scope:h.scope});f.on(g,h[g])}}return}this.mons.push({item:f,ename:b,fn:d,scope:c});f.on(b,d,c,a)},mun:function(g,c,f,e){var h,d;for(var b=0,a=this.mons.length;b<a;++b){d=this.mons[b];if(g===d.item&&c==d.ename&&f===d.fn&&e===d.scope){this.mons.splice(b,1);g.un(c,f,e);h=true;break}}return h},nextSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a!=-1&&a+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(a+1)}}return null},previousSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a>0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]};Ext.Action.prototype={isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;c<a;c++){d[c][e].apply(d[c],b)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){this.items.remove(a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments)}};(function(){Ext.Layer=function(d,c){d=d||{};var e=Ext.DomHelper;var g=d.parentEl,f=g?Ext.getDom(g):document.body;if(c){this.dom=Ext.getDom(c)}if(!this.dom){var h=d.dh||{tag:"div",cls:"x-layer"};this.dom=e.append(f,h)}if(d.cls){this.addClass(d.cls)}this.constrain=d.constrain!==false;this.setVisibilityMode(Ext.Element.VISIBILITY);if(d.id){this.id=this.dom.id=d.id}else{this.id=Ext.id(this.dom)}this.zindex=d.zindex||this.getZIndex();this.position("absolute",this.zindex);if(d.shadow){this.shadowOffset=d.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:d.shadow})}else{this.shadowOffset=0}this.useShim=d.shim!==false&&Ext.useShims;this.useDisplay=d.useDisplay;this.hide()};var a=Ext.Element.prototype;var b=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11000},getShim:function(){if(!this.useShim){return null}if(this.shim){return this.shim}var d=b.shift();if(!d){d=this.createShim();d.enableDisplayMode("block");d.dom.style.display="none";d.dom.style.visibility="visible"}var c=this.dom.parentNode;if(d.dom.parentNode!=c){c.insertBefore(d.dom,this.dom)}d.setStyle("z-index",this.getZIndex()-2);this.shim=d;return d},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);b.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(c){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(c){this.sync(true)}}},sync:function(c){var j=this.shadow;if(!this.updating&&this.isVisible()&&(j||this.useShim)){var f=this.getShim();var i=this.getWidth(),e=this.getHeight();var d=this.getLeft(true),k=this.getTop(true);if(j&&!this.shadowDisabled){if(c&&!j.isVisible()){j.show(this)}else{j.realign(d,k,i,e)}if(f){if(c){f.show()}var g=j.adjusts,m=f.dom.style;m.left=(Math.min(d,d+g.l))+"px";m.top=(Math.min(k,k+g.t))+"px";m.width=(i+g.w)+"px";m.height=(e+g.h)+"px"}}else{if(f){if(c){f.show()}f.setSize(i,e);f.setLeftTop(d,k)}}}},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 i=Ext.lib.Dom.getViewWidth(),d=Ext.lib.Dom.getViewHeight();var n=Ext.getDoc().getScroll();var m=this.getXY();var j=m[0],g=m[1];var c=this.shadowOffset;var k=this.dom.offsetWidth+c,e=this.dom.offsetHeight+c;var f=false;if((j+k)>i+n.left){j=i-k-c;f=true}if((g+e)>d+n.top){g=d-e-c;f=true}if(j<n.left){j=n.left;f=true}if(g<n.top){g=n.top;f=true}if(f){if(this.avoidY){var l=this.avoidY;if(g<=l&&(g+e)>=l){g=l-e-5}}m=[j,g];this.storeXY(m);a.setXY.call(this,m);this.sync()}}return this},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(h,g,j,k,i){if(h){this.showAction()}if(g&&h){var f=function(){this.sync(true);if(k){k()}}.createDelegate(this);a.setVisible.call(this,true,true,j,f,i)}else{if(!h){this.hideUnders(true)}var f=k;if(g){f=function(){this.hideAction();if(k){k()}}.createDelegate(this)}a.setVisible.call(this,h,g,j,f,i);if(h){this.sync(true)}else{if(!g){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(i,g,j,k,h){this.fixDisplay();this.beforeAction();this.storeXY(i);var f=this.createCB(k);a.setXY.call(this,i,g,j,f,h);if(!g){f()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(f,g,i,j,h){this.setXY([f,this.getY()],g,i,j,h);return this},setY:function(j,f,h,i,g){this.setXY([this.getX(),j],f,h,i,g);return this},setSize:function(i,j,g,l,m,k){this.beforeAction();var f=this.createCB(m);a.setSize.call(this,i,j,g,l,f,k);if(!g){f()}return this},setWidth:function(h,g,j,k,i){this.beforeAction();var f=this.createCB(k);a.setWidth.call(this,h,g,j,f,i);if(!g){f()}return this},setHeight:function(i,g,k,l,j){this.beforeAction();var f=this.createCB(l);a.setHeight.call(this,i,g,k,f,j);if(!g){f()}return this},setBounds:function(n,l,o,g,m,j,k,i){this.beforeAction();var f=this.createCB(k);if(!m){this.storeXY([n,l]);a.setXY.call(this,[n,l]);a.setSize.call(this,o,g,m,j,f,i);f()}else{a.setBounds.call(this,n,l,o,g,m,j,f,i)}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)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=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=e;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=(e*2);c.l=-e;c.t=e-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=(e*2);c.l=c.t=-e;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,q,p,f){if(!this.el){return}var m=this.adjusts,j=this.el.dom,r=j.style;var g=0;r.left=(b+m.l)+"px";r.top=(q+m.t)+"px";var o=(p+m.w),e=(f+m.h),i=o+"px",n=e+"px";if(r.width!=i||r.height!=n){r.width=i;r.height=n;if(!Ext.isIE){var k=j.childNodes;var c=Math.max(0,(o-12))+"px";k[0].childNodes[1].style.width=c;k[1].childNodes[1].style.width=c;k[2].childNodes[1].style.width=c;k[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,d){if(typeof b=="object"){d=b.height;b=b.width}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d);var f=c.width,a=c.height;if(f!==undefined||a!==undefined){var e=this.getResizeEl();if(!this.deferHeight&&f!==undefined&&a!==undefined){e.setSize(f,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(f!==undefined){e.setWidth(f)}}}this.onResize(f,a,b,d);this.fireEvent("resize",this,f,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(a,f){if(a&&typeof a[1]=="number"){f=a[1];a=a[0]}this.x=a;this.y=f;if(!this.boxReady){return this}var b=this.adjustPosition(a,f);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().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.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);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){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});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,{bufferResize:100,autoDestroy:true,forceLayout:false,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");this.enableBubble("add","remove");var a=this.items;if(a){delete this.items;if(Ext.isArray(a)&&a.length>0){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(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}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)}}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(a){this.initItems();var b=arguments.length>1;if(b||Ext.isArray(a)){Ext.each(b?arguments:a,function(f){this.add(f)},this);return}var e=this.lookupComponent(this.applyDefaults(a));var d=this.items.length;if(this.fireEvent("beforeadd",this,e,d)!==false&&this.onBeforeAdd(e)!==false){this.items.add(e);e.ownerCt=this;this.fireEvent("add",this,e,d)}return e},insert:function(f,e){this.initItems();var d=arguments,b=d.length;if(b>2){for(var g=b-1;g>=1;--g){this.insert(f,d[g])}return}var h=this.lookupComponent(this.applyDefaults(e));if(h.ownerCt==this&&this.items.indexOf(h)<f){--f}if(this.fireEvent("beforeadd",this,h,f)!==false&&this.onBeforeAdd(h)!==false){this.items.insert(f,h);h.ownerCt=this;this.fireEvent("add",this,h,f)}return h},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){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.items.remove(d);delete d.ownerCt;if(b===true||(b!==false&&this.autoDestroy)){d.destroy()}if(this.layout&&this.layout.activeItem==d){delete this.layout.activeItem}this.fireEvent("remove",this,d)}return d},removeAll:function(c){this.initItems();var e,f=[],b=[];this.items.each(function(g){f.push(g)});for(var d=0,a=f.length;d<a;++d){e=f[d];this.remove(e,c);if(e.ownerCt!==this){b.push(e)}}return b},getComponent:function(a){if(Ext.isObject(a)){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.create(a,this.defaultType)},doLayout:function(f,e){var j=this.rendered,h=this.forceLayout;if(!this.isVisible()||this.collapsed){this.deferLayout=this.deferLayout||!f;if(!(e||h)){return}f=f&&!this.deferLayout}else{delete this.deferLayout}if(j&&this.layout){this.layout.layout()}if(f!==true&&this.items){var d=this.items.items;for(var b=0,a=d.length;b<a;b++){var g=d[b];if(g.doLayout){g.forceLayout=h;g.doLayout()}}}if(j){this.onLayout(f,e)}delete this.forceLayout},onLayout:Ext.emptyFn,onShow:function(){Ext.Container.superclass.onShow.call(this);if(this.deferLayout!==undefined){this.doLayout(true)}},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)}Ext.destroy(this.layout);Ext.Container.superclass.beforeDestroy.call(this)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},cascade:function(f,e,b){if(f.apply(e||this,b||[this])!==false){if(this.items){var d=this.items.items;for(var c=0,a=d.length;c<a;c++){if(d[c].cascade){d[c].cascade(f,e,b)}else{f.apply(e||d[c],b||[d[c]])}}}}return this},findById:function(c){var a,b=this;this.cascade(function(d){if(b!=d&&d.id===c){a=d;return false}});return a||null},findByType:function(b,a){return this.findBy(function(d){return d.isXType(b,a)})},find:function(b,a){return this.findBy(function(d){return d[b]===a})},findBy:function(d,c){var a=[],b=this;this.cascade(function(e){if(b!=e&&d.call(c||e,e,b)===true){a.push(e)}});return a},get:function(a){return this.items.get(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(b,a){return a&&b.getDomPositionEl().dom.parentNode==(a.dom||a)},renderAll:function(e,f){var b=e.items.items;for(var d=0,a=b.length;d<a;d++){var g=b[d];if(g&&(!g.rendered||!this.isValidParent(g,f))){this.renderItem(g,d,f)}}},renderItem:function(d,a,b){if(d&&!d.rendered){d.render(b,a);this.configureItem(d,a)}else{if(d&&!this.isValidParent(d,b)){if(typeof a=="number"){a=b.dom.childNodes[a]}b.dom.insertBefore(d.getDomPositionEl().dom,a||null);d.container=b;this.configureItem(d,a)}}},configureItem:function(d,a){if(this.extraCls){var b=d.getPositionEl?d.getPositionEl():d;b.addClass(this.extraCls)}if(this.renderHidden&&d!=this.activeItem){d.hide()}if(d.doLayout){d.doLayout(false,this.forceLayout)}},onResize:function(){if(this.container.collapsed){return}var a=this.container.bufferResize;if(a){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.runLayout,this);this.resizeBuffer=typeof a=="number"?a:100}this.resizeTask.delay(this.resizeBuffer)}else{this.runLayout()}},runLayout:function(){this.layout();this.container.onLayout()},setContainer:function(a){if(this.monitorResize&&a!=this.container){if(this.container){this.container.un("resize",this.onResize,this);this.container.un("bodyresize",this.onResize,this)}if(a){a.on({scope:this,resize:this.onResize,bodyresize:this.onResize})}}this.container=a},parseMargins:function(b){if(typeof b=="number"){b=b.toString()}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]}if(a==3){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}},fieldTpl:(function(){var a=new Ext.Template('<div class="x-form-item {itemCls}" tabIndex="-1">','<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>','<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">','</div><div class="{clearCls}"></div>',"</div>");a.disableFormats=true;return a.compile()})(),destroy:Ext.emptyFn};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(a,c){Ext.layout.FitLayout.superclass.onLayout.call(this,a,c);if(!this.container.collapsed){var b=(Ext.isIE6&&Ext.isStrict&&c.dom==document.body)?c.getViewSize():c.getStyleSize();this.setItemSize(this.activeItem||a.items.itemAt(0),b)}},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,layoutOnCardChange:false,renderHidden:true,constructor:function(a){Ext.layout.CardLayout.superclass.constructor.call(this,a);this.forceLayout=(this.deferredRender===false)},setActiveItem:function(a){a=this.container.getComponent(a);if(this.activeItem!=a){if(this.activeItem){this.activeItem.hide()}this.activeItem=a;a.show();this.container.doLayout();if(this.layoutOnCardChange&&a.doLayout){a.doLayout()}}},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(j,m){Ext.layout.AnchorLayout.superclass.onLayout.call(this,j,m);var s=this.getAnchorViewSize(j,m);var q=s.width,g=s.height;if(q<20&&g<20){return}var d,o;if(j.anchorSize){if(typeof j.anchorSize=="number"){d=j.anchorSize}else{d=j.anchorSize.width;o=j.anchorSize.height}}else{d=j.initialConfig.width;o=j.initialConfig.height}var l=j.items.items,k=l.length,f,n,p,e,b;for(f=0;f<k;f++){n=l[f];if(n.anchor){p=n.anchorSpec;if(!p){var r=n.anchor.split(" ");n.anchorSpec=p={right:this.parseAnchor(r[0],n.initialConfig.width,d),bottom:this.parseAnchor(r[1],n.initialConfig.height,o)}}e=p.right?this.adjustWidthAnchor(p.right(q),n):undefined;b=p.bottom?this.adjustHeightAnchor(p.bottom(g),n):undefined;if(e||b){n.setSize(e||undefined,b||undefined)}}}},parseAnchor:function(c,g,b){if(c&&c!="none"){var e;if(/^(r|right|b|bottom)$/i.test(c)){var f=b-g;return function(a){if(a!==e){e=a;return a-f}}}else{if(c.indexOf("%")!=-1){var d=parseFloat(c.replace("%",""))*0.01;return function(a){if(a!==e){e=a;return Math.floor(a*d)}}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){if(a!==e){e=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.getPositionEl?b.getPositionEl():b.getEl()).dom.parentNode==this.innerCt.dom},onLayout:function(d,g){var e=d.items.items,f=e.length,j,a;if(!this.innerCt){g.addClass("x-column-layout-ct");this.innerCt=g.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}this.renderAll(d,this.innerCt);var m=Ext.isIE&&g.dom!=Ext.getBody().dom?g.getStyleSize():g.getViewSize();if(m.width<1&&m.height<1){return}var k=m.width-g.getPadding("lr")-this.scrollOffset,b=m.height-g.getPadding("tb"),l=k;this.innerCt.setWidth(k);for(a=0;a<f;a++){j=e[a];if(!j.columnWidth){l-=(j.getSize().width+j.getEl().getMargins("lr"))}}l=l<0?0:l;for(a=0;a<f;a++){j=e[a];if(j.columnWidth){j.setSize(Math.floor(j.columnWidth*l)-j.getEl().getMargins("lr"))}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(d,G){var f;if(!this.rendered){G.addClass("x-border-layout-ct");var u=d.items.items;f=[];for(var z=0,A=u.length;z<A;z++){var D=u[z];var k=D.region;if(D.collapsed){f.push(D)}D.collapsed=false;if(!D.rendered){D.cls=D.cls?D.cls+" x-border-panel":"x-border-panel";D.render(G,z)}this[k]=k!="center"&&D.split?new Ext.layout.BorderLayout.SplitRegion(this,D.initialConfig,k):new Ext.layout.BorderLayout.Region(this,D.initialConfig,k);this[k].render(G,D)}this.rendered=true}var t=G.getViewSize();if(t.width<20||t.height<20){if(f){this.restoreCollapsed=f}return}else{if(this.restoreCollapsed){f=this.restoreCollapsed;delete this.restoreCollapsed}}var q=t.width,B=t.height;var p=q,y=B,l=0,o=0;var v=this.north,r=this.south,j=this.west,C=this.east,D=this.center;if(!D&&Ext.layout.BorderLayout.WARN!==false){throw"No center region defined in BorderLayout "+d.id}if(v&&v.isVisible()){var F=v.getSize();var x=v.getMargins();F.width=q-(x.left+x.right);F.x=x.left;F.y=x.top;l=F.height+F.y+x.bottom;y-=l;v.applyLayout(F)}if(r&&r.isVisible()){var F=r.getSize();var x=r.getMargins();F.width=q-(x.left+x.right);F.x=x.left;var E=(F.height+x.top+x.bottom);F.y=B-E+x.top;y-=E;r.applyLayout(F)}if(j&&j.isVisible()){var F=j.getSize();var x=j.getMargins();F.height=y-(x.top+x.bottom);F.x=x.left;F.y=l+x.top;var a=(F.width+x.left+x.right);o+=a;p-=a;j.applyLayout(F)}if(C&&C.isVisible()){var F=C.getSize();var x=C.getMargins();F.height=y-(x.top+x.bottom);var a=(F.width+x.left+x.right);F.x=q-a+x.left;F.y=l+x.top;p-=a;C.applyLayout(F)}if(D){var x=D.getMargins();var g={x:o+x.left,y:l+x.top,width:p-(x.left+x.right),height:y-(x.top+x.bottom)};D.applyLayout(g)}if(f){for(var z=0,A=f.length;z<A;z++){f[z].collapse(false)}}if(Ext.isIE&&Ext.isStrict){G.repaint()}},destroy:function(){var b=["north","south","east","west"];for(var a=0;a<b.length;a++){var c=this[b[a]];if(c){if(c.destroy){c.destroy()}else{if(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},floatingZIndex:100,isCollapsed:false,render:function(b,c){this.panel=c;c.el.enableDisplayMode();this.targetEl=b;this.el=c.el;var a=c.getState,d=this.position;c.getState=function(){return Ext.apply(a.call(c)||{},this.state)}.createDelegate(this);if(d!="center"){c.allowQueuedExpand=false;c.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible||this.floatable){c.collapseEl="el";c.slideAnchor=this.getSlideAnchor()}if(c.tools&&c.tools.toggle){c.tools.toggle.addClass("x-tool-collapse-"+d);c.tools.toggle.addClassOnOver("x-tool-collapse-"+d+"-over")}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var b=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){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.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],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",this.floatingZIndex)},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",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");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.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;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},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=a.labelSeparator||this.labelSeparator;a.labelWidth=a.labelWidth||100;if(typeof a.labelWidth=="number"){var b=(typeof a.labelPad=="number"?a.labelPad:5);this.labelAdjust=a.labelWidth+b;this.labelStyle="width:"+a.labelWidth+"px;";this.elementStyle="padding-left:"+(a.labelWidth+b)+"px"}if(a.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d<a;++d){if(c[d]){b+=c[d];if(b.substr(-1,1)!=";"){b+=";"}}}return b},renderItem:function(e,a,d){if(e&&!e.rendered&&(e.isFormField||e.fieldLabel)&&e.inputType!="hidden"){var b=this.getTemplateArgs(e);if(typeof a=="number"){a=d.dom.childNodes[a]||null}if(a){this.fieldTpl.insertBefore(a,b)}else{this.fieldTpl.append(d,b)}e.render("x-form-el-"+e.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},getTemplateArgs:function(b){var a=!b.fieldLabel||b.hideLabel;return{id:b.id,label:b.fieldLabel,labelStyle:b.labelStyle||this.labelStyle||"",elementStyle:this.elementStyle||"",labelSeparator:a?"":(typeof b.labelSeparator=="undefined"?this.labelSeparator:b.labelSeparator),itemCls:(b.itemCls||this.container.itemCls||"")+(b.hideLabel?" x-hide-label":""),clearCls:b.clearCls||"x-form-clear-left"}},adjustWidthAnchor:function(b,a){return b-(a.isFormField||a.fieldLabel?(a.hideLabel?0:this.labelAdjust):0)},isValidParent:function(b,a){return true}});Ext.Container.LAYOUTS.form=Ext.layout.FormLayout;Ext.layout.AccordionLayout=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&&this.activeItem!=a){a.collapsed=true}}Ext.layout.AccordionLayout.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(c,b){if(this.fill&&c){var a=0;this.container.items.each(function(d){if(d!=c){a+=d.header.getHeight()}});b.height-=a;c.setSize(b)}},setActiveItem:function(a){a=this.container.getComponent(a);if(this.activeItem!=a){if(a.rendered&&a.collapsed){a.expand()}else{this.activeItem=a}}}});Ext.Container.LAYOUTS.accordion=Ext.layout.AccordionLayout;Ext.layout.Accordion=Ext.layout.AccordionLayout;Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,tableAttrs:null,setContainer:function(a){Ext.layout.TableLayout.superclass.setContainer.call(this,a);this.currentRow=0;this.currentColumn=0;this.cells=[]},onLayout:function(d,f){var e=d.items.items,a=e.length,g,b;if(!this.table){f.addClass("x-table-layout-ct");this.table=f.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}this.renderAll(d,f)},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(i){var a=this.getNextNonSpan(this.currentColumn,this.currentRow);var f=this.currentColumn=a[0],e=this.currentRow=a[1];for(var h=e;h<e+(i.rowspan||1);h++){if(!this.cells[h]){this.cells[h]=[]}for(var d=f;d<f+(i.colspan||1);d++){this.cells[h][d]=true}}var g=document.createElement("td");if(i.cellId){g.id=i.cellId}var b="x-table-layout-cell";if(i.cellCls){b+=" "+i.cellCls}g.className=b;if(i.colspan){g.colSpan=i.colspan}if(i.rowspan){g.rowSpan=i.rowspan}this.getRow(e).appendChild(g);return g},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,d){if(e&&!e.rendered){e.render(this.getNextCell(e));if(this.extraCls){var b=e.getPositionEl?e.getPositionEl():e;b.addClass(this.extraCls)}}},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",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,scrollOffset:0,extraCls:"x-box-item",ctCls:"x-box-layout-ct",innerCls:"x-box-inner",isValidParent:function(b,a){return b.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(e,h){var f=e.items.items,b=f.length,j,d,g=b-1,a;if(!this.innerCt){h.addClass(this.ctCls);this.innerCt=h.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding)}this.renderAll(e,this.innerCt)},renderItem:function(a){if(typeof a.margins=="string"){a.margins=this.parseMargins(a.margins)}else{if(!a.margins){a.margins=this.defaultMargins}}Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments)},getTargetSize:function(a){return(Ext.isIE6&&Ext.isStrict&&a.dom==document.body)?a.getStyleSize():a.getViewSize()},getItems:function(b){var a=[];b.items.each(function(d){if(d.isVisible()){a.push(d)}});return a}});Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",onLayout:function(e,D){Ext.layout.VBoxLayout.superclass.onLayout.call(this,e,D);var f=this.getItems(e),i,k,p,q=this.getTargetSize(D),j=q.width-D.getPadding("lr")-this.scrollOffset,x=q.height-D.getPadding("tb"),r=this.padding.left,m=this.padding.top,g=this.pack=="start",u=["stretch","stretchmax"].indexOf(this.align)==-1,A=j-(this.padding.left+this.padding.right),n=0,z=0,s=0,B=0,d=0;Ext.each(f,function(h){i=h.margins;s+=h.flex||0;k=h.getHeight();p=i.top+i.bottom;n+=k+p;B+=p+(h.flex?0:k);z=Math.max(z,h.getWidth()+i.left+i.right)});n=x-n-this.padding.top-this.padding.bottom;var a=z+this.padding.left+this.padding.right;switch(this.align){case"stretch":this.innerCt.setSize(j,x);break;case"stretchmax":case"left":this.innerCt.setSize(a,x);break;case"center":this.innerCt.setSize(j=Math.max(j,a),x);break}var c=Math.max(0,x-this.padding.top-this.padding.bottom-B),C=c,y=[],v=[],o=0,b=Math.max(0,j-this.padding.left-this.padding.right);Ext.each(f,function(h){if(g&&h.flex){k=Math.floor(c*(h.flex/s));C-=k;y.push(k)}});if(this.pack=="center"){m+=n?n/2:0}else{if(this.pack=="end"){m+=n}}Ext.each(f,function(h){i=h.margins;m+=i.top;h.setPosition(r+i.left,m);if(g&&h.flex){k=Math.max(0,y[o++]+(C-->0?1:0));if(u){v.push(h.getWidth())}h.setSize(b,k)}else{k=h.getHeight()}m+=k+i.bottom});o=0;Ext.each(f,function(l){i=l.margins;if(this.align=="stretch"){l.setWidth((A-(i.left+i.right)).constrain(l.minWidth||0,l.maxWidth||1000000))}else{if(this.align=="stretchmax"){l.setWidth((z-(i.left+i.right)).constrain(l.minWidth||0,l.maxWidth||1000000))}else{if(this.align=="center"){var h=b-(l.getWidth()+i.left+i.right);if(h>0){l.setPosition(r+i.left+(h/2),l.y)}}if(g&&l.flex){l.setWidth(v[o++])}}}},this)}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",onLayout:function(d,D){Ext.layout.HBoxLayout.superclass.onLayout.call(this,d,D);var e=this.getItems(d),i,c,p,q=this.getTargetSize(D),k=q.width-D.getPadding("lr")-this.scrollOffset,A=q.height-D.getPadding("tb"),s=this.padding.left,n=this.padding.top,g=this.pack=="start",y=["stretch","stretchmax"].indexOf(this.align)==-1,m=A-(this.padding.top+this.padding.bottom),B=0,r=0,u=0,b=0,f=0;Ext.each(e,function(h){i=h.margins;u+=h.flex||0;c=h.getWidth();p=i.left+i.right;B+=c+p;b+=p+(h.flex?0:c);r=Math.max(r,h.getHeight()+i.top+i.bottom)});B=k-B-this.padding.left-this.padding.right;var x=r+this.padding.top+this.padding.bottom;switch(this.align){case"stretch":this.innerCt.setSize(k,A);break;case"stretchmax":case"top":this.innerCt.setSize(k,x);break;case"middle":this.innerCt.setSize(k,A=Math.max(A,x));break}var v=Math.max(0,k-this.padding.left-this.padding.right-b),C=v,j=[],z=[],o=0,a=Math.max(0,A-this.padding.top-this.padding.bottom);Ext.each(e,function(h){if(g&&h.flex){c=Math.floor(v*(h.flex/u));C-=c;j.push(c)}});if(this.pack=="center"){s+=B?B/2:0}else{if(this.pack=="end"){s+=B}}Ext.each(e,function(h){i=h.margins;s+=i.left;h.setPosition(s,n+i.top);if(g&&h.flex){c=Math.max(0,j[o++]+(C-->0?1:0));if(y){z.push(h.getHeight())}h.setSize(c,a)}else{c=h.getWidth()}s+=c+i.right});o=0;Ext.each(e,function(t){var h=t.margins;if(this.align=="stretch"){t.setHeight((m-(h.top+h.bottom)).constrain(t.minHeight||0,t.maxHeight||1000000))}else{if(this.align=="stretchmax"){t.setHeight((r-(h.top+h.bottom)).constrain(t.minHeight||0,t.maxHeight||1000000))}else{if(this.align=="middle"){var l=a-(t.getHeight()+h.top+h.bottom);if(l>0){t.setPosition(t.x,n+h.top+(l/2))}}if(g&&t.flex){t.setHeight(z[o++])}}}},this)}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;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",preventBodyReset:false,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","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}if(this.tbar){this.elements+=",tbar";if(Ext.isObject(this.tbar)){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(Ext.isObject(this.bbar)){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){this.elements+=",footer";var c=this.buttons;this.buttons=[];for(var b=0,a=c.length;b<a;b++){if(c[b].render){this.buttons.push(c[b])}else{if(c[b].xtype){this.buttons.push(Ext.create(c[b],"button"))}else{this.addButton(c[b])}}}}if(this.fbar){this.elements+=",footer"}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))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(f,e){Ext.Panel.superclass.onRender.call(this,f,e);this.createClasses();var a=this.el,h=a.dom,j;a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var i=this.bwrap?this.bwrap:a;this.tbar=i.down("."+this.tbarCls);this.body=i.down("."+this.bodyCls);this.bbar=i.down("."+this.bbarCls);this.footer=i.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.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",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);j=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];j.appendChild(c);j.appendChild(b);var k=j.firstChild.firstChild.firstChild;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",j.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",h);this.createElement("bwrap",h);j=this.bwrap.dom;this.createElement("tbar",j);this.createElement("body",j);this.createElement("bbar",j);this.createElement("footer",j);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(this.padding!==undefined){this.body.setStyle("padding",this.body.addUnits(this.padding))}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")}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.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var g=this.tools;this.tools={};this.addTool.apply(this,g)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){this.fbar=new Ext.Toolbar({items:this.buttons,toolbarCls:"x-panel-fbar"})}this.toolbars=[];if(this.fbar){this.fbar=Ext.create(this.fbar,"toolbar");this.fbar.enableOverflow=false;if(this.fbar.items){this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this)}this.fbar.toolbarCls="x-panel-fbar";var l=this.footer.createChild({cls:"x-panel-btns x-panel-btns-"+this.buttonAlign});this.fbar.ownerCt=this;this.fbar.render(l);l.createChild({cls:"x-clear"});this.toolbars.push(this.fbar)}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar)}else{if(!this.topToolbar.events){this.topToolbar=Ext.create(this.topToolbar,"toolbar")}}this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar);this.toolbars.push(this.topToolbar)}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar)}else{if(!this.bottomToolbar.events){this.bottomToolbar=Ext.create(this.bottomToolbar,"toolbar")}}this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar);this.toolbars.push(this.bottomToolbar)}Ext.each(this.toolbars,function(d){d.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this)},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var d=this.header.dom;var c=d.firstChild&&String(d.firstChild.tagName).toLowerCase()=="img"?d.firstChild:null;if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{Ext.DomHelper.insertBefore(d.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.isObject(a)?a:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(a,d,c){var e={handler:d,scope:c,minWidth:this.minButtonWidth,hideParent:true};if(typeof a=="string"){e.text=a}else{Ext.apply(e,a)}var b=new Ext.Button(e);if(!this.buttons){this.buttons=[]}this.buttons.push(b);return b},addTool:function(){if(!this[this.toolTarget]){return}if(!this.toolTemplate){var g=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');g.disableFormats=true;g.compile();Ext.Panel.prototype.toolTemplate=g}for(var f=0,d=arguments,c=d.length;f<c;f++){var b=d[f];if(!this.tools[b.id]){var h="x-tool-"+b.id+"-over";var e=this.toolTemplate.insertFirst((b.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),b,true);this.tools[b.id]=e;e.enableDisplayMode("block");this.mon(e,"click",this.createToolHandler(e,b,h,this));if(b.on){this.mon(e,b.on)}if(b.hidden){e.hide()}if(b.qtip){if(Ext.isObject(b.qtip)){Ext.QuickTips.register(Ext.apply({target:e.id},b.qtip))}else{e.dom.qtip=b.qtip}}e.addClassOnOver(h)}}},onLayout:function(){if(this.toolbars.length>0){this.duringLayout=true;Ext.each(this.toolbars,function(a){a.doLayout()});delete this.duringLayout;this.syncHeight()}},syncHeight:function(){if(!(this.autoHeight||this.duringLayout)){var d=this.lastSize;if(d&&!Ext.isEmpty(d.height)){var b=d.height,c=this.el.getHeight();if(b!="auto"&&b!=c){var e=this.body,a=e.getHeight();c=Math.max(a+b-c,0);if(a>0&&a!=c){e.setHeight(c);if(Ext.isIE&&c<=0){return}var f=e.getSize();this.fireEvent("bodyresize",f.width,f.height)}}}}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(f){c.removeClass(d);if(a.stopEvent!==false){f.stopEvent()}if(a.handler){a.handler.call(a.scope||c,f,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}this.setAutoScroll();if(this.html){this.body.update(Ext.isObject(this.html)?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,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,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();if(this.deferLayout!==undefined){this.doLayout(true)}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(b,c){if(b!==undefined||c!==undefined){if(!this.collapsed){if(typeof b=="number"){b=this.adjustBodyWidth(b-this.getFrameWidth());if(this.tbar){this.tbar.setWidth(b);if(this.topToolbar){this.topToolbar.setSize(b)}}if(this.bbar){this.bbar.setWidth(b);if(this.bottomToolbar){this.bottomToolbar.setSize(b)}}if(this.fbar){var d=this.fbar,e=1,a=Ext.isStrict;if(this.buttonAlign=="left"){e=b-d.container.getFrameWidth("lr")}else{if(Ext.isIE||Ext.isWebKit){if(!(this.buttonAlign=="center"&&Ext.isWebKit)&&(!a||(!Ext.isIE8&&a))){(function(){d.setWidth(d.getEl().child(".x-toolbar-ct").getWidth())}).defer(1)}else{e="auto"}}else{e="auto"}}d.setWidth(e)}this.body.setWidth(b)}else{if(b=="auto"){this.body.setWidth(b)}}if(typeof c=="number"){c=Math.max(0,this.adjustBodyHeight(c-this.getFrameHeight()));this.body.setHeight(c)}else{if(c=="auto"){this.body.setHeight(c)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:b,height:c};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,b,c)}this.syncShadow()},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.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")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var c=this.el.dom.firstChild;var d=this.bwrap.dom.lastChild;a+=(c.offsetHeight+d.offsetHeight);var b=this.bwrap.dom.firstChild.firstChild.firstChild;a+=Ext.fly(b).getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child("span"))}}Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);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.toolbars);Ext.Panel.superclass.beforeDestroy.call(this)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{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:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}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.mon(this.field,"specialkey",this.onSpecialKey,this);if(this.swallowKeys){this.field.el.swallowEvent(["keydown","keypress"])}this.field.show();this.mon(this.field,"blur",this.onBlur,this);if(this.field.grow){this.mon(this.field,"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.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);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);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},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(){Ext.destroy(this.field);this.field=null}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=function(a){Ext.ColorPalette.superclass.constructor.call(this,a);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(b,a){var c=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');var d=document.createElement("div");d.id=this.getId();d.className=this.itemCls;c.overwrite(d,this.colors);b.dom.insertBefore(d,a);this.el=Ext.get(d);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"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 d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.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.BoxComponent,{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",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 b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(f,e){c+=Ext.isDate(f)?"^"+Ext.escapeRe(f.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);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)}},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['<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>'],c=this.dayNames,g;for(g=0;g<7;g++){var j=this.startDay+g;if(j>6){j=j-7}a.push("<th><span>",c[j].substr(0,1),"</span></th>")}a[a.length]="</tr></thead><tbody><tr>";for(g=0;g<42;g++){if(g%7===0&&g!==0){a[a.length]="</tr><tr>"}a[a.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'}a.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 h=document.createElement("div");h.className="x-date-picker";h.innerHTML=a.join("");e.dom.insertBefore(h,b);this.el=Ext.get(h);this.eventEl=Ext.get(h.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});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.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var f=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,f),tooltip:String.format(this.todayTip,f),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},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="#">',Date.getShortMonthName(b),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',Date.getShortMonthName(b+6),"</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.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(f,b){f.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 g=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(g.getMonth()!=this.mpSelMonth){g=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(g);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&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,o=this.isVisible();this.activeDate=G;if(!A&&a&&this.el){var n=G.getTime();if(a.getMonth()==G.getMonth()&&a.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==n){d.addClass("x-date-selected");if(o){Ext.fly(d.dom.firstChild).focus(50)}return false}});return}}var j=G.getDaysInMonth();var p=G.getFirstDateOfMonth();var f=p.getDay()-this.startDay;if(f<=this.startDay){f+=7}var B=G.add("mo",-1);var g=B.getDaysInMonth()-f;var e=this.cells.elements;var q=this.textNodes;j+=f;var y=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 x=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 l=new Date().clearTime();var c=(l<s||l>x||(F&&z&&F.test(l.dateFormat(z)))||(I&&I.indexOf(l.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var k=function(J,d){d.title="";var i=D.getTime();d.firstChild.dateValue=i;if(i==C){d.className+=" x-date-today";d.title=J.todayText}if(i==u){d.className+=" x-date-selected";if(o){Ext.fly(d.firstChild).focus(50)}}if(i<s){d.className=" x-date-disabled";d.title=J.minText;return}if(i>x){d.className=" x-date-disabled";d.title=J.maxText;return}if(I){if(I.indexOf(D.getDay())!=-1){d.title=E;d.className=" x-date-disabled"}}if(F&&z){var w=D.dateFormat(z);if(F.test(w)){d.title=r.replace("%0",w);d.className=" x-date-disabled"}}};var v=0;for(;v<f;v++){q[v].innerHTML=(++g);D.setDate(D.getDate()+1);e[v].className="x-date-prevday";k(this,e[v])}for(;v<j;v++){var b=v-f+1;q[v].innerHTML=(b);D.setDate(D.getDate()+1);e[v].className="x-date-active";k(this,e[v])}var H=0;for(;v<42;v++){q[v].innerHTML=(++H);D.setDate(D.getDate()+1);e[v].className="x-date-nextday";k(this,e[v])}this.mbtn.setText(this.monthNames[G.getMonth()]+" "+G.getFullYear());if(!this.internalRender){var h=this.el.dom.firstChild;var m=h.offsetWidth;this.el.setWidth(m+this.el.getBorderWidth("lr"));Ext.fly(h).setWidth(m);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){h.rows[0].cells[1].style.width=(m-(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){this.keyNav.disable();this.keyNav=null;Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn)}}});Ext.reg("datepicker",Ext.DatePicker);Ext.LoadMask=function(c,b){this.el=Ext.get(c);Ext.apply(this,b);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("exception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var a=this.el.getUpdater();a.showLoadIndicator=false;a.on("beforeupdate",this.onBeforeLoad,this);a.on("update",this.onLoad,this);a.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoad,this)}else{var a=this.el.getUpdater();a.un("beforeupdate",this.onBeforeLoad,this);a.un("update",this.onLoad,this);a.un("failure",this.onLoad,this)}}};Ext.Slider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}Ext.Slider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.vertical){Ext.apply(this,Ext.Slider.Vertical)}},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{cls:"x-slider-thumb"},{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};Ext.Slider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();this.thumb=this.innerEl.first();this.halfThumb=(this.vertical?this.thumb.getHeight():this.thumb.getWidth())/2;this.focusEl=this.thumb.next();this.initEvents()},initEvents:function(){this.thumb.addClassOnOver("x-slider-thumb-over");this.mon(this.el,{scope:this,mousedown:this.onMouseDown,keydown:this.onKeyDown});this.focusEl.swallowEvent("click",true);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.thumb);this.on("beforedestroy",this.tracker.destroy,this.tracker)},onMouseDown:function(b){if(this.disabled){return}if(this.clickToChange&&b.target!=this.thumb.dom){var a=this.innerEl.translatePoints(b.getXY());this.onClickChange(a)}this.focus()},onClickChange:function(a){if(a.top>this.clickRange[0]&&a.top<this.clickRange[1]){this.setValue(Ext.util.Format.round(this.reverseValue(a.left),this.decimalPrecision),undefined,true)}},onKeyDown:function(b){if(this.disabled){b.preventDefault();return}var a=b.getKey();switch(a){case b.UP:case b.RIGHT:b.stopEvent();if(b.ctrlKey){this.setValue(this.maxValue,undefined,true)}else{this.setValue(this.value+this.keyIncrement,undefined,true)}break;case b.DOWN:case b.LEFT:b.stopEvent();if(b.ctrlKey){this.setValue(this.minValue,undefined,true)}else{this.setValue(this.value-this.keyIncrement,undefined,true)}break;default:b.preventDefault()}},doSnap:function(b){if(!this.increment||this.increment==1||!b){return b}var d=b,c=this.increment;var a=b%c;if(a!=0){d-=a;if(a*2>c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);if(this.value!==undefined){var a=this.normalizeValue(this.value);if(a!==this.value){delete this.value;this.setValue(a,false)}else{this.moveThumb(this.translateValue(a),false)}}},getRatio:function(){var a=this.innerEl.getWidth();var b=this.maxValue-this.minValue;return b==0?a:(a/b)},normalizeValue:function(a){a=this.doSnap(a);a=Ext.util.Format.round(a,this.decimalPrecision);a=a.constrain(this.minValue,this.maxValue);return a},setValue:function(b,a,c){b=this.normalizeValue(b);if(b!==this.value&&this.fireEvent("beforechange",this,b,this.value)!==false){this.value=b;this.moveThumb(this.translateValue(b),a!==false);this.fireEvent("change",this,b);if(c){this.fireEvent("changecomplete",this,b)}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+this.halfThumb+(this.minValue*a))/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setLeft(b)}else{this.thumb.shift({left:b,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onBeforeDragStart:function(a){return !this.disabled},onDragStart:function(a){this.thumb.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,a)},onDrag:function(a){var b=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Ext.util.Format.round(this.reverseValue(b.left),this.decimalPrecision),false);this.fireEvent("drag",this,a)},onDragEnd:function(a){this.thumb.removeClass("x-slider-thumb-drag");this.dragging=false;this.fireEvent("dragend",this,a);if(this.dragStartValue!=this.value){this.fireEvent("changecomplete",this,this.value)}},onResize:function(a,b){this.innerEl.setWidth(a-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb()},onDisable:function(){Ext.Slider.superclass.onDisable.call(this);this.thumb.addClass(this.disabledClass);if(Ext.isIE){var a=this.thumb.getXY();this.thumb.hide();this.innerEl.addClass(this.disabledClass).dom.disabled=true;if(!this.thumbHolder){this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass})}this.thumbHolder.show().setXY(a)}},onEnable:function(){Ext.Slider.superclass.onEnable.call(this);this.thumb.removeClass(this.disabledClass);if(Ext.isIE){this.innerEl.removeClass(this.disabledClass).dom.disabled=false;if(this.thumbHolder){this.thumbHolder.hide()}this.thumb.show();this.syncThumb()}},syncThumb:function(){if(this.rendered){this.moveThumb(this.translateValue(this.value))}},getValue:function(){return this.value}});Ext.reg("slider",Ext.Slider);Ext.Slider.Vertical={onResize:function(a,b){this.innerEl.setHeight(b-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var b=this.innerEl.getHeight();var a=this.maxValue-this.minValue;return b/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setBottom(b)}else{this.thumb.shift({bottom:b,stopFx:true,duration:0.35})}},onDrag:function(b){var c=this.innerEl.translatePoints(this.tracker.getXY());var a=this.innerEl.getHeight()-c.top;this.setValue(this.minValue+Ext.util.Format.round(a/this.getRatio(),this.decimalPrecision),false);this.fireEvent("drag",this,b)},onClickChange:function(b){if(b.left>this.clickRange[0]&&b.left<this.clickRange[1]){var a=this.innerEl.getHeight()-b.top;this.setValue(this.minValue+Ext.util.Format.round(a/this.getRatio(),this.decimalPrecision),undefined,true)}}};Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:false,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(d,a){var c=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(a===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation-debug.js	(revision 625)
@@ -0,0 +1,3853 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Api
+ * @extends Object
+ * Ext.data.Api is a singleton designed to manage the data API including methods
+ * for validating a developer's DataProxy API.  Defines variables for CRUD actions
+ * create, read, update and destroy in addition to a mapping of RESTful HTTP methods
+ * GET, POST, PUT and DELETE to CRUD actions.
+ * @singleton
+ */
+Ext.data.Api = (function() {
+
+    // private validActions.  validActions is essentially an inverted hash of Ext.data.Api.actions, where value becomes the key.
+    // Some methods in this singleton (e.g.: getActions, getVerb) will loop through actions with the code <code>for (var verb in this.actions)</code>
+    // For efficiency, some methods will first check this hash for a match.  Those methods which do acces validActions will cache their result here.
+    // We cannot pre-define this hash since the developer may over-ride the actions at runtime.
+    var validActions = {};
+
+    return {
+        /**
+         * Defined actions corresponding to remote actions:
+         * <pre><code>
+actions: {
+    create  : 'create',  // Text representing the remote-action to create records on server.
+    read    : 'read',    // Text representing the remote-action to read/load data from server.
+    update  : 'update',  // Text representing the remote-action to update records on server.
+    destroy : 'destroy'  // Text representing the remote-action to destroy records on server.
+}
+         * </code></pre>
+         * @property actions
+         * @type Object
+         */
+        actions : {
+            create  : 'create',
+            read    : 'read',
+            update  : 'update',
+            destroy : 'destroy'
+        },
+
+        /**
+         * Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the
+         * corresponding actions for {@link Ext.data.DataProxy#restful RESTful proxies}.
+         * Defaults to:
+         * <pre><code>
+restActions : {
+    create  : 'POST',
+    read    : 'GET',
+    update  : 'PUT',
+    destroy : 'DELETE'
+},
+         * </code></pre>
+         */
+        restActions : {
+            create  : 'POST',
+            read    : 'GET',
+            update  : 'PUT',
+            destroy : 'DELETE'
+        },
+
+        /**
+         * Returns true if supplied action-name is a valid API action defined in <code>{@link #actions}</code> constants
+         * @param {String} action
+         * @param {String[]}(Optional) List of available CRUD actions.  Pass in list when executing multiple times for efficiency.
+         * @return {Boolean}
+         */
+        isAction : function(action) {
+            return (Ext.data.Api.actions[action]) ? true : false;
+        },
+
+        /**
+         * Returns the actual CRUD action KEY "create", "read", "update" or "destroy" from the supplied action-name.  This method is used internally and shouldn't generally
+         * need to be used directly.  The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true.  A developer can override this naming
+         * convention if desired.  However, the framework internally calls methods based upon the KEY so a way of retreiving the the words "create", "read", "update" and "destroy" is
+         * required.  This method will cache discovered KEYS into the private validActions hash.
+         * @param {String} name The runtime name of the action.
+         * @return {String||null} returns the action-key, or verb of the user-action or null if invalid.
+         * @nodoc
+         */
+        getVerb : function(name) {
+            if (validActions[name]) {
+                return validActions[name];  // <-- found in cache.  return immediately.
+            }
+            for (var verb in this.actions) {
+                if (this.actions[verb] === name) {
+                    validActions[name] = verb;
+                    break;
+                }
+            }
+            return (validActions[name] !== undefined) ? validActions[name] : null;
+        },
+
+        /**
+         * Returns true if the supplied API is valid; that is, check that all keys match defined actions
+         * otherwise returns an array of mistakes.
+         * @return {String[]||true}
+         */
+        isValid : function(api){
+            var invalid = [];
+            var crud = this.actions; // <-- cache a copy of the actions.
+            for (var action in api) {
+                if (!(action in crud)) {
+                    invalid.push(action);
+                }
+            }
+            return (!invalid.length) ? true : invalid;
+        },
+
+        /**
+         * Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions
+         * point to the same url.  The question is important for deciding whether to insert the "xaction" HTTP parameter within an
+         * Ajax request.  This method is used internally and shouldn't generally need to be called directly.
+         * @param {Ext.data.DataProxy} proxy
+         * @param {String} verb
+         * @return {Boolean}
+         */
+        hasUniqueUrl : function(proxy, verb) {
+            var url = (proxy.api[verb]) ? proxy.api[verb].url : null;
+            var unique = true;
+            for (var action in proxy.api) {
+                if ((unique = (action === verb) ? true : (proxy.api[action].url != url) ? true : false) === false) {
+                    break;
+                }
+            }
+            return unique;
+        },
+
+        /**
+         * This method is used internally by <tt>{@link Ext.data.DataProxy DataProxy}</tt> and should not generally need to be used directly.
+         * Each action of a DataProxy api can be initially defined as either a String or an Object.  When specified as an object,
+         * one can explicitly define the HTTP method (GET|POST) to use for each CRUD action.  This method will prepare the supplied API, setting
+         * each action to the Object form.  If your API-actions do not explicitly define the HTTP method, the "method" configuration-parameter will
+         * be used.  If the method configuration parameter is not specified, POST will be used.
+         <pre><code>
+new Ext.data.HttpProxy({
+    method: "POST",     // <-- default HTTP method when not specified.
+    api: {
+        create: 'create.php',
+        load: 'read.php',
+        save: 'save.php',
+        destroy: 'destroy.php'
+    }
+});
+
+// Alternatively, one can use the object-form to specify the API
+new Ext.data.HttpProxy({
+    api: {
+        load: {url: 'read.php', method: 'GET'},
+        create: 'create.php',
+        destroy: 'destroy.php',
+        save: 'update.php'
+    }
+});
+        </code></pre>
+         *
+         * @param {Ext.data.DataProxy} proxy
+         */
+        prepare : function(proxy) {
+            if (!proxy.api) {
+                proxy.api = {}; // <-- No api?  create a blank one.
+            }
+            for (var verb in this.actions) {
+                var action = this.actions[verb];
+                proxy.api[action] = proxy.api[action] || proxy.url || proxy.directFn;
+                if (typeof(proxy.api[action]) == 'string') {
+                    proxy.api[action] = {
+                        url: proxy.api[action]
+                    };
+                }
+            }
+        },
+
+        /**
+         * Prepares a supplied Proxy to be RESTful.  Sets the HTTP method for each api-action to be one of
+         * GET, POST, PUT, DELETE according to the defined {@link #restActions}.
+         * @param {Ext.data.DataProxy} proxy
+         */
+        restify : function(proxy) {
+            proxy.restful = true;
+            for (var verb in this.restActions) {
+                proxy.api[this.actions[verb]].method = this.restActions[verb];
+            }
+        }
+    };
+})();
+
+/**
+ * @class Ext.data.Api.Error
+ * @extends Ext.Error
+ * Error class for Ext.data.Api errors
+ */
+Ext.data.Api.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.Api'
+});
+Ext.apply(Ext.data.Api.Error.prototype, {
+    lang: {
+        'action-url-undefined': 'No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.',
+        'invalid': 'received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions',
+        'invalid-url': 'Invalid url.  Please review your proxy configuration.',
+        'execute': 'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'
+    }
+});
+
+/**
+ * @class Ext.data.SortTypes
+ * @singleton
+ * Defines the default sorting (casting?) comparison functions used when sorting data.
+ */
+Ext.data.SortTypes = {
+    /**
+     * Default sort that does nothing
+     * @param {Mixed} s The value being converted
+     * @return {Mixed} The comparison value
+     */
+    none : function(s){
+        return s;
+    },
+    
+    /**
+     * The regular expression used to strip tags
+     * @type {RegExp}
+     * @property
+     */
+    stripTagsRE : /<\/?[^>]+>/gi,
+    
+    /**
+     * Strips all HTML tags to sort on text only
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asText : function(s){
+        return String(s).replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Strips all HTML tags to sort on text only - Case insensitive
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCText : function(s){
+        return String(s).toUpperCase().replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Case insensitive string
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCString : function(s) {
+    	return String(s).toUpperCase();
+    },
+    
+    /**
+     * Date sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asDate : function(s) {
+        if(!s){
+            return 0;
+        }
+        if(Ext.isDate(s)){
+            return s.getTime();
+        }
+    	return Date.parse(String(s));
+    },
+    
+    /**
+     * Float sorting
+     * @param {Mixed} s The value being converted
+     * @return {Float} The comparison value
+     */
+    asFloat : function(s) {
+    	var val = parseFloat(String(s).replace(/,/g, ""));
+    	return isNaN(val) ? 0 : val;
+    },
+    
+    /**
+     * Integer sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asInt : function(s) {
+        var val = parseInt(String(s).replace(/,/g, ""), 10);
+        return isNaN(val) ? 0 : val;
+    }
+};/**
+ * @class Ext.data.Record
+ * <p>Instances of this class encapsulate both Record <em>definition</em> information, and Record
+ * <em>value</em> information for use in {@link Ext.data.Store} objects, or any code which needs
+ * to access Records cached in an {@link Ext.data.Store} object.</p>
+ * <p>Constructors for this class are generated by passing an Array of field definition objects to {@link #create}.
+ * Instances are usually only created by {@link Ext.data.Reader} implementations when processing unformatted data
+ * objects.</p>
+ * <p>Note that an instance of a Record class may only belong to one {@link Ext.data.Store Store} at a time.
+ * In order to copy data from one Store to another, use the {@link #copy} method to create an exact
+ * copy of the Record, and insert the new instance into the other Store.</p>
+ * <p>When serializing a Record for submission to the server, be aware that it contains many private
+ * properties, and also a reference to its owning Store which in turn holds references to its Records.
+ * This means that a whole Record may not be encoded using {@link Ext.util.JSON.encode}. Instead, use the
+ * <code>{@link #data}</code> and <code>{@link #id}</code> properties.</p>
+ * <p>Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.</p>
+ * @constructor
+ * This constructor should not be used to create Record objects. Instead, use {@link #create} to
+ * generate a subclass of Ext.data.Record configured with information about its constituent fields.
+ * @param {Object} data (Optional) An object, the properties of which provide values for the new Record's
+ * fields. If not specified the <code>{@link Ext.data.Field#defaultValue defaultValue}</code>
+ * for each field will be assigned.
+ * @param {Object} id (Optional) The id of the Record. This id should be unique, and is used by the
+ * {@link Ext.data.Store} object which owns the Record to index its collection of Records. If
+ * an <code>id</code> is not specified a <b><code>{@link #phantom}</code></b> Record will be created
+ * with an {@link #Record.id automatically generated id}.
+ */
+Ext.data.Record = function(data, id){
+    // if no id, call the auto id method
+    this.id = (id || id === 0) ? id : Ext.data.Record.id(this);
+    this.data = data || {};
+};
+
+/**
+ * Generate a constructor for a specific Record layout.
+ * @param {Array} o An Array of <b>{@link Ext.data.Field Field}</b> definition objects.
+ * The constructor generated by this method may be used to create new Record instances. The data
+ * object must contain properties named after the {@link Ext.data.Field field}
+ * <b><tt>{@link Ext.data.Field#name}s</tt></b>.  Example usage:<pre><code>
+// create a Record constructor from a description of the fields
+var TopicRecord = Ext.data.Record.create([ // creates a subclass of Ext.data.Record
+    {{@link Ext.data.Field#name name}: 'title', {@link Ext.data.Field#mapping mapping}: 'topic_title'},
+    {name: 'author', mapping: 'username', allowBlank: false},
+    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
+    {name: 'lastPost', mapping: 'post_time', type: 'date'},
+    {name: 'lastPoster', mapping: 'user2'},
+    {name: 'excerpt', mapping: 'post_text', allowBlank: false},
+    // In the simplest case, if no properties other than <tt>name</tt> are required,
+    // a field definition may consist of just a String for the field name.
+    'signature'
+]);
+
+// create Record instance
+var myNewRecord = new TopicRecord(
+    {
+        title: 'Do my job please',
+        author: 'noobie',
+        totalPosts: 1,
+        lastPost: new Date(),
+        lastPoster: 'Animal',
+        excerpt: 'No way dude!',
+        signature: ''
+    },
+    id // optionally specify the id of the record otherwise {@link #Record.id one is auto-assigned}
+);
+myStore.{@link Ext.data.Store#add add}(myNewRecord);
+</code></pre>
+ * @method create
+ * @return {function} A constructor which is used to create new Records according
+ * to the definition. The constructor has the same signature as {@link #Ext.data.Record}.
+ * @static
+ */
+Ext.data.Record.create = function(o){
+    var f = Ext.extend(Ext.data.Record, {});
+    var p = f.prototype;
+    p.fields = new Ext.util.MixedCollection(false, function(field){
+        return field.name;
+    });
+    for(var i = 0, len = o.length; i < len; i++){
+        p.fields.add(new Ext.data.Field(o[i]));
+    }
+    f.getField = function(name){
+        return p.fields.get(name);
+    };
+    return f;
+};
+
+Ext.data.Record.PREFIX = 'ext-record';
+Ext.data.Record.AUTO_ID = 1;
+Ext.data.Record.EDIT = 'edit';
+Ext.data.Record.REJECT = 'reject';
+Ext.data.Record.COMMIT = 'commit';
+
+
+/**
+ * Generates a sequential id. This method is typically called when a record is {@link #create}d
+ * and {@link #Record no id has been specified}. The returned id takes the form:
+ * <tt>&#123;PREFIX}-&#123;AUTO_ID}</tt>.<div class="mdetail-params"><ul>
+ * <li><b><tt>PREFIX</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.PREFIX</tt>
+ * (defaults to <tt>'ext-record'</tt>)</p></li>
+ * <li><b><tt>AUTO_ID</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.AUTO_ID</tt>
+ * (defaults to <tt>1</tt> initially)</p></li>
+ * </ul></div>
+ * @param {Record} rec The record being created.  The record does not exist, it's a {@link #phantom}.
+ * @return {String} auto-generated string id, <tt>"ext-record-i++'</tt>;
+ */
+Ext.data.Record.id = function(rec) {
+    rec.phantom = true;
+    return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join('');
+};
+
+Ext.data.Record.prototype = {
+    /**
+     * <p><b>This property is stored in the Record definition's <u>prototype</u></b></p>
+     * A MixedCollection containing the defined {@link Ext.data.Field Field}s for this Record.  Read-only.
+     * @property fields
+     * @type Ext.util.MixedCollection
+     */
+    /**
+     * An object hash representing the data for this Record. Every field name in the Record definition
+     * is represented by a property of that name in this object. Note that unless you specified a field
+     * with {@link Ext.data.Field#name name} "id" in the Record definition, this will <b>not</b> contain
+     * an <tt>id</tt> property.
+     * @property data
+     * @type {Object}
+     */
+    /**
+     * The unique ID of the Record {@link #Record as specified at construction time}.
+     * @property id
+     * @type {Object}
+     */
+    /**
+     * Readonly flag - true if this Record has been modified.
+     * @type Boolean
+     */
+    dirty : false,
+    editing : false,
+    error: null,
+    /**
+     * This object contains a key and value storing the original values of all modified
+     * fields or is null if no fields have been modified.
+     * @property modified
+     * @type {Object}
+     */
+    modified: null,
+    /**
+     * <tt>false</tt> when the record does not yet exist in a server-side database (see
+     * {@link #markDirty}).  Any record which has a real database pk set as its id property
+     * is NOT a phantom -- it's real.
+     * @property phantom
+     * @type {Boolean}
+     */
+    phantom : false,
+
+    // private
+    join : function(store){
+        /**
+         * The {@link Ext.data.Store} to which this Record belongs.
+         * @property store
+         * @type {Ext.data.Store}
+         */
+        this.store = store;
+    },
+
+    /**
+     * Set the {@link Ext.data.Field#name named field} to the specified value.  For example:
+     * <pre><code>
+// record has a field named 'firstname'
+var Employee = Ext.data.Record.{@link #create}([
+    {name: 'firstname'},
+    ...
+]);
+
+// update the 2nd record in the store:
+var rec = myStore.{@link Ext.data.Store#getAt getAt}(1);
+
+// set the value (shows dirty flag):
+rec.set('firstname', 'Betty');
+
+// commit the change (removes dirty flag):
+rec.{@link #commit}();
+
+// update the record in the store, bypass setting dirty flag,
+// and do not store the change in the {@link Ext.data.Store#getModifiedRecords modified records}
+rec.{@link #data}['firstname'] = 'Wilma'); // updates record, but not the view
+rec.{@link #commit}(); // updates the view
+     * </code></pre>
+     * <b>Notes</b>:<div class="mdetail-params"><ul>
+     * <li>If the store has a writer and <code>autoSave=true</code>, each set()
+     * will execute an XHR to the server.</li>
+     * <li>Use <code>{@link #beginEdit}</code> to prevent the store's <code>update</code>
+     * event firing while using set().</li>
+     * <li>Use <code>{@link #endEdit}</code> to have the store's <code>update</code>
+     * event fire.</li>
+     * </ul></div>
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to set.
+     * @param {Object} value The value to set the field to.
+     */
+    set : function(name, value){
+        var isObj = (typeof value === 'object');
+        if(!isObj && String(this.data[name]) === String(value)){
+            return;
+        } else if (isObj && Ext.encode(this.data[name]) === Ext.encode(value)) {
+            return;
+        }
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        if(typeof this.modified[name] == 'undefined'){
+            this.modified[name] = this.data[name];
+        }
+        this.data[name] = value;
+        if(!this.editing){
+            this.afterEdit();
+        }
+    },
+
+    // private
+    afterEdit: function(){
+        if(this.store){
+            this.store.afterEdit(this);
+        }
+    },
+
+    // private
+    afterReject: function(){
+        if(this.store){
+            this.store.afterReject(this);
+        }
+    },
+
+    // private
+    afterCommit: function(){
+        if(this.store){
+            this.store.afterCommit(this);
+        }
+    },
+
+    /**
+     * Get the value of the {@link Ext.data.Field#name named field}.
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to get the value of.
+     * @return {Object} The value of the field.
+     */
+    get : function(name){
+        return this.data[name];
+    },
+
+    /**
+     * Begin an edit. While in edit mode, no events (e.g.. the <code>update</code> event)
+     * are relayed to the containing store.
+     * See also: <code>{@link #endEdit}</code> and <code>{@link #cancelEdit}</code>.
+     */
+    beginEdit : function(){
+        this.editing = true;
+        this.modified = this.modified || {};
+    },
+
+    /**
+     * Cancels all changes made in the current edit operation.
+     */
+    cancelEdit : function(){
+        this.editing = false;
+        delete this.modified;
+    },
+
+    /**
+     * End an edit. If any data was modified, the containing store is notified
+     * (ie, the store's <code>update</code> event will fire).
+     */
+    endEdit : function(){
+        this.editing = false;
+        if(this.dirty){
+            this.afterEdit();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Rejects all changes made to the Record since either creation, or the last commit operation.
+     * Modified fields are reverted to their original values.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of reject operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    reject : function(silent){
+        var m = this.modified;
+        for(var n in m){
+            if(typeof m[n] != "function"){
+                this.data[n] = m[n];
+            }
+        }
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterReject();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Commits all changes made to the Record since either creation, or the last commit operation.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of commit operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    commit : function(silent){
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterCommit();
+        }
+    },
+
+    /**
+     * Gets a hash of only the fields that have been modified since this Record was created or commited.
+     * @return Object
+     */
+    getChanges : function(){
+        var m = this.modified, cs = {};
+        for(var n in m){
+            if(m.hasOwnProperty(n)){
+                cs[n] = this.data[n];
+            }
+        }
+        return cs;
+    },
+
+    // private
+    hasError : function(){
+        return this.error !== null;
+    },
+
+    // private
+    clearError : function(){
+        this.error = null;
+    },
+
+    /**
+     * Creates a copy of this Record.
+     * @param {String} id (optional) A new Record id, defaults to {@link #Record.id autogenerating an id}.
+     * Note: if an <code>id</code> is not specified the copy created will be a
+     * <code>{@link #phantom}</code> Record.
+     * @return {Record}
+     */
+    copy : function(newId) {
+        return new this.constructor(Ext.apply({}, this.data), newId || this.id);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the passed field name has been <code>{@link #modified}</code>
+     * since the load or last commit.
+     * @param {String} fieldName {@link Ext.data.Field.{@link Ext.data.Field#name}
+     * @return {Boolean}
+     */
+    isModified : function(fieldName){
+        return !!(this.modified && this.modified.hasOwnProperty(fieldName));
+    },
+
+    /**
+     * By default returns <tt>false</tt> if any {@link Ext.data.Field field} within the
+     * record configured with <tt>{@link Ext.data.Field#allowBlank} = false</tt> returns
+     * <tt>true</tt> from an {@link Ext}.{@link Ext#isEmpty isempty} test.
+     * @return {Boolean}
+     */
+    isValid : function() {
+        return this.fields.find(function(f) {
+            return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false;
+        },this) ? false : true;
+    },
+
+    /**
+     * <p>Marks this <b>Record</b> as <code>{@link #dirty}</code>.  This method
+     * is used interally when adding <code>{@link #phantom}</code> records to a
+     * {@link Ext.data.Store#writer writer enabled store}.</p>
+     * <br><p>Marking a record <code>{@link #dirty}</code> causes the phantom to
+     * be returned by {@link Ext.data.Store#getModifiedRecords} where it will
+     * have a create action composed for it during {@link Ext.data.Store#save store save}
+     * operations.</p>
+     */
+    markDirty : function(){
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        this.fields.each(function(f) {
+            this.modified[f.name] = this.data[f.name];
+        },this);
+    }
+};/**
+ * @class Ext.StoreMgr
+ * @extends Ext.util.MixedCollection
+ * The default global group of stores.
+ * @singleton
+ */
+Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
+    /**
+     * @cfg {Object} listeners @hide
+     */
+
+    /**
+     * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
+     * manually.  Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. 
+     * @param {Ext.data.Store} store1 A Store instance
+     * @param {Ext.data.Store} store2 (optional)
+     * @param {Ext.data.Store} etc... (optional)
+     */
+    register : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.add(s);
+        }
+    },
+
+    /**
+     * Unregisters one or more Stores with the StoreMgr
+     * @param {String/Object} id1 The id of the Store, or a Store instance
+     * @param {String/Object} id2 (optional)
+     * @param {String/Object} etc... (optional)
+     */
+    unregister : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.remove(this.lookup(s));
+        }
+    },
+
+    /**
+     * Gets a registered Store by id
+     * @param {String/Object} id The id of the Store, or a Store instance
+     * @return {Ext.data.Store}
+     */
+    lookup : function(id){
+        if(Ext.isArray(id)){
+            var fields = ['field1'], expand = !Ext.isArray(id[0]);
+            if(!expand){
+                for(var i = 2, len = id[0].length; i <= len; ++i){
+                    fields.push('field' + i);
+                }
+            }
+            return new Ext.data.ArrayStore({
+                fields: fields,
+                data: id,
+                expandData: expand,
+                autoDestroy: true,
+                autoCreated: true
+
+            });
+        }
+        return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
+    },
+
+    // getKey implementation for MixedCollection
+    getKey : function(o){
+         return o.storeId;
+    }
+});/**
+ * @class Ext.data.Store
+ * @extends Ext.util.Observable
+ * <p>The Store class encapsulates a client side cache of {@link Ext.data.Record Record}
+ * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel},
+ * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}.</p>
+ * <p><u>Retrieving Data</u></p>
+ * <p>A Store object may access a data object using:<div class="mdetail-params"><ul>
+ * <li>{@link #proxy configured implementation} of {@link Ext.data.DataProxy DataProxy}</li>
+ * <li>{@link #data} to automatically pass in data</li>
+ * <li>{@link #loadData} to manually pass in data</li>
+ * </ul></div></p>
+ * <p><u>Reading Data</u></p>
+ * <p>A Store object has no inherent knowledge of the format of the data object (it could be
+ * an Array, XML, or JSON). A Store object uses an appropriate {@link #reader configured implementation}
+ * of a {@link Ext.data.DataReader DataReader} to create {@link Ext.data.Record Record} instances from the data
+ * object.</p>
+ * <p><u>Store Types</u></p>
+ * <p>There are several implementations of Store available which are customized for use with
+ * a specific DataReader implementation.  Here is an example using an ArrayStore which implicitly
+ * creates a reader commensurate to an Array data object.</p>
+ * <pre><code>
+var myStore = new Ext.data.ArrayStore({
+    fields: ['fullname', 'first'],
+    idIndex: 0 // id for each record will be the first element
+});
+ * </code></pre>
+ * <p>For custom implementations create a basic {@link Ext.data.Store} configured as needed:</p>
+ * <pre><code>
+// create a {@link Ext.data.Record Record} constructor:
+var rt = Ext.data.Record.create([
+    {name: 'fullname'},
+    {name: 'first'}
+]);
+var myStore = new Ext.data.Store({
+    // explicitly create reader
+    reader: new Ext.data.ArrayReader(
+        {
+            idIndex: 0  // id for each record will be the first element
+        },
+        rt // recordType
+    )
+});
+ * </code></pre>
+ * <p>Load some data into store (note the data object is an array which corresponds to the reader):</p>
+ * <pre><code>
+var myData = [
+    [1, 'Fred Flintstone', 'Fred'],  // note that id for the record is the first element
+    [2, 'Barney Rubble', 'Barney']
+];
+myStore.loadData(myData);
+ * </code></pre>
+ * <p>Records are cached and made available through accessor functions.  An example of adding
+ * a record to the store:</p>
+ * <pre><code>
+var defaultData = {
+    fullname: 'Full Name',
+    first: 'First Name'
+};
+var recId = 100; // provide unique id for the record
+var r = new myStore.recordType(defaultData, ++recId); // create new record
+myStore.{@link #insert}(0, r); // insert a new record into the store (also see {@link #add})
+ * </code></pre>
+ * @constructor
+ * Creates a new Store.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype store
+ */
+Ext.data.Store = function(config){
+    this.data = new Ext.util.MixedCollection(false);
+    this.data.getKey = function(o){
+        return o.id;
+    };
+    /**
+     * See the <code>{@link #baseParams corresponding configuration option}</code>
+     * for a description of this property.
+     * To modify this property see <code>{@link #setBaseParam}</code>.
+     * @property
+     */
+    this.baseParams = {};
+
+    // temporary removed-records cache
+    this.removed = [];
+
+    if(config && config.data){
+        this.inlineData = config.data;
+        delete config.data;
+    }
+
+    Ext.apply(this, config);
+    
+    this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames);
+
+    if(this.url && !this.proxy){
+        this.proxy = new Ext.data.HttpProxy({url: this.url});
+    }
+    // If Store is RESTful, so too is the DataProxy
+    if (this.restful === true && this.proxy) {
+        // When operating RESTfully, a unique transaction is generated for each record.
+        this.batch = false;
+        Ext.data.Api.restify(this.proxy);
+    }
+
+    if(this.reader){ // reader passed
+        if(!this.recordType){
+            this.recordType = this.reader.recordType;
+        }
+        if(this.reader.onMetaChange){
+            this.reader.onMetaChange = this.onMetaChange.createDelegate(this);
+        }
+        if (this.writer) { // writer passed
+            this.writer.meta = this.reader.meta;
+            this.pruneModifiedRecords = true;
+        }
+    }
+
+    /**
+     * The {@link Ext.data.Record Record} constructor as supplied to (or created by) the
+     * {@link Ext.data.DataReader Reader}. Read-only.
+     * <p>If the Reader was constructed by passing in an Array of {@link Ext.data.Field} definition objects,
+     * instead of a Record constructor, it will implicitly create a Record constructor from that Array (see
+     * {@link Ext.data.Record}.{@link Ext.data.Record#create create} for additional details).</p>
+     * <p>This property may be used to create new Records of the type held in this Store, for example:</p><pre><code>
+// create the data store
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: [
+       {name: 'company'},
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+store.loadData(myData);
+
+// create the Grid
+var grid = new Ext.grid.EditorGridPanel({
+    store: store,
+    colModel: new Ext.grid.ColumnModel({
+        columns: [
+            {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
+            {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
+            {header: 'Change', renderer: change, dataIndex: 'change'},
+            {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
+            {header: 'Last Updated', width: 85,
+                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+                dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            width: 75
+        }
+    }),
+    autoExpandColumn: 'company', // match the id specified in the column model
+    height:350,
+    width:600,
+    title:'Array Grid',
+    tbar: [{
+        text: 'Add Record',
+        handler : function(){
+            var defaultData = {
+                change: 0,
+                company: 'New Company',
+                lastChange: (new Date()).clearTime(),
+                pctChange: 0,
+                price: 10
+            };
+            var recId = 3; // provide unique id
+            var p = new store.recordType(defaultData, recId); // create new record
+            grid.stopEditing();
+            store.{@link #insert}(0, p); // insert a new record into the store (also see {@link #add})
+            grid.startEditing(0, 0);
+        }
+    }]
+});
+     * </code></pre>
+     * @property recordType
+     * @type Function
+     */
+
+    if(this.recordType){
+        /**
+         * A {@link Ext.util.MixedCollection MixedCollection} containing the defined {@link Ext.data.Field Field}s
+         * for the {@link Ext.data.Record Records} stored in this Store. Read-only.
+         * @property fields
+         * @type Ext.util.MixedCollection
+         */
+        this.fields = this.recordType.prototype.fields;
+    }
+    this.modified = [];
+
+    this.addEvents(
+        /**
+         * @event datachanged
+         * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
+         * widget that is using this Store as a Record cache should refresh its view.
+         * @param {Store} this
+         */
+        'datachanged',
+        /**
+         * @event metachange
+         * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.
+         * @param {Store} this
+         * @param {Object} meta The JSON metadata
+         */
+        'metachange',
+        /**
+         * @event add
+         * Fires when Records have been {@link #add}ed to the Store
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The array of Records added
+         * @param {Number} index The index at which the record(s) were added
+         */
+        'add',
+        /**
+         * @event remove
+         * Fires when a Record has been {@link #remove}d from the Store
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was removed
+         * @param {Number} index The index at which the record was removed
+         */
+        'remove',
+        /**
+         * @event update
+         * Fires when a Record has been updated
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was updated
+         * @param {String} operation The update operation being performed.  Value may be one of:
+         * <pre><code>
+ Ext.data.Record.EDIT
+ Ext.data.Record.REJECT
+ Ext.data.Record.COMMIT
+         * </code></pre>
+         */
+        'update',
+        /**
+         * @event clear
+         * Fires when the data cache has been cleared.
+         * @param {Store} this
+         */
+        'clear',
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for description.
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request is made for a new data object.  If the beforeload handler returns
+         * <tt>false</tt> the {@link #load} action will be canceled.
+         * @param {Store} this
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires after a new set of Records has been loaded.
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The Records that were loaded
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b> in favor of the catch-all <b><code>{@link #exception}</code></b>
+         * event instead.</p>
+         * <p>This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for description.
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * @param {DataProxy} this
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs
+         * @param {Object} options The loading options that were specified. Edit <code>options.params</code> to add Http parameters to the request.  (see {@link #save} for details)
+         * @param {Object} arg The callback's arg object passed to the {@link #request} function
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
+         * Success or failure of the action is available in the <code>result['successProperty']</code> property.
+         * The server-code might set the <code>successProperty</code> to <tt>false</tt> if a database validation
+         * failed, for example.
+         * @param {Ext.data.Store} store
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Object} result The 'data' picked-out out of the response for convenience.
+         * @param {Ext.Direct.Transaction} res
+         * @param {Record/Record[]} rs Store's records, the subject(s) of the write-action
+         */
+        'write'
+    );
+
+    if(this.proxy){
+        this.relayEvents(this.proxy,  ['loadexception', 'exception']);
+    }
+    // With a writer set for the Store, we want to listen to add/remove events to remotely create/destroy records.
+    if (this.writer) {
+        this.on({
+            scope: this,
+            add: this.createRecords,
+            remove: this.destroyRecord,
+            update: this.updateRecord
+        });
+    }
+
+    this.sortToggle = {};
+    if(this.sortField){
+        this.setDefaultSort(this.sortField, this.sortDir);
+    }else if(this.sortInfo){
+        this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction);
+    }
+
+    Ext.data.Store.superclass.constructor.call(this);
+
+    if(this.id){
+        this.storeId = this.id;
+        delete this.id;
+    }
+    if(this.storeId){
+        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, {
+    /**
+     * @cfg {String} storeId If passed, the id to use to register with the <b>{@link Ext.StoreMgr StoreMgr}</b>.
+     * <p><b>Note</b>: if a (deprecated) <tt>{@link #id}</tt> is specified it will supersede the <tt>storeId</tt>
+     * assignment.</p>
+     */
+    /**
+     * @cfg {String} url If a <tt>{@link #proxy}</tt> is not specified the <tt>url</tt> will be used to
+     * implicitly configure a {@link Ext.data.HttpProxy HttpProxy} if an <tt>url</tt> is specified.
+     * Typically this option, or the <code>{@link #data}</code> option will be specified.
+     */
+    /**
+     * @cfg {Boolean/Object} autoLoad If <tt>{@link #data}</tt> is not specified, and if <tt>autoLoad</tt>
+     * is <tt>true</tt> or an <tt>Object</tt>, this store's {@link #load} method is automatically called
+     * after creation. If the value of <tt>autoLoad</tt> is an <tt>Object</tt>, this <tt>Object</tt> will
+     * be passed to the store's {@link #load} method.
+     */
+    /**
+     * @cfg {Ext.data.DataProxy} proxy The {@link Ext.data.DataProxy DataProxy} object which provides
+     * access to a data object.  See <code>{@link #url}</code>.
+     */
+    /**
+     * @cfg {Array} data An inline data object readable by the <code>{@link #reader}</code>.
+     * Typically this option, or the <code>{@link #url}</code> option will be specified.
+     */
+    /**
+     * @cfg {Ext.data.DataReader} reader The {@link Ext.data.DataReader Reader} object which processes the
+     * data object and returns an Array of {@link Ext.data.Record} objects which are cached keyed by their
+     * <b><tt>{@link Ext.data.Record#id id}</tt></b> property.
+     */
+    /**
+     * @cfg {Ext.data.DataWriter} writer
+     * <p>The {@link Ext.data.DataWriter Writer} object which processes a record object for being written
+     * to the server-side database.</p>
+     * <br><p>When a writer is installed into a Store the {@link #add}, {@link #remove}, and {@link #update}
+     * events on the store are monitored in order to remotely {@link #createRecords create records},
+     * {@link #destroyRecord destroy records}, or {@link #updateRecord update records}.</p>
+     * <br><p>The proxy for this store will relay any {@link #writexception} events to this store.</p>
+     * <br><p>Sample implementation:
+     * <pre><code>
+var writer = new {@link Ext.data.JsonWriter}({
+    encode: true,
+    writeAllFields: true // write all fields, not just those that changed
+});
+
+// Typical Store collecting the Proxy, Reader and Writer together.
+var store = new Ext.data.Store({
+    storeId: 'user',
+    root: 'records',
+    proxy: proxy,
+    reader: reader,
+    writer: writer,     // <-- plug a DataWriter into the store just as you would a Reader
+    paramsAsHash: true,
+    autoSave: false    // <-- false to delay executing create, update, destroy requests
+                        //     until specifically told to do so.
+});
+     * </code></pre></p>
+     */
+    writer : undefined,
+    /**
+     * @cfg {Object} baseParams
+     * <p>An object containing properties which are to be sent as parameters
+     * for <i>every</i> HTTP request.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     * <p><b>Note</b>: <code>baseParams</code> may be superseded by any <code>params</code>
+     * specified in a <code>{@link #load}</code> request, see <code>{@link #load}</code>
+     * for more details.</p>
+     * This property may be modified after creation using the <code>{@link #setBaseParam}</code>
+     * method.
+     * @property
+     */
+    /**
+     * @cfg {Object} sortInfo A config object to specify the sort order in the request of a Store's
+     * {@link #load} operation.  Note that for local sorting, the <tt>direction</tt> property is
+     * case-sensitive. See also {@link #remoteSort} and {@link #paramNames}.
+     * For example:<pre><code>
+sortInfo: {
+    field: 'fieldName',
+    direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
+}
+</code></pre>
+     */
+    /**
+     * @cfg {boolean} remoteSort <tt>true</tt> if sorting is to be handled by requesting the <tt>{@link #proxy Proxy}</tt>
+     * to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache
+     * in place (defaults to <tt>false</tt>).
+     * <p>If <tt>remoteSort</tt> is <tt>true</tt>, then clicking on a {@link Ext.grid.Column Grid Column}'s
+     * {@link Ext.grid.Column#header header} causes the current page to be requested from the server appending
+     * the following two parameters to the <b><tt>{@link #load params}</tt></b>:<div class="mdetail-params"><ul>
+     * <li><b><tt>sort</tt></b> : String<p class="sub-desc">The <tt>name</tt> (as specified in the Record's
+     * {@link Ext.data.Field Field definition}) of the field to sort on.</p></li>
+     * <li><b><tt>dir</tt></b> : String<p class="sub-desc">The direction of the sort, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul></div></p>
+     */
+    remoteSort : false,
+
+    /**
+     * @cfg {Boolean} autoDestroy <tt>true</tt> to destroy the store when the component the store is bound
+     * to is destroyed (defaults to <tt>false</tt>).
+     * <p><b>Note</b>: this should be set to true when using stores that are bound to only 1 component.</p>
+     */
+    autoDestroy : false,
+
+    /**
+     * @cfg {Boolean} pruneModifiedRecords <tt>true</tt> to clear all modified record information each time
+     * the store is loaded or when a record is removed (defaults to <tt>false</tt>). See {@link #getModifiedRecords}
+     * for the accessor method to retrieve the modified records.
+     */
+    pruneModifiedRecords : false,
+
+    /**
+     * Contains the last options object used as the parameter to the {@link #load} method. See {@link #load}
+     * for the details of what this may contain. This may be useful for accessing any params which were used
+     * to load the current Record cache.
+     * @property
+     */
+    lastOptions : null,
+
+    /**
+     * @cfg {Boolean} autoSave
+     * <p>Defaults to <tt>true</tt> causing the store to automatically {@link #save} records to
+     * the server when a record is modified (ie: becomes 'dirty'). Specify <tt>false</tt> to manually call {@link #save}
+     * to send all modifiedRecords to the server.</p>
+     * <br><p><b>Note</b>: each CRUD action will be sent as a separate request.</p>
+     */
+    autoSave : true,
+
+    /**
+     * @cfg {Boolean} batch
+     * <p>Defaults to <tt>true</tt> (unless <code>{@link #restful}:true</code>). Multiple
+     * requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined
+     * and sent as one transaction. Only applies when <code>{@link #autoSave}</code> is set
+     * to <tt>false</tt>.</p>
+     * <br><p>If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is
+     * generated for each record.</p>
+     */
+    batch : true,
+
+    /**
+     * @cfg {Boolean} restful
+     * Defaults to <tt>false</tt>.  Set to <tt>true</tt> to have the Store and the set
+     * Proxy operate in a RESTful manner. The store will automatically generate GET, POST,
+     * PUT and DELETE requests to the server. The HTTP method used for any given CRUD
+     * action is described in {@link Ext.data.Api#restActions}.  For additional information
+     * see {@link Ext.data.DataProxy#restful}.
+     * <p><b>Note</b>: if <code>{@link #restful}:true</code> <code>batch</code> will
+     * internally be set to <tt>false</tt>.</p>
+     */
+    restful: false,
+    
+    /**
+     * @cfg {Object} paramNames
+     * <p>An object containing properties which specify the names of the paging and
+     * sorting parameters passed to remote servers when loading blocks of data. By default, this
+     * object takes the following form:</p><pre><code>
+{
+    start : 'start',  // The parameter name which specifies the start row
+    limit : 'limit',  // The parameter name which specifies number of rows to return
+    sort : 'sort',    // The parameter name which specifies the column to sort on
+    dir : 'dir'       // The parameter name which specifies the sort direction
+}
+</code></pre>
+     * <p>The server must produce the requested data block upon receipt of these parameter names.
+     * If different parameter names are required, this property can be overriden using a configuration
+     * property.</p>
+     * <p>A {@link Ext.PagingToolbar PagingToolbar} bound to this Store uses this property to determine
+     * the parameter names to use in its {@link #load requests}.
+     */
+    paramNames : undefined,
+    
+    /**
+     * @cfg {Object} defaultParamNames
+     * Provides the default values for the {@link #paramNames} property. To globally modify the parameters
+     * for all stores, this object should be changed on the store prototype.
+     */
+    defaultParamNames : {
+        start : 'start',
+        limit : 'limit',
+        sort : 'sort',
+        dir : 'dir'
+    },
+
+    /**
+     * Destroys the store.
+     */
+    destroy : function(){
+        if(this.storeId){
+            Ext.StoreMgr.unregister(this);
+        }
+        this.data = null;
+        Ext.destroy(this.proxy);
+        this.reader = this.writer = null;
+        this.purgeListeners();
+    },
+
+    /**
+     * Add Records to the Store and fires the {@link #add} event.  To add Records
+     * to the store from a remote source use <code>{@link #load}({add:true})</code>.
+     * See also <code>{@link #recordType}</code> and <code>{@link #insert}</code>.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects
+     * to add to the cache. See {@link #recordType}.
+     */
+    add : function(records){
+        records = [].concat(records);
+        if(records.length < 1){
+            return;
+        }
+        for(var i = 0, len = records.length; i < len; i++){
+            records[i].join(this);
+        }
+        var index = this.data.length;
+        this.data.addAll(records);
+        if(this.snapshot){
+            this.snapshot.addAll(records);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * (Local sort only) Inserts the passed Record into the Store at the index where it
+     * should go based on the current sort information.
+     * @param {Ext.data.Record} record
+     */
+    addSorted : function(record){
+        var index = this.findInsertIndex(record);
+        this.insert(index, record);
+    },
+
+    /**
+     * Remove a Record from the Store and fires the {@link #remove} event.
+     * @param {Ext.data.Record} record The Ext.data.Record object to remove from the cache.
+     */
+    remove : function(record){
+        var index = this.data.indexOf(record);
+        if(index > -1){
+            this.data.removeAt(index);
+            if(this.pruneModifiedRecords){
+                this.modified.remove(record);
+            }
+            if(this.snapshot){
+                this.snapshot.remove(record);
+            }
+            this.fireEvent('remove', this, record, index);
+        }
+    },
+
+    /**
+     * Remove a Record from the Store at the specified index. Fires the {@link #remove} event.
+     * @param {Number} index The index of the record to remove.
+     */
+    removeAt : function(index){
+        this.remove(this.getAt(index));
+    },
+
+    /**
+     * Remove all Records from the Store and fires the {@link #clear} event.
+     */
+    removeAll : function(){
+        this.data.clear();
+        if(this.snapshot){
+            this.snapshot.clear();
+        }
+        if(this.pruneModifiedRecords){
+            this.modified = [];
+        }
+        this.fireEvent('clear', this);
+    },
+
+    /**
+     * Inserts Records into the Store at the given index and fires the {@link #add} event.
+     * See also <code>{@link #add}</code> and <code>{@link #addSorted}</code>.
+     * @param {Number} index The start index at which to insert the passed Records.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache.
+     */
+    insert : function(index, records){
+        records = [].concat(records);
+        for(var i = 0, len = records.length; i < len; i++){
+            this.data.insert(index, records[i]);
+            records[i].join(this);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * Get the index within the cache of the passed Record.
+     * @param {Ext.data.Record} record The Ext.data.Record object to find.
+     * @return {Number} The index of the passed Record. Returns -1 if not found.
+     */
+    indexOf : function(record){
+        return this.data.indexOf(record);
+    },
+
+    /**
+     * Get the index within the cache of the Record with the passed id.
+     * @param {String} id The id of the Record to find.
+     * @return {Number} The index of the Record. Returns -1 if not found.
+     */
+    indexOfId : function(id){
+        return this.data.indexOfKey(id);
+    },
+
+    /**
+     * Get the Record with the specified id.
+     * @param {String} id The id of the Record to find.
+     * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found.
+     */
+    getById : function(id){
+        return this.data.key(id);
+    },
+
+    /**
+     * Get the Record at the specified index.
+     * @param {Number} index The index of the Record to find.
+     * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found.
+     */
+    getAt : function(index){
+        return this.data.itemAt(index);
+    },
+
+    /**
+     * Returns a range of Records between specified indices.
+     * @param {Number} startIndex (optional) The starting index (defaults to 0)
+     * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store)
+     * @return {Ext.data.Record[]} An array of Records
+     */
+    getRange : function(start, end){
+        return this.data.getRange(start, end);
+    },
+
+    // private
+    storeOptions : function(o){
+        o = Ext.apply({}, o);
+        delete o.callback;
+        delete o.scope;
+        this.lastOptions = o;
+    },
+
+    /**
+     * <p>Loads the Record cache from the configured <tt>{@link #proxy}</tt> using the configured <tt>{@link #reader}</tt>.</p>
+     * <br><p>Notes:</p><div class="mdetail-params"><ul>
+     * <li><b><u>Important</u></b>: loading is asynchronous! This call will return before the new data has been
+     * loaded. To perform any post-processing where information from the load call is required, specify
+     * the <tt>callback</tt> function to be called, or use a {@link Ext.util.Observable#listeners a 'load' event handler}.</li>
+     * <li>If using {@link Ext.PagingToolbar remote paging}, the first load call must specify the <tt>start</tt> and <tt>limit</tt>
+     * properties in the <code>options.params</code> property to establish the initial position within the
+     * dataset, and the number of Records to cache on each read from the Proxy.</li>
+     * <li>If using {@link #remoteSort remote sorting}, the configured <code>{@link #sortInfo}</code>
+     * will be automatically included with the posted parameters according to the specified
+     * <code>{@link #paramNames}</code>.</li>
+     * </ul></div>
+     * @param {Object} options An object containing properties which control loading options:<ul>
+     * <li><b><tt>params</tt></b> :Object<div class="sub-desc"><p>An object containing properties to pass as HTTP
+     * parameters to a remote data source. <b>Note</b>: <code>params</code> will override any
+     * <code>{@link #baseParams}</code> of the same name.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     * <li><b><tt>callback</tt></b> : Function<div class="sub-desc"><p>A function to be called after the Records
+     * have been loaded. The <tt>callback</tt> is called after the load event and is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[]</li>
+     * <li><tt>options</tt>: Options object from the load call</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div></li>
+     * <li><b><tt>scope</tt></b> : Object<div class="sub-desc"><p>Scope with which to call the callback (defaults
+     * to the Store object)</p></div></li>
+     * <li><b><tt>add</tt></b> : Boolean<div class="sub-desc"><p>Indicator to append loaded records rather than
+     * replace the current cache.  <b>Note</b>: see note for <tt>{@link #loadData}</tt></p></div></li>
+     * </ul>
+     * @return {Boolean} If the <i>developer</i> provided <tt>{@link #beforeload}</tt> event handler returns
+     * <tt>false</tt>, the load call will abort and will return <tt>false</tt>; otherwise will return <tt>true</tt>.
+     */
+    load : function(options) {
+        options = options || {};
+        this.storeOptions(options);
+        if(this.sortInfo && this.remoteSort){
+            var pn = this.paramNames;
+            options.params = options.params || {};
+            options.params[pn.sort] = this.sortInfo.field;
+            options.params[pn.dir] = this.sortInfo.direction;
+        }
+        try {
+            return this.execute('read', null, options); // <-- null represents rs.  No rs for load actions.
+        } catch(e) {
+            this.handleException(e);
+            return false;
+        }
+    },
+
+    /**
+     * updateRecord  Should not be used directly.  This method will be called automatically if a Writer is set.
+     * Listens to 'update' event.
+     * @param {Object} store
+     * @param {Object} record
+     * @param {Object} action
+     * @private
+     */
+    updateRecord : function(store, record, action) {
+        if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid))) {
+            this.save();
+        }
+    },
+
+    /**
+     * Should not be used directly.  Store#add will call this automatically if a Writer is set
+     * @param {Object} store
+     * @param {Object} rs
+     * @param {Object} index
+     * @private
+     */
+    createRecords : function(store, rs, index) {
+        for (var i = 0, len = rs.length; i < len; i++) {
+            if (rs[i].phantom && rs[i].isValid()) {
+                rs[i].markDirty();  // <-- Mark new records dirty
+                this.modified.push(rs[i]);  // <-- add to modified
+            }
+        }
+        if (this.autoSave === true) {
+            this.save();
+        }
+    },
+
+    /**
+     * Destroys a record or records.  Should not be used directly.  It's called by Store#remove if a Writer is set.
+     * @param {Store} this
+     * @param {Ext.data.Record/Ext.data.Record[]}
+     * @param {Number} index
+     * @private
+     */
+    destroyRecord : function(store, record, index) {
+        if (this.modified.indexOf(record) != -1) {  // <-- handled already if @cfg pruneModifiedRecords == true
+            this.modified.remove(record);
+        }
+        if (!record.phantom) {
+            this.removed.push(record);
+
+            // since the record has already been removed from the store but the server request has not yet been executed,
+            // must keep track of the last known index this record existed.  If a server error occurs, the record can be
+            // put back into the store.  @see Store#createCallback where the record is returned when response status === false
+            record.lastIndex = index;
+
+            if (this.autoSave === true) {
+                this.save();
+            }
+        }
+    },
+
+    /**
+     * This method should generally not be used directly.  This method is called internally
+     * by {@link #load}, or if a Writer is set will be called automatically when {@link #add},
+     * {@link #remove}, or {@link #update} events fire.
+     * @param {String} action Action name ('read', 'create', 'update', or 'destroy')
+     * @param {Record/Record[]} rs
+     * @param {Object} options
+     * @throws Error
+     * @private
+     */
+    execute : function(action, rs, options) {
+        // blow up if action not Ext.data.CREATE, READ, UPDATE, DESTROY
+        if (!Ext.data.Api.isAction(action)) {
+            throw new Ext.data.Api.Error('execute', action);
+        }
+        // make sure options has a params key
+        options = Ext.applyIf(options||{}, {
+            params: {}
+        });
+
+        // have to separate before-events since load has a different signature than create,destroy and save events since load does not
+        // include the rs (record resultset) parameter.  Capture return values from the beforeaction into doRequest flag.
+        var doRequest = true;
+
+        if (action === 'read') {
+            doRequest = this.fireEvent('beforeload', this, options);
+        }
+        else {
+            // if Writer is configured as listful, force single-recoord rs to be [{}} instead of {}
+            if (this.writer.listful === true && this.restful !== true) {
+                rs = (Ext.isArray(rs)) ? rs : [rs];
+            }
+            // if rs has just a single record, shift it off so that Writer writes data as '{}' rather than '[{}]'
+            else if (Ext.isArray(rs) && rs.length == 1) {
+                rs = rs.shift();
+            }
+            // Write the action to options.params
+            if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) {
+                this.writer.write(action, options.params, rs);
+            }
+        }
+        if (doRequest !== false) {
+            // Send request to proxy.
+            var params = Ext.apply({}, options.params, this.baseParams);
+            if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) {
+                params.xaction = action;
+            }
+            // Note:  Up until this point we've been dealing with 'action' as a key from Ext.data.Api.actions.  We'll flip it now
+            // and send the value into DataProxy#request, since it's the value which maps to the DataProxy#api
+            this.proxy.request(Ext.data.Api.actions[action], rs, params, this.reader, this.createCallback(action, rs), this, options);
+        }
+        return doRequest;
+    },
+
+    /**
+     * Saves all pending changes to the store.  If the commensurate Ext.data.Api.actions action is not configured, then
+     * the configured <code>{@link #url}</code> will be used.
+     * <pre>
+     * change            url
+     * ---------------   --------------------
+     * removed records   Ext.data.Api.actions.destroy
+     * phantom records   Ext.data.Api.actions.create
+     * {@link #getModifiedRecords modified records}  Ext.data.Api.actions.update
+     * </pre>
+     * @TODO:  Create extensions of Error class and send associated Record with thrown exceptions.
+     * e.g.:  Ext.data.DataReader.Error or Ext.data.Error or Ext.data.DataProxy.Error, etc.
+     */
+    save : function() {
+        if (!this.writer) {
+            throw new Ext.data.Store.Error('writer-undefined');
+        }
+
+        // DESTROY:  First check for removed records.  Records in this.removed are guaranteed non-phantoms.  @see Store#remove
+        if (this.removed.length) {
+            this.doTransaction('destroy', this.removed);
+        }
+
+        // Check for modified records. Use a copy so Store#rejectChanges will work if server returns error.
+        var rs = [].concat(this.getModifiedRecords());
+        if (!rs.length) { // Bail-out if empty...
+            return true;
+        }
+
+        // CREATE:  Next check for phantoms within rs.  splice-off and execute create.
+        var phantoms = [];
+        for (var i = rs.length-1; i >= 0; i--) {
+            if (rs[i].phantom === true) {
+                var rec = rs.splice(i, 1).shift();
+                if (rec.isValid()) {
+                    phantoms.push(rec);
+                }
+            } else if (!rs[i].isValid()) { // <-- while we're here, splice-off any !isValid real records
+                rs.splice(i,1);
+            }
+        }
+        // If we have valid phantoms, create them...
+        if (phantoms.length) {
+            this.doTransaction('create', phantoms);
+        }
+
+        // UPDATE:  And finally, if we're still here after splicing-off phantoms and !isValid real records, update the rest...
+        if (rs.length) {
+            this.doTransaction('update', rs);
+        }
+        return true;
+    },
+
+    // private.  Simply wraps call to Store#execute in try/catch.  Defers to Store#handleException on error.  Loops if batch: false
+    doTransaction : function(action, rs) {
+        function transaction(records) {
+            try {
+                this.execute(action, records);
+            } catch (e) {
+                this.handleException(e);
+            }
+        }
+        if (this.batch === false) {
+            for (var i = 0, len = rs.length; i < len; i++) {
+                transaction.call(this, rs[i]);
+            }
+        } else {
+            transaction.call(this, rs);
+        }
+    },
+
+    // @private callback-handler for remote CRUD actions
+    // Do not override -- override loadRecords, onCreateRecords, onDestroyRecords and onUpdateRecords instead.
+    createCallback : function(action, rs) {
+        var actions = Ext.data.Api.actions;
+        return (action == 'read') ? this.loadRecords : function(data, response, success) {
+            // calls: onCreateRecords | onUpdateRecords | onDestroyRecords
+            this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, data);
+            // If success === false here, exception will have been called in DataProxy
+            if (success === true) {
+                this.fireEvent('write', this, action, data, response, rs);
+            }
+        };
+    },
+
+    // Clears records from modified array after an exception event.
+    // NOTE:  records are left marked dirty.  Do we want to commit them even though they were not updated/realized?
+    clearModified : function(rs) {
+        if (Ext.isArray(rs)) {
+            for (var n=rs.length-1;n>=0;n--) {
+                this.modified.splice(this.modified.indexOf(rs[n]), 1);
+            }
+        } else {
+            this.modified.splice(this.modified.indexOf(rs), 1);
+        }
+    },
+
+    // remap record ids in MixedCollection after records have been realized.  @see Store#onCreateRecords, @see DataReader#realize
+    reMap : function(record) {
+        if (Ext.isArray(record)) {
+            for (var i = 0, len = record.length; i < len; i++) {
+                this.reMap(record[i]);
+            }
+        } else {
+            delete this.data.map[record._phid];
+            this.data.map[record.id] = record;
+            var index = this.data.keys.indexOf(record._phid);
+            this.data.keys.splice(index, 1, record.id);
+            delete record._phid;
+        }
+    },
+
+    // @protected onCreateRecord proxy callback for create action
+    onCreateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.realize(rs, data);
+                this.reMap(rs);
+            }
+            catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#realize splices-off the rs until empty.
+                    this.onCreateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected, onUpdateRecords proxy callback for update action
+    onUpdateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.update(rs, data);
+            } catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#update splices-off the rs until empty.
+                    this.onUpdateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected onDestroyRecords proxy callback for destroy action
+    onDestroyRecords : function(success, rs, data) {
+        // splice each rec out of this.removed
+        rs = (rs instanceof Ext.data.Record) ? [rs] : rs;
+        for (var i=0,len=rs.length;i<len;i++) {
+            this.removed.splice(this.removed.indexOf(rs[i]), 1);
+        }
+        if (success === false) {
+            // put records back into store if remote destroy fails.
+            // @TODO: Might want to let developer decide.
+            for (i=rs.length-1;i>=0;i--) {
+                this.insert(rs[i].lastIndex, rs[i]);    // <-- lastIndex set in Store#destroyRecord
+            }
+        }
+    },
+
+    // protected handleException.  Possibly temporary until Ext framework has an exception-handler.
+    handleException : function(e) {
+        // @see core/Error.js
+        Ext.handleError(e);
+    },
+
+    /**
+     * <p>Reloads the Record cache from the configured Proxy using the configured {@link Ext.data.Reader Reader} and
+     * the options from the last load operation performed.</p>
+     * <p><b>Note</b>: see the Important note in {@link #load}.</p>
+     * @param {Object} options (optional) An <tt>Object</tt> containing {@link #load loading options} which may
+     * override the options used in the last {@link #load} operation. See {@link #load} for details (defaults to
+     * <tt>null</tt>, in which case the {@link #lastOptions} are used).
+     */
+    reload : function(options){
+        this.load(Ext.applyIf(options||{}, this.lastOptions));
+    },
+
+    // private
+    // Called as a callback by the Reader during a load operation.
+    loadRecords : function(o, options, success){
+        if(!o || success === false){
+            if(success !== false){
+                this.fireEvent('load', this, [], options);
+            }
+            if(options.callback){
+                options.callback.call(options.scope || this, [], options, false, o);
+            }
+            return;
+        }
+        var r = o.records, t = o.totalRecords || r.length;
+        if(!options || options.add !== true){
+            if(this.pruneModifiedRecords){
+                this.modified = [];
+            }
+            for(var i = 0, len = r.length; i < len; i++){
+                r[i].join(this);
+            }
+            if(this.snapshot){
+                this.data = this.snapshot;
+                delete this.snapshot;
+            }
+            this.data.clear();
+            this.data.addAll(r);
+            this.totalLength = t;
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            this.totalLength = Math.max(t, this.data.length+r.length);
+            this.add(r);
+        }
+        this.fireEvent('load', this, r, options);
+        if(options.callback){
+            options.callback.call(options.scope || this, r, options, true);
+        }
+    },
+
+    /**
+     * Loads data from a passed data block and fires the {@link #load} event. A {@link Ext.data.Reader Reader}
+     * which understands the format of the data must have been configured in the constructor.
+     * @param {Object} data The data block from which to read the Records.  The format of the data expected
+     * is dependent on the type of {@link Ext.data.Reader Reader} that is configured and should correspond to
+     * that {@link Ext.data.Reader Reader}'s <tt>{@link Ext.data.Reader#readRecords}</tt> parameter.
+     * @param {Boolean} append (Optional) <tt>true</tt> to append the new Records rather the default to replace
+     * the existing cache.
+     * <b>Note</b>: that Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records
+     * with ids which are already present in the Store will <i>replace</i> existing Records. Only Records with
+     * new, unique ids will be added.
+     */
+    loadData : function(o, append){
+        var r = this.reader.readRecords(o);
+        this.loadRecords(r, {add: append}, true);
+    },
+
+    /**
+     * Gets the number of cached records.
+     * <p>If using paging, this may not be the total size of the dataset. If the data object
+     * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns
+     * the dataset size.  <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records in the Store's cache.
+     */
+    getCount : function(){
+        return this.data.length || 0;
+    },
+
+    /**
+     * Gets the total number of records in the dataset as returned by the server.
+     * <p>If using paging, for this to be accurate, the data object used by the {@link #reader Reader}
+     * must contain the dataset size. For remote data sources, the value for this property
+     * (<tt>totalProperty</tt> for {@link Ext.data.JsonReader JsonReader},
+     * <tt>totalRecords</tt> for {@link Ext.data.XmlReader XmlReader}) shall be returned by a query on the server.
+     * <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records as specified in the data object passed to the Reader
+     * by the Proxy.
+     * <p><b>Note</b>: this value is not updated when changing the contents of the Store locally.</p>
+     */
+    getTotalCount : function(){
+        return this.totalLength || 0;
+    },
+
+    /**
+     * Returns an object describing the current sort state of this Store.
+     * @return {Object} The sort state of the Store. An object with two properties:<ul>
+     * <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li>
+     * <li><b>direction : String<p class="sub-desc">The sort order, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul>
+     * See <tt>{@link #sortInfo}</tt> for additional details.
+     */
+    getSortState : function(){
+        return this.sortInfo;
+    },
+
+    // private
+    applySort : function(){
+        if(this.sortInfo && !this.remoteSort){
+            var s = this.sortInfo, f = s.field;
+            this.sortData(f, s.direction);
+        }
+    },
+
+    // private
+    sortData : function(f, direction){
+        direction = direction || 'ASC';
+        var st = this.fields.get(f).sortType;
+        var fn = function(r1, r2){
+            var v1 = st(r1.data[f]), v2 = st(r2.data[f]);
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        };
+        this.data.sort(direction, fn);
+        if(this.snapshot && this.snapshot != this.data){
+            this.snapshot.sort(direction, fn);
+        }
+    },
+
+    /**
+     * Sets the default sort column and order to be used by the next {@link #load} operation.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    setDefaultSort : function(field, dir){
+        dir = dir ? dir.toUpperCase() : 'ASC';
+        this.sortInfo = {field: field, direction: dir};
+        this.sortToggle[field] = dir;
+    },
+
+    /**
+     * Sort the Records.
+     * If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local
+     * sorting is used, the cache is sorted internally. See also {@link #remoteSort} and {@link #paramNames}.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    sort : function(fieldName, dir){
+        var f = this.fields.get(fieldName);
+        if(!f){
+            return false;
+        }
+        if(!dir){
+            if(this.sortInfo && this.sortInfo.field == f.name){ // toggle sort dir
+                dir = (this.sortToggle[f.name] || 'ASC').toggle('ASC', 'DESC');
+            }else{
+                dir = f.sortDir;
+            }
+        }
+        var st = (this.sortToggle) ? this.sortToggle[f.name] : null;
+        var si = (this.sortInfo) ? this.sortInfo : null;
+
+        this.sortToggle[f.name] = dir;
+        this.sortInfo = {field: f.name, direction: dir};
+        if(!this.remoteSort){
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            if (!this.load(this.lastOptions)) {
+                if (st) {
+                    this.sortToggle[f.name] = st;
+                }
+                if (si) {
+                    this.sortInfo = si;
+                }
+            }
+        }
+    },
+
+    /**
+     * Calls the specified function for each of the {@link Ext.data.Record Records} in the cache.
+     * @param {Function} fn The function to call. The {@link Ext.data.Record Record} is passed as the first parameter.
+     * Returning <tt>false</tt> aborts and exits the iteration.
+     * @param {Object} scope (optional) The scope in which to call the function (defaults to the {@link Ext.data.Record Record}).
+     */
+    each : function(fn, scope){
+        this.data.each(fn, scope);
+    },
+
+    /**
+     * Gets all {@link Ext.data.Record records} modified since the last commit.  Modified records are
+     * persisted across load operations (e.g., during paging). <b>Note</b>: deleted records are not
+     * included.  See also <tt>{@link #pruneModifiedRecords}</tt> and
+     * {@link Ext.data.Record}<tt>{@link Ext.data.Record#markDirty markDirty}.</tt>.
+     * @return {Ext.data.Record[]} An array of {@link Ext.data.Record Records} containing outstanding
+     * modifications.  To obtain modified fields within a modified record see
+     *{@link Ext.data.Record}<tt>{@link Ext.data.Record#modified modified}.</tt>.
+     */
+    getModifiedRecords : function(){
+        return this.modified;
+    },
+
+    // private
+    createFilterFn : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return false;
+        }
+        value = this.data.createValueMatcher(value, anyMatch, caseSensitive);
+        return function(r){
+            return value.test(r.data[property]);
+        };
+    },
+
+    /**
+     * Sums the value of <tt>property</tt> for each {@link Ext.data.Record record} between <tt>start</tt>
+     * and <tt>end</tt> and returns the result.
+     * @param {String} property A field in each record
+     * @param {Number} start (optional) The record index to start at (defaults to <tt>0</tt>)
+     * @param {Number} end (optional) The last record index to include (defaults to length - 1)
+     * @return {Number} The sum
+     */
+    sum : function(property, start, end){
+        var rs = this.data.items, v = 0;
+        start = start || 0;
+        end = (end || end === 0) ? end : rs.length-1;
+
+        for(var i = start; i <= end; i++){
+            v += (rs[i].data[property] || 0);
+        }
+        return v;
+    },
+
+    /**
+     * Filter the {@link Ext.data.Record records} by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field should begin with, or a RegExp to test
+     * against the field.
+     * @param {Boolean} anyMatch (optional) <tt>true</tt> to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) <tt>true</tt> for case sensitive comparison
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.filterBy(fn) : this.clearFilter();
+    },
+
+    /**
+     * Filter by a function. The specified function will be called for each
+     * Record in this Store. If the function returns <tt>true</tt> the Record is included,
+     * otherwise it is filtered out.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     */
+    filterBy : function(fn, scope){
+        this.snapshot = this.snapshot || this.data;
+        this.data = this.queryBy(fn, scope||this);
+        this.fireEvent('datachanged', this);
+    },
+
+    /**
+     * Query the records by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field
+     * should begin with, or a RegExp to test against the field.
+     * @param {Boolean} anyMatch (optional) True to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     */
+    query : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.queryBy(fn) : this.data.clone();
+    },
+
+    /**
+     * Query the cached records in this Store using a filtering function. The specified function
+     * will be called with each record in this Store. If the function returns <tt>true</tt> the record is
+     * included in the results.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     **/
+    queryBy : function(fn, scope){
+        var data = this.snapshot || this.data;
+        return data.filterBy(fn, scope||this);
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either a string that the property value
+     * should begin with, or a RegExp to test against the property.
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {Number} The matched index or -1
+     */
+    find : function(property, value, start, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.data.findIndexBy(fn, null, start) : -1;
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value The value to match against
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findExact: function(property, value, start){
+        return this.data.findIndexBy(function(rec){
+            return rec.get(property) === value;
+        }, this, start);
+    },
+
+    /**
+     * Find the index of the first matching Record in this Store by a function.
+     * If the function returns <tt>true</tt> it is considered a match.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findBy : function(fn, scope, start){
+        return this.data.findIndexBy(fn, scope, start);
+    },
+
+    /**
+     * Collects unique values for a particular dataIndex from this store.
+     * @param {String} dataIndex The property to collect
+     * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values
+     * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered
+     * @return {Array} An array of the unique values
+     **/
+    collect : function(dataIndex, allowNull, bypassFilter){
+        var d = (bypassFilter === true && this.snapshot) ?
+                this.snapshot.items : this.data.items;
+        var v, sv, r = [], l = {};
+        for(var i = 0, len = d.length; i < len; i++){
+            v = d[i].data[dataIndex];
+            sv = String(v);
+            if((allowNull || !Ext.isEmpty(v)) && !l[sv]){
+                l[sv] = true;
+                r[r.length] = v;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Revert to a view of the Record cache with no filtering applied.
+     * @param {Boolean} suppressEvent If <tt>true</tt> the filter is cleared silently without firing the
+     * {@link #datachanged} event.
+     */
+    clearFilter : function(suppressEvent){
+        if(this.isFiltered()){
+            this.data = this.snapshot;
+            delete this.snapshot;
+            if(suppressEvent !== true){
+                this.fireEvent('datachanged', this);
+            }
+        }
+    },
+
+    /**
+     * Returns true if this store is currently filtered
+     * @return {Boolean}
+     */
+    isFiltered : function(){
+        return this.snapshot && this.snapshot != this.data;
+    },
+
+    // private
+    afterEdit : function(record){
+        if(this.modified.indexOf(record) == -1){
+            this.modified.push(record);
+        }
+        this.fireEvent('update', this, record, Ext.data.Record.EDIT);
+    },
+
+    // private
+    afterReject : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.REJECT);
+    },
+
+    // private
+    afterCommit : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.COMMIT);
+    },
+
+    /**
+     * Commit all Records with {@link #getModifiedRecords outstanding changes}. To handle updates for changes,
+     * subscribe to the Store's {@link #update update event}, and perform updating when the third parameter is
+     * Ext.data.Record.COMMIT.
+     */
+    commitChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].commit();
+        }
+    },
+
+    /**
+     * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}.
+     */
+    rejectChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].reject();
+        }
+    },
+
+    // private
+    onMetaChange : function(meta, rtype, o){
+        this.recordType = rtype;
+        this.fields = rtype.prototype.fields;
+        delete this.snapshot;
+        if(meta.sortInfo){
+            this.sortInfo = meta.sortInfo;
+        }else if(this.sortInfo  && !this.fields.get(this.sortInfo.field)){
+            delete this.sortInfo;
+        }
+        this.modified = [];
+        this.fireEvent('metachange', this, this.reader.meta);
+    },
+
+    // private
+    findInsertIndex : function(record){
+        this.suspendEvents();
+        var data = this.data.clone();
+        this.data.add(record);
+        this.applySort();
+        var index = this.data.indexOf(record);
+        this.data = data;
+        this.resumeEvents();
+        return index;
+    },
+
+    /**
+     * Set the value for a property name in this store's {@link #baseParams}.  Usage:</p><pre><code>
+myStore.setBaseParam('foo', {bar:3});
+</code></pre>
+     * @param {String} name Name of the property to assign
+     * @param {Mixed} value Value to assign the <tt>name</tt>d property
+     **/
+    setBaseParam : function (name, value){
+        this.baseParams = this.baseParams || {};
+        this.baseParams[name] = value;
+    }
+});
+
+Ext.reg('store', Ext.data.Store);
+
+/**
+ * @class Ext.data.Store.Error
+ * @extends Ext.Error
+ * Store Error extension.
+ * @param {String} name
+ */
+Ext.data.Store.Error = Ext.extend(Ext.Error, {
+    name: 'Ext.data.Store'
+});
+Ext.apply(Ext.data.Store.Error.prototype, {
+    lang: {
+        'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.'
+    }
+});
+
+/**
+ * @class Ext.data.Field
+ * <p>This class encapsulates the field definition information specified in the field definition objects
+ * passed to {@link Ext.data.Record#create}.</p>
+ * <p>Developers do not need to instantiate this class. Instances are created by {@link Ext.data.Record.create}
+ * and cached in the {@link Ext.data.Record#fields fields} property of the created Record constructor's <b>prototype.</b></p>
+ */
+Ext.data.Field = function(config){
+    if(typeof config == "string"){
+        config = {name: config};
+    }
+    Ext.apply(this, config);
+
+    if(!this.type){
+        this.type = "auto";
+    }
+
+    var st = Ext.data.SortTypes;
+    // named sortTypes are supported, here we look them up
+    if(typeof this.sortType == "string"){
+        this.sortType = st[this.sortType];
+    }
+
+    // set default sortType for strings and dates
+    if(!this.sortType){
+        switch(this.type){
+            case "string":
+                this.sortType = st.asUCString;
+                break;
+            case "date":
+                this.sortType = st.asDate;
+                break;
+            default:
+                this.sortType = st.none;
+        }
+    }
+
+    // define once
+    var stripRe = /[\$,%]/g;
+
+    // prebuilt conversion function for this field, instead of
+    // switching every time we're reading a value
+    if(!this.convert){
+        var cv, dateFormat = this.dateFormat;
+        switch(this.type){
+            case "":
+            case "auto":
+            case undefined:
+                cv = function(v){ return v; };
+                break;
+            case "string":
+                cv = function(v){ return (v === undefined || v === null) ? '' : String(v); };
+                break;
+            case "int":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseInt(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "float":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseFloat(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "bool":
+            case "boolean":
+                cv = function(v){ return v === true || v === "true" || v == 1; };
+                break;
+            case "date":
+                cv = function(v){
+                    if(!v){
+                        return '';
+                    }
+                    if(Ext.isDate(v)){
+                        return v;
+                    }
+                    if(dateFormat){
+                        if(dateFormat == "timestamp"){
+                            return new Date(v*1000);
+                        }
+                        if(dateFormat == "time"){
+                            return new Date(parseInt(v, 10));
+                        }
+                        return Date.parseDate(v, dateFormat);
+                    }
+                    var parsed = Date.parse(v);
+                    return parsed ? new Date(parsed) : null;
+                };
+             break;
+
+        }
+        this.convert = cv;
+    }
+};
+
+Ext.data.Field.prototype = {
+    /**
+     * @cfg {String} name
+     * The name by which the field is referenced within the Record. This is referenced by, for example,
+     * the <tt>dataIndex</tt> property in column definition objects passed to {@link Ext.grid.ColumnModel}.
+     * <p>Note: In the simplest case, if no properties other than <tt>name</tt> are required, a field
+     * definition may consist of just a String for the field name.</p>
+     */
+    /**
+     * @cfg {String} type
+     * (Optional) The data type for conversion to displayable value if <tt>{@link Ext.data.Field#convert convert}</tt>
+     * has not been specified. Possible values are
+     * <div class="mdetail-params"><ul>
+     * <li>auto (Default, implies no conversion)</li>
+     * <li>string</li>
+     * <li>int</li>
+     * <li>float</li>
+     * <li>boolean</li>
+     * <li>date</li></ul></div>
+     */
+    /**
+     * @cfg {Function} convert
+     * (Optional) A function which converts the value provided by the Reader into an object that will be stored
+     * in the Record. It is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><b>v</b> : Mixed<div class="sub-desc">The data value as read by the Reader, if undefined will use
+     * the configured <tt>{@link Ext.data.Field#defaultValue defaultValue}</tt>.</div></li>
+     * <li><b>rec</b> : Mixed<div class="sub-desc">The data object containing the row as read by the Reader.
+     * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object
+     *  ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).</div></li>
+     * </ul></div>
+     * <pre><code>
+// example of convert function
+function fullName(v, record){
+    return record.name.last + ', ' + record.name.first;
+}
+
+function location(v, record){
+    return !record.city ? '' : (record.city + ', ' + record.state);
+}
+
+var Dude = Ext.data.Record.create([
+    {name: 'fullname',  convert: fullName},
+    {name: 'firstname', mapping: 'name.first'},
+    {name: 'lastname',  mapping: 'name.last'},
+    {name: 'city', defaultValue: 'homeless'},
+    'state',
+    {name: 'location',  convert: location}
+]);
+
+// create the data store
+var store = new Ext.data.Store({
+    reader: new Ext.data.JsonReader(
+        {
+            idProperty: 'key',
+            root: 'daRoot',  
+            totalProperty: 'total'
+        },
+        Dude  // recordType
+    )
+});
+
+var myData = [
+    { key: 1,
+      name: { first: 'Fat',    last:  'Albert' }
+      // notice no city, state provided in data object
+    },
+    { key: 2,
+      name: { first: 'Barney', last:  'Rubble' },
+      city: 'Bedrock', state: 'Stoneridge'
+    },
+    { key: 3,
+      name: { first: 'Cliff',  last:  'Claven' },
+      city: 'Boston',  state: 'MA'
+    }
+];
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} dateFormat
+     * (Optional) A format string for the {@link Date#parseDate Date.parseDate} function, or "timestamp" if the
+     * value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a
+     * javascript millisecond timestamp.
+     */
+    dateFormat: null,
+    /**
+     * @cfg {Mixed} defaultValue
+     * (Optional) The default value used <b>when a Record is being created by a {@link Ext.data.Reader Reader}</b>
+     * when the item referenced by the <tt>{@link Ext.data.Field#mapping mapping}</tt> does not exist in the data
+     * object (i.e. undefined). (defaults to "")
+     */
+    defaultValue: "",
+    /**
+     * @cfg {String/Number} mapping
+     * <p>(Optional) A path expression for use by the {@link Ext.data.DataReader} implementation
+     * that is creating the {@link Ext.data.Record Record} to extract the Field value from the data object.
+     * If the path expression is the same as the field name, the mapping may be omitted.</p>
+     * <p>The form of the mapping expression depends on the Reader being used.</p>
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.data.JsonReader}<div class="sub-desc">The mapping is a string containing the javascript
+     * expression to reference the data from an element of the data item's {@link Ext.data.JsonReader#root root} Array. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.XmlReader}<div class="sub-desc">The mapping is an {@link Ext.DomQuery} path to the data
+     * item relative to the DOM element that represents the {@link Ext.data.XmlReader#record record}. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.ArrayReader}<div class="sub-desc">The mapping is a number indicating the Array index
+     * of the field's value. Defaults to the field specification's Array position.</div></li>
+     * </ul></div>
+     * <p>If a more complex value extraction strategy is required, then configure the Field with a {@link #convert}
+     * function. This is passed the whole row object, and may interrogate it in whatever way is necessary in order to
+     * return the desired data.</p>
+     */
+    mapping: null,
+    /**
+     * @cfg {Function} sortType
+     * (Optional) A function which converts a Field's value to a comparable value in order to ensure
+     * correct sort ordering. Predefined functions are provided in {@link Ext.data.SortTypes}. A custom
+     * sort example:<pre><code>
+// current sort     after sort we want
+// +-+------+          +-+------+
+// |1|First |          |1|First |
+// |2|Last  |          |3|Second|
+// |3|Second|          |2|Last  |
+// +-+------+          +-+------+
+
+sortType: function(value) {
+   switch (value.toLowerCase()) // native toLowerCase():
+   {
+      case 'first': return 1;
+      case 'second': return 2;
+      default: return 3;
+   }
+}
+     * </code></pre>
+     */
+    sortType : null,
+    /**
+     * @cfg {String} sortDir
+     * (Optional) Initial direction to sort (<tt>"ASC"</tt> or  <tt>"DESC"</tt>).  Defaults to
+     * <tt>"ASC"</tt>.
+     */
+    sortDir : "ASC",
+	/**
+	 * @cfg {Boolean} allowBlank 
+	 * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to <tt>true</tt>.
+	 * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid}
+	 * to evaluate to <tt>false</tt>.
+	 */
+	allowBlank : true
+};/**
+ * @class Ext.data.DataReader
+ * Abstract base class for reading structured data from a data source and converting
+ * it into an object containing {@link Ext.data.Record} objects and metadata for use
+ * by an {@link Ext.data.Store}.  This class is intended to be extended and should not
+ * be created directly. For existing implementations, see {@link Ext.data.ArrayReader},
+ * {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader}.
+ * @constructor Create a new DataReader
+ * @param {Object} meta Metadata configuration options (implementation-specific).
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created using {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.DataReader = function(meta, recordType){
+    /**
+     * This DataReader's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    this.meta = meta;
+    /**
+     * @cfg {Array/Object} fields
+     * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+     * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+     * constructor created from {@link Ext.data.Record#create}.</p>
+     */
+    this.recordType = Ext.isArray(recordType) ?
+        Ext.data.Record.create(recordType) : recordType;
+};
+
+Ext.data.DataReader.prototype = {
+
+    /**
+     * Abstract method, overridden in {@link Ext.data.JsonReader}
+     */
+    buildExtractors : Ext.emptyFn,
+
+    /**
+     * Used for un-phantoming a record after a successful database insert.  Sets the records pk along with new data from server.
+     * You <b>must</b> return at least the database pk using the idProperty defined in your DataReader configuration.  The incoming
+     * data from server will be merged with the data in the local record.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed.
+     * @param {Record/Record[]} record The phantom record to be realized.
+     * @param {Object/Object[]} data The new record data to apply.  Must include the primary-key from database defined in idProperty field.
+     */
+    realize: function(rs, data){
+        if (Ext.isArray(rs)) {
+            for (var i = rs.length - 1; i >= 0; i--) {
+                // recurse
+                if (Ext.isArray(data)) {
+                    this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole invalid data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.realize(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+            // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: Let exception-handler choose to commit or not rather than blindly rs.commit() here.
+                //rs.commit();
+                throw new Ext.data.DataReader.Error('realize', rs);
+            }
+            this.buildExtractors();
+            var values = this.extractValues(data, rs.fields.items, rs.fields.items.length);
+            rs.phantom = false; // <-- That's what it's all about
+            rs._phid = rs.id;  // <-- copy phantom-id -> _phid, so we can remap in Store#onCreateRecords
+            rs.id = data[this.meta.idProperty];
+            rs.data = values;
+            rs.commit();
+        }
+    },
+
+    /**
+     * Used for updating a non-phantom or "real" record's data with fresh data from server after remote-save.
+     * You <b>must</b> return a complete new record from the server.  If you don't, your local record's missing fields
+     * will be populated with the default values specified in your Ext.data.Record.create specification.  Without a defaultValue,
+     * local fields will be populated with empty string "".  So return your entire record's data after both remote create and update.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed as the record receives
+     * a fresh new data-hash.
+     * @param {Record/Record[]} rs
+     * @param {Object/Object[]} data
+     */
+    update : function(rs, data) {
+        if (Ext.isArray(rs)) {
+            for (var i=rs.length-1; i >= 0; i--) {
+                if (Ext.isArray(data)) {
+                    this.update(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.update(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+                     // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: create custom Exception class to return record in thrown exception.  Allow exception-handler the choice
+                // to commit or not rather than blindly rs.commit() here.
+                rs.commit();
+                throw new Ext.data.DataReader.Error('update', rs);
+            }
+            this.buildExtractors();
+            rs.data = this.extractValues(Ext.apply(rs.data, data), rs.fields.items, rs.fields.items.length);
+            rs.commit();
+        }
+    },
+
+    /**
+     * Returns true if the supplied data-hash <b>looks</b> and quacks like data.  Checks to see if it has a key
+     * corresponding to idProperty defined in your DataReader config containing non-empty pk.
+     * @param {Object} data
+     * @return {Boolean}
+     */
+    isData : function(data) {
+        return (data && Ext.isObject(data) && !Ext.isEmpty(data[this.meta.idProperty])) ? true : false;
+    }
+};
+
+/**
+ * @class Ext.data.DataReader.Error
+ * @extends Ext.Error
+ * General error class for Ext.data.DataReader
+ */
+Ext.data.DataReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataReader'
+});
+Ext.apply(Ext.data.DataReader.Error.prototype, {
+    lang : {
+        'update': "#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",
+        'realize': "#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.",
+        'invalid-response': "#readResponse received an invalid response from the server."
+    }
+});
+
+
+/**
+ * @class Ext.data.DataWriter
+ * <p>Ext.data.DataWriter facilitates create, update, and destroy actions between
+ * an Ext.data.Store and a server-side framework. A Writer enabled Store will
+ * automatically manage the Ajax requests to perform CRUD actions on a Store.</p>
+ * <p>Ext.data.DataWriter is an abstract base class which is intended to be extended
+ * and should not be created directly. For existing implementations, see
+ * {@link Ext.data.JsonWriter}.</p>
+ * <p>Creating a writer is simple:</p>
+ * <pre><code>
+var writer = new Ext.data.JsonWriter();
+ * </code></pre>
+ * <p>The proxy for a writer enabled store can be configured with a simple <code>url</code>:</p>
+ * <pre><code>
+// Create a standard HttpProxy instance.
+var proxy = new Ext.data.HttpProxy({
+    url: 'app.php/users'
+});
+ * </code></pre>
+ * <p>For finer grained control, the proxy may also be configured with an <code>api</code>:</p>
+ * <pre><code>
+// Use the api specification
+var proxy = new Ext.data.HttpProxy({
+    api: {
+        read    : 'app.php/users/read',
+        create  : 'app.php/users/create',
+        update  : 'app.php/users/update',
+        destroy : 'app.php/users/destroy'
+    }
+});
+ * </code></pre>
+ * <p>Creating a Writer enabled store:</p>
+ * <pre><code>
+var store = new Ext.data.Store({
+    proxy: proxy,
+    reader: reader,
+    writer: writer
+});
+ * </code></pre>
+ * @constructor Create a new DataWriter
+ * @param {Object} meta Metadata configuration options (implementation-specific)
+ * @param {Object} recordType Either an Array of field definition objects as specified
+ * in {@link Ext.data.Record#create}, or an {@link Ext.data.Record} object created
+ * using {@link Ext.data.Record#create}.
+ */
+Ext.data.DataWriter = function(config){
+    /**
+     * This DataWriter's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    Ext.apply(this, config);
+};
+
+Ext.data.DataWriter.prototype = {
+
+    /**
+     * @cfg {Boolean} writeAllFields
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have DataWriter return ALL fields of a modified
+     * record -- not just those that changed.
+     * <tt>false</tt> to have DataWriter only request modified fields from a record.
+     */
+    writeAllFields : false,
+    /**
+     * @cfg {Boolean} listful
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have the DataWriter <b>always</b> write HTTP params as a list,
+     * even when acting upon a single record.
+     */
+    listful : false,    // <-- listful is actually not used internally here in DataWriter.  @see Ext.data.Store#execute.
+
+    /**
+     * Writes data in preparation for server-write action.  Simply proxies to DataWriter#update, DataWriter#create
+     * DataWriter#destroy.
+     * @param {String} action [CREATE|UPDATE|DESTROY]
+     * @param {Object} params The params-hash to write-to
+     * @param {Record/Record[]} rs The recordset write.
+     */
+    write : function(action, params, rs) {
+        this.render(action, rs, params, this[action](rs));
+    },
+
+    /**
+     * abstract method meant to be overridden by all DataWriter extensions.  It's the extension's job to apply the "data" to the "params".
+     * The data-object provided to render is populated with data according to the meta-info defined in the user's DataReader config,
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs Store recordset
+     * @param {Object} params Http params to be sent to server.
+     * @param {Object} data object populated according to DataReader meta-data.
+     */
+    render : Ext.emptyFn,
+
+    /**
+     * update
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    update : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                ids.push(val.id);
+                data.push(this.updateRecord(val));
+            }, this);
+            params[this.meta.idProperty] = ids;
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.idProperty] = rs.id;
+            params[this.meta.root] = this.updateRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} saveRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#saveRecord JsonWriter.saveRecord}
+     */
+    updateRecord : Ext.emptyFn,
+
+    /**
+     * create
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    create : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [];
+            Ext.each(rs, function(val){
+                data.push(this.createRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.createRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} createRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#createRecord JsonWriter.createRecord})
+     */
+    createRecord : Ext.emptyFn,
+
+    /**
+     * destroy
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    destroy : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                data.push(this.destroyRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        } else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.destroyRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} destroyRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#destroyRecord JsonWriter.destroyRecord})
+     */
+    destroyRecord : Ext.emptyFn,
+
+    /**
+     * Converts a Record to a hash
+     * @param {Record}
+     * @private
+     */
+    toHash : function(rec) {
+        var map = rec.fields.map,
+            data = {},
+            raw = (this.writeAllFields === false && rec.phantom === false) ? rec.getChanges() : rec.data,
+            m;
+        Ext.iterate(raw, function(prop, value){
+            if((m = map[prop])){
+                data[m.mapping ? m.mapping : m.name] = value;
+            }
+        });
+        data[this.meta.idProperty] = rec.id;
+        return data;
+    }
+};/**
+ * @class Ext.data.DataProxy
+ * @extends Ext.util.Observable
+ * <p>Abstract base class for implementations which provide retrieval of unformatted data objects.
+ * This class is intended to be extended and should not be created directly. For existing implementations,
+ * see {@link Ext.data.DirectProxy}, {@link Ext.data.HttpProxy}, {@link Ext.data.ScriptTagProxy} and
+ * {@link Ext.data.MemoryProxy}.</p>
+ * <p>DataProxy implementations are usually used in conjunction with an implementation of {@link Ext.data.DataReader}
+ * (of the appropriate type which knows how to parse the data object) to provide a block of
+ * {@link Ext.data.Records} to an {@link Ext.data.Store}.</p>
+ * <p>The parameter to a DataProxy constructor may be an {@link Ext.data.Connection} or can also be the
+ * config object to an {@link Ext.data.Connection}.</p>
+ * <p>Custom implementations must implement either the <code><b>doRequest</b></code> method (preferred) or the
+ * <code>load</code> method (deprecated). See
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#doRequest doRequest} or
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#load load} for additional details.</p>
+ * <p><b><u>Example 1</u></b></p>
+ * <pre><code>
+proxy: new Ext.data.ScriptTagProxy({
+    {@link Ext.data.Connection#url url}: 'http://extjs.com/forum/topics-remote.php'
+}),
+ * </code></pre>
+ * <p><b><u>Example 2</u></b></p>
+ * <pre><code>
+proxy : new Ext.data.HttpProxy({
+    {@link Ext.data.Connection#method method}: 'GET',
+    {@link Ext.data.HttpProxy#prettyUrls prettyUrls}: false,
+    {@link Ext.data.Connection#url url}: 'local/default.php', // see options parameter for {@link Ext.Ajax#request}
+    {@link #api}: {
+        // all actions except the following will use above url
+        create  : 'local/new.php',
+        update  : 'local/update.php'
+    }
+}),
+ * </code></pre>
+ */
+Ext.data.DataProxy = function(conn){
+    // make sure we have a config object here to support ux proxies.
+    // All proxies should now send config into superclass constructor.
+    conn = conn || {};
+
+    // This line caused a bug when people use custom Connection object having its own request method.
+    // http://extjs.com/forum/showthread.php?t=67194.  Have to set DataProxy config
+    //Ext.applyIf(this, conn);
+
+    this.api     = conn.api;
+    this.url     = conn.url;
+    this.restful = conn.restful;
+    this.listeners = conn.listeners;
+
+    // deprecated
+    this.prettyUrls = conn.prettyUrls;
+
+    /**
+     * @cfg {Object} api
+     * Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
+     * Defaults to:<pre><code>
+api: {
+    read    : undefined,
+    create  : undefined,
+    update  : undefined,
+    destroy : undefined
+}
+</code></pre>
+     * <p>If the specific URL for a given CRUD action is undefined, the CRUD action request
+     * will be directed to the configured <tt>{@link Ext.data.Connection#url url}</tt>.</p>
+     * <br><p><b>Note</b>: To modify the URL for an action dynamically the appropriate API
+     * property should be modified before the action is requested using the corresponding before
+     * action event.  For example to modify the URL associated with the load action:
+     * <pre><code>
+// modify the url for the action
+myStore.on({
+    beforeload: {
+        fn: function (store, options) {
+            // use <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> to change the URL for *just* this request.
+            store.proxy.setUrl('changed1.php');
+
+            // set optional second parameter to true to make this URL change
+            // permanent, applying this URL for all subsequent requests.
+            store.proxy.setUrl('changed1.php', true);
+
+            // manually set the <b>private</b> connection URL.
+            // <b>Warning:</b>  Accessing the private URL property should be avoided.
+            // Use the public method <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> instead, shown above.
+            // It should be noted that changing the URL like this will affect
+            // the URL for just this request.  Subsequent requests will use the
+            // API or URL defined in your initial proxy configuration.
+            store.proxy.conn.url = 'changed1.php';
+
+            // proxy URL will be superseded by API (only if proxy created to use ajax):
+            // It should be noted that proxy API changes are permanent and will
+            // be used for all subsequent requests.
+            store.proxy.api.load = 'changed2.php';
+
+            // However, altering the proxy API should be done using the public
+            // method <tt>{@link Ext.data.DataProxy#setApi setApi}</tt> instead.
+            store.proxy.setApi('load', 'changed2.php');
+
+            // Or set the entire API with a config-object.
+            // When using the config-object option, you must redefine the <b>entire</b>
+            // API -- not just a specific action of it.
+            store.proxy.setApi({
+                read    : 'changed_read.php',
+                create  : 'changed_create.php',
+                update  : 'changed_update.php',
+                destroy : 'changed_destroy.php'
+            });
+        }
+    }
+});
+     * </code></pre>
+     * </p>
+     */
+    // Prepare the proxy api.  Ensures all API-actions are defined with the Object-form.
+    try {
+        Ext.data.Api.prepare(this);
+    } catch (e) {
+        if (e instanceof Ext.data.Api.Error) {
+            e.toConsole();
+        }
+    }
+
+    this.addEvents(
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through a corresponding
+         * {@link Ext.data.Store}.{@link Ext.data.Store#exception exception},
+         * so any Store instance may observe this event.
+         * This event can be fired for one of two reasons:</p>
+         * <div class="mdetail-params"><ul>
+         * <li>remote-request <b>failed</b> : <div class="sub-desc">
+         * The server did not return status === 200.
+         * </div></li>
+         * <li>remote-request <b>succeeded</b> : <div class="sub-desc">
+         * The remote-request succeeded but the reader could not read the response.
+         * This means the server returned data, but the configured Reader threw an
+         * error while reading the response.  In this case, this event will be
+         * raised and the caught error will be passed along into this event.
+         * </div></li>
+         * </ul></div>
+         * <br><p>This event fires with two different contexts based upon the 2nd
+         * parameter <tt>type [remote|response]</tt>.  The first four parameters
+         * are identical between the two contexts -- only the final two parameters
+         * differ.</p>
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} type
+         * <p>The value of this parameter will be either <tt>'response'</tt> or <tt>'remote'</tt>.</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>An <b>invalid</b> response from the server was returned: either 404,
+         * 500 or the response meta-data does not match that defined in the DataReader
+         * (e.g.: root, idProperty, successProperty).</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>A <b>valid</b> response was returned from the server having
+         * successProperty === false.  This response might contain an error-message
+         * sent from the server.  For example, the user may have failed
+         * authentication/authorization or a database validation error occurred.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {String} action Name of the action (see {@link Ext.data.Api#actions}.
+         * @param {Object} options The options for the action that were specified in the {@link #request}.
+         * @param {Object} response
+         * <p>The value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>The raw browser response object (e.g.: XMLHttpRequest)</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>The decoded response object sent from the server.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {Mixed} arg
+         * <p>The type and value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : Error<div class="sub-desc">
+         * <p>The JavaScript Error object caught if the configured Reader could not read the data.
+         * If the remote request returns success===false, this parameter will be null.</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : Record/Record[]<div class="sub-desc">
+         * <p>This parameter will only exist if the <tt>action</tt> was a <b>write</b> action
+         * (Ext.data.Api.actions.create|update|destroy).</p>
+         * </div></li>
+         * </ul></div>
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request to retrieve a data object.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} params The params object passed to the {@link #request} function
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires before the load method's callback is called.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} o The request transaction object
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b>.  The signature of the loadexception event
+         * varies depending on the proxy, use the catch-all {@link #exception} event instead.
+         * This event will fire in addition to the {@link #exception} event.</p>
+         * @param {misc} misc See {@link #exception}.
+         * @deprecated
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy
+         * @param {DataProxy} this The proxy for the request
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs The Record(s) to create|update|destroy.
+         * @param {Object} params The request <code>params</code> object.  Edit <code>params</code> to add parameters to the request.
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires before the request-callback is called
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} action [Ext.data.Api.actions.create|upate|destroy]
+         * @param {Object} data The data object extracted from the server-response
+         * @param {Object} response The decoded response from server
+         * @param {Record/Record{}} rs The records from Store
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'write'
+    );
+    Ext.data.DataProxy.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>Defaults to <tt>false</tt>.  Set to <tt>true</tt> to operate in a RESTful manner.</p>
+     * <br><p> Note: this parameter will automatically be set to <tt>true</tt> if the
+     * {@link Ext.data.Store} it is plugged into is set to <code>restful: true</code>. If the
+     * Store is RESTful, there is no need to set this option on the proxy.</p>
+     * <br><p>RESTful implementations enable the serverside framework to automatically route
+     * actions sent to one url based upon the HTTP method, for example:
+     * <pre><code>
+store: new Ext.data.Store({
+    restful: true,
+    proxy: new Ext.data.HttpProxy({url:'/users'}); // all requests sent to /users
+    ...
+)}
+     * </code></pre>
+     * There is no <code>{@link #api}</code> specified in the configuration of the proxy,
+     * all requests will be marshalled to a single RESTful url (/users) so the serverside
+     * framework can inspect the HTTP Method and act accordingly:
+     * <pre>
+<u>Method</u>   <u>url</u>        <u>action</u>
+POST     /users     create
+GET      /users     read
+PUT      /users/23  update
+DESTROY  /users/23  delete
+     * </pre></p>
+     */
+    restful: false,
+
+    /**
+     * <p>Redefines the Proxy's API or a single action of an API. Can be called with two method signatures.</p>
+     * <p>If called with an object as the only parameter, the object should redefine the <b>entire</b> API, e.g.:</p><pre><code>
+proxy.setApi({
+    read    : '/users/read',
+    create  : '/users/create',
+    update  : '/users/update',
+    destroy : '/users/destroy'
+});
+</code></pre>
+     * <p>If called with two parameters, the first parameter should be a string specifying the API action to
+     * redefine and the second parameter should be the URL (or function if using DirectProxy) to call for that action, e.g.:</p><pre><code>
+proxy.setApi(Ext.data.Api.actions.read, '/users/new_load_url');
+</code></pre>
+     * @param {String/Object} api An API specification object, or the name of an action.
+     * @param {String/Function} url The URL (or function if using DirectProxy) to call for the action.
+     */
+    setApi : function() {
+        if (arguments.length == 1) {
+            var valid = Ext.data.Api.isValid(arguments[0]);
+            if (valid === true) {
+                this.api = arguments[0];
+            }
+            else {
+                throw new Ext.data.Api.Error('invalid', valid);
+            }
+        }
+        else if (arguments.length == 2) {
+            if (!Ext.data.Api.isAction(arguments[0])) {
+                throw new Ext.data.Api.Error('invalid', arguments[0]);
+            }
+            this.api[arguments[0]] = arguments[1];
+        }
+        Ext.data.Api.prepare(this);
+    },
+
+    /**
+     * Returns true if the specified action is defined as a unique action in the api-config.
+     * request.  If all API-actions are routed to unique urls, the xaction parameter is unecessary.  However, if no api is defined
+     * and all Proxy actions are routed to DataProxy#url, the server-side will require the xaction parameter to perform a switch to
+     * the corresponding code for CRUD action.
+     * @param {String [Ext.data.Api.CREATE|READ|UPDATE|DESTROY]} action
+     * @return {Boolean}
+     */
+    isApiAction : function(action) {
+        return (this.api[action]) ? true : false;
+    },
+
+    /**
+     * All proxy actions are executed through this method.  Automatically fires the "before" + action event
+     * @param {String} action Name of the action
+     * @param {Ext.data.Record/Ext.data.Record[]/null} rs Will be null when action is 'load'
+     * @param {Object} params
+     * @param {Ext.data.DataReader} reader
+     * @param {Function} callback
+     * @param {Object} scope Scope with which to call the callback (defaults to the Proxy object)
+     * @param {Object} options Any options specified for the action (e.g. see {@link Ext.data.Store#load}.
+     */
+    request : function(action, rs, params, reader, callback, scope, options) {
+        if (!this.api[action] && !this.load) {
+            throw new Ext.data.DataProxy.Error('action-undefined', action);
+        }
+        params = params || {};
+        if ((action === Ext.data.Api.actions.read) ? this.fireEvent("beforeload", this, params) : this.fireEvent("beforewrite", this, action, rs, params) !== false) {
+            this.doRequest.apply(this, arguments);
+        }
+        else {
+            callback.call(scope || this, null, options, false);
+        }
+    },
+
+
+    /**
+     * <b>Deprecated</b> load method using old method signature. See {@doRequest} for preferred method.
+     * @deprecated
+     * @param {Object} params
+     * @param {Object} reader
+     * @param {Object} callback
+     * @param {Object} scope
+     * @param {Object} arg
+     */
+    load : null,
+
+    /**
+     * @cfg {Function} doRequest Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest},
+     * {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}).
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        // default implementation of doRequest for backwards compatibility with 2.0 proxies.
+        // If we're executing here, the action is probably "load".
+        // Call with the pre-3.0 method signature.
+        this.load(params, reader, callback, scope, options);
+    },
+
+    /**
+     * buildUrl
+     * Sets the appropriate url based upon the action being executed.  If restful is true, and only a single record is being acted upon,
+     * url will be built Rails-style, as in "/controller/action/32".  restful will aply iff the supplied record is an
+     * instance of Ext.data.Record rather than an Array of them.
+     * @param {String} action The api action being executed [read|create|update|destroy]
+     * @param {Ext.data.Record/Array[Ext.data.Record]} The record or Array of Records being acted upon.
+     * @return {String} url
+     * @private
+     */
+    buildUrl : function(action, record) {
+        record = record || null;
+        var url = (this.api[action]) ? this.api[action].url : this.url;
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', action);
+        }
+
+        var format = null;
+        var m = url.match(/(.*)(\.\w+)$/);  // <-- look for urls with "provides" suffix, e.g.: /users.json, /users.xml, etc
+        if (m) {
+            format = m[2];
+            url = m[1];
+        }
+        // prettyUrls is deprectated in favor of restful-config
+        if ((this.prettyUrls === true || this.restful === true) && record instanceof Ext.data.Record && !record.phantom) {
+            url += '/' + record.id;
+        }
+        if (format) {   // <-- append the request format if exists (ie: /users/update/69[.json])
+            url += format;
+        }
+        return url;
+    },
+
+    /**
+     * Destroys the proxy by purging any event listeners and cancelling any active requests.
+     */
+    destroy: function(){
+        this.purgeListeners();
+    }
+});
+
+/**
+ * @class Ext.data.DataProxy.Error
+ * @extends Ext.Error
+ * DataProxy Error extension.
+ * constructor
+ * @param {String} name
+ * @param {Record/Array[Record]/Array}
+ */
+Ext.data.DataProxy.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataProxy'
+});
+Ext.apply(Ext.data.DataProxy.Error.prototype, {
+    lang: {
+        'action-undefined': "DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.",
+        'api-invalid': 'Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions.'
+    }
+});
+/**
+ * @class Ext.data.ScriptTagProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain
+ * other than the originating domain of the running page.<br>
+ * <p>
+ * <b>Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain
+ * of the running page, you must use this class, rather than HttpProxy.</b><br>
+ * <p>
+ * The content passed back from a server resource requested by a ScriptTagProxy <b>must</b> be executable JavaScript
+ * source code because it is used as the source inside a &lt;script> tag.<br>
+ * <p>
+ * In order for the browser to process the returned data, the server must wrap the data object
+ * with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy.
+ * Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy
+ * depending on whether the callback name was passed:
+ * <p>
+ * <pre><code>
+boolean scriptTag = false;
+String cb = request.getParameter("callback");
+if (cb != null) {
+    scriptTag = true;
+    response.setContentType("text/javascript");
+} else {
+    response.setContentType("application/x-json");
+}
+Writer out = response.getWriter();
+if (scriptTag) {
+    out.write(cb + "(");
+}
+out.print(dataBlock.toJsonString());
+if (scriptTag) {
+    out.write(");");
+}
+</code></pre>
+ *
+ * @constructor
+ * @param {Object} config A configuration object.
+ */
+Ext.data.ScriptTagProxy = function(config){
+    Ext.apply(this, config);
+
+    Ext.data.ScriptTagProxy.superclass.constructor.call(this, config);
+
+    this.head = document.getElementsByTagName("head")[0];
+
+    /**
+     * @event loadexception
+     * <b>Deprecated</b> in favor of 'exception' event.
+     * Fires if an exception occurs in the Proxy during data loading.  This event can be fired for one of two reasons:
+     * <ul><li><b>The load call timed out.</b>  This means the load callback did not execute within the time limit
+     * specified by {@link #timeout}.  In this case, this event will be raised and the
+     * fourth parameter (read error) will be null.</li>
+     * <li><b>The load succeeded but the reader could not read the response.</b>  This means the server returned
+     * data, but the configured Reader threw an error while reading the data.  In this case, this event will be
+     * raised and the caught error will be passed along as the fourth parameter of this event.</li></ul>
+     * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly
+     * on any Store instance.
+     * @param {Object} this
+     * @param {Object} options The loading options that were specified (see {@link #load} for details).  If the load
+     * call timed out, this parameter will be null.
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data.
+     * If the remote request returns success: false, this parameter will be null.
+     */
+};
+
+Ext.data.ScriptTagProxy.TRANS_ID = 1000;
+
+Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {String} url The URL from which to request the data object.
+     */
+    /**
+     * @cfg {Number} timeout (optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
+     */
+    timeout : 30000,
+    /**
+     * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells
+     * the server the name of the callback function set up by the load call to process the returned data object.
+     * Defaults to "callback".<p>The server-side processing must read this parameter value, and generate
+     * javascript output which calls this named function passing the data object as its only parameter.
+     */
+    callbackParam : "callback",
+    /**
+     *  @cfg {Boolean} nocache (optional) Defaults to true. Disable caching by adding a unique parameter
+     * name to the request.
+     */
+    nocache : true,
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is <tt>read</tt>, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        var p = Ext.urlEncode(Ext.apply(params, this.extraParams));
+
+        var url = this.buildUrl(action, rs);
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', url);
+        }
+        url = Ext.urlAppend(url, p);
+
+        if(this.nocache){
+            url = Ext.urlAppend(url, '_dc=' + (new Date().getTime()));
+        }
+        var transId = ++Ext.data.ScriptTagProxy.TRANS_ID;
+        var trans = {
+            id : transId,
+            action: action,
+            cb : "stcCallback"+transId,
+            scriptId : "stcScript"+transId,
+            params : params,
+            arg : arg,
+            url : url,
+            callback : callback,
+            scope : scope,
+            reader : reader
+        };
+        window[trans.cb] = this.createCallback(action, rs, trans);
+        url += String.format("&{0}={1}", this.callbackParam, trans.cb);
+        if(this.autoAbort !== false){
+            this.abort();
+        }
+
+        trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]);
+
+        var script = document.createElement("script");
+        script.setAttribute("src", url);
+        script.setAttribute("type", "text/javascript");
+        script.setAttribute("id", trans.scriptId);
+        this.head.appendChild(script);
+
+        this.trans = trans;
+    },
+
+    // @private createCallback
+    createCallback : function(action, rs, trans) {
+        var self = this;
+        return function(res) {
+            self.trans = false;
+            self.destroyTrans(trans, true);
+            if (action === Ext.data.Api.actions.read) {
+                self.onRead.call(self, action, trans, res);
+            } else {
+                self.onWrite.call(self, action, trans, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, res) {
+        var result;
+        try {
+            result = trans.reader.readRecords(res);
+        }catch(e){
+            // @deprecated: fire loadexception
+            this.fireEvent("loadexception", this, trans, res, e);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, trans.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, trans, res);
+
+            this.fireEvent('exception', this, 'remote', action, trans, res, null);
+        } else {
+            this.fireEvent("load", this, res, trans.arg);
+        }
+        trans.callback.call(trans.scope||window, result, trans.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, res, rs) {
+        var reader = trans.reader;
+        try {
+            // though we already have a response object here in STP, run through readResponse to catch any meta-data exceptions.
+            reader.readResponse(action, res);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        if(!res[reader.meta.successProperty] === true){
+            this.fireEvent('exception', this, 'remote', action, trans, res, rs);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        this.fireEvent("write", this, action, res[reader.meta.root], res, rs, trans.arg );
+        trans.callback.call(trans.scope||window, res[reader.meta.root], res, true);
+    },
+
+    // private
+    isLoading : function(){
+        return this.trans ? true : false;
+    },
+
+    /**
+     * Abort the current server request.
+     */
+    abort : function(){
+        if(this.isLoading()){
+            this.destroyTrans(this.trans);
+        }
+    },
+
+    // private
+    destroyTrans : function(trans, isLoaded){
+        this.head.removeChild(document.getElementById(trans.scriptId));
+        clearTimeout(trans.timeoutId);
+        if(isLoaded){
+            window[trans.cb] = undefined;
+            try{
+                delete window[trans.cb];
+            }catch(e){}
+        }else{
+            // if hasn't been loaded, wait for load to remove it to prevent script error
+            window[trans.cb] = function(){
+                window[trans.cb] = undefined;
+                try{
+                    delete window[trans.cb];
+                }catch(e){}
+            };
+        }
+    },
+
+    // private
+    handleFailure : function(trans){
+        this.trans = false;
+        this.destroyTrans(trans, false);
+        if (trans.action === Ext.data.Api.actions.read) {
+            // @deprecated firing loadexception
+            this.fireEvent("loadexception", this, null, trans.arg);
+        }
+
+        this.fireEvent('exception', this, 'response', trans.action, {
+            response: null,
+            options: trans.arg
+        });
+        trans.callback.call(trans.scope||window, null, trans.arg, false);
+    },
+
+    // inherit docs
+    destroy: function(){
+        this.abort();
+        Ext.data.ScriptTagProxy.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.data.HttpProxy
+ * @extends Ext.data.DataProxy
+ * <p>An implementation of {@link Ext.data.DataProxy} that processes data requests within the same
+ * domain of the originating page.</p>
+ * <p><b>Note</b>: this class cannot be used to retrieve data from a domain other
+ * than the domain from which the running page was served. For cross-domain requests, use a
+ * {@link Ext.data.ScriptTagProxy ScriptTagProxy}.</p>
+ * <p>Be aware that to enable the browser to parse an XML document, the server must set
+ * the Content-Type header in the HTTP response to "<tt>text/xml</tt>".</p>
+ * @constructor
+ * @param {Object} conn
+ * An {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}.
+ * <p>Note that if this HttpProxy is being used by a (@link Ext.data.Store Store}, then the
+ * Store's call to {@link #load} will override any specified <tt>callback</tt> and <tt>params</tt>
+ * options. In this case, use the Store's {@link Ext.data.Store#events events} to modify parameters,
+ * or react to loading events. The Store's {@link Ext.data.Store#baseParams baseParams} may also be
+ * used to pass parameters known at instantiation time.</p>
+ * <p>If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make
+ * the request.</p>
+ */
+Ext.data.HttpProxy = function(conn){
+    Ext.data.HttpProxy.superclass.constructor.call(this, conn);
+
+    /**
+     * The Connection object (Or options parameter to {@link Ext.Ajax#request}) which this HttpProxy
+     * uses to make requests to the server. Properties of this object may be changed dynamically to
+     * change the way data is requested.
+     * @property
+     */
+    this.conn = conn;
+
+    // nullify the connection url.  The url param has been copied to 'this' above.  The connection
+    // url will be set during each execution of doRequest when buildUrl is called.  This makes it easier for users to override the
+    // connection url during beforeaction events (ie: beforeload, beforesave, etc).  The connection url will be nullified
+    // after each request as well.  Url is always re-defined during doRequest.
+    this.conn.url = null;
+
+    this.useAjax = !conn || !conn.events;
+
+    //private.  A hash containing active requests, keyed on action [Ext.data.Api.actions.create|read|update|destroy]
+    var actions = Ext.data.Api.actions;
+    this.activeRequest = {};
+    for (var verb in actions) {
+        this.activeRequest[actions[verb]] = undefined;
+    }
+};
+
+Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>If set to <tt>true</tt>, a {@link Ext.data.Record#phantom non-phantom} record's
+     * {@link Ext.data.Record#id id} will be appended to the url (defaults to <tt>false</tt>).</p><br>
+     * <p>The url is built based upon the action being executed <tt>[load|create|save|destroy]</tt>
+     * using the commensurate <tt>{@link #api}</tt> property, or if undefined default to the
+     * configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.</p><br>
+     * <p>Some MVC (e.g., Ruby on Rails, Merb and Django) support this style of segment based urls
+     * where the segments in the URL follow the Model-View-Controller approach.</p><pre><code>
+     * someSite.com/controller/action/id
+     * </code></pre>
+     * Where the segments in the url are typically:<div class="mdetail-params"><ul>
+     * <li>The first segment : represents the controller class that should be invoked.</li>
+     * <li>The second segment : represents the class function, or method, that should be called.</li>
+     * <li>The third segment : represents the ID (a variable typically passed to the method).</li>
+     * </ul></div></p>
+     * <p>For example:</p>
+     * <pre><code>
+api: {
+    load :    '/controller/load',
+    create :  '/controller/new',  // Server MUST return idProperty of new record
+    save :    '/controller/update',
+    destroy : '/controller/destroy_action'
+}
+
+// Alternatively, one can use the object-form to specify each API-action
+api: {
+    load: {url: 'read.php', method: 'GET'},
+    create: 'create.php',
+    destroy: 'destroy.php',
+    save: 'update.php'
+}
+     */
+
+    /**
+     * Return the {@link Ext.data.Connection} object being used by this Proxy.
+     * @return {Connection} The Connection object. This object may be used to subscribe to events on
+     * a finer-grained basis than the DataProxy events.
+     */
+    getConnection : function() {
+        return this.useAjax ? Ext.Ajax : this.conn;
+    },
+
+    /**
+     * Used for overriding the url used for a single request.  Designed to be called during a beforeaction event.  Calling setUrl
+     * will override any urls set via the api configuration parameter.  Set the optional parameter makePermanent to set the url for
+     * all subsequent requests.  If not set to makePermanent, the next request will use the same url or api configuration defined
+     * in the initial proxy configuration.
+     * @param {String} url
+     * @param {Boolean} makePermanent (Optional) [false]
+     *
+     * (e.g.: beforeload, beforesave, etc).
+     */
+    setUrl : function(url, makePermanent) {
+        this.conn.url = url;
+        if (makePermanent === true) {
+            this.url = url;
+            Ext.data.Api.prepare(this);
+        }
+    },
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action The crud action type (create, read, update, destroy)
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback
+     * <div class="sub-desc"><p>A function to be called after the request.
+     * The <tt>callback</tt> is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[] The block of Ext.data.Records.</li>
+     * <li><tt>options</tt>: Options object from the action request</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, cb, scope, arg) {
+        var  o = {
+            method: (this.api[action]) ? this.api[action]['method'] : undefined,
+            request: {
+                callback : cb,
+                scope : scope,
+                arg : arg
+            },
+            reader: reader,
+            callback : this.createCallback(action, rs),
+            scope: this
+        };
+        // Sample the request data:  If it's an object, then it hasn't been json-encoded yet.
+        // Transmit data using jsonData config of Ext.Ajax.request
+        if (typeof(params[reader.meta.root]) === 'object') {
+            o.jsonData = params;
+        } else {
+            o.params = params || {};
+        }
+        // Set the connection url.  If this.conn.url is not null here,
+        // the user may have overridden the url during a beforeaction event-handler.
+        // this.conn.url is nullified after each request.
+        if (this.conn.url === null) {
+            this.conn.url = this.buildUrl(action, rs);
+        }
+        else if (this.restful === true && rs instanceof Ext.data.Record && !rs.phantom) {
+            this.conn.url += '/' + rs.id;
+        }
+        if(this.useAjax){
+
+            Ext.applyIf(o, this.conn);
+
+            // If a currently running request is found for this action, abort it.
+            if (this.activeRequest[action]) {
+                // Disabled aborting activeRequest while implementing REST.  activeRequest[action] will have to become an array
+                //Ext.Ajax.abort(this.activeRequest[action]);
+            }
+            this.activeRequest[action] = Ext.Ajax.request(o);
+        }else{
+            this.conn.request(o);
+        }
+        // request is sent, nullify the connection url in preparation for the next request
+        this.conn.url = null;
+    },
+
+    /**
+     * Returns a callback function for a request.  Note a special case is made for the
+     * read action vs all the others.
+     * @param {String} action [create|update|delete|load]
+     * @param {Ext.data.Record[]} rs The Store-recordset being acted upon
+     * @private
+     */
+    createCallback : function(action, rs) {
+        return function(o, success, response) {
+            this.activeRequest[action] = undefined;
+            if (!success) {
+                if (action === Ext.data.Api.actions.read) {
+                    // @deprecated: fire loadexception for backwards compat.
+                    this.fireEvent('loadexception', this, o, response);
+                }
+                this.fireEvent('exception', this, 'response', action, o, response);
+                o.request.callback.call(o.request.scope, null, o.request.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, o, response);
+            } else {
+                this.onWrite(action, o, response, rs);
+            }
+        }
+    },
+
+    /**
+     * Callback for read action
+     * @param {String} action Action name as per {@link Ext.data.Api.actions#read}.
+     * @param {Object} o The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, o, response) {
+        var result;
+        try {
+            result = o.reader.read(response);
+        }catch(e){
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response, e);
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response);
+
+            // Get DataReader read-back a response-object to pass along to exception event
+            var res = o.reader.readResponse(action, response);
+            this.fireEvent('exception', this, 'remote', action, o, res, null);
+        }
+        else {
+            this.fireEvent('load', this, o, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, result, o.request.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, o, response, rs) {
+        var reader = o.reader;
+        var res;
+        try {
+            res = reader.readResponse(action, response);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (res[reader.meta.successProperty] === false) {
+            this.fireEvent('exception', this, 'remote', action, o, res, rs);
+        } else {
+            this.fireEvent('write', this, action, res[reader.meta.root], res, rs, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, res[reader.meta.root], res, res[reader.meta.successProperty]);
+    },
+
+    // inherit docs
+    destroy: function(){
+        if(!this.useAjax){
+            this.conn.abort();
+        }else if(this.activeRequest){
+            var actions = Ext.data.Api.actions;
+            for (var verb in actions) {
+                if(this.activeRequest[actions[verb]]){
+                    Ext.Ajax.abort(this.activeRequest[actions[verb]]);
+                }
+            }
+        }
+        Ext.data.HttpProxy.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.data.MemoryProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor
+ * to the Reader when its load method is called.
+ * @constructor
+ * @param {Object} data The data object which the Reader uses to construct a block of Ext.data.Records.
+ */
+Ext.data.MemoryProxy = function(data){
+    // Must define a dummy api with "read" action to satisfy DataProxy#doRequest and Ext.data.Api#prepare *before* calling super
+    var api = {};
+    api[Ext.data.Api.actions.read] = true;
+    Ext.data.MemoryProxy.superclass.constructor.call(this, {
+        api: api
+    });
+    this.data = data;
+};
+
+Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {
+    /**
+     * @event loadexception
+     * Fires if an exception occurs in the Proxy during data loading. Note that this event is also relayed
+     * through {@link Ext.data.Store}, so you can listen for it directly on any Store instance.
+     * @param {Object} this
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Object} null This parameter does not apply and will always be null for MemoryProxy
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data
+     */
+
+       /**
+     * MemoryProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        // No implementation for CRUD in MemoryProxy.  Assumes all actions are 'load'
+        params = params || {};
+        var result;
+        try {
+            result = reader.readRecords(this.data);
+        }catch(e){
+            // @deprecated loadexception
+            this.fireEvent("loadexception", this, null, arg, e);
+
+            this.fireEvent('exception', this, 'response', action, arg, null, e);
+            callback.call(scope, null, arg, false);
+            return;
+        }
+        callback.call(scope, result, arg, true);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-foundation.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.Api=(function(){var a={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(b){return(Ext.data.Api.actions[b])?true:false},getVerb:function(b){if(a[b]){return a[b]}for(var c in this.actions){if(this.actions[c]===b){a[b]=c;break}}return(a[b]!==undefined)?a[b]:null},isValid:function(b){var e=[];var d=this.actions;for(var c in b){if(!(c in d)){e.push(c)}}return(!e.length)?true:e},hasUniqueUrl:function(c,f){var b=(c.api[f])?c.api[f].url:null;var e=true;for(var d in c.api){if((e=(d===f)?true:(c.api[d].url!=b)?true:false)===false){break}}return e},prepare:function(b){if(!b.api){b.api={}}for(var d in this.actions){var c=this.actions[d];b.api[c]=b.api[c]||b.url||b.directFn;if(typeof(b.api[c])=="string"){b.api[c]={url:b.api[c]}}}},restify:function(b){b.restful=true;for(var c in this.restActions){b.api[this.actions[c]].method=this.restActions[c]}}}})();Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url.  Please review your proxy configuration.",execute:'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'}});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,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(f){return f.name});for(var b=0,a=e.length;b<a;b++){d.fields.add(new Ext.data.Field(e[b]))}c.getField=function(f){return d.fields.get(f)};return c};Ext.data.Record.PREFIX="ext-record";Ext.data.Record.AUTO_ID=1;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.id=function(a){a.phantom=true;return[Ext.data.Record.PREFIX,"-",Ext.data.Record.AUTO_ID++].join("")};Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,phantom:false,join:function(a){this.store=a},set:function(b,c){var a=(typeof c==="object");if(!a&&String(this.data[b])===String(c)){return}else{if(a&&Ext.encode(this.data[b])===Ext.encode(c)){return}}this.dirty=true;if(!this.modified){this.modified={}}if(typeof this.modified[b]=="undefined"){this.modified[b]=this.data[b]}this.data[b]=c;if(!this.editing){this.afterEdit()}},afterEdit:function(){if(this.store){this.store.afterEdit(this)}},afterReject:function(){if(this.store){this.store.afterReject(this)}},afterCommit:function(){if(this.store){this.store.afterCommit(this)}},get:function(a){return this.data[a]},beginEdit:function(){this.editing=true;this.modified=this.modified||{}},cancelEdit:function(){this.editing=false;delete this.modified},endEdit:function(){this.editing=false;if(this.dirty){this.afterEdit()}},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(b!==true){this.afterReject()}},commit:function(a){this.dirty=false;delete this.modified;this.editing=false;if(a!==true){this.afterCommit()}},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))},isValid:function(){return this.fields.find(function(a){return(a.allowBlank===false&&Ext.isEmpty(this.data[a.name]))?true:false},this)?false:true},markDirty:function(){this.dirty=true;if(!this.modified){this.modified={}}this.fields.each(function(a){this.modified[a.name]=this.data[a.name]},this)}};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(e){if(Ext.isArray(e)){var b=["field1"],d=!Ext.isArray(e[0]);if(!d){for(var c=2,a=e[0].length;c<=a;++c){b.push("field"+c)}}return new Ext.data.ArrayStore({fields:b,data:e,expandData:d,autoDestroy:true,autoCreated:true})}return Ext.isObject(e)?(e.events?e:Ext.create(e,"store")):this.get(e)},getKey:function(a){return a.storeId}});Ext.data.Store=function(a){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(b){return b.id};this.baseParams={};this.removed=[];if(a&&a.data){this.inlineData=a.data;delete a.data}Ext.apply(this,a);this.paramNames=Ext.applyIf(this.paramNames||{},this.defaultParamNames);if(this.url&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url})}if(this.restful===true&&this.proxy){this.batch=false;Ext.data.Api.restify(this.proxy)}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType}if(this.reader.onMetaChange){this.reader.onMetaChange=this.onMetaChange.createDelegate(this)}if(this.writer){this.writer.meta=this.reader.meta;this.pruneModifiedRecords=true}}if(this.recordType){this.fields=this.recordType.prototype.fields}this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","exception","beforeload","load","loadexception","beforewrite","write");if(this.proxy){this.relayEvents(this.proxy,["loadexception","exception"])}if(this.writer){this.on({scope:this,add:this.createRecords,remove:this.destroyRecord,update:this.updateRecord})}this.sortToggle={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir)}else{if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction)}}Ext.data.Store.superclass.constructor.call(this);if(this.id){this.storeId=this.id;delete this.id}if(this.storeId){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,{writer:undefined,remoteSort:false,autoDestroy:false,pruneModifiedRecords:false,lastOptions:null,autoSave:true,batch:true,restful:false,paramNames:undefined,defaultParamNames:{start:"start",limit:"limit",sort:"sort",dir:"dir"},destroy:function(){if(this.storeId){Ext.StoreMgr.unregister(this)}this.data=null;Ext.destroy(this.proxy);this.reader=this.writer=null;this.purgeListeners()},add:function(b){b=[].concat(b);if(b.length<1){return}for(var d=0,a=b.length;d<a;d++){b[d].join(this)}var c=this.data.length;this.data.addAll(b);if(this.snapshot){this.snapshot.addAll(b)}this.fireEvent("add",this,b,c)},addSorted:function(a){var b=this.findInsertIndex(a);this.insert(b,a)},remove:function(a){var b=this.data.indexOf(a);if(b>-1){this.data.removeAt(b);if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(){this.data.clear();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}this.fireEvent("clear",this)},insert:function(c,b){b=[].concat(b);for(var d=0,a=b.length;d<a;d++){this.data.insert(c,b[d]);b[d].join(this)}this.fireEvent("add",this,b,c)},indexOf:function(a){return this.data.indexOf(a)},indexOfId:function(a){return this.data.indexOfKey(a)},getById:function(a){return this.data.key(a)},getAt:function(a){return this.data.itemAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},storeOptions:function(a){a=Ext.apply({},a);delete a.callback;delete a.scope;this.lastOptions=a},load:function(b){b=b||{};this.storeOptions(b);if(this.sortInfo&&this.remoteSort){var a=this.paramNames;b.params=b.params||{};b.params[a.sort]=this.sortInfo.field;b.params[a.dir]=this.sortInfo.direction}try{return this.execute("read",null,b)}catch(c){this.handleException(c);return false}},updateRecord:function(b,a,c){if(c==Ext.data.Record.EDIT&&this.autoSave===true&&(!a.phantom||(a.phantom&&a.isValid))){this.save()}},createRecords:function(c,b,d){for(var e=0,a=b.length;e<a;e++){if(b[e].phantom&&b[e].isValid()){b[e].markDirty();this.modified.push(b[e])}}if(this.autoSave===true){this.save()}},destroyRecord:function(b,a,c){if(this.modified.indexOf(a)!=-1){this.modified.remove(a)}if(!a.phantom){this.removed.push(a);a.lastIndex=c;if(this.autoSave===true){this.save()}}},execute:function(d,a,b){if(!Ext.data.Api.isAction(d)){throw new Ext.data.Api.Error("execute",d)}b=Ext.applyIf(b||{},{params:{}});var c=true;if(d==="read"){c=this.fireEvent("beforeload",this,b)}else{if(this.writer.listful===true&&this.restful!==true){a=(Ext.isArray(a))?a:[a]}else{if(Ext.isArray(a)&&a.length==1){a=a.shift()}}if((c=this.fireEvent("beforewrite",this,d,a,b))!==false){this.writer.write(d,b.params,a)}}if(c!==false){var e=Ext.apply({},b.params,this.baseParams);if(this.writer&&this.proxy.url&&!this.proxy.restful&&!Ext.data.Api.hasUniqueUrl(this.proxy,d)){e.xaction=d}this.proxy.request(Ext.data.Api.actions[d],a,e,this.reader,this.createCallback(d,a),this,b)}return c},save:function(){if(!this.writer){throw new Ext.data.Store.Error("writer-undefined")}if(this.removed.length){this.doTransaction("destroy",this.removed)}var a=[].concat(this.getModifiedRecords());if(!a.length){return true}var c=[];for(var b=a.length-1;b>=0;b--){if(a[b].phantom===true){var d=a.splice(b,1).shift();if(d.isValid()){c.push(d)}}else{if(!a[b].isValid()){a.splice(b,1)}}}if(c.length){this.doTransaction("create",c)}if(a.length){this.doTransaction("update",a)}return true},doTransaction:function(d,b){function e(f){try{this.execute(d,f)}catch(g){this.handleException(g)}}if(this.batch===false){for(var c=0,a=b.length;c<a;c++){e.call(this,b[c])}}else{e.call(this,b)}},createCallback:function(b,a){var c=Ext.data.Api.actions;return(b=="read")?this.loadRecords:function(e,d,f){this["on"+Ext.util.Format.capitalize(b)+"Records"](f,a,e);if(f===true){this.fireEvent("write",this,b,e,d,a)}}},clearModified:function(a){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d<a;d++){this.reMap(b[d])}}else{delete this.data.map[b._phid];this.data.map[b.id]=b;var c=this.data.keys.indexOf(b._phid);this.data.keys.splice(c,1,b.id);delete b._phid}},onCreateRecords:function(d,a,b){if(d===true){try{this.reader.realize(a,b);this.reMap(a)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onCreateRecords(d,a,b)}}}},onUpdateRecords:function(d,a,b){if(d===true){try{this.reader.update(a,b)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onUpdateRecords(d,a,b)}}}},onDestroyRecords:function(e,b,d){b=(b instanceof Ext.data.Record)?[b]:b;for(var c=0,a=b.length;c<a;c++){this.removed.splice(this.removed.indexOf(b[c]),1)}if(e===false){for(c=b.length-1;c>=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(g,b,f){if(!g||f===false){if(f!==false){this.fireEvent("load",this,[],b)}if(b.callback){b.callback.call(b.scope||this,[],b,false,g)}return}var e=g.records,d=g.totalRecords||e.length;if(!b||b.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var c=0,a=e.length;c<a;c++){e[c].join(this)}if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.data.clear();this.data.addAll(e);this.totalLength=d;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(d,this.data.length+e.length);this.add(e)}this.fireEvent("load",this,e,b);if(b.callback){b.callback.call(b.scope||this,e,b,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if(this.sortInfo&&!this.remoteSort){var a=this.sortInfo,b=a.field;this.sortData(b,a.direction)}},sortData:function(c,d){d=d||"ASC";var a=this.fields.get(c).sortType;var b=function(f,e){var h=a(f.data[c]),g=a(e.data[c]);return h>g?1:(h<g?-1:0)};this.data.sort(d,b);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(d,b)}},setDefaultSort:function(b,a){a=a?a.toUpperCase():"ASC";this.sortInfo={field:b,direction:a};this.sortToggle[b]=a},sort:function(e,c){var d=this.fields.get(e);if(!d){return false}if(!c){if(this.sortInfo&&this.sortInfo.field==d.name){c=(this.sortToggle[d.name]||"ASC").toggle("ASC","DESC")}else{c=d.sortDir}}var b=(this.sortToggle)?this.sortToggle[d.name]:null;var a=(this.sortInfo)?this.sortInfo:null;this.sortToggle[d.name]=c;this.sortInfo={field:d.name,direction:c};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this)}else{if(!this.load(this.lastOptions)){if(b){this.sortToggle[d.name]=b}if(a){this.sortInfo=a}}}},each:function(b,a){this.data.each(b,a)},getModifiedRecords:function(){return this.modified},createFilterFn:function(c,b,d,a){if(Ext.isEmpty(b,false)){return false}b=this.data.createValueMatcher(b,d,a);return function(e){return b.test(e.data[c])}},sum:function(e,f,a){var c=this.data.items,b=0;f=f||0;a=(a||a===0)?a:c.length-1;for(var d=f;d<=a;d++){b+=(c[d].data[e]||0)}return b},filter:function(d,c,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.filterBy(b):this.clearFilter()},filterBy:function(b,a){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(b,a||this);this.fireEvent("datachanged",this)},query:function(d,c,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.queryBy(b):this.data.clone()},queryBy:function(b,a){var c=this.snapshot||this.data;return c.filterBy(b,a||this)},find:function(d,c,f,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.data.findIndexBy(b,null,f):-1},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)===a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(h,j,b){var g=(b===true&&this.snapshot)?this.snapshot.items:this.data.items;var k,m,a=[],c={};for(var e=0,f=g.length;e<f;e++){k=g[e].data[h];m=String(k);if((j||!Ext.isEmpty(k))&&!c[m]){c[m]=true;a[a.length]=k}}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;if(b.sortInfo){this.sortInfo=b.sortInfo}else{if(this.sortInfo&&!this.fields.get(this.sortInfo.field)){delete this.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},setBaseParam:function(a,b){this.baseParams=this.baseParams||{};this.baseParams[a]=b}});Ext.reg("store",Ext.data.Store);Ext.data.Store.Error=Ext.extend(Ext.Error,{name:"Ext.data.Store"});Ext.apply(Ext.data.Store.Error.prototype,{lang:{"writer-undefined":"Attempted to execute a write-action without a DataWriter installed."}});Ext.data.Field=function(d){if(typeof d=="string"){d={name:d}}Ext.apply(this,d);if(!this.type){this.type="auto"}var c=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=c[this.sortType]}if(!this.sortType){switch(this.type){case"string":this.sortType=c.asUCString;break;case"date":this.sortType=c.asDate;break;default:this.sortType=c.none}}var e=/[\$,%]/g;if(!this.convert){var b,a=this.dateFormat;switch(this.type){case"":case"auto":case undefined:b=function(f){return f};break;case"string":b=function(f){return(f===undefined||f===null)?"":String(f)};break;case"int":b=function(f){return f!==undefined&&f!==null&&f!==""?parseInt(String(f).replace(e,""),10):""};break;case"float":b=function(f){return f!==undefined&&f!==null&&f!==""?parseFloat(String(f).replace(e,""),10):""};break;case"bool":case"boolean":b=function(f){return f===true||f==="true"||f==1};break;case"date":b=function(g){if(!g){return""}if(Ext.isDate(g)){return g}if(a){if(a=="timestamp"){return new Date(g*1000)}if(a=="time"){return new Date(parseInt(g,10))}return Date.parseDate(g,a)}var f=Date.parse(g);return f?new Date(f):null};break}this.convert=b}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true};Ext.data.DataReader=function(a,b){this.meta=a;this.recordType=Ext.isArray(b)?Ext.data.Record.create(b):b};Ext.data.DataReader.prototype={buildExtractors:Ext.emptyFn,realize:function(b,d){if(Ext.isArray(b)){for(var c=b.length-1;c>=0;c--){if(Ext.isArray(d)){this.realize(b.splice(c,1).shift(),d.splice(c,1).shift())}else{this.realize(b.splice(c,1).shift(),d)}}}else{if(Ext.isArray(d)&&d.length==1){d=d.shift()}if(!this.isData(d)){throw new Ext.data.DataReader.Error("realize",b)}this.buildExtractors();var a=this.extractValues(d,b.fields.items,b.fields.items.length);b.phantom=false;b._phid=b.id;b.id=d[this.meta.idProperty];b.data=a;b.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){a.commit();throw new Ext.data.DataReader.Error("update",a)}this.buildExtractors();a.data=this.extractValues(Ext.apply(a.data,c),a.fields.items,a.fields.items.length);a.commit()}},isData:function(a){return(a&&Ext.isObject(a)&&!Ext.isEmpty(a[this.meta.idProperty]))?true:false}};Ext.data.DataReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataReader"});Ext.apply(Ext.data.DataReader.Error.prototype,{lang:{update:"#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",realize:"#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.","invalid-response":"#readResponse received an invalid response from the server."}});Ext.data.DataWriter=function(a){Ext.apply(this,a)};Ext.data.DataWriter.prototype={writeAllFields:false,listful:false,write:function(b,c,a){this.render(b,a,c,this[b](a))},render:Ext.emptyFn,update:function(a){var d={};if(Ext.isArray(a)){var c=[],b=[];Ext.each(a,function(e){b.push(e.id);c.push(this.updateRecord(e))},this);d[this.meta.idProperty]=b;d[this.meta.root]=c}else{if(a instanceof Ext.data.Record){d[this.meta.idProperty]=a.id;d[this.meta.root]=this.updateRecord(a)}}return d},updateRecord:Ext.emptyFn,create:function(a){var c={};if(Ext.isArray(a)){var b=[];Ext.each(a,function(d){b.push(this.createRecord(d))},this);c[this.meta.root]=b}else{if(a instanceof Ext.data.Record){c[this.meta.root]=this.createRecord(a)}}return c},createRecord:Ext.emptyFn,destroy:function(a){var d={};if(Ext.isArray(a)){var c=[],b=[];Ext.each(a,function(e){c.push(this.destroyRecord(e))},this);d[this.meta.root]=c}else{if(a instanceof Ext.data.Record){d[this.meta.root]=this.destroyRecord(a)}}return d},destroyRecord:Ext.emptyFn,toHash:function(e){var d=e.fields.map,c={},b=(this.writeAllFields===false&&e.phantom===false)?e.getChanges():e.data,a;Ext.iterate(b,function(g,f){if((a=d[g])){c[a.mapping?a.mapping:a.name]=f}});c[this.meta.idProperty]=e.id;return c}};Ext.data.DataProxy=function(a){a=a||{};this.api=a.api;this.url=a.url;this.restful=a.restful;this.listeners=a.listeners;this.prettyUrls=a.prettyUrls;try{Ext.data.Api.prepare(this)}catch(b){if(b instanceof Ext.data.Api.Error){b.toConsole()}}this.addEvents("exception","beforeload","load","loadexception","beforewrite","write");Ext.data.DataProxy.superclass.constructor.call(this)};Ext.extend(Ext.data.DataProxy,Ext.util.Observable,{restful:false,setApi:function(){if(arguments.length==1){var a=Ext.data.Api.isValid(arguments[0]);if(a===true){this.api=arguments[0]}else{throw new Ext.data.Api.Error("invalid",a)}}else{if(arguments.length==2){if(!Ext.data.Api.isAction(arguments[0])){throw new Ext.data.Api.Error("invalid",arguments[0])}this.api[arguments[0]]=arguments[1]}}Ext.data.Api.prepare(this)},isApiAction:function(a){return(this.api[a])?true:false},request:function(e,b,f,a,g,d,c){if(!this.api[e]&&!this.load){throw new Ext.data.DataProxy.Error("action-undefined",e)}f=f||{};if((e===Ext.data.Api.actions.read)?this.fireEvent("beforeload",this,f):this.fireEvent("beforewrite",this,e,b,f)!==false){this.doRequest.apply(this,arguments)}else{g.call(d||this,null,c,false)}},load:null,doRequest:function(e,b,f,a,g,d,c){this.load(f,a,g,d,c)},buildUrl:function(d,b){b=b||null;var c=(this.api[d])?this.api[d].url:this.url;if(!c){throw new Ext.data.Api.Error("invalid-url",d)}var e=null;var a=c.match(/(.*)(\.\w+)$/);if(a){e=a[2];c=a[1]}if((this.prettyUrls===true||this.restful===true)&&b instanceof Ext.data.Record&&!b.phantom){c+="/"+b.id}if(e){c+=e}return c},destroy:function(){this.purgeListeners()}});Ext.data.DataProxy.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataProxy"});Ext.apply(Ext.data.DataProxy.Error.prototype,{lang:{"action-undefined":"DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.","api-invalid":"Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions."}});Ext.data.ScriptTagProxy=function(a){Ext.apply(this,a);Ext.data.ScriptTagProxy.superclass.constructor.call(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,doRequest:function(e,f,d,g,i,j,k){var c=Ext.urlEncode(Ext.apply(d,this.extraParams));var b=this.buildUrl(e,f);if(!b){throw new Ext.data.Api.Error("invalid-url",b)}b=Ext.urlAppend(b,c);if(this.nocache){b=Ext.urlAppend(b,"_dc="+(new Date().getTime()))}var a=++Ext.data.ScriptTagProxy.TRANS_ID;var l={id:a,action:e,cb:"stcCallback"+a,scriptId:"stcScript"+a,params:d,arg:k,url:b,callback:i,scope:j,reader:g};window[l.cb]=this.createCallback(e,f,l);b+=String.format("&{0}={1}",this.callbackParam,l.cb);if(this.autoAbort!==false){this.abort()}l.timeoutId=this.handleFailure.defer(this.timeout,this,[l]);var h=document.createElement("script");h.setAttribute("src",b);h.setAttribute("type","text/javascript");h.setAttribute("id",l.scriptId);this.head.appendChild(h);this.trans=l},createCallback:function(d,b,c){var a=this;return function(e){a.trans=false;a.destroyTrans(c,true);if(d===Ext.data.Api.actions.read){a.onRead.call(a,d,c,e)}else{a.onWrite.call(a,d,c,e,b)}}},onRead:function(d,c,b){var a;try{a=c.reader.readRecords(b)}catch(f){this.fireEvent("loadexception",this,c,b,f);this.fireEvent("exception",this,"response",d,c,b,f);c.callback.call(c.scope||window,null,c.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,c,b);this.fireEvent("exception",this,"remote",d,c,b,null)}else{this.fireEvent("load",this,b,c.arg)}c.callback.call(c.scope||window,a,c.arg,a.success)},onWrite:function(f,d,c,b){var a=d.reader;try{a.readResponse(f,c)}catch(g){this.fireEvent("exception",this,"response",f,d,c,g);d.callback.call(d.scope||window,null,c,false);return}if(!c[a.meta.successProperty]===true){this.fireEvent("exception",this,"remote",f,d,c,b);d.callback.call(d.scope||window,null,c,false);return}this.fireEvent("write",this,f,c[a.meta.root],c,b,d.arg);d.callback.call(d.scope||window,c[a.meta.root],c,true)},isLoading:function(){return this.trans?true:false},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans)}},destroyTrans:function(b,a){this.head.removeChild(document.getElementById(b.scriptId));clearTimeout(b.timeoutId);if(a){window[b.cb]=undefined;try{delete window[b.cb]}catch(c){}}else{window[b.cb]=function(){window[b.cb]=undefined;try{delete window[b.cb]}catch(d){}}}},handleFailure:function(a){this.trans=false;this.destroyTrans(a,false);if(a.action===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,null,a.arg)}this.fireEvent("exception",this,"response",a.action,{response:null,options:a.arg});a.callback.call(a.scope||window,null,a.arg,false)},destroy:function(){this.abort();Ext.data.ScriptTagProxy.superclass.destroy.call(this)}});Ext.data.HttpProxy=function(a){Ext.data.HttpProxy.superclass.constructor.call(this,a);this.conn=a;this.conn.url=null;this.useAjax=!a||!a.events;var c=Ext.data.Api.actions;this.activeRequest={};for(var b in c){this.activeRequest[c[b]]=undefined}};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},setUrl:function(a,b){this.conn.url=a;if(b===true){this.url=a;Ext.data.Api.prepare(this)}},doRequest:function(f,d,h,c,b,e,a){var g={method:(this.api[f])?this.api[f]["method"]:undefined,request:{callback:b,scope:e,arg:a},reader:c,callback:this.createCallback(f,d),scope:this};if(typeof(h[c.meta.root])==="object"){g.jsonData=h}else{g.params=h||{}}if(this.conn.url===null){this.conn.url=this.buildUrl(f,d)}else{if(this.restful===true&&d instanceof Ext.data.Record&&!d.phantom){this.conn.url+="/"+d.id}}if(this.useAjax){Ext.applyIf(g,this.conn);if(this.activeRequest[f]){}this.activeRequest[f]=Ext.Ajax.request(g)}else{this.conn.request(g)}this.conn.url=null},createCallback:function(b,a){return function(e,d,c){this.activeRequest[b]=undefined;if(!d){if(b===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,e,c)}this.fireEvent("exception",this,"response",b,e,c);e.request.callback.call(e.request.scope,null,e.request.arg,false);return}if(b===Ext.data.Api.actions.read){this.onRead(b,e,c)}else{this.onWrite(b,e,c,a)}}},onRead:function(d,g,b){var a;try{a=g.reader.read(b)}catch(f){this.fireEvent("loadexception",this,g,b,f);this.fireEvent("exception",this,"response",d,g,b,f);g.request.callback.call(g.request.scope,null,g.request.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,g,b);var c=g.reader.readResponse(d,b);this.fireEvent("exception",this,"remote",d,g,c,null)}else{this.fireEvent("load",this,g,g.request.arg)}g.request.callback.call(g.request.scope,a,g.request.arg,a.success)},onWrite:function(f,h,c,b){var a=h.reader;var d;try{d=a.readResponse(f,c)}catch(g){this.fireEvent("exception",this,"response",f,h,c,g);h.request.callback.call(h.request.scope,null,h.request.arg,false);return}if(d[a.meta.successProperty]===false){this.fireEvent("exception",this,"remote",f,h,d,b)}else{this.fireEvent("write",this,f,d[a.meta.root],d,b,h.request.arg)}h.request.callback.call(h.request.scope,d[a.meta.root],d,d[a.meta.successProperty])},destroy:function(){if(!this.useAjax){this.conn.abort()}else{if(this.activeRequest){var b=Ext.data.Api.actions;for(var a in b){if(this.activeRequest[b[a]]){Ext.Ajax.abort(this.activeRequest[b[a]])}}}}Ext.data.HttpProxy.superclass.destroy.call(this)}});Ext.data.MemoryProxy=function(b){var a={};a[Ext.data.Api.actions.read]=true;Ext.data.MemoryProxy.superclass.constructor.call(this,{api:a});this.data=b};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{doRequest:function(b,c,a,d,g,h,i){a=a||{};var j;try{j=d.readRecords(this.data)}catch(f){this.fireEvent("loadexception",this,null,i,f);this.fireEvent("exception",this,"response",b,i,null,f);g.call(h,null,i,false);return}g.call(h,j,i,true)}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping-debug.js	(revision 625)
@@ -0,0 +1,139 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.GroupingStore
+ * @extends Ext.data.Store
+ * A specialized store implementation that provides for grouping records by one of the available fields. This
+ * is usually used in conjunction with an {@link Ext.grid.GroupingView} to proved the data model for
+ * a grouped GridPanel.
+ * @constructor
+ * Creates a new GroupingStore.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype groupingstore
+ */
+Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
+    
+    //inherit docs
+    constructor: function(config){
+        Ext.data.GroupingStore.superclass.constructor.call(this, config);
+        this.applyGroupField();
+    },
+    
+    /**
+     * @cfg {String} groupField
+     * The field name by which to sort the store's data (defaults to '').
+     */
+    /**
+     * @cfg {Boolean} remoteGroup
+     * True if the grouping should apply on the server side, false if it is local only (defaults to false).  If the
+     * grouping is local, it can be applied immediately to the data.  If it is remote, then it will simply act as a
+     * helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call.
+     */
+    remoteGroup : false,
+    /**
+     * @cfg {Boolean} groupOnSort
+     * True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the
+     * existing sort info (defaults to false).
+     */
+    groupOnSort:false,
+
+	groupDir : 'ASC',
+	
+    /**
+     * Clears any existing grouping and refreshes the data using the default sort.
+     */
+    clearGrouping : function(){
+        this.groupField = false;
+        if(this.remoteGroup){
+            if(this.baseParams){
+                delete this.baseParams.groupBy;
+            }
+            var lo = this.lastOptions;
+            if(lo && lo.params){
+                delete lo.params.groupBy;
+            }
+            this.reload();
+        }else{
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }
+    },
+
+    /**
+     * Groups the data by the specified field.
+     * @param {String} field The field name by which to sort the store's data
+     * @param {Boolean} forceRegroup (optional) True to force the group to be refreshed even if the field passed
+     * in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)
+     */
+    groupBy : function(field, forceRegroup, direction){
+		direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir;
+        if(this.groupField == field && this.groupDir == direction && !forceRegroup){
+            return; // already grouped by this field
+        }
+        this.groupField = field;
+		this.groupDir = direction;
+        this.applyGroupField();
+        if(this.groupOnSort){
+            this.sort(field, direction);
+            return;
+        }
+        if(this.remoteGroup){
+            this.reload();
+        }else{
+            var si = this.sortInfo || {};
+            if(si.field != field || si.direction != direction){
+                this.applySort();
+            }else{
+                this.sortData(field, direction);
+            }
+            this.fireEvent('datachanged', this);
+        }
+    },
+    
+    // private
+    applyGroupField: function(){
+        if(this.remoteGroup){
+            if(!this.baseParams){
+                this.baseParams = {};
+            }
+            this.baseParams.groupBy = this.groupField;
+            this.baseParams.groupDir = this.groupDir;
+        }
+    },
+
+    // private
+    applySort : function(){
+        Ext.data.GroupingStore.superclass.applySort.call(this);
+        if(!this.groupOnSort && !this.remoteGroup){
+            var gs = this.getGroupState();
+            if(gs && (gs != this.sortInfo.field || this.groupDir != this.sortInfo.direction)){
+                this.sortData(this.groupField, this.groupDir);
+            }
+        }
+    },
+
+    // private
+    applyGrouping : function(alwaysFireChange){
+        if(this.groupField !== false){
+            this.groupBy(this.groupField, true, this.groupDir);
+            return true;
+        }else{
+            if(alwaysFireChange === true){
+                this.fireEvent('datachanged', this);
+            }
+            return false;
+        }
+    },
+
+    // private
+    getGroupState : function(){
+        return this.groupOnSort && this.groupField !== false ?
+               (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField;
+    }
+});
+Ext.reg('groupingstore', Ext.data.GroupingStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-grouping.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.GroupingStore.superclass.constructor.call(this,a);this.applyGroupField()},remoteGroup:false,groupOnSort:false,groupDir:"ASC",clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams){delete this.baseParams.groupBy}var a=this.lastOptions;if(a&&a.params){delete a.params.groupBy}this.reload()}else{this.applySort();this.fireEvent("datachanged",this)}},groupBy:function(d,b,c){c=c?(String(c).toUpperCase()=="DESC"?"DESC":"ASC"):this.groupDir;if(this.groupField==d&&this.groupDir==c&&!b){return}this.groupField=d;this.groupDir=c;this.applyGroupField();if(this.groupOnSort){this.sort(d,c);return}if(this.remoteGroup){this.reload()}else{var a=this.sortInfo||{};if(a.field!=d||a.direction!=c){this.applySort()}else{this.sortData(d,c)}this.fireEvent("datachanged",this)}},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}this.baseParams.groupBy=this.groupField;this.baseParams.groupDir=this.groupDir}},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.groupDir!=this.sortInfo.direction)){this.sortData(this.groupField,this.groupDir)}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);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.reg("groupingstore",Ext.data.GroupingStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json-debug.js	(revision 625)
@@ -0,0 +1,582 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.JsonWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action.
+ */
+Ext.data.JsonWriter = function(config) {
+    Ext.data.JsonWriter.superclass.constructor.call(this, config);
+    // careful to respect "returnJson", renamed to "encode"
+    if (this.returnJson != undefined) {
+        this.encode = this.returnJson;
+    }
+}
+Ext.extend(Ext.data.JsonWriter, Ext.data.DataWriter, {
+    /**
+     * @cfg {Boolean} returnJson <b>Deprecated.  Use {@link Ext.data.JsonWriter#encode} instead.
+     */
+    returnJson : undefined,
+    /**
+     * @cfg {Boolean} encode <tt>true</tt> to {@link Ext.util.JSON#encode encode} the
+     * {@link Ext.data.DataWriter#toHash hashed data}. Defaults to <tt>true</tt>.  When using
+     * {@link Ext.data.DirectProxy}, set this to <tt>false</tt> since Ext.Direct.JsonProvider will perform
+     * its own json-encoding.  In addition, if you're using {@link Ext.data.HttpProxy}, setting to <tt>false</tt>
+     * will cause HttpProxy to transmit data using the <b>jsonData</b> configuration-params of {@link Ext.Ajax#request}
+     * instead of <b>params</b>.  When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are
+     * tuned to expect data through the jsonData mechanism.  In those cases, one will want to set <b>encode: <tt>false</tt></b>
+     */
+    encode : true,
+
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        Ext.apply(params, data);
+
+        if (this.encode === true) { // <-- @deprecated returnJson
+            if (Ext.isArray(rs) && data[this.meta.idProperty]) {
+                params[this.meta.idProperty] = Ext.encode(params[this.meta.idProperty]);
+            }
+            params[this.meta.root] = Ext.encode(params[this.meta.root]);
+        }
+    },
+    /**
+     * createRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        return this.toHash(rec);
+    },
+    /**
+     * updateRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        return this.toHash(rec);
+
+    },
+    /**
+     * destroyRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        return rec.id;
+    }
+});/**
+ * @class Ext.data.JsonReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from a JSON response
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'firstname'},                  // map the Record's "firstname" field to the row object's key of the same name
+    {name: 'job', mapping: 'occupation'}  // map the Record's "job" field to the row object's "occupation" key
+]);
+var myReader = new Ext.data.JsonReader(
+    {                             // The metadata property, with configuration options:
+        totalProperty: "results", //   the property which contains the total dataset size (optional)
+        root: "rows",             //   the property which contains an Array of record data objects
+        idProperty: "id"          //   the property within each row object that provides an ID for the record (optional)
+    },
+    Employee  // {@link Ext.data.Record} constructor that provides mapping for JSON object
+);
+</code></pre>
+ * <p>This would consume a JSON data object of the form:</p><pre><code>
+{
+    results: 2,  // Reader's configured totalProperty
+    rows: [      // Reader's configured root
+        { id: 1, firstname: 'Bill', occupation: 'Gardener' },         // a row object
+        { id: 2, firstname: 'Ben' , occupation: 'Horticulturalist' }  // another row object
+    ]
+}
+</code></pre>
+ * <p><b><u>Automatic configuration using metaData</u></b></p>
+ * <p>It is possible to change a JsonReader's metadata at any time by including a <b><tt>metaData</tt></b>
+ * property in the JSON data object. If the JSON data object has a <b><tt>metaData</tt></b> property, a
+ * {@link Ext.data.Store Store} object using this Reader will reconfigure itself to use the newly provided
+ * field definition and fire its {@link Ext.data.Store#metachange metachange} event. The metachange event
+ * handler may interrogate the <b><tt>metaData</tt></b> property to perform any configuration required.
+ * Note that reconfiguring a Store potentially invalidates objects which may refer to Fields or Records
+ * which no longer exist.</p>
+ * <p>The <b><tt>metaData</tt></b> property in the JSON data object may contain:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>any of the configuration options for this class</li>
+ * <li>a <b><tt>{@link Ext.data.Record#fields fields}</tt></b> property which the JsonReader will
+ * use as an argument to the {@link Ext.data.Record#create data Record create method} in order to
+ * configure the layout of the Records it will produce.</li>
+ * <li>a <b><tt>{@link Ext.data.Store#sortInfo sortInfo}</tt></b> property which the JsonReader will
+ * use to set the {@link Ext.data.Store}'s {@link Ext.data.Store#sortInfo sortInfo} property</li>
+ * <li>any user-defined properties needed</li>
+ * </ul></div>
+ * <p>To use this facility to send the same data as the example above (without having to code the creation
+ * of the Record constructor), you would create the JsonReader like this:</p><pre><code>
+var myReader = new Ext.data.JsonReader();
+</code></pre>
+ * <p>The first data packet from the server would configure the reader by containing a
+ * <b><tt>metaData</tt></b> property <b>and</b> the data. For example, the JSON data object might take
+ * the form:</p>
+<pre><code>
+{
+    metaData: {
+        idProperty: 'id',
+        root: 'rows',
+        totalProperty: 'results',
+        fields: [
+            {name: 'name'},
+            {name: 'job', mapping: 'occupation'}
+        ],
+        sortInfo: {field: 'name', direction:'ASC'}, // used by store to set its sortInfo
+        foo: 'bar' // custom property
+    },
+    results: 2,
+    rows: [ // an Array
+        { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
+        { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' }
+    ]
+}
+</code></pre>
+ * @cfg {String} totalProperty [total] Name of the property from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.  Defaults to <tt>total</tt>.
+ * @cfg {String} successProperty [success] Name of the property from which to
+ * retrieve the success attribute. Defaults to <tt>success</tt>.  See
+ * {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+ * for additional information.
+ * @cfg {String} root [undefined] <b>Required</b>.  The name of the property
+ * which contains the Array of row objects.  Defaults to <tt>undefined</tt>.
+ * An exception will be thrown if the root property is undefined. The data packet
+ * value for this property should be an empty array to clear the data or show
+ * no data.
+ * @cfg {String} idProperty [id] Name of the property within a row object that contains a record identifier value.  Defaults to <tt>id</tt>
+ * @constructor
+ * Create a new JsonReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.JsonReader = function(meta, recordType){
+    meta = meta || {};
+
+    // default idProperty, successProperty & totalProperty -> "id", "success", "total"
+    Ext.applyIf(meta, {
+        idProperty: 'id',
+        successProperty: 'success',
+        totalProperty: 'total'
+    });
+
+    Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
+    /**
+     * This JsonReader's metadata as passed to the constructor, or as passed in
+     * the last data packet's <b><tt>metaData</tt></b> property.
+     * @type Mixed
+     * @property meta
+     */
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the JSON data in its responseText.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var json = response.responseText;
+        var o = Ext.decode(json);
+        if(!o) {
+            throw {message: "JsonReader.read: Json object not found"};
+        }
+        return this.readRecords(o);
+    },
+
+    // private function a store will implement
+    onMetaChange : function(meta, recordType, o){
+
+    },
+
+    /**
+     * @ignore
+     */
+    simpleAccess: function(obj, subsc) {
+        return obj[subsc];
+    },
+
+    /**
+     * @ignore
+     */
+    getJsonAccessor: function(){
+        var re = /[\[\.]/;
+        return function(expr) {
+            try {
+                return(re.test(expr)) ?
+                new Function("obj", "return obj." + expr) :
+                function(obj){
+                    return obj[expr];
+                };
+            } catch(e){}
+            return Ext.emptyFn;
+        };
+    }(),
+
+    /**
+     * Create a data block containing Ext.data.Records from a JSON object.
+     * @param {Object} o An object which contains an Array of row objects in the property specified
+     * in the config as 'root, and optionally a property, specified in the config as 'totalProperty'
+     * which contains the total size of the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        /**
+         * After any data loads, the raw JSON data is available for further custom processing.  If no data is
+         * loaded or there is a load exception this property will be undefined.
+         * @type Object
+         */
+        this.jsonData = o;
+        if(o.metaData){
+            delete this.ef;
+            this.meta = o.metaData;
+            this.recordType = Ext.data.Record.create(o.metaData.fields);
+            this.onMetaChange(this.meta, this.recordType, o);
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length, v;
+
+        // Generate extraction functions for the totalProperty, the root, the id, and for each field
+        this.buildExtractors();
+        var root = this.getRoot(o), c = root.length, totalRecords = c, success = true;
+        if(s.totalProperty){
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)){
+                totalRecords = v;
+            }
+        }
+        if(s.successProperty){
+            v = this.getSuccess(o);
+            if(v === false || v === 'false'){
+                success = false;
+            }
+        }
+
+        var records = [];
+        for(var i = 0; i < c; i++){
+            var n = root[i];
+            var record = new Record(this.extractValues(n, fi, fl), this.getId(n));
+            record.json = n;
+            records[i] = record;
+        }
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords
+        };
+    },
+
+    // private
+    buildExtractors : function() {
+        if(this.ef){
+            return;
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length;
+
+        if(s.totalProperty) {
+            this.getTotal = this.getJsonAccessor(s.totalProperty);
+        }
+        if(s.successProperty) {
+            this.getSuccess = this.getJsonAccessor(s.successProperty);
+        }
+        this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;};
+        if (s.id || s.idProperty) {
+            var g = this.getJsonAccessor(s.id || s.idProperty);
+            this.getId = function(rec) {
+                var r = g(rec);
+                return (r === undefined || r === "") ? null : r;
+            };
+        } else {
+            this.getId = function(){return null;};
+        }
+        var ef = [];
+        for(var i = 0; i < fl; i++){
+            f = fi[i];
+            var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name;
+            ef.push(this.getJsonAccessor(map));
+        }
+        this.ef = ef;
+    },
+
+    // private extractValues
+    extractValues: function(data, items, len) {
+        var f, values = {};
+        for(var j = 0; j < len; j++){
+            f = items[j];
+            var v = this.ef[j](data);
+            values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data);
+        }
+        return values;
+    },
+
+    /**
+     * Decode a json response from server.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} response
+     */
+    readResponse : function(action, response) {
+        var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response;
+        if(!o) {
+            throw new Ext.data.JsonReader.Error('response');
+        }
+        if (Ext.isEmpty(o[this.meta.successProperty])) {
+            throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty);
+        }
+        // TODO, separate empty and undefined exceptions.
+        if ((action === Ext.data.Api.actions.create || action === Ext.data.Api.actions.update)) {
+            if (Ext.isEmpty(o[this.meta.root])) {
+                throw new Ext.data.JsonReader.Error('root-emtpy', this.meta.root);
+            }
+            else if (o[this.meta.root] === undefined) {
+                throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root);
+            }
+        }
+        // make sure extraction functions are defined.
+        this.ef = this.buildExtractors();
+        return o;
+    }
+});
+
+/**
+ * @class Ext.data.JsonReader.Error
+ * Error class for JsonReader
+ */
+Ext.data.JsonReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name : 'Ext.data.JsonReader'
+});
+Ext.apply(Ext.data.JsonReader.Error.prototype, {
+    lang: {
+        'response': "An error occurred while json-decoding your server response",
+        'successProperty-response': 'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',
+        'root-undefined-response': 'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',
+        'root-undefined-config': 'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',
+        'idProperty-undefined' : 'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',
+        'root-emtpy': 'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'
+    }
+});
+/**
+ * @class Ext.data.ArrayReader
+ * @extends Ext.data.JsonReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an Array.
+ * Each element of that Array represents a row of data fields. The
+ * fields are pulled into a Record object using as a subscript, the <code>mapping</code> property
+ * of the field definition if it exists, or the field's ordinal position in the definition.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
+    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
+]);
+var myReader = new Ext.data.ArrayReader({
+    {@link #idIndex}: 0
+}, Employee);
+</code></pre>
+ * <p>This would consume an Array like this:</p>
+ * <pre><code>
+[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
+ * </code></pre>
+ * @constructor
+ * Create a new ArrayReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
+    /**
+     * @cfg {String} successProperty
+     * @hide
+     */
+    /**
+     * @cfg {Number} id (optional) The subscript within row Array that provides an ID for the Record.
+     * Deprecated. Use {@link #idIndex} instead.
+     */
+    /**
+     * @cfg {Number} idIndex (optional) The subscript within row Array that provides an ID for the Record.
+     */
+    /**
+     * Create a data block containing Ext.data.Records from an Array.
+     * @param {Object} o An Array of row objects which represents the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        this.arrayData = o;
+        var s = this.meta,
+            sid = s ? Ext.num(s.idIndex, s.id) : null,
+            recordType = this.recordType, 
+            fields = recordType.prototype.fields,
+            records = [],
+            v;
+
+        if(!this.getRoot) {
+            this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p) {return p;};
+            if(s.totalProperty) {
+                this.getTotal = this.getJsonAccessor(s.totalProperty);
+            }
+        }
+
+        var root = this.getRoot(o);
+
+        for(var i = 0; i < root.length; i++) {
+            var n = root[i];
+            var values = {};
+            var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null);
+            for(var j = 0, jlen = fields.length; j < jlen; j++) {
+                var f = fields.items[j];
+                var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j;
+                v = n[k] !== undefined ? n[k] : f.defaultValue;
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.json = n;
+            records[records.length] = record;
+        }
+
+        var totalRecords = records.length;
+
+        if(s.totalProperty) {
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)) {
+                totalRecords = v;
+            }
+        }
+
+        return {
+            records : records,
+            totalRecords : totalRecords
+        };
+    }
+});/**
+ * @class Ext.data.ArrayStore
+ * @extends Ext.data.Store
+ * <p>Formerly known as "SimpleStore".</p>
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from Array data easier.
+ * An ArrayStore will be automatically configured with a {@link Ext.data.ArrayReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.ArrayStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    // reader configs
+    idIndex: 0,  
+    fields: [
+       'company',
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+var myData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+];
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.ArrayReader ArrayReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype arraystore
+ */
+Ext.data.ArrayStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.ArrayReader(config)
+        }));
+    },
+
+    loadData : function(data, append){
+        if(this.expandData === true){
+            var r = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                r[r.length] = [data[i]];
+            }
+            data = r;
+        }
+        Ext.data.ArrayStore.superclass.loadData.call(this, data, append);
+    }
+});
+Ext.reg('arraystore', Ext.data.ArrayStore);
+
+// backwards compat
+Ext.data.SimpleStore = Ext.data.ArrayStore;
+Ext.reg('simplestore', Ext.data.SimpleStore);/**
+ * @class Ext.data.JsonStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from JSON data easier.
+ * A JsonStore will be automatically configured with a {@link Ext.data.JsonReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.JsonStore({
+    // store configs
+    autoDestroy: true,
+    url: 'get-images.php',
+    storeId: 'myStore',
+    // reader configs
+    root: 'images',
+    idProperty: 'name',  
+    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+{
+    images: [
+        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
+        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
+    ]
+}
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.JsonReader JsonReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype jsonstore
+ */
+Ext.data.JsonStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.JsonReader(config)
+        }));
+    }
+});
+Ext.reg('jsonstore', Ext.data.JsonStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-json.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.JsonWriter=function(a){Ext.data.JsonWriter.superclass.constructor.call(this,a);if(this.returnJson!=undefined){this.encode=this.returnJson}};Ext.extend(Ext.data.JsonWriter,Ext.data.DataWriter,{returnJson:undefined,encode:true,render:function(c,a,d,b){Ext.apply(d,b);if(this.encode===true){if(Ext.isArray(a)&&b[this.meta.idProperty]){d[this.meta.idProperty]=Ext.encode(d[this.meta.idProperty])}d[this.meta.root]=Ext.encode(d[this.meta.root])}},createRecord:function(a){return this.toHash(a)},updateRecord:function(a){return this.toHash(a)},destroyRecord:function(a){return a.id}});Ext.data.JsonReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:"id",successProperty:"success",totalProperty:"total"});Ext.data.JsonReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(a){var b=a.responseText;var c=Ext.decode(b);if(!c){throw {message:"JsonReader.read: Json object not found"}}return this.readRecords(c)},onMetaChange:function(a,c,b){},simpleAccess:function(b,a){return b[a]},getJsonAccessor:function(){var a=/[\[\.]/;return function(c){try{return(a.test(c))?new Function("obj","return obj."+c):function(d){return d[c]}}catch(b){}return Ext.emptyFn}}(),readRecords:function(a){this.jsonData=a;if(a.metaData){delete this.ef;this.meta=a.metaData;this.recordType=Ext.data.Record.create(a.metaData.fields);this.onMetaChange(this.meta,this.recordType,a)}var u=this.meta,m=this.recordType,h=m.prototype.fields,t=h.items,p=h.length,q;this.buildExtractors();var l=this.getRoot(a),k=l.length,j=k,r=true;if(u.totalProperty){q=parseInt(this.getTotal(a),10);if(!isNaN(q)){j=q}}if(u.successProperty){q=this.getSuccess(a);if(q===false||q==="false"){r=false}}var d=[];for(var e=0;e<k;e++){var b=l[e];var g=new m(this.extractValues(b,t,p),this.getId(b));g.json=b;d[e]=g}return{success:r,records:d,totalRecords:j}},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.getJsonAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.getJsonAccessor(l.successProperty)}this.getRoot=l.root?this.getJsonAccessor(l.root):function(f){return f};if(l.id||l.idProperty){var d=this.getJsonAccessor(l.id||l.idProperty);this.getId=function(g){var f=d(g);return(f===undefined||f==="")?null:f}}else{this.getId=function(){return null}}var c=[];for(var b=0;b<j;b++){e=k[b];var a=(e.mapping!==undefined&&e.mapping!==null)?e.mapping:e.name;c.push(this.getJsonAccessor(a))}this.ef=c},extractValues:function(h,d,a){var g,c={};for(var e=0;e<a;e++){g=d[e];var b=this.ef[e](h);c[g.name]=g.convert((b!==undefined)?b:g.defaultValue,h)}return c},readResponse:function(b,a){var c=(a.responseText!==undefined)?Ext.decode(a.responseText):a;if(!c){throw new Ext.data.JsonReader.Error("response")}if(Ext.isEmpty(c[this.meta.successProperty])){throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty)}if((b===Ext.data.Api.actions.create||b===Ext.data.Api.actions.update)){if(Ext.isEmpty(c[this.meta.root])){throw new Ext.data.JsonReader.Error("root-emtpy",this.meta.root)}else{if(c[this.meta.root]===undefined){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}this.ef=this.buildExtractors();return c}});Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.JsonReader"});Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',"root-undefined-response":'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',"root-undefined-config":'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',"idProperty-undefined":'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',"root-emtpy":'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'}});Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(q){this.arrayData=q;var h=this.meta,d=h?Ext.num(h.idIndex,h.id):null,b=this.recordType,p=b.prototype.fields,y=[],e;if(!this.getRoot){this.getRoot=h.root?this.getJsonAccessor(h.root):function(f){return f};if(h.totalProperty){this.getTotal=this.getJsonAccessor(h.totalProperty)}}var t=this.getRoot(q);for(var x=0;x<t.length;x++){var r=t[x];var a={};var m=((d||d===0)&&r[d]!==undefined&&r[d]!==""?r[d]:null);for(var w=0,l=p.length;w<l;w++){var z=p.items[w];var u=z.mapping!==undefined&&z.mapping!==null?z.mapping:w;e=r[u]!==undefined?r[u]:z.defaultValue;e=z.convert(e,r);a[z.name]=e}var c=new b(a,m);c.json=r;y[y.length]=c}var g=y.length;if(h.totalProperty){e=parseInt(this.getTotal(q),10);if(!isNaN(e)){g=e}}return{records:y,totalRecords:g}}});Ext.data.ArrayStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.ArrayStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.ArrayReader(a)}))},loadData:function(e,b){if(this.expandData===true){var d=[];for(var c=0,a=e.length;c<a;c++){d[d.length]=[e[c]]}e=d}Ext.data.ArrayStore.superclass.loadData.call(this,e,b)}});Ext.reg("arraystore",Ext.data.ArrayStore);Ext.data.SimpleStore=Ext.data.ArrayStore;Ext.reg("simplestore",Ext.data.SimpleStore);Ext.data.JsonStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.JsonReader(a)}))}});Ext.reg("jsonstore",Ext.data.JsonStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views-debug.js	(revision 625)
@@ -0,0 +1,1278 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DataView
+ * @extends Ext.BoxComponent
+ * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate}
+ * as its internal templating mechanism, and is bound to an {@link Ext.data.Store}
+ * so that as the data in the store changes the view is automatically updated to reflect the changes.  The view also
+ * provides built-in behavior for many common events that can occur for its contained items including click, doubleclick,
+ * mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an {@link #itemSelector}
+ * config must be provided for the DataView to determine what nodes it will be working with.</b>
+ *
+ * <p>The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.</p>
+ * <pre><code>
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var tpl = new Ext.XTemplate(
+    '&lt;tpl for="."&gt;',
+        '&lt;div class="thumb-wrap" id="{name}"&gt;',
+        '&lt;div class="thumb"&gt;&lt;img src="{url}" title="{name}"&gt;&lt;/div&gt;',
+        '&lt;span class="x-editable"&gt;{shortName}&lt;/span&gt;&lt;/div&gt;',
+    '&lt;/tpl&gt;',
+    '&lt;div class="x-clear"&gt;&lt;/div&gt;'
+);
+
+var panel = new Ext.Panel({
+    id:'images-view',
+    frame:true,
+    width:535,
+    autoHeight:true,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple DataView',
+
+    items: new Ext.DataView({
+        store: store,
+        tpl: tpl,
+        autoHeight:true,
+        multiSelect: true,
+        overClass:'x-view-over',
+        itemSelector:'div.thumb-wrap',
+        emptyText: 'No images to display'
+    })
+});
+panel.render(document.body);
+</code></pre>
+ * @constructor
+ * Create a new DataView
+ * @param {Object} config The config object
+ * @xtype dataview
+ */
+Ext.DataView = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String/Array} tpl
+     * The HTML fragment or an array of fragments that will make up the template used by this DataView.  This should
+     * be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
+     */
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} to bind this DataView to.
+     */
+    /**
+     * @cfg {String} itemSelector
+     * <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or 
+     * <tt>span:first-child</tt>) that will be used to determine what nodes this DataView will be
+     * working with.
+     */
+    /**
+     * @cfg {Boolean} multiSelect
+     * True to allow selection of more than one item at a time, false to allow selection of only a single item
+     * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} singleSelect
+     * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
+     * Note that if {@link #multiSelect} = true, this value will be ignored.
+     */
+    /**
+     * @cfg {Boolean} simpleSelect
+     * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
+     * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
+     */
+    /**
+     * @cfg {String} overClass
+     * A CSS class to apply to each item in the view on mouseover (defaults to undefined).
+     */
+    /**
+     * @cfg {String} loadingText
+     * A string to display during data load operations (defaults to undefined).  If specified, this text will be
+     * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
+     * contents will continue to display normally until the new data is loaded and the contents are replaced.
+     */
+    /**
+     * @cfg {String} selectedClass
+     * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
+     */
+    selectedClass : "x-view-selected",
+    /**
+     * @cfg {String} emptyText
+     * The text to display in the view when there is no data to display (defaults to '').
+     */
+    emptyText : "",
+
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
+     */
+    deferEmptyText: true,
+    /**
+     * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
+     */
+    trackOver: false,
+
+    //private
+    last: false,
+
+    // private
+    initComponent : function(){
+        Ext.DataView.superclass.initComponent.call(this);
+        if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){
+            this.tpl = new Ext.XTemplate(this.tpl);
+        }
+
+        this.addEvents(
+            /**
+             * @event beforeclick
+             * Fires before a click is processed. Returns false to cancel the default action.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "beforeclick",
+            /**
+             * @event click
+             * Fires when a template node is clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "click",
+            /**
+             * @event mouseenter
+             * Fires when the mouse enters a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseenter",
+            /**
+             * @event mouseleave
+             * Fires when the mouse leaves a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseleave",
+            /**
+             * @event containerclick
+             * Fires when a click occurs and it is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containerclick",
+            /**
+             * @event dblclick
+             * Fires when a template node is double clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "dblclick",
+            /**
+             * @event contextmenu
+             * Fires when a template node is right clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "contextmenu",
+            /**
+             * @event containercontextmenu
+             * Fires when a right click occurs that is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containercontextmenu",
+            /**
+             * @event selectionchange
+             * Fires when the selected nodes change.
+             * @param {Ext.DataView} this
+             * @param {Array} selections Array of the selected nodes
+             */
+            "selectionchange",
+
+            /**
+             * @event beforeselect
+             * Fires before a selection is made. If any handlers return false, the selection is cancelled.
+             * @param {Ext.DataView} this
+             * @param {HTMLElement} node The node to be selected
+             * @param {Array} selections Array of currently selected nodes
+             */
+            "beforeselect"
+        );
+
+        this.store = Ext.StoreMgr.lookup(this.store);
+        this.all = new Ext.CompositeElementLite();
+        this.selected = new Ext.CompositeElementLite();
+    },
+
+    // private
+    afterRender : function(){
+        Ext.DataView.superclass.afterRender.call(this);
+
+		this.mon(this.getTemplateTarget(), {
+            "click": this.onClick,
+            "dblclick": this.onDblClick,
+            "contextmenu": this.onContextMenu,
+            scope:this
+        });
+
+        if(this.overClass || this.trackOver){
+            this.mon(this.getTemplateTarget(), {
+                "mouseover": this.onMouseOver,
+                "mouseout": this.onMouseOut,
+                scope:this
+            });
+        }
+
+        if(this.store){
+            this.bindStore(this.store, true);
+        }
+    },
+
+    /**
+     * Refreshes the view by reloading the data from the store and re-rendering the template.
+     */
+    refresh : function(){
+        this.clearSelections(false, true);
+        var el = this.getTemplateTarget();
+        el.update("");
+        var records = this.store.getRange();
+        if(records.length < 1){
+            if(!this.deferEmptyText || this.hasSkippedEmptyText){
+                el.update(this.emptyText);
+            }
+            this.all.clear();
+        }else{
+            this.tpl.overwrite(el, this.collectData(records, 0));
+            this.all.fill(Ext.query(this.itemSelector, el.dom));
+            this.updateIndexes(0);
+        }
+        this.hasSkippedEmptyText = true;
+    },
+
+    getTemplateTarget: function(){
+        return this.el;
+    },
+
+    /**
+     * Function which can be overridden to provide custom formatting for each Record that is used by this
+     * DataView's {@link #tpl template} to render each node.
+     * @param {Array/Object} data The raw data object that was used to create the Record.
+     * @param {Number} recordIndex the index number of the Record being prepared for rendering.
+     * @param {Record} record The Record being prepared for rendering.
+     * @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method.
+     * (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
+     */
+    prepareData : function(data){
+        return data;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * DataView's {@link #tpl template} to render the whole DataView.</p>
+     * <p>This is usually an Array of data objects, each element of which is processed by an
+     * {@link Ext.XTemplate XTemplate} which uses <tt>'&lt;tpl for="."&gt;'</tt> to iterate over its supplied
+     * data object as an Array. However, <i>named</i> properties may be placed into the data object to
+     * provide non-repeating data such as headings, totals etc.</p>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Array} An Array of data objects to be processed by a repeating XTemplate. May also
+     * contain <i>named</i> properties.
+     */
+    collectData : function(records, startIndex){
+        var r = [];
+        for(var i = 0, len = records.length; i < len; i++){
+            r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]);
+        }
+        return r;
+    },
+
+    // private
+    bufferRender : function(records){
+        var div = document.createElement('div');
+        this.tpl.overwrite(div, this.collectData(records));
+        return Ext.query(this.itemSelector, div);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        var index = this.store.indexOf(record);
+        var sel = this.isSelected(index);
+        var original = this.all.elements[index];
+        var node = this.bufferRender([record], index)[0];
+
+        this.all.replaceElement(index, node, true);
+        if(sel){
+            this.selected.replaceElement(original, node);
+            this.all.item(index).addClass(this.selectedClass);
+        }
+        this.updateIndexes(index, index);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        if(this.all.getCount() === 0){
+            this.refresh();
+            return;
+        }
+        var nodes = this.bufferRender(records, index), n, a = this.all.elements;
+        if(index < this.all.getCount()){
+            n = this.all.item(index).insertSibling(nodes, 'before', true);
+            a.splice.apply(a, [index, 0].concat(nodes));
+        }else{
+            n = this.all.last().insertSibling(nodes, 'after', true);
+            a.push.apply(a, nodes);
+        }
+        this.updateIndexes(index);
+    },
+
+    // private
+    onRemove : function(ds, record, index){
+        this.deselect(index);
+        this.all.removeElement(index, true);
+        this.updateIndexes(index);
+        if (this.store.getCount() === 0){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Refreshes an individual node's data from the store.
+     * @param {Number} index The item's data index in the store
+     */
+    refreshNode : function(index){
+        this.onUpdate(this.store, this.store.getAt(index));
+    },
+
+    // private
+    updateIndexes : function(startIndex, endIndex){
+        var ns = this.all.elements;
+        startIndex = startIndex || 0;
+        endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1));
+        for(var i = startIndex; i <= endIndex; i++){
+            ns[i].viewIndex = i;
+        }
+    },
+    
+    /**
+     * Returns the store associated with this DataView.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Changes the data store bound to this view and refreshes it.
+     * @param {Store} store The store to bind to this view
+     */
+    bindStore : function(store, initial){
+        if(!initial && 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(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                datachanged: this.refresh,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Returns the template node the passed child belongs to, or null if it doesn't belong to one.
+     * @param {HTMLElement} node
+     * @return {HTMLElement} The template node
+     */
+    findItemFromChild : function(node){
+        return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget());
+    },
+
+    // private
+    onClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            var index = this.indexOf(item);
+            if(this.onItemClick(item, index, e) !== false){
+                this.fireEvent("click", this, index, item, e);
+            }
+        }else{
+            if(this.fireEvent("containerclick", this, e) !== false){
+                this.onContainerClick(e);
+            }
+        }
+    },
+
+    onContainerClick : function(e){
+        this.clearSelections();
+    },
+
+    // private
+    onContextMenu : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("contextmenu", this, this.indexOf(item), item, e);
+        }else{
+            this.fireEvent("containercontextmenu", this, e);
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("dblclick", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOver : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item && item !== this.lastItem){
+            this.lastItem = item;
+            Ext.fly(item).addClass(this.overClass);
+            this.fireEvent("mouseenter", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        if(this.lastItem){
+            if(!e.within(this.lastItem, true, true)){
+                Ext.fly(this.lastItem).removeClass(this.overClass);
+                this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, e);
+                delete this.lastItem;
+            }
+        }
+    },
+
+    // private
+    onItemClick : function(item, index, e){
+        if(this.fireEvent("beforeclick", this, index, item, e) === false){
+            return false;
+        }
+        if(this.multiSelect){
+            this.doMultiSelection(item, index, e);
+            e.preventDefault();
+        }else if(this.singleSelect){
+            this.doSingleSelection(item, index, e);
+            e.preventDefault();
+        }
+        return true;
+    },
+
+    // private
+    doSingleSelection : function(item, index, e){
+        if(e.ctrlKey && this.isSelected(index)){
+            this.deselect(index);
+        }else{
+            this.select(index, false);
+        }
+    },
+
+    // private
+    doMultiSelection : function(item, index, e){
+        if(e.shiftKey && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, index, e.ctrlKey);
+            this.last = last; // reset the last
+        }else{
+            if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){
+                this.deselect(index);
+            }else{
+                this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect);
+            }
+        }
+    },
+
+    /**
+     * Gets the number of selected nodes.
+     * @return {Number} The node count
+     */
+    getSelectionCount : function(){
+        return this.selected.getCount();
+    },
+
+    /**
+     * Gets the currently selected nodes.
+     * @return {Array} An array of HTMLElements
+     */
+    getSelectedNodes : function(){
+        return this.selected.elements;
+    },
+
+    /**
+     * Gets the indexes of the selected nodes.
+     * @return {Array} An array of numeric indexes
+     */
+    getSelectedIndexes : function(){
+        var indexes = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            indexes.push(s[i].viewIndex);
+        }
+        return indexes;
+    },
+
+    /**
+     * Gets an array of the selected records
+     * @return {Array} An array of {@link Ext.data.Record} objects
+     */
+    getSelectedRecords : function(){
+        var r = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets an array of the records from an array of nodes
+     * @param {Array} nodes The nodes to evaluate
+     * @return {Array} records The {@link Ext.data.Record} objects
+     */
+    getRecords : function(nodes){
+        var r = [], s = nodes;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets a record from a node
+     * @param {HTMLElement} node The node to evaluate
+     * @return {Record} record The {@link Ext.data.Record} object
+     */
+    getRecord : function(node){
+        return this.store.getAt(node.viewIndex);
+    },
+
+    /**
+     * Clears all selections.
+     * @param {Boolean} suppressEvent (optional) True to skip firing of the selectionchange event
+     */
+    clearSelections : function(suppressEvent, skipUpdate){
+        if((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0){
+            if(!skipUpdate){
+                this.selected.removeClass(this.selectedClass);
+            }
+            this.selected.clear();
+            this.last = false;
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        }
+    },
+
+    /**
+     * Returns true if the passed node is selected, else false.
+     * @param {HTMLElement/Number} node The node or node index to check
+     * @return {Boolean} True if selected, else false
+     */
+    isSelected : function(node){
+        return this.selected.contains(this.getNode(node));
+    },
+
+    /**
+     * Deselects a node.
+     * @param {HTMLElement/Number} node The node to deselect
+     */
+    deselect : function(node){
+        if(this.isSelected(node)){
+            node = this.getNode(node);
+            this.selected.removeElement(node);
+            if(this.last == node.viewIndex){
+                this.last = false;
+            }
+            Ext.fly(node).removeClass(this.selectedClass);
+            this.fireEvent("selectionchange", this, this.selected.elements);
+        }
+    },
+
+    /**
+     * Selects a set of nodes.
+     * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node,
+     * id of a template node or an array of any of those to select
+     * @param {Boolean} keepExisting (optional) true to keep existing selections
+     * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent
+     */
+    select : function(nodeInfo, keepExisting, suppressEvent){
+        if(Ext.isArray(nodeInfo)){
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            for(var i = 0, len = nodeInfo.length; i < len; i++){
+                this.select(nodeInfo[i], true, true);
+            }
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        } else{
+            var node = this.getNode(nodeInfo);
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            if(node && !this.isSelected(node)){
+                if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){
+                    Ext.fly(node).addClass(this.selectedClass);
+                    this.selected.add(node);
+                    this.last = node.viewIndex;
+                    if(!suppressEvent){
+                        this.fireEvent("selectionchange", this, this.selected.elements);
+                    }
+                }
+            }
+        }
+    },
+
+    /**
+     * Selects a range of nodes. All nodes between start and end are selected.
+     * @param {Number} start The index of the first node in the range
+     * @param {Number} end The index of the last node in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(start, end, keepExisting){
+        if(!keepExisting){
+            this.clearSelections(true);
+        }
+        this.select(this.getNodes(start, end), true);
+    },
+
+    /**
+     * Gets a template node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {HTMLElement} The node or null if it wasn't found
+     */
+    getNode : function(nodeInfo){
+        if(Ext.isString(nodeInfo)){
+            return document.getElementById(nodeInfo);
+        }else if(Ext.isNumber(nodeInfo)){
+            return this.all.elements[nodeInfo];
+        }
+        return nodeInfo;
+    },
+
+    /**
+     * Gets a range nodes.
+     * @param {Number} start (optional) The index of the first node in the range
+     * @param {Number} end (optional) The index of the last node in the range
+     * @return {Array} An array of nodes
+     */
+    getNodes : function(start, end){
+        var ns = this.all.elements;
+        start = start || 0;
+        end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end;
+        var nodes = [], i;
+        if(start <= end){
+            for(i = start; i <= end && ns[i]; i++){
+                nodes.push(ns[i]);
+            }
+        } else{
+            for(i = start; i >= end && ns[i]; i--){
+                nodes.push(ns[i]);
+            }
+        }
+        return nodes;
+    },
+
+    /**
+     * Finds the index of the passed node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {Number} The index of the node or -1
+     */
+    indexOf : function(node){
+        node = this.getNode(node);
+        if(Ext.isNumber(node.viewIndex)){
+            return node.viewIndex;
+        }
+        return this.all.indexOf(node);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(this.loadingText){
+            this.clearSelections(false, true);
+            this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+'</div>');
+            this.all.clear();
+        }
+    },
+
+    onDestroy : function(){
+        Ext.DataView.superclass.onDestroy.call(this);
+        this.bindStore(null);
+    }
+});
+
+/**
+ * Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore)
+ * @param {Store} store The store to bind to this view
+ */
+Ext.DataView.prototype.setStore = Ext.DataView.prototype.bindStore;
+
+Ext.reg('dataview', Ext.DataView);/**
+ * @class Ext.ListView
+ * @extends Ext.DataView
+ * <p>Ext.ListView is a fast and light-weight implentation of a
+ * {@link Ext.grid.GridPanel Grid} like view with the following characteristics:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>resizable columns</li>
+ * <li>selectable</li>
+ * <li>column widths are initially proportioned by percentage based on the container
+ * width and number of columns</li>
+ * <li>uses templates to render the data in any required format</li>
+ * <li>no horizontal scrolling</li>
+ * <li>no editing</li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+// consume JSON of this form:
+{
+   "images":[
+      {
+         "name":"dance_fever.jpg",
+         "size":2067,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/dance_fever.jpg"
+      },
+      {
+         "name":"zack_sink.jpg",
+         "size":2303,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/zack_sink.jpg"
+      }
+   ]
+} 
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var listView = new Ext.ListView({
+    store: store,
+    multiSelect: true,
+    emptyText: 'No images to display',
+    reserveScrollOffset: true,
+    columns: [{
+        header: 'File',
+        width: .5,
+        dataIndex: 'name'
+    },{
+        header: 'Last Modified',
+        width: .35, 
+        dataIndex: 'lastmod',
+        tpl: '{lastmod:date("m-d h:i a")}'
+    },{
+        header: 'Size',
+        dataIndex: 'size',
+        tpl: '{size:fileSize}', // format using Ext.util.Format.fileSize()
+        align: 'right'
+    }]
+});
+
+// put it in a Panel so it looks pretty
+var panel = new Ext.Panel({
+    id:'images-view',
+    width:425,
+    height:250,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple ListView <i>(0 items selected)</i>',
+    items: listView
+});
+panel.render(document.body);
+
+// little bit of feedback
+listView.on('selectionchange', function(view, nodes){
+    var l = nodes.length;
+    var s = l != 1 ? 's' : '';
+    panel.setTitle('Simple ListView <i>('+l+' item'+s+' selected)</i>');
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ * @xtype listview
+ */
+Ext.ListView = Ext.extend(Ext.DataView, {
+    /**
+     * Set this property to <tt>true</tt> to disable the header click handler disabling sort
+     * (defaults to <tt>false</tt>).
+     * @type Boolean
+     * @property disableHeaders
+     */
+    /**
+     * @cfg {Boolean} hideHeaders
+     * <tt>true</tt> to hide the {@link #internalTpl header row} (defaults to <tt>false</tt> so
+     * the {@link #internalTpl header row} will be shown).
+     */
+    /**
+     * @cfg {String} itemSelector
+     * Defaults to <tt>'dl'</tt> to work with the preconfigured <b><tt>{@link Ext.DataView#tpl tpl}</tt></b>.
+     * This setting specifies the CSS selector (e.g. <tt>div.some-class</tt> or <tt>span:first-child</tt>)
+     * that will be used to determine what nodes the ListView will be working with.   
+     */
+    itemSelector: 'dl',
+    /**
+     * @cfg {String} selectedClass The CSS class applied to a selected row (defaults to
+     * <tt>'x-list-selected'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-selected {background-color: yellow;}
+    </code></pre>
+     * @type String
+     */
+    selectedClass:'x-list-selected',
+    /**
+     * @cfg {String} overClass The CSS class applied when over a row (defaults to
+     * <tt>'x-list-over'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-over {background-color: orange;}
+    </code></pre>
+     * @type String
+     */
+    overClass:'x-list-over',
+    /**
+     * @cfg {Boolean} reserveScrollOffset
+     * By default will defer accounting for the configured <b><tt>{@link #scrollOffset}</tt></b>
+     * for 10 milliseconds.  Specify <tt>true</tt> to account for the configured
+     * <b><tt>{@link #scrollOffset}</tt></b> immediately.
+     */
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the scrollbar (defaults to
+     * <tt>19</tt> pixels)
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean/Object} columnResize
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.ColumnResizer}
+     * to enable the columns to be resizable (defaults to <tt>true</tt>).
+     */
+    columnResize: true,
+    /**
+     * @cfg {Array} columns An array of column configuration objects, for example:
+     * <pre><code>
+{
+    align: 'right',
+    dataIndex: 'size',
+    header: 'Size',
+    tpl: '{size:fileSize}',
+    width: .35
+}
+     * </code></pre> 
+     * Acceptable properties for each column configuration object are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>align</tt></b> : String<div class="sub-desc">Set the CSS text-align property
+     * of the column. Defaults to <tt>'left'</tt>.</div></li>
+     * <li><b><tt>dataIndex</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#dataIndex dataIndex} for details.</div></li>
+     * <li><b><tt>header</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#header header} for details.</div></li>
+     * <li><b><tt>tpl</tt></b> : String<div class="sub-desc">Specify a string to pass as the
+     * configuration string for {@link Ext.XTemplate}.  By default an {@link Ext.XTemplate}
+     * will be implicitly created using the <tt>dataIndex</tt>.</div></li>
+     * <li><b><tt>width</tt></b> : Number<div class="sub-desc">Percentage of the container width
+     * this column should be allocated.  Columns that have no width specified will be
+     * allocated with an equal percentage to fill 100% of the container width.  To easily take
+     * advantage of the full container width, leave the width of at least one column undefined.
+     * Note that if you do not want to take up the full width of the container, the width of
+     * every column needs to be explicitly defined.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/Object} columnSort
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.Sorter}
+     * to enable the columns to be sortable (defaults to <tt>true</tt>).
+     */
+    columnSort: true,
+    /**
+     * @cfg {String/Array} internalTpl
+     * The template to be used for the header row.  See {@link #tpl} for more details.
+     */
+
+    initComponent : function(){
+        if(this.columnResize){
+            this.colResizer = new Ext.ListView.ColumnResizer(this.colResizer);
+            this.colResizer.init(this);
+        }
+        if(this.columnSort){
+            this.colSorter = new Ext.ListView.Sorter(this.columnSort);
+            this.colSorter.init(this);
+        }
+        if(!this.internalTpl){
+            this.internalTpl = new Ext.XTemplate(
+                '<div class="x-list-header"><div class="x-list-header-inner">',
+                    '<tpl for="columns">',
+                    '<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id, '-xlhd-{#}">',
+                        '{header}',
+                    '</em></div>',
+                    '</tpl>',
+                    '<div class="x-clear"></div>',
+                '</div></div>',
+                '<div class="x-list-body"><div class="x-list-body-inner">',
+                '</div></div>'
+            );
+        }
+        if(!this.tpl){
+            this.tpl = new Ext.XTemplate(
+                '<tpl for="rows">',
+                    '<dl>',
+                        '<tpl for="parent.columns">',
+                        '<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',
+                            '{[values.tpl.apply(parent)]}',
+                        '</em></dt>',
+                        '</tpl>',
+                        '<div class="x-clear"></div>',
+                    '</dl>',
+                '</tpl>'
+            );
+        };
+        var cs = this.columns, allocatedWidth = 0, colsWithWidth = 0, len = cs.length;
+        for(var i = 0; i < len; i++){
+            var c = cs[i];
+            if(!c.tpl){
+                c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}');
+            }else if(Ext.isString(c.tpl)){
+                c.tpl = new Ext.XTemplate(c.tpl);
+            }
+            c.align = c.align || 'left';
+            if(Ext.isNumber(c.width)){
+                c.width *= 100;
+                allocatedWidth += c.width;
+                colsWithWidth++;
+            }
+        }
+        // auto calculate missing column widths
+        if(colsWithWidth < len){
+            var remaining = len - colsWithWidth;
+            if(allocatedWidth < 100){
+                var perCol = ((100-allocatedWidth) / remaining);
+                for(var j = 0; j < len; j++){
+                    var c = cs[j];
+                    if(!Ext.isNumber(c.width)){
+                        c.width = perCol;
+                    }
+                }
+            }
+        }
+        Ext.ListView.superclass.initComponent.call(this);
+    },
+
+    onRender : function(){
+        Ext.ListView.superclass.onRender.apply(this, arguments);
+
+        this.internalTpl.overwrite(this.el, {columns: this.columns});
+        
+        this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild);
+        this.innerHd = Ext.get(this.el.dom.firstChild.firstChild);
+
+        if(this.hideHeaders){
+            this.el.dom.firstChild.style.display = 'none';
+        }
+    },
+
+    getTemplateTarget : function(){
+        return this.innerBody;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * view's {@link #tpl template} to render the whole ListView. The returned object 
+     * shall contain the following properties:</p>
+     * <div class="mdetail-params"><ul>
+     * <li><b>columns</b> : String<div class="sub-desc">See <tt>{@link #columns}</tt></div></li>
+     * <li><b>rows</b> : String<div class="sub-desc">See
+     * <tt>{@link Ext.DataView}.{@link Ext.DataView#collectData collectData}</div></li>
+     * </ul></div>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Object} A data object containing properties to be processed by a repeating
+     * XTemplate as described above.
+     */
+    collectData : function(){
+        var rs = Ext.ListView.superclass.collectData.apply(this, arguments);
+        return {
+            columns: this.columns,
+            rows: rs
+        }
+    },
+
+    verifyInternalSize : function(){
+        if(this.lastSize){
+            this.onResize(this.lastSize.width, this.lastSize.height);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        var bd = this.innerBody.dom;
+        var hd = this.innerHd.dom
+        if(!bd){
+            return;
+        }
+        var bdp = bd.parentNode;
+        if(Ext.isNumber(w)){
+            var sw = w - this.scrollOffset;
+            if(this.reserveScrollOffset || ((bdp.offsetWidth - bdp.clientWidth) > 10)){
+                bd.style.width = sw + 'px';
+                hd.style.width = sw + 'px';
+            }else{
+                bd.style.width = w + 'px';
+                hd.style.width = w + 'px';
+                setTimeout(function(){
+                    if((bdp.offsetWidth - bdp.clientWidth) > 10){
+                        bd.style.width = sw + 'px';
+                        hd.style.width = sw + 'px';
+                    }
+                }, 10);
+            }
+        }
+        if(Ext.isNumber(h == 'number')){
+            bdp.style.height = (h - hd.parentNode.offsetHeight) + 'px';
+        }
+    },
+
+    updateIndexes : function(){
+        Ext.ListView.superclass.updateIndexes.apply(this, arguments);
+        this.verifyInternalSize();
+    },
+
+    findHeaderIndex : function(hd){
+        hd = hd.dom || hd;
+        var pn = hd.parentNode, cs = pn.parentNode.childNodes;
+        for(var i = 0, c; c = cs[i]; i++){
+            if(c == pn){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    setHdWidths : function(){
+        var els = this.innerHd.dom.getElementsByTagName('div');
+        for(var i = 0, cs = this.columns, len = cs.length; i < len; i++){
+            els[i].style.width = cs[i].width + '%';
+        }
+    }
+});
+
+Ext.reg('listview', Ext.ListView);/**
+ * @class Ext.ListView.ColumnResizer
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.ColumnResizer = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Number} minPct The minimum percentage to allot for any column (defaults to <tt>.05</tt>)
+     */
+    minPct: .05,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.ColumnResizer.superclass.constructor.call(this);
+    },
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'mousemove', this.handleHdMove, this);
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeStart.createDelegate(this),
+            onStart: this.onStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(view.innerHd);
+        view.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+    handleHdMove : function(e, t){
+        var hw = 5;
+        var x = e.getPageX();
+        var hd = e.getTarget('em', 3, true);
+        if(hd){
+            var r = hd.getRegion();
+            var ss = hd.dom.style;
+            var pn = hd.dom.parentNode;
+
+            if(x - r.left <= hw && pn != pn.parentNode.firstChild){
+                this.activeHd = Ext.get(pn.previousSibling.firstChild);
+				ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize';
+            } else if(r.right - x <= hw && pn != pn.parentNode.lastChild.previousSibling){
+                this.activeHd = hd;
+				ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
+            } else{
+                delete this.activeHd;
+                ss.cursor = '';
+            }
+        }
+    },
+
+    onBeforeStart : function(e){
+        this.dragHd = this.activeHd;
+        return !!this.dragHd;
+    },
+
+    onStart: function(e){
+        this.view.disableHeaders = true;
+        this.proxy = this.view.el.createChild({cls:'x-list-resizer'});
+        this.proxy.setHeight(this.view.el.getHeight());
+
+        var x = this.tracker.getXY()[0];
+        var w = this.view.innerHd.getWidth();
+
+        this.hdX = this.dragHd.getX();
+        this.hdIndex = this.view.findHeaderIndex(this.dragHd);
+
+        this.proxy.setX(this.hdX);
+        this.proxy.setWidth(x-this.hdX);
+
+        this.minWidth = w*this.minPct;
+        this.maxWidth = w - (this.minWidth*(this.view.columns.length-1-this.hdIndex));
+    },
+
+    onDrag: function(e){
+        var cursorX = this.tracker.getXY()[0];
+        this.proxy.setWidth((cursorX-this.hdX).constrain(this.minWidth, this.maxWidth));
+    },
+
+    onEnd: function(e){
+        var nw = this.proxy.getWidth();
+        this.proxy.remove();
+
+        var index = this.hdIndex;
+        var vw = this.view, cs = vw.columns, len = cs.length;
+        var w = this.view.innerHd.getWidth(), minPct = this.minPct * 100;
+
+        var pct = Math.ceil((nw*100) / w);
+        var diff = cs[index].width - pct;
+        var each = Math.floor(diff / (len-1-index));
+        var mod = diff - (each * (len-1-index));
+
+        for(var i = index+1; i < len; i++){
+            var cw = cs[i].width + each;
+            var ncw = Math.max(minPct, cw);
+            if(cw != ncw){
+                mod += cw - ncw;
+            }
+            cs[i].width = ncw;
+        }
+        cs[index].width = pct;
+        cs[index+1].width += mod;
+        delete this.dragHd;
+        this.view.setHdWidths();
+        this.view.refresh();
+        setTimeout(function(){
+            vw.disableHeaders = false;
+        }, 100);
+    }
+});/**
+ * @class Ext.ListView.Sorter
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.Sorter = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Array} sortClasses
+     * The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.Sorter.superclass.constructor.call(this);
+    },
+
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'click', this.onHdClick, this);
+        view.innerHd.setStyle('cursor', 'pointer');
+        view.mon(view.store, 'datachanged', this.updateSortState, this);
+        this.updateSortState.defer(10, this, [view.store]);
+    },
+
+    updateSortState : function(store){
+        var state = store.getSortState();
+        if(!state){
+            return;
+        }
+        this.sortState = state;
+        var cs = this.view.columns, sortColumn = -1;
+        for(var i = 0, len = cs.length; i < len; i++){
+            if(cs[i].dataIndex == state.field){
+                sortColumn = i;
+                break;
+            }
+        }
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.view.innerHd.select('em').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    onHdClick : function(e){
+        var hd = e.getTarget('em', 3);
+        if(hd && !this.view.disableHeaders){
+            var index = this.view.findHeaderIndex(hd);
+            this.view.store.sort(this.view.columns[index].dataIndex);
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-list-views.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.bindStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);var b=this.getTemplateTarget();b.update("");var a=this.store.getRange();if(a.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){b.update(this.emptyText)}this.all.clear()}else{this.tpl.overwrite(b,this.collectData(a,0));this.all.fill(Ext.query(this.itemSelector,b.dom));this.updateIndexes(0)}this.hasSkippedEmptyText=true},getTemplateTarget:function(){return this.el},prepareData:function(a){return a},collectData:function(b,e){var d=[];for(var c=0,a=b.length;c<a;c++){d[d.length]=this.prepareData(b[c].data,e+c,b[c])}return d},bufferRender:function(a){var b=document.createElement("div");this.tpl.overwrite(b,this.collectData(a));return Ext.query(this.itemSelector,b)},onUpdate:function(f,a){var b=this.store.indexOf(a);var e=this.isSelected(b);var c=this.all.elements[b];var d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)},onAdd:function(f,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),g,b=this.all.elements;if(e<this.all.getCount()){g=this.all.item(e).insertSibling(c,"before",true);b.splice.apply(b,[e,0].concat(c))}else{g=this.all.last().insertSibling(c,"after",true);b.push.apply(b,c)}this.updateIndexes(e)},onRemove:function(c,a,b){this.deselect(b);this.all.removeElement(b,true);this.updateIndexes(b);if(this.store.getCount()===0){this.refresh()}},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(d,c){var b=this.all.elements;d=d||0;c=c||((c===0)?0:(b.length-1));for(var a=d;a<=c;a++){b[a].viewIndex=a}},getStore:function(){return this.store},bindStore: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!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.refresh,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh})}this.store=a;if(a){this.refresh()}},findItemFromChild:function(a){return Ext.fly(a).findParent(this.itemSelector,this.getTemplateTarget())},onClick:function(c){var b=c.getTarget(this.itemSelector,this.getTemplateTarget());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.onContainerClick(c)}}},onContainerClick:function(a){this.clearSelections()},onContextMenu:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("contextmenu",this,this.indexOf(a),a,b)}else{this.fireEvent("containercontextmenu",this,b)}},onDblClick:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("dblclick",this,this.indexOf(a),a,b)}},onMouseOver:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());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,true)){Ext.fly(this.lastItem).removeClass(this.overClass);this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,a);delete this.lastItem}}},onItemClick:function(b,a,c){if(this.fireEvent("beforeclick",this,a,b,c)===false){return false}if(this.multiSelect){this.doMultiSelection(b,a,c);c.preventDefault()}else{if(this.singleSelect){this.doSingleSelection(b,a,c);c.preventDefault()}}return true},doSingleSelection:function(b,a,c){if(c.ctrlKey&&this.isSelected(a)){this.deselect(a)}else{this.select(a,false)}},doMultiSelection:function(c,a,d){if(d.shiftKey&&this.last!==false){var b=this.last;this.selectRange(b,a,d.ctrlKey);this.last=b}else{if((d.ctrlKey||this.simpleSelect)&&this.isSelected(a)){this.deselect(a)}else{this.select(a,d.ctrlKey||d.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var b=[],d=this.selected.elements;for(var c=0,a=d.length;c<a;c++){b.push(d[c].viewIndex)}return b},getSelectedRecords:function(){var d=[],c=this.selected.elements;for(var b=0,a=c.length;b<a;b++){d[d.length]=this.store.getAt(c[b].viewIndex)}return d},getRecords:function(b){var e=[],d=b;for(var c=0,a=d.length;c<a;c++){e[e.length]=this.store.getAt(d[c].viewIndex)}return e},getRecord:function(a){return this.store.getAt(a.viewIndex)},clearSelections:function(a,b){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,f,b){if(Ext.isArray(d)){if(!f){this.clearSelections(true)}for(var c=0,a=d.length;c<a;c++){this.select(d[c],true,true)}if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var e=this.getNode(d);if(!f){this.clearSelections(true)}if(e&&!this.isSelected(e)){if(this.fireEvent("beforeselect",this,e,this.selected.elements)!==false){Ext.fly(e).addClass(this.selectedClass);this.selected.add(e);this.last=e.viewIndex;if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}}}},selectRange:function(c,a,b){if(!b){this.clearSelections(true)}this.select(this.getNodes(c,a),true)},getNode:function(a){if(Ext.isString(a)){return document.getElementById(a)}else{if(Ext.isNumber(a)){return this.all.elements[a]}}return a},getNodes:function(e,a){var d=this.all.elements;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;var b=[],c;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:19,columnResize:true,columnSort:true,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.ListView.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.ListView.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>")}if(!this.tpl){this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>")}var h=this.columns,f=0,g=0,k=h.length;for(var e=0;e<k;e++){var l=h[e];if(!l.tpl){l.tpl=new Ext.XTemplate("{"+l.dataIndex+"}")}else{if(Ext.isString(l.tpl)){l.tpl=new Ext.XTemplate(l.tpl)}}l.align=l.align||"left";if(Ext.isNumber(l.width)){l.width*=100;f+=l.width;g++}}if(g<k){var b=k-g;if(f<100){var a=((100-f)/b);for(var d=0;d<k;d++){var l=h[d];if(!Ext.isNumber(l.width)){l.width=a}}}}Ext.ListView.superclass.initComponent.call(this)},onRender:function(){Ext.ListView.superclass.onRender.apply(this,arguments);this.internalTpl.overwrite(this.el,{columns:this.columns});this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild);this.innerHd=Ext.get(this.el.dom.firstChild.firstChild);if(this.hideHeaders){this.el.dom.firstChild.style.display="none"}},getTemplateTarget:function(){return this.innerBody},collectData:function(){var a=Ext.ListView.superclass.collectData.apply(this,arguments);return{columns:this.columns,rows:a}},verifyInternalSize:function(){if(this.lastSize){this.onResize(this.lastSize.width,this.lastSize.height)}},onResize:function(b,d){var e=this.innerBody.dom;var f=this.innerHd.dom;if(!e){return}var c=e.parentNode;if(Ext.isNumber(b)){var a=b-this.scrollOffset;if(this.reserveScrollOffset||((c.offsetWidth-c.clientWidth)>10)){e.style.width=a+"px";f.style.width=a+"px"}else{e.style.width=b+"px";f.style.width=b+"px";setTimeout(function(){if((c.offsetWidth-c.clientWidth)>10){e.style.width=a+"px";f.style.width=a+"px"}},10)}}if(Ext.isNumber(d=="number")){c.style.height=(d-f.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(e){e=e.dom||e;var a=e.parentNode,d=a.parentNode.childNodes;for(var b=0,f;f=d[b];b++){if(f==a){return b}}return -1},setHdWidths:function(){var c=this.innerHd.dom.getElementsByTagName("div");for(var b=0,d=this.columns,a=d.length;b<a;b++){c[b].style.width=d[b].width+"%"}}});Ext.reg("listview",Ext.ListView);Ext.ListView.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:0.05,constructor:function(a){Ext.apply(this,a);Ext.ListView.ColumnResizer.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"mousemove",this.handleHdMove,this);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(a.innerHd);a.on("beforedestroy",this.tracker.destroy,this.tracker)},handleHdMove:function(i,f){var b=5;var a=i.getPageX();var h=i.getTarget("em",3,true);if(h){var g=h.getRegion();var d=h.dom.style;var c=h.dom.parentNode;if(a-g.left<=b&&c!=c.parentNode.firstChild){this.activeHd=Ext.get(c.previousSibling.firstChild);d.cursor=Ext.isWebKit?"e-resize":"col-resize"}else{if(g.right-a<=b&&c!=c.parentNode.lastChild.previousSibling){this.activeHd=h;d.cursor=Ext.isWebKit?"w-resize":"col-resize"}else{delete this.activeHd;d.cursor=""}}}},onBeforeStart:function(a){this.dragHd=this.activeHd;return !!this.dragHd},onStart:function(c){this.view.disableHeaders=true;this.proxy=this.view.el.createChild({cls:"x-list-resizer"});this.proxy.setHeight(this.view.el.getHeight());var a=this.tracker.getXY()[0];var b=this.view.innerHd.getWidth();this.hdX=this.dragHd.getX();this.hdIndex=this.view.findHeaderIndex(this.dragHd);this.proxy.setX(this.hdX);this.proxy.setWidth(a-this.hdX);this.minWidth=b*this.minPct;this.maxWidth=b-(this.minWidth*(this.view.columns.length-1-this.hdIndex))},onDrag:function(b){var a=this.tracker.getXY()[0];this.proxy.setWidth((a-this.hdX).constrain(this.minWidth,this.maxWidth))},onEnd:function(k){var h=this.proxy.getWidth();this.proxy.remove();var g=this.hdIndex;var n=this.view,f=n.columns,j=f.length;var p=this.view.innerHd.getWidth(),d=this.minPct*100;var q=Math.ceil((h*100)/p);var o=f[g].width-q;var m=Math.floor(o/(j-1-g));var l=o-(m*(j-1-g));for(var c=g+1;c<j;c++){var b=f[c].width+m;var a=Math.max(d,b);if(b!=a){l+=b-a}f[c].width=a}f[g].width=q;f[g+1].width+=l;delete this.dragHd;this.view.setHdWidths();this.view.refresh();setTimeout(function(){n.disableHeaders=false},100)}});Ext.ListView.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(a){Ext.apply(this,a);Ext.ListView.Sorter.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"click",this.onHdClick,this);a.innerHd.setStyle("cursor","pointer");a.mon(a.store,"datachanged",this.updateSortState,this);this.updateSortState.defer(10,this,[a.store])},updateSortState:function(c){var f=c.getSortState();if(!f){return}this.sortState=f;var e=this.view.columns,g=-1;for(var d=0,a=e.length;d<a;d++){if(e[d].dataIndex==f.field){g=d;break}}if(g!=-1){var b=f.direction;this.updateSortIcon(g,b)}},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.view.innerHd.select("em").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},onHdClick:function(c){var b=c.getTarget("em",3);if(b&&!this.view.disableHeaders){var a=this.view.findHeaderIndex(b);this.view.store.sort(this.view.columns[a].dataIndex)}}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml-debug.js	(revision 625)
@@ -0,0 +1,234 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.XmlWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action via XML.
+ */
+Ext.data.XmlWriter = Ext.extend(Ext.data.DataWriter, {
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        // no impl.
+    },
+    /**
+     * createRecord
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        // no impl
+    },
+    /**
+     * updateRecord
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        // no impl.
+
+    },
+    /**
+     * destroyRecord
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        // no impl
+    }
+});/**
+ * @class Ext.data.XmlReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p><b>Note</b>: that in order for the browser to parse a returned XML document, the Content-Type
+ * header in the HTTP response must be set to "text/xml" or "application/xml".</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it is the same as "name"
+   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
+]);
+var myReader = new Ext.data.XmlReader({
+   totalRecords: "results", // The element which contains the total dataset size (optional)
+   record: "row",           // The repeated element which contains row information
+   id: "id"                 // The element within the row that provides an ID for the record (optional)
+}, Employee);
+</code></pre>
+ * <p>
+ * This would consume an XML file like this:
+ * <pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;dataset>
+ &lt;results>2&lt;/results>
+ &lt;row>
+   &lt;id>1&lt;/id>
+   &lt;name>Bill&lt;/name>
+   &lt;occupation>Gardener&lt;/occupation>
+ &lt;/row>
+ &lt;row>
+   &lt;id>2&lt;/id>
+   &lt;name>Ben&lt;/name>
+   &lt;occupation>Horticulturalist&lt;/occupation>
+ &lt;/row>
+&lt;/dataset>
+</code></pre>
+ * @cfg {String} totalRecords The DomQuery path from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.
+ * @cfg {String} record The DomQuery path to the repeated element which contains record information.
+ * @cfg {String} success The DomQuery path to the success attribute used by forms.
+ * @cfg {String} idPath The DomQuery path relative from the record element to the element that contains
+ * a record identifier value.
+ * @constructor
+ * Create a new XmlReader.
+ * @param {Object} meta Metadata configuration options
+ * @param {Object} recordType Either an Array of field definition objects as passed to
+ * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}.
+ */
+Ext.data.XmlReader = function(meta, recordType){
+    meta = meta || {};
+    Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the parsed XML document.  The response is expected
+     * to contain a property called <tt>responseXML</tt> which refers to an XML document object.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var doc = response.responseXML;
+        if(!doc) {
+            throw {message: "XmlReader.read: XML Document not available"};
+        }
+        return this.readRecords(doc);
+    },
+
+    /**
+     * Create a data block containing Ext.data.Records from an XML document.
+     * @param {Object} doc A parsed XML document.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(doc){
+        /**
+         * After any data loads/reads, the raw XML Document is available for further custom processing.
+         * @type XMLDocument
+         */
+        this.xmlData = doc;
+        var root = doc.documentElement || doc;
+        var q = Ext.DomQuery;
+        var recordType = this.recordType, fields = recordType.prototype.fields;
+        var sid = this.meta.idPath || this.meta.id;
+        var totalRecords = 0, success = true;
+        if(this.meta.totalRecords){
+            totalRecords = q.selectNumber(this.meta.totalRecords, root, 0);
+        }
+
+        if(this.meta.success){
+            var sv = q.selectValue(this.meta.success, root, true);
+            success = sv !== false && sv !== 'false';
+        }
+        var records = [];
+        var ns = q.select(this.meta.record, root);
+        for(var i = 0, len = ns.length; i < len; i++) {
+            var n = ns[i];
+            var values = {};
+            var id = sid ? q.selectValue(sid, n) : undefined;
+            for(var j = 0, jlen = fields.length; j < jlen; j++){
+                var f = fields.items[j];
+                var v = q.selectValue(Ext.value(f.mapping, f.name, true), n, f.defaultValue);
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.node = n;
+            records[records.length] = record;
+        }
+
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords || records.length
+        };
+    },
+
+    // TODO: implement readResponse for XmlReader
+    readResponse : Ext.emptyFn
+});/**
+ * @class Ext.data.XmlStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
+ * A XmlStore will be automatically configured with a {@link Ext.data.XmlReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.XmlStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    url: 'sheldon.xml', // automatically configures a HttpProxy
+    // reader configs
+    record: 'Item', // records will have an "Item" tag
+    idPath: 'ASIN',
+    totalRecords: '@TotalResults'
+    fields: [
+        // set up the fields mapping into the xml doc
+        // The first needs mapping, the others are very basic
+        {name: 'Author', mapping: 'ItemAttributes > Author'},
+        'Title', 'Manufacturer', 'ProductGroup'
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+&#60?xml version="1.0" encoding="UTF-8"?>
+&#60ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
+    &#60Items>
+        &#60Request>
+            &#60IsValid>True&#60/IsValid>
+            &#60ItemSearchRequest>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60SearchIndex>Books&#60/SearchIndex>
+            &#60/ItemSearchRequest>
+        &#60/Request>
+        &#60TotalResults>203&#60/TotalResults>
+        &#60TotalPages>21&#60/TotalPages>
+        &#60Item>
+            &#60ASIN>0446355453&#60/ASIN>
+            &#60DetailPageURL>
+                http://www.amazon.com/
+            &#60/DetailPageURL>
+            &#60ItemAttributes>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60Manufacturer>Warner Books&#60/Manufacturer>
+                &#60ProductGroup>Book&#60/ProductGroup>
+                &#60Title>Master of the Game&#60/Title>
+            &#60/ItemAttributes>
+        &#60/Item>
+    &#60/Items>
+&#60/ItemSearchResponse>
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.XmlReader XmlReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype xmlstore
+ */
+Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.XmlReader(config)
+        }));
+    }
+});
+Ext.reg('xmlstore', Ext.data.XmlStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/data-xml.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.XmlWriter=Ext.extend(Ext.data.DataWriter,{render:function(c,a,d,b){},createRecord:function(a){},updateRecord:function(a){},destroyRecord:function(a){}});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(z){this.xmlData=z;var s=z.documentElement||z;var l=Ext.DomQuery;var b=this.recordType,p=b.prototype.fields;var d=this.meta.idPath||this.meta.id;var h=0,e=true;if(this.meta.totalRecords){h=l.selectNumber(this.meta.totalRecords,s,0)}if(this.meta.success){var o=l.selectValue(this.meta.success,s,true);e=o!==false&&o!=="false"}var w=[];var A=l.select(this.meta.record,s);for(var u=0,x=A.length;u<x;u++){var r=A[u];var a={};var m=d?l.selectValue(d,r):undefined;for(var t=0,k=p.length;t<k;t++){var y=p.items[t];var g=l.selectValue(Ext.value(y.mapping,y.name,true),r,y.defaultValue);g=y.convert(g,r);a[y.name]=g}var c=new b(a,m);c.node=r;w[w.length]=c}return{success:e,records:w,totalRecords:h||w.length}},readResponse:Ext.emptyFn});Ext.data.XmlStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.XmlReader(a)}))}});Ext.reg("xmlstore",Ext.data.XmlStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct-debug.js	(revision 625)
@@ -0,0 +1,1121 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DirectProxy
+ * @extends Ext.data.DataProxy
+ */
+Ext.data.DirectProxy = function(config){
+    Ext.apply(this, config);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    Ext.data.DirectProxy.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash
+     * Send parameters as a collection of named arguments (defaults to <tt>true</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: true,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.  directFn is a simple alternative to defining the api configuration-parameter
+     * for Store's which will not implement a full CRUD api.
+     */
+    directFn : undefined,
+
+    // protected
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        var args = [];
+        var directFn = this.api[action] || this.directFn;
+
+        switch (action) {
+            case Ext.data.Api.actions.create:
+                args.push(params[reader.meta.root]);		// <-- create(Hash)
+                break;
+            case Ext.data.Api.actions.read:
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        args.push(params[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    args.push(params);
+                }
+                break;
+            case Ext.data.Api.actions.update:
+                args.push(params[reader.meta.idProperty]);  // <-- save(Integer/Integer[], Hash/Hash[])
+                args.push(params[reader.meta.root]);
+                break;
+            case Ext.data.Api.actions.destroy:
+                args.push(params[reader.meta.root]);        // <-- destroy(Int/Int[])
+                break;
+        }
+
+        var trans = {
+            params : params || {},
+            callback : callback,
+            scope : scope,
+            arg : options,
+            reader: reader
+        };
+
+        args.push(this.createCallback(action, rs, trans), this);
+        directFn.apply(window, args);
+    },
+
+    // private
+    createCallback : function(action, rs, trans) {
+        return function(result, res) {
+            if (!res.status) {
+                // @deprecated fire loadexception
+                if (action === Ext.data.Api.actions.read) {
+                    this.fireEvent("loadexception", this, trans, res, null);
+                }
+                this.fireEvent('exception', this, 'remote', action, trans, res, null);
+                trans.callback.call(trans.scope, null, trans.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, trans, result, res);
+            } else {
+                this.onWrite(action, trans, result, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, result, res) {
+        var records;
+        try {
+            records = trans.reader.readRecords(result);
+        }
+        catch (ex) {
+            // @deprecated: Fire old loadexception for backwards-compat.
+            this.fireEvent("loadexception", this, trans, res, ex);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, ex);
+            trans.callback.call(trans.scope, null, trans.arg, false);
+            return;
+        }
+        this.fireEvent("load", this, res, trans.arg);
+        trans.callback.call(trans.scope, records, trans.arg, true);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, result, res, rs) {
+        this.fireEvent("write", this, action, result, res, rs, trans.arg);
+        trans.callback.call(trans.scope, result, res, true);
+    }
+});
+
+/**
+ * @class Ext.data.DirectStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to create an {@link Ext.data.Store} configured with an
+ * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting
+ * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
+ * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
+ * configured as needed.</p>
+ *
+ * <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
+ * <div><ul class="mdetail-params">
+ * <li><b>{@link Ext.data.Store Store}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ *
+ * </ul></div>
+ * <li><b>{@link Ext.data.JsonReader JsonReader}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.JsonReader#root root}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#idProperty idProperty}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#totalProperty totalProperty}</b></tt></li>
+ * </ul></div>
+ *
+ * <li><b>{@link Ext.data.DirectProxy DirectProxy}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.DirectProxy#directFn directFn}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramOrder paramOrder}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}</b></tt></li>
+ * </ul></div>
+ * </ul></div>
+ *
+ * @xtype directstore
+ *
+ * @constructor
+ * @param {Object} config
+ */
+Ext.data.DirectStore = function(c){
+    // each transaction upon a singe record will generatie a distinct Direct transaction since Direct queues them into one Ajax request.
+    c.batchTransactions = false;
+
+    Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {
+        proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
+        reader: (typeof(c.reader) == 'undefined' && typeof(c.fields) == 'object') ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader
+    }));
+};
+Ext.extend(Ext.data.DirectStore, Ext.data.Store, {});
+Ext.reg('directstore', Ext.data.DirectStore);
+/**
+ * @class Ext.Direct
+ * @extends Ext.util.Observable
+ * <p><b><u>Overview</u></b></p>
+ * 
+ * <p>Ext.Direct aims to streamline communication between the client and server
+ * by providing a single interface that reduces the amount of common code
+ * typically required to validate data and handle returned data packets
+ * (reading data, error conditions, etc).</p>
+ *  
+ * <p>The Ext.direct namespace includes several classes for a closer integration
+ * with the server-side. The Ext.data namespace also includes classes for working
+ * with Ext.data.Stores which are backed by data from an Ext.Direct method.</p>
+ * 
+ * <p><b><u>Specification</u></b></p>
+ * 
+ * <p>For additional information consult the 
+ * <a href="http://extjs.com/products/extjs/direct.php">Ext.Direct Specification</a>.</p>
+ *   
+ * <p><b><u>Providers</u></b></p>
+ * 
+ * <p>Ext.Direct uses a provider architecture, where one or more providers are
+ * used to transport data to and from the server. There are several providers
+ * that exist in the core at the moment:</p><div class="mdetail-params"><ul>
+ * 
+ * <li>{@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations</li>
+ * <li>{@link Ext.direct.PollingProvider PollingProvider} for repeated requests</li>
+ * <li>{@link Ext.direct.RemotingProvider RemotingProvider} exposes server side
+ * on the client.</li>
+ * </ul></div>
+ * 
+ * <p>A provider does not need to be invoked directly, providers are added via
+ * {@link Ext.Direct}.{@link Ext.Direct#add add}.</p>
+ * 
+ * <p><b><u>Router</u></b></p>
+ * 
+ * <p>Ext.Direct utilizes a "router" on the server to direct requests from the client
+ * to the appropriate server-side method. Because the Ext.Direct API is completely
+ * platform-agnostic, you could completely swap out a Java based server solution
+ * and replace it with one that uses C# without changing the client side JavaScript
+ * at all.</p>
+ * 
+ * <p><b><u>Server side events</u></b></p>
+ * 
+ * <p>Custom events from the server may be handled by the client by adding
+ * listeners, for example:</p>
+ * <pre><code>
+{"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
+
+// add a handler for a 'message' event sent by the server 
+Ext.Direct.on('message', function(e){
+    out.append(String.format('&lt;p>&lt;i>{0}&lt;/i>&lt;/p>', e.data));
+            out.el.scrollTo('t', 100000, true);
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.Direct = Ext.extend(Ext.util.Observable, {
+    /**
+     * Each event type implements a getData() method. The default event types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>event</tt></b> : Ext.Direct.Event</li>
+     * <li><b><tt>exception</tt></b> : Ext.Direct.ExceptionEvent</li>
+     * <li><b><tt>rpc</tt></b> : Ext.Direct.RemotingEvent</li>
+     * </ul></div>
+     * @property eventTypes
+     * @type Object
+     */
+
+    /**
+     * Four types of possible exceptions which can occur:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>Ext.Direct.exceptions.TRANSPORT</tt></b> : 'xhr'</li>
+     * <li><b><tt>Ext.Direct.exceptions.PARSE</tt></b> : 'parse'</li>
+     * <li><b><tt>Ext.Direct.exceptions.LOGIN</tt></b> : 'login'</li>
+     * <li><b><tt>Ext.Direct.exceptions.SERVER</tt></b> : 'exception'</li>
+     * </ul></div>
+     * @property exceptions
+     * @type Object
+     */
+    exceptions: {
+        TRANSPORT: 'xhr',
+        PARSE: 'parse',
+        LOGIN: 'login',
+        SERVER: 'exception'
+    },
+    
+    // private
+    constructor: function(){
+        this.addEvents(
+            /**
+             * @event event
+             * Fires after an event.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */
+            'event',
+            /**
+             * @event exception
+             * Fires after an event exception.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */
+            'exception'
+        );
+        this.transactions = {};
+        this.providers = {};
+    },
+
+    /**
+     * Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods.
+     * If the provider is not already connected, it will auto-connect.
+     * <pre><code>
+var pollProv = new Ext.direct.PollingProvider({
+    url: 'php/poll2.php'
+}); 
+
+Ext.Direct.addProvider(
+    {
+        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider} 
+        "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
+        "actions":{              // each property within the actions object represents a Class 
+            "TestAction":[       // array of methods within each server side Class   
+            {
+                "name":"doEcho", // name of method
+                "len":1
+            },{
+                "name":"multiply",
+                "len":1
+            },{
+                "name":"doForm",
+                "formHandler":true, // handle form on server with Ext.Direct.Transaction 
+                "len":1
+            }]
+        },
+        "namespace":"myApplication",// namespace to create the Remoting Provider in
+    },{
+        type: 'polling', // create a {@link Ext.direct.PollingProvider} 
+        url:  'php/poll.php'
+    },
+    pollProv // reference to previously created instance
+);
+     * </code></pre>
+     * @param {Object/Array} provider Accepts either an Array of Provider descriptions (an instance
+     * or config object for a Provider) or any number of Provider descriptions as arguments.  Each
+     * Provider description instructs Ext.Direct how to create client-side stub methods.
+     */
+    addProvider : function(provider){        
+        var a = arguments;
+        if(a.length > 1){
+            for(var i = 0, len = a.length; i < len; i++){
+                this.addProvider(a[i]);
+            }
+            return;
+        }
+        
+        // if provider has not already been instantiated
+        if(!provider.events){
+            provider = new Ext.Direct.PROVIDERS[provider.type](provider);
+        }
+        provider.id = provider.id || Ext.id();
+        this.providers[provider.id] = provider;
+
+        provider.on('data', this.onProviderData, this);
+        provider.on('exception', this.onProviderException, this);
+
+
+        if(!provider.isConnected()){
+            provider.connect();
+        }
+
+        return provider;
+    },
+
+    /**
+     * Retrieve a {@link Ext.direct.Provider provider} by the
+     * <b><tt>{@link Ext.direct.Provider#id id}</tt></b> specified when the provider is
+     * {@link #addProvider added}.
+     * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider} 
+     */
+    getProvider : function(id){
+        return this.providers[id];
+    },
+
+    removeProvider : function(id){
+        var provider = id.id ? id : this.providers[id.id];
+        provider.un('data', this.onProviderData, this);
+        provider.un('exception', this.onProviderException, this);
+        delete this.providers[provider.id];
+        return provider;
+    },
+
+    addTransaction: function(t){
+        this.transactions[t.tid] = t;
+        return t;
+    },
+
+    removeTransaction: function(t){
+        delete this.transactions[t.tid || t];
+        return t;
+    },
+
+    getTransaction: function(tid){
+        return this.transactions[tid.tid || tid];
+    },
+
+    onProviderData : function(provider, e){
+        if(Ext.isArray(e)){
+            for(var i = 0, len = e.length; i < len; i++){
+                this.onProviderData(provider, e[i]);
+            }
+            return;
+        }
+        if(e.name && e.name != 'event' && e.name != 'exception'){
+            this.fireEvent(e.name, e);
+        }else if(e.type == 'exception'){
+            this.fireEvent('exception', e);
+        }
+        this.fireEvent('event', e, provider);
+    },
+
+    createEvent : function(response, extraProps){
+        return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps));
+    }
+});
+// overwrite impl. with static instance
+Ext.Direct = new Ext.Direct();
+
+Ext.Direct.TID = 1;
+Ext.Direct.PROVIDERS = {};/**
+ * @class Ext.Direct.Transaction
+ * @extends Object
+ * <p>Supporting Class for Ext.Direct (not intended to be used directly).</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Direct.Transaction = function(config){
+    Ext.apply(this, config);
+    this.tid = ++Ext.Direct.TID;
+    this.retryCount = 0;
+};
+Ext.Direct.Transaction.prototype = {
+    send: function(){
+        this.provider.queueTransaction(this);
+    },
+
+    retry: function(){
+        this.retryCount++;
+        this.send();
+    },
+
+    getProvider: function(){
+        return this.provider;
+    }
+};Ext.Direct.Event = function(config){
+    Ext.apply(this, config);
+}
+Ext.Direct.Event.prototype = {
+    status: true,
+    getData: function(){
+        return this.data;
+    }
+};
+
+Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, {
+    type: 'rpc',
+    getTransaction: function(){
+        return this.transaction || Ext.Direct.getTransaction(this.tid);
+    }
+});
+
+Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, {
+    status: false,
+    type: 'exception'
+});
+
+Ext.Direct.eventTypes = {
+    'rpc':  Ext.Direct.RemotingEvent,
+    'event':  Ext.Direct.Event,
+    'exception':  Ext.Direct.ExceptionEvent
+};
+
+/**
+ * @class Ext.direct.Provider
+ * @extends Ext.util.Observable
+ * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
+ * 
+ * <p>For example ExtJs implements the following subclasses:</p>
+ * <pre><code>
+Provider
+|
++---{@link Ext.direct.JsonProvider JsonProvider} 
+    |
+    +---{@link Ext.direct.PollingProvider PollingProvider}   
+    |
+    +---{@link Ext.direct.RemotingProvider RemotingProvider}   
+ * </code></pre>
+ * @abstract
+ */
+Ext.direct.Provider = Ext.extend(Ext.util.Observable, {    
+    /**
+     * @cfg {String} id
+     * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
+     * You should assign an id if you need to be able to access the provider later and you do
+     * not have an object reference available, for example:
+     * <pre><code>
+Ext.Direct.addProvider(
+    {
+        type: 'polling',
+        url:  'php/poll.php',
+        id:   'poll-provider'
+    }
+);
+     
+var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
+p.disconnect();
+     * </code></pre>
+     */
+        
+    /**
+     * @cfg {Number} priority
+     * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
+     * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
+     */    
+    priority: 1,
+
+    /**
+     * @cfg {String} type
+     * <b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified
+     * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
+     * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
+     * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
+     * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
+     * </ul></div>
+     */    
+ 
+    // private
+    constructor : function(config){
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event connect
+             * Fires when the Provider connects to the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'connect',
+            /**
+             * @event disconnect
+             * Fires when the Provider disconnects from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'disconnect',
+            /**
+             * @event data
+             * Fires when the Provider receives data from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */            
+            'data',
+            /**
+             * @event exception
+             * Fires when the Provider receives an exception from the server-side
+             */                        
+            'exception'
+        );
+        Ext.direct.Provider.superclass.constructor.call(this, config);
+    },
+
+    /**
+     * Returns whether or not the server-side is currently connected.
+     * Abstract method for subclasses to implement.
+     */
+    isConnected: function(){
+        return false;
+    },
+
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    connect: Ext.emptyFn,
+    
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    disconnect: Ext.emptyFn
+});
+/**
+ * @class Ext.direct.JsonProvider
+ * @extends Ext.direct.Provider
+ */
+Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
+    parseResponse: function(xhr){
+        if(!Ext.isEmpty(xhr.responseText)){
+            if(typeof xhr.responseText == 'object'){
+                return xhr.responseText;
+            }
+            return Ext.decode(xhr.responseText);
+        }
+        return null;
+    },
+
+    getEvents: function(xhr){
+        var data = null;
+        try{
+            data = this.parseResponse(xhr);
+        }catch(e){
+            var event = new Ext.Direct.ExceptionEvent({
+                data: e,
+                xhr: xhr,
+                code: Ext.Direct.exceptions.PARSE,
+                message: 'Error parsing json response: \n\n ' + data
+            })
+            return [event];
+        }
+        var events = [];
+        if(Ext.isArray(data)){
+            for(var i = 0, len = data.length; i < len; i++){
+                events.push(Ext.Direct.createEvent(data[i]));
+            }
+        }else{
+            events.push(Ext.Direct.createEvent(data));
+        }
+        return events;
+    }
+});/**
+ * @class Ext.direct.PollingProvider
+ * @extends Ext.direct.JsonProvider
+ *
+ * <p>Provides for repetitive polling of the server at distinct {@link #interval intervals}.
+ * The initial request for data originates from the client, and then is responded to by the
+ * server.</p>
+ * 
+ * <p>All configurations for the PollingProvider should be generated by the server-side
+ * API portion of the Ext.Direct stack.</p>
+ *
+ * <p>An instance of PollingProvider may be created directly via the new keyword or by simply
+ * specifying <tt>type = 'polling'</tt>.  For example:</p>
+ * <pre><code>
+var pollA = new Ext.direct.PollingProvider({
+    type:'polling',
+    url: 'php/pollA.php',
+});
+Ext.Direct.addProvider(pollA);
+pollA.disconnect();
+
+Ext.Direct.addProvider(
+    {
+        type:'polling',
+        url: 'php/pollB.php',
+        id: 'pollB-provider'
+    }
+);
+var pollB = Ext.Direct.getProvider('pollB-provider');
+ * </code></pre>
+ */
+Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
+    /**
+     * @cfg {Number} priority
+     * Priority of the request (defaults to <tt>3</tt>). See {@link Ext.direct.Provider#priority}.
+     */
+    // override default priority
+    priority: 3,
+    
+    /**
+     * @cfg {Number} interval
+     * How often to poll the server-side in milliseconds (defaults to <tt>3000</tt> - every
+     * 3 seconds).
+     */
+    interval: 3000,
+
+    /**
+     * @cfg {Object} baseParams An object containing properties which are to be sent as parameters
+     * on every polling request
+     */
+    
+    /**
+     * @cfg {String/Function} url
+     * The url which the PollingProvider should contact with each request. This can also be
+     * an imported Ext.Direct method which will accept the baseParams as its only argument.
+     */
+
+    // private
+    constructor : function(config){
+        Ext.direct.PollingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforepoll
+             * Fired immediately before a poll takes place, an event handler can return false
+             * in order to cancel the poll.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'beforepoll',            
+            /**
+             * @event poll
+             * This event has not yet been implemented.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'poll'
+        );
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.pollTask;
+    },
+
+    /**
+     * Connect to the server-side and begin the polling process. To handle each
+     * response subscribe to the data event.
+     */
+    connect: function(){
+        if(this.url && !this.pollTask){
+            this.pollTask = Ext.TaskMgr.start({
+                run: function(){
+                    if(this.fireEvent('beforepoll', this) !== false){
+                        if(typeof this.url == 'function'){
+                            this.url(this.baseParams);
+                        }else{
+                            Ext.Ajax.request({
+                                url: this.url,
+                                callback: this.onData,
+                                scope: this,
+                                params: this.baseParams
+                            });
+                        }
+                    }
+                },
+                interval: this.interval,
+                scope: this
+            });
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing PollingProvider, no url configured.';
+        }
+    },
+
+    /**
+     * Disconnect from the server-side and stop the polling process. The disconnect
+     * event will be fired on a successful disconnect.
+     */
+    disconnect: function(){
+        if(this.pollTask){
+            Ext.TaskMgr.stop(this.pollTask);
+            delete this.pollTask;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    // private
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                this.fireEvent('data', this, e);
+            }
+        }else{
+            var e = new Ext.Direct.ExceptionEvent({
+                data: e,
+                code: Ext.Direct.exceptions.TRANSPORT,
+                message: 'Unable to connect to the server.',
+                xhr: xhr
+            });
+            this.fireEvent('data', this, e);
+        }
+    }
+});
+
+Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;/**
+ * @class Ext.direct.RemotingProvider
+ * @extends Ext.direct.JsonProvider
+ * 
+ * <p>The {@link Ext.direct.RemotingProvider RemotingProvider} exposes access to
+ * server side methods on the client (a remote procedure call (RPC) type of
+ * connection where the client can initiate a procedure on the server).</p>
+ * 
+ * <p>This allows for code to be organized in a fashion that is maintainable,
+ * while providing a clear path between client and server, something that is
+ * not always apparent when using URLs.</p>
+ * 
+ * <p>To accomplish this the server-side needs to describe what classes and methods
+ * are available on the client-side. This configuration will typically be
+ * outputted by the server-side Ext.Direct stack when the API description is built.</p>
+ */
+Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {       
+    /**
+     * @cfg {Object} actions
+     * Object literal defining the server side actions and methods. For example, if
+     * the Provider is configured with:
+     * <pre><code>
+"actions":{ // each property within the 'actions' object represents a server side Class 
+    "TestAction":[ // array of methods within each server side Class to be   
+    {              // stubbed out on client
+        "name":"doEcho", 
+        "len":1            
+    },{
+        "name":"multiply",// name of method
+        "len":2           // The number of parameters that will be used to create an
+                          // array of data to send to the server side function.
+                          // Ensure the server sends back a Number, not a String. 
+    },{
+        "name":"doForm",
+        "formHandler":true, // direct the client to use specialized form handling method 
+        "len":1
+    }]
+}
+     * </code></pre>
+     * <p>Note that a Store is not required, a server method can be called at any time.
+     * In the following example a <b>client side</b> handler is used to call the
+     * server side method "multiply" in the server-side "TestAction" Class:</p>
+     * <pre><code>
+TestAction.multiply(
+    2, 4, // pass two arguments to server, so specify len=2
+    // callback function after the server is called
+    // result: the result returned by the server
+    //      e: Ext.Direct.RemotingEvent object
+    function(result, e){
+        var t = e.getTransaction();
+        var action = t.action; // server side Class called
+        var method = t.method; // server side method called
+        if(e.status){
+            var answer = Ext.encode(result); // 8
+    
+        }else{
+            var msg = e.message; // failure message
+        }
+    }
+);
+     * </code></pre>
+     * In the example above, the server side "multiply" function will be passed two
+     * arguments (2 and 4).  The "multiply" method should return the value 8 which will be
+     * available as the <tt>result</tt> in the example above. 
+     */
+    
+    /**
+     * @cfg {String/Object} namespace
+     * Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>).
+     * Explicitly specify the namespace Object, or specify a String to have a
+     * {@link Ext#namespace namespace created} implicitly.
+     */
+    
+    /**
+     * @cfg {String} url
+     * <b>Required<b>. The url to connect to the {@link Ext.Direct} server-side router. 
+     */
+    
+    /**
+     * @cfg {String} enableUrlEncode
+     * Specify which param will hold the arguments for the method.
+     * Defaults to <tt>'data'</tt>.
+     */
+    
+    /**
+     * @cfg {Number/Boolean} enableBuffer
+     * <p><tt>true</tt> or <tt>false</tt> to enable or disable combining of method
+     * calls. If a number is specified this is the amount of time in milliseconds
+     * to wait before sending a batched request (defaults to <tt>10</tt>).</p>
+     * <br><p>Calls which are received within the specified timeframe will be
+     * concatenated together and sent in a single request, optimizing the
+     * application by reducing the amount of round trips that have to be made
+     * to the server.</p>
+     */
+    enableBuffer: 10,
+    
+    /**
+     * @cfg {Number} maxRetries
+     * Number of times to re-attempt delivery on failure of a call.
+     */
+    maxRetries: 1,
+
+    constructor : function(config){
+        Ext.direct.RemotingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforecall
+             * Fires immediately before the client-side sends off the RPC call.
+             * By returning false from an event handler you can prevent the call from
+             * executing.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'beforecall',
+            /**
+             * @event call
+             * Fires immediately after the request to the server-side is sent. This does
+             * NOT fire after the response has come back from the call.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'call'
+        );
+        this.namespace = (typeof this.namespace === 'string') ? Ext.ns(this.namespace) : this.namespace || window;
+        this.transactions = {};
+        this.callBuffer = [];
+    },
+
+    // private
+    initAPI : function(){
+        var o = this.actions;
+        for(var c in o){
+            var cls = this.namespace[c] || (this.namespace[c] = {});
+            var ms = o[c];
+            for(var i = 0, len = ms.length; i < len; i++){
+                var m = ms[i];
+                cls[m.name] = this.createMethod(c, m);
+            }
+        }
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.connected;
+    },
+
+    connect: function(){
+        if(this.url){
+            this.initAPI();
+            this.connected = true;
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing RemotingProvider, no url configured.';
+        }
+    },
+
+    disconnect: function(){
+        if(this.connected){
+            this.connected = false;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                var t = this.getTransaction(e);
+                this.fireEvent('data', this, e);
+                if(t){
+                    this.doCallback(t, e, true);
+                    Ext.Direct.removeTransaction(t);
+                }
+            }
+        }else{
+            var ts = [].concat(opt.ts);
+            for(var i = 0, len = ts.length; i < len; i++){
+                var t = this.getTransaction(ts[i]);
+                if(t && t.retryCount < this.maxRetries){
+                    t.retry();
+                }else{
+                    var e = new Ext.Direct.ExceptionEvent({
+                        data: e,
+                        transaction: t,
+                        code: Ext.Direct.exceptions.TRANSPORT,
+                        message: 'Unable to connect to the server.',
+                        xhr: xhr
+                    });
+                    this.fireEvent('data', this, e);
+                    if(t){
+                        this.doCallback(t, e, false);
+                        Ext.Direct.removeTransaction(t);
+                    }
+                }
+            }
+        }
+    },
+
+    getCallData: function(t){
+        return {
+            action: t.action,
+            method: t.method,
+            data: t.data,
+            type: 'rpc',
+            tid: t.tid
+        };
+    },
+
+    doSend : function(data){
+        var o = {
+            url: this.url,
+            callback: this.onData,
+            scope: this,
+            ts: data
+        };
+
+        // send only needed data
+        var callData;
+        if(Ext.isArray(data)){
+            callData = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                callData.push(this.getCallData(data[i]));
+            }
+        }else{
+            callData = this.getCallData(data);
+        }
+
+        if(this.enableUrlEncode){
+            var params = {};
+            params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData);
+            o.params = params;
+        }else{
+            o.jsonData = callData;
+        }
+        Ext.Ajax.request(o);
+    },
+
+    combineAndSend : function(){
+        var len = this.callBuffer.length;
+        if(len > 0){
+            this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer);
+            this.callBuffer = [];
+        }
+    },
+
+    queueTransaction: function(t){
+        if(t.form){
+            this.processForm(t);
+            return;
+        }
+        this.callBuffer.push(t);
+        if(this.enableBuffer){
+            if(!this.callTask){
+                this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this);
+            }
+            this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10);
+        }else{
+            this.combineAndSend();
+        }
+    },
+
+    doCall : function(c, m, args){
+        var data = null, hs = args[m.len], scope = args[m.len+1];
+
+        if(m.len !== 0){
+            data = args.slice(0, m.len);
+        }
+
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            args: args,
+            action: c,
+            method: m.name,
+            data: data,
+            cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            this.queueTransaction(t);
+            this.fireEvent('call', this, t);
+        }
+    },
+
+    doForm : function(c, m, form, callback, scope){
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            action: c,
+            method: m.name,
+            args:[form, callback, scope],
+            cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback,
+            isForm: true
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
+                params = {
+                    extTID: t.tid,
+                    extAction: c,
+                    extMethod: m.name,
+                    extType: 'rpc',
+                    extUpload: String(isUpload)
+                };
+            
+            // change made from typeof callback check to callback.params
+            // to support addl param passing in DirectSubmit EAC 6/2
+            Ext.apply(t, {
+                form: Ext.getDom(form),
+                isUpload: isUpload,
+                params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params
+            });
+            this.fireEvent('call', this, t);
+            this.processForm(t);
+        }
+    },
+    
+    processForm: function(t){
+        Ext.Ajax.request({
+            url: this.url,
+            params: t.params,
+            callback: this.onData,
+            scope: this,
+            form: t.form,
+            isUpload: t.isUpload,
+            ts: t
+        });
+    },
+
+    createMethod : function(c, m){
+        var f;
+        if(!m.formHandler){
+            f = function(){
+                this.doCall(c, m, Array.prototype.slice.call(arguments, 0));
+            }.createDelegate(this);
+        }else{
+            f = function(form, callback, scope){
+                this.doForm(c, m, form, callback, scope);
+            }.createDelegate(this);
+        }
+        f.directCfg = {
+            action: c,
+            method: m
+        };
+        return f;
+    },
+
+    getTransaction: function(opt){
+        return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null;
+    },
+
+    doCallback: function(t, e){
+        var fn = e.status ? 'success' : 'failure';
+        if(t && t.cb){
+            var hs = t.cb;
+            var result = e.result || e.data;
+            if(Ext.isFunction(hs)){
+                hs(result, e);
+            } else{
+                Ext.callback(hs[fn], hs.scope, [result, e]);
+                Ext.callback(hs.callback, hs.scope, [result, e]);
+            }
+        }
+    }
+});
+Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/direct.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,j,k,m){var h=[];var g=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:h.push(a[e.meta.root]);break;case Ext.data.Api.actions.read:if(this.paramOrder){for(var d=0,f=this.paramOrder.length;d<f;d++){h.push(a[this.paramOrder[d]])}}else{if(this.paramsAsHash){h.push(a)}}break;case Ext.data.Api.actions.update:h.push(a[e.meta.idProperty]);h.push(a[e.meta.root]);break;case Ext.data.Api.actions.destroy:h.push(a[e.meta.root]);break}var l={params:a||{},callback:j,scope:k,arg:m,reader:e};h.push(this.createCallback(b,c,l),this);g.apply(window,h)},createCallback:function(c,a,b){return function(d,e){if(!e.status){if(c===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,b,e,null)}this.fireEvent("exception",this,"remote",c,b,e,null);b.callback.call(b.scope,null,b.arg,false);return}if(c===Ext.data.Api.actions.read){this.onRead(c,b,d,e)}else{this.onWrite(c,b,d,e,a)}}},onRead:function(f,e,a,d){var b;try{b=e.reader.readRecords(a)}catch(c){this.fireEvent("loadexception",this,e,d,c);this.fireEvent("exception",this,"response",f,e,d,c);e.callback.call(e.scope,null,e.arg,false);return}this.fireEvent("load",this,d,e.arg);e.callback.call(e.scope,b,e.arg,true)},onWrite:function(e,d,a,c,b){this.fireEvent("write",this,e,a,c,b,d.arg);d.callback.call(d.scope,a,c,true)}});Ext.data.DirectStore=function(a){a.batchTransactions=false;Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(a,{proxy:(typeof(a.proxy)=="undefined")?new Ext.data.DirectProxy(Ext.copyTo({},a,"paramOrder,paramsAsHash,directFn,api")):a.proxy,reader:(typeof(a.reader)=="undefined"&&typeof(a.fields)=="object")?new Ext.data.JsonReader(Ext.copyTo({},a,"totalProperty,root,idProperty"),a.fields):a.reader}))};Ext.extend(Ext.data.DirectStore,Ext.data.Store,{});Ext.reg("directstore",Ext.data.DirectStore);Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){this.addEvents("event","exception");this.transactions={};this.providers={}},addProvider:function(e){var c=arguments;if(c.length>1){for(var d=0,b=c.length;d<b;d++){this.addProvider(c[d])}return}if(!e.events){e=new Ext.Direct.PROVIDERS[e.type](e)}e.id=e.id||Ext.id();this.providers[e.id]=e;e.on("data",this.onProviderData,this);e.on("exception",this.onProviderException,this);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return this.providers[a]},removeProvider:function(b){var a=b.id?b:this.providers[b.id];a.un("data",this.onProviderData,this);a.un("exception",this.onProviderException,this);delete this.providers[a.id];return a},addTransaction:function(a){this.transactions[a.tid]=a;return a},removeTransaction:function(a){delete this.transactions[a.tid||a];return a},getTransaction:function(a){return this.transactions[a.tid||a]},onProviderData:function(d,c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.onProviderData(d,c[b])}return}if(c.name&&c.name!="event"&&c.name!="exception"){this.fireEvent(c.name,c)}else{if(c.type=="exception"){this.fireEvent("exception",c)}}this.fireEvent("event",c,d)},createEvent:function(a,b){return new Ext.Direct.eventTypes[a.type](Ext.apply(a,b))}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={};Ext.Direct.Transaction=function(a){Ext.apply(this,a);this.tid=++Ext.Direct.TID;this.retryCount=0};Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}};Ext.Direct.Event=function(a){Ext.apply(this,a)};Ext.Direct.Event.prototype={status:true,getData:function(){return this.data}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:"rpc",getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid)}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:"exception"});Ext.Direct.eventTypes={rpc:Ext.Direct.RemotingEvent,event:Ext.Direct.Event,exception:Ext.Direct.ExceptionEvent};Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(a){Ext.apply(this,a);this.addEvents("connect","disconnect","data","exception");Ext.direct.Provider.superclass.constructor.call(this,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(typeof a.responseText=="object"){return a.responseText}return Ext.decode(a.responseText)}return null},getEvents:function(h){var f=null;try{f=this.parseResponse(h)}catch(g){var d=new Ext.Direct.ExceptionEvent({data:g,xhr:h,code:Ext.Direct.exceptions.PARSE,message:"Error parsing json response: \n\n "+f});return[d]}var c=[];if(Ext.isArray(f)){for(var b=0,a=f.length;b<a;b++){c.push(Ext.Direct.createEvent(f[b]))}}else{c.push(Ext.Direct.createEvent(f))}return c}});Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(a){Ext.direct.PollingProvider.superclass.constructor.call(this,a);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent("beforepoll",this)!==false){if(typeof this.url=="function"){this.url(this.baseParams)}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams})}}},interval:this.interval,scope:this});this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing PollingProvider, no url configured."}}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;this.fireEvent("disconnect",this)}},onData:function(d,h,g){if(h){var c=this.getEvents(g);for(var b=0,a=c.length;b<a;b++){var f=c[b];this.fireEvent("data",this,f)}}else{var f=new Ext.Direct.ExceptionEvent({data:f,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:g});this.fireEvent("data",this,f)}}});Ext.Direct.PROVIDERS.polling=Ext.direct.PollingProvider;Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{enableBuffer:10,maxRetries:1,constructor:function(a){Ext.direct.RemotingProvider.superclass.constructor.call(this,a);this.addEvents("beforecall","call");this.namespace=(typeof this.namespace==="string")?Ext.ns(this.namespace):this.namespace||window;this.transactions={};this.callBuffer=[]},initAPI:function(){var g=this.actions;for(var h in g){var d=this.namespace[h]||(this.namespace[h]={});var e=g[h];for(var f=0,b=e.length;f<b;f++){var a=e[f];d[a.name]=this.createMethod(h,a)}}},isConnected:function(){return !!this.connected},connect:function(){if(this.url){this.initAPI();this.connected=true;this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing RemotingProvider, no url configured."}}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent("disconnect",this)}},onData:function(a,g,h){if(g){var j=this.getEvents(h);for(var b=0,c=j.length;b<c;b++){var d=j[b];var k=this.getTransaction(d);this.fireEvent("data",this,d);if(k){this.doCallback(k,d,true);Ext.Direct.removeTransaction(k)}}}else{var f=[].concat(a.ts);for(var b=0,c=f.length;b<c;b++){var k=this.getTransaction(f[b]);if(k&&k.retryCount<this.maxRetries){k.retry()}else{var d=new Ext.Direct.ExceptionEvent({data:d,transaction:k,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:h});this.fireEvent("data",this,d);if(k){this.doCallback(k,d,false);Ext.Direct.removeTransaction(k)}}}}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.tid}},doSend:function(d){var f={url:this.url,callback:this.onData,scope:this,ts:d};var b;if(Ext.isArray(d)){b=[];for(var c=0,a=d.length;c<a;c++){b.push(this.getCallData(d[c]))}}else{b=this.getCallData(d)}if(this.enableUrlEncode){var e={};e[typeof this.enableUrlEncode=="string"?this.enableUrlEncode:"data"]=Ext.encode(b);f.params=e}else{f.jsonData=b}Ext.Ajax.request(f)},combineAndSend:function(){var a=this.callBuffer.length;if(a>0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(typeof this.enableBuffer=="number"?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(h,a,b){var g=null,e=b[a.len],f=b[a.len+1];if(a.len!==0){g=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:h,method:a.name,data:g,cb:f&&Ext.isFunction(e)?e.createDelegate(f):e});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d)}},doForm:function(i,b,f,h,e){var d=new Ext.Direct.Transaction({provider:this,action:i,method:b.name,args:[f,h,e],cb:e&&Ext.isFunction(h)?h.createDelegate(e):h,isForm:true});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);var a=String(f.getAttribute("enctype")).toLowerCase()=="multipart/form-data",g={extTID:d.tid,extAction:i,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(f),isUpload:a,params:h&&Ext.isObject(h.params)?Ext.apply(g,h.params):g});this.fireEvent("call",this,d);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,f,c){this.doForm(d,a,e,f,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,f){var d=f.status?"success":"failure";if(c&&c.cb){var b=c.cb;var a=f.result||f.data;if(Ext.isFunction(b)){b(a,f)}else{Ext.callback(b[d],b.scope,[a,f]);Ext.callback(b.callback,b.scope,[a,f])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd-debug.js	(revision 625)
@@ -0,0 +1,4567 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * These classes are derivatives of the similarly named classes in the YUI Library.
+ * The original license:
+ * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.net/yui/license.txt
+ */
+
+(function() {
+
+var Event=Ext.EventManager;
+var Dom=Ext.lib.Dom;
+
+/**
+ * @class Ext.dd.DragDrop
+ * Defines the interface and base operation of items that that can be
+ * dragged or can be drop targets.  It was designed to be extended, overriding
+ * the event handlers for startDrag, onDrag, onDragOver and onDragOut.
+ * Up to three html elements can be associated with a DragDrop instance:
+ * <ul>
+ * <li>linked element: the element that is passed into the constructor.
+ * This is the element which defines the boundaries for interaction with
+ * other DragDrop objects.</li>
+ * <li>handle element(s): The drag operation only occurs if the element that
+ * was clicked matches a handle element.  By default this is the linked
+ * element, but there are times that you will want only a portion of the
+ * linked element to initiate the drag operation, and the setHandleElId()
+ * method provides a way to define this.</li>
+ * <li>drag element: this represents the element that would be moved along
+ * with the cursor during a drag operation.  By default, this is the linked
+ * element itself as in {@link Ext.dd.DD}.  setDragElId() lets you define
+ * a separate element that would be moved, as in {@link Ext.dd.DDProxy}.
+ * </li>
+ * </ul>
+ * This class should not be instantiated until the onload event to ensure that
+ * the associated elements are available.
+ * The following would define a DragDrop obj that would interact with any
+ * other DragDrop obj in the "group1" group:
+ * <pre>
+ *  dd = new Ext.dd.DragDrop("div1", "group1");
+ * </pre>
+ * Since none of the event handlers have been implemented, nothing would
+ * actually happen if you were to run the code above.  Normally you would
+ * override this class or one of the default implementations, but you can
+ * also override the methods you want on an instance of the class...
+ * <pre>
+ *  dd.onDragDrop = function(e, id) {
+ *  &nbsp;&nbsp;alert("dd was dropped on " + id);
+ *  }
+ * </pre>
+ * @constructor
+ * @param {String} id of the element that is linked to this instance
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DragDrop:
+ *                    padding, isTarget, maintainOffset, primaryButtonOnly
+ */
+Ext.dd.DragDrop = function(id, sGroup, config) {
+    if(id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.dd.DragDrop.prototype = {
+
+    /**
+     * Set to false to enable a DragDrop object to fire drag events while dragging
+     * over its own Element. Defaults to true - DragDrop objects do not by default
+     * fire drag events to themselves.
+     * @property ignoreSelf
+     * @type Boolean
+     */
+
+    /**
+     * The id of the element associated with this object.  This is what we
+     * refer to as the "linked element" because the size and position of
+     * this element is used to determine when the drag and drop objects have
+     * interacted.
+     * @property id
+     * @type String
+     */
+    id: null,
+
+    /**
+     * Configuration attributes passed into the constructor
+     * @property config
+     * @type object
+     */
+    config: null,
+
+    /**
+     * The id of the element that will be dragged.  By default this is same
+     * as the linked element , but could be changed to another element. Ex:
+     * Ext.dd.DDProxy
+     * @property dragElId
+     * @type String
+     * @private
+     */
+    dragElId: null,
+
+    /**
+     * The ID of the element that initiates the drag operation.  By default
+     * this is the linked element, but could be changed to be a child of this
+     * element.  This lets us do things like only starting the drag when the
+     * header element within the linked html element is clicked.
+     * @property handleElId
+     * @type String
+     * @private
+     */
+    handleElId: null,
+
+    /**
+     * An object who's property names identify HTML tags to be considered invalid as drag handles.
+     * A non-null property value identifies the tag as invalid. Defaults to the 
+     * following value which prevents drag operations from being initiated by &lt;a> elements:<pre><code>
+{
+    A: "A"
+}</code></pre>
+     * @property invalidHandleTypes
+     * @type Object
+     */
+    invalidHandleTypes: null,
+
+    /**
+     * An object who's property names identify the IDs of elements to be considered invalid as drag handles.
+     * A non-null property value identifies the ID as invalid. For example, to prevent
+     * dragging from being initiated on element ID "foo", use:<pre><code>
+{
+    foo: true
+}</code></pre>
+     * @property invalidHandleIds
+     * @type Object
+     */
+    invalidHandleIds: null,
+
+    /**
+     * An Array of CSS class names for elements to be considered in valid as drag handles.
+     * @property invalidHandleClasses
+     * @type Array
+     */
+    invalidHandleClasses: null,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageX
+     * @type int
+     * @private
+     */
+    startPageX: 0,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageY
+     * @type int
+     * @private
+     */
+    startPageY: 0,
+
+    /**
+     * The group defines a logical collection of DragDrop objects that are
+     * related.  Instances only get events when interacting with other
+     * DragDrop object in the same group.  This lets us define multiple
+     * groups using a single DragDrop subclass if we want.
+     * @property groups
+     * @type object An object in the format {'group1':true, 'group2':true}
+     */
+    groups: null,
+
+    /**
+     * Individual drag/drop instances can be locked.  This will prevent
+     * onmousedown start drag.
+     * @property locked
+     * @type boolean
+     * @private
+     */
+    locked: false,
+
+    /**
+     * Lock this instance
+     * @method lock
+     */
+    lock: function() { this.locked = true; },
+
+    /**
+     * When set to true, other DD objects in cooperating DDGroups do not receive
+     * notification events when this DD object is dragged over them. Defaults to false.
+     * @property moveOnly
+     * @type boolean
+     */
+    moveOnly: false,
+
+    /**
+     * Unlock this instace
+     * @method unlock
+     */
+    unlock: function() { this.locked = false; },
+
+    /**
+     * By default, all instances can be a drop target.  This can be disabled by
+     * setting isTarget to false.
+     * @property isTarget
+     * @type boolean
+     */
+    isTarget: true,
+
+    /**
+     * The padding configured for this drag and drop object for calculating
+     * the drop zone intersection with this object.
+     * @property padding
+     * @type int[] An array containing the 4 padding values: [top, right, bottom, left]
+     */
+    padding: null,
+
+    /**
+     * Cached reference to the linked element
+     * @property _domRef
+     * @private
+     */
+    _domRef: null,
+
+    /**
+     * Internal typeof flag
+     * @property __ygDragDrop
+     * @private
+     */
+    __ygDragDrop: true,
+
+    /**
+     * Set to true when horizontal contraints are applied
+     * @property constrainX
+     * @type boolean
+     * @private
+     */
+    constrainX: false,
+
+    /**
+     * Set to true when vertical contraints are applied
+     * @property constrainY
+     * @type boolean
+     * @private
+     */
+    constrainY: false,
+
+    /**
+     * The left constraint
+     * @property minX
+     * @type int
+     * @private
+     */
+    minX: 0,
+
+    /**
+     * The right constraint
+     * @property maxX
+     * @type int
+     * @private
+     */
+    maxX: 0,
+
+    /**
+     * The up constraint
+     * @property minY
+     * @type int
+     * @type int
+     * @private
+     */
+    minY: 0,
+
+    /**
+     * The down constraint
+     * @property maxY
+     * @type int
+     * @private
+     */
+    maxY: 0,
+
+    /**
+     * Maintain offsets when we resetconstraints.  Set to true when you want
+     * the position of the element relative to its parent to stay the same
+     * when the page changes
+     *
+     * @property maintainOffset
+     * @type boolean
+     */
+    maintainOffset: false,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * horizontal graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property xTicks
+     * @type int[]
+     */
+    xTicks: null,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * vertical graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property yTicks
+     * @type int[]
+     */
+    yTicks: null,
+
+    /**
+     * By default the drag and drop instance will only respond to the primary
+     * button click (left button for a right-handed mouse).  Set to true to
+     * allow drag and drop to start with any mouse click that is propogated
+     * by the browser
+     * @property primaryButtonOnly
+     * @type boolean
+     */
+    primaryButtonOnly: true,
+
+    /**
+     * The availabe property is false until the linked dom element is accessible.
+     * @property available
+     * @type boolean
+     */
+    available: false,
+
+    /**
+     * By default, drags can only be initiated if the mousedown occurs in the
+     * region the linked element is.  This is done in part to work around a
+     * bug in some browsers that mis-report the mousedown if the previous
+     * mouseup happened outside of the window.  This property is set to true
+     * if outer handles are defined.
+     *
+     * @property hasOuterHandles
+     * @type boolean
+     * @default false
+     */
+    hasOuterHandles: false,
+
+    /**
+     * Code that executes immediately before the startDrag event
+     * @method b4StartDrag
+     * @private
+     */
+    b4StartDrag: function(x, y) { },
+
+    /**
+     * Abstract method called after a drag/drop object is clicked
+     * and the drag or mousedown time thresholds have beeen met.
+     * @method startDrag
+     * @param {int} X click location
+     * @param {int} Y click location
+     */
+    startDrag: function(x, y) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDrag event
+     * @method b4Drag
+     * @private
+     */
+    b4Drag: function(e) { },
+
+    /**
+     * Abstract method called during the onMouseMove event while dragging an
+     * object.
+     * @method onDrag
+     * @param {Event} e the mousemove event
+     */
+    onDrag: function(e) { /* override this */ },
+
+    /**
+     * Abstract method called when this element fist begins hovering over
+     * another DragDrop obj
+     * @method onDragEnter
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of one or more
+     * dragdrop items being hovered over.
+     */
+    onDragEnter: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOver event
+     * @method b4DragOver
+     * @private
+     */
+    b4DragOver: function(e) { },
+
+    /**
+     * Abstract method called when this element is hovering over another
+     * DragDrop obj
+     * @method onDragOver
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of dd items
+     * being hovered over.
+     */
+    onDragOver: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOut event
+     * @method b4DragOut
+     * @private
+     */
+    b4DragOut: function(e) { },
+
+    /**
+     * Abstract method called when we are no longer hovering over an element
+     * @method onDragOut
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was hovering over.  In INTERSECT mode, an array of dd items
+     * that the mouse is no longer over.
+     */
+    onDragOut: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragDrop event
+     * @method b4DragDrop
+     * @private
+     */
+    b4DragDrop: function(e) { },
+
+    /**
+     * Abstract method called when this item is dropped on another DragDrop
+     * obj
+     * @method onDragDrop
+     * @param {Event} e the mouseup event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was dropped on.  In INTERSECT mode, an array of dd items this
+     * was dropped on.
+     */
+    onDragDrop: function(e, id) { /* override this */ },
+
+    /**
+     * Abstract method called when this item is dropped on an area with no
+     * drop target
+     * @method onInvalidDrop
+     * @param {Event} e the mouseup event
+     */
+    onInvalidDrop: function(e) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the endDrag event
+     * @method b4EndDrag
+     * @private
+     */
+    b4EndDrag: function(e) { },
+
+    /**
+     * Fired when we are done dragging the object
+     * @method endDrag
+     * @param {Event} e the mouseup event
+     */
+    endDrag: function(e) { /* override this */ },
+
+    /**
+     * Code executed immediately before the onMouseDown event
+     * @method b4MouseDown
+     * @param {Event} e the mousedown event
+     * @private
+     */
+    b4MouseDown: function(e) {  },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mousedown
+     * @method onMouseDown
+     * @param {Event} e the mousedown event
+     */
+    onMouseDown: function(e) { /* override this */ },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mouseup
+     * @method onMouseUp
+     * @param {Event} e the mouseup event
+     */
+    onMouseUp: function(e) { /* override this */ },
+
+    /**
+     * Override the onAvailable method to do what is needed after the initial
+     * position was determined.
+     * @method onAvailable
+     */
+    onAvailable: function () {
+    },
+
+    /**
+     * Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}).
+     * @type Object
+     */
+    defaultPadding : {left:0, right:0, top:0, bottom:0},
+
+    /**
+     * Initializes the drag drop object's constraints to restrict movement to a certain element.
+ *
+ * Usage:
+ <pre><code>
+ var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
+                { dragElId: "existingProxyDiv" });
+ dd.startDrag = function(){
+     this.constrainTo("parent-id");
+ };
+ </code></pre>
+ * Or you can initalize it using the {@link Ext.Element} object:
+ <pre><code>
+ Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
+     startDrag : function(){
+         this.constrainTo("parent-id");
+     }
+ });
+ </code></pre>
+     * @param {Mixed} constrainTo The element to constrain to.
+     * @param {Object/Number} pad (optional) Pad provides a way to specify "padding" of the constraints,
+     * and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or
+     * an object containing the sides to pad. For example: {right:10, bottom:10}
+     * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders)
+     */
+    constrainTo : function(constrainTo, pad, inContent){
+        if(typeof pad == "number"){
+            pad = {left: pad, right:pad, top:pad, bottom:pad};
+        }
+        pad = pad || this.defaultPadding;
+        var b = Ext.get(this.getEl()).getBox();
+        var ce = Ext.get(constrainTo);
+        var s = ce.getScroll();
+        var c, cd = ce.dom;
+        if(cd == document.body){
+            c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()};
+        }else{
+            var xy = ce.getXY();
+            c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight};
+        }
+
+
+        var topSpace = b.y - c.y;
+        var leftSpace = b.x - c.x;
+
+        this.resetConstraints();
+        this.setXConstraint(leftSpace - (pad.left||0), // left
+                c.width - leftSpace - b.width - (pad.right||0), //right
+				this.xTickSize
+        );
+        this.setYConstraint(topSpace - (pad.top||0), //top
+                c.height - topSpace - b.height - (pad.bottom||0), //bottom
+				this.yTickSize
+        );
+    },
+
+    /**
+     * Returns a reference to the linked element
+     * @method getEl
+     * @return {HTMLElement} the html element
+     */
+    getEl: function() {
+        if (!this._domRef) {
+            this._domRef = Ext.getDom(this.id);
+        }
+
+        return this._domRef;
+    },
+
+    /**
+     * Returns a reference to the actual element to drag.  By default this is
+     * the same as the html element, but it can be assigned to another
+     * element. An example of this can be found in Ext.dd.DDProxy
+     * @method getDragEl
+     * @return {HTMLElement} the html element
+     */
+    getDragEl: function() {
+        return Ext.getDom(this.dragElId);
+    },
+
+    /**
+     * Sets up the DragDrop object.  Must be called in the constructor of any
+     * Ext.dd.DragDrop subclass
+     * @method init
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    init: function(id, sGroup, config) {
+        this.initTarget(id, sGroup, config);
+        Event.on(this.id, "mousedown", this.handleMouseDown, this);
+        // Event.on(this.id, "selectstart", Event.preventDefault);
+    },
+
+    /**
+     * Initializes Targeting functionality only... the object does not
+     * get a mousedown handler.
+     * @method initTarget
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    initTarget: function(id, sGroup, config) {
+
+        // configuration attributes
+        this.config = config || {};
+
+        // create a local reference to the drag and drop manager
+        this.DDM = Ext.dd.DDM;
+        // initialize the groups array
+        this.groups = {};
+
+        // assume that we have an element reference instead of an id if the
+        // parameter is not a string
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+
+        // set the id
+        this.id = id;
+
+        // add to an interaction group
+        this.addToGroup((sGroup) ? sGroup : "default");
+
+        // We don't want to register this as the handle with the manager
+        // so we just set the id rather than calling the setter.
+        this.handleElId = id;
+
+        // the linked element is the element that gets dragged by default
+        this.setDragElId(id);
+
+        // by default, clicked anchors will not start drag operations.
+        this.invalidHandleTypes = { A: "A" };
+        this.invalidHandleIds = {};
+        this.invalidHandleClasses = [];
+
+        this.applyConfig();
+
+        this.handleOnAvailable();
+    },
+
+    /**
+     * Applies the configuration parameters that were passed into the constructor.
+     * This is supposed to happen at each level through the inheritance chain.  So
+     * a DDProxy implentation will execute apply config on DDProxy, DD, and
+     * DragDrop in order to get all of the parameters that are available in
+     * each object.
+     * @method applyConfig
+     */
+    applyConfig: function() {
+
+        // configurable properties:
+        //    padding, isTarget, maintainOffset, primaryButtonOnly
+        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);
+
+    },
+
+    /**
+     * Executed when the linked element is available
+     * @method handleOnAvailable
+     * @private
+     */
+    handleOnAvailable: function() {
+        this.available = true;
+        this.resetConstraints();
+        this.onAvailable();
+    },
+
+     /**
+     * Configures the padding for the target zone in px.  Effectively expands
+     * (or reduces) the virtual object size for targeting calculations.
+     * Supports css-style shorthand; if only one parameter is passed, all sides
+     * will have that padding, and if only two are passed, the top and bottom
+     * will have the first param, the left and right the second.
+     * @method setPadding
+     * @param {int} iTop    Top pad
+     * @param {int} iRight  Right pad
+     * @param {int} iBot    Bot pad
+     * @param {int} iLeft   Left pad
+     */
+    setPadding: function(iTop, iRight, iBot, iLeft) {
+        // this.padding = [iLeft, iRight, iTop, iBot];
+        if (!iRight && 0 !== iRight) {
+            this.padding = [iTop, iTop, iTop, iTop];
+        } else if (!iBot && 0 !== iBot) {
+            this.padding = [iTop, iRight, iTop, iRight];
+        } else {
+            this.padding = [iTop, iRight, iBot, iLeft];
+        }
+    },
+
+    /**
+     * Stores the initial placement of the linked element.
+     * @method setInitPosition
+     * @param {int} diffX   the X offset, default 0
+     * @param {int} diffY   the Y offset, default 0
+     */
+    setInitPosition: function(diffX, diffY) {
+        var el = this.getEl();
+
+        if (!this.DDM.verifyEl(el)) {
+            return;
+        }
+
+        var dx = diffX || 0;
+        var dy = diffY || 0;
+
+        var p = Dom.getXY( el );
+
+        this.initPageX = p[0] - dx;
+        this.initPageY = p[1] - dy;
+
+        this.lastPageX = p[0];
+        this.lastPageY = p[1];
+
+
+        this.setStartPosition(p);
+    },
+
+    /**
+     * Sets the start position of the element.  This is set when the obj
+     * is initialized, the reset when a drag is started.
+     * @method setStartPosition
+     * @param pos current position (from previous lookup)
+     * @private
+     */
+    setStartPosition: function(pos) {
+        var p = pos || Dom.getXY( this.getEl() );
+        this.deltaSetXY = null;
+
+        this.startPageX = p[0];
+        this.startPageY = p[1];
+    },
+
+    /**
+     * Add this instance to a group of related drag/drop objects.  All
+     * instances belong to at least one group, and can belong to as many
+     * groups as needed.
+     * @method addToGroup
+     * @param sGroup {string} the name of the group
+     */
+    addToGroup: function(sGroup) {
+        this.groups[sGroup] = true;
+        this.DDM.regDragDrop(this, sGroup);
+    },
+
+    /**
+     * Remove's this instance from the supplied interaction group
+     * @method removeFromGroup
+     * @param {string}  sGroup  The group to drop
+     */
+    removeFromGroup: function(sGroup) {
+        if (this.groups[sGroup]) {
+            delete this.groups[sGroup];
+        }
+
+        this.DDM.removeDDFromGroup(this, sGroup);
+    },
+
+    /**
+     * Allows you to specify that an element other than the linked element
+     * will be moved with the cursor during a drag
+     * @method setDragElId
+     * @param id {string} the id of the element that will be used to initiate the drag
+     */
+    setDragElId: function(id) {
+        this.dragElId = id;
+    },
+
+    /**
+     * Allows you to specify a child of the linked element that should be
+     * used to initiate the drag operation.  An example of this would be if
+     * you have a content div with text and links.  Clicking anywhere in the
+     * content area would normally start the drag operation.  Use this method
+     * to specify that an element inside of the content div is the element
+     * that starts the drag operation.
+     * @method setHandleElId
+     * @param id {string} the id of the element that will be used to
+     * initiate the drag.
+     */
+    setHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.handleElId = id;
+        this.DDM.regHandle(this.id, id);
+    },
+
+    /**
+     * Allows you to set an element outside of the linked element as a drag
+     * handle
+     * @method setOuterHandleElId
+     * @param id the id of the element that will be used to initiate the drag
+     */
+    setOuterHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        Event.on(id, "mousedown",
+                this.handleMouseDown, this);
+        this.setHandleElId(id);
+
+        this.hasOuterHandles = true;
+    },
+
+    /**
+     * Remove all drag and drop hooks for this element
+     * @method unreg
+     */
+    unreg: function() {
+        Event.un(this.id, "mousedown",
+                this.handleMouseDown);
+        this._domRef = null;
+        this.DDM._remove(this);
+    },
+
+    destroy : function(){
+        this.unreg();
+    },
+
+    /**
+     * Returns true if this instance is locked, or the drag drop mgr is locked
+     * (meaning that all drag/drop is disabled on the page.)
+     * @method isLocked
+     * @return {boolean} true if this obj or all drag/drop is locked, else
+     * false
+     */
+    isLocked: function() {
+        return (this.DDM.isLocked() || this.locked);
+    },
+
+    /**
+     * Fired when this object is clicked
+     * @method handleMouseDown
+     * @param {Event} e
+     * @param {Ext.dd.DragDrop} oDD the clicked dd object (this dd obj)
+     * @private
+     */
+    handleMouseDown: function(e, oDD){
+        if (this.primaryButtonOnly && e.button != 0) {
+            return;
+        }
+
+        if (this.isLocked()) {
+            return;
+        }
+
+        this.DDM.refreshCache(this.groups);
+
+        var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e));
+        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
+        } else {
+            if (this.clickValidator(e)) {
+
+                // set the initial element position
+                this.setStartPosition();
+
+
+                this.b4MouseDown(e);
+                this.onMouseDown(e);
+
+                this.DDM.handleMouseDown(e, this);
+
+                this.DDM.stopEvent(e);
+            } else {
+
+
+            }
+        }
+    },
+
+    clickValidator: function(e) {
+        var target = e.getTarget();
+        return ( this.isValidHandleChild(target) &&
+                    (this.id == this.handleElId ||
+                        this.DDM.handleWasClicked(target, this.id)) );
+    },
+
+    /**
+     * Allows you to specify a tag name that should not start a drag operation
+     * when clicked.  This is designed to facilitate embedding links within a
+     * drag handle that do something other than start the drag.
+     * @method addInvalidHandleType
+     * @param {string} tagName the type of element to exclude
+     */
+    addInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        this.invalidHandleTypes[type] = type;
+    },
+
+    /**
+     * Lets you to specify an element id for a child of a drag handle
+     * that should not initiate a drag
+     * @method addInvalidHandleId
+     * @param {string} id the element id of the element you wish to ignore
+     */
+    addInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.invalidHandleIds[id] = id;
+    },
+
+    /**
+     * Lets you specify a css class of elements that will not initiate a drag
+     * @method addInvalidHandleClass
+     * @param {string} cssClass the class of the elements you wish to ignore
+     */
+    addInvalidHandleClass: function(cssClass) {
+        this.invalidHandleClasses.push(cssClass);
+    },
+
+    /**
+     * Unsets an excluded tag name set by addInvalidHandleType
+     * @method removeInvalidHandleType
+     * @param {string} tagName the type of element to unexclude
+     */
+    removeInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        // this.invalidHandleTypes[type] = null;
+        delete this.invalidHandleTypes[type];
+    },
+
+    /**
+     * Unsets an invalid handle id
+     * @method removeInvalidHandleId
+     * @param {string} id the id of the element to re-enable
+     */
+    removeInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        delete this.invalidHandleIds[id];
+    },
+
+    /**
+     * Unsets an invalid css class
+     * @method removeInvalidHandleClass
+     * @param {string} cssClass the class of the element(s) you wish to
+     * re-enable
+     */
+    removeInvalidHandleClass: function(cssClass) {
+        for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
+            if (this.invalidHandleClasses[i] == cssClass) {
+                delete this.invalidHandleClasses[i];
+            }
+        }
+    },
+
+    /**
+     * Checks the tag exclusion list to see if this click should be ignored
+     * @method isValidHandleChild
+     * @param {HTMLElement} node the HTMLElement to evaluate
+     * @return {boolean} true if this is a valid tag type, false if not
+     */
+    isValidHandleChild: function(node) {
+
+        var valid = true;
+        // var n = (node.nodeName == "#text") ? node.parentNode : node;
+        var nodeName;
+        try {
+            nodeName = node.nodeName.toUpperCase();
+        } catch(e) {
+            nodeName = node.nodeName;
+        }
+        valid = valid && !this.invalidHandleTypes[nodeName];
+        valid = valid && !this.invalidHandleIds[node.id];
+
+        for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) {
+            valid = !Ext.fly(node).hasClass(this.invalidHandleClasses[i]);
+        }
+
+
+        return valid;
+
+    },
+
+    /**
+     * Create the array of horizontal tick marks if an interval was specified
+     * in setXConstraint().
+     * @method setXTicks
+     * @private
+     */
+    setXTicks: function(iStartX, iTickSize) {
+        this.xTicks = [];
+        this.xTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.xTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * Create the array of vertical tick marks if an interval was specified in
+     * setYConstraint().
+     * @method setYTicks
+     * @private
+     */
+    setYTicks: function(iStartY, iTickSize) {
+        this.yTicks = [];
+        this.yTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.yTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Use
+     * this method to limit the horizontal travel of the element.  Pass in
+     * 0,0 for the parameters if you want to lock the drag to the y axis.
+     * @method setXConstraint
+     * @param {int} iLeft the number of pixels the element can move to the left
+     * @param {int} iRight the number of pixels the element can move to the
+     * right
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element
+     * should move iTickSize pixels at a time.
+     */
+    setXConstraint: function(iLeft, iRight, iTickSize) {
+        this.leftConstraint = iLeft;
+        this.rightConstraint = iRight;
+
+        this.minX = this.initPageX - iLeft;
+        this.maxX = this.initPageX + iRight;
+        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }
+
+        this.constrainX = true;
+    },
+
+    /**
+     * Clears any constraints applied to this instance.  Also clears ticks
+     * since they can't exist independent of a constraint at this time.
+     * @method clearConstraints
+     */
+    clearConstraints: function() {
+        this.constrainX = false;
+        this.constrainY = false;
+        this.clearTicks();
+    },
+
+    /**
+     * Clears any tick interval defined for this instance
+     * @method clearTicks
+     */
+    clearTicks: function() {
+        this.xTicks = null;
+        this.yTicks = null;
+        this.xTickSize = 0;
+        this.yTickSize = 0;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Set
+     * this to limit the vertical travel of the element.  Pass in 0,0 for the
+     * parameters if you want to lock the drag to the x axis.
+     * @method setYConstraint
+     * @param {int} iUp the number of pixels the element can move up
+     * @param {int} iDown the number of pixels the element can move down
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element should move iTickSize pixels at a time.
+     */
+    setYConstraint: function(iUp, iDown, iTickSize) {
+        this.topConstraint = iUp;
+        this.bottomConstraint = iDown;
+
+        this.minY = this.initPageY - iUp;
+        this.maxY = this.initPageY + iDown;
+        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }
+
+        this.constrainY = true;
+
+    },
+
+    /**
+     * resetConstraints must be called if you manually reposition a dd element.
+     * @method resetConstraints
+     * @param {boolean} maintainOffset
+     */
+    resetConstraints: function() {
+
+
+        // Maintain offsets if necessary
+        if (this.initPageX || this.initPageX === 0) {
+            // figure out how much this thing has moved
+            var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
+            var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
+
+            this.setInitPosition(dx, dy);
+
+        // This is the first time we have detected the element's position
+        } 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         );
+        }
+    },
+
+    /**
+     * Normally the drag element is moved pixel by pixel, but we can specify
+     * that it move a number of pixels at a time.  This method resolves the
+     * location when we have it set up like this.
+     * @method getTick
+     * @param {int} val where we want to place the object
+     * @param {int[]} tickArray sorted array of valid points
+     * @return {int} the closest tick
+     * @private
+     */
+    getTick: function(val, tickArray) {
+
+        if (!tickArray) {
+            // If tick interval is not defined, it is effectively 1 pixel,
+            // so we return the value passed to us.
+            return val;
+        } else if (tickArray[0] >= val) {
+            // The value is lower than the first tick, so we return the first
+            // tick.
+            return tickArray[0];
+        } else {
+            for (var i=0, len=tickArray.length; i<len; ++i) {
+                var next = i + 1;
+                if (tickArray[next] && tickArray[next] >= val) {
+                    var diff1 = val - tickArray[i];
+                    var diff2 = tickArray[next] - val;
+                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
+                }
+            }
+
+            // The value is larger than the last tick, so we return the last
+            // tick.
+            return tickArray[tickArray.length - 1];
+        }
+    },
+
+    /**
+     * toString method
+     * @method toString
+     * @return {string} string representation of the dd obj
+     */
+    toString: function() {
+        return ("DragDrop " + this.id);
+    }
+
+};
+
+})();
+/**
+ * The drag and drop utility provides a framework for building drag and drop
+ * applications.  In addition to enabling drag and drop for specific elements,
+ * the drag and drop elements are tracked by the manager class, and the
+ * interactions between the various elements are tracked during the drag and
+ * the implementing code is notified about these important moments.
+ */
+
+// Only load the library once.  Rewriting the manager class would orphan
+// existing drag and drop instances.
+if (!Ext.dd.DragDropMgr) {
+
+/**
+ * @class Ext.dd.DragDropMgr
+ * DragDropMgr is a singleton that tracks the element interaction for
+ * all DragDrop items in the window.  Generally, you will not call
+ * this class directly, but it does have helper methods that could
+ * be useful in your DragDrop implementations.
+ * @singleton
+ */
+Ext.dd.DragDropMgr = function() {
+
+    var Event = Ext.EventManager;
+
+    return {
+
+        /**
+         * Two dimensional Array of registered DragDrop objects.  The first
+         * dimension is the DragDrop item group, the second the DragDrop
+         * object.
+         * @property ids
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        ids: {},
+
+        /**
+         * Array of element ids defined as drag handles.  Used to determine
+         * if the element that generated the mousedown event is actually the
+         * handle and not the html element itself.
+         * @property handleIds
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        handleIds: {},
+
+        /**
+         * the DragDrop object that is currently being dragged
+         * @property dragCurrent
+         * @type DragDrop
+         * @private
+         * @static
+         **/
+        dragCurrent: null,
+
+        /**
+         * the DragDrop object(s) that are being hovered over
+         * @property dragOvers
+         * @type Array
+         * @private
+         * @static
+         */
+        dragOvers: {},
+
+        /**
+         * the X distance between the cursor and the object being dragged
+         * @property deltaX
+         * @type int
+         * @private
+         * @static
+         */
+        deltaX: 0,
+
+        /**
+         * the Y distance between the cursor and the object being dragged
+         * @property deltaY
+         * @type int
+         * @private
+         * @static
+         */
+        deltaY: 0,
+
+        /**
+         * Flag to determine if we should prevent the default behavior of the
+         * events we define. By default this is true, but this can be set to
+         * false if you need the default behavior (not recommended)
+         * @property preventDefault
+         * @type boolean
+         * @static
+         */
+        preventDefault: true,
+
+        /**
+         * Flag to determine if we should stop the propagation of the events
+         * we generate. This is true by default but you may want to set it to
+         * false if the html element contains other features that require the
+         * mouse click.
+         * @property stopPropagation
+         * @type boolean
+         * @static
+         */
+        stopPropagation: true,
+
+        /**
+         * Internal flag that is set to true when drag and drop has been
+         * intialized
+         * @property initialized
+         * @private
+         * @static
+         */
+        initialized: false,
+
+        /**
+         * All drag and drop can be disabled.
+         * @property locked
+         * @private
+         * @static
+         */
+        locked: false,
+
+        /**
+         * Called the first time an element is registered.
+         * @method init
+         * @private
+         * @static
+         */
+        init: function() {
+            this.initialized = true;
+        },
+
+        /**
+         * In point mode, drag and drop interaction is defined by the
+         * location of the cursor during the drag/drop
+         * @property POINT
+         * @type int
+         * @static
+         */
+        POINT: 0,
+
+        /**
+         * In intersect mode, drag and drop interaction is defined by the
+         * overlap of two or more drag and drop objects.
+         * @property INTERSECT
+         * @type int
+         * @static
+         */
+        INTERSECT: 1,
+
+        /**
+         * The current drag and drop mode.  Default: POINT
+         * @property mode
+         * @type int
+         * @static
+         */
+        mode: 0,
+
+        /**
+         * Runs method on all drag and drop objects
+         * @method _execOnAll
+         * @private
+         * @static
+         */
+        _execOnAll: function(sMethod, args) {
+            for (var i in this.ids) {
+                for (var j in this.ids[i]) {
+                    var oDD = this.ids[i][j];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+                    oDD[sMethod].apply(oDD, args);
+                }
+            }
+        },
+
+        /**
+         * Drag and drop initialization.  Sets up the global event handlers
+         * @method _onLoad
+         * @private
+         * @static
+         */
+        _onLoad: function() {
+
+            this.init();
+
+
+            Event.on(document, "mouseup",   this.handleMouseUp, this, true);
+            Event.on(document, "mousemove", this.handleMouseMove, this, true);
+            Event.on(window,   "unload",    this._onUnload, this, true);
+            Event.on(window,   "resize",    this._onResize, this, true);
+            // Event.on(window,   "mouseout",    this._test);
+
+        },
+
+        /**
+         * Reset constraints on all drag and drop objs
+         * @method _onResize
+         * @private
+         * @static
+         */
+        _onResize: function(e) {
+            this._execOnAll("resetConstraints", []);
+        },
+
+        /**
+         * Lock all drag and drop functionality
+         * @method lock
+         * @static
+         */
+        lock: function() { this.locked = true; },
+
+        /**
+         * Unlock all drag and drop functionality
+         * @method unlock
+         * @static
+         */
+        unlock: function() { this.locked = false; },
+
+        /**
+         * Is drag and drop locked?
+         * @method isLocked
+         * @return {boolean} True if drag and drop is locked, false otherwise.
+         * @static
+         */
+        isLocked: function() { return this.locked; },
+
+        /**
+         * Location cache that is set for all drag drop objects when a drag is
+         * initiated, cleared when the drag is finished.
+         * @property locationCache
+         * @private
+         * @static
+         */
+        locationCache: {},
+
+        /**
+         * Set useCache to false if you want to force object the lookup of each
+         * drag and drop linked element constantly during a drag.
+         * @property useCache
+         * @type boolean
+         * @static
+         */
+        useCache: true,
+
+        /**
+         * The number of pixels that the mouse needs to move after the
+         * mousedown before the drag is initiated.  Default=3;
+         * @property clickPixelThresh
+         * @type int
+         * @static
+         */
+        clickPixelThresh: 3,
+
+        /**
+         * The number of milliseconds after the mousedown event to initiate the
+         * drag if we don't get a mouseup event. Default=1000
+         * @property clickTimeThresh
+         * @type int
+         * @static
+         */
+        clickTimeThresh: 350,
+
+        /**
+         * Flag that indicates that either the drag pixel threshold or the
+         * mousdown time threshold has been met
+         * @property dragThreshMet
+         * @type boolean
+         * @private
+         * @static
+         */
+        dragThreshMet: false,
+
+        /**
+         * Timeout used for the click time threshold
+         * @property clickTimeout
+         * @type Object
+         * @private
+         * @static
+         */
+        clickTimeout: null,
+
+        /**
+         * The X position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startX
+         * @type int
+         * @private
+         * @static
+         */
+        startX: 0,
+
+        /**
+         * The Y position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startY
+         * @type int
+         * @private
+         * @static
+         */
+        startY: 0,
+
+        /**
+         * Each DragDrop instance must be registered with the DragDropMgr.
+         * This is executed in DragDrop.init()
+         * @method regDragDrop
+         * @param {DragDrop} oDD the DragDrop object to register
+         * @param {String} sGroup the name of the group this element belongs to
+         * @static
+         */
+        regDragDrop: function(oDD, sGroup) {
+            if (!this.initialized) { this.init(); }
+
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+            this.ids[sGroup][oDD.id] = oDD;
+        },
+
+        /**
+         * Removes the supplied dd instance from the supplied group. Executed
+         * by DragDrop.removeFromGroup, so don't call this function directly.
+         * @method removeDDFromGroup
+         * @private
+         * @static
+         */
+        removeDDFromGroup: function(oDD, sGroup) {
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+
+            var obj = this.ids[sGroup];
+            if (obj && obj[oDD.id]) {
+                delete obj[oDD.id];
+            }
+        },
+
+        /**
+         * Unregisters a drag and drop item.  This is executed in
+         * DragDrop.unreg, use that method instead of calling this directly.
+         * @method _remove
+         * @private
+         * @static
+         */
+        _remove: function(oDD) {
+            for (var g in oDD.groups) {
+                if (g && this.ids[g] && this.ids[g][oDD.id]) {
+                    delete this.ids[g][oDD.id];
+                }
+            }
+            delete this.handleIds[oDD.id];
+        },
+
+        /**
+         * Each DragDrop handle element must be registered.  This is done
+         * automatically when executing DragDrop.setHandleElId()
+         * @method regHandle
+         * @param {String} sDDId the DragDrop id this element is a handle for
+         * @param {String} sHandleId the id of the element that is the drag
+         * handle
+         * @static
+         */
+        regHandle: function(sDDId, sHandleId) {
+            if (!this.handleIds[sDDId]) {
+                this.handleIds[sDDId] = {};
+            }
+            this.handleIds[sDDId][sHandleId] = sHandleId;
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop item.
+         * @method isDragDrop
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop item,
+         * false otherwise
+         * @static
+         */
+        isDragDrop: function(id) {
+            return ( this.getDDById(id) ) ? true : false;
+        },
+
+        /**
+         * Returns the drag and drop instances that are in all groups the
+         * passed in instance belongs to.
+         * @method getRelated
+         * @param {DragDrop} p_oDD the obj to get related data for
+         * @param {boolean} bTargetsOnly if true, only return targetable objs
+         * @return {DragDrop[]} the related instances
+         * @static
+         */
+        getRelated: function(p_oDD, bTargetsOnly) {
+            var oDDs = [];
+            for (var i in p_oDD.groups) {
+                for (var j in this.ids[i]) {
+                    var dd = this.ids[i][j];
+                    if (! this.isTypeOfDD(dd)) {
+                        continue;
+                    }
+                    if (!bTargetsOnly || dd.isTarget) {
+                        oDDs[oDDs.length] = dd;
+                    }
+                }
+            }
+
+            return oDDs;
+        },
+
+        /**
+         * Returns true if the specified dd target is a legal target for
+         * the specifice drag obj
+         * @method isLegalTarget
+         * @param {DragDrop} the drag obj
+         * @param {DragDrop} the target
+         * @return {boolean} true if the target is a legal target for the
+         * dd obj
+         * @static
+         */
+        isLegalTarget: function (oDD, oTargetDD) {
+            var targets = this.getRelated(oDD, true);
+            for (var i=0, len=targets.length;i<len;++i) {
+                if (targets[i].id == oTargetDD.id) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * My goal is to be able to transparently determine if an object is
+         * typeof DragDrop, and the exact subclass of DragDrop.  typeof
+         * returns "object", oDD.constructor.toString() always returns
+         * "DragDrop" and not the name of the subclass.  So for now it just
+         * evaluates a well-known variable in DragDrop.
+         * @method isTypeOfDD
+         * @param {Object} the object to evaluate
+         * @return {boolean} true if typeof oDD = DragDrop
+         * @static
+         */
+        isTypeOfDD: function (oDD) {
+            return (oDD && oDD.__ygDragDrop);
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop handle for the given Drag Drop object.
+         * @method isHandle
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop handle, false
+         * otherwise
+         * @static
+         */
+        isHandle: function(sDDId, sHandleId) {
+            return ( this.handleIds[sDDId] &&
+                            this.handleIds[sDDId][sHandleId] );
+        },
+
+        /**
+         * Returns the DragDrop instance for a given id
+         * @method getDDById
+         * @param {String} id the id of the DragDrop object
+         * @return {DragDrop} the drag drop object, null if it is not found
+         * @static
+         */
+        getDDById: function(id) {
+            for (var i in this.ids) {
+                if (this.ids[i][id]) {
+                    return this.ids[i][id];
+                }
+            }
+            return null;
+        },
+
+        /**
+         * Fired after a registered DragDrop object gets the mousedown event.
+         * Sets up the events required to track the object being dragged
+         * @method handleMouseDown
+         * @param {Event} e the event
+         * @param oDD the DragDrop object being dragged
+         * @private
+         * @static
+         */
+        handleMouseDown: function(e, oDD) {
+            if(Ext.QuickTips){
+                Ext.QuickTips.disable();
+            }
+            if(this.dragCurrent){
+                // the original browser mouseup wasn't handled (e.g. outside FF browser window)
+                // so clean up first to avoid breaking the next drag
+                this.handleMouseUp(e);
+            }
+            
+            this.currentTarget = e.getTarget();
+            this.dragCurrent = oDD;
+
+            var el = oDD.getEl();
+
+            // track start position
+            this.startX = e.getPageX();
+            this.startY = e.getPageY();
+
+            this.deltaX = this.startX - el.offsetLeft;
+            this.deltaY = this.startY - el.offsetTop;
+
+            this.dragThreshMet = false;
+
+            this.clickTimeout = setTimeout(
+                    function() {
+                        var DDM = Ext.dd.DDM;
+                        DDM.startDrag(DDM.startX, DDM.startY);
+                    },
+                    this.clickTimeThresh );
+        },
+
+        /**
+         * Fired when either the drag pixel threshol or the mousedown hold
+         * time threshold has been met.
+         * @method startDrag
+         * @param x {int} the X position of the original mousedown
+         * @param y {int} the Y position of the original mousedown
+         * @static
+         */
+        startDrag: function(x, y) {
+            clearTimeout(this.clickTimeout);
+            if (this.dragCurrent) {
+                this.dragCurrent.b4StartDrag(x, y);
+                this.dragCurrent.startDrag(x, y);
+            }
+            this.dragThreshMet = true;
+        },
+
+        /**
+         * Internal function to handle the mouseup event.  Will be invoked
+         * from the context of the document.
+         * @method handleMouseUp
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseUp: function(e) {
+
+            if(Ext.QuickTips){
+                Ext.QuickTips.enable();
+            }
+            if (! this.dragCurrent) {
+                return;
+            }
+
+            clearTimeout(this.clickTimeout);
+
+            if (this.dragThreshMet) {
+                this.fireEvents(e, true);
+            } else {
+            }
+
+            this.stopDrag(e);
+
+            this.stopEvent(e);
+        },
+
+        /**
+         * Utility to stop event propagation and event default, if these
+         * features are turned on.
+         * @method stopEvent
+         * @param {Event} e the event as returned by this.getEvent()
+         * @static
+         */
+        stopEvent: function(e){
+            if(this.stopPropagation) {
+                e.stopPropagation();
+            }
+
+            if (this.preventDefault) {
+                e.preventDefault();
+            }
+        },
+
+        /**
+         * Internal function to clean up event handlers after the drag
+         * operation is complete
+         * @method stopDrag
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        stopDrag: function(e) {
+            // Fire the drag end event for the item that was dragged
+            if (this.dragCurrent) {
+                if (this.dragThreshMet) {
+                    this.dragCurrent.b4EndDrag(e);
+                    this.dragCurrent.endDrag(e);
+                }
+
+                this.dragCurrent.onMouseUp(e);
+            }
+
+            this.dragCurrent = null;
+            this.dragOvers = {};
+        },
+
+        /**
+         * Internal function to handle the mousemove event.  Will be invoked
+         * from the context of the html element.
+         *
+         * @TODO figure out what we can do about mouse events lost when the
+         * user drags objects beyond the window boundary.  Currently we can
+         * detect this in internet explorer by verifying that the mouse is
+         * down during the mousemove event.  Firefox doesn't give us the
+         * button state on the mousemove event.
+         * @method handleMouseMove
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseMove: function(e) {
+            if (! this.dragCurrent) {
+                return true;
+            }
+            // var button = e.which || e.button;
+
+            // check for IE mouseup outside of page boundary
+            if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) {
+                this.stopEvent(e);
+                return this.handleMouseUp(e);
+            }
+
+            if (!this.dragThreshMet) {
+                var diffX = Math.abs(this.startX - e.getPageX());
+                var diffY = Math.abs(this.startY - e.getPageY());
+                if (diffX > this.clickPixelThresh ||
+                            diffY > this.clickPixelThresh) {
+                    this.startDrag(this.startX, this.startY);
+                }
+            }
+
+            if (this.dragThreshMet) {
+                this.dragCurrent.b4Drag(e);
+                this.dragCurrent.onDrag(e);
+                if(!this.dragCurrent.moveOnly){
+                    this.fireEvents(e, false);
+                }
+            }
+
+            this.stopEvent(e);
+
+            return true;
+        },
+
+        /**
+         * Iterates over all of the DragDrop elements to find ones we are
+         * hovering over or dropping on
+         * @method fireEvents
+         * @param {Event} e the event
+         * @param {boolean} isDrop is this a drop op or a mouseover op?
+         * @private
+         * @static
+         */
+        fireEvents: function(e, isDrop) {
+            var dc = this.dragCurrent;
+
+            // If the user did the mouse up outside of the window, we could
+            // get here even though we have ended the drag.
+            if (!dc || dc.isLocked()) {
+                return;
+            }
+
+            var pt = e.getPoint();
+
+            // cache the previous dragOver array
+            var oldOvers = [];
+
+            var outEvts   = [];
+            var overEvts  = [];
+            var dropEvts  = [];
+            var enterEvts = [];
+
+            // Check to see if the object(s) we were hovering over is no longer
+            // being hovered over so we can fire the onDragOut event
+            for (var i in this.dragOvers) {
+
+                var ddo = this.dragOvers[i];
+
+                if (! this.isTypeOfDD(ddo)) {
+                    continue;
+                }
+
+                if (! this.isOverTarget(pt, ddo, this.mode)) {
+                    outEvts.push( ddo );
+                }
+
+                oldOvers[i] = true;
+                delete this.dragOvers[i];
+            }
+
+            for (var sGroup in dc.groups) {
+
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+
+                for (i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+
+                    if (oDD.isTarget && !oDD.isLocked() && ((oDD != dc) || (dc.ignoreSelf === false))) {
+                        if (this.isOverTarget(pt, oDD, this.mode)) {
+                            // look for drop interactions
+                            if (isDrop) {
+                                dropEvts.push( oDD );
+                            // look for drag enter and drag over interactions
+                            } else {
+
+                                // initial drag over: dragEnter fires
+                                if (!oldOvers[oDD.id]) {
+                                    enterEvts.push( oDD );
+                                // subsequent drag overs: dragOver fires
+                                } else {
+                                    overEvts.push( oDD );
+                                }
+
+                                this.dragOvers[oDD.id] = oDD;
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (this.mode) {
+                if (outEvts.length) {
+                    dc.b4DragOut(e, outEvts);
+                    dc.onDragOut(e, outEvts);
+                }
+
+                if (enterEvts.length) {
+                    dc.onDragEnter(e, enterEvts);
+                }
+
+                if (overEvts.length) {
+                    dc.b4DragOver(e, overEvts);
+                    dc.onDragOver(e, overEvts);
+                }
+
+                if (dropEvts.length) {
+                    dc.b4DragDrop(e, dropEvts);
+                    dc.onDragDrop(e, dropEvts);
+                }
+
+            } else {
+                // fire dragout events
+                var len = 0;
+                for (i=0, len=outEvts.length; i<len; ++i) {
+                    dc.b4DragOut(e, outEvts[i].id);
+                    dc.onDragOut(e, outEvts[i].id);
+                }
+
+                // fire enter events
+                for (i=0,len=enterEvts.length; i<len; ++i) {
+                    // dc.b4DragEnter(e, oDD.id);
+                    dc.onDragEnter(e, enterEvts[i].id);
+                }
+
+                // fire over events
+                for (i=0,len=overEvts.length; i<len; ++i) {
+                    dc.b4DragOver(e, overEvts[i].id);
+                    dc.onDragOver(e, overEvts[i].id);
+                }
+
+                // fire drop events
+                for (i=0, len=dropEvts.length; i<len; ++i) {
+                    dc.b4DragDrop(e, dropEvts[i].id);
+                    dc.onDragDrop(e, dropEvts[i].id);
+                }
+
+            }
+
+            // notify about a drop that did not find a target
+            if (isDrop && !dropEvts.length) {
+                dc.onInvalidDrop(e);
+            }
+
+        },
+
+        /**
+         * Helper function for getting the best match from the list of drag
+         * and drop objects returned by the drag and drop events when we are
+         * in INTERSECT mode.  It returns either the first object that the
+         * cursor is over, or the object that has the greatest overlap with
+         * the dragged element.
+         * @method getBestMatch
+         * @param  {DragDrop[]} dds The array of drag and drop objects
+         * targeted
+         * @return {DragDrop}       The best single match
+         * @static
+         */
+        getBestMatch: function(dds) {
+            var winner = null;
+            // Return null if the input is not what we expect
+            //if (!dds || !dds.length || dds.length == 0) {
+               // winner = null;
+            // If there is only one item, it wins
+            //} else if (dds.length == 1) {
+
+            var len = dds.length;
+
+            if (len == 1) {
+                winner = dds[0];
+            } else {
+                // Loop through the targeted items
+                for (var i=0; i<len; ++i) {
+                    var dd = dds[i];
+                    // If the cursor is over the object, it wins.  If the
+                    // cursor is over multiple matches, the first one we come
+                    // to wins.
+                    if (dd.cursorIsOver) {
+                        winner = dd;
+                        break;
+                    // Otherwise the object with the most overlap wins
+                    } else {
+                        if (!winner ||
+                            winner.overlap.getArea() < dd.overlap.getArea()) {
+                            winner = dd;
+                        }
+                    }
+                }
+            }
+
+            return winner;
+        },
+
+        /**
+         * Refreshes the cache of the top-left and bottom-right points of the
+         * drag and drop objects in the specified group(s).  This is in the
+         * format that is stored in the drag and drop instance, so typical
+         * usage is:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache(ddinstance.groups);
+         * </code>
+         * Alternatively:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true});
+         * </code>
+         * @TODO this really should be an indexed array.  Alternatively this
+         * method could accept both.
+         * @method refreshCache
+         * @param {Object} groups an associative array of groups to refresh
+         * @static
+         */
+        refreshCache: function(groups) {
+            for (var sGroup in groups) {
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+                for (var i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+
+                    if (this.isTypeOfDD(oDD)) {
+                    // if (this.isTypeOfDD(oDD) && oDD.isTarget) {
+                        var loc = this.getLocation(oDD);
+                        if (loc) {
+                            this.locationCache[oDD.id] = loc;
+                        } else {
+                            delete this.locationCache[oDD.id];
+                            // this will unregister the drag and drop object if
+                            // the element is not in a usable state
+                            // oDD.unreg();
+                        }
+                    }
+                }
+            }
+        },
+
+        /**
+         * This checks to make sure an element exists and is in the DOM.  The
+         * main purpose is to handle cases where innerHTML is used to remove
+         * drag and drop objects from the DOM.  IE provides an 'unspecified
+         * error' when trying to access the offsetParent of such an element
+         * @method verifyEl
+         * @param {HTMLElement} el the element to check
+         * @return {boolean} true if the element looks usable
+         * @static
+         */
+        verifyEl: function(el) {
+            if (el) {
+                var parent;
+                if(Ext.isIE){
+                    try{
+                        parent = el.offsetParent;
+                    }catch(e){}
+                }else{
+                    parent = el.offsetParent;
+                }
+                if (parent) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * Returns a Region object containing the drag and drop element's position
+         * and size, including the padding configured for it
+         * @method getLocation
+         * @param {DragDrop} oDD the drag and drop object to get the
+         *                       location for
+         * @return {Ext.lib.Region} a Region object representing the total area
+         *                             the element occupies, including any padding
+         *                             the instance is configured for.
+         * @static
+         */
+        getLocation: function(oDD) {
+            if (! this.isTypeOfDD(oDD)) {
+                return null;
+            }
+
+            var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
+
+            try {
+                pos= Ext.lib.Dom.getXY(el);
+            } catch (e) { }
+
+            if (!pos) {
+                return null;
+            }
+
+            x1 = pos[0];
+            x2 = x1 + el.offsetWidth;
+            y1 = pos[1];
+            y2 = y1 + el.offsetHeight;
+
+            t = y1 - oDD.padding[0];
+            r = x2 + oDD.padding[1];
+            b = y2 + oDD.padding[2];
+            l = x1 - oDD.padding[3];
+
+            return new Ext.lib.Region( t, r, b, l );
+        },
+
+        /**
+         * Checks the cursor location to see if it over the target
+         * @method isOverTarget
+         * @param {Ext.lib.Point} pt The point to evaluate
+         * @param {DragDrop} oTarget the DragDrop object we are inspecting
+         * @return {boolean} true if the mouse is over the target
+         * @private
+         * @static
+         */
+        isOverTarget: function(pt, oTarget, intersect) {
+            // use cache if available
+            var loc = this.locationCache[oTarget.id];
+            if (!loc || !this.useCache) {
+                loc = this.getLocation(oTarget);
+                this.locationCache[oTarget.id] = loc;
+
+            }
+
+            if (!loc) {
+                return false;
+            }
+
+            oTarget.cursorIsOver = loc.contains( pt );
+
+            // DragDrop is using this as a sanity check for the initial mousedown
+            // in this case we are done.  In POINT mode, if the drag obj has no
+            // contraints, we are also done. Otherwise we need to evaluate the
+            // location of the target as related to the actual location of the
+            // dragged element.
+            var dc = this.dragCurrent;
+            if (!dc || !dc.getTargetCoord ||
+                    (!intersect && !dc.constrainX && !dc.constrainY)) {
+                return oTarget.cursorIsOver;
+            }
+
+            oTarget.overlap = null;
+
+            // Get the current location of the drag element, this is the
+            // location of the mouse event less the delta that represents
+            // where the original mousedown happened on the element.  We
+            // need to consider constraints and ticks as well.
+            var pos = dc.getTargetCoord(pt.x, pt.y);
+
+            var el = dc.getDragEl();
+            var curRegion = new Ext.lib.Region( pos.y,
+                                                   pos.x + el.offsetWidth,
+                                                   pos.y + el.offsetHeight,
+                                                   pos.x );
+
+            var overlap = curRegion.intersect(loc);
+
+            if (overlap) {
+                oTarget.overlap = overlap;
+                return (intersect) ? true : oTarget.cursorIsOver;
+            } else {
+                return false;
+            }
+        },
+
+        /**
+         * unload event handler
+         * @method _onUnload
+         * @private
+         * @static
+         */
+        _onUnload: function(e, me) {
+            Ext.dd.DragDropMgr.unregAll();
+        },
+
+        /**
+         * Cleans up the drag and drop events and objects.
+         * @method unregAll
+         * @private
+         * @static
+         */
+        unregAll: function() {
+
+            if (this.dragCurrent) {
+                this.stopDrag();
+                this.dragCurrent = null;
+            }
+
+            this._execOnAll("unreg", []);
+
+            for (var i in this.elementCache) {
+                delete this.elementCache[i];
+            }
+
+            this.elementCache = {};
+            this.ids = {};
+        },
+
+        /**
+         * A cache of DOM elements
+         * @property elementCache
+         * @private
+         * @static
+         */
+        elementCache: {},
+
+        /**
+         * Get the wrapper for the DOM element specified
+         * @method getElWrapper
+         * @param {String} id the id of the element to get
+         * @return {Ext.dd.DDM.ElementWrapper} the wrapped element
+         * @private
+         * @deprecated This wrapper isn't that useful
+         * @static
+         */
+        getElWrapper: function(id) {
+            var oWrapper = this.elementCache[id];
+            if (!oWrapper || !oWrapper.el) {
+                oWrapper = this.elementCache[id] =
+                    new this.ElementWrapper(Ext.getDom(id));
+            }
+            return oWrapper;
+        },
+
+        /**
+         * Returns the actual DOM element
+         * @method getElement
+         * @param {String} id the id of the elment to get
+         * @return {Object} The element
+         * @deprecated use Ext.lib.Ext.getDom instead
+         * @static
+         */
+        getElement: function(id) {
+            return Ext.getDom(id);
+        },
+
+        /**
+         * Returns the style property for the DOM element (i.e.,
+         * document.getElById(id).style)
+         * @method getCss
+         * @param {String} id the id of the elment to get
+         * @return {Object} The style property of the element
+         * @deprecated use Ext.lib.Dom instead
+         * @static
+         */
+        getCss: function(id) {
+            var el = Ext.getDom(id);
+            return (el) ? el.style : null;
+        },
+
+        /**
+         * Inner class for cached elements
+         * @class DragDropMgr.ElementWrapper
+         * @for DragDropMgr
+         * @private
+         * @deprecated
+         */
+        ElementWrapper: function(el) {
+                /**
+                 * The element
+                 * @property el
+                 */
+                this.el = el || null;
+                /**
+                 * The element id
+                 * @property id
+                 */
+                this.id = this.el && el.id;
+                /**
+                 * A reference to the style property
+                 * @property css
+                 */
+                this.css = this.el && el.style;
+            },
+
+        /**
+         * Returns the X position of an html element
+         * @method getPosX
+         * @param el the element for which to get the position
+         * @return {int} the X coordinate
+         * @for DragDropMgr
+         * @deprecated use Ext.lib.Dom.getX instead
+         * @static
+         */
+        getPosX: function(el) {
+            return Ext.lib.Dom.getX(el);
+        },
+
+        /**
+         * Returns the Y position of an html element
+         * @method getPosY
+         * @param el the element for which to get the position
+         * @return {int} the Y coordinate
+         * @deprecated use Ext.lib.Dom.getY instead
+         * @static
+         */
+        getPosY: function(el) {
+            return Ext.lib.Dom.getY(el);
+        },
+
+        /**
+         * Swap two nodes.  In IE, we use the native method, for others we
+         * emulate the IE behavior
+         * @method swapNode
+         * @param n1 the first node to swap
+         * @param n2 the other node to swap
+         * @static
+         */
+        swapNode: function(n1, n2) {
+            if (n1.swapNode) {
+                n1.swapNode(n2);
+            } else {
+                var p = n2.parentNode;
+                var s = n2.nextSibling;
+
+                if (s == n1) {
+                    p.insertBefore(n1, n2);
+                } else if (n2 == n1.nextSibling) {
+                    p.insertBefore(n2, n1);
+                } else {
+                    n1.parentNode.replaceChild(n2, n1);
+                    p.insertBefore(n1, s);
+                }
+            }
+        },
+
+        /**
+         * Returns the current scroll position
+         * @method getScroll
+         * @private
+         * @static
+         */
+        getScroll: function () {
+            var t, l, dde=document.documentElement, db=document.body;
+            if (dde && (dde.scrollTop || dde.scrollLeft)) {
+                t = dde.scrollTop;
+                l = dde.scrollLeft;
+            } else if (db) {
+                t = db.scrollTop;
+                l = db.scrollLeft;
+            } else {
+
+            }
+            return { top: t, left: l };
+        },
+
+        /**
+         * Returns the specified element style property
+         * @method getStyle
+         * @param {HTMLElement} el          the element
+         * @param {string}      styleProp   the style property
+         * @return {string} The value of the style property
+         * @deprecated use Ext.lib.Dom.getStyle
+         * @static
+         */
+        getStyle: function(el, styleProp) {
+            return Ext.fly(el).getStyle(styleProp);
+        },
+
+        /**
+         * Gets the scrollTop
+         * @method getScrollTop
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollTop: function () { return this.getScroll().top; },
+
+        /**
+         * Gets the scrollLeft
+         * @method getScrollLeft
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollLeft: function () { return this.getScroll().left; },
+
+        /**
+         * Sets the x/y position of an element to the location of the
+         * target element.
+         * @method moveToEl
+         * @param {HTMLElement} moveEl      The element to move
+         * @param {HTMLElement} targetEl    The position reference element
+         * @static
+         */
+        moveToEl: function (moveEl, targetEl) {
+            var aCoord = Ext.lib.Dom.getXY(targetEl);
+            Ext.lib.Dom.setXY(moveEl, aCoord);
+        },
+
+        /**
+         * Numeric array sort function
+         * @method numericSort
+         * @static
+         */
+        numericSort: function(a, b) { return (a - b); },
+
+        /**
+         * Internal counter
+         * @property _timeoutCount
+         * @private
+         * @static
+         */
+        _timeoutCount: 0,
+
+        /**
+         * Trying to make the load order less important.  Without this we get
+         * an error if this file is loaded before the Event Utility.
+         * @method _addListeners
+         * @private
+         * @static
+         */
+        _addListeners: function() {
+            var DDM = Ext.dd.DDM;
+            if ( Ext.lib.Event && document ) {
+                DDM._onLoad();
+            } else {
+                if (DDM._timeoutCount > 2000) {
+                } else {
+                    setTimeout(DDM._addListeners, 10);
+                    if (document && document.body) {
+                        DDM._timeoutCount += 1;
+                    }
+                }
+            }
+        },
+
+        /**
+         * Recursively searches the immediate parent and all child nodes for
+         * the handle element in order to determine wheter or not it was
+         * clicked.
+         * @method handleWasClicked
+         * @param node the html element to inspect
+         * @static
+         */
+        handleWasClicked: function(node, id) {
+            if (this.isHandle(id, node.id)) {
+                return true;
+            } else {
+                // check to see if this is a text node child of the one we want
+                var p = node.parentNode;
+
+                while (p) {
+                    if (this.isHandle(id, p.id)) {
+                        return true;
+                    } else {
+                        p = p.parentNode;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+    };
+
+}();
+
+// shorter alias, save a few bytes
+Ext.dd.DDM = Ext.dd.DragDropMgr;
+Ext.dd.DDM._addListeners();
+
+}
+
+/**
+ * @class Ext.dd.DD
+ * A DragDrop implementation where the linked element follows the
+ * mouse cursor during a drag.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the linked element
+ * @param {String} sGroup the group of related DragDrop items
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DD:
+ *                    scroll
+ */
+Ext.dd.DD = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {
+
+    /**
+     * When set to true, the utility automatically tries to scroll the browser
+     * window when a drag and drop element is dragged near the viewport boundary.
+     * Defaults to true.
+     * @property scroll
+     * @type boolean
+     */
+    scroll: true,
+
+    /**
+     * Sets the pointer offset to the distance between the linked element's top
+     * left corner and the location the element was clicked
+     * @method autoOffset
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     */
+    autoOffset: function(iPageX, iPageY) {
+        var x = iPageX - this.startPageX;
+        var y = iPageY - this.startPageY;
+        this.setDelta(x, y);
+    },
+
+    /**
+     * Sets the pointer offset.  You can call this directly to force the
+     * offset to be in a particular location (e.g., pass in 0,0 to set it
+     * to the center of the object)
+     * @method setDelta
+     * @param {int} iDeltaX the distance from the left
+     * @param {int} iDeltaY the distance from the top
+     */
+    setDelta: function(iDeltaX, iDeltaY) {
+        this.deltaX = iDeltaX;
+        this.deltaY = iDeltaY;
+    },
+
+    /**
+     * Sets the drag element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method setDragElPos
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    setDragElPos: function(iPageX, iPageY) {
+        // the first time we do this, we are going to check to make sure
+        // the element has css positioning
+
+        var el = this.getDragEl();
+        this.alignElWithMouse(el, iPageX, iPageY);
+    },
+
+    /**
+     * Sets the element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method alignElWithMouse
+     * @param {HTMLElement} el the element to move
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    alignElWithMouse: function(el, iPageX, iPageY) {
+        var oCoord = this.getTargetCoord(iPageX, iPageY);
+        var fly = el.dom ? el : Ext.fly(el, '_dd');
+        if (!this.deltaSetXY) {
+            var aCoord = [oCoord.x, oCoord.y];
+            fly.setXY(aCoord);
+            var newLeft = fly.getLeft(true);
+            var newTop  = fly.getTop(true);
+            this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ];
+        } else {
+            fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]);
+        }
+
+        this.cachePosition(oCoord.x, oCoord.y);
+        this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        return oCoord;
+    },
+
+    /**
+     * Saves the most recent position so that we can reset the constraints and
+     * tick marks on-demand.  We need to know this so that we can calculate the
+     * number of pixels the element is offset from its original position.
+     * @method cachePosition
+     * @param iPageX the current x position (optional, this just makes it so we
+     * don't have to look it up again)
+     * @param iPageY the current y position (optional, this just makes it so we
+     * don't have to look it up again)
+     */
+    cachePosition: function(iPageX, iPageY) {
+        if (iPageX) {
+            this.lastPageX = iPageX;
+            this.lastPageY = iPageY;
+        } else {
+            var aCoord = Ext.lib.Dom.getXY(this.getEl());
+            this.lastPageX = aCoord[0];
+            this.lastPageY = aCoord[1];
+        }
+    },
+
+    /**
+     * Auto-scroll the window if the dragged object has been moved beyond the
+     * visible window boundary.
+     * @method autoScroll
+     * @param {int} x the drag element's x position
+     * @param {int} y the drag element's y position
+     * @param {int} h the height of the drag element
+     * @param {int} w the width of the drag element
+     * @private
+     */
+    autoScroll: function(x, y, h, w) {
+
+        if (this.scroll) {
+            // The client height
+            var clientH = Ext.lib.Dom.getViewHeight();
+
+            // The client width
+            var clientW = Ext.lib.Dom.getViewWidth();
+
+            // The amt scrolled down
+            var st = this.DDM.getScrollTop();
+
+            // The amt scrolled right
+            var sl = this.DDM.getScrollLeft();
+
+            // Location of the bottom of the element
+            var bot = h + y;
+
+            // Location of the right of the element
+            var right = w + x;
+
+            // The distance from the cursor to the bottom of the visible area,
+            // adjusted so that we don't scroll if the cursor is beyond the
+            // element drag constraints
+            var toBot = (clientH + st - y - this.deltaY);
+
+            // The distance from the cursor to the right of the visible area
+            var toRight = (clientW + sl - x - this.deltaX);
+
+
+            // How close to the edge the cursor must be before we scroll
+            // var thresh = (document.all) ? 100 : 40;
+            var thresh = 40;
+
+            // How many pixels to scroll per autoscroll op.  This helps to reduce
+            // clunky scrolling. IE is more sensitive about this ... it needs this
+            // value to be higher.
+            var scrAmt = (document.all) ? 80 : 30;
+
+            // Scroll down if we are near the bottom of the visible page and the
+            // obj extends below the crease
+            if ( bot > clientH && toBot < thresh ) {
+                window.scrollTo(sl, st + scrAmt);
+            }
+
+            // Scroll up if the window is scrolled down and the top of the object
+            // goes above the top border
+            if ( y < st && st > 0 && y - st < thresh ) {
+                window.scrollTo(sl, st - scrAmt);
+            }
+
+            // Scroll right if the obj is beyond the right border and the cursor is
+            // near the border.
+            if ( right > clientW && toRight < thresh ) {
+                window.scrollTo(sl + scrAmt, st);
+            }
+
+            // Scroll left if the window has been scrolled to the right and the obj
+            // extends past the left border
+            if ( x < sl && sl > 0 && x - sl < thresh ) {
+                window.scrollTo(sl - scrAmt, st);
+            }
+        }
+    },
+
+    /**
+     * Finds the location the element should be placed if we want to move
+     * it to where the mouse location less the click offset would place us.
+     * @method getTargetCoord
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     * @return an object that contains the coordinates (Object.x and Object.y)
+     * @private
+     */
+    getTargetCoord: function(iPageX, iPageY) {
+
+
+        var x = iPageX - this.deltaX;
+        var y = iPageY - this.deltaY;
+
+        if (this.constrainX) {
+            if (x < this.minX) { x = this.minX; }
+            if (x > this.maxX) { x = this.maxX; }
+        }
+
+        if (this.constrainY) {
+            if (y < this.minY) { y = this.minY; }
+            if (y > this.maxY) { y = this.maxY; }
+        }
+
+        x = this.getTick(x, this.xTicks);
+        y = this.getTick(y, this.yTicks);
+
+
+        return {x:x, y:y};
+    },
+
+    /**
+     * Sets up config options specific to this class. Overrides
+     * Ext.dd.DragDrop, but all versions of this method through the
+     * inheritance chain are called
+     */
+    applyConfig: function() {
+        Ext.dd.DD.superclass.applyConfig.call(this);
+        this.scroll = (this.config.scroll !== false);
+    },
+
+    /**
+     * Event that fires prior to the onMouseDown event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4MouseDown: function(e) {
+        // this.resetConstraints();
+        this.autoOffset(e.getPageX(),
+                            e.getPageY());
+    },
+
+    /**
+     * Event that fires prior to the onDrag event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4Drag: function(e) {
+        this.setDragElPos(e.getPageX(),
+                            e.getPageY());
+    },
+
+    toString: function() {
+        return ("DD " + this.id);
+    }
+
+    //////////////////////////////////////////////////////////////////////////
+    // Debugging ygDragDrop events that can be overridden
+    //////////////////////////////////////////////////////////////////////////
+    /*
+    startDrag: function(x, y) {
+    },
+
+    onDrag: function(e) {
+    },
+
+    onDragEnter: function(e, id) {
+    },
+
+    onDragOver: function(e, id) {
+    },
+
+    onDragOut: function(e, id) {
+    },
+
+    onDragDrop: function(e, id) {
+    },
+
+    endDrag: function(e) {
+    }
+
+    */
+
+});
+/**
+ * @class Ext.dd.DDProxy
+ * A DragDrop implementation that inserts an empty, bordered div into
+ * the document that follows the cursor during drag operations.  At the time of
+ * the click, the frame div is resized to the dimensions of the linked html
+ * element, and moved to the exact location of the linked element.
+ *
+ * References to the "frame" element refer to the single proxy element that
+ * was created to be dragged in place of all DDProxy elements on the
+ * page.
+ *
+ * @extends Ext.dd.DD
+ * @constructor
+ * @param {String} id the id of the linked html element
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DDProxy in addition to those in DragDrop:
+ *                   resizeFrame, centerFrame, dragElId
+ */
+Ext.dd.DDProxy = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+        this.initFrame();
+    }
+};
+
+/**
+ * The default drag frame div id
+ * @property Ext.dd.DDProxy.dragElId
+ * @type String
+ * @static
+ */
+Ext.dd.DDProxy.dragElId = "ygddfdiv";
+
+Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
+
+    /**
+     * By default we resize the drag frame to be the same size as the element
+     * we want to drag (this is to get the frame effect).  We can turn it off
+     * if we want a different behavior.
+     * @property resizeFrame
+     * @type boolean
+     */
+    resizeFrame: true,
+
+    /**
+     * By default the frame is positioned exactly where the drag element is, so
+     * we use the cursor offset provided by Ext.dd.DD.  Another option that works only if
+     * you do not have constraints on the obj is to have the drag frame centered
+     * around the cursor.  Set centerFrame to true for this effect.
+     * @property centerFrame
+     * @type boolean
+     */
+    centerFrame: false,
+
+    /**
+     * Creates the proxy element if it does not yet exist
+     * @method createFrame
+     */
+    createFrame: function() {
+        var self = this;
+        var body = document.body;
+
+        if (!body || !body.firstChild) {
+            setTimeout( function() { self.createFrame(); }, 50 );
+            return;
+        }
+
+        var div = this.getDragEl();
+
+        if (!div) {
+            div    = document.createElement("div");
+            div.id = this.dragElId;
+            var s  = div.style;
+
+            s.position   = "absolute";
+            s.visibility = "hidden";
+            s.cursor     = "move";
+            s.border     = "2px solid #aaa";
+            s.zIndex     = 999;
+
+            // appendChild can blow up IE if invoked prior to the window load event
+            // while rendering a table.  It is possible there are other scenarios
+            // that would cause this to happen as well.
+            body.insertBefore(div, body.firstChild);
+        }
+    },
+
+    /**
+     * Initialization for the drag frame element.  Must be called in the
+     * constructor of all subclasses
+     * @method initFrame
+     */
+    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);
+    },
+
+    /**
+     * Resizes the drag frame to the dimensions of the clicked object, positions
+     * it over the object, and finally displays it
+     * @method showFrame
+     * @param {int} iPageX X click position
+     * @param {int} iPageY Y click position
+     * @private
+     */
+    showFrame: function(iPageX, iPageY) {
+        var el = this.getEl();
+        var dragEl = this.getDragEl();
+        var s = dragEl.style;
+
+        this._resizeProxy();
+
+        if (this.centerFrame) {
+            this.setDelta( Math.round(parseInt(s.width,  10)/2),
+                           Math.round(parseInt(s.height, 10)/2) );
+        }
+
+        this.setDragElPos(iPageX, iPageY);
+
+        Ext.fly(dragEl).show();
+    },
+
+    /**
+     * The proxy is automatically resized to the dimensions of the linked
+     * element when a drag is initiated, unless resizeFrame is set to false
+     * @method _resizeProxy
+     * @private
+     */
+    _resizeProxy: function() {
+        if (this.resizeFrame) {
+            var el = this.getEl();
+            Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight);
+        }
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+        this.setDragElPos(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4StartDrag: function(x, y) {
+        // show the drag frame
+        this.showFrame(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4EndDrag: function(e) {
+        Ext.fly(this.getDragEl()).hide();
+    },
+
+    // overrides Ext.dd.DragDrop
+    // By default we try to move the element to the last location of the frame.
+    // This is so that the default behavior mirrors that of Ext.dd.DD.
+    endDrag: function(e) {
+
+        var lel = this.getEl();
+        var del = this.getDragEl();
+
+        // Show the drag frame briefly so we can get its position
+        del.style.visibility = "";
+
+        this.beforeMove();
+        // Hide the linked element before the move to get around a Safari
+        // rendering bug.
+        lel.style.visibility = "hidden";
+        Ext.dd.DDM.moveToEl(lel, del);
+        del.style.visibility = "hidden";
+        lel.style.visibility = "";
+
+        this.afterDrag();
+    },
+
+    beforeMove : function(){
+
+    },
+
+    afterDrag : function(){
+
+    },
+
+    toString: function() {
+        return ("DDProxy " + this.id);
+    }
+
+});
+/**
+ * @class Ext.dd.DDTarget
+ * A DragDrop implementation that does not move, but can be a drop
+ * target.  You would get the same result by simply omitting implementation
+ * for the event callbacks, but this way we reduce the processing cost of the
+ * event listener and the callbacks.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the element that is a drop target
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                 Valid properties for DDTarget in addition to those in
+ *                 DragDrop:
+ *                    none
+ */
+Ext.dd.DDTarget = function(id, sGroup, config) {
+    if (id) {
+        this.initTarget(id, sGroup, config);
+    }
+};
+
+// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop();
+Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, {
+    toString: function() {
+        return ("DDTarget " + this.id);
+    }
+});
+/**
+ * @class Ext.dd.DragTracker
+ * @extends Ext.util.Observable
+ */
+Ext.dd.DragTracker = function(config){
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event mousedown
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousedown',
+        /**
+         * @event mouseup
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mouseup',
+        /**
+         * @event mousemove
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousemove',
+        /**
+         * @event dragstart
+         * @param {Object} this
+         * @param {Object} startXY the page coordinates of the event
+         */
+        'dragstart',
+        /**
+         * @event dragend
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'dragend',
+        /**
+         * @event drag
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        '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,  {
+    /**
+     * @cfg {Boolean} active
+	 * Defaults to <tt>false</tt>.
+	 */	
+    active: false,
+    /**
+     * @cfg {Number} tolerance
+	 * Defaults to <tt>5</tt>.
+	 */	
+    tolerance: 5,
+    /**
+     * @cfg {Boolean/Number} autoStart
+	 * Defaults to <tt>false</tt>. Specify <tt>true</tt> to defer trigger start by 1000 ms.
+	 * Specify a Number for the number of milliseconds to defer trigger start.
+	 */	
+    autoStart: false,
+
+    initEl: function(el){
+        this.el = Ext.get(el);
+        el.on('mousedown', this.onMouseDown, this,
+                this.delegate ? {delegate: this.delegate} : undefined);
+    },
+
+    destroy : function(){
+        this.el.un('mousedown', this.onMouseDown, this);
+    },
+
+    onMouseDown: function(e, target){
+        if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){
+            this.startXY = this.lastXY = e.getXY();
+            this.dragTarget = this.delegate ? target : this.el.dom;
+            if(this.preventDefault !== false){
+                e.preventDefault();
+            }
+            var doc = Ext.getDoc();
+            doc.on('mouseup', this.onMouseUp, this);
+            doc.on('mousemove', this.onMouseMove, this);
+            doc.on('selectstart', this.stopSelect, this);
+            if(this.autoStart){
+                this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this);
+            }
+        }
+    },
+
+    onMouseMove: function(e, target){
+        // HACK: IE hack to see if button was released outside of window. */
+        if(this.active && Ext.isIE && !e.browserEvent.button){
+            e.preventDefault();
+            this.onMouseUp(e);
+            return;
+        }
+
+        e.preventDefault();
+        var xy = e.getXY(), s = this.startXY;
+        this.lastXY = xy;
+        if(!this.active){
+            if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){
+                this.triggerStart();
+            }else{
+                return;
+            }
+        }
+        this.fireEvent('mousemove', this, e);
+        this.onDrag(e);
+        this.fireEvent('drag', this, e);
+    },
+
+    onMouseUp: function(e){
+        var doc = Ext.getDoc();
+        doc.un('mousemove', this.onMouseMove, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        doc.un('selectstart', this.stopSelect, this);
+        e.preventDefault();
+        this.clearStart();
+        var wasActive = this.active;
+        this.active = false;
+        delete this.elRegion;
+        this.fireEvent('mouseup', this, e);
+        if(wasActive){
+            this.onEnd(e);
+            this.fireEvent('dragend', this, e);
+        }
+    },
+
+    triggerStart: function(isTimer){
+        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(e){
+        e.stopEvent();
+        return false;
+    },
+
+    onBeforeStart : function(e){
+
+    },
+
+    onStart : function(xy){
+
+    },
+
+    onDrag : function(e){
+
+    },
+
+    onEnd : function(e){
+
+    },
+
+    getDragTarget : function(){
+        return this.dragTarget;
+    },
+
+    getDragCt : function(){
+        return this.el;
+    },
+
+    getXY : function(constrain){
+        return constrain ?
+               this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY;
+    },
+
+    getOffset : function(constrain){
+        var xy = this.getXY(constrain);
+        var s = this.startXY;
+        return [s[0]-xy[0], s[1]-xy[1]];
+    },
+
+    constrainModes: {
+        'point' : function(xy){
+
+            if(!this.elRegion){
+                this.elRegion = this.getDragCt().getRegion();
+            }
+
+            var dr = this.dragRegion;
+
+            dr.left = xy[0];
+            dr.top = xy[1];
+            dr.right = xy[0];
+            dr.bottom = xy[1];
+
+            dr.constrainTo(this.elRegion);
+
+            return [dr.left, dr.top];
+        }
+    }
+});/**
+ * @class Ext.dd.ScrollManager
+ * <p>Provides automatic scrolling of overflow regions in the page during drag operations.</p>
+ * <p>The ScrollManager configs will be used as the defaults for any scroll container registered with it,
+ * but you can also override most of the configs per scroll container by adding a 
+ * <tt>ddScrollConfig</tt> object to the target element that contains these properties: {@link #hthresh},
+ * {@link #vthresh}, {@link #increment} and {@link #frequency}.  Example usage:
+ * <pre><code>
+var el = Ext.get('scroll-ct');
+el.ddScrollConfig = {
+    vthresh: 50,
+    hthresh: -1,
+    frequency: 100,
+    increment: 200
+};
+Ext.dd.ScrollManager.register(el);
+</code></pre>
+ * <b>Note: This class uses "Point Mode" and is untested in "Intersect Mode".</b>
+ * @singleton
+ */
+Ext.dd.ScrollManager = function(){
+    var ddm = Ext.dd.DragDropMgr;
+    var els = {};
+    var dragEl = null;
+    var proc = {};
+    
+    var onStop = function(e){
+        dragEl = null;
+        clearProc();
+    };
+    
+    var triggerRefresh = function(){
+        if(ddm.dragCurrent){
+             ddm.refreshCache(ddm.dragCurrent.groups);
+        }
+    };
+    
+    var doScroll = function(){
+        if(ddm.dragCurrent){
+            var dds = Ext.dd.ScrollManager;
+            var inc = proc.el.ddScrollConfig ?
+                      proc.el.ddScrollConfig.increment : dds.increment;
+            if(!dds.animate){
+                if(proc.el.scroll(proc.dir, inc)){
+                    triggerRefresh();
+                }
+            }else{
+                proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh);
+            }
+        }
+    };
+    
+    var clearProc = function(){
+        if(proc.id){
+            clearInterval(proc.id);
+        }
+        proc.id = 0;
+        proc.el = null;
+        proc.dir = "";
+    };
+    
+    var startProc = function(el, dir){
+        clearProc();
+        proc.el = el;
+        proc.dir = dir;
+        var freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) ? 
+                el.ddScrollConfig.frequency : Ext.dd.ScrollManager.frequency;
+        proc.id = setInterval(doScroll, freq);
+    };
+    
+    var onFire = function(e, isDrop){
+        if(isDrop || !ddm.dragCurrent){ return; }
+        var dds = Ext.dd.ScrollManager;
+        if(!dragEl || dragEl != ddm.dragCurrent){
+            dragEl = ddm.dragCurrent;
+            // refresh regions on drag start
+            dds.refreshCache();
+        }
+        
+        var xy = Ext.lib.Event.getXY(e);
+        var pt = new Ext.lib.Point(xy[0], xy[1]);
+        for(var id in els){
+            var el = els[id], r = el._region;
+            var c = el.ddScrollConfig ? el.ddScrollConfig : dds;
+            if(r && r.contains(pt) && el.isScrollable()){
+                if(r.bottom - pt.y <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "down");
+                    }
+                    return;
+                }else if(r.right - pt.x <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "left");
+                    }
+                    return;
+                }else if(pt.y - r.top <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "up");
+                    }
+                    return;
+                }else if(pt.x - r.left <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "right");
+                    }
+                    return;
+                }
+            }
+        }
+        clearProc();
+    };
+    
+    ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm);
+    ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm);
+    
+    return {
+        /**
+         * Registers new overflow element(s) to auto scroll
+         * @param {Mixed/Array} el The id of or the element to be scrolled or an array of either
+         */
+        register : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.register(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                els[el.id] = el;
+            }
+        },
+        
+        /**
+         * Unregisters overflow element(s) so they are no longer scrolled
+         * @param {Mixed/Array} el The id of or the element to be removed or an array of either
+         */
+        unregister : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.unregister(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                delete els[el.id];
+            }
+        },
+        
+        /**
+         * The number of pixels from the top or bottom edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        vthresh : 25,
+        /**
+         * The number of pixels from the right or left edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        hthresh : 25,
+
+        /**
+         * The number of pixels to scroll in each scroll increment (defaults to 50)
+         * @type Number
+         */
+        increment : 100,
+        
+        /**
+         * The frequency of scrolls in milliseconds (defaults to 500)
+         * @type Number
+         */
+        frequency : 500,
+        
+        /**
+         * True to animate the scroll (defaults to true)
+         * @type Boolean
+         */
+        animate: true,
+        
+        /**
+         * The animation duration in seconds - 
+         * MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4)
+         * @type Number
+         */
+        animDuration: .4,
+        
+        /**
+         * Manually trigger a cache refresh.
+         */
+        refreshCache : function(){
+            for(var id in els){
+                if(typeof els[id] == 'object'){ // for people extending the object prototype
+                    els[id]._region = els[id].getRegion();
+                }
+            }
+        }
+    };
+}();/**
+ * @class Ext.dd.Registry
+ * Provides easy access to all drag drop components that are registered on a page.  Items can be retrieved either
+ * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.
+ * @singleton
+ */
+Ext.dd.Registry = function(){
+    var elements = {}; 
+    var handles = {}; 
+    var autoIdSeed = 0;
+
+    var getId = function(el, autogen){
+        if(typeof el == "string"){
+            return el;
+        }
+        var id = el.id;
+        if(!id && autogen !== false){
+            id = "extdd-" + (++autoIdSeed);
+            el.id = id;
+        }
+        return id;
+    };
+    
+    return {
+    /**
+     * Resgister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to register
+     * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved
+     * in drag drop operations.  You can populate this object with any arbitrary properties that your own code
+     * knows how to interpret, plus there are some specific properties known to the Registry that should be
+     * populated in the data object (if applicable):
+     * <pre>
+Value      Description<br />
+---------  ------------------------------------------<br />
+handles    Array of DOM nodes that trigger dragging<br />
+           for the element being registered<br />
+isHandle   True if the element passed in triggers<br />
+           dragging itself, else false
+</pre>
+     */
+        register : function(el, data){
+            data = data || {};
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            data.ddel = el;
+            elements[getId(el)] = data;
+            if(data.isHandle !== false){
+                handles[data.ddel.id] = data;
+            }
+            if(data.handles){
+                var hs = data.handles;
+                for(var i = 0, len = hs.length; i < len; i++){
+                	handles[getId(hs[i])] = data;
+                }
+            }
+        },
+
+    /**
+     * Unregister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to unregister
+     */
+        unregister : function(el){
+            var id = getId(el, false);
+            var data = elements[id];
+            if(data){
+                delete elements[id];
+                if(data.handles){
+                    var hs = data.handles;
+                    for(var i = 0, len = hs.length; i < len; i++){
+                    	delete handles[getId(hs[i], false)];
+                    }
+                }
+            }
+        },
+
+    /**
+     * Returns the handle registered for a DOM Node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} handle The custom handle data
+     */
+        getHandle : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return handles[id];
+        },
+
+    /**
+     * Returns the handle that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} handle The custom handle data
+     */
+        getHandleFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? handles[t.id] : null;
+        },
+
+    /**
+     * Returns a custom data object that is registered for a DOM node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} data The custom data
+     */
+        getTarget : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return elements[id];
+        },
+
+    /**
+     * Returns a custom data object that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+        getTargetFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? elements[t.id] || handles[t.id] : null;
+        }
+    };
+}();/**
+ * @class Ext.dd.StatusProxy
+ * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair.  This is the
+ * default drag proxy used by all Ext.dd components.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.dd.StatusProxy = function(config){
+    Ext.apply(this, config);
+    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: !config || config.shadow !== false
+    });
+    this.ghost = Ext.get(this.el.dom.childNodes[1]);
+    this.dropStatus = this.dropNotAllowed;
+};
+
+Ext.dd.StatusProxy.prototype = {
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Updates the proxy's visual element to indicate the status of whether or not drop is allowed
+     * over the current target element.
+     * @param {String} cssClass The css class for the new drop status indicator image
+     */
+    setStatus : function(cssClass){
+        cssClass = cssClass || this.dropNotAllowed;
+        if(this.dropStatus != cssClass){
+            this.el.replaceClass(this.dropStatus, cssClass);
+            this.dropStatus = cssClass;
+        }
+    },
+
+    /**
+     * Resets the status indicator to the default dropNotAllowed value
+     * @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it
+     */
+    reset : function(clearGhost){
+        this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed;
+        this.dropStatus = this.dropNotAllowed;
+        if(clearGhost){
+            this.ghost.update("");
+        }
+    },
+
+    /**
+     * Updates the contents of the ghost element
+     * @param {String/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a
+     * DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first).
+     */
+    update : function(html){
+        if(typeof html == "string"){
+            this.ghost.update(html);
+        }else{
+            this.ghost.update("");
+            html.style.margin = "0";
+            this.ghost.dom.appendChild(html);
+        }
+        var el = this.ghost.dom.firstChild; 
+        if(el){
+            Ext.fly(el).setStyle('float', 'none');
+        }
+    },
+
+    /**
+     * Returns the underlying proxy {@link Ext.Layer}
+     * @return {Ext.Layer} el
+    */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the ghost element
+     * @return {Ext.Element} el
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Hides the proxy
+     * @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them
+     */
+    hide : function(clear){
+        this.el.hide();
+        if(clear){
+            this.reset(true);
+        }
+    },
+
+    /**
+     * Stops the repair animation if it's currently running
+     */
+    stop : function(){
+        if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){
+            this.anim.stop();
+        }
+    },
+
+    /**
+     * Displays this proxy
+     */
+    show : function(){
+        this.el.show();
+    },
+
+    /**
+     * Force the Layer to sync its shadow and shim positions to the element
+     */
+    sync : function(){
+        this.el.sync();
+    },
+
+    /**
+     * Causes the proxy to return to its position of origin via an animation.  Should be called after an
+     * invalid drop operation by the item being dragged.
+     * @param {Array} xy The XY position of the element ([x, y])
+     * @param {Function} callback The function to call after the repair is complete
+     * @param {Object} scope The scope in which to execute the callback
+     */
+    repair : function(xy, callback, scope){
+        this.callback = callback;
+        this.scope = scope;
+        if(xy && this.animRepair !== false){
+            this.el.addClass("x-dd-drag-repair");
+            this.el.hideUnders(true);
+            this.anim = this.el.shift({
+                duration: this.repairDuration || .5,
+                easing: 'easeOut',
+                xy: xy,
+                stopFx: true,
+                callback: this.afterRepair,
+                scope: this
+            });
+        }else{
+            this.afterRepair();
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        this.hide(true);
+        if(typeof this.callback == "function"){
+            this.callback.call(this.scope || this);
+        }
+        this.callback = null;
+        this.scope = null;
+    }
+};/**
+ * @class Ext.dd.DragSource
+ * @extends Ext.dd.DDProxy
+ * A simple class that provides the basic implementation needed to make any element draggable.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragSource = function(el, config){
+    this.el = Ext.get(el);
+    if(!this.dragData){
+        this.dragData = {};
+    }
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Returns the data object associated with this drag source
+     * @return {Object} data An object containing arbitrary data
+     */
+    getDragData : function(e){
+        return this.dragData;
+    },
+
+    // private
+    onDragEnter : function(e, id){
+        var target = Ext.dd.DragDropMgr.getDDById(id);
+        this.cachedTarget = target;
+        if(this.beforeDragEnter(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyEnter(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }else{
+                this.proxy.setStatus(this.dropAllowed);
+            }
+            
+            if(this.afterDragEnter){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * when the dragged item enters the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragEnter
+                 */
+                this.afterDragEnter(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * before the dragged item enters the drop target and optionally cancel the onDragEnter.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragEnter : function(target, e, id){
+        return true;
+    },
+
+    // private
+    alignElWithMouse: function() {
+        Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments);
+        this.proxy.sync();
+    },
+
+    // private
+    onDragOver : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOver(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyOver(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }
+
+            if(this.afterDragOver){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * while the dragged item is over the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOver
+                 */
+                this.afterDragOver(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * while the dragged item is over the drop target and optionally cancel the onDragOver.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOver : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onDragOut : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOut(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                target.notifyOut(this, e, this.dragData);
+            }
+            this.proxy.reset();
+            if(this.afterDragOut){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after the dragged item is dragged out of the target without dropping.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOut
+                 */
+                this.afterDragOut(target, e, id);
+            }
+        }
+        this.cachedTarget = null;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dragged out of the target without dropping, and optionally cancel the onDragOut.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOut : function(target, e, id){
+        return true;
+    },
+    
+    // private
+    onDragDrop : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragDrop(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                if(target.notifyDrop(this, e, this.dragData)){ // valid drop?
+                    this.onValidDrop(target, e, id);
+                }else{
+                    this.onInvalidDrop(target, e, id);
+                }
+            }else{
+                this.onValidDrop(target, e, id);
+            }
+            
+            if(this.afterDragDrop){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after a valid drag drop has occurred by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dropped element
+                 * @method afterDragDrop
+                 */
+                this.afterDragDrop(target, e, id);
+            }
+        }
+        delete this.cachedTarget;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dropped onto the target and optionally cancel the onDragDrop.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag drop event is valid, else false to cancel
+     */
+    beforeDragDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onValidDrop : function(target, e, id){
+        this.hideProxy();
+        if(this.afterValidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after a valid drop has occurred by providing an implementation.
+             * @param {Object} target The target DD 
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterValidDrop(target, e, id);
+        }
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return this.el.getXY();  
+    },
+
+    // private
+    onInvalidDrop : function(target, e, id){
+        this.beforeInvalidDrop(target, e, id);
+        if(this.cachedTarget){
+            if(this.cachedTarget.isNotifyTarget){
+                this.cachedTarget.notifyOut(this, e, this.dragData);
+            }
+            this.cacheTarget = null;
+        }
+        this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this);
+
+        if(this.afterInvalidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after an invalid drop has occurred by providing an implementation.
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterInvalidDrop(e, id);
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        if(Ext.enableFx){
+            this.el.highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action after an invalid
+     * drop has occurred.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the invalid drop should proceed, else false to cancel
+     */
+    beforeInvalidDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    handleMouseDown : function(e){
+        if(this.dragging) {
+            return;
+        }
+        var data = this.getDragData(e);
+        if(data && this.onBeforeDrag(data, e) !== false){
+            this.dragData = data;
+            this.proxy.stop();
+            Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments);
+        } 
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the initial
+     * drag event begins and optionally cancel it.
+     * @param {Object} data An object containing arbitrary data to be shared with drop targets
+     * @param {Event} e The event object
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    onBeforeDrag : function(data, e){
+        return true;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action once the initial
+     * drag event has begun.  The drag cannot be canceled from this function.
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     */
+    onStartDrag : Ext.emptyFn,
+
+    // private override
+    startDrag : function(x, y){
+        this.proxy.reset();
+        this.dragging = true;
+        this.proxy.update("");
+        this.onInitDrag(x, y);
+        this.proxy.show();
+    },
+
+    // private
+    onInitDrag : function(x, y){
+        var clone = this.el.dom.cloneNode(true);
+        clone.id = Ext.id(); // prevent duplicate ids
+        this.proxy.update(clone);
+        this.onStartDrag(x, y);
+        return true;
+    },
+
+    /**
+     * Returns the drag source's underlying {@link Ext.dd.StatusProxy}
+     * @return {Ext.dd.StatusProxy} proxy The StatusProxy
+     */
+    getProxy : function(){
+        return this.proxy;  
+    },
+
+    /**
+     * Hides the drag source's {@link Ext.dd.StatusProxy}
+     */
+    hideProxy : function(){
+        this.proxy.hide();  
+        this.proxy.reset(true);
+        this.dragging = false;
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    },
+
+    // private - override to prevent hiding
+    b4EndDrag: function(e) {
+    },
+
+    // private - override to prevent moving
+    endDrag : function(e){
+        this.onEndDrag(this.dragData, e);
+    },
+
+    // private
+    onEndDrag : function(data, e){
+    },
+    
+    // private - pin to cursor
+    autoOffset : function(x, y) {
+        this.setDelta(-12, -20);
+    }    
+});/**
+ * @class Ext.dd.DropTarget
+ * @extends Ext.dd.DDTarget
+ * A simple class that provides the basic implementation needed to make any element a drop target that can have
+ * draggable items dropped onto it.  The drop has no effect until an implementation of notifyDrop is provided.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropTarget = function(el, config){
+    this.el = Ext.get(el);
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} overClass
+     * The CSS class applied to the drop target element while the drag source is over it (defaults to "").
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    // private
+    isTarget : true,
+
+    // private
+    isNotifyTarget : true,
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source is now over the
+     * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
+     * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        if(this.overClass){
+            this.el.addClass(this.overClass);
+        }
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the target.
+     * This method will be called on every mouse movement while the drag source is over the drop target.
+     * This default implementation simply returns the dropAllowed config value.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source has been dragged
+     * out of the target without dropping.  This default implementation simply removes the CSS class specified by
+     * overClass (if any) from the drop element.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    notifyOut : function(dd, e, data){
+        if(this.overClass){
+            this.el.removeClass(this.overClass);
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the dragged item has
+     * been dropped on it.  This method has no default implementation and returns false, so you must provide an
+     * implementation that does something to process the drop event and returns true so that the drag source's
+     * repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        return false;
+    }
+});/**
+ * @class Ext.dd.DragZone
+ * @extends Ext.dd.DragSource
+ * <p>This class provides a container DD instance that allows dragging of multiple child source nodes.</p>
+ * <p>This class does not move the drag target nodes, but a proxy element which may contain
+ * any DOM structure you wish. The DOM element to show in the proxy is provided by either a
+ * provided implementation of {@link #getDragData}, or by registered draggables registered with {@link Ext.dd.Registry}</p>
+ * <p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some
+ * application object (For example nodes in a {@link Ext.DataView DataView}) then use of this class
+ * is the most efficient way to "activate" those nodes.</p>
+ * <p>By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DragZone to manage any number of draggable elements is to configure
+ * the DragZone with  an implementation of the {@link #getDragData} method which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector. For example, to make the nodes of a DataView draggable, use the following
+ * technique. Knowledge of the use of the DataView is required:</p><pre><code>
+myDataView.on('render', function() {
+    myDataView.dragZone = new Ext.dd.DragZone(myDataView.getEl(), {
+
+//      On receipt of a mousedown event, see if it is within a DataView node.
+//      Return a drag data object if so.
+        getDragData: function(e) {
+
+//          Use the DataView's own itemSelector (a mandatory property) to
+//          test if the mousedown is within one of the DataView's nodes.
+            var sourceEl = e.getTarget(myDataView.itemSelector, 10);
+
+//          If the mousedown is within a DataView node, clone the node to produce
+//          a ddel element for use by the drag proxy. Also add application data
+//          to the returned data object.
+            if (sourceEl) {
+                d = sourceEl.cloneNode(true);
+                d.id = Ext.id();
+                return {
+                    ddel: d,
+                    sourceEl: sourceEl,
+                    repairXY: Ext.fly(sourceEl).getXY(),
+                    sourceStore: myDataView.store,
+                    draggedRecord: v.getRecord(sourceEl)
+                }
+            }
+        },
+
+//      Provide coordinates for the proxy to slide back to on failed drag.
+//      This is the original XY coordinates of the draggable element captured
+//      in the getDragData method.
+        getRepairXY: function() {
+            return this.dragData.repairXY;
+        }
+    });
+});</code></pre>
+ * See the {@link Ext.dd.DropZone DropZone} documentation for details about building a DropZone which
+ * cooperates with this DragZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragZone = function(el, config){
+    Ext.dd.DragZone.superclass.constructor.call(this, el, config);
+    if(this.containerScroll){
+        Ext.dd.ScrollManager.register(this.el);
+    }
+};
+
+Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, {
+    /**
+     * This property contains the data representing the dragged object. This data is set up by the implementation
+     * of the {@link #getDragData} method. It must contain a <tt>ddel</tt> property, but can contain
+     * any other data according to the application's needs.
+     * @type Object
+     * @property dragData
+     */
+    /**
+     * @cfg {Boolean} containerScroll True to register this container with the Scrollmanager
+     * for auto scrolling during drag operations.
+     */
+    /**
+     * @cfg {String} hlColor The color to use when visually highlighting the drag source in the afterRepair
+     * method after a failed drop (defaults to "c3daf9" - light blue)
+     */
+
+    /**
+     * Called when a mousedown occurs in this container. Looks in {@link Ext.dd.Registry}
+     * for a valid target to drag based on the mouse down. Override this method
+     * to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned
+     * object has a "ddel" attribute (with an HTML Element) for other functions to work.
+     * @param {EventObject} e The mouse down event
+     * @return {Object} The dragData
+     */
+    getDragData : function(e){
+        return Ext.dd.Registry.getHandleFromEvent(e);
+    },
+    
+    /**
+     * Called once drag threshold has been reached to initialize the proxy element. By default, it clones the
+     * this.dragData.ddel
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     * @return {Boolean} true to continue the drag, false to cancel
+     */
+    onInitDrag : function(x, y){
+        this.proxy.update(this.dragData.ddel.cloneNode(true));
+        this.onStartDrag(x, y);
+        return true;
+    },
+    
+    /**
+     * Called after a repair of an invalid drop. By default, highlights this.dragData.ddel 
+     */
+    afterRepair : function(){
+        if(Ext.enableFx){
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * Called before a repair of an invalid drop to get the XY to animate to. By default returns
+     * the XY of this.dragData.ddel
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e){
+        return Ext.Element.fly(this.dragData.ddel).getXY();  
+    }
+});/**
+ * @class Ext.dd.DropZone
+ * @extends Ext.dd.DropTarget
+ * <p>This class provides a container DD instance that allows dropping on multiple child target nodes.</p>
+ * <p>By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DropZone to manage any number of target elements is to configure the
+ * DropZone with an implementation of {@link #getTargetFromEvent} which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector.</p>
+ * <p>Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over
+ * a drop target, that target is passed as the first parameter to {@link #onNodeEnter}, {@link #onNodeOver},
+ * {@link #onNodeOut}, {@link #onNodeDrop}. You may configure the instance of DropZone with implementations
+ * of these methods to provide application-specific behaviour for these events to update both
+ * application state, and UI state.</p>
+ * <p>For example to make a GridPanel a cooperating target with the example illustrated in
+ * {@link Ext.dd.DragZone DragZone}, the following technique might be used:</p><pre><code>
+myGridPanel.on('render', function() {
+    myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, {
+
+//      If the mouse is over a grid row, return that node. This is
+//      provided as the "target" parameter in all "onNodeXXXX" node event handling functions
+        getTargetFromEvent: function(e) {
+            return e.getTarget(myGridPanel.getView().rowSelector);
+        },
+
+//      On entry into a target node, highlight that node.
+        onNodeEnter : function(target, dd, e, data){ 
+            Ext.fly(target).addClass('my-row-highlight-class');
+        },
+
+//      On exit from a target node, unhighlight that node.
+        onNodeOut : function(target, dd, e, data){ 
+            Ext.fly(target).removeClass('my-row-highlight-class');
+        },
+
+//      While over a target node, return the default drop allowed class which
+//      places a "tick" icon into the drag proxy.
+        onNodeOver : function(target, dd, e, data){ 
+            return Ext.dd.DropZone.prototype.dropAllowed;
+        },
+
+//      On node drop we can interrogate the target to find the underlying
+//      application object that is the real target of the dragged data.
+//      In this case, it is a Record in the GridPanel's Store.
+//      We can use the data set up by the DragZone's getDragData method to read
+//      any data we decided to attach in the DragZone's getDragData method.
+        onNodeDrop : function(target, dd, e, data){
+            var rowIndex = myGridPanel.getView().findRowIndex(target);
+            var r = myGridPanel.getStore().getAt(rowIndex);
+            Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id +
+                ' on Record id ' + r.id);
+            return true;
+        }
+    });
+}
+</code></pre>
+ * See the {@link Ext.dd.DragZone DragZone} documentation for details about building a DragZone which
+ * cooperates with this DropZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropZone = function(el, config){
+    Ext.dd.DropZone.superclass.constructor.call(this, el, config);
+};
+
+Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
+    /**
+     * Returns a custom data object associated with the DOM node that is the target of the event.  By default
+     * this looks up the event target in the {@link Ext.dd.Registry}, although you can override this method to
+     * provide your own custom lookup.
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+    getTargetFromEvent : function(e){
+        return Ext.dd.Registry.getTargetFromEvent(e);
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from 
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeEnter : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * The default implementation returns this.dropNotAllowed, so it should be
+     * overridden to provide the proper feedback.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onNodeOver : function(n, dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dragged out of
+     * the drop node without dropping.  This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeOut : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped onto
+     * the drop node.  The default implementation returns false, so it should be overridden to provide the
+     * appropriate processing of the drop event and return true so that the drag source's repair action does not run.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onNodeDrop : function(n, dd, e, data){
+        return false;
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is being dragged over it,
+     * but not over any of its registered drop nodes.  The default implementation returns this.dropNotAllowed, so
+     * it should be overridden to provide the proper feedback if necessary.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onContainerOver : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped on it,
+     * but not on any of its registered drop nodes.  The default implementation returns false, so it should be
+     * overridden to provide the appropriate processing of the drop event if you need the drop zone itself to
+     * be able to accept drops.  It should return true when valid so that the drag source's repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onContainerDrop : function(dd, e, data){
+        return false;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source is now over
+     * the zone.  The default implementation returns this.dropNotAllowed and expects that only registered drop
+     * nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops
+     * you should override this method and provide a custom implementation.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the drop zone.
+     * This method will be called on every mouse movement while the drag source is over the drop zone.
+     * It will call {@link #onNodeOver} while the drag source is over a registered node, and will also automatically
+     * delegate to the appropriate node-specific methods as necessary when the drag source enters and exits
+     * registered nodes ({@link #onNodeEnter}, {@link #onNodeOut}). If the drag source is not currently over a
+     * registered node, it will call {@link #onContainerOver}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        var n = this.getTargetFromEvent(e);
+        if(!n){ // not over valid drop target
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+                this.lastOverNode = null;
+            }
+            return this.onContainerOver(dd, e, data);
+        }
+        if(this.lastOverNode != n){
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+            }
+            this.onNodeEnter(n, dd, e, data);
+            this.lastOverNode = n;
+        }
+        return this.onNodeOver(n, dd, e, data);
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source has been dragged
+     * out of the zone without dropping.  If the drag source is currently over a registered node, the notification
+     * will be delegated to {@link #onNodeOut} for node-specific handling, otherwise it will be ignored.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag zone
+     */
+    notifyOut : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the dragged item has
+     * been dropped on it.  The drag zone will look up the target node based on the event passed in, and if there
+     * is a node registered for that event, it will delegate to {@link #onNodeDrop} for node-specific handling,
+     * otherwise it will call {@link #onContainerDrop}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+        var n = this.getTargetFromEvent(e);
+        return n ?
+            this.onNodeDrop(n, dd, e, data) :
+            this.onContainerDrop(dd, e, data);
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    }  
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Initializes a {@link Ext.dd.DD} drag drop object for this element.
+     * @param {String} group The group the DD object is member of
+     * @param {Object} config The DD config object
+     * @param {Object} overrides An object containing methods to override/implement on the DD object
+     * @return {Ext.dd.DD} The DD object
+     */
+    initDD : function(group, config, overrides){
+        var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDProxy} object for this element.
+     * @param {String} group The group the DDProxy object is member of
+     * @param {Object} config The DDProxy config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
+     * @return {Ext.dd.DDProxy} The DDProxy object
+     */
+    initDDProxy : function(group, config, overrides){
+        var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDTarget} object for this element.
+     * @param {String} group The group the DDTarget object is member of
+     * @param {Object} config The DDTarget config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
+     * @return {Ext.dd.DDTarget} The DDTarget object
+     */
+    initDDTarget : function(group, config, overrides){
+        var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-dd.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(typeof g=="number"){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox();var d=Ext.get(i);var m=d.getScroll();var j,e=d.dom;if(e==document.body){j={x:m.left,y:m.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var l=d.getXY();j={x:l[0]+m.left,y:l[1]+m.top,width:e.clientWidth,height:e.clientHeight}}var h=k.y-j.y;var f=k.x-j.x;this.resetConstraints();this.setXConstraint(f-(g.left||0),j.width-f-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,f,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!f&&0!==f){this.padding=[e,c,e,c]}else{this.padding=[e,c,f,d]}}},setInitPosition:function(f,e){var g=this.getEl();if(!this.DDM.verifyEl(g)){return}var d=f||0;var c=e||0;var h=b.getXY(g);this.initPageX=h[0]-d;this.initPageY=h[1]-c;this.lastPageX=h[0];this.lastPageY=h[1];this.setStartPosition(h)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(f,d){if(this.primaryButtonOnly&&f.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(f),Ext.lib.Event.getPageY(f));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(f)){this.setStartPosition();this.b4MouseDown(f);this.onMouseDown(f);this.DDM.handleMouseDown(f,this);this.DDM.stopEvent(f)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e<c;++e){if(this.invalidHandleClasses[e]==d){delete this.invalidHandleClasses[e]}}},isValidHandleChild:function(g){var f=true;var j;try{j=g.nodeName.toUpperCase()}catch(h){j=g.nodeName}f=f&&!this.invalidHandleTypes[j];f=f&&!this.invalidHandleIds[g.id];for(var d=0,c=this.invalidHandleClasses.length;f&&d<c;++d){f=!Ext.fly(g).hasClass(this.invalidHandleClasses[d])}return f},setXTicks:function(f,c){this.xTicks=[];this.xTickSize=c;var e={};for(var d=this.initPageX;d>=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(f,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,f){if(!f){return j}else{if(f[0]>=j){return f[0]}else{for(var d=0,c=f.length;d<c;++d){var e=d+1;if(f[e]&&f[e]>=j){var h=j-f[d];var g=f[e]-j;return(g>h)?f[d]:f[e]}}return f[f.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var f=this.ids[e][b];if(!this.isTypeOfDD(f)){continue}f[d].apply(f,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&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(g,c){var f=[];for(var e in g.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){f[f.length]=b}}}return f},isLegalTarget:function(f,e){var c=this.getRelated(f,true);for(var d=0,b=c.length;d<b;++d){if(c[d].id==e.id){return true}}return false},isTypeOfDD:function(b){return(b&&b.__ygDragDrop)},isHandle:function(c,b){return(this.handleIds[c]&&this.handleIds[c][b])},getDDById:function(c){for(var b in this.ids){if(this.ids[b][c]){return this.ids[b][c]}}return null},handleMouseDown:function(d,c){if(Ext.QuickTips){Ext.QuickTips.disable()}if(this.dragCurrent){this.handleMouseUp(d)}this.currentTarget=d.getTarget();this.dragCurrent=c;var b=c.getEl();this.startX=d.getPageX();this.startY=d.getPageY();this.deltaX=this.startX-b.offsetLeft;this.deltaY=this.startY-b.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var e=Ext.dd.DDM;e.startDrag(e.startX,e.startY)},this.clickTimeThresh)},startDrag:function(b,c){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(b,c);this.dragCurrent.startDrag(b,c)}this.dragThreshMet=true},handleMouseUp:function(b){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}else{}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(b){if(this.stopPropagation){b.stopPropagation()}if(this.preventDefault){b.preventDefault()}},stopDrag:function(b){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(b);this.dragCurrent.endDrag(b)}this.dragCurrent.onMouseUp(b)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(d){if(!this.dragCurrent){return true}if(Ext.isIE&&(d.button!==0&&d.button!==1&&d.button!==2)){this.stopEvent(d);return this.handleMouseUp(d)}if(!this.dragThreshMet){var c=Math.abs(this.startX-d.getPageX());var b=Math.abs(this.startY-d.getPageY());if(c>this.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(m,n){var p=this.dragCurrent;if(!p||p.isLocked()){return}var q=m.getPoint();var b=[];var f=[];var k=[];var h=[];var d=[];for(var g in this.dragOvers){var c=this.dragOvers[g];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(q,c,this.mode)){f.push(c)}b[g]=true;delete this.dragOvers[g]}for(var o in p.groups){if("string"!=typeof o){continue}for(g in this.ids[o]){var j=this.ids[o][g];if(!this.isTypeOfDD(j)){continue}if(j.isTarget&&!j.isLocked()&&((j!=p)||(p.ignoreSelf===false))){if(this.isOverTarget(q,j,this.mode)){if(n){h.push(j)}else{if(!b[j.id]){d.push(j)}else{k.push(j)}this.dragOvers[j.id]=j}}}}}if(this.mode){if(f.length){p.b4DragOut(m,f);p.onDragOut(m,f)}if(d.length){p.onDragEnter(m,d)}if(k.length){p.b4DragOver(m,k);p.onDragOver(m,k)}if(h.length){p.b4DragDrop(m,h);p.onDragDrop(m,h)}}else{var l=0;for(g=0,l=f.length;g<l;++g){p.b4DragOut(m,f[g].id);p.onDragOut(m,f[g].id)}for(g=0,l=d.length;g<l;++g){p.onDragEnter(m,d[g].id)}for(g=0,l=k.length;g<l;++g){p.b4DragOver(m,k[g].id);p.onDragOver(m,k[g].id)}for(g=0,l=h.length;g<l;++g){p.b4DragDrop(m,h[g].id);p.onDragDrop(m,h[g].id)}}if(n&&!h.length){p.onInvalidDrop(m)}},getBestMatch:function(d){var f=null;var c=d.length;if(c==1){f=d[0]}else{for(var e=0;e<c;++e){var b=d[e];if(b.cursorIsOver){f=b;break}else{if(!f||f.overlap.getArea()<b.overlap.getArea()){f=b}}}}return f},refreshCache:function(c){for(var b in c){if("string"!=typeof b){continue}for(var d in this.ids[b]){var e=this.ids[b][d];if(this.isTypeOfDD(e)){var f=this.getLocation(e);if(f){this.locationCache[e.id]=f}else{delete this.locationCache[e.id]}}}}},verifyEl:function(c){if(c){var b;if(Ext.isIE){try{b=c.offsetParent}catch(d){}}else{b=c.offsetParent}if(b){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}var g=i.getEl(),m,f,d,o,n,p,c,k,h;try{m=Ext.lib.Dom.getXY(g)}catch(j){}if(!m){return null}f=m[0];d=f+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];c=d+i.padding[1];k=n+i.padding[2];h=f-i.padding[3];return new Ext.lib.Region(p,c,k,h)},isOverTarget:function(j,b,d){var f=this.locationCache[b.id];if(!f||!this.useCache){f=this.getLocation(b);this.locationCache[b.id]=f}if(!f){return false}b.cursorIsOver=f.contains(j);var i=this.dragCurrent;if(!i||!i.getTargetCoord||(!d&&!i.constrainX&&!i.constrainY)){return b.cursorIsOver}b.overlap=null;var g=i.getTargetCoord(j.x,j.y);var c=i.getDragEl();var e=new Ext.lib.Region(g.y,g.x+c.offsetWidth,g.y+c.offsetHeight,g.x);var h=e.intersect(f);if(h){b.overlap=h;return(d)?true:b.cursorIsOver}else{return false}},_onUnload:function(c,b){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var b in this.elementCache){delete this.elementCache[b]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(c){var b=this.elementCache[c];if(!b||!b.el){b=this.elementCache[c]=new this.ElementWrapper(Ext.getDom(c))}return b},getElement:function(b){return Ext.getDom(b)},getCss:function(c){var b=Ext.getDom(c);return(b)?b.style:null},ElementWrapper:function(b){this.el=b||null;this.id=this.el&&b.id;this.css=this.el&&b.style},getPosX:function(b){return Ext.lib.Dom.getX(b)},getPosY:function(b){return Ext.lib.Dom.getY(b)},swapNode:function(d,b){if(d.swapNode){d.swapNode(b)}else{var e=b.parentNode;var c=b.nextSibling;if(c==d){e.insertBefore(d,b)}else{if(b==d.nextSibling){e.insertBefore(b,d)}else{d.parentNode.replaceChild(b,d);e.insertBefore(d,c)}}}},getScroll:function(){var d,b,e=document.documentElement,c=document.body;if(e&&(e.scrollTop||e.scrollLeft)){d=e.scrollTop;b=e.scrollLeft}else{if(c){d=c.scrollTop;b=c.scrollLeft}else{}}return{top:d,left:b}},getStyle:function(c,b){return Ext.fly(c).getStyle(b)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(b,d){var c=Ext.lib.Dom.getXY(d);Ext.lib.Dom.setXY(b,c)},numericSort:function(d,c){return(d-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,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,g,f){var e=this.getTargetCoord(g,f);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var h=[e.x,e.y];b.setXY(h);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var o=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i>m&&g<c){window.scrollTo(d,o+a)}if(j<o&&o>0&&j-o<c){window.scrollTo(d,o-a)}if(n>b&&f<c){window.scrollTo(d+a,o)}if(k<d&&d>0&&k-d<c){window.scrollTo(d-a,o)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(c,b){if(this.fireEvent("mousedown",this,c)!==false&&this.onBeforeStart(c)!==false){this.startXY=this.lastXY=c.getXY();this.dragTarget=this.delegate?b:this.el.dom;if(this.preventDefault!==false){c.preventDefault()}var a=Ext.getDoc();a.on("mouseup",this.onMouseUp,this);a.on("mousemove",this.onMouseMove,this);a.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart()}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc();b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();var a=this.active;this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c);var a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var h={};var g=function(k){b=null;a()};var i=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var k=Ext.dd.ScrollManager;var l=h.el.ddScrollConfig?h.el.ddScrollConfig.increment:k.increment;if(!k.animate){if(h.el.scroll(h.dir,l)){i()}}else{h.el.scroll(h.dir,l,true,k.animDuration,i)}}};var a=function(){if(h.id){clearInterval(h.id)}h.id=0;h.el=null;h.dir=""};var f=function(l,k){a();h.el=l;h.dir=k;var m=(l.ddScrollConfig&&l.ddScrollConfig.frequency)?l.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;h.id=setInterval(d,m)};var j=function(n,p){if(p||!c.dragCurrent){return}var q=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;q.refreshCache()}var s=Ext.lib.Event.getXY(n);var t=new Ext.lib.Point(s[0],s[1]);for(var l in e){var m=e[l],k=m._region;var o=m.ddScrollConfig?m.ddScrollConfig:q;if(k&&k.contains(t)&&m.isScrollable()){if(k.bottom-t.y<=o.vthresh){if(h.el!=m){f(m,"down")}return}else{if(k.right-t.x<=o.hthresh){if(h.el!=m){f(m,"left")}return}else{if(t.y-k.top<=o.vthresh){if(h.el!=m){f(m,"up")}return}else{if(t.x-k.left<=o.hthresh){if(h.el!=m){f(m,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(j,c);c.stopDrag=c.stopDrag.createSequence(g,c);return{register:function(m){if(Ext.isArray(m)){for(var l=0,k=m.length;l<k;l++){this.register(m[l])}}else{m=Ext.get(m);e[m.id]=m}},unregister:function(m){if(Ext.isArray(m)){for(var l=0,k=m.length;l<k;l++){this.unregister(m[l])}}else{m=Ext.get(m);delete e[m.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var k in e){if(typeof e[k]=="object"){e[k]._region=e[k].getRegion()}}}}}();Ext.dd.Registry=function(){var d={};var b={};var a=0;var c=function(f,e){if(typeof f=="string"){return f}var g=f.id;if(!g&&e!==false){g="extdd-"+(++a);f.id=g}return g};return{register:function(h,j){j=j||{};if(typeof h=="string"){h=document.getElementById(h)}j.ddel=h;d[c(h)]=j;if(j.isHandle!==false){b[j.ddel.id]=j}if(j.handles){var g=j.handles;for(var f=0,e=g.length;f<e;f++){b[c(g[f])]=j}}},unregister:function(h){var k=c(h,false);var j=d[k];if(j){delete d[k];if(j.handles){var g=j.handles;for(var f=0,e=g.length;f<e;f++){delete b[c(g[f],false)]}}}},getHandle:function(e){if(typeof e!="string"){e=e.id}return b[e]},getHandleFromEvent:function(g){var f=Ext.lib.Event.getTarget(g);return f?b[f.id]:null},getTarget:function(e){if(typeof e!="string"){e=e.id}return d[e]},getTargetFromEvent:function(g){var f=Ext.lib.Event.getTarget(g);return f?d[f.id]||b[f.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("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.el.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addClass("x-dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.shift({duration:this.repairDuration||0.5,easing:"easeOut",xy:b,stopFx:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null}};Ext.dd.DragSource=function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy()}Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});this.dragging=false};Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropMgr.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")}this.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)}});Ext.dd.DropTarget=function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:true})};Ext.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addClass(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeClass(this.overClass)}},notifyDrop:function(a,c,b){return false}});Ext.dd.DragZone=function(b,a){Ext.dd.DragZone.superclass.constructor.call(this,b,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}};Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()}});Ext.dd.DropZone=function(b,a){Ext.dd.DropZone.superclass.constructor.call(this,b,a)};Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.Element.addMethods({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation-debug.js	(revision 625)
@@ -0,0 +1,13417 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DomHelper
+ * <p>The DomHelper class provides a layer of abstraction from DOM and transparently supports creating
+ * elements via DOM or using HTML fragments. It also has the ability to create HTML fragment templates
+ * from your DOM building code.</p>
+ *
+ * <p><b><u>DomHelper element specification object</u></b></p>
+ * <p>A specification object is used when creating elements. Attributes of this object
+ * are assumed to be element attributes, except for 4 special attributes:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>tag</tt></b> : <div class="sub-desc">The tag name of the element</div></li>
+ * <li><b><tt>children</tt></b> : or <tt>cn</tt><div class="sub-desc">An array of the
+ * same kind of element definition objects to be created and appended. These can be nested
+ * as deep as you want.</div></li>
+ * <li><b><tt>cls</tt></b> : <div class="sub-desc">The class attribute of the element.
+ * This will end up being either the "class" attribute on a HTML fragment or className
+ * for a DOM node, depending on whether DomHelper is using fragments or DOM.</div></li>
+ * <li><b><tt>html</tt></b> : <div class="sub-desc">The innerHTML for the element</div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Insertion methods</u></b></p>
+ * <p>Commonly used insertion methods:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #append}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertBefore}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertAfter}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #overwrite}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #createTemplate}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertHtml}</tt></b> : <div class="sub-desc"></div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Example</u></b></p>
+ * <p>This is an example, where an unordered list with 3 children items is appended to an existing
+ * element with id <tt>'my-div'</tt>:<br>
+ <pre><code>
+var dh = Ext.DomHelper; // create shorthand alias
+// specification object
+var spec = {
+    id: 'my-ul',
+    tag: 'ul',
+    cls: 'my-list',
+    // append children after creating
+    children: [     // may also specify 'cn' instead of 'children'
+        {tag: 'li', id: 'item0', html: 'List Item 0'},
+        {tag: 'li', id: 'item1', html: 'List Item 1'},
+        {tag: 'li', id: 'item2', html: 'List Item 2'}
+    ]
+};
+var list = dh.append(
+    'my-div', // the context element 'my-div' can either be the id or the actual node
+    spec      // the specification object
+);
+ </code></pre></p>
+ * <p>Element creation specification parameters in this class may also be passed as an Array of
+ * specification objects. This can be used to insert multiple sibling nodes into an existing
+ * container very efficiently. For example, to add more list items to the example above:<pre><code>
+dh.append('my-ul', [
+    {tag: 'li', id: 'item3', html: 'List Item 3'},
+    {tag: 'li', id: 'item4', html: 'List Item 4'}
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Templating</u></b></p>
+ * <p>The real power is in the built-in templating. Instead of creating or appending any elements,
+ * <tt>{@link #createTemplate}</tt> returns a Template object which can be used over and over to
+ * insert new elements. Revisiting the example above, we could utilize templating this time:
+ * <pre><code>
+// create the node
+var list = dh.append('my-div', {tag: 'ul', cls: 'my-list'});
+// get template
+var tpl = dh.createTemplate({tag: 'li', id: 'item{0}', html: 'List Item {0}'});
+
+for(var i = 0; i < 5, i++){
+    tpl.append(list, [i]); // use template to append to the actual node
+}
+ * </code></pre></p>
+ * <p>An example using a template:<pre><code>
+var html = '<a id="{0}" href="{1}" class="nav">{2}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', ['link1', 'http://www.jackslocum.com/', "Jack&#39;s Site"]);
+tpl.append('blog-roll', ['link2', 'http://www.dustindiaz.com/', "Dustin&#39;s Site"]);
+ * </code></pre></p>
+ *
+ * <p>The same example using named parameters:<pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', {
+    id: 'link1',
+    url: 'http://www.jackslocum.com/',
+    text: "Jack&#39;s Site"
+});
+tpl.append('blog-roll', {
+    id: 'link2',
+    url: 'http://www.dustindiaz.com/',
+    text: "Dustin&#39;s Site"
+});
+ * </code></pre></p>
+ *
+ * <p><b><u>Compiling Templates</u></b></p>
+ * <p>Templates are applied using regular expressions. The performance is great, but if
+ * you are adding a bunch of DOM elements using the same template, you can increase
+ * performance even further by {@link Ext.Template#compile "compiling"} the template.
+ * The way "{@link Ext.Template#compile compile()}" works is the template is parsed and
+ * broken up at the different variable points and a dynamic function is created and eval'ed.
+ * The generated function performs string concatenation of these parts and the passed
+ * variables instead of using regular expressions.
+ * <pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.compile();
+
+//... use template like normal
+ * </code></pre></p>
+ *
+ * <p><b><u>Performance Boost</u></b></p>
+ * <p>DomHelper will transparently create HTML fragments when it can. Using HTML fragments instead
+ * of DOM can significantly boost performance.</p>
+ * <p>Element creation specification parameters may also be strings. If {@link #useDom} is <tt>false</tt>,
+ * then the string is used as innerHTML. If {@link #useDom} is <tt>true</tt>, a string specification
+ * results in the creation of a text node. Usage:</p>
+ * <pre><code>
+Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
+ * </code></pre>
+ * @singleton
+ */
+Ext.DomHelper = function(){
+    var tempTableEl = null,
+    	emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,
+    	tableRe = /^table|tbody|tr|td$/i,
+    	pub,
+    	// kill repeat to save bytes
+    	afterbegin = "afterbegin",
+    	afterend = "afterend",
+    	beforebegin = "beforebegin",
+    	beforeend = "beforeend",
+    	ts = '<table>',
+        te = '</table>',
+        tbs = ts+'<tbody>',
+        tbe = '</tbody>'+te,
+        trs = tbs + '<tr>',
+        tre = '</tr>'+tbe;
+
+    // private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o));
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+    // build as innerHTML where available
+    function createHtml(o){
+	    var b = "",
+	    	attr,
+	    	val,
+	    	key,
+	    	keyVal,
+	    	cn;
+
+        if(typeof o == 'string'){
+            b = o;
+        } else if (Ext.isArray(o)) {
+	        Ext.each(o, function(v) {
+                b += createHtml(v);
+            });
+        } else {
+	        b += "<" + (o.tag = o.tag || "div");
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html$/i.test(attr)){
+                    if (Ext.isObject(val)) {
+                        b += " " + attr + "='";
+                        Ext.iterate(val, function(key, keyVal){
+                            b += key + ":" + keyVal + ";";
+                        });
+                        b += "'";
+                    }else{
+                        b += " " + ({cls : "class", htmlFor : "for"}[attr] || attr) + "='" + val + "'";
+                    }
+                }
+            });
+	        // Now either just close the tag or try to add children and close the tag.
+	        if (emptyTags.test(o.tag)) {
+	            b += "/>";
+	        } else {
+	            b += ">";
+	            if ((cn = o.children || o.cn)) {
+	                b += createHtml(cn);
+	            } else if(o.html){
+	                b += o.html;
+	            }
+	            b += "</" + o.tag + ">";
+        	}
+        }
+        return b;
+    }
+
+    function ieTable(depth, s, h, e){
+        tempTableEl.innerHTML = [s, h, e].join('');
+        var i = -1,
+        	el = tempTableEl;
+        while(++i < depth){
+            el = el.firstChild;
+        }
+        return el;
+    }
+
+    /**
+     * @ignore
+     * Nasty code for IE's broken table implementation
+     */
+    function insertIntoTable(tag, where, el, html) {
+	    var node,
+        	before;
+
+        tempTableEl = tempTableEl || document.createElement('div');
+
+  	    if(tag == 'td' && (where == afterbegin || where == beforeend) ||
+  	       !/td|tr|tbody/i.test(tag) && (where == beforebegin || where == afterend)) {
+            return;
+        }
+        before = where == beforebegin ? el :
+		 		 where == afterend ? el.nextSibling :
+				 where == afterbegin ? el.firstChild : null;
+
+        if (where == beforebegin || where == afterend) {
+        	el = el.parentNode;
+    	}
+
+        if (tag == 'td' || (tag == "tr" && (where == beforeend || where == afterbegin))) {
+	        node = ieTable(4, trs, html, tre);
+        } else if ((tag == "tbody" && (where == beforeend || where == afterbegin)) ||
+        		   (tag == "tr" && (where == beforebegin || where == afterend))) {
+	        node = ieTable(3, tbs, html, tbe);
+        } else {
+	     	node = ieTable(2, ts, html, te);
+        }
+        el.insertBefore(node, before);
+        return node;
+    }
+
+
+    pub = {
+	    /**
+	     * Returns the markup for the passed Element(s) config.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {String}
+	     */
+	    markup : function(o){
+	        return createHtml(o);
+	    },
+
+	    /**
+	     * Inserts an HTML fragment into the DOM.
+	     * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
+	     * @param {HTMLElement} el The context element
+	     * @param {String} html The HTML fragmenet
+	     * @return {HTMLElement} The new node
+	     */
+	    insertHtml : function(where, el, html){
+	        var hash = {},
+	        	hashVal,
+ 	        	setStart,
+	        	range,
+	        	frag,
+	        	rangeEl,
+	        	rs;
+
+	        where = where.toLowerCase();
+	        // add these here because they are used in both branches of the condition.
+	        hash[beforebegin] = ['BeforeBegin', 'previousSibling'];
+	        hash[afterend] = ['AfterEnd', 'nextSibling'];
+
+	        if (el.insertAdjacentHTML) {
+	            if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){
+	            	return rs;
+	            }
+	            // add these two to the hash.
+	            hash[afterbegin] = ['AfterBegin', 'firstChild'];
+	            hash[beforeend] = ['BeforeEnd', 'lastChild'];
+	            if ((hashVal = hash[where])) {
+		        	el.insertAdjacentHTML(hashVal[0], html);
+	            	return el[hashVal[1]];
+	            }
+	        } else {
+		        range = el.ownerDocument.createRange();
+		        setStart = "setStart" + (/end/i.test(where) ? "After" : "Before");
+		        if (hash[where]) {
+			     	range[setStart](el);
+			     	frag = range.createContextualFragment(html);
+			     	el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling);
+			     	return el[(where == beforebegin ? "previous" : "next") + "Sibling"];
+		        } else {
+			        rangeEl = (where == afterbegin ? "first" : "last") + "Child";
+			        if (el.firstChild) {
+				        range[setStart](el[rangeEl]);
+				        frag = range.createContextualFragment(html);
+                        if(where == afterbegin){
+                            el.insertBefore(frag, el.firstChild);
+                        }else{
+                            el.appendChild(frag);
+                        }
+			        } else {
+		 	            el.innerHTML = html;
+	 	            }
+	 	            return el[rangeEl];
+		        }
+	        }
+	        throw 'Illegal insertion point -> "' + where + '"';
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, "nextSibling");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, "firstChild");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    append : function(el, o, returnElement){
+		    return doInsert(el, o, returnElement, beforeend, "", true);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and overwrites the contents of el with them.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    overwrite : function(el, o, returnElement){
+	        el = Ext.getDom(el);
+	        el.innerHTML = createHtml(o);
+	        return returnElement ? Ext.get(el.firstChild) : el.firstChild;
+	    },
+
+	    createHtml : createHtml
+    };
+    return pub;
+}();/**
+ * @class Ext.DomHelper
+ */
+Ext.apply(Ext.DomHelper,
+function(){
+	var pub,
+		afterbegin = 'afterbegin',
+    	afterend = 'afterend',
+    	beforebegin = 'beforebegin',
+    	beforeend = 'beforeend';
+
+	// private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        el = Ext.getDom(el);
+        var newNode;
+        if (pub.useDom) {
+            newNode = createDom(o, null);
+            if (append) {
+	            el.appendChild(newNode);
+            } else {
+	        	(sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el);
+            }
+        } else {
+            newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o));
+        }
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+	// build as dom
+    /** @ignore */
+    function createDom(o, parentNode){
+        var el,
+        	doc = document,
+        	useSet,
+        	attr,
+        	val,
+        	cn;
+
+        if (Ext.isArray(o)) {                       // Allow Arrays of siblings to be inserted
+            el = doc.createDocumentFragment(); // in one shot using a DocumentFragment
+	        Ext.each(o, function(v) {
+                createDom(v, el);
+            });
+        } else if (Ext.isString(o)) {         // Allow a string as a child spec.
+            el = doc.createTextNode(o);
+        } else {
+            el = doc.createElement( o.tag || 'div' );
+            useSet = !!el.setAttribute; // In IE some elements don't have setAttribute
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html|style/.test(attr)){
+	                if(attr == 'cls'){
+	                    el.className = val;
+	                }else{
+                        if(useSet){
+                            el.setAttribute(attr, val);
+                        }else{
+                            el[attr] = val;
+                        }
+	                }
+                }
+            });
+            pub.applyStyles(el, o.style);
+
+            if ((cn = o.children || o.cn)) {
+                createDom(cn, el);
+            } else if (o.html) {
+                el.innerHTML = o.html;
+            }
+        }
+        if(parentNode){
+           parentNode.appendChild(el);
+        }
+        return el;
+    }
+
+	pub = {
+		/**
+	     * Creates a new Ext.Template from the DOM object spec.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {Ext.Template} The new template
+	     */
+	    createTemplate : function(o){
+	        var html = Ext.DomHelper.createHtml(o);
+	        return new Ext.Template(html);
+	    },
+
+		/** True to force the use of DOM instead of html fragments @type Boolean */
+	    useDom : false,
+
+	    /**
+	     * Applies a style specification to an element.
+	     * @param {String/HTMLElement} el The element to apply styles to
+	     * @param {String/Object/Function} styles A style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or
+	     * a function which returns such a specification.
+	     */
+	    applyStyles : function(el, styles){
+		    if(styles){
+				var i = 0,
+	    			len,
+	    			style;
+
+	    		el = Ext.fly(el);
+				if(Ext.isFunction(styles)){
+   					styles = styles.call();
+				}
+				if(Ext.isString(styles)){
+					styles = styles.trim().split(/\s*(?::|;)\s*/);
+					for(len = styles.length; i < len;){
+						el.setStyle(styles[i++], styles[i++]);
+					}
+				}else if (Ext.isObject(styles)){
+					el.setStyle(styles);
+				}
+			}
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, 'nextSibling');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, 'firstChild');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    append: function(el, o, returnElement){
+            return doInsert(el, o, returnElement, beforeend, '', true);
+        },
+
+	    /**
+	     * Creates new DOM element(s) without inserting them to the document.
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @return {HTMLElement} The new uninserted node
+	     */
+        createDom: createDom
+	};
+	return pub;
+}());/**
+ * @class Ext.Template
+ * Represents an HTML fragment template. Templates can be precompiled for greater performance.
+ * For a list of available format functions, see {@link Ext.util.Format}.<br />
+ * Usage:
+<pre><code>
+var t = new Ext.Template(
+    '&lt;div name="{id}"&gt;',
+        '&lt;span class="{cls}"&gt;{name:trim} {value:ellipsis(10)}&lt;/span&gt;',
+    '&lt;/div&gt;'
+);
+t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
+</code></pre>
+ * @constructor
+ * @param {String/Array} html The HTML fragment or an array of fragments to join("") or multiple arguments to join("")
+ */
+Ext.Template = function(html){
+    var me = this,
+    	a = arguments,
+    	buf = [];
+
+    if (Ext.isArray(html)) {
+        html = html.join("");
+    } else if (a.length > 1) {
+	    Ext.each(a, function(v) {
+            if (Ext.isObject(v)) {
+                Ext.apply(me, v);
+            } else {
+                buf.push(v);
+            }
+        });
+        html = buf.join('');
+    }
+
+    /**@private*/
+    me.html = html;
+    if (me.compiled) {
+        me.compile();
+    }
+};
+Ext.Template.prototype = {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+		var me = this;
+
+        return me.compiled ?
+        		me.compiled(values) :
+				me.html.replace(me.re, function(m, name){
+		        	return values[name] !== undefined ? values[name] : "";
+		        });
+	},
+
+    /**
+     * Sets the HTML used as the template and optionally compiles it.
+     * @param {String} html
+     * @param {Boolean} compile (optional) True to compile the template (defaults to undefined)
+     * @return {Ext.Template} this
+     */
+    set : function(html, compile){
+	    var me = this;
+        me.html = html;
+        me.compiled = null;
+        return compile ? me.compile() : me;
+    },
+
+    /**
+    * The regular expression used to match template variables
+    * @type RegExp
+    * @property
+    */
+    re : /\{([\w-]+)\}/g,
+
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     */
+    compile : function(){
+        var me = this,
+        	sep = Ext.isGecko ? "+" : ",";
+
+        function fn(m, name){                        
+	        name = "values['" + name + "']";
+	        return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'";
+        }
+                
+        eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") +
+             me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+             (Ext.isGecko ?  "';};" : "'].join('');};"));
+        return me;
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) as the first child of el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertFirst: function(el, values, returnElement){
+        return this.doInsert('afterBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) before el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertBefore: function(el, values, returnElement){
+        return this.doInsert('beforeBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) after el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertAfter : function(el, values, returnElement){
+        return this.doInsert('afterEnd', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and appends the new node(s) to el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    append : function(el, values, returnElement){
+        return this.doInsert('beforeEnd', el, values, returnElement);
+    },
+
+    doInsert : function(where, el, values, returnEl){
+        el = Ext.getDom(el);
+        var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values));
+        return returnEl ? Ext.get(newNode, true) : newNode;
+    },
+
+    /**
+     * Applies the supplied values to the template and overwrites the content of el with the new node(s).
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    overwrite : function(el, values, returnElement){
+        el = Ext.getDom(el);
+        el.innerHTML = this.applyTemplate(values);
+        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
+    }
+};
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.Template
+ * @method apply
+ */
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @param {Object} config A configuration object
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.Template.from = function(el, config){
+    el = Ext.getDom(el);
+    return new Ext.Template(el.value || el.innerHTML, config || '');
+};/**
+ * @class Ext.Template
+ */
+Ext.apply(Ext.Template.prototype, {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     * @hide repeat doc
+     */
+    applyTemplate : function(values){
+		var me = this,
+			useF = me.disableFormats !== true,
+        	fm = Ext.util.Format, 
+        	tpl = me;	    
+	    
+        if(me.compiled){
+            return me.compiled(values);
+        }
+        function fn(m, name, format, args){
+            if (format && useF) {
+                if (format.substr(0, 5) == "this.") {
+                    return tpl.call(format.substr(5), values[name], values);
+                } else {
+                    if (args) {
+                        // quoted values are required for strings in compiled templates,
+                        // but for non compiled we need to strip them
+                        // quoted reversed for jsmin
+                        var re = /^\s*['"](.*)["']\s*$/;
+                        args = args.split(',');
+                        for(var i = 0, len = args.length; i < len; i++){
+                            args[i] = args[i].replace(re, "$1");
+                        }
+                        args = [values[name]].concat(args);
+                    } else {
+                        args = [values[name]];
+                    }
+                    return fm[format].apply(fm, args);
+                }
+            } else {
+                return values[name] !== undefined ? values[name] : "";
+            }
+        }
+        return me.html.replace(me.re, fn);
+    },
+		
+    /**
+     * <tt>true</tt> to disable format functions (defaults to <tt>false</tt>)
+     * @type Boolean
+     * @property
+     */
+    disableFormats : false,				
+	
+    /**
+     * The regular expression used to match template variables
+     * @type RegExp
+     * @property
+     * @hide repeat doc
+     */
+    re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
+    
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     * @hide repeat doc
+     */
+    compile : function(){
+        var me = this,
+        	fm = Ext.util.Format,
+        	useF = me.disableFormats !== true,
+        	sep = Ext.isGecko ? "+" : ",",
+        	body;
+        
+        function fn(m, name, format, args){
+            if(format && useF){
+                args = args ? ',' + args : "";
+                if(format.substr(0, 5) != "this."){
+                    format = "fm." + format + '(';
+                }else{
+                    format = 'this.call("'+ format.substr(5) + '", ';
+                    args = ", values";
+                }
+            }else{
+                args= ''; format = "(values['" + name + "'] == undefined ? '' : ";
+            }
+            return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'";
+        }
+        
+        // branched to use + in gecko and [].join() in others
+        if(Ext.isGecko){
+            body = "this.compiled = function(values){ return '" +
+                   me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+                    "';};";
+        }else{
+            body = ["this.compiled = function(values){ return ['"];
+            body.push(me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn));
+            body.push("'].join('');};");
+            body = body.join('');
+        }
+        eval(body);
+        return me;
+    },
+    
+    // private function used to call members
+    call : function(fnName, value, allValues){
+        return this[fnName](value, allValues);
+    }
+});
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; /*
+ * This is code is also distributed under MIT license for use
+ * with jQuery and prototype JavaScript libraries.
+ */
+/**
+ * @class Ext.DomQuery
+Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
+<p>
+DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p>
+
+<p>
+All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.
+</p>
+<h4>Element Selectors:</h4>
+<ul class="list">
+    <li> <b>*</b> any element</li>
+    <li> <b>E</b> an element with the tag E</li>
+    <li> <b>E F</b> All descendent elements of E that have the tag F</li>
+    <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li>
+    <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li>
+    <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li>
+</ul>
+<h4>Attribute Selectors:</h4>
+<p>The use of &#64; and quotes are optional. For example, div[&#64;foo='bar'] is also a valid attribute selector.</p>
+<ul class="list">
+    <li> <b>E[foo]</b> has an attribute "foo"</li>
+    <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li>
+    <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li>
+    <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li>
+    <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li>
+    <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li>
+    <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li>
+</ul>
+<h4>Pseudo Classes:</h4>
+<ul class="list">
+    <li> <b>E:first-child</b> E is the first child of its parent</li>
+    <li> <b>E:last-child</b> E is the last child of its parent</li>
+    <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li>
+    <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li>
+    <li> <b>E:nth-child(even)</b> E is an even child of its parent</li>
+    <li> <b>E:only-child</b> E is the only child of its parent</li>
+    <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li>
+    <li> <b>E:first</b> the first E in the resultset</li>
+    <li> <b>E:last</b> the last E in the resultset</li>
+    <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li>
+    <li> <b>E:odd</b> shortcut for :nth-child(odd)</li>
+    <li> <b>E:even</b> shortcut for :nth-child(even)</li>
+    <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li>
+    <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li>
+    <li> <b>E:not(S)</b> an E element that does not match simple selector S</li>
+    <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li>
+    <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li>
+    <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li>
+</ul>
+<h4>CSS Value Selectors:</h4>
+<ul class="list">
+    <li> <b>E{display=none}</b> css value "display" that equals "none"</li>
+    <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li>
+    <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li>
+    <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li>
+    <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li>
+    <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li>
+</ul>
+ * @singleton
+ */
+Ext.DomQuery = function(){
+    var cache = {}, 
+    	simpleCache = {}, 
+    	valueCache = {},
+    	nonSpace = /\S/,
+    	trimRe = /^\s+|\s+$/g,
+    	tplRe = /\{(\d+)\}/g,
+    	modeRe = /^(\s?[\/>+~]\s?|\s|$)/,
+    	tagTokenRe = /^(#)?([\w-\*]+)/,
+    	nthRe = /(\d*)n\+?(\d*)/, 
+    	nthRe2 = /\D/,
+    	// This is for IE MSXML which does not support expandos.
+	    // IE runs the same speed using setAttribute, however FF slows way down
+	    // and Safari completely fails so they need to continue to use expandos.
+	    isIE = window.ActiveXObject ? true : false,
+        isOpera = Ext.isOpera,
+	    key = 30803;
+	    
+    // this eval is stop the compressor from
+	// renaming the variable to something shorter
+	eval("var batch = 30803;");    	
+
+    function child(p, index){
+        var i = 0,
+        	n = p.firstChild;
+        while(n){
+            if(n.nodeType == 1){
+               if(++i == index){
+                   return n;
+               }
+            }
+            n = n.nextSibling;
+        }
+        return null;
+    };
+
+    function next(n){
+        while((n = n.nextSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function prev(n){
+        while((n = n.previousSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function children(d){
+        var n = d.firstChild, ni = -1,
+        	nx;
+ 	    while(n){
+ 	        nx = n.nextSibling;
+ 	        if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
+ 	            d.removeChild(n);
+ 	        }else{
+ 	            n.nodeIndex = ++ni;
+ 	        }
+ 	        n = nx;
+ 	    }
+ 	    return this;
+ 	};
+
+    function byClassName(c, a, v){
+        if(!v){
+            return c;
+        }
+        var r = [], ri = -1, cn;
+        for(var i = 0, ci; ci = c[i]; i++){
+            if((' '+ci.className+' ').indexOf(v) != -1){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function attrValue(n, attr){
+        if(!n.tagName && typeof n.length != "undefined"){
+            n = n[0];
+        }
+        if(!n){
+            return null;
+        }
+        if(attr == "for"){
+            return n.htmlFor;
+        }
+        if(attr == "class" || attr == "className"){
+            return n.className;
+        }
+        return n.getAttribute(attr) || n[attr];
+
+    };
+
+    function getNodes(ns, mode, tagName){
+        var result = [], ri = -1, cs;
+        if(!ns){
+            return result;
+        }
+        tagName = tagName || "*";
+        if(typeof ns.getElementsByTagName != "undefined"){
+            ns = [ns];
+        }
+        if(!mode){
+            for(var i = 0, ni; ni = ns[i]; i++){
+                cs = ni.getElementsByTagName(tagName);
+                for(var j = 0, ci; ci = cs[j]; j++){
+                    result[++ri] = ci;
+                }
+            }
+        }else if(mode == "/" || mode == ">"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, ni, cn; ni = ns[i]; i++){
+                cn = isOpera ? ni.childNodes : (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 == "~"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, n; n = ns[i]; i++){
+                while((n = n.nextSibling)){
+                    if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){
+                        result[++ri] = n;
+                    }
+                }
+            }
+        }
+        return result;
+    };
+
+    function concat(a, b){
+        if(b.slice){
+            return a.concat(b);
+        }
+        for(var i = 0, l = b.length; i < l; i++){
+            a[a.length] = b[i];
+        }
+        return a;
+    }
+
+    function byTag(cs, tagName){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!tagName){
+            return cs;
+        }
+        var r = [], ri = -1;
+        tagName = tagName.toLowerCase();
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byId(cs, attr, id){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!id){
+            return cs;
+        }
+        var r = [], ri = -1;
+        for(var i = 0,ci; ci = cs[i]; i++){
+            if(ci && ci.id == id){
+                r[++ri] = ci;
+                return r;
+            }
+        }
+        return r;
+    };
+
+    function byAttribute(cs, attr, value, op, custom){
+        var r = [], 
+        	ri = -1, 
+        	st = custom=="{",
+        	f = Ext.DomQuery.operators[op];
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType != 1){
+                continue;
+            }
+            var a;
+            if(st){
+                a = Ext.DomQuery.getStyle(ci, attr);
+            }
+            else if(attr == "class" || attr == "className"){
+                a = ci.className;
+            }else if(attr == "for"){
+                a = ci.htmlFor;
+            }else if(attr == "href"){
+                a = ci.getAttribute("href", 2);
+            }else{
+                a = ci.getAttribute(attr);
+            }
+            if((f && f(a, value)) || (!f && a)){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byPseudo(cs, name, value){
+        return Ext.DomQuery.pseudos[name](cs, value);
+    };
+
+    function nodupIEXml(cs){
+        var d = ++key, 
+        	r;
+        cs[0].setAttribute("_nodup", d);
+        r = [cs[0]];
+        for(var i = 1, len = cs.length; i < len; i++){
+            var c = cs[i];
+            if(!c.getAttribute("_nodup") != d){
+                c.setAttribute("_nodup", d);
+                r[r.length] = c;
+            }
+        }
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].removeAttribute("_nodup");
+        }
+        return r;
+    }
+
+    function nodup(cs){
+        if(!cs){
+            return [];
+        }
+        var len = cs.length, c, i, r = cs, cj, ri = -1;
+        if(!len || typeof cs.nodeType != "undefined" || len == 1){
+            return cs;
+        }
+        if(isIE && typeof cs[0].selectSingleNode != "undefined"){
+            return nodupIEXml(cs);
+        }
+        var d = ++key;
+        cs[0]._nodup = d;
+        for(i = 1; c = cs[i]; i++){
+            if(c._nodup != d){
+                c._nodup = d;
+            }else{
+                r = [];
+                for(var j = 0; j < i; j++){
+                    r[++ri] = cs[j];
+                }
+                for(j = i+1; cj = cs[j]; j++){
+                    if(cj._nodup != d){
+                        cj._nodup = d;
+                        r[++ri] = cj;
+                    }
+                }
+                return r;
+            }
+        }
+        return r;
+    }
+
+    function quickDiffIEXml(c1, c2){
+        var d = ++key,
+        	r = [];
+        for(var i = 0, len = c1.length; i < len; i++){
+            c1[i].setAttribute("_qdiff", d);
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i].getAttribute("_qdiff") != d){
+                r[r.length] = c2[i];
+            }
+        }
+        for(var i = 0, len = c1.length; i < len; i++){
+           c1[i].removeAttribute("_qdiff");
+        }
+        return r;
+    }
+
+    function quickDiff(c1, c2){
+        var len1 = c1.length,
+        	d = ++key,
+        	r = [];
+        if(!len1){
+            return c2;
+        }
+        if(isIE && c1[0].selectSingleNode){
+            return quickDiffIEXml(c1, c2);
+        }        
+        for(var i = 0; i < len1; i++){
+            c1[i]._qdiff = d;
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i]._qdiff != d){
+                r[r.length] = c2[i];
+            }
+        }
+        return r;
+    }
+
+    function quickId(ns, mode, root, id){
+        if(ns == root){
+           var d = root.ownerDocument || root;
+           return d.getElementById(id);
+        }
+        ns = getNodes(ns, mode, "*");
+        return byId(ns, null, id);
+    }
+
+    return {
+        getStyle : function(el, name){
+            return Ext.fly(el).getStyle(name);
+        },
+        /**
+         * Compiles a selector/xpath query into a reusable function. The returned function
+         * takes one parameter "root" (optional), which is the context node from where the query should start.
+         * @param {String} selector The selector/xpath query
+         * @param {String} type (optional) Either "select" (the default) or "simple" for a simple selector match
+         * @return {Function}
+         */
+        compile : function(path, type){
+            type = type || "select";
+
+            var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],
+            	q = path, mode, lq,
+            	tk = Ext.DomQuery.matchers,
+            	tklen = tk.length,
+            	mm,
+            	// accept leading mode switch
+            	lmode = q.match(modeRe);
+            
+            if(lmode && lmode[1]){
+                fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
+                q = q.replace(lmode[1], "");
+            }
+            // strip leading slashes
+            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;
+                        }
+                    }
+                    // prevent infinite loop on bad selector
+                    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;
+        },
+
+        /**
+         * Selects a group of elements.
+         * @param {String} selector The selector/xpath query (can be a comma separated list of selectors)
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        select : function(path, root, type){
+            if(!root || root == document){
+                root = document;
+            }
+            if(typeof root == "string"){
+                root = document.getElementById(root);
+            }
+            var paths = path.split(","),
+            	results = [];
+            for(var i = 0, len = paths.length; i < len; i++){
+                var p = paths[i].replace(trimRe, "");
+                if(!cache[p]){
+                    cache[p] = Ext.DomQuery.compile(p);
+                    if(!cache[p]){
+                        throw p + " is not a valid selector";
+                    }
+                }
+                var result = cache[p](root);
+                if(result && result != document){
+                    results = results.concat(result);
+                }
+            }
+            if(paths.length > 1){
+                return nodup(results);
+            }
+            return results;
+        },
+
+        /**
+         * Selects a single element.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Element} The DOM element which matched the selector.
+         */
+        selectNode : function(path, root){
+            return Ext.DomQuery.select(path, root)[0];
+        },
+
+        /**
+         * Selects the value of a node, optionally replacing null with the defaultValue.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {String} defaultValue
+         * @return {String}
+         */
+        selectValue : function(path, root, defaultValue){
+            path = path.replace(trimRe, "");
+            if(!valueCache[path]){
+                valueCache[path] = Ext.DomQuery.compile(path, "select");
+            }
+            var n = valueCache[path](root),
+            	v;
+            n = n[0] ? n[0] : n;
+            v = (n && n.firstChild ? n.firstChild.nodeValue : null);
+            return ((v === null||v === undefined||v==='') ? defaultValue : v);
+        },
+
+        /**
+         * Selects the value of a node, parsing integers and floats. Returns the defaultValue, or 0 if none is specified.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {Number} defaultValue
+         * @return {Number}
+         */
+        selectNumber : function(path, root, defaultValue){
+            var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0);
+            return parseFloat(v);
+        },
+
+        /**
+         * Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child)
+         * @param {String/HTMLElement/Array} el An element id, element or array of elements
+         * @param {String} selector The simple selector to test
+         * @return {Boolean}
+         */
+        is : function(el, ss){
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            var isArray = Ext.isArray(el),
+            	result = Ext.DomQuery.filter(isArray ? el : [el], ss);
+            return isArray ? (result.length == el.length) : (result.length > 0);
+        },
+
+        /**
+         * Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child)
+         * @param {Array} el An array of elements to filter
+         * @param {String} selector The simple selector to test
+         * @param {Boolean} nonMatches If true, it returns the elements that DON'T match
+         * the selector instead of the ones that match
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        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;
+        },
+
+        /**
+         * Collection of matching regular expressions and code snippets.
+         */
+        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}")}};'
+            }
+        ],
+
+        /**
+         * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=.
+         * New operators can be added as long as the match the format <i>c</i>= where <i>c</i> is any character other than space, &gt; &lt;.
+         */
+        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;
+            }
+        },
+
+        /**
+         * Collection of "pseudo class" processors. Each processor is passed the current nodeset (array)
+         * and the argument (if any) supplied in the selector.
+         */
+        pseudos : {
+            "first-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.previousSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "last-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.nextSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nth-child" : function(c, a) {
+                var r = [], ri = -1,
+                	m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a),
+                	f = (m[1] || 1) - 0, l = m[2] - 0;
+                for(var i = 0, n; n = c[i]; i++){
+                    var pn = n.parentNode;
+                    if (batch != pn._batch) {
+                        var j = 0;
+                        for(var cn = pn.firstChild; cn; cn = cn.nextSibling){
+                            if(cn.nodeType == 1){
+                               cn.nodeIndex = ++j;
+                            }
+                        }
+                        pn._batch = batch;
+                    }
+                    if (f == 1) {
+                        if (l == 0 || n.nodeIndex == l){
+                            r[++ri] = n;
+                        }
+                    } else if ((n.nodeIndex + l) % f == 0){
+                        r[++ri] = n;
+                    }
+                }
+
+                return r;
+            },
+
+            "only-child" : function(c){
+                var r = [], ri = -1;;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(!prev(ci) && !next(ci)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "empty" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var cns = ci.childNodes, j = 0, cn, empty = true;
+                    while(cn = cns[j]){
+                        ++j;
+                        if(cn.nodeType == 1 || cn.nodeType == 3){
+                            empty = false;
+                            break;
+                        }
+                    }
+                    if(empty){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "contains" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if((ci.textContent||ci.innerText||'').indexOf(v) != -1){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nodeValue" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.firstChild && ci.firstChild.nodeValue == v){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "checked" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.checked == true){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "not" : function(c, ss){
+                return Ext.DomQuery.filter(c, ss, true);
+            },
+
+            "any" : function(c, selectors){
+                var ss = selectors.split('|'),
+                	r = [], ri = -1, s;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    for(var j = 0; s = ss[j]; j++){
+                        if(Ext.DomQuery.is(ci, s)){
+                            r[++ri] = ci;
+                            break;
+                        }
+                    }
+                }
+                return r;
+            },
+
+            "odd" : function(c){
+                return this["nth-child"](c, "odd");
+            },
+
+            "even" : function(c){
+                return this["nth-child"](c, "even");
+            },
+
+            "nth" : function(c, a){
+                return c[a-1] || [];
+            },
+
+            "first" : function(c){
+                return c[0] || [];
+            },
+
+            "last" : function(c){
+                return c[c.length-1] || [];
+            },
+
+            "has" : function(c, ss){
+                var s = Ext.DomQuery.select,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(s(ss, ci).length > 0){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "next" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = next(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "prev" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = prev(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            }
+        }
+    };
+}();
+
+/**
+ * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select}
+ * @param {String} path The selector/xpath query
+ * @param {Node} root (optional) The start of the query (defaults to document).
+ * @return {Array}
+ * @member Ext
+ * @method query
+ */
+Ext.query = Ext.DomQuery.select;
+(function(){
+
+var EXTUTIL = Ext.util,
+    TOARRAY = Ext.toArray,
+    EACH = Ext.each,
+    ISOBJECT = Ext.isObject,
+    TRUE = true,
+    FALSE = false;
+/**
+ * @class Ext.util.Observable
+ * Base class that provides a common interface for publishing events. Subclasses are expected to
+ * to have a property "events" with all the events defined, and, optionally, a property "listeners"
+ * with configured listeners defined.<br>
+ * For example:
+ * <pre><code>
+Employee = Ext.extend(Ext.util.Observable, {
+    constructor: function(config){
+        this.name = config.name;
+        this.addEvents({
+            "fired" : true,
+            "quit" : true
+        });
+
+        // Copy configured listeners into *this* object so that the base class&#39;s
+        // constructor will add them.
+        this.listeners = config.listeners;
+
+        // Call our superclass constructor to complete construction process.
+        Employee.superclass.constructor.call(config)
+    }
+});
+</code></pre>
+ * This could then be used like this:<pre><code>
+var newEmployee = new Employee({
+    name: employeeName,
+    listeners: {
+        quit: function() {
+            // By default, "this" will be the object that fired the event.
+            alert(this.name + " has quit!");
+        }
+    }
+});
+</code></pre>
+ */
+EXTUTIL.Observable = function(){
+    /**
+     * @cfg {Object} listeners (optional) <p>A config object containing one or more event handlers to be added to this
+     * object during initialization.  This should be a valid listeners config object as specified in the
+     * {@link #addListener} example for attaching multiple handlers at once.</p>
+     * <br><p><b><u>DOM events from ExtJs {@link Ext.Component Components}</u></b></p>
+     * <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
+     * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s
+     * <b><code>{@link Ext.DataView#click click}</code></b> event passing the node clicked on. To access DOM
+     * events directly from a Component's HTMLElement, listeners must be added to the <i>{@link Ext.Component#getEl Element}</i> after the Component
+     * has been rendered. A plugin can simplify this step:<pre><code>
+// Plugin is configured with a listeners config object.
+// The Component is appended to the argument list of all handler functions.
+Ext.DomObserver = Ext.extend(Object, {
+    constructor: function(config) {
+        this.listeners = config.listeners ? config.listeners : config;
+    },
+
+    // Component passes itself into plugin&#39;s init method
+    init: function(c) {
+        var p, l = this.listeners;
+        for (p in l) {
+            if (Ext.isFunction(l[p])) {
+                l[p] = this.createHandler(l[p], c);
+            } else {
+                l[p].fn = this.createHandler(l[p].fn, c);
+            }
+        }
+
+        // Add the listeners to the Element immediately following the render call
+        c.render = c.render.{@link Function#createSequence createSequence}(function() {
+            var e = c.getEl();
+            if (e) {
+                e.on(l);
+            }
+        });
+    },
+
+    createHandler: function(fn, c) {
+        return function(e) {
+            fn.call(this, e, c);
+        };
+    }
+});
+
+var combo = new Ext.form.ComboBox({
+
+    // Collapse combo when its element is clicked on
+    plugins: [ new Ext.DomObserver({
+        click: function(evt, comp) {
+            comp.collapse();
+        }
+    })],
+    store: myStore,
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all'
+});
+     * </code></pre></p>
+     */
+    var me = this, e = me.events;
+    if(me.listeners){
+        me.on(me.listeners);
+        delete me.listeners;
+    }
+    me.events = e || {};
+};
+
+EXTUTIL.Observable.prototype = function(){
+    var filterOptRe = /^(?:scope|delay|buffer|single)$/, toLower = function(s){
+        return s.toLowerCase();
+    };
+
+    return {
+        /**
+         * <p>Fires the specified event with the passed parameters (minus the event name).</p>
+         * <p>An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget})
+         * by calling {@link #enableBubble}.</p>
+         * @param {String} eventName The name of the event to fire.
+         * @param {Object...} args Variable number of parameters are passed to handlers.
+         * @return {Boolean} returns false if any of the handlers return false otherwise it returns true.
+         */
+
+        fireEvent : function(){
+            var a = TOARRAY(arguments),
+                ename = toLower(a[0]),
+                me = this,
+                ret = TRUE,
+                ce = me.events[ename],
+                q,
+                c;
+            if (me.eventsSuspended === TRUE) {
+                if (q = me.suspendedEventsQueue) {
+                    q.push(a);
+                }
+            }
+            else if(ISOBJECT(ce) && ce.bubble){
+                if(ce.fire.apply(ce, a.slice(1)) === FALSE) {
+                    return FALSE;
+                }
+                c = me.getBubbleTarget && me.getBubbleTarget();
+                if(c && c.enableBubble) {
+                    c.enableBubble(ename);
+                    return c.fireEvent.apply(c, a);
+                }
+            }
+            else {
+                if (ISOBJECT(ce)) {
+                    a.shift();
+                    ret = ce.fire.apply(ce, a);
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * Appends an event handler to this object.
+         * @param {String}   eventName The name of the event to listen for.
+         * @param {Function} handler The method the event invokes.
+         * @param {Object}   scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b>
+         * @param {Object}   options (optional) An object containing handler configuration.
+         * properties. This may contain any of the following properties:<ul>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b></div></li>
+         * <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+         * <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+         * <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+         * by the specified number of milliseconds. If the event fires again within that time, the original
+         * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+         * <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
+         * if the event was bubbled up from a child Observable.</div></li>
+         * </ul><br>
+         * <p>
+         * <b>Combining Options</b><br>
+         * Using the options argument, it is possible to combine different types of listeners:<br>
+         * <br>
+         * A delayed, one-time listener.
+         * <pre><code>
+myDataView.on('click', this.onClick, this, {
+    single: true,
+    delay: 100
+});</code></pre>
+         * <p>
+         * <b>Attaching multiple handlers in 1 call</b><br>
+         * The method also allows for a single argument to be passed which is a config object containing properties
+         * which specify multiple handlers.
+         * <p>
+         * <pre><code>
+myGridPanel.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * <pre><code>
+myGridPanel.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+     scope: this
+});</code></pre>
+         */
+        addListener : function(eventName, fn, scope, o){
+            var me = this,
+                e,
+                oe,
+                isF,
+            ce;
+            if (ISOBJECT(eventName)) {
+                o = eventName;
+                for (e in o){
+                    oe = o[e];
+                    if (!filterOptRe.test(e)) {
+                        me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o);
+                    }
+                }
+            } else {
+                eventName = toLower(eventName);
+                ce = me.events[eventName] || TRUE;
+                if (typeof ce == "boolean") {
+                    me.events[eventName] = ce = new EXTUTIL.Event(me, eventName);
+                }
+                ce.addListener(fn, scope, ISOBJECT(o) ? o : {});
+            }
+        },
+
+        /**
+         * Removes an event handler.
+         * @param {String}   eventName The type of event the handler was associated with.
+         * @param {Function} handler   The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+         * @param {Object}   scope     (optional) The scope originally specified for the handler.
+         */
+        removeListener : function(eventName, fn, scope){
+            var ce = this.events[toLower(eventName)];
+            if (ISOBJECT(ce)) {
+                ce.removeListener(fn, scope);
+            }
+        },
+
+        /**
+         * Removes all listeners for this object
+         */
+        purgeListeners : function(){
+            var events = this.events,
+                evt,
+                key;
+            for(key in events){
+                evt = events[key];
+                if(ISOBJECT(evt)){
+                    evt.clearListeners();
+                }
+            }
+        },
+
+        /**
+         * Used to define events on this Observable
+         * @param {Object} object The object with the events defined
+         */
+        addEvents : function(o){
+            var me = this;
+            me.events = me.events || {};
+            if (typeof o == 'string') {
+                EACH(arguments, function(a) {
+                    me.events[a] = me.events[a] || TRUE;
+                });
+            } else {
+                Ext.applyIf(me.events, o);
+            }
+        },
+
+        /**
+         * Checks to see if this object has any listeners for a specified event
+         * @param {String} eventName The name of the event to check for
+         * @return {Boolean} True if the event is being listened for, else false
+         */
+        hasListener : function(eventName){
+            var e = this.events[eventName];
+            return ISOBJECT(e) && e.listeners.length > 0;
+        },
+
+        /**
+         * Suspend the firing of all events. (see {@link #resumeEvents})
+         * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired
+         * after the {@link #resumeEvents} call instead of discarding all suspended events;
+         */
+        suspendEvents : function(queueSuspended){
+            this.eventsSuspended = TRUE;
+            if (queueSuspended){
+                this.suspendedEventsQueue = [];
+            }
+        },
+
+        /**
+         * Resume firing events. (see {@link #suspendEvents})
+         * If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
+         * events fired during event suspension will be sent to any listeners now.
+         */
+        resumeEvents : function(){
+            var me = this;
+            me.eventsSuspended = !delete me.suspendedEventQueue;
+            EACH(me.suspendedEventsQueue, function(e) {
+                me.fireEvent.apply(me, e);
+            });
+        }
+    }
+}();
+
+var OBSERVABLE = EXTUTIL.Observable.prototype;
+/**
+ * Appends an event handler to this object (shorthand for {@link #addListener}.)
+ * @param {String}   eventName     The type of event to listen for
+ * @param {Function} handler       The method the event invokes
+ * @param {Object}   scope         (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+ * <b>If omitted, defaults to the object which fired the event.</b>
+ * @param {Object}   options       (optional) An object containing handler configuration.
+ * @method
+ */
+OBSERVABLE.on = OBSERVABLE.addListener;
+/**
+ * Removes an event handler (shorthand for {@link #removeListener}.)
+ * @param {String}   eventName     The type of event the handler was associated with.
+ * @param {Function} handler       The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+ * @param {Object}   scope         (optional) The scope originally specified for the handler.
+ * @method
+ */
+OBSERVABLE.un = OBSERVABLE.removeListener;
+
+/**
+ * Removes <b>all</b> added captures from the Observable.
+ * @param {Observable} o The Observable to release
+ * @static
+ */
+EXTUTIL.Observable.releaseCapture = function(o){
+    o.fireEvent = OBSERVABLE.fireEvent;
+};
+
+function createTargeted(h, o, scope){
+    return function(){
+        if(o.target == arguments[0]){
+            h.apply(scope, TOARRAY(arguments));
+        }
+    };
+};
+
+function createBuffered(h, o, scope){
+    var task = new EXTUTIL.DelayedTask();
+    return function(){
+        task.delay(o.buffer, h, scope, TOARRAY(arguments));
+    };
+}
+
+function createSingle(h, e, fn, scope){
+    return function(){
+        e.removeListener(fn, scope);
+        return h.apply(scope, arguments);
+    };
+}
+
+function createDelayed(h, o, scope){
+    return function(){
+        var args = TOARRAY(arguments);
+        (function(){
+            h.apply(scope, args);
+        }).defer(o.delay || 10);
+    };
+};
+
+EXTUTIL.Event = function(obj, name){
+    this.name = name;
+    this.obj = obj;
+    this.listeners = [];
+};
+
+EXTUTIL.Event.prototype = {
+    addListener : function(fn, scope, options){
+        var me = this,
+            l;
+        scope = scope || me.obj;
+        if(!me.isListening(fn, scope)){
+            l = me.createListener(fn, scope, options);
+            if(me.firing){ // if we are currently firing this event, don't disturb the listener loop
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.push(l);
+        }
+    },
+
+    createListener: function(fn, scope, o){
+        o = o || {}, scope = scope || this.obj;
+        var l = {
+            fn: fn,
+            scope: scope,
+            options: o
+        }, h = fn;
+        if(o.target){
+            h = createTargeted(h, o, scope);
+        }
+        if(o.delay){
+            h = createDelayed(h, o, scope);
+        }
+        if(o.single){
+            h = createSingle(h, this, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o, scope);
+        }
+        l.fireFn = h;
+        return l;
+    },
+
+    findListener : function(fn, scope){
+        var s, ret = -1;
+        EACH(this.listeners, function(l, i) {
+            s = l.scope;
+            if(l.fn == fn && (s == scope || s == this.obj)){
+                ret = i;
+                return FALSE;
+            }
+        },
+        this);
+        return ret;
+    },
+
+    isListening : function(fn, scope){
+        return this.findListener(fn, scope) != -1;
+    },
+
+    removeListener : function(fn, scope){
+        var index,
+            me = this,
+            ret = FALSE;
+        if((index = me.findListener(fn, scope)) != -1){
+            if (me.firing) {
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.splice(index, 1);
+            ret = TRUE;
+        }
+        return ret;
+    },
+
+    clearListeners : function(){
+        this.listeners = [];
+    },
+
+    fire : function(){
+        var me = this,
+            args = TOARRAY(arguments),
+            ret = TRUE;
+
+        EACH(me.listeners, function(l) {
+            me.firing = TRUE;
+            if (l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) {
+                return ret = me.firing = FALSE;
+            }
+        });
+        me.firing = FALSE;
+        return ret;
+    }
+};
+})();/**
+ * @class Ext.util.Observable
+ */
+Ext.apply(Ext.util.Observable.prototype, function(){    
+    // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?)
+    // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+    // private
+    function getMethodEvent(method){
+        var e = (this.methodEvents = this.methodEvents ||
+        {})[method], returnValue, v, cancel, obj = this;
+        
+        if (!e) {
+            this.methodEvents[method] = e = {};
+            e.originalFn = this[method];
+            e.methodName = method;
+            e.before = [];
+            e.after = [];
+            
+            var makeCall = function(fn, scope, args){
+                if (!Ext.isEmpty(v = fn.apply(scope || obj, args))) {
+                    if (Ext.isObject(v)) {
+                        returnValue = !Ext.isEmpty(v.returnValue) ? v.returnValue : v;
+                        cancel = !!v.cancel;
+                    }
+                    else 
+                        if (v === false) {
+                            cancel = true;
+                        }
+                        else {
+                            returnValue = v;
+                        }
+                }
+            };
+            
+            this[method] = function(){
+                var args = Ext.toArray(arguments);
+                returnValue = v = undefined;
+                cancel = false;
+                
+                Ext.each(e.before, function(b){
+                    makeCall(b.fn, b.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                
+                if (!Ext.isEmpty(v = e.originalFn.apply(obj, args))) {
+                    returnValue = v;
+                }
+                Ext.each(e.after, function(a){
+                    makeCall(a.fn, a.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                return returnValue;
+            };
+        }
+        return e;
+    }
+    
+    return {
+        // these are considered experimental
+        // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+        // adds an "interceptor" called before the original method
+        beforeMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).before.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        // adds a "sequence" called after the original method
+        afterMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).after.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        removeMethodListener: function(method, fn, scope){
+            var e = getMethodEvent.call(this, method), found = false;
+            Ext.each(e.before, function(b, i, arr){
+                if (b.fn == fn && b.scope == scope) {
+                    arr.splice(i, 1);
+                    found = true;
+                    return false;
+                }
+            });
+            if (!found) {
+                Ext.each(e.after, function(a, i, arr){
+                    if (a.fn == fn && a.scope == scope) {
+                        arr.splice(i, 1);
+                        return false;
+                    }
+                });
+            }
+        },
+        
+        /**
+         * Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.
+         * @param {Object} o The Observable whose events this object is to relay.
+         * @param {Array} events Array of event names to relay.
+         */
+        relayEvents: function(o, events){
+            var me = this;
+            function createHandler(ename){
+                return function(){
+                    return me.fireEvent.apply(me, [ename].concat(Ext.toArray(arguments)));
+                };
+            }
+            Ext.each(events, function(ename){
+                me.events[ename] = me.events[ename] || true;
+                o.on(ename, createHandler(ename), me);
+            });
+        },
+        
+        /**
+         * Used to enable bubbling of events
+         * @param {Object} events
+         */
+        enableBubble: function(events){
+            var me = this;
+            events = Ext.isArray(events) ? events : Ext.toArray(arguments);
+            Ext.each(events, function(ename){
+                ename = ename.toLowerCase();
+                var ce = me.events[ename] || true;
+                if (typeof ce == "boolean") {
+                    ce = new Ext.util.Event(me, ename);
+                    me.events[ename] = ce;
+                }
+                ce.bubble = true;
+            });
+        }
+    };
+}());
+
+
+/**
+ * Starts capture on the specified Observable. All events will be passed
+ * to the supplied function with the event name + standard signature of the event
+ * <b>before</b> the event is fired. If the supplied function returns false,
+ * the event will not fire.
+ * @param {Observable} o The Observable to capture
+ * @param {Function} fn The function to call
+ * @param {Object} scope (optional) The scope (this object) for the fn
+ * @static
+ */
+Ext.util.Observable.capture = function(o, fn, scope){
+    o.fireEvent = o.fireEvent.createInterceptor(fn, scope);
+};
+
+
+/**
+ * Sets observability on the passed class constructor.<p>
+ * <p>This makes any event fired on any instance of the passed class also fire a single event through
+ * the <i>class</i> allowing for central handling of events on many instances at once.</p>
+ * <p>Usage:</p><pre><code>
+Ext.util.Observable.observeClass(Ext.data.Connection);
+Ext.data.Connection.on('beforerequest', function(con, options) {
+    console.log("Ajax request made to " + options.url);
+});</code></pre>
+ * @param {Function} c The class constructor to make observable.
+ * @static
+ */
+Ext.util.Observable.observeClass = function(c){
+    Ext.apply(c, new Ext.util.Observable());
+    c.prototype.fireEvent = function(){
+        return (c.fireEvent.apply(c, arguments) !== false) &&
+        (Ext.util.Observable.prototype.fireEvent.apply(this, arguments) !== false);
+    };
+};/**
+ * @class Ext.EventManager
+ * Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides
+ * several useful events directly.
+ * See {@link Ext.EventObject} for more details on normalized event objects.
+ * @singleton
+ */
+Ext.EventManager = function(){
+    var docReadyEvent, 
+    	docReadyProcId, 
+    	docReadyState = false,    	
+    	E = Ext.lib.Event,
+    	D = Ext.lib.Dom,
+    	DOC = document,
+    	WINDOW = window,
+    	IEDEFERED = "ie-deferred-loader",
+    	DOMCONTENTLOADED = "DOMContentLoaded",
+    	elHash = {},
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+    /// There is some jquery work around stuff here that isn't needed in Ext Core.
+    function addListener(el, ename, fn, wrap, scope){	    
+        var id = Ext.id(el),
+        	es = elHash[id] = elHash[id] || {};     	
+       
+        (es[ename] = es[ename] || []).push([fn, wrap, scope]);
+        E.on(el, ename, wrap);
+
+        // this is a workaround for jQuery and should somehow be removed from Ext Core in the future
+        // without breaking ExtJS.
+        if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery
+        	var args = ["DOMMouseScroll", wrap, false];
+        	el.addEventListener.apply(el, args);
+            E.on(window, 'unload', function(){
+	            el.removeEventListener.apply(el, args);                
+            });
+        }
+        if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document
+            Ext.EventManager.stoppedMouseDownEvent.addListener(wrap);
+        }
+    };
+    
+    function fireDocReady(){
+        if(!docReadyState){            
+            Ext.isReady = docReadyState = true;
+            if(docReadyProcId){
+                clearInterval(docReadyProcId);
+            }
+            if(Ext.isGecko || Ext.isOpera) {
+                DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false);
+            }
+            if(Ext.isIE){
+                var defer = DOC.getElementById(IEDEFERED);
+                if(defer){
+                    defer.onreadystatechange = null;
+                    defer.parentNode.removeChild(defer);
+                }
+            }
+            if(docReadyEvent){
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();
+            }
+        }
+    };
+
+    function initDocReady(){
+	    var COMPLETE = "complete";
+	    	
+        docReadyEvent = new Ext.util.Event();
+        if (Ext.isGecko || Ext.isOpera) {
+            DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false);
+        } else if (Ext.isIE){
+            DOC.write("<s"+'cript id=' + IEDEFERED + ' defer="defer" src="/'+'/:"></s'+"cript>");            
+            DOC.getElementById(IEDEFERED).onreadystatechange = function(){
+                if(this.readyState == COMPLETE){
+                    fireDocReady();
+                }
+            };
+        } else if (Ext.isWebKit){
+            docReadyProcId = setInterval(function(){                
+                if(DOC.readyState == COMPLETE) {
+                    fireDocReady();
+                 }
+            }, 10);
+        }
+        // no matter what, make sure it fires on load
+        E.on(WINDOW, "load", fireDocReady);
+    };
+
+    function createTargeted(h, o){
+        return function(){
+	        var args = Ext.toArray(arguments);
+            if(o.target == Ext.EventObject.setEvent(args[0]).target){
+                h.apply(this, args);
+            }
+        };
+    };    
+    
+    function createBuffered(h, o){
+        var task = new Ext.util.DelayedTask(h);
+        return function(e){
+            // create new event object impl so new events don't wipe out properties            
+            task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
+        };
+    };
+
+    function createSingle(h, el, ename, fn, scope){
+        return function(e){
+            Ext.EventManager.removeListener(el, ename, fn, scope);
+            h(e);
+        };
+    };
+
+    function createDelayed(h, o){
+        return function(e){
+            // create new event object impl so new events don't wipe out properties   
+            e = new Ext.EventObjectImpl(e);
+            setTimeout(function(){
+                h(e);
+            }, o.delay || 10);
+        };
+    };
+
+    function listen(element, ename, opt, fn, scope){
+        var o = !Ext.isObject(opt) ? {} : opt,
+        	el = Ext.getDom(element);
+        	
+        fn = fn || o.fn; 
+        scope = scope || o.scope;
+        
+        if(!el){
+            throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.';
+        }
+        function h(e){
+            // prevent errors while unload occurring
+            if(!Ext){// !window[xname]){  ==> can't we do this? 
+                return;
+            }
+            e = Ext.EventObject.setEvent(e);
+            var t;
+            if (o.delegate) {
+                if(!(t = e.getTarget(o.delegate, el))){
+                    return;
+                }
+            } else {
+                t = e.target;
+            }            
+            if (o.stopEvent) {
+                e.stopEvent();
+            }
+            if (o.preventDefault) {
+               e.preventDefault();
+            }
+            if (o.stopPropagation) {
+                e.stopPropagation();
+            }
+            if (o.normalized) {
+                e = e.browserEvent;
+            }
+            
+            fn.call(scope || el, e, t, o);
+        };
+        if(o.target){
+            h = createTargeted(h, o);
+        }
+        if(o.delay){
+            h = createDelayed(h, o);
+        }
+        if(o.single){
+            h = createSingle(h, el, ename, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o);
+        }
+
+        addListener(el, ename, fn, h, scope);
+        return h;
+    };
+
+    var pub = {
+	    /**
+	     * Appends an event handler to an element.  The shorthand version {@link #on} is equivalent.  Typically you will
+	     * use {@link Ext.Element#addListener} directly on an Element in favor of calling this version.
+	     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+	     * @param {String} eventName The type of event to listen for
+	     * @param {Function} handler The handler function the event invokes This function is passed
+	     * the following parameters:<ul>
+	     * <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+	     * <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+	     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+	     * <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+	     * </ul>
+	     * @param {Object} scope (optional) The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.
+	     * @param {Object} options (optional) An object containing handler configuration properties.
+	     * This may contain any of the following properties:<ul>
+	     * <li>scope : Object<div class="sub-desc">The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.</div></li>
+	     * <li>delegate : String<div class="sub-desc">A simple selector to filter the target or look for a descendant of the target</div></li>
+	     * <li>stopEvent : Boolean<div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+	     * <li>preventDefault : Boolean<div class="sub-desc">True to prevent the default action</div></li>
+	     * <li>stopPropagation : Boolean<div class="sub-desc">True to prevent event propagation</div></li>
+	     * <li>normalized : Boolean<div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+	     * <li>delay : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after te event fires.</div></li>
+	     * <li>single : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+	     * <li>buffer : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+	     * by the specified number of milliseconds. If the event fires again within that time, the original
+	     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+	     * <li>target : Element<div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+	     * </ul><br>
+	     * <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p>
+	     */
+		addListener : function(element, eventName, fn, scope, options){		     		     		     
+            if(Ext.isObject(eventName)){                
+	            var o = eventName, e, val;
+                for(e in o){
+	                val = o[e];
+                    if(!propRe.test(e)){                            		         
+	                    if(Ext.isFunction(val)){
+	                        // shared options
+	                        listen(element, e, o, val, o.scope);
+	                    }else{
+	                        // individual options
+	                        listen(element, e, val);
+	                    }
+                    }
+                }
+            } else {
+            	listen(element, eventName, options, fn, scope);
+        	}
+        },
+        
+        /**
+         * Removes an event handler from an element.  The shorthand version {@link #un} is equivalent.  Typically
+         * you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         * @param {String} eventName The type of event
+         * @param {Function} fn The handler function to remove
+         */
+        removeListener : function(element, eventName, fn, scope){            
+            var el = Ext.getDom(element),
+                id = Ext.id(el),
+        	    wrap;      
+	        
+	        Ext.each((elHash[id] || {})[eventName], function (v,i,a) {
+			    if (Ext.isArray(v) && v[0] == fn && (!scope || v[2] == scope)) {		        			        
+			        E.un(el, eventName, wrap = v[1]);
+			        a.splice(i,1);
+			        return false;			        
+		        }
+	        });	
+
+            // jQuery workaround that should be removed from Ext Core
+	        if(eventName == "mousewheel" && el.addEventListener && wrap){
+	            el.removeEventListener("DOMMouseScroll", wrap, false);
+	        }
+            	        
+	        if(eventName == "mousedown" && el == DOC && wrap){ // fix stopped mousedowns on the document
+	            Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
+	        }
+        },
+        
+        /**
+         * Removes all event handers from an element.  Typically you will use {@link Ext.Element#removeAllListeners}
+         * directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         */
+        removeAll : function(el){
+	        var id = Ext.id(el = Ext.getDom(el)), 
+				es = elHash[id], 				
+				ename;
+	       
+	        for(ename in es){
+	            if(es.hasOwnProperty(ename)){	                    
+	                Ext.each(es[ename], function(v) {
+	                    E.un(el, ename, v.wrap);                    
+	                });
+	            }            
+	        }
+	        elHash[id] = null;       
+        },
+
+        /**
+         * Fires when the document is ready (before onload and before images are loaded). Can be
+         * accessed shorthanded as Ext.onReady().
+         * @param {Function} fn The method the event invokes
+         * @param {Object} scope (optional) An object that becomes the scope of the handler
+         * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+         */
+        onDocumentReady : function(fn, scope, options){
+            if(docReadyState){ // if it already fired
+                docReadyEvent.addListener(fn, scope, options);
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();               
+            } else {
+                if(!docReadyEvent) initDocReady();
+                options = options || {};
+	            options.delay = options.delay || 1;	            
+	            docReadyEvent.addListener(fn, scope, options);
+            }
+        },
+        
+        elHash : elHash   
+    };
+     /**
+     * Appends an event handler to an element.  Shorthand for {@link #addListener}.
+     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+     * @param {String} eventName The type of event to listen for
+     * @param {Function} handler The handler function the event invokes
+     * @param {Object} scope (optional) The scope in which to execute the handler
+     * function (the handler function's "this" context)
+     * @param {Object} options (optional) An object containing standard {@link #addListener} options
+     * @member Ext.EventManager
+     * @method on
+     */
+    pub.on = pub.addListener;
+    /**
+     * Removes an event handler from an element.  Shorthand for {@link #removeListener}.
+     * @param {String/HTMLElement} el The id or html element from which to remove the event
+     * @param {String} eventName The type of event
+     * @param {Function} fn The handler function to remove
+     * @return {Boolean} True if a listener was actually removed, else false
+     * @member Ext.EventManager
+     * @method un
+     */
+    pub.un = pub.removeListener;
+
+    pub.stoppedMouseDownEvent = new Ext.util.Event();
+    return pub;
+}();
+/**
+  * Fires when the document is ready (before onload and before images are loaded).  Shorthand of {@link Ext.EventManager#onDocumentReady}.
+  * @param {Function} fn The method the event invokes
+  * @param {Object} scope An object that becomes the scope of the handler
+  * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+  * @member Ext
+  * @method onReady
+ */
+Ext.onReady = Ext.EventManager.onDocumentReady;
+
+
+//Initialize doc classes
+(function(){
+    
+    var initExtCss = function(){
+        // find the body element
+        var bd = document.body || document.getElementsByTagName('body')[0];
+        if(!bd){ return false; }
+        var cls = [' ',
+                Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8'))
+                : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3')
+                : Ext.isOpera ? "ext-opera"
+                : Ext.isWebKit ? "ext-webkit" : ""];
+
+        if(Ext.isSafari){
+            cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4')));
+        }else if(Ext.isChrome){
+            cls.push("ext-chrome");
+        }
+
+        if(Ext.isMac){
+            cls.push("ext-mac");
+        }
+        if(Ext.isLinux){
+            cls.push("ext-linux");
+        }
+
+        if(Ext.isStrict || Ext.isBorderBox){ // add to the parent to allow for selectors like ".ext-strict .ext-ie"
+            var p = bd.parentNode;
+            if(p){
+                p.className += Ext.isStrict ? ' ext-strict' : ' ext-border-box';
+            }
+        }
+        bd.className += cls.join(' ');
+        return true;
+    }
+
+    if(!initExtCss()){
+        Ext.onReady(initExtCss);
+    }
+})();
+
+
+/**
+ * @class Ext.EventObject
+ * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject 
+ * wraps the browser's native event-object normalizing cross-browser differences,
+ * such as which mouse button is clicked, keys pressed, mechanisms to stop
+ * event-propagation along with a method to prevent default actions from taking place.
+ * <p>For example:</p>
+ * <pre><code>
+function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
+    e.preventDefault();
+    var target = e.getTarget(); // same as t (the target HTMLElement)
+    ...
+}
+var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
+myDiv.on(         // 'on' is shorthand for addListener
+    "click",      // perform an action on click of myDiv
+    handleClick   // reference to the action handler
+);  
+// other methods to do the same:
+Ext.EventManager.on("myDiv", 'click', handleClick);
+Ext.EventManager.addListener("myDiv", 'click', handleClick);
+ </code></pre>
+ * @singleton
+ */
+Ext.EventObject = function(){
+    var E = Ext.lib.Event,
+    	// safari keypress events for special keys return bad keycodes
+    	safariKeys = {
+	        3 : 13, // enter
+	        63234 : 37, // left
+	        63235 : 39, // right
+	        63232 : 38, // up
+	        63233 : 40, // down
+	        63276 : 33, // page up
+	        63277 : 34, // page down
+	        63272 : 46, // delete
+	        63273 : 36, // home
+	        63275 : 35  // end
+    	},
+    	// normalize button clicks
+    	btnMap = Ext.isIE ? {1:0,4:1,2:2} :
+                (Ext.isWebKit ? {1:0,2:1,3:2} : {0:0,1:1,2:2});
+
+    Ext.EventObjectImpl = function(e){
+        if(e){
+            this.setEvent(e.browserEvent || e);
+        }
+    };
+
+    Ext.EventObjectImpl.prototype = {
+           /** @private */
+        setEvent : function(e){
+	        var me = this;
+            if(e == me || (e && e.browserEvent)){ // already wrapped
+                return e;
+            }
+            me.browserEvent = e;
+            if(e){
+                // normalize buttons
+                me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1);
+                if(e.type == 'click' && me.button == -1){
+                    me.button = 0;
+                }
+                me.type = e.type;
+                me.shiftKey = e.shiftKey;
+                // mac metaKey behaves like ctrlKey
+                me.ctrlKey = e.ctrlKey || e.metaKey || false;
+                me.altKey = e.altKey;
+                // in getKey these will be normalized for the mac
+                me.keyCode = e.keyCode;
+                me.charCode = e.charCode;
+                // cache the target for the delayed and or buffered events
+                me.target = E.getTarget(e);
+                // same for XY
+                me.xy = E.getXY(e);
+            }else{
+                me.button = -1;
+                me.shiftKey = false;
+                me.ctrlKey = false;
+                me.altKey = false;
+                me.keyCode = 0;
+                me.charCode = 0;
+                me.target = null;
+                me.xy = [0, 0];
+            }
+            return me;
+        },
+
+        /**
+         * Stop the event (preventDefault and stopPropagation)
+         */
+        stopEvent : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopEvent(me.browserEvent);
+            }
+        },
+
+        /**
+         * Prevents the browsers default handling of the event.
+         */
+        preventDefault : function(){
+            if(this.browserEvent){
+                E.preventDefault(this.browserEvent);
+            }
+        },        
+
+        /**
+         * Cancels bubbling of the event.
+         */
+        stopPropagation : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopPropagation(me.browserEvent);
+            }
+        },
+
+        /**
+         * Gets the character code for the event.
+         * @return {Number}
+         */
+        getCharCode : function(){
+            return this.charCode || this.keyCode;
+        },
+
+        /**
+         * Returns a normalized keyCode for the event.
+         * @return {Number} The key code
+         */
+        getKey : function(){
+            return this.normalizeKey(this.keyCode || this.charCode)
+        },
+		
+		// private
+		normalizeKey: function(k){
+			return Ext.isSafari ? (safariKeys[k] || k) : k; 
+		},
+
+        /**
+         * Gets the x coordinate of the event.
+         * @return {Number}
+         */
+        getPageX : function(){
+            return this.xy[0];
+        },
+
+        /**
+         * Gets the y coordinate of the event.
+         * @return {Number}
+         */
+        getPageY : function(){
+            return this.xy[1];
+        },
+
+        /**
+         * Gets the page coordinates of the event.
+         * @return {Array} The xy values like [x, y]
+         */
+        getXY : function(){
+            return this.xy;
+        },
+
+        /**
+         * Gets the target for the event.
+         * @param {String} selector (optional) A simple selector to filter the target or look for an ancestor of the target
+         * @param {Number/Mixed} maxDepth (optional) The max depth to
+                search as a number or element (defaults to 10 || document.body)
+         * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+         * @return {HTMLelement}
+         */
+        getTarget : function(selector, maxDepth, returnEl){
+            return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target);
+        },
+
+        /**
+         * Gets the related target.
+         * @return {HTMLElement}
+         */
+        getRelatedTarget : function(){
+            return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null;
+        },
+
+        /**
+         * Normalizes mouse wheel delta across browsers
+         * @return {Number} The delta
+         */
+        getWheelDelta : function(){
+            var e = this.browserEvent;
+            var delta = 0;
+            if(e.wheelDelta){ /* IE/Opera. */
+                delta = e.wheelDelta/120;
+            }else if(e.detail){ /* Mozilla case. */
+                delta = -e.detail/3;
+            }
+            return delta;
+        },
+		
+		/**
+		* Returns true if the target of this event is a child of el.  Unless the allowEl parameter is set, it will return false if if the target is el.
+		* Example usage:<pre><code>
+		// Handle click on any child of an element
+		Ext.getBody().on('click', function(e){
+			if(e.within('some-el')){
+				alert('Clicked on a child of some-el!');
+			}
+		});
+		
+		// Handle click directly on an element, ignoring clicks on child nodes
+		Ext.getBody().on('click', function(e,t){
+			if((t.id == 'some-el') && !e.within(t, true)){
+				alert('Clicked directly on some-el!');
+			}
+		});
+		</code></pre>
+		 * @param {Mixed} el The id, DOM element or Ext.Element to check
+		 * @param {Boolean} related (optional) true to test if the related target is within el instead of the target
+		 * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target
+		 * @return {Boolean}
+		 */
+		within : function(el, related, allowEl){
+            if(el){
+			    var t = this[related ? "getRelatedTarget" : "getTarget"]();
+			    return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t));
+            }
+            return false;
+		}
+	 };
+
+    return new Ext.EventObjectImpl();
+}();/**
+ * @class Ext.EventManager
+ */
+Ext.apply(Ext.EventManager, function(){
+	var resizeEvent, 
+    	resizeTask, 
+    	textEvent, 
+    	textSize,
+    	D = Ext.lib.Dom,
+    	E = Ext.lib.Event,
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
+        curWidth = 0,
+        curHeight = 0,
+        // note 1: IE fires ONLY the keydown event on specialkey autorepeat
+        // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat
+        // (research done by @Jan Wolter at http://unixpapa.com/js/key.html)
+        useKeydown = Ext.isSafari ? 
+                    Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1] || 2) >= 3.1 :
+                    !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera);
+      	
+	return { 
+		// private
+	    doResizeEvent: function(){
+            var h = D.getViewHeight(),
+                w = D.getViewWidth();
+            
+            //whacky problem in IE where the resize event will fire even though the w/h are the same.
+            if(curHeight != h || curWidth != w){
+                resizeEvent.fire(curWidth = w, curHeight = h);
+            }
+	    },
+	    
+	    /**
+	     * Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onWindowResize : function(fn, scope, options){
+	        if(!resizeEvent){
+	            resizeEvent = new Ext.util.Event();
+	            resizeTask = new Ext.util.DelayedTask(this.doResizeEvent);
+	            E.on(window, "resize", this.fireWindowResize, this);
+	        }
+	        resizeEvent.addListener(fn, scope, options);
+	    },
+	
+	    // exposed only to allow manual firing
+	    fireWindowResize : function(){
+	        if(resizeEvent){
+	            if((Ext.isIE||Ext.isAir) && resizeTask){
+	                resizeTask.delay(50);
+	            }else{
+	                resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	            }
+	        }
+	    },
+	
+	    /**
+	     * Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onTextResize : function(fn, scope, options){
+	        if(!textEvent){
+	            textEvent = new Ext.util.Event();
+	            var textEl = new Ext.Element(document.createElement('div'));
+	            textEl.dom.className = 'x-text-resize';
+	            textEl.dom.innerHTML = 'X';
+	            textEl.appendTo(document.body);
+	            textSize = textEl.dom.offsetHeight;
+	            setInterval(function(){
+	                if(textEl.dom.offsetHeight != textSize){
+	                    textEvent.fire(textSize, textSize = textEl.dom.offsetHeight);
+	                }
+	            }, this.textResizeInterval);
+	        }
+	        textEvent.addListener(fn, scope, options);
+	    },
+	
+	    /**
+	     * Removes the passed window resize listener.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    The scope of handler
+	     */
+	    removeResizeListener : function(fn, scope){
+	        if(resizeEvent){
+	            resizeEvent.removeListener(fn, scope);
+	        }
+	    },
+	
+	    // private
+	    fireResize : function(){
+	        if(resizeEvent){
+	            resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	        }
+	    },
+	    
+	     /**
+	     * The frequency, in milliseconds, to check for text resize events (defaults to 50)
+	     */
+	    textResizeInterval : 50,
+	    
+	    /**
+         * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
+         */
+        ieDeferSrc : false,
+        
+        // protected for use inside the framework
+        // detects whether we should use keydown or keypress based on the browser.
+        useKeydown: useKeydown
+    };
+}());
+
+Ext.EventManager.on = Ext.EventManager.addListener;
+
+
+Ext.apply(Ext.EventObjectImpl.prototype, {
+    /** Key constant @type Number */
+    BACKSPACE: 8,
+    /** Key constant @type Number */
+    TAB: 9,
+    /** Key constant @type Number */
+    NUM_CENTER: 12,
+    /** Key constant @type Number */
+    ENTER: 13,
+    /** Key constant @type Number */
+    RETURN: 13,
+    /** Key constant @type Number */
+    SHIFT: 16,
+    /** Key constant @type Number */
+    CTRL: 17,
+    CONTROL : 17, // legacy
+    /** Key constant @type Number */
+    ALT: 18,
+    /** Key constant @type Number */
+    PAUSE: 19,
+    /** Key constant @type Number */
+    CAPS_LOCK: 20,
+    /** Key constant @type Number */
+    ESC: 27,
+    /** Key constant @type Number */
+    SPACE: 32,
+    /** Key constant @type Number */
+    PAGE_UP: 33,
+    PAGEUP : 33, // legacy
+    /** Key constant @type Number */
+    PAGE_DOWN: 34,
+    PAGEDOWN : 34, // legacy
+    /** Key constant @type Number */
+    END: 35,
+    /** Key constant @type Number */
+    HOME: 36,
+    /** Key constant @type Number */
+    LEFT: 37,
+    /** Key constant @type Number */
+    UP: 38,
+    /** Key constant @type Number */
+    RIGHT: 39,
+    /** Key constant @type Number */
+    DOWN: 40,
+    /** Key constant @type Number */
+    PRINT_SCREEN: 44,
+    /** Key constant @type Number */
+    INSERT: 45,
+    /** Key constant @type Number */
+    DELETE: 46,
+    /** Key constant @type Number */
+    ZERO: 48,
+    /** Key constant @type Number */
+    ONE: 49,
+    /** Key constant @type Number */
+    TWO: 50,
+    /** Key constant @type Number */
+    THREE: 51,
+    /** Key constant @type Number */
+    FOUR: 52,
+    /** Key constant @type Number */
+    FIVE: 53,
+    /** Key constant @type Number */
+    SIX: 54,
+    /** Key constant @type Number */
+    SEVEN: 55,
+    /** Key constant @type Number */
+    EIGHT: 56,
+    /** Key constant @type Number */
+    NINE: 57,
+    /** Key constant @type Number */
+    A: 65,
+    /** Key constant @type Number */
+    B: 66,
+    /** Key constant @type Number */
+    C: 67,
+    /** Key constant @type Number */
+    D: 68,
+    /** Key constant @type Number */
+    E: 69,
+    /** Key constant @type Number */
+    F: 70,
+    /** Key constant @type Number */
+    G: 71,
+    /** Key constant @type Number */
+    H: 72,
+    /** Key constant @type Number */
+    I: 73,
+    /** Key constant @type Number */
+    J: 74,
+    /** Key constant @type Number */
+    K: 75,
+    /** Key constant @type Number */
+    L: 76,
+    /** Key constant @type Number */
+    M: 77,
+    /** Key constant @type Number */
+    N: 78,
+    /** Key constant @type Number */
+    O: 79,
+    /** Key constant @type Number */
+    P: 80,
+    /** Key constant @type Number */
+    Q: 81,
+    /** Key constant @type Number */
+    R: 82,
+    /** Key constant @type Number */
+    S: 83,
+    /** Key constant @type Number */
+    T: 84,
+    /** Key constant @type Number */
+    U: 85,
+    /** Key constant @type Number */
+    V: 86,
+    /** Key constant @type Number */
+    W: 87,
+    /** Key constant @type Number */
+    X: 88,
+    /** Key constant @type Number */
+    Y: 89,
+    /** Key constant @type Number */
+    Z: 90,
+    /** Key constant @type Number */
+    CONTEXT_MENU: 93,
+    /** Key constant @type Number */
+    NUM_ZERO: 96,
+    /** Key constant @type Number */
+    NUM_ONE: 97,
+    /** Key constant @type Number */
+    NUM_TWO: 98,
+    /** Key constant @type Number */
+    NUM_THREE: 99,
+    /** Key constant @type Number */
+    NUM_FOUR: 100,
+    /** Key constant @type Number */
+    NUM_FIVE: 101,
+    /** Key constant @type Number */
+    NUM_SIX: 102,
+    /** Key constant @type Number */
+    NUM_SEVEN: 103,
+    /** Key constant @type Number */
+    NUM_EIGHT: 104,
+    /** Key constant @type Number */
+    NUM_NINE: 105,
+    /** Key constant @type Number */
+    NUM_MULTIPLY: 106,
+    /** Key constant @type Number */
+    NUM_PLUS: 107,
+    /** Key constant @type Number */
+    NUM_MINUS: 109,
+    /** Key constant @type Number */
+    NUM_PERIOD: 110,
+    /** Key constant @type Number */
+    NUM_DIVISION: 111,
+    /** Key constant @type Number */
+    F1: 112,
+    /** Key constant @type Number */
+    F2: 113,
+    /** Key constant @type Number */
+    F3: 114,
+    /** Key constant @type Number */
+    F4: 115,
+    /** Key constant @type Number */
+    F5: 116,
+    /** Key constant @type Number */
+    F6: 117,
+    /** Key constant @type Number */
+    F7: 118,
+    /** Key constant @type Number */
+    F8: 119,
+    /** Key constant @type Number */
+    F9: 120,
+    /** Key constant @type Number */
+    F10: 121,
+    /** Key constant @type Number */
+    F11: 122,
+    /** Key constant @type Number */
+    F12: 123,	
+    
+    /** @private */
+    isNavKeyPress : function(){
+        var me = this,
+        	k = this.normalizeKey(me.keyCode);		
+        return (k >= 33 && k <= 40) ||  // Page Up/Down, End, Home, Left, Up, Right, Down
+		k == me.RETURN ||
+		k == me.TAB ||
+		k == me.ESC;
+    },
+
+    isSpecialKey : function(){
+        var k = this.normalizeKey(this.keyCode);
+        return (this.type == 'keypress' && this.ctrlKey) ||
+		this.isNavKeyPress() ||
+        (k == this.BACKSPACE) || // Backspace
+		(k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock
+		(k >= 44 && k <= 45);   // Print Screen, Insert
+    },
+	
+	getPoint : function(){
+	    return new Ext.lib.Point(this.xy[0], this.xy[1]);
+	},
+
+    /**
+     * Returns true if the control, meta, shift or alt key was pressed during this event.
+     * @return {Boolean}
+     */
+    hasModifier : function(){
+        return ((this.ctrlKey || this.altKey) || this.shiftKey);
+    }
+});/**
+ * @class Ext.Element
+ * <p>Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.</p>
+ * <p>All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.</p>
+ * <p>Note that the events documented in this class are not Ext events, they encapsulate browser events. To
+ * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older
+ * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.</p>
+ * Usage:<br>
+<pre><code>
+// by id
+var el = Ext.get("my-div");
+
+// by DOM element reference
+var el = Ext.get(myDivElement);
+</code></pre>
+ * <b>Animations</b><br />
+ * <p>When an element is manipulated, by default there is no animation.</p>
+ * <pre><code>
+var el = Ext.get("my-div");
+
+// no animation
+el.setWidth(100);
+ * </code></pre>
+ * <p>Many of the functions for manipulating an element have an optional "animate" parameter.  This
+ * parameter can be specified as boolean (<tt>true</tt>) for default animation effects.</p>
+ * <pre><code>
+// default animation
+el.setWidth(100, true);
+ * </code></pre>
+ * 
+ * <p>To configure the effects, an object literal with animation options to use as the Element animation
+ * configuration object can also be specified. Note that the supported Element animation configuration
+ * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects.  The supported
+ * Element animation configuration options are:</p>
+<pre>
+Option    Default   Description
+--------- --------  ---------------------------------------------
+{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
+{@link Ext.Fx#easing easing}    easeOut   The easing method
+{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
+{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
+</pre>
+ * 
+ * <pre><code>
+// Element animation options object
+var opt = {
+    {@link Ext.Fx#duration duration}: 1,
+    {@link Ext.Fx#easing easing}: 'elasticIn',
+    {@link Ext.Fx#callback callback}: this.foo,
+    {@link Ext.Fx#scope scope}: this
+};
+// animation with some options set
+el.setWidth(100, opt);
+ * </code></pre>
+ * <p>The Element animation object being used for the animation will be set on the options
+ * object as "anim", which allows you to stop or manipulate the animation. Here is an example:</p>
+ * <pre><code>
+// using the "anim" property to get the Anim object
+if(opt.anim.isAnimated()){
+    opt.anim.stop();
+}
+ * </code></pre>
+ * <p>Also see the <tt>{@link #animate}</tt> method for another animation technique.</p>
+ * <p><b> Composite (Collections of) Elements</b></p>
+ * <p>For working with collections of Elements, see {@link Ext.CompositeElement}</p>
+ * @constructor Create a new Element directly.
+ * @param {String/HTMLElement} element
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).
+ */
+(function(){
+var DOC = document;
+
+Ext.Element = function(element, forceNew){
+    var dom = typeof element == "string" ?
+              DOC.getElementById(element) : element,
+        id;
+
+    if(!dom) return null;
+
+    id = dom.id;
+
+    if(!forceNew && id && Ext.Element.cache[id]){ // element object already exists
+        return Ext.Element.cache[id];
+    }
+
+    /**
+     * The DOM element
+     * @type HTMLElement
+     */
+    this.dom = dom;
+
+    /**
+     * The DOM element ID
+     * @type String
+     */
+    this.id = id || Ext.id(dom);
+};
+
+var D = Ext.lib.Dom,
+    DH = Ext.DomHelper,
+    E = Ext.lib.Event,
+    A = Ext.lib.Anim,
+    El = Ext.Element;
+
+El.prototype = {
+    /**
+     * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
+     * @param {Object} o The object with the attributes
+     * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos.
+     * @return {Ext.Element} this
+     */
+    set : function(o, useSet){
+        var el = this.dom,
+            attr,
+            val;        
+       
+        for(attr in o){
+            val = o[attr];
+            if (attr != "style" && !Ext.isFunction(val)) {
+                if (attr == "cls" ) {
+                    el.className = val;
+                } else if (o.hasOwnProperty(attr)) {
+                    if (useSet || !!el.setAttribute) el.setAttribute(attr, val);
+                    else el[attr] = val;
+                }
+            }
+        }
+        if(o.style){
+            Ext.DomHelper.applyStyles(el, o.style);
+        }
+        return this;
+    },
+    
+//  Mouse events
+    /**
+     * @event click
+     * Fires when a mouse click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event dblclick
+     * Fires when a mouse double click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousedown
+     * Fires when a mousedown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseup
+     * Fires when a mouseup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseover
+     * Fires when a mouseover is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousemove
+     * Fires when a mousemove is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseout
+     * Fires when a mouseout is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseenter
+     * Fires when the mouse enters the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseleave
+     * Fires when the mouse leaves the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    
+//  Keyboard events
+    /**
+     * @event keypress
+     * Fires when a keypress is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keydown
+     * Fires when a keydown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keyup
+     * Fires when a keyup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+
+//  HTML frame/object events
+    /**
+     * @event load
+     * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event unload
+     * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event abort
+     * Fires when an object/image is stopped from loading before completely loaded.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event error
+     * Fires when an object/image/frame cannot be loaded properly.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event resize
+     * Fires when a document view is resized.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event scroll
+     * Fires when a document view is scrolled.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  Form events
+    /**
+     * @event select
+     * Fires when a user selects some text in a text field, including input and textarea.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event change
+     * Fires when a control loses the input focus and its value has been modified since gaining focus.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event submit
+     * Fires when a form is submitted.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event reset
+     * Fires when a form is reset.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event focus
+     * Fires when an element receives focus either via the pointing device or by tab navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event blur
+     * Fires when an element loses focus either via the pointing device or by tabbing navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  User Interface events
+    /**
+     * @event DOMFocusIn
+     * Where supported. Similar to HTML focus event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMFocusOut
+     * Where supported. Similar to HTML blur event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMActivate
+     * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  DOM Mutation events
+    /**
+     * @event DOMSubtreeModified
+     * Where supported. Fires when the subtree is modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInserted
+     * Where supported. Fires when a node has been added as a child of another node.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemoved
+     * Where supported. Fires when a descendant node of the element is removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemovedFromDocument
+     * Where supported. Fires when a node is being removed from a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInsertedIntoDocument
+     * Where supported. Fires when a node is being inserted into a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMAttrModified
+     * Where supported. Fires when an attribute has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMCharacterDataModified
+     * Where supported. Fires when the character data has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+    /**
+     * The default unit to append to CSS values where a unit isn't provided (defaults to px).
+     * @type String
+     */
+    defaultUnit : "px",
+
+    /**
+     * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
+     * @param {String} selector The simple selector to test
+     * @return {Boolean} True if this element matches the selector, else false
+     */
+    is : function(simpleSelector){
+        return Ext.DomQuery.is(this.dom, simpleSelector);
+    },
+
+    /**
+     * Tries to focus the element. Any exceptions are caught and ignored.
+     * @param {Number} defer (optional) Milliseconds to defer the focus
+     * @return {Ext.Element} this
+     */
+    focus : function(defer, /* private */ dom) {
+        var me = this,
+            dom = dom || me.dom;
+        try{
+            if(Number(defer)){
+                me.focus.defer(defer, null, [null, dom]);
+            }else{
+                dom.focus();
+            }
+        }catch(e){}
+        return me;
+    },
+
+    /**
+     * Tries to blur the element. Any exceptions are caught and ignored.
+     * @return {Ext.Element} this
+     */
+    blur : function() {
+        try{
+            this.dom.blur();
+        }catch(e){}
+        return this;
+    },
+
+    /**
+     * Returns the value of the "value" attribute
+     * @param {Boolean} asNumber true to parse the value as a number
+     * @return {String/Number}
+     */
+    getValue : function(asNumber){
+        var val = this.dom.value;
+        return asNumber ? parseInt(val, 10) : val;
+    },
+
+    /**
+     * Appends an event handler to this element.  The shorthand version {@link #on} is equivalent.
+     * @param {String} eventName The type of event to handle
+     * @param {Function} fn The handler function the event invokes. This function is passed
+     * the following parameters:<ul>
+     * <li><b>evt</b> : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+     * <li><b>el</b> : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+     * <li><b>o</b> : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b>.
+     * @param {Object} options (optional) An object containing handler configuration properties.
+     * This may contain any of the following properties:<ul>
+     * <li><b>scope</b> Object : <div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b></div></li>
+     * <li><b>delegate</b> String: <div class="sub-desc">A simple selector to filter the target or look for a descendant of the target. See below for additional details.</div></li>
+     * <li><b>stopEvent</b> Boolean: <div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+     * <li><b>preventDefault</b> Boolean: <div class="sub-desc">True to prevent the default action</div></li>
+     * <li><b>stopPropagation</b> Boolean: <div class="sub-desc">True to prevent event propagation</div></li>
+     * <li><b>normalized</b> Boolean: <div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+     * <li><b>target</b> Ext.Element: <div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+     * <li><b>delay</b> Number: <div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+     * <li><b>single</b> Boolean: <div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+     * <li><b>buffer</b> Number: <div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+     * by the specified number of milliseconds. If the event fires again within that time, the original
+     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+     * </ul><br>
+     * <p>
+     * <b>Combining Options</b><br>
+     * In the following examples, the shorthand form {@link #on} is used rather than the more verbose
+     * addListener.  The two are equivalent.  Using the options argument, it is possible to combine different
+     * types of listeners:<br>
+     * <br>
+     * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the
+     * options object. The options object is available as the third parameter in the handler function.<div style="margin: 5px 20px 20px;">
+     * Code:<pre><code>
+el.on('click', this.onClick, this, {
+    single: true,
+    delay: 100,
+    stopEvent : true,
+    forumId: 4
+});</code></pre></p>
+     * <p>
+     * <b>Attaching multiple handlers in 1 call</b><br>
+     * The method also allows for a single argument to be passed which is a config object containing properties
+     * which specify multiple handlers.</p>
+     * <p>
+     * Code:<pre><code>
+el.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * Code:<pre><code></p>
+el.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+    scope: this
+});
+     * </code></pre></p>
+     * <p><b>delegate</b></p>
+     * <p>This is a configuration option that you can pass along when registering a handler for
+     * an event to assist with event delegation. Event delegation is a technique that is used to
+     * reduce memory consumption and prevent exposure to memory-leaks. By registering an event
+     * for a container element as opposed to each element within a container. By setting this
+     * configuration option to a simple selector, the target element will be filtered to look for
+     * a descendant of the target.
+     * For example:<pre><code>
+// using this markup:
+&lt;div id='elId'>
+    &lt;p id='p1'>paragraph one&lt;/p>
+    &lt;p id='p2' class='clickable'>paragraph two&lt;/p>
+    &lt;p id='p3'>paragraph three&lt;/p>
+&lt;/div>
+// utilize event delegation to registering just one handler on the container element: 
+el = Ext.get('elId');
+el.on(
+    'click',
+    function(e,t) {
+        // handle click
+        console.info(t.id); // 'p2'
+    },
+    this,
+    {
+        // filter the target element to be a descendant with the class 'clickable'
+        delegate: '.clickable' 
+    }
+);
+     * </code></pre></p>
+     * @return {Ext.Element} this
+     */
+    addListener : function(eventName, fn, scope, options){
+        Ext.EventManager.on(this.dom,  eventName, fn, scope || this, options);
+        return this;
+    },
+
+    /**
+     * Removes an event handler from this element.  The shorthand version {@link #un} is equivalent.
+     * <b>Note</b>: if a <i>scope</i> was explicitly specified when {@link #addListener adding} the
+     * listener, the same scope must be specified here.
+     * Example:
+     * <pre><code>
+el.removeListener('click', this.handlerFn);
+// or
+el.un('click', this.handlerFn);
+</code></pre>
+     * @param {String} eventName the type of event to remove
+     * @param {Function} fn the method the event invokes
+     * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+     * to this Element.
+     * @return {Ext.Element} this
+     */
+    removeListener : function(eventName, fn, scope){
+        Ext.EventManager.removeListener(this.dom,  eventName, fn, scope || this);
+        return this;
+    },
+
+    /**
+     * Removes all previous added listeners from this element
+     * @return {Ext.Element} this
+     */
+    removeAllListeners : function(){
+        Ext.EventManager.removeAll(this.dom);
+        return this;
+    },
+
+    /**
+     * @private Test if size has a unit, otherwise appends the default
+     */
+    addUnits : function(size){
+        if(size === "" || size == "auto" || size === undefined){
+            size = size || '';
+        } else if(!isNaN(size) || !unitPattern.test(size)){
+            size = size + (this.defaultUnit || 'px');
+        }
+        return size;
+    },
+
+    /**
+     * <p>Updates the <a href="http://developer.mozilla.org/en/DOM/element.innerHTML">innerHTML</a> of this Element
+     * from a specified URL. Note that this is subject to the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">Same Origin Policy</a></p>
+     * <p>Updating innerHTML of an element will <b>not</b> execute embedded <tt>&lt;script></tt> elements. This is a browser restriction.</p>
+     * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying
+     * exactly how to request the HTML.
+     * @return {Ext.Element} this
+     */
+    load : function(url, params, cb){
+        Ext.Ajax.request(Ext.apply({
+            params: params,
+            url: url.url || url,
+            callback: cb,
+            el: this.dom,
+            indicatorText: url.indicatorText || ''
+        }, Ext.isObject(url) ? url : {}));
+        return this;
+    },
+
+    /**
+     * Tests various css rules/browsers to determine if this element uses a border box
+     * @return {Boolean}
+     */
+    isBorderBox : function(){
+        return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;
+    },
+
+    /**
+     * Removes this element from the DOM and deletes it from the cache
+     */
+    remove : function(){
+        var me = this,
+            dom = me.dom;
+        
+        me.removeAllListeners();
+        delete El.cache[dom.id];
+        delete El.dataCache[dom.id]
+        Ext.removeNode(dom);
+    },
+
+    /**
+     * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
+     * @param {Function} overFn The function to call when the mouse enters the Element.
+     * @param {Function} outFn The function to call when the mouse leaves the Element.
+     * @param {Object} scope (optional) The scope (<tt>this</tt> reference) in which the functions are executed. Defaults to the Element's DOM element.
+     * @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the <tt>options</tt> parameter}.
+     * @return {Ext.Element} this
+     */
+    hover : function(overFn, outFn, scope, options){
+        var me = this;
+        me.on('mouseenter', overFn, scope || me.dom, options);
+        me.on('mouseleave', outFn, scope || me.dom, options);
+        return me;
+    },
+
+    /**
+     * Returns true if this element is an ancestor of the passed element
+     * @param {HTMLElement/String} el The element to check
+     * @return {Boolean} True if this element is an ancestor of el, else false
+     */
+    contains : function(el){
+        return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);
+    },
+
+    /**
+     * Returns the value of a namespaced attribute from the element's underlying DOM node.
+     * @param {String} namespace The namespace in which to look for the attribute
+     * @param {String} name The attribute name
+     * @return {String} The attribute value
+     * @deprecated
+     */
+    getAttributeNS : function(ns, name){
+        return this.getAttribute(name, ns); 
+    },
+    
+    /**
+     * Returns the value of an attribute from the element's underlying DOM node.
+     * @param {String} name The attribute name
+     * @param {String} namespace (optional) The namespace in which to look for the attribute
+     * @return {String} The attribute value
+     */
+    getAttribute : Ext.isIE ? function(name, ns){
+        var d = this.dom,
+            type = typeof d[ns + ":" + name];
+
+        if(['undefined', 'unknown'].indexOf(type) == -1){
+            return d[ns + ":" + name];
+        }
+        return d[name];
+    } : function(name, ns){
+        var d = this.dom;
+        return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name];
+    },
+    
+    /**
+    * Update the innerHTML of this element
+    * @param {String} html The new HTML
+    * @return {Ext.Element} this
+     */
+    update : function(html) {
+        this.dom.innerHTML = html;
+        return this;
+    }
+};
+
+var ep = El.prototype;
+
+El.addMethods = function(o){
+   Ext.apply(ep, o);
+};
+
+/**
+ * Appends an event handler (shorthand for {@link #addListener}).
+ * @param {String} eventName The type of event to handle
+ * @param {Function} fn The handler function the event invokes
+ * @param {Object} scope (optional) The scope (this element) of the handler function
+ * @param {Object} options (optional) An object containing standard {@link #addListener} options
+ * @member Ext.Element
+ * @method on
+ */
+ep.on = ep.addListener;
+
+/**
+ * Removes an event handler from this element (see {@link #removeListener} for additional notes).
+ * @param {String} eventName the type of event to remove
+ * @param {Function} fn the method the event invokes
+ * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+ * to this Element.
+ * @return {Ext.Element} this
+ * @member Ext.Element
+ * @method un
+ */
+ep.un = ep.removeListener;
+
+/**
+ * true to automatically adjust width and height settings for box-model issues (default to true)
+ */
+ep.autoBoxAdjust = true;
+
+// private
+var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
+    docEl;
+
+/**
+ * @private
+ */
+El.cache = {};
+El.dataCache = {};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @static
+ * @member Ext.Element
+ * @method get
+ */
+El.get = function(el){
+    var ex,
+        elm,
+        id;
+    if(!el){ return null; }
+    if (typeof el == "string") { // element id
+        if (!(elm = DOC.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) { // dom element
+        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 = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid,
+                                                          // catch case where it hasn't been appended
+            El.cache[el.id] = el; // in case it was created directly with Element(), let's cache it
+        }
+        return el;
+    } else if(el.isComposite) {
+        return el;
+    } else if(Ext.isArray(el)) {
+        return El.select(el);
+    } else if(el == DOC) {
+        // create a bogus element object representing the document object
+        if(!docEl){
+            var f = function(){};
+            f.prototype = El.prototype;
+            docEl = new f();
+            docEl.dom = DOC;
+        }
+        return docEl;
+    }
+    return null;
+};
+
+// private method for getting and setting element data
+El.data = function(el, key, value){
+    var c = El.dataCache[el.id];
+    if(!c){
+        c = El.dataCache[el.id] = {};
+    }
+    if(arguments.length == 2){
+        return c[key];    
+    }else{
+        c[key] = value;
+    }
+};
+
+// private
+// Garbage collection - uncache elements/purge listeners on orphaned elements
+// so we don't hold a reference and cause the browser to retain them
+function garbageCollect(){
+    if(!Ext.enableGarbageCollector){
+        clearInterval(El.collectorThread);
+    } else {
+        var eid,
+            el,
+            d;
+
+        for(eid in El.cache){
+            el = El.cache[eid];
+            d = el.dom;
+            // -------------------------------------------------------
+            // Determining what is garbage:
+            // -------------------------------------------------------
+            // !d
+            // dom node is null, definitely garbage
+            // -------------------------------------------------------
+            // !d.parentNode
+            // no parentNode == direct orphan, definitely garbage
+            // -------------------------------------------------------
+            // !d.offsetParent && !document.getElementById(eid)
+            // display none elements have no offsetParent so we will
+            // also try to look it up by it's id. However, check
+            // offsetParent first so we don't do unneeded lookups.
+            // This enables collection of elements that are not orphans
+            // directly, but somewhere up the line they have an orphan
+            // parent.
+            // -------------------------------------------------------
+            if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){
+                delete El.cache[eid];
+                if(d && Ext.enableListenerCollection){
+                    Ext.EventManager.removeAll(d);
+                }
+            }
+        }
+    }
+}
+El.collectorThreadId = setInterval(garbageCollect, 30000);
+
+var flyFn = function(){};
+flyFn.prototype = El.prototype;
+
+// dom is optional
+El.Flyweight = function(dom){
+    this.dom = dom;
+};
+
+El.Flyweight.prototype = new flyFn();
+El.Flyweight.prototype.isFlyweight = true;
+El._flyweights = {};
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext.Element
+ * @method fly
+ */
+El.fly = function(el, named){
+    var ret = null;
+    named = named || '_global';
+
+    if (el = Ext.getDom(el)) {
+        (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el;
+        ret = El._flyweights[named];
+    }
+    return ret;
+};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * Shorthand of {@link Ext.Element#get}
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @member Ext
+ * @method get
+ */
+Ext.get = El.get;
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext
+ * @method fly
+ */
+Ext.fly = El.fly;
+
+// speedy lookup for elements never to box adjust
+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.dataCache;
+    delete El._flyweights;
+});
+})();
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({    
+    /**
+     * Stops the specified event(s) from bubbling and optionally prevents the default action
+     * @param {String/Array} eventName an event / array of events to stop from bubbling
+     * @param {Boolean} preventDefault (optional) true to prevent the default action too
+     * @return {Ext.Element} this
+     */
+    swallowEvent : function(eventName, preventDefault){
+	    var me = this;
+        function fn(e){
+            e.stopPropagation();
+            if(preventDefault){
+                e.preventDefault();
+            }
+        }
+        if(Ext.isArray(eventName)){            
+	        Ext.each(eventName, function(e) {
+                 me.on(e, fn);
+            });
+            return me;
+        }
+        me.on(eventName, fn);
+        return me;
+    },
+    
+    /**
+     * Create an event handler on this element such that when the event fires and is handled by this element,
+     * it will be relayed to another object (i.e., fired again as if it originated from that object instead).
+     * @param {String} eventName The type of event to relay
+     * @param {Object} object Any object that extends {@link Ext.util.Observable} that will provide the context
+     * for firing the relayed event
+     */
+    relayEvent : function(eventName, observable){
+        this.on(eventName, function(e){
+            observable.fireEvent(eventName, e);
+        });
+    },
+    
+	/**
+     * Removes worthless text nodes
+     * @param {Boolean} forceReclean (optional) By default the element
+     * keeps track if it has been cleaned already so
+     * you can call this over and over. However, if you update the element and
+     * need to force a reclean, you can pass true.
+     */
+    clean : function(forceReclean){
+        var me = this, 
+            dom = me.dom,
+        	n = dom.firstChild, 
+        	ni = -1;
+        	
+	    if(Ext.Element.data(dom, 'isCleaned') && forceReclean !== true){
+            return me;
+        }      
+        	
+ 	    while(n){
+ 	        var nx = n.nextSibling;
+            if(n.nodeType == 3 && !/\S/.test(n.nodeValue)){
+                dom.removeChild(n);
+            }else{
+                n.nodeIndex = ++ni;
+            }
+ 	        n = nx;
+ 	    }
+        Ext.Element.data(dom, 'isCleaned', true);
+ 	    return me;
+ 	},
+    
+    /**
+     * Direct access to the Updater {@link Ext.Updater#update} method. The method takes the same object
+     * parameter as {@link Ext.Updater#update}
+     * @return {Ext.Element} this
+     */
+    load : function(){
+        var um = this.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    /**
+    * Gets this element's {@link Ext.Updater Updater}
+    * @return {Ext.Updater} The Updater
+    */
+    getUpdater : function(){
+        return this.updateManager || (this.updateManager = new Ext.Updater(this));
+    },
+    
+	/**
+    * Update the innerHTML of this element, optionally searching for and processing scripts
+    * @param {String} html The new HTML
+    * @param {Boolean} loadScripts (optional) True to look for and process scripts (defaults to false)
+    * @param {Function} callback (optional) For async script loading you can be notified when the update completes
+    * @return {Ext.Element} this
+     */
+    update : function(html, loadScripts, callback){
+        html = html || "";
+	    
+        if(loadScripts !== true){
+            this.dom.innerHTML = html;
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+            return this;
+        }
+        
+        var id = Ext.id(),
+        	dom = this.dom;
+
+        html += '<span id="' + id + '"></span>';
+
+        Ext.lib.Event.onAvailable(id, function(){
+            var DOC = document,
+                hd = DOC.getElementsByTagName("head")[0],
+            	re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+            	srcRe = /\ssrc=([\'\"])(.*?)\1/i,
+            	typeRe = /\stype=([\'\"])(.*?)\1/i,
+            	match,
+            	attrs,
+            	srcMatch,
+            	typeMatch,
+            	el,
+            	s;
+
+            while((match = re.exec(html))){
+                attrs = match[1];
+                srcMatch = attrs ? attrs.match(srcRe) : false;
+                if(srcMatch && srcMatch[2]){
+                   s = DOC.createElement("script");
+                   s.src = srcMatch[2];
+                   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]);
+                    }
+                }
+            }
+            el = DOC.getElementById(id);
+            if(el){Ext.removeNode(el);}
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+        });
+        dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
+        return this;
+    },
+    
+    /**
+     * Creates a proxy element of this element
+     * @param {String/Object} config The class name of the proxy element or a DomHelper config object
+     * @param {String/HTMLElement} renderTo (optional) The element or element id to render the proxy to (defaults to document.body)
+     * @param {Boolean} matchBox (optional) True to align and size the proxy to this element now (defaults to false)
+     * @return {Ext.Element} The new proxy element
+     */
+    createProxy : function(config, renderTo, matchBox){
+        config = Ext.isObject(config) ? config : {tag : "div", cls: config};
+
+        var me = this,
+        	proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
+        					   Ext.DomHelper.insertBefore(me.dom, config, true);        
+        
+        if(matchBox && me.setBox && me.getBox){ // check to make sure Element.position.js is loaded
+           proxy.setBox(me.getBox());
+        }
+        return proxy;
+    }
+});
+
+Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater;
+
+// private
+Ext.Element.uncache = function(el){
+    for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+        if(a[i]){
+            delete Ext.Element.cache[a[i].id || a[i]];
+        }
+    }
+};/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Gets the x,y coordinates specified by the anchor position on the element.
+     * @param {String} anchor (optional) The specified anchor position (defaults to "c").  See {@link #alignTo}
+     * for details on supported anchor positions.
+     * @param {Boolean} local (optional) True to get the local (element top/left-relative) anchor position instead
+     * of page coordinates
+     * @param {Object} size (optional) An object containing the size to use for calculating anchor position
+     * {width: (target width), height: (target height)} (defaults to the element's current size)
+     * @return {Array} [x, y] An array containing the element's x and y coordinates
+     */
+    getAnchorXY : function(anchor, local, s){
+        //Passing a different size is useful for pre-calculating anchors,
+        //especially for anchored animations that change the el size.
+		anchor = (anchor || "tl").toLowerCase();
+        s = s || {};
+        
+        var me = this,        
+        	vp = me.dom == document.body || me.dom == document,
+        	w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(),
+        	h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(),         	        	
+        	xy,       	
+        	r = Math.round,
+        	o = me.getXY(),
+        	scroll = me.getScroll(),
+        	extraX = vp ? scroll.left : !local ? o[0] : 0,
+        	extraY = vp ? scroll.top : !local ? o[1] : 0,
+        	hash = {
+	        	c  : [r(w * 0.5), r(h * 0.5)],
+	        	t  : [r(w * 0.5), 0],
+	        	l  : [0, r(h * 0.5)],
+	        	r  : [w, r(h * 0.5)],
+	        	b  : [r(w * 0.5), h],
+	        	tl : [0, 0],	
+	        	bl : [0, h],
+	        	br : [w, h],
+	        	tr : [w, 0]
+        	};
+        
+        xy = hash[anchor];	
+        return [xy[0] + extraX, xy[1] + extraY]; 
+    },
+
+    /**
+     * Anchors an element to another element and realigns it when the window is resized.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) True for the default animation or a standard Element animation config object
+     * @param {Boolean/Number} monitorScroll (optional) True to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @param {Function} callback The function to call after the animation finishes
+     * @return {Ext.Element} this
+     */
+    anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){        
+	    var me = this,
+            dom = me.dom;
+	    
+	    function action(){
+            Ext.fly(dom).alignTo(el, alignment, offsets, animate);
+            Ext.callback(callback, Ext.fly(dom));
+        }
+        
+        Ext.EventManager.onWindowResize(action, me);
+        
+        if(!Ext.isEmpty(monitorScroll)){
+            Ext.EventManager.on(window, 'scroll', action, me,
+                {buffer: !isNaN(monitorScroll) ? monitorScroll : 50});
+        }
+        action.call(me); // align immediately
+        return me;
+    },
+
+    /**
+     * Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
+     * supported position values.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Array} [x, y]
+     */
+    getAlignToXY : function(el, p, o){	    
+        el = Ext.get(el);
+        
+        if(!el || !el.dom){
+            throw "Element.alignToXY with an element that doesn't exist";
+        }
+        
+        o = o || [0,0];
+        p = (p == "?" ? "tl-bl?" : (!/-/.test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase();       
+                
+        var me = this,
+        	d = me.dom,
+        	a1,
+        	a2,
+        	x,
+        	y,
+        	//constrain the aligned el to viewport if necessary
+        	w,
+        	h,
+        	r,
+        	dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie
+        	dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie
+        	p1y,
+        	p1x,        	
+        	p2y,
+        	p2x,
+        	swapY,
+        	swapX,
+        	doc = document,
+        	docElement = doc.documentElement,
+        	docBody = doc.body,
+        	scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5,
+        	scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5,
+        	c = false, //constrain to viewport
+        	p1 = "", 
+        	p2 = "",
+        	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];
+
+        //Subtract the aligned el's internal xy from the target's offset xy
+        //plus custom offset to get the aligned el's new offset xy
+        a1 = me.getAnchorXY(p1, true);
+        a2 = el.getAnchorXY(p2, false);
+
+        x = a2[0] - a1[0] + o[0];
+        y = a2[1] - a1[1] + o[1];
+
+        if(c){    
+	       w = me.getWidth();
+           h = me.getHeight();
+           r = el.getRegion();       
+           //If we are at a viewport boundary and the aligned el is anchored on a target border that is
+           //perpendicular to the vp border, allow the aligned el to slide on that border,
+           //otherwise swap the aligned el to the opposite border of the target.
+           p1y = p1.charAt(0);
+           p1x = p1.charAt(p1.length-1);
+           p2y = p2.charAt(0);
+           p2x = p2.charAt(p2.length-1);
+           swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t"));
+           swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r"));          
+           
+
+           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];
+    },
+
+    /**
+     * Aligns this element with another element relative to the specified anchor points. If the other element is the
+     * document it aligns it to the viewport.
+     * The position parameter is optional, and can be specified in any one of the following formats:
+     * <ul>
+     *   <li><b>Blank</b>: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").</li>
+     *   <li><b>One anchor (deprecated)</b>: The passed anchor position is used as the target element's anchor point.
+     *       The element being aligned will position its top-left corner (tl) to that point.  <i>This method has been
+     *       deprecated in favor of the newer two anchor syntax below</i>.</li>
+     *   <li><b>Two anchors</b>: If two values from the table below are passed separated by a dash, the first value is used as the
+     *       element's anchor point, and the second value is used as the target's anchor point.</li>
+     * </ul>
+     * In addition to the anchor points, the position parameter also supports the "?" character.  If "?" is passed at the end of
+     * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to
+     * the viewport if necessary.  Note that the element being aligned might be swapped to align to a different position than
+     * that specified in order to enforce the viewport constraints.
+     * Following are all of the supported anchor positions:
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner (default)
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+c      In the center of the element
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+Example Usage:
+<pre><code>
+// align el to other-el using the default positioning ("tl-bl", non-constrained)
+el.alignTo("other-el");
+
+// align the top left corner of el with the top right corner of other-el (constrained to viewport)
+el.alignTo("other-el", "tr?");
+
+// align the bottom right corner of el with the center left edge of other-el
+el.alignTo("other-el", "br-l?");
+
+// align the center of el with the bottom left corner of other-el and
+// adjust the x position by -6 pixels (and the y position by 0)
+el.alignTo("other-el", "c-bl", [-6, 0]);
+</code></pre>
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    alignTo : function(element, position, offsets, animate){
+	    var me = this;
+        return me.setXY(me.getAlignToXY(element, position, offsets),
+          		        me.preanim && !!animate ? me.preanim(arguments, 3) : false);
+    },
+    
+    // private ==>  used outside of core
+    adjustForConstraints : function(xy, parent, offsets){
+        return this.getConstrainToXY(parent || document, false, offsets, xy) ||  xy;
+    },
+
+    // private ==>  used outside of core
+    getConstrainToXY : function(el, local, offsets, proposedXY){   
+	    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;
+
+            // only move it if it needs it
+            var moved = false;
+
+            // first validate right/bottom
+            if((x + w) > vr){
+                x = vr - w;
+                moved = true;
+            }
+            if((y + h) > vb){
+                y = vb - h;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < vx){
+                x = vx;
+                moved = true;
+            }
+            if(y < vy){
+                y = vy;
+                moved = true;
+            }
+            return moved ? [x, y] : false;
+        };
+    }(),
+	    
+	    
+	        
+//         el = Ext.get(el);
+//         offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0});
+
+//         var	me = this,
+//         	doc = document,
+//         	s = el.getScroll(),
+//         	vxy = el.getXY(),
+//         	vx = offsets.left + s.left, 
+//         	vy = offsets.top + s.top,            	
+//         	vw = -offsets.right, 
+//         	vh = -offsets.bottom, 
+//         	vr,
+//         	vb,
+//         	xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]),
+//         	x = xy[0],
+//         	y = xy[1],
+//         	w = me.dom.offsetWidth, h = me.dom.offsetHeight,
+//         	moved = false; // only move it if it needs it
+//       
+//         	
+//         if(el.dom == doc.body || el.dom == doc){
+//             vw += Ext.lib.Dom.getViewWidth();
+//             vh += Ext.lib.Dom.getViewHeight();
+//         }else{
+//             vw += el.dom.clientWidth;
+//             vh += el.dom.clientHeight;
+//             if(!local){                    
+//                 vx += vxy[0];
+//                 vy += vxy[1];
+//             }
+//         }
+
+//         // first validate right/bottom
+//         if(x + w > vx + vw){
+//             x = vx + vw - w;
+//             moved = true;
+//         }
+//         if(y + h > vy + vh){
+//             y = vy + vh - h;
+//             moved = true;
+//         }
+//         // then make sure top/left isn't negative
+//         if(x < vx){
+//             x = vx;
+//             moved = true;
+//         }
+//         if(y < vy){
+//             y = vy;
+//             moved = true;
+//         }
+//         return moved ? [x, y] : false;
+//    },
+    
+    /**
+    * Calculates the x, y to center this element on the screen
+    * @return {Array} The x, y values [x, y]
+    */
+    getCenterXY : function(){
+        return this.getAlignToXY(document, 'c-c');
+    },
+
+    /**
+    * Centers the Element in either the viewport, or another Element.
+    * @param {Mixed} centerIn (optional) The element in which to center the element.
+    */
+    center : function(centerIn){
+        return this.alignTo(centerIn || document, 'c-c');        
+    }    
+});
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){
+	var PARENTNODE = 'parentNode',
+		NEXTSIBLING = 'nextSibling',
+		PREVIOUSSIBLING = 'previousSibling',
+		DQ = Ext.DomQuery,
+		GET = Ext.get;
+	
+	return {
+		/**
+	     * Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to search as a number or element (defaults to 50 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParent : function(simpleSelector, maxDepth, returnEl){
+	        var p = this.dom,
+	        	b = document.body, 
+	        	depth = 0, 	        	
+	        	stopEl;	        
+            if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') {
+                return null;
+            }
+	        maxDepth = maxDepth || 50;
+	        if (isNaN(maxDepth)) {
+	            stopEl = Ext.getDom(maxDepth);
+	            maxDepth = Number.MAX_VALUE;
+	        }
+	        while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){
+	            if(DQ.is(p, simpleSelector)){
+	                return returnEl ? GET(p) : p;
+	            }
+	            depth++;
+	            p = p.parentNode;
+	        }
+	        return null;
+	    },
+	
+	    /**
+	     * Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParentNode : function(simpleSelector, maxDepth, returnEl){
+	        var p = Ext.fly(this.dom.parentNode, '_internal');
+	        return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null;
+	    },
+	
+	    /**
+	     * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
+	     * This is a shortcut for findParentNode() that always returns an Ext.Element.
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @return {Ext.Element} The matching DOM node (or null if no match was found)
+	     */
+	    up : function(simpleSelector, maxDepth){
+	        return this.findParentNode(simpleSelector, maxDepth, true);
+	    },
+	
+	    /**
+	     * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} unique (optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object)
+	     * @return {CompositeElement/CompositeElementLite} The composite element
+	     */
+	    select : function(selector, unique){
+	        return Ext.Element.select(selector, unique, this.dom);
+	    },
+	
+	    /**
+	     * Selects child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @return {Array} An array of the matched nodes
+	     */
+	    query : function(selector, unique){
+	        return DQ.select(selector, this.dom);
+	    },
+	
+	    /**
+	     * Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    child : function(selector, returnDom){
+	        var n = DQ.selectNode(selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+	    /**
+	     * Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    down : function(selector, returnDom){
+	        var n = DQ.selectNode(" > " + selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+		 /**
+	     * Gets the parent node for this element, optionally chaining up trying to match a selector
+	     * @param {String} selector (optional) Find a parent node that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The parent node or null
+		 */
+	    parent : function(selector, returnDom){
+	        return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom);
+	    },
+	
+	     /**
+	     * Gets the next sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The next sibling or null
+		 */
+	    next : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the previous sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The previous sibling or null
+		 */
+	    prev : function(selector, returnDom){
+	        return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom);
+	    },
+	
+	
+	    /**
+	     * Gets the first child, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The first child or null
+		 */
+	    first : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the last child, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The last child or null
+		 */
+	    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 || DQ.is(n, selector))){
+	                return !returnDom ? GET(n) : n;
+	            }
+	            n = n[dir];
+	        }
+	        return null;
+	    }	
+    }
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper,
+        isEl = function(el){
+            return  (el.nodeType || el.dom || typeof el == 'string');  
+        };
+	
+	return {
+	    /**
+	     * Appends the passed element(s) to this element
+	     * @param {String/HTMLElement/Array/Element/CompositeElement} el
+	     * @return {Ext.Element} this
+	     */
+	    appendChild: function(el){        
+	        return GET(el).appendTo(this);        
+	    },
+	
+	    /**
+	     * Appends this element to the passed element
+	     * @param {Mixed} el The new parent element
+	     * @return {Ext.Element} this
+	     */
+	    appendTo: function(el){        
+	        GETDOM(el).appendChild(this.dom);        
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element before the passed element in the DOM
+	     * @param {Mixed} el The element before which this element will be inserted
+	     * @return {Ext.Element} this
+	     */
+	    insertBefore: function(el){  	          
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element after the passed element in the DOM
+	     * @param {Mixed} el The element to insert after
+	     * @return {Ext.Element} this
+	     */
+	    insertAfter: function(el){
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts (or creates) an element (or DomHelper config) as the first child of this element
+	     * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert
+	     * @return {Ext.Element} The new child
+	     */
+	    insertFirst: function(el, returnDom){
+            el = el || {};
+            if(isEl(el)){ // element
+                el = GETDOM(el);
+                this.dom.insertBefore(el, this.dom.firstChild);
+                return !returnDom ? GET(el) : el;
+            }else{ // dh config
+                return this.createChild(el, this.dom.firstChild, returnDom);
+            }
+    },
+	
+	    /**
+	     * Replaces the passed element with this element
+	     * @param {Mixed} el The element to replace
+	     * @return {Ext.Element} this
+	     */
+	    replace: function(el){
+	        el = GET(el);
+	        this.insertBefore(el);
+	        el.remove();
+	        return this;
+	    },
+	
+	    /**
+	     * Replaces this element with the passed element
+	     * @param {Mixed/Object} el The new element or a DomHelper config of an element to create
+	     * @return {Ext.Element} this
+	     */
+	    replaceWith: function(el){
+		    var me = this,
+		    	Element = Ext.Element;
+            if(isEl(el)){
+                el = GETDOM(el);
+                me.dom.parentNode.insertBefore(el, me.dom);
+            }else{
+                el = DH.insertBefore(me.dom, el);
+            }
+	        
+	        delete Element.cache[me.id];
+	        Ext.removeNode(me.dom);      
+	        me.id = Ext.id(me.dom = el);
+	        return Element.cache[me.id] = me;        
+	    },
+	    
+		/**
+		 * Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.
+		 * @param {Object} config DomHelper element config object.  If no tag is specified (e.g., {tag:'input'}) then a div will be
+		 * automatically generated with the specified attributes.
+		 * @param {HTMLElement} insertBefore (optional) a child element of this element
+		 * @param {Boolean} returnDom (optional) true to return the dom node instead of creating an Element
+		 * @return {Ext.Element} The new child element
+		 */
+		createChild: function(config, insertBefore, returnDom){
+		    config = config || {tag:'div'};
+		    return insertBefore ? 
+		    	   DH.insertBefore(insertBefore, config, returnDom !== true) :	
+		    	   DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config,  returnDom !== true);
+		},
+		
+		/**
+		 * Creates and wraps this element with another element
+		 * @param {Object} config (optional) DomHelper element config object for the wrapper element or null for an empty div
+		 * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+		 * @return {HTMLElement/Element} The newly created wrapper element
+		 */
+		wrap: function(config, returnDom){        
+		    var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom);
+		    newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom);
+		    return newEl;
+		},
+		
+		/**
+		 * Inserts an html fragment into this element
+		 * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd.
+		 * @param {String} html The HTML fragment
+		 * @param {Boolean} returnEl (optional) True to return an Ext.Element (defaults to false)
+		 * @return {HTMLElement/Ext.Element} The inserted node (or nearest related if more than 1 inserted)
+		 */
+		insertHtml : function(where, html, returnEl){
+		    var el = DH.insertHtml(where, this.dom, html);
+		    return returnEl ? Ext.get(el) : el;
+		}
+	}
+}());/**
+ * @class Ext.Element
+ */
+Ext.apply(Ext.Element.prototype, function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper;
+	
+	return {	
+		/**
+	     * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
+	     * @param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert *or* an array of any of those.
+	     * @param {String} where (optional) 'before' or 'after' defaults to before
+	     * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+	     * @return {Ext.Element} the inserted Element
+	     */
+	    insertSibling: function(el, where, returnDom){
+	        var me = this,
+	        	rt;
+	        	
+	        if(Ext.isArray(el)){            
+	            Ext.each(el, function(e) {
+		            rt = me.insertSibling(e, where, returnDom);
+	            });
+	            return rt;
+	        }
+	                
+	        where = (where || 'before').toLowerCase();
+	        el = el || {};
+	       	
+            if(el.nodeType || el.dom){
+                rt = me.dom.parentNode.insertBefore(GETDOM(el), where == 'before' ? me.dom : me.dom.nextSibling);
+                if (!returnDom) {
+                    rt = GET(rt);
+                }
+            }else{
+                if (where == 'after' && !me.dom.nextSibling) {
+                    rt = DH.append(me.dom.parentNode, el, !returnDom);
+                } else {                    
+                    rt = DH[where == 'after' ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom);
+                }
+            }
+	        return rt;
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){  
+    // local style camelizing for speed
+    var propCache = {},
+        camelRe = /(-[a-z])/gi,
+        classReCache = {},
+        view = document.defaultView,
+        propFloat = Ext.isIE ? 'styleFloat' : 'cssFloat',
+        opacityRe = /alpha\(opacity=(.*)\)/i,
+        trimRe = /^\s+|\s+$/g,
+        EL = Ext.Element,   
+        PADDING = "padding",
+        MARGIN = "margin",
+        BORDER = "border",
+        LEFT = "-left",
+        RIGHT = "-right",
+        TOP = "-top",
+        BOTTOM = "-bottom",
+        WIDTH = "-width",    
+        MATH = Math,
+        HIDDEN = 'hidden',
+        ISCLIPPED = 'isClipped',
+        OVERFLOW = 'overflow',
+        OVERFLOWX = 'overflow-x',
+        OVERFLOWY = 'overflow-y',
+        ORIGINALCLIP = 'originalClip',
+        // special markup used throughout Ext when box wrapping elements    
+        borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH},
+        paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM},
+        margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM},
+        data = Ext.Element.data;
+        
+    
+    // private  
+    function camelFn(m, a) {
+        return a.charAt(1).toUpperCase();
+    }
+    
+    // private (needs to be called => addStyles.call(this, sides, styles))
+    function addStyles(sides, styles){
+        var val = 0;    
+        
+        Ext.each(sides.match(/\w/g), function(s) {
+            if (s = parseInt(this.getStyle(styles[s]), 10)) {
+                val += MATH.abs(s);      
+            }
+        },
+        this);
+        return val;
+    }
+
+    function chkCache(prop) {
+        return propCache[prop] || (propCache[prop] = prop == 'float' ? propFloat : prop.replace(camelRe, camelFn));
+
+    }
+            
+    return {    
+        // private  ==> used by Fx  
+        adjustWidth : function(width) {
+            var me = this;
+            var isNum = (typeof width == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               width -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+            }
+            return (isNum && width < 0) ? 0 : width;
+        },
+        
+        // private   ==> used by Fx 
+        adjustHeight : function(height) {
+            var me = this;
+            var isNum = (typeof height == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               height -= (me.getBorderWidth("tb") + me.getPadding("tb"));               
+            }
+            return (isNum && height < 0) ? 0 : height;
+        },
+    
+    
+        /**
+         * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        addClass : function(className){
+            var me = this;
+            Ext.each(className, function(v) {
+                me.dom.className += (!me.hasClass(v) && v ? " " + v : "");  
+            });
+            return me;
+        },
+    
+        /**
+         * Adds one or more CSS classes to this element and removes the same class(es) from all siblings.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        radioClass : function(className){
+            Ext.each(this.dom.parentNode.childNodes, function(v) {
+                if(v.nodeType == 1) {
+                    Ext.fly(v, '_internal').removeClass(className);          
+                }
+            });
+            return this.addClass(className);
+        },
+    
+        /**
+         * Removes one or more CSS classes from the element.
+         * @param {String/Array} className The CSS class to remove, or an array of classes
+         * @return {Ext.Element} this
+         */
+        removeClass : function(className){
+            var me = this;
+            if (me.dom.className) {
+                Ext.each(className, function(v) {               
+                    me.dom.className = me.dom.className.replace(
+                        classReCache[v] = classReCache[v] || new RegExp('(?:^|\\s+)' + v + '(?:\\s+|$)', "g"), 
+                        " ");               
+                });    
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).
+         * @param {String} className The CSS class to toggle
+         * @return {Ext.Element} this
+         */
+        toggleClass : function(className){
+            return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
+        },
+    
+        /**
+         * Checks if the specified CSS class exists on this element's DOM node.
+         * @param {String} className The CSS class to check for
+         * @return {Boolean} True if the class exists, else false
+         */
+        hasClass : function(className){
+            return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1;
+        },
+    
+        /**
+         * Replaces a CSS class on the element with another.  If the old name does not exist, the new name will simply be added.
+         * @param {String} oldClassName The CSS class to replace
+         * @param {String} newClassName The replacement CSS class
+         * @return {Ext.Element} this
+         */
+        replaceClass : function(oldClassName, newClassName){
+            return this.removeClass(oldClassName).addClass(newClassName);
+        },
+        
+        isStyle : function(style, val) {
+            return this.getStyle(style) == val;  
+        },
+    
+        /**
+         * Normalizes currentStyle and computedStyle.
+         * @param {String} property The style property whose value is returned.
+         * @return {String} The current value of the style property for this element.
+         */
+        getStyle : function(){         
+            return view && view.getComputedStyle ?
+                function(prop){
+                    var el = this.dom,
+                        v,                  
+                        cs;
+                    if(el == document) return null;
+                    prop = chkCache(prop);
+                    return (v = el.style[prop]) ? v : 
+                           (cs = view.getComputedStyle(el, "")) ? cs[prop] : null;
+                } :
+                function(prop){      
+                    var el = this.dom, 
+                        m, 
+                        cs;     
+                        
+                    if(el == document) return null;      
+                    if (prop == 'opacity') {
+                        if (el.style.filter.match) {                       
+                            if(m = el.style.filter.match(opacityRe)){
+                                var fv = parseFloat(m[1]);
+                                if(!isNaN(fv)){
+                                    return fv ? fv / 100 : 0;
+                                }
+                            }
+                        }
+                        return 1;
+                    }
+                    prop = chkCache(prop);  
+                    return el.style[prop] || ((cs = el.currentStyle) ? cs[prop] : null);
+                };
+        }(),
+        
+        /**
+         * Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values
+         * are convert to standard 6 digit hex color.
+         * @param {String} attr The css attribute
+         * @param {String} defaultValue The default value to use when a valid color isn't found
+         * @param {String} prefix (optional) defaults to #. Use an empty string when working with
+         * color anims.
+         */
+        getColor : function(attr, defaultValue, prefix){
+            var v = this.getStyle(attr),
+                color = prefix || '#',
+                h;
+                
+            if(!v || /transparent|inherit/.test(v)){
+                return defaultValue;
+            }
+            if(/^r/.test(v)){
+                Ext.each(v.slice(4, v.length -1).split(','), function(s){
+                    h = parseInt(s, 10);
+                    color += (h < 16 ? '0' : '') + h.toString(16); 
+                });
+            }else{
+                v = v.replace('#', '');
+                color += v.length == 3 ? v.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3') : v;
+            }
+            return(color.length > 5 ? color.toLowerCase() : defaultValue);
+        },
+    
+        /**
+         * Wrapper for setting style properties, also takes single object parameter of multiple styles.
+         * @param {String/Object} property The style property to be set, or an object of multiple styles.
+         * @param {String} value (optional) The value to apply to the given property, or null if an object was passed.
+         * @return {Ext.Element} this
+         */
+        setStyle : function(prop, value){
+            var tmp, 
+                style,
+                camel;
+            if (!Ext.isObject(prop)) {
+                tmp = {};
+                tmp[prop] = value;          
+                prop = tmp;
+            }
+            for (style in prop) {
+                value = prop[style];            
+                style == 'opacity' ? 
+                    this.setOpacity(value) : 
+                    this.dom.style[chkCache(style)] = value;
+            }
+            return this;
+        },
+        
+        /**
+         * Set the opacity of the element
+         * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc
+         * @param {Boolean/Object} animate (optional) a standard Element animation config object or <tt>true</tt> for
+         * the default animation (<tt>{duration: .35, easing: 'easeIn'}</tt>)
+         * @return {Ext.Element} this
+         */
+         setOpacity : function(opacity, animate){
+            var me = this,
+                s = me.dom.style;
+                
+            if(!animate || !me.anim){            
+                if(Ext.isIE){
+                    var opac = opacity < 1 ? 'alpha(opacity=' + opacity * 100 + ')' : '', 
+                    val = s.filter.replace(opacityRe, '').replace(trimRe, '');
+
+                    s.zoom = 1;
+                    s.filter = val + (val.length > 0 ? ' ' : '') + opac;
+                }else{
+                    s.opacity = opacity;
+                }
+            }else{
+                me.anim({opacity: {to: opacity}}, me.preanim(arguments, 1), null, .35, 'easeIn');
+            }
+            return me;
+        },
+        
+        /**
+         * Clears any opacity settings from this element. Required in some cases for IE.
+         * @return {Ext.Element} this
+         */
+        clearOpacity : function(){
+            var style = this.dom.style;
+            if(Ext.isIE){
+                if(!Ext.isEmpty(style.filter)){
+                    style.filter = style.filter.replace(opacityRe, '').replace(trimRe, '');
+                }
+            }else{
+                style.opacity = style['-moz-opacity'] = style['-khtml-opacity'] = '';
+            }
+            return this;
+        },
+    
+        /**
+         * Returns the offset height of the element
+         * @param {Boolean} contentHeight (optional) true to get the height minus borders and padding
+         * @return {Number} The element's height
+         */
+        getHeight : function(contentHeight){
+            var me = this,
+                dom = me.dom,
+                h = MATH.max(dom.offsetHeight, dom.clientHeight) || 0;
+            h = !contentHeight ? h : h - me.getBorderWidth("tb") - me.getPadding("tb");
+            return h < 0 ? 0 : h;
+        },
+    
+        /**
+         * Returns the offset width of the element
+         * @param {Boolean} contentWidth (optional) true to get the width minus borders and padding
+         * @return {Number} The element's width
+         */
+        getWidth : function(contentWidth){
+            var me = this,
+                dom = me.dom,
+                w = MATH.max(dom.offsetWidth, dom.clientWidth) || 0;
+            w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr");
+            return w < 0 ? 0 : w;
+        },
+    
+        /**
+         * Set the width of this Element.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        setWidth : function(width, animate){
+            var me = this;
+            width = me.adjustWidth(width);
+            !animate || !me.anim ? 
+                me.dom.style.width = me.addUnits(width) :
+                me.anim({width : {to : width}}, me.preanim(arguments, 1));
+            return me;
+        },
+    
+        /**
+         * Set the height of this Element.
+         * <pre><code>
+// change the height to 200px and animate with default configuration
+Ext.fly('elementId').setHeight(200, true);
+
+// change the height to 150px and animate with a custom configuration
+Ext.fly('elId').setHeight(150, {
+    duration : .5, // animation will have a duration of .5 seconds
+    // will change the content to "finished"
+    callback: function(){ this.{@link #update}("finished"); } 
+});
+         * </code></pre>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels.)</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setHeight : function(height, animate){
+            var me = this;
+            height = me.adjustHeight(height);
+            !animate || !me.anim ? 
+                me.dom.style.height = me.addUnits(height) :
+                me.anim({height : {to : height}}, me.preanim(arguments, 1));
+            return me;
+        },
+        
+        /**
+         * Gets the width of the border(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the border <b><u>l</u></b>eft width + the border <b><u>r</u></b>ight width.
+         * @return {Number} The width of the sides passed added together
+         */
+        getBorderWidth : function(side){
+            return addStyles.call(this, side, borders);
+        },
+    
+        /**
+         * Gets the width of the padding(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the padding <b><u>l</u></b>eft + the padding <b><u>r</u></b>ight.
+         * @return {Number} The padding of the sides passed added together
+         */
+        getPadding : function(side){
+            return addStyles.call(this, side, paddings);
+        },
+    
+        /**
+         *  Store the current overflow setting and clip overflow on the element - use <tt>{@link #unclip}</tt> to remove
+         * @return {Ext.Element} this
+         */
+        clip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(!data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, true);
+                data(dom, ORIGINALCLIP, {
+                    o: me.getStyle(OVERFLOW),
+                    x: me.getStyle(OVERFLOWX),
+                    y: me.getStyle(OVERFLOWY)
+                });
+                me.setStyle(OVERFLOW, HIDDEN);
+                me.setStyle(OVERFLOWX, HIDDEN);
+                me.setStyle(OVERFLOWY, HIDDEN);
+            }
+            return me;
+        },
+    
+        /**
+         *  Return clipping (overflow) to original clipping before <tt>{@link #clip}</tt> was called
+         * @return {Ext.Element} this
+         */
+        unclip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, false);
+                var o = data(dom, ORIGINALCLIP);
+                if(o.o){
+                    me.setStyle(OVERFLOW, o.o);
+                }
+                if(o.x){
+                    me.setStyle(OVERFLOWX, o.x);
+                }
+                if(o.y){
+                    me.setStyle(OVERFLOWY, o.y);
+                }
+            }
+            return me;
+        },
+        
+        addStyles : addStyles,
+        margins : margins
+    }
+}()         
+);/**
+ * @class Ext.Element
+ */
+
+// special markup used throughout Ext when box wrapping elements
+Ext.Element.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>';
+
+Ext.Element.addMethods(function(){
+	var INTERNAL = "_internal";
+	return {
+	    /**
+	     * More flexible version of {@link #setStyle} for setting style properties.
+	     * @param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
+	     * a function which returns such a specification.
+	     * @return {Ext.Element} this
+	     */
+	    applyStyles : function(style){
+	        Ext.DomHelper.applyStyles(this.dom, style);
+	        return this;
+	    },
+
+		/**
+	     * Returns an object with properties matching the styles requested.
+	     * For example, el.getStyles('color', 'font-size', 'width') might return
+	     * {'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.
+	     * @param {String} style1 A style name
+	     * @param {String} style2 A style name
+	     * @param {String} etc.
+	     * @return {Object} The style object
+	     */
+	    getStyles : function(){
+		    var ret = {};
+		    Ext.each(arguments, function(v) {
+			   ret[v] = this.getStyle(v);
+		    },
+		    this);
+		    return ret;
+	    },
+
+		getStyleSize : function(){
+	        var me = this,
+	        	w,
+	        	h,
+	        	d = this.dom,
+	        	s = d.style;
+	        if(s.width && s.width != 'auto'){
+	            w = parseInt(s.width, 10);
+	            if(me.isBorderBox()){
+	               w -= me.getFrameWidth('lr');
+	            }
+	        }
+	        if(s.height && s.height != 'auto'){
+	            h = parseInt(s.height, 10);
+	            if(me.isBorderBox()){
+	               h -= me.getFrameWidth('tb');
+	            }
+	        }
+	        return {width: w || me.getWidth(true), height: h || me.getHeight(true)};
+	    },
+
+	    // private  ==> used by ext full
+		setOverflow : function(v){
+			var dom = this.dom;
+	    	if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
+	    		dom.style.overflow = 'hidden';
+	        	(function(){dom.style.overflow = 'auto';}).defer(1);
+	    	}else{
+	    		dom.style.overflow = v;
+	    	}
+		},
+
+	   /**
+		* <p>Wraps the specified element with a special 9 element markup/CSS block that renders by default as
+		* a gray container with a gradient background, rounded corners and a 4-way shadow.</p>
+		* <p>This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button},
+		* {@link Ext.Panel} when <tt>{@link Ext.Panel#frame frame=true}</tt>, {@link Ext.Window}).  The markup
+		* is of this form:</p>
+		* <pre><code>
+Ext.Element.boxMarkup =
+    &#39;&lt;div class="{0}-tl">&lt;div class="{0}-tr">&lt;div class="{0}-tc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-ml">&lt;div class="{0}-mr">&lt;div class="{0}-mc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-bl">&lt;div class="{0}-br">&lt;div class="{0}-bc">&lt;/div>&lt;/div>&lt;/div>&#39;;
+		* </code></pre>
+		* <p>Example usage:</p>
+		* <pre><code>
+// Basic box wrap
+Ext.get("foo").boxWrap();
+
+// You can also add a custom class and use CSS inheritance rules to customize the box look.
+// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
+// for how to create a custom box wrap style.
+Ext.get("foo").boxWrap().addClass("x-box-blue");
+		* </code></pre>
+		* @param {String} class (optional) A base CSS class to apply to the containing wrapper element
+		* (defaults to <tt>'x-box'</tt>). Note that there are a number of CSS rules that are dependent on
+		* this name to make the overall effect work, so if you supply an alternate base class, make sure you
+		* also supply all of the necessary rules.
+		* @return {Ext.Element} this
+		*/
+	    boxWrap : function(cls){
+	        cls = cls || 'x-box';
+	        var el = Ext.get(this.insertHtml("beforeBegin", "<div class='" + cls + "'>" + String.format(Ext.Element.boxMarkup, cls) + "</div>"));        //String.format('<div class="{0}">'+Ext.Element.boxMarkup+'</div>', cls)));
+	        Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom);
+	        return el;
+	    },
+
+        /**
+         * Set the size of this Element. If animation is true, both width and height will be animated concurrently.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+         * </ul></div>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+	    setSize : function(width, height, animate){
+			var me = this;
+			if(Ext.isObject(width)){ // in case of object from getSize()
+			    height = width.height;
+			    width = width.width;
+			}
+			width = me.adjustWidth(width);
+			height = me.adjustHeight(height);
+			if(!animate || !me.anim){
+			    me.dom.style.width = me.addUnits(width);
+			    me.dom.style.height = me.addUnits(height);
+			}else{
+			    me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2));
+			}
+			return me;
+	    },
+
+	    /**
+	     * Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
+	     * when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements
+	     * if a height has not been set using CSS.
+	     * @return {Number}
+	     */
+	    getComputedHeight : function(){
+		    var me = this,
+	        	h = Math.max(me.dom.offsetHeight, me.dom.clientHeight);
+	        if(!h){
+	            h = parseInt(me.getStyle('height'), 10) || 0;
+	            if(!me.isBorderBox()){
+	                h += me.getFrameWidth('tb');
+	            }
+	        }
+	        return h;
+	    },
+
+	    /**
+	     * Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
+	     * when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements
+	     * if a width has not been set using CSS.
+	     * @return {Number}
+	     */
+	    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;
+	    },
+
+	    /**
+	     * Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
+	     for more information about the sides.
+	     * @param {String} sides
+	     * @return {Number}
+	     */
+	    getFrameWidth : function(sides, onlyContentBox){
+	        return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides));
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is over this element
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnOver : function(className){
+	        this.hover(
+	            function(){
+	                Ext.fly(this, INTERNAL).addClass(className);
+	            },
+	            function(){
+	                Ext.fly(this, INTERNAL).removeClass(className);
+	            }
+	        );
+	        return this;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when this element has the focus
+	     * @param {String} className
+	     * @return {Ext.Element} 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;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnClick : function(className){
+	        var dom = this.dom;
+	        this.on("mousedown", function(){
+	            Ext.fly(dom, INTERNAL).addClass(className);
+	            var d = Ext.getDoc(),
+	            	fn = function(){
+		                Ext.fly(dom, INTERNAL).removeClass(className);
+		                d.removeListener("mouseup", fn);
+		            };
+	            d.on("mouseup", fn);
+	        });
+	        return this;
+	    },
+
+	    /**
+	     * Returns the width and height of the viewport.
+        * <pre><code>
+        var vpSize = Ext.getBody().getViewSize();
+
+        // all Windows created afterwards will have a default value of 90% height and 95% width
+        Ext.Window.override({
+            width: vpSize.width * 0.9,
+            height: vpSize.height * 0.95
+        });
+        // To handle window resizing you would have to hook onto onWindowResize.
+        </code></pre>
+	     * @return {Object} An object containing the viewport's size {width: (viewport width), height: (viewport height)}
+	     */
+	    getViewSize : function(){
+	        var doc = document,
+	        	d = this.dom,
+	        	extdom = Ext.lib.Dom,
+	        	isDoc = (d == doc || d == doc.body);
+	        return { width : (isDoc ? extdom.getViewWidth() : d.clientWidth),
+	        		 height : (isDoc ? extdom.getViewHeight() : d.clientHeight) };
+	    },
+
+	    /**
+	     * Returns the size of the element.
+	     * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding
+	     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+	     */
+	    getSize : function(contentSize){
+	        return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)};
+	    },
+
+	    /**
+	     * Forces the browser to repaint this element
+	     * @return {Ext.Element} this
+	     */
+	    repaint : function(){
+	        var dom = this.dom;
+	        this.addClass("x-repaint");
+	        setTimeout(function(){
+	            Ext.fly(dom).removeClass("x-repaint");
+	        }, 1);
+	        return this;
+	    },
+
+	    /**
+	     * Disables text selection for this element (normalized across browsers)
+	     * @return {Ext.Element} this
+	     */
+	    unselectable : function(){
+	        this.dom.unselectable = "on";
+	        return this.swallowEvent("selectstart", true).
+	        		    applyStyles("-moz-user-select:none;-khtml-user-select:none;").
+	        		    addClass("x-unselectable");
+	    },
+
+	    /**
+	     * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
+	     * then it returns the calculated width of the sides (see getPadding)
+	     * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides
+	     * @return {Object/Number}
+	     */
+	    getMargins : function(side){
+		    var me = this,
+		    	key,
+		    	hash = {t:"top", l:"left", r:"right", b: "bottom"},
+		    	o = {};
+
+		    if (!side) {
+		        for (key in me.margins){
+		        	o[hash[key]] = parseInt(me.getStyle(me.margins[key]), 10) || 0;
+                }
+		        return o;
+	        } else {
+	            return me.addStyles.call(me, side, me.margins);
+	        }
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+(function(){
+var D = Ext.lib.Dom,
+        LEFT = "left",
+        RIGHT = "right",
+        TOP = "top",
+        BOTTOM = "bottom",
+        POSITION = "position",
+        STATIC = "static",
+        RELATIVE = "relative",
+        AUTO = "auto",
+        ZINDEX = "z-index";
+
+function animTest(args, animate, i) {
+	return this.preanim && !!animate ? this.preanim(args, i) : false	
+}
+
+Ext.Element.addMethods({
+	/**
+      * Gets the current X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The X position of the element
+      */
+    getX : function(){
+        return D.getX(this.dom);
+    },
+
+    /**
+      * Gets the current Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The Y position of the element
+      */
+    getY : function(){
+        return D.getY(this.dom);
+    },
+
+    /**
+      * Gets the current position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Array} The XY position of the element
+      */
+    getXY : function(){
+        return D.getXY(this.dom);
+    },
+
+    /**
+      * Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.
+      * @param {Mixed} element The element to get the offsets from.
+      * @return {Array} The XY page offsets (e.g. [100, -200])
+      */
+    getOffsetsTo : function(el){
+        var o = this.getXY(),
+        	e = Ext.fly(el, '_internal').getXY();
+        return [o[0]-e[0],o[1]-e[1]];
+    },
+
+    /**
+     * Sets the X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The X position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setX : function(x, animate){	    
+	    return this.setXY([x, this.getY()], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The Y position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setY : function(y, animate){	    
+	    return this.setXY([this.getX(), y], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the element's left position directly using CSS style (instead of {@link #setX}).
+     * @param {String} left The left CSS property value
+     * @return {Ext.Element} this
+     */
+    setLeft : function(left){
+        this.setStyle(LEFT, this.addUnits(left));
+        return this;
+    },
+
+    /**
+     * Sets the element's top position directly using CSS style (instead of {@link #setY}).
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+    setTop : function(top){
+        this.setStyle(TOP, this.addUnits(top));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS right style.
+     * @param {String} right The right CSS property value
+     * @return {Ext.Element} this
+     */
+    setRight : function(right){
+        this.setStyle(RIGHT, this.addUnits(right));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS bottom style.
+     * @param {String} bottom The bottom CSS property value
+     * @return {Ext.Element} this
+     */
+    setBottom : function(bottom){
+        this.setStyle(BOTTOM, this.addUnits(bottom));
+        return this;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setXY : function(pos, animate){
+	    var me = this;
+        if(!animate || !me.anim){
+            D.setXY(me.dom, pos);
+        }else{
+            me.anim({points: {to: pos}}, me.preanim(arguments, 1), 'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setLocation : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    moveTo : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));        
+    },    
+    
+    /**
+     * Gets the left X coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getLeft : function(local){
+	    return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0;
+    },
+
+    /**
+     * Gets the right X coordinate of the element (element X position + element width)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getRight : function(local){
+	    var me = this;
+	    return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0;
+    },
+
+    /**
+     * Gets the top Y coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getTop : function(local) {
+	    return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0;
+    },
+
+    /**
+     * Gets the bottom Y coordinate of the element (element Y position + element height)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getBottom : function(local){
+	    var me = this;
+	    return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0;
+    },
+
+    /**
+    * Initializes positioning on this element. If a desired position is not passed, it will make the
+    * the element positioned relative IF it is not already positioned.
+    * @param {String} pos (optional) Positioning to use "relative", "absolute" or "fixed"
+    * @param {Number} zIndex (optional) The zIndex to apply
+    * @param {Number} x (optional) Set the page X position
+    * @param {Number} y (optional) Set the page Y position
+    */
+    position : function(pos, zIndex, x, y){
+	    var me = this;
+	    
+        if(!pos && me.isStyle(POSITION, STATIC)){           
+            me.setStyle(POSITION, RELATIVE);           
+        } else if(pos) {
+            me.setStyle(POSITION, pos);
+        }
+        if(zIndex){
+            me.setStyle(ZINDEX, zIndex);
+        }
+        if(x || y) me.setXY([x || false, y || false]);
+    },
+
+    /**
+    * Clear positioning back to the default when the document was loaded
+    * @param {String} value (optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'.
+    * @return {Ext.Element} this
+     */
+    clearPositioning : function(value){
+        value = value || '';
+        this.setStyle({
+            left : value,
+            right : value,
+            top : value,
+            bottom : value,
+            "z-index" : "",
+            position : STATIC
+        });
+        return this;
+    },
+
+    /**
+    * Gets an object with all CSS positioning properties. Useful along with setPostioning to get
+    * snapshot before performing an update and then restoring the element.
+    * @return {Object}
+    */
+    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(ZINDEX)
+        };
+    },
+    
+    /**
+    * Set positioning with an object returned by getPositioning().
+    * @param {Object} posCfg
+    * @return {Ext.Element} this
+     */
+    setPositioning : function(pc){
+	    var me = this,
+	    	style = me.dom.style;
+	    	
+        me.setStyle(pc);
+        
+        if(pc.right == AUTO){
+            style.right = "";
+        }
+        if(pc.bottom == AUTO){
+            style.bottom = "";
+        }
+        
+        return me;
+    },    
+	
+    /**
+     * Translates the passed page coordinates into left/top css values for this element
+     * @param {Number/Array} x The page x or an array containing [x, y]
+     * @param {Number} y (optional) The page y, required if x is not an array
+     * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)}
+     */
+    translatePoints : function(x, y){        	     
+	    y = isNaN(x[1]) ? y : x[1];
+        x = isNaN(x[0]) ? x : x[0];
+        var me = this,
+        	relative = me.isStyle(POSITION, RELATIVE),
+        	o = me.getXY(),
+        	l = parseInt(me.getStyle(LEFT), 10),
+        	t = parseInt(me.getStyle(TOP), 10);
+        
+        l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft);
+        t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);        
+
+        return {left: (x - o[0] + l), top: (y - o[1] + t)}; 
+    },
+    
+    animTest : animTest
+});
+})();/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
+     * @param {Object} box The box to fill {x, y, width, height}
+     * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBox : function(box, adjust, animate){
+        var me = this,
+        	w = box.width, 
+        	h = box.height;
+        if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){
+           w -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+           h -= (me.getBorderWidth("tb") + me.getPadding("tb"));
+        }
+        me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2));
+        return me;
+    },
+    
+    /**
+     * Return a box {x, y, width, height} that can be used to set another elements
+     * size/location to match this element.
+     * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y.
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+	getBox : function(contentBox, local) {	    
+	    var me = this,
+        	xy,
+        	left,
+        	top,
+        	getBorderWidth = me.getBorderWidth,
+        	getPadding = me.getPadding, 
+        	l,
+        	r,
+        	t,
+        	b;
+        if(!local){
+            xy = me.getXY();
+        }else{
+            left = parseInt(me.getStyle("left"), 10) || 0;
+            top = parseInt(me.getStyle("top"), 10) || 0;
+            xy = [left, top];
+        }
+        var el = me.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{
+            l = getBorderWidth.call(me, "l") + getPadding.call(me, "l");
+            r = getBorderWidth.call(me, "r") + getPadding.call(me, "r");
+            t = getBorderWidth.call(me, "t") + getPadding.call(me, "t");
+            b = getBorderWidth.call(me, "b") + getPadding.call(me, "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;
+	},
+	
+    /**
+     * Move this element relative to its current position.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to move the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+     move : function(direction, distance, animate){
+        var me = this,        	
+        	xy = me.getXY(),
+        	x = xy[0],
+        	y = xy[1],        	
+        	left = [x - distance, y],
+        	right = [x + distance, y],
+        	top = [x, y - distance],
+        	bottom = [x, y + distance],
+	       	hash = {
+	        	l :	left,
+	        	left : left,
+	        	r : right,
+	        	right : right,
+	        	t : top,
+	        	top : top,
+	        	up : top,
+	        	b : bottom, 
+	        	bottom : bottom,
+	        	down : bottom	        		
+	        };
+        
+ 	    direction = direction.toLowerCase();    
+ 	    me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2));
+    },
+    
+    /**
+     * Quick set left and top adding default units
+     * @param {String} left The left CSS property value
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+     setLeftTop : function(left, top){
+	    var me = this,
+	    	style = me.dom.style;
+        style.left = me.addUnits(left);
+        style.top = me.addUnits(top);
+        return me;
+    },
+    
+    /**
+     * Returns the region of the given element.
+     * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+     * @return {Region} A Ext.lib.Region containing "top, left, bottom, right" member data.
+     */
+    getRegion : function(){
+        return Ext.lib.Dom.getRegion(this.dom);
+    },
+    
+    /**
+     * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+     * </ul></div>
+     * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * </ul></div>
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBounds : function(x, y, width, height, animate){
+	    var me = this;
+        if (!animate || !me.anim) {
+            me.setSize(width, height);
+            me.setLocation(x, y);
+        } else {
+            me.anim({points: {to: [x, y]}, 
+            		 width: {to: me.adjustWidth(width)}, 
+            		 height: {to: me.adjustHeight(height)}},
+                     me.preanim(arguments, 4), 
+                     'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the element's position and size the specified region. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Ext.lib.Region} region The region to fill
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setRegion : function(region, animate) {
+        return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1));
+    }
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Returns true if this element is scrollable.
+     * @return {Boolean}
+     */
+    isScrollable : function(){
+        var dom = this.dom;
+        return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth;
+    },
+
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value.
+     * @return {Element} this
+     */
+    scrollTo : function(side, value){
+        this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value;
+        return this;
+    },
+
+    /**
+     * Returns the current scroll position of the element.
+     * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)}
+     */
+    getScroll : function(){
+        var d = this.dom, 
+            doc = document,
+            body = doc.body,
+            docElement = doc.documentElement,
+            l,
+            t,
+            ret;
+
+        if(d == doc || d == body){
+            if(Ext.isIE && Ext.isStrict){
+                l = docElement.scrollLeft; 
+                t = docElement.scrollTop;
+            }else{
+                l = window.pageXOffset;
+                t = window.pageYOffset;
+            }
+            ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)};
+        }else{
+            ret = {left: d.scrollLeft, top: d.scrollTop};
+        }
+        return ret;
+    }
+});/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Element} this
+     */
+    scrollTo : function(side, value, animate){
+        var tester = /top/i,
+        	prop = "scroll" + (tester.test(side) ? "Top" : "Left"),
+        	me = this,
+        	dom = me.dom;
+        if (!animate || !me.anim) {
+            dom[prop] = value;
+        } else {
+            me.anim({scroll: {to: tester.test(prop) ? [dom[prop], value] : [value, dom[prop]]}},
+            		 me.preanim(arguments, 2), 'scroll');
+        }
+        return me;
+    },
+    
+    /**
+     * Scrolls this element into view within the passed container.
+     * @param {Mixed} container (optional) The container element to scroll (defaults to document.body).  Should be a
+     * string (id), dom node, or Ext.Element.
+     * @param {Boolean} hscroll (optional) False to disable horizontal scroll (defaults to true)
+     * @return {Ext.Element} this
+     */
+    scrollIntoView : function(container, hscroll){
+        var c = Ext.getDom(container) || Ext.getBody().dom,
+        	el = this.dom,
+        	o = this.getOffsetsTo(c),
+            l = o[0] + c.scrollLeft,
+            t = o[1] + c.scrollTop,
+            b = t + el.offsetHeight,
+            r = l + el.offsetWidth,
+        	ch = c.clientHeight,
+        	ct = parseInt(c.scrollTop, 10),
+        	cl = parseInt(c.scrollLeft, 10),
+        	cb = ct + ch,
+        	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; // corrects IE, other browsers will ignore
+
+        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;
+    },
+
+    // private
+    scrollChildIntoView : function(child, hscroll){
+        Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll);
+    },
+    
+    /**
+     * Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
+     * within this element's scrollable range.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to scroll the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Boolean} Returns true if a scroll was triggered or false if the element
+     * was scrolled as far as it could go.
+     */
+     scroll : function(direction, distance, animate){
+         if(!this.isScrollable()){
+             return;
+         }
+         var el = this.dom,
+            l = el.scrollLeft, t = el.scrollTop,
+            w = el.scrollWidth, h = el.scrollHeight,
+            cw = el.clientWidth, ch = el.clientHeight,
+            scrolled = false, v,
+            hash = {
+                l: Math.min(l + distance, w-cw),
+                r: v = Math.max(l - distance, 0),
+                t: Math.max(t - distance, 0),
+                b: Math.min(t + distance, h-ch)
+            };
+            hash.d = hash.b;
+            hash.u = hash.t;
+            
+         direction = direction.substr(0, 1);
+         if((v = hash[direction]) > -1){
+            scrolled = true;
+            this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2));
+         }
+         return scrolled;
+    }
+});/**
+ * @class Ext.Element
+ */
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use visibility to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.VISIBILITY = 1;
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use display to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.DISPLAY = 2;
+
+Ext.Element.addMethods(function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",      
+        ORIGINALDISPLAY = 'originalDisplay',
+        VISMODE = 'visibilityMode',
+        ELDISPLAY = Ext.Element.DISPLAY,
+        data = Ext.Element.data,
+        getDisplay = function(dom){
+            var d = data(dom, ORIGINALDISPLAY);
+            if(d === undefined){
+                data(dom, ORIGINALDISPLAY, d = '');
+            }
+            return d;
+        },
+        getVisMode = function(dom){
+            var m = data(dom, VISMODE);
+            if(m === undefined){
+                data(dom, VISMODE, m = 1)
+            }
+            return m;
+        };
+    
+    return {
+        /**
+         * The element's default display mode  (defaults to "")
+         * @type String
+         */
+        originalDisplay : "",
+        visibilityMode : 1,
+        
+        /**
+         * Sets the element's visibility mode. When setVisible() is called it
+         * will use this to determine whether to set the visibility or the display property.
+         * @param visMode Ext.Element.VISIBILITY or Ext.Element.DISPLAY
+         * @return {Ext.Element} this
+         */
+        setVisibilityMode : function(visMode){  
+            data(this.dom, VISMODE, visMode);
+            return this;
+        },
+        
+        /**
+         * Perform custom animation on this element.
+         * <div><ul class="mdetail-params">
+         * <li><u>Animation Properties</u></li>
+         * 
+         * <p>The Animation Control Object enables gradual transitions for any member of an
+         * element's style object that takes a numeric value including but not limited to
+         * these properties:</p><div><ul class="mdetail-params">
+         * <li><tt>bottom, top, left, right</tt></li>
+         * <li><tt>height, width</tt></li>
+         * <li><tt>margin, padding</tt></li>
+         * <li><tt>borderWidth</tt></li>
+         * <li><tt>opacity</tt></li>
+         * <li><tt>fontSize</tt></li>
+         * <li><tt>lineHeight</tt></li>
+         * </ul></div>
+         * 
+         * 
+         * <li><u>Animation Property Attributes</u></li>
+         * 
+         * <p>Each Animation Property is a config object with optional properties:</p>
+         * <div><ul class="mdetail-params">
+         * <li><tt>by</tt>*  : relative change - start at current value, change by this value</li>
+         * <li><tt>from</tt> : ignore current value, start from this value</li>
+         * <li><tt>to</tt>*  : start at current value, go to this value</li>
+         * <li><tt>unit</tt> : any allowable unit specification</li>
+         * <p>* do not specify both <tt>to</tt> and <tt>by</tt> for an animation property</p>
+         * </ul></div>
+         * 
+         * <li><u>Animation Types</u></li>
+         * 
+         * <p>The supported animation types:</p><div><ul class="mdetail-params">
+         * <li><tt>'run'</tt> : Default
+         * <pre><code>
+var el = Ext.get('complexEl');
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'run'      // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre>
+         * </li>
+         * <li><tt>'color'</tt>
+         * <p>Animates transition of background, text, or border colors.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        color: { to: '#06e' },
+        backgroundColor: { to: '#e06' }
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'color'    // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * 
+         * <li><tt>'motion'</tt>
+         * <p>Animates the motion of an element to/from specific points using optional bezier
+         * way points during transit.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+        points: {
+            to: [50, 100],  // go to this point
+            control: [      // optional bezier way points
+                [ 600, 800],
+                [-100, 200]
+            ]
+        }
+    },
+    3000,      // animation duration (milliseconds!)
+    null,      // callback
+    'easeOut', // easing method
+    'motion'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * <li><tt>'scroll'</tt>
+         * <p>Animate horizontal or vertical scrolling of an overflowing page element.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        scroll: {to: [400, 300]}
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'scroll'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * </ul></div>
+         * 
+         * </ul></div>
+         * 
+         * @param {Object} args The animation control args
+         * @param {Float} duration (optional) How long the animation lasts in seconds (defaults to <tt>.35</tt>)
+         * @param {Function} onComplete (optional) Function to call when animation completes
+         * @param {String} easing (optional) {@link Ext.Fx#easing} method to use (defaults to <tt>'easeOut'</tt>)
+         * @param {String} animType (optional) <tt>'run'</tt> is the default. Can also be <tt>'color'</tt>,
+         * <tt>'motion'</tt>, or <tt>'scroll'</tt>
+         * @return {Ext.Element} this
+         */
+        animate : function(args, duration, onComplete, easing, animType){       
+            this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType);
+            return this;
+        },
+    
+        /*
+         * @private Internal animation call
+         */
+        anim : function(args, opt, animType, defaultDur, defaultEase, cb){
+            animType = animType || 'run';
+            opt = opt || {};
+            var me = this,              
+                anim = Ext.lib.Anim[animType](
+                    me.dom, 
+                    args,
+                    (opt.duration || defaultDur) || .35,
+                    (opt.easing || defaultEase) || 'easeOut',
+                    function(){
+                        if(cb) cb.call(me);
+                        if(opt.callback) opt.callback.call(opt.scope || me, me, opt);
+                    },
+                    me
+                );
+            opt.anim = anim;
+            return anim;
+        },
+    
+        // private legacy anim prep
+        preanim : function(a, i){
+            return !a[i] ? false : (Ext.isObject(a[i]) ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]});
+        },
+        
+        /**
+         * Checks whether the element is currently visible using both visibility and display properties.         
+         * @return {Boolean} True if the element is currently visible, else false
+         */
+        isVisible : function() {
+            return !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE);
+        },
+        
+        /**
+         * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
+         * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
+         * @param {Boolean} visible Whether the element is visible
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setVisible : function(visible, animate){
+            var me = this,
+                dom = me.dom,
+                isDisplay = getVisMode(this.dom) == ELDISPLAY;
+                
+            if (!animate || !me.anim) {
+                if(isDisplay){
+                    me.setDisplayed(visible);
+                }else{
+                    me.fixDisplay();
+                    dom.style.visibility = visible ? "visible" : HIDDEN;
+                }
+            }else{
+                // closure for composites            
+                if(visible){
+                    me.setOpacity(.01);
+                    me.setVisible(true);
+                }
+                me.anim({opacity: { to: (visible?1:0) }},
+                        me.preanim(arguments, 1),
+                        null,
+                        .35,
+                        'easeIn',
+                        function(){
+                             if(!visible){
+                                 dom.style[isDisplay ? DISPLAY : VISIBILITY] = (isDisplay) ? NONE : HIDDEN;                     
+                                 Ext.fly(dom).setOpacity(1);
+                             }
+                        });
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the element's visibility or display, depending on visibility mode.
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        toggle : function(animate){
+            var me = this;
+            me.setVisible(!me.isVisible(), me.preanim(arguments, 0));
+            return me;
+        },
+    
+        /**
+         * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
+         * @param {Mixed} value Boolean value to display the element using its default display, or a string to set the display directly.
+         * @return {Ext.Element} this
+         */
+        setDisplayed : function(value) {            
+            if(typeof value == "boolean"){
+               value = value ? getDisplay(this.dom) : NONE;
+            }
+            this.setStyle(DISPLAY, value);
+            return this;
+        },
+        
+        // private
+        fixDisplay : function(){
+            var me = this;
+            if(me.isStyle(DISPLAY, NONE)){
+                me.setStyle(VISIBILITY, HIDDEN);
+                me.setStyle(DISPLAY, getDisplay(this.dom)); // first try reverting to default
+                if(me.isStyle(DISPLAY, NONE)){ // if that fails, default to block
+                    me.setStyle(DISPLAY, "block");
+                }
+            }
+        },
+    
+        /**
+         * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        hide : function(animate){
+            this.setVisible(false, this.preanim(arguments, 0));
+            return this;
+        },
+    
+        /**
+        * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+        * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        show : function(animate){
+            this.setVisible(true, this.preanim(arguments, 0));
+            return this;
+        }
+    }
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",
+	    XMASKED = "x-masked",
+		XMASKEDRELATIVE = "x-masked-relative",
+        data = Ext.Element.data;
+		
+	return {
+		/**
+	     * Checks whether the element is currently visible using both visibility and display properties.
+	     * @param {Boolean} deep (optional) True to walk the dom and see if parent elements are hidden (defaults to false)
+	     * @return {Boolean} True if the element is currently visible, else false
+	     */
+	    isVisible : function(deep) {
+	        var vis = !this.isStyle(VISIBILITY,HIDDEN) && !this.isStyle(DISPLAY,NONE),
+	        	p = this.dom.parentNode;
+	        if(deep !== true || !vis){
+	            return vis;
+	        }	        
+	        while(p && !/body/i.test(p.tagName)){
+	            if(!Ext.fly(p, '_isVisible').isVisible()){
+	                return false;
+	            }
+	            p = p.parentNode;
+	        }
+	        return true;
+	    },
+	    
+	    /**
+	     * Returns true if display is not "none"
+	     * @return {Boolean}
+	     */
+	    isDisplayed : function() {
+	        return !this.isStyle(DISPLAY, NONE);
+	    },
+	    
+		/**
+	     * Convenience method for setVisibilityMode(Element.DISPLAY)
+	     * @param {String} display (optional) What to set display to when visible
+	     * @return {Ext.Element} this
+	     */
+	    enableDisplayMode : function(display){	    
+	        this.setVisibilityMode(Ext.Element.DISPLAY);
+	        if(!Ext.isEmpty(display)){
+                data(this.dom, 'originalDisplay', display);
+            }
+	        return this;
+	    },
+	    
+		/**
+	     * Puts a mask over this element to disable user interaction. Requires core.css.
+	     * This method can only be applied to elements which accept child nodes.
+	     * @param {String} msg (optional) A message to display in the mask
+	     * @param {String} msgCls (optional) A css class to apply to the msg element
+	     * @return {Element} The mask element
+	     */
+	    mask : function(msg, msgCls){
+		    var me = this,
+		    	dom = me.dom,
+		    	dh = Ext.DomHelper,
+		    	EXTELMASKMSG = "ext-el-mask-msg",
+                el, 
+                mask;
+		    	
+	        if(me.getStyle("position") == "static"){
+	            me.addClass(XMASKEDRELATIVE);
+	        }
+	        if((el = data(dom, 'maskMsg'))){
+	            el.remove();
+	        }
+	        if((el = data(dom, 'mask'))){
+	            el.remove();
+	        }
+	
+            mask = dh.append(dom, {cls : "ext-el-mask"}, true);
+	        data(dom, 'mask', mask);
+	
+	        me.addClass(XMASKED);
+	        mask.setDisplayed(true);
+	        if(typeof msg == 'string'){
+                var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
+                data(dom, 'maskMsg', mm);
+	            mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG;
+	            mm.dom.firstChild.innerHTML = msg;
+	            mm.setDisplayed(true);
+	            mm.center(me);
+	        }
+	        if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto'){ // ie will not expand full height automatically
+	            mask.setSize(undefined, me.getHeight());
+	        }
+	        return mask;
+	    },
+	
+	    /**
+	     * Removes a previously applied mask.
+	     */
+	    unmask : function(){
+		    var me = this,
+                dom = me.dom,
+		    	mask = data(dom, 'mask'),
+		    	maskMsg = data(dom, 'maskMsg');
+	        if(mask){
+	            if(maskMsg){
+	                maskMsg.remove();
+                    data(dom, 'maskMsg', undefined);
+	            }
+	            mask.remove();
+                data(dom, 'mask', undefined);
+	        }
+	        me.removeClass([XMASKED, XMASKEDRELATIVE]);
+	    },
+	
+	    /**
+	     * Returns true if this element is masked
+	     * @return {Boolean}
+	     */
+	    isMasked : function(){
+            var m = data(this.dom, 'mask');
+	        return m && m.isVisible();
+	    },
+	    
+	    /**
+	     * Creates an iframe shim for this element to keep selects and other windowed objects from
+	     * showing through.
+	     * @return {Ext.Element} The new shim element
+	     */
+	    createShim : function(){
+	        var el = document.createElement('iframe'),        	
+	        	shim;
+	        el.frameBorder = '0';
+	        el.className = 'ext-shim';
+	        if(Ext.isIE && Ext.isSecure){
+	            el.src = Ext.SSL_SECURE_URL;
+	        }
+	        shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
+	        shim.autoBoxAdjust = false;
+	        return shim;
+	    }
+    };
+}());/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Convenience method for constructing a KeyMap
+     * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
+     *                                  {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyListener : function(key, fn, scope){
+        var config;
+        if(!Ext.isObject(key) || 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);
+    },
+
+    /**
+     * Creates a KeyMap for this element
+     * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyMap : function(config){
+        return new Ext.KeyMap(this, config);
+    }
+});(function(){
+    // contants
+    var NULL = null,
+        UNDEFINED = undefined,
+        TRUE = true,
+        FALSE = false,
+        SETX = "setX",
+        SETY = "setY",
+        SETXY = "setXY",
+        LEFT = "left",
+        BOTTOM = "bottom",
+        TOP = "top",
+        RIGHT = "right",
+        HEIGHT = "height",
+        WIDTH = "width",
+        POINTS = "points",
+        HIDDEN = "hidden",
+        ABSOLUTE = "absolute",
+        VISIBLE = "visible",
+        MOTION = "motion",
+        POSITION = "position",
+        EASEOUT = "easeOut",
+        /*
+         * Use a light flyweight here since we are using so many callbacks and are always assured a DOM element
+         */
+        flyEl = new Ext.Element.Flyweight(),
+        queues = {},
+        getObject = function(o){
+            return o || {};
+        },
+        fly = function(dom){
+            flyEl.dom = dom;
+            flyEl.id = Ext.id(dom);
+            return flyEl;
+        },
+        /*
+         * Queueing now stored outside of the element due to closure issues
+         */
+        getQueue = function(id){
+            if(!queues[id]){
+                queues[id] = [];
+            }
+            return queues[id];
+        },
+        setQueue = function(id, value){
+            queues[id] = value;
+        };
+        
+//Notifies Element that fx methods are available
+Ext.enableFx = TRUE;
+
+/**
+ * @class Ext.Fx
+ * <p>A class to provide basic animation and visual effects support.  <b>Note:</b> This class is automatically applied
+ * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}.
+ * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx <b>must</b> be
+ * {@link Ext#enableFx included} in order for the Element effects to work.</p><br/>
+ * 
+ * <p><b><u>Method Chaining</u></b></p>
+ * <p>It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that
+ * they return the Element object itself as the method return value, it is not always possible to mix the two in a single
+ * method chain.  The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced.
+ * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately.  For this reason,
+ * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the
+ * expected results and should be done with care.  Also see <tt>{@link #callback}</tt>.</p><br/>
+ *
+ * <p><b><u>Anchor Options for Motion Effects</u></b></p>
+ * <p>Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element
+ * that will serve as either the start or end point of the animation.  Following are all of the supported anchor positions:</p>
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+ * <b>Note</b>: some Fx methods accept specific custom config parameters.  The options shown in the Config Options
+ * section below are common options that can be passed to any Fx method unless otherwise noted.</b>
+ * 
+ * @cfg {Function} callback A function called when the effect is finished.  Note that effects are queued internally by the
+ * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together
+ * and called in sequence (see note for <b><u>Method Chaining</u></b> above), for example:<pre><code>
+ * el.slideIn().highlight();
+ * </code></pre>
+ * The callback is intended for any additional code that should run once a particular effect has completed. The Element
+ * being operated upon is passed as the first parameter.
+ * 
+ * @cfg {Object} scope The scope of the <tt>{@link #callback}</tt> function
+ * 
+ * @cfg {String} easing A valid Ext.lib.Easing value for the effect:</p><div class="mdetail-params"><ul>
+ * <li><b><tt>backBoth</tt></b></li>
+ * <li><b><tt>backIn</tt></b></li>
+ * <li><b><tt>backOut</tt></b></li>
+ * <li><b><tt>bounceBoth</tt></b></li>
+ * <li><b><tt>bounceIn</tt></b></li>
+ * <li><b><tt>bounceOut</tt></b></li>
+ * <li><b><tt>easeBoth</tt></b></li>
+ * <li><b><tt>easeBothStrong</tt></b></li>
+ * <li><b><tt>easeIn</tt></b></li>
+ * <li><b><tt>easeInStrong</tt></b></li>
+ * <li><b><tt>easeNone</tt></b></li>
+ * <li><b><tt>easeOut</tt></b></li>
+ * <li><b><tt>easeOutStrong</tt></b></li>
+ * <li><b><tt>elasticBoth</tt></b></li>
+ * <li><b><tt>elasticIn</tt></b></li>
+ * <li><b><tt>elasticOut</tt></b></li>
+ * </ul></div>
+ *
+ * @cfg {String} afterCls A css class to apply after the effect
+ * @cfg {Number} duration The length of time (in seconds) that the effect should last
+ * 
+ * @cfg {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between
+ * <tt>0</tt> and <tt>1</tt> inclusive to configure the ending opacity value.
+ *  
+ * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes
+ * @cfg {Boolean} useDisplay Whether to use the <i>display</i> CSS property instead of <i>visibility</i> when hiding Elements (only applies to 
+ * effects that end with the element being visually hidden, ignored otherwise)
+ * @cfg {String/Object/Function} afterStyle A style specification string, e.g. <tt>"width:100px"</tt>, or an object
+ * in the form <tt>{width:"100px"}</tt>, or a function which returns such a specification that will be applied to the
+ * Element after the effect finishes.
+ * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs
+ * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence
+ * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects)
+ */
+Ext.Fx = {
+    
+    // private - calls the function taking arguments from the argHash based on the key.  Returns the return value of the function.
+    //           this is useful for replacing switch statements (for example).
+    switchStatements : function(key, fn, argHash){
+        return fn.apply(this, argHash[key]);
+    },
+    
+    /**
+     * Slides the element into view.  An anchor point can be optionally passed to set the point of
+     * origin for the slide effect.  This function automatically handles wrapping the element with
+     * a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element in from the top
+el.slideIn();
+
+// custom: slide the element in from the right with a 2-second duration
+el.slideIn('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideIn('t', {
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideIn : function(anchor, o){ 
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy,
+            r,
+            b,              
+            wrap,               
+            after,
+            st,
+            args, 
+            pt,
+            bw,
+            bh;
+            
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){            
+            xy = fly(dom).getXY();
+            // fix display to visibility
+            fly(dom).fixDisplay();            
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore();      
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+            
+            // fixed size for slide
+            fly(dom).setWidth(b.width).setHeight(b.height);            
+            
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, HIDDEN);
+            
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            
+            // clear out temp styles after slide and unwrap
+            function after(){
+                 fly(dom).fxUnwrap(wrap, r.pos, o);
+                 st.width = r.width;
+                 st.height = r.height;
+                 fly(dom).afterFx(o);
+            }
+            
+            // time to calculate the positions        
+            pt = {to: [b.x, b.y]}; 
+            bw = {to: b.width};
+            bh = {to: b.height};
+                
+            function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){                    
+                var ret = {};
+                fly(wrap).setWidth(ww).setHeight(wh);
+                if(fly(wrap)[sXY]){
+                    fly(wrap)[sXY](sXYval);                  
+                }
+                style[s1] = style[s2] = "0";                    
+                if(w){
+                    ret.width = w
+                };
+                if(h){
+                    ret.height = h;
+                }
+                if(p){
+                    ret.points = p;
+                }
+                return ret;
+            };
+
+            args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                    t  : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL],
+                    l  : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL],
+                    r  : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt],
+                    b  : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt],
+                    tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt],
+                    bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt],
+                    br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt],
+                    tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt]
+                });
+            
+            st.visibility = VISIBLE;
+            fly(wrap).show();
+
+            arguments.callee.anim = fly(wrap).fxanim(args,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+    
+    /**
+     * Slides the element out of view.  An anchor point can be optionally passed to set the end point
+     * for the slide effect.  When the effect is completed, the element will be hidden (visibility = 
+     * 'hidden') but block elements will still take up space in the document.  The element must be removed
+     * from the DOM using the 'remove' config option if desired.  This function automatically handles 
+     * wrapping the element with a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element out to the top
+el.slideOut();
+
+// custom: slide the element out to the right with a 2-second duration
+el.slideOut('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideOut('t', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideOut : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy = me.getXY(),
+            wrap,
+            r,
+            b,
+            a,
+            zero = {to: 0}; 
+                    
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore(); 
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+                
+            // fixed size for slide   
+            fly(dom).setWidth(b.width).setHeight(b.height);
+
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
+                
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            fly(wrap).setWidth(b.width).setHeight(b.height);            
+
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                
+                fly(dom).fxUnwrap(wrap, r.pos, o);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }            
+            
+            function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){                    
+                var ret = {};
+                
+                style[s1] = style[s2] = "0";
+                ret[p1] = v1;               
+                if(p2){
+                    ret[p2] = v2;               
+                }
+                if(p3){
+                    ret[p3] = v3;
+                }
+                
+                return ret;
+            };
+            
+            a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                t  : [st, LEFT, BOTTOM, HEIGHT, zero],
+                l  : [st, RIGHT, TOP, WIDTH, zero],
+                r  : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}],
+                b  : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero],
+                bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
+                tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
+            });
+            
+            arguments.callee.anim = fly(wrap).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+
+    /**
+     * Fades the element out while slowly expanding it in all directions.  When the effect is completed, the 
+     * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. 
+     * The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.puff();
+
+// common config options shown with default values
+el.puff({
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    puff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            width,
+            height,
+            r;
+
+        me.queueFx(o, function(){
+            width = fly(dom).getWidth();
+            height = fly(dom).getHeight();
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();                   
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                  
+                fly(dom).clearOpacity();  
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                st.fontSize = '';
+                fly(dom).afterFx(o);
+            }   
+
+            arguments.callee.anim = fly(dom).fxanim({
+                    width : {to : fly(dom).adjustWidth(width * 2)},
+                    height : {to : fly(dom).adjustHeight(height * 2)},
+                    points : {by : [-width * .5, -height * .5]},
+                    opacity : {to : 0},
+                    fontSize: {to : 200, unit: "%"}
+                },
+                o,
+                MOTION,
+                .5,
+                EASEOUT,
+                 after);
+        });
+        return me;
+    },
+
+    /**
+     * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
+     * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still 
+     * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.switchOff();
+
+// all config options shown with default values
+el.switchOff({
+    easing: 'easeIn',
+    duration: .3,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    switchOff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            r;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).clip();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+                
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();  
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;   
+                fly(dom).afterFx(o);
+            };
+
+            fly(dom).fxanim({opacity : {to : 0.3}}, 
+                NULL, 
+                NULL, 
+                .1, 
+                NULL, 
+                function(){                                 
+                    fly(dom).clearOpacity();
+                        (function(){                            
+                            fly(dom).fxanim({
+                                height : {to : 1},
+                                points : {by : [0, fly(dom).getHeight() * .5]}
+                            }, 
+                            o, 
+                            MOTION, 
+                            0.3, 
+                            'easeIn', 
+                            after);
+                        }).defer(100);
+                });
+        });
+        return me;
+    },
+
+    /**
+     * Highlights the Element by setting a color (applies to the background-color by default, but can be
+     * changed using the "attr" config option) and then fading back to the original color. If no original
+     * color is available, you should provide the "endColor" config option which will be cleared after the animation.
+     * Usage:
+<pre><code>
+// default: highlight background to yellow
+el.highlight();
+
+// custom: highlight foreground text to blue for 2 seconds
+el.highlight("0000ff", { attr: 'color', duration: 2 });
+
+// common config options shown with default values
+el.highlight("ffff9c", {
+    attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
+    endColor: (current color) or "ffffff",
+    easing: 'easeIn',
+    duration: 1
+});
+</code></pre>
+     * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */ 
+    highlight : function(color, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            attr = o.attr || "backgroundColor",
+            a = {},
+            restore;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            function after(){
+                dom.style[attr] = restore;
+                fly(dom).afterFx(o);
+            }            
+            restore = dom.style[attr];
+            a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"};
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                'color',
+                1,
+                'easeIn', 
+                after);
+        });
+        return me;
+    },
+
+   /**
+    * Shows a ripple of exploding, attenuating borders to draw attention to an Element.
+    * Usage:
+<pre><code>
+// default: a single light blue ripple
+el.frame();
+
+// custom: 3 red ripples lasting 3 seconds total
+el.frame("ff0000", 3, { duration: 3 });
+
+// common config options shown with default values
+el.frame("C3DAF9", 1, {
+    duration: 1 //duration of each individual ripple.
+    // Note: Easing is not configurable and will be ignored if included
+});
+</code></pre>
+    * @param {String} color (optional) The color of the border.  Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').
+    * @param {Number} count (optional) The number of ripples to display (defaults to 1)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    frame : function(color, count, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            proxy,
+            active;
+
+        me.queueFx(o, function(){
+            color = color || "#C3DAF9"
+            if(color.length == 6){
+                color = "#" + color;
+            }            
+            count = count || 1;
+            fly(dom).show();
+
+            var xy = fly(dom).getXY(),
+                b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight},
+                queue = function(){
+                    proxy = fly(document.body || document.documentElement).createChild({
+                        style:{
+                            visbility: HIDDEN,
+                            position : ABSOLUTE,
+                            "z-index": 35000, // yee haw
+                            border : "0px solid " + color
+                        }
+                    });
+                    return proxy.queueFx({}, animFn);
+                };
+            
+            
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function() {
+                    count = 0;
+                    proxy.stopFx();
+                }
+            };
+            
+            function animFn(){
+                var scale = Ext.isBorderBox ? 2 : 1;
+                active = proxy.anim({
+                    top : {from : b.y, to : b.y - 20},
+                    left : {from : b.x, to : b.x - 20},
+                    borderWidth : {from : 0, to : 10},
+                    opacity : {from : 1, to : 0},
+                    height : {from : b.height, to : b.height + 20 * scale},
+                    width : {from : b.width, to : b.width + 20 * scale}
+                },{
+                    duration: o.duration || 1,
+                    callback: function() {
+                        proxy.remove();
+                        --count > 0 ? queue() : fly(dom).afterFx(o);
+                    }
+                });
+                arguments.callee.anim = {
+                    isAnimated: true,
+                    stop: function(){
+                        active.stop();
+                    }
+                };
+            };
+            queue();
+        });
+        return me;
+    },
+
+   /**
+    * Creates a pause before any subsequent queued effects begin.  If there are
+    * no effects queued after the pause it will have no effect.
+    * Usage:
+<pre><code>
+el.pause(1);
+</code></pre>
+    * @param {Number} seconds The length of time to pause (in seconds)
+    * @return {Ext.Element} The Element
+    */
+    pause : function(seconds){        
+        var dom = this.dom,
+            t;
+
+        this.queueFx({}, function(){
+            t = setTimeout(function(){
+                fly(dom).afterFx({});
+            }, seconds * 1000);
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function(){
+                    clearTimeout(t);
+                    fly(dom).afterFx({});
+                }
+            };
+        });
+        return this;
+    },
+
+   /**
+    * Fade an element in (from transparent to opaque).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.
+    * Usage:
+<pre><code>
+// default: fade in from opacity 0 to 100%
+el.fadeIn();
+
+// custom: fade in from opacity 0 to 75% over 2 seconds
+el.fadeIn({ endOpacity: .75, duration: 2});
+
+// common config options shown with default values
+el.fadeIn({
+    endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeIn : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            to = o.endOpacity || 1;
+        
+        me.queueFx(o, function(){
+            fly(dom).setOpacity(0);
+            fly(dom).fixDisplay();
+            dom.style.visibility = VISIBLE;
+            arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}},
+                o, NULL, .5, EASEOUT, function(){
+                if(to == 1){
+                    fly(dom).clearOpacity();
+                }
+                fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Fade an element out (from opaque to transparent).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.  Note that IE may require
+    * <tt>{@link #useDisplay}:true</tt> in order to redisplay correctly.
+    * Usage:
+<pre><code>
+// default: fade out from the element's current opacity to 0
+el.fadeOut();
+
+// custom: fade out from the element's current opacity to 25% over 2 seconds
+el.fadeOut({ endOpacity: .25, duration: 2});
+
+// common config options shown with default values
+el.fadeOut({
+    endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeOut : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            style = dom.style,
+            to = o.endOpacity || 0;         
+        
+        me.queueFx(o, function(){  
+            arguments.callee.anim = fly(dom).fxanim({ 
+                opacity : {to : to}},
+                o, 
+                NULL, 
+                .5, 
+                EASEOUT, 
+                function(){
+                    if(to == 0){
+                        Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? 
+                            style.display = "none" :
+                            style.visibility = HIDDEN;
+                            
+                        fly(dom).clearOpacity();
+                    }
+                    fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Animates the transition of an element's dimensions from a starting height/width
+    * to an ending height/width.  This method is a convenience implementation of {@link shift}.
+    * Usage:
+<pre><code>
+// change height and width to 100x100 pixels
+el.scale(100, 100);
+
+// common config options shown with default values.  The height and width will default to
+// the element&#39;s existing values if passed as null.
+el.scale(
+    [element&#39;s width],
+    [element&#39;s height], {
+        easing: 'easeOut',
+        duration: .35
+    }
+);
+</code></pre>
+    * @param {Number} width  The new width (pass undefined to keep the original width)
+    * @param {Number} height  The new height (pass undefined to keep the original height)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    scale : function(w, h, o){
+        this.shift(Ext.apply({}, o, {
+            width: w,
+            height: h
+        }));
+        return this;
+    },
+
+   /**
+    * Animates the transition of any combination of an element's dimensions, xy position and/or opacity.
+    * Any of these properties not specified in the config object will not be changed.  This effect 
+    * requires that at least one new dimension, position or opacity setting must be passed in on
+    * the config object in order for the function to have any effect.
+    * Usage:
+<pre><code>
+// slide the element horizontally to x position 200 while changing the height and opacity
+el.shift({ x: 200, height: 50, opacity: .8 });
+
+// common config options shown with default values.
+el.shift({
+    width: [element&#39;s width],
+    height: [element&#39;s height],
+    x: [element&#39;s x position],
+    y: [element&#39;s y position],
+    opacity: [element&#39;s opacity],
+    easing: 'easeOut',
+    duration: .35
+});
+</code></pre>
+    * @param {Object} options  Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    shift : function(o){
+        o = getObject(o);
+        var dom = this.dom,
+            a = {};
+                
+        this.queueFx(o, function(){
+            for (var prop in o) {
+                if (o[prop] != UNDEFINED) {                                                 
+                    a[prop] = {to : o[prop]};                   
+                }
+            } 
+            
+            a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
+            a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;   
+            
+            if (a.x || a.y || a.xy) {
+                a.points = a.xy || 
+                           {to : [ a.x ? a.x.to : fly(dom).getX(),
+                                   a.y ? a.y.to : fly(dom).getY()]};                  
+            }
+
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o, 
+                MOTION, 
+                .35, 
+                EASEOUT, 
+                function(){
+                    fly(dom).afterFx(o);
+                });
+        });
+        return this;
+    },
+
+    /**
+     * Slides the element while fading it out of view.  An anchor point can be optionally passed to set the 
+     * ending point of the effect.
+     * Usage:
+     *<pre><code>
+// default: slide the element downward while fading out
+el.ghost();
+
+// custom: slide the element out to the right with a 2-second duration
+el.ghost('r', { duration: 2 });
+
+// common config options shown with default values
+el.ghost('b', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    ghost : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            a = {opacity: {to: 0}, points: {}},
+            pt = a.points,
+            r,
+            w,
+            h;
+            
+        anchor = anchor || "b";
+
+        me.queueFx(o, function(){
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+            w = fly(dom).getWidth();
+            h = fly(dom).getHeight();
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();   
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }
+                
+            pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, {
+               t  : [0, -h],
+               l  : [-w, 0],
+               r  : [w, 0],
+               b  : [0, h],
+               tl : [-w, -h],
+               bl : [-w, h],
+               br : [w, h],
+               tr : [w, -h] 
+            });
+                
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, after);
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after syncFx is called on the element are
+     * run concurrently.  This is the opposite of {@link #sequenceFx}.
+     * @return {Ext.Element} The Element
+     */
+    syncFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : TRUE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after sequenceFx is called on the element are
+     * run in sequence.  This is the opposite of {@link #syncFx}.
+     * @return {Ext.Element} The Element
+     */
+    sequenceFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : FALSE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /* @private */
+    nextFx : function(){        
+        var ef = getQueue(this.dom.id)[0];
+        if(ef){
+            ef.call(this);
+        }
+    },
+
+    /**
+     * Returns true if the element has any effects actively running or queued, else returns false.
+     * @return {Boolean} True if element has active effects, else false
+     */
+    hasActiveFx : function(){
+        return getQueue(this.dom.id)[0];
+    },
+
+    /**
+     * Stops any running effects and clears the element's internal effects queue if it contains
+     * any additional effects that haven't started yet.
+     * @return {Ext.Element} The Element
+     */
+    stopFx : function(finish){
+        var me = this,
+            id = me.dom.id;
+        if(me.hasActiveFx()){
+            var cur = getQueue(id)[0];
+            if(cur && cur.anim){
+                if(cur.anim.isAnimated){
+                    setQueue(id, [cur]); //clear
+                    cur.anim.stop(finish !== undefined ? finish : TRUE);
+                }else{
+                    setQueue(id, []);
+                }
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    beforeFx : function(o){
+        if(this.hasActiveFx() && !o.concurrent){
+           if(o.stopFx){
+               this.stopFx();
+               return TRUE;
+           }
+           return FALSE;
+        }
+        return TRUE;
+    },
+
+    /**
+     * Returns true if the element is currently blocking so that no other effect can be queued
+     * until this effect is finished, else returns false if blocking is not set.  This is commonly
+     * used to ensure that an effect initiated by a user action runs to completion prior to the
+     * same effect being restarted (e.g., firing only one effect even if the user clicks several times).
+     * @return {Boolean} True if blocking, else false
+     */
+    hasFxBlock : function(){
+        var q = getQueue(this.dom.id);
+        return q && q[0] && q[0].block;
+    },
+
+    /* @private */
+    queueFx : function(o, fn){
+        var me = this;
+        if(!me.hasFxBlock()){
+            Ext.applyIf(o, me.fxDefaults);
+            if(!o.concurrent){
+                var run = me.beforeFx(o);
+                fn.block = o.block;
+                getQueue(me.dom.id).push(fn);
+                if(run){
+                    me.nextFx();
+                }
+            }else{
+                fn.call(me);
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    fxWrap : function(pos, o, vis){ 
+        var dom = this.dom,
+            wrap,
+            wrapXY;
+        if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){            
+            if(o.fixPosition){
+                wrapXY = fly(dom).getXY();
+            }
+            var div = document.createElement("div");
+            div.style.visibility = vis;
+            wrap = dom.parentNode.insertBefore(div, dom);
+            fly(wrap).setPositioning(pos);
+            if(fly(wrap).isStyle(POSITION, "static")){
+                fly(wrap).position("relative");
+            }
+            fly(dom).clearPositioning('auto');
+            fly(wrap).clip();
+            wrap.appendChild(dom);
+            if(wrapXY){
+                fly(wrap).setXY(wrapXY);
+            }
+        }
+        return wrap;
+    },
+
+    /* @private */
+    fxUnwrap : function(wrap, pos, o){      
+        var dom = this.dom;
+        fly(dom).clearPositioning();
+        fly(dom).setPositioning(pos);
+        if(!o.wrap){
+            wrap.parentNode.insertBefore(dom, wrap);
+            fly(wrap).remove();
+        }
+    },
+
+    /* @private */
+    getFxRestore : function(){
+        var st = this.dom.style;
+        return {pos: this.getPositioning(), width: st.width, height : st.height};
+    },
+
+    /* @private */
+    afterFx : function(o){
+        var dom = this.dom,
+            id = dom.id,
+            notConcurrent = !o.concurrent;
+        if(o.afterStyle){
+            fly(dom).setStyle(o.afterStyle);            
+        }
+        if(o.afterCls){
+            fly(dom).addClass(o.afterCls);
+        }
+        if(o.remove == TRUE){
+            fly(dom).remove();
+        }
+        if(notConcurrent){
+            getQueue(id).shift();
+        }
+        if(o.callback){
+            o.callback.call(o.scope, fly(dom));
+        }
+        if(notConcurrent){
+            fly(dom).nextFx();
+        }
+    },
+
+    /* @private */
+    fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
+        animType = animType || 'run';
+        opt = opt || {};
+        var anim = Ext.lib.Anim[animType](
+                this.dom, 
+                args,
+                (opt.duration || defaultDur) || .35,
+                (opt.easing || defaultEase) || EASEOUT,
+                cb,            
+                this
+            );
+        opt.anim = anim;
+        return anim;
+    }
+};
+
+// backwards compat
+Ext.Fx.resize = Ext.Fx.scale;
+
+//When included, Ext.Fx is automatically applied to Element so that all basic
+//effects are available directly via the Element API
+Ext.Element.addMethods(Ext.Fx);
+})();/**
+ * @class Ext.CompositeElementLite
+ * Flyweight composite class. Reuses the same Ext.Element for element operations.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class");
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class');
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre><br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ */
+Ext.CompositeElementLite = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+    this.el = new Ext.Element.Flyweight();
+};
+
+Ext.CompositeElementLite.prototype = {
+	isComposite: true,	
+	/**
+     * Returns the number of elements in this composite
+     * @return Number
+     */
+    getCount : function(){
+        return this.elements.length;
+    },    
+	add : function(els){
+        if(els){
+            if (Ext.isArray(els)) {
+                this.elements = this.elements.concat(els);
+            } else {
+                var yels = this.elements;                	                
+	            Ext.each(els, function(e) {
+                    yels.push(e);
+                });
+            }
+        }
+        return this;
+    },
+    invoke : function(fn, args){
+        var els = this.elements,
+        	el = this.el;        
+	    Ext.each(els, function(e) {    
+            el.dom = e;
+        	Ext.Element.prototype[fn].apply(el, args);
+        });
+        return this;
+    },
+    /**
+     * Returns a flyweight Element of the dom element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+	    var me = this;
+        if(!me.elements[index]){
+            return null;
+        }
+        me.el.dom = me.elements[index];
+        return me.el;
+    },
+
+    // fixes scope with flyweight
+    addListener : function(eventName, handler, scope, opt){
+        Ext.each(this.elements, function(e) {
+	        Ext.EventManager.on(e, eventName, handler, scope || e, opt);
+        });
+        return this;
+    },
+    /**
+    * Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
+    * passed is the flyweight (shared) Ext.Element instance, so if you require a
+    * a reference to the dom node, use el.dom.</b>
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){       
+        var me = this,
+        	el = me.el;
+       
+	    Ext.each(me.elements, function(e,i) {    
+            el.dom = e;
+        	return fn.call(scope || el, el, me, i);
+        });
+        return me;
+    },
+    
+    /**
+     * Find the index of the passed element within the composite collection.
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found.
+     */
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.getDom(el));
+    },
+    
+    /**
+    * Replaces the specified element with the passed element.
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * to replace.
+    * @param {Mixed} replacement The id of an element or the Element itself.
+    * @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too.
+    * @return {CompositeElement} this
+    */    
+    replaceElement : function(el, replacement, domReplace){
+        var index = !isNaN(el) ? el : this.indexOf(el),
+        	d;
+        if(index > -1){
+            replacement = Ext.getDom(replacement);
+            if(domReplace){
+                d = this.elements[index];
+                d.parentNode.insertBefore(replacement, d);
+                Ext.removeNode(d);
+            }
+            this.elements.splice(index, 1, replacement);
+        }
+        return this;
+    },
+    
+    /**
+     * Removes all elements.
+     */
+    clear : function(){
+        this.elements = [];
+    }
+};
+
+Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener;
+
+(function(){
+var fnName,
+	ElProto = Ext.Element.prototype,
+	CelProto = Ext.CompositeElementLite.prototype;
+	
+for(fnName in ElProto){
+    if(Ext.isFunction(ElProto[fnName])){
+	    (function(fnName){ 
+		    CelProto[fnName] = CelProto[fnName] || function(){
+		    	return this.invoke(fnName, arguments);
+	    	};
+    	}).call(CelProto, fnName);
+        
+    }
+}
+})();
+
+if(Ext.DomQuery){
+    Ext.Element.selectorFunction = Ext.DomQuery.select;
+} 
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) <b>Not supported in core</b>
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+    return new Ext.CompositeElementLite(els);
+};
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext
+ * @method select
+ */
+Ext.select = Ext.Element.select;/**
+ * @class Ext.CompositeElementLite
+ */
+Ext.apply(Ext.CompositeElementLite.prototype, {	
+	addElements : function(els, root){
+        if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },
+    
+    /**
+    * Clears this composite and adds the elements returned by the passed selector.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    fill : function(els){
+        this.elements = [];
+        this.add(els);
+        return this;
+    },
+    
+    /**
+     * Returns the first Element
+     * @return {Ext.Element}
+     */
+    first : function(){
+        return this.item(0);
+    },   
+    
+    /**
+     * Returns the last Element
+     * @return {Ext.Element}
+     */
+    last : function(){
+        return this.item(this.getCount()-1);
+    },
+    
+    /**
+     * Returns true if this composite contains the passed element
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Boolean
+     */
+    contains : function(el){
+        return this.indexOf(el) != -1;
+    },
+
+    /**
+    * Filters this composite to only elements that match the passed selector.
+    * @param {String} selector A string CSS selector
+    * @return {CompositeElement} this
+    */
+    filter : function(selector){
+        var els = [];
+        this.each(function(el){
+            if(el.is(selector)){
+                els[els.length] = el.dom;
+            }
+        });
+        this.fill(els);
+        return this;
+    },
+    
+    /**
+    * Removes the specified element(s).
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * or an array of any of those.
+    * @param {Boolean} removeDom (optional) True to also remove the element from the document
+    * @return {CompositeElement} this
+    */
+    removeElement : function(keys, removeDom){
+        var me = this,
+	        els = this.elements,	    
+	    	el;	    	
+	    Ext.each(keys, function(val){
+		    if ((el = (els[val] || els[val = me.indexOf(val)]))) {
+		    	if(removeDom){
+                    if(el.dom){
+                        el.remove();
+                    }else{
+                        Ext.removeNode(el);
+                    }
+                }
+		    	els.splice(val, 1);		    	
+			}
+	    });
+        return this;
+    }    
+});
+/**
+ * @class Ext.CompositeElement
+ * @extends Ext.CompositeElementLite
+ * Standard composite class. Creates a Ext.Element for every element in the collection.
+ * <br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ * <br><br>
+ * All methods return <i>this</i> and can be chained.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class", true);
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class', true);
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre>
+ */
+Ext.CompositeElement = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+};
+
+Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, {
+    invoke : function(fn, args){
+	    Ext.each(this.elements, function(e) {
+        	Ext.Element.prototype[fn].apply(e, args);
+        });
+        return this;
+    },
+    
+    /**
+    * Adds elements to this composite.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    add : function(els, root){
+	    if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },    
+    
+    /**
+     * Returns the Element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+        return this.elements[index] || null;
+    },
+
+
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.get(el));
+    },
+        
+    filter : function(selector){
+		var me = this,
+			out = [];
+			
+		Ext.each(me.elements, function(el) {	
+			if(el.is(selector)){
+				out.push(Ext.get(el));
+			}
+		});
+		me.elements = out;
+		return me;
+	},
+	
+	/**
+    * Calls the passed function passing (el, this, index) for each element in this composite.
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){        
+        Ext.each(this.elements, function(e,i) {
+	        return fn.call(scope || e, e, this, i);
+        }, this);
+        return this;
+    }
+});
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+
+    return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els);
+};
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.select = Ext.Element.select;(function(){
+    var BEFOREREQUEST = "beforerequest",
+        REQUESTCOMPLETE = "requestcomplete",
+        REQUESTEXCEPTION = "requestexception",
+        UNDEFINED = undefined,
+        LOAD = 'load',
+        POST = 'POST',
+        GET = 'GET',
+        WINDOW = window;
+    
+    /**
+     * @class Ext.data.Connection
+     * @extends Ext.util.Observable
+     * <p>The class encapsulates a connection to the page's originating domain, allowing requests to be made
+     * either to a configured URL, or to a URL specified at request time.</p>
+     * <p>Requests made by this class are asynchronous, and will return immediately. No data from
+     * the server will be available to the statement immediately following the {@link #request} call.
+     * To process returned data, use a
+     * <a href="#request-option-success" ext:member="request-option-success" ext:cls="Ext.data.Connection">success callback</a>
+     * in the request options object,
+     * or an {@link #requestcomplete event listener}.</p>
+     * <p><h3>File Uploads</h3><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that
+     * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+     * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     * @constructor
+     * @param {Object} config a configuration object.
+     */
+    Ext.data.Connection = function(config){    
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event beforerequest
+             * Fires before a network request is made to retrieve a data object.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            BEFOREREQUEST,
+            /**
+             * @event requestcomplete
+             * Fires if the request was successfully completed.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTCOMPLETE,
+            /**
+             * @event requestexception
+             * Fires if an error HTTP status was returned from the server.
+             * See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP Status Code Definitions</a>
+             * for details of HTTP status codes.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTEXCEPTION
+        );
+        Ext.data.Connection.superclass.constructor.call(this);
+    };
+
+    // private
+    function handleResponse(response){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTCOMPLETE, this, response, options);
+        if(options.success){
+            options.success.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, true, response);
+        }
+    }
+
+    // private
+    function handleFailure(response, e){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTEXCEPTION, this, response, options, e);
+        if(options.failure){
+            options.failure.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, false, response);
+        }
+    }
+
+    // private
+    function doFormUpload(o, ps, url){
+        var id = Ext.id(),
+            doc = document,
+            frame = doc.createElement('iframe'),
+            form = Ext.getDom(o.form),
+            hiddens = [],
+            hd,
+            encoding = 'multipart/form-data',
+            buf = {
+                target: form.target,
+                method: form.method,
+                encoding: form.encoding,
+                enctype: form.enctype,
+                action: form.action
+            };
+            
+        Ext.apply(frame, {
+            id: id,
+            name: id,
+            className: 'x-hidden',
+            src: Ext.SSL_SECURE_URL // for IE
+        });     
+        doc.body.appendChild(frame);
+        
+        // This is required so that IE doesn't pop the response up in a new window.
+        if(Ext.isIE){
+           document.frames[id].name = id;
+        }
+        
+        Ext.apply(form, {
+            target: id,
+            method: POST,
+            enctype: encoding,
+            encoding: encoding,
+            action: url || buf.action
+        });
+        
+        // add dynamic params            
+        ps = Ext.urlDecode(ps, false);
+        for(var k in ps){
+            if(ps.hasOwnProperty(k)){
+                hd = doc.createElement('input');
+                hd.type = 'hidden';                    
+                hd.value = ps[hd.name = k];
+                form.appendChild(hd);
+                hiddens.push(hd);
+            }
+        }        
+
+        function cb(){
+            var me = this,
+                // bogus response object
+                r = {responseText : '',
+                     responseXML : null,
+                     argument : o.argument},
+                doc,
+                firstChild;
+
+            try{ 
+                doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document;
+                if(doc){
+                    if(doc.body){
+                        if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){ // json response wrapped in textarea                        
+                            r.responseText = firstChild.value;
+                        }else{
+                            r.responseText = doc.body.innerHTML;
+                        }
+                    }
+                    //in IE the document may still have a body even if returns XML.
+                    r.responseXML = doc.XMLDocument || doc;
+                }
+            }
+            catch(e) {}
+
+            Ext.EventManager.removeListener(frame, LOAD, cb, me);
+
+            me.fireEvent(REQUESTCOMPLETE, me, r, o);
+            
+            function runCallback(fn, scope, args){
+                if(Ext.isFunction(fn)){
+                    fn.apply(scope, args);
+                }
+            }
+
+            runCallback(o.success, o.scope, [r, o]);
+            runCallback(o.callback, o.scope, [o, true, r]);
+
+            if(!me.debugUploads){
+                setTimeout(function(){Ext.removeNode(frame);}, 100);
+            }
+        }
+
+        Ext.EventManager.on(frame, LOAD, cb, this);
+        form.submit();
+        
+        Ext.apply(form, buf);
+        Ext.each(hiddens, function(h) {
+            Ext.removeNode(h);
+        });
+    }
+
+    Ext.extend(Ext.data.Connection, Ext.util.Observable, {
+        /**
+         * @cfg {String} url (Optional) <p>The default URL to be used for requests to the server. Defaults to undefined.</p>
+         * <p>The <code>url</code> config may be a function which <i>returns</i> the URL to use for the Ajax request. The scope
+         * (<code><b>this</b></code> reference) of the function is the <code>scope</code> option passed to the {@link #request} method.</p>
+         */
+        /**
+         * @cfg {Object} extraParams (Optional) An object containing properties which are used as
+         * extra parameters to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added
+         *  to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {String} method (Optional) The default HTTP method to be used for requests.
+         * (defaults to undefined; if not set, but {@link #request} params are present, POST will be used;
+         * otherwise, GET will be used.)
+         */
+        /**
+         * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
+         */
+        timeout : 30000,
+        /**
+         * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false)
+         * @type Boolean
+         */
+        autoAbort:false,
+    
+        /**
+         * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
+         * @type Boolean
+         */
+        disableCaching: true,
+        
+        /**
+         * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching
+         * through a cache buster. Defaults to '_dc'
+         * @type String
+         */
+        disableCachingParam: '_dc',
+        
+        /**
+         * <p>Sends an HTTP request to a remote server.</p>
+         * <p><b>Important:</b> Ajax server requests are asynchronous, and this call will
+         * return before the response has been received. Process any returned data
+         * in a callback function.</p>
+         * <pre><code>
+Ext.Ajax.request({
+   url: 'ajax_demo/sample.json',
+   success: function(response, opts) {
+      var obj = Ext.decode(response.responseText);
+      console.dir(obj);
+   },
+   failure: function(response, opts) {
+      console.log('server-side failure with status code ' + response.status);
+   }
+});
+         * </code></pre>
+         * <p>To execute a callback function in the correct scope, use the <tt>scope</tt> option.</p>
+         * @param {Object} options An object which may contain the following properties:<ul>
+         * <li><b>url</b> : String/Function (Optional)<div class="sub-desc">The URL to
+         * which to send the request, or a function to call which returns a URL string. The scope of the
+         * function is specified by the <tt>scope</tt> option. Defaults to the configured
+         * <tt>{@link #url}</tt>.</div></li>
+         * <li><b>params</b> : Object/String/Function (Optional)<div class="sub-desc">
+         * An object containing properties which are used as parameters to the
+         * request, a url encoded string or a function to call to get either. The scope of the function
+         * is specified by the <tt>scope</tt> option.</div></li>
+         * <li><b>method</b> : String (Optional)<div class="sub-desc">The HTTP method to use
+         * for the request. Defaults to the configured method, or if no method was configured,
+         * "GET" if no parameters are being sent, and "POST" if parameters are being sent.  Note that
+         * the method name is case-sensitive and should be all caps.</div></li>
+         * <li><b>callback</b> : Function (Optional)<div class="sub-desc">The
+         * function to be called upon receipt of the HTTP response. The callback is
+         * called regardless of success or failure and is passed the following
+         * parameters:<ul>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * <li><b>success</b> : Boolean<div class="sub-desc">True if the request succeeded.</div></li>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data. 
+         * See <a href="http://www.w3.org/TR/XMLHttpRequest/">http://www.w3.org/TR/XMLHttpRequest/</a> for details about 
+         * accessing elements of the response.</div></li>
+         * </ul></div></li>
+         * <li><a id="request-option-success"></a><b>success</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon success of the request. The callback is passed the following
+         * parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>failure</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon failure of the request. The callback is passed the
+         * following parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>scope</b> : Object (Optional)<div class="sub-desc">The scope in
+         * which to execute the callbacks: The "this" object for the callback function. If the <tt>url</tt>, or <tt>params</tt> options were
+         * specified as functions from which to draw values, then this also serves as the scope for those function calls.
+         * Defaults to the browser window.</div></li>
+         * <li><b>timeout</b> : Number (Optional)<div class="sub-desc">The timeout in milliseconds to be used for this request. Defaults to 30 seconds.</div></li>
+         * <li><b>form</b> : Element/HTMLElement/String (Optional)<div class="sub-desc">The <tt>&lt;form&gt;</tt>
+         * Element or the id of the <tt>&lt;form&gt;</tt> to pull parameters from.</div></li>
+         * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc"><b>Only meaningful when used 
+         * with the <tt>form</tt> option</b>.
+         * <p>True if the form object is a file upload (will be set automatically if the form was
+         * configured with <b><tt>enctype</tt></b> "multipart/form-data").</p>
+         * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+         * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+         * DOM <tt>&lt;form></tt> element temporarily modified to have its
+         * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+         * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+         * but removed after the return data has been gathered.</p>
+         * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+         * server is using JSON to send the return object, then the
+         * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+         * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+         * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+         * is created containing a <tt>responseText</tt> property in order to conform to the
+         * requirements of event handlers and callbacks.</p>
+         * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+         * and some server technologies (notably JEE) may require some custom processing in order to
+         * retrieve parameter names and parameter values from the packet content.</p>
+         * </div></li>
+         * <li><b>headers</b> : Object (Optional)<div class="sub-desc">Request
+         * headers to set for the request.</div></li>
+         * <li><b>xmlData</b> : Object (Optional)<div class="sub-desc">XML document
+         * to use for the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>jsonData</b> : Object/String (Optional)<div class="sub-desc">JSON
+         * data to use as the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>disableCaching</b> : Boolean (Optional)<div class="sub-desc">True
+         * to add a unique cache-buster param to GET requests.</div></li>
+         * </ul></p>
+         * <p>The options object may also contain any other property which might be needed to perform
+         * postprocessing in a callback because it is passed to callback functions.</p>
+         * @return {Number} transactionId The id of the server transaction. This may be used
+         * to cancel the request.
+         */
+        request : function(o){
+            var me = this;
+            if(me.fireEvent(BEFOREREQUEST, me, o)){
+                if (o.el) {
+                    if(!Ext.isEmpty(o.indicatorText)){
+                        me.indicatorText = '<div class="loading-indicator">'+o.indicatorText+"</div>";
+                    }
+                    if(me.indicatorText) {
+                        Ext.getDom(o.el).innerHTML = me.indicatorText;                        
+                    }
+                    o.success = (Ext.isFunction(o.success) ? o.success : function(){}).createInterceptor(function(response) {
+                        Ext.getDom(o.el).innerHTML = response.responseText;
+                    });
+                }
+                
+                var p = o.params,
+                    url = o.url || me.url,                
+                    method,
+                    cb = {success: handleResponse,
+                          failure: handleFailure,
+                          scope: me,
+                          argument: {options: o},
+                          timeout : o.timeout || me.timeout
+                    },
+                    form,                    
+                    serForm;                    
+                  
+                     
+                if (Ext.isFunction(p)) {
+                    p = p.call(o.scope||WINDOW, o);
+                }
+                                                           
+                p = Ext.urlEncode(me.extraParams, Ext.isObject(p) ? Ext.urlEncode(p) : p);    
+                
+                if (Ext.isFunction(url)) {
+                    url = url.call(o.scope || WINDOW, o);
+                }
+    
+                if((form = Ext.getDom(o.form))){
+                    url = url || form.action;
+                     if(o.isUpload || /multipart\/form-data/i.test(form.getAttribute("enctype"))) { 
+                         return doFormUpload.call(me, o, p, url);
+                     }
+                    serForm = Ext.lib.Ajax.serializeForm(form);                    
+                    p = p ? (p + '&' + serForm) : serForm;
+                }
+                
+                method = o.method || me.method || ((p || o.xmlData || o.jsonData) ? POST : GET);
+                
+                if(method === GET && (me.disableCaching && o.disableCaching !== false) || o.disableCaching === true){
+                    var dcp = o.disableCachingParam || me.disableCachingParam;
+                    url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime()));
+                }
+                
+                o.headers = Ext.apply(o.headers || {}, me.defaultHeaders || {});
+                
+                if(o.autoAbort === true || me.autoAbort) {
+                    me.abort();
+                }
+                 
+                if((method == GET || o.xmlData || o.jsonData) && p){
+                    url = Ext.urlAppend(url, p);  
+                    p = '';
+                }
+                return (me.transId = Ext.lib.Ajax.request(method, url, cb, p, o));
+            }else{                
+                return o.callback ? o.callback.apply(o.scope, [o,UNDEFINED,UNDEFINED]) : null;
+            }
+        },
+    
+        /**
+         * Determine whether this object has a request outstanding.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         * @return {Boolean} True if there is an outstanding request.
+         */
+        isLoading : function(transId){
+            return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId;            
+        },
+    
+        /**
+         * Aborts any outstanding request.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         */
+        abort : function(transId){
+            if(transId || this.isLoading()){
+                Ext.lib.Ajax.abort(transId || this.transId);
+            }
+        }
+    });
+})();
+
+/**
+ * @class Ext.Ajax
+ * @extends Ext.data.Connection
+ * <p>The global Ajax request class that provides a simple way to make Ajax requests
+ * with maximum flexibility.</p>
+ * <p>Since Ext.Ajax is a singleton, you can set common properties/events for it once
+ * and override them at the request function level only if necessary.</p>
+ * <p>Common <b>Properties</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #method}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #extraParams}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #url}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Default headers to pass in every request
+Ext.Ajax.defaultHeaders = {
+    'Powered-By': 'Ext'
+};
+ * </code></pre> 
+ * </p>
+ * <p>Common <b>Events</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.data.Connection#beforerequest beforerequest}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestcomplete requestcomplete}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestexception requestexception}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Example: show a spinner during all Ajax requests
+Ext.Ajax.on('beforerequest', this.showSpinner, this);
+Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
+Ext.Ajax.on('requestexception', this.hideSpinner, this);
+ * </code></pre> 
+ * </p>
+ * <p>An example request:</p>
+ * <pre><code>
+// Basic request
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+   url: 'foo.php',
+   success: someFn,
+   failure: otherFn,
+   headers: {
+       'my-header': 'foo'
+   },
+   params: { foo: 'bar' }
+});
+
+// Simple ajax form submission
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+    form: 'some-form',
+    params: 'foo=bar'
+});
+ * </code></pre> 
+ * </p>
+ * @singleton
+ */
+Ext.Ajax = new Ext.data.Connection({
+    /**
+     * @cfg {String} url @hide
+     */
+    /**
+     * @cfg {Object} extraParams @hide
+     */
+    /**
+     * @cfg {Object} defaultHeaders @hide
+     */
+    /**
+     * @cfg {String} method (Optional) @hide
+     */
+    /**
+     * @cfg {Number} timeout (Optional) @hide
+     */
+    /**
+     * @cfg {Boolean} autoAbort (Optional) @hide
+     */
+
+    /**
+     * @cfg {Boolean} disableCaching (Optional) @hide
+     */
+
+    /**
+     * @property  disableCaching
+     * True to add a unique cache-buster param to GET requests. (defaults to true)
+     * @type Boolean
+     */
+    /**
+     * @property  url
+     * The default URL to be used for requests to the server. (defaults to undefined)
+     * If the server receives all requests through one URL, setting this once is easier than
+     * entering it on every request.
+     * @type String
+     */
+    /**
+     * @property  extraParams
+     * An object containing properties which are used as extra parameters to each request made
+     * by this object (defaults to undefined). Session information and other data that you need
+     * to pass with each request are commonly put here.
+     * @type Object
+     */
+    /**
+     * @property  defaultHeaders
+     * An object containing request headers which are added to each request made by this object
+     * (defaults to undefined).
+     * @type Object
+     */
+    /**
+     * @property  method
+     * The default HTTP method to be used for requests. Note that this is case-sensitive and
+     * should be all caps (defaults to undefined; if not set but params are present will use
+     * <tt>"POST"</tt>, otherwise will use <tt>"GET"</tt>.)
+     * @type String
+     */
+    /**
+     * @property  timeout
+     * The timeout in milliseconds to be used for requests. (defaults to 30000)
+     * @type Number
+     */
+
+    /**
+     * @property  autoAbort
+     * Whether a new request should abort any pending requests. (defaults to false)
+     * @type Boolean
+     */
+    autoAbort : false,
+
+    /**
+     * Serialize the passed form into a url encoded string
+     * @param {String/HTMLElement} form
+     * @return {String}
+     */
+    serializeForm : function(form){
+        return Ext.lib.Ajax.serializeForm(form);
+    }
+});
+/**
+ * @class Ext.Updater
+ * @extends Ext.util.Observable
+ * Provides AJAX-style update capabilities for Element objects.  Updater can be used to {@link #update}
+ * an {@link Ext.Element} once, or you can use {@link #startAutoRefresh} to set up an auto-updating
+ * {@link Ext.Element Element} on a specific interval.<br><br>
+ * Usage:<br>
+ * <pre><code>
+ * var el = Ext.get("foo"); // Get Ext.Element object
+ * var mgr = el.getUpdater();
+ * mgr.update({
+        url: "http://myserver.com/index.php",
+        params: {
+            param1: "foo",
+            param2: "bar"
+        }
+ * });
+ * ...
+ * mgr.formUpdate("myFormId", "http://myserver.com/index.php");
+ * <br>
+ * // or directly (returns the same Updater instance)
+ * var mgr = new Ext.Updater("myElementId");
+ * mgr.startAutoRefresh(60, "http://myserver.com/index.php");
+ * mgr.on("update", myFcnNeedsToKnow);
+ * <br>
+ * // short handed call directly from the element object
+ * Ext.get("foo").load({
+        url: "bar.php",
+        scripts: true,
+        params: "param1=foo&amp;param2=bar",
+        text: "Loading Foo..."
+ * });
+ * </code></pre>
+ * @constructor
+ * Create new Updater directly.
+ * @param {Mixed} el The element to update
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already
+ * has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).
+ */
+Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, 
+function() {
+	var BEFOREUPDATE = "beforeupdate",
+		UPDATE = "update",
+		FAILURE = "failure";
+		
+	// private
+    function processSuccess(response){	    
+	    var me = this;
+        me.transaction = null;
+        if (response.argument.form && response.argument.reset) {
+            try { // put in try/catch since some older FF releases had problems with this
+                response.argument.form.reset();
+            } catch(e){}
+        }
+        if (me.loadScripts) {
+            me.renderer.render(me.el, response, me,
+               updateComplete.createDelegate(me, [response]));
+        } else {
+            me.renderer.render(me.el, response, me);
+            updateComplete.call(me, response);
+        }
+    }
+    
+    // private
+    function updateComplete(response, type, success){
+        this.fireEvent(type || UPDATE, this.el, response);
+        if(Ext.isFunction(response.argument.callback)){
+            response.argument.callback.call(response.argument.scope, this.el, Ext.isEmpty(success) ? true : false, response, response.argument.options);
+        }
+    }
+
+    // private
+    function processFailure(response){	            
+        updateComplete.call(this, response, FAILURE, !!(this.transaction = null));
+    }
+	    
+	return {
+	    constructor: function(el, forceNew){
+		    var me = this;
+	        el = Ext.get(el);
+	        if(!forceNew && el.updateManager){
+	            return el.updateManager;
+	        }
+	        /**
+	         * The Element object
+	         * @type Ext.Element
+	         */
+	        me.el = el;
+	        /**
+	         * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.
+	         * @type String
+	         */
+	        me.defaultUrl = null;
+	
+	        me.addEvents(
+	            /**
+	             * @event beforeupdate
+	             * Fired before an update is made, return false from your handler and the update is cancelled.
+	             * @param {Ext.Element} el
+	             * @param {String/Object/Function} url
+	             * @param {String/Object} params
+	             */
+	            BEFOREUPDATE,
+	            /**
+	             * @event update
+	             * Fired after successful update is made.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            UPDATE,
+	            /**
+	             * @event failure
+	             * Fired on update failure.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            FAILURE
+	        );
+	
+	        Ext.apply(me, Ext.Updater.defaults);
+	        /**
+	         * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}).
+	         * @property sslBlankUrl
+	         * @type String
+	         */
+	        /**
+	         * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}).
+	         * @property disableCaching
+	         * @type Boolean
+	         */
+	        /**
+	         * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}).
+	         * @property indicatorText
+	         * @type String
+	         */
+	        /**
+	         * Whether to show indicatorText when loading (defaults to {@link Ext.Updater.defaults#showLoadIndicator}).
+	         * @property showLoadIndicator
+	         * @type String
+	         */
+	        /**
+	         * Timeout for requests or form posts in seconds (defaults to {@link Ext.Updater.defaults#timeout}).
+	         * @property timeout
+	         * @type Number
+	         */
+	        /**
+	         * True to process scripts in the output (defaults to {@link Ext.Updater.defaults#loadScripts}).
+	         * @property loadScripts
+	         * @type Boolean
+	         */
+	
+	        /**
+	         * Transaction object of the current executing transaction, or null if there is no active transaction.
+	         */
+	        me.transaction = null;
+	        /**
+	         * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.refreshDelegate = me.refresh.createDelegate(me);
+	        /**
+	         * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.updateDelegate = me.update.createDelegate(me);
+	        /**
+	         * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me);	
+	        
+			/**
+			 * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}).
+			 */
+	        me.renderer = me.renderer || me.getDefaultRenderer();
+	        
+	        Ext.Updater.superclass.constructor.call(me);
+	    },
+        
+		/**
+	     * Sets the content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @param {Object} renderer The object implementing the render() method
+	     */
+	    setRenderer : function(renderer){
+	        this.renderer = renderer;
+	    },	
+        
+	    /**
+	     * Returns the current content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @return {Object}
+	     */
+	    getRenderer : function(){
+	       return this.renderer;
+	    },
+
+	    /**
+	     * This is an overrideable method which returns a reference to a default
+	     * renderer class if none is specified when creating the Ext.Updater.
+	     * Defaults to {@link Ext.Updater.BasicRenderer}
+	     */
+	    getDefaultRenderer: function() {
+	        return new Ext.Updater.BasicRenderer();
+	    },
+                
+	    /**
+	     * Sets the default URL used for updates.
+	     * @param {String/Function} defaultUrl The url or a function to call to get the url
+	     */
+	    setDefaultUrl : function(defaultUrl){
+	        this.defaultUrl = defaultUrl;
+	    },
+        
+	    /**
+	     * Get the Element this Updater is bound to
+	     * @return {Ext.Element} The element
+	     */
+	    getEl : function(){
+	        return this.el;
+	    },
+	
+		/**
+	     * Performs an <b>asynchronous</b> request, updating this element with the response.
+	     * If params are specified it uses POST, otherwise it uses GET.<br><br>
+	     * <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element
+	     * will not have been fully updated when the function returns. To post-process the returned
+	     * data, use the callback option, or an <b><tt>update</tt></b> event handler.
+	     * @param {Object} options A config object containing any of the following options:<ul>
+	     * <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which
+	     * <i>returns</i> the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).</p></li>
+	     * <li>method : <b>String</b><p class="sub-desc">The HTTP method to
+	     * use. Defaults to POST if the <tt>params</tt> argument is present, otherwise GET.</p></li>
+	     * <li>params : <b>String/Object/Function</b><p class="sub-desc">The
+	     * parameters to pass to the server (defaults to none). These may be specified as a url-encoded
+	     * string, or as an object containing properties which represent parameters,
+	     * or as a function, which returns such an object.</p></li>
+	     * <li>scripts : <b>Boolean</b><p class="sub-desc">If <tt>true</tt>
+	     * any &lt;script&gt; tags embedded in the response text will be extracted
+	     * and executed (defaults to {@link Ext.Updater.defaults#loadScripts}). If this option is specified,
+	     * the callback will be called <i>after</i> the execution of the scripts.</p></li>
+	     * <li>callback : <b>Function</b><p class="sub-desc">A function to
+	     * be called when the response from the server arrives. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
+	     * <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
+	     * </p></li>
+	     * <li>scope : <b>Object</b><p class="sub-desc">The scope in which
+	     * to execute the callback (The callback's <tt>this</tt> reference.) If the
+	     * <tt>params</tt> argument is a function, this scope is used for that function also.</p></li>
+	     * <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes
+	     * the default URL for this Updater object, and will be subsequently used in {@link #refresh}
+	     * calls.  To bypass this behavior, pass <tt>discardUrl:true</tt> (defaults to false).</p></li>
+	     * <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before
+	     * timing out (defaults to {@link Ext.Updater.defaults#timeout}).</p></li>
+	     * <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the
+	     * {@link Ext.Updater.defaults#indicatorText} div (defaults to 'Loading...').  To replace the entire div, not
+	     * just the text, override {@link Ext.Updater.defaults#indicatorText} directly.</p></li>
+	     * <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
+	     * requests, this option causes an extra, auto-generated parameter to be appended to the request
+	     * to defeat caching (defaults to {@link Ext.Updater.defaults#disableCaching}).</p></li></ul>
+	     * <p>
+	     * For example:
+	<pre><code>
+	um.update({
+	    url: "your-url.php",
+	    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+	    callback: yourFunction,
+	    scope: yourObject, //(optional scope)
+	    discardUrl: true,
+	    nocache: true,
+	    text: "Loading...",
+	    timeout: 60,
+	    scripts: false // Save time by avoiding RegExp execution.
+	});
+	</code></pre>
+	     */
+	    update : function(url, params, callback, discardUrl){
+		    var me = this,
+		    	cfg, 
+		    	callerScope;
+		    	
+	        if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){	            
+	            if(Ext.isObject(url)){ // must be config object
+	                cfg = url;
+	                url = cfg.url;
+	                params = params || cfg.params;
+	                callback = callback || cfg.callback;
+	                discardUrl = discardUrl || cfg.discardUrl;
+	                callerScope = cfg.scope;	                
+	                if(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;};
+	                if(!Ext.isEmpty(cfg.text)){me.indicatorText = '<div class="loading-indicator">'+cfg.text+"</div>";};
+	                if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;};
+	                if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;};
+	            }
+	            me.showLoading();
+	
+	            if(!discardUrl){
+	                me.defaultUrl = url;
+	            }
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	
+	            var o = Ext.apply({}, {
+	                url : url,
+	                params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                callback: undefined,
+	                timeout: (me.timeout*1000),
+	                disableCaching: me.disableCaching,
+	                argument: {
+	                    "options": cfg,
+	                    "url": url,
+	                    "form": null,
+	                    "callback": callback,
+	                    "scope": callerScope || window,
+	                    "params": params
+	                }
+	            }, cfg);
+	
+	            me.transaction = Ext.Ajax.request(o);
+	        }
+	    },	    	
+
+		/**
+	     * <p>Performs an async form post, updating this element with the response. If the form has the attribute
+	     * enctype="<a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>", it assumes it's a file upload.
+	     * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.</p>
+	     * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+	     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+	     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+	     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+	     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+	     * but removed after the return data has been gathered.</p>
+	     * <p>Be aware that file upload packets, sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>
+	     * and some server technologies (notably JEE) may require some custom processing in order to
+	     * retrieve parameter names and parameter values from the packet content.</p>
+	     * @param {String/HTMLElement} form The form Id or form element
+	     * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used.
+	     * @param {Boolean} reset (optional) Whether to try to reset the form after the update
+	     * @param {Function} callback (optional) Callback when transaction is complete. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul>
+	     */
+	    formUpdate : function(form, url, reset, callback){
+		    var me = this;
+	        if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	            form = Ext.getDom(form)
+	            me.transaction = Ext.Ajax.request({
+	                form: form,
+	                url:url,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                timeout: (me.timeout*1000),
+	                argument: {
+	                    "url": url,
+	                    "form": form,
+	                    "callback": callback,
+	                    "reset": reset
+	                }
+	            });
+	            me.showLoading.defer(1, me);
+	        }
+	    },
+                	
+	    /**
+	     * Set this element to auto refresh.  Can be canceled by calling {@link #stopAutoRefresh}.
+	     * @param {Number} interval How often to update (in seconds).
+	     * @param {String/Object/Function} url (optional) The url for this request, a config object in the same format
+	     * supported by {@link #load}, or a function to call to get the url (defaults to the last used url).  Note that while
+	     * the url used in a load call can be reused by this method, other load config options will not be reused and must be
+	     * sepcified as part of a config object passed as this paramter if needed.
+	     * @param {String/Object} params (optional) The parameters to pass as either a url encoded string
+	     * "&param1=1&param2=2" or as an object {param1: 1, param2: 2}
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval
+	     */
+	    startAutoRefresh : function(interval, url, params, callback, refreshNow){
+		    var me = this;
+	        if(refreshNow){
+	            me.update(url || me.defaultUrl, params, callback, true);
+	        }
+	        if(me.autoRefreshProcId){
+	            clearInterval(me.autoRefreshProcId);
+	        }
+	        me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000);
+	    },
+	
+	    /**
+	     * Stop auto refresh on this element.
+	     */
+	    stopAutoRefresh : function(){
+	        if(this.autoRefreshProcId){
+	            clearInterval(this.autoRefreshProcId);
+	            delete this.autoRefreshProcId;
+	        }
+	    },
+	
+	    /**
+	     * Returns true if the Updater is currently set to auto refresh its content (see {@link #startAutoRefresh}), otherwise false.
+	     */
+	    isAutoRefreshing : function(){
+	       return !!this.autoRefreshProcId;
+	    },
+	
+	    /**
+	     * Display the element's "loading" state. By default, the element is updated with {@link #indicatorText}. This
+	     * method may be overridden to perform a custom action while this Updater is actively updating its contents.
+	     */
+	    showLoading : function(){
+	        if(this.showLoadIndicator){
+            	this.el.dom.innerHTML = this.indicatorText;
+	        }
+	    },
+	
+	    /**
+	     * Aborts the currently executing transaction, if any.
+	     */
+	    abort : function(){
+	        if(this.transaction){
+	            Ext.Ajax.abort(this.transaction);
+	        }
+	    },
+	
+	    /**
+	     * Returns true if an update is in progress, otherwise false.
+	     * @return {Boolean}
+	     */
+	    isUpdating : function(){        
+	    	return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false;        
+	    },
+	    
+	    /**
+	     * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     */
+	    refresh : function(callback){
+	        if(this.defaultUrl){
+	        	this.update(this.defaultUrl, null, callback, true);
+	    	}
+	    }
+    }
+}());
+
+/**
+ * @class Ext.Updater.defaults
+ * The defaults collection enables customizing the default properties of Updater
+ */
+Ext.Updater.defaults = {
+   /**
+     * Timeout for requests or form posts in seconds (defaults to 30 seconds).
+     * @type Number
+     */
+    timeout : 30,    
+    /**
+     * True to append a unique parameter to GET requests to disable caching (defaults to false).
+     * @type Boolean
+     */
+    disableCaching : false,
+    /**
+     * Whether or not to show {@link #indicatorText} during loading (defaults to true).
+     * @type Boolean
+     */
+    showLoadIndicator : true,
+    /**
+     * Text for loading indicator (defaults to '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').
+     * @type String
+     */
+    indicatorText : '<div class="loading-indicator">Loading...</div>',
+     /**
+     * True to process scripts by default (defaults to false).
+     * @type Boolean
+     */
+    loadScripts : false,
+    /**
+    * Blank page URL to use with SSL file uploads (defaults to {@link Ext#SSL_SECURE_URL} if set, or "javascript:false").
+    * @type String
+    */
+    sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false")      
+};
+
+
+/**
+ * Static convenience method. <b>This method is deprecated in favor of el.load({url:'foo.php', ...})</b>.
+ * Usage:
+ * <pre><code>Ext.Updater.updateElement("my-div", "stuff.php");</code></pre>
+ * @param {Mixed} el The element to update
+ * @param {String} url The url
+ * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs
+ * @param {Object} options (optional) A config object with any of the Updater properties you want to set - for
+ * example: {disableCaching:true, indicatorText: "Loading data..."}
+ * @static
+ * @deprecated
+ * @member Ext.Updater
+ */
+Ext.Updater.updateElement = function(el, url, params, options){
+    var um = Ext.get(el).getUpdater();
+    Ext.apply(um, options);
+    um.update(url, params, options ? options.callback : null);
+};
+
+/**
+ * @class Ext.Updater.BasicRenderer
+ * Default Content renderer. Updates the elements innerHTML with the responseText.
+ */
+Ext.Updater.BasicRenderer = function(){};
+
+Ext.Updater.BasicRenderer.prototype = {
+    /**
+     * This is called when the transaction is completed and it's time to update the element - The BasicRenderer
+     * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing),
+     * create an object with a "render(el, response)" method and pass it to setRenderer on the Updater.
+     * @param {Ext.Element} el The element being rendered
+     * @param {Object} response The XMLHttpRequest object
+     * @param {Updater} updateManager The calling update manager
+     * @param {Function} callback A callback that will need to be called if loadScripts is true on the Updater
+     */
+     render : function(el, response, updateManager, callback){	     
+        el.update(response.responseText, updateManager.loadScripts, callback);
+    }
+};/**
+ * @class Date
+ *
+ * The date parsing and formatting syntax contains a subset of
+ * <a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are
+ * supported will provide results equivalent to their PHP versions.
+ *
+ * The following is a list of all currently supported formats:
+ * <pre>
+Format  Description                                                               Example returned values
+------  -----------------------------------------------------------------------   -----------------------
+  d     Day of the month, 2 digits with leading zeros                             01 to 31
+  D     A short textual representation of the day of the week                     Mon to Sun
+  j     Day of the month without leading zeros                                    1 to 31
+  l     A full textual representation of the day of the week                      Sunday to Saturday
+  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
+  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
+  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
+  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
+  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
+  F     A full textual representation of a month, such as January or March        January to December
+  m     Numeric representation of a month, with leading zeros                     01 to 12
+  M     A short textual representation of a month                                 Jan to Dec
+  n     Numeric representation of a month, without leading zeros                  1 to 12
+  t     Number of days in the given month                                         28 to 31
+  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
+  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
+        belongs to the previous or next year, that year is used instead)
+  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
+  y     A two digit representation of a year                                      Examples: 99 or 03
+  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
+  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
+  g     12-hour format of an hour without leading zeros                           1 to 12
+  G     24-hour format of an hour without leading zeros                           0 to 23
+  h     12-hour format of an hour with leading zeros                              01 to 12
+  H     24-hour format of an hour with leading zeros                              00 to 23
+  i     Minutes, with leading zeros                                               00 to 59
+  s     Seconds, with leading zeros                                               00 to 59
+  u     Decimal fraction of a second                                              Examples:
+        (minimum 1 digit, arbitrary number of digits allowed)                     001 (i.e. 0.001s) or
+                                                                                  100 (i.e. 0.100s) or
+                                                                                  999 (i.e. 0.999s) or
+                                                                                  999876543210 (i.e. 0.999876543210s)
+  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
+  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
+  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
+  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
+  c     ISO 8601 date
+        Notes:                                                                    Examples:
+        1) If unspecified, the month / day defaults to the current month / day,   1991 or
+           the time defaults to midnight, while the timezone defaults to the      1992-10 or
+           browser's timezone. If a time is specified, it must include both hours 1993-09-20 or
+           and minutes. The "T" delimiter, seconds, milliseconds and timezone     1994-08-19T16:20+01:00 or
+           are optional.                                                          1995-07-18T17:21:28-02:00 or
+        2) The decimal fraction of a second, if specified, must contain at        1996-06-17T18:22:29.98765+03:00 or
+           least 1 digit (there is no limit to the maximum number                 1997-05-16T19:23:30,12345-0400 or
+           of digits allowed), and may be delimited by either a '.' or a ','      1998-04-15T20:24:31.2468Z or
+        Refer to the examples on the right for the various levels of              1999-03-14T20:24:32Z or
+        date-time granularity which are supported, or see                         2000-02-13T21:25:33
+        http://www.w3.org/TR/NOTE-datetime for more info.                         2001-01-12 22:26:34
+  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
+  M$    Microsoft AJAX serialized dates                                           \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
+                                                                                  \/Date(1238606590509+0800)\/
+</pre>
+ *
+ * Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
+ * <pre><code>
+// Sample date:
+// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
+
+var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
+document.write(dt.format('Y-m-d'));                           // 2007-01-10
+document.write(dt.format('F j, Y, g:i a'));                   // January 10, 2007, 3:05 pm
+document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
+</code></pre>
+ *
+ * Here are some standard date/time patterns that you might find helpful.  They
+ * are not part of the source of Date.js, but to use them you can simply copy this
+ * block of code into any script that is included after Date.js and they will also become
+ * globally available on the Date object.  Feel free to add or remove patterns as needed in your code.
+ * <pre><code>
+Date.patterns = {
+    ISO8601Long:"Y-m-d H:i:s",
+    ISO8601Short:"Y-m-d",
+    ShortDate: "n/j/Y",
+    LongDate: "l, F d, Y",
+    FullDateTime: "l, F d, Y g:i:s A",
+    MonthDay: "F d",
+    ShortTime: "g:i A",
+    LongTime: "g:i:s A",
+    SortableDateTime: "Y-m-d\\TH:i:s",
+    UniversalSortableDateTime: "Y-m-d H:i:sO",
+    YearMonth: "F, Y"
+};
+</code></pre>
+ *
+ * Example usage:
+ * <pre><code>
+var dt = new Date();
+document.write(dt.format(Date.patterns.ShortDate));
+</code></pre>
+ * <p>Developer-written, custom formats may be used by supplying both a formatting and a parsing function
+ * which perform to specialized requirements. The functions are stored in {@link #parseFunctions} and {@link #formatFunctions}.</p>
+ */
+
+/*
+ * Most of the date-formatting functions below are the excellent work of Baron Schwartz.
+ * (see http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/)
+ * They generate precompiled functions from format patterns instead of parsing and
+ * processing each pattern every time a date is formatted. These functions are available
+ * on every Date object.
+ */
+
+(function() {
+
+/**
+ * Global flag which determines if strict date parsing should be used.
+ * Strict date parsing will not roll-over invalid dates, which is the
+ * default behaviour of javascript Date objects.
+ * (see {@link #parseDate} for more information)
+ * Defaults to <tt>false</tt>.
+ * @static
+ * @type Boolean
+*/
+Date.useStrict = false;
+
+
+// create private copy of Ext's String.format() method
+// - to remove unnecessary dependency
+// - to resolve namespace conflict with M$-Ajax's implementation
+function xf(format) {
+    var args = Array.prototype.slice.call(arguments, 1);
+    return format.replace(/\{(\d+)\}/g, function(m, i) {
+        return args[i];
+    });
+}
+
+
+// private
+Date.formatCodeToRegex = function(character, currentGroup) {
+    // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below)
+    var p = Date.parseCodes[character];
+
+    if (p) {
+      p = typeof p == 'function'? p() : p;
+      Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
+    }
+
+    return p? Ext.applyIf({
+      c: p.c? xf(p.c, currentGroup || "{0}") : p.c
+    }, p) : {
+        g:0,
+        c:null,
+        s:Ext.escapeRe(character) // treat unrecognised characters as literals
+    }
+}
+
+// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
+var $f = Date.formatCodeToRegex;
+
+Ext.apply(Date, {
+    /**
+     * <p>An object hash in which each property is a date parsing function. The property name is the
+     * format string which that function parses.</p>
+     * <p>This object is automatically populated with date parsing functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom parsing functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #parseDate}.<p>
+     * <p>Example:</p><pre><code>
+Date.parseFunctions['x-date-format'] = myDateParser;
+</code></pre>
+     * <p>A parsing function should return a Date object, and is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : String<div class="sub-desc">The date string to parse.</div></li>
+     * <li><code>strict</code> : Boolean<div class="sub-desc">True to validate date strings while parsing
+     * (i.e. prevent javascript Date "rollover") (The default must be false).
+     * Invalid date strings should return null when parsed.</div></li>
+     * </ul></div></p>
+     * <p>To enable Dates to also be <i>formatted</i> according to that format, a corresponding
+     * formatting function must be placed into the {@link #formatFunctions} property.
+     * @property parseFunctions
+     * @static
+     * @type Object
+     */
+    parseFunctions: {
+        "M$": function(input, strict) {
+            // note: the timezone offset is ignored since the M$ Ajax server sends
+            // a UTC milliseconds-since-Unix-epoch value (negative values are allowed)
+            var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/');
+            var r = (input || '').match(re);
+            return r? new Date(((r[1] || '') + r[2]) * 1) : null;
+        }
+    },
+    parseRegexes: [],
+
+    /**
+     * <p>An object hash in which each property is a date formatting function. The property name is the
+     * format string which corresponds to the produced formatted date string.</p>
+     * <p>This object is automatically populated with date formatting functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom formatting functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #format}. Example:</p><pre><code>
+Date.formatFunctions['x-date-format'] = myDateFormatter;
+</code></pre>
+     * <p>A formatting function should return a string repesentation of the passed Date object:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : Date<div class="sub-desc">The Date to format.</div></li>
+     * </ul></div></p>
+     * <p>To enable date strings to also be <i>parsed</i> according to that format, a corresponding
+     * parsing function must be placed into the {@link #parseFunctions} property.
+     * @property formatFunctions
+     * @static
+     * @type Object
+     */
+    formatFunctions: {
+        "M$": function() {
+            // UTC milliseconds since Unix epoch (M$-AJAX serialized date format (MRSF))
+            return '\\/Date(' + this.getTime() + ')\\/';
+        }
+    },
+
+    y2kYear : 50,
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MILLI : "ms",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    SECOND : "s",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MINUTE : "mi",
+
+    /** Date interval constant
+     * @static
+     * @type String
+     */
+    HOUR : "h",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    DAY : "d",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MONTH : "mo",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    YEAR : "y",
+
+    /**
+     * <p>An object hash containing default date values used during date parsing.</p>
+     * <p>The following properties are available:<div class="mdetail-params"><ul>
+     * <li><code>y</code> : Number<div class="sub-desc">The default year value. (defaults to undefined)</div></li>
+     * <li><code>m</code> : Number<div class="sub-desc">The default 1-based month value. (defaults to undefined)</div></li>
+     * <li><code>d</code> : Number<div class="sub-desc">The default day value. (defaults to undefined)</div></li>
+     * <li><code>h</code> : Number<div class="sub-desc">The default hour value. (defaults to undefined)</div></li>
+     * <li><code>i</code> : Number<div class="sub-desc">The default minute value. (defaults to undefined)</div></li>
+     * <li><code>s</code> : Number<div class="sub-desc">The default second value. (defaults to undefined)</div></li>
+     * <li><code>ms</code> : Number<div class="sub-desc">The default millisecond value. (defaults to undefined)</div></li>
+     * </ul></div></p>
+     * <p>Override these properties to customize the default date values used by the {@link #parseDate} method.</p>
+     * <p><b>Note: In countries which experience Daylight Saving Time (i.e. DST), the <tt>h</tt>, <tt>i</tt>, <tt>s</tt>
+     * and <tt>ms</tt> properties may coincide with the exact time in which DST takes effect.
+     * It is the responsiblity of the developer to account for this.</b></p>
+     * Example Usage:
+     * <pre><code>
+// set default day value to the first day of the month
+Date.defaults.d = 1;
+
+// parse a February date string containing only year and month values.
+// setting the default day value to 1 prevents weird date rollover issues
+// when attempting to parse the following date string on, for example, March 31st 2009.
+Date.parseDate('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
+</code></pre>
+     * @property defaults
+     * @static
+     * @type Object
+     */
+    defaults: {},
+
+    /**
+     * An array of textual day names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.dayNames = [
+    'SundayInYourLang',
+    'MondayInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    dayNames : [
+        "Sunday",
+        "Monday",
+        "Tuesday",
+        "Wednesday",
+        "Thursday",
+        "Friday",
+        "Saturday"
+    ],
+
+    /**
+     * An array of textual month names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNames = [
+    'JanInYourLang',
+    'FebInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    monthNames : [
+        "January",
+        "February",
+        "March",
+        "April",
+        "May",
+        "June",
+        "July",
+        "August",
+        "September",
+        "October",
+        "November",
+        "December"
+    ],
+
+    /**
+     * An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive).
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNumbers = {
+    'ShortJanNameInYourLang':0,
+    'ShortFebNameInYourLang':1,
+    ...
+};
+</code></pre>
+     * @type Object
+     * @static
+     */
+    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
+    },
+
+    /**
+     * Get the short month name for the given month number.
+     * Override this function for international dates.
+     * @param {Number} month A zero-based javascript month number.
+     * @return {String} The short month name.
+     * @static
+     */
+    getShortMonthName : function(month) {
+        return Date.monthNames[month].substring(0, 3);
+    },
+
+    /**
+     * Get the short day name for the given day number.
+     * Override this function for international dates.
+     * @param {Number} day A zero-based javascript day number.
+     * @return {String} The short day name.
+     * @static
+     */
+    getShortDayName : function(day) {
+        return Date.dayNames[day].substring(0, 3);
+    },
+
+    /**
+     * Get the zero-based javascript month number for the given short/full month name.
+     * Override this function for international dates.
+     * @param {String} name The short/full month name.
+     * @return {Number} The zero-based javascript month number.
+     * @static
+     */
+    getMonthNumber : function(name) {
+        // handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive)
+        return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+    },
+
+    /**
+     * The base format-code to formatting-function hashmap used by the {@link #format} method.
+     * Formatting functions are strings (or functions which return strings) which
+     * will return the appropriate value when evaluated in the context of the Date object
+     * from which the {@link #format} method is called.
+     * Add to / override these mappings for custom date formatting.
+     * Note: Date.format() treats characters as literals if an appropriate mapping cannot be found.
+     * Example:
+     * <pre><code>
+Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')";
+(new Date()).format("X"); // returns the current day of the month
+</code></pre>
+     * @type Object
+     * @static
+     */
+    formatCodes : {
+        d: "String.leftPad(this.getDate(), 2, '0')",
+        D: "Date.getShortDayName(this.getDay())", // get localised short day name
+        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())", // get localised short month name
+        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() { // ISO-8601 -- GMT format
+            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)); // treat T as a character literal
+            }
+            return code.join(" + ");
+        },
+        /*
+        c: function() { // ISO-8601 -- UTC format
+            return [
+              "this.getUTCFullYear()", "'-'",
+              "String.leftPad(this.getUTCMonth() + 1, 2, '0')", "'-'",
+              "String.leftPad(this.getUTCDate(), 2, '0')",
+              "'T'",
+              "String.leftPad(this.getUTCHours(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCMinutes(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCSeconds(), 2, '0')",
+              "'Z'"
+            ].join(" + ");
+        },
+        */
+
+        U: "Math.round(this.getTime() / 1000)"
+    },
+
+    /**
+     * Checks if the passed Date parameters will cause a javascript Date "rollover".
+     * @param {Number} year 4-digit year
+     * @param {Number} month 1-based month-of-year
+     * @param {Number} day Day of month
+     * @param {Number} hour (optional) Hour
+     * @param {Number} minute (optional) Minute
+     * @param {Number} second (optional) Second
+     * @param {Number} millisecond (optional) Millisecond
+     * @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise.
+     * @static
+     */
+    isValid : function(y, m, d, h, i, s, ms) {
+        // setup defaults
+        h = h || 0;
+        i = i || 0;
+        s = s || 0;
+        ms = ms || 0;
+
+        var dt = new Date(y, m - 1, d, h, i, s, ms);
+
+        return y == dt.getFullYear() &&
+            m == dt.getMonth() + 1 &&
+            d == dt.getDate() &&
+            h == dt.getHours() &&
+            i == dt.getMinutes() &&
+            s == dt.getSeconds() &&
+            ms == dt.getMilliseconds();
+    },
+
+    /**
+     * Parses the passed string using the specified date format.
+     * Note that this function expects normal calendar dates, meaning that months are 1-based (i.e. 1 = January).
+     * The {@link #defaults} hash will be used for any date value (i.e. year, month, day, hour, minute, second or millisecond)
+     * which cannot be found in the passed string. If a corresponding default date value has not been specified in the {@link #defaults} hash,
+     * the current date's year, month, day or DST-adjusted zero-hour time value will be used instead.
+     * Keep in mind that the input date string must precisely match the specified format string
+     * in order for the parse operation to be successful (failed parse operations return a null value).
+     * <p>Example:</p><pre><code>
+//dt = Fri May 25 2007 (current date)
+var dt = new Date();
+
+//dt = Thu May 25 2006 (today&#39;s month/day in 2006)
+dt = Date.parseDate("2006", "Y");
+
+//dt = Sun Jan 15 2006 (all date parts specified)
+dt = Date.parseDate("2006-01-15", "Y-m-d");
+
+//dt = Sun Jan 15 2006 15:20:01
+dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d g:i:s A");
+
+// attempt to parse Sun Feb 29 2006 03:20:01 in strict mode
+dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
+</code></pre>
+     * @param {String} input The raw date string.
+     * @param {String} format The expected date string format.
+     * @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover")
+                        (defaults to false). Invalid date strings will return null when parsed.
+     * @return {Date} The parsed Date.
+     * @static
+     */
+    parseDate : function(input, format, strict) {
+        var p = Date.parseFunctions;
+        if (p[format] == null) {
+            Date.createParser(format);
+        }
+        return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict);
+    },
+
+    // private
+    getFormatCode : function(character) {
+        var f = Date.formatCodes[character];
+
+        if (f) {
+          f = typeof f == 'function'? f() : f;
+          Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
+        }
+
+        // note: unknown characters are treated as literals
+        return f || ("'" + String.escape(character) + "'");
+    },
+
+    // private
+    createFormat : function(format) {
+        var code = [],
+            special = false,
+            ch = '';
+
+        for (var i = 0; i < format.length; ++i) {
+            ch = format.charAt(i);
+            if (!special && ch == "\\") {
+                special = true;
+            } else if (special) {
+                special = false;
+                code.push("'" + String.escape(ch) + "'");
+            } else {
+                code.push(Date.getFormatCode(ch))
+            }
+        }
+        Date.formatFunctions[format] = new Function("return " + code.join('+'));
+    },
+
+    // private
+    createParser : function() {
+        var code = [
+            "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
+                "def = Date.defaults,",
+                "results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings
+
+            "if(results){",
+                "{1}",
+
+                "if(u != null){", // i.e. unix time is defined
+                    "v = new Date(u * 1000);", // give top priority to UNIX time
+                "}else{",
+                    // create Date object representing midnight of the current day;
+                    // this will provide us with our date defaults
+                    // (note: clearTime() handles Daylight Saving Time automatically)
+                    "dt = (new Date()).clearTime();",
+
+                    // date calculations (note: these calculations create a dependency on Ext.num())
+                    "y = y >= 0? y : Ext.num(def.y, dt.getFullYear());",
+                    "m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());",
+                    "d = d >= 0? d : Ext.num(def.d, dt.getDate());",
+
+                    // time calculations (note: these calculations create a dependency on Ext.num())
+                    "h  = h || Ext.num(def.h, dt.getHours());",
+                    "i  = i || Ext.num(def.i, dt.getMinutes());",
+                    "s  = s || Ext.num(def.s, dt.getSeconds());",
+                    "ms = ms || Ext.num(def.ms, dt.getMilliseconds());",
+
+                    "if(z >= 0 && y >= 0){",
+                        // both the year and zero-based day of year are defined and >= 0.
+                        // these 2 values alone provide sufficient info to create a full date object
+
+                        // create Date object representing January 1st for the given year
+                        "v = new Date(y, 0, 1, h, i, s, ms);",
+
+                        // then add day of year, checking for Date "rollover" if necessary
+                        "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);",
+                    "}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", // check for Date "rollover"
+                        "v = null;", // invalid date, so return null
+                    "}else{",
+                        // plain old Date object
+                        "v = new Date(y, m, d, h, i, s, ms);",
+                    "}",
+                "}",
+            "}",
+
+            "if(v){",
+                // favour UTC offset over GMT offset
+                "if(zz != null){",
+                    // reset to UTC, then add offset
+                    "v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);",
+                "}else if(o){",
+                    // reset to GMT, then add offset
+                    "v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));",
+                "}",
+            "}",
+
+            "return v;"
+        ].join('\n');
+
+        return function(format) {
+            var regexNum = Date.parseRegexes.length,
+                currentGroup = 1,
+                calc = [],
+                regex = [],
+                special = false,
+                ch = "";
+
+            for (var i = 0; i < format.length; ++i) {
+                ch = format.charAt(i);
+                if (!special && ch == "\\") {
+                    special = true;
+                } else if (special) {
+                    special = false;
+                    regex.push(String.escape(ch));
+                } else {
+                    var obj = $f(ch, currentGroup);
+                    currentGroup += obj.g;
+                    regex.push(obj.s);
+                    if (obj.g && obj.c) {
+                        calc.push(obj.c);
+                    }
+                }
+            }
+
+            Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", "i");
+            Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join('')));
+        }
+    }(),
+
+    // private
+    parseCodes : {
+        /*
+         * Notes:
+         * g = {Number} calculation group (0 or 1. only group 1 contributes to date calculations.)
+         * c = {String} calculation method (required for group 1. null for group 0. {0} = currentGroup - position in regex result array)
+         * s = {String} regex pattern. all matches are stored in results[], and are accessible by the calculation mapped to 'c'
+         */
+        d: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // day of month with leading zeroes (01 - 31)
+        },
+        j: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // day of month without leading zeroes (1 - 31)
+        },
+        D: function() {
+            for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get localised short day names
+            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]" // ISO-8601 day number (1 (monday) - 7 (sunday))
+        },
+        S: {
+            g:0,
+            c:null,
+            s:"(?:st|nd|rd|th)"
+        },
+        w: {
+            g:0,
+            c:null,
+            s:"[0-6]" // javascript day number (0 (sunday) - 6 (saturday))
+        },
+        z: {
+            g:1,
+            c:"z = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,3})" // day of the year (0 - 364 (365 in leap years))
+        },
+        W: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // ISO-8601 week number (with leading zero)
+        },
+        F: function() {
+            return {
+                g:1,
+                c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number
+                s:"(" + Date.monthNames.join("|") + ")"
+            }
+        },
+        M: function() {
+            for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names
+            return Ext.applyIf({
+                s:"(" + a.join("|") + ")"
+            }, $f("F"));
+        },
+        m: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{2})" // month number with leading zeros (01 - 12)
+        },
+        n: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{1,2})" // month number without leading zeros (1 - 12)
+        },
+        t: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // no. of days in the month (28 - 31)
+        },
+        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})" // 4-digit year
+        },
+        y: {
+            g:1,
+            c:"var ty = parseInt(results[{0}], 10);\n"
+                + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year
+            s:"(\\d{1,2})"
+        },
+        a: {
+            g:1,
+            c:"if (results[{0}] == 'am') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(am|pm)"
+        },
+        A: {
+            g:1,
+            c:"if (results[{0}] == 'AM') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(AM|PM)"
+        },
+        g: function() {
+            return $f("G");
+        },
+        G: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // 24-hr format of an hour without leading zeroes (0 - 23)
+        },
+        h: function() {
+            return $f("H");
+        },
+        H: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" //  24-hr format of an hour with leading zeroes (00 - 23)
+        },
+        i: {
+            g:1,
+            c:"i = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // minutes with leading zeros (00 - 59)
+        },
+        s: {
+            g:1,
+            c:"s = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // seconds with leading zeros (00 - 59)
+        },
+        u: {
+            g:1,
+            c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
+            s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+        },
+        O: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(3,5) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{4})" // GMT offset in hrs and mins
+        },
+        P: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(4,6) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{2}:\\d{2})" // GMT offset in hrs and mins (with colon separator)
+        },
+        T: {
+            g:0,
+            c:null,
+            s:"[A-Z]{1,4}" // timezone abbrev. may be between 1 - 4 chars
+        },
+        Z: {
+            g:1,
+            c:"zz = results[{0}] * 1;\n" // -43200 <= UTC offset <= 50400
+                  + "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",
+            s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset
+        },
+        c: function() {
+            var calc = [],
+                arr = [
+                    $f("Y", 1), // year
+                    $f("m", 2), // month
+                    $f("d", 3), // day
+                    $f("h", 4), // hour
+                    $f("i", 5), // minute
+                    $f("s", 6), // second
+                    {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+                    {c:[ // allow either "Z" (i.e. UTC) or "-0530" or "+08:00" (i.e. UTC offset) timezone delimiters. assumes local timezone if no timezone is specified
+                        "if(results[8]) {", // timezone specified
+                            "if(results[8] == 'Z'){",
+                                "zz = 0;", // UTC
+                            "}else if (results[8].indexOf(':') > -1){",
+                                $f("P", 8).c, // timezone offset with colon separator
+                            "}else{",
+                                $f("O", 8).c, // timezone offset without colon separator
+                            "}",
+                        "}"
+                    ].join('\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, // year (required)
+                    "(?:", "-", arr[1].s, // month (optional)
+                        "(?:", "-", arr[2].s, // day (optional)
+                            "(?:",
+                                "(?:T| )?", // time delimiter -- either a "T" or a single blank space
+                                arr[3].s, ":", arr[4].s,  // hour AND minute, delimited by a single colon (optional). MUST be preceded by either a "T" or a single blank space
+                                "(?::", arr[5].s, ")?", // seconds (optional)
+                                "(?:(?:\\.|,)(\\d+))?", // decimal fraction of a second (e.g. ",12345" or ".98765") (optional)
+                                "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", // "Z" (UTC) or "-0530" (UTC offset without colon delimiter) or "+08:00" (UTC offset with colon delimiter) (optional)
+                            ")?",
+                        ")?",
+                    ")?"
+                ].join("")
+            }
+        },
+        U: {
+            g:1,
+            c:"u = parseInt(results[{0}], 10);\n",
+            s:"(-?\\d+)" // leading minus sign indicates seconds before UNIX epoch
+        }
+    }
+});
+
+}());
+
+Ext.apply(Date.prototype, {
+    // private
+    dateFormat : function(format) {
+        if (Date.formatFunctions[format] == null) {
+            Date.createFormat(format);
+        }
+        return Date.formatFunctions[format].call(this);
+    },
+
+    /**
+     * Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
+     *
+     * Note: The date string returned by the javascript Date object's toString() method varies
+     * between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
+     * For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
+     * getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
+     * (which may or may not be present), failing which it proceeds to get the timezone abbreviation
+     * from the GMT offset portion of the date string.
+     * @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).
+     */
+    getTimezone : function() {
+        // the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale:
+        //
+        // Opera  : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot
+        // Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF)
+        // FF     : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone
+        // IE     : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev
+        // IE     : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev
+        //
+        // this crazy regex attempts to guess the correct timezone abbreviation despite these differences.
+        // step 1: (?:\((.*)\) -- find timezone in parentheses
+        // step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string
+        // step 3: remove all non uppercase characters found in step 1 and 2
+        return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "");
+    },
+
+    /**
+     * Get the offset from GMT of the current date (equivalent to the format specifier 'O').
+     * @param {Boolean} colon (optional) true to separate the hours and minutes with a colon (defaults to false).
+     * @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600').
+     */
+    getGMTOffset : function(colon) {
+        return (this.getTimezoneOffset() > 0 ? "-" : "+")
+            + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0")
+            + (colon ? ":" : "")
+            + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0");
+    },
+
+    /**
+     * Get the numeric day number of the year, adjusted for leap year.
+     * @return {Number} 0 to 364 (365 in leap years).
+     */
+    getDayOfYear: function() {
+        var i = 0,
+            num = 0,
+            d = this.clone(),
+            m = this.getMonth();
+
+        for (i = 0, d.setMonth(0); i < m; d.setMonth(++i)) {
+            num += d.getDaysInMonth();
+        }
+        return num + this.getDate() - 1;
+    },
+
+    /**
+     * Get the numeric ISO-8601 week number of the year.
+     * (equivalent to the format specifier 'W', but without a leading zero).
+     * @return {Number} 1 to 53
+     */
+    getWeekOfYear : function() {
+        // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
+        var ms1d = 864e5, // milliseconds in a day
+            ms7d = 7 * ms1d; // milliseconds in a week
+
+        return function() { // return a closure so constants get calculated only once
+            var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number
+                AWN = Math.floor(DC3 / 7), // an Absolute Week Number
+                Wyr = new Date(AWN * ms7d).getUTCFullYear();
+
+            return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
+        }
+    }(),
+
+    /**
+     * Checks if the current date falls within a leap year.
+     * @return {Boolean} True if the current date falls within a leap year, false otherwise.
+     */
+    isLeapYear : function() {
+        var year = this.getFullYear();
+        return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
+    },
+
+    /**
+     * Get the first day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getFirstDayOfMonth : function() {
+        var day = (this.getDay() - (this.getDate() - 1)) % 7;
+        return (day < 0) ? (day + 7) : day;
+    },
+
+    /**
+     * Get the last day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getLastDayOfMonth : function() {
+        return this.getLastDateOfMonth().getDay();
+    },
+
+
+    /**
+     * Get the date of the first day of the month in which this date resides.
+     * @return {Date}
+     */
+    getFirstDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), 1);
+    },
+
+    /**
+     * Get the date of the last day of the month in which this date resides.
+     * @return {Date}
+     */
+    getLastDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth());
+    },
+
+    /**
+     * Get the number of days in the current month, adjusted for leap year.
+     * @return {Number} The number of days in the month.
+     */
+    getDaysInMonth: function() {
+        var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+
+        return function() { // return a closure for efficiency
+            var m = this.getMonth();
+
+            return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m];
+        }
+    }(),
+
+    /**
+     * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
+     * @return {String} 'st, 'nd', 'rd' or 'th'.
+     */
+    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";
+        }
+    },
+
+    /**
+     * Creates and returns a new Date instance with the exact same date value as the called instance.
+     * Dates are copied and passed by reference, so if a copied date variable is modified later, the original
+     * variable will also be changed.  When the intention is to create a new variable that will not
+     * modify the original instance, you should create a clone.
+     *
+     * Example of correctly cloning a date:
+     * <pre><code>
+//wrong way:
+var orig = new Date('10/1/2006');
+var copy = orig;
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 05 2006'!
+
+//correct way:
+var orig = new Date('10/1/2006');
+var copy = orig.clone();
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 01 2006'
+</code></pre>
+     * @return {Date} The new Date instance.
+     */
+    clone : function() {
+        return new Date(this.getTime());
+    },
+
+    /**
+     * Checks if the current date is affected by Daylight Saving Time (DST).
+     * @return {Boolean} True if the current date is affected by DST.
+     */
+    isDST : function() {
+        // adapted from http://extjs.com/forum/showthread.php?p=247172#post247172
+        // courtesy of @geoffrey.mcgill
+        return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset();
+    },
+
+    /**
+     * Attempts to clear all time information from this Date by setting the time to midnight of the same day,
+     * automatically adjusting for Daylight Saving Time (DST) where applicable.
+     * (note: DST timezone information for the browser's host operating system is assumed to be up-to-date)
+     * @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false).
+     * @return {Date} this or the clone.
+     */
+    clearTime : function(clone) {
+        if (clone) {
+            return this.clone().clearTime();
+        }
+
+        // get current date before clearing time
+        var d = this.getDate();
+
+        // clear time
+        this.setHours(0);
+        this.setMinutes(0);
+        this.setSeconds(0);
+        this.setMilliseconds(0);
+
+        if (this.getDate() != d) { // account for DST (i.e. day of month changed when setting hour = 0)
+            // note: DST adjustments are assumed to occur in multiples of 1 hour (this is almost always the case)
+            // refer to http://www.timeanddate.com/time/aboutdst.html for the (rare) exceptions to this rule
+
+            // increment hour until cloned date == current date
+            for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr));
+
+            this.setDate(d);
+            this.setHours(c.getHours());
+        }
+
+        return this;
+    },
+
+    /**
+     * Provides a convenient method for performing basic date arithmetic. This method
+     * does not modify the Date instance being called - it creates and returns
+     * a new Date instance containing the resulting date value.
+     *
+     * Examples:
+     * <pre><code>
+// Basic usage:
+var dt = new Date('10/29/2006').add(Date.DAY, 5);
+document.write(dt); //returns 'Fri Nov 03 2006 00:00:00'
+
+// Negative values will be subtracted:
+var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
+document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
+
+// You can even chain several calls together in one line:
+var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
+document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
+</code></pre>
+     *
+     * @param {String} interval A valid date interval enum value.
+     * @param {Number} value The amount to add to the current date.
+     * @return {Date} The new Date instance.
+     */
+    add : function(interval, value) {
+        var d = this.clone();
+        if (!interval || value === 0) return d;
+
+        switch(interval.toLowerCase()) {
+            case Date.MILLI:
+                d.setMilliseconds(this.getMilliseconds() + value);
+                break;
+            case Date.SECOND:
+                d.setSeconds(this.getSeconds() + value);
+                break;
+            case Date.MINUTE:
+                d.setMinutes(this.getMinutes() + value);
+                break;
+            case Date.HOUR:
+                d.setHours(this.getHours() + value);
+                break;
+            case Date.DAY:
+                d.setDate(this.getDate() + value);
+                break;
+            case Date.MONTH:
+                var day = this.getDate();
+                if (day > 28) {
+                    day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate());
+                }
+                d.setDate(day);
+                d.setMonth(this.getMonth() + value);
+                break;
+            case Date.YEAR:
+                d.setFullYear(this.getFullYear() + value);
+                break;
+        }
+        return d;
+    },
+
+    /**
+     * Checks if this date falls on or between the given start and end dates.
+     * @param {Date} start Start date
+     * @param {Date} end End date
+     * @return {Boolean} true if this date falls on or between the given start and end dates.
+     */
+    between : function(start, end) {
+        var t = this.getTime();
+        return start.getTime() <= t && t <= end.getTime();
+    }
+});
+
+
+/**
+ * Formats a date given the supplied format string.
+ * @param {String} format The format string.
+ * @return {String} The formatted date.
+ * @method format
+ */
+Date.prototype.format = Date.prototype.dateFormat;
+
+
+// private
+if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) {
+    Ext.apply(Date.prototype, {
+        _xMonth : Date.prototype.setMonth,
+        _xDate  : Date.prototype.setDate,
+
+        // Bug in Safari 1.3, 2.0 (WebKit build < 420)
+        // Date.setMonth does not work consistently if iMonth is not 0-11
+        setMonth : function(num) {
+            if (num <= -1) {
+                var n = Math.ceil(-num),
+                    back_year = Math.ceil(n / 12),
+                    month = (n % 12) ? 12 - n % 12 : 0;
+
+                this.setFullYear(this.getFullYear() - back_year);
+
+                return this._xMonth(month);
+            } else {
+                return this._xMonth(num);
+            }
+        },
+
+        // Bug in setDate() method (resolved in WebKit build 419.3, so to be safe we target Webkit builds < 420)
+        // The parameter for Date.setDate() is converted to a signed byte integer in Safari
+        // http://brianary.blogspot.com/2006/03/safari-date-bug.html
+        setDate : function(d) {
+            // use setTime() to workaround setDate() bug
+            // subtract current day of month in milliseconds, then add desired day of month in milliseconds
+            return this.setTime(this.getTime() - (this.getDate() - d) * 864e5);
+        }
+    });
+}
+
+
+
+/* Some basic Date tests... (requires Firebug)
+
+Date.parseDate('', 'c'); // call Date.parseDate() once to force computation of regex string so we can console.log() it
+console.log('Insane Regex for "c" format: %o', Date.parseCodes.c.s); // view the insane regex for the "c" format specifier
+
+// standard tests
+console.group('Standard Date.parseDate() Tests');
+    console.log('Date.parseDate("2009-01-05T11:38:56", "c")               = %o', Date.parseDate("2009-01-05T11:38:56", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-02-04T12:37:55.001000", "c")        = %o', Date.parseDate("2009-02-04T12:37:55.001000", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-03-03T13:36:54,101000Z", "c")       = %o', Date.parseDate("2009-03-03T13:36:54,101000Z", "c")); // UTC
+    console.log('Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")   = %o', Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")); // GMT-0530
+    console.log('Date.parseDate("2009-05-01T15:34:52,9876000+08:00", "c") = %o', Date.parseDate("2009-05-01T15:34:52,987600+08:00", "c")); // GMT+08:00
+console.groupEnd();
+
+// ISO-8601 format as specified in http://www.w3.org/TR/NOTE-datetime
+// -- accepts ALL 6 levels of date-time granularity
+console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime)');
+    console.log('Date.parseDate("1997", "c")                              = %o', Date.parseDate("1997", "c")); // YYYY (e.g. 1997)
+    console.log('Date.parseDate("1997-07", "c")                           = %o', Date.parseDate("1997-07", "c")); // YYYY-MM (e.g. 1997-07)
+    console.log('Date.parseDate("1997-07-16", "c")                        = %o', Date.parseDate("1997-07-16", "c")); // YYYY-MM-DD (e.g. 1997-07-16)
+    console.log('Date.parseDate("1997-07-16T19:20+01:00", "c")            = %o', Date.parseDate("1997-07-16T19:20+01:00", "c")); // YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30+01:00", "c")         = %o', Date.parseDate("1997-07-16T19:20:30+01:00", "c")); // YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")); // YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")); // YYYY-MM-DD hh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value
+console.groupEnd();
+
+//*//**
+ * @class Ext.util.DelayedTask
+ * <p> The DelayedTask class provides a convenient way to "buffer" the execution of a method,
+ * performing setTimeout where a new timeout cancels the old timeout. When called, the
+ * task will wait the specified time period before executing. If durng that time period,
+ * the task is called again, the original call will be cancelled. This continues so that
+ * the function is only called a single time for each iteration.</p>
+ * <p>This method is especially useful for things like detecting whether a user has finished
+ * typing in a text field. An example would be performing validation on a keypress. You can
+ * use this class to buffer the keypress events for a certain number of milliseconds, and
+ * perform only if they stop for that amount of time.  Usage:</p><pre><code>
+var task = new Ext.util.DelayedTask(function(){
+    alert(Ext.getDom('myInputField').value.length);
+});
+// Wait 500ms before calling our function. If the user presses another key 
+// during that 500ms, it will be cancelled and we'll wait another 500ms.
+Ext.get('myInputField').on('keypress', function(){
+    task.{@link #delay}(500); 
+});
+ * </code></pre> 
+ * <p>Note that we are using a DelayedTask here to illustrate a point. The configuration
+ * option <tt>buffer</tt> for {@link Ext.util.Observable#addListener addListener/on} will
+ * also setup a delayed task for you to buffer events.</p> 
+ * @constructor The parameters to this constructor serve as defaults and are not required.
+ * @param {Function} fn (optional) The default function to timeout
+ * @param {Object} scope (optional) The default scope of that timeout
+ * @param {Array} args (optional) The default Array of arguments
+ */
+Ext.util.DelayedTask = function(fn, scope, args){
+    var me = this,
+    	id,    	
+    	call = function(){
+    		clearInterval(id);
+	        id = null;
+	        fn.apply(scope, args || []);
+	    };
+	    
+    /**
+     * Cancels any pending timeout and queues a new one
+     * @param {Number} delay The milliseconds to delay
+     * @param {Function} newFn (optional) Overrides function passed to constructor
+     * @param {Object} newScope (optional) Overrides scope passed to constructor
+     * @param {Array} newArgs (optional) Overrides args passed to constructor
+     */
+    me.delay = function(delay, newFn, newScope, newArgs){
+        me.cancel();
+        fn = newFn || fn;
+        scope = newScope || scope;
+        args = newArgs || args;
+        id = setInterval(call, delay);
+    };
+
+    /**
+     * Cancel the last queued timeout
+     */
+    me.cancel = function(){
+        if(id){
+            clearInterval(id);
+            id = null;
+        }
+    };
+};/**
+ * @class Ext.util.MixedCollection
+ * @extends Ext.util.Observable
+ * A Collection class that maintains both numeric indexes and keys and exposes events.
+ * @constructor
+ * @param {Boolean} allowFunctions True if the addAll function should add function references to the
+ * collection (defaults to false)
+ * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection
+ * and return the key value for that item.  This is used when available to look up the key on items that
+ * were passed without an explicit key parameter to a MixedCollection method.  Passing this parameter is
+ * equivalent to providing an implementation for the {@link #getKey} method.
+ */
+Ext.util.MixedCollection = function(allowFunctions, keyFn){
+    this.items = [];
+    this.map = {};
+    this.keys = [];
+    this.length = 0;
+    this.addEvents(
+        /**
+         * @event clear
+         * Fires when the collection is cleared.
+         */
+        "clear",
+        /**
+         * @event add
+         * Fires when an item is added to the collection.
+         * @param {Number} index The index at which the item was added.
+         * @param {Object} o The item added.
+         * @param {String} key The key associated with the added item.
+         */
+        "add",
+        /**
+         * @event replace
+         * Fires when an item is replaced in the collection.
+         * @param {String} key he key associated with the new added.
+         * @param {Object} old The item being replaced.
+         * @param {Object} new The new item.
+         */
+        "replace",
+        /**
+         * @event remove
+         * Fires when an item is removed from the collection.
+         * @param {Object} o The item being removed.
+         * @param {String} key (optional) The key associated with the removed item.
+         */
+        "remove",
+        "sort"
+    );
+    this.allowFunctions = allowFunctions === true;
+    if(keyFn){
+        this.getKey = keyFn;
+    }
+    Ext.util.MixedCollection.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
+    allowFunctions : false,
+
+/**
+ * Adds an item to the collection. Fires the {@link #add} event when complete.
+ * @param {String} key <p>The key to associate with the item, or the new item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
+ * this parameter.</p>
+ * @param {Object} o The item to add.
+ * @return {Object} The item added.
+ */
+    add: function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        if(typeof key != 'undefined' && key !== null){
+            var old = this.map[key];
+            if(typeof old != 'undefined'){
+                return this.replace(key, o);
+            }
+            this.map[key] = o;
+        }
+        this.length++;
+        this.items.push(o);
+        this.keys.push(key);
+        this.fireEvent('add', this.length-1, o, key);
+        return o;
+    },
+
+/**
+  * MixedCollection has a generic way to fetch keys if you implement getKey.  The default implementation
+  * simply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementation
+  * to return a different value as in the following examples:
+<pre><code>
+// normal way
+var mc = new Ext.util.MixedCollection();
+mc.add(someEl.dom.id, someEl);
+mc.add(otherEl.dom.id, otherEl);
+//and so on
+
+// using getKey
+var mc = new Ext.util.MixedCollection();
+mc.getKey = function(el){
+   return el.dom.id;
+};
+mc.add(someEl);
+mc.add(otherEl);
+
+// or via the constructor
+var mc = new Ext.util.MixedCollection(false, function(el){
+   return el.dom.id;
+});
+mc.add(someEl);
+mc.add(otherEl);
+</code></pre>
+ * @param {Object} item The item for which to find the key.
+ * @return {Object} The key for the passed item.
+ */
+    getKey : function(o){
+         return o.id;
+    },
+
+/**
+ * Replaces an item in the collection. Fires the {@link #replace} event when complete.
+ * @param {String} key <p>The key associated with the item to replace, or the replacement item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
+ * with one having the same key value, then just pass the replacement item in this parameter.</p>
+ * @param o {Object} o (optional) If the first parameter passed was a key, the item to associate
+ * with that key.
+ * @return {Object}  The new item.
+ */
+    replace : function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        var old = this.map[key];
+        if(typeof key == "undefined" || key === null || typeof old == "undefined"){
+             return this.add(key, o);
+        }
+        var index = this.indexOfKey(key);
+        this.items[index] = o;
+        this.map[key] = o;
+        this.fireEvent("replace", key, old, o);
+        return o;
+    },
+
+/**
+ * Adds all elements of an Array or an Object to the collection.
+ * @param {Object/Array} objs An Object containing properties which will be added to the collection, or
+ * an Array of values, each of which are added to the collection.
+ */
+    addAll : function(objs){
+        if(arguments.length > 1 || Ext.isArray(objs)){
+            var args = arguments.length > 1 ? arguments : objs;
+            for(var i = 0, len = args.length; i < len; i++){
+                this.add(args[i]);
+            }
+        }else{
+            for(var key in objs){
+                if(this.allowFunctions || typeof objs[key] != "function"){
+                    this.add(key, objs[key]);
+                }
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every item in the collection, passing the following arguments:
+ * <div class="mdetail-params"><ul>
+ * <li><b>item</b> : Mixed<p class="sub-desc">The collection item</p></li>
+ * <li><b>index</b> : Number<p class="sub-desc">The item's index</p></li>
+ * <li><b>length</b> : Number<p class="sub-desc">The total number of items in the collection</p></li>
+ * </ul></div>
+ * The function should return a boolean value. Returning false from the function will stop the iteration.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    each : function(fn, scope){
+        var items = [].concat(this.items); // each safe for removal
+        for(var i = 0, len = items.length; i < len; i++){
+            if(fn.call(scope || items[i], items[i], i, len) === false){
+                break;
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every key in the collection, passing each
+ * key, and its associated item as the first two parameters.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    eachKey : function(fn, scope){
+        for(var i = 0, len = this.keys.length; i < len; i++){
+            fn.call(scope || window, this.keys[i], this.items[i], i, len);
+        }
+    },
+
+    /**
+     * Returns the first item in the collection which elicits a true return value from the
+     * passed selection function.
+     * @param {Function} fn The selection function to execute for each item.
+     * @param {Object} scope (optional) The scope in which to execute the function.
+     * @return {Object} The first item in the collection which returned true from the selection function.
+     */
+    find : function(fn, scope){
+        for(var i = 0, len = this.items.length; i < len; i++){
+            if(fn.call(scope || window, this.items[i], this.keys[i])){
+                return this.items[i];
+            }
+        }
+        return null;
+    },
+
+/**
+ * Inserts an item at the specified index in the collection. Fires the {@link #add} event when complete.
+ * @param {Number} index The index to insert the item at.
+ * @param {String} key The key to associate with the new item, or the item itself.
+ * @param {Object} o (optional) If the second parameter was a key, the new item.
+ * @return {Object} The item inserted.
+ */
+    insert : function(index, key, o){
+        if(arguments.length == 2){
+            o = arguments[1];
+            key = this.getKey(o);
+        }
+        if(this.containsKey(key)){
+            this.suspendEvents();
+            this.removeKey(key);
+            this.resumeEvents();
+        }
+        if(index >= this.length){
+            return this.add(key, o);
+        }
+        this.length++;
+        this.items.splice(index, 0, o);
+        if(typeof key != "undefined" && key !== null){
+            this.map[key] = o;
+        }
+        this.keys.splice(index, 0, key);
+        this.fireEvent("add", index, o, key);
+        return o;
+    },
+
+/**
+ * Remove an item from the collection.
+ * @param {Object} o The item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    remove : function(o){
+        return this.removeAt(this.indexOf(o));
+    },
+
+/**
+ * Remove an item from a specified index in the collection. Fires the {@link #remove} event when complete.
+ * @param {Number} index The index within the collection of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeAt : function(index){
+        if(index < this.length && index >= 0){
+            this.length--;
+            var o = this.items[index];
+            this.items.splice(index, 1);
+            var key = this.keys[index];
+            if(typeof key != "undefined"){
+                delete this.map[key];
+            }
+            this.keys.splice(index, 1);
+            this.fireEvent("remove", o, key);
+            return o;
+        }
+        return false;
+    },
+
+/**
+ * Removed an item associated with the passed key fom the collection.
+ * @param {String} key The key of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeKey : function(key){
+        return this.removeAt(this.indexOfKey(key));
+    },
+
+/**
+ * Returns the number of items in the collection.
+ * @return {Number} the number of items in the collection.
+ */
+    getCount : function(){
+        return this.length;
+    },
+
+/**
+ * Returns index within the collection of the passed Object.
+ * @param {Object} o The item to find the index of.
+ * @return {Number} index of the item. Returns -1 if not found.
+ */
+    indexOf : function(o){
+        return this.items.indexOf(o);
+    },
+
+/**
+ * Returns index within the collection of the passed key.
+ * @param {String} key The key to find the index of.
+ * @return {Number} index of the key.
+ */
+    indexOfKey : function(key){
+        return this.keys.indexOf(key);
+    },
+
+/**
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+    item : function(key){
+        var mk = this.map[key],
+            item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined;
+        return !Ext.isFunction(item) || this.allowFunctions ? item : null; // for prototype!
+    },
+
+/**
+ * Returns the item at the specified index.
+ * @param {Number} index The index of the item.
+ * @return {Object} The item at the specified index.
+ */
+    itemAt : function(index){
+        return this.items[index];
+    },
+
+/**
+ * Returns the item associated with the passed key.
+ * @param {String/Number} key The key of the item.
+ * @return {Object} The item associated with the passed key.
+ */
+    key : function(key){
+        return this.map[key];
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as an item.
+ * @param {Object} o  The Object to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as an item.
+ */
+    contains : function(o){
+        return this.indexOf(o) != -1;
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as a key.
+ * @param {String} key The key to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as a key.
+ */
+    containsKey : function(key){
+        return typeof this.map[key] != "undefined";
+    },
+
+/**
+ * Removes all items from the collection.  Fires the {@link #clear} event when complete.
+ */
+    clear : function(){
+        this.length = 0;
+        this.items = [];
+        this.keys = [];
+        this.map = {};
+        this.fireEvent("clear");
+    },
+
+/**
+ * Returns the first item in the collection.
+ * @return {Object} the first item in the collection..
+ */
+    first : function(){
+        return this.items[0];
+    },
+
+/**
+ * Returns the last item in the collection.
+ * @return {Object} the last item in the collection..
+ */
+    last : function(){
+        return this.items[this.length-1];
+    },
+
+    // private
+    _sort : function(property, dir, fn){
+        var i,
+            len,
+            dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1,
+            c = [], k = this.keys, items = this.items;
+            
+        fn = fn || function(a, b){
+            return a-b;
+        };
+        for(i = 0, len = items.length; i < len; i++){
+            c[c.length] = {key: k[i], value: items[i], index: i};
+        }
+        c.sort(function(a, b){
+            var v = fn(a[property], b[property]) * dsc;
+            if(v === 0){
+                v = (a.index < b.index ? -1 : 1);
+            }
+            return v;
+        });
+        for(i = 0, len = c.length; i < len; i++){
+            items[i] = c[i].value;
+            k[i] = c[i].key;
+        }
+        this.fireEvent("sort", this);
+    },
+
+    /**
+     * Sorts this collection with the passed comparison function
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) comparison function
+     */
+    sort : function(dir, fn){
+        this._sort("value", dir, fn);
+    },
+
+    /**
+     * Sorts this collection by keys
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) a comparison function (defaults to case insensitive string)
+     */
+    keySort : function(dir, fn){
+        this._sort("key", dir, fn || function(a, b){
+            var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase();
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        });
+    },
+
+    /**
+     * Returns a range of items in this collection
+     * @param {Number} startIndex (optional) defaults to 0
+     * @param {Number} endIndex (optional) default to the last item
+     * @return {Array} An array of items
+     */
+    getRange : function(start, end){
+        var items = this.items;
+        if(items.length < 1){
+            return [];
+        }
+        start = start || 0;
+        end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1);
+        var i, r = [];
+        if(start <= end){
+            for(i = start; i <= end; i++) {
+                r[r.length] = items[i];
+            }
+        }else{
+            for(i = start; i >= end; i--) {
+                r[r.length] = items[i];
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Filter the <i>objects</i> in this collection by a specific property.
+     * Returns a new collection that has been filtered.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either string that the property values
+     * should start with or a RegExp to test against the property
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison (defaults to False).
+     * @return {MixedCollection} The new filtered collection
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return this.clone();
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.filterBy(function(o){
+            return o && value.test(o[property]);
+        });
+    },
+
+    /**
+     * Filter by a function. Returns a <i>new</i> collection that has been filtered.
+     * The passed function will be called with each object in the collection.
+     * If the function returns true, the value is included otherwise it is filtered.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key)
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} The new filtered collection
+     */
+    filterBy : function(fn, scope){
+        var r = new Ext.util.MixedCollection();
+        r.getKey = this.getKey;
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                r.add(k[i], it[i]);
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Finds the index of the first matching object in this collection by a specific property/value.
+     * @param {String} property The name of a property on your objects.
+     * @param {String/RegExp} value A string that the property values
+     * should start with or a RegExp to test against the property.
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning.
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison.
+     * @return {Number} The matched index or -1
+     */
+    findIndex : function(property, value, start, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return -1;
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.findIndexBy(function(o){
+            return o && value.test(o[property]);
+        }, null, start);
+    },
+
+    /**
+     * Find the index of the first matching object in this collection by a function.
+     * If the function returns <i>true</i> it is considered a match.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key).
+     * @param {Object} scope (optional) The scope of the function (defaults to this).
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @return {Number} The matched index or -1
+     */
+    findIndexBy : function(fn, scope, start){
+        var k = this.keys, it = this.items;
+        for(var i = (start||0), len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    // private
+    createValueMatcher : function(value, anyMatch, caseSensitive){
+        if(!value.exec){ // not a regex
+            value = String(value);
+            value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i');
+        }
+        return value;
+    },
+
+    /**
+     * Creates a shallow copy of this collection
+     * @return {MixedCollection}
+     */
+    clone : function(){
+        var r = new Ext.util.MixedCollection();
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            r.add(k[i], it[i]);
+        }
+        r.getKey = this.getKey;
+        return r;
+    }
+});
+/**
+ * This method calls {@link #item item()}.
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item;/**
+ * @class Ext.util.JSON
+ * Modified version of Douglas Crockford"s json.js that doesn"t
+ * mess with the Object prototype
+ * http://www.json.org/js.html
+ * @singleton
+ */
+Ext.util.JSON = new (function(){
+    var useHasOwn = !!{}.hasOwnProperty,
+        isNative = function() {
+            var useNative = null;
+
+            return function() {
+                if (useNative === null) {
+                    useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]';
+                }
+        
+                return useNative;
+            };
+        }(),
+        pad = function(n) {
+            return n < 10 ? "0" + n : n;
+        },
+        doDecode = function(json){
+            return eval("(" + json + ')');    
+        },
+        doEncode = function(o){
+            if(typeof o == "undefined" || o === null){
+                return "null";
+            }else if(Ext.isArray(o)){
+                return encodeArray(o);
+            }else if(Object.prototype.toString.apply(o) === '[object Date]'){
+                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(doEncode(i), ":",
+                                    v === null ? "null" : doEncode(v));
+                            b = true;
+                        }
+                    }
+                }
+                a.push("}");
+                return a.join("");
+            }    
+        },
+        m = {
+            "\b": '\\b',
+            "\t": '\\t',
+            "\n": '\\n',
+            "\f": '\\f',
+            "\r": '\\r',
+            '"' : '\\"',
+            "\\": '\\\\'
+        },
+        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 + '"';
+        },
+        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()) + '"';
+    };
+
+    /**
+     * Encodes an Object, Array or other value
+     * @param {Mixed} o The variable to encode
+     * @return {String} The JSON string
+     */
+    this.encode = function() {
+        var ec;
+        return function(o) {
+            if (!ec) {
+                // setup encoding function on first access
+                ec = isNative() ? JSON.stringify : doEncode;
+            }
+            return ec(o);
+        };
+    }();
+
+
+    /**
+     * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.
+     * @param {String} json The JSON string
+     * @return {Object} The resulting object
+     */
+    this.decode = function() {
+        var dc;
+        return function(json) {
+            if (!dc) {
+                // setup decoding function on first access
+                dc = isNative() ? JSON.parse : doDecode;
+            }
+            return dc(json);
+        };
+    }();
+
+})();
+/**
+ * Shorthand for {@link Ext.util.JSON#encode}
+ * @param {Mixed} o The variable to encode
+ * @return {String} The JSON string
+ * @member Ext
+ * @method encode
+ */
+Ext.encode = Ext.util.JSON.encode;
+/**
+ * Shorthand for {@link Ext.util.JSON#decode}
+ * @param {String} json The JSON string
+ * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid.
+ * @return {Object} The resulting object
+ * @member Ext
+ * @method decode
+ */
+Ext.decode = Ext.util.JSON.decode;
+/**
+ * @class Ext.util.Format
+ * Reusable data formatting functions
+ * @singleton
+ */
+Ext.util.Format = function(){
+    var trimRe = /^\s+|\s+$/g;
+    return {
+        /**
+         * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
+         * @param {String} value The string to truncate
+         * @param {Number} length The maximum length to allow before truncating
+         * @param {Boolean} word True to try to find a common work break
+         * @return {String} The converted text
+         */
+        ellipsis : function(value, len, word){
+            if(value && value.length > len){
+                if(word){
+                    var vs = value.substr(0, len - 2);
+                    var index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?'));
+                    if(index == -1 || index < (len - 15)){
+                        return value.substr(0, len - 3) + "...";
+                    }else{
+                        return vs.substr(0, index) + "...";
+                    }
+                } else{
+                    return value.substr(0, len - 3) + "...";
+                }
+            }
+            return value;
+        },
+
+        /**
+         * Checks a reference and converts it to empty string if it is undefined
+         * @param {Mixed} value Reference to check
+         * @return {Mixed} Empty string if converted, otherwise the original value
+         */
+        undef : function(value){
+            return value !== undefined ? value : "";
+        },
+
+        /**
+         * Checks a reference and converts it to the default value if it's empty
+         * @param {Mixed} value Reference to check
+         * @param {String} defaultValue The value to insert of it's undefined (defaults to "")
+         * @return {String}
+         */
+        defaultValue : function(value, defaultValue){
+            return value !== undefined && value !== '' ? value : defaultValue;
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
+         * @param {String} value The string to encode
+         * @return {String} The encoded text
+         */
+        htmlEncode : function(value){
+            return !value ? value : String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') from their HTML character equivalents.
+         * @param {String} value The string to decode
+         * @return {String} The decoded text
+         */
+        htmlDecode : function(value){
+            return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
+        },
+
+        /**
+         * Trims any whitespace from either side of a string
+         * @param {String} value The text to trim
+         * @return {String} The trimmed text
+         */
+        trim : function(value){
+            return String(value).replace(trimRe, "");
+        },
+
+        /**
+         * Returns a substring from within an original string
+         * @param {String} value The original text
+         * @param {Number} start The start index of the substring
+         * @param {Number} length The length of the substring
+         * @return {String} The substring
+         */
+        substr : function(value, start, length){
+            return String(value).substr(start, length);
+        },
+
+        /**
+         * Converts a string to all lower case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        lowercase : function(value){
+            return String(value).toLowerCase();
+        },
+
+        /**
+         * Converts a string to all upper case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        uppercase : function(value){
+            return String(value).toUpperCase();
+        },
+
+        /**
+         * Converts the first character only of a string to upper case
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        capitalize : function(value){
+            return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase();
+        },
+
+        // private
+        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);
+            }
+        },
+
+        /**
+         * Format a number as US currency
+         * @param {Number/String} value The numeric value to format
+         * @return {String} The formatted currency string
+         */
+        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;
+        },
+
+        /**
+         * Parse a value into a formatted date using the specified format pattern.
+         * @param {String/Date} value The value to format (Strings must conform to the format expected by the javascript Date object's <a href="http://www.w3schools.com/jsref/jsref_parse.asp">parse()</a> method)
+         * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y')
+         * @return {String} The formatted date string
+         */
+        date : function(v, format){
+            if(!v){
+                return "";
+            }
+            if(!Ext.isDate(v)){
+                v = new Date(Date.parse(v));
+            }
+            return v.dateFormat(format || "m/d/Y");
+        },
+
+        /**
+         * Returns a date rendering function that can be reused to apply a date format multiple times efficiently
+         * @param {String} format Any valid date format string
+         * @return {Function} The date formatting function
+         */
+        dateRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.date(v, format);
+            };
+        },
+
+        // private
+        stripTagsRE : /<\/?[^>]+>/gi,
+        
+        /**
+         * Strips all HTML tags
+         * @param {Mixed} value The text from which to strip tags
+         * @return {String} The stripped text
+         */
+        stripTags : function(v){
+            return !v ? v : String(v).replace(this.stripTagsRE, "");
+        },
+
+        stripScriptsRe : /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+
+        /**
+         * Strips all script tags
+         * @param {Mixed} value The text from which to strip script tags
+         * @return {String} The stripped text
+         */
+        stripScripts : function(v){
+            return !v ? v : String(v).replace(this.stripScriptsRe, "");
+        },
+
+        /**
+         * Simple format for a file size (xxx bytes, xxx KB, xxx MB)
+         * @param {Number/String} size The numeric value to format
+         * @return {String} The formatted file size
+         */
+        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";
+            }
+        },
+
+        /**
+         * It does simple math for use in a template, for example:<pre><code>
+         * var tpl = new Ext.Template('{value} * 10 = {value:math("* 10")}');
+         * </code></pre>
+         * @return {Function} A function that operates on the passed value.
+         */
+        math : function(){
+            var fns = {};
+            return function(v, a){
+                if(!fns[a]){
+                    fns[a] = new Function('v', 'return v ' + a + ';');
+                }
+                return fns[a](v);
+            }
+        }(),
+
+        /**
+         * Rounds the passed number to the required decimal precision.
+         * @param {Number/String} value The numeric value to round.
+         * @param {Number} precision The number of decimal places to which to round the first parameter's value.
+         * @return {Number} The rounded value.
+         */
+        round : function(value, precision) {
+            var result = Number(value);
+            if (typeof precision == 'number') {
+                precision = Math.pow(10, precision);
+                result = Math.round(value * precision) / precision;
+            }
+            return result;
+        },
+
+        /**
+         * Formats the number according to the format string.
+         * <div style="margin-left:40px">examples (123456.789):
+         * <div style="margin-left:10px">
+         * 0 - (123456) show only digits, no precision<br>
+         * 0.00 - (123456.78) show only digits, 2 precision<br>
+         * 0.0000 - (123456.7890) show only digits, 4 precision<br>
+         * 0,000 - (123,456) show comma and digits, no precision<br>
+         * 0,000.00 - (123,456.78) show comma and digits, 2 precision<br>
+         * 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br>
+         * To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.
+         * For example: 0.000,00/i
+         * </div></div>
+         * @param {Number} v The number to format.
+         * @param {String} format The way you would like to format this text.
+         * @return {String} The formatted number.
+         */
+        number: function(v, format) {
+            if(!format){
+		        return v;
+		    }
+		    v = Ext.num(v, NaN);
+            if (isNaN(v)){
+                return '';
+            }
+		    var comma = ',',
+		        dec = '.',
+		        i18n = false,
+		        neg = v < 0;
+		
+		    v = Math.abs(v);
+		    if(format.substr(format.length - 2) == '/i'){
+		        format = format.substr(0, format.length - 2);
+		        i18n = true;
+		        comma = '.';
+		        dec = ',';
+		    }
+		
+		    var hasComma = format.indexOf(comma) != -1, 
+		        psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec);
+		
+		    if(1 < psplit.length){
+		        v = v.toFixed(psplit[1].length);
+		    }else if(2 < psplit.length){
+		        throw ('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format);
+		    }else{
+		        v = v.toFixed(0);
+		    }
+		
+		    var fnum = v.toString();
+		    if(hasComma){
+		        psplit = fnum.split('.');
+		
+		        var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), n = cnum.length % 3 || 3;
+		
+		        for(var i = 0; i < j; i += n){
+		            if(i != 0){
+		                n = 3;
+		            }
+		            parr[parr.length] = cnum.substr(i, n);
+		            m -= 1;
+		        }
+		        fnum = parr.join(comma);
+		        if(psplit[1]){
+		            fnum += dec + psplit[1];
+		        }
+		    }
+		
+		    return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum);
+        },
+
+        /**
+         * Returns a number rendering function that can be reused to apply a number format multiple times efficiently
+         * @param {String} format Any valid number format string for {@link #number}
+         * @return {Function} The number formatting function
+         */
+        numberRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.number(v, format);
+            };
+        },
+
+        /**
+         * Selectively do a plural form of a word based on a numeric value. For example, in a template,
+         * {commentCount:plural("Comment")}  would result in "1 Comment" if commentCount was 1 or would be "x Comments"
+         * if the value is 0 or greater than 1.
+         * @param {Number} value The value to compare against
+         * @param {String} singular The singular form of the word
+         * @param {String} plural (optional) The plural form of the word (defaults to the singular with an "s")
+         */
+        plural : function(v, s, p){
+            return v +' ' + (v == 1 ? s : (p ? p : s+'s'));
+        },
+        
+        /**
+         * Converts newline characters to the HTML tag &lt;br/>
+         * @param {String} The string value to format.
+         * @return {String} The string with embedded &lt;br/> tags in place of newlines.
+         */
+        nl2br : function(v){
+            return v === undefined || v === null ? '' : v.replace(/\n/g, '<br/>');
+        }
+    }
+}();/**
+ * @class Ext.XTemplate
+ * @extends Ext.Template
+ * <p>A template class that supports advanced functionality like autofilling arrays, conditional processing with
+ * basic comparison operators, sub-templates, basic math function support, special built-in template variables,
+ * inline code execution and more.  XTemplate also provides the templating mechanism built into {@link Ext.DataView}.</p>
+ * <p>XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are
+ * supported in the templates that can be created.  The following examples demonstrate all of the supported features.
+ * This is the data object used for reference in each code example:</p>
+ * <pre><code>
+var data = {
+    name: 'Jack Slocum',
+    title: 'Lead Developer',
+    company: 'Ext JS, LLC',
+    email: 'jack@extjs.com',
+    address: '4 Red Bulls Drive',
+    city: 'Cleveland',
+    state: 'Ohio',
+    zip: '44102',
+    drinks: ['Red Bull', 'Coffee', 'Water'],
+    kids: [{
+        name: 'Sara Grace',
+        age:3
+    },{
+        name: 'Zachary',
+        age:2
+    },{
+        name: 'John James',
+        age:0
+    }]
+};
+ * </code></pre>
+ * <p><b>Auto filling of arrays</b><br/>The <tt>tpl</tt> tag and the <tt>for</tt> operator are used
+ * to process the provided data object. If <tt>for="."</tt> is specified, the data object provided
+ * is examined. If the variable in <tt>for</tt> is an array, it will auto-fill, repeating the template
+ * block inside the <tt>tpl</tt> tag for each item in the array:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Kids: ',
+    '&lt;tpl for=".">',
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data.kids); // pass the kids property of the data object
+ * </code></pre>
+ * <p><b>Scope switching</b><br/>The <tt>for</tt> property can be leveraged to access specified members
+ * of the provided data object to populate the template:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Title: {title}&lt;/p>',
+    '&lt;p>Company: {company}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl <b>for="kids"</b>>', // interrogate the kids property within the data
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+ * </code></pre>
+ * <p><b>Access to parent object from within sub-template scope</b><br/>When processing a sub-template, for example while
+ * looping through a child array, you can access the parent object's members via the <tt>parent</tt> object:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Array item index and basic math support</b> <br/>While processing an array, the special variable <tt>{#}</tt>
+ * will provide the current array index + 1 (starts at 1, not 0). Templates also support the basic math operators
+ * + - * and / that can be applied directly on numeric data values:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{#}: {name}&lt;/p>',  // <-- Auto-number each item
+            '&lt;p>In 5 Years: {age+5}&lt;/p>',  // <-- Basic math
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Auto-rendering of flat arrays</b> <br/>Flat arrays that contain values (and not objects) can be auto-rendered
+ * using the special <tt>{.}</tt> variable inside a loop.  This variable will represent the value of
+ * the array at the current index:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>{name}\'s favorite beverages:&lt;/p>',
+    '&lt;tpl for="drinks">',
+       '&lt;div> - {.}&lt;/div>',
+    '&lt;/tpl>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Basic conditional logic</b> <br/>Using the <tt>tpl</tt> tag and the <tt>if</tt>
+ * operator you can provide conditional checks for deciding whether or not to render specific parts of the template.
+ * Note that there is no <tt>else</tt> operator &mdash; if needed, you should use two opposite <tt>if</tt> statements.
+ * Properly-encoded attributes are required as seen in the following example:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Ability to execute arbitrary inline code</b> <br/>In an XTemplate, anything between {[ ... ]}  is considered
+ * code to be executed in the scope of the template. There are some special variables available in that code:
+ * <ul>
+ * <li><b><tt>values</tt></b>: The values in the current scope. If you are using scope changing sub-templates, you
+ * can change what <tt>values</tt> is.</li>
+ * <li><b><tt>parent</tt></b>: The scope (values) of the ancestor template.</li>
+ * <li><b><tt>xindex</tt></b>: If you are in a looping template, the index of the loop you are in (1-based).</li>
+ * <li><b><tt>xcount</tt></b>: If you are in a looping template, the total length of the array you are looping.</li>
+ * <li><b><tt>fm</tt></b>: An alias for <tt>Ext.util.Format</tt>.</li>
+ * </ul>
+ * This example demonstrates basic row striping using an inline code block and the <tt>xindex</tt> variable:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Company: {[values.company.toUpperCase() + ", " + values.title]}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+       '&lt;div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
+        '{name}',
+        '&lt;/div>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Template member functions</b> <br/>One or more member functions can be defined directly on the config
+ * object passed into the XTemplate constructor for more complex processing:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="this.isGirl(name)">',
+            '&lt;p>Girl: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isGirl(name) == false">',
+            '&lt;p>Boy: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isBaby(age)">',
+            '&lt;p>{name} is a baby!&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>', {
+     isGirl: function(name){
+         return name == 'Sara Grace';
+     },
+     isBaby: function(age){
+        return age < 1;
+     }
+});
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * @constructor
+ * @param {String/Array/Object} parts The HTML fragment or an array of fragments to join(""), or multiple arguments
+ * to join("") that can also include a config object
+ */
+Ext.XTemplate = function(){
+    Ext.XTemplate.superclass.constructor.apply(this, arguments);
+
+    var me = this,
+    	s = me.html,
+    	re = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,
+    	nameRe = /^<tpl\b[^>]*?for="(.*?)"/,
+    	ifRe = /^<tpl\b[^>]*?if="(.*?)"/,
+    	execRe = /^<tpl\b[^>]*?exec="(.*?)"/,
+    	m,
+    	id = 0,
+    	tpls = [],
+    	VALUES = 'values',
+    	PARENT = 'parent',
+    	XINDEX = 'xindex',
+    	XCOUNT = 'xcount',
+    	RETURN = 'return ',
+    	WITHVALUES = 'with(values){ ';
+
+    s = ['<tpl>', s, '</tpl>'].join('');
+
+    while((m = s.match(re))){
+       	var m2 = m[0].match(nameRe),
+			m3 = m[0].match(ifRe),
+       		m4 = m[0].match(execRe),
+       		exp = null,
+       		fn = null,
+       		exec = null,
+       		name = m2 && m2[1] ? m2[1] : '';
+
+       if (m3) {
+           exp = m3 && m3[1] ? m3[1] : null;
+           if(exp){
+               fn = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES + RETURN +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if (m4) {
+           exp = m4 && m4[1] ? m4[1] : null;
+           if(exp){
+               exec = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if(name){
+           switch(name){
+               case '.': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + VALUES + '; }'); break;
+               case '..': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + PARENT + '; }'); break;
+               default: name = new Function(VALUES, PARENT, WITHVALUES + RETURN + name + '; }');
+           }
+       }
+       tpls.push({
+            id: id,
+            target: name,
+            exec: exec,
+            test: fn,
+            body: m[1]||''
+        });
+       s = s.replace(m[0], '{xtpl'+ id + '}');
+       ++id;
+    }
+	Ext.each(tpls, function(t) {
+        me.compileTpl(t);
+    });
+    me.master = tpls[tpls.length-1];
+    me.tpls = tpls;
+};
+Ext.extend(Ext.XTemplate, Ext.Template, {
+    // private
+    re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,
+    // private
+    codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g,
+
+    // private
+    applySubTemplate : function(id, values, parent, xindex, xcount){
+        var me = this,
+        	len,
+        	t = me.tpls[id],
+        	vs,
+        	buf = [];
+        if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) ||
+            (t.exec && t.exec.call(me, values, parent, xindex, xcount))) {
+            return '';
+        }
+        vs = t.target ? t.target.call(me, values, parent) : values;
+        len = vs.length;
+        parent = t.target ? values : parent;
+        if(t.target && Ext.isArray(vs)){
+	        Ext.each(vs, function(v, i) {
+                buf[buf.length] = t.compiled.call(me, v, parent, i+1, len);
+            });
+            return buf.join('');
+        }
+        return t.compiled.call(me, vs, parent, xindex, xcount);
+    },
+
+    // private
+    compileTpl : function(tpl){
+        var fm = Ext.util.Format,
+       		useF = this.disableFormats !== true,
+            sep = Ext.isGecko ? "+" : ",",
+            body;
+
+        function fn(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+"'";
+        }
+
+        function codeFn(m, code){
+            return "'"+ sep +'('+code+')'+sep+"'";
+        }
+
+        // branched to use + in gecko and [].join() in others
+        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;
+    },
+
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+        return this.master.compiled.call(this, values, {}, 1, 1);
+    },
+
+    /**
+     * Compile the template to a function for optimized performance.  Recommended if the template will be used frequently.
+     * @return {Function} The compiled function
+     */
+    compile : function(){return this;}
+
+    /**
+     * @property re
+     * @hide
+     */
+    /**
+     * @property disableFormats
+     * @hide
+     */
+    /**
+     * @method set
+     * @hide
+     */
+
+});
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.XTemplate
+ * @method apply
+ */
+Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.XTemplate.from = function(el){
+    el = Ext.getDom(el);
+    return new Ext.XTemplate(el.value || el.innerHTML);
+};/**
+ * @class Ext.util.CSS
+ * Utility class for manipulating CSS rules
+ * @singleton
+ */
+Ext.util.CSS = function(){
+	var rules = null;
+   	var doc = document;
+
+    var camelRe = /(-[a-z])/gi;
+    var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); };
+
+   return {
+   /**
+    * Creates a stylesheet from a text blob of rules.
+    * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.
+    * @param {String} cssText The text containing the css rules
+    * @param {String} id An id to add to the stylesheet for later removal
+    * @return {StyleSheet}
+    */
+   createStyleSheet : function(cssText, id){
+       var ss;
+       var head = doc.getElementsByTagName("head")[0];
+       var rules = doc.createElement("style");
+       rules.setAttribute("type", "text/css");
+       if(id){
+           rules.setAttribute("id", id);
+       }
+       if(Ext.isIE){
+           head.appendChild(rules);
+           ss = rules.styleSheet;
+           ss.cssText = cssText;
+       }else{
+           try{
+                rules.appendChild(doc.createTextNode(cssText));
+           }catch(e){
+               rules.cssText = cssText;
+           }
+           head.appendChild(rules);
+           ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
+       }
+       this.cacheStyleSheet(ss);
+       return ss;
+   },
+
+   /**
+    * Removes a style or link tag by id
+    * @param {String} id The id of the tag
+    */
+   removeStyleSheet : function(id){
+       var existing = doc.getElementById(id);
+       if(existing){
+           existing.parentNode.removeChild(existing);
+       }
+   },
+
+   /**
+    * Dynamically swaps an existing stylesheet reference for a new one
+    * @param {String} id The id of an existing link tag to remove
+    * @param {String} url The href of the new stylesheet to include
+    */
+   swapStyleSheet : function(id, url){
+       this.removeStyleSheet(id);
+       var ss = doc.createElement("link");
+       ss.setAttribute("rel", "stylesheet");
+       ss.setAttribute("type", "text/css");
+       ss.setAttribute("id", id);
+       ss.setAttribute("href", url);
+       doc.getElementsByTagName("head")[0].appendChild(ss);
+   },
+   
+   /**
+    * Refresh the rule cache if you have dynamically added stylesheets
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   refreshCache : function(){
+       return this.getRules(true);
+   },
+
+   // private
+   cacheStyleSheet : function(ss){
+       if(!rules){
+           rules = {};
+       }
+       try{// try catch for cross domain access issue
+           var ssRules = ss.cssRules || ss.rules;
+           for(var j = ssRules.length-1; j >= 0; --j){
+               rules[ssRules[j].selectorText] = ssRules[j];
+           }
+       }catch(e){}
+   },
+   
+   /**
+    * Gets all css rules for the document
+    * @param {Boolean} refreshCache true to refresh the internal cache
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   getRules : function(refreshCache){
+   		if(rules === null || refreshCache){
+   			rules = {};
+   			var ds = doc.styleSheets;
+   			for(var i =0, len = ds.length; i < len; i++){
+   			    try{
+    		        this.cacheStyleSheet(ds[i]);
+    		    }catch(e){} 
+	        }
+   		}
+   		return rules;
+   	},
+   	
+   	/**
+    * Gets an an individual CSS rule by selector(s)
+    * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned.
+    * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically
+    * @return {CSSRule} The CSS rule or null if one is not found
+    */
+   getRule : function(selector, refreshCache){
+   		var rs = this.getRules(refreshCache);
+   		if(!Ext.isArray(selector)){
+   		    return rs[selector];
+   		}
+   		for(var i = 0; i < selector.length; i++){
+			if(rs[selector[i]]){
+				return rs[selector[i]];
+			}
+		}
+		return null;
+   	},
+   	
+   	
+   	/**
+    * Updates a rule property
+    * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+    * @param {String} property The css property
+    * @param {String} value The new value for the property
+    * @return {Boolean} true If a rule was found and updated
+    */
+   updateRule : function(selector, property, value){
+   		if(!Ext.isArray(selector)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   				rule.style[property.replace(camelRe, camelFn)] = value;
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.updateRule(selector[i], property, value)){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	}
+   };	
+}();/**
+ @class Ext.util.ClickRepeater
+ @extends Ext.util.Observable
+
+ A wrapper class which can be applied to any element. Fires a "click" event while the
+ mouse is pressed. The interval between firings may be specified in the config but
+ defaults to 20 milliseconds.
+
+ Optionally, a CSS class may be applied to the element during the time it is pressed.
+
+ @cfg {Mixed} el The element to act as a button.
+ @cfg {Number} delay The initial delay before the repeating event begins firing.
+ Similar to an autorepeat key delay.
+ @cfg {Number} interval The interval between firings of the "click" event. Default 20 ms.
+ @cfg {String} pressClass A CSS class name to be applied to the element while pressed.
+ @cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate.
+           "interval" and "delay" are ignored.
+ @cfg {Boolean} preventDefault True to prevent the default click event
+ @cfg {Boolean} stopDefault True to stop the default click event
+
+ @history
+    2007-02-02 jvs Original code contributed by Nige "Animal" White
+    2007-02-02 jvs Renamed to ClickRepeater
+    2007-02-03 jvs Modifications for FF Mac and Safari
+
+ @constructor
+ @param {Mixed} el The element to listen on
+ @param {Object} config
+ */
+Ext.util.ClickRepeater = function(el, config)
+{
+    this.el = Ext.get(el);
+    this.el.unselectable();
+
+    Ext.apply(this, config);
+
+    this.addEvents(
+    /**
+     * @event mousedown
+     * Fires when the mouse button is depressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mousedown",
+    /**
+     * @event click
+     * Fires on a specified interval during the time the element is pressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "click",
+    /**
+     * @event mouseup
+     * Fires when the mouse key is released.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mouseup"
+    );
+
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+
+    // allow inline handler
+    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,
+
+    /**
+     * Enables the repeater and allows events to fire.
+     */
+    enable: function(){
+        if(this.disabled){
+            this.el.on('mousedown', this.handleMouseDown, this);
+            if(this.preventDefault || this.stopDefault){
+                this.el.on('click', this.eventOptions, this);
+            }
+        }
+        this.disabled = false;
+    },
+    
+    /**
+     * Disables the repeater and stops events from firing.
+     */
+    disable: function(/* private */ force){
+        if(force || !this.disabled){
+            clearTimeout(this.timer);
+            if(this.pressClass){
+                this.el.removeClass(this.pressClass);
+            }
+            Ext.getDoc().un('mouseup', this.handleMouseUp, this);
+            this.el.removeAllListeners();
+        }
+        this.disabled = true;
+    },
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled: function(disabled){
+        this[disabled ? 'disable' : 'enable']();    
+    },
+    
+    eventOptions: function(e){
+        if(this.preventDefault){
+            e.preventDefault();
+        }
+        if(this.stopDefault){
+            e.stopEvent();
+        }       
+    },
+    
+    // private
+    destroy : function() {
+        this.disable(true);
+        Ext.destroy(this.el);
+        this.purgeListeners();
+    },
+    
+    // private
+    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);
+
+//      Do not honor delay or interval if acceleration wanted.
+        if (this.accelerate) {
+            this.delay = 400;
+	    }
+        this.timer = this.click.defer(this.delay || this.interval, this);
+    },
+
+    // private
+    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 (t, b, c, d) {
+        return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+    },
+
+    // private
+    handleMouseOut : function(){
+        clearTimeout(this.timer);
+        if(this.pressClass){
+            this.el.removeClass(this.pressClass);
+        }
+        this.el.on("mouseover", this.handleMouseReturn, this);
+    },
+
+    // private
+    handleMouseReturn : function(){
+        this.el.un("mouseover", this.handleMouseReturn, this);
+        if(this.pressClass){
+            this.el.addClass(this.pressClass);
+        }
+        this.click();
+    },
+
+    // private
+    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);
+    }
+});/**
+ * @class Ext.KeyNav
+ * <p>Provides a convenient wrapper for normalized keyboard navigation.  KeyNav allows you to bind
+ * navigation keys to function calls that will get called when the keys are pressed, providing an easy
+ * way to implement custom navigation schemes for any UI component.</p>
+ * <p>The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc,
+ * pageUp, pageDown, del, home, end.  Usage:</p>
+ <pre><code>
+var nav = new Ext.KeyNav("my-element", {
+    "left" : function(e){
+        this.moveLeft(e.ctrlKey);
+    },
+    "right" : function(e){
+        this.moveRight(e.ctrlKey);
+    },
+    "enter" : function(e){
+        this.save();
+    },
+    scope : this
+});
+</code></pre>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config
+ */
+Ext.KeyNav = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+};
+
+Ext.KeyNav.prototype = {
+    /**
+     * @cfg {Boolean} disabled
+     * True to disable this KeyNav instance (defaults to false)
+     */
+    disabled : false,
+    /**
+     * @cfg {String} defaultEventAction
+     * The method to call on the {@link Ext.EventObject} after this KeyNav intercepts a key.  Valid values are
+     * {@link Ext.EventObject#stopEvent}, {@link Ext.EventObject#preventDefault} and
+     * {@link Ext.EventObject#stopPropagation} (defaults to 'stopEvent')
+     */
+    defaultEventAction: "stopEvent",
+    /**
+     * @cfg {Boolean} forceKeyDown
+     * Handle the keydown event instead of keypress (defaults to false).  KeyNav automatically does this for IE since
+     * IE does not propagate special keys on keypress, but setting this to true will force other browsers to also
+     * handle keydown instead of keypress.
+     */
+    forceKeyDown : false,
+
+    // private
+    prepareEvent : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(Ext.isSafari2 && h && k >= 37 && k <= 40){
+            e.stopEvent();
+        }
+    },
+
+    // private
+    relay : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(h && this[h]){
+            if(this.doRelay(e, this[h], h) !== true){
+                e[this.defaultEventAction]();
+            }
+        }
+    },
+
+    // private
+    doRelay : function(e, h, hname){
+        return h.call(this.scope || this, e);
+    },
+
+    // possible handlers
+    enter : false,
+    left : false,
+    right : false,
+    up : false,
+    down : false,
+    tab : false,
+    esc : false,
+    pageUp : false,
+    pageDown : false,
+    del : false,
+    home : false,
+    end : false,
+
+    // quick lookup hash
+    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 this KeyNav
+	 */
+	enable: function(){
+		if(this.disabled){
+            // ie won't do special keys on keypress, no one else will repeat keys with keydown
+            // the EventObject will normalize Safari automatically
+            if(this.isKeydown()){
+                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 this KeyNav
+	 */
+	disable: function(){
+		if(!this.disabled){
+		    if(this.isKeydown()){
+                this.el.un("keydown", this.relay, this);
+            }else{
+                this.el.un("keydown", this.prepareEvent, this);
+                this.el.un("keypress", this.relay, this);
+            }
+		    this.disabled = true;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    },
+    
+    // private
+    isKeydown: function(){
+        return this.forceKeyDown || Ext.EventManager.useKeydown;
+    }
+};
+/**
+ * @class Ext.KeyMap
+ * Handles mapping keys to actions for an element. One key map can be used for multiple actions.
+ * The constructor accepts the same config object as defined by {@link #addBinding}.
+ * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key
+ * combination it will call the function with this signature (if the match is a multi-key
+ * combination the callback will still be called only once): (String key, Ext.EventObject e)
+ * A KeyMap can also handle a string representation of keys.<br />
+ * Usage:
+ <pre><code>
+// map one key by key code
+var map = new Ext.KeyMap("my-element", {
+    key: 13, // or Ext.EventObject.ENTER
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to one action by string
+var map = new Ext.KeyMap("my-element", {
+    key: "a\r\n\t",
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to multiple actions by strings and array of codes
+var map = new Ext.KeyMap("my-element", [
+    {
+        key: [10,13],
+        fn: function(){ alert("Return was pressed"); }
+    }, {
+        key: "abc",
+        fn: function(){ alert('a, b or c was pressed'); }
+    }, {
+        key: "\t",
+        ctrl:true,
+        shift:true,
+        fn: function(){ alert('Control + shift + tab was pressed.'); }
+    }
+]);
+</code></pre>
+ * <b>Note: A KeyMap starts enabled</b>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config (see {@link #addBinding})
+ * @param {String} eventName (optional) The event to bind to (defaults to "keydown")
+ */
+Ext.KeyMap = function(el, config, eventName){
+    this.el  = Ext.get(el);
+    this.eventName = eventName || "keydown";
+    this.bindings = [];
+    if(config){
+        this.addBinding(config);
+    }
+    this.enable();
+};
+
+Ext.KeyMap.prototype = {
+    /**
+     * True to stop the event from bubbling and prevent the default browser action if the
+     * key was handled by the KeyMap (defaults to false)
+     * @type Boolean
+     */
+    stopEvent : false,
+
+    /**
+     * Add a new binding to this KeyMap. The following config object properties are supported:
+     * <pre>
+Property    Type             Description
+----------  ---------------  ----------------------------------------------------------------------
+key         String/Array     A single keycode or an array of keycodes to handle
+shift       Boolean          True to handle key only when shift is pressed, False to handle the key only when shift is not pressed (defaults to undefined)
+ctrl        Boolean          True to handle key only when ctrl is pressed, False to handle the key only when ctrl is not pressed (defaults to undefined)
+alt         Boolean          True to handle key only when alt is pressed, False to handle the key only when alt is not pressed (defaults to undefined)
+handler     Function         The function to call when KeyMap finds the expected key combination
+fn          Function         Alias of handler (for backwards-compatibility)
+scope       Object           The scope of the callback function
+stopEvent   Boolean          True to stop the event from bubbling and prevent the default browser action if the key was handled by the KeyMap (defaults to false)
+</pre>
+     *
+     * Usage:
+     * <pre><code>
+// Create a KeyMap
+var map = new Ext.KeyMap(document, {
+    key: Ext.EventObject.ENTER,
+    fn: handleKey,
+    scope: this
+});
+
+//Add a new binding to the existing KeyMap later
+map.addBinding({
+    key: 'abc',
+    shift: true,
+    fn: handleKey,
+    scope: this
+});
+</code></pre>
+     * @param {Object/Array} config A single KeyMap config or an array of configs
+     */
+	addBinding : function(config){
+        if(Ext.isArray(config)){
+            Ext.each(config, function(c){
+                this.addBinding(c);
+            }, this);
+            return;
+        }
+        var keyCode = config.key,
+            fn = config.fn || config.handler,
+            scope = config.scope;
+
+	if (config.stopEvent) {
+	    this.stopEvent = config.stopEvent;    
+	}	
+
+        if(typeof keyCode == "string"){
+            var ks = [];
+            var keyString = keyCode.toUpperCase();
+            for(var j = 0, len = keyString.length; j < len; j++){
+                ks.push(keyString.charCodeAt(j));
+            }
+            keyCode = ks;
+        }
+        var keyArray = Ext.isArray(keyCode);
+        
+        var handler = function(e){
+            if(this.checkModifiers(config, e)){
+                var k = e.getKey();
+                if(keyArray){
+                    for(var i = 0, len = keyCode.length; i < len; i++){
+                        if(keyCode[i] == k){
+                          if(this.stopEvent){
+                              e.stopEvent();
+                          }
+                          fn.call(scope || window, k, e);
+                          return;
+                        }
+                    }
+                }else{
+                    if(k == keyCode){
+                        if(this.stopEvent){
+                           e.stopEvent();
+                        }
+                        fn.call(scope || window, k, e);
+                    }
+                }
+            }
+        };
+        this.bindings.push(handler);
+	},
+    
+    // private
+    checkModifiers: function(config, e){
+        var val, key, keys = ['shift', 'ctrl', 'alt'];
+        for (var i = 0, len = keys.length; i < len; ++i){
+            key = keys[i];
+            val = config[key];
+            if(!(val === undefined || (val === e[key + 'Key']))){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Shorthand for adding a single key listener
+     * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the
+     * following options:
+     * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     */
+    on : function(key, fn, scope){
+        var keyCode, shift, ctrl, alt;
+        if(typeof key == "object" && !Ext.isArray(key)){
+            keyCode = key.key;
+            shift = key.shift;
+            ctrl = key.ctrl;
+            alt = key.alt;
+        }else{
+            keyCode = key;
+        }
+        this.addBinding({
+            key: keyCode,
+            shift: shift,
+            ctrl: ctrl,
+            alt: alt,
+            fn: fn,
+            scope: scope
+        });
+    },
+
+    // private
+    handleKeyDown : function(e){
+	    if(this.enabled){ //just in case
+    	    var b = this.bindings;
+    	    for(var i = 0, len = b.length; i < len; i++){
+    	        b[i].call(this, e);
+    	    }
+	    }
+	},
+
+	/**
+	 * Returns true if this KeyMap is enabled
+	 * @return {Boolean}
+	 */
+	isEnabled : function(){
+	    return this.enabled;
+	},
+
+	/**
+	 * Enables this KeyMap
+	 */
+	enable: function(){
+		if(!this.enabled){
+		    this.el.on(this.eventName, this.handleKeyDown, this);
+		    this.enabled = true;
+		}
+	},
+
+	/**
+	 * Disable this KeyMap
+	 */
+	disable: function(){
+		if(this.enabled){
+		    this.el.removeListener(this.eventName, this.handleKeyDown, this);
+		    this.enabled = false;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    }
+};/**
+ * @class Ext.util.TextMetrics
+ * Provides precise pixel measurements for blocks of text so that you can determine exactly how high and
+ * wide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and
+ * should not contain any HTML, otherwise it may not be measured correctly.
+ * @singleton
+ */
+Ext.util.TextMetrics = function(){
+    var shared;
+    return {
+        /**
+         * Measures the size of the specified text
+         * @param {String/HTMLElement} el The element, dom node or id from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String} text The text to measure
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        measure : function(el, text, fixedWidth){
+            if(!shared){
+                shared = Ext.util.TextMetrics.Instance(el, fixedWidth);
+            }
+            shared.bind(el);
+            shared.setFixedWidth(fixedWidth || 'auto');
+            return shared.getSize(text);
+        },
+
+        /**
+         * Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces
+         * the overhead of multiple calls to initialize the style properties on each measurement.
+         * @param {String/HTMLElement} el The element, dom node or id that the instance will be bound to
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Ext.util.TextMetrics.Instance} instance The new instance
+         */
+        createInstance : function(el, fixedWidth){
+            return Ext.util.TextMetrics.Instance(el, fixedWidth);
+        }
+    };
+}();
+
+Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
+    var ml = new Ext.Element(document.createElement('div'));
+    document.body.appendChild(ml.dom);
+    ml.position('absolute');
+    ml.setLeftTop(-1000, -1000);
+    ml.hide();
+
+    if(fixedWidth){
+        ml.setWidth(fixedWidth);
+    }
+
+    var instance = {
+        /**
+         * Returns the size of the specified text based on the internal element's style and width properties
+         * @param {String} text The text to measure
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        getSize : function(text){
+            ml.update(text);
+            var s = ml.getSize();
+            ml.update('');
+            return s;
+        },
+
+        /**
+         * Binds this TextMetrics instance to an element from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String/HTMLElement} el The element, dom node or id
+         */
+        bind : function(el){
+            ml.setStyle(
+                Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing')
+            );
+        },
+
+        /**
+         * Sets a fixed width on the internal measurement element.  If the text will be multiline, you have
+         * to set a fixed width in order to accurately measure the text height.
+         * @param {Number} width The width to set on the element
+         */
+        setFixedWidth : function(width){
+            ml.setWidth(width);
+        },
+
+        /**
+         * Returns the measured width of the specified text
+         * @param {String} text The text to measure
+         * @return {Number} width The width in pixels
+         */
+        getWidth : function(text){
+            ml.dom.style.width = 'auto';
+            return this.getSize(text).width;
+        },
+
+        /**
+         * Returns the measured height of the specified text.  For multiline text, be sure to call
+         * {@link #setFixedWidth} if necessary.
+         * @param {String} text The text to measure
+         * @return {Number} height The height in pixels
+         */
+        getHeight : function(text){
+            return this.getSize(text).height;
+        }
+    };
+
+    instance.bind(bindTo);
+
+    return instance;
+};
+
+Ext.Element.addMethods({
+    /**
+     * Returns the width in pixels of the passed text, or the width of the text in this Element.
+     * @param {String} text The text to measure. Defaults to the innerHTML of the element.
+     * @param {Number} min (Optional) The minumum value to return.
+     * @param {Number} max (Optional) The maximum value to return.
+     * @return {Number} The text width in pixels.
+     * @member Ext.Element getTextWidth
+     */
+    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);
+    }
+});
+/**
+ * @class Ext.util.Cookies
+ * Utility class for managing and interacting with cookies.
+ * @singleton
+ */
+Ext.util.Cookies = {
+    /**
+     * Create a cookie with the specified name and value. Additional settings
+     * for the cookie may be optionally specified (for example: expiration,
+     * access restriction, SSL).
+     * @param {Object} name
+     * @param {Object} value
+     * @param {Object} expires (Optional) Specify an expiration date the
+     * cookie is to persist until.  Note that the specified Date object will
+     * be converted to Greenwich Mean Time (GMT). 
+     * @param {String} path (Optional) Setting a path on the cookie restricts
+     * access to pages that match that path. Defaults to all pages (<tt>'/'</tt>). 
+     * @param {String} domain (Optional) Setting a domain restricts access to
+     * pages on a given domain (typically used to allow cookie access across
+     * subdomains). For example, "extjs.com" will create a cookie that can be
+     * accessed from any subdomain of extjs.com, including www.extjs.com,
+     * support.extjs.com, etc.
+     * @param {Boolean} secure (Optional) Specify true to indicate that the cookie
+     * should only be accessible via SSL on a page using the HTTPS protocol.
+     * Defaults to <tt>false</tt>. Note that this will only work if the page
+     * calling this code uses the HTTPS protocol, otherwise the cookie will be
+     * created with default options.
+     */
+    set : function(name, value){
+        var argv = arguments;
+        var argc = arguments.length;
+        var expires = (argc > 2) ? argv[2] : null;
+        var path = (argc > 3) ? argv[3] : '/';
+        var domain = (argc > 4) ? argv[4] : null;
+        var secure = (argc > 5) ? argv[5] : false;
+        document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : "");
+    },
+
+    /**
+     * Retrieves cookies that are accessible by the current page. If a cookie
+     * does not exist, <code>get()</code> returns <tt>null</tt>.  The following
+     * example retrieves the cookie called "valid" and stores the String value
+     * in the variable <tt>validStatus</tt>.
+     * <pre><code>
+     * var validStatus = Ext.util.Cookies.get("valid");
+     * </code></pre>
+     * @param {Object} name The name of the cookie to get
+     * @return {Mixed} Returns the cookie value for the specified name;
+     * null if the cookie name does not exist.
+     */
+    get : function(name){
+        var arg = name + "=";
+        var alen = arg.length;
+        var clen = document.cookie.length;
+        var i = 0;
+        var j = 0;
+        while(i < clen){
+            j = i + alen;
+            if(document.cookie.substring(i, j) == arg){
+                return Ext.util.Cookies.getCookieVal(j);
+            }
+            i = document.cookie.indexOf(" ", i) + 1;
+            if(i === 0){
+                break;
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Removes a cookie with the provided name from the browser
+     * if found.
+     * @param {Object} name The name of the cookie to remove
+     */
+    clear : function(name){
+        if(Ext.util.Cookies.get(name)){
+            document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
+        }
+    },
+    /**
+     * @private
+     */
+    getCookieVal : function(offset){
+        var endstr = document.cookie.indexOf(";", offset);
+        if(endstr == -1){
+            endstr = document.cookie.length;
+        }
+        return unescape(document.cookie.substring(offset, endstr));
+    }
+};/**
+ * Framework-wide error-handler.  Developers can override this method to provide
+ * custom exception-handling.  Framework errors will often extend from the base
+ * Ext.Error class.
+ * @param {Object/Error} e The thrown exception object.
+ */
+Ext.handleError = function(e) {
+    throw e;
+};
+
+/**
+ * @class Ext.Error
+ * @extends Error
+ * <p>A base error class. Future implementations are intended to provide more
+ * robust error handling throughout the framework (<b>in the debug build only</b>)
+ * to check for common errors and problems. The messages issued by this class
+ * will aid error checking. Error checks will be automatically removed in the
+ * production build so that performance is not negatively impacted.</p>
+ * <p>Some sample messages currently implemented:</p><pre>
+"DataProxy attempted to execute an API-action but found an undefined
+url / function. Please review your Proxy url/api-configuration."
+ * </pre><pre>
+"Could not locate your "root" property in your server response.
+Please review your JsonReader config to ensure the config-property
+"root" matches the property your server-response.  See the JsonReader
+docs for additional assistance."
+ * </pre>
+ * <p>An example of the code used for generating error messages:</p><pre><code>
+try {
+    generateError({
+        foo: 'bar'
+    });
+}
+catch (e) {
+    console.error(e);
+}
+function generateError(data) {
+    throw new Ext.Error('foo-error', data);
+}
+ * </code></pre>
+ * @param {String} message
+ */
+Ext.Error = function(message) {
+    // Try to read the message from Ext.Error.lang
+    this.message = (this.lang[message]) ? this.lang[message] : message;
+}
+Ext.Error.prototype = new Error();
+Ext.apply(Ext.Error.prototype, {
+    // protected.  Extensions place their error-strings here.
+    lang: {},
+
+    name: 'Ext.Error',
+    /**
+     * getName
+     * @return {String}
+     */
+    getName : function() {
+        return this.name;
+    },
+    /**
+     * getMessage
+     * @return {String}
+     */
+    getMessage : function() {
+        return this.message;
+    },
+    /**
+     * toJson
+     * @return {String}
+     */
+    toJson : function() {
+        return Ext.encode(this);
+    }
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/ext-foundation.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.DomHelper=function(){var s=null,j=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,l=/^table|tbody|tr|td$/i,p,m="afterbegin",n="afterend",c="beforebegin",o="beforeend",a="<table>",h="</table>",b=a+"<tbody>",i="</tbody>"+h,k=b+"<tr>",r="</tr>"+i;function g(w,y,x,z,v,t){var u=p.insertHtml(z,Ext.getDom(w),q(y));return x?Ext.get(u,true):u}function q(y){var v="",u,x,w,t,z;if(typeof y=="string"){v=y}else{if(Ext.isArray(y)){Ext.each(y,function(A){v+=q(A)})}else{v+="<"+(y.tag=y.tag||"div");Ext.iterate(y,function(A,B){if(!/tag|children|cn|html$/i.test(A)){if(Ext.isObject(B)){v+=" "+A+"='";Ext.iterate(B,function(D,C){v+=D+":"+C+";"});v+="'"}else{v+=" "+({cls:"class",htmlFor:"for"}[A]||A)+"='"+B+"'"}}});if(j.test(y.tag)){v+="/>"}else{v+=">";if((z=y.children||y.cn)){v+=q(z)}else{if(y.html){v+=y.html}}v+="</"+y.tag+">"}}}return v}function e(y,w,v,x){s.innerHTML=[w,v,x].join("");var t=-1,u=s;while(++t<y){u=u.firstChild}return u}function d(t,u,w,v){var x,y;s=s||document.createElement("div");if(t=="td"&&(u==m||u==o)||!/td|tr|tbody/i.test(t)&&(u==c||u==n)){return}y=u==c?w:u==n?w.nextSibling:u==m?w.firstChild:null;if(u==c||u==n){w=w.parentNode}if(t=="td"||(t=="tr"&&(u==o||u==m))){x=e(4,k,v,r)}else{if((t=="tbody"&&(u==o||u==m))||(t=="tr"&&(u==c||u==n))){x=e(3,b,v,i)}else{x=e(2,a,v,h)}}w.insertBefore(x,y);return x}p={markup:function(t){return q(t)},insertHtml:function(y,t,z){var x={},v,B,A,C,w,u;y=y.toLowerCase();x[c]=["BeforeBegin","previousSibling"];x[n]=["AfterEnd","nextSibling"];if(t.insertAdjacentHTML){if(l.test(t.tagName)&&(u=d(t.tagName.toLowerCase(),y,t,z))){return u}x[m]=["AfterBegin","firstChild"];x[o]=["BeforeEnd","lastChild"];if((v=x[y])){t.insertAdjacentHTML(v[0],z);return t[v[1]]}}else{A=t.ownerDocument.createRange();B="setStart"+(/end/i.test(y)?"After":"Before");if(x[y]){A[B](t);C=A.createContextualFragment(z);t.parentNode.insertBefore(C,y==c?t:t.nextSibling);return t[(y==c?"previous":"next")+"Sibling"]}else{w=(y==m?"first":"last")+"Child";if(t.firstChild){A[B](t[w]);C=A.createContextualFragment(z);if(y==m){t.insertBefore(C,t.firstChild)}else{t.appendChild(C)}}else{t.innerHTML=z}return t[w]}}throw'Illegal insertion point -> "'+y+'"'},insertBefore:function(t,v,u){return g(t,v,u,c)},insertAfter:function(t,v,u){return g(t,v,u,n,"nextSibling")},insertFirst:function(t,v,u){return g(t,v,u,m,"firstChild")},append:function(t,v,u){return g(t,v,u,o,"",true)},overwrite:function(t,v,u){t=Ext.getDom(t);t.innerHTML=q(v);return u?Ext.get(t.firstChild):t.firstChild},createHtml:q};return p}();Ext.apply(Ext.DomHelper,function(){var d,a="afterbegin",g="afterend",h="beforebegin",c="beforeend";function e(l,n,m,p,k,i){l=Ext.getDom(l);var j;if(d.useDom){j=b(n,null);if(i){l.appendChild(j)}else{(k=="firstChild"?l:l.parentNode).insertBefore(j,l[k]||l)}}else{j=Ext.DomHelper.insertHtml(p,l,Ext.DomHelper.createHtml(n))}return m?Ext.get(j,true):j}function b(p,j){var l,m=document,k,i,n,q;if(Ext.isArray(p)){l=m.createDocumentFragment();Ext.each(p,function(o){b(o,l)})}else{if(Ext.isString(p)){l=m.createTextNode(p)}else{l=m.createElement(p.tag||"div");k=!!l.setAttribute;Ext.iterate(p,function(o,r){if(!/tag|children|cn|html|style/.test(o)){if(o=="cls"){l.className=r}else{if(k){l.setAttribute(o,r)}else{l[o]=r}}}});d.applyStyles(l,p.style);if((q=p.children||p.cn)){b(q,l)}else{if(p.html){l.innerHTML=p.html}}}}if(j){j.appendChild(l)}return l}d={createTemplate:function(j){var i=Ext.DomHelper.createHtml(j);return new Ext.Template(i)},useDom:false,applyStyles:function(m,n){if(n){var k=0,j,l;m=Ext.fly(m);if(Ext.isFunction(n)){n=n.call()}if(Ext.isString(n)){n=n.trim().split(/\s*(?::|;)\s*/);for(j=n.length;k<j;){m.setStyle(n[k++],n[k++])}}else{if(Ext.isObject(n)){m.setStyle(n)}}}},insertBefore:function(i,k,j){return e(i,k,j,h)},insertAfter:function(i,k,j){return e(i,k,j,g,"nextSibling")},insertFirst:function(i,k,j){return e(i,k,j,a,"firstChild")},append:function(i,k,j){return e(i,k,j,c,"",true)},createDom:b};return d}());Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.apply(Ext.Template.prototype,{applyTemplate:function(b){var g=this,a=g.disableFormats!==true,e=Ext.util.Format,c=g;if(g.compiled){return g.compiled(b)}function d(j,l,p,k){if(p&&a){if(p.substr(0,5)=="this."){return c.call(p.substr(5),b[l],b)}else{if(k){var o=/^\s*['"](.*)["']\s*$/;k=k.split(",");for(var n=0,h=k.length;n<h;n++){k[n]=k[n].replace(o,"$1")}k=[b[l]].concat(k)}else{k=[b[l]]}return e[p].apply(e,k)}}else{return b[l]!==undefined?b[l]:""}}return g.html.replace(g.re,d)},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var me=this,fm=Ext.util.Format,useF=me.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"}if(Ext.isGecko){body="this.compiled = function(values){ return '"+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return me},call:function(c,b,a){return this[c](b,a)}});Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(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=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;(function(){var i=Ext.util,l=Ext.toArray,k=Ext.each,a=Ext.isObject,h=true,j=false;i.Observable=function(){var m=this,n=m.events;if(m.listeners){m.on(m.listeners);delete m.listeners}m.events=n||{}};i.Observable.prototype=function(){var n=/^(?:scope|delay|buffer|single)$/,m=function(o){return o.toLowerCase()};return{fireEvent:function(){var o=l(arguments),r=m(o[0]),s=this,p=h,u=s.events[r],t,v;if(s.eventsSuspended===h){if(t=s.suspendedEventsQueue){t.push(o)}}else{if(a(u)&&u.bubble){if(u.fire.apply(u,o.slice(1))===j){return j}v=s.getBubbleTarget&&s.getBubbleTarget();if(v&&v.enableBubble){v.enableBubble(r);return v.fireEvent.apply(v,o)}}else{if(a(u)){o.shift();p=u.fire.apply(u,o)}}}return p},addListener:function(r,u,w,q){var t=this,s,x,v,p;if(a(r)){q=r;for(s in q){x=q[s];if(!n.test(s)){t.addListener(s,x.fn||x,x.scope||q.scope,x.fn?x:q)}}}else{r=m(r);p=t.events[r]||h;if(typeof p=="boolean"){t.events[r]=p=new i.Event(t,r)}p.addListener(u,w,a(q)?q:{})}},removeListener:function(o,q,p){var r=this.events[m(o)];if(a(r)){r.removeListener(q,p)}},purgeListeners:function(){var q=this.events,o,p;for(p in q){o=q[p];if(a(o)){o.clearListeners()}}},addEvents:function(q){var p=this;p.events=p.events||{};if(typeof q=="string"){k(arguments,function(o){p.events[o]=p.events[o]||h})}else{Ext.applyIf(p.events,q)}},hasListener:function(o){var p=this.events[o];return a(p)&&p.listeners.length>0},suspendEvents:function(o){this.eventsSuspended=h;if(o){this.suspendedEventsQueue=[]}},resumeEvents:function(){var o=this;o.eventsSuspended=!delete o.suspendedEventQueue;k(o.suspendedEventsQueue,function(p){o.fireEvent.apply(o,p)})}}}();var e=i.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;i.Observable.releaseCapture=function(m){m.fireEvent=e.fireEvent};function g(n,p,m){return function(){if(p.target==arguments[0]){n.apply(m,l(arguments))}}}function c(p,q,n){var m=new i.DelayedTask();return function(){m.delay(q.buffer,p,n,l(arguments))}}function d(o,p,n,m){return function(){p.removeListener(n,m);return o.apply(m,arguments)}}function b(n,p,m){return function(){var o=l(arguments);(function(){n.apply(m,o)}).defer(p.delay||10)}}i.Event=function(n,m){this.name=m;this.obj=n;this.listeners=[]};i.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.push(m)}},createListener:function(q,p,r){r=r||{},p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=g(n,r,p)}if(r.delay){n=b(n,r,p)}if(r.single){n=d(n,this,q,p)}if(r.buffer){n=c(n,r,p)}m.fireFn=n;return m},findListener:function(p,o){var n,m=-1;k(this.listeners,function(q,r){n=q.scope;if(q.fn==p&&(n==o||n==this.obj)){m=r;return j}},this);return m},isListening:function(n,m){return this.findListener(n,m)!=-1},removeListener:function(p,o){var n,q=this,m=j;if((n=q.findListener(p,o))!=-1){if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.splice(n,1);m=h}return m},clearListeners:function(){this.listeners=[]},fire:function(){var o=this,n=l(arguments),m=h;k(o.listeners,function(p){o.firing=h;if(p.fireFn.apply(p.scope||o.obj||window,n)===j){return m=o.firing=j}});o.firing=j;return m}}})();Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if(!Ext.isEmpty(c=l.apply(k||h,e))){if(Ext.isObject(c)){d=!Ext.isEmpty(c.returnValue)?c.returnValue:c;g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var e=Ext.toArray(arguments);d=c=undefined;g=false;Ext.each(i.before,function(k){b(k.fn,k.scope,e);if(g){return d}});if(!Ext.isEmpty(c=i.originalFn.apply(h,e))){d=c}Ext.each(i.after,function(k){b(k.fn,k.scope,e);if(g){return d}});return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(h,c,b){var g=a.call(this,h),d=false;Ext.each(g.before,function(j,k,e){if(j.fn==c&&j.scope==b){e.splice(k,1);d=true;return false}});if(!d){Ext.each(g.after,function(j,k,e){if(j.fn==c&&j.scope==b){e.splice(k,1);return false}})}},relayEvents:function(e,b){var d=this;function c(g){return function(){return d.fireEvent.apply(d,[g].concat(Ext.toArray(arguments)))}}Ext.each(b,function(g){d.events[g]=d.events[g]||true;e.on(g,c(g),d)})},enableBubble:function(b){var c=this;b=Ext.isArray(b)?b:Ext.toArray(arguments);Ext.each(b,function(d){d=d.toLowerCase();var e=c.events[d]||true;if(typeof e=="boolean"){e=new Ext.util.Event(c,d);c.events[d]=e}e.bubble=true})}}}());Ext.util.Observable.capture=function(c,b,a){c.fireEvent=c.fireEvent.createInterceptor(b,a)};Ext.util.Observable.observeClass=function(a){Ext.apply(a,new Ext.util.Observable());a.prototype.fireEvent=function(){return(a.fireEvent.apply(a,arguments)!==false)&&(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false)}};Ext.EventManager=function(){var t,m,j=false,l=Ext.lib.Event,n=Ext.lib.Dom,b=document,u=window,g="ie-deferred-loader",o="DOMContentLoaded",e={},h=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function k(A,w,z,y,x){var C=Ext.id(A),B=e[C]=e[C]||{};(B[w]=B[w]||[]).push([z,y,x]);l.on(A,w,y);if(w=="mousewheel"&&A.addEventListener){var v=["DOMMouseScroll",y,false];A.addEventListener.apply(A,v);l.on(window,"unload",function(){A.removeEventListener.apply(A,v)})}if(w=="mousedown"&&A==document){Ext.EventManager.stoppedMouseDownEvent.addListener(y)}}function c(){if(!j){Ext.isReady=j=true;if(m){clearInterval(m)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(o,c,false)}if(Ext.isIE){var v=b.getElementById(g);if(v){v.onreadystatechange=null;v.parentNode.removeChild(v)}}if(t){t.fire();t.clearListeners()}}}function a(){var v="complete";t=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(o,c,false)}else{if(Ext.isIE){b.write("<script id="+g+' defer="defer" src="//:"><\/script>');b.getElementById(g).onreadystatechange=function(){if(this.readyState==v){c()}}}else{if(Ext.isWebKit){m=setInterval(function(){if(b.readyState==v){c()}},10)}}}l.on(u,"load",c)}function r(v,w){return function(){var x=Ext.toArray(arguments);if(w.target==Ext.EventObject.setEvent(x[0]).target){v.apply(this,x)}}}function s(w,x){var v=new Ext.util.DelayedTask(w);return function(y){v.delay(x.buffer,w,null,[new Ext.EventObjectImpl(y)])}}function p(z,y,v,x,w){return function(A){Ext.EventManager.removeListener(y,v,x,w);z(A)}}function d(v,w){return function(x){x=new Ext.EventObjectImpl(x);setTimeout(function(){v(x)},w.delay||10)}}function i(x,w,v,B,A){var C=!Ext.isObject(v)?{}:v,z=Ext.getDom(x);B=B||C.fn;A=A||C.scope;if(!z){throw'Error listening for "'+w+'". Element "'+x+"\" doesn't exist."}function y(E){if(!Ext){return}E=Ext.EventObject.setEvent(E);var D;if(C.delegate){if(!(D=E.getTarget(C.delegate,z))){return}}else{D=E.target}if(C.stopEvent){E.stopEvent()}if(C.preventDefault){E.preventDefault()}if(C.stopPropagation){E.stopPropagation()}if(C.normalized){E=E.browserEvent}B.call(A||z,E,D,C)}if(C.target){y=r(y,C)}if(C.delay){y=d(y,C)}if(C.single){y=p(y,z,w,B,A)}if(C.buffer){y=s(y,C)}k(z,w,B,y,A);return y}var q={addListener:function(x,v,z,y,w){if(Ext.isObject(v)){var C=v,A,B;for(A in C){B=C[A];if(!h.test(A)){if(Ext.isFunction(B)){i(x,A,C,B,C.scope)}else{i(x,A,B)}}}}else{i(x,v,w,z,y)}},removeListener:function(w,v,A,z){var y=Ext.getDom(w),B=Ext.id(y),x;Ext.each((e[B]||{})[v],function(D,E,C){if(Ext.isArray(D)&&D[0]==A&&(!z||D[2]==z)){l.un(y,v,x=D[1]);C.splice(E,1);return false}});if(v=="mousewheel"&&y.addEventListener&&x){y.removeEventListener("DOMMouseScroll",x,false)}if(v=="mousedown"&&y==b&&x){Ext.EventManager.stoppedMouseDownEvent.removeListener(x)}},removeAll:function(w){var y=Ext.id(w=Ext.getDom(w)),x=e[y],v;for(v in x){if(x.hasOwnProperty(v)){Ext.each(x[v],function(z){l.un(w,v,z.wrap)})}}e[y]=null},onDocumentReady:function(x,w,v){if(j){t.addListener(x,w,v);t.fire();t.clearListeners()}else{if(!t){a()}v=v||{};v.delay=v.delay||1;t.addListener(x,w,v)}},elHash:e};q.on=q.addListener;q.un=q.removeListener;q.stoppedMouseDownEvent=new Ext.util.Event();return q}();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.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")))}else{if(Ext.isChrome){b.push("ext-chrome")}}if(Ext.isMac){b.push("ext-mac")}if(Ext.isLinux){b.push("ext-linux")}if(Ext.isStrict||Ext.isBorderBox){var d=c.parentNode;if(d){d.className+=Ext.isStrict?" ext-strict":" ext-border-box"}}c.className+=b.join(" ");return true};if(!a()){Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d)}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g)}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0]}return d},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopEvent(d.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopPropagation(d.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120}else{if(d.detail){g=-d.detail/3}}return g},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e))}return false}};return new Ext.EventObjectImpl()}();Ext.apply(Ext.EventManager,function(){var c,j,e,b,a=Ext.lib.Dom,k=Ext.lib.Event,i=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,h=0,g=0,d=Ext.isSafari?Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1]||2)>=3.1:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(g!=m||h!=l){c.fire(h=l,g=m)}},onWindowResize:function(n,m,l){if(!c){c=new Ext.util.Event();j=new Ext.util.DelayedTask(this.doResizeEvent);k.on(window,"resize",this.fireWindowResize,this)}c.addListener(n,m,l)},fireWindowResize:function(){if(c){if((Ext.isIE||Ext.isAir)&&j){j.delay(50)}else{c.fire(a.getViewWidth(),a.getViewHeight())}}},onTextResize:function(o,n,l){if(!e){e=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){e.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(o,n,l)},removeResizeListener:function(m,l){if(c){c.removeListener(m,l)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{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,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=45)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});(function(){var i=document;Ext.Element=function(n,o){var p=typeof n=="string"?i.getElementById(n):n,q;if(!p){return null}q=p.id;if(!o&&q&&Ext.Element.cache[q]){return Ext.Element.cache[q]}this.dom=p;this.id=q||Ext.id(p)};var a=Ext.lib.Dom,e=Ext.DomHelper,l=Ext.lib.Event,d=Ext.lib.Anim,g=Ext.Element;g.prototype={set:function(s,p){var q=this.dom,n,r;for(n in s){r=s[n];if(n!="style"&&!Ext.isFunction(r)){if(n=="cls"){q.className=r}else{if(s.hasOwnProperty(n)){if(p||!!q.setAttribute){q.setAttribute(n,r)}else{q[n]=r}}}}}if(s.style){Ext.DomHelper.applyStyles(q,s.style)}return this},defaultUnit:"px",is:function(n){return Ext.DomQuery.is(this.dom,n)},focus:function(q,p){var n=this,p=p||n.dom;try{if(Number(q)){n.focus.defer(q,null,[null,p])}else{p.focus()}}catch(o){}return n},blur:function(){try{this.dom.blur()}catch(n){}return this},getValue:function(n){var o=this.dom.value;return n?parseInt(o,10):o},addListener:function(n,q,p,o){Ext.EventManager.on(this.dom,n,q,p||this,o);return this},removeListener:function(n,p,o){Ext.EventManager.removeListener(this.dom,n,p,o||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},addUnits:function(n){if(n===""||n=="auto"||n===undefined){n=n||""}else{if(!isNaN(n)||!j.test(n)){n=n+(this.defaultUnit||"px")}}return n},load:function(o,p,n){Ext.Ajax.request(Ext.apply({params:p,url:o.url||o,callback:n,el:this.dom,indicatorText:o.indicatorText||""},Ext.isObject(o)?o:{}));return this},isBorderBox:function(){return h[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var n=this,o=n.dom;n.removeAllListeners();delete g.cache[o.id];delete g.dataCache[o.id];Ext.removeNode(o)},hover:function(o,n,q,p){var r=this;r.on("mouseenter",o,q||r.dom,p);r.on("mouseleave",n,q||r.dom,p);return r},contains:function(n){return !n?false:Ext.lib.Dom.isAncestor(this.dom,n.dom?n.dom:n)},getAttributeNS:function(o,n){return this.getAttribute(n,o)},getAttribute:Ext.isIE?function(n,p){var q=this.dom,o=typeof q[p+":"+n];if(["undefined","unknown"].indexOf(o)==-1){return q[p+":"+n]}return q[n]}:function(n,o){var p=this.dom;return p.getAttributeNS(o,n)||p.getAttribute(o+":"+n)||p.getAttribute(n)||p[n]},update:function(n){this.dom.innerHTML=n;return this}};var m=g.prototype;g.addMethods=function(n){Ext.apply(m,n)};m.on=m.addListener;m.un=m.removeListener;m.autoBoxAdjust=true;var j=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;g.cache={};g.dataCache={};g.get=function(o){var n,r,q;if(!o){return null}if(typeof o=="string"){if(!(r=i.getElementById(o))){return null}if(n=g.cache[o]){n.dom=r}else{n=g.cache[o]=new g(r)}return n}else{if(o.tagName){if(!(q=o.id)){q=Ext.id(o)}if(n=g.cache[q]){n.dom=o}else{n=g.cache[q]=new g(o)}return n}else{if(o instanceof g){if(o!=c){o.dom=i.getElementById(o.id)||o.dom;g.cache[o.id]=o}return o}else{if(o.isComposite){return o}else{if(Ext.isArray(o)){return g.select(o)}else{if(o==i){if(!c){var p=function(){};p.prototype=g.prototype;c=new p();c.dom=i}return c}}}}}}return null};g.data=function(o,n,p){var q=g.dataCache[o.id];if(!q){q=g.dataCache[o.id]={}}if(arguments.length==2){return q[n]}else{q[n]=p}};function k(){if(!Ext.enableGarbageCollector){clearInterval(g.collectorThread)}else{var n,o,p;for(n in g.cache){o=g.cache[n];p=o.dom;if(!p||!p.parentNode||(!p.offsetParent&&!i.getElementById(n))){delete g.cache[n];if(p&&Ext.enableListenerCollection){Ext.EventManager.removeAll(p)}}}}}g.collectorThreadId=setInterval(k,30000);var b=function(){};b.prototype=g.prototype;g.Flyweight=function(n){this.dom=n};g.Flyweight.prototype=new b();g.Flyweight.prototype.isFlyweight=true;g._flyweights={};g.fly=function(p,n){var o=null;n=n||"_global";if(p=Ext.getDom(p)){(g._flyweights[n]=g._flyweights[n]||new g.Flyweight()).dom=p;o=g._flyweights[n]}return o};Ext.get=g.get;Ext.fly=g.fly;var h=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){h.button=1}Ext.EventManager.on(window,"unload",function(){delete g.cache;delete g.dataCache;delete g._flyweights})})();Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!/\S/.test(g.nodeValue)){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(Ext.isFunction(callback)){callback()}return this}var id=Ext.id(),dom=this.dom;html+='<span id="'+id+'"></span>';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];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])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(Ext.isFunction(callback)){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},createProxy:function(a,e,d){a=Ext.isObject(a)?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.uncache=function(e){for(var d=0,c=arguments,b=c.length;d<b;d++){if(c[d]){delete Ext.Element.cache[c[d].id||c[d]]}}};Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,g,c,a,i,j){var h=this,e=h.dom;function d(){Ext.fly(e).alignTo(b,g,c,a);Ext.callback(j,Ext.fly(e))}Ext.EventManager.onWindowResize(d,h);if(!Ext.isEmpty(i)){Ext.EventManager.on(window,"scroll",d,h,{buffer:!isNaN(i)?i:50})}d.call(h);return h},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(A=="?"?"tl-bl?":(!/-/.test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(n<E){n=z?v.right:E}if(l+F>G+D){l=u?v.top-F:G+D-F}if(l<D){l=u?v.bottom:D}}return[n,l]},alignTo:function(c,a,e,b){var d=this;return d.setXY(d.getAlignToXY(c,a,e),d.preanim&&!!b?d.preanim(arguments,3):false)},adjustForConstraints:function(c,a,b){return this.getConstrainToXY(a||document,false,b,c)||c},getConstrainToXY:function(b,a,c,e){var d={top:0,left:0,bottom:0,right:0};return function(i,z,k,m){i=Ext.get(i);k=k?Ext.applyIf(k,d):d;var v,C,u=0,t=0;if(i.dom==document.body||i.dom==document){v=Ext.lib.Dom.getViewWidth();C=Ext.lib.Dom.getViewHeight()}else{v=i.dom.clientWidth;C=i.dom.clientHeight;if(!z){var r=i.getXY();u=r[0];t=r[1]}}var q=i.getScroll();u+=k.left+q.left;t+=k.top+q.top;v-=k.right;C-=k.bottom;var A=u+v;var g=t+C;var j=m||(!z?this.getXY():[this.getLeft(true),this.getTop(true)]);var o=j[0],n=j[1];var p=this.dom.offsetWidth,B=this.dom.offsetHeight;var l=false;if((o+p)>A){o=A-p;l=true}if((n+B)>g){n=g-B;l=true}if(o<u){o=u;l=true}if(n<t){n=t;l=true}return l?[o,n]:false}}(),getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(a){return this.alignTo(a||document,"c-c")}});Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k<l&&j!=g&&j!=i){if(e.is(j,m)){return h?a(j):j}k++;j=j.parentNode}return null},findParentNode:function(j,i,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(j,i,g):null},up:function(h,g){return this.findParentNode(h,g,true)},select:function(g,h){return Ext.Element.select(g,h,this.dom)},query:function(g,h){return e.select(g,this.dom)},child:function(g,h){var i=e.selectNode(g,this.dom);return h?i:a(i)},down:function(g,h){var i=e.selectNode(" > "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods(function(){var d=Ext.getDom,a=Ext.get,c=Ext.DomHelper,b=function(e){return(e.nodeType||e.dom||typeof e=="string")};return{appendChild:function(e){return a(e).appendTo(this)},appendTo:function(e){d(e).appendChild(this.dom);return this},insertBefore:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e);return this},insertAfter:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e.nextSibling);return this},insertFirst:function(g,e){g=g||{};if(b(g)){g=d(g);this.dom.insertBefore(g,this.dom.firstChild);return !e?a(g):g}else{return this.createChild(g,this.dom.firstChild,e)}},replace:function(e){e=a(e);this.insertBefore(e);e.remove();return this},replaceWith:function(g){var h=this,e=Ext.Element;if(b(g)){g=d(g);h.dom.parentNode.insertBefore(g,h.dom)}else{g=c.insertBefore(h.dom,g)}delete e.cache[h.id];Ext.removeNode(h.dom);h.id=Ext.id(h.dom=g);return e.cache[h.id]=h},createChild:function(g,e,h){g=g||{tag:"div"};return e?c.insertBefore(e,g,h!==true):c[!this.dom.firstChild?"overwrite":"append"](this.dom,g,h!==true)},wrap:function(e,g){var h=c.insertBefore(this.dom,e||{tag:"div"},!g);h.dom?h.dom.appendChild(this.dom):h.appendChild(this.dom);return h},insertHtml:function(g,h,e){var i=c.insertHtml(g,this.dom,h);return e?Ext.get(i):i}}}());Ext.apply(Ext.Element.prototype,function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{insertSibling:function(h,e,g){var i=this,d;if(Ext.isArray(h)){Ext.each(h,function(j){d=i.insertSibling(j,e,g)});return d}e=(e||"before").toLowerCase();h=h||{};if(h.nodeType||h.dom){d=i.dom.parentNode.insertBefore(c(h),e=="before"?i.dom:i.dom.nextSibling);if(!g){d=a(d)}}else{if(e=="after"&&!i.dom.nextSibling){d=b.append(i.dom.parentNode,h,!g)}else{d=b[e=="after"?"insertAfter":"insertBefore"](i.dom,h,!g)}}return d}}}());Ext.Element.addMethods(function(){var h={},y=/(-[a-z])/gi,b={},t=document.defaultView,v=Ext.isIE?"styleFloat":"cssFloat",D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,d="padding",c="margin",z="border",u="-left",r="-right",x="-top",o="-bottom",j="-width",s=Math,A="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:z+u+j,r:z+r+j,t:z+x+j,b:z+o+j},g={l:d+u,r:d+r,t:d+x,b:d+o},a={l:c+u,r:c+r,t:c+x,b:c+o},E=Ext.Element.data;function q(F,G){return G.charAt(1).toUpperCase()}function p(G,F){var H=0;Ext.each(G.match(/\w/g),function(I){if(I=parseInt(this.getStyle(F[I]),10)){H+=s.abs(I)}},this);return H}function w(F){return h[F]||(h[F]=F=="float"?v:F.replace(y,q))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(F){var G=this;Ext.each(F,function(H){G.dom.className+=(!G.hasClass(H)&&H?" "+H:"")});return G},radioClass:function(F){Ext.each(this.dom.parentNode.childNodes,function(G){if(G.nodeType==1){Ext.fly(G,"_internal").removeClass(F)}});return this.addClass(F)},removeClass:function(F){var G=this;if(G.dom.className){Ext.each(F,function(H){G.dom.className=G.dom.className.replace(b[H]=b[H]||new RegExp("(?:^|\\s+)"+H+"(?:\\s+|$)","g")," ")})}return G},toggleClass:function(F){return this.hasClass(F)?this.removeClass(F):this.addClass(F)},hasClass:function(F){return F&&(" "+this.dom.className+" ").indexOf(" "+F+" ")!=-1},replaceClass:function(G,F){return this.removeClass(G).addClass(F)},isStyle:function(F,G){return this.getStyle(F)==G},getStyle:function(){return t&&t.getComputedStyle?function(I){var H=this.dom,F,G;if(H==document){return null}I=w(I);return(F=H.style[I])?F:(G=t.getComputedStyle(H,""))?G[I]:null}:function(J){var H=this.dom,F,G;if(H==document){return null}if(J=="opacity"){if(H.style.filter.match){if(F=H.style.filter.match(D)){var I=parseFloat(F[1]);if(!isNaN(I)){return I?I/100:0}}}return 1}J=w(J);return H.style[J]||((G=H.currentStyle)?G[J]:null)}}(),getColor:function(F,G,K){var I=this.getStyle(F),H=K||"#",J;if(!I||/transparent|inherit/.test(I)){return G}if(/^r/.test(I)){Ext.each(I.slice(4,I.length-1).split(","),function(L){J=parseInt(L,10);H+=(J<16?"0":"")+J.toString(16)})}else{I=I.replace("#","");H+=I.length==3?I.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):I}return(H.length>5?H.toLowerCase():G)},setStyle:function(J,I){var G,H,F;if(!Ext.isObject(J)){G={};G[J]=I;J=G}for(H in J){I=J[H];H=="opacity"?this.setOpacity(I):this.dom.style[w(H)]=I}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,I=G.dom,F=s.max(I.offsetHeight,I.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,I=H.dom,F=s.max(I.offsetWidth,I.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return p.call(this,F,i)},getPadding:function(F){return p.call(this,F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,A);F.setStyle(n,A);F.setStyle(m,A)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:p,margins:a}}());Ext.Element.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>';Ext.Element.addMethods(function(){var a="_internal";return{applyStyles:function(b){Ext.DomHelper.applyStyles(this.dom,b);return this},getStyles:function(){var b={};Ext.each(arguments,function(c){b[c]=this.getStyle(c)},this);return b},getStyleSize:function(){var g=this,b,e,i=this.dom,c=i.style;if(c.width&&c.width!="auto"){b=parseInt(c.width,10);if(g.isBorderBox()){b-=g.getFrameWidth("lr")}}if(c.height&&c.height!="auto"){e=parseInt(c.height,10);if(g.isBorderBox()){e-=g.getFrameWidth("tb")}}return{width:b||g.getWidth(true),height:e||g.getHeight(true)}},setOverflow:function(b){var c=this.dom;if(b=="auto"&&Ext.isMac&&Ext.isGecko2){c.style.overflow="hidden";(function(){c.style.overflow="auto"}).defer(1)}else{c.style.overflow=b}},boxWrap:function(b){b=b||"x-box";var c=Ext.get(this.insertHtml("beforeBegin","<div class='"+b+"'>"+String.format(Ext.Element.boxMarkup,b)+"</div>"));Ext.DomQuery.selectNode("."+b+"-mc",c.dom).appendChild(this.dom);return c},setSize:function(d,b,c){var e=this;if(Ext.isObject(d)){b=d.height;d=d.width}d=e.adjustWidth(d);b=e.adjustHeight(b);if(!c||!e.anim){e.dom.style.width=e.addUnits(d);e.dom.style.height=e.addUnits(b)}else{e.anim({width:{to:d},height:{to:b}},e.preanim(arguments,2))}return e},getComputedHeight:function(){var c=this,b=Math.max(c.dom.offsetHeight,c.dom.clientHeight);if(!b){b=parseInt(c.getStyle("height"),10)||0;if(!c.isBorderBox()){b+=c.getFrameWidth("tb")}}return b},getComputedWidth:function(){var b=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!b){b=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){b+=this.getFrameWidth("lr")}}return b},getFrameWidth:function(c,b){return b&&this.isBorderBox()?0:(this.getPadding(c)+this.getBorderWidth(c))},addClassOnOver:function(b){this.hover(function(){Ext.fly(this,a).addClass(b)},function(){Ext.fly(this,a).removeClass(b)});return this},addClassOnFocus:function(b){this.on("focus",function(){Ext.fly(this,a).addClass(b)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(b)},this.dom);return this},addClassOnClick:function(b){var c=this.dom;this.on("mousedown",function(){Ext.fly(c,a).addClass(b);var g=Ext.getDoc(),e=function(){Ext.fly(c,a).removeClass(b);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var e=document,g=this.dom,c=Ext.lib.Dom,b=(g==e||g==e.body);return{width:(b?c.getViewWidth():g.clientWidth),height:(b?c.getViewHeight():g.clientHeight)}},getSize:function(b){return{width:this.getWidth(b),height:this.getHeight(b)}},repaint:function(){var b=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(b).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(c){var d=this,b,e={t:"top",l:"left",r:"right",b:"bottom"},g={};if(!c){for(b in d.margins){g[e[b]]=parseInt(d.getStyle(d.margins[b]),10)||0}return g}else{return d.addStyles.call(d,c,d.margins)}}}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";function l(n,m,o){return this.preanim&&!!m?this.preanim(n,o):false}Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(m){var p=this.getXY(),n=Ext.fly(m,"_internal").getXY();return[p[0]-n[0],p[1]-n[1]]},setX:function(m,n){return this.setXY([m,this.getY()],l.call(this,arguments,n,1))},setY:function(n,m){return this.setXY([this.getX(),n],l.call(this,arguments,m,1))},setLeft:function(m){this.setStyle(b,this.addUnits(m));return this},setTop:function(m){this.setStyle(d,this.addUnits(m));return this},setRight:function(m){this.setStyle(g,this.addUnits(m));return this},setBottom:function(m){this.setStyle(i,this.addUnits(m));return this},setXY:function(o,m){var n=this;if(!m||!n.anim){a.setXY(n.dom,o)}else{n.anim({points:{to:o}},n.preanim(arguments,1),"motion")}return n},setLocation:function(m,o,n){return this.setXY([m,o],l.call(this,arguments,n,2))},moveTo:function(m,o,n){return this.setXY([m,o],l.call(this,arguments,n,2))},getLeft:function(m){return !m?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(m){var n=this;return !m?n.getX()+n.getWidth():(n.getLeft(true)+n.getWidth())||0},getTop:function(m){return !m?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(m){var n=this;return !m?n.getY()+n.getHeight():(n.getTop(true)+n.getHeight())||0},position:function(q,p,m,o){var n=this;if(!q&&n.isStyle(h,c)){n.setStyle(h,e)}else{if(q){n.setStyle(h,q)}}if(p){n.setStyle(k,p)}if(m||o){n.setXY([m||false,o||false])}},clearPositioning:function(m){m=m||"";this.setStyle({left:m,right:m,top:m,bottom:m,"z-index":"",position:c});return this},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)}},setPositioning:function(m){var o=this,n=o.dom.style;o.setStyle(m);if(m.right==j){n.right=""}if(m.bottom==j){n.bottom=""}return o},translatePoints:function(m,u){u=isNaN(m[1])?u:m[1];m=isNaN(m[0])?m:m[0];var q=this,r=q.isStyle(h,e),s=q.getXY(),n=parseInt(q.getStyle(b),10),p=parseInt(q.getStyle(d),10);n=!isNaN(n)?n:(r?0:q.dom.offsetLeft);p=!isNaN(p)?p:(r?0:q.dom.offsetTop);return{left:(m-s[0]+n),top:(u-s[1]+p)}},animTest:l})})();Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.addMethods({scrollTo:function(c,e,b){var a=/top/i,h="scroll"+(a.test(c)?"Top":"Left"),d=this,g=d.dom;if(!b||!d.anim){g[h]=e}else{d.anim({scroll:{to:a.test(h)?[g[h],e]:[e,g[h]]}},d.preanim(arguments,2),"scroll")}return d},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||u<m){p.scrollTop=u}else{if(q>j){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||k<s){p.scrollLeft=k}else{if(d>n){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",j="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,i=function(m){var l=g(m,a);if(l===undefined){g(m,a,l="")}return l},k=function(n){var l=g(n,c);if(l===undefined){g(n,c,l=1)}return l};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(l){g(this.dom,c,l);return this},animate:function(m,o,n,p,l){this.anim(m,{duration:o,callback:n,easing:p},l);return this},anim:function(o,p,m,r,n,l){m=m||"run";p=p||{};var q=this,s=Ext.lib.Anim[m](q.dom,o,(p.duration||r)||0.35,(p.easing||n)||"easeOut",function(){if(l){l.call(q)}if(p.callback){p.callback.call(p.scope||q,q,p)}},q);p.anim=s;return s},preanim:function(l,m){return !l[m]?false:(Ext.isObject(l[m])?l[m]:{duration:l[m+1],callback:l[m+2],easing:l[m+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,j)},setVisible:function(p,m){var n=this,o=n.dom,l=k(this.dom)==e;if(!m||!n.anim){if(l){n.setDisplayed(p)}else{n.fixDisplay();o.style.visibility=p?"visible":b}}else{if(p){n.setOpacity(0.01);n.setVisible(true)}n.anim({opacity:{to:(p?1:0)}},n.preanim(arguments,1),null,0.35,"easeIn",function(){if(!p){o.style[l?d:h]=(l)?j:b;Ext.fly(o).setOpacity(1)}})}return n},toggle:function(l){var m=this;m.setVisible(!m.isVisible(),m.preanim(arguments,0));return m},setDisplayed:function(l){if(typeof l=="boolean"){l=l?i(this.dom):j}this.setStyle(d,l);return this},fixDisplay:function(){var l=this;if(l.isStyle(d,j)){l.setStyle(h,b);l.setStyle(d,i(this.dom));if(l.isStyle(d,j)){l.setStyle(d,"block")}}},hide:function(l){this.setVisible(false,this.preanim(arguments,0));return this},show:function(l){this.setVisible(true,this.preanim(arguments,0));return this}}}());Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!/body/i.test(k.tagName)){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(p.getStyle("position")=="static"){p.addClass(g)}if((i=e(l,"maskMsg"))){i.remove()}if((i=e(l,"mask"))){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined)}k.removeClass([c,g])},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";if(Ext.isIE&&Ext.isSecure){i.src=Ext.SSL_SECURE_URL}j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(!Ext.isObject(b)||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{visbility:w,position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=this;if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(B,E,D){var C=this.dom;p(C).clearPositioning();p(C).setPositioning(E);if(!D.wrap){B.parentNode.insertBefore(C,B);p(B).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,E=B.id,D=!C.concurrent;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(D){c(E).shift()}if(C.callback){C.callback.call(C.scope,p(B))}if(D){p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getCount:function(){return this.elements.length},add:function(b){if(b){if(Ext.isArray(b)){this.elements=this.elements.concat(b)}else{var a=this.elements;Ext.each(b,function(c){a.push(c)})}}return this},invoke:function(d,a){var b=this.elements,c=this.el;Ext.each(b,function(g){c.dom=g;Ext.Element.prototype[d].apply(c,a)});return this},item:function(a){var b=this;if(!b.elements[a]){return null}b.el.dom=b.elements[a];return b.el},addListener:function(a,d,c,b){Ext.each(this.elements,function(g){Ext.EventManager.on(g,a,d,c||g,b)});return this},each:function(c,b){var d=this,a=d.el;Ext.each(d.elements,function(h,g){a.dom=h;return c.call(b||a,a,d,g)});return d},indexOf:function(a){return this.elements.indexOf(Ext.getDom(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},fill:function(a){this.elements=[];this.add(a);return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},filter:function(a){var b=[];this.each(function(c){if(c.is(a)){b[b.length]=c.dom}});this.fill(b);return this},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=function(b,a){this.elements=[];this.add(b,a)};Ext.extend(Ext.CompositeElement,Ext.CompositeElementLite,{invoke:function(b,a){Ext.each(this.elements,function(c){Ext.Element.prototype[b].apply(c,a)});return this},add:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},item:function(a){return this.elements[a]||null},indexOf:function(a){return this.elements.indexOf(Ext.get(a))},filter:function(a){var c=this,b=[];Ext.each(c.elements,function(d){if(d.is(a)){b.push(Ext.get(d))}});c.elements=b;return c},each:function(b,a){Ext.each(this.elements,function(d,c){return b.call(a||d,d,this,c)},this);return this}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var c="beforerequest",l="requestcomplete",k="requestexception",e=undefined,i="load",h="POST",j="GET",g=window;Ext.data.Connection=function(m){Ext.apply(this,m);this.addEvents(c,l,k);Ext.data.Connection.superclass.constructor.call(this)};function b(m){this.transId=false;var n=m.argument.options;m.argument=n?n.argument:null;this.fireEvent(l,this,m,n);if(n.success){n.success.call(n.scope,m,n)}if(n.callback){n.callback.call(n.scope,n,true,m)}}function d(m,o){this.transId=false;var n=m.argument.options;m.argument=n?n.argument:null;this.fireEvent(k,this,m,n,o);if(n.failure){n.failure.call(n.scope,m,n)}if(n.callback){n.callback.call(n.scope,n,false,m)}}function a(t,m,n){var p=Ext.id(),z=document,u=z.createElement("iframe"),q=Ext.getDom(t.form),y=[],x,s="multipart/form-data",r={target:q.target,method:q.method,encoding:q.encoding,enctype:q.enctype,action:q.action};Ext.apply(u,{id:p,name:p,className:"x-hidden",src:Ext.SSL_SECURE_URL});z.body.appendChild(u);if(Ext.isIE){document.frames[p].name=p}Ext.apply(q,{target:p,method:h,enctype:s,encoding:s,action:n||r.action});m=Ext.urlDecode(m,false);for(var w in m){if(m.hasOwnProperty(w)){x=z.createElement("input");x.type="hidden";x.value=m[x.name=w];q.appendChild(x);y.push(x)}}function v(){var B=this,A={responseText:"",responseXML:null,argument:t.argument},E,D;try{E=u.contentWindow.document||u.contentDocument||g.frames[p].document;if(E){if(E.body){if(/textarea/i.test((D=E.body.firstChild||{}).tagName)){A.responseText=D.value}else{A.responseText=E.body.innerHTML}}A.responseXML=E.XMLDocument||E}}catch(C){}Ext.EventManager.removeListener(u,i,v,B);B.fireEvent(l,B,A,t);function o(H,G,F){if(Ext.isFunction(H)){H.apply(G,F)}}o(t.success,t.scope,[A,t]);o(t.callback,t.scope,[t,true,A]);if(!B.debugUploads){setTimeout(function(){Ext.removeNode(u)},100)}}Ext.EventManager.on(u,i,v,this);q.submit();Ext.apply(q,r);Ext.each(y,function(o){Ext.removeNode(o)})}Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(s){var v=this;if(v.fireEvent(c,v,s)){if(s.el){if(!Ext.isEmpty(s.indicatorText)){v.indicatorText='<div class="loading-indicator">'+s.indicatorText+"</div>"}if(v.indicatorText){Ext.getDom(s.el).innerHTML=v.indicatorText}s.success=(Ext.isFunction(s.success)?s.success:function(){}).createInterceptor(function(o){Ext.getDom(s.el).innerHTML=o.responseText})}var q=s.params,n=s.url||v.url,m,t={success:b,failure:d,scope:v,argument:{options:s},timeout:s.timeout||v.timeout},r,w;if(Ext.isFunction(q)){q=q.call(s.scope||g,s)}q=Ext.urlEncode(v.extraParams,Ext.isObject(q)?Ext.urlEncode(q):q);if(Ext.isFunction(n)){n=n.call(s.scope||g,s)}if((r=Ext.getDom(s.form))){n=n||r.action;if(s.isUpload||/multipart\/form-data/i.test(r.getAttribute("enctype"))){return a.call(v,s,q,n)}w=Ext.lib.Ajax.serializeForm(r);q=q?(q+"&"+w):w}m=s.method||v.method||((q||s.xmlData||s.jsonData)?h:j);if(m===j&&(v.disableCaching&&s.disableCaching!==false)||s.disableCaching===true){var u=s.disableCachingParam||v.disableCachingParam;n=Ext.urlAppend(n,u+"="+(new Date().getTime()))}s.headers=Ext.apply(s.headers||{},v.defaultHeaders||{});if(s.autoAbort===true||v.autoAbort){v.abort()}if((m==j||s.xmlData||s.jsonData)&&q){n=Ext.urlAppend(n,q);q=""}return(v.transId=Ext.lib.Ajax.request(m,n,t,q,s))}else{return s.callback?s.callback.apply(s.scope,[s,e,e]):null}},isLoading:function(m){return m?Ext.lib.Ajax.isCallInProgress(m):!!this.transId},abort:function(m){if(m||this.isLoading()){Ext.lib.Ajax.abort(m||this.transId)}}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='<div class="loading-indicator">'+h.text+"</div>"}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>',loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false")};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},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(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.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 k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":Date.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=new Date(o,c-1,n,k,g,j,e);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parseDate:function(d,g,c){var e=Date.parseFunctions;if(e[g]==null){Date.createParser(g)}return e[g](d,Ext.isDefined(c)?c:Date.useStrict)},getFormatCode:function(d){var c=Date.formatCodes[d];if(c){c=typeof c=="function"?c():c;Date.formatCodes[d]=c}return c||("'"+String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+String.escape(e)+"'")}else{g.push(Date.getFormatCode(e))}}}Date.formatFunctions[h]=new Function("return "+g.join("+"))},createParser:function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = y >= 0? y : Ext.num(def.y, dt.getFullYear());","m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());","d = d >= 0? d : Ext.num(def.d, dt.getDate());","h  = h || Ext.num(def.h, dt.getHours());","i  = i || Ext.num(def.i, dt.getMinutes());","s  = s || Ext.num(def.s, dt.getSeconds());","ms = ms || Ext.num(def.ms, dt.getMilliseconds());","if(z >= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j<m.length;++j){d=m.charAt(j);if(!k&&d=="\\"){k=true}else{if(k){k=false;l.push(String.escape(d))}else{var h=a(d,n);n+=h.g;l.push(h.s);if(h.g&&h.c){g.push(h.c)}}}}Date.parseRegexes[e]=new RegExp("^"+l.join("")+"$","i");Date.parseFunctions[m]=new Function("input","strict",b(c,e,g.join("")))}}(),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 c=[],d=0;d<7;c.push(Date.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.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:1,c:"z = parseInt(results[{0}], 10);\n",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 c=[],d=0;d<12;c.push(Date.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a("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 a("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 a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("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),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","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),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","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:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})}());Ext.apply(Date.prototype,{dateFormat:function(a){if(Date.formatFunctions[a]==null){Date.createFormat(a)}return Date.formatFunctions[a].call(this)},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.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var c=0,b=0,e=this.clone(),a=this.getMonth();for(c=0,e.setMonth(0);c<a;e.setMonth(++c)){b+=e.getDaysInMonth()}return b+this.getDate()-1},getWeekOfYear:function(){var a=86400000,b=7*a;return function(){var d=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/a,c=Math.floor(d/7),e=new Date(c*b).getUTCFullYear();return c-Math.floor(Date.UTC(e,0,7)/b)+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(){return this.getLastDateOfMonth().getDay()},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){var a=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var b=this.getMonth();return b==1&&this.isLeapYear()?29:a[b]}}(),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())},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset()},clearTime:function(g){if(g){return this.clone().clearTime()}var b=this.getDate();this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(this.getDate()!=b){for(var a=1,e=this.add(Date.HOUR,a);e.getDate()!=b;a++,e=this.add(Date.HOUR,a)){}this.setDate(b);this.setHours(e.getHours())}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&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};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){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d<a;d++){this.add(b[d])}}else{for(var c in e){if(this.allowFunctions||typeof e[c]!="function"){this.add(c,e[c])}}}},each:function(e,d){var b=[].concat(this.items);for(var c=0,a=b.length;c<a;c++){if(e.call(d||b[c],b[c],c,a)===false){break}}},eachKey:function(d,c){for(var b=0,a=this.keys.length;b<a;b++){d.call(c||window,this.keys[b],this.items[b],b,a)}},find:function(d,c){for(var b=0,a=this.items.length;b<a;b++){if(d.call(c||window,this.items[b],this.keys[b])){return this.items[b]}}return null},insert:function(a,b,c){if(arguments.length==2){c=arguments[1];b=this.getKey(c)}if(this.containsKey(b)){this.suspendEvents();this.removeKey(b);this.resumeEvents()}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(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return !Ext.isFunction(c)||this.allowFunctions?c: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(m,a,l){var e,g,d=String(a).toUpperCase()=="DESC"?-1:1,j=[],b=this.keys,h=this.items;l=l||function(i,c){return i-c};for(e=0,g=h.length;e<g;e++){j[j.length]={key:b[e],value:h[e],index:e}}j.sort(function(i,c){var k=l(i[m],c[m])*d;if(k===0){k=(i.index<c.index?-1:1)}return k});for(e=0,g=j.length;e<g;e++){h[e]=j[e].value;b[e]=j[e].key}this.fireEvent("sort",this)},sort:function(a,b){this._sort("value",a,b)},keySort:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})},getRange:function(e,a){var b=this.items;if(b.length<1){return[]}e=e||0;a=Math.min(typeof a=="undefined"?this.length-1:a,this.length-1);var c,d=[];if(e<=a){for(c=e;c<=a;c++){d[d.length]=b[c]}}else{for(c=e;c>=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){h.add(b[c],d[c])}}return h},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(g,e,h){var b=this.keys,d=this.items;for(var c=(h||0),a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){return c}}return -1},createValueMatcher:function(b,c,a){if(!b.exec){b=String(b);b=new RegExp((c===true?"":"^")+Ext.escapeRe(b),a?"":"i")}return b},clone:function(){var e=new Ext.util.MixedCollection();var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){e.add(b[c],d[c])}e.getKey=this.getKey;return e}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Object.prototype.toString.apply(o)==="[object Date]"){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(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},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+'"'},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(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json){if(!dc){dc=isNative()?JSON.parse:doDecode}return dc(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,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2);var index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{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)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length)}else{if(2<psplit.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+format)}else{v=v.toFixed(0)}}var fnum=v.toString();if(hasComma){psplit=fnum.split(".");var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3}parr[parr.length]=cnum.substr(i,n);m-=1}fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1]}}return(neg?"-":"")+format.replace(/[\d,?\.?]+/,fnum)},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format)}},plural:function(v,s,p){return v+" "+(v==1?s:(p?p:s+"s"))},nl2br:function(v){return v===undefined||v===null?"":v.replace(/\n/g,"<br/>")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var w=this,i=w.html,p=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^<tpl\b[^>]*?for="(.*?)"/,t=/^<tpl\b[^>]*?if="(.*?)"/,v=/^<tpl\b[^>]*?exec="(.*?)"/,q,o=0,j=[],n="values",u="parent",k="xindex",l="xcount",e="return ",c="with(values){ ";i=["<tpl>",i,"</tpl>"].join("");while((q=i.match(p))){var b=q[0].match(d),a=q[0].match(t),y=q[0].match(v),g=null,h=null,r=null,x=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(n,u,k,l,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(y){g=y&&y[1]?y[1]:null;if(g){r=new Function(n,u,k,l,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(x){switch(x){case".":x=new Function(n,u,c+e+n+"; }");break;case"..":x=new Function(n,u,c+e+u+"; }");break;default:x=new Function(n,u,c+e+x+"; }")}}j.push({id:o,target:x,exec:r,test:h,body:q[1]||""});i=i.replace(q[0],"{xtpl"+o+"}");++o}Ext.each(j,function(m){w.compileTpl(m)});w.master=j[j.length-1];w.tpls=j};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,i,h,d,c){var g=this,e,k=g.tpls[a],j,b=[];if((k.test&&!k.test.call(g,i,h,d,c))||(k.exec&&k.exec.call(g,i,h,d,c))){return""}j=k.target?k.target.call(g,i,h):i;e=j.length;h=k.target?i:h;if(k.target&&Ext.isArray(j)){Ext.each(j,function(l,m){b[b.length]=k.compiled.call(g,l,h,m+1,e)});return b.join("")}return k.compiled.call(g,j,h,d,c)},compileTpl:function(tpl){var fm=Ext.util.Format,useF=this.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(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+"'"}function codeFn(m,code){return"'"+sep+"("+code+")"+sep+"'"}if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(a){a=Ext.getDom(a);return new Ext.XTemplate(a.value||a.innerHTML)};Ext.util.CSS=function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{createStyleSheet:function(i,l){var h;var g=c.getElementsByTagName("head")[0];var k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=c.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){this.removeStyleSheet(h);var g=c.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",h);g.setAttribute("href",e);c.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(h){if(!d){d={}}try{var k=h.cssRules||h.rules;for(var g=k.length-1;g>=0;--g){d[k[g].selectorText]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j<g;j++){try{this.cacheStyleSheet(k[j])}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j]]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){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");if(!this.disabled){this.disabled=true;this.enable()}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,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.purgeListeners()},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.isKeydown()){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.isKeydown()){this.el.un("keydown",this.relay,this)}else{this.el.un("keydown",this.prepareEvent,this);this.el.un("keypress",this.relay,this)}this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};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(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c<d;c++){h.push(e.charCodeAt(c))}k=h}var a=Ext.isArray(k);var i=function(o){if(this.checkModifiers(b,o)){var m=o.getKey();if(a){for(var n=0,j=k.length;n<j;n++){if(k[n]==m){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o);return}}}else{if(m==k){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o)}}}};this.bindings.push(i)},checkModifiers:function(b,h){var j,d,g=["shift","ctrl","alt"];for(var c=0,a=g.length;c<a;++c){d=g[c];j=b[d];if(!(j===undefined||(j===h[d+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(typeof b=="object"&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},handleKeyDown:function(g){if(this.enabled){var c=this.bindings;for(var d=0,a=c.length;d<a;d++){c[d].call(this,g)}}},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}},setDisabled:function(a){this[a?"disable":"enable"]()}};Ext.util.TextMetrics=function(){var a;return{measure:function(b,c,d){if(!a){a=Ext.util.TextMetrics.Instance(b,d)}a.bind(b);a.setFixedWidth(d||"auto");return a.getSize(c)},createInstance:function(b,c){return Ext.util.TextMetrics.Instance(b,c)}}}();Ext.util.TextMetrics.Instance=function(b,d){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.position("absolute");c.setLeftTop(-1000,-1000);c.hide();if(d){c.setWidth(d)}var a={getSize:function(g){c.update(g);var e=c.getSize();c.update("");return e},bind:function(e){c.setStyle(Ext.fly(e).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(e){c.setWidth(e)},getWidth:function(e){c.dom.style.width="auto";return this.getSize(e).width},getHeight:function(e){return this.getSize(e).height}};a.bind(b);return a};Ext.Element.addMethods({getTextWidth:function(c,b,a){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width).constrain(b||0,a||1000000)}});Ext.util.Cookies={set:function(c,e){var a=arguments;var i=arguments.length;var b=(i>2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return Ext.util.Cookies.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a){if(Ext.util.Cookies.get(a)){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT"}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}};Ext.handleError=function(a){throw a};Ext.Error=function(a){this.message=(this.lang[a])?this.lang[a]:a};Ext.Error.prototype=new Error();Ext.apply(Ext.Error.prototype,{lang:{},name:"Ext.Error",getName:function(){return this.name},getMessage:function(){return this.message},toJson:function(){return Ext.encode(this)}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons-debug.js	(revision 625)
@@ -0,0 +1,1060 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Button
+ * @extends Ext.BoxComponent
+ * Simple Button class
+ * @cfg {String} text The button text to be used as innerHTML (html tags are accepted)
+ * @cfg {String} icon The path to an image to display in the button (the image will be set as the background-image
+ * CSS property of the button by default, so if you want a mixed icon/text button, set cls:'x-btn-text-icon')
+ * @cfg {Function} handler A function called when the button is clicked (can be used instead of click event).
+ * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+ * <li><code>b</code> : Button<div class="sub-desc">This Button.</div></li>
+ * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+ * </ul></div>
+ * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the handler is executed. Defaults to this Button.
+ * @cfg {Number} minWidth The minimum width for this button (used to give a set of buttons a common width).
+ * See also {@link Ext.Panel}.<tt>{@link Ext.Panel#minButtonWidth minButtonWidth}</tt>.
+ * @cfg {String/Object} tooltip The tooltip for the button - can be a string to be used as innerHTML (html tags are accepted) or QuickTips config object
+ * @cfg {Boolean} hidden True to start hidden (defaults to false)
+ * @cfg {Boolean} disabled True to start disabled (defaults to false)
+ * @cfg {Boolean} pressed True to start pressed (only if enableToggle = true)
+ * @cfg {String} toggleGroup The group this toggle button is a member of (only 1 per group can be pressed)
+ * @cfg {Boolean/Object} repeat True to repeat fire the click event while the mouse is down. This can also be
+ * a {@link Ext.util.ClickRepeater ClickRepeater} config object (defaults to false).
+ * @constructor
+ * Create a new button
+ * @param {Object} config The config object
+ * @xtype button
+ */
+Ext.Button = Ext.extend(Ext.BoxComponent, {
+    /**
+     * Read-only. True if this button is hidden
+     * @type Boolean
+     */
+    hidden : false,
+    /**
+     * Read-only. True if this button is disabled
+     * @type Boolean
+     */
+    disabled : false,
+    /**
+     * Read-only. True if this button is pressed (only if enableToggle = true)
+     * @type Boolean
+     */
+    pressed : false,
+    /**
+     * The Button's owner {@link Ext.Panel} (defaults to undefined, and is set automatically when
+     * the Button is added to a container).  Read-only.
+     * @type Ext.Panel
+     * @property ownerCt
+     */
+
+    /**
+     * @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined)
+     */
+
+    /**
+     * @cfg {Boolean} allowDepress
+     * False to not allow a pressed Button to be depressed (defaults to undefined). Only valid when {@link #enableToggle} is true.
+     */
+
+    /**
+     * @cfg {Boolean} enableToggle
+     * True to enable pressed/not pressed toggling (defaults to false)
+     */
+    enableToggle: false,
+    /**
+     * @cfg {Function} toggleHandler
+     * Function called when a Button with {@link #enableToggle} set to true is clicked. Two arguments are passed:<ul class="mdetail-params">
+     * <li><b>button</b> : Ext.Button<div class="sub-desc">this Button object</div></li>
+     * <li><b>state</b> : Boolean<div class="sub-desc">The next state if the Button, true means pressed.</div></li>
+     * </ul>
+     */
+    /**
+     * @cfg {Mixed} menu
+     * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined).
+     */
+    /**
+     * @cfg {String} menuAlign
+     * The position to align the menu to (see {@link Ext.Element#alignTo} for more details, defaults to 'tl-bl?').
+     */
+    menuAlign : 'tl-bl?',
+
+    /**
+     * @cfg {String} overflowText If used in a {@link Ext.Toolbar Toolbar}, the
+     * text to be used if this item is shown in the overflow menu. See also
+     * {@link Ext.Toolbar.Item}.<code>{@link Ext.Toolbar.Item#overflowText overflowText}</code>.
+     */
+    /**
+     * @cfg {String} iconCls
+     * A css class which sets a background image to be used as the icon for this button
+     */
+    /**
+     * @cfg {String} type
+     * submit, reset or button - defaults to 'button'
+     */
+    type : 'button',
+
+    // private
+    menuClassTarget: 'tr:nth(2)',
+
+    /**
+     * @cfg {String} clickEvent
+     * The type of event to map to the button's event handler (defaults to 'click')
+     */
+    clickEvent : 'click',
+
+    /**
+     * @cfg {Boolean} handleMouseEvents
+     * False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
+     */
+    handleMouseEvents : true,
+
+    /**
+     * @cfg {String} tooltipType
+     * The type of tooltip to use. Either 'qtip' (default) for QuickTips or 'title' for title attribute.
+     */
+    tooltipType : 'qtip',
+
+    /**
+     * @cfg {String} buttonSelector
+     * <p>(Optional) A {@link Ext.DomQuery DomQuery} selector which is used to extract the active, clickable element from the
+     * DOM structure created.</p>
+     * <p>When a custom {@link #template} is used, you  must ensure that this selector results in the selection of
+     * a focussable element.</p>
+     * <p>Defaults to <b><tt>"button:first-child"</tt></b>.</p>
+     */
+    buttonSelector : 'button:first-child',
+
+    /**
+     * @cfg {String} scale
+     * <p>(Optional) The size of the Button. Three values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'small'<div class="sub-desc">Results in the button element being 16px high.</div></li>
+     * <li>'medium'<div class="sub-desc">Results in the button element being 24px high.</div></li>
+     * <li>'large'<div class="sub-desc">Results in the button element being 32px high.</div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'small'</tt></b>.</p>
+     */
+    scale: 'small',
+
+    /**
+     * @cfg {String} iconAlign
+     * <p>(Optional) The side of the Button box to render the icon. Four values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'top'<div class="sub-desc"></div></li>
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * <li>'left'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'left'</tt></b>.</p>
+     */
+    iconAlign : 'left',
+
+    /**
+     * @cfg {String} arrowAlign
+     * <p>(Optional) The side of the Button box to render the arrow if the button has an associated {@link #menu}.
+     * Two values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'right'</tt></b>.</p>
+     */
+    arrowAlign : 'right',
+
+    /**
+     * @cfg {Ext.Template} template (Optional)
+     * <p>A {@link Ext.Template Template} used to create the Button's DOM structure.</p>
+     * Instances, or subclasses which need a different DOM structure may provide a different
+     * template layout in conjunction with an implementation of {@link #getTemplateArgs}.
+     * @type Ext.Template
+     * @property template
+     */
+    /**
+     * @cfg {String} cls
+     * A CSS class string to apply to the button's main element.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object associated with this Button when configured with the {@link #menu} config option.
+     */
+
+    initComponent : function(){
+        Ext.Button.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this button is clicked
+             * @param {Button} this
+             * @param {EventObject} e The click event
+             */
+            'click',
+            /**
+             * @event toggle
+             * Fires when the 'pressed' state of this button changes (only if enableToggle = true)
+             * @param {Button} this
+             * @param {Boolean} pressed
+             */
+            'toggle',
+            /**
+             * @event mouseover
+             * Fires when the mouse hovers over the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseout',
+            /**
+             * @event menushow
+             * If this button has a menu, this event fires when it is shown
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menushow',
+            /**
+             * @event menuhide
+             * If this button has a menu, this event fires when it is hidden
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menuhide',
+            /**
+             * @event menutriggerover
+             * If this button has a menu, this event fires when the mouse enters the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerover',
+            /**
+             * @event menutriggerout
+             * If this button has a menu, this event fires when the mouse leaves the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerout'
+        );
+        if(this.menu){
+            this.menu = Ext.menu.MenuMgr.get(this.menu);
+        }
+        if(Ext.isString(this.toggleGroup)){
+            this.enableToggle = true;
+        }
+    },
+
+/**
+  * <p>This method returns an object which provides substitution parameters for the {@link #template Template} used
+  * to create this Button's DOM structure.</p>
+  * <p>Instances or subclasses which use a different Template to create a different DOM structure may need to provide their
+  * own implementation of this method.</p>
+  * <p>The default implementation which provides data for the default {@link #template} returns an Array containing the
+  * following items:</p><div class="mdetail-params"><ul>
+  * <li>The Button's {@link #text}</li>
+  * <li>The &lt;button&gt;'s {@link #type}</li>
+  * <li>The {@link iconCls} applied to the &lt;button&gt; {@link #btnEl element}</li>
+  * <li>The {@link #cls} applied to the Button's main {@link #getEl Element}</li>
+  * <li>A CSS class name controlling the Button's {@link #scale} and {@link #iconAlign icon alignment}</li>
+  * <li>A CSS class name which applies an arrow to the Button if configured with a {@link #menu}</li>
+  * </ul></div>
+  * @return {Object} Substitution data for a Template.
+ */
+    getTemplateArgs : function(){
+        var cls = (this.cls || '');
+        cls += (this.iconCls || this.icon) ? (this.text ? ' x-btn-text-icon' : ' x-btn-icon') : ' x-btn-noicon';
+        if(this.pressed){
+            cls += ' x-btn-pressed';
+        }
+        return [this.text || '&#160;', this.type, this.iconCls || '', cls, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass()];
+    },
+
+    // protected
+    getMenuClass : function(){
+        return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.template){
+            if(!Ext.Button.buttonTemplate){
+                // hideous table template
+                Ext.Button.buttonTemplate = new Ext.Template(
+                    '<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">',
+                    '<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',
+                    "</tbody></table>");
+                Ext.Button.buttonTemplate.compile();
+            }
+            this.template = Ext.Button.buttonTemplate;
+        }
+
+        var btn, targs = this.getTemplateArgs();
+
+        if(position){
+            btn = this.template.insertBefore(position, targs, true);
+        }else{
+            btn = this.template.append(ct, targs, true);
+        }
+        /**
+         * An {@link Ext.Element Element} encapsulating the Button's clickable element. By default,
+         * this references a <tt>&lt;button&gt;</tt> element. Read only.
+         * @type Ext.Element
+         * @property btnEl
+         */
+        this.btnEl = btn.child(this.buttonSelector);
+        this.mon(this.btnEl, {
+            scope: this,
+            focus: this.onFocus,
+            blur: this.onBlur
+        });
+
+        this.initButtonEl(btn, this.btnEl);
+
+        Ext.ButtonToggleMgr.register(this);
+    },
+
+    // private
+    initButtonEl : function(btn, btnEl){
+        this.el = btn;
+
+        if(this.id){
+            this.el.dom.id = this.el.id = this.id;
+        }
+        if(this.icon){
+            btnEl.setStyle('background-image', 'url(' +this.icon +')');
+        }
+        if(this.tabIndex !== undefined){
+            btnEl.dom.tabIndex = this.tabIndex;
+        }
+        if(this.tooltip){
+            this.setTooltip(this.tooltip, true);
+        }
+
+        if(this.handleMouseEvents){
+            this.mon(btn, {
+                scope: this,
+                mouseover: this.onMouseOver,
+                mousedown: this.onMouseDown
+            });
+            
+            // new functionality for monitoring on the document level
+            //this.mon(btn, 'mouseout', this.onMouseOut, this);
+        }
+
+        if(this.menu){
+            this.mon(this.menu, {
+                scope: this,
+                show: this.onMenuShow,
+                hide: this.onMenuHide
+            });
+        }
+
+        if(this.repeat){
+            var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {});
+            this.mon(repeater, 'click', this.onClick, this);
+        }
+        
+        this.mon(btn, this.clickEvent, this.onClick, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Button.superclass.afterRender.call(this);
+        this.doAutoWidth();
+    },
+
+    /**
+     * Sets the CSS class that provides a background image to use as the button's icon.  This method also changes
+     * the value of the {@link iconCls} config internally.
+     * @param {String} cls The CSS class providing the icon image
+     * @return {Ext.Button} this
+     */
+    setIconClass : function(cls){
+        if(this.el){
+            this.btnEl.replaceClass(this.iconCls, cls);
+        }
+        this.iconCls = cls;
+        return this;
+    },
+
+    /**
+     * Sets the tooltip for this Button.
+     * @param {String/Object} tooltip. This may be:<div class="mdesc-details"><ul>
+     * <li><b>String</b> : A string to be used as innerHTML (html tags are accepted) to show in a tooltip</li>
+     * <li><b>Object</b> : A configuration object for {@link Ext.QuickTips#register}.</li>
+     * </ul></div>
+     * @return {Ext.Button} this
+     */
+    setTooltip : function(tooltip, /* private */ initial){
+        if(this.rendered){
+            if(!initial){
+                this.clearTip();
+            }
+            if(Ext.isObject(tooltip)){
+                Ext.QuickTips.register(Ext.apply({
+                      target: this.btnEl.id
+                }, tooltip));
+                this.tooltip = tooltip;
+            }else{
+                this.btnEl.dom[this.tooltipType] = tooltip;
+            }
+        }else{
+            this.tooltip = tooltip;
+        }
+        return this;
+    },
+    
+    // private
+    clearTip: function(){
+        if(Ext.isObject(this.tooltip)){
+            Ext.QuickTips.unregister(this.btnEl);
+        }
+    },
+    
+    // private
+    beforeDestroy: function(){
+        if(this.rendered){
+            this.clearTip();
+        }
+        Ext.destroy(this.menu, this.repeater);
+    },
+
+    // private
+    onDestroy : function(){
+        var doc = Ext.getDoc();
+        doc.un('mouseover', this.monitorMouseOver, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        if(this.rendered){
+            Ext.ButtonToggleMgr.unregister(this);
+        }
+    },
+
+    // private
+    doAutoWidth : function(){
+        if(this.el && this.text && this.width === undefined){
+            this.el.setWidth('auto');
+            if(Ext.isIE7 && Ext.isStrict){
+                var ib = this.btnEl;
+                if(ib && ib.getWidth() > 20){
+                    ib.clip();
+                    ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr'));
+                }
+            }
+            if(this.minWidth){
+                if(this.el.getWidth() < this.minWidth){
+                    this.el.setWidth(this.minWidth);
+                }
+            }
+        }
+    },
+
+    /**
+     * Assigns this Button's click handler
+     * @param {Function} handler The function to call when the button is clicked
+     * @param {Object} scope (optional) Scope for the function passed in
+     * @return {Ext.Button} this
+     */
+    setHandler : function(handler, scope){
+        this.handler = handler;
+        this.scope = scope;
+        return this;
+    },
+
+    /**
+     * Sets this Button's text
+     * @param {String} text The button text
+     * @return {Ext.Button} this
+     */
+    setText : function(text){
+        this.text = text;
+        if(this.el){
+            this.el.child('td.x-btn-mc ' + this.buttonSelector).update(text);
+        }
+        this.doAutoWidth();
+        return this;
+    },
+
+    /**
+     * Gets the text for this Button
+     * @return {String} The button text
+     */
+    getText : function(){
+        return this.text;
+    },
+
+    /**
+     * If a state it passed, it becomes the pressed state otherwise the current state is toggled.
+     * @param {Boolean} state (optional) Force a particular state
+     * @param {Boolean} supressEvent (optional) True to stop events being fired when calling this method.
+     * @return {Ext.Button} this
+     */
+    toggle : function(state, suppressEvent){
+        state = state === undefined ? !this.pressed : !!state;
+        if(state != this.pressed){
+            this.el[state ? 'addClass' : 'removeClass']('x-btn-pressed');
+            this.pressed = state;
+            if(!suppressEvent){
+                this.fireEvent('toggle', this, state);
+                if(this.toggleHandler){
+                    this.toggleHandler.call(this.scope || this, this, state);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Focus the button
+     */
+    focus : function(){
+        this.btnEl.focus();
+    },
+
+    // private
+    onDisable : function(){
+        this.onDisableChange(true);
+    },
+
+    // private
+    onEnable : function(){
+        this.onDisableChange(false);
+    },
+    
+    onDisableChange : function(disabled){
+        if(this.el){
+            if(!Ext.isIE6 || !this.text){
+                this.el[disabled ? 'addClass' : 'removeClass'](this.disabledClass);
+            }
+            this.el.dom.disabled = disabled;
+        }
+        this.disabled = disabled;
+    },
+
+    /**
+     * Show this button's menu (if it has one)
+     */
+    showMenu : function(){
+        if(this.rendered && this.menu){
+            if(this.tooltip){
+                Ext.QuickTips.getQuickTip().cancelShow(this.btnEl);
+            }
+            this.menu.show(this.el, this.menuAlign);
+        }
+        return this;
+    },
+
+    /**
+     * Hide this button's menu (if it has one)
+     */
+    hideMenu : function(){
+        if(this.menu){
+            this.menu.hide();
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the button has a menu and it is visible
+     * @return {Boolean}
+     */
+    hasVisibleMenu : function(){
+        return this.menu && this.menu.isVisible();
+    },
+
+    // private
+    onClick : function(e){
+        if(e){
+            e.preventDefault();
+        }
+        if(e.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, e);
+            if(this.handler){
+                //this.el.removeClass('x-btn-over');
+                this.handler.call(this.scope || this, this, e);
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    onMouseOver : function(e){
+        if(!this.disabled){
+            var internal = e.within(this.el,  true);
+            if(!internal){
+                this.el.addClass('x-btn-over');
+                if(!this.monitoringMouseOver){
+                    Ext.getDoc().on('mouseover', this.monitorMouseOver, this);
+                    this.monitoringMouseOver = true;
+                }
+                this.fireEvent('mouseover', this, e);
+            }
+            if(this.isMenuTriggerOver(e, internal)){
+                this.fireEvent('menutriggerover', this, this.menu, e);
+            }
+        }
+    },
+
+    // private
+    monitorMouseOver : function(e){
+        if(e.target != this.el.dom && !e.within(this.el)){
+            if(this.monitoringMouseOver){
+                Ext.getDoc().un('mouseover', this.monitorMouseOver, this);
+                this.monitoringMouseOver = false;
+            }
+            this.onMouseOut(e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        var internal = e.within(this.el) && e.target != this.el.dom;
+        this.el.removeClass('x-btn-over');
+        this.fireEvent('mouseout', this, e);
+        if(this.isMenuTriggerOut(e, internal)){
+            this.fireEvent('menutriggerout', this, this.menu, e);
+        }
+    },
+    // private
+    onFocus : function(e){
+        if(!this.disabled){
+            this.el.addClass('x-btn-focus');
+        }
+    },
+    // private
+    onBlur : function(e){
+        this.el.removeClass('x-btn-focus');
+    },
+
+    // private
+    getClickEl : function(e, isUp){
+       return this.el;
+    },
+
+    // private
+    onMouseDown : function(e){
+        if(!this.disabled && e.button === 0){
+            this.getClickEl(e).addClass('x-btn-click');
+            Ext.getDoc().on('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMouseUp : function(e){
+        if(e.button === 0){
+            this.getClickEl(e, true).removeClass('x-btn-click');
+            Ext.getDoc().un('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMenuShow : function(e){
+        this.ignoreNextClick = 0;
+        this.el.addClass('x-btn-menu-active');
+        this.fireEvent('menushow', this, this.menu);
+    },
+    // private
+    onMenuHide : function(e){
+        this.el.removeClass('x-btn-menu-active');
+        this.ignoreNextClick = this.restoreClick.defer(250, this);
+        this.fireEvent('menuhide', this, this.menu);
+    },
+
+    // private
+    restoreClick : function(){
+        this.ignoreNextClick = 0;
+    }
+
+
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('button', Ext.Button);
+
+// Private utility class used by Button
+Ext.ButtonToggleMgr = function(){
+   var groups = {};
+
+   function toggleGroup(btn, state){
+       if(state){
+           var g = groups[btn.toggleGroup];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != btn){
+                   g[i].toggle(false);
+               }
+           }
+       }
+   }
+
+   return {
+       register : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(!g){
+               g = groups[btn.toggleGroup] = [];
+           }
+           g.push(btn);
+           btn.on('toggle', toggleGroup);
+       },
+
+       unregister : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(g){
+               g.remove(btn);
+               btn.un('toggle', toggleGroup);
+           }
+       },
+
+       /**
+        * Gets the pressed button in the passed group or null
+        * @param {String} group
+        * @return Button
+        */
+       getPressed : function(group){
+           var g = groups[group];
+           if(g){
+               for(var i = 0, len = g.length; i < len; i++){
+                   if(g[i].pressed === true){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();/**
+ * @class Ext.SplitButton
+ * @extends Ext.Button
+ * A split button that provides a built-in dropdown arrow that can fire an event separately from the default
+ * click event of the button.  Typically this would be used to display a dropdown menu that provides additional
+ * options to the primary button action, but any custom handler can provide the arrowclick implementation.  Example usage:
+ * <pre><code>
+// display a dropdown menu:
+new Ext.SplitButton({
+	renderTo: 'button-ct', // the container id
+   	text: 'Options',
+   	handler: optionsHandler, // handle a click on the button itself
+   	menu: new Ext.menu.Menu({
+        items: [
+        	// these items will render as dropdown menu items when the arrow is clicked:
+	        {text: 'Item 1', handler: item1Handler},
+	        {text: 'Item 2', handler: item2Handler}
+        ]
+   	})
+});
+
+// Instead of showing a menu, you provide any type of custom
+// functionality you want when the dropdown arrow is clicked:
+new Ext.SplitButton({
+	renderTo: 'button-ct',
+   	text: 'Options',
+   	handler: optionsHandler,
+   	arrowHandler: myCustomHandler
+});
+</code></pre>
+ * @cfg {Function} arrowHandler A function called when the arrow button is clicked (can be used instead of click event)
+ * @cfg {String} arrowTooltip The title attribute of the arrow
+ * @constructor
+ * Create a new menu button
+ * @param {Object} config The config object
+ * @xtype splitbutton
+ */
+Ext.SplitButton = Ext.extend(Ext.Button, {
+	// private
+    arrowSelector : 'em',
+    split: true,
+
+    // private
+    initComponent : function(){
+        Ext.SplitButton.superclass.initComponent.call(this);
+        /**
+         * @event arrowclick
+         * Fires when this button's arrow is clicked
+         * @param {MenuButton} this
+         * @param {EventObject} e The click event
+         */
+        this.addEvents("arrowclick");
+    },
+
+    // private
+    onRender : function(){
+        Ext.SplitButton.superclass.onRender.apply(this, arguments);
+        if(this.arrowTooltip){
+            this.el.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip;
+        }
+    },
+
+    /**
+     * Sets this button's arrow click handler.
+     * @param {Function} handler The function to call when the arrow is clicked
+     * @param {Object} scope (optional) Scope for the function passed above
+     */
+    setArrowHandler : function(handler, scope){
+        this.arrowHandler = handler;
+        this.scope = scope;
+    },
+
+    getMenuClass : function(){
+        return 'x-btn-split' + (this.arrowAlign == 'bottom' ? '-bottom' : '');
+    },
+
+    isClickOnArrow : function(e){
+        return this.arrowAlign != 'bottom' ?
+               e.getPageX() > this.el.child(this.buttonSelector).getRegion().right :
+               e.getPageY() > this.el.child(this.buttonSelector).getRegion().bottom;
+    },
+
+    // private
+    onClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            if(this.isClickOnArrow(e)){
+                if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){
+                    this.showMenu();
+                }
+                this.fireEvent("arrowclick", this, e);
+                if(this.arrowHandler){
+                    this.arrowHandler.call(this.scope || this, this, e);
+                }
+            }else{
+                if(this.enableToggle){
+                    this.toggle();
+                }
+                this.fireEvent("click", this, e);
+                if(this.handler){
+                    this.handler.call(this.scope || this, this, e);
+                }
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e){
+        return this.menu && e.target.tagName == 'em';
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && e.target.tagName != 'em';
+    }
+});
+
+Ext.reg('splitbutton', Ext.SplitButton);/**
+ * @class Ext.CycleButton
+ * @extends Ext.SplitButton
+ * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements.  The button automatically
+ * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's
+ * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the
+ * button displays the dropdown menu just like a normal SplitButton.  Example usage:
+ * <pre><code>
+var btn = new Ext.CycleButton({
+    showText: true,
+    prependText: 'View as ',
+    items: [{
+        text:'text only',
+        iconCls:'view-text',
+        checked:true
+    },{
+        text:'HTML',
+        iconCls:'view-html'
+    }],
+    changeHandler:function(btn, item){
+        Ext.Msg.alert('Change View', item.text);
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new split button
+ * @param {Object} config The config object
+ * @xtype cycle
+ */
+Ext.CycleButton = Ext.extend(Ext.SplitButton, {
+    /**
+     * @cfg {Array} items An array of {@link Ext.menu.CheckItem} <b>config</b> objects to be used when creating the
+     * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'})
+     */
+    /**
+     * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false)
+     */
+    /**
+     * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the
+     * button's text (only applies when showText = true, defaults to '')
+     */
+    /**
+     * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu
+     * item in the button's menu has changed.  If this callback is not supplied, the SplitButton will instead
+     * fire the {@link #change} event on active item change.  The changeHandler function will be called with the
+     * following argument list: (SplitButton this, Ext.menu.CheckItem item)
+     */
+    /**
+     * @cfg {String} forceIcon A css class which sets an image to be used as the static icon for this button.  This
+     * icon will always be displayed regardless of which item is selected in the dropdown list.  This overrides the 
+     * default behavior of changing the button's icon to match the selected item's icon on change.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices.
+     */
+
+    // private
+    getItemText : function(item){
+        if(item && this.showText === true){
+            var text = '';
+            if(this.prependText){
+                text += this.prependText;
+            }
+            text += item.text;
+            return text;
+        }
+        return undefined;
+    },
+
+    /**
+     * Sets the button's active menu item.
+     * @param {Ext.menu.CheckItem} item The item to activate
+     * @param {Boolean} suppressEvent True to prevent the button's change event from firing (defaults to false)
+     */
+    setActiveItem : function(item, suppressEvent){
+        if(typeof item != 'object'){
+            item = this.menu.items.get(item);
+        }
+        if(item){
+            if(!this.rendered){
+                this.text = this.getItemText(item);
+                this.iconCls = item.iconCls;
+            }else{
+                var t = this.getItemText(item);
+                if(t){
+                    this.setText(t);
+                }
+                this.setIconClass(item.iconCls);
+            }
+            this.activeItem = item;
+            if(!item.checked){
+                item.setChecked(true, true);
+            }
+            if(this.forceIcon){
+                this.setIconClass(this.forceIcon);
+            }
+            if(!suppressEvent){
+                this.fireEvent('change', this, item);
+            }
+        }
+    },
+
+    /**
+     * Gets the currently active menu item.
+     * @return {Ext.menu.CheckItem} The active item
+     */
+    getActiveItem : function(){
+        return this.activeItem;
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the button's active menu item has changed.  Note that if a {@link #changeHandler} function
+             * is set on this CycleButton, it will be called instead on active item change and this change event will
+             * not be fired.
+             * @param {Ext.CycleButton} this
+             * @param {Ext.menu.CheckItem} item The menu item that was selected
+             */
+            "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 checked;
+        for(var i = 0, len = this.itemCount; i < len; i++){
+            var item = this.items[i];
+            item.group = item.group || this.id;
+            item.itemIndex = i;
+            item.checkHandler = this.checkHandler;
+            item.scope = this;
+            item.checked = item.checked || false;
+            this.menu.items.push(item);
+            if(item.checked){
+                checked = item;
+            }
+        }
+        this.setActiveItem(checked, true);
+        Ext.CycleButton.superclass.initComponent.call(this);
+
+        this.on('click', this.toggleSelected, this);
+    },
+
+    // private
+    checkHandler : function(item, pressed){
+        if(pressed){
+            this.setActiveItem(item);
+        }
+    },
+
+    /**
+     * This is normally called internally on button click, but can be called externally to advance the button's
+     * active item programmatically to the next one in the menu.  If the current item is the last one in the menu
+     * the active item will be set to the first item in the menu.
+     */
+    toggleSelected : function(){
+        this.menu.render();
+        
+        var nextIdx, checkItem;
+        for (var i = 1; i < this.itemCount; i++) {
+            nextIdx = (this.activeItem.itemIndex + i) % this.itemCount;
+            // check the potential item
+            checkItem = this.menu.items.itemAt(nextIdx);
+            // if its not disabled then check it.
+            if (!checkItem.disabled) {
+                checkItem.setChecked(true);
+                break;
+            }
+        }
+    }
+});
+Ext.reg('cycle', Ext.CycleButton);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-buttons.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",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(Ext.isString(this.toggleGroup)){this.enableToggle=true}},getTemplateArgs:function(){var a=(this.cls||"");a+=(this.iconCls||this.icon)?(this.text?" x-btn-text-icon":" x-btn-icon"):" x-btn-noicon";if(this.pressed){a+=" x-btn-pressed"}return[this.text||"&#160;",this.type,this.iconCls||"",a,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass()]},getMenuClass:function(){return this.menu?(this.arrowAlign!="bottom"?"x-btn-arrow":"x-btn-arrow-bottom"):""},onRender:function(c,a){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;if(this.id){this.el.dom.id=this.el.id=this.id}if(this.icon){c.setStyle("background-image","url("+this.icon+")")}if(this.tabIndex!==undefined){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onClick,this)}this.mon(b,this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.doAutoWidth()},setIconClass:function(a){if(this.el){this.btnEl.replaceClass(this.iconCls,a)}this.iconCls=a;return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}Ext.destroy(this.menu,this.repeater)},onDestroy:function(){var a=Ext.getDoc();a.un("mouseover",this.monitorMouseOver,this);a.un("mouseup",this.onMouseUp,this);if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},doAutoWidth:function(){if(this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;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;return this},setText:function(a){this.text=a;if(this.el){this.el.child("td.x-btn-mc "+this.buttonSelector).update(a)}this.doAutoWidth();return this},getText:function(){return this.text},toggle:function(b,a){b=b===undefined?!this.pressed:!!b;if(b!=this.pressed){this.el[b?"addClass":"removeClass"]("x-btn-pressed");this.pressed=b;if(!a){this.fireEvent("toggle",this,b);if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,b)}}}return this},focus:function(){this.btnEl.focus()},onDisable:function(){this.onDisableChange(true)},onEnable:function(){this.onDisableChange(false)},onDisableChange:function(a){if(this.el){if(!Ext.isIE6||!this.text){this.el[a?"addClass":"removeClass"](this.disabledClass)}this.el.dom.disabled=a}this.disabled=a},showMenu:function(){if(this.rendered&&this.menu){if(this.tooltip){Ext.QuickTips.getQuickTip().cancelShow(this.btnEl)}this.menu.show(this.el,this.menuAlign)}return this},hideMenu:function(){if(this.menu){this.menu.hide()}return this},hasVisibleMenu:function(){return this.menu&&this.menu.isVisible()},onClick:function(a){if(a){a.preventDefault()}if(a.button!==0){return}if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,a);if(this.handler){this.handler.call(this.scope||this,this,a)}}},isMenuTriggerOver:function(b,a){return this.menu&&!a},isMenuTriggerOut:function(b,a){return this.menu&&!a},onMouseOver:function(b){if(!this.disabled){var a=b.within(this.el,true);if(!a){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=true}this.fireEvent("mouseover",this,b)}if(this.isMenuTriggerOver(b,a)){this.fireEvent("menutriggerover",this,this.menu,b)}}},monitorMouseOver:function(a){if(a.target!=this.el.dom&&!a.within(this.el)){if(this.monitoringMouseOver){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=false}this.onMouseOut(a)}},onMouseOut:function(b){var a=b.within(this.el)&&b.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,b);if(this.isMenuTriggerOut(b,a)){this.fireEvent("menutriggerout",this,this.menu,b)}},onFocus:function(a){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(a){this.el.removeClass("x-btn-focus")},getClickEl:function(b,a){return this.el},onMouseDown:function(a){if(!this.disabled&&a.button===0){this.getClickEl(a).addClass("x-btn-click");Ext.getDoc().on("mouseup",this.onMouseUp,this)}},onMouseUp:function(a){if(a.button===0){this.getClickEl(a,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this)}},onMenuShow:function(a){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)},onMenuHide:function(a){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu)},restoreClick:function(){this.ignoreNextClick=0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var a={};function b(e,h){if(h){var f=a[e.toggleGroup];for(var d=0,c=f.length;d<c;d++){if(f[d]!=e){f[d].toggle(false)}}}}return{register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){d.remove(c);c.un("toggle",b)}},getPressed:function(f){var e=a[f];if(e){for(var d=0,c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}}();Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"em",split:true,initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);this.addEvents("arrowclick")},onRender:function(){Ext.SplitButton.superclass.onRender.apply(this,arguments);if(this.arrowTooltip){this.el.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},getMenuClass:function(){return"x-btn-split"+(this.arrowAlign=="bottom"?"-bottom":"")},isClickOnArrow:function(a){return this.arrowAlign!="bottom"?a.getPageX()>this.el.child(this.buttonSelector).getRegion().right:a.getPageY()>this.el.child(this.buttonSelector).getRegion().bottom},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{if(this.enableToggle){this.toggle()}this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName=="em"},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!="em"}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(typeof c!="object"){c=this.menu.items.get(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,true)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var d;for(var b=0,a=this.itemCount;b<a;b++){var c=this.items[b];c.group=c.group||this.id;c.itemIndex=b;c.checkHandler=this.checkHandler;c.scope=this;c.checked=c.checked||false;this.menu.items.push(c);if(c.checked){d=c}}this.setActiveItem(d,true);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){this.menu.render();var c,a;for(var b=1;b<this.itemCount;b++){c=(this.activeItem.itemIndex+b)%this.itemCount;a=this.menu.items.itemAt(c);if(!a.disabled){a.setChecked(true);break}}}});Ext.reg("cycle",Ext.CycleButton);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts-debug.js	(revision 625)
@@ -0,0 +1,1621 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+
+var swfobject = function() {
+    
+    var UNDEF = "undefined",
+        OBJECT = "object",
+        SHOCKWAVE_FLASH = "Shockwave Flash",
+        SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+        FLASH_MIME_TYPE = "application/x-shockwave-flash",
+        EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+        ON_READY_STATE_CHANGE = "onreadystatechange",
+        
+        win = window,
+        doc = document,
+        nav = navigator,
+        
+        plugin = false,
+        domLoadFnArr = [main],
+        regObjArr = [],
+        objIdArr = [],
+        listenersArr = [],
+        storedAltContent,
+        storedAltContentId,
+        storedCallbackFn,
+        storedCallbackObj,
+        isDomLoaded = false,
+        isExpressInstallActive = false,
+        dynamicStylesheet,
+        dynamicStylesheetMedia,
+        autoHideShow = true,
+    
+    /* Centralized function for browser feature detection
+        - User agent string detection is only used when no good alternative is possible
+        - Is executed directly for optimal performance
+    */  
+    ua = function() {
+        var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+            u = nav.userAgent.toLowerCase(),
+            p = nav.platform.toLowerCase(),
+            windows = p ? /win/.test(p) : /win/.test(u),
+            mac = p ? /mac/.test(p) : /mac/.test(u),
+            webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+            ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+            playerVersion = [0,0,0],
+            d = null;
+        if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+            d = nav.plugins[SHOCKWAVE_FLASH].description;
+            if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+                plugin = true;
+                ie = false; // cascaded feature detection for Internet Explorer
+                d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+                playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+                playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+                playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+            }
+        }
+        else if (typeof win.ActiveXObject != UNDEF) {
+            try {
+                var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+                if (a) { // a will return null when ActiveX is disabled
+                    d = a.GetVariable("$version");
+                    if (d) {
+                        ie = true; // cascaded feature detection for Internet Explorer
+                        d = d.split(" ")[1].split(",");
+                        playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+            }
+            catch(e) {}
+        }
+        return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+    }(),
+    
+    /* Cross-browser onDomLoad
+        - Will fire an event as soon as the DOM of a web page is loaded
+        - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+        - Regular onload serves as fallback
+    */ 
+    onDomLoad = function() {
+        if (!ua.w3) { return; }
+        if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically 
+            callDomLoadFunctions();
+        }
+        if (!isDomLoaded) {
+            if (typeof doc.addEventListener != UNDEF) {
+                doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+            }       
+            if (ua.ie && ua.win) {
+                doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+                    if (doc.readyState == "complete") {
+                        doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+                        callDomLoadFunctions();
+                    }
+                });
+                if (win == top) { // if not inside an iframe
+                    (function(){
+                        if (isDomLoaded) { return; }
+                        try {
+                            doc.documentElement.doScroll("left");
+                        }
+                        catch(e) {
+                            setTimeout(arguments.callee, 0);
+                            return;
+                        }
+                        callDomLoadFunctions();
+                    })();
+                }
+            }
+            if (ua.wk) {
+                (function(){
+                    if (isDomLoaded) { return; }
+                    if (!/loaded|complete/.test(doc.readyState)) {
+                        setTimeout(arguments.callee, 0);
+                        return;
+                    }
+                    callDomLoadFunctions();
+                })();
+            }
+            addLoadEvent(callDomLoadFunctions);
+        }
+    }();
+    
+    function callDomLoadFunctions() {
+        if (isDomLoaded) { return; }
+        try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+            var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+            t.parentNode.removeChild(t);
+        }
+        catch (e) { return; }
+        isDomLoaded = true;
+        var dl = domLoadFnArr.length;
+        for (var i = 0; i < dl; i++) {
+            domLoadFnArr[i]();
+        }
+    }
+    
+    function addDomLoadEvent(fn) {
+        if (isDomLoaded) {
+            fn();
+        }
+        else { 
+            domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+        }
+    }
+    
+    /* Cross-browser onload
+        - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+        - Will fire an event as soon as a web page including all of its assets are loaded 
+     */
+    function addLoadEvent(fn) {
+        if (typeof win.addEventListener != UNDEF) {
+            win.addEventListener("load", fn, false);
+        }
+        else if (typeof doc.addEventListener != UNDEF) {
+            doc.addEventListener("load", fn, false);
+        }
+        else if (typeof win.attachEvent != UNDEF) {
+            addListener(win, "onload", fn);
+        }
+        else if (typeof win.onload == "function") {
+            var fnOld = win.onload;
+            win.onload = function() {
+                fnOld();
+                fn();
+            };
+        }
+        else {
+            win.onload = fn;
+        }
+    }
+    
+    /* Main function
+        - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+    */
+    function main() { 
+        if (plugin) {
+            testPlayerVersion();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Detect the Flash Player version for non-Internet Explorer browsers
+        - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+          a. Both release and build numbers can be detected
+          b. Avoid wrong descriptions by corrupt installers provided by Adobe
+          c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+        - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+    */
+    function testPlayerVersion() {
+        var b = doc.getElementsByTagName("body")[0];
+        var o = createElement(OBJECT);
+        o.setAttribute("type", FLASH_MIME_TYPE);
+        var t = b.appendChild(o);
+        if (t) {
+            var counter = 0;
+            (function(){
+                if (typeof t.GetVariable != UNDEF) {
+                    var d = t.GetVariable("$version");
+                    if (d) {
+                        d = d.split(" ")[1].split(",");
+                        ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+                else if (counter < 10) {
+                    counter++;
+                    setTimeout(arguments.callee, 10);
+                    return;
+                }
+                b.removeChild(o);
+                t = null;
+                matchVersions();
+            })();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Perform Flash Player and SWF version matching; static publishing only
+    */
+    function matchVersions() {
+        var rl = regObjArr.length;
+        if (rl > 0) {
+            for (var i = 0; i < rl; i++) { // for each registered object element
+                var id = regObjArr[i].id;
+                var cb = regObjArr[i].callbackFn;
+                var cbObj = {success:false, id:id};
+                if (ua.pv[0] > 0) {
+                    var obj = getElementById(id);
+                    if (obj) {
+                        if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+                            setVisibility(id, true);
+                            if (cb) {
+                                cbObj.success = true;
+                                cbObj.ref = getObjectById(id);
+                                cb(cbObj);
+                            }
+                        }
+                        else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+                            var att = {};
+                            att.data = regObjArr[i].expressInstall;
+                            att.width = obj.getAttribute("width") || "0";
+                            att.height = obj.getAttribute("height") || "0";
+                            if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+                            if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+                            // parse HTML object param element's name-value pairs
+                            var par = {};
+                            var p = obj.getElementsByTagName("param");
+                            var pl = p.length;
+                            for (var j = 0; j < pl; j++) {
+                                if (p[j].getAttribute("name").toLowerCase() != "movie") {
+                                    par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+                                }
+                            }
+                            showExpressInstall(att, par, id, cb);
+                        }
+                        else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+                            displayAltContent(obj);
+                            if (cb) { cb(cbObj); }
+                        }
+                    }
+                }
+                else {  // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+                    setVisibility(id, true);
+                    if (cb) {
+                        var o = getObjectById(id); // test whether there is an HTML object element or not
+                        if (o && typeof o.SetVariable != UNDEF) { 
+                            cbObj.success = true;
+                            cbObj.ref = o;
+                        }
+                        cb(cbObj);
+                    }
+                }
+            }
+        }
+    }
+    
+    function getObjectById(objectIdStr) {
+        var r = null;
+        var o = getElementById(objectIdStr);
+        if (o && o.nodeName == "OBJECT") {
+            if (typeof o.SetVariable != UNDEF) {
+                r = o;
+            }
+            else {
+                var n = o.getElementsByTagName(OBJECT)[0];
+                if (n) {
+                    r = n;
+                }
+            }
+        }
+        return r;
+    }
+    
+    /* Requirements for Adobe Express Install
+        - only one instance can be active at a time
+        - fp 6.0.65 or higher
+        - Win/Mac OS only
+        - no Webkit engines older than version 312
+    */
+    function canExpressInstall() {
+        return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+    }
+    
+    /* Show the Adobe Express Install dialog
+        - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+    */
+    function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+        isExpressInstallActive = true;
+        storedCallbackFn = callbackFn || null;
+        storedCallbackObj = {success:false, id:replaceElemIdStr};
+        var obj = getElementById(replaceElemIdStr);
+        if (obj) {
+            if (obj.nodeName == "OBJECT") { // static publishing
+                storedAltContent = abstractAltContent(obj);
+                storedAltContentId = null;
+            }
+            else { // dynamic publishing
+                storedAltContent = obj;
+                storedAltContentId = replaceElemIdStr;
+            }
+            att.id = EXPRESS_INSTALL_ID;
+            if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+            if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+            doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+            var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+                fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+            if (typeof par.flashvars != UNDEF) {
+                par.flashvars += "&" + fv;
+            }
+            else {
+                par.flashvars = fv;
+            }
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            if (ua.ie && ua.win && obj.readyState != 4) {
+                var newObj = createElement("div");
+                replaceElemIdStr += "SWFObjectNew";
+                newObj.setAttribute("id", replaceElemIdStr);
+                obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        obj.parentNode.removeChild(obj);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            createSWF(att, par, replaceElemIdStr);
+        }
+    }
+    
+    /* Functions to abstract and display alternative content
+    */
+    function displayAltContent(obj) {
+        if (ua.ie && ua.win && obj.readyState != 4) {
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            var el = createElement("div");
+            obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+            el.parentNode.replaceChild(abstractAltContent(obj), el);
+            obj.style.display = "none";
+            (function(){
+                if (obj.readyState == 4) {
+                    obj.parentNode.removeChild(obj);
+                }
+                else {
+                    setTimeout(arguments.callee, 10);
+                }
+            })();
+        }
+        else {
+            obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+        }
+    } 
+
+    function abstractAltContent(obj) {
+        var ac = createElement("div");
+        if (ua.win && ua.ie) {
+            ac.innerHTML = obj.innerHTML;
+        }
+        else {
+            var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+            if (nestedObj) {
+                var c = nestedObj.childNodes;
+                if (c) {
+                    var cl = c.length;
+                    for (var i = 0; i < cl; i++) {
+                        if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+                            ac.appendChild(c[i].cloneNode(true));
+                        }
+                    }
+                }
+            }
+        }
+        return ac;
+    }
+    
+    /* Cross-browser dynamic SWF creation
+    */
+    function createSWF(attObj, parObj, id) {
+        var r, el = getElementById(id);
+        if (ua.wk && ua.wk < 312) { return r; }
+        if (el) {
+            if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+                attObj.id = id;
+            }
+            if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+                var att = "";
+                for (var i in attObj) {
+                    if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+                        if (i.toLowerCase() == "data") {
+                            parObj.movie = attObj[i];
+                        }
+                        else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            att += ' class="' + attObj[i] + '"';
+                        }
+                        else if (i.toLowerCase() != "classid") {
+                            att += ' ' + i + '="' + attObj[i] + '"';
+                        }
+                    }
+                }
+                var par = "";
+                for (var j in parObj) {
+                    if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+                        par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+                    }
+                }
+                el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+                objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+                r = getElementById(attObj.id);  
+            }
+            else { // well-behaving browsers
+                var o = createElement(OBJECT);
+                o.setAttribute("type", FLASH_MIME_TYPE);
+                for (var m in attObj) {
+                    if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+                        if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            o.setAttribute("class", attObj[m]);
+                        }
+                        else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+                            o.setAttribute(m, attObj[m]);
+                        }
+                    }
+                }
+                for (var n in parObj) {
+                    if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+                        createObjParam(o, n, parObj[n]);
+                    }
+                }
+                el.parentNode.replaceChild(o, el);
+                r = o;
+            }
+        }
+        return r;
+    }
+    
+    function createObjParam(el, pName, pValue) {
+        var p = createElement("param");
+        p.setAttribute("name", pName);  
+        p.setAttribute("value", pValue);
+        el.appendChild(p);
+    }
+    
+    /* Cross-browser SWF removal
+        - Especially needed to safely and completely remove a SWF in Internet Explorer
+    */
+    function removeSWF(id) {
+        var obj = getElementById(id);
+        if (obj && obj.nodeName == "OBJECT") {
+            if (ua.ie && ua.win) {
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        removeObjectInIE(id);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            else {
+                obj.parentNode.removeChild(obj);
+            }
+        }
+    }
+    
+    function removeObjectInIE(id) {
+        var obj = getElementById(id);
+        if (obj) {
+            for (var i in obj) {
+                if (typeof obj[i] == "function") {
+                    obj[i] = null;
+                }
+            }
+            obj.parentNode.removeChild(obj);
+        }
+    }
+    
+    /* Functions to optimize JavaScript compression
+    */
+    function getElementById(id) {
+        var el = null;
+        try {
+            el = doc.getElementById(id);
+        }
+        catch (e) {}
+        return el;
+    }
+    
+    function createElement(el) {
+        return doc.createElement(el);
+    }
+    
+    /* Updated attachEvent function for Internet Explorer
+        - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+    */  
+    function addListener(target, eventType, fn) {
+        target.attachEvent(eventType, fn);
+        listenersArr[listenersArr.length] = [target, eventType, fn];
+    }
+    
+    /* Flash Player and SWF content version matching
+    */
+    function hasPlayerVersion(rv) {
+        var pv = ua.pv, v = rv.split(".");
+        v[0] = parseInt(v[0], 10);
+        v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+        v[2] = parseInt(v[2], 10) || 0;
+        return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+    }
+    
+    /* Cross-browser dynamic CSS creation
+        - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+    */  
+    function createCSS(sel, decl, media, newStyle) {
+        if (ua.ie && ua.mac) { return; }
+        var h = doc.getElementsByTagName("head")[0];
+        if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+        var m = (media && typeof media == "string") ? media : "screen";
+        if (newStyle) {
+            dynamicStylesheet = null;
+            dynamicStylesheetMedia = null;
+        }
+        if (!dynamicStylesheet || dynamicStylesheetMedia != m) { 
+            // create dynamic stylesheet + get a global reference to it
+            var s = createElement("style");
+            s.setAttribute("type", "text/css");
+            s.setAttribute("media", m);
+            dynamicStylesheet = h.appendChild(s);
+            if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+                dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+            }
+            dynamicStylesheetMedia = m;
+        }
+        // add style rule
+        if (ua.ie && ua.win) {
+            if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+                dynamicStylesheet.addRule(sel, decl);
+            }
+        }
+        else {
+            if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+                dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+            }
+        }
+    }
+    
+    function setVisibility(id, isVisible) {
+        if (!autoHideShow) { return; }
+        var v = isVisible ? "visible" : "hidden";
+        if (isDomLoaded && getElementById(id)) {
+            getElementById(id).style.visibility = v;
+        }
+        else {
+            createCSS("#" + id, "visibility:" + v);
+        }
+    }
+
+    /* Filter to avoid XSS attacks
+    */
+    function urlEncodeIfNecessary(s) {
+        var regex = /[\\\"<>\.;]/;
+        var hasBadChars = regex.exec(s) != null;
+        return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+    }
+    
+    /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+    */
+    var cleanup = function() {
+        if (ua.ie && ua.win) {
+            window.attachEvent("onunload", function() {
+                // remove listeners to avoid memory leaks
+                var ll = listenersArr.length;
+                for (var i = 0; i < ll; i++) {
+                    listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+                }
+                // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+                var il = objIdArr.length;
+                for (var j = 0; j < il; j++) {
+                    removeSWF(objIdArr[j]);
+                }
+                // cleanup library's main closures to avoid memory leaks
+                for (var k in ua) {
+                    ua[k] = null;
+                }
+                ua = null;
+                for (var l in swfobject) {
+                    swfobject[l] = null;
+                }
+                swfobject = null;
+            });
+        }
+    }();
+    
+    return {
+        /* Public API
+            - Reference: http://code.google.com/p/swfobject/wiki/documentation
+        */ 
+        registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+            if (ua.w3 && objectIdStr && swfVersionStr) {
+                var regObj = {};
+                regObj.id = objectIdStr;
+                regObj.swfVersion = swfVersionStr;
+                regObj.expressInstall = xiSwfUrlStr;
+                regObj.callbackFn = callbackFn;
+                regObjArr[regObjArr.length] = regObj;
+                setVisibility(objectIdStr, false);
+            }
+            else if (callbackFn) {
+                callbackFn({success:false, id:objectIdStr});
+            }
+        },
+        
+        getObjectById: function(objectIdStr) {
+            if (ua.w3) {
+                return getObjectById(objectIdStr);
+            }
+        },
+        
+        embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+            var callbackObj = {success:false, id:replaceElemIdStr};
+            if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+                setVisibility(replaceElemIdStr, false);
+                addDomLoadEvent(function() {
+                    widthStr += ""; // auto-convert to string
+                    heightStr += "";
+                    var att = {};
+                    if (attObj && typeof attObj === OBJECT) {
+                        for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+                            att[i] = attObj[i];
+                        }
+                    }
+                    att.data = swfUrlStr;
+                    att.width = widthStr;
+                    att.height = heightStr;
+                    var par = {}; 
+                    if (parObj && typeof parObj === OBJECT) {
+                        for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+                            par[j] = parObj[j];
+                        }
+                    }
+                    if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+                        for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+                            if (typeof par.flashvars != UNDEF) {
+                                par.flashvars += "&" + k + "=" + flashvarsObj[k];
+                            }
+                            else {
+                                par.flashvars = k + "=" + flashvarsObj[k];
+                            }
+                        }
+                    }
+                    if (hasPlayerVersion(swfVersionStr)) { // create SWF
+                        var obj = createSWF(att, par, replaceElemIdStr);
+                        if (att.id == replaceElemIdStr) {
+                            setVisibility(replaceElemIdStr, true);
+                        }
+                        callbackObj.success = true;
+                        callbackObj.ref = obj;
+                    }
+                    else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+                        att.data = xiSwfUrlStr;
+                        showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+                        return;
+                    }
+                    else { // show alternative content
+                        setVisibility(replaceElemIdStr, true);
+                    }
+                    if (callbackFn) { callbackFn(callbackObj); }
+                });
+            }
+            else if (callbackFn) { callbackFn(callbackObj); }
+        },
+        
+        switchOffAutoHideShow: function() {
+            autoHideShow = false;
+        },
+        
+        ua: ua,
+        
+        getFlashPlayerVersion: function() {
+            return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+        },
+        
+        hasFlashPlayerVersion: hasPlayerVersion,
+        
+        createSWF: function(attObj, parObj, replaceElemIdStr) {
+            if (ua.w3) {
+                return createSWF(attObj, parObj, replaceElemIdStr);
+            }
+            else {
+                return undefined;
+            }
+        },
+        
+        showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+            if (ua.w3 && canExpressInstall()) {
+                showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+            }
+        },
+        
+        removeSWF: function(objElemIdStr) {
+            if (ua.w3) {
+                removeSWF(objElemIdStr);
+            }
+        },
+        
+        createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+            if (ua.w3) {
+                createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+            }
+        },
+        
+        addDomLoadEvent: addDomLoadEvent,
+        
+        addLoadEvent: addLoadEvent,
+        
+        getQueryParamValue: function(param) {
+            var q = doc.location.search || doc.location.hash;
+            if (q) {
+                if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+                if (param == null) {
+                    return urlEncodeIfNecessary(q);
+                }
+                var pairs = q.split("&");
+                for (var i = 0; i < pairs.length; i++) {
+                    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+                        return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+                    }
+                }
+            }
+            return "";
+        },
+        
+        // For internal usage only
+        expressInstallCallback: function() {
+            if (isExpressInstallActive) {
+                var obj = getElementById(EXPRESS_INSTALL_ID);
+                if (obj && storedAltContent) {
+                    obj.parentNode.replaceChild(storedAltContent, obj);
+                    if (storedAltContentId) {
+                        setVisibility(storedAltContentId, true);
+                        if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+                    }
+                    if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+                }
+                isExpressInstallActive = false;
+            } 
+        }
+    };
+}();
+/**
+ * @class Ext.FlashComponent
+ * @extends Ext.BoxComponent
+ * @constructor
+ * @xtype flash
+ */
+Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} flashVersion
+     * Indicates the version the flash content was published for. Defaults to <tt>'9.0.45'</tt>.
+     */
+    flashVersion : '9.0.45',
+
+    /**
+     * @cfg {String} backgroundColor
+     * The background color of the chart. Defaults to <tt>'#ffffff'</tt>.
+     */
+    backgroundColor: '#ffffff',
+
+    /**
+     * @cfg {String} wmode
+     * The wmode of the flash object. This can be used to control layering. Defaults to <tt>'opaque'</tt>.
+     */
+    wmode: 'opaque',
+
+    /**
+     * @cfg {String} url
+     * The URL of the chart to include. Defaults to <tt>undefined</tt>.
+     */
+    url: undefined,
+    swfId : undefined,
+    swfWidth: '100%',
+    swfHeight: '100%',
+
+    /**
+     * @cfg {Boolean} expressInstall
+     * True to prompt the user to install flash if not installed. Note that this uses
+     * Ext.FlashComponent.EXPRESS_INSTALL_URL, which should be set to the local resource. Defaults to <tt>false</tt>.
+     */
+    expressInstall: false,
+
+    initComponent : function(){
+        Ext.FlashComponent.superclass.initComponent.call(this);
+
+        this.addEvents('initialize');
+    },
+
+    onRender : function(){
+        Ext.FlashComponent.superclass.onRender.apply(this, arguments);
+
+        var params = {
+            allowScriptAccess: 'always',
+            bgcolor: this.backgroundColor,
+            wmode: this.wmode
+        }, vars = {
+            allowedDomain: document.location.hostname,
+            elementID: this.getId(),
+            eventHandler: 'Ext.FlashEventProxy.onEvent'
+        };
+
+        new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
+            this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
+
+        this.swf = Ext.getDom(this.id);
+        this.el = Ext.get(this.swf);
+    },
+
+    getSwfId : function(){
+        return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID));
+    },
+
+    getId : function(){
+        return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID));
+    },
+
+    onFlashEvent : function(e){
+        switch(e.type){
+            case "swfReady":
+                this.initSwf();
+                return;
+            case "log":
+                return;
+        }
+        e.component = this;
+        this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e);
+    },
+
+    initSwf : function(){
+        this.onSwfReady(!!this.isInitialized);
+        this.isInitialized = true;
+        this.fireEvent('initialize', this);
+    },
+
+    beforeDestroy: function(){
+        if(this.rendered){
+            swfobject.removeSWF(this.swf.id);
+        }
+        Ext.FlashComponent.superclass.beforeDestroy.call(this);
+    },
+
+    onSwfReady : Ext.emptyFn
+});
+
+/**
+ * Sets the url for installing flash if it doesn't exist. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';
+
+Ext.reg('flash', Ext.FlashComponent);/**
+ * @class Ext.FlashProxy
+ * @singleton
+ */
+Ext.FlashEventProxy = {
+    onEvent : function(id, e){
+        var fp = Ext.getCmp(id);
+        if(fp){
+            fp.onFlashEvent(e);
+        }else{
+            arguments.callee.defer(10, this, [id, e]);
+        }
+    }
+}/**
+ * @class Ext.chart.Chart
+ * @extends Ext.FlashComponent
+ * The Ext.chart package provides the capability to visualize data with flash based charting.
+ * Each chart binds directly to an Ext.data.Store enabling automatic updates of the chart.
+ * @constructor
+ * @xtype chart
+ */
+ 
+ Ext.chart.Chart = Ext.extend(Ext.FlashComponent, {
+    refreshBuffer: 100,
+
+    /**
+     * @cfg {Object} chartStyle
+     * Sets styles for this chart. Contains a number of default values. Modifying this property will override
+     * the base styles on the chart.
+     */
+    chartStyle: {
+        padding: 10,
+        animationEnabled: true,
+        font: {
+            name: 'Tahoma',
+            color: 0x444444,
+            size: 11
+        },
+        dataTip: {
+            padding: 5,
+            border: {
+                color: 0x99bbe8,
+                size:1
+            },
+            background: {
+                color: 0xDAE7F6,
+                alpha: .9
+            },
+            font: {
+                name: 'Tahoma',
+                color: 0x15428B,
+                size: 10,
+                bold: true
+            }
+        }
+    },
+    
+    /**
+     * @cfg {String} url
+     * The url to load the chart from. This defaults to Ext.chart.Chart.CHART_URL, which should
+     * be modified to point to the local charts resource.
+     */
+    
+    /**
+     * @cfg {Object} extraStyle
+     * Contains extra styles that will be added or overwritten to the default chartStyle. Defaults to <tt>null</tt>.
+     */
+    extraStyle: null,
+    
+    /**
+     * @cfg {Boolean} disableCaching
+     * True to add a "cache buster" to the end of the chart url. Defaults to true for Opera and IE.
+     */
+    disableCaching: Ext.isIE || Ext.isOpera,
+    disableCacheParam: '_dc',
+
+    initComponent : function(){
+        Ext.chart.Chart.superclass.initComponent.call(this);
+        if(!this.url){
+            this.url = Ext.chart.Chart.CHART_URL;
+        }
+        if(this.disableCaching){
+            this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime()));
+        }
+        this.addEvents(
+            'itemmouseover',
+            'itemmouseout',
+            'itemclick',
+            'itemdoubleclick',
+            'itemdragstart',
+            'itemdrag',
+            'itemdragend'
+        );
+        this.store = Ext.StoreMgr.lookup(this.store);
+    },
+
+    /**
+     * Sets a single style value on the Chart instance.
+     *
+     * @param name {String} Name of the Chart style value to change.
+     * @param value {Object} New value to pass to the Chart style.
+     */
+     setStyle: function(name, value){
+         this.swf.setStyle(name, Ext.encode(value));
+     },
+
+    /**
+     * Resets all styles on the Chart instance.
+     *
+     * @param styles {Object} Initializer for all Chart styles.
+     */
+    setStyles: function(styles){
+        this.swf.setStyles(Ext.encode(styles));
+    },
+
+    /**
+     * Sets the styles on all series in the Chart.
+     *
+     * @param styles {Array} Initializer for all Chart series styles.
+     */
+    setSeriesStyles: function(styles){
+        var s = [];
+        Ext.each(styles, function(style){
+            s.push(Ext.encode(style));
+        });
+        this.swf.setSeriesStyles(s);
+    },
+
+    setCategoryNames : function(names){
+        this.swf.setCategoryNames(names);
+    },
+
+    setTipRenderer : function(fn){
+        var chart = this;
+        this.tipFnName = this.createFnProxy(function(item, index, series){
+            var record = chart.store.getAt(index);
+            return fn(chart, record, index, series);
+        }, this.tipFnName);
+        this.swf.setDataTipFunction(this.tipFnName);
+    },
+
+    setSeries : function(series){
+        this.series = series;
+        this.refresh();
+    },
+
+    /**
+     * Changes the data store bound to this chart and refreshes it.
+     * @param {Store} store The store to bind to this chart
+     */
+    bindStore : function(store, initial){
+        if(!initial && this.store){
+            this.store.un("datachanged", this.refresh, this);
+            this.store.un("add", this.delayRefresh, this);
+            this.store.un("remove", this.delayRefresh, this);
+            this.store.un("update", this.delayRefresh, this);
+            this.store.un("clear", this.refresh, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                datachanged: this.refresh,
+                add: this.delayRefresh,
+                remove: this.delayRefresh,
+                update: this.delayRefresh,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store && !initial){
+            this.refresh();
+        }
+    },
+
+    onSwfReady : function(isReset){
+        Ext.chart.Chart.superclass.onSwfReady.call(this, isReset);
+        this.swf.setType(this.type);
+
+        if(this.chartStyle){
+            this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle));
+        }
+
+        if(this.categoryNames){
+            this.setCategoryNames(this.categoryNames);
+        }
+
+        if(this.tipRenderer){
+            this.setTipRenderer(this.tipRenderer);
+        }
+        if(!isReset){
+            this.bindStore(this.store, true);
+        }
+        this.refresh.defer(10, this);
+    },
+
+    delayRefresh : function(){
+        if(!this.refreshTask){
+            this.refreshTask = new Ext.util.DelayedTask(this.refresh, this);
+        }
+        this.refreshTask.delay(this.refreshBuffer);
+    },
+
+    refresh : function(){
+        var styleChanged = false;
+        // convert the store data into something YUI charts can understand
+        var data = [], rs = this.store.data.items;
+        for(var j = 0, len = rs.length; j < len; j++){
+            data[j] = rs[j].data;
+        }
+        //make a copy of the series definitions so that we aren't
+        //editing them directly.
+        var dataProvider = [];
+        var seriesCount = 0;
+        var currentSeries = null;
+        var i = 0;
+        if(this.series){
+            seriesCount = this.series.length;
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = this.series[i];
+                var clonedSeries = {};
+                for(var prop in currentSeries){
+                    if(prop == "style" && currentSeries.style !== null){
+                        clonedSeries.style = Ext.encode(currentSeries.style);
+                        styleChanged = true;
+                        //we don't want to modify the styles again next time
+                        //so null out the style property.
+                        // this causes issues
+                        // currentSeries.style = null;
+                    } else{
+                        clonedSeries[prop] = currentSeries[prop];
+                    }
+                }
+                dataProvider.push(clonedSeries);
+            }
+        }
+
+        if(seriesCount > 0){
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = dataProvider[i];
+                if(!currentSeries.type){
+                    currentSeries.type = this.type;
+                }
+                currentSeries.dataProvider = data;
+            }
+        } else{
+            dataProvider.push({type: this.type, dataProvider: data});
+        }
+        this.swf.setDataProvider(dataProvider);
+    },
+
+    createFnProxy : function(fn, old){
+        if(old){
+            delete window[old];
+        }
+        var fnName = "extFnProxy" + (++Ext.chart.Chart.PROXY_FN_ID);
+        window[fnName] = fn;
+        return fnName;
+    },
+    
+    onDestroy: function(){
+        Ext.chart.Chart.superclass.onDestroy.call(this);
+        delete window[this.tipFnName];
+    }
+});
+Ext.reg('chart', Ext.chart.Chart);
+Ext.chart.Chart.PROXY_FN_ID = 0;
+
+/**
+ * Sets the url to load the chart from. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf';
+
+/**
+ * @class Ext.chart.PieChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype piechart
+ */
+Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, {
+    type: 'pie',
+
+    onSwfReady : function(isReset){
+        Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset);
+
+        this.setDataField(this.dataField);
+        this.setCategoryField(this.categoryField);
+    },
+
+    setDataField : function(field){
+        this.dataField = field;
+        this.swf.setDataField(field);
+    },
+
+    setCategoryField : function(field){
+        this.categoryField = field;
+        this.swf.setCategoryField(field);
+    }
+});
+Ext.reg('piechart', Ext.chart.PieChart);
+
+/**
+ * @class Ext.chart.CartesianChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype cartesianchart
+ */
+Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, {
+    onSwfReady : function(isReset){
+        Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset);
+
+        if(this.xField){
+            this.setXField(this.xField);
+        }
+        if(this.yField){
+            this.setYField(this.yField);
+        }
+        if(this.xAxis){
+            this.setXAxis(this.xAxis);
+        }
+        if(this.yAxis){
+            this.setYAxis(this.yAxis);
+        }
+    },
+
+    setXField : function(value){
+        this.xField = value;
+        this.swf.setHorizontalField(value);
+    },
+
+    setYField : function(value){
+        this.yField = value;
+        this.swf.setVerticalField(value);
+    },
+
+    setXAxis : function(value){
+        this.xAxis = this.createAxis('xAxis', value);
+        this.swf.setHorizontalAxis(this.xAxis);
+    },
+
+    setYAxis : function(value){
+        this.yAxis = this.createAxis('yAxis', value);
+        this.swf.setVerticalAxis(this.yAxis);
+    },
+
+    createAxis : function(axis, value){
+        var o = Ext.apply({}, value), oldFn = null;
+        if(this[axis]){
+            oldFn = this[axis].labelFunction;
+        }
+        if(o.labelRenderer){
+            var fn = o.labelRenderer;
+            o.labelFunction = this.createFnProxy(function(v){
+                return fn(v);
+            }, oldFn);
+            delete o.labelRenderer;
+        }
+        return o;
+    }
+});
+Ext.reg('cartesianchart', Ext.chart.CartesianChart);
+
+/**
+ * @class Ext.chart.LineChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype linechart
+ */
+Ext.chart.LineChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'line'
+});
+Ext.reg('linechart', Ext.chart.LineChart);
+
+/**
+ * @class Ext.chart.ColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype columnchart
+ */
+Ext.chart.ColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'column'
+});
+Ext.reg('columnchart', Ext.chart.ColumnChart);
+
+/**
+ * @class Ext.chart.StackedColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedcolumnchart
+ */
+Ext.chart.StackedColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackcolumn'
+});
+Ext.reg('stackedcolumnchart', Ext.chart.StackedColumnChart);
+
+/**
+ * @class Ext.chart.BarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype barchart
+ */
+Ext.chart.BarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'bar'
+});
+Ext.reg('barchart', Ext.chart.BarChart);
+
+/**
+ * @class Ext.chart.StackedBarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedbarchart
+ */
+Ext.chart.StackedBarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackbar'
+});
+Ext.reg('stackedbarchart', Ext.chart.StackedBarChart);
+
+
+
+/**
+ * @class Ext.chart.Axis
+ * Defines a CartesianChart's vertical or horizontal axis.
+ * @constructor
+ */
+Ext.chart.Axis = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.chart.Axis.prototype =
+{
+    /**
+     * The type of axis.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The direction in which the axis is drawn. May be "horizontal" or "vertical".
+     *
+     * @property orientation
+     * @type String
+     */
+    orientation: "horizontal",
+
+    /**
+     * If true, the items on the axis will be drawn in opposite direction.
+     *
+     * @property reverse
+     * @type Boolean
+     */
+    reverse: false,
+
+    /**
+     * A string reference to the globally-accessible function that may be called to
+     * determine each of the label values for this axis.
+     *
+     * @property labelFunction
+     * @type String
+     */
+    labelFunction: null,
+
+    /**
+     * If true, labels that overlap previously drawn labels on the axis will be hidden.
+     *
+     * @property hideOverlappingLabels
+     * @type Boolean
+     */
+    hideOverlappingLabels: true
+};
+
+/**
+ * @class Ext.chart.NumericAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in numeric values.
+ * @constructor
+ */
+Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, {
+    type: "numeric",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Number
+     */
+    minimum: NaN,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: NaN,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property minorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true,
+
+    /**
+     * If true, and the bounds are calculated automatically, either the minimum or
+     * maximum will be set to zero.
+     *
+     * @property alwaysShowZero
+     * @type Boolean
+     */
+    alwaysShowZero: true,
+
+    /**
+     * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
+     *
+     * @property scale
+     * @type String
+     */
+    scale: "linear"
+});
+
+/**
+ * @class Ext.chart.TimeAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in time-based values.
+ * @constructor
+ */
+Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, {
+    type: "time",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Date
+     */
+    minimum: null,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: null,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The time unit used by the majorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    majorTimeUnit: null,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * The time unit used by the minorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    minorTimeUnit: null,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true
+});
+
+/**
+ * @class Ext.chart.CategoryAxis
+ * @extends Ext.chart.Axis
+ * A type of axis that displays items in categories.
+ * @constructor
+ */
+Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, {
+    type: "category",
+
+    /**
+     * A list of category names to display along this axis.
+     *
+     * @property categoryNames
+     * @type Array
+     */
+    categoryNames: null
+});
+
+/**
+ * @class Ext.chart.Series
+ * Series class for the charts widget.
+ * @constructor
+ */
+Ext.chart.Series = function(config) { Ext.apply(this, config); };
+
+Ext.chart.Series.prototype =
+{
+    /**
+     * The type of series.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The human-readable name of the series.
+     *
+     * @property displayName
+     * @type String
+     */
+    displayName: null
+};
+
+/**
+ * @class Ext.chart.CartesianSeries
+ * @extends Ext.chart.Series
+ * CartesianSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, {
+    /**
+     * The field used to access the x-axis value from the items from the data source.
+     *
+     * @property xField
+     * @type String
+     */
+    xField: null,
+
+    /**
+     * The field used to access the y-axis value from the items from the data source.
+     *
+     * @property yField
+     * @type String
+     */
+    yField: null
+});
+
+/**
+ * @class Ext.chart.ColumnSeries
+ * @extends Ext.chart.CartesianSeries
+ * ColumnSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.ColumnSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "column"
+});
+
+/**
+ * @class Ext.chart.LineSeries
+ * @extends Ext.chart.CartesianSeries
+ * LineSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.LineSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "line"
+});
+
+/**
+ * @class Ext.chart.BarSeries
+ * @extends Ext.chart.CartesianSeries
+ * BarSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.BarSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "bar"
+});
+
+
+/**
+ * @class Ext.chart.PieSeries
+ * @extends Ext.chart.Series
+ * PieSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, {
+    type: "pie",
+    dataField: null,
+    categoryField: null
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-charts.js	(revision 625)
@@ -0,0 +1,10 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/* SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();Ext.FlashComponent=Ext.extend(Ext.BoxComponent,{flashVersion:"9.0.45",backgroundColor:"#ffffff",wmode:"opaque",url:undefined,swfId:undefined,swfWidth:"100%",swfHeight:"100%",expressInstall:false,initComponent:function(){Ext.FlashComponent.superclass.initComponent.call(this);this.addEvents("initialize")},onRender:function(){Ext.FlashComponent.superclass.onRender.apply(this,arguments);var b={allowScriptAccess:"always",bgcolor:this.backgroundColor,wmode:this.wmode},a={allowedDomain:document.location.hostname,elementID:this.getId(),eventHandler:"Ext.FlashEventProxy.onEvent"};new swfobject.embedSWF(this.url,this.id,this.swfWidth,this.swfHeight,this.flashVersion,this.expressInstall?Ext.FlashComponent.EXPRESS_INSTALL_URL:undefined,a,b);this.swf=Ext.getDom(this.id);this.el=Ext.get(this.swf)},getSwfId:function(){return this.swfId||(this.swfId="extswf"+(++Ext.Component.AUTO_ID))},getId:function(){return this.id||(this.id="extflashcmp"+(++Ext.Component.AUTO_ID))},onFlashEvent:function(a){switch(a.type){case"swfReady":this.initSwf();return;case"log":return}a.component=this;this.fireEvent(a.type.toLowerCase().replace(/event$/,""),a)},initSwf:function(){this.onSwfReady(!!this.isInitialized);this.isInitialized=true;this.fireEvent("initialize",this)},beforeDestroy:function(){if(this.rendered){swfobject.removeSWF(this.swf.id)}Ext.FlashComponent.superclass.beforeDestroy.call(this)},onSwfReady:Ext.emptyFn});Ext.FlashComponent.EXPRESS_INSTALL_URL="http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf";Ext.reg("flash",Ext.FlashComponent);Ext.FlashEventProxy={onEvent:function(c,b){var a=Ext.getCmp(c);if(a){a.onFlashEvent(b)}else{arguments.callee.defer(10,this,[c,b])}}};Ext.chart.Chart=Ext.extend(Ext.FlashComponent,{refreshBuffer:100,chartStyle:{padding:10,animationEnabled:true,font:{name:"Tahoma",color:4473924,size:11},dataTip:{padding:5,border:{color:10075112,size:1},background:{color:14346230,alpha:0.9},font:{name:"Tahoma",color:1393291,size:10,bold:true}}},extraStyle:null,disableCaching:Ext.isIE||Ext.isOpera,disableCacheParam:"_dc",initComponent:function(){Ext.chart.Chart.superclass.initComponent.call(this);if(!this.url){this.url=Ext.chart.Chart.CHART_URL}if(this.disableCaching){this.url=Ext.urlAppend(this.url,String.format("{0}={1}",this.disableCacheParam,new Date().getTime()))}this.addEvents("itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend");this.store=Ext.StoreMgr.lookup(this.store)},setStyle:function(a,b){this.swf.setStyle(a,Ext.encode(b))},setStyles:function(a){this.swf.setStyles(Ext.encode(a))},setSeriesStyles:function(b){var a=[];Ext.each(b,function(c){a.push(Ext.encode(c))});this.swf.setSeriesStyles(a)},setCategoryNames:function(a){this.swf.setCategoryNames(a)},setTipRenderer:function(b){var a=this;this.tipFnName=this.createFnProxy(function(f,d,e){var c=a.store.getAt(d);return b(a,c,d,e)},this.tipFnName);this.swf.setDataTipFunction(this.tipFnName)},setSeries:function(a){this.series=a;this.refresh()},bindStore:function(a,b){if(!b&&this.store){this.store.un("datachanged",this.refresh,this);this.store.un("add",this.delayRefresh,this);this.store.un("remove",this.delayRefresh,this);this.store.un("update",this.delayRefresh,this);this.store.un("clear",this.refresh,this);if(a!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,datachanged:this.refresh,add:this.delayRefresh,remove:this.delayRefresh,update:this.delayRefresh,clear:this.refresh})}this.store=a;if(a&&!b){this.refresh()}},onSwfReady:function(a){Ext.chart.Chart.superclass.onSwfReady.call(this,a);this.swf.setType(this.type);if(this.chartStyle){this.setStyles(Ext.apply(this.extraStyle||{},this.chartStyle))}if(this.categoryNames){this.setCategoryNames(this.categoryNames)}if(this.tipRenderer){this.setTipRenderer(this.tipRenderer)}if(!a){this.bindStore(this.store,true)}this.refresh.defer(10,this)},delayRefresh:function(){if(!this.refreshTask){this.refreshTask=new Ext.util.DelayedTask(this.refresh,this)}this.refreshTask.delay(this.refreshBuffer)},refresh:function(){var l=false;var h=[],c=this.store.data.items;for(var f=0,k=c.length;f<k;f++){h[f]=c[f].data}var e=[];var d=0;var m=null;var g=0;if(this.series){d=this.series.length;for(g=0;g<d;g++){m=this.series[g];var b={};for(var a in m){if(a=="style"&&m.style!==null){b.style=Ext.encode(m.style);l=true}else{b[a]=m[a]}}e.push(b)}}if(d>0){for(g=0;g<d;g++){m=e[g];if(!m.type){m.type=this.type}m.dataProvider=h}}else{e.push({type:this.type,dataProvider:h})}this.swf.setDataProvider(e)},createFnProxy:function(b,a){if(a){delete window[a]}var c="extFnProxy"+(++Ext.chart.Chart.PROXY_FN_ID);window[c]=b;return c},onDestroy:function(){Ext.chart.Chart.superclass.onDestroy.call(this);delete window[this.tipFnName]}});Ext.reg("chart",Ext.chart.Chart);Ext.chart.Chart.PROXY_FN_ID=0;Ext.chart.Chart.CHART_URL="http://yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf";Ext.chart.PieChart=Ext.extend(Ext.chart.Chart,{type:"pie",onSwfReady:function(a){Ext.chart.PieChart.superclass.onSwfReady.call(this,a);this.setDataField(this.dataField);this.setCategoryField(this.categoryField)},setDataField:function(a){this.dataField=a;this.swf.setDataField(a)},setCategoryField:function(a){this.categoryField=a;this.swf.setCategoryField(a)}});Ext.reg("piechart",Ext.chart.PieChart);Ext.chart.CartesianChart=Ext.extend(Ext.chart.Chart,{onSwfReady:function(a){Ext.chart.CartesianChart.superclass.onSwfReady.call(this,a);if(this.xField){this.setXField(this.xField)}if(this.yField){this.setYField(this.yField)}if(this.xAxis){this.setXAxis(this.xAxis)}if(this.yAxis){this.setYAxis(this.yAxis)}},setXField:function(a){this.xField=a;this.swf.setHorizontalField(a)},setYField:function(a){this.yField=a;this.swf.setVerticalField(a)},setXAxis:function(a){this.xAxis=this.createAxis("xAxis",a);this.swf.setHorizontalAxis(this.xAxis)},setYAxis:function(a){this.yAxis=this.createAxis("yAxis",a);this.swf.setVerticalAxis(this.yAxis)},createAxis:function(c,d){var e=Ext.apply({},d),a=null;if(this[c]){a=this[c].labelFunction}if(e.labelRenderer){var b=e.labelRenderer;e.labelFunction=this.createFnProxy(function(f){return b(f)},a);delete e.labelRenderer}return e}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear"});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms-debug.js	(revision 625)
@@ -0,0 +1,7661 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Field
+ * @extends Ext.BoxComponent
+ * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
+ * @constructor
+ * Creates a new Field
+ * @param {Object} config Configuration options
+ * @xtype field
+ */
+Ext.form.Field = Ext.extend(Ext.BoxComponent,  {
+    /**
+     * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password, file (defaults
+     * to "text"). The types "file" and "password" must be used to render those field types currently -- there are
+     * no separate Ext components for those. Note that if you use <tt>inputType:'file'</tt>, {@link #emptyText}
+     * is not supported and should be avoided.
+     */
+    /**
+     * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered,
+     * not those which are built via applyTo (defaults to undefined).
+     */
+    /**
+     * @cfg {Mixed} value A value to initialize this field with (defaults to undefined).
+     */
+    /**
+     * @cfg {String} name The field's HTML name attribute (defaults to "").
+     * <b>Note</b>: this property must be set if this field is to be automatically included with
+     * {@link Ext.form.BasicForm#submit form submit()}.
+     */
+    /**
+     * @cfg {String} cls A custom CSS class to apply to the field's underlying element (defaults to "").
+     */
+
+    /**
+     * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
+     */
+    invalidClass : "x-form-invalid",
+    /**
+     * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided
+     * (defaults to "The value in this field is invalid")
+     */
+    invalidText : "The value in this field is invalid",
+    /**
+     * @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to "x-form-focus")
+     */
+    focusClass : "x-form-focus",
+    /**
+     * @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable
+      automatic validation (defaults to "keyup").
+     */
+    validationEvent : "keyup",
+    /**
+     * @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true).
+     */
+    validateOnBlur : true,
+    /**
+     * @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation
+     * is initiated (defaults to 250)
+     */
+    validationDelay : 250,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "20", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "off"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field")
+     */
+    fieldClass : "x-form-field",
+    /**
+     * @cfg {String} msgTarget The location where error text should display.  Should be one of the following values
+     * (defaults to 'qtip'):
+     *<pre>
+Value         Description
+-----------   ----------------------------------------------------------------------
+qtip          Display a quick tip when the user hovers over the field
+title         Display a default browser title attribute popup
+under         Add a block div beneath the field containing the error text
+side          Add an error icon to the right of the field with a popup on hover
+[element id]  Add the error text directly to the innerHTML of the specified element
+</pre>
+     */
+    msgTarget : 'qtip',
+    /**
+     * @cfg {String} msgFx <b>Experimental</b> The effect used when displaying a validation message under the field
+     * (defaults to 'normal').
+     */
+    msgFx : 'normal',
+    /**
+     * @cfg {Boolean} readOnly <tt>true</tt> to mark the field as readOnly in HTML
+     * (defaults to <tt>false</tt>).
+     * <br><p><b>Note</b>: this only sets the element's readOnly DOM attribute.
+     * Setting <code>readOnly=true</code>, for example, will not disable triggering a
+     * ComboBox or DateField; it gives you the option of forcing the user to choose
+     * via the trigger without typing in the text box. To hide the trigger use
+     * <code>{@link Ext.form.TriggerField#hideTrigger hideTrigger}</code>.</p>
+     */
+    readOnly : false,
+    /**
+     * @cfg {Boolean} disabled True to disable the field (defaults to false).
+     * <p>Be aware that conformant with the <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.12.1">HTML specification</a>,
+     * disabled Fields will not be {@link Ext.form.BasicForm#submit submitted}.</p>
+     */
+    disabled : false,
+
+    // private
+    isFormField : true,
+
+    // private
+    hasFocus : false,
+
+    // private
+    initComponent : function(){
+        Ext.form.Field.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event focus
+             * Fires when this field receives input focus.
+             * @param {Ext.form.Field} this
+             */
+            'focus',
+            /**
+             * @event blur
+             * Fires when this field loses input focus.
+             * @param {Ext.form.Field} this
+             */
+            'blur',
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.
+             * To handle other keys see {@link Ext.Panel#keys} or {@link Ext.KeyMap}.
+             * You can check {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * For example: <pre><code>
+var form = new Ext.form.FormPanel({
+    ...
+    items: [{
+            fieldLabel: 'Field 1',
+            name: 'field1',
+            allowBlank: false
+        },{
+            fieldLabel: 'Field 2',
+            name: 'field2',
+            listeners: {
+                specialkey: function(field, e){
+                    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
+                    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
+                    if (e.{@link Ext.EventObject#getKey getKey()} == e.ENTER) {
+                        var form = field.ownerCt.getForm();
+                        form.submit();
+                    }
+                }
+            }
+        }
+    ],
+    ...
+});
+             * </code></pre>
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            'specialkey',
+            /**
+             * @event change
+             * Fires just before the field blurs if the field value has changed.
+             * @param {Ext.form.Field} this
+             * @param {Mixed} newValue The new value
+             * @param {Mixed} oldValue The original value
+             */
+            'change',
+            /**
+             * @event invalid
+             * Fires after the field has been marked as invalid.
+             * @param {Ext.form.Field} this
+             * @param {String} msg The validation message
+             */
+            'invalid',
+            /**
+             * @event valid
+             * Fires after the field has been validated with no errors.
+             * @param {Ext.form.Field} this
+             */
+            'valid'
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}
+     * attribute of the field if available.
+     * @return {String} name The field {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}  
+     */
+    getName: function(){
+        return this.rendered && this.el.dom.name ? this.el.dom.name : this.name || this.id || '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var cfg = this.getAutoCreate();
+
+            if(!cfg.name){
+                cfg.name = this.name || this.id;
+            }
+            if(this.inputType){
+                cfg.type = this.inputType;
+            }
+            this.autoEl = cfg;
+        }
+        Ext.form.Field.superclass.onRender.call(this, ct, position);
+        
+        var type = this.el.dom.type;
+        if(type){
+            if(type == 'password'){
+                type = 'text';
+            }
+            this.el.addClass('x-form-'+type);
+        }
+        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]);
+    },
+
+    // private
+    getItemCt : function(){
+        return this.el.up('.x-form-item', 4);
+    },
+
+    // private
+    initValue : function(){
+        if(this.value !== undefined){
+            this.setValue(this.value);
+        }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){
+            this.setValue(this.el.dom.value);
+        }
+        /**
+         * The original value of the field as configured in the {@link #value} configuration, or
+         * as loaded by the last form load operation if the form's {@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+         * setting is <code>true</code>.
+         * @type mixed
+         * @property originalValue
+         */
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * <p>Returns true if the value of this Field has been changed from its original value.
+     * Will return false if the field is disabled or has not been rendered yet.</p>
+     * <p>Note that if the owning {@link Ext.form.BasicForm form} was configured with
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     * then the <i>original value</i> is updated when the values are loaded by
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#setValues setValues}.</p>
+     * @return {Boolean} True if this field has been changed from its original value (and
+     * is not disabled), false otherwise.
+     */
+    isDirty : function() {
+        if(this.disabled || !this.rendered) {
+            return false;
+        }
+        return String(this.getValue()) !== String(this.originalValue);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.form.Field.superclass.afterRender.call(this);
+        this.initEvents();
+        this.initValue();
+    },
+
+    // private
+    fireKey : function(e){
+        if(e.isSpecialKey()){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    /**
+     * Resets the current field value to the originally loaded value and clears any validation messages.
+     * See {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     */
+    reset : function(){
+        this.setValue(this.originalValue);
+        this.clearInvalid();
+    },
+
+    // private
+    initEvents : function(){
+        this.mon(this.el, Ext.EventManager.useKeydown ? "keydown" : "keypress", this.fireKey,  this);
+        this.mon(this.el, 'focus', this.onFocus, this);
+
+        // fix weird FF/Win editor issue when changing OS window focus
+        var o = this.inEditor && Ext.isWindows && Ext.isGecko ? {buffer:10} : null;
+        this.mon(this.el, 'blur', this.onBlur, this, o);
+    },
+
+    // private
+    onFocus : function(){
+        if(this.focusClass){
+            this.el.addClass(this.focusClass);
+        }
+        if(!this.hasFocus){
+            this.hasFocus = true;
+            this.startValue = this.getValue();
+            this.fireEvent("focus", this);
+        }
+    },
+
+    // private
+    beforeBlur : Ext.emptyFn,
+
+    // private
+    onBlur : function(){
+        this.beforeBlur();
+        if(this.focusClass){
+            this.el.removeClass(this.focusClass);
+        }
+        this.hasFocus = false;
+        if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){
+            this.validate();
+        }
+        var v = this.getValue();
+        if(String(v) !== String(this.startValue)){
+            this.fireEvent('change', this, v, this.startValue);
+        }
+        this.fireEvent("blur", this);
+    },
+
+    /**
+     * Returns whether or not the field value is currently valid
+     * @param {Boolean} preventMark True to disable marking the field invalid
+     * @return {Boolean} True if the value is valid, else false
+     */
+    isValid : function(preventMark){
+        if(this.disabled){
+            return true;
+        }
+        var restore = this.preventMark;
+        this.preventMark = preventMark === true;
+        var v = this.validateValue(this.processValue(this.getRawValue()));
+        this.preventMark = restore;
+        return v;
+    },
+
+    /**
+     * Validates the field value
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validate : function(){
+        if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){
+            this.clearInvalid();
+            return true;
+        }
+        return false;
+    },
+
+    // protected - should be overridden by subclasses if necessary to prepare raw values for validation
+    processValue : function(value){
+        return value;
+    },
+
+    // private
+    // Subclasses should provide the validation implementation by overriding this
+    validateValue : function(value){
+        return true;
+    },
+
+    /**
+     * Mark this field as invalid, using {@link #msgTarget} to determine how to display the error and
+     * applying {@link #invalidClass} to the field's element.
+     * @param {String} msg (optional) The validation message (defaults to {@link #invalidText})
+     */
+    markInvalid : function(msg){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        msg = msg || this.invalidText;
+
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.mark(this, msg);
+        }else if(this.msgTarget){
+            this.el.addClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = msg;
+                t.style.display = this.msgDisplay;
+            }
+        }
+        this.fireEvent('invalid', this, msg);
+    },
+
+    /**
+     * Clear any invalid styles/messages for this field
+     */
+    clearInvalid : function(){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        this.el.removeClass(this.invalidClass);
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.clear(this);
+        }else if(this.msgTarget){
+            this.el.removeClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = '';
+                t.style.display = 'none';
+            }
+        }
+        this.fireEvent('valid', this);
+    },
+
+    // private
+    getMessageHandler : function(){
+        return Ext.form.MessageTargets[this.msgTarget];
+    },
+
+    // private
+    getErrorCt : function(){
+        return this.el.findParent('.x-form-element', 5, true) || // use form element wrap if available
+            this.el.findParent('.x-form-field-wrap', 5, true);   // else direct field wrap
+    },
+
+    // private
+    alignErrorIcon : function(){
+        this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]);
+    },
+
+    /**
+     * Returns the raw data value which may or may not be a valid, defined value.  To return a normalized value see {@link #getValue}.
+     * @return {Mixed} value The field value
+     */
+    getRawValue : function(){
+        var v = this.rendered ? this.el.getValue() : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Returns the normalized data value (undefined or emptyText will be returned as '').  To return the raw value see {@link #getRawValue}.
+     * @return {Mixed} value The field value
+     */
+    getValue : function(){
+        if(!this.rendered) {
+            return this.value;
+        }
+        var v = this.el.getValue();
+        if(v === this.emptyText || v === undefined){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Sets the underlying DOM field's value directly, bypassing validation.  To set the value with validation see {@link #setValue}.
+     * @param {Mixed} value The value to set
+     * @return {Mixed} value The field value that is set
+     */
+    setRawValue : function(v){
+        return (this.el.dom.value = (Ext.isEmpty(v) ? '' : v));
+    },
+
+    /**
+     * Sets a data value into the field and validates it.  To set the value directly without validation see {@link #setRawValue}.
+     * @param {Mixed} value The value to set
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        this.value = v;
+        if(this.rendered){
+            this.el.dom.value = (Ext.isEmpty(v) ? '' : v);
+            this.validate();
+        }
+        return this;
+    },
+
+    // private, does not work for all fields
+    append : function(v){
+         this.setValue([this.getValue(), v].join(''));
+    },
+
+    // private
+    adjustSize : function(w, h){
+        var s = Ext.form.Field.superclass.adjustSize.call(this, w, h);
+        s.width = this.adjustWidth(this.el.dom.tagName, s.width);
+        if(this.offsetCt){
+            var ct = this.getItemCt();
+            s.width -= ct.getFrameWidth('lr');
+            s.height -= ct.getFrameWidth('tb');
+        }
+        return s;
+    },
+
+    // private
+    adjustWidth : function(tag, w){
+        if(typeof w == 'number' && (Ext.isIE && (Ext.isIE6 || !Ext.isStrict)) && /input|textarea/i.test(tag) && !this.inEditor){
+            return w - 3;
+        }
+        return w;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+     */
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+
+Ext.form.MessageTargets = {
+    'qtip' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.qtip = msg;
+            field.el.dom.qclass = 'x-form-invalid-tip';
+            if(Ext.QuickTips){ // fix for floating editors interacting with DND
+                Ext.QuickTips.enable();
+            }
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            field.el.dom.qtip = '';
+        }
+    },
+    'title' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.title = msg;
+        },
+        clear: function(field){
+            field.el.dom.title = '';
+        }
+    },
+    'under' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorEl){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorEl = elp.createChild({cls:'x-form-invalid-msg'});
+                field.errorEl.setWidth(elp.getWidth(true)-20);
+            }
+            field.errorEl.update(msg);
+            Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorEl){
+                Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    },
+    'side' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorIcon){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
+            }
+            field.alignErrorIcon();
+            field.errorIcon.dom.qtip = msg;
+            field.errorIcon.dom.qclass = 'x-form-invalid-tip';
+            field.errorIcon.show();
+            field.on('resize', field.alignErrorIcon, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorIcon){
+                field.errorIcon.dom.qtip = '';
+                field.errorIcon.hide();
+                field.un('resize', field.alignErrorIcon, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    }
+};
+
+// anything other than normal should be considered experimental
+Ext.form.Field.msgFx = {
+    normal : {
+        show: function(msgEl, f){
+            msgEl.setDisplayed('block');
+        },
+
+        hide : function(msgEl, f){
+            msgEl.setDisplayed(false).update('');
+        }
+    },
+
+    slide : {
+        show: function(msgEl, f){
+            msgEl.slideIn('t', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('t', {stopFx:true,useDisplay:true});
+        }
+    },
+
+    slideRight : {
+        show: function(msgEl, f){
+            msgEl.fixDisplay();
+            msgEl.alignTo(f.el, 'tl-tr');
+            msgEl.slideIn('l', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('l', {stopFx:true,useDisplay:true});
+        }
+    }
+};
+Ext.reg('field', Ext.form.Field);
+/**
+ * @class Ext.form.TextField
+ * @extends Ext.form.Field
+ * <p>Basic text field.  Can be used as a direct replacement for traditional text inputs,
+ * or as the base class for more sophisticated input controls (like {@link Ext.form.TextArea}
+ * and {@link Ext.form.ComboBox}).</p>
+ * <p><b><u>Validation</u></b></p>
+ * <p>Field validation is processed in a particular order.  If validation fails at any particular
+ * step the validation routine halts.</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>1. Field specific validator</b>
+ * <div class="sub-desc">
+ * <p>If a field is configured with a <code>{@link Ext.form.TextField#validator validator}</code> function,
+ * it will be passed the current field value.  The <code>{@link Ext.form.TextField#validator validator}</code>
+ * function is expected to return boolean <tt>true</tt> if the value is valid or return a string to
+ * represent the invalid message if invalid.</p>
+ * </div></li>
+ * <li><b>2. Built in Validation</b>
+ * <div class="sub-desc">
+ * <p>Basic validation is affected with the following configuration properties:</p>
+ * <pre>
+ * <u>Validation</u>    <u>Invalid Message</u>
+ * <code>{@link Ext.form.TextField#allowBlank allowBlank}    {@link Ext.form.TextField#emptyText emptyText}</code>
+ * <code>{@link Ext.form.TextField#minLength minLength}     {@link Ext.form.TextField#minLengthText minLengthText}</code>
+ * <code>{@link Ext.form.TextField#maxLength maxLength}     {@link Ext.form.TextField#maxLengthText maxLengthText}</code>
+ * </pre>
+ * </div></li>
+ * <li><b>3. Preconfigured Validation Types (VTypes)</b>
+ * <div class="sub-desc">
+ * <p>Using VTypes offers a convenient way to reuse validation. If a field is configured with a
+ * <code>{@link Ext.form.TextField#vtype vtype}</code>, the corresponding {@link Ext.form.VTypes VTypes}
+ * validation function will be used for validation.  If invalid, either the field's
+ * <code>{@link Ext.form.TextField#vtypeText vtypeText}</code> or the VTypes vtype Text property will be
+ * used for the invalid message.  Keystrokes on the field will be filtered according to the VTypes
+ * vtype Mask property.</p>
+ * </div></li>
+ * <li><b>4. Field specific regex test</b>
+ * <div class="sub-desc">
+ * <p>Each field may also specify a <code>{@link Ext.form.TextField#regex regex}</code> test.
+ * The invalid message for this test is configured with
+ * <code>{@link Ext.form.TextField#regexText regexText}</code>.</p>
+ * </div></li>
+ * <li><b>Alter Validation Behavior</b>
+ * <div class="sub-desc">
+ * <p>Validation behavior for each field can be configured:</p><ul>
+ * <li><code>{@link Ext.form.TextField#invalidText invalidText}</code> : the default validation message to
+ * show if any validation step above does not provide a message when invalid</li>
+ * <li><code>{@link Ext.form.TextField#maskRe maskRe}</code> : filter out keystrokes before any validation occurs</li>
+ * <li><code>{@link Ext.form.TextField#stripCharsRe stripCharsRe}</code> : filter characters after being typed in,
+ * but before being validated</li>
+ * <li><code>{@link Ext.form.Field#invalidClass invalidClass}</code> : alternate style when invalid</li>
+ * <li><code>{@link Ext.form.Field#validateOnBlur validateOnBlur}</code>,
+ * <code>{@link Ext.form.Field#validationDelay validationDelay}</code>, and
+ * <code>{@link Ext.form.Field#validationEvent validationEvent}</code> : modify how/when validation is triggered</li>
+ * </ul>
+ * </div></li>
+ * </ul></div>
+ * @constructor
+ * Creates a new TextField
+ * @param {Object} config Configuration options
+ * @xtype textfield
+ */
+Ext.form.TextField = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} vtypeText A custom error message to display in place of the default message provided
+     * for the <b><code>{@link #vtype}</code></b> currently set for this field (defaults to <tt>''</tt>).  <b>Note</b>:
+     * only applies if <b><code>{@link #vtype}</code></b> is set, else ignored.
+     */
+    /**
+     * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
+     * before validation (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
+     * (defaults to <tt>false</tt>)
+     */
+    grow : false,
+    /**
+     * @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>30</tt>)
+     */
+    growMin : 30,
+    /**
+     * @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>800</tt>)
+     */
+    growMax : 800,
+    /**
+     * @cfg {String} vtype A validation type name as defined in {@link Ext.form.VTypes} (defaults to <tt>null</tt>)
+     */
+    vtype : null,
+    /**
+     * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
+     * not match (defaults to <tt>null</tt>)
+     */
+    maskRe : null,
+    /**
+     * @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
+     * to <tt>false</tt>)
+     */
+    disableKeyFilter : false,
+    /**
+     * @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
+     * <tt>true</tt>)
+     */
+    allowBlank : true,
+    /**
+     * @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
+     */
+    minLength : 0,
+    /**
+     * @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE).
+     * This behavior is intended to provide instant feedback to the user by improving usability to allow pasting
+     * and editing or overtyping and back tracking. To restrict the maximum number of characters that can be
+     * entered into the field use <tt><b>{@link Ext.form.Field#autoCreate autoCreate}</b></tt> to add
+     * any attributes you want to a field, for example:<pre><code>
+var myField = new Ext.form.NumberField({
+    id: 'mobile',
+    anchor:'90%',
+    fieldLabel: 'Mobile',
+    maxLength: 16, // for validation
+    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'}
+});
+</code></pre>
+     */
+    maxLength : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minLengthText Error text to display if the <b><tt>{@link #minLength minimum length}</tt></b>
+     * validation fails (defaults to <tt>'The minimum length for this field is {minLength}'</tt>)
+     */
+    minLengthText : 'The minimum length for this field is {0}',
+    /**
+     * @cfg {String} maxLengthText Error text to display if the <b><tt>{@link #maxLength maximum length}</tt></b>
+     * validation fails (defaults to <tt>'The maximum length for this field is {maxLength}'</tt>)
+     */
+    maxLengthText : 'The maximum length for this field is {0}',
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
+     * receives input focus (defaults to <tt>false</tt>)
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} blankText The error text to display if the <b><tt>{@link #allowBlank}</tt></b> validation
+     * fails (defaults to <tt>'This field is required'</tt>)
+     */
+    blankText : 'This field is required',
+    /**
+     * @cfg {Function} validator A custom validation function to be called during field validation
+     * (defaults to <tt>null</tt>). If specified, this function will be called first, allowing the
+     * developer to override the default validation process. This function will be passed the current
+     * field value and expected to return boolean <tt>true</tt> if the value is valid or a string
+     * error message if invalid.
+     */
+    validator : null,
+    /**
+     * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation
+     * (defaults to <tt>null</tt>). If the test fails, the field will be marked invalid using
+     * <b><tt>{@link #regexText}</tt></b>.
+     */
+    regex : null,
+    /**
+     * @cfg {String} regexText The error text to display if <b><tt>{@link #regex}</tt></b> is used and the
+     * test fails during validation (defaults to <tt>''</tt>)
+     */
+    regexText : '',
+    /**
+     * @cfg {String} emptyText The default text to place into an empty field (defaults to <tt>null</tt>).
+     * <b>Note</b>: that this value will be submitted to the server if this field is enabled and configured
+     * with a {@link #name}.
+     */
+    emptyText : null,
+    /**
+     * @cfg {String} emptyClass The CSS class to apply to an empty field to style the <b><tt>{@link #emptyText}</tt></b>
+     * (defaults to <tt>'x-form-empty-field'</tt>).  This class is automatically added and removed as needed
+     * depending on the current field value.
+     */
+    emptyClass : 'x-form-empty-field',
+
+    /**
+     * @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input
+     * field (defaults to <tt>false</tt>)
+     */
+
+    initComponent : function(){
+        Ext.form.TextField.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event autosize
+             * Fires when the <tt><b>{@link #autoSize}</b></tt> function is triggered. The field may or
+             * may not have actually changed size according to the default logic, but this event provides
+             * a hook for the developer to apply additional logic at runtime to resize the field if needed.
+             * @param {Ext.form.Field} this This text field
+             * @param {Number} width The new field width
+             */
+            'autosize',
+
+            /**
+             * @event keydown
+             * Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+            /**
+             * @event keyup
+             * Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keyup',
+            /**
+             * @event keypress
+             * Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keypress'
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.TextField.superclass.initEvents.call(this);
+        if(this.validationEvent == 'keyup'){
+            this.validationTask = new Ext.util.DelayedTask(this.validate, this);
+            this.mon(this.el, 'keyup', this.filterValidation, this);
+        }
+        else if(this.validationEvent !== false){
+        	this.mon(this.el, this.validationEvent, this.validate, this, {buffer: this.validationDelay});
+        }
+        if(this.selectOnFocus || this.emptyText){
+            this.on('focus', this.preFocus, this);
+            
+            this.mon(this.el, 'mousedown', function(){
+                if(!this.hasFocus){
+                    this.el.on('mouseup', function(e){
+                        e.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.mon(this.el, 'keypress', this.filterKeys, this);
+        }
+        if(this.grow){
+        	this.mon(this.el, 'keyup', this.onKeyUpBuffered, this, {buffer: 50});
+			this.mon(this.el, 'click', this.autoSize, this);
+        }
+        if(this.enableKeyEvents){
+        	this.mon(this.el, 'keyup', this.onKeyUp, this);
+        	this.mon(this.el, 'keydown', this.onKeyDown, this);
+        	this.mon(this.el, 'keypress', this.onKeyPress, this);
+        }
+    },
+
+    processValue : function(value){
+        if(this.stripCharsRe){
+            var newValue = value.replace(this.stripCharsRe, '');
+            if(newValue !== value){
+                this.setRawValue(newValue);
+                return newValue;
+            }
+        }
+        return value;
+    },
+
+    filterValidation : function(e){
+        if(!e.isNavKeyPress()){
+            this.validationTask.delay(this.validationDelay);
+        }
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.form.TextField.superclass.onDisable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = 'on';
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.form.TextField.superclass.onEnable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = '';
+        }
+    },
+
+    // private
+    onKeyUpBuffered : function(e){
+        if(!e.isNavKeyPress()){
+            this.autoSize();
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        this.fireEvent('keyup', this, e);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', this, e);
+    },
+
+    // private
+    onKeyPress : function(e){
+        this.fireEvent('keypress', this, e);
+    },
+
+    /**
+     * Resets the current field value to the originally-loaded value and clears any validation messages.
+     * Also adds <tt><b>{@link #emptyText}</b></tt> and <tt><b>{@link #emptyClass}</b></tt> if the
+     * original value was blank.
+     */
+    reset : function(){
+        Ext.form.TextField.superclass.reset.call(this);
+        this.applyEmptyText();
+    },
+
+    applyEmptyText : function(){
+        if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){
+            this.setRawValue(this.emptyText);
+            this.el.addClass(this.emptyClass);
+        }
+    },
+
+    // private
+    preFocus : function(){
+        var el = this.el;
+        if(this.emptyText){
+            if(el.dom.value == this.emptyText){
+                this.setRawValue('');
+            }
+            el.removeClass(this.emptyClass);
+        }
+        if(this.selectOnFocus){
+            (function(){
+                el.dom.select();
+            }).defer(this.inEditor && Ext.isIE ? 50 : 0);    
+        }
+    },
+
+    // private
+    postBlur : function(){
+        this.applyEmptyText();
+    },
+
+    // private
+    filterKeys : function(e){
+        // special keys don't generate charCodes, so leave them alone
+        if(e.ctrlKey || e.isSpecialKey()){
+            return;
+        }
+        
+        if(!this.maskRe.test(String.fromCharCode(e.getCharCode()))){
+            e.stopEvent();
+        }
+    },
+
+    setValue : function(v){
+        if(this.emptyText && this.el && !Ext.isEmpty(v)){
+            this.el.removeClass(this.emptyClass);
+        }
+        Ext.form.TextField.superclass.setValue.apply(this, arguments);
+        this.applyEmptyText();
+        this.autoSize();
+        return this;
+    },
+
+    /**
+     * Validates a value according to the field's validation rules and marks the field as invalid
+     * if the validation fails
+     * @param {Mixed} value The value to validate
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validateValue : function(value){
+        if(Ext.isFunction(this.validator)){
+            var msg = this.validator(value);
+            if(msg !== true){
+                this.markInvalid(msg);
+                return false;
+            }
+        }
+        if(value.length < 1 || value === this.emptyText){ // if it's blank
+             if(this.allowBlank){
+                 this.clearInvalid();
+                 return true;
+             }else{
+                 this.markInvalid(this.blankText);
+                 return false;
+             }
+        }
+        if(value.length < this.minLength){
+            this.markInvalid(String.format(this.minLengthText, this.minLength));
+            return false;
+        }
+        if(value.length > this.maxLength){
+            this.markInvalid(String.format(this.maxLengthText, this.maxLength));
+            return false;
+        }	
+        if(this.vtype){
+            var vt = Ext.form.VTypes;
+            if(!vt[this.vtype](value, this)){
+                this.markInvalid(this.vtypeText || vt[this.vtype +'Text']);
+                return false;
+            }
+        }
+        if(this.regex && !this.regex.test(value)){
+            this.markInvalid(this.regexText);
+            return false;
+        }
+        return true;
+    },
+
+    /**
+     * Selects text in this field
+     * @param {Number} start (optional) The index where the selection should start (defaults to 0)
+     * @param {Number} end (optional) The index where the selection should end (defaults to the text length)
+     */
+    selectText : function(start, end){
+        var v = this.getRawValue();
+        var doFocus = false;
+        if(v.length > 0){
+            start = start === undefined ? 0 : start;
+            end = end === undefined ? v.length : end;
+            var d = this.el.dom;
+            if(d.setSelectionRange){
+                d.setSelectionRange(start, end);
+            }else if(d.createTextRange){
+                var range = d.createTextRange();
+                range.moveStart('character', start);
+                range.moveEnd('character', end-v.length);
+                range.select();
+            }
+            doFocus = Ext.isGecko || Ext.isOpera;
+        }else{
+            doFocus = true;
+        }
+        if(doFocus){
+            this.focus();
+        }
+    },
+
+    /**
+     * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed.
+     * This only takes effect if <tt><b>{@link #grow}</b> = true</tt>, and fires the {@link #autosize} event.
+     */
+    autoSize : function(){
+        if(!this.grow || !this.rendered){
+            return;
+        }
+        if(!this.metrics){
+            this.metrics = Ext.util.TextMetrics.createInstance(this.el);
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var d = document.createElement('div');
+        d.appendChild(document.createTextNode(v));
+        v = d.innerHTML;
+        d = null;
+        Ext.removeNode(d);
+        v += '&#160;';
+        var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + /* add extra padding */ 10, this.growMin));
+        this.el.setWidth(w);
+        this.fireEvent('autosize', this, w);
+    },
+	
+	onDestroy: function(){
+		if(this.validationTask){
+			this.validationTask.cancel();
+			this.validationTask = null;
+		}
+		Ext.form.TextField.superclass.onDestroy.call(this);
+	}
+});
+Ext.reg('textfield', Ext.form.TextField);
+/**
+ * @class Ext.form.TriggerField
+ * @extends Ext.form.TextField
+ * Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default).
+ * The trigger has no default action, so you must assign a function to implement the trigger click handler by
+ * overriding {@link #onTriggerClick}. You can create a TriggerField directly, as it renders exactly like a combobox
+ * for which you can provide a custom implementation.  For example:
+ * <pre><code>
+var trigger = new Ext.form.TriggerField();
+trigger.onTriggerClick = myTriggerFn;
+trigger.applyToMarkup('my-field');
+</code></pre>
+ *
+ * However, in general you will most likely want to use TriggerField as the base class for a reusable component.
+ * {@link Ext.form.DateField} and {@link Ext.form.ComboBox} are perfect examples of this.
+ * 
+ * @constructor
+ * Create a new TriggerField.
+ * @param {Object} config Configuration options (valid {@Ext.form.TextField} config options will also be applied
+ * to the base TextField)
+ * @xtype trigger
+ */
+Ext.form.TriggerField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the
+     * trigger element for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to act as the trigger button for a TriggerField.</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing, positioning
+     * and appearance of the trigger.  Defaults to:</p>
+     * <pre><code>{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}</code></pre>
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "16", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"},
+    /**
+     * @cfg {Boolean} hideTrigger <tt>true</tt> to hide the trigger element and display only the base
+     * text field (defaults to <tt>false</tt>)
+     */
+    hideTrigger:false,
+    /**
+     * @cfg {Boolean} editable <tt>false</tt> to prevent the user from typing text directly into the field,
+     * the field will only respond to a click on the trigger to set the value. (defaults to <tt>true</tt>)
+     */
+    editable: true,
+    /**
+     * @cfg {String} wrapFocusClass The class added to the to the wrap of the trigger element. Defaults to
+     * <tt>x-trigger-wrap-focus</tt>.
+     */
+    wrapFocusClass: 'x-trigger-wrap-focus',
+    /**
+     * @hide 
+     * @method autoSize
+     */
+    autoSize: Ext.emptyFn,
+    // private
+    monitorTab : true,
+    // private
+    deferHeight : true,
+    // private
+    mimicing : false,
+    
+    actionMode: 'wrap',
+
+    // private
+    onResize : function(w, h){
+        Ext.form.TriggerField.superclass.onResize.call(this, w, h);
+        if(typeof w == 'number'){
+            this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth()));
+        }
+        this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
+    },
+
+    // private
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon : function(){
+        if(this.wrap){
+            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.TriggerField.superclass.onRender.call(this, ct, position);
+
+        this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-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());
+        }
+        if(!this.editable){
+            this.editable = true;
+            this.setEditable(false);
+        }
+    },
+
+    afterRender : function(){
+        Ext.form.TriggerField.superclass.afterRender.call(this);
+    },
+
+    // private
+    initTrigger : function(){
+    	this.mon(this.trigger, 'click', this.onTriggerClick, this, {preventDefault:true});
+        this.trigger.addClassOnOver('x-form-trigger-over');
+        this.trigger.addClassOnClick('x-form-trigger-click');
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.trigger, this.wrap);
+        if (this.mimicing){
+            Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        }
+        Ext.form.TriggerField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    onFocus : function(){
+        Ext.form.TriggerField.superclass.onFocus.call(this);
+        if(!this.mimicing){
+            this.wrap.addClass(this.wrapFocusClass);
+            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);
+            }
+        }
+    },
+
+    // private
+    checkTab : function(e){
+        if(e.getKey() == e.TAB){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        // do nothing
+    },
+
+    // private
+    mimicBlur : function(e){
+        if(!this.wrap.contains(e.target) && this.validateBlur(e)){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    triggerBlur : function(){
+        this.mimicing = false;
+        Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        if(this.monitorTab && this.el){
+            this.el.un("keydown", this.checkTab, this);
+        }
+        Ext.form.TriggerField.superclass.onBlur.call(this);
+        if(this.wrap){
+            this.wrap.removeClass(this.wrapFocusClass);
+        }
+    },
+
+    beforeBlur : Ext.emptyFn, 
+    
+    /**
+     * Allow or prevent the user from directly editing the field text.  If false is passed,
+     * the user will only be able to modify the field using the trigger.  This method
+     * is the runtime equivalent of setting the 'editable' config option at config time.
+     * @param {Boolean} value True to allow the user to directly edit the field text
+     */
+    setEditable : function(value){
+        if(value == this.editable){
+            return;
+        }
+        this.editable = value;
+        if(!value){
+            this.el.addClass('x-trigger-noedit').on('click', this.onTriggerClick, this).dom.setAttribute('readOnly', true);
+        }else{
+            this.el.removeClass('x-trigger-noedit').un('click', this.onTriggerClick,  this).dom.removeAttribute('readOnly');
+        }
+    },
+
+    // private
+    // This should be overriden by any subclass that needs to check whether or not the field can be blurred.
+    validateBlur : function(e){
+        return true;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function.  See Ext.form.ComboBox and Ext.form.DateField for
+     * sample implementations.
+     * @method
+     * @param {EventObject} e
+     */
+    onTriggerClick : Ext.emptyFn
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+});
+
+/**
+ * @class Ext.form.TwinTriggerField
+ * @extends Ext.form.TriggerField
+ * TwinTriggerField is not a public class to be used directly.  It is meant as an abstract base class
+ * to be extended by an implementing class.  For an example of implementing this class, see the custom
+ * SearchField implementation here:
+ * <a href="http://extjs.com/deploy/ext/examples/form/custom.html">http://extjs.com/deploy/ext/examples/form/custom.html</a>
+ */
+Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the trigger elements
+     * for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to contain the two trigger elements for this Field.
+     * Each trigger element must be marked by the CSS class <tt>x-form-trigger</tt> (also see
+     * <tt>{@link #trigger1Class}</tt> and <tt>{@link #trigger2Class}</tt>).</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing,
+     * positioning and appearance of the triggers.</p>
+     */
+    /**
+     * @cfg {String} trigger1Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {String} trigger2Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+
+    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(index){
+        return this.triggers[index];
+    },
+
+    initTrigger : function(){
+        var ts = this.trigger.select('.x-form-trigger', true);
+        this.wrap.setStyle('overflow', 'hidden');
+        var triggerField = this;
+        ts.each(function(t, all, index){
+            t.hide = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = 'none';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            t.show = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = '';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            var triggerIndex = 'Trigger'+(index+1);
+
+            if(this['hide'+triggerIndex]){
+                t.dom.style.display = 'none';
+            }
+            this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true});
+            t.addClassOnOver('x-form-trigger-over');
+            t.addClassOnClick('x-form-trigger-click');
+        }, this);
+        this.triggers = ts.elements;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger1Click : Ext.emptyFn,
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger2Click : Ext.emptyFn
+});
+Ext.reg('trigger', Ext.form.TriggerField);/**
+ * @class Ext.form.TextArea
+ * @extends Ext.form.TextField
+ * Multiline text field.  Can be used as a direct replacement for traditional textarea fields, plus adds
+ * support for auto-sizing.
+ * @constructor
+ * Creates a new TextArea
+ * @param {Object} config Configuration options
+ * @xtype textarea
+ */
+Ext.form.TextArea = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {Number} growMin The minimum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>60</tt>)
+     */
+    growMin : 60,
+    /**
+     * @cfg {Number} growMax The maximum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>1000</tt>)
+     */
+    growMax: 1000,
+    growAppend : '&#160;\n&#160;',
+    growPad : Ext.isWebKit ? -6 : 0,
+
+    enterIsSpecial : false,
+
+    /**
+     * @cfg {Boolean} preventScrollbars <tt>true</tt> to prevent scrollbars from appearing regardless of how much text is
+     * in the field (equivalent to setting overflow: hidden, defaults to <tt>false</tt>)
+     */
+    preventScrollbars: false,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "textarea", style: "width:100px;height:60px;", autocomplete: "off"}</code></pre>
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.defaultAutoCreate = {
+                tag: "textarea",
+                style:"width:100px;height:60px;",
+                autocomplete: "off"
+            };
+        }
+        Ext.form.TextArea.superclass.onRender.call(this, ct, position);
+        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(){
+        Ext.destroy(this.textSizeEl);
+        Ext.form.TextArea.superclass.onDestroy.call(this);
+    },
+
+    fireKey : function(e){
+        if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        if(!e.isNavKeyPress() || e.getKey() == e.ENTER){
+            this.autoSize();
+        }
+        Ext.form.TextArea.superclass.onKeyUp.call(this, e);
+    },
+
+    /**
+     * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed.
+     * This only takes effect if grow = true, and fires the {@link #autosize} event if the height changes.
+     */
+    autoSize: function(){
+        if(!this.grow || !this.textSizeEl){
+            return;
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var ts = this.textSizeEl;
+        ts.innerHTML = '';
+        ts.appendChild(document.createTextNode(v));
+        v = ts.innerHTML;
+        Ext.fly(ts).setWidth(this.el.getWidth());
+        if(v.length < 1){
+            v = "&#160;&#160;";
+        }else{
+            v += this.growAppend;
+            if(Ext.isIE){
+                v = v.replace(/\n/g, '<br />');
+            }
+        }
+        ts.innerHTML = v;
+        var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin) + this.growPad);
+        if(h != this.lastHeight){
+            this.lastHeight = h;
+            this.el.setHeight(h);
+            this.fireEvent("autosize", this, h);
+        }
+    }
+});
+Ext.reg('textarea', Ext.form.TextArea);/**
+ * @class Ext.form.NumberField
+ * @extends Ext.form.TextField
+ * Numeric text field that provides automatic keystroke filtering and numeric validation.
+ * @constructor
+ * Creates a new NumberField
+ * @param {Object} config Configuration options
+ * @xtype numberfield
+ */
+Ext.form.NumberField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {RegExp} stripCharsRe @hide
+     */
+    /**
+     * @cfg {RegExp} maskRe @hide
+     */
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field")
+     */
+    fieldClass: "x-form-field x-form-num-field",
+    /**
+     * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true)
+     */
+    allowDecimals : true,
+    /**
+     * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.')
+     */
+    decimalSeparator : ".",
+    /**
+     * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2)
+     */
+    decimalPrecision : 2,
+    /**
+     * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true)
+     */
+    allowNegative : true,
+    /**
+     * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
+     */
+    minValue : Number.NEGATIVE_INFINITY,
+    /**
+     * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE)
+     */
+    maxValue : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}")
+     */
+    minText : "The minimum value for this field is {0}",
+    /**
+     * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}")
+     */
+    maxText : "The maximum value for this field is {0}",
+    /**
+     * @cfg {String} nanText Error text to display if the value is not a valid number.  For example, this can happen
+     * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number")
+     */
+    nanText : "{0} is not a valid number",
+    /**
+     * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789').
+     */
+    baseChars : "0123456789",
+
+    // private
+    initEvents : function(){
+        var allowed = this.baseChars + '';
+        if (this.allowDecimals) {
+            allowed += this.decimalSeparator;
+        }
+        if (this.allowNegative) {
+            allowed += '-';
+        }
+        this.maskRe = new RegExp('[' + Ext.escapeRe(allowed) + ']');
+        Ext.form.NumberField.superclass.initEvents.call(this);
+    },
+
+    // private
+    validateValue : function(value){
+        if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        value = String(value).replace(this.decimalSeparator, ".");
+        if(isNaN(value)){
+            this.markInvalid(String.format(this.nanText, value));
+            return false;
+        }
+        var num = this.parseValue(value);
+        if(num < this.minValue){
+            this.markInvalid(String.format(this.minText, this.minValue));
+            return false;
+        }
+        if(num > 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(v){
+    	v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, "."));
+        v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator);
+        return Ext.form.NumberField.superclass.setValue.call(this, v);
+    },
+
+    // private
+    parseValue : function(value){
+        value = parseFloat(String(value).replace(this.decimalSeparator, "."));
+        return isNaN(value) ? '' : value;
+    },
+
+    // private
+    fixPrecision : function(value){
+        var nan = isNaN(value);
+        if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
+           return nan ? '' : value;
+        }
+        return parseFloat(parseFloat(value).toFixed(this.decimalPrecision));
+    },
+
+    beforeBlur : function(){
+        var v = this.parseValue(this.getRawValue());
+        if(!Ext.isEmpty(v)){
+            this.setValue(this.fixPrecision(v));
+        }
+    }
+});
+Ext.reg('numberfield', Ext.form.NumberField);/**
+ * @class Ext.form.DateField
+ * @extends Ext.form.TriggerField
+ * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation.
+ * @constructor
+ * Create a new DateField
+ * @param {Object} config
+ * @xtype datefield
+ */
+Ext.form.DateField = Ext.extend(Ext.form.TriggerField,  {
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : "m/d/Y",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "<tt>|</tt>" to try when parsing a user input value and it
+     * does not match the defined format (defaults to
+     * <tt>'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'</tt>).
+     */
+    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",
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : "Disabled",
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : "Disabled",
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before <tt>{@link #minValue}</tt> (defaults to
+     * <tt>'The date in this field must be after {minValue}'</tt>).
+     */
+    minText : "The date in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the date in the cell is after <tt>{@link #maxValue}</tt> (defaults to
+     * <tt>'The date in this field must be before {maxValue}'</tt>).
+     */
+    maxText : "The date in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the date in the field is invalid (defaults to
+     * <tt>'{value} is not a valid date - it must be in the format {format}'</tt>).
+     */
+    invalidText : "{0} is not a valid date - it must be in the format {1}",
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-date-trigger'</tt> which displays a calendar icon).
+     */
+    triggerClass : 'x-form-date-trigger',
+    /**
+     * @cfg {Boolean} showToday
+     * <tt>false</tt> to hide the footer area of the DatePicker containing the Today button and disable
+     * the keyboard handler for spacebar that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0 based (defaults to null). Some examples:<pre><code>
+// disable Sunday and Saturday:
+disabledDays:  [0, 6]
+// disable weekdays:
+disabledDays: [1,2,3,4,5]
+     * </code></pre>
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:<pre><code>
+// disable these exact dates:
+disabledDates: ["03/08/2003", "09/16/2003"]
+// disable these days for every year:
+disabledDates: ["03/08", "09/16"]
+// only match the beginning (useful if you are using short years):
+disabledDates: ["^03/08"]
+// disable every day in March 2006:
+disabledDates: ["03/../2006"]
+// disable every day in every March:
+disabledDates: ["^03"]
+     * </code></pre>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a {@link #format date format} that has "." in
+     * it, you will have to escape the dot when restricting dates. For example: <tt>["03\\.08\\.03"]</tt>.
+     */
+    /**
+     * @cfg {String/Object} autoCreate
+     * A {@link Ext.DomHelper DomHelper element specification object}, or <tt>true</tt> for the default element
+     * specification object:<pre><code>
+     * autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
+     * </code></pre>
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"},
+
+    initComponent : function(){
+        Ext.form.DateField.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected via the date picker.
+             * @param {Ext.form.DateField} this
+             * @param {Date} date The date that was selected
+             */
+            'select'
+        );
+
+        if(Ext.isString(this.minValue)){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(Ext.isString(this.maxValue)){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+        this.disabledDatesRE = null;
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1, 
+                re = "(?:";
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array} disabledDates An array of date strings (see the <tt>{@link #disabledDates}</tt> config
+     * for details on supported values) used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        this.disabledDates = dd;
+        this.initDisabledDays();
+        if(this.menu){
+            this.menu.picker.setDisabledDates(this.disabledDatesRE);
+        }
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the <tt>{@link #disabledDays}</tt>
+     * config for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        if(this.menu){
+            this.menu.picker.setDisabledDays(dd);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #minValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinValue : function(dt){
+        this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMinDate(this.minValue);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #maxValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxValue : function(dt){
+        this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMaxDate(this.maxValue);
+        }
+    },
+
+    // private
+    validateValue : function(value){
+        value = this.formatDate(value);
+        if(!Ext.form.DateField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        var svalue = value;
+        value = this.parseDate(value);
+        if(!value){
+            this.markInvalid(String.format(this.invalidText, svalue, this.format));
+            return false;
+        }
+        var time = value.getTime();
+        if(this.minValue && time < this.minValue.getTime()){
+            this.markInvalid(String.format(this.minText, this.formatDate(this.minValue)));
+            return false;
+        }
+        if(this.maxValue && time > this.maxValue.getTime()){
+            this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue)));
+            return false;
+        }
+        if(this.disabledDays){
+            var day = value.getDay();
+            for(var i = 0; i < this.disabledDays.length; i++) {
+                if(day === this.disabledDays[i]){
+                    this.markInvalid(this.disabledDaysText);
+                    return false;
+                }
+            }
+        }
+        var fvalue = this.formatDate(value);
+        if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){
+            this.markInvalid(String.format(this.disabledDatesText, fvalue));
+            return false;
+        }
+        return true;
+    },
+
+    // private
+    // Provides logic to override the default TriggerField.validateBlur which just returns true
+    validateBlur : function(){
+        return !this.menu || !this.menu.isVisible();
+    },
+
+    /**
+     * Returns the current date value of the date field.
+     * @return {Date} The date value
+     */
+    getValue : function(){
+        return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || "";
+    },
+
+    /**
+     * Sets the value of the date field.  You can pass a date object or any string that can be
+     * parsed into a valid date, using <tt>{@link #format}</tt> as the date format, according
+     * to the same rules as {@link Date#parseDate} (the default format used is <tt>"m/d/Y"</tt>).
+     * <br />Usage:
+     * <pre><code>
+//All of these calls set the same date value (May 4, 2006)
+
+//Pass a date object:
+var dt = new Date('5/4/2006');
+dateField.setValue(dt);
+
+//Pass a date string (default format):
+dateField.setValue('05/04/2006');
+
+//Pass a date string (custom format):
+dateField.format = 'Y-m-d';
+dateField.setValue('2006-05-04');
+</code></pre>
+     * @param {String/Date} date The date or valid date string
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(date){
+        return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date)));
+    },
+
+    // private
+    parseDate : function(value){
+        if(!value || Ext.isDate(value)){
+            return value;
+        }
+        var v = Date.parseDate(value, this.format);
+        if(!v && this.altFormats){
+            if(!this.altFormatsArray){
+                this.altFormatsArray = this.altFormats.split("|");
+            }
+            for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){
+                v = Date.parseDate(value, this.altFormatsArray[i]);
+            }
+        }
+        return v;
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.menu);
+        Ext.form.DateField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    formatDate : function(date){
+        return Ext.isDate(date) ? date.dateFormat(this.format) : date;
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function to display the DatePicker
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.menu == null){
+            this.menu = new Ext.menu.DateMenu({
+                hideOnClick: false
+            });
+        }
+        this.onFocus();
+        Ext.apply(this.menu.picker,  {
+            minDate : this.minValue,
+            maxDate : this.maxValue,
+            disabledDatesRE : this.disabledDatesRE,
+            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.picker.setValue(this.getValue() || new Date());
+        this.menu.show(this.el, "tl-bl?");
+        this.menuEvents('on');
+    },
+    
+    //private
+    menuEvents: function(method){
+        this.menu[method]('select', this.onSelect, this);
+        this.menu[method]('hide', this.onMenuHide, this);
+        this.menu[method]('show', this.onFocus, this);
+    },
+    
+    onSelect: function(m, d){
+        this.setValue(d);
+        this.fireEvent('select', this, d);
+        this.menu.hide();
+    },
+    
+    onMenuHide: function(){
+        this.focus(false, 60);
+        this.menuEvents('un');
+    },
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v);
+        }
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('datefield', Ext.form.DateField);/**
+ * @class Ext.form.DisplayField
+ * @extends Ext.form.Field
+ * A display-only text field which is not validated and not submitted.
+ * @constructor
+ * Creates a new DisplayField.
+ * @param {Object} config Configuration options
+ * @xtype displayfield
+ */
+Ext.form.DisplayField = Ext.extend(Ext.form.Field,  {
+    validationEvent : false,
+    validateOnBlur : false,
+    defaultAutoCreate : {tag: "div"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to <tt>"x-form-display-field"</tt>)
+     */
+    fieldClass : "x-form-display-field",
+    /**
+     * @cfg {Boolean} htmlEncode <tt>false</tt> to skip HTML-encoding the text when rendering it (defaults to
+     * <tt>false</tt>). This might be useful if you want to include tags in the field's innerHTML rather than
+     * rendering them as string literals per the default logic.
+     */
+    htmlEncode: false,
+
+    // private
+    initEvents : Ext.emptyFn,
+
+    isValid : function(){
+        return true;
+    },
+
+    validate : function(){
+        return true;
+    },
+
+    getRawValue : function(){
+        var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlDecode(v);
+        }
+        return v;
+    },
+
+    getValue : function(){
+        return this.getRawValue();
+    },
+    
+    getName: function() {
+        return this.name;
+    },
+
+    setRawValue : function(v){
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlEncode(v);
+        }
+        return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v);
+    },
+
+    setValue : function(v){
+        this.setRawValue(v);
+        return this;
+    }
+    /** 
+     * @cfg {String} inputType 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} disabled 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} readOnly 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} validateOnBlur 
+     * @hide
+     */
+    /** 
+     * @cfg {Number} validationDelay 
+     * @hide
+     */
+    /** 
+     * @cfg {String/Boolean} validationEvent 
+     * @hide
+     */
+});
+
+Ext.reg('displayfield', Ext.form.DisplayField);
+/**
+ * @class Ext.form.ComboBox
+ * @extends Ext.form.TriggerField
+ * <p>A combobox control with support for autocomplete, remote-loading, paging and many other features.</p>
+ * <p>A ComboBox works in a similar manner to a traditional HTML &lt;select> field. The difference is
+ * that to submit the {@link #valueField}, you must specify a {@link #hiddenName} to create a hidden input
+ * field to hold the value of the valueField. The <i>{@link #displayField}</i> is shown in the text field
+ * which is named according to the {@link #name}.</p>
+ * <p><b><u>Events</u></b></p>
+ * <p>To do something when something in ComboBox is selected, configure the select event:<pre><code>
+var cb = new Ext.form.ComboBox({
+    // all of your config options
+    listeners:{
+         scope: yourScope,
+         'select': yourFunction
+    }
+});
+
+// Alternatively, you can assign events after the object is created:
+var cb = new Ext.form.ComboBox(yourOptions);
+cb.on('select', yourFunction, yourScope);
+ * </code></pre></p>
+ *
+ * <p><b><u>ComboBox in Grid</u></b></p>
+ * <p>If using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a {@link Ext.grid.Column#renderer renderer}
+ * will be needed to show the displayField when the editor is not active.  Set up the renderer manually, or implement
+ * a reusable render, for example:<pre><code>
+// create reusable renderer
+Ext.util.Format.comboRenderer = function(combo){
+    return function(value){
+        var record = combo.findRecord(combo.{@link #valueField}, value);
+        return record ? record.get(combo.{@link #displayField}) : combo.{@link #valueNotFoundText};
+    }
+}
+
+// create the combo instance
+var combo = new Ext.form.ComboBox({
+    {@link #typeAhead}: true,
+    {@link #triggerAction}: 'all',
+    {@link #lazyRender}:true,
+    {@link #mode}: 'local',
+    {@link #store}: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]
+    }),
+    {@link #valueField}: 'myId',
+    {@link #displayField}: 'displayText'
+});
+
+// snippet of column model used within grid
+var cm = new Ext.grid.ColumnModel([{
+       ...
+    },{
+       header: "Some Header",
+       dataIndex: 'whatever',
+       width: 130,
+       editor: combo, // specify reference to combo instance
+       renderer: Ext.util.Format.comboRenderer(combo) // pass combo instance to reusable renderer
+    },
+    ...
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Filtering</u></b></p>
+ * <p>A ComboBox {@link #doQuery uses filtering itself}, for information about filtering the ComboBox
+ * store manually see <tt>{@link #lastQuery}</tt>.</p>
+ * @constructor
+ * Create a new ComboBox.
+ * @param {Object} config Configuration options
+ * @xtype combo
+ */
+Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} transform The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox.
+     * Note that if you specify this and the combo is going to be in an {@link Ext.form.BasicForm} or
+     * {@link Ext.form.FormPanel}, you must also set <tt>{@link #lazyRender} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} lazyRender <tt>true</tt> to prevent the ComboBox from rendering until requested
+     * (should always be used when rendering into an {@link Ext.Editor} (e.g. {@link Ext.grid.EditorGridPanel Grids}),
+     * defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or <tt>true</tt> for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "24", autocomplete: "off"}</code></pre>
+     */
+    /**
+     * @cfg {Ext.data.Store/Array} store The data source to which this combo is bound (defaults to <tt>undefined</tt>).
+     * Acceptable values for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
+     * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
+     * <div class="mdetail-params"><ul>
+     * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
+     * A 1-dimensional array will automatically be expanded (each array item will be the combo
+     * {@link #valueField value} and {@link #displayField text})</div></li>
+     * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
+     * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
+     * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
+     * </div></li></ul></div></li></ul></div>
+     * <p>See also <tt>{@link #mode}</tt>.</p>
+     */
+    /**
+     * @cfg {String} title If supplied, a header element is created containing this text and added into the top of
+     * the dropdown list (defaults to undefined, with no header element)
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"},
+    /**
+     * @cfg {Number} listWidth The width (used as a parameter to {@link Ext.Element#setWidth}) of the dropdown
+     * list (defaults to the width of the ComboBox field).  See also <tt>{@link #minListWidth}
+     */
+    /**
+     * @cfg {String} displayField The underlying {@link Ext.data.Field#name data field name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'text'</tt> if
+     * {@link #transform transforming a select} a select).
+     * <p>See also <tt>{@link #valueField}</tt>.</p>
+     * <p><b>Note</b>: if using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a
+     * {@link Ext.grid.Column#renderer renderer} will be needed to show the displayField when the editor is not
+     * active.</p>
+     */
+    /**
+     * @cfg {String} valueField The underlying {@link Ext.data.Field#name data value name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'value'</tt> if
+     * {@link #transform transforming a select}).
+     * <p><b>Note</b>: use of a <tt>valueField</tt> requires the user to make a selection in order for a value to be
+     * mapped.  See also <tt>{@link #hiddenName}</tt>, <tt>{@link #hiddenValue}</tt>, and <tt>{@link #displayField}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the
+     * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically
+     * post during a form submission.  See also {@link #valueField}.
+     * <p><b>Note</b>: the hidden field's id will also default to this name if {@link #hiddenId} is not specified.
+     * The ComboBox {@link Ext.Component#id id} and the <tt>{@link #hiddenId}</tt> <b>should be different</b>, since
+     * no two DOM nodes should share the same id.  So, if the ComboBox <tt>{@link Ext.form.Field#name name}</tt> and
+     * <tt>hiddenName</tt> are the same, you should specify a unique <tt>{@link #hiddenId}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenId If <tt>{@link #hiddenName}</tt> is specified, <tt>hiddenId</tt> can also be provided
+     * to give the hidden field a unique id (defaults to the <tt>{@link #hiddenName}</tt>).  The <tt>hiddenId</tt>
+     * and combo {@link Ext.Component#id id} should be different, since no two DOM
+     * nodes should share the same id.
+     */
+    /**
+     * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is
+     * specified to contain the selected {@link #valueField}, from the Store. Defaults to the configured
+     * <tt>{@link Ext.form.Field#value value}</tt>.
+     */
+    /**
+     * @cfg {String} listClass The CSS class to add to the predefined <tt>'x-combo-list'</tt> class
+     * applied the dropdown list element (defaults to '').
+     */
+    listClass : '',
+    /**
+     * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list
+     * (defaults to <tt>'x-combo-selected'</tt>)
+     */
+    selectedClass : 'x-combo-selected',
+    /**
+     * @cfg {String} listEmptyText The empty text to display in the data view if no items are found.
+     * (defaults to '')
+     */
+    listEmptyText: '',
+    /**
+     * @cfg {String} triggerClass An additional CSS class used to style the trigger button.  The trigger will always
+     * get the class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-arrow-trigger'</tt> which displays a downward arrow icon).
+     */
+    triggerClass : 'x-form-arrow-trigger',
+    /**
+     * @cfg {Boolean/String} shadow <tt>true</tt> or <tt>"sides"</tt> for the default effect, <tt>"frame"</tt> for
+     * 4-way shadow, and <tt>"drop"</tt> for bottom-right
+     */
+    shadow : 'sides',
+    /**
+     * @cfg {String} listAlign A valid anchor position value. See <tt>{@link Ext.Element#alignTo}</tt> for details
+     * on supported anchor positions (defaults to <tt>'tl-bl?'</tt>)
+     */
+    listAlign : 'tl-bl?',
+    /**
+     * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown
+     * (defaults to <tt>300</tt>)
+     */
+    maxHeight : 300,
+    /**
+     * @cfg {Number} minHeight The minimum height in pixels of the dropdown list when the list is constrained by its
+     * distance to the viewport edges (defaults to <tt>90</tt>)
+     */
+    minHeight : 90,
+    /**
+     * @cfg {String} triggerAction The action to execute when the trigger is clicked.
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'query'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">{@link #doQuery run the query} using the {@link Ext.form.Field#getRawValue raw value}.</p></li>
+     * <li><b><tt>'all'</tt></b> :
+     * <p class="sub-desc">{@link #doQuery run the query} specified by the <tt>{@link #allQuery}</tt> config option</p></li>
+     * </ul></div>
+     * <p>See also <code>{@link #queryParam}</code>.</p>
+     */
+    triggerAction : 'query',
+    /**
+     * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and
+     * {@link #typeAhead} activate (defaults to <tt>4</tt> if <tt>{@link #mode} = 'remote'</tt> or <tt>0</tt> if
+     * <tt>{@link #mode} = 'local'</tt>, does not apply if
+     * <tt>{@link Ext.form.TriggerField#editable editable} = false</tt>).
+     */
+    minChars : 4,
+    /**
+     * @cfg {Boolean} typeAhead <tt>true</tt> to populate and autoselect the remainder of the text being
+     * typed after a configurable delay ({@link #typeAheadDelay}) if it matches a known value (defaults
+     * to <tt>false</tt>)
+     */
+    typeAhead : false,
+    /**
+     * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and
+     * sending the query to filter the dropdown list (defaults to <tt>500</tt> if <tt>{@link #mode} = 'remote'</tt>
+     * or <tt>10</tt> if <tt>{@link #mode} = 'local'</tt>)
+     */
+    queryDelay : 500,
+    /**
+     * @cfg {Number} pageSize If greater than <tt>0</tt>, a {@link Ext.PagingToolbar} is displayed in the
+     * footer of the dropdown list and the {@link #doQuery filter queries} will execute with page start and
+     * {@link Ext.PagingToolbar#pageSize limit} parameters. Only applies when <tt>{@link #mode} = 'remote'</tt>
+     * (defaults to <tt>0</tt>).
+     */
+    pageSize : 0,
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to select any existing text in the field immediately on focus.
+     * Only applies when <tt>{@link Ext.form.TriggerField#editable editable} = true</tt> (defaults to
+     * <tt>false</tt>).
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} queryParam Name of the query ({@link Ext.data.Store#baseParam baseParam} name for the store)
+     * as it will be passed on the querystring (defaults to <tt>'query'</tt>)
+     */
+    queryParam : 'query',
+    /**
+     * @cfg {String} loadingText The text to display in the dropdown list while data is loading.  Only applies
+     * when <tt>{@link #mode} = 'remote'</tt> (defaults to <tt>'Loading...'</tt>)
+     */
+    loadingText : 'Loading...',
+    /**
+     * @cfg {Boolean} resizable <tt>true</tt> to add a resize handle to the bottom of the dropdown list
+     * (creates an {@link Ext.Resizable} with 'se' {@link Ext.Resizable#pinned pinned} handles).
+     * Defaults to <tt>false</tt>.
+     */
+    resizable : false,
+    /**
+     * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if
+     * <tt>{@link #resizable} = true</tt> (defaults to <tt>8</tt>)
+     */
+    handleHeight : 8,
+    /**
+     * @cfg {String} allQuery The text query to send to the server to return all records for the list
+     * with no filtering (defaults to '')
+     */
+    allQuery: '',
+    /**
+     * @cfg {String} mode Acceptable values are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'remote'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">Automatically loads the <tt>{@link #store}</tt> the <b>first</b> time the trigger
+     * is clicked. If you do not want the store to be automatically loaded the first time the trigger is
+     * clicked, set to <tt>'local'</tt> and manually load the store.  To force a requery of the store
+     * <b>every</b> time the trigger is clicked see <tt>{@link #lastQuery}</tt>.</p></li>
+     * <li><b><tt>'local'</tt></b> :
+     * <p class="sub-desc">ComboBox loads local data</p>
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    renderTo: document.body,
+    mode: 'local',
+    store: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',  // numeric value is the key
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]  // data is local
+    }),
+    valueField: 'myId',
+    displayField: 'displayText',
+    triggerAction: 'all'
+});
+     * </code></pre></li>
+     * </ul></div>
+     */
+    mode: 'remote',
+    /**
+     * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to <tt>70</tt>, will
+     * be ignored if <tt>{@link #listWidth}</tt> has a higher value)
+     */
+    minListWidth : 70,
+    /**
+     * @cfg {Boolean} forceSelection <tt>true</tt> to restrict the selected value to one of the values in the list,
+     * <tt>false</tt> to allow the user to set arbitrary text into the field (defaults to <tt>false</tt>)
+     */
+    forceSelection : false,
+    /**
+     * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed
+     * if <tt>{@link #typeAhead} = true</tt> (defaults to <tt>250</tt>)
+     */
+    typeAheadDelay : 250,
+    /**
+     * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in
+     * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined). If this
+     * default text is used, it means there is no value set and no validation will occur on this field.
+     */
+
+    /**
+     * @cfg {Boolean} lazyInit <tt>true</tt> to not initialize the list for this combo until the field is focused
+     * (defaults to <tt>true</tt>)
+     */
+    lazyInit : true,
+
+    /**
+     * The value of the match string used to filter the store. Delete this property to force a requery.
+     * Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'remote',
+    ...
+    listeners: {
+        // delete the previous query in the beforequery event or set
+        // combo.lastQuery = null (this will reload the store the next time it expands)
+        beforequery: function(qe){
+            delete qe.combo.lastQuery;
+        }
+    }
+});
+     * </code></pre>
+     * To make sure the filter in the store is not cleared the first time the ComboBox trigger is used
+     * configure the combo with <tt>lastQuery=''</tt>. Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'local',
+    triggerAction: 'all',
+    lastQuery: ''
+});
+     * </code></pre>
+     * @property lastQuery
+     * @type String
+     */
+
+    // private
+    initComponent : function(){
+        Ext.form.ComboBox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event expand
+             * Fires when the dropdown list is expanded
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'expand',
+            /**
+             * @event collapse
+             * Fires when the dropdown list is collapsed
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'collapse',
+            /**
+             * @event beforeselect
+             * Fires before a list item is selected. Return false to cancel the selection.
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'beforeselect',
+            /**
+             * @event select
+             * Fires when a list item is selected
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'select',
+            /**
+             * @event beforequery
+             * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's
+             * cancel property to true.
+             * @param {Object} queryEvent An object that has these properties:<ul>
+             * <li><code>combo</code> : Ext.form.ComboBox <div class="sub-desc">This combo box</div></li>
+             * <li><code>query</code> : String <div class="sub-desc">The query</div></li>
+             * <li><code>forceAll</code> : Boolean <div class="sub-desc">True to force "all" query</div></li>
+             * <li><code>cancel</code> : Boolean <div class="sub-desc">Set to true to cancel the query</div></li>
+             * </ul>
+             */
+            'beforequery'
+        );
+        if(this.transform){
+            var s = Ext.getDom(this.transform);
+            if(!this.hiddenName){
+                this.hiddenName = s.name;
+            }
+            if(!this.store){
+                this.mode = 'local';
+                var d = [], opts = s.options;
+                for(var i = 0, len = opts.length;i < len; i++){
+                    var o = opts[i],
+                        value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text;
+                    if(o.selected && Ext.isEmpty(this.value, true)) {
+                        this.value = value;
+                    }
+                    d.push([value, o.text]);
+                }
+                this.store = new Ext.data.ArrayStore({
+                    'id': 0,
+                    fields: ['value', 'text'],
+                    data : d,
+                    autoDestroy: true
+                });
+                this.valueField = 'value';
+                this.displayField = 'text';
+            }
+            s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference
+            if(!this.lazyRender){
+                this.target = true;
+                this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate);
+                this.render(this.el.parentNode, s);
+                Ext.removeNode(s); // remove it
+            }else{
+                Ext.removeNode(s); // remove it
+            }
+        }
+        //auto-configure store from local array data
+        else if(this.store){
+            this.store = Ext.StoreMgr.lookup(this.store);
+            if(this.store.autoCreated){
+                this.displayField = this.valueField = 'field1';
+                if(!this.store.expandData){
+                    this.displayField = 'field2';
+                }
+                this.mode = 'local';
+            }
+        }
+
+        this.selectedIndex = -1;
+        if(this.mode == 'local'){
+            if(!Ext.isDefined(this.initialConfig.queryDelay)){
+                this.queryDelay = 10;
+            }
+            if(!Ext.isDefined(this.initialConfig.minChars)){
+                this.minChars = 0;
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.ComboBox.superclass.onRender.call(this, ct, position);
+        if(this.hiddenName){
+            this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName,
+                    id: (this.hiddenId||this.hiddenName)}, 'before', true);
+
+            // prevent input submission
+            this.el.dom.removeAttribute('name');
+        }
+        if(Ext.isGecko){
+            this.el.dom.setAttribute('autocomplete', 'off');
+        }
+
+        if(!this.lazyInit){
+            this.initList();
+        }else{
+            this.on('focus', this.initList, this, {single: true});
+        }
+    },
+
+    // private
+    initValue : function(){
+        Ext.form.ComboBox.superclass.initValue.call(this);
+        if(this.hiddenField){
+            this.hiddenField.value =
+                Ext.isDefined(this.hiddenValue) ? this.hiddenValue :
+                Ext.isDefined(this.value) ? this.value : '';
+        }
+    },
+
+    // private
+    initList : function(){
+        if(!this.list){
+            var cls = 'x-combo-list';
+
+            this.list = new Ext.Layer({
+                parentEl: this.getListParent(),
+                shadow: this.shadow,
+                cls: [cls, this.listClass].join(' '),
+                constrain:false
+            });
+
+            var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth);
+            this.list.setSize(lw, 0);
+            this.list.swallowEvent('mousewheel');
+            this.assetHeight = 0;
+            if(this.syncFont !== false){
+                this.list.setStyle('font-size', this.el.getStyle('font-size'));
+            }
+            if(this.title){
+                this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
+                this.assetHeight += this.header.getHeight();
+            }
+
+            this.innerList = this.list.createChild({cls:cls+'-inner'});
+            this.mon(this.innerList, 'mouseover', this.onViewOver, this);
+            this.mon(this.innerList, 'mousemove', this.onViewMove, this);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+
+            if(this.pageSize){
+                this.footer = this.list.createChild({cls:cls+'-ft'});
+                this.pageTb = new Ext.PagingToolbar({
+                    store: this.store,
+                    pageSize: this.pageSize,
+                    renderTo:this.footer
+                });
+                this.assetHeight += this.footer.getHeight();
+            }
+
+            if(!this.tpl){
+                /**
+                * @cfg {String/Ext.XTemplate} tpl <p>The template string, or {@link Ext.XTemplate} instance to
+                * use to display each item in the dropdown list. The dropdown list is displayed in a
+                * DataView. See {@link #view}.</p>
+                * <p>The default template string is:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div class="x-combo-list-item">{' + this.displayField + '}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>Override the default value to create custom UI layouts for items in the list.
+                * For example:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>The template <b>must</b> contain one or more substitution parameters using field
+                * names from the Combo's</b> {@link #store Store}. In the example above an
+                * <pre>ext:qtip</pre> attribute is added to display other fields from the Store.</p>
+                * <p>To preserve the default visual look of list items, add the CSS class name
+                * <pre>x-combo-list-item</pre> to the template's container element.</p>
+                * <p>Also see {@link #itemSelector} for additional details.</p>
+                */
+                this.tpl = '<tpl for="."><div class="'+cls+'-item">{' + this.displayField + '}</div></tpl>';
+                /**
+                 * @cfg {String} itemSelector
+                 * <p>A simple CSS selector (e.g. div.some-class or span:first-child) that will be
+                 * used to determine what nodes the {@link #view Ext.DataView} which handles the dropdown
+                 * display will be working with.</p>
+                 * <p><b>Note</b>: this setting is <b>required</b> if a custom XTemplate has been
+                 * specified in {@link #tpl} which assigns a class other than <pre>'x-combo-list-item'</pre>
+                 * to dropdown list items</b>
+                 */
+            }
+
+            /**
+            * The {@link Ext.DataView DataView} used to display the ComboBox's options.
+            * @type Ext.DataView
+            */
+            this.view = new Ext.DataView({
+                applyTo: this.innerList,
+                tpl: this.tpl,
+                singleSelect: true,
+                selectedClass: this.selectedClass,
+                itemSelector: this.itemSelector || '.' + cls + '-item',
+                emptyText: this.listEmptyText
+            });
+
+            this.mon(this.view, 'click', this.onViewClick, this);
+
+            this.bindStore(this.store, true);
+
+            if(this.resizable){
+                this.resizer = new Ext.Resizable(this.list,  {
+                   pinned:true, handles:'se'
+                });
+                this.mon(this.resizer, 'resize', function(r, w, h){
+                    this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight;
+                    this.listWidth = w;
+                    this.innerList.setWidth(w - this.list.getFrameWidth('lr'));
+                    this.restrictHeight();
+                }, this);
+
+                this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px');
+            }
+        }
+    },
+
+    /**
+     * <p>Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.</p>
+     * A custom implementation may be provided as a configuration option if the floating list needs to be rendered
+     * to a different Element. An example might be rendering the list inside a Menu so that clicking
+     * the list does not hide the Menu:<pre><code>
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: ['initials', 'fullname'],
+    data : [
+        ['FF', 'Fred Flintstone'],
+        ['BR', 'Barney Rubble']
+    ]
+});
+
+var combo = new Ext.form.ComboBox({
+    store: store,
+    displayField: 'fullname',
+    emptyText: 'Select a name...',
+    forceSelection: true,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon', //use iconCls if placing within menu to shift to right side of menu
+    mode: 'local',
+    selectOnFocus: true,
+    triggerAction: 'all',
+    typeAhead: true,
+    width: 135
+});
+
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+</code></pre>
+     */
+    getListParent : function() {
+        return document.body;
+    },
+
+    /**
+     * Returns the store associated with this combo.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    // private
+    bindStore : function(store, initial){
+        if(this.store && !initial){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.collapse, this);
+            if(this.store !== store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+            if(!store){
+                this.store = null;
+                if(this.view){
+                    this.view.bindStore(null);
+                }
+            }
+        }
+        if(store){
+            if(!initial) {
+                this.lastQuery = null;
+                if(this.pageTb) {
+                    this.pageTb.bindStore(store);
+                }
+            }
+
+            this.store = Ext.StoreMgr.lookup(store);
+            this.store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                load: this.onLoad,
+                exception: this.collapse
+            });
+
+            if(this.view){
+                this.view.bindStore(store);
+            }
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.ComboBox.superclass.initEvents.call(this);
+
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up" : function(e){
+                this.inKeyMode = true;
+                this.selectPrev();
+            },
+
+            "down" : function(e){
+                if(!this.isExpanded()){
+                    this.onTriggerClick();
+                }else{
+                    this.inKeyMode = true;
+                    this.selectNext();
+                }
+            },
+
+            "enter" : function(e){
+                this.onViewClick();
+                this.delayedCheck = true;
+                this.unsetDelayCheck.defer(10, this);
+            },
+
+            "esc" : function(e){
+                this.collapse();
+            },
+
+            "tab" : function(e){
+                this.onViewClick(false);
+                return true;
+            },
+
+            scope : this,
+
+            doRelay : function(foo, bar, hname){
+                if(hname == 'down' || this.scope.isExpanded()){
+                   return Ext.KeyNav.prototype.doRelay.apply(this, arguments);
+                }
+                return true;
+            },
+
+            forceKeyDown : true
+        });
+        this.queryDelay = Math.max(this.queryDelay || 10,
+                this.mode == 'local' ? 10 : 250);
+        this.dqTask = new Ext.util.DelayedTask(this.initQuery, this);
+        if(this.typeAhead){
+            this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this);
+        }
+        if(this.editable !== false && !this.enableKeyEvents){
+            this.mon(this.el, 'keyup', this.onKeyUp, this);
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        if (this.dqTask){
+            this.dqTask.cancel();
+            this.dqTask = null;
+        }
+        this.bindStore(null);
+        Ext.destroy(
+            this.resizer,
+            this.view,
+            this.pageTb,
+            this.list
+        );
+        Ext.form.ComboBox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    unsetDelayCheck : function(){
+        delete this.delayedCheck;
+    },
+
+    // private
+    fireKey : function(e){
+        var fn = function(ev){
+            if (ev.isNavKeyPress() && !this.isExpanded() && !this.delayedCheck) {
+                this.fireEvent("specialkey", this, ev);
+            }
+        };
+        //For some reason I can't track down, the events fire in a different order in webkit.
+        //Need a slight delay here
+        if(this.inEditor && Ext.isWebKit && e.getKey() == e.TAB){
+            fn.defer(10, this, [new Ext.EventObjectImpl(e)]);
+        }else{
+            fn.call(this, e);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.ComboBox.superclass.onResize.apply(this, arguments);
+        if(this.list && !Ext.isDefined(this.listWidth)){
+            var lw = Math.max(w, this.minListWidth);
+            this.list.setWidth(lw);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.form.ComboBox.superclass.onEnable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = false;
+        }
+    },
+
+    // private
+    onDisable : function(){
+        Ext.form.ComboBox.superclass.onDisable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = true;
+        }
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        this.innerList.update(this.loadingText ?
+               '<div class="loading-indicator">'+this.loadingText+'</div>' : '');
+        this.restrictHeight();
+        this.selectedIndex = -1;
+    },
+
+    // private
+    onLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        if(this.store.getCount() > 0){
+            this.expand();
+            this.restrictHeight();
+            if(this.lastQuery == this.allQuery){
+                if(this.editable){
+                    this.el.dom.select();
+                }
+                if(!this.selectByValue(this.value, true)){
+                    this.select(0, true);
+                }
+            }else{
+                this.selectNext();
+                if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){
+                    this.taTask.delay(this.typeAheadDelay);
+                }
+            }
+        }else{
+            this.onEmptyResults();
+        }
+        //this.el.focus();
+    },
+
+    // private
+    onTypeAhead : function(){
+        if(this.store.getCount() > 0){
+            var r = this.store.getAt(0);
+            var newValue = r.data[this.displayField];
+            var len = newValue.length;
+            var selStart = this.getRawValue().length;
+            if(selStart != len){
+                this.setRawValue(newValue);
+                this.selectText(selStart, newValue.length);
+            }
+        }
+    },
+
+    // private
+    onSelect : function(record, index){
+        if(this.fireEvent('beforeselect', this, record, index) !== false){
+            this.setValue(record.data[this.valueField || this.displayField]);
+            this.collapse();
+            this.fireEvent('select', this, record, index);
+        }
+    },
+
+    // inherit docs
+    getName: function(){
+        var hf = this.hiddenField;
+        return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this);
+    },
+
+    /**
+     * Returns the currently selected field value or empty string if no value is set.
+     * @return {String} value The selected value
+     */
+    getValue : function(){
+        if(this.valueField){
+            return Ext.isDefined(this.value) ? this.value : '';
+        }else{
+            return Ext.form.ComboBox.superclass.getValue.call(this);
+        }
+    },
+
+    /**
+     * Clears any text/value currently set in the field
+     */
+    clearValue : function(){
+        if(this.hiddenField){
+            this.hiddenField.value = '';
+        }
+        this.setRawValue('');
+        this.lastSelectionText = '';
+        this.applyEmptyText();
+        this.value = '';
+    },
+
+    /**
+     * Sets the specified value into the field.  If the value finds a match, the corresponding record text
+     * will be displayed in the field.  If the value does not match the data value of an existing item,
+     * and the valueNotFoundText config option is defined, it will be displayed as the default field text.
+     * Otherwise the field will be blank (although the value will still be set).
+     * @param {String} value The value to match
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var text = v;
+        if(this.valueField){
+            var r = this.findRecord(this.valueField, v);
+            if(r){
+                text = r.data[this.displayField];
+            }else if(Ext.isDefined(this.valueNotFoundText)){
+                text = this.valueNotFoundText;
+            }
+        }
+        this.lastSelectionText = text;
+        if(this.hiddenField){
+            this.hiddenField.value = v;
+        }
+        Ext.form.ComboBox.superclass.setValue.call(this, text);
+        this.value = v;
+        return this;
+    },
+
+    // private
+    findRecord : function(prop, value){
+        var record;
+        if(this.store.getCount() > 0){
+            this.store.each(function(r){
+                if(r.data[prop] == value){
+                    record = r;
+                    return false;
+                }
+            });
+        }
+        return record;
+    },
+
+    // private
+    onViewMove : function(e, t){
+        this.inKeyMode = false;
+    },
+
+    // private
+    onViewOver : function(e, t){
+        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
+            return;
+        }
+        var item = this.view.findItemFromChild(t);
+        if(item){
+            var index = this.view.indexOf(item);
+            this.select(index, false);
+        }
+    },
+
+    // private
+    onViewClick : function(doFocus){
+        var index = this.view.getSelectedIndexes()[0];
+        var r = this.store.getAt(index);
+        if(r){
+            this.onSelect(r, index);
+        }
+        if(doFocus !== false){
+            this.el.focus();
+        }
+    },
+
+    // private
+    restrictHeight : function(){
+        this.innerList.dom.style.height = '';
+        var inner = this.innerList.dom;
+        var pad = this.list.getFrameWidth('tb')+(this.resizable?this.handleHeight:0)+this.assetHeight;
+        var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight);
+        var ha = this.getPosition()[1]-Ext.getBody().getScroll().top;
+        var hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height;
+        var space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5;
+        h = Math.min(h, space, this.maxHeight);
+
+        this.innerList.setHeight(h);
+        this.list.beginUpdate();
+        this.list.setHeight(h+pad);
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.endUpdate();
+    },
+
+    // private
+    onEmptyResults : function(){
+        this.collapse();
+    },
+
+    /**
+     * Returns true if the dropdown list is expanded, else false.
+     */
+    isExpanded : function(){
+        return this.list && this.list.isVisible();
+    },
+
+    /**
+     * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {String} value The data value of the item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     * @return {Boolean} True if the value matched an item in the list, else false
+     */
+    selectByValue : function(v, scrollIntoView){
+        if(!Ext.isEmpty(v, true)){
+            var r = this.findRecord(this.valueField || this.displayField, v);
+            if(r){
+                this.select(this.store.indexOf(r), scrollIntoView);
+                return true;
+            }
+        }
+        return false;
+    },
+
+    /**
+     * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {Number} index The zero-based index of the list item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     */
+    select : function(index, scrollIntoView){
+        this.selectedIndex = index;
+        this.view.select(index);
+        if(scrollIntoView !== false){
+            var el = this.view.getNode(index);
+            if(el){
+                this.innerList.scrollChildIntoView(el, false);
+            }
+        }
+    },
+
+    // private
+    selectNext : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex < ct-1){
+                this.select(this.selectedIndex+1);
+            }
+        }
+    },
+
+    // private
+    selectPrev : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex !== 0){
+                this.select(this.selectedIndex-1);
+            }
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        var k = e.getKey();
+        if(this.editable !== false && (k == e.BACKSPACE || !e.isSpecialKey())){
+            this.lastKey = k;
+            this.dqTask.delay(this.queryDelay);
+        }
+        Ext.form.ComboBox.superclass.onKeyUp.call(this, e);
+    },
+
+    // private
+    validateBlur : function(){
+        return !this.list || !this.list.isVisible();
+    },
+
+    // private
+    initQuery : function(){
+        this.doQuery(this.getRawValue());
+    },
+
+    // private
+    beforeBlur : function(){
+        var val = this.getRawValue();
+        if(this.forceSelection){
+            if(val.length > 0 && val != this.emptyText){
+               this.el.dom.value = Ext.isDefined(this.lastSelectionText) ? this.lastSelectionText : '';
+                this.applyEmptyText();
+            }else{
+                this.clearValue();
+            }
+        }else{
+            var rec = this.findRecord(this.displayField, val);
+            if(rec){
+                val = rec.get(this.valueField || this.displayField);
+            }
+            this.setValue(val);
+        }
+    },
+
+    /**
+     * Execute a query to filter the dropdown list.  Fires the {@link #beforequery} event prior to performing the
+     * query allowing the query action to be canceled if needed.
+     * @param {String} query The SQL query to execute
+     * @param {Boolean} forceAll <tt>true</tt> to force the query to execute even if there are currently fewer
+     * characters in the field than the minimum specified by the <tt>{@link #minChars}</tt> config option.  It
+     * also clears any filter previously saved in the current store (defaults to <tt>false</tt>)
+     */
+    doQuery : function(q, forceAll){
+        q = Ext.isEmpty(q) ? '' : q;
+        var qe = {
+            query: q,
+            forceAll: forceAll,
+            combo: this,
+            cancel:false
+        };
+        if(this.fireEvent('beforequery', qe)===false || qe.cancel){
+            return false;
+        }
+        q = qe.query;
+        forceAll = qe.forceAll;
+        if(forceAll === true || (q.length >= this.minChars)){
+            if(this.lastQuery !== q){
+                this.lastQuery = q;
+                if(this.mode == 'local'){
+                    this.selectedIndex = -1;
+                    if(forceAll){
+                        this.store.clearFilter();
+                    }else{
+                        this.store.filter(this.displayField, q);
+                    }
+                    this.onLoad();
+                }else{
+                    this.store.baseParams[this.queryParam] = q;
+                    this.store.load({
+                        params: this.getParams(q)
+                    });
+                    this.expand();
+                }
+            }else{
+                this.selectedIndex = -1;
+                this.onLoad();
+            }
+        }
+    },
+
+    // private
+    getParams : function(q){
+        var p = {};
+        //p[this.queryParam] = q;
+        if(this.pageSize){
+            p.start = 0;
+            p.limit = this.pageSize;
+        }
+        return p;
+    },
+
+    /**
+     * Hides the dropdown list if it is currently expanded. Fires the {@link #collapse} event on completion.
+     */
+    collapse : function(){
+        if(!this.isExpanded()){
+            return;
+        }
+        this.list.hide();
+        Ext.getDoc().un('mousewheel', this.collapseIf, this);
+        Ext.getDoc().un('mousedown', this.collapseIf, this);
+        this.fireEvent('collapse', this);
+    },
+
+    // private
+    collapseIf : function(e){
+        if(!e.within(this.wrap) && !e.within(this.list)){
+            this.collapse();
+        }
+    },
+
+    /**
+     * Expands the dropdown list if it is currently hidden. Fires the {@link #expand} event on completion.
+     */
+    expand : function(){
+        if(this.isExpanded() || !this.hasFocus){
+            return;
+        }
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.show();
+        if(Ext.isGecko2){
+            this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac
+        }
+        Ext.getDoc().on({
+            scope: this,
+            mousewheel: this.collapseIf,
+            mousedown: this.collapseIf
+        });
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.isExpanded()){
+            this.collapse();
+            this.el.focus();
+        }else {
+            this.onFocus({});
+            if(this.triggerAction == 'all') {
+                this.doQuery(this.allQuery, true);
+            } else {
+                this.doQuery(this.getRawValue());
+            }
+            this.el.focus();
+        }
+    }
+
+    /**
+     * @hide
+     * @method autoSize
+     */
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+
+});
+Ext.reg('combo', Ext.form.ComboBox);/**
+ * @class Ext.form.Checkbox
+ * @extends Ext.form.Field
+ * Single checkbox field.  Can be used as a direct replacement for traditional checkbox fields.
+ * @constructor
+ * Creates a new Checkbox
+ * @param {Object} config Configuration options
+ * @xtype checkbox
+ */
+Ext.form.Checkbox = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined)
+     */
+    focusClass : undefined,
+    /**
+     * @cfg {String} fieldClass The default CSS class for the checkbox (defaults to 'x-form-field')
+     */
+    fieldClass : 'x-form-field',
+    /**
+     * @cfg {Boolean} checked <tt>true</tt> if the checkbox should render initially checked (defaults to <tt>false</tt>)
+     */
+    checked : false,
+    /**
+     * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
+     * {tag: 'input', type: 'checkbox', autocomplete: 'off'})
+     */
+    defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'},
+    /**
+     * @cfg {String} boxLabel The text that appears beside the checkbox
+     */
+    /**
+     * @cfg {String} inputValue The value that should go into the generated input element's value attribute
+     */
+    /**
+     * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of 
+     * handling the check event). The handler is passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>checkbox</b> : Ext.form.Checkbox<div class="sub-desc">The Checkbox being toggled.</div></li>
+     * <li><b>checked</b> : Boolean<div class="sub-desc">The new checked state of the checkbox.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope An object to use as the scope ('this' reference) of the {@link #handler} function
+     * (defaults to this Checkbox).
+     */
+
+    // private
+    actionMode : 'wrap',
+    
+	// private
+    initComponent : function(){
+        Ext.form.Checkbox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event check
+             * Fires when the checkbox is checked or unchecked.
+             * @param {Ext.form.Checkbox} this This checkbox
+             * @param {Boolean} checked The new checked value
+             */
+            'check'
+        );
+    },
+
+    // private
+    onResize : function(){
+        Ext.form.Checkbox.superclass.onResize.apply(this, arguments);
+        if(!this.boxLabel && !this.fieldLabel){
+            this.el.alignTo(this.wrap, 'c-c');
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.Checkbox.superclass.initEvents.call(this);
+        this.mon(this.el, 'click', this.onClick, this);
+        this.mon(this.el, 'change', this.onClick, this);
+    },
+
+	// private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        this.wrap = this.el.wrap({cls: 'x-form-check-wrap'});
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        }
+        if(this.checked){
+            this.setValue(true);
+        }else{
+            this.checked = this.el.dom.checked;
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.destroy(this.wrap);
+        Ext.form.Checkbox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    initValue : function() {
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Returns the checked state of the checkbox.
+     * @return {Boolean} True if checked, else false
+     */
+    getValue : function(){
+        if(this.rendered){
+            return this.el.dom.checked;
+        }
+        return false;
+    },
+
+	// private
+    onClick : function(){
+        if(this.el.dom.checked != this.checked){
+            this.setValue(this.el.dom.checked);
+        }
+    },
+
+    /**
+     * Sets the checked state of the checkbox, fires the 'check' event, and calls a
+     * <code>{@link #handler}</code> (if configured).
+     * @param {Boolean/String} checked The following values will check the checkbox:
+     * <code>true, 'true', '1', or 'on'</code>. Any other value will uncheck the checkbox.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var checked = this.checked ;
+        this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on');
+        if(this.rendered){
+            this.el.dom.checked = this.checked;
+            this.el.dom.defaultChecked = this.checked;
+        }
+        if(checked != this.checked){
+            this.fireEvent('check', this, this.checked);
+            if(this.handler){
+                this.handler.call(this.scope || this, this, this.checked);
+            }
+        }
+        return this;
+    }
+});
+Ext.reg('checkbox', Ext.form.Checkbox);
+/**
+ * @class Ext.form.CheckboxGroup
+ * @extends Ext.form.Field
+ * <p>A grouping container for {@link Ext.form.Checkbox} controls.</p>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var myCheckboxGroup = new Ext.form.CheckboxGroup({
+    id:'myGroup',
+    xtype: 'checkboxgroup',
+    fieldLabel: 'Single Column',
+    itemCls: 'x-check-group-alt',
+    // Put all controls in a single column with width 100%
+    columns: 1,
+    items: [
+        {boxLabel: 'Item 1', name: 'cb-col-1'},
+        {boxLabel: 'Item 2', name: 'cb-col-2', checked: true},
+        {boxLabel: 'Item 3', name: 'cb-col-3'}
+    ]
+});
+ * </code></pre>
+ * @constructor
+ * Creates a new CheckboxGroup
+ * @param {Object} config Configuration options
+ * @xtype checkboxgroup
+ */
+Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Array} items An Array of {@link Ext.form.Checkbox Checkbox}es or Checkbox config objects
+     * to arrange in the group.
+     */
+    /**
+     * @cfg {String/Number/Array} columns Specifies the number of columns to use when displaying grouped
+     * checkbox/radio controls using automatic layout.  This config can take several types of values:
+     * <ul><li><b>'auto'</b> : <p class="sub-desc">The controls will be rendered one per column on one row and the width
+     * of each column will be evenly distributed based on the width of the overall field container. This is the default.</p></li>
+     * <li><b>Number</b> : <p class="sub-desc">If you specific a number (e.g., 3) that number of columns will be 
+     * created and the contained controls will be automatically distributed based on the value of {@link #vertical}.</p></li>
+     * <li><b>Array</b> : Object<p class="sub-desc">You can also specify an array of column widths, mixing integer
+     * (fixed width) and float (percentage width) values as needed (e.g., [100, .25, .75]). Any integer values will
+     * be rendered first, then any float values will be calculated as a percentage of the remaining space. Float
+     * values do not have to add up to 1 (100%) although if you want the controls to take up the entire field
+     * container you should do so.</p></li></ul>
+     */
+    columns : 'auto',
+    /**
+     * @cfg {Boolean} vertical True to distribute contained controls across columns, completely filling each column 
+     * top to bottom before starting on the next column.  The number of controls in each column will be automatically
+     * calculated to keep columns as even as possible.  The default value is false, so that controls will be added
+     * to columns one at a time, completely filling each row left to right before starting on the next row.
+     */
+    vertical : false,
+    /**
+     * @cfg {Boolean} allowBlank False to validate that at least one item in the group is checked (defaults to true).
+     * If no items are selected at validation time, {@link @blankText} will be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails (defaults to "You must 
+     * select at least one item in this group")
+     */
+    blankText : "You must select at least one item in this group",
+    
+    // private
+    defaultType : 'checkbox',
+    
+    // private
+    groupCls : 'x-form-check-group',
+    
+    // private
+    initComponent: function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires when the state of a child checkbox changes.
+             * @param {Ext.form.CheckboxGroup} this
+             * @param {Array} checked An array containing the checked boxes.
+             */
+            'change'
+        );   
+        Ext.form.CheckboxGroup.superclass.initComponent.call(this);
+    },
+    
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var panelCfg = {
+                cls: this.groupCls,
+                layout: 'column',
+                border: false,
+                renderTo: ct
+            };
+            var colCfg = {
+                defaultType: this.defaultType,
+                layout: 'form',
+                border: false,
+                defaults: {
+                    hideLabel: true,
+                    anchor: '100%'
+                }
+            };
+            
+            if(this.items[0].items){
+                
+                // The container has standard ColumnLayout configs, so pass them in directly
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: this.items.length},
+                    defaults: this.defaults,
+                    items: this.items
+                });
+                for(var i=0, len=this.items.length; i<len; i++){
+                    Ext.applyIf(this.items[i], colCfg);
+                }
+                
+            }else{
+                
+                // The container has field item configs, so we have to generate the column
+                // panels first then move the items into the columns as needed.
+                
+                var numCols, cols = [];
+                
+                if(typeof this.columns == 'string'){ // 'auto' so create a col per item
+                    this.columns = this.items.length;
+                }
+                if(!Ext.isArray(this.columns)){
+                    var cs = [];
+                    for(var i=0; i<this.columns; i++){
+                        cs.push((100/this.columns)*.01); // distribute by even %
+                    }
+                    this.columns = cs;
+                }
+                
+                numCols = this.columns.length;
+                
+                // Generate the column configs with the correct width setting
+                for(var i=0; i<numCols; i++){
+                    var cc = Ext.apply({items:[]}, colCfg);
+                    cc[this.columns[i] <= 1 ? 'columnWidth' : 'width'] = this.columns[i];
+                    if(this.defaults){
+                        cc.defaults = Ext.apply(cc.defaults || {}, this.defaults)
+                    }
+                    cols.push(cc);
+                };
+                
+                // Distribute the original items into the columns
+                if(this.vertical){
+                    var rows = Math.ceil(this.items.length / numCols), ri = 0;
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        if(i>0 && i%rows==0){
+                            ri++;
+                        }
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ri].items.push(this.items[i]);
+                    };
+                }else{
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        var ci = i % numCols;
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ci].items.push(this.items[i]);
+                    };
+                }
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: numCols},
+                    items: cols
+                });
+            }
+            
+            this.panel = new Ext.Panel(panelCfg);
+            this.panel.ownerCt = this;
+            this.el = this.panel.getEl();
+            
+            if(this.forId && this.itemCls){
+                var l = this.el.up(this.itemCls).child('label', true);
+                if(l){
+                    l.setAttribute('htmlFor', this.forId);
+                }
+            }
+            
+            var fields = this.panel.findBy(function(c){
+                return c.isFormField;
+            }, this);
+            
+            this.items = new Ext.util.MixedCollection();
+            this.items.addAll(fields);
+        }
+        Ext.form.CheckboxGroup.superclass.onRender.call(this, ct, position);
+    },
+    
+    afterRender : function(){
+        Ext.form.CheckboxGroup.superclass.afterRender.call(this);
+        if(this.values){
+            this.setValue.apply(this, this.values);
+            delete this.values;
+        }
+        this.eachItem(function(item){
+            item.on('check', this.fireChecked, this);
+            item.inGroup = true;
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        //ugly method required to layout hidden items
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    fireChecked: function(){
+        var arr = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                arr.push(item);
+            }
+        });
+        this.fireEvent('change', this, arr);
+    },
+    
+    // private
+    validateValue : function(value){
+        if(!this.allowBlank){
+            var blank = true;
+            this.eachItem(function(f){
+                if(f.checked){
+                    return (blank = false);
+                }
+            });
+            if(blank){
+                this.markInvalid(this.blankText);
+                return false;
+            }
+        }
+        return true;
+    },
+    
+    // private
+    onDisable : function(){
+        this.eachItem(function(item){
+            item.disable();
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.eachItem(function(item){
+            item.enable();
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    onResize : function(w, h){
+        this.panel.setSize(w, h);
+        this.panel.doLayout();
+    },
+    
+    // inherit docs from Field
+    reset : function(){
+        Ext.form.CheckboxGroup.superclass.reset.call(this);
+        this.eachItem(function(c){
+            if(c.reset){
+                c.reset();
+            }
+        });
+    },
+    
+    /**
+     * {@link Ext.form.Checkbox#setValue Set the value(s)} of an item or items
+     * in the group. Examples illustrating how this method may be called:
+     * <pre><code>
+// call with name and value
+myCheckboxGroup.setValue('cb-col-1', true);
+// call with an array of boolean values 
+myCheckboxGroup.setValue([true, false, false]);
+// call with an object literal specifying item:value pairs
+myCheckboxGroup.setValue({
+    'cb-col-2': false,
+    'cb-col-3': true
+});
+// use comma separated string to set items with name to true (checked)
+myCheckboxGroup.setValue('cb-col-1,cb-col-3');
+     * </code></pre>
+     * See {@link Ext.form.Checkbox#setValue} for additional information.
+     * @param {Mixed} id The checkbox to check, or as described by example shown.
+     * @param {Boolean} value (optional) The value to set the item.
+     * @return {Ext.form.CheckboxGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length == 1){
+                if(Ext.isArray(id)){
+                    //an array of boolean values
+                    Ext.each(id, function(val, idx){
+                        var item = this.items.itemAt(idx);
+                        if(item){
+                            item.setValue(val);
+                        }
+                    }, this);
+                }else if(Ext.isObject(id)){
+                    //set of name/value pairs
+                    for(var i in id){
+                        var f = this.getBox(i);
+                        if(f){
+                            f.setValue(id[i]);
+                        }
+                    }
+                }else{
+                    this.setValueForItem(id);
+                }
+            }else{
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                }
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    onDestroy: function(){
+        Ext.destroy(this.panel);
+        Ext.form.CheckboxGroup.superclass.onDestroy.call(this);
+
+    },
+    
+    setValueForItem : function(val){
+        val = String(val).split(',');
+        this.eachItem(function(item){
+            if(val.indexOf(item.inputValue)> -1){
+                item.setValue(true);
+            }
+        });
+    },
+    
+    // private
+    getBox : function(id){
+        var box = null;
+        this.eachItem(function(f){
+            if(id == f || f.dataIndex == id || f.id == id || f.getName() == id){
+                box = f;
+                return false;
+            }
+        });
+        return box;
+    },
+    
+    /**
+     * Gets an array of the selected {@link Ext.form.Checkbox} in the group.
+     * @return {Array} An array of the selected checkboxes.
+     */
+    getValue : function(){
+        var out = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                out.push(item);
+            }
+        });
+        return out;
+    },
+    
+    // private
+    eachItem: function(fn){
+        if(this.items && this.items.each){
+            this.items.each(fn, this);
+        }
+    },
+    
+    /**
+     * @cfg {String} name
+     * @hide
+     */
+    /**
+     * @method initValue
+     * @hide
+     */
+    initValue : Ext.emptyFn,
+    /**
+     * @method getValue
+     * @hide
+     */
+    getValue : Ext.emptyFn,
+    /**
+     * @method getRawValue
+     * @hide
+     */
+    getRawValue : Ext.emptyFn,
+    
+    /**
+     * @method setRawValue
+     * @hide
+     */
+    setRawValue : Ext.emptyFn
+    
+});
+
+Ext.reg('checkboxgroup', Ext.form.CheckboxGroup);
+/**
+ * @class Ext.form.Radio
+ * @extends Ext.form.Checkbox
+ * Single radio field.  Same as Checkbox, but provided as a convenience for automatically setting the input type.
+ * Radio grouping is handled automatically by the browser if you give each radio in a group the same name.
+ * @constructor
+ * Creates a new Radio
+ * @param {Object} config Configuration options
+ * @xtype radio
+ */
+Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
+    inputType: 'radio',
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    /**
+     * If this radio is part of a group, it will return the selected value
+     * @return {String}
+     */
+    getGroupValue : function(){
+    	var p = this.el.up('form') || Ext.getBody();
+        var c = p.child('input[name='+this.el.dom.name+']:checked', true);
+        return c ? c.value : null;
+    },
+
+    // private
+    onClick : function(){
+    	if(this.el.dom.checked != this.checked){
+			var els = this.getCheckEl().select('input[name=' + this.el.dom.name + ']');
+			els.each(function(el){
+				if(el.dom.id == this.id){
+					this.setValue(true);
+				}else{
+					Ext.getCmp(el.dom.id).setValue(false);
+				}
+			}, this);
+		}
+    },
+
+    /**
+     * Sets either the checked/unchecked status of this Radio, or, if a string value
+     * is passed, checks a sibling Radio of the same name whose value is the value specified.
+     * @param value {String/Boolean} Checked value, or the value of the sibling radio button to check.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+    	if (typeof v == 'boolean') {
+            Ext.form.Radio.superclass.setValue.call(this, v);
+        } else {
+            var r = this.getCheckEl().child('input[name=' + this.el.dom.name + '][value=' + v + ']', true);
+            if(r){
+                Ext.getCmp(r.id).setValue(true);
+            }
+        }
+        return this;
+    },
+    
+    // private
+    getCheckEl: function(){
+        if(this.inGroup){
+            return this.el.up('.x-form-radio-group')
+        }
+        return this.el.up('form') || Ext.getBody();
+    }
+});
+Ext.reg('radio', Ext.form.Radio);
+/**
+ * @class Ext.form.RadioGroup
+ * @extends Ext.form.CheckboxGroup
+ * A grouping container for {@link Ext.form.Radio} controls.
+ * @constructor
+ * Creates a new RadioGroup
+ * @param {Object} config Configuration options
+ * @xtype radiogroup
+ */
+Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
+    /**
+     * @cfg {Boolean} allowBlank True to allow every item in the group to be blank (defaults to true).
+     * If allowBlank = false and no items are selected at validation time, {@link @blankText} will
+     * be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails
+     * (defaults to 'You must select one item in this group')
+     */
+    blankText : 'You must select one item in this group',
+    
+    // private
+    defaultType : 'radio',
+    
+    // private
+    groupCls : 'x-form-radio-group',
+    
+    /**
+     * @event change
+     * Fires when the state of a child radio changes.
+     * @param {Ext.form.RadioGroup} this
+     * @param {Ext.form.Radio} checked The checked radio
+     */
+    
+    /**
+     * Gets the selected {@link Ext.form.Radio} in the group, if it exists.
+     * @return {Ext.form.Radio} The selected radio.
+     */
+    getValue : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        return out;
+    },
+    
+    /**
+     * Sets the checked radio in the group.
+     * @param {String/Ext.form.Radio} id The radio to check.
+     * @param {Boolean} value The value to set the radio.
+     * @return {Ext.form.RadioGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length > 1){
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                    if(f.checked){
+                        this.eachItem(function(item){
+                            if (item !== f){
+                                item.setValue(false);
+                            }
+                        });
+                    }
+                }
+            }else{
+                this.setValueForItem(id);
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    fireChecked : function(){
+        if(!this.checkTask){
+            this.checkTask = new Ext.util.DelayedTask(this.bufferChecked, this);
+        }
+        this.checkTask.delay(10);
+    },
+    
+    // private
+    bufferChecked : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        this.fireEvent('change', this, out);
+    },
+    
+    onDestroy : function(){
+        if(this.checkTask){
+            this.checkTask.cancel();
+            this.checkTask = null;
+        }
+        Ext.form.RadioGroup.superclass.onDestroy.call(this);
+    }
+
+});
+
+Ext.reg('radiogroup', Ext.form.RadioGroup);
+/**
+ * @class Ext.form.Hidden
+ * @extends Ext.form.Field
+ * A basic hidden field for storing hidden values in forms that need to be passed in the form submit.
+ * @constructor
+ * Create a new Hidden field.
+ * @param {Object} config Configuration options
+ * @xtype hidden
+ */
+Ext.form.Hidden = Ext.extend(Ext.form.Field, {
+    // private
+    inputType : 'hidden',
+
+    // private
+    onRender : function(){
+        Ext.form.Hidden.superclass.onRender.apply(this, arguments);
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    // These are all private overrides
+    setSize : Ext.emptyFn,
+    setWidth : Ext.emptyFn,
+    setHeight : Ext.emptyFn,
+    setPosition : Ext.emptyFn,
+    setPagePosition : Ext.emptyFn,
+    markInvalid : Ext.emptyFn,
+    clearInvalid : Ext.emptyFn
+});
+Ext.reg('hidden', Ext.form.Hidden);/**
+ * @class Ext.form.BasicForm
+ * @extends Ext.util.Observable
+ * <p>Encapsulates the DOM &lt;form> element at the heart of the {@link Ext.form.FormPanel FormPanel} class, and provides
+ * input field management, validation, submission, and form loading services.</p>
+ * <p>By default, Ext Forms are submitted through Ajax, using an instance of {@link Ext.form.Action.Submit}.
+ * To enable normal browser submission of an Ext Form, use the {@link #standardSubmit} config option.</p>
+ * <p><b><u>File Uploads</u></b></p>
+ * <p>{@link #fileUpload File uploads} are not performed using Ajax submission, that
+ * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+ * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+ * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+ * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+ * but removed after the return data has been gathered.</p>
+ * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+ * server is using JSON to send the return object, then the
+ * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+ * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+ * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+ * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+ * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+ * is created containing a <tt>responseText</tt> property in order to conform to the
+ * requirements of event handlers and callbacks.</p>
+ * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+ * and some server technologies (notably JEE) may require some custom processing in order to
+ * retrieve parameter names and parameter values from the packet content.</p>
+ * @constructor
+ * @param {Mixed} el The form element or its id
+ * @param {Object} config Configuration options
+ */
+Ext.form.BasicForm = function(el, config){
+    Ext.apply(this, config);
+    if(Ext.isString(this.paramOrder)){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    /*
+     * @property items
+     * A {@link Ext.util.MixedCollection MixedCollection) containing all the Ext.form.Fields in this form.
+     * @type MixedCollection
+     */
+    this.items = new Ext.util.MixedCollection(false, function(o){
+        return o.itemId || o.id || (o.id = Ext.id());
+    });
+    this.addEvents(
+        /**
+         * @event beforeaction
+         * Fires before any action is performed. Return false to cancel the action.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} to be performed
+         */
+        'beforeaction',
+        /**
+         * @event actionfailed
+         * Fires when an action fails.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that failed
+         */
+        'actionfailed',
+        /**
+         * @event actioncomplete
+         * Fires when an action is completed.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that completed
+         */
+        'actioncomplete'
+    );
+
+    if(el){
+        this.initEl(el);
+    }
+    Ext.form.BasicForm.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.form.BasicForm, Ext.util.Observable, {
+    /**
+     * @cfg {String} method
+     * The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
+     */
+    /**
+     * @cfg {DataReader} reader
+     * An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read
+     * data when executing 'load' actions. This is optional as there is built-in
+     * support for processing JSON.  For additional information on using an XMLReader
+     * see the example provided in examples/form/xml-form.html.
+     */
+    /**
+     * @cfg {DataReader} errorReader
+     * <p>An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to
+     * read field error messages returned from 'submit' actions. This is optional
+     * as there is built-in support for processing JSON.</p>
+     * <p>The Records which provide messages for the invalid Fields must use the
+     * Field name (or id) as the Record ID, and must contain a field called 'msg'
+     * which contains the error message.</p>
+     * <p>The errorReader does not have to be a full-blown implementation of a
+     * DataReader. It simply needs to implement a <tt>read(xhr)</tt> function
+     * which returns an Array of Records in an object with the following
+     * structure:</p><pre><code>
+{
+    records: recordArray
+}
+</code></pre>
+     */
+    /**
+     * @cfg {String} url
+     * The URL to use for form actions if one isn't supplied in the
+     * <code>{@link #doAction doAction} options</code>.
+     */
+    /**
+     * @cfg {Boolean} fileUpload
+     * Set to true if this form is a file upload.
+     * <p>File uploads are not performed using normal 'Ajax' techniques, that is they are <b>not</b>
+     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     */
+    /**
+     * @cfg {Object} baseParams
+     * <p>Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     */
+    /**
+     * @cfg {Number} timeout Timeout for form actions in seconds (default is 30 seconds).
+     */
+    timeout: 30,
+
+    /**
+     * @cfg {Object} api (Optional) If specified load and submit actions will be handled
+     * with {@link Ext.form.Action.DirectLoad} and {@link Ext.form.Action.DirectSubmit}.
+     * Methods which have been imported by Ext.Direct can be specified here to load and submit
+     * forms.
+     * Such as the following:<pre><code>
+api: {
+    load: App.ss.MyProfile.load,
+    submit: App.ss.MyProfile.submit
+}
+</code></pre>
+     * <p>Load actions can use <code>{@link #paramOrder}</code> or <code>{@link #paramsAsHash}</code>
+     * to customize how the load method is invoked.
+     * Submit actions will always use a standard form submit. The formHandler configuration must
+     * be set on the associated server-side method which has been imported by Ext.Direct</p>
+     */
+
+    /**
+     * @cfg {Array/String} paramOrder <p>A list of params to be executed server side.
+     * Defaults to <tt>undefined</tt>. Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration.</p>
+     * <br><p>Specify the params in the order in which they must be executed on the
+     * server-side as either (1) an Array of String values, or (2) a String of params
+     * delimited by either whitespace, comma, or pipe. For example,
+     * any of the following would be acceptable:</p><pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration. Send parameters as a collection of named
+     * arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+
+    // private
+    activeAction : null,
+
+    /**
+     * @cfg {Boolean} trackResetOnLoad If set to <tt>true</tt>, {@link #reset}() resets to the last loaded
+     * or {@link #setValues}() data instead of when the form was first created.  Defaults to <tt>false</tt>.
+     */
+    trackResetOnLoad : false,
+
+    /**
+     * @cfg {Boolean} standardSubmit If set to true, standard HTML form submits are used instead of XHR (Ajax) style
+     * form submissions. (defaults to false)<br>
+     * <p><b>Note:</b> When using standardSubmit, the options to {@link #submit} are ignored because Ext's
+     * Ajax infrastracture is bypassed. To pass extra parameters (baseParams and params), you will need to
+     * create hidden fields within the form.</p>
+     * <p>The url config option is also bypassed, so set the action as well:</p>
+     * <pre><code>
+PANEL.getForm().getEl().dom.action = 'URL'
+     * </code></pre>
+     * An example encapsulating the above:
+     * <pre><code>
+new Ext.FormPanel({
+    standardSubmit: true,
+    baseParams: {
+        foo: 'bar'
+    },
+    url: 'myProcess.php',
+    items: [{
+        xtype: 'textfield',
+        name: 'userName'
+    }],
+    buttons: [{
+        text: 'Save',
+        handler: function(){
+            var O = this.ownerCt;
+            if (O.getForm().isValid()) {
+                if (O.url)
+                    O.getForm().getEl().dom.action = O.url;
+                if (O.baseParams) {
+                    for (i in O.baseParams) {
+                        O.add({
+                            xtype: 'hidden',
+                            name: i,
+                            value: O.baseParams[i]
+                        })
+                    }
+                    O.doLayout();
+                }
+                O.getForm().submit();
+            }
+        }
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
+     * element by passing it or its id or mask the form itself by passing in true.
+     * @type Mixed
+     * @property waitMsgTarget
+     */
+
+    // private
+    initEl : function(el){
+        this.el = Ext.get(el);
+        this.id = this.el.id || Ext.id();
+        if(!this.standardSubmit){
+            this.el.on('submit', this.onSubmit, this);
+        }
+        this.el.addClass('x-form');
+    },
+
+    /**
+     * Get the HTML form Element
+     * @return Ext.Element
+     */
+    getEl: function(){
+        return this.el;
+    },
+
+    // private
+    onSubmit : function(e){
+        e.stopEvent();
+    },
+
+    // private
+    destroy: function() {
+        this.items.each(function(f){
+            Ext.destroy(f);
+        });
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+        this.purgeListeners();
+    },
+
+    /**
+     * Returns true if client-side validation on the form is successful.
+     * @return Boolean
+     */
+    isValid : function(){
+        var valid = true;
+        this.items.each(function(f){
+           if(!f.validate()){
+               valid = false;
+           }
+        });
+        return valid;
+    },
+
+    /**
+     * <p>Returns true if any fields in this form have changed from their original values.</p>
+     * <p>Note that if this BasicForm was configured with {@link #trackResetOnLoad} then the
+     * Fields' <i>original values</i> are updated when the values are loaded by {@link #setValues}
+     * or {@link #loadRecord}.</p>
+     * @return Boolean
+     */
+    isDirty : function(){
+        var dirty = false;
+        this.items.each(function(f){
+           if(f.isDirty()){
+               dirty = true;
+               return false;
+           }
+        });
+        return dirty;
+    },
+
+    /**
+     * Performs a predefined action ({@link Ext.form.Action.Submit} or
+     * {@link Ext.form.Action.Load}) or a custom extension of {@link Ext.form.Action}
+     * to perform application-specific processing.
+     * @param {String/Object} actionName The name of the predefined action type,
+     * or instance of {@link Ext.form.Action} to perform.
+     * @param {Object} options (optional) The options to pass to the {@link Ext.form.Action}.
+     * All of the config options listed below are supported by both the
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * actions unless otherwise noted (custom actions could also accept
+     * other config options):<ul>
+     *
+     * <li><b>url</b> : String<div class="sub-desc">The url for the action (defaults
+     * to the form's {@link #url}.)</div></li>
+     *
+     * <li><b>method</b> : String<div class="sub-desc">The form method to use (defaults
+     * to the form's method, or POST if not defined)</div></li>
+     *
+     * <li><b>params</b> : String/Object<div class="sub-desc"><p>The params to pass
+     * (defaults to the form's baseParams, or none if not defined)</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     *
+     * <li><b>headers</b> : Object<div class="sub-desc">Request headers to set for the action
+     * (defaults to the form's default headers)</div></li>
+     *
+     * <li><b>success</b> : Function<div class="sub-desc">The callback that will
+     * be invoked after a successful response (see top of
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * for a description of what constitutes a successful response).
+     * The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>failure</b> : Function<div class="sub-desc">The callback that will be invoked after a
+     * failed transaction attempt. The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : The {@link Ext.form.BasicForm} that requested the action.</li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#failureType failureType}</tt></li>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the
+     * callback functions (The <tt>this</tt> reference for the callback functions).</div></li>
+     *
+     * <li><b>clientValidation</b> : Boolean<div class="sub-desc">Submit Action only.
+     * Determines whether a Form's fields are validated in a final call to
+     * {@link Ext.form.BasicForm#isValid isValid} prior to submission. Set to <tt>false</tt>
+     * to prevent this. If undefined, pre-submission field validation is performed.</div></li></ul>
+     *
+     * @return {BasicForm} this
+     */
+    doAction : function(action, options){
+        if(Ext.isString(action)){
+            action = new Ext.form.Action.ACTION_TYPES[action](this, options);
+        }
+        if(this.fireEvent('beforeaction', this, action) !== false){
+            this.beforeAction(action);
+            action.run.defer(100, action);
+        }
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Submit submit action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details).<br>
+     * <p><b>Note:</b> this is ignored when using the {@link #standardSubmit} option.</p>
+     * <p>The following code:</p><pre><code>
+myFormPanel.getForm().submit({
+    clientValidation: true,
+    url: 'updateConsignment.php',
+    params: {
+        newStatus: 'delivered'
+    },
+    success: function(form, action) {
+       Ext.Msg.alert('Success', action.result.msg);
+    },
+    failure: function(form, action) {
+        switch (action.failureType) {
+            case Ext.form.Action.CLIENT_INVALID:
+                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
+                break;
+            case Ext.form.Action.CONNECT_FAILURE:
+                Ext.Msg.alert('Failure', 'Ajax communication failed');
+                break;
+            case Ext.form.Action.SERVER_INVALID:
+               Ext.Msg.alert('Failure', action.result.msg);
+       }
+    }
+});
+</code></pre>
+     * would process the following server response for a successful submission:<pre><code>
+{
+    "success":true, // note this is Boolean, not string
+    "msg":"Consignment updated"
+}
+</code></pre>
+     * and the following server response for a failed submission:<pre><code>
+{
+    "success":false, // note this is Boolean, not string
+    "msg":"You do not have permission to perform this operation"
+}
+</code></pre>
+     * @return {BasicForm} this
+     */
+    submit : function(options){
+        if(this.standardSubmit){
+            var v = this.isValid();
+            if(v){
+                this.el.dom.submit();
+            }
+            return v;
+        }
+        var submitAction = String.format('{0}submit', this.api ? 'direct' : '');
+        this.doAction(submitAction, options);
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Load load action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details)
+     * @return {BasicForm} this
+     */
+    load : function(options){
+        var loadAction = String.format('{0}load', this.api ? 'direct' : '');
+        this.doAction(loadAction, options);
+        return this;
+    },
+
+    /**
+     * Persists the values in this form into the passed {@link Ext.data.Record} object in a beginEdit/endEdit block.
+     * @param {Record} record The record to edit
+     * @return {BasicForm} this
+     */
+    updateRecord : function(record){
+        record.beginEdit();
+        var fs = record.fields;
+        fs.each(function(f){
+            var field = this.findField(f.name);
+            if(field){
+                record.set(f.name, field.getValue());
+            }
+        }, this);
+        record.endEdit();
+        return this;
+    },
+
+    /**
+     * Loads an {@link Ext.data.Record} into this form by calling {@link #setValues} with the
+     * {@link Ext.data.Record#data record data}.
+     * See also {@link #trackResetOnLoad}.
+     * @param {Record} record The record to load
+     * @return {BasicForm} this
+     */
+    loadRecord : function(record){
+        this.setValues(record.data);
+        return this;
+    },
+
+    // private
+    beforeAction : function(action){
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.mask(o.waitMsg, 'x-mask-loading');
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget = Ext.get(this.waitMsgTarget);
+                this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading');
+            }else{
+                Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...');
+            }
+        }
+    },
+
+    // private
+    afterAction : function(action, success){
+        this.activeAction = null;
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.unmask();
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget.unmask();
+            }else{
+                Ext.MessageBox.updateProgress(1);
+                Ext.MessageBox.hide();
+            }
+        }
+        if(success){
+            if(o.reset){
+                this.reset();
+            }
+            Ext.callback(o.success, o.scope, [this, action]);
+            this.fireEvent('actioncomplete', this, action);
+        }else{
+            Ext.callback(o.failure, o.scope, [this, action]);
+            this.fireEvent('actionfailed', this, action);
+        }
+    },
+
+    /**
+     * Find a {@link Ext.form.Field} in this form.
+     * @param {String} id The value to search for (specify either a {@link Ext.Component#id id},
+     * {@link Ext.grid.Column#dataIndex dataIndex}, {@link Ext.form.Field#getName name or hiddenName}).
+     * @return Field
+     */
+    findField : function(id){
+        var field = this.items.get(id);
+        if(!Ext.isObject(field)){
+            this.items.each(function(f){
+                if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){
+                    field = f;
+                    return false;
+                }
+            });
+        }
+        return field || null;
+    },
+
+
+    /**
+     * Mark fields in this form invalid in bulk.
+     * @param {Array/Object} errors Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}
+     * @return {BasicForm} this
+     */
+    markInvalid : function(errors){
+        if(Ext.isArray(errors)){
+            for(var i = 0, len = errors.length; i < len; i++){
+                var fieldError = errors[i];
+                var f = this.findField(fieldError.id);
+                if(f){
+                    f.markInvalid(fieldError.msg);
+                }
+            }
+        }else{
+            var field, id;
+            for(id in errors){
+                if(!Ext.isFunction(errors[id]) && (field = this.findField(id))){
+                    field.markInvalid(errors[id]);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Set values for fields in this form in bulk.
+     * @param {Array/Object} values Either an array in the form:<pre><code>
+[{id:'clientName', value:'Fred. Olsen Lines'},
+ {id:'portOfLoading', value:'FXT'},
+ {id:'portOfDischarge', value:'OSL'} ]</code></pre>
+     * or an object hash of the form:<pre><code>
+{
+    clientName: 'Fred. Olsen Lines',
+    portOfLoading: 'FXT',
+    portOfDischarge: 'OSL'
+}</code></pre>
+     * @return {BasicForm} this
+     */
+    setValues : function(values){
+        if(Ext.isArray(values)){ // array of objects
+            for(var i = 0, len = values.length; i < len; i++){
+                var v = values[i];
+                var f = this.findField(v.id);
+                if(f){
+                    f.setValue(v.value);
+                    if(this.trackResetOnLoad){
+                        f.originalValue = f.getValue();
+                    }
+                }
+            }
+        }else{ // object hash
+            var field, id;
+            for(id in values){
+                if(!Ext.isFunction(values[id]) && (field = this.findField(id))){
+                    field.setValue(values[id]);
+                    if(this.trackResetOnLoad){
+                        field.originalValue = field.getValue();
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * <p>Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
+     * If multiple fields exist with the same name they are returned as an array.</p>
+     * <p><b>Note:</b> The values are collected from all enabled HTML input elements within the form, <u>not</u> from
+     * the Ext Field objects. This means that all returned values are Strings (or Arrays of Strings) and that the
+     * value can potentially be the emptyText of a field.</p>
+     * @param {Boolean} asString (optional) Pass true to return the values as a string. (defaults to false, returning an Object)
+     * @return {String/Object}
+     */
+    getValues : function(asString){
+        var fs = Ext.lib.Ajax.serializeForm(this.el.dom);
+        if(asString === true){
+            return fs;
+        }
+        return Ext.urlDecode(fs);
+    },
+
+    getFieldValues : function(){
+        var o = {};
+        this.items.each(function(f){
+           o[f.getName()] = f.getValue();
+        });
+        return o;
+    },
+
+    /**
+     * Clears all invalid messages in this form.
+     * @return {BasicForm} this
+     */
+    clearInvalid : function(){
+        this.items.each(function(f){
+           f.clearInvalid();
+        });
+        return this;
+    },
+
+    /**
+     * Resets this form.
+     * @return {BasicForm} this
+     */
+    reset : function(){
+        this.items.each(function(f){
+            f.reset();
+        });
+        return this;
+    },
+
+    /**
+     * Add Ext.form Components to this form's Collection. This does not result in rendering of
+     * the passed Component, it just enables the form to validate Fields, and distribute values to
+     * Fields.
+     * <p><b>You will not usually call this function. In order to be rendered, a Field must be added
+     * to a {@link Ext.Container Container}, usually an {@link Ext.form.FormPanel FormPanel}.
+     * The FormPanel to which the field is added takes care of adding the Field to the BasicForm's
+     * collection.</b></p>
+     * @param {Field} field1
+     * @param {Field} field2 (optional)
+     * @param {Field} etc (optional)
+     * @return {BasicForm} this
+     */
+    add : function(){
+        this.items.addAll(Array.prototype.slice.call(arguments, 0));
+        return this;
+    },
+
+
+    /**
+     * Removes a field from the items collection (does NOT remove its markup).
+     * @param {Field} field
+     * @return {BasicForm} this
+     */
+    remove : function(field){
+        this.items.remove(field);
+        return this;
+    },
+
+    /**
+     * Iterates through the {@link Ext.form.Field Field}s which have been {@link #add add}ed to this BasicForm,
+     * checks them for an id attribute, and calls {@link Ext.form.Field#applyToMarkup} on the existing dom element with that id.
+     * @return {BasicForm} this
+     */
+    render : function(){
+        this.items.each(function(f){
+            if(f.isFormField && !f.rendered && document.getElementById(f.id)){ // if the element exists
+                f.applyToMarkup(f.id);
+            }
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#apply} for all fields in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyToFields : function(o){
+        this.items.each(function(f){
+           Ext.apply(f, o);
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#applyIf} for all field in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyIfToFields : function(o){
+        this.items.each(function(f){
+           Ext.applyIf(f, o);
+        });
+        return this;
+    },
+
+    callFieldMethod : function(fnName, args){
+        args = args || [];
+        this.items.each(function(f){
+            if(Ext.isFunction(f[fnName])){
+                f[fnName].apply(f, args);
+            }
+        });
+        return this;
+    }
+});
+
+// back compat
+Ext.BasicForm = Ext.form.BasicForm;/**
+ * @class Ext.form.FormPanel
+ * @extends Ext.Panel
+ * <p>Standard form container.</p>
+ * 
+ * <p><b><u>Layout</u></b></p>
+ * <p>By default, FormPanel is configured with <tt>layout:'form'</tt> to use an {@link Ext.layout.FormLayout}
+ * layout manager, which styles and renders fields and labels correctly. When nesting additional Containers
+ * within a FormPanel, you should ensure that any descendant Containers which host input Fields use the
+ * {@link Ext.layout.FormLayout} layout manager.</p>
+ * 
+ * <p><b><u>BasicForm</u></b></p>
+ * <p>Although <b>not listed</b> as configuration options of FormPanel, the FormPanel class accepts all
+ * of the config options required to configure its internal {@link Ext.form.BasicForm} for:
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.BasicForm#fileUpload file uploads}</li>
+ * <li>functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form</li>
+ * </ul></div>
+ *  
+ * <p><b>Note</b>: If subclassing FormPanel, any configuration options for the BasicForm must be applied to
+ * the <tt><b>initialConfig</b></tt> property of the FormPanel. Applying {@link Ext.form.BasicForm BasicForm}
+ * configuration settings to <b><tt>this</tt></b> will <b>not</b> affect the BasicForm's configuration.</p>
+ * 
+ * <p><b><u>Form Validation</u></b></p>
+ * <p>For information on form validation see the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.TextField}</li>
+ * <li>{@link Ext.form.VTypes}</li>
+ * <li>{@link Ext.form.BasicForm#doAction BasicForm.doAction <b>clientValidation</b> notes}</li>
+ * <li><tt>{@link Ext.form.FormPanel#monitorValid monitorValid}</tt></li>
+ * </ul></div>
+ * 
+ * <p><b><u>Form Submission</u></b></p>
+ * <p>By default, Ext Forms are submitted through Ajax, using {@link Ext.form.Action}. To enable normal browser
+ * submission of the {@link Ext.form.BasicForm BasicForm} contained in this FormPanel, see the
+ * <tt><b>{@link Ext.form.BasicForm#standardSubmit standardSubmit}</b></tt> option.</p>
+ * 
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype form
+ */
+Ext.FormPanel = Ext.extend(Ext.Panel, {
+	/**
+	 * @cfg {String} formId (optional) The id of the FORM tag (defaults to an auto-generated id).
+	 */
+    /**
+     * @cfg {Boolean} hideLabels
+     * <p><tt>true</tt> to hide field labels by default (sets <tt>display:none</tt>). Defaults to
+     * <tt>false</tt>.</p>
+     * <p>Also see {@link Ext.Component}.<tt>{@link Ext.Component#hideLabel hideLabel}</tt>.
+     */
+    /**
+     * @cfg {Number} labelPad
+     * The default padding in pixels for field labels (defaults to <tt>5</tt>). <tt>labelPad</tt> only
+     * applies if <tt>{@link #labelWidth}</tt> is also specified, otherwise it will be ignored.
+     */
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.Component}.<tt>{@link Ext.Component#labelSeparator labelSeparator}</tt>
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels in pixels. This property cascades to child containers
+     * and can be overridden on any child container (e.g., a fieldset can specify a different <tt>labelWidth</tt>
+     * for its fields) (defaults to <tt>100</tt>).
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the x-form-item of fields. This property cascades to child containers.
+     */
+    /**
+     * @cfg {Array} buttons
+     * An array of {@link Ext.Button}s or {@link Ext.Button} configs used to add buttons to the footer of this FormPanel.<br>
+     * <p>Buttons in the footer of a FormPanel may be configured with the option <tt>formBind: true</tt>. This causes
+     * the form's {@link #monitorValid valid state monitor task} to enable/disable those Buttons depending on
+     * the form's valid/invalid state.</p>
+     */
+
+
+    /**
+     * @cfg {Number} minButtonWidth Minimum width of all buttons in pixels (defaults to <tt>75</tt>).
+     */
+    minButtonWidth : 75,
+
+    /**
+     * @cfg {String} labelAlign The label alignment value used for the <tt>text-align</tt> specification
+     * for the <b>container</b>. Valid values are <tt>"left</tt>", <tt>"top"</tt> or <tt>"right"</tt>
+     * (defaults to <tt>"left"</tt>). This property cascades to child <b>containers</b> and can be
+     * overridden on any child <b>container</b> (e.g., a fieldset can specify a different <tt>labelAlign</tt>
+     * for its fields).
+     */
+    labelAlign : 'left',
+
+    /**
+     * @cfg {Boolean} monitorValid If <tt>true</tt>, the form monitors its valid state <b>client-side</b> and
+     * regularly fires the {@link #clientvalidation} event passing that state.<br>
+     * <p>When monitoring valid state, the FormPanel enables/disables any of its configured
+     * {@link #buttons} which have been configured with <code>formBind: true</code> depending
+     * on whether the {@link Ext.form.BasicForm#isValid form is valid} or not. Defaults to <tt>false</tt></p>
+     */
+    monitorValid : false,
+
+    /**
+     * @cfg {Number} monitorPoll The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
+     */
+    monitorPoll : 200,
+
+    /**
+     * @cfg {String} layout Defaults to <tt>'form'</tt>.  Normally this configuration property should not be altered. 
+     * For additional details see {@link Ext.layout.FormLayout} and {@link Ext.Container#layout Ext.Container.layout}.
+     */
+    layout : 'form',
+
+    // private
+    initComponent : function(){
+        this.form = this.createForm();
+        Ext.FormPanel.superclass.initComponent.call(this);
+
+        this.bodyCfg = {
+            tag: 'form',
+            cls: this.baseCls + '-body',
+            method : this.method || 'POST',
+            id : this.formId || Ext.id()
+        };
+        if(this.fileUpload) {
+            this.bodyCfg.enctype = 'multipart/form-data';
+        }
+        this.initItems();
+        
+        this.addEvents(
+            /**
+             * @event clientvalidation
+             * If the monitorValid config option is true, this event fires repetitively to notify of valid state
+             * @param {Ext.form.FormPanel} this
+             * @param {Boolean} valid true if the form has passed client-side validation
+             */
+            'clientvalidation'
+        );
+
+        this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']);
+    },
+
+    // private
+    createForm : function(){
+        var config = Ext.applyIf({listeners: {}}, this.initialConfig);
+        return new Ext.form.BasicForm(null, config);
+    },
+
+    // private
+    initFields : function(){
+        var f = this.form;
+        var formPanel = this;
+        var fn = function(c){
+            if(formPanel.isField(c)){
+                f.add(c);
+            }if(c.isFieldWrap){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                f.add(c.field);
+            }else if(c.doLayout && c != formPanel){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                //each check required for check/radio groups.
+                if(c.items && c.items.each){
+                    c.items.each(fn, this);
+                }
+            }
+        };
+        this.items.each(fn, this);
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.form.el;
+    },
+
+    /**
+     * Provides access to the {@link Ext.form.BasicForm Form} which this Panel contains.
+     * @return {Ext.form.BasicForm} The {@link Ext.form.BasicForm Form} which this Panel contains.
+     */
+    getForm : function(){
+        return this.form;
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.initFields();
+        Ext.FormPanel.superclass.onRender.call(this, ct, position);
+        this.form.initEl(this.body);
+    },
+    
+    // private
+    beforeDestroy : function(){
+        this.stopMonitoring();
+        Ext.FormPanel.superclass.beforeDestroy.call(this);
+        /*
+         * Clear the items here to prevent them being destroyed again.
+         * Don't move this behaviour to BasicForm because it can be used
+         * on it's own.
+         */
+        this.form.items.clear();
+        Ext.destroy(this.form);
+    },
+
+	// Determine if a Component is usable as a form Field.
+    isField : function(c) {
+        return !!c.setValue && !!c.getValue && !!c.markInvalid && !!c.clearInvalid;
+    },
+
+    // private
+    initEvents : function(){
+        Ext.FormPanel.superclass.initEvents.call(this);
+        this.on('remove', this.onRemove, this);
+        this.on('add', this.onAdd, this);
+        if(this.monitorValid){ // initialize after render
+            this.startMonitoring();
+        }
+    },
+    
+    // private
+    onAdd : function(ct, c) {
+		// If a single form Field, add it
+        if (this.isField(c)) {
+            this.form.add(c);
+		// If a Container, add any Fields it might contain
+        } else if (c.findBy) {
+            Ext.applyIf(c, {
+                labelAlign: c.ownerCt.labelAlign,
+                labelWidth: c.ownerCt.labelWidth,
+                itemCls: c.ownerCt.itemCls
+            });
+            this.form.add.apply(this.form, c.findBy(this.isField));
+        }
+    },
+	
+    // private
+    onRemove : function(ct, c) {
+		// If a single form Field, remove it
+        if (this.isField(c)) {
+            Ext.destroy(c.container.up('.x-form-item'));
+        	this.form.remove(c);
+		// If a Container, remove any Fields it might contain
+        } else if (c.findByType) {
+            Ext.each(c.findBy(this.isField), this.form.remove, this.form);
+        }
+    },
+
+    /**
+     * Starts monitoring of the valid state of this form. Usually this is done by passing the config
+     * option "monitorValid"
+     */
+    startMonitoring : function(){
+        if(!this.validTask){
+            this.validTask = new Ext.util.TaskRunner();
+            this.validTask.start({
+                run : this.bindHandler,
+                interval : this.monitorPoll || 200,
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Stops monitoring of the valid state of this form
+     */
+    stopMonitoring : function(){
+        if(this.validTask){
+            this.validTask.stopAll();
+            this.validTask = null;
+        }
+    },
+
+    /**
+     * This is a proxy for the underlying BasicForm's {@link Ext.form.BasicForm#load} call.
+     * @param {Object} options The options to pass to the action (see {@link Ext.form.BasicForm#doAction} for details)
+     */
+    load : function(){
+        this.form.load.apply(this.form, arguments);  
+    },
+
+    // private
+    onDisable : function(){
+        Ext.FormPanel.superclass.onDisable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.disable();
+            });
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.FormPanel.superclass.onEnable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.enable();
+            });
+        }
+    },
+
+    // private
+    bindHandler : function(){
+        var valid = true;
+        this.form.items.each(function(f){
+            if(!f.isValid(true)){
+                valid = false;
+                return false;
+            }
+        });
+        if(this.fbar){
+            var fitems = this.fbar.items.items;
+            for(var i = 0, len = fitems.length; i < len; i++){
+                var btn = fitems[i];
+                if(btn.formBind === true && btn.disabled === valid){
+                    btn.setDisabled(!valid);
+                }
+            }
+        }
+        this.fireEvent('clientvalidation', this, valid);
+    }
+});
+Ext.reg('form', Ext.FormPanel);
+
+Ext.form.FormPanel = Ext.FormPanel;
+
+/**
+ * @class Ext.form.FieldSet
+ * @extends Ext.Panel
+ * Standard container used for grouping items within a {@link Ext.form.FormPanel form}.
+ * <pre><code>
+var form = new Ext.FormPanel({
+    title: 'Simple Form with FieldSets',
+    labelWidth: 75, // label settings here cascade unless overridden
+    url: 'save-form.php',
+    frame:true,
+    bodyStyle:'padding:5px 5px 0',
+    width: 700,
+    renderTo: document.body,
+    layout:'column', // arrange items in columns
+    defaults: {      // defaults applied to items
+        layout: 'form',
+        border: false,
+        bodyStyle: 'padding:4px'
+    },
+    items: [{
+        // Fieldset in Column 1
+        xtype:'fieldset',
+        columnWidth: 0.5,
+        title: 'Fieldset 1',
+        collapsible: true,
+        autoHeight:true,
+        defaults: {
+            anchor: '-20' // leave room for error icon
+        },
+        defaultType: 'textfield',
+        items :[{
+                fieldLabel: 'Field 1'
+            }, {
+                fieldLabel: 'Field 2'
+            }, {
+                fieldLabel: 'Field 3'
+            }
+        ]
+    },{
+        // Fieldset in Column 2 - Panel inside
+        xtype:'fieldset',
+        title: 'Show Panel', // title, header, or checkboxToggle creates fieldset header
+        autoHeight:true,
+        columnWidth: 0.5,
+        checkboxToggle: true,
+        collapsed: true, // fieldset initially collapsed
+        layout:'anchor',
+        items :[{
+            xtype: 'panel',
+            anchor: '100%',
+            title: 'Panel inside a fieldset',
+            frame: true,
+            height: 100
+        }]
+    }]
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype fieldset
+ */
+Ext.form.FieldSet = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Mixed} checkboxToggle <tt>true</tt> to render a checkbox into the fieldset frame just
+     * in front of the legend to expand/collapse the fieldset when the checkbox is toggled. (defaults
+     * to <tt>false</tt>).
+     * <p>A {@link Ext.DomHelper DomHelper} element spec may also be specified to create the checkbox.
+     * If <tt>true</tt> is specified, the default DomHelper config object used to create the element
+     * is:</p><pre><code>
+     * {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}
+     * </code></pre>   
+     */
+    /**
+     * @cfg {String} checkboxName The name to assign to the fieldset's checkbox if <tt>{@link #checkboxToggle} = true</tt>
+     * (defaults to <tt>'[checkbox id]-checkbox'</tt>).
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <tt>true</tt> to make the fieldset collapsible and have the expand/collapse toggle button automatically
+     * rendered into the legend element, <tt>false</tt> to keep the fieldset statically sized with no collapse
+     * button (defaults to <tt>false</tt>). Another option is to configure <tt>{@link #checkboxToggle}</tt>.
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels. This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the <tt>x-form-item</tt> of fields (see 
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} for details).
+     * This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the fieldset (defaults to <tt>'x-fieldset'</tt>).
+     */
+    baseCls : 'x-fieldset',
+    /**
+     * @cfg {String} layout The {@link Ext.Container#layout} to use inside the fieldset (defaults to <tt>'form'</tt>).
+     */
+    layout : 'form',
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>false</tt>).
+     */
+    animCollapse : false,
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('fieldset');
+            this.el.id = this.id;
+            if (this.title || this.header || this.checkboxToggle) {
+                this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header';
+            }
+        }
+
+        Ext.form.FieldSet.superclass.onRender.call(this, ct, position);
+
+        if(this.checkboxToggle){
+            var o = typeof this.checkboxToggle == 'object' ?
+                    this.checkboxToggle :
+                    {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'};
+            this.checkbox = this.header.insertFirst(o);
+            this.checkbox.dom.checked = !this.collapsed;
+            this.mon(this.checkbox, 'click', this.onCheckClick, this);
+        }
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = false;
+        }
+        Ext.form.FieldSet.superclass.onCollapse.call(this, doAnim, animArg);
+
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = true;
+        }
+        Ext.form.FieldSet.superclass.onExpand.call(this, doAnim, animArg);
+    },
+
+    /**
+     * This function is called by the fieldset's checkbox when it is toggled (only applies when
+     * checkboxToggle = true).  This method should never be called externally, but can be
+     * overridden to provide custom behavior when the checkbox is toggled if needed.
+     */
+    onCheckClick : function(){
+        this[this.checkbox.dom.checked ? 'expand' : 'collapse']();
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} border
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapseFirst
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {String} disabledClass
+     * @hide
+     */
+    /**
+     * @cfg {String} elements
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} floating
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} footer
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} frame
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {String} iconCls
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * @hide
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} shim
+     * @hide
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * @hide
+     */
+    /**
+     * @cfg {String} tabTip
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {String} xtype
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property footer
+     * @hide
+     */
+    /**
+     * @method focus
+     * @hide
+     */
+    /**
+     * @method getBottomToolbar
+     * @hide
+     */
+    /**
+     * @method getTopToolbar
+     * @hide
+     */
+    /**
+     * @method setIconClass
+     * @hide
+     */
+    /**
+     * @event activate
+     * @hide
+     */
+    /**
+     * @event beforeclose
+     * @hide
+     */
+    /**
+     * @event bodyresize
+     * @hide
+     */
+    /**
+     * @event close
+     * @hide
+     */
+    /**
+     * @event deactivate
+     * @hide
+     */
+});
+Ext.reg('fieldset', Ext.form.FieldSet);
+/**
+ * @class Ext.form.HtmlEditor
+ * @extends Ext.form.Field
+ * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be 
+ * automatically hidden when needed.  These are noted in the config options where appropriate.
+ * <br><br>The editor's toolbar buttons have tooltips defined in the {@link #buttonTips} property, but they are not 
+ * enabled by default unless the global {@link Ext.QuickTips} singleton is {@link Ext.QuickTips#init initialized}.
+ * <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
+ * supported by this editor.</b>
+ * <br><br>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
+ * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
+ * <br><br>Example usage:
+ * <pre><code>
+// Simple example rendered with default options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.form.HtmlEditor({
+    renderTo: Ext.getBody(),
+    width: 800,
+    height: 300
+});
+
+// Passed via xtype into a container and with custom options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.Panel({
+    title: 'HTML Editor',
+    renderTo: Ext.getBody(),
+    width: 600,
+    height: 300,
+    frame: true,
+    layout: 'fit',
+    items: {
+        xtype: 'htmleditor',
+        enableColors: false,
+        enableAlignments: false
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new HtmlEditor
+ * @param {Object} config
+ * @xtype htmleditor
+ */
+
+Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true)
+     */
+    enableFormat : true,
+    /**
+     * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true)
+     */
+    enableFontSize : true,
+    /**
+     * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true)
+     */
+    enableColors : true,
+    /**
+     * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true)
+     */
+    enableAlignments : true,
+    /**
+     * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
+     */
+    enableLists : true,
+    /**
+     * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true)
+     */
+    enableSourceEdit : true,
+    /**
+     * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true)
+     */
+    enableLinks : true,
+    /**
+     * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true)
+     */
+    enableFont : true,
+    /**
+     * @cfg {String} createLinkText The default text for the create link prompt
+     */
+    createLinkText : 'Please enter the URL for the link:',
+    /**
+     * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /)
+     */
+    defaultLinkValue : 'http:/'+'/',
+    /**
+     * @cfg {Array} fontFamilies An array of available font families
+     */
+    fontFamilies : [
+        'Arial',
+        'Courier New',
+        'Tahoma',
+        'Times New Roman',
+        'Verdana'
+    ],
+    defaultFont: 'tahoma',
+    /**
+     * @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to &#8203; (Zero-width space), &nbsp; (Non-breaking space) in Opera and IE6).
+     */
+    defaultValue: (Ext.isOpera || Ext.isIE6) ? '&nbsp;' : '&#8203;',
+
+    // private properties
+    actionMode: 'wrap',
+    validationEvent : false,
+    deferHeight: true,
+    initialized : false,
+    activated : false,
+    sourceEditMode : false,
+    onFocus : Ext.emptyFn,
+    iframePad:3,
+    hideMode:'offsets',
+    defaultAutoCreate : {
+        tag: "textarea",
+        style:"width:500px;height:300px;",
+        autocomplete: "off"
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event initialize
+             * Fires when the editor is fully initialized (including the iframe)
+             * @param {HtmlEditor} this
+             */
+            'initialize',
+            /**
+             * @event activate
+             * Fires when the editor is first receives the focus. Any insertion must wait
+             * until after this event.
+             * @param {HtmlEditor} this
+             */
+            'activate',
+             /**
+             * @event beforesync
+             * Fires before the textarea is updated with content from the editor iframe. Return false
+             * to cancel the sync.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforesync',
+             /**
+             * @event beforepush
+             * Fires before the iframe editor is updated with content from the textarea. Return false
+             * to cancel the push.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforepush',
+             /**
+             * @event sync
+             * Fires when the textarea is updated with content from the editor iframe.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'sync',
+             /**
+             * @event push
+             * Fires when the iframe editor is updated with content from the textarea.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'push',
+             /**
+             * @event editmodechange
+             * Fires when the editor switches edit modes
+             * @param {HtmlEditor} this
+             * @param {Boolean} sourceEdit True if source edit, false if standard editing.
+             */
+            'editmodechange'
+        )
+    },
+
+    // private
+    createFontOptions : function(){
+        var buf = [], fs = this.fontFamilies, ff, lc;
+        for(var i = 0, len = fs.length; i< len; i++){
+            ff = fs[i];
+            lc = ff.toLowerCase();
+            buf.push(
+                '<option value="',lc,'" style="font-family:',ff,';"',
+                    (this.defaultFont == lc ? ' selected="true">' : '>'),
+                    ff,
+                '</option>'
+            );
+        }
+        return buf.join('');
+    },
+    
+    /*
+     * Protected method that will not generally be called directly. It
+     * is called when the editor creates its toolbar. Override this method if you need to
+     * add custom toolbar buttons.
+     * @param {HtmlEditor} editor
+     */
+    createToolbar : function(editor){
+        
+        var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
+        
+        function btn(id, toggle, handler){
+            return {
+                itemId : id,
+                cls : 'x-btn-icon',
+                iconCls: 'x-edit-'+id,
+                enableToggle:toggle !== false,
+                scope: editor,
+                handler:handler||editor.relayBtnCmd,
+                clickEvent:'mousedown',
+                tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
+                overflowText: editor.buttonTips[id].title || undefined,
+                tabIndex:-1
+            };
+        }
+
+        // build the toolbar
+        var tb = new Ext.Toolbar({
+            renderTo:this.wrap.dom.firstChild
+        });
+
+        // stop form submits
+        this.mon(tb.el, 'click', function(e){
+            e.preventDefault();
+        });
+
+        if(this.enableFont && !Ext.isSafari2){
+            this.fontSelect = tb.el.createChild({
+                tag:'select',
+                cls:'x-font-select',
+                html: this.createFontOptions()
+            });
+            this.mon(this.fontSelect, 'change', function(){
+                var font = this.fontSelect.dom.value;
+                this.relayCmd('fontname', font);
+                this.deferFocus();
+            }, this);
+
+            tb.add(
+                this.fontSelect.dom,
+                '-'
+            );
+        }
+
+        if(this.enableFormat){
+            tb.add(
+                btn('bold'),
+                btn('italic'),
+                btn('underline')
+            );
+        }
+
+        if(this.enableFontSize){
+            tb.add(
+                '-',
+                btn('increasefontsize', false, this.adjustFont),
+                btn('decreasefontsize', false, this.adjustFont)
+            );
+        }
+
+        if(this.enableColors){
+            tb.add(
+                '-', {
+                    itemId:'forecolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-forecolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        allowReselect: true,
+                        focus: Ext.emptyFn,
+                        value:'000000',
+                        plain:true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                this.deferFocus();
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }, {
+                    itemId:'backcolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-backcolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        focus: Ext.emptyFn,
+                        value:'FFFFFF',
+                        plain:true,
+                        allowReselect: true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                if(Ext.isGecko){
+                                    this.execCmd('useCSS', false);
+                                    this.execCmd('hilitecolor', color);
+                                    this.execCmd('useCSS', true);
+                                    this.deferFocus();
+                                }else{
+                                    this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                    this.deferFocus();
+                                }
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }
+            );
+        }
+
+        if(this.enableAlignments){
+            tb.add(
+                '-',
+                btn('justifyleft'),
+                btn('justifycenter'),
+                btn('justifyright')
+            );
+        }
+
+        if(!Ext.isSafari2){
+            if(this.enableLinks){
+                tb.add(
+                    '-',
+                    btn('createlink', false, this.createLink)
+                );
+            }
+
+            if(this.enableLists){
+                tb.add(
+                    '-',
+                    btn('insertorderedlist'),
+                    btn('insertunorderedlist')
+                );
+            }
+            if(this.enableSourceEdit){
+                tb.add(
+                    '-',
+                    btn('sourceedit', true, function(btn){
+                        this.toggleSourceEdit(!this.sourceEditMode);
+                    })
+                );
+            }
+        }
+
+        this.tb = tb;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. It
+     * is called when the editor initializes the iframe with HTML contents. Override this method if you
+     * want to change the initialization markup of the iframe (e.g. to add stylesheets).
+     */
+    getDocMarkup : function(){
+        return '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';
+    },
+
+    // private
+    getEditorBody : function(){
+        return this.doc.body || this.doc.documentElement;
+    },
+
+    // private
+    getDoc : function(){
+        return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document);
+    },
+
+    // private
+    getWin : function(){
+        return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name];
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
+        this.el.dom.style.border = '0 none';
+        this.el.dom.setAttribute('tabIndex', -1);
+        this.el.addClass('x-hidden');
+        if(Ext.isIE){ // fix IE 1px bogus margin
+            this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')
+        }
+        this.wrap = this.el.wrap({
+            cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'}
+        });
+
+        this.createToolbar(this);
+
+        this.disableItems(true);
+        // is this needed?
+        // this.tb.doLayout();
+
+        this.createIFrame();
+
+        if(!this.width){
+            var sz = this.el.getSize();
+            this.setSize(sz.width, this.height || sz.height);
+        }
+    },
+
+    createIFrame: function(){
+        var iframe = document.createElement('iframe');
+        iframe.name = Ext.id();
+        iframe.frameBorder = '0';
+        iframe.src = Ext.isIE ? Ext.SSL_SECURE_URL : "javascript:;";
+        this.wrap.dom.appendChild(iframe);
+
+        this.iframe = iframe;
+
+        this.monitorTask = Ext.TaskMgr.start({
+            run: this.checkDesignMode,
+            scope: this,
+            interval:100
+        });
+    },
+
+    initFrame : function(){
+        Ext.TaskMgr.stop(this.monitorTask);
+        this.doc = this.getDoc();
+        this.win = this.getWin();
+
+        this.doc.open();
+        this.doc.write(this.getDocMarkup());
+        this.doc.close();
+
+        var task = { // must defer to wait for browser to be ready
+            run : function(){
+                if(this.doc.body || this.doc.readyState == 'complete'){
+                    Ext.TaskMgr.stop(task);
+                    this.doc.designMode="on";
+                    this.initEditor.defer(10, this);
+                }
+            },
+            interval : 10,
+            duration:10000,
+            scope: this
+        };
+        Ext.TaskMgr.start(task);
+    },
+
+
+    checkDesignMode : function(){
+        if(this.wrap && this.wrap.dom.offsetWidth){
+            var doc = this.getDoc();
+            if(!doc){
+                return;
+            }
+            if(!doc.editorInitialized || String(doc.designMode).toLowerCase() != 'on'){
+                this.initFrame();
+            }
+        }
+    },
+    
+    disableItems: function(disabled){
+        if(this.fontSelect){
+            this.fontSelect.dom.disabled = disabled;
+        }
+        this.tb.items.each(function(item){
+            if(item.itemId != 'sourceedit'){
+                item.setDisabled(disabled);
+            }
+        });
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
+        if(this.el && this.iframe){
+            if(typeof w == 'number'){
+                var aw = w - this.wrap.getFrameWidth('lr');
+                this.el.setWidth(this.adjustWidth('textarea', aw));
+                this.tb.setWidth(aw);
+                this.iframe.style.width = Math.max(aw, 0) + 'px';
+            }
+            if(typeof h == 'number'){
+                var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight();
+                this.el.setHeight(this.adjustWidth('textarea', ah));
+                this.iframe.style.height = Math.max(ah, 0) + 'px';
+                if(this.doc){
+                    this.getEditorBody().style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px';
+                }
+            }
+        }
+    },
+
+    /**
+     * Toggles the editor between standard and source edit mode.
+     * @param {Boolean} sourceEdit (optional) True for source edit, false for standard
+     */
+    toggleSourceEdit : function(sourceEditMode){
+        if(sourceEditMode === undefined){
+            sourceEditMode = !this.sourceEditMode;
+        }
+        this.sourceEditMode = sourceEditMode === true;
+        var btn = this.tb.items.get('sourceedit');
+        if(btn.pressed !== this.sourceEditMode){
+            btn.toggle(this.sourceEditMode);
+            if(!btn.xtbHidden){
+                return;
+            }
+        }
+        if(this.sourceEditMode){
+            this.disableItems(true);
+            this.syncValue();
+            this.iframe.className = 'x-hidden';
+            this.el.removeClass('x-hidden');
+            this.el.dom.removeAttribute('tabIndex');
+            this.el.focus();
+        }else{
+            if(this.initialized){
+                this.disableItems(false);
+            }
+            this.pushValue();
+            this.iframe.className = '';
+            this.el.addClass('x-hidden');
+            this.el.dom.setAttribute('tabIndex', -1);
+            this.deferFocus();
+        }
+        var lastSize = this.lastSize;
+        if(lastSize){
+            delete this.lastSize;
+            this.setSize(lastSize);
+        }
+        this.fireEvent('editmodechange', this, this.sourceEditMode);
+    },
+
+    // private used internally
+    createLink : function(){
+        var url = prompt(this.createLinkText, this.defaultLinkValue);
+        if(url && url != 'http:/'+'/'){
+            this.relayCmd('createlink', url);
+        }
+    },
+
+    // private (for BoxComponent)
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private (for BoxComponent)
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private (for BoxComponent)
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // docs inherit from Field
+    setValue : function(v){
+        Ext.form.HtmlEditor.superclass.setValue.call(this, v);
+        this.pushValue();
+        return this;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. If you need/want
+     * custom HTML cleanup, this is the method you should override.
+     * @param {String} html The HTML to be cleaned
+     * @return {String} The cleaned HTML
+     */
+    cleanHtml : function(html){
+        html = String(html);
+        if(html.length > 5){
+            if(Ext.isWebKit){ // strip safari nonsense
+                html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
+            }
+        }
+        if(html == this.defaultValue){
+            html = '';
+        }
+        return html;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Syncs the contents
+     * of the editor iframe with the textarea.
+     */
+    syncValue : function(){
+        if(this.initialized){
+            var bd = this.getEditorBody();
+            var html = bd.innerHTML;
+            if(Ext.isWebKit){
+                var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
+                var m = bs.match(/text-align:(.*?);/i);
+                if(m && m[1]){
+                    html = '<div style="'+m[0]+'">' + html + '</div>';
+                }
+            }
+            html = this.cleanHtml(html);
+            if(this.fireEvent('beforesync', this, html) !== false){
+                this.el.dom.value = html;
+                this.fireEvent('sync', this, html);
+            }
+        }
+    },
+    
+    //docs inherit from Field
+    getValue : function() {
+        this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
+        return Ext.form.HtmlEditor.superclass.getValue.call(this);
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Pushes the value of the textarea
+     * into the iframe editor.
+     */
+    pushValue : function(){
+        if(this.initialized){
+            var v = this.el.dom.value;
+            if(!this.activated && v.length < 1){
+                v = this.defaultValue;
+            }
+            if(this.fireEvent('beforepush', this, v) !== false){
+                this.getEditorBody().innerHTML = v;
+                if(Ext.isGecko){
+                    // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
+                    var d = this.doc,
+                        mode = d.designMode.toLowerCase();
+                    
+                    d.designMode = mode.toggle('on', 'off');
+                    d.designMode = mode;
+                }
+                this.fireEvent('push', this, v);
+            }
+        }
+    },
+
+    // private
+    deferFocus : function(){
+        this.focus.defer(10, this);
+    },
+
+    // docs inherit from Field
+    focus : function(){
+        if(this.win && !this.sourceEditMode){
+            this.win.focus();
+        }else{
+            this.el.focus();
+        }
+    },
+
+    // private
+    initEditor : function(){
+        //Destroying the component during/before initEditor can cause issues.
+        try{
+            var dbody = this.getEditorBody();
+            var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat');
+            ss['background-attachment'] = 'fixed'; // w3c
+            dbody.bgProperties = 'fixed'; // ie
+
+            Ext.DomHelper.applyStyles(dbody, ss);
+
+            if(this.doc){
+                try{
+                    Ext.EventManager.removeAll(this.doc);
+                }catch(e){}
+            }
+
+            this.doc = this.getDoc();
+
+            Ext.EventManager.on(this.doc, {
+                'mousedown': this.onEditorEvent,
+                'dblclick': this.onEditorEvent,
+                'click': this.onEditorEvent,
+                'keyup': this.onEditorEvent,
+                buffer:100,
+                scope: this
+            });
+
+            if(Ext.isGecko){
+                Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this);
+            }
+            if(Ext.isIE || Ext.isWebKit || Ext.isOpera){
+                Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this);
+            }
+            this.initialized = true;
+            this.fireEvent('initialize', this);
+            this.doc.editorInitialized = true;
+            this.pushValue();
+        }catch(e){}
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.monitorTask){
+            Ext.TaskMgr.stop(this.monitorTask);
+        }
+        if(this.rendered){
+            Ext.destroy(this.tb);
+            if(this.wrap){
+                this.wrap.dom.innerHTML = '';
+                this.wrap.remove();
+            }
+        }
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+ 
+        if(this.doc){
+            try{
+                Ext.EventManager.removeAll(this.doc);
+                for (var prop in this.doc){
+                   delete this.doc[prop];
+                }
+            }catch(e){}
+        }
+        this.purgeListeners();
+    },
+
+    // private
+    onFirstFocus : function(){
+        this.activated = true;
+        this.disableItems(false);
+        if(Ext.isGecko){ // prevent silly gecko errors
+            this.win.focus();
+            var s = this.win.getSelection();
+            if(!s.focusNode || s.focusNode.nodeType != 3){
+                var r = s.getRangeAt(0);
+                r.selectNodeContents(this.getEditorBody());
+                r.collapse(true);
+                this.deferFocus();
+            }
+            try{
+                this.execCmd('useCSS', true);
+                this.execCmd('styleWithCSS', false);
+            }catch(e){}
+        }
+        this.fireEvent('activate', this);
+    },
+
+    // private
+    adjustFont: function(btn){
+        var adjust = btn.itemId == 'increasefontsize' ? 1 : -1;
+
+        var v = parseInt(this.doc.queryCommandValue('FontSize') || 2, 10);
+        if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
+            // Safari 3 values
+            // 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
+            if(v <= 10){
+                v = 1 + adjust;
+            }else if(v <= 13){
+                v = 2 + adjust;
+            }else if(v <= 16){
+                v = 3 + adjust;
+            }else if(v <= 18){
+                v = 4 + adjust;
+            }else if(v <= 24){
+                v = 5 + adjust;
+            }else {
+                v = 6 + adjust;
+            }
+            v = v.constrain(1, 6);
+        }else{
+            if(Ext.isSafari){ // safari
+                adjust *= 2;
+            }
+            v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
+        }
+        this.execCmd('FontSize', v);
+    },
+
+    // private
+    onEditorEvent : function(e){
+        this.updateToolbar();
+    },
+
+
+    /**
+     * Protected method that will not generally be called directly. It triggers
+     * a toolbar update by reading the markup state of the current selection in the editor.
+     */
+    updateToolbar: function(){
+
+        if(!this.activated){
+            this.onFirstFocus();
+            return;
+        }
+
+        var btns = this.tb.items.map, doc = this.doc;
+
+        if(this.enableFont && !Ext.isSafari2){
+            var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
+            if(name != this.fontSelect.dom.value){
+                this.fontSelect.dom.value = name;
+            }
+        }
+        if(this.enableFormat){
+            btns.bold.toggle(doc.queryCommandState('bold'));
+            btns.italic.toggle(doc.queryCommandState('italic'));
+            btns.underline.toggle(doc.queryCommandState('underline'));
+        }
+        if(this.enableAlignments){
+            btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
+            btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
+            btns.justifyright.toggle(doc.queryCommandState('justifyright'));
+        }
+        if(!Ext.isSafari2 && this.enableLists){
+            btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
+            btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
+        }
+        
+        Ext.menu.MenuMgr.hideAll();
+
+        this.syncValue();
+    },
+
+    // private
+    relayBtnCmd : function(btn){
+        this.relayCmd(btn.itemId);
+    },
+
+    /**
+     * Executes a Midas editor command on the editor document and performs necessary focus and
+     * toolbar updates. <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    relayCmd : function(cmd, value){
+        (function(){
+            this.focus();
+            this.execCmd(cmd, value);
+            this.updateToolbar();
+        }).defer(10, this);
+    },
+
+    /**
+     * Executes a Midas editor command directly on the editor document.
+     * For visual commands, you should use {@link #relayCmd} instead.
+     * <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    execCmd : function(cmd, value){
+        this.doc.execCommand(cmd, false, value === undefined ? null : value);
+        this.syncValue();
+    },
+
+    // private
+    applyCommand : function(e){
+        if(e.ctrlKey){
+            var c = e.getCharCode(), cmd;
+            if(c > 0){
+                c = String.fromCharCode(c);
+                switch(c){
+                    case 'b':
+                        cmd = 'bold';
+                    break;
+                    case 'i':
+                        cmd = 'italic';
+                    break;
+                    case 'u':
+                        cmd = 'underline';
+                    break;
+                }
+                if(cmd){
+                    this.win.focus();
+                    this.execCmd(cmd);
+                    this.deferFocus();
+                    e.preventDefault();
+                }
+            }
+        }
+    },
+
+    /**
+     * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
+     * to insert text.
+     * @param {String} text
+     */
+    insertAtCursor : function(text){
+        if(!this.activated){
+            return;
+        }
+        if(Ext.isIE){
+            this.win.focus();
+            var r = this.doc.selection.createRange();
+            if(r){
+                r.collapse(true);
+                r.pasteHTML(text);
+                this.syncValue();
+                this.deferFocus();
+            }
+        }else if(Ext.isGecko || Ext.isOpera){
+            this.win.focus();
+            this.execCmd('InsertHTML', text);
+            this.deferFocus();
+        }else if(Ext.isWebKit){
+            this.execCmd('InsertText', text);
+            this.deferFocus();
+        }
+    },
+
+    // private
+    fixKeys : function(){ // load time branching for fastest keydown performance
+        if(Ext.isIE){
+            return function(e){
+                var k = e.getKey(), r;
+                if(k == e.TAB){
+                    e.stopEvent();
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        r.collapse(true);
+                        r.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
+                        this.deferFocus();
+                    }
+                }else if(k == e.ENTER){
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        var target = r.parentElement();
+                        if(!target || target.tagName.toLowerCase() != 'li'){
+                            e.stopEvent();
+                            r.pasteHTML('<br />');
+                            r.collapse(false);
+                            r.select();
+                        }
+                    }
+                }
+            };
+        }else if(Ext.isOpera){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.win.focus();
+                    this.execCmd('InsertHTML','&nbsp;&nbsp;&nbsp;&nbsp;');
+                    this.deferFocus();
+                }
+            };
+        }else if(Ext.isWebKit){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.execCmd('InsertText','\t');
+                    this.deferFocus();
+                }
+             };
+        }
+    }(),
+
+    /**
+     * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>
+     * @return {Ext.Toolbar}
+     */
+    getToolbar : function(){
+        return this.tb;
+    },
+
+    /**
+     * Object collection of toolbar tooltips for the buttons in the editor. The key
+     * is the command id associated with that button and the value is a valid QuickTips object.
+     * For example:
+<pre><code>
+{
+    bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+    },
+    italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+    },
+    ...
+</code></pre>
+    * @type Object
+     */
+    buttonTips : {
+        bold : {
+            title: 'Bold (Ctrl+B)',
+            text: 'Make the selected text bold.',
+            cls: 'x-html-editor-tip'
+        },
+        italic : {
+            title: 'Italic (Ctrl+I)',
+            text: 'Make the selected text italic.',
+            cls: 'x-html-editor-tip'
+        },
+        underline : {
+            title: 'Underline (Ctrl+U)',
+            text: 'Underline the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        increasefontsize : {
+            title: 'Grow Text',
+            text: 'Increase the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        decreasefontsize : {
+            title: 'Shrink Text',
+            text: 'Decrease the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        backcolor : {
+            title: 'Text Highlight Color',
+            text: 'Change the background color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        forecolor : {
+            title: 'Font Color',
+            text: 'Change the color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyleft : {
+            title: 'Align Text Left',
+            text: 'Align text to the left.',
+            cls: 'x-html-editor-tip'
+        },
+        justifycenter : {
+            title: 'Center Text',
+            text: 'Center text in the editor.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyright : {
+            title: 'Align Text Right',
+            text: 'Align text to the right.',
+            cls: 'x-html-editor-tip'
+        },
+        insertunorderedlist : {
+            title: 'Bullet List',
+            text: 'Start a bulleted list.',
+            cls: 'x-html-editor-tip'
+        },
+        insertorderedlist : {
+            title: 'Numbered List',
+            text: 'Start a numbered list.',
+            cls: 'x-html-editor-tip'
+        },
+        createlink : {
+            title: 'Hyperlink',
+            text: 'Make the selected text a hyperlink.',
+            cls: 'x-html-editor-tip'
+        },
+        sourceedit : {
+            title: 'Source Edit',
+            text: 'Switch to source editing mode.',
+            cls: 'x-html-editor-tip'
+        }
+    }
+
+    // hide stuff that is not compatible
+    /**
+     * @event blur
+     * @hide
+     */
+    /**
+     * @event change
+     * @hide
+     */
+    /**
+     * @event focus
+     * @hide
+     */
+    /**
+     * @event specialkey
+     * @hide
+     */
+    /**
+     * @cfg {String} fieldClass @hide
+     */
+    /**
+     * @cfg {String} focusClass @hide
+     */
+    /**
+     * @cfg {String} autoCreate @hide
+     */
+    /**
+     * @cfg {String} inputType @hide
+     */
+    /**
+     * @cfg {String} invalidClass @hide
+     */
+    /**
+     * @cfg {String} invalidText @hide
+     */
+    /**
+     * @cfg {String} msgFx @hide
+     */
+    /**
+     * @cfg {String} validateOnBlur @hide
+     */
+    /**
+     * @cfg {Boolean} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} applyTo @hide
+     */
+    /**
+     * @cfg {String} autoHeight  @hide
+     */
+    /**
+     * @cfg {String} autoWidth  @hide
+     */
+    /**
+     * @cfg {String} cls  @hide
+     */
+    /**
+     * @cfg {String} disabled  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} msgTarget  @hide
+     */
+    /**
+     * @cfg {String} readOnly  @hide
+     */
+    /**
+     * @cfg {String} style  @hide
+     */
+    /**
+     * @cfg {String} validationDelay  @hide
+     */
+    /**
+     * @cfg {String} validationEvent  @hide
+     */
+    /**
+     * @cfg {String} tabIndex  @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method validate
+     * @hide
+     */
+    /**
+     * @event valid
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+    /**
+     * @cfg keys
+     * @hide
+     */
+});
+Ext.reg('htmleditor', Ext.form.HtmlEditor);/**
+ * @class Ext.form.TimeField
+ * @extends Ext.form.ComboBox
+ * Provides a time input field with a time dropdown and automatic time validation.  Example usage:
+ * <pre><code>
+new Ext.form.TimeField({
+    minValue: '9:00 AM',
+    maxValue: '6:00 PM',
+    increment: 30
+});
+</code></pre>
+ * @constructor
+ * Create a new TimeField
+ * @param {Object} config
+ * @xtype timefield
+ */
+Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    minValue : null,
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    maxValue : null,
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before minValue (defaults to
+     * 'The time in this field must be equal to or after {0}').
+     */
+    minText : "The time in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the time is after maxValue (defaults to
+     * 'The time in this field must be equal to or before {0}').
+     */
+    maxText : "The time in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the time in the field is invalid (defaults to
+     * '{value} is not a valid time').
+     */
+    invalidText : "{0} is not a valid time",
+    /**
+     * @cfg {String} format
+     * The default time format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to 'g:i A', e.g., '3:15 PM').  For 24-hour time
+     * format try 'H:i' instead.
+     */
+    format : "g:i A",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
+     * format (defaults to 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H').
+     */
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",
+    /**
+     * @cfg {Number} increment
+     * The number of minutes between each time value in the list (defaults to 15).
+     */
+    increment: 15,
+
+    // private override
+    mode: 'local',
+    // private override
+    triggerAction: 'all',
+    // private override
+    typeAhead: false,
+    
+    // private - This is the date to use when generating time values in the absence of either minValue
+    // or maxValue.  Using the current date causes DST issues on DST boundary dates, so this is an 
+    // arbitrary "safe" date that can be any date aside from DST boundary dates.
+    initDate: '1/1/2008',
+
+    // private
+    initComponent : function(){
+        if(typeof this.minValue == "string"){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(typeof this.maxValue == "string"){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+
+        if(!this.store){
+            var min = this.parseDate(this.minValue) || new Date(this.initDate).clearTime();
+            var max = this.parseDate(this.maxValue) || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1);
+            var times = [];
+            while(min <= max){
+                times.push(min.dateFormat(this.format));
+                min = min.add('mi', this.increment);
+            }
+            this.store = times;
+        }
+        Ext.form.TimeField.superclass.initComponent.call(this);
+    },
+
+    // inherited docs
+    getValue : function(){
+        var v = Ext.form.TimeField.superclass.getValue.call(this);
+        return this.formatDate(this.parseDate(v)) || '';
+    },
+
+    // inherited docs
+    setValue : function(value){
+        return Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value)));
+    },
+
+    // private overrides
+    validateValue : Ext.form.DateField.prototype.validateValue,
+    parseDate : Ext.form.DateField.prototype.parseDate,
+    formatDate : Ext.form.DateField.prototype.formatDate,
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v.dateFormat(this.format));
+        }
+        Ext.form.TimeField.superclass.beforeBlur.call(this);
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('timefield', Ext.form.TimeField);/**
+ * @class Ext.form.Label
+ * @extends Ext.BoxComponent
+ * Basic Label field.
+ * @constructor
+ * Creates a new Label
+ * @param {Ext.Element/String/Object} config The configuration options.  If an element is passed, it is set as the internal
+ * element and its id used as the component id.  If a string is passed, it is assumed to be the id of an existing element
+ * and is used as the component id.  Otherwise, it is assumed to be a standard config object and is applied to the component.
+ * @xtype label
+ */
+Ext.form.Label = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} text The plain text to display within the label (defaults to ''). If you need to include HTML
+     * tags within the label's innerHTML, use the {@link #html} config instead.
+     */
+    /**
+     * @cfg {String} forId The id of the input element to which this label will be bound via the standard HTML 'for'
+     * attribute. If not specified, the attribute will not be added to the label.
+     */
+    /**
+     * @cfg {String} html An HTML fragment that will be used as the label's innerHTML (defaults to '').
+     * Note that if {@link #text} is specified it will take precedence and this value will be ignored.
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('label');
+            this.el.id = this.getId();
+            this.el.innerHTML = this.text ? Ext.util.Format.htmlEncode(this.text) : (this.html || '');
+            if(this.forId){
+                this.el.setAttribute('for', this.forId);
+            }
+        }
+        Ext.form.Label.superclass.onRender.call(this, ct, position);
+    },
+
+    /**
+     * Updates the label's innerHTML with the specified string.
+     * @param {String} text The new label text
+     * @param {Boolean} encode (optional) False to skip HTML-encoding the text when rendering it
+     * to the label (defaults to true which encodes the value). This might be useful if you want to include
+     * tags in the label's innerHTML rather than rendering them as string literals per the default logic.
+     * @return {Label} this
+     */
+    setText : function(t, encode){
+        var e = encode === false;
+        this[!e ? 'text' : 'html'] = t;
+        delete this[e ? 'text' : 'html'];
+        if(this.rendered){
+            this.el.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t;
+        }
+        return this;
+    }
+});
+
+Ext.reg('label', Ext.form.Label);/**
+ * @class Ext.form.Action
+ * <p>The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * the Form needs to perform an action such as submit or load. The Configuration options
+ * listed for this class are set through the Form's action methods: {@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}</p>
+ * <p>The instance of Action which performed the action is passed to the success
+ * and failure callbacks of the Form's action methods ({@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}),
+ * and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and
+ * {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers.</p>
+ */
+Ext.form.Action = function(form, options){
+    this.form = form;
+    this.options = options || {};
+};
+
+/**
+ * Failure type returned when client side validation of the Form fails
+ * thus aborting a submit action. Client side validation is performed unless
+ * {@link #clientValidation} is explicitly set to <tt>false</tt>.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CLIENT_INVALID = 'client';
+/**
+ * <p>Failure type returned when server side processing fails and the {@link #result}'s
+ * <tt style="font-weight:bold">success</tt> property is set to <tt>false</tt>.</p>
+ * <p>In the case of a form submission, field-specific error messages may be returned in the
+ * {@link #result}'s <tt style="font-weight:bold">errors</tt> property.</p>
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.SERVER_INVALID = 'server';
+/**
+ * Failure type returned when a communication error happens when attempting
+ * to send a request to the remote server. The {@link #response} may be examined to
+ * provide further information.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CONNECT_FAILURE = 'connect';
+/**
+ * Failure type returned when the response's <tt style="font-weight:bold">success</tt>
+ * property is set to <tt>false</tt>, or no field values are returned in the response's
+ * <tt style="font-weight:bold">data</tt> property.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.LOAD_FAILURE = 'load';
+
+Ext.form.Action.prototype = {
+/**
+ * @cfg {String} url The URL that the Action is to invoke.
+ */
+/**
+ * @cfg {Boolean} reset When set to <tt><b>true</b></tt>, causes the Form to be
+ * {@link Ext.form.BasicForm.reset reset} on Action success. If specified, this happens
+ * <b>before</b> the {@link #success} callback is called and before the Form's
+ * {@link Ext.form.BasicForm.actioncomplete actioncomplete} event fires.
+ */
+/**
+ * @cfg {String} method The HTTP method to use to access the requested URL. Defaults to the
+ * {@link Ext.form.BasicForm}'s method, or if that is not specified, the underlying DOM form's method.
+ */
+/**
+ * @cfg {Mixed} params <p>Extra parameter values to pass. These are added to the Form's
+ * {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form's
+ * input fields.</p>
+ * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+ */
+/**
+ * @cfg {Number} timeout The number of seconds to wait for a server response before
+ * failing with the {@link #failureType} as {@link #Action.CONNECT_FAILURE}. If not specified,
+ * defaults to the configured <tt>{@link Ext.form.BasicForm#timeout timeout}</tt> of the
+ * {@link Ext.form.BasicForm form}.
+ */
+/**
+ * @cfg {Function} success The function to call when a valid success return packet is recieved.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Function} failure The function to call when a failure packet was recieved, or when an
+ * error ocurred in the Ajax communication.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax
+ * error ocurred, the failure type will be in {@link #failureType}. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Object} scope The scope in which to call the callback functions (The <tt>this</tt> reference
+ * for the callback functions).
+ */
+/**
+ * @cfg {String} waitMsg The message to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+/**
+ * @cfg {String} waitTitle The title to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+
+/**
+ * The type of action this Action instance performs.
+ * Currently only "submit" and "load" are supported.
+ * @type {String}
+ */
+    type : 'default',
+/**
+ * The type of failure detected will be one of these: {@link #CLIENT_INVALID},
+ * {@link #SERVER_INVALID}, {@link #CONNECT_FAILURE}, or {@link #LOAD_FAILURE}.  Usage:
+ * <pre><code>
+var fp = new Ext.form.FormPanel({
+...
+buttons: [{
+    text: 'Save',
+    formBind: true,
+    handler: function(){
+        if(fp.getForm().isValid()){
+            fp.getForm().submit({
+                url: 'form-submit.php',
+                waitMsg: 'Submitting your data...',
+                success: function(form, action){
+                    // server responded with success = true
+                    var result = action.{@link #result};
+                },
+                failure: function(form, action){
+                    if (action.{@link #failureType} === Ext.form.Action.{@link #CONNECT_FAILURE}) {
+                        Ext.Msg.alert('Error',
+                            'Status:'+action.{@link #response}.status+': '+
+                            action.{@link #response}.statusText);
+                    }
+                    if (action.failureType === Ext.form.Action.{@link #SERVER_INVALID}){
+                        // server responded with success = false
+                        Ext.Msg.alert('Invalid', action.{@link #result}.errormsg);
+                    }
+                }
+            });
+        }
+    }
+},{
+    text: 'Reset',
+    handler: function(){
+        fp.getForm().reset();
+    }
+}]
+ * </code></pre>
+ * @property failureType
+ * @type {String}
+ */
+ /**
+ * The XMLHttpRequest object used to perform the action.
+ * @property response
+ * @type {Object}
+ */
+ /**
+ * The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
+ * other, action-specific properties.
+ * @property result
+ * @type {Object}
+ */
+
+    // interface method
+    run : function(options){
+
+    },
+
+    // interface method
+    success : function(response){
+
+    },
+
+    // interface method
+    handleResponse : function(response){
+
+    },
+
+    // default connection failure
+    failure : function(response){
+        this.response = response;
+        this.failureType = Ext.form.Action.CONNECT_FAILURE;
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    // shared code among all Actions to validate that there was a response
+    // with either responseText or responseXml
+    processResponse : function(response){
+        this.response = response;
+        if(!response.responseText && !response.responseXML){
+            return true;
+        }
+        this.result = this.handleResponse(response);
+        return this.result;
+    },
+
+    // utility functions used internally
+    getUrl : function(appendParams){
+        var url = this.options.url || this.form.url || this.form.el.dom.action;
+        if(appendParams){
+            var p = this.getParams();
+            if(p){
+                url = Ext.urlAppend(url, p);
+            }
+        }
+        return url;
+    },
+
+    // private
+    getMethod : function(){
+        return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase();
+    },
+
+    // private
+    getParams : function(){
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        if(p){
+            if(typeof p == "object"){
+                p = Ext.urlEncode(Ext.applyIf(p, bp));
+            }else if(typeof p == 'string' && bp){
+                p += '&' + Ext.urlEncode(bp);
+            }
+        }else if(bp){
+            p = Ext.urlEncode(bp);
+        }
+        return p;
+    },
+
+    // private
+    createCallback : function(opts){
+        var opts = opts || {};
+        return {
+            success: this.success,
+            failure: this.failure,
+            scope: this,
+            timeout: (opts.timeout*1000) || (this.form.timeout*1000),
+            upload: this.form.fileUpload ? this.success : undefined
+        };
+    }
+};
+
+/**
+ * @class Ext.form.Action.Submit
+ * @extends Ext.form.Action
+ * <p>A class which handles submission of data from {@link Ext.form.BasicForm Form}s
+ * and processes the returned response.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#submit submit}ting.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet may contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean
+ * <div class="sub-desc">The <code>success</code> property is required.</div></li>
+ * <li><b><code>errors</code></b> property : Object
+ * <div class="sub-desc"><div class="sub-desc">The <code>errors</code> property,
+ * which is optional, contains error messages for invalid fields.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so a typical response
+ * packet may look like this:</p><pre><code>
+{
+    success: false,
+    errors: {
+        clientCode: "Client not found",
+        portOfLoading: "This field must not be null"
+    }
+}</code></pre>
+ * <p>Other data may be placed into the response for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ * <p>Alternatively, if an {@link #errorReader} is specified as an {@link Ext.data.XmlReader XmlReader}:</p><pre><code>
+    errorReader: new Ext.data.XmlReader({
+            record : 'field',
+            success: '@success'
+        }, [
+            'id', 'msg'
+        ]
+    )
+</code></pre>
+ * <p>then the results may be sent back in XML format:</p><pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;message success="false"&gt;
+&lt;errors&gt;
+    &lt;field&gt;
+        &lt;id&gt;clientCode&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Code not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+    &lt;field&gt;
+        &lt;id&gt;portOfLoading&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Port not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+&lt;/errors&gt;
+&lt;/message&gt;
+</code></pre>
+ * <p>Other elements may be placed into the response XML for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The XML document is available in the {@link #errorReader}'s {@link Ext.data.XmlReader#xmlData xmlData} property.</p>
+ */
+Ext.form.Action.Submit = function(form, options){
+    Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
+};
+
+Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
+    /**
+     * @cfg {Ext.data.DataReader} errorReader <p><b>Optional. JSON is interpreted with
+     * no need for an errorReader.</b></p>
+     * <p>A Reader which reads a single record from the returned data. The DataReader's
+     * <b>success</b> property specifies how submission success is determined. The Record's
+     * data provides the error messages to apply to any invalid form Fields.</p>
+     */
+    /**
+     * @cfg {boolean} clientValidation Determines whether a Form's fields are validated
+     * in a final call to {@link Ext.form.BasicForm#isValid isValid} prior to submission.
+     * Pass <tt>false</tt> in the Form's submit options to prevent this. If not defined, pre-submission field validation
+     * is performed.
+     */
+    type : 'submit',
+
+    // private
+    run : function(){
+        var o = this.options;
+        var method = this.getMethod();
+        var isGet = method == 'GET';
+        if(o.clientValidation === false || this.form.isValid()){
+            Ext.Ajax.request(Ext.apply(this.createCallback(o), {
+                form:this.form.el.dom,
+                url:this.getUrl(isGet),
+                method: method,
+                headers: o.headers,
+                params:!isGet ? this.getParams() : null,
+                isUpload: this.form.fileUpload
+            }));
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || result.success){
+            this.form.afterAction(this, true);
+            return;
+        }
+        if(result.errors){
+            this.form.markInvalid(result.errors);
+            this.failureType = Ext.form.Action.SERVER_INVALID;
+        }
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.errorReader){
+            var rs = this.form.errorReader.read(response);
+            var errors = [];
+            if(rs.records){
+                for(var i = 0, len = rs.records.length; i < len; i++) {
+                    var r = rs.records[i];
+                    errors[i] = r.data;
+                }
+            }
+            if(errors.length < 1){
+                errors = null;
+            }
+            return {
+                success : rs.success,
+                errors : errors
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+/**
+ * @class Ext.form.Action.Load
+ * @extends Ext.form.Action
+ * <p>A class which handles loading of data from a server into the Fields of an {@link Ext.form.BasicForm}.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#load load}ing.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet <b>must</b> contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean</li>
+ * <li><b><code>data</code></b> property : Object</li>
+ * <div class="sub-desc">The <code>data</code> property contains the values of Fields to load.
+ * The individual value object for each Field is passed to the Field's
+ * {@link Ext.form.Field#setValue setValue} method.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so for the following form load call:<pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    title: 'Client and routing info',
+    items: [{
+        fieldLabel: 'Client',
+        name: 'clientName'
+    }, {
+        fieldLabel: 'Port of loading',
+        name: 'portOfLoading'
+    }, {
+        fieldLabel: 'Port of discharge',
+        name: 'portOfDischarge'
+    }]
+});
+myFormPanel.{@link Ext.form.FormPanel#getForm getForm}().{@link Ext.form.BasicForm#load load}({
+    url: '/getRoutingInfo.php',
+    params: {
+        consignmentRef: myConsignmentRef
+    },
+    failure: function(form, action() {
+        Ext.Msg.alert("Load failed", action.result.errorMessage);
+    }
+});
+</code></pre>
+ * a <b>success response</b> packet may look like this:</p><pre><code>
+{
+    success: true,
+    data: {
+        clientName: "Fred. Olsen Lines",
+        portOfLoading: "FXT",
+        portOfDischarge: "OSL"
+    }
+}</code></pre>
+ * while a <b>failure response</b> packet may look like this:</p><pre><code>
+{
+    success: false,
+    errorMessage: "Consignment reference not found"
+}</code></pre>
+ * <p>Other data may be placed into the response for processing the {@link Ext.form.BasicForm Form}'s
+ * callback or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ */
+Ext.form.Action.Load = function(form, options){
+    Ext.form.Action.Load.superclass.constructor.call(this, form, options);
+    this.reader = this.form.reader;
+};
+
+Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
+    // private
+    type : 'load',
+
+    // private
+    run : function(){
+        Ext.Ajax.request(Ext.apply(
+                this.createCallback(this.options), {
+                    method:this.getMethod(),
+                    url:this.getUrl(false),
+                    headers: this.options.headers,
+                    params:this.getParams()
+        }));
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || !result.success || !result.data){
+            this.failureType = Ext.form.Action.LOAD_FAILURE;
+            this.form.afterAction(this, false);
+            return;
+        }
+        this.form.clearInvalid();
+        this.form.setValues(result.data);
+        this.form.afterAction(this, true);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.reader){
+            var rs = this.form.reader.read(response);
+            var data = rs.records && rs.records[0] ? rs.records[0].data : null;
+            return {
+                success : rs.success,
+                data : data
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+
+/**
+ * @class Ext.form.Action.DirectLoad
+ * @extends Ext.form.Action.Load
+ * Provides Ext.direct support for loading form data. This example illustrates usage
+ * of Ext.Direct to load a submit a form through Ext.Direct.
+ * <pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    // configs for FormPanel
+    title: 'Basic Information',
+    border: false,
+    padding: 10,
+    buttons:[{
+        text: 'Submit',
+        handler: function(){
+            basicInfo.getForm().submit({
+                params: {
+                    uid: 5
+                }
+            });
+        }
+    }],
+    
+    // configs apply to child items
+    defaults: {anchor: '100%'},
+    defaultType: 'textfield',
+    items: [
+        // form fields go here
+    ],
+    
+    // configs for BasicForm
+    api: {
+        load: Profile.getBasicInfo,
+        // The server-side must mark the submit handler as a 'formHandler'
+        submit: Profile.updateBasicInfo
+    },    
+    paramOrder: ['uid']
+});
+
+// load the form
+myFormPanel.getForm().load({
+    params: {
+        uid: 5
+    }
+});
+ * </code></pre>
+ */
+Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, {
+    constructor: function(form, opts) {        
+        Ext.form.Action.DirectLoad.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directload',
+    
+    run : function(){
+        var args = this.getParams();
+        args.push(this.success, this);                
+        this.form.api.load.apply(window, args);
+    },
+    
+    getParams: function() {
+        var buf = [], o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        var paramOrder = this.form.paramOrder;
+        if(paramOrder){
+            for(var i = 0, len = paramOrder.length; i < len; i++){
+                buf.push(o[paramOrder[i]]);
+            }
+        }else if(this.form.paramsAsHash){
+            buf.push(o);
+        }
+        return buf;
+    },
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+/**
+ * @class Ext.form.Action.DirectSubmit
+ * @extends Ext.form.Action.Submit
+ * Provides Ext.direct support for submitting form data.
+ * See {@link Ext.form.Action.DirectLoad}.
+ */
+Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, {
+    constructor: function(form, opts) {
+        Ext.form.Action.DirectSubmit.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directsubmit',
+    // override of Submit
+    run : function(){
+        var o = this.options;
+        if(o.clientValidation === false || this.form.isValid()){
+            // tag on any additional params to be posted in the
+            // form scope
+            this.success.params = this.getParams();
+            this.form.api.submit(this.form.el.dom, this.success, this);
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+    
+    getParams: function() {
+        var o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        return o;
+    },    
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+
+Ext.form.Action.ACTION_TYPES = {
+    'load' : Ext.form.Action.Load,
+    'submit' : Ext.form.Action.Submit,
+    'directload': Ext.form.Action.DirectLoad,
+    'directsubmit': Ext.form.Action.DirectSubmit
+};
+/**
+ * @class Ext.form.VTypes
+ * <p>This is a singleton object which contains a set of commonly used field validation functions.
+ * The validations provided are basic and intended to be easily customizable and extended.</p>
+ * <p>To add custom VTypes specify the <code>{@link Ext.form.TextField#vtype vtype}</code> validation
+ * test function, and optionally specify any corresponding error text to display and any keystroke
+ * filtering mask to apply. For example:</p>
+ * <pre><code>
+// custom Vtype for vtype:'time'
+var timeTest = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
+Ext.apply(Ext.form.VTypes, {
+    //  vtype validation function
+    time: function(val, field) {
+        return timeTest.test(val);
+    },
+    // vtype Text property: The error text to display when the validation function returns false
+    timeText: 'Not a valid time.  Must be in the format "12:34 PM".',
+    // vtype Mask property: The keystroke filter mask
+    timeMask: /[\d\s:amp]/i
+});
+ * </code></pre>
+ * Another example: 
+ * <pre><code>
+// custom Vtype for vtype:'IPAddress'
+Ext.apply(Ext.form.VTypes, {
+    IPAddress:  function(v) {
+        return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
+    },
+    IPAddressText: 'Must be a numeric IP address',
+    IPAddressMask: /[\d\.]/i
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.form.VTypes = function(){
+    // closure these in so they are only created once.
+    var alpha = /^[a-zA-Z_]+$/;
+    var alphanum = /^[a-zA-Z0-9_]+$/;
+    var email = /^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;
+    var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+
+    // All these messages and functions are configurable
+    return {
+        /**
+         * The function used to validate email addresses.  Note that this is a very basic validation -- complete
+         * validation per the email RFC specifications is very complex and beyond the scope of this class, although
+         * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
+         * section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> 
+         * for additional information.  This implementation is intended to validate the following emails:<tt>
+         * 'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'
+         * </tt>.
+         * @param {String} value The email address
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'email' : function(v){
+            return email.test(v);
+        },
+        /**
+         * The error text to display when the email validation function returns false.  Defaults to:
+         * <tt>'This field should be an e-mail address in the format "user@example.com"'</tt>
+         * @type String
+         */
+        'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
+        /**
+         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for 
+         * information about more complex email validation. Defaults to:
+         * <tt>/[a-z0-9_\.\-@]/i</tt>
+         * @type RegExp
+         */
+        'emailMask' : /[a-z0-9_\.\-@]/i,
+
+        /**
+         * The function used to validate URLs
+         * @param {String} value The URL
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'url' : function(v){
+            return url.test(v);
+        },
+        /**
+         * The error text to display when the url validation function returns false.  Defaults to:
+         * <tt>'This field should be a URL in the format "http:/'+'/www.example.com"'</tt>
+         * @type String
+         */
+        'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+        
+        /**
+         * The function used to validate alpha values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alpha' : function(v){
+            return alpha.test(v);
+        },
+        /**
+         * The error text to display when the alpha validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters and _'</tt>
+         * @type String
+         */
+        'alphaText' : 'This field should only contain letters and _',
+        /**
+         * The keystroke filter mask to be applied on alpha input.  Defaults to:
+         * <tt>/[a-z_]/i</tt>
+         * @type RegExp
+         */
+        'alphaMask' : /[a-z_]/i,
+
+        /**
+         * The function used to validate alphanumeric values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alphanum' : function(v){
+            return alphanum.test(v);
+        },
+        /**
+         * The error text to display when the alphanumeric validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters, numbers and _'</tt>
+         * @type String
+         */
+        'alphanumText' : 'This field should only contain letters, numbers and _',
+        /**
+         * The keystroke filter mask to be applied on alphanumeric input.  Defaults to:
+         * <tt>/[a-z0-9_]/i</tt>
+         * @type RegExp
+         */
+        'alphanumMask' : /[a-z0-9_]/i
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-forms.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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.name||this.id||""},onRender:function(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.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}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])},getItemCt:function(){return this.el.up(".x-form-item",4)},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){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.mon(this.el,Ext.EventManager.useKeydown?"keydown":"keypress",this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);var a=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.mon(this.el,"blur",this.onBlur,this,a)},onFocus:function(){if(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(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}c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}this.fireEvent("invalid",this,c)},clearInvalid:function(){if(!this.rendered||this.preventMark){return}this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}this.fireEvent("valid",this)},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},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])},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=(Ext.isEmpty(a)?"":a))},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))},adjustSize:function(a,d){var c=Ext.form.Field.superclass.adjustSize.call(this,a,d);c.width=this.adjustWidth(this.el.dom.tagName,c.width);if(this.offsetCt){var b=this.getItemCt();c.width-=b.getFrameWidth("lr");c.height-=b.getFrameWidth("tb")}return c},adjustWidth:function(a,b){if(typeof b=="number"&&(Ext.isIE&&(Ext.isIE6||!Ext.isStrict))&&/input|textarea/i.test(a)&&!this.inEditor){return b-3}return b}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.errorEl.setWidth(a.getWidth(true)-20)}b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"})}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show();b.on("resize",b.alignErrorIcon,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide();a.un("resize",a.alignErrorIcon,a)}else{a.el.dom.title=""}}}};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.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.mon(this.el,"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.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this);this.mon(this.el,"keydown",this.onKeyDown,this);this.mon(this.el,"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)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},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.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("")}a.removeClass(this.emptyClass)}if(this.selectOnFocus){(function(){a.dom.select()}).defer(this.inEditor&&Ext.isIE?50:0)}},postBlur:function(){this.applyEmptyText()},filterKeys:function(a){if(a.ctrlKey||a.isSpecialKey()){return}if(!this.maskRe.test(String.fromCharCode(a.getCharCode()))){a.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},validateValue:function(a){if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){this.markInvalid(c);return false}}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 b=Ext.form.VTypes;if(!b[this.vtype](a,this)){this.markInvalid(this.vtypeText||b[this.vtype+"Text"]);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();var e=false;if(c.length>0){g=g===undefined?0:g;a=a===undefined?c.length:a;var f=this.el.dom;if(f.setSelectionRange){f.setSelectionRange(g,a)}else{if(f.createTextRange){var b=f.createTextRange();b.moveStart("character",g);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},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;Ext.removeNode(e);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)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});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,editable:true,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",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 x-form-field-trigger-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())}if(!this.editable){this.editable=true;this.setEditable(false)}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this)},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this)}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);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){this.el.un("keydown",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,setEditable:function(a){if(a==this.editable){return}this.editable=a;if(!a){this.el.addClass("x-trigger-noedit").on("click",this.onTriggerClick,this).dom.setAttribute("readOnly",true)}else{this.el.removeClass("x-trigger-noedit").un("click",this.onTriggerClick,this).dom.removeAttribute("readOnly")}},validateBlur:function(a){return true},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(d,f,c){d.hide=function(){var g=b.wrap.getWidth();this.dom.style.display="none";b.el.setWidth(g-b.trigger.getWidth())};d.show=function(){var g=b.wrap.getWidth();this.dom.style.display="";b.el.setWidth(g-b.trigger.getWidth())};var e="Trigger"+(c+1);if(this["hide"+e]){d.dom.style.display="none"}this.mon(d,"click",this["on"+e+"Click"],this,{preventDefault:true});d.addClassOnOver("x-form-trigger-over");d.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:Ext.isWebKit?-6: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(){Ext.destroy(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 d=this.textSizeEl;d.innerHTML="";d.appendChild(document.createTextNode(a));a=d.innerHTML;Ext.fly(d).setWidth(this.el.getWidth());if(a.length<1){a="&#160;&#160;"}else{a+=this.growAppend;if(Ext.isIE){a=a.replace(/\n/g,"<br />")}}d.innerHTML=a;var b=Math.min(this.growMax,Math.max(d.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(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}this.maskRe=new RegExp("["+Ext.escapeRe(a)+"]");Ext.form.NumberField.superclass.initEvents.call(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);return 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(!Ext.isEmpty(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);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(f,e){c+=Ext.isDate(f)?"^"+Ext.escapeRe(f.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);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=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},validateValue:function(e){e=this.formatDate(e);if(!Ext.form.DateField.superclass.validateValue.call(this,e)){return false}if(e.length<1){return true}var c=e;e=this.parseDate(e);if(!e){this.markInvalid(String.format(this.invalidText,c,this.format));return false}var f=e.getTime();if(this.minValue&&f<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false}if(this.maxValue&&f>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var a=e.getDay();for(var b=0;b<this.disabledDays.length;b++){if(a===this.disabledDays[b]){this.markInvalid(this.disabledDaysText);return false}}}var d=this.formatDate(e);if(this.disabledDatesRE&&this.disabledDatesRE.test(d)){this.markInvalid(String.format(this.disabledDatesText,d));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){return Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},parseDate:function(d){if(!d||Ext.isDate(d)){return d}var b=Date.parseDate(d,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(d,this.altFormatsArray[c])}}return b},onDestroy:function(){Ext.destroy(this.menu);Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(a){return Ext.isDate(a)?a.dateFormat(this.format):a},onTriggerClick:function(){if(this.disabled){return}if(this.menu==null){this.menu=new Ext.menu.DateMenu({hideOnClick:false})}this.onFocus();Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,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.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?");this.menuEvents("on")},menuEvents:function(a){this.menu[a]("select",this.onSelect,this);this.menu[a]("hide",this.onMenuHide,this);this.menu[a]("show",this.onFocus,this)},onSelect:function(a,b){this.setValue(b);this.fireEvent("select",this,b);this.menu.hide()},onMenuHide:function(){this.focus(false,60);this.menuEvents("un")},beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a)}}});Ext.reg("datefield",Ext.form.DateField);Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:Ext.emptyFn,isValid:function(){return true},validate:function(){return true},getRawValue:function(){var a=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,"");if(a===this.emptyText){a=""}if(this.htmlEncode){a=Ext.util.Format.htmlDecode(a)}return a},getValue:function(){return this.getRawValue()},getName:function(){return this.name},setRawValue:function(a){if(this.htmlEncode){a=Ext.util.Format.htmlEncode(a)}return this.rendered?(this.el.dom.innerHTML=(Ext.isEmpty(a)?"":a)):(this.value=a)},setValue:function(a){this.setRawValue(a);return this}});Ext.reg("displayfield",Ext.form.DisplayField);Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",listEmptyText:"",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,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){var c=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=c.name}if(!this.store){this.mode="local";var h=[],e=c.options;for(var b=0,a=e.length;b<a;b++){var g=e[b],f=(g.hasAttribute?g.hasAttribute("value"):g.getAttributeNode("value").specified)?g.value:g.text;if(g.selected&&Ext.isEmpty(this.value,true)){this.value=f}h.push([f,g.text])}this.store=new Ext.data.ArrayStore({id:0,fields:["value","text"],data:h,autoDestroy:true});this.valueField="value";this.displayField="text"}c.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(c,this.autoCreate||this.defaultAutoCreate);this.render(this.el.parentNode,c);Ext.removeNode(c)}else{Ext.removeNode(c)}}else{if(this.store){this.store=Ext.StoreMgr.lookup(this.store);if(this.store.autoCreated){this.displayField=this.valueField="field1";if(!this.store.expandData){this.displayField="field2"}this.mode="local"}}}this.selectedIndex=-1;if(this.mode=="local"){if(!Ext.isDefined(this.initialConfig.queryDelay)){this.queryDelay=10}if(!Ext.isDefined(this.initialConfig.minChars)){this.minChars=0}}},onRender:function(b,a){Ext.form.ComboBox.superclass.onRender.call(this,b,a);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);this.el.dom.removeAttribute("name")}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off")}if(!this.lazyInit){this.initList()}else{this.on("focus",this.initList,this,{single:true})}},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this);if(this.hiddenField){this.hiddenField.value=Ext.isDefined(this.hiddenValue)?this.hiddenValue:Ext.isDefined(this.value)?this.value:""}},initList:function(){if(!this.list){var a="x-combo-list";this.list=new Ext.Layer({parentEl:this.getListParent(),shadow:this.shadow,cls:[a,this.listClass].join(" "),constrain:false});var b=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setSize(b,0);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.syncFont!==false){this.list.setStyle("font-size",this.el.getStyle("font-size"))}if(this.title){this.header=this.list.createChild({cls:a+"-hd",html:this.title});this.assetHeight+=this.header.getHeight()}this.innerList=this.list.createChild({cls:a+"-inner"});this.mon(this.innerList,"mouseover",this.onViewOver,this);this.mon(this.innerList,"mousemove",this.onViewMove,this);this.innerList.setWidth(b-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:a+"-ft"});this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});this.assetHeight+=this.footer.getHeight()}if(!this.tpl){this.tpl='<tpl for="."><div class="'+a+'-item">{'+this.displayField+"}</div></tpl>"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText});this.mon(this.view,"click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(e,c,d){this.maxHeight=d-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=c;this.innerList.setWidth(c-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this);if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this)},esc:function(a){this.collapse()},tab:function(a){this.onViewClick(false);return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false&&!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.form.ComboBox.superclass.onDestroy.call(this)},unsetDelayCheck:function(){delete this.delayedCheck},fireKey:function(b){var a=function(c){if(c.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){this.fireEvent("specialkey",this,c)}};if(this.inEditor&&Ext.isWebKit&&b.getKey()==b.TAB){a.defer(10,this,[new Ext.EventObjectImpl(b)])}else{a.call(this,b)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&!Ext.isDefined(this.listWidth)){var c=Math.max(a,this.minListWidth);this.list.setWidth(c);this.innerList.setWidth(c-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=a}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0];var c=this.store.getAt(a);if(c){this.onSelect(c,a)}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom;var e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight;var c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight);var a=this.getPosition()[1]-Ext.getBody().getScroll().top;var f=Ext.lib.Dom.getViewHeight()-a-this.getSize().height;var d=Math.max(a,f,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate()},onEmptyResults:function(){this.collapse()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex<a-1){this.select(this.selectedIndex+1)}}}},selectPrev:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){var b=this.getRawValue();if(this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.isDefined(this.lastSelectionText)?this.lastSelectionText:"";this.applyEmptyText()}else{this.clearValue()}}else{var a=this.findRecord(this.displayField,b);if(a){b=a.get(this.valueField||this.displayField)}this.setValue(b)}},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={};if(this.pageSize){b.start=0;b.limit=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}this.list.alignTo(this.wrap,this.listAlign);this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}Ext.getDoc().on({scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,"click",this.onClick,this);this.mon(this.el,"change",this.onClick,this)},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return false},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var b=this.checked;this.checked=(a===true||a==="true"||a=="1"||String(a).toLowerCase()=="on");if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(b!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(h,f){if(!this.el){var o={cls:this.groupCls,layout:"column",border:false,renderTo:h};var a={defaultType:this.defaultType,layout:"form",border:false,defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(o,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,k=this.items.length;e<k;e++){Ext.applyIf(this.items[e],a)}}else{var d,m=[];if(typeof this.columns=="string"){this.columns=this.items.length}if(!Ext.isArray(this.columns)){var j=[];for(var e=0;e<this.columns;e++){j.push((100/this.columns)*0.01)}this.columns=j}d=this.columns.length;for(var e=0;e<d;e++){var b=Ext.apply({items:[]},a);b[this.columns[e]<=1?"columnWidth":"width"]=this.columns[e];if(this.defaults){b.defaults=Ext.apply(b.defaults||{},this.defaults)}m.push(b)}if(this.vertical){var q=Math.ceil(this.items.length/d),n=0;for(var e=0,k=this.items.length;e<k;e++){if(e>0&&e%q==0){n++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}m[n].items.push(this.items[e])}}else{for(var e=0,k=this.items.length;e<k;e++){var p=e%d;if(this.items[e].fieldLabel){this.items[e].hideLabel=false}m[p].items.push(this.items[e])}}Ext.apply(o,{layoutConfig:{columns:d},items:m})}this.panel=new Ext.Panel(o);this.panel.ownerCt=this;this.el=this.panel.getEl();if(this.forId&&this.itemCls){var c=this.el.up(this.itemCls).child("label",true);if(c){c.setAttribute("htmlFor",this.forId)}}var g=this.panel.findBy(function(i){return i.isFormField},this);this.items=new Ext.util.MixedCollection();this.items.addAll(g)}Ext.form.CheckboxGroup.superclass.onRender.call(this,h,f)},afterRender:function(){Ext.form.CheckboxGroup.superclass.afterRender.call(this);if(this.values){this.setValue.apply(this,this.values);delete this.values}this.eachItem(function(a){a.on("check",this.fireChecked,this);a.inGroup=true})},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;this.panel.doLayout()}},fireChecked:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});this.fireEvent("change",this,a)},validateValue:function(a){if(!this.allowBlank){var b=true;this.eachItem(function(c){if(c.checked){return(b=false)}});if(b){this.markInvalid(this.blankText);return false}}return true},onDisable:function(){this.eachItem(function(a){a.disable()})},onEnable:function(){this.eachItem(function(a){a.enable()})},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;this.panel.doLayout()}},onResize:function(a,b){this.panel.setSize(a,b);this.panel.doLayout()},reset:function(){Ext.form.CheckboxGroup.superclass.reset.call(this);this.eachItem(function(a){if(a.reset){a.reset()}})},setValue:function(d,c){if(this.rendered){if(arguments.length==1){if(Ext.isArray(d)){Ext.each(d,function(g,e){var f=this.items.itemAt(e);if(f){f.setValue(g)}},this)}else{if(Ext.isObject(d)){for(var a in d){var b=this.getBox(a);if(b){b.setValue(d[a])}}}else{this.setValueForItem(d)}}}else{var b=this.getBox(d);if(b){b.setValue(c)}}}else{this.values=arguments}return this},onDestroy:function(){Ext.destroy(this.panel);Ext.form.CheckboxGroup.superclass.onDestroy.call(this)},setValueForItem:function(a){a=String(a).split(",");this.eachItem(function(b){if(a.indexOf(b.inputValue)>-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(a){if(this.items&&this.items.each){this.items.each(a,this)}},initValue:Ext.emptyFn,getValue:Ext.emptyFn,getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var a=this.el.up("form")||Ext.getBody();var b=a.child("input[name="+this.el.dom.name+"]:checked",true);return b?b.value:null},onClick:function(){if(this.el.dom.checked!=this.checked){var a=this.getCheckEl().select("input[name="+this.el.dom.name+"]");a.each(function(b){if(b.dom.id==this.id){this.setValue(true)}else{Ext.getCmp(b.dom.id).setValue(false)}},this)}},setValue:function(a){if(typeof a=="boolean"){Ext.form.Radio.superclass.setValue.call(this,a)}else{var b=this.getCheckEl().child("input[name="+this.el.dom.name+"][value="+a+"]",true);if(b){Ext.getCmp(b.id).setValue(true)}}return this},getCheckEl:function(){if(this.inGroup){return this.el.up(".x-form-radio-group")}return this.el.up("form")||Ext.getBody()}});Ext.reg("radio",Ext.form.Radio);Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:true,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group",getValue:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});return a},setValue:function(c,b){if(this.rendered){if(arguments.length>1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}}else{this.values=arguments}return this},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.itemId||c.id||(c.id=Ext.id())});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,paramOrder:undefined,paramsAsHash:false,activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(){this.items.each(function(a){Ext.destroy(a)});if(this.el){this.el.removeAllListeners();this.el.remove()}this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){if(this.standardSubmit){var a=this.isValid();if(a){this.el.dom.submit()}return a}var c=String.format("{0}submit",this.api?"direct":"");this.doAction(c,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields;a.each(function(c){var d=this.findField(c.name);if(d){b.set(c.name,d.getValue())}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle||"Please Wait...")}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(b){var a=this.items.get(b);if(!Ext.isObject(a)){this.items.each(function(c){if(c.isFormField&&(c.dataIndex==b||c.id==b||c.getName()==b)){a=c;return false}})}return a||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c<a;c++){var b=h[c];var d=this.findField(b.id);if(d){d.markInvalid(b.msg)}}}else{var e,g;for(g in h){if(!Ext.isFunction(h[g])&&(e=this.findField(g))){e.markInvalid(h[g])}}}return this},setValues:function(c){if(Ext.isArray(c)){for(var d=0,a=c.length;d<a;d++){var b=c[d];var e=this.findField(b.id);if(e){e.setValue(b.value);if(this.trackResetOnLoad){e.originalValue=e.getValue()}}}}else{var g,h;for(h in c){if(!Ext.isFunction(c[h])&&(g=this.findField(h))){g.setValue(c[h]);if(this.trackResetOnLoad){g.originalValue=g.getValue()}}}}return this},getValues:function(b){var a=Ext.lib.Ajax.serializeForm(this.el.dom);if(b===true){return a}return Ext.urlDecode(a)},getFieldValues:function(){var a={};this.items.each(function(b){a[b.getName()]=b.getValue()});return a},clearInvalid:function(){this.items.each(function(a){a.clearInvalid()});return this},reset:function(){this.items.each(function(a){a.reset()});return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(a){this.items.remove(a);return this},render:function(){this.items.each(function(a){if(a.isFormField&&!a.rendered&&document.getElementById(a.id)){a.applyToMarkup(a.id)}});return this},applyToFields:function(a){this.items.each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.items.each(function(b){Ext.applyIf(b,a)});return this},callFieldMethod:function(b,a){a=a||[];this.items.each(function(c){if(Ext.isFunction(c[b])){c[b].apply(c,a)}});return this}});Ext.BasicForm=Ext.form.BasicForm;Ext.FormPanel=Ext.extend(Ext.Panel,{minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();Ext.FormPanel.superclass.initComponent.call(this);this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype="multipart/form-data"}this.initItems();this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){var a=Ext.applyIf({listeners:{}},this.initialConfig);return new Ext.form.BasicForm(null,a)},initFields:function(){var c=this.form;var a=this;var b=function(d){if(a.isField(d)){c.add(d)}if(d.isFieldWrap){Ext.applyIf(d,{labelAlign:d.ownerCt.labelAlign,labelWidth:d.ownerCt.labelWidth,itemCls:d.ownerCt.itemCls});c.add(d.field)}else{if(d.doLayout&&d!=a){Ext.applyIf(d,{labelAlign:d.ownerCt.labelAlign,labelWidth:d.ownerCt.labelWidth,itemCls:d.ownerCt.itemCls});if(d.items&&d.items.each){d.items.each(b,this)}}}};this.items.each(b,this)},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(b,a){this.initFields();Ext.FormPanel.superclass.onRender.call(this,b,a);this.form.initEl(this.body)},beforeDestroy:function(){this.stopMonitoring();Ext.FormPanel.superclass.beforeDestroy.call(this);this.form.items.clear();Ext.destroy(this.form)},isField:function(a){return !!a.setValue&&!!a.getValue&&!!a.markInvalid&&!!a.clearInvalid},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.on("remove",this.onRemove,this);this.on("add",this.onAdd,this);if(this.monitorValid){this.startMonitoring()}},onAdd:function(a,b){if(this.isField(b)){this.form.add(b)}else{if(b.findBy){Ext.applyIf(b,{labelAlign:b.ownerCt.labelAlign,labelWidth:b.ownerCt.labelWidth,itemCls:b.ownerCt.itemCls});this.form.add.apply(this.form,b.findBy(this.isField))}}},onRemove:function(a,b){if(this.isField(b)){Ext.destroy(b.container.up(".x-form-item"));this.form.remove(b)}else{if(b.findByType){Ext.each(b.findBy(this.isField),this.form.remove,this.form)}}},startMonitoring:function(){if(!this.validTask){this.validTask=new Ext.util.TaskRunner();this.validTask.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){if(this.validTask){this.validTask.stopAll();this.validTask=null}},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form){this.form.items.each(function(){this.disable()})}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form){this.form.items.each(function(){this.enable()})}},bindHandler:function(){var e=true;this.form.items.each(function(g){if(!g.isValid(true)){e=false;return false}});if(this.fbar){var b=this.fbar.items.items;for(var d=0,a=b.length;d<a;d++){var c=b[d];if(c.formBind===true&&c.disabled===e){c.setDisabled(!e)}}}this.fireEvent("clientvalidation",this,e)}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",animCollapse:false,onRender:function(b,a){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;if(this.title||this.header||this.checkboxToggle){this.el.appendChild(document.createElement("legend")).className="x-fieldset-header"}}Ext.form.FieldSet.superclass.onRender.call(this,b,a);if(this.checkboxToggle){var c=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};this.checkbox=this.header.insertFirst(c);this.checkbox.dom.checked=!this.collapsed;this.mon(this.checkbox,"click",this.onCheckClick,this)}},onCollapse:function(a,b){if(this.checkbox){this.checkbox.dom.checked=false}Ext.form.FieldSet.superclass.onCollapse.call(this,a,b)},onExpand:function(a,b){if(this.checkbox){this.checkbox.dom.checked=true}Ext.form.FieldSet.superclass.onExpand.call(this,a,b)},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet);Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&nbsp;":"&#8203;",actionMode:"wrap",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange")},createFontOptions:function(){var d=[],b=this.fontFamilies,c,f;for(var e=0,a=b.length;e<a;e++){c=b[e];f=c.toLowerCase();d.push('<option value="',f,'" style="font-family:',c,';"',(this.defaultFont==f?' selected="true">':">"),c,"</option>")}return d.join("")},createToolbar:function(d){var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function c(g,e,f){return{itemId:g,cls:"x-btn-icon",iconCls:"x-edit-"+g,enableToggle:e!==false,scope:d,handler:f||d.relayBtnCmd,clickEvent:"mousedown",tooltip:a?d.buttonTips[g]||undefined:undefined,overflowText:d.buttonTips[g].title||undefined,tabIndex:-1}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});this.mon(b.el,"click",function(f){f.preventDefault()});if(this.enableFont&&!Ext.isSafari2){this.fontSelect=b.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.mon(this.fontSelect,"change",function(){var e=this.fontSelect.dom.value;this.relayCmd("fontname",e);this.deferFocus()},this);b.add(this.fontSelect.dom,"-")}if(this.enableFormat){b.add(c("bold"),c("italic"),c("underline"))}if(this.enableFontSize){b.add("-",c("increasefontsize",false,this.adjustFont),c("decreasefontsize",false,this.adjustFont))}if(this.enableColors){b.add("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?d.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(f,e){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+e:e);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?d.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(f,e){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",e);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+e:e);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){b.add("-",c("justifyleft"),c("justifycenter"),c("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){b.add("-",c("createlink",false,this.createLink))}if(this.enableLists){b.add("-",c("insertorderedlist"),c("insertunorderedlist"))}if(this.enableSourceEdit){b.add("-",c("sourceedit",true,function(e){this.toggleSourceEdit(!this.sourceEditMode)}))}}this.tb=b},getDocMarkup:function(){return'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>'},getEditorBody:function(){return this.doc.body||this.doc.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);this.doc=this.getDoc();this.win=this.getWin();this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var a={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(a);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||String(a.designMode).toLowerCase()!="on"){this.initFrame()}}},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.itemId!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof b=="number"){var d=b-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",d));this.tb.setWidth(d);this.iframe.style.width=Math.max(d,0)+"px"}if(typeof c=="number"){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",a));this.iframe.style.height=Math.max(a,0)+"px";if(this.doc){this.getEditorBody().style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(a){if(a===undefined){a=!this.sourceEditMode}this.sourceEditMode=a===true;var c=this.tb.items.get("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized){this.disableItems(false)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var b=this.lastSize;if(b){delete this.lastSize;this.setSize(b)}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(a.length>5){if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}}if(a==this.defaultValue){a=""}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='<div style="'+a[0]+'">'+c+"</div>"}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){var c=this.doc,b=c.designMode.toLowerCase();c.designMode=b.toggle("on","off");c.designMode=b}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var b=this.getEditorBody();var a=this.el.getStyles("font-size","font-family","background-image","background-repeat");a["background-attachment"]="fixed";b.bgProperties="fixed";Ext.DomHelper.applyStyles(b,a);if(this.doc){try{Ext.EventManager.removeAll(this.doc)}catch(c){}}this.doc=this.getDoc();Ext.EventManager.on(this.doc,{mousedown:this.onEditorEvent,dblclick:this.onEditorEvent,click:this.onEditorEvent,keyup:this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this)}this.initialized=true;this.fireEvent("initialize",this);this.doc.editorInitialized=true;this.pushValue()}catch(c){}},onDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}if(this.el){this.el.removeAllListeners();this.el.remove()}if(this.doc){try{Ext.EventManager.removeAll(this.doc);for(var b in this.doc){delete this.doc[b]}}catch(a){}}this.purgeListeners()},onFirstFocus:function(){this.activated=true;this.disableItems(false);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var c=b.itemId=="increasefontsize"?1:-1;var a=parseInt(this.doc.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+c}else{if(a<=13){a=2+c}else{if(a<=16){a=3+c}else{if(a<=18){a=4+c}else{if(a<=24){a=5+c}else{a=6+c}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){c*=2}a=Math.max(1,a+c)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.doc;if(this.enableFont&&!Ext.isSafari2){var a=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.itemId)},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){this.doc.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(b){if(!this.activated){return}if(Ext.isIE){this.win.focus();var a=this.doc.selection.createRange();if(a){a.collapse(true);a.pasteHTML(b);this.syncValue();this.deferFocus()}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",b);this.deferFocus()}else{if(Ext.isWebKit){this.execCmd("InsertText",b);this.deferFocus()}}}},fixKeys:function(){if(Ext.isIE){return function(d){var a=d.getKey(),b;if(a==d.TAB){d.stopEvent();b=this.doc.selection.createRange();if(b){b.collapse(true);b.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}else{if(a==d.ENTER){b=this.doc.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){d.stopEvent();b.pasteHTML("<br />");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}if(!this.store){var b=this.parseDate(this.minValue)||new Date(this.initDate).clearTime();var a=this.parseDate(this.maxValue)||new Date(this.initDate).clearTime().add("mi",(24*60)-1);var c=[];while(b<=a){c.push(b.dateFormat(this.format));b=b.add("mi",this.increment)}this.store=c}Ext.form.TimeField.superclass.initComponent.call(this)},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a.dateFormat(this.format))}Ext.form.TimeField.superclass.beforeBlur.call(this)}});Ext.reg("timefield",Ext.form.TimeField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(b,a){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");if(this.forId){this.el.setAttribute("for",this.forId)}}Ext.form.Label.superclass.onRender.call(this,b,a)},setText:function(a,b){var c=b===false;this[!c?"text":"html"]=a;delete this[c?"text":"html"];if(this.rendered){this.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(a):a}return this}});Ext.reg("label",Ext.form.Label);Ext.form.Action=function(b,a){this.form=b;this.options=a||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(a){},success:function(a){},handleResponse:function(a){},failure:function(a){this.response=a;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}this.result=this.handleResponse(a);return this.result},getUrl:function(c){var a=this.options.url||this.form.url||this.form.el.dom.action;if(c){var b=this.getParams();if(b){a=Ext.urlAppend(a,b)}}return a},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var a=this.form.baseParams;var b=this.options.params;if(b){if(typeof b=="object"){b=Ext.urlEncode(Ext.applyIf(b,a))}else{if(typeof b=="string"&&a){b+="&"+Ext.urlEncode(a)}}}else{if(a){b=Ext.urlEncode(a)}}return b},createCallback:function(a){var a=a||{};return{success:this.success,failure:this.failure,scope:this,timeout:(a.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(b,a){Ext.form.Action.Submit.superclass.constructor.call(this,b,a)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var b=this.options;var c=this.getMethod();var a=c=="GET";if(b.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(b),{form:this.form.el.dom,url:this.getUrl(a),method:c,headers:b.headers,params:!a?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(b.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(b){var a=this.processResponse(b);if(a===true||a.success){this.form.afterAction(this,true);return}if(a.errors){this.form.markInvalid(a.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(c){if(this.form.errorReader){var b=this.form.errorReader.read(c);var f=[];if(b.records){for(var d=0,a=b.records.length;d<a;d++){var e=b.records[d];f[d]=e.data}}if(f.length<1){f=null}return{success:b.success,errors:f}}return Ext.decode(c.responseText)}});Ext.form.Action.Load=function(b,a){Ext.form.Action.Load.superclass.constructor.call(this,b,a);this.reader=this.form.reader};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}))},success:function(b){var a=this.processResponse(b);if(a===true||!a.success||!a.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return}this.form.clearInvalid();this.form.setValues(a.data);this.form.afterAction(this,true)},handleResponse:function(b){if(this.form.reader){var a=this.form.reader.read(b);var c=a.records&&a.records[0]?a.records[0].data:null;return{success:a.success,data:c}}return Ext.decode(b.responseText)}});Ext.form.Action.DirectLoad=Ext.extend(Ext.form.Action.Load,{constructor:function(b,a){Ext.form.Action.DirectLoad.superclass.constructor.call(this,b,a)},type:"directload",run:function(){var a=this.getParams();a.push(this.success,this);this.form.api.load.apply(window,a)},getParams:function(){var c=[],g={};var e=this.form.baseParams;var f=this.options.params;Ext.apply(g,f,e);var b=this.form.paramOrder;if(b){for(var d=0,a=b.length;d<a;d++){c.push(g[b[d]])}}else{if(this.form.paramsAsHash){c.push(g)}}return c},processResponse:function(a){this.result=a;return a}});Ext.form.Action.DirectSubmit=Ext.extend(Ext.form.Action.Submit,{constructor:function(b,a){Ext.form.Action.DirectSubmit.superclass.constructor.call(this,b,a)},type:"directsubmit",run:function(){var a=this.options;if(a.clientValidation===false||this.form.isValid()){this.success.params=this.getParams();this.form.api.submit(this.form.el.dom,this.success,this)}else{if(a.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},getParams:function(){var c={};var a=this.form.baseParams;var b=this.options.params;Ext.apply(c,b,a);return c},processResponse:function(a){this.result=a;return a}});Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit,directload:Ext.form.Action.DirectLoad,directsubmit:Ext.form.Action.DirectSubmit};Ext.form.VTypes=function(){var c=/^[a-zA-Z_]+$/;var d=/^[a-zA-Z0-9_]+$/;var b=/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;var a=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor-debug.js	(revision 625)
@@ -0,0 +1,560 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.CellSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * This class provides the basic implementation for <i>single</i> <b>cell</b> selection in a grid.
+ * The object stored as the selection contains the following properties:
+ * <div class="mdetail-params"><ul>
+ * <li><b>cell</b> : see {@link #getSelectedCell} 
+ * <li><b>record</b> : Ext.data.record The {@link Ext.data.Record Record}
+ * which provides the data for the row containing the selection</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The object containing the configuration of this model.
+ */
+Ext.grid.CellSelectionModel = function(config){
+    Ext.apply(this, config);
+
+    this.selection = null;
+
+    this.addEvents(
+        /**
+	     * @event beforecellselect
+	     * Fires before a cell is selected, return false to cancel the selection.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "beforecellselect",
+        /**
+	     * @event cellselect
+	     * Fires when a cell is selected.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "cellselect",
+        /**
+	     * @event selectionchange
+	     * Fires when the active selection changes.
+	     * @param {SelectionModel} this
+	     * @param {Object} selection null for no selection or an object with two properties
+         * <div class="mdetail-params"><ul>
+         * <li><b>cell</b> : see {@link #getSelectedCell} 
+         * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record Record}
+         * which provides the data for the row containing the selection</p></li>
+         * </ul></div>
+	     */
+	    "selectionchange"
+    );
+
+    Ext.grid.CellSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel,  {
+
+    /** @ignore */
+    initEvents : function(){
+        this.grid.on("cellmousedown", this.handleMouseDown, this);
+        this.grid.getGridEl().on(Ext.EventManager.useKeydown ? "keydown" : "keypress", this.handleKeyDown, this);
+        var view = this.grid.view;
+        view.on("refresh", this.onViewChange, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("beforerowremoved", this.clearSelections, this);
+        view.on("beforerowsinserted", this.clearSelections, this);
+        if(this.grid.isEditor){
+            this.grid.on("beforeedit", this.beforeEdit,  this);
+        }
+    },
+
+	//private
+    beforeEdit : function(e){
+        this.select(e.row, e.column, false, true, e.record);
+    },
+
+	//private
+    onRowUpdated : function(v, index, r){
+        if(this.selection && this.selection.record == r){
+            v.onCellSelect(index, this.selection.cell[1]);
+        }
+    },
+
+	//private
+    onViewChange : function(){
+        this.clearSelections(true);
+    },
+
+	/**
+     * Returns an array containing the row and column indexes of the currently selected cell
+     * (e.g., [0, 0]), or null if none selected. The array has elements:
+     * <div class="mdetail-params"><ul>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The index of the selected row</p></li>
+     * <li><b>cellIndex</b> : Number<p class="sub-desc">The index of the selected cell. 
+     * Due to possible column reordering, the cellIndex should <b>not</b> be used as an
+     * index into the Record's data. Instead, use the cellIndex to determine the <i>name</i>
+     * of the selected cell and use the field name to retrieve the data value from the record:<pre><code>
+// get name
+var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
+// get data value based on name
+var data = record.get(fieldName);
+     * </code></pre></p></li>
+     * </ul></div>
+     * @return {Array} An array containing the row and column indexes of the selected cell, or null if none selected.
+	 */
+    getSelectedCell : function(){
+        return this.selection ? this.selection.cell : null;
+    },
+
+    /**
+     * If anything is selected, clears all selections and fires the selectionchange event.
+     * @param {Boolean} preventNotify <tt>true</tt> to prevent the gridview from
+     * being notified about the change.
+     */
+    clearSelections : function(preventNotify){
+        var s = this.selection;
+        if(s){
+            if(preventNotify !== true){
+                this.grid.view.onCellDeselect(s.cell[0], s.cell[1]);
+            }
+            this.selection = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selection ? true : false;
+    },
+
+    /** @ignore */
+    handleMouseDown : function(g, row, cell, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        this.select(row, cell);
+    },
+
+    /**
+     * Selects a cell.  Before selecting a cell, fires the
+     * {@link #beforecellselect} event.  If this check is satisfied the cell
+     * will be selected and followed up by  firing the {@link #cellselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} rowIndex The index of the row to select
+     * @param {Number} colIndex The index of the column to select
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     * @param {Boolean} preventFocus (optional) Whether to prevent the cell at
+     * the specified rowIndex / colIndex from being focused.
+     * @param {Ext.data.Record} r (optional) The record to select
+     */
+    select : function(rowIndex, colIndex, preventViewNotify, preventFocus, /*internal*/ r){
+        if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){
+            this.clearSelections();
+            r = r || this.grid.store.getAt(rowIndex);
+            this.selection = {
+                record : r,
+                cell : [rowIndex, colIndex]
+            };
+            if(!preventViewNotify){
+                var v = this.grid.getView();
+                v.onCellSelect(rowIndex, colIndex);
+                if(preventFocus !== true){
+                    v.focusCell(rowIndex, colIndex);
+                }
+            }
+            this.fireEvent("cellselect", this, rowIndex, colIndex);
+            this.fireEvent("selectionchange", this, this.selection);
+        }
+    },
+
+	//private
+    isSelectable : function(rowIndex, colIndex, cm){
+        return !cm.isHidden(colIndex);
+    },
+
+    /** @ignore */
+    handleKeyDown : function(e){
+        if(!e.isNavKeyPress()){
+            return;
+        }
+        var g = this.grid, s = this.selection;
+        if(!s){
+            e.stopEvent();
+            var cell = g.walkCells(0, 0, 1, this.isSelectable,  this);
+            if(cell){
+                this.select(cell[0], cell[1]);
+            }
+            return;
+        }
+        var sm = this;
+        var walk = function(row, col, step){
+            return g.walkCells(row, col, step, sm.isSelectable,  sm);
+        };
+        var k = e.getKey(), r = s.cell[0], c = s.cell[1];
+        var newCell;
+
+        switch(k){
+             case e.TAB:
+                 if(e.shiftKey){
+                     newCell = walk(r, c-1, -1);
+                 }else{
+                     newCell = walk(r, c+1, 1);
+                 }
+             break;
+             case e.DOWN:
+                 newCell = walk(r+1, c, 1);
+             break;
+             case e.UP:
+                 newCell = walk(r-1, c, -1);
+             break;
+             case e.RIGHT:
+                 newCell = walk(r, c+1, 1);
+             break;
+             case e.LEFT:
+                 newCell = walk(r, c-1, -1);
+             break;
+             case e.ENTER:
+                 if(g.isEditor && !g.editing){
+                    g.startEditing(r, c);
+                    e.stopEvent();
+                    return;
+                }
+             break;
+        }
+        if(newCell){
+            this.select(newCell[0], newCell[1]);
+            e.stopEvent();
+        }
+    },
+
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        if(k == e.TAB){
+            if(e.shiftKey){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+            e.stopEvent();
+        }else if(k == e.ENTER){
+            ed.completeEdit();
+            e.stopEvent();
+        }else if(k == e.ESC){
+        	e.stopEvent();
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    }
+});/**
+ * @class Ext.grid.EditorGridPanel
+ * @extends Ext.grid.GridPanel
+ * <p>This class extends the {@link Ext.grid.GridPanel GridPanel Class} to provide cell editing
+ * on selected {@link Ext.grid.Column columns}. The editable columns are specified by providing
+ * an {@link Ext.grid.ColumnModel#editor editor} in the {@link Ext.grid.Column column configuration}.</p>
+ * <p>Editability of columns may be controlled programatically by inserting an implementation
+ * of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into the
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>Editing is performed on the value of the <i>field</i> specified by the column's
+ * <tt>{@link Ext.grid.ColumnModel#dataIndex dataIndex}</tt> in the backing {@link Ext.data.Store Store}
+ * (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display
+ * transformed data, this must be accounted for).</p>
+ * <p>If a value-to-description mapping is used to render a column, then a {@link Ext.form.Field#ComboBox ComboBox}
+ * which uses the same {@link Ext.form.Field#valueField value}-to-{@link Ext.form.Field#displayFieldField description}
+ * mapping would be an appropriate editor.</p>
+ * If there is a more complex mismatch between the visible data in the grid, and the editable data in
+ * the {@link Edt.data.Store Store}, then code to transform the data both before and after editing can be
+ * injected using the {@link #beforeedit} and {@link #afteredit} events.
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype editorgrid
+ */
+Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
+    /**
+     * @cfg {Number} clicksToEdit
+     * <p>The number of clicks on a cell required to display the cell's editor (defaults to 2).</p>
+     * <p>Setting this option to 'auto' means that mousedown <i>on the selected cell</i> starts
+     * editing that cell.</p>
+     */
+    clicksToEdit: 2,
+    
+    /**
+    * @cfg {Boolean} forceValidation
+    * True to force validation even if the value is unmodified (defaults to false)
+    */
+    forceValidation: false,
+
+    // private
+    isEditor : true,
+    // private
+    detectEdit: false,
+
+	/**
+	 * @cfg {Boolean} autoEncode
+	 * True to automatically HTML encode and decode values pre and post edit (defaults to false)
+	 */
+	autoEncode : false,
+
+	/**
+	 * @cfg {Boolean} trackMouseOver @hide
+	 */
+    // private
+    trackMouseOver: false, // causes very odd FF errors
+
+    // private
+    initComponent : function(){
+        Ext.grid.EditorGridPanel.superclass.initComponent.call(this);
+
+        if(!this.selModel){
+            /**
+             * @cfg {Object} selModel Any subclass of AbstractSelectionModel that will provide the selection model for
+             * the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified).
+             */
+            this.selModel = new Ext.grid.CellSelectionModel();
+        }
+
+        this.activeEditor = null;
+
+	    this.addEvents(
+            /**
+             * @event beforeedit
+             * Fires before cell editing is triggered. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value for the field being edited.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "beforeedit",
+            /**
+             * @event afteredit
+             * Fires after a cell is edited. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * </ul>
+             *
+             * <pre><code> 
+grid.on('afteredit', afterEdit, this );
+
+function afterEdit(e) {
+    // execute an XHR to send/commit data to the server, in callback do (if successful):
+    e.record.commit();
+}; 
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "afteredit",
+            /**
+             * @event validateedit
+             * Fires after a cell is edited, but before the value is set in the record. Return false
+             * to cancel the change. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * Usage example showing how to remove the red triangle (dirty record indicator) from some
+             * records (not all).  By observing the grid's validateedit event, it can be cancelled if
+             * the edit occurs on a targeted row (for example) and then setting the field's new value
+             * in the Record directly:
+             * <pre><code> 
+grid.on('validateedit', function(e) {
+  var myTargetRow = 6;
+ 
+  if (e.row == myTargetRow) {
+    e.cancel = true;
+    e.record.data[e.field] = e.value;
+  }
+});
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "validateedit"
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.EditorGridPanel.superclass.initEvents.call(this);
+
+        this.on("bodyscroll", this.stopEditing, this, [true]);
+        this.on("columnresize", this.stopEditing, this, [true]);
+
+        if(this.clicksToEdit == 1){
+            this.on("cellclick", this.onCellDblClick, this);
+        }else {
+            if(this.clicksToEdit == 'auto' && this.view.mainBody){
+                this.view.mainBody.on("mousedown", this.onAutoEditClick, this);
+            }
+            this.on("celldblclick", this.onCellDblClick, this);
+        }
+    },
+
+    // private
+    onCellDblClick : function(g, row, col){
+        this.startEditing(row, col);
+    },
+
+    // private
+    onAutoEditClick : function(e, t){
+        if(e.button !== 0){
+            return;
+        }
+        var row = this.view.findRowIndex(t);
+        var col = this.view.findCellIndex(t);
+        if(row !== false && col !== false){
+            this.stopEditing();
+            if(this.selModel.getSelectedCell){ // cell sm
+                var sc = this.selModel.getSelectedCell();
+                if(sc && sc[0] === row && sc[1] === col){
+                    this.startEditing(row, col);
+                }
+            }else{
+                if(this.selModel.isSelected(row)){
+                    this.startEditing(row, col);
+                }
+            }
+        }
+    },
+
+    // private
+    onEditComplete : function(ed, value, startValue){
+        this.editing = false;
+        this.activeEditor = null;
+        ed.un("specialkey", this.selModel.onEditorKey, this.selModel);
+		var r = ed.record;
+        var field = this.colModel.getDataIndex(ed.col);
+        value = this.postEditValue(value, startValue, r, field);
+        if(this.forceValidation === true || String(value) !== String(startValue)){
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                originalValue: startValue,
+                value: value,
+                row: ed.row,
+                column: ed.col,
+                cancel:false
+            };
+            if(this.fireEvent("validateedit", e) !== false && !e.cancel && String(value) !== String(startValue)){
+                r.set(field, e.value);
+                delete e.cancel;
+                this.fireEvent("afteredit", e);
+            }
+        }
+        this.view.focusCell(ed.row, ed.col);
+    },
+
+    /**
+     * Starts editing the specified for the specified row/column
+     * @param {Number} rowIndex
+     * @param {Number} colIndex
+     */
+    startEditing : function(row, col){
+        this.stopEditing();
+        if(this.colModel.isCellEditable(col, row)){
+            this.view.ensureVisible(row, col, true);
+            var r = this.store.getAt(row);
+            var field = this.colModel.getDataIndex(col);
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                value: r.data[field],
+                row: row,
+                column: col,
+                cancel:false
+            };
+            if(this.fireEvent("beforeedit", e) !== false && !e.cancel){
+                this.editing = true;
+                var ed = this.colModel.getCellEditor(col, row);
+                if(!ed){
+                    return;
+                }
+                if(!ed.rendered){
+                    ed.render(this.view.getEditorParent(ed));
+                }
+                (function(){ // complex but required for focus issues in safari, ie and opera
+                    ed.row = row;
+                    ed.col = col;
+                    ed.record = r;
+                    ed.on("complete", this.onEditComplete, this, {single: true});
+                    ed.on("specialkey", this.selModel.onEditorKey, this.selModel);
+                    /**
+                     * The currently active editor or null
+                      * @type Ext.Editor
+                     */
+                    this.activeEditor = ed;
+                    var v = this.preEditValue(r, field);
+                    ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v);
+                }).defer(50, this);
+            }
+        }
+    },
+
+    // private
+    preEditValue : function(r, field){
+        var value = r.data[field];
+        return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value;
+    },
+
+    // private
+	postEditValue : function(value, originalValue, r, field){
+		return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value;
+	},
+
+    /**
+     * Stops any active editing
+     * @param {Boolean} cancel (optional) True to cancel any changes
+     */
+    stopEditing : function(cancel){
+        if(this.activeEditor){
+            this.activeEditor[cancel === true ? 'cancelEdit' : 'completeEdit']();
+        }
+        this.activeEditor = null;
+    }
+});
+Ext.reg('editorgrid', Ext.grid.EditorGridPanel);// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridEditor = function(field, config){
+    Ext.grid.GridEditor.superclass.constructor.call(this, field, config);
+    field.monitorTab = false;
+};
+
+Ext.extend(Ext.grid.GridEditor, Ext.Editor, {
+    alignment: "tl-tl",
+    autoSize: "width",
+    hideEl : false,
+    cls: "x-small-editor x-grid-editor",
+    shim:false,
+    shadow:false
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-editor.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.grid.CellSelectionModel=function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.EventManager.useKeydown?"keydown":"keypress",this.handleKeyDown,this);var a=this.grid.view;a.on("refresh",this.onViewChange,this);a.on("rowupdated",this.onRowUpdated,this);a.on("beforerowremoved",this.clearSelections,this);a.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(f,c,b,e,d){if(this.fireEvent("beforecellselect",this,f,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(f);this.selection={record:d,cell:[f,c]};if(!b){var a=this.grid.getView();a.onCellSelect(f,c);if(e!==true){a.focusCell(f,c)}}this.fireEvent("cellselect",this,f,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},handleKeyDown:function(i){if(!i.isNavKeyPress()){return}var h=this.grid,n=this.selection;if(!n){i.stopEvent();var m=h.walkCells(0,0,1,this.isSelectable,this);if(m){this.select(m[0],m[1])}return}var b=this;var l=function(g,c,e){return h.walkCells(g,c,e,b.isSelectable,b)};var d=i.getKey(),a=n.cell[0],j=n.cell[1];var f;switch(d){case i.TAB:if(i.shiftKey){f=l(a,j-1,-1)}else{f=l(a,j+1,1)}break;case i.DOWN:f=l(a+1,j,1);break;case i.UP:f=l(a-1,j,-1);break;case i.RIGHT:f=l(a,j+1,1);break;case i.LEFT:f=l(a,j-1,-1);break;case i.ENTER:if(h.isEditor&&!h.editing){h.startEditing(a,j);i.stopEvent();return}break}if(f){this.select(f[0],f[1]);i.stopEvent()}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(f,d){var b=d.getKey(),h,c=this.grid,a=c.activeEditor;if(b==d.TAB){if(d.shiftKey){h=c.walkCells(a.row,a.col-1,-1,this.acceptsNav,this)}else{h=c.walkCells(a.row,a.col+1,1,this.acceptsNav,this)}d.stopEvent()}else{if(b==d.ENTER){a.completeEdit();d.stopEvent()}else{if(b==d.ESC){d.stopEvent();a.cancelEdit()}}}if(h){c.startEditing(h[0],h[1])}}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this,[true]);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{if(this.clicksToEdit=="auto"&&this.view.mainBody){this.view.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var f=this.view.findRowIndex(b);var a=this.view.findCellIndex(b);if(f!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===f&&d[1]===a){this.startEditing(f,a)}}else{if(this.selModel.isSelected(f)){this.startEditing(f,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.activeEditor=null;b.un("specialkey",this.selModel.onEditorKey,this.selModel);var c=b.record;var g=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,g);if(this.forceValidation===true||String(d)!==String(a)){var f={grid:this,record:c,field:g,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",f)!==false&&!f.cancel&&String(d)!==String(a)){c.set(g,f.value);delete f.cancel;this.fireEvent("afteredit",f)}}this.view.focusCell(b.row,b.col)},startEditing:function(g,b){this.stopEditing();if(this.colModel.isCellEditable(b,g)){this.view.ensureVisible(g,b,true);var c=this.store.getAt(g);var f=this.colModel.getDataIndex(b);var d={grid:this,record:c,field:f,value:c.data[f],row:g,column:b,cancel:false};if(this.fireEvent("beforeedit",d)!==false&&!d.cancel){this.editing=true;var a=this.colModel.getCellEditor(b,g);if(!a){return}if(!a.rendered){a.render(this.view.getEditorParent(a))}(function(){a.row=g;a.col=b;a.record=c;a.on("complete",this.onEditComplete,this,{single:true});a.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=a;var e=this.preEditValue(c,f);a.startEdit(this.view.getCell(g,b).firstChild,e===undefined?"":e)}).defer(50,this)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&typeof b=="string"?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&typeof c=="string"?Ext.util.Format.htmlEncode(c):c},stopEditing:function(a){if(this.activeEditor){this.activeEditor[a===true?"cancelEdit":"completeEdit"]()}this.activeEditor=null}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation-debug.js	(revision 625)
@@ -0,0 +1,4765 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GridPanel
+ * @extends Ext.Panel
+ * <p>This class represents the primary interface of a component based grid control to represent data
+ * in a tabular format of rows and columns. The GridPanel is composed of the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>{@link Ext.data.Store Store}</b> : The Model holding the data records (rows)
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.ColumnModel Column model}</b> : Column makeup
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.GridView View}</b> : Encapsulates the user interface 
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.AbstractSelectionModel selection model}</b> : Selection behavior 
+ * <div class="sub-desc"></div></li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    {@link #store}: new (@link Ext.data.Store}({
+        {@link Ext.data.Store#autoDestroy autoDestroy}: true,
+        {@link Ext.data.Store#reader reader}: reader,
+        {@link Ext.data.Store#data data}: xg.dummyData
+    }),
+    {@link #columns}: [
+        {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'},
+        {header: 'Price', width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+        {header: 'Change', width: 120, sortable: true, dataIndex: 'change'},
+        {header: '% Change', width: 120, sortable: true, dataIndex: 'pctChange'},
+        // instead of specifying renderer: Ext.util.Format.dateRenderer('m/d/Y') use xtype
+        {header: 'Last Updated', width: 135, sortable: true, dataIndex: 'lastChange', xtype: 'datecolumn', format: 'M d, Y'}
+    ],
+    {@link #viewConfig}: {
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+
+//      Return CSS class to apply to rows depending upon data values
+        {@link Ext.grid.GridView#getRowClass getRowClass}: function(record, index) {
+            var c = record.{@link Ext.data.Record#get get}('change');
+            if (c < 0) {
+                return 'price-fall';
+            } else if (c > 0) {
+                return 'price-rise';
+            }
+        }
+    },
+    {@link #sm}: new Ext.grid.RowSelectionModel({singleSelect:true}),
+    width: 600,
+    height: 300,
+    frame: true,
+    title: 'Framed with Row Selection and Horizontal Scrolling',
+    iconCls: 'icon-grid'
+});
+ * </code></pre>
+ * <p><b><u>Notes:</u></b></p>
+ * <div class="mdetail-params"><ul>
+ * <li>Although this class inherits many configuration options from base classes, some of them
+ * (such as autoScroll, autoWidth, layout, items, etc) are not used by this class, and will
+ * have no effect.</li>
+ * <li>A grid <b>requires</b> a width in which to scroll its columns, and a height in which to
+ * scroll its rows. These dimensions can either be set explicitly through the
+ * <tt>{@link Ext.BoxComponent#height height}</tt> and <tt>{@link Ext.BoxComponent#width width}</tt>
+ * configuration options or implicitly set by using the grid as a child item of a
+ * {@link Ext.Container Container} which will have a {@link Ext.Container#layout layout manager}
+ * provide the sizing of its child items (for example the Container of the Grid may specify
+ * <tt>{@link Ext.Container#layout layout}:'fit'</tt>).</li>
+ * <li>To access the data in a Grid, it is necessary to use the data model encapsulated
+ * by the {@link #store Store}. See the {@link #cellclick} event for more details.</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype grid
+ */
+Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {String} autoExpandColumn
+     * <p>The <tt>{@link Ext.grid.Column#id id}</tt> of a {@link Ext.grid.Column column} in
+     * this grid that should expand to fill unused space. This value specified here can not
+     * be <tt>0</tt>.</p>
+     * <br><p><b>Note</b>: If the Grid's {@link Ext.grid.GridView view} is configured with
+     * <tt>{@link Ext.grid.GridView#forceFit forceFit}=true</tt> the <tt>autoExpandColumn</tt>
+     * is ignored. See {@link Ext.grid.Column}.<tt>{@link Ext.grid.Column#width width}</tt>
+     * for additional details.</p>
+     * <p>See <tt>{@link #autoExpandMax}</tt> and <tt>{@link #autoExpandMin}</tt> also.</p>
+     */
+    autoExpandColumn : false,
+    /**
+     * @cfg {Number} autoExpandMax The maximum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>1000</tt>.
+     */
+    autoExpandMax : 1000,
+    /**
+     * @cfg {Number} autoExpandMin The minimum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>50</tt>.
+     */
+    autoExpandMin : 50,
+    /**
+     * @cfg {Boolean} columnLines <tt>true</tt> to add css for column separation lines.
+     * Default is <tt>false</tt>.
+     */
+    columnLines : false,
+    /**
+     * @cfg {Object} cm Shorthand for <tt>{@link #colModel}</tt>.
+     */
+    /**
+     * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required).
+     */
+    /**
+     * @cfg {Array} columns An array of {@link Ext.grid.Column columns} to auto create a
+     * {@link Ext.grid.ColumnModel}.  The ColumnModel may be explicitly created via the
+     * <tt>{@link #colModel}</tt> configuration property.
+     */
+    /**
+     * @cfg {String} ddGroup The DD group this GridPanel belongs to. Defaults to <tt>'GridDD'</tt> if not specified.
+     */
+    /**
+     * @cfg {String} ddText
+     * Configures the text in the drag proxy.  Defaults to:
+     * <pre><code>
+     * ddText : '{0} selected row{1}'
+     * </code></pre>
+     * <tt>{0}</tt> is replaced with the number of selected rows.
+     */
+    ddText : '{0} selected row{1}',
+    /**
+     * @cfg {Boolean} deferRowRender <P>Defaults to <tt>true</tt> to enable deferred row rendering.</p>
+     * <p>This allows the GridPanel to be initially rendered empty, with the expensive update of the row
+     * structure deferred so that layouts with GridPanels appear more quickly.</p>
+     */
+    deferRowRender : true,
+    /**
+     * @cfg {Boolean} disableSelection <p><tt>true</tt> to disable selections in the grid. Defaults to <tt>false</tt>.</p>
+     * <p>Ignored if a {@link #selModel SelectionModel} is specified.</p>
+     */
+    /**
+     * @cfg {Boolean} enableColumnResize <tt>false</tt> to turn off column resizing for the whole grid. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} enableColumnHide Defaults to <tt>true</tt> to enable hiding of columns with the header context menu.
+     */
+    enableColumnHide : true,
+    /**
+     * @cfg {Boolean} enableColumnMove Defaults to <tt>true</tt> to enable drag and drop reorder of columns. <tt>false</tt>
+     * to turn off column reordering via drag drop.
+     */
+    enableColumnMove : true,
+    /**
+     * @cfg {Boolean} enableDragDrop <p>Enables dragging of the selected rows of the GridPanel. Defaults to <tt>false</tt>.</p>
+     * <p>Setting this to <b><tt>true</tt></b> causes this GridPanel's {@link #getView GridView} to
+     * create an instance of {@link Ext.grid.GridDragZone}. <b>Note</b>: this is available only <b>after</b>
+     * the Grid has been rendered as the GridView's <tt>{@link Ext.grid.GridView#dragZone dragZone}</tt>
+     * property.</p>
+     * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of
+     * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} are able
+     * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.</p>
+     */
+    enableDragDrop : false,
+    /**
+     * @cfg {Boolean} enableHdMenu Defaults to <tt>true</tt> to enable the drop down button for menu in the headers.
+     */
+    enableHdMenu : true,
+    /**
+     * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to <code>false</code>.
+     */
+    /**
+     * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while
+     * loading. Defaults to <code>false</code>.
+     */
+    loadMask : false,
+    /**
+     * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if <tt>autoHeight</tt> is not on.
+     */
+    /**
+     * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to <tt>25</tt>.
+     */
+    minColumnWidth : 25,
+    /**
+     * @cfg {Object} sm Shorthand for <tt>{@link #selModel}</tt>.
+     */
+    /**
+     * @cfg {Object} selModel Any subclass of {@link Ext.grid.AbstractSelectionModel} that will provide
+     * the selection model for the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified).
+     */
+    /**
+     * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} stripeRows <tt>true</tt> to stripe the rows. Default is <tt>false</tt>.
+     * <p>This causes the CSS class <tt><b>x-grid3-row-alt</b></tt> to be added to alternate rows of
+     * the grid. A default CSS rule is provided which sets a background colour, but you can override this
+     * with a rule which either overrides the <b>background-color</b> style using the '!important'
+     * modifier, or which uses a CSS selector of higher specificity.</p>
+     */
+    stripeRows : false,
+    /**
+     * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is <tt>true</tt>
+     * for GridPanel, but <tt>false</tt> for EditorGridPanel.
+     */
+    trackMouseOver : true,
+    /**
+     * @cfg {Array} stateEvents
+     * An array of events that, when fired, should trigger this component to save its state.
+     * Defaults to:<pre><code>
+     * stateEvents: ['columnmove', 'columnresize', 'sortchange']
+     * </code></pre>
+     * <p>These can be any types of events supported by this component, including browser or
+     * custom events (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See {@link Ext.Component#stateful} for an explanation of saving and restoring
+     * Component state.</p>
+     */
+    stateEvents : ['columnmove', 'columnresize', 'sortchange'],
+    /**
+     * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set
+     * before a call to {@link Ext.Component#render render()}.
+     */
+    view : null,
+    /**
+     * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view.  Any of
+     * the config options available for {@link Ext.grid.GridView} can be specified here. This option
+     * is ignored if <tt>{@link #view}</tt> is specified.
+     */
+
+    // private
+    rendered : false,
+    // private
+    viewReady : false,
+
+    // private
+    initComponent : function(){
+        Ext.grid.GridPanel.superclass.initComponent.call(this);
+
+        if(this.columnLines){
+            this.cls = (this.cls || '') + ' x-grid-with-col-lines';
+        }
+        // override any provided value since it isn't valid
+        // and is causing too many bug reports ;)
+        this.autoScroll = false;
+        this.autoWidth = false;
+
+        if(Ext.isArray(this.columns)){
+            this.colModel = new Ext.grid.ColumnModel(this.columns);
+            delete this.columns;
+        }
+
+        // check and correct shorthanded configs
+        if(this.ds){
+            this.store = this.ds;
+            delete this.ds;
+        }
+        if(this.cm){
+            this.colModel = this.cm;
+            delete this.cm;
+        }
+        if(this.sm){
+            this.selModel = this.sm;
+            delete this.sm;
+        }
+        this.store = Ext.StoreMgr.lookup(this.store);
+
+        this.addEvents(
+            // raw events
+            /**
+             * @event click
+             * The raw click event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event dblclick
+             * The raw dblclick event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'dblclick',
+            /**
+             * @event contextmenu
+             * The raw contextmenu event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'contextmenu',
+            /**
+             * @event mousedown
+             * The raw mousedown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mousedown',
+            /**
+             * @event mouseup
+             * The raw mouseup event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseup',
+            /**
+             * @event mouseover
+             * The raw mouseover event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * The raw mouseout event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseout',
+            /**
+             * @event keypress
+             * The raw keypress event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keypress',
+            /**
+             * @event keydown
+             * The raw keydown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+
+            // custom events
+            /**
+             * @event cellmousedown
+             * Fires before a cell is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellmousedown',
+            /**
+             * @event rowmousedown
+             * Fires before a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowmousedown',
+            /**
+             * @event headermousedown
+             * Fires before a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headermousedown',
+
+            /**
+             * @event cellclick
+             * Fires when a cell is clicked.
+             * The data for the cell is drawn from the {@link Ext.data.Record Record}
+             * for this row. To access the data in the listener function use the
+             * following technique:
+             * <pre><code>
+function(grid, rowIndex, columnIndex, e) {
+    var record = grid.getStore().getAt(rowIndex);  // Get the Record
+    var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
+    var data = record.get(fieldName);
+}
+</code></pre>
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellclick',
+            /**
+             * @event celldblclick
+             * Fires when a cell is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'celldblclick',
+            /**
+             * @event rowclick
+             * Fires when a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowclick',
+            /**
+             * @event rowdblclick
+             * Fires when a row is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowdblclick',
+            /**
+             * @event headerclick
+             * Fires when a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerclick',
+            /**
+             * @event headerdblclick
+             * Fires when a header cell is double clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerdblclick',
+            /**
+             * @event rowcontextmenu
+             * Fires when a row is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowcontextmenu',
+            /**
+             * @event cellcontextmenu
+             * Fires when a cell is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} cellIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellcontextmenu',
+            /**
+             * @event headercontextmenu
+             * Fires when a header is right clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headercontextmenu',
+            /**
+             * @event bodyscroll
+             * Fires when the body element is scrolled
+             * @param {Number} scrollLeft
+             * @param {Number} scrollTop
+             */
+            'bodyscroll',
+            /**
+             * @event columnresize
+             * Fires when the user resizes a column
+             * @param {Number} columnIndex
+             * @param {Number} newSize
+             */
+            'columnresize',
+            /**
+             * @event columnmove
+             * Fires when the user moves a column
+             * @param {Number} oldIndex
+             * @param {Number} newIndex
+             */
+            'columnmove',
+            /**
+             * @event sortchange
+             * Fires when the grid's store sort changes
+             * @param {Grid} this
+             * @param {Object} sortInfo An object with the keys field and direction
+             */
+            'sortchange',
+            /**
+             * @event reconfigure
+             * Fires when the grid is reconfigured with a new store and/or column model.
+             * @param {Grid} this
+             * @param {Ext.data.Store} store The new store
+             * @param {Ext.grid.ColumnModel} colModel The new column model
+             */
+            'reconfigure'
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);
+
+        var c = this.body;
+
+        this.el.addClass('x-grid-panel');
+
+        var view = this.getView();
+        view.init(this);
+
+        this.mon(c, {
+            mousedown: this.onMouseDown,
+            click: this.onClick,
+            dblclick: this.onDblClick,
+            contextmenu: this.onContextMenu,
+            keydown: this.onKeyDown,
+            scope: this
+        });
+
+        this.relayEvents(c, ['mousedown','mouseup','mouseover','mouseout','keypress']);
+
+        this.getSelectionModel().init(this);
+        this.view.render();
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.GridPanel.superclass.initEvents.call(this);
+
+        if(this.loadMask){
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({store:this.store}, this.loadMask));
+        }
+    },
+
+    initStateEvents : function(){
+        Ext.grid.GridPanel.superclass.initStateEvents.call(this);
+        this.mon(this.colModel, 'hiddenchange', this.saveState, this, {delay: 100});
+    },
+
+    applyState : function(state){
+        var cm = this.colModel;
+        var cs = state.columns;
+        if(cs){
+            for(var i = 0, len = cs.length; i < len; i++){
+                var s = cs[i];
+                var c = cm.getColumnById(s.id);
+                if(c){
+                    c.hidden = s.hidden;
+                    c.width = s.width;
+                    var oldIndex = cm.getIndexById(s.id);
+                    if(oldIndex != i){
+                        cm.moveColumn(oldIndex, i);
+                    }
+                }
+            }
+        }
+        if(state.sort && this.store){
+            this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction);
+        }
+        delete state.columns;
+        delete state.sort;
+        Ext.grid.GridPanel.superclass.applyState.call(this, state);
+    },
+
+    getState : function(){
+        var o = {columns: []};
+        for(var i = 0, c; (c = this.colModel.config[i]); i++){
+            o.columns[i] = {
+                id: c.id,
+                width: c.width
+            };
+            if(c.hidden){
+                o.columns[i].hidden = true;
+            }
+        }
+        if(this.store){
+            var ss = this.store.getSortState();
+            if(ss){
+                o.sort = ss;
+            }
+        }
+        return o;
+    },
+
+    // private
+    afterRender : function(){
+        Ext.grid.GridPanel.superclass.afterRender.call(this);
+        this.view.layout();
+        if(this.deferRowRender){
+            this.view.afterRender.defer(10, this.view);
+        }else{
+            this.view.afterRender();
+        }
+        this.viewReady = true;
+    },
+
+    /**
+     * <p>Reconfigures the grid to use a different Store and Column Model
+     * and fires the 'reconfigure' event. The View will be bound to the new
+     * objects and refreshed.</p>
+     * <p>Be aware that upon reconfiguring a GridPanel, certain existing settings <i>may</i> become
+     * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the
+     * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound
+     * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring
+     * with the new data.</p>
+     * @param {Ext.data.Store} store The new {@link Ext.data.Store} object
+     * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object
+     */
+    reconfigure : function(store, colModel){
+        if(this.loadMask){
+            this.loadMask.destroy();
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({}, {store:store}, this.initialConfig.loadMask));
+        }
+        this.view.initData(store, colModel);
+        this.store = store;
+        this.colModel = colModel;
+        if(this.rendered){
+            this.view.refresh(true);
+        }
+        this.fireEvent('reconfigure', this, store, colModel);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', e);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.rendered){
+            var c = this.body;
+            c.removeAllListeners();
+            c.update('');
+            Ext.destroy(this.view, this.loadMask);
+        }else if(this.store && this.store.autoDestroy){
+            this.store.destroy();
+        }
+        Ext.destroy(this.colModel, this.selModel);
+        this.store = this.selModel = this.colModel = this.view = this.loadMask = null;
+        Ext.grid.GridPanel.superclass.onDestroy.call(this);
+    },
+
+    // private
+    processEvent : function(name, e){
+        this.fireEvent(name, e);
+        var t = e.getTarget();
+        var v = this.view;
+        var header = v.findHeaderIndex(t);
+        if(header !== false){
+            this.fireEvent('header' + name, this, header, e);
+        }else{
+            var row = v.findRowIndex(t);
+            var cell = v.findCellIndex(t);
+            if(row !== false){
+                this.fireEvent('row' + name, this, row, e);
+                if(cell !== false){
+                    this.fireEvent('cell' + name, this, row, cell, e);
+                }
+            }
+        }
+    },
+
+    // private
+    onClick : function(e){
+        this.processEvent('click', e);
+    },
+
+    // private
+    onMouseDown : function(e){
+        this.processEvent('mousedown', e);
+    },
+
+    // private
+    onContextMenu : function(e, t){
+        this.processEvent('contextmenu', e);
+    },
+
+    // private
+    onDblClick : function(e){
+        this.processEvent('dblclick', e);
+    },
+
+    // private
+    walkCells : function(row, col, step, fn, scope){
+        var cm = this.colModel, clen = cm.getColumnCount();
+        var ds = this.store, rlen = ds.getCount(), first = true;
+        if(step < 0){
+            if(col < 0){
+                row--;
+                first = false;
+            }
+            while(row >= 0){
+                if(!first){
+                    col = clen-1;
+                }
+                first = false;
+                while(col >= 0){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col--;
+                }
+                row--;
+            }
+        } else {
+            if(col >= clen){
+                row++;
+                first = false;
+            }
+            while(row < rlen){
+                if(!first){
+                    col = 0;
+                }
+                first = false;
+                while(col < clen){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col++;
+                }
+                row++;
+            }
+        }
+        return null;
+    },
+
+    // private
+    onResize : function(){
+        Ext.grid.GridPanel.superclass.onResize.apply(this, arguments);
+        if(this.viewReady){
+            this.view.layout();
+        }
+    },
+
+    /**
+     * Returns the grid's underlying element.
+     * @return {Element} The element
+     */
+    getGridEl : function(){
+        return this.body;
+    },
+
+    // private for compatibility, overridden by editor grid
+    stopEditing : Ext.emptyFn,
+
+    /**
+     * Returns the grid's selection model configured by the <code>{@link #selModel}</code>
+     * configuration option. If no selection model was configured, this will create
+     * and return a {@link Ext.grid.RowSelectionModel RowSelectionModel}.
+     * @return {SelectionModel}
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.grid.RowSelectionModel(
+                    this.disableSelection ? {selectRow: Ext.emptyFn} : null);
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Returns the grid's data store.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Returns the grid's ColumnModel.
+     * @return {Ext.grid.ColumnModel} The column model
+     */
+    getColumnModel : function(){
+        return this.colModel;
+    },
+
+    /**
+     * Returns the grid's GridView object.
+     * @return {Ext.grid.GridView} The grid view
+     */
+    getView : function(){
+        if(!this.view){
+            this.view = new Ext.grid.GridView(this.viewConfig);
+        }
+        return this.view;
+    },
+    /**
+     * Called to get grid's drag proxy text, by default returns this.ddText.
+     * @return {String} The text
+     */
+    getDragDropText : function(){
+        var count = this.selModel.getCount();
+        return String.format(this.ddText, count, count == 1 ? '' : 's');
+    }
+
+    /** 
+     * @cfg {String/Number} activeItem 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoDestroy 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object/String/Function} autoLoad 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoWidth 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean/Number} bufferResize 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} defaultType 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} defaults 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} hideBorders 
+     * @hide 
+     */
+    /** 
+     * @cfg {Mixed} items 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} layout 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} layoutConfig 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} monitorResize 
+     * @hide 
+     */
+    /** 
+     * @property items 
+     * @hide 
+     */
+    /** 
+     * @method add 
+     * @hide 
+     */
+    /** 
+     * @method cascade 
+     * @hide 
+     */
+    /** 
+     * @method doLayout 
+     * @hide 
+     */
+    /** 
+     * @method find 
+     * @hide 
+     */
+    /** 
+     * @method findBy 
+     * @hide 
+     */
+    /** 
+     * @method findById 
+     * @hide 
+     */
+    /** 
+     * @method findByType 
+     * @hide 
+     */
+    /** 
+     * @method getComponent 
+     * @hide 
+     */
+    /** 
+     * @method getLayout 
+     * @hide 
+     */
+    /** 
+     * @method getUpdater 
+     * @hide 
+     */
+    /** 
+     * @method insert 
+     * @hide 
+     */
+    /** 
+     * @method load 
+     * @hide 
+     */
+    /** 
+     * @method remove 
+     * @hide 
+     */
+    /** 
+     * @event add 
+     * @hide 
+     */
+    /** 
+     * @event afterLayout 
+     * @hide 
+     */
+    /** 
+     * @event beforeadd 
+     * @hide 
+     */
+    /** 
+     * @event beforeremove 
+     * @hide 
+     */
+    /** 
+     * @event remove 
+     * @hide 
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} autoScroll  @hide
+     */
+    /**
+     * @cfg {String} bodyBorder  @hide
+     */
+    /**
+     * @cfg {String} bodyStyle  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+Ext.reg('grid', Ext.grid.GridPanel);/**
+ * @class Ext.grid.GridView
+ * @extends Ext.util.Observable
+ * <p>This class encapsulates the user interface of an {@link Ext.grid.GridPanel}.
+ * Methods of this class may be used to access user interface elements to enable
+ * special display effects. Do not change the DOM structure of the user interface.</p>
+ * <p>This class does not provide ways to manipulate the underlying data. The data
+ * model of a Grid is held in an {@link Ext.data.Store}.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GridView = function(config){
+    Ext.apply(this, config);
+    // These events are only used internally by the grid components
+    this.addEvents(
+        /**
+         * @event beforerowremoved
+         * Internal UI Event. Fired before a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row to be removed.
+         * @param {Ext.data.Record} record The Record to be removed
+         */
+        "beforerowremoved",
+        /**
+         * @event beforerowsinserted
+         * Internal UI Event. Fired before rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first row to be inserted.
+         * @param {Number} lastRow The index of the last row to be inserted.
+         */
+        "beforerowsinserted",
+        /**
+         * @event beforerefresh
+         * Internal UI Event. Fired before the view is refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "beforerefresh",
+        /**
+         * @event rowremoved
+         * Internal UI Event. Fired after a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row that was removed.
+         * @param {Ext.data.Record} record The Record that was removed
+         */
+        "rowremoved",
+        /**
+         * @event rowsinserted
+         * Internal UI Event. Fired after rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first inserted.
+         * @param {Number} lastRow The index of the last row inserted.
+         */
+        "rowsinserted",
+        /**
+         * @event rowupdated
+         * Internal UI Event. Fired after a row has been updated.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the row updated.
+         * @param {Ext.data.record} record The Record backing the row updated.
+         */
+        "rowupdated",
+        /**
+         * @event refresh
+         * Internal UI Event. Fired after the GridView's body has been refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "refresh"
+    );
+    Ext.grid.GridView.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.GridView, Ext.util.Observable, {
+    /**
+     * Override this function to apply custom CSS classes to rows during rendering.  You can also supply custom
+     * parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
+     * parameter.  This function should return the CSS class name (or empty string '' for none) that will be added
+     * to the row's wrapping div.  To apply multiple class names, simply return them space-delimited within the string
+     * (e.g., 'my-class another-class'). Example usage:
+    <pre><code>
+viewConfig: {
+    forceFit: true,
+    showPreview: true, // custom property
+    enableRowBody: true, // required to create a second, full-width row to show expanded Record data
+    getRowClass: function(record, rowIndex, rp, ds){ // rp = rowParams
+        if(this.showPreview){
+            rp.body = '&lt;p>'+record.data.excerpt+'&lt;/p>';
+            return 'x-grid3-row-expanded';
+        }
+        return 'x-grid3-row-collapsed';
+    }
+},     
+    </code></pre>
+     * @param {Record} record The {@link Ext.data.Record} corresponding to the current row.
+     * @param {Number} index The row index.
+     * @param {Object} rowParams A config object that is passed to the row template during rendering that allows
+     * customization of various aspects of a grid row.
+     * <p>If {@link #enableRowBody} is configured <b><tt></tt>true</b>, then the following properties may be set
+     * by this function, and will be used to render a full-width expansion row below each grid row:</p>
+     * <ul>
+     * <li><code>body</code> : String <div class="sub-desc">An HTML fragment to be used as the expansion row's body content (defaults to '').</div></li>
+     * <li><code>bodyStyle</code> : String <div class="sub-desc">A CSS style specification that will be applied to the expansion row's &lt;tr> element. (defaults to '').</div></li>
+     * </ul>
+     * The following property will be passed in, and may be appended to:
+     * <ul>
+     * <li><code>tstyle</code> : String <div class="sub-desc">A CSS style specification that willl be applied to the &lt;table> element which encapsulates
+     * both the standard grid row, and any expansion row.</div></li>
+     * </ul>
+     * @param {Store} store The {@link Ext.data.Store} this grid is bound to
+     * @method getRowClass
+     * @return {String} a CSS class name to add to the row.
+     */
+    /**
+     * @cfg {Boolean} enableRowBody True to add a second TR element per row that can be used to provide a row body
+     * that spans beneath the data row.  Use the {@link #getRowClass} method's rowParams config to customize the row body.
+     */
+    /**
+     * @cfg {String} emptyText Default text (html tags are accepted) to display in the grid body when no rows
+     * are available (defaults to ''). This value will be used to update the <tt>{@link #mainBody}</tt>:
+    <pre><code>
+    this.mainBody.update('&lt;div class="x-grid-empty">' + this.emptyText + '&lt;/div>');
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} headersDisabled True to disable the grid column headers (defaults to <tt>false</tt>). 
+     * Use the {@link Ext.grid.ColumnModel ColumnModel} <tt>{@link Ext.grid.ColumnModel#menuDisabled menuDisabled}</tt>
+     * config to disable the <i>menu</i> for individual columns.  While this config is true the
+     * following will be disabled:<div class="mdetail-params"><ul>
+     * <li>clicking on header to sort</li>
+     * <li>the trigger to reveal the menu.</li>
+     * </ul></div>
+     */
+    /**
+     * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations
+     * of the template methods of DragZone to enable dragging of the selected rows of a GridPanel.
+     * See {@link Ext.grid.GridDragZone} for details.</p>
+     * <p>This will <b>only</b> be present:<div class="mdetail-params"><ul>
+     * <li><i>if</i> the owning GridPanel was configured with {@link Ext.grid.GridPanel#enableDragDrop enableDragDrop}: <tt>true</tt>.</li>
+     * <li><i>after</i> the owning GridPanel has been rendered.</li>
+     * </ul></div>
+     * @property dragZone
+     * @type {Ext.grid.GridDragZone}
+     */
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer <tt>{@link #emptyText}</tt> being applied until the store's
+     * first load (defaults to <tt>true</tt>).
+     */
+    deferEmptyText : true,
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the vertical scrollbar
+     * (defaults to <tt>19</tt> pixels).
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean} autoFill
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * when the grid is <b>initially rendered</b>.  The 
+     * {@link Ext.grid.Column#width initially configured width}</tt> of each column will be adjusted
+     * to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually
+     * or programmatically), the other columns in the grid will <b>not</b> be resized to fit the grid width.
+     * See <tt>{@link #forceFit}</tt> also.
+     */
+    autoFill : false,
+    /**
+     * @cfg {Boolean} forceFit
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * at <b>all times</b>.  The {@link Ext.grid.Column#width initially configured width}</tt> of each
+     * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are
+     * later resized (manually or programmatically), the other columns in the grid <b>will</b> be resized
+     * to fit the grid width. See <tt>{@link #autoFill}</tt> also.
+     */
+    forceFit : false,
+    /**
+     * @cfg {Array} sortClasses The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+    /**
+     * @cfg {String} sortAscText The text displayed in the "Sort Ascending" menu item (defaults to <tt>"Sort Ascending"</tt>)
+     */
+    sortAscText : "Sort Ascending",
+    /**
+     * @cfg {String} sortDescText The text displayed in the "Sort Descending" menu item (defaults to <tt>"Sort Descending"</tt>)
+     */
+    sortDescText : "Sort Descending",
+    /**
+     * @cfg {String} columnsText The text displayed in the "Columns" menu item (defaults to <tt>"Columns"</tt>)
+     */
+    columnsText : "Columns",
+
+    /**
+     * @cfg {String} selectedRowClass The CSS class applied to a selected row (defaults to <tt>"x-grid3-row-selected"</tt>). An
+     * example overriding the default styling:
+    <pre><code>
+    .x-grid3-row-selected {background-color: yellow;}
+    </code></pre>
+     * Note that this only controls the row, and will not do anything for the text inside it.  To style inner
+     * facets (like text) use something like:
+    <pre><code>
+    .x-grid3-row-selected .x-grid3-cell-inner {
+        color: #FFCC00;
+    }
+    </code></pre>
+     * @type String
+     */
+    selectedRowClass : "x-grid3-row-selected",
+
+    // private
+    borderWidth : 2,
+    tdClass : 'x-grid3-cell',
+    hdCls : 'x-grid3-hd',
+    markDirty : true,
+
+    /**
+     * @cfg {Number} cellSelectorDepth The number of levels to search for cells in event delegation (defaults to <tt>4</tt>)
+     */
+    cellSelectorDepth : 4,
+    /**
+     * @cfg {Number} rowSelectorDepth The number of levels to search for rows in event delegation (defaults to <tt>10</tt>)
+     */
+    rowSelectorDepth : 10,
+
+    /**
+     * @cfg {String} cellSelector The selector used to find cells internally (defaults to <tt>'td.x-grid3-cell'</tt>)
+     */
+    cellSelector : 'td.x-grid3-cell',
+    /**
+     * @cfg {String} rowSelector The selector used to find rows internally (defaults to <tt>'div.x-grid3-row'</tt>)
+     */
+    rowSelector : 'div.x-grid3-row',
+    
+    // private
+    firstRowCls: 'x-grid3-row-first',
+    lastRowCls: 'x-grid3-row-last',
+    rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,
+
+    /* -------------------------------- UI Specific ----------------------------- */
+
+    // private
+    initTemplates : function(){
+        var ts = this.templates || {};
+        if(!ts.master){
+            ts.master = new Ext.Template(
+                    '<div class="x-grid3" hidefocus="true">',
+                        '<div class="x-grid3-viewport">',
+                            '<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>',
+                            '<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',
+                        '</div>',
+                        '<div class="x-grid3-resize-marker">&#160;</div>',
+                        '<div class="x-grid3-resize-proxy">&#160;</div>',
+                    '</div>'
+                    );
+        }
+
+        if(!ts.header){
+            ts.header = new Ext.Template(
+                    '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',
+                    '</table>'
+                    );
+        }
+
+        if(!ts.hcell){
+            ts.hcell = new Ext.Template(
+                    '<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">', this.grid.enableHdMenu ? '<a class="x-grid3-hd-btn" href="#"></a>' : '',
+                    '{value}<img class="x-grid3-sort-icon" src="', Ext.BLANK_IMAGE_URL, '" />',
+                    '</div></td>'
+                    );
+        }
+
+        if(!ts.body){
+            ts.body = new Ext.Template('{rows}');
+        }
+
+        if(!ts.row){
+            ts.row = new Ext.Template(
+                    '<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<tbody><tr>{cells}</tr>',
+                    (this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''),
+                    '</tbody></table></div>'
+                    );
+        }
+
+        if(!ts.cell){
+            ts.cell = new Ext.Template(
+                    '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>',
+                    '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',
+                    '</td>'
+                    );
+        }
+
+        for(var k in ts){
+            var t = ts[k];
+            if(t && typeof t.compile == 'function' && !t.compiled){
+                t.disableFormats = true;
+                t.compile();
+            }
+        }
+
+        this.templates = ts;
+        this.colRe = new RegExp("x-grid3-td-([^\\s]+)", "");
+    },
+
+    // private
+    fly : function(el){
+        if(!this._flyweight){
+            this._flyweight = new Ext.Element.Flyweight(document.body);
+        }
+        this._flyweight.dom = el;
+        return this._flyweight;
+    },
+
+    // private
+    getEditorParent : function(){
+        return this.scroller.dom;
+    },
+
+    // private
+    initElements : function(){
+        var E = Ext.Element;
+
+        var el = this.grid.getGridEl().dom.firstChild;
+        var cs = el.childNodes;
+
+        this.el = new E(el);
+
+        this.mainWrap = new E(cs[0]);
+        this.mainHd = new E(this.mainWrap.dom.firstChild);
+
+        if(this.grid.hideHeaders){
+            this.mainHd.setDisplayed(false);
+        }
+
+        this.innerHd = this.mainHd.dom.firstChild;
+        this.scroller = new E(this.mainWrap.dom.childNodes[1]);
+        if(this.forceFit){
+            this.scroller.setStyle('overflow-x', 'hidden');
+        }
+        /**
+         * <i>Read-only</i>. The GridView's body Element which encapsulates all rows in the Grid.
+         * This {@link Ext.Element Element} is only available after the GridPanel has been rendered.
+         * @type Ext.Element
+         * @property mainBody
+         */
+        this.mainBody = new E(this.scroller.dom.firstChild);
+
+        this.focusEl = new E(this.scroller.dom.childNodes[1]);
+        this.focusEl.swallowEvent("click", true);
+
+        this.resizeMarker = new E(cs[1]);
+        this.resizeProxy = new E(cs[2]);
+    },
+
+    // private
+    getRows : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // finder methods, used with delegation
+
+    // private
+    findCell : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid column which contains the passed element.</p>
+ * See also {@link #findRowIndex}
+ * @param {Element} el The target element
+ * @return The column index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findCellIndex : function(el, requiredCls){
+        var cell = this.findCell(el);
+        if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){
+            return this.getCellIndex(cell);
+        }
+        return false;
+    },
+
+    // private
+    getCellIndex : function(el){
+        if(el){
+            var m = el.className.match(this.colRe);
+            if(m && m[1]){
+                return this.cm.getIndexById(m[1]);
+            }
+        }
+        return false;
+    },
+
+    // private
+    findHeaderCell : function(el){
+        var cell = this.findCell(el);
+        return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null;
+    },
+
+    // private
+    findHeaderIndex : function(el){
+        return this.findCellIndex(el, this.hdCls);
+    },
+
+/**
+ * Return the HtmlElement representing the grid row which contains the passed element.
+ * @param {Element} el The target element
+ * @return The row element, or null if the target element is not within a row of this GridView.
+ */
+    findRow : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid row which contains the passed element.</p>
+ * See also {@link #findCellIndex}
+ * @param {Element} el The target element
+ * @return The row index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findRowIndex : function(el){
+        var r = this.findRow(el);
+        return r ? r.rowIndex : false;
+    },
+
+    // getter methods for fetching elements dynamically in the grid
+
+/**
+ * Return the <tt>&lt;div></tt> HtmlElement which represents a Grid row for the specified index.
+ * @param {Number} index The row index
+ * @return {HtmlElement} The div element.
+ */
+    getRow : function(row){
+        return this.getRows()[row];
+    },
+
+/**
+ * Returns the grid's <tt>&lt;td></tt> HtmlElement at the specified coordinates.
+ * @param {Number} row The row index in which to find the cell.
+ * @param {Number} col The column index of the cell.
+ * @return {HtmlElement} The td at the specified coordinates.
+ */
+    getCell : function(row, col){
+        return this.getRow(row).getElementsByTagName('td')[col];
+    },
+
+/**
+ * Return the <tt>&lt;td></tt> HtmlElement which represents the Grid's header cell for the specified column index.
+ * @param {Number} index The column index
+ * @return {HtmlElement} The td element.
+ */
+    getHeaderCell : function(index){
+      return this.mainHd.dom.getElementsByTagName('td')[index];
+    },
+
+    // manipulating elements
+
+    // private - use getRowClass to apply custom row classes
+    addRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).addClass(cls);
+        }
+    },
+
+    // private
+    removeRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).removeClass(cls);
+        }
+    },
+
+    // private
+    removeRow : function(row){
+        Ext.removeNode(this.getRow(row));
+        this.syncFocusEl(row);
+    },
+    
+    // private
+    removeRows : function(firstRow, lastRow){
+        var bd = this.mainBody.dom;
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            Ext.removeNode(bd.childNodes[firstRow]);
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // scrolling stuff
+
+    // private
+    getScrollState : function(){
+        var sb = this.scroller.dom;
+        return {left: sb.scrollLeft, top: sb.scrollTop};
+    },
+
+    // private
+    restoreScroll : function(state){
+        var sb = this.scroller.dom;
+        sb.scrollLeft = state.left;
+        sb.scrollTop = state.top;
+    },
+
+    /**
+     * Scrolls the grid to the top
+     */
+    scrollToTop : function(){
+        this.scroller.dom.scrollTop = 0;
+        this.scroller.dom.scrollLeft = 0;
+    },
+
+    // private
+    syncScroll : function(){
+      this.syncHeaderScroll();
+      var mb = this.scroller.dom;
+        this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop);
+    },
+
+    // private
+    syncHeaderScroll : function(){
+        var mb = this.scroller.dom;
+        this.innerHd.scrollLeft = mb.scrollLeft;
+        this.innerHd.scrollLeft = mb.scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore)
+    },
+
+    // private
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.mainHd.select('td').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    // private
+    updateAllColumnWidths : function(){
+        var tw = this.getTotalWidth(),
+            clen = this.cm.getColumnCount(),
+            ws = [],
+            len,
+            i;
+        for(i = 0; i < clen; i++){
+            ws[i] = this.getColumnWidth(i);
+        }
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        for(i = 0; i < clen; i++){
+            var hd = this.getHeaderCell(i);
+            hd.style.width = ws[i];
+        }
+
+        var ns = this.getRows(), row, trow;
+        for(i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                trow = row.firstChild.rows[0];
+                for (var j = 0; j < clen; j++) {
+                   trow.childNodes[j].style.width = ws[j];
+                }
+            }
+        }
+
+        this.onAllColumnWidthsUpdated(ws, tw);
+    },
+
+    // private
+    updateColumnWidth : function(col, width){
+        var w = this.getColumnWidth(col);
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var hd = this.getHeaderCell(col);
+        hd.style.width = w;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.width = w;
+            }
+        }
+
+        this.onColumnWidthUpdated(col, w, tw);
+    },
+
+    // private
+    updateColumnHidden : function(col, hidden){
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var display = hidden ? 'none' : '';
+
+        var hd = this.getHeaderCell(col);
+        hd.style.display = display;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.display = display;
+            }
+        }
+
+        this.onColumnHiddenUpdated(col, hidden, tw);
+        delete this.lastViewWidth; // force recalc
+        this.layout();
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
+        var tstyle = 'width:'+this.getTotalWidth()+';';
+        // buffers
+        var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r;
+        for(var j = 0, len = rs.length; j < len; j++){
+            r = rs[j]; cb = [];
+            var rowIndex = (j+startRow);
+            for(var i = 0; i < colCount; i++){
+                c = cs[i];
+                p.id = c.id;
+                p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+                p.attr = p.cellAttr = "";
+                p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
+                p.style = c.style;
+                if(Ext.isEmpty(p.value)){
+                    p.value = "&#160;";
+                }
+                if(this.markDirty && r.dirty && typeof r.modified[c.name] !== 'undefined'){
+                    p.css += ' x-grid3-dirty-cell';
+                }
+                cb[cb.length] = ct.apply(p);
+            }
+            var alt = [];
+            if(stripe && ((rowIndex+1) % 2 === 0)){
+                alt[0] = "x-grid3-row-alt";
+            }
+            if(r.dirty){
+                alt[1] = " x-grid3-dirty-row";
+            }
+            rp.cols = colCount;
+            if(this.getRowClass){
+                alt[2] = this.getRowClass(r, rowIndex, rp, ds);
+            }
+            rp.alt = alt.join(" ");
+            rp.cells = cb.join("");
+            buf[buf.length] =  rt.apply(rp);
+        }
+        return buf.join("");
+    },
+
+    // private
+    processRows : function(startRow, skipStripe){
+        if(!this.ds || this.ds.getCount() < 1){
+            return;
+        }
+        var rows = this.getRows();
+        skipStripe = skipStripe || !this.grid.stripeRows;
+        startRow = startRow || 0;
+        Ext.each(rows, function(row, idx){
+            row.rowIndex = idx;
+            row.className = row.className.replace(this.rowClsRe, ' ');
+            if (!skipStripe && (idx + 1) % 2 === 0) {
+                row.className += ' x-grid3-row-alt';
+            }
+        });
+        // add first/last-row classes
+        if(startRow === 0){
+            Ext.fly(rows[0]).addClass(this.firstRowCls);
+        }
+        Ext.fly(rows[rows.length - 1]).addClass(this.lastRowCls);
+    },
+
+    afterRender : function(){
+        if(!this.ds || !this.cm){
+            return;
+        }
+        this.mainBody.dom.innerHTML = this.renderRows() || '&#160;';
+        this.processRows(0, true);
+
+        if(this.deferEmptyText !== true){
+            this.applyEmptyText();
+        }
+    },
+
+    // private
+    renderUI : function(){
+
+        var header = this.renderHeaders();
+        var body = this.templates.body.apply({rows:'&#160;'});
+
+
+        var html = this.templates.master.apply({
+            body: body,
+            header: header,
+            ostyle: 'width:'+this.getOffsetWidth()+';',
+            bstyle: 'width:'+this.getTotalWidth()+';'
+        });
+
+        var g = this.grid;
+
+        g.getGridEl().dom.innerHTML = html;
+
+        this.initElements();
+
+        // get mousedowns early
+        Ext.fly(this.innerHd).on("click", this.handleHdDown, this);
+        this.mainHd.on({
+            scope: this,
+            mouseover: this.handleHdOver,
+            mouseout: this.handleHdOut,
+            mousemove: this.handleHdMove
+        });
+
+        this.scroller.on('scroll', this.syncScroll,  this);
+        if(g.enableColumnResize !== false){
+            this.splitZone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableColumnMove){
+            this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd);
+            this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableHdMenu !== false){
+            this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"});
+            this.hmenu.add(
+                {itemId:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"},
+                {itemId:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"}
+            );
+            if(g.enableColumnHide !== false){
+                this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"});
+                this.colMenu.on({
+                    scope: this,
+                    beforeshow: this.beforeColMenuShow,
+                    itemclick: this.handleHdMenuClick
+                });
+                this.hmenu.add('-', {
+                    itemId:"columns",
+                    hideOnClick: false,
+                    text: this.columnsText,
+                    menu: this.colMenu,
+                    iconCls: 'x-cols-icon'
+                });
+            }
+            this.hmenu.on("itemclick", this.handleHdMenuClick, this);
+        }
+
+        if(g.trackMouseOver){
+            this.mainBody.on({
+                scope: this,
+                mouseover: this.onRowOver,
+                mouseout: this.onRowOut
+            });
+        }
+
+        if(g.enableDragDrop || g.enableDrag){
+            this.dragZone = new Ext.grid.GridDragZone(g, {
+                ddGroup : g.ddGroup || 'GridDD'
+            });
+        }
+
+        this.updateHeaderSortState();
+
+    },
+
+    // private
+    layout : function(){
+        if(!this.mainBody){
+            return; // not rendered
+        }
+        var g = this.grid;
+        var c = g.getGridEl();
+        var csize = c.getSize(true);
+        var vw = csize.width;
+
+        if(!g.hideHeaders && (vw < 20 || csize.height < 20)){ // display: none?
+            return;
+        }
+        
+        if(g.autoHeight){
+            this.scroller.dom.style.overflow = 'visible';
+            if(Ext.isWebKit){
+                this.scroller.dom.style.position = 'static';
+            }
+        }else{
+            this.el.setSize(csize.width, csize.height);
+
+            var hdHeight = this.mainHd.getHeight();
+            var vh = csize.height - (hdHeight);
+
+            this.scroller.setSize(vw, vh);
+            if(this.innerHd){
+                this.innerHd.style.width = (vw)+'px';
+            }
+        }
+        if(this.forceFit){
+            if(this.lastViewWidth != vw){
+                this.fitColumns(false, false);
+                this.lastViewWidth = vw;
+            }
+        }else {
+            this.autoExpand();
+            this.syncHeaderScroll();
+        }
+        this.onLayout(vw, vh);
+    },
+
+    // template functions for subclasses and plugins
+    // these functions include precalculated values
+    onLayout : function(vw, vh){
+        // do nothing
+    },
+
+    onColumnWidthUpdated : function(col, w, tw){
+        //template method
+    },
+
+    onAllColumnWidthsUpdated : function(ws, tw){
+        //template method
+    },
+
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        // template method
+    },
+
+    updateColumnText : function(col, text){
+        // template method
+    },
+
+    afterMove : function(colIndex){
+        // template method
+    },
+
+    /* ----------------------------------- Core Specific -------------------------------------------*/
+    // private
+    init : function(grid){
+        this.grid = grid;
+
+        this.initTemplates();
+        this.initData(grid.store, grid.colModel);
+        this.initUI(grid);
+    },
+
+    // private
+    getColumnId : function(index){
+      return this.cm.getColumnId(index);
+    },
+    
+    // private 
+    getOffsetWidth : function() {
+        return (this.cm.getTotalWidth() + this.scrollOffset) + 'px';
+    },
+
+    // private
+    renderHeaders : function(){
+        var cm = this.cm, 
+            ts = this.templates,
+            ct = ts.hcell,
+            cb = [], 
+            p = {},
+            len = cm.getColumnCount(),
+            last = len - 1;
+            
+        for(var i = 0; i < len; i++){
+            p.id = cm.getColumnId(i);
+            p.value = cm.getColumnHeader(i) || "";
+            p.style = this.getColumnStyle(i, true);
+            p.tooltip = this.getColumnTooltip(i);
+            p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+            if(cm.config[i].align == 'right'){
+                p.istyle = 'padding-right:16px';
+            } else {
+                delete p.istyle;
+            }
+            cb[cb.length] = ct.apply(p);
+        }
+        return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'});
+    },
+
+    // private
+    getColumnTooltip : function(i){
+        var tt = this.cm.getColumnTooltip(i);
+        if(tt){
+            if(Ext.QuickTips.isEnabled()){
+                return 'ext:qtip="'+tt+'"';
+            }else{
+                return 'title="'+tt+'"';
+            }
+        }
+        return "";
+    },
+
+    // private
+    beforeUpdate : function(){
+        this.grid.stopEditing(true);
+    },
+
+    // private
+    updateHeaders : function(){
+        this.innerHd.firstChild.innerHTML = this.renderHeaders();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = this.getTotalWidth();
+    },
+
+    /**
+     * Focuses the specified row.
+     * @param {Number} row The row index
+     */
+    focusRow : function(row){
+        this.focusCell(row, 0, false);
+    },
+
+    /**
+     * Focuses the specified cell.
+     * @param {Number} row The row index
+     * @param {Number} col The column index
+     */
+    focusCell : function(row, col, hscroll){
+        this.syncFocusEl(this.ensureVisible(row, col, hscroll));
+        if(Ext.isGecko){
+            this.focusEl.focus();
+        }else{
+            this.focusEl.focus.defer(1, this.focusEl);
+        }
+    },
+
+    resolveCell : function(row, col, hscroll){
+        if(typeof row != "number"){
+            row = row.rowIndex;
+        }
+        if(!this.ds){
+            return null;
+        }
+        if(row < 0 || row >= this.ds.getCount()){
+            return null;
+        }
+        col = (col !== undefined ? col : 0);
+
+        var rowEl = this.getRow(row),
+            cm = this.cm,
+            colCount = cm.getColumnCount(),
+            cellEl;
+        if(!(hscroll === false && col === 0)){
+            while(col < colCount && cm.isHidden(col)){
+                col++;
+            }
+            cellEl = this.getCell(row, col);
+        }
+
+        return {row: rowEl, cell: cellEl};
+    },
+
+    getResolvedXY : function(resolved){
+        if(!resolved){
+            return null;
+        }
+        var s = this.scroller.dom, c = resolved.cell, r = resolved.row;
+        return c ? Ext.fly(c).getXY() : [this.el.getX(), Ext.fly(r).getY()];
+    },
+
+    syncFocusEl : function(row, col, hscroll){
+        var xy = row;
+        if(!Ext.isArray(xy)){
+            row = Math.min(row, Math.max(0, this.getRows().length-1));
+            xy = this.getResolvedXY(this.resolveCell(row, col, hscroll));
+        }
+        this.focusEl.setXY(xy||this.scroller.getXY());
+    },
+
+    ensureVisible : function(row, col, hscroll){
+        var resolved = this.resolveCell(row, col, hscroll);
+        if(!resolved || !resolved.row){
+            return;
+        }
+
+        var rowEl = resolved.row, 
+            cellEl = resolved.cell,
+            c = this.scroller.dom,
+            ctop = 0,
+            p = rowEl, 
+            stop = this.el.dom;
+            
+        while(p && p != stop){
+            ctop += p.offsetTop;
+            p = p.offsetParent;
+        }
+        ctop -= this.mainHd.dom.offsetHeight;
+
+        var cbot = ctop + rowEl.offsetHeight,
+            ch = c.clientHeight,
+            sbot = stop + ch;
+            
+        stop = parseInt(c.scrollTop, 10);
+        
+
+        if(ctop < stop){
+          c.scrollTop = ctop;
+        }else if(cbot > sbot){
+            c.scrollTop = cbot-ch;
+        }
+
+        if(hscroll !== false){
+            var cleft = parseInt(cellEl.offsetLeft, 10);
+            var cright = cleft + cellEl.offsetWidth;
+
+            var sleft = parseInt(c.scrollLeft, 10);
+            var sright = sleft + c.clientWidth;
+            if(cleft < sleft){
+                c.scrollLeft = cleft;
+            }else if(cright > sright){
+                c.scrollLeft = cright-c.clientWidth;
+            }
+        }
+        return this.getResolvedXY(resolved);
+    },
+
+    // private
+    insertRows : function(dm, firstRow, lastRow, isUpdate){
+        var last = dm.getCount() - 1;
+        if(!isUpdate && firstRow === 0 && lastRow >= last){
+            this.refresh();
+        }else{
+            if(!isUpdate){
+                this.fireEvent("beforerowsinserted", this, firstRow, lastRow);
+            }
+            var html = this.renderRows(firstRow, lastRow),
+                before = this.getRow(firstRow);
+            if(before){
+                if(firstRow === 0){
+                    Ext.fly(this.getRow(0)).removeClass(this.firstRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeBegin', before, html);
+            }else{
+                var r = this.getRow(last - 1);
+                if(r){
+                    Ext.fly(r).removeClass(this.lastRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html);
+            }
+            if(!isUpdate){
+                this.fireEvent("rowsinserted", this, firstRow, lastRow);
+                this.processRows(firstRow);
+            }else if(firstRow === 0 || firstRow >= last){
+                //ensure first/last row is kept after an update.
+                Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls);
+            }
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // private
+    deleteRows : function(dm, firstRow, lastRow){
+        if(dm.getRowCount()<1){
+            this.refresh();
+        }else{
+            this.fireEvent("beforerowsdeleted", this, firstRow, lastRow);
+
+            this.removeRows(firstRow, lastRow);
+
+            this.processRows(firstRow);
+            this.fireEvent("rowsdeleted", this, firstRow, lastRow);
+        }
+    },
+
+    // private
+    getColumnStyle : function(col, isHeader){
+        var style = !isHeader ? (this.cm.config[col].css || '') : '';
+        style += 'width:'+this.getColumnWidth(col)+';';
+        if(this.cm.isHidden(col)){
+            style += 'display:none;';
+        }
+        var align = this.cm.config[col].align;
+        if(align){
+            style += 'text-align:'+align+';';
+        }
+        return style;
+    },
+
+    // private
+    getColumnWidth : function(col){
+        var w = this.cm.getColumnWidth(col);
+        if(typeof w == 'number'){
+            return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px';
+        }
+        return w;
+    },
+
+    // private
+    getTotalWidth : function(){
+        return this.cm.getTotalWidth()+'px';
+    },
+
+    // private
+    fitColumns : function(preventRefresh, onlyExpand, omitColumn){
+        var cm = this.cm, i;
+        var tw = cm.getTotalWidth(false);
+        var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+
+        if(aw < 20){ // not initialized, so don't screw up the default widths
+            return;
+        }
+        var extra = aw - tw;
+
+        if(extra === 0){
+            return false;
+        }
+
+        var vc = cm.getColumnCount(true);
+        var ac = vc-(typeof omitColumn == 'number' ? 1 : 0);
+        if(ac === 0){
+            ac = 1;
+            omitColumn = undefined;
+        }
+        var colCount = cm.getColumnCount();
+        var cols = [];
+        var extraCol = 0;
+        var width = 0;
+        var w;
+        for (i = 0; i < colCount; i++){
+            if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){
+                w = cm.getColumnWidth(i);
+                cols.push(i);
+                extraCol = i;
+                cols.push(w);
+                width += w;
+            }
+        }
+        var frac = (aw - cm.getTotalWidth())/width;
+        while (cols.length){
+            w = cols.pop();
+            i = cols.pop();
+            cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true);
+        }
+
+        if((tw = cm.getTotalWidth(false)) > aw){
+            var adjustCol = ac != vc ? omitColumn : extraCol;
+             cm.setColumnWidth(adjustCol, Math.max(1,
+                     cm.getColumnWidth(adjustCol)- (tw-aw)), true);
+        }
+
+        if(preventRefresh !== true){
+            this.updateAllColumnWidths();
+        }
+
+
+        return true;
+    },
+
+    // private
+    autoExpand : function(preventUpdate){
+        var g = this.grid, cm = this.cm;
+        if(!this.userResized && g.autoExpandColumn){
+            var tw = cm.getTotalWidth(false);
+            var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+            if(tw != aw){
+                var ci = cm.getIndexById(g.autoExpandColumn);
+                var currentWidth = cm.getColumnWidth(ci);
+                var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax);
+                if(cw != currentWidth){
+                    cm.setColumnWidth(ci, cw, true);
+                    if(preventUpdate !== true){
+                        this.updateColumnWidth(ci, cw);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getColumnData : function(){
+        // build a map for all the columns
+        var cs = [], cm = this.cm, colCount = cm.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            var name = cm.getDataIndex(i);
+            cs[i] = {
+                name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name),
+                renderer : cm.getRenderer(i),
+                id : cm.getColumnId(i),
+                style : this.getColumnStyle(i)
+            };
+        }
+        return cs;
+    },
+
+    // private
+    renderRows : function(startRow, endRow){
+        // pull in all the crap needed to render rows
+        var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows;
+        var colCount = cm.getColumnCount();
+
+        if(ds.getCount() < 1){
+            return "";
+        }
+
+        var cs = this.getColumnData();
+
+        startRow = startRow || 0;
+        endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow;
+
+        // records to render
+        var rs = ds.getRange(startRow, endRow);
+
+        return this.doRender(cs, rs, ds, startRow, colCount, stripe);
+    },
+
+    // private
+    renderBody : function(){
+        var markup = this.renderRows() || '&#160;';
+        return this.templates.body.apply({rows: markup});
+    },
+
+    // private
+    refreshRow : function(record){
+        var ds = this.ds, index;
+        if(typeof record == 'number'){
+            index = record;
+            record = ds.getAt(index);
+            if(!record){
+                return;
+            }
+        }else{
+            index = ds.indexOf(record);
+            if(index < 0){
+                return;
+            }
+        }
+        this.insertRows(ds, index, index, true);
+        this.getRow(index).rowIndex = index;
+        this.onRemove(ds, record, index+1, true);
+        this.fireEvent("rowupdated", this, index, record);
+    },
+
+    /**
+     * Refreshs the grid UI
+     * @param {Boolean} headersToo (optional) True to also refresh the headers
+     */
+    refresh : function(headersToo){
+        this.fireEvent("beforerefresh", this);
+        this.grid.stopEditing(true);
+
+        var result = this.renderBody();
+        this.mainBody.update(result).setWidth(this.getTotalWidth());
+        if(headersToo === true){
+            this.updateHeaders();
+            this.updateHeaderSortState();
+        }
+        this.processRows(0, true);
+        this.layout();
+        this.applyEmptyText();
+        this.fireEvent("refresh", this);
+    },
+
+    // private
+    applyEmptyText : function(){
+        if(this.emptyText && !this.hasRows()){
+            this.mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>');
+        }
+    },
+
+    // private
+    updateHeaderSortState : function(){
+        var state = this.ds.getSortState();
+        if(!state){
+            return;
+        }
+        if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){
+            this.grid.fireEvent('sortchange', this.grid, state);
+        }
+        this.sortState = state;
+        var sortColumn = this.cm.findColumnIndex(state.field);
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    // private
+    destroy : function(){
+        if(this.colMenu){
+            Ext.menu.MenuMgr.unregister(this.colMenu);
+            this.colMenu.destroy();
+            delete this.colMenu;
+        }
+        if(this.hmenu){
+            Ext.menu.MenuMgr.unregister(this.hmenu);
+            this.hmenu.destroy();
+            delete this.hmenu;
+        }
+        if(this.grid.enableColumnMove){
+            var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            if(dds){
+                for(var dd in dds){
+                    if(!dds[dd].config.isTarget && dds[dd].dragElId){
+                        var elid = dds[dd].dragElId;
+                        dds[dd].unreg();
+                        Ext.get(elid).remove();
+                    } else if(dds[dd].config.isTarget){
+                        dds[dd].proxyTop.remove();
+                        dds[dd].proxyBottom.remove();
+                        dds[dd].unreg();
+                    }
+                    if(Ext.dd.DDM.locationCache[dd]){
+                        delete Ext.dd.DDM.locationCache[dd];
+                    }
+                }
+                delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            }
+        }
+
+        if(this.dragZone){
+            this.dragZone.unreg();
+        }
+        
+        Ext.fly(this.innerHd).removeAllListeners();
+        Ext.removeNode(this.innerHd);
+        
+        Ext.destroy(this.resizeMarker, this.resizeProxy, this.focusEl, this.mainBody, 
+                    this.scroller, this.mainHd, this.mainWrap, this.dragZone, 
+                    this.splitZone, this.columnDrag, this.columnDrop);
+
+        this.initData(null, null);
+        Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        this.purgeListeners();
+    },
+
+    // private
+    onDenyColumnHide : function(){
+
+    },
+
+    // private
+    render : function(){
+        if(this.autoFill){
+            var ct = this.grid.ownerCt;
+            if (ct && ct.getLayout()){
+                ct.on('afterlayout', function(){ 
+                    this.fitColumns(true, true);
+                    this.updateHeaders(); 
+                }, this, {single: true}); 
+            }else{ 
+                this.fitColumns(true, true); 
+            }
+        }else if(this.forceFit){
+            this.fitColumns(true, false);
+        }else if(this.grid.autoExpandColumn){
+            this.autoExpand(true);
+        }
+
+        this.renderUI();
+    },
+
+    /* --------------------------------- Model Events and Handlers --------------------------------*/
+    // private
+    initData : function(ds, cm){
+        if(this.ds){
+            this.ds.un("load", this.onLoad, this);
+            this.ds.un("datachanged", this.onDataChange, this);
+            this.ds.un("add", this.onAdd, this);
+            this.ds.un("remove", this.onRemove, this);
+            this.ds.un("update", this.onUpdate, this);
+            this.ds.un("clear", this.onClear, this);
+            if(this.ds !== ds && this.ds.autoDestroy){
+                this.ds.destroy();
+            }
+        }
+        if(ds){
+            ds.on({
+                scope: this,
+                load: this.onLoad,
+                datachanged: this.onDataChange,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.onClear
+            });
+        }
+        this.ds = ds;
+
+        if(this.cm){
+            this.cm.un("configchange", this.onColConfigChange, this);
+            this.cm.un("widthchange", this.onColWidthChange, this);
+            this.cm.un("headerchange", this.onHeaderChange, this);
+            this.cm.un("hiddenchange", this.onHiddenChange, this);
+            this.cm.un("columnmoved", this.onColumnMove, this);
+        }
+        if(cm){
+            delete this.lastViewWidth;
+            cm.on({
+                scope: this,
+                configchange: this.onColConfigChange,
+                widthchange: this.onColWidthChange,
+                headerchange: this.onHeaderChange,
+                hiddenchange: this.onHiddenChange,
+                columnmoved: this.onColumnMove
+            });
+        }
+        this.cm = cm;
+    },
+
+    // private
+    onDataChange : function(){
+        this.refresh();
+        this.updateHeaderSortState();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onClear : function(){
+        this.refresh();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        this.refreshRow(record);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        this.insertRows(ds, index, index + (records.length-1));
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        if(isUpdate !== true){
+            this.fireEvent("beforerowremoved", this, index, record);
+        }
+        this.removeRow(index);
+        if(isUpdate !== true){
+            this.processRows(index);
+            this.applyEmptyText();
+            this.fireEvent("rowremoved", this, index, record);
+        }
+    },
+
+    // private
+    onLoad : function(){
+        this.scrollToTop();
+    },
+
+    // private
+    onColWidthChange : function(cm, col, width){
+        this.updateColumnWidth(col, width);
+    },
+
+    // private
+    onHeaderChange : function(cm, col, text){
+        this.updateHeaders();
+    },
+
+    // private
+    onHiddenChange : function(cm, col, hidden){
+        this.updateColumnHidden(col, hidden);
+    },
+
+    // private
+    onColumnMove : function(cm, oldIndex, newIndex){
+        this.indexMap = null;
+        var s = this.getScrollState();
+        this.refresh(true);
+        this.restoreScroll(s);
+        this.afterMove(newIndex);
+        this.grid.fireEvent('columnmove', oldIndex, newIndex);
+    },
+
+    // private
+    onColConfigChange : function(){
+        delete this.lastViewWidth;
+        this.indexMap = null;
+        this.refresh(true);
+    },
+
+    /* -------------------- UI Events and Handlers ------------------------------ */
+    // private
+    initUI : function(grid){
+        grid.on("headerclick", this.onHeaderClick, this);
+    },
+
+    // private
+    initEvents : function(){
+    },
+
+    // private
+    onHeaderClick : function(g, index){
+        if(this.headersDisabled || !this.cm.isSortable(index)){
+            return;
+        }
+        g.stopEditing(true);
+        g.store.sort(this.cm.getDataIndex(index));
+    },
+
+    // private
+    onRowOver : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false){
+            this.addRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    onRowOut : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false && !e.within(this.getRow(row), true)){
+            this.removeRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    handleWheel : function(e){
+        e.stopPropagation();
+    },
+
+    // private
+    onRowSelect : function(row){
+        this.addRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onRowDeselect : function(row){
+        this.removeRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onCellSelect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).addClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onCellDeselect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).removeClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onColumnSplitterMoved : function(i, w){
+        this.userResized = true;
+        var cm = this.grid.colModel;
+        cm.setColumnWidth(i, w, true);
+
+        if(this.forceFit){
+            this.fitColumns(true, false, i);
+            this.updateAllColumnWidths();
+        }else{
+            this.updateColumnWidth(i, w);
+            this.syncHeaderScroll();
+        }
+
+        this.grid.fireEvent("columnresize", i, w);
+    },
+
+    // private
+    handleHdMenuClick : function(item){
+        var index = this.hdCtxIndex;
+        var cm = this.cm, ds = this.ds;
+        switch(item.itemId){
+            case "asc":
+                ds.sort(cm.getDataIndex(index), "ASC");
+                break;
+            case "desc":
+                ds.sort(cm.getDataIndex(index), "DESC");
+                break;
+            default:
+                index = cm.getIndexById(item.itemId.substr(4));
+                if(index != -1){
+                    if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){
+                        this.onDenyColumnHide();
+                        return false;
+                    }
+                    cm.setHidden(index, item.checked);
+                }
+        }
+        return true;
+    },
+
+    // private
+    isHideableColumn : function(c){
+        return !c.hidden && !c.fixed;
+    },
+
+    // private
+    beforeColMenuShow : function(){
+        var cm = this.cm,  colCount = cm.getColumnCount();
+        this.colMenu.removeAll();
+        for(var i = 0; i < colCount; i++){
+            if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){
+                this.colMenu.add(new Ext.menu.CheckItem({
+                    itemId: "col-"+cm.getColumnId(i),
+                    text: cm.getColumnHeader(i),
+                    checked: !cm.isHidden(i),
+                    hideOnClick:false,
+                    disabled: cm.config[i].hideable === false
+                }));
+            }
+        }
+    },
+
+    // private
+    handleHdDown : function(e, t){
+        if(Ext.fly(t).hasClass('x-grid3-hd-btn')){
+            e.stopEvent();
+            var hd = this.findHeaderCell(t);
+            Ext.fly(hd).addClass('x-grid3-hd-menu-open');
+            var index = this.getCellIndex(hd);
+            this.hdCtxIndex = index;
+            var ms = this.hmenu.items, cm = this.cm;
+            ms.get("asc").setDisabled(!cm.isSortable(index));
+            ms.get("desc").setDisabled(!cm.isSortable(index));
+            this.hmenu.on("hide", function(){
+                Ext.fly(hd).removeClass('x-grid3-hd-menu-open');
+            }, this, {single:true});
+            this.hmenu.show(t, "tl-bl?");
+        }
+    },
+
+    // private
+    handleHdOver : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && !this.headersDisabled){
+            this.activeHd = hd;
+            this.activeHdIndex = this.getCellIndex(hd);
+            var fly = this.fly(hd);
+            this.activeHdRegion = fly.getRegion();
+            if(!this.cm.isMenuDisabled(this.activeHdIndex)){
+                fly.addClass("x-grid3-hd-over");
+                this.activeHdBtn = fly.child('.x-grid3-hd-btn');
+                if(this.activeHdBtn){
+                    this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
+                }
+            }
+        }
+    },
+
+    // private
+    handleHdMove : function(e, t){
+        if(this.activeHd && !this.headersDisabled){
+            var hw = this.splitHandleWidth || 5;
+            var r = this.activeHdRegion;
+            var x = e.getPageX();
+            var ss = this.activeHd.style;
+            if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported
+            }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize';
+            }else{
+                ss.cursor = '';
+            }
+        }
+    },
+
+    // private
+    handleHdOut : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && (!Ext.isIE || !e.within(hd, true))){
+            this.activeHd = null;
+            this.fly(hd).removeClass("x-grid3-hd-over");
+            hd.style.cursor = '';
+        }
+    },
+
+    // private
+    hasRows : function(){
+        var fc = this.mainBody.dom.firstChild;
+        return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty';
+    },
+
+    // back compat
+    bind : function(d, c){
+        this.initData(d, c);
+    }
+});
+
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridView.SplitDragZone = function(grid, hd){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.marker = this.view.resizeMarker;
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.scroll = false;
+    this.hw = this.view.splitHandleWidth || 5;
+};
+Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, {
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        var h = this.view.mainWrap.getHeight();
+        this.marker.setHeight(h);
+        this.marker.show();
+        this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]);
+        this.proxy.setHeight(h);
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var t = this.view.findHeaderCell(e.getTarget());
+        if(t){
+            var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1];
+            var exy = e.getXY(), ex = exy[0];
+            var w = t.offsetWidth, adjust = false;
+            if((ex - x) <= this.hw){
+                adjust = -1;
+            }else if((x+w) - ex <= this.hw){
+                adjust = 0;
+            }
+            if(adjust !== false){
+                this.cm = this.grid.colModel;
+                var ci = this.view.getCellIndex(t);
+                if(adjust == -1){
+                  if (ci + adjust < 0) {
+                    return;
+                  }
+                    while(this.cm.isHidden(ci+adjust)){
+                        --adjust;
+                        if(ci+adjust < 0){
+                            return;
+                        }
+                    }
+                }
+                this.cellIndex = ci+adjust;
+                this.split = t.dom;
+                if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                    Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+                }
+            }else if(this.view.columnDrag){
+                this.view.columnDrag.callHandleMouseDown(e);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.marker.hide();
+        var v = this.view;
+        var endX = Math.max(this.minX, e.getPageX());
+        var diff = endX - this.startPos;
+        v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd);
+    if(hd2){
+        this.setHandleElId(Ext.id(hd));
+        this.setOuterHandleElId(Ext.id(hd2));
+    }
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, {
+    maxDragWidth: 120,
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var h = this.view.findHeaderCell(t);
+        if(h){
+            return {ddel: h.firstChild, header:h};
+        }
+        return false;
+    },
+
+    onInitDrag : function(e){
+        this.view.headersDisabled = true;
+        var clone = this.dragData.ddel.cloneNode(true);
+        clone.id = Ext.id();
+        clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px";
+        this.proxy.update(clone);
+        return true;
+    },
+
+    afterValidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    afterInvalidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    }
+});
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDropZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    // split the proxies so they don't interfere with mouse events
+    this.proxyTop = Ext.DomHelper.append(document.body, {
+        cls:"col-move-top", html:"&#160;"
+    }, true);
+    this.proxyBottom = Ext.DomHelper.append(document.body, {
+        cls:"col-move-bottom", html:"&#160;"
+    }, true);
+    this.proxyTop.hide = this.proxyBottom.hide = function(){
+        this.setLeftTop(-100,-100);
+        this.setStyle("visibility", "hidden");
+    };
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    // temporarily disabled
+    //Ext.dd.ScrollManager.register(this.view.scroller.dom);
+    Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);
+};
+Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, {
+    proxyOffsets : [-4, -9],
+    fly: Ext.Element.fly,
+
+    getTargetFromEvent : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var cindex = this.view.findCellIndex(t);
+        if(cindex !== false){
+            return this.view.getHeaderCell(cindex);
+        }
+    },
+
+    nextVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.nextSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.nextSibling;
+        }
+        return null;
+    },
+
+    prevVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.prevSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.prevSibling;
+        }
+        return null;
+    },
+
+    positionIndicator : function(h, n, e){
+        var x = Ext.lib.Event.getPageX(e);
+        var r = Ext.lib.Dom.getRegion(n.firstChild);
+        var px, pt, py = r.top + this.proxyOffsets[1];
+        if((r.right - x) <= (r.right-r.left)/2){
+            px = r.right+this.view.borderWidth;
+            pt = "after";
+        }else{
+            px = r.left;
+            pt = "before";
+        }
+
+        if(this.grid.colModel.isFixed(this.view.getCellIndex(n))){
+            return false;
+        }
+
+        px +=  this.proxyOffsets[0];
+        this.proxyTop.setLeftTop(px, py);
+        this.proxyTop.show();
+        if(!this.bottomOffset){
+            this.bottomOffset = this.view.mainHd.getHeight();
+        }
+        this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset);
+        this.proxyBottom.show();
+        return pt;
+    },
+
+    onNodeEnter : function(n, dd, e, data){
+        if(data.header != n){
+            this.positionIndicator(data.header, n, e);
+        }
+    },
+
+    onNodeOver : function(n, dd, e, data){
+        var result = false;
+        if(data.header != n){
+            result = this.positionIndicator(data.header, n, e);
+        }
+        if(!result){
+            this.proxyTop.hide();
+            this.proxyBottom.hide();
+        }
+        return result ? this.dropAllowed : this.dropNotAllowed;
+    },
+
+    onNodeOut : function(n, dd, e, data){
+        this.proxyTop.hide();
+        this.proxyBottom.hide();
+    },
+
+    onNodeDrop : function(n, dd, e, data){
+        var h = data.header;
+        if(h != n){
+            var cm = this.grid.colModel;
+            var x = Ext.lib.Event.getPageX(e);
+            var r = Ext.lib.Dom.getRegion(n.firstChild);
+            var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before";
+            var oldIndex = this.view.getCellIndex(h);
+            var newIndex = this.view.getCellIndex(n);
+            if(pt == "after"){
+                newIndex++;
+            }
+            if(oldIndex < newIndex){
+                newIndex--;
+            }
+            cm.moveColumn(oldIndex, newIndex);
+            this.grid.fireEvent("columnmove", oldIndex, newIndex);
+            return true;
+        }
+        return false;
+    }
+});
+
+
+Ext.grid.GridView.ColumnDragZone = function(grid, hd){
+    Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);
+    this.proxy.el.addClass('x-grid3-col-dd');
+};
+
+Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, {
+    handleMouseDown : function(e){
+
+    },
+
+    callHandleMouseDown : function(e){
+        Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e);
+    }
+});// private
+// This is a support class used internally by the Grid components
+Ext.grid.SplitDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.setHandleElId(Ext.id(hd));
+    this.setOuterHandleElId(Ext.id(hd2));
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, {
+    fly: Ext.Element.fly,
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        this.proxy.setHeight(this.view.mainWrap.getHeight());
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var ev = Ext.EventObject.setEvent(e);
+        var t = this.fly(ev.getTarget());
+        if(t.hasClass("x-grid-split")){
+            this.cellIndex = this.view.getCellIndex(t.dom);
+            this.split = t.dom;
+            this.cm = this.grid.colModel;
+            if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.view.headersDisabled = false;
+        var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e));
+        var diff = endX - this.startPos;
+        this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});/**
+ * @class Ext.grid.GridDragZone
+ * @extends Ext.dd.DragZone
+ * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations of two of the
+ * template methods of DragZone to enable dragging of the selected rows of a GridPanel.</p>
+ * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's template method implementations of
+ * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+ * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}</p> are able
+ * to process the {@link #getDragData data} which is provided.
+ */
+Ext.grid.GridDragZone = function(grid, config){
+    this.view = grid.getView();
+    Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config);
+    this.scroll = false;
+    this.grid = grid;
+    this.ddel = document.createElement('div');
+    this.ddel.className = 'x-grid-dd-wrap';
+};
+
+Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
+    ddGroup : "GridDD",
+
+    /**
+     * <p>The provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.</p>
+     * <p>This data is available for processing in the {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} methods of a cooperating {@link Ext.dd.DropZone DropZone}.</p>
+     * <p>The data object contains the following properties:<ul>
+     * <li><b>grid</b> : Ext.Grid.GridPanel<div class="sub-desc">The GridPanel from which the data is being dragged.</div></li>
+     * <li><b>ddel</b> : htmlElement<div class="sub-desc">An htmlElement which provides the "picture" of the data being dragged.</div></li>
+     * <li><b>rowIndex</b> : Number<div class="sub-desc">The index of the row which receieved the mousedown gesture which triggered the drag.</div></li>
+     * <li><b>selections</b> : Array<div class="sub-desc">An Array of the selected Records which are being dragged from the GridPanel.</div></li>
+     * </ul></p>
+     */
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var rowIndex = this.view.findRowIndex(t);
+        if(rowIndex !== false){
+            var sm = this.grid.selModel;
+            if(!sm.isSelected(rowIndex) || e.hasModifier()){
+                sm.handleMouseDown(this.grid, rowIndex, e);
+            }
+            return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()};
+        }
+        return false;
+    },
+
+    /**
+     * <p>The provided implementation of the onInitDrag method. Sets the <tt>innerHTML</tt> of the drag proxy which provides the "picture"
+     * of the data being dragged.</p>
+     * <p>The <tt>innerHTML</tt> data is found by calling the owning GridPanel's {@link Ext.grid.GridPanel#getDragDropText getDragDropText}.</p>
+     */
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.ddel.innerHTML = this.grid.getDragDropText();
+        this.proxy.update(this.ddel);
+        // fire start drag?
+    },
+
+    /**
+     * An empty immplementation. Implement this to provide behaviour after a repair of an invalid drop. An implementation might highlight
+     * the selected rows to show that they have not been dragged.
+     */
+    afterRepair : function(){
+        this.dragging = false;
+    },
+
+    /**
+     * <p>An empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.</p>
+     * <p>Called before a repair of an invalid drop to get the XY to animate to.</p>
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e, data){
+        return false;
+    },
+
+    onEndDrag : function(data, e){
+        // fire end drag?
+    },
+
+    onValidDrop : function(dd, e, id){
+        // fire drag drop?
+        this.hideProxy();
+    },
+
+    beforeInvalidDrop : function(e, id){
+
+    }
+});
+/**
+ * @class Ext.grid.ColumnModel
+ * @extends Ext.util.Observable
+ * <p>After the data has been read into the client side cache (<b>{@link Ext.data.Store Store}</b>),
+ * the ColumnModel is used to configure how and what parts of that data will be displayed in the
+ * vertical slices (columns) of the grid. The Ext.grid.ColumnModel Class is the default implementation
+ * of a ColumnModel used by implentations of {@link Ext.grid.GridPanel GridPanel}.</p>
+ * <p>Data is mapped into the store's records and then indexed into the ColumnModel using the
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt>:</p>
+ * <pre><code>
+{data source} == mapping ==> {data store} == <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> ==> {ColumnModel}
+ * </code></pre>
+ * <p>Each {@link Ext.grid.Column Column} in the grid's ColumnModel is configured with a
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt> to specify how the data within
+ * each record in the store is indexed into the ColumnModel.</p>
+ * <p>There are two ways to initialize the ColumnModel class:</p>
+ * <p><u>Initialization Method 1: an Array</u></p>
+<pre><code>
+ var colModel = new Ext.grid.ColumnModel([
+    { header: "Ticker", width: 60, sortable: true},
+    { header: "Company Name", width: 150, sortable: true, id: 'company'},
+    { header: "Market Cap.", width: 100, sortable: true},
+    { header: "$ Sales", width: 100, sortable: true, renderer: money},
+    { header: "Employees", width: 100, sortable: true, resizable: false}
+ ]);
+ </code></pre>
+ * <p>The ColumnModel may be initialized with an Array of {@link Ext.grid.Column} column configuration
+ * objects to define the initial layout / display of the columns in the Grid. The order of each
+ * {@link Ext.grid.Column} column configuration object within the specified Array defines the initial
+ * order of the column display.  A Column's display may be initially hidden using the
+ * <tt>{@link Ext.grid.Column#hidden hidden}</tt></b> config property (and then shown using the column
+ * header menu).  Field's that are not included in the ColumnModel will not be displayable at all.</p>
+ * <p>How each column in the grid correlates (maps) to the {@link Ext.data.Record} field in the
+ * {@link Ext.data.Store Store} the column draws its data from is configured through the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b>.  If the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> is not explicitly defined (as shown in the
+ * example above) it will use the column configuration's index in the Array as the index.</p>
+ * <p>See <b><tt>{@link Ext.grid.Column}</tt></b> for additional configuration options for each column.</p>
+ * <p><u>Initialization Method 2: an Object</u></p>
+ * <p>In order to use configuration options from <tt>Ext.grid.ColumnModel</tt>, an Object may be used to
+ * initialize the ColumnModel.  The column configuration Array will be specified in the <tt><b>{@link #columns}</b></tt>
+ * config property. The <tt><b>{@link #defaults}</b></tt> config property can be used to apply defaults
+ * for all columns, e.g.:</p><pre><code>
+ var colModel = new Ext.grid.ColumnModel({
+    columns: [
+        { header: "Ticker", width: 60, menuDisabled: false},
+        { header: "Company Name", width: 150, id: 'company'},
+        { header: "Market Cap."},
+        { header: "$ Sales", renderer: money},
+        { header: "Employees", resizable: false}
+    ],
+    defaults: {
+        sortable: true,
+        menuDisabled: true,
+        width: 100
+    },
+    listeners: {
+        {@link #hiddenchange}: function(cm, colIndex, hidden) {
+            saveConfig(colIndex, hidden);
+        }
+    }
+});
+ </code></pre>
+ * <p>In both examples above, the ability to apply a CSS class to all cells in a column (including the
+ * header) is demonstrated through the use of the <b><tt>{@link Ext.grid.Column#id id}</tt></b> config
+ * option. This column could be styled by including the following css:</p><pre><code>
+ //add this css *after* the core css is loaded
+.x-grid3-td-company {
+    color: red; // entire column will have red font
+}
+// modify the header row only, adding an icon to the column header
+.x-grid3-hd-company {
+    background: transparent
+        url(../../resources/images/icons/silk/building.png)
+        no-repeat 3px 3px ! important;
+        padding-left:20px;
+}
+ </code></pre>
+ * Note that the "Company Name" column could be specified as the
+ * <b><tt>{@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></b>.
+ * @constructor
+ * @param {Mixed} config Specify either an Array of {@link Ext.grid.Column} configuration objects or specify
+ * a configuration Object (see introductory section discussion utilizing Initialization Method 2 above).
+ */
+Ext.grid.ColumnModel = function(config){
+    /**
+     * An Array of {@link Ext.grid.Column Column definition} objects representing the configuration
+     * of this ColumnModel.  See {@link Ext.grid.Column} for the configuration properties that may
+     * be specified.
+     * @property config
+     * @type Array
+     */
+    if(config.columns){
+        Ext.apply(this, config);
+        this.setConfig(config.columns, true);
+    }else{
+        this.setConfig(config, true);
+    }
+    this.addEvents(
+        /**
+         * @event widthchange
+         * Fires when the width of a column is programmaticially changed using
+         * <code>{@link #setColumnWidth}</code>.
+         * Note internal resizing suppresses the event from firing. See also
+         * {@link Ext.grid.GridPanel}.<code>{@link #columnresize}</code>.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Number} newWidth The new width
+         */
+        "widthchange",
+        /**
+         * @event headerchange
+         * Fires when the text of a header changes.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {String} newText The new header text
+         */
+        "headerchange",
+        /**
+         * @event hiddenchange
+         * Fires when a column is hidden or "unhidden".
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Boolean} hidden true if hidden, false otherwise
+         */
+        "hiddenchange",
+        /**
+         * @event columnmoved
+         * Fires when a column is moved.
+         * @param {ColumnModel} this
+         * @param {Number} oldIndex
+         * @param {Number} newIndex
+         */
+        "columnmoved",
+        /**
+         * @event configchange
+         * Fires when the configuration is changed
+         * @param {ColumnModel} this
+         */
+        "configchange"
+    );
+    Ext.grid.ColumnModel.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, {
+    /**
+     * @cfg {Number} defaultWidth (optional) The width of columns which have no <tt>{@link #width}</tt>
+     * specified (defaults to <tt>100</tt>).  This property shall preferably be configured through the
+     * <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultWidth: 100,
+    /**
+     * @cfg {Boolean} defaultSortable (optional) Default sortable of columns which have no
+     * sortable specified (defaults to <tt>false</tt>).  This property shall preferably be configured
+     * through the <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultSortable: false,
+    /**
+     * @cfg {Array} columns An Array of object literals.  The config options defined by
+     * <b>{@link Ext.grid.Column}</b> are the options which may appear in the object literal for each
+     * individual column definition.
+     */
+    /**
+     * @cfg {Object} defaults Object literal which will be used to apply {@link Ext.grid.Column}
+     * configuration options to all <tt><b>{@link #columns}</b></tt>.  Configuration options specified with
+     * individual {@link Ext.grid.Column column} configs will supersede these <tt><b>{@link #defaults}</b></tt>.
+     */
+
+    /**
+     * Returns the id of the column at the specified index.
+     * @param {Number} index The column index
+     * @return {String} the id
+     */
+    getColumnId : function(index){
+        return this.config[index].id;
+    },
+
+    getColumnAt : function(index){
+        return this.config[index];
+    },
+
+    /**
+     * <p>Reconfigures this column model according to the passed Array of column definition objects.
+     * For a description of the individual properties of a column definition object, see the
+     * <a href="#Ext.grid.ColumnModel-configs">Config Options</a>.</p>
+     * <p>Causes the {@link #configchange} event to be fired. A {@link Ext.grid.GridPanel GridPanel}
+     * using this ColumnModel will listen for this event and refresh its UI automatically.</p>
+     * @param {Array} config Array of Column definition objects.
+     * @param {Boolean} initial Specify <tt>true</tt> to bypass cleanup which deletes the <tt>totalWidth</tt>
+     * and destroys existing editors.
+     */
+    setConfig : function(config, initial){
+        var i, c, len;
+        if(!initial){ // cleanup
+            delete this.totalWidth;
+            for(i = 0, len = this.config.length; i < len; i++){
+                c = this.config[i];
+                if(c.editor){
+                    c.editor.destroy();
+                }
+            }
+        }
+
+        // backward compatibility
+        this.defaults = Ext.apply({
+            width: this.defaultWidth,
+            sortable: this.defaultSortable
+        }, this.defaults);
+
+        this.config = config;
+        this.lookup = {};
+        // if no id, create one
+        for(i = 0, len = config.length; i < len; i++){
+            c = Ext.applyIf(config[i], this.defaults);
+            if(!c.isColumn){
+                var cls = Ext.grid.Column.types[c.xtype || 'gridcolumn'];
+                c = new cls(c);
+                config[i] = c;
+            }
+            this.lookup[c.id] = c;
+        }
+        if(!initial){
+            this.fireEvent('configchange', this);
+        }
+    },
+
+    /**
+     * Returns the column for a specified id.
+     * @param {String} id The column id
+     * @return {Object} the column
+     */
+    getColumnById : function(id){
+        return this.lookup[id];
+    },
+
+    /**
+     * Returns the index for a specified column id.
+     * @param {String} id The column id
+     * @return {Number} the index, or -1 if not found
+     */
+    getIndexById : function(id){
+        for(var i = 0, len = this.config.length; i < len; i++){
+            if(this.config[i].id == id){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Moves a column from one position to another.
+     * @param {Number} oldIndex The index of the column to move.
+     * @param {Number} newIndex The position at which to reinsert the coolumn.
+     */
+    moveColumn : function(oldIndex, newIndex){
+        var c = this.config[oldIndex];
+        this.config.splice(oldIndex, 1);
+        this.config.splice(newIndex, 0, c);
+        this.dataMap = null;
+        this.fireEvent("columnmoved", this, oldIndex, newIndex);
+    },
+
+    /**
+     * Returns the number of columns.
+     * @param {Boolean} visibleOnly Optional. Pass as true to only include visible columns.
+     * @return {Number}
+     */
+    getColumnCount : function(visibleOnly){
+        if(visibleOnly === true){
+            var c = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(!this.isHidden(i)){
+                    c++;
+                }
+            }
+            return c;
+        }
+        return this.config.length;
+    },
+
+    /**
+     * Returns the column configs that return true by the passed function that is called
+     * with (columnConfig, index)
+<pre><code>
+// returns an array of column config objects for all hidden columns
+var columns = grid.getColumnModel().getColumnsBy(function(c){
+  return c.hidden;
+});
+</code></pre>
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Array} result
+     */
+    getColumnsBy : function(fn, scope){
+        var r = [];
+        for(var i = 0, len = this.config.length; i < len; i++){
+            var c = this.config[i];
+            if(fn.call(scope||this, c, i) === true){
+                r[r.length] = c;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Returns true if the specified column is sortable.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isSortable : function(col){
+        return this.config[col].sortable;
+    },
+
+    /**
+     * Returns true if the specified column menu is disabled.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isMenuDisabled : function(col){
+        return !!this.config[col].menuDisabled;
+    },
+
+    /**
+     * Returns the rendering (formatting) function defined for the column.
+     * @param {Number} col The column index.
+     * @return {Function} The function used to render the cell. See {@link #setRenderer}.
+     */
+    getRenderer : function(col){
+        if(!this.config[col].renderer){
+            return Ext.grid.ColumnModel.defaultRenderer;
+        }
+        return this.config[col].renderer;
+    },
+
+    /**
+     * Sets the rendering (formatting) function for a column.  See {@link Ext.util.Format} for some
+     * default formatting functions.
+     * @param {Number} col The column index
+     * @param {Function} fn The function to use to process the cell's raw data
+     * to return HTML markup for the grid view. The render function is called with
+     * the following parameters:<ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container element <i>within</i> the table cell
+     * (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record was extracted.</p></li></ul>
+     */
+    setRenderer : function(col, fn){
+        this.config[col].renderer = fn;
+    },
+
+    /**
+     * Returns the width for the specified column.
+     * @param {Number} col The column index
+     * @return {Number}
+     */
+    getColumnWidth : function(col){
+        return this.config[col].width;
+    },
+
+    /**
+     * Sets the width for a column.
+     * @param {Number} col The column index
+     * @param {Number} width The new width
+     * @param {Boolean} suppressEvent True to suppress firing the <code>{@link #widthchange}</code>
+     * event. Defaults to false.
+     */
+    setColumnWidth : function(col, width, suppressEvent){
+        this.config[col].width = width;
+        this.totalWidth = null;
+        if(!suppressEvent){
+             this.fireEvent("widthchange", this, col, width);
+        }
+    },
+
+    /**
+     * Returns the total width of all columns.
+     * @param {Boolean} includeHidden True to include hidden column widths
+     * @return {Number}
+     */
+    getTotalWidth : function(includeHidden){
+        if(!this.totalWidth){
+            this.totalWidth = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(includeHidden || !this.isHidden(i)){
+                    this.totalWidth += this.getColumnWidth(i);
+                }
+            }
+        }
+        return this.totalWidth;
+    },
+
+    /**
+     * Returns the header for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnHeader : function(col){
+        return this.config[col].header;
+    },
+
+    /**
+     * Sets the header for a column.
+     * @param {Number} col The column index
+     * @param {String} header The new header
+     */
+    setColumnHeader : function(col, header){
+        this.config[col].header = header;
+        this.fireEvent("headerchange", this, col, header);
+    },
+
+    /**
+     * Returns the tooltip for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnTooltip : function(col){
+            return this.config[col].tooltip;
+    },
+    /**
+     * Sets the tooltip for a column.
+     * @param {Number} col The column index
+     * @param {String} tooltip The new tooltip
+     */
+    setColumnTooltip : function(col, tooltip){
+            this.config[col].tooltip = tooltip;
+    },
+
+    /**
+     * Returns the dataIndex for the specified column.
+<pre><code>
+// Get field name for the column
+var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
+</code></pre>
+     * @param {Number} col The column index
+     * @return {String} The column's dataIndex
+     */
+    getDataIndex : function(col){
+        return this.config[col].dataIndex;
+    },
+
+    /**
+     * Sets the dataIndex for a column.
+     * @param {Number} col The column index
+     * @param {String} dataIndex The new dataIndex
+     */
+    setDataIndex : function(col, dataIndex){
+        this.config[col].dataIndex = dataIndex;
+    },
+
+    /**
+     * Finds the index of the first matching column for the given dataIndex.
+     * @param {String} col The dataIndex to find
+     * @return {Number} The column index, or -1 if no match was found
+     */
+    findColumnIndex : function(dataIndex){
+        var c = this.config;
+        for(var i = 0, len = c.length; i < len; i++){
+            if(c[i].dataIndex == dataIndex){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Returns true if the cell is editable.
+<pre><code>
+var store = new Ext.data.Store({...});
+var colModel = new Ext.grid.ColumnModel({
+  columns: [...],
+  isCellEditable: function(col, row) {
+    var record = store.getAt(row);
+    if (record.get('readonly')) { // replace with your condition
+      return false;
+    }
+    return Ext.grid.ColumnModel.prototype.isCellEditable.call(this, col, row);
+  }
+});
+var grid = new Ext.grid.GridPanel({
+  store: store,
+  colModel: colModel,
+  ...
+});
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Boolean}
+     */
+    isCellEditable : function(colIndex, rowIndex){
+        return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false;
+    },
+
+    /**
+     * Returns the editor defined for the cell/column.
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor} The {@link Ext.Editor Editor} that was created to wrap
+     * the {@link Ext.form.Field Field} used to edit the cell.
+     */
+    getCellEditor : function(colIndex, rowIndex){
+        return this.config[colIndex].getCellEditor(rowIndex);
+    },
+
+    /**
+     * Sets if a column is editable.
+     * @param {Number} col The column index
+     * @param {Boolean} editable True if the column is editable
+     */
+    setEditable : function(col, editable){
+        this.config[col].editable = editable;
+    },
+
+
+    /**
+     * Returns true if the column is hidden.
+     * @param {Number} colIndex The column index
+     * @return {Boolean}
+     */
+    isHidden : function(colIndex){
+        return this.config[colIndex].hidden;
+    },
+
+
+    /**
+     * Returns true if the column width cannot be changed
+     */
+    isFixed : function(colIndex){
+        return this.config[colIndex].fixed;
+    },
+
+    /**
+     * Returns true if the column can be resized
+     * @return {Boolean}
+     */
+    isResizable : function(colIndex){
+        return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true;
+    },
+    /**
+     * Sets if a column is hidden.
+<pre><code>
+myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Boolean} hidden True if the column is hidden
+     */
+    setHidden : function(colIndex, hidden){
+        var c = this.config[colIndex];
+        if(c.hidden !== hidden){
+            c.hidden = hidden;
+            this.totalWidth = null;
+            this.fireEvent("hiddenchange", this, colIndex, hidden);
+        }
+    },
+
+    /**
+     * Sets the editor for a column and destroys the prior editor.
+     * @param {Number} col The column index
+     * @param {Object} editor The editor object
+     */
+    setEditor : function(col, editor){
+        Ext.destroy(this.config[col].editor);
+        this.config[col].editor = editor;
+    },
+
+    /**
+     * Destroys this column model by purging any event listeners, and removing any editors.
+     */
+    destroy : function(){
+        for(var i = 0, c = this.config, len = c.length; i < len; i++){
+            Ext.destroy(c[i].editor);
+        }
+        this.purgeListeners();
+    }
+});
+
+// private
+Ext.grid.ColumnModel.defaultRenderer = function(value){
+    if(typeof value == "string" && value.length < 1){
+        return "&#160;";
+    }
+    return value;
+};/**
+ * @class Ext.grid.AbstractSelectionModel
+ * @extends Ext.util.Observable
+ * Abstract base class for grid SelectionModels.  It provides the interface that should be
+ * implemented by descendant classes.  This class should not be directly instantiated.
+ * @constructor
+ */
+Ext.grid.AbstractSelectionModel = function(){
+    this.locked = false;
+    Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable,  {
+    /**
+     * The GridPanel for which this SelectionModel is handling selection. Read-only.
+     * @type Object
+     * @property grid
+     */
+
+    /** @ignore Called by the grid automatically. Do not call directly. */
+    init : function(grid){
+        this.grid = grid;
+        this.initEvents();
+    },
+
+    /**
+     * Locks the selections.
+     */
+    lock : function(){
+        this.locked = true;
+    },
+
+    /**
+     * Unlocks the selections.
+     */
+    unlock : function(){
+        this.locked = false;
+    },
+
+    /**
+     * Returns true if the selections are locked.
+     * @return {Boolean}
+     */
+    isLocked : function(){
+        return this.locked;
+    },
+    
+    destroy: function(){
+        this.purgeListeners();
+    }
+});/**
+ * @class Ext.grid.RowSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * The default SelectionModel used by {@link Ext.grid.GridPanel}.
+ * It supports multiple selections and keyboard selection/navigation. The objects stored
+ * as selections and returned by {@link #getSelected}, and {@link #getSelections} are
+ * the {@link Ext.data.Record Record}s which provide the data for the selected rows.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.RowSelectionModel = function(config){
+    Ext.apply(this, config);
+    this.selections = new Ext.util.MixedCollection(false, function(o){
+        return o.id;
+    });
+
+    this.last = false;
+    this.lastActive = false;
+
+    this.addEvents(
+        /**
+         * @event selectionchange
+         * Fires when the selection changes
+         * @param {SelectionModel} this
+         */
+        "selectionchange",
+        /**
+         * @event beforerowselect
+         * Fires before a row is selected, return false to cancel the selection.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The index to be selected
+         * @param {Boolean} keepExisting False if other selections will be cleared
+         * @param {Record} record The record to be selected
+         */
+        "beforerowselect",
+        /**
+         * @event rowselect
+         * Fires when a row is selected.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The selected index
+         * @param {Ext.data.Record} r The selected record
+         */
+        "rowselect",
+        /**
+         * @event rowdeselect
+         * Fires when a row is deselected.  To prevent deselection
+         * {@link Ext.grid.AbstractSelectionModel#lock lock the selections}. 
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex
+         * @param {Record} record
+         */
+        "rowdeselect"
+    );
+
+    Ext.grid.RowSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel,  {
+    /**
+     * @cfg {Boolean} singleSelect
+     * <tt>true</tt> to allow selection of only one row at a time (defaults to <tt>false</tt>
+     * allowing multiple selections)
+     */
+    singleSelect : false,
+
+    /**
+     * @cfg {Boolean} moveEditorOnEnter
+     * <tt>false</tt> to turn off moving the editor to the next row down when the enter key is pressed
+     * or the next row up when shift + enter keys are pressed.
+     */
+    // private
+    initEvents : function(){
+
+        if(!this.grid.enableDragDrop && !this.grid.enableDrag){
+            this.grid.on("rowmousedown", this.handleMouseDown, this);
+        }else{ // allow click to work like normal
+            this.grid.on("rowclick", function(grid, rowIndex, e) {
+                if(e.button === 0 && !e.shiftKey && !e.ctrlKey) {
+                    this.selectRow(rowIndex, false);
+                    grid.view.focusRow(rowIndex);
+                }
+            }, this);
+        }
+
+        this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), {
+            "up" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectPrevious(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive-1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            "down" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectNext(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive+1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            scope: this
+        });
+
+        var view = this.grid.view;
+        view.on("refresh", this.onRefresh, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("rowremoved", this.onRemove, this);
+    },
+
+    // private
+    onRefresh : function(){
+        var ds = this.grid.store, index;
+        var s = this.getSelections();
+        this.clearSelections(true);
+        for(var i = 0, len = s.length; i < len; i++){
+            var r = s[i];
+            if((index = ds.indexOfId(r.id)) != -1){
+                this.selectRow(index, true);
+            }
+        }
+        if(s.length != this.selections.getCount()){
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    onRemove : function(v, index, r){
+        if(this.selections.remove(r) !== false){
+            this.fireEvent('selectionchange', this);
+        }
+    },
+
+    // private
+    onRowUpdated : function(v, index, r){
+        if(this.isSelected(r)){
+            v.onRowSelect(index);
+        }
+    },
+
+    /**
+     * Select records.
+     * @param {Array} records The records to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectRecords : function(records, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        var ds = this.grid.store;
+        for(var i = 0, len = records.length; i < len; i++){
+            this.selectRow(ds.indexOf(records[i]), true);
+        }
+    },
+
+    /**
+     * Gets the number of selected rows.
+     * @return {Number}
+     */
+    getCount : function(){
+        return this.selections.length;
+    },
+
+    /**
+     * Selects the first row in the grid.
+     */
+    selectFirstRow : function(){
+        this.selectRow(0);
+    },
+
+    /**
+     * Select the last row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectLastRow : function(keepExisting){
+        this.selectRow(this.grid.store.getCount() - 1, keepExisting);
+    },
+
+    /**
+     * Selects the row immediately following the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a next row, else <tt>false</tt>
+     */
+    selectNext : function(keepExisting){
+        if(this.hasNext()){
+            this.selectRow(this.last+1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Selects the row that precedes the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a previous row, else <tt>false</tt>
+     */
+    selectPrevious : function(keepExisting){
+        if(this.hasPrevious()){
+            this.selectRow(this.last-1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Returns true if there is a next record to select
+     * @return {Boolean}
+     */
+    hasNext : function(){
+        return this.last !== false && (this.last+1) < this.grid.store.getCount();
+    },
+
+    /**
+     * Returns true if there is a previous record to select
+     * @return {Boolean}
+     */
+    hasPrevious : function(){
+        return !!this.last;
+    },
+
+
+    /**
+     * Returns the selected records
+     * @return {Array} Array of selected records
+     */
+    getSelections : function(){
+        return [].concat(this.selections.items);
+    },
+
+    /**
+     * Returns the first selected record.
+     * @return {Record}
+     */
+    getSelected : function(){
+        return this.selections.itemAt(0);
+    },
+
+    /**
+     * Calls the passed function with each selection. If the function returns
+     * <tt>false</tt>, iteration is stopped and this function returns
+     * <tt>false</tt>. Otherwise it returns <tt>true</tt>.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Boolean} true if all selections were iterated
+     */
+    each : function(fn, scope){
+        var s = this.getSelections();
+        for(var i = 0, len = s.length; i < len; i++){
+            if(fn.call(scope || this, s[i], i) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Clears all selections if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * @param {Boolean} fast (optional) <tt>true</tt> to bypass the
+     * conditional checks and events described in {@link #deselectRow}.
+     */
+    clearSelections : function(fast){
+        if(this.isLocked()){
+            return;
+        }
+        if(fast !== true){
+            var ds = this.grid.store;
+            var s = this.selections;
+            s.each(function(r){
+                this.deselectRow(ds.indexOfId(r.id));
+            }, this);
+            s.clear();
+        }else{
+            this.selections.clear();
+        }
+        this.last = false;
+    },
+
+
+    /**
+     * Selects all rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. 
+     */
+    selectAll : function(){
+        if(this.isLocked()){
+            return;
+        }
+        this.selections.clear();
+        for(var i = 0, len = this.grid.store.getCount(); i < len; i++){
+            this.selectRow(i, true);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selections.length > 0;
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified row is selected.
+     * @param {Number/Record} index The record or index of the record to check
+     * @return {Boolean}
+     */
+    isSelected : function(index){
+        var r = typeof index == "number" ? this.grid.store.getAt(index) : index;
+        return (r && this.selections.key(r.id) ? true : false);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified record id is selected.
+     * @param {String} id The id of record to check
+     * @return {Boolean}
+     */
+    isIdSelected : function(id){
+        return (this.selections.key(id) ? true : false);
+    },
+
+    // private
+    handleMouseDown : function(g, rowIndex, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        var view = this.grid.getView();
+        if(e.shiftKey && !this.singleSelect && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, rowIndex, e.ctrlKey);
+            this.last = last; // reset the last
+            view.focusRow(rowIndex);
+        }else{
+            var isSelected = this.isSelected(rowIndex);
+            if(e.ctrlKey && isSelected){
+                this.deselectRow(rowIndex);
+            }else if(!isSelected || this.getCount() > 1){
+                this.selectRow(rowIndex, e.ctrlKey || e.shiftKey);
+                view.focusRow(rowIndex);
+            }
+        }
+    },
+
+    /**
+     * Selects multiple rows.
+     * @param {Array} rows Array of the indexes of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep
+     * existing selections (defaults to <tt>false</tt>)
+     */
+    selectRows : function(rows, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        for(var i = 0, len = rows.length; i < len; i++){
+            this.selectRow(rows[i], true);
+        }
+    },
+
+    /**
+     * Selects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * All rows in between startRow and endRow are also selected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(startRow, endRow, keepExisting){
+        var i;
+        if(this.isLocked()){
+            return;
+        }
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        if(startRow <= endRow){
+            for(i = startRow; i <= endRow; i++){
+                this.selectRow(i, true);
+            }
+        }else{
+            for(i = startRow; i >= endRow; i--){
+                this.selectRow(i, true);
+            }
+        }
+    },
+
+    /**
+     * Deselects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.  
+     * All rows in between startRow and endRow are also deselected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     */
+    deselectRange : function(startRow, endRow, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        for(var i = startRow; i <= endRow; i++){
+            this.deselectRow(i, preventViewNotify);
+        }
+    },
+
+    /**
+     * Selects a row.  Before selecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked} and fires the
+     * {@link #beforerowselect} event.  If these checks are satisfied the row
+     * will be selected and followed up by  firing the {@link #rowselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} row The index of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    selectRow : function(index, keepExisting, preventViewNotify){
+        if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){
+            return;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){
+            if(!keepExisting || this.singleSelect){
+                this.clearSelections();
+            }
+            this.selections.add(r);
+            this.last = this.lastActive = index;
+            if(!preventViewNotify){
+                this.grid.getView().onRowSelect(index);
+            }
+            this.fireEvent("rowselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    /**
+     * Deselects a row.  Before deselecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked}.
+     * If this check is satisfied the row will be deselected and followed up by
+     * firing the {@link #rowdeselect} and {@link #selectionchange} events.
+     * @param {Number} row The index of the row to deselect
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    deselectRow : function(index, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        if(this.last == index){
+            this.last = false;
+        }
+        if(this.lastActive == index){
+            this.lastActive = false;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r){
+            this.selections.remove(r);
+            if(!preventViewNotify){
+                this.grid.getView().onRowDeselect(index);
+            }
+            this.fireEvent("rowdeselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    restoreLast : function(){
+        if(this._last){
+            this.last = this._last;
+        }
+    },
+
+    // private
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    // private
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        var shift = e.shiftKey;
+        if(k == e.TAB){
+            e.stopEvent();
+            ed.completeEdit();
+            if(shift){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+        }else if(k == e.ENTER){
+            e.stopEvent();
+            ed.completeEdit();
+            if(this.moveEditorOnEnter !== false){
+                if(shift){
+                    newCell = g.walkCells(ed.row - 1, ed.col, -1, this.acceptsNav, this);
+                }else{
+                    newCell = g.walkCells(ed.row + 1, ed.col, 1, this.acceptsNav, this);
+                }
+            }
+        }else if(k == e.ESC){
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    },
+    
+    destroy: function(){
+        if(this.rowNav){
+            this.rowNav.disable();
+            this.rowNav = null;
+        }
+        Ext.grid.RowSelectionModel.superclass.destroy.call(this);
+    }
+});/**
+ * @class Ext.grid.Column
+ * <p>This class encapsulates column configuration data to be used in the initialization of a
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>While subclasses are provided to render data in different ways, this class renders a passed
+ * data field unchanged and is usually used for textual columns.</p>
+ */
+Ext.grid.Column = function(config){
+    Ext.apply(this, config);
+
+    if(typeof this.renderer == 'string'){
+        this.renderer = Ext.util.Format[this.renderer];
+    } else if(Ext.isObject(this.renderer)){
+        this.scope = this.renderer.scope;
+        this.renderer = this.renderer.fn;
+    }
+    this.renderer = this.renderer.createDelegate(this.scope || config);
+
+    if(this.id === undefined){
+        this.id = ++Ext.grid.Column.AUTO_ID;
+    }
+    if(this.editor){
+        this.editor = Ext.create(this.editor, 'textfield');
+    }
+};
+
+Ext.grid.Column.AUTO_ID = 0;
+
+Ext.grid.Column.prototype = {
+    /**
+     * @cfg {Boolean} editable Optional. Defaults to <tt>true</tt>, enabling the configured
+     * <tt>{@link #editor}</tt>.  Set to <tt>false</tt> to initially disable editing on this column.
+     * The initial configuration may be dynamically altered using
+     * {@link Ext.grid.ColumnModel}.{@link Ext.grid.ColumnModel#setEditable setEditable()}.
+     */
+    /**
+     * @cfg {String} id Optional. A name which identifies this column (defaults to the column's initial
+     * ordinal position.) The <tt>id</tt> is used to create a CSS <b>class</b> name which is applied to all
+     * table cells (including headers) in that column (in this context the <tt>id</tt> does not need to be
+     * unique). The class name takes the form of <pre>x-grid3-td-<b>id</b></pre>
+     * Header cells will also receive this class name, but will also have the class <pre>x-grid3-hd</pre>
+     * So, to target header cells, use CSS selectors such as:<pre>.x-grid3-hd-row .x-grid3-td-<b>id</b></pre>
+     * The {@link Ext.grid.GridPanel#autoExpandColumn} grid config option references the column via this
+     * unique identifier.
+     */
+    /**
+     * @cfg {String} header Optional. The header text to be used as innerHTML
+     * (html tags are accepted) to display in the Grid view.  <b>Note</b>: to
+     * have a clickable header with no text displayed use <tt>'&#160;'</tt>.
+     */
+    /**
+     * @cfg {Boolean} groupable Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to disable the header menu item to group by the column selected. Defaults to <tt>true</tt>,
+     * which enables the header menu group option.  Set to <tt>false</tt> to disable (but still show) the
+     * group option in the header menu for the column. See also <code>{@link #groupName}</code>.
+     */
+    /**
+     * @cfg {String} groupName Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text with which to prefix the group field value in the group header line.
+     * See also {@link #groupRenderer} and
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#showGroupName showGroupName}.
+     */
+    /**
+     * @cfg {Function} groupRenderer <p>Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the function used to format the grouping field value for display in the group
+     * {@link #groupName header}.  If a <tt><b>groupRenderer</b></tt> is not specified, the configured
+     * <tt><b>{@link #renderer}</b></tt> will be called; if a <tt><b>{@link #renderer}</b></tt> is also not specified
+     * the new value of the group field will be used.</p>
+     * <p>The called function (either the <tt><b>groupRenderer</b></tt> or <tt><b>{@link #renderer}</b></tt>) will be
+     * passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>v</b> : Object<p class="sub-desc">The new value of the group field.</p></li>
+     * <li><b>unused</b> : undefined<p class="sub-desc">Unused parameter.</p></li>
+     * <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">The column index of the group field.</p></li>
+     * <li><b>ds</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
+     * </ul></div></p>
+     * <p>The function should return a string value.</p>
+     */
+    /**
+     * @cfg {String} emptyGroupText Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text to display when there is an empty group value. Defaults to the
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#emptyGroupText emptyGroupText}.
+     */
+    /**
+     * @cfg {String} dataIndex <p><b>Required</b>. The name of the field in the
+     * grid's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from
+     * which to draw the column's value.</p>
+     */
+    /**
+     * @cfg {Number} width
+     * Optional. The initial width in pixels of the column.
+     * The width of each column can also be affected if any of the following are configured:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#forceFit forceFit}</tt>
+     * <div class="sub-desc">
+     * <p>By specifying <tt>forceFit:true</tt>, {@link #fixed non-fixed width} columns will be
+     * re-proportioned (based on the relative initial widths) to fill the width of the grid so
+     * that no horizontal scrollbar is shown.</p>
+     * </div></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#autoFill autoFill}</tt></li>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#minColumnWidth minColumnWidth}</tt></li>
+     * <br><p><b>Note</b>: when the width of each column is determined, a space on the right side
+     * is reserved for the vertical scrollbar.  The
+     * {@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#scrollOffset scrollOffset}</tt>
+     * can be modified to reduce or eliminate the reserved offset.</p>
+     */
+    /**
+     * @cfg {Boolean} sortable Optional. <tt>true</tt> if sorting is to be allowed on this column.
+     * Defaults to the value of the {@link #defaultSortable} property.
+     * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}.
+     */
+    /**
+     * @cfg {Boolean} fixed Optional. <tt>true</tt> if the column width cannot be changed.  Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} resizable Optional. <tt>false</tt> to disable column resizing. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} menuDisabled Optional. <tt>true</tt> to disable the column menu. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} hidden Optional. <tt>true</tt> to hide the column. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip.  If Quicktips
+     * are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the
+     * header's HTML title attribute. Defaults to ''.
+     */
+    /**
+     * @cfg {Mixed} renderer
+     * <p>For an alternative to specifying a renderer see <code>{@link #xtype}</code></p>
+     * <p>Optional. A renderer is an 'interceptor' method which can be used transform data (value,
+     * appearance, etc.) before it is rendered). This may be specified in either of three ways:
+     * <div class="mdetail-params"><ul>
+     * <li>A renderer function used to return HTML markup for a cell given the cell's data value.</li>
+     * <li>A string which references a property name of the {@link Ext.util.Format} class which
+     * provides a renderer function.</li>
+     * <li>An object specifying both the renderer function, and its execution scope (<tt><b>this</b></tt>
+     * reference) e.g.:<pre style="margin-left:1.2em"><code>
+{
+    fn: this.gridRenderer,
+    scope: this
+}
+</code></pre></li></ul></div>
+     * If not specified, the default renderer uses the raw data value.</p>
+     * <p>For information about the renderer function (passed parameters, etc.), see
+     * {@link Ext.grid.ColumnModel#setRenderer}. An example of specifying renderer function inline:</p><pre><code>
+var companyColumn = {
+   header: 'Company Name',
+   dataIndex: 'company',
+   renderer: function(value, metaData, record, rowIndex, colIndex, store) {
+      // provide the logic depending on business rules
+      // name of your own choosing to manipulate the cell depending upon
+      // the data in the underlying Record object.
+      if (value == 'whatever') {
+          //metaData.css : String : A CSS class name to add to the TD element of the cell.
+          //metaData.attr : String : An html attribute definition string to apply to
+          //                         the data container element within the table
+          //                         cell (e.g. 'style="color:red;"').
+          metaData.css = 'name-of-css-class-you-will-define';
+      }
+      return value;
+   }
+}
+     * </code></pre>
+     * See also {@link #scope}.
+     */
+    /**
+     * @cfg {String} xtype Optional. A String which references a predefined {@link Ext.grid.Column} subclass
+     * type which is preconfigured with an appropriate <code>{@link #renderer}</code> to be easily
+     * configured into a ColumnModel. The predefined {@link Ext.grid.Column} subclass types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>gridcolumn</tt></b> : {@link Ext.grid.Column} (<b>Default</b>)<p class="sub-desc"></p></li>
+     * <li><b><tt>booleancolumn</tt></b> : {@link Ext.grid.BooleanColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>numbercolumn</tt></b> : {@link Ext.grid.NumberColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>datecolumn</tt></b> : {@link Ext.grid.DateColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>templatecolumn</tt></b> : {@link Ext.grid.TemplateColumn}<p class="sub-desc"></p></li>
+     * </ul></div>
+     * <p>Configuration properties for the specified <code>xtype</code> may be specified with
+     * the Column configuration properties, for example:</p>
+     * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    columns: [{
+        header: 'Last Updated',
+        dataIndex: 'lastChange',
+        width: 85,
+        sortable: true,
+        //renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+        xtype: 'datecolumn', // use xtype instead of renderer
+        format: 'M/d/Y' // configuration property for {@link Ext.grid.DateColumn}
+    }, {
+        ...
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} scope Optional. The scope (<tt><b>this</b></tt> reference) in which to execute the
+     * renderer.  Defaults to the Column configuration object.
+     */
+    /**
+     * @cfg {String} align Optional. Set the CSS text-align property of the column.  Defaults to undefined.
+     */
+    /**
+     * @cfg {String} css Optional. An inline style definition string which is applied to all table cells in the column
+     * (excluding headers). Defaults to undefined.
+     */
+    /**
+     * @cfg {Boolean} hideable Optional. Specify as <tt>false</tt> to prevent the user from hiding this column
+     * (defaults to true).  To disallow column hiding globally for all columns in the grid, use
+     * {@link Ext.grid.GridPanel#enableColumnHide} instead.
+     */
+    /**
+     * @cfg {Ext.form.Field} editor Optional. The {@link Ext.form.Field} to use when editing values in this column
+     * if editing is supported by the grid. See <tt>{@link #editable}</tt> also.
+     */
+
+    // private. Used by ColumnModel to avoid reprocessing
+    isColumn : true,
+    /**
+     * Optional. A function which returns displayable data when passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container
+     * element <i>within</i> the table cell (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was
+     * extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record
+     * was extracted.</p></li>
+     * </ul></div>
+     * @property renderer
+     * @type Function
+     */
+    renderer : function(value){
+        if(typeof value == 'string' && value.length < 1){
+            return '&#160;';
+        }
+        return value;
+    },
+
+    // private
+    getEditor: function(rowIndex){
+        return this.editable !== false ? this.editor : null;
+    },
+
+    /**
+     * Returns the {@link Ext.Editor editor} defined for this column that was created to wrap the {@link Ext.form.Field Field}
+     * used to edit the cell.
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor}
+     */
+    getCellEditor: function(rowIndex){
+        var editor = this.getEditor(rowIndex);
+        if(editor){
+            if(!editor.startEdit){
+                if(!editor.gridEditor){
+                    editor.gridEditor = new Ext.grid.GridEditor(editor);
+                }
+                return editor.gridEditor;
+            }else if(editor.startEdit){
+                return editor;
+            }
+        }
+        return null;
+    }
+};
+
+/**
+ * @class Ext.grid.BooleanColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders boolean data fields.  See the {@link Ext.grid.ColumnModel#xtype xtype}
+ * config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} trueText
+     * The string returned by the renderer when the column value is not falsey (defaults to <tt>'true'</tt>).
+     */
+    trueText: 'true',
+    /**
+     * @cfg {String} falseText
+     * The string returned by the renderer when the column value is falsey (but not undefined) (defaults to
+     * <tt>'false'</tt>).
+     */
+    falseText: 'false',
+    /**
+     * @cfg {String} undefinedText
+     * The string returned by the renderer when the column value is undefined (defaults to <tt>'&#160;'</tt>).
+     */
+    undefinedText: '&#160;',
+
+    constructor: function(cfg){
+        Ext.grid.BooleanColumn.superclass.constructor.call(this, cfg);
+        var t = this.trueText, f = this.falseText, u = this.undefinedText;
+        this.renderer = function(v){
+            if(v === undefined){
+                return u;
+            }
+            if(!v || v === 'false'){
+                return f;
+            }
+            return t;
+        };
+    }
+});
+
+/**
+ * @class Ext.grid.NumberColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a numeric data field according to a {@link #format} string.  See the
+ * {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column
+     * (defaults to <tt>'0,000.00'</tt>).
+     */
+    format : '0,000.00',
+    constructor: function(cfg){
+        Ext.grid.NumberColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.numberRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.DateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a passed date according to the default locale, or a configured
+ * {@link #format}. See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel}
+ * for more details.</p>
+ */
+Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Date#format} to format a Date for this Column
+     * (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : 'm/d/Y',
+    constructor: function(cfg){
+        Ext.grid.DateColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.dateRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.TemplateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a value by processing a {@link Ext.data.Record Record}'s
+ * {@link Ext.data.Record#data data} using a {@link #tpl configured} {@link Ext.XTemplate XTemplate}.
+ * See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more
+ * details.</p>
+ */
+Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String/XTemplate} tpl
+     * An {@link Ext.XTemplate XTemplate}, or an XTemplate <i>definition string</i> to use to process a
+     * {@link Ext.data.Record Record}'s {@link Ext.data.Record#data data} to produce a column's rendered value.
+     */
+    constructor: function(cfg){
+        Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);
+        var tpl = typeof Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);
+        this.renderer = function(value, p, r){
+            return tpl.apply(r.data);
+        };
+        this.tpl = tpl;
+    }
+});
+
+/*
+ * @property types
+ * @type Object
+ * @member Ext.grid.Column
+ * @static
+ * <p>An object containing predefined Column classes keyed by a mnemonic code which may be referenced
+ * by the {@link Ext.grid.ColumnModel#xtype xtype} config option of ColumnModel.</p>
+ * <p>This contains the following properties</p><div class="mdesc-details"><ul>
+ * <li>gridcolumn : <b>{@link Ext.grid.Column Column constructor}</b></li>
+ * <li>booleancolumn : <b>{@link Ext.grid.BooleanColumn BooleanColumn constructor}</b></li>
+ * <li>numbercolumn : <b>{@link Ext.grid.NumberColumn NumberColumn constructor}</b></li>
+ * <li>datecolumn : <b>{@link Ext.grid.DateColumn DateColumn constructor}</b></li>
+ * <li>templatecolumn : <b>{@link Ext.grid.TemplateColumn TemplateColumn constructor}</b></li>
+ * </ul></div>
+ */
+Ext.grid.Column.types = {
+    gridcolumn : Ext.grid.Column,
+    booleancolumn: Ext.grid.BooleanColumn,
+    numbercolumn: Ext.grid.NumberColumn,
+    datecolumn: Ext.grid.DateColumn,
+    templatecolumn: Ext.grid.TemplateColumn
+};/**
+ * @class Ext.grid.RowNumberer
+ * This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides
+ * an automatic row numbering column.
+ * <br>Usage:<br>
+ <pre><code>
+ // This is a typical column config with the first column providing row numbers
+ var colModel = new Ext.grid.ColumnModel([
+    new Ext.grid.RowNumberer(),
+    {header: "Name", width: 80, sortable: true},
+    {header: "Code", width: 50, sortable: true},
+    {header: "Description", width: 200, sortable: true}
+ ]);
+ </code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.RowNumberer = function(config){
+    Ext.apply(this, config);
+    if(this.rowspan){
+        this.renderer = this.renderer.createDelegate(this);
+    }
+};
+
+Ext.grid.RowNumberer.prototype = {
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row
+     * number column (defaults to '').
+     */
+    header: "",
+    /**
+     * @cfg {Number} width The default width in pixels of the row number column (defaults to 23).
+     */
+    width: 23,
+    /**
+     * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false).
+     * @hide
+     */
+    sortable: false,
+
+    // private
+    fixed:true,
+    menuDisabled:true,
+    dataIndex: '',
+    id: 'numberer',
+    rowspan: undefined,
+
+    // private
+    renderer : function(v, p, record, rowIndex){
+        if(this.rowspan){
+            p.cellAttr = 'rowspan="'+this.rowspan+'"';
+        }
+        return rowIndex+1;
+    }
+};/**
+ * @class Ext.grid.CheckboxSelectionModel
+ * @extends Ext.grid.RowSelectionModel
+ * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows.
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
+
+    /**
+     * @cfg {Boolean} checkOnly <tt>true</tt> if rows can only be selected by clicking on the
+     * checkbox column (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the
+     * checkbox column.  Defaults to:<pre><code>
+     * '&lt;div class="x-grid3-hd-checker">&#38;#160;&lt;/div>'</tt>
+     * </code></pre>
+     * The default CSS class of <tt>'x-grid3-hd-checker'</tt> displays a checkbox in the header
+     * and provides support for automatic check all/none behavior on header click. This string
+     * can be replaced by any valid HTML fragment, including a simple text string (e.g.,
+     * <tt>'Select Rows'</tt>), but the automatic check all/none behavior will only work if the
+     * <tt>'x-grid3-hd-checker'</tt> class is supplied.
+     */
+    header: '<div class="x-grid3-hd-checker">&#160;</div>',
+    /**
+     * @cfg {Number} width The default width in pixels of the checkbox column (defaults to <tt>20</tt>).
+     */
+    width: 20,
+    /**
+     * @cfg {Boolean} sortable <tt>true</tt> if the checkbox column is sortable (defaults to
+     * <tt>false</tt>).
+     */
+    sortable: false,
+
+    // private
+    menuDisabled:true,
+    fixed:true,
+    dataIndex: '',
+    id: 'checker',
+
+    constructor: function(){
+        Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments);
+
+        if(this.checkOnly){
+            this.handleMouseDown = Ext.emptyFn;
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
+        this.grid.on('render', function(){
+            var view = this.grid.getView();
+            view.mainBody.on('mousedown', this.onMouseDown, this);
+            Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this);
+
+        }, this);
+    },
+
+    // private
+    onMouseDown : function(e, t){
+        if(e.button === 0 && t.className == 'x-grid3-row-checker'){ // Only fire if left-click
+            e.stopEvent();
+            var row = e.getTarget('.x-grid3-row');
+            if(row){
+                var index = row.rowIndex;
+                if(this.isSelected(index)){
+                    this.deselectRow(index);
+                }else{
+                    this.selectRow(index, true);
+                }
+            }
+        }
+    },
+
+    // private
+    onHdMouseDown : function(e, t){
+        if(t.className == 'x-grid3-hd-checker'){
+            e.stopEvent();
+            var hd = Ext.fly(t.parentNode);
+            var isChecked = hd.hasClass('x-grid3-hd-checker-on');
+            if(isChecked){
+                hd.removeClass('x-grid3-hd-checker-on');
+                this.clearSelections();
+            }else{
+                hd.addClass('x-grid3-hd-checker-on');
+                this.selectAll();
+            }
+        }
+    },
+
+    // private
+    renderer : function(v, p, record){
+        return '<div class="x-grid3-row-checker">&#160;</div>';
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-foundation.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.grid.GridPanel=Ext.extend(Ext.Panel,{autoExpandColumn:false,autoExpandMax:1000,autoExpandMin:50,columnLines:false,ddText:"{0} selected row{1}",deferRowRender:true,enableColumnHide:true,enableColumnMove:true,enableDragDrop:false,enableHdMenu:true,loadMask:false,minColumnWidth:25,stripeRows:false,trackMouseOver:true,stateEvents:["columnmove","columnresize","sortchange"],view:null,rendered:false,viewReady:false,initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);if(this.columnLines){this.cls=(this.cls||"")+" x-grid-with-col-lines"}this.autoScroll=false;this.autoWidth=false;if(Ext.isArray(this.columns)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","bodyscroll","columnresize","columnmove","sortchange","reconfigure")},onRender:function(d,a){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var e=this.body;this.el.addClass("x-grid-panel");var b=this.getView();b.init(this);this.mon(e,{mousedown:this.onMouseDown,click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,keydown:this.onKeyDown,scope:this});this.relayEvents(e,["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);this.view.render()},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask){this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))}},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.mon(this.colModel,"hiddenchange",this.saveState,this,{delay:100})},applyState:function(g){var b=this.colModel;var f=g.columns;if(f){for(var d=0,a=f.length;d<a;d++){var e=f[d];var j=b.getColumnById(e.id);if(j){j.hidden=e.hidden;j.width=e.width;var h=b.getIndexById(e.id);if(h!=d){b.moveColumn(h,d)}}}}if(g.sort&&this.store){this.store[this.store.remoteSort?"setDefaultSort":"sort"](g.sort.field,g.sort.direction)}delete g.columns;delete g.sort;Ext.grid.GridPanel.superclass.applyState.call(this,g)},getState:function(){var d={columns:[]};for(var b=0,e;(e=this.colModel.config[b]);b++){d.columns[b]={id:e.id,width:e.width};if(e.hidden){d.columns[b].hidden=true}}if(this.store){var a=this.store.getSortState();if(a){d.sort=a}}return d},afterRender:function(){Ext.grid.GridPanel.superclass.afterRender.call(this);this.view.layout();if(this.deferRowRender){this.view.afterRender.defer(10,this.view)}else{this.view.afterRender()}this.viewReady=true},reconfigure:function(a,b){if(this.loadMask){this.loadMask.destroy();this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},{store:a},this.initialConfig.loadMask))}this.view.initData(a,b);this.store=a;this.colModel=b;if(this.rendered){this.view.refresh(true)}this.fireEvent("reconfigure",this,a,b)},onKeyDown:function(a){this.fireEvent("keydown",a)},onDestroy:function(){if(this.rendered){var a=this.body;a.removeAllListeners();a.update("");Ext.destroy(this.view,this.loadMask)}else{if(this.store&&this.store.autoDestroy){this.store.destroy()}}Ext.destroy(this.colModel,this.selModel);this.store=this.selModel=this.colModel=this.view=this.loadMask=null;Ext.grid.GridPanel.superclass.onDestroy.call(this)},processEvent:function(c,f){this.fireEvent(c,f);var d=f.getTarget();var b=this.view;var h=b.findHeaderIndex(d);if(h!==false){this.fireEvent("header"+c,this,h,f)}else{var g=b.findRowIndex(d);var a=b.findCellIndex(d);if(g!==false){this.fireEvent("row"+c,this,g,f);if(a!==false){this.fireEvent("cell"+c,this,g,a,f)}}}},onClick:function(a){this.processEvent("click",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onContextMenu:function(b,a){this.processEvent("contextmenu",b)},onDblClick:function(a){this.processEvent("dblclick",a)},walkCells:function(j,c,b,e,i){var h=this.colModel,f=h.getColumnCount();var a=this.store,g=a.getCount(),d=true;if(b<0){if(c<0){j--;d=false}while(j>=0){if(!d){c=f-1}d=false;while(c>=0){if(e.call(i||this,j,c,h)===true){return[j,c]}c--}j--}}else{if(c>=f){j++;d=false}while(j<g){if(!d){c=0}d=false;while(c<f){if(e.call(i||this,j,c,h)===true){return[j,c]}c++}j++}}return null},onResize:function(){Ext.grid.GridPanel.superclass.onResize.apply(this,arguments);if(this.viewReady){this.view.layout()}},getGridEl:function(){return this.body},stopEditing:Ext.emptyFn,getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.grid.RowSelectionModel(this.disableSelection?{selectRow:Ext.emptyFn}:null)}return this.selModel},getStore:function(){return this.store},getColumnModel:function(){return this.colModel},getView:function(){if(!this.view){this.view=new Ext.grid.GridView(this.viewConfig)}return this.view},getDragDropText:function(){var a=this.selModel.getCount();return String.format(this.ddText,a,a==1?"":"s")}});Ext.reg("grid",Ext.grid.GridPanel);Ext.grid.GridView=function(a){Ext.apply(this,a);this.addEvents("beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh");Ext.grid.GridView.superclass.constructor.call(this)};Ext.extend(Ext.grid.GridView,Ext.util.Observable,{deferEmptyText:true,scrollOffset:19,autoFill:false,forceFit:false,sortClasses:["sort-asc","sort-desc"],sortAscText:"Sort Ascending",sortDescText:"Sort Descending",columnsText:"Columns",selectedRowClass:"x-grid3-row-selected",borderWidth:2,tdClass:"x-grid3-cell",hdCls:"x-grid3-hd",markDirty:true,cellSelectorDepth:4,rowSelectorDepth:10,cellSelector:"td.x-grid3-cell",rowSelector:"div.x-grid3-row",firstRowCls:"x-grid3-row-first",lastRowCls:"x-grid3-row-last",rowClsRe:/(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,initTemplates:function(){var c=this.templates||{};if(!c.master){c.master=new Ext.Template('<div class="x-grid3" hidefocus="true">','<div class="x-grid3-viewport">','<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>','<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',"</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>")}if(!c.header){c.header=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">','<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',"</table>")}if(!c.hcell){c.hcell=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"",'{value}<img class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div></td>")}if(!c.body){c.body=new Ext.Template("{rows}")}if(!c.row){c.row=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table></div>")}if(!c.cell){c.cell=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',"</td>")}for(var a in c){var b=c[a];if(b&&typeof b.compile=="function"&&!b.compiled){b.disableFormats=true;b.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var c=Ext.Element;var b=this.grid.getGridEl().dom.firstChild;var a=b.childNodes;this.el=new c(b);this.mainWrap=new c(a[0]);this.mainHd=new c(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders){this.mainHd.setDisplayed(false)}this.innerHd=this.mainHd.dom.firstChild;this.scroller=new c(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new c(this.scroller.dom.firstChild);this.focusEl=new c(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new c(a[1]);this.resizeProxy=new c(a[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(c,b){var a=this.findCell(c);if(a&&(!b||this.fly(a).hasClass(b))){return this.getCellIndex(a)}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return this.getRow(b).getElementsByTagName("td")[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom;for(var d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.scroller.dom;this.innerHd.scrollLeft=a.scrollLeft;this.innerHd.scrollLeft=a.scrollLeft},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.mainHd.select("td").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},updateAllColumnWidths:function(){var d=this.getTotalWidth(),k=this.cm.getColumnCount(),f=[],e,b;for(b=0;b<k;b++){f[b]=this.getColumnWidth(b)}this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;for(b=0;b<k;b++){var c=this.getHeaderCell(b);c.style.width=f[b]}var h=this.getRows(),l,g;for(b=0,e=h.length;b<e;b++){l=h[b];l.style.width=d;if(l.firstChild){l.firstChild.style.width=d;g=l.firstChild.rows[0];for(var a=0;a<k;a++){g.childNodes[a].style.width=f[a]}}}this.onAllColumnWidthsUpdated(f,d)},updateColumnWidth:function(b,a){var h=this.getColumnWidth(b);var e=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=e;this.mainBody.dom.style.width=e;var d=this.getHeaderCell(b);d.style.width=h;var g=this.getRows(),j;for(var c=0,f=g.length;c<f;c++){j=g[c];j.style.width=e;if(j.firstChild){j.firstChild.style.width=e;j.firstChild.rows[0].childNodes[b].style.width=h}}this.onColumnWidthUpdated(b,h,e)},updateColumnHidden:function(a,e){var d=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;var g=e?"none":"";var c=this.getHeaderCell(a);c.style.display=g;var h=this.getRows(),j;for(var b=0,f=h.length;b<f;b++){j=h[b];j.style.width=d;if(j.firstChild){j.firstChild.style.width=d;j.firstChild.rows[0].childNodes[a].style.display=g}}this.onColumnHiddenUpdated(a,e,d);delete this.lastViewWidth;this.layout()},doRender:function(f,h,q,a,o,v){var b=this.templates,e=b.cell,g=b.row,k=o-1;var d="width:"+this.getTotalWidth()+";";var y=[],s,z,t={},l={tstyle:d},n;for(var u=0,x=h.length;u<x;u++){n=h[u];s=[];var m=(u+a);for(var w=0;w<o;w++){z=f[w];t.id=z.id;t.css=w===0?"x-grid3-cell-first ":(w==k?"x-grid3-cell-last ":"");t.attr=t.cellAttr="";t.value=z.renderer(n.data[z.name],t,n,m,w,q);t.style=z.style;if(Ext.isEmpty(t.value)){t.value="&#160;"}if(this.markDirty&&n.dirty&&typeof n.modified[z.name]!=="undefined"){t.css+=" x-grid3-dirty-cell"}s[s.length]=e.apply(t)}var A=[];if(v&&((m+1)%2===0)){A[0]="x-grid3-row-alt"}if(n.dirty){A[1]=" x-grid3-dirty-row"}l.cols=o;if(this.getRowClass){A[2]=this.getRowClass(n,m,l,q)}l.alt=A.join(" ");l.cells=s.join("");y[y.length]=g.apply(l)}return y.join("")},processRows:function(a,c){if(!this.ds||this.ds.getCount()<1){return}var b=this.getRows();c=c||!this.grid.stripeRows;a=a||0;Ext.each(b,function(e,d){e.rowIndex=d;e.className=e.className.replace(this.rowClsRe," ");if(!c&&(d+1)%2===0){e.className+=" x-grid3-row-alt"}});if(a===0){Ext.fly(b[0]).addClass(this.firstRowCls)}Ext.fly(b[b.length-1]).addClass(this.lastRowCls)},afterRender:function(){if(!this.ds||!this.cm){return}this.mainBody.dom.innerHTML=this.renderRows()||"&#160;";this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText()}},renderUI:function(){var d=this.renderHeaders();var a=this.templates.body.apply({rows:"&#160;"});var b=this.templates.master.apply({body:a,header:d,ostyle:"width:"+this.getOffsetWidth()+";",bstyle:"width:"+this.getTotalWidth()+";"});var c=this.grid;c.getGridEl().dom.innerHTML=b;this.initElements();Ext.fly(this.innerHd).on("click",this.handleHdDown,this);this.mainHd.on({scope:this,mouseover:this.handleHdOver,mouseout:this.handleHdOut,mousemove:this.handleHdMove});this.scroller.on("scroll",this.syncScroll,this);if(c.enableColumnResize!==false){this.splitZone=new Ext.grid.GridView.SplitDragZone(c,this.mainHd.dom)}if(c.enableColumnMove){this.columnDrag=new Ext.grid.GridView.ColumnDragZone(c,this.innerHd);this.columnDrop=new Ext.grid.HeaderDropZone(c,this.mainHd.dom)}if(c.enableHdMenu!==false){this.hmenu=new Ext.menu.Menu({id:c.id+"-hctx"});this.hmenu.add({itemId:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{itemId:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});if(c.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:c.id+"-hcols-menu"});this.colMenu.on({scope:this,beforeshow:this.beforeColMenuShow,itemclick:this.handleHdMenuClick});this.hmenu.add("-",{itemId:"columns",hideOnClick:false,text:this.columnsText,menu:this.colMenu,iconCls:"x-cols-icon"})}this.hmenu.on("itemclick",this.handleHdMenuClick,this)}if(c.trackMouseOver){this.mainBody.on({scope:this,mouseover:this.onRowOver,mouseout:this.onRowOut})}if(c.enableDragDrop||c.enableDrag){this.dragZone=new Ext.grid.GridDragZone(c,{ddGroup:c.ddGroup||"GridDD"})}this.updateHeaderSortState()},layout:function(){if(!this.mainBody){return}var d=this.grid;var h=d.getGridEl();var a=h.getSize(true);var b=a.width;if(!d.hideHeaders&&(b<20||a.height<20)){return}if(d.autoHeight){this.scroller.dom.style.overflow="visible";if(Ext.isWebKit){this.scroller.dom.style.position="static"}}else{this.el.setSize(a.width,a.height);var f=this.mainHd.getHeight();var e=a.height-(f);this.scroller.setSize(b,e);if(this.innerHd){this.innerHd.style.width=(b)+"px"}}if(this.forceFit){if(this.lastViewWidth!=b){this.fitColumns(false,false);this.lastViewWidth=b}}else{this.autoExpand();this.syncHeaderScroll()}this.onLayout(b,e)},onLayout:function(a,b){},onColumnWidthUpdated:function(c,a,b){},onAllColumnWidthsUpdated:function(a,b){},onColumnHiddenUpdated:function(b,c,a){},updateColumnText:function(a,b){},afterMove:function(a){},init:function(a){this.grid=a;this.initTemplates();this.initData(a.store,a.colModel);this.initUI(a)},getColumnId:function(a){return this.cm.getColumnId(a)},getOffsetWidth:function(){return(this.cm.getTotalWidth()+this.scrollOffset)+"px"},renderHeaders:function(){var c=this.cm,g=this.templates,e=g.hcell,b=[],h={},a=c.getColumnCount(),f=a-1;for(var d=0;d<a;d++){h.id=c.getColumnId(d);h.value=c.getColumnHeader(d)||"";h.style=this.getColumnStyle(d,true);h.tooltip=this.getColumnTooltip(d);h.css=d===0?"x-grid3-cell-first ":(d==f?"x-grid3-cell-last ":"");if(c.config[d].align=="right"){h.istyle="padding-right:16px"}else{delete h.istyle}b[b.length]=e.apply(h)}return g.header.apply({cells:b.join(""),tstyle:"width:"+this.getTotalWidth()+";"})},getColumnTooltip:function(a){var b=this.cm.getColumnTooltip(a);if(b){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+b+'"'}else{return'title="'+b+'"'}}return""},beforeUpdate:function(){this.grid.stopEditing(true)},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=this.getTotalWidth()},focusRow:function(a){this.focusCell(a,0,false)},focusCell:function(c,a,b){this.syncFocusEl(this.ensureVisible(c,a,b));if(Ext.isGecko){this.focusEl.focus()}else{this.focusEl.focus.defer(1,this.focusEl)}},resolveCell:function(g,d,f){if(typeof g!="number"){g=g.rowIndex}if(!this.ds){return null}if(g<0||g>=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(g),a=this.cm,e=a.getColumnCount(),b;if(!(f===false&&d===0)){while(d<e&&a.isHidden(d)){d++}b=this.getCell(g,d)}return{row:c,cell:b}},getResolvedXY:function(a){if(!a){return null}var b=this.scroller.dom,e=a.cell,d=a.row;return e?Ext.fly(e).getXY():[this.el.getX(),Ext.fly(d).getY()]},syncFocusEl:function(d,a,c){var b=d;if(!Ext.isArray(b)){d=Math.min(d,Math.max(0,this.getRows().length-1));b=this.getResolvedXY(this.resolveCell(d,a,c))}this.focusEl.setXY(b||this.scroller.getXY())},ensureVisible:function(s,f,e){var q=this.resolveCell(s,f,e);if(!q||!q.row){return}var j=q.row,g=q.cell,m=this.scroller.dom,r=0,d=j,n=this.el.dom;while(d&&d!=n){r+=d.offsetTop;d=d.offsetParent}r-=this.mainHd.dom.offsetHeight;var o=r+j.offsetHeight,a=m.clientHeight,l=n+a;n=parseInt(m.scrollTop,10);if(r<n){m.scrollTop=r}else{if(o>l){m.scrollTop=o-a}}if(e!==false){var k=parseInt(g.offsetLeft,10);var i=k+g.offsetWidth;var h=parseInt(m.scrollLeft,10);var b=h+m.clientWidth;if(k<h){m.scrollLeft=k}else{if(i>b){m.scrollLeft=i-m.clientWidth}}}return this.getResolvedXY(q)},insertRows:function(a,h,e,g){var d=a.getCount()-1;if(!g&&h===0&&e>=d){this.refresh()}else{if(!g){this.fireEvent("beforerowsinserted",this,h,e)}var b=this.renderRows(h,e),f=this.getRow(h);if(f){if(h===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",f,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!g){this.fireEvent("rowsinserted",this,h,e);this.processRows(h)}else{if(h===0||h>=d){Ext.fly(this.getRow(h)).addClass(h===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(h)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(a,c){var b=!c?(this.cm.config[a].css||""):"";b+="width:"+this.getColumnWidth(a)+";";if(this.cm.isHidden(a)){b+="display:none;"}var d=this.cm.config[a].align;if(d){b+="text-align:"+d+";"}return b},getColumnWidth:function(b){var a=this.cm.getColumnWidth(b);if(typeof a=="number"){return(Ext.isBorderBox?a:(a-this.borderWidth>0?a-this.borderWidth:0))+"px"}return a},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(d,g,h){var p=this.cm,j;var k=p.getTotalWidth(false);var a=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(a<20){return}var e=a-k;if(e===0){return false}var l=p.getColumnCount(true);var r=l-(typeof h=="number"?1:0);if(r===0){r=1;h=undefined}var q=p.getColumnCount();var n=[];var m=0;var c=0;var o;for(j=0;j<q;j++){if(!p.isHidden(j)&&!p.isFixed(j)&&j!==h){o=p.getColumnWidth(j);n.push(j);m=j;n.push(o);c+=o}}var b=(a-p.getTotalWidth())/c;while(n.length){o=n.pop();j=n.pop();p.setColumnWidth(j,Math.max(this.grid.minColumnWidth,Math.floor(o+o*b)),true)}if((k=p.getTotalWidth(false))>a){var f=r!=l?h:m;p.setColumnWidth(f,Math.max(1,p.getColumnWidth(f)-(k-a)),true)}if(d!==true){this.updateAllColumnWidths()}return true},autoExpand:function(b){var h=this.grid,a=this.cm;if(!this.userResized&&h.autoExpandColumn){var d=a.getTotalWidth(false);var i=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(d!=i){var f=a.getIndexById(h.autoExpandColumn);var e=a.getColumnWidth(f);var c=Math.min(Math.max(((i-d)+e),h.autoExpandMin),h.autoExpandMax);if(c!=e){a.setColumnWidth(f,c,true);if(b!==true){this.updateColumnWidth(f,c)}}}}},getColumnData:function(){var d=[],a=this.cm,e=a.getColumnCount();for(var c=0;c<e;c++){var b=a.getDataIndex(c);d[c]={name:(typeof b=="undefined"?this.ds.fields.get(c).name:b),renderer:a.getRenderer(c),id:a.getColumnId(c),style:this.getColumnStyle(c)}}return d},renderRows:function(i,c){var d=this.grid,f=d.colModel,a=d.store,j=d.stripeRows;var h=f.getColumnCount();if(a.getCount()<1){return""}var e=this.getColumnData();i=i||0;c=typeof c=="undefined"?a.getCount()-1:c;var b=a.getRange(i,c);return this.doRender(e,b,a,i,h,j)},renderBody:function(){var a=this.renderRows()||"&#160;";return this.templates.body.apply({rows:a})},refreshRow:function(a){var c=this.ds,b;if(typeof a=="number"){b=a;a=c.getAt(b);if(!a){return}}else{b=c.indexOf(a);if(b<0){return}}this.insertRows(c,b,b,true);this.getRow(b).rowIndex=b;this.onRemove(c,a,b+1,true);this.fireEvent("rowupdated",this,b,a)},refresh:function(b){this.fireEvent("beforerefresh",this);this.grid.stopEditing(true);var a=this.renderBody();this.mainBody.update(a).setWidth(this.getTotalWidth());if(b===true){this.updateHeaders();this.updateHeaderSortState()}this.processRows(0,true);this.layout();this.applyEmptyText();this.fireEvent("refresh",this)},applyEmptyText:function(){if(this.emptyText&&!this.hasRows()){this.mainBody.update('<div class="x-grid-empty">'+this.emptyText+"</div>")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},destroy:function(){if(this.colMenu){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu}if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu}if(this.grid.enableColumnMove){var c=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(c){for(var a in c){if(!c[a].config.isTarget&&c[a].dragElId){var b=c[a].dragElId;c[a].unreg();Ext.get(b).remove()}else{if(c[a].config.isTarget){c[a].proxyTop.remove();c[a].proxyBottom.remove();c[a].unreg()}}if(Ext.dd.DDM.locationCache[a]){delete Ext.dd.DDM.locationCache[a]}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}if(this.dragZone){this.dragZone.unreg()}Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);Ext.destroy(this.resizeMarker,this.resizeProxy,this.focusEl,this.mainBody,this.scroller,this.mainHd,this.mainWrap,this.dragZone,this.splitZone,this.columnDrag,this.columnDrop);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);this.purgeListeners()},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders()},this,{single:true})}else{this.fitColumns(true,true)}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},initData:function(b,a){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);if(this.ds!==b&&this.ds.autoDestroy){this.ds.destroy()}}if(b){b.on({scope:this,load:this.onLoad,datachanged:this.onDataChange,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.onClear})}this.ds=b;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this)}if(a){delete this.lastViewWidth;a.on({scope:this,configchange:this.onColConfigChange,widthchange:this.onColWidthChange,headerchange:this.onHeaderChange,hiddenchange:this.onHiddenChange,columnmoved:this.onColumnMove})}this.cm=a},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(c,a,b){this.insertRows(c,b,b+(a.length-1))},onRemove:function(d,a,b,c){if(c!==true){this.fireEvent("beforerowremoved",this,b,a)}this.removeRow(b);if(c!==true){this.processRows(b);this.applyEmptyText();this.fireEvent("rowremoved",this,b,a)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,d,b){this.indexMap=null;var c=this.getScrollState();this.refresh(true);this.restoreScroll(c);this.afterMove(b);this.grid.fireEvent("columnmove",d,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:function(){},onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c;if((c=this.findRowIndex(a))!==false){this.addRowClass(c,"x-grid3-row-over")}},onRowOut:function(b,a){var c;if((c=this.findRowIndex(a))!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,"x-grid3-row-over")}},handleWheel:function(a){a.stopPropagation()},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(c,b){this.userResized=true;var a=this.grid.colModel;a.setColumnWidth(c,b,true);if(this.forceFit){this.fitColumns(true,false,c);this.updateAllColumnWidths()}else{this.updateColumnWidth(c,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",c,b)},handleHdMenuClick:function(c){var b=this.hdCtxIndex;var a=this.cm,d=this.ds;switch(c.itemId){case"asc":d.sort(a.getDataIndex(b),"ASC");break;case"desc":d.sort(a.getDataIndex(b),"DESC");break;default:b=a.getIndexById(c.itemId.substr(4));if(b!=-1){if(c.checked&&a.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}a.setHidden(b,c.checked)}}return true},isHideableColumn:function(a){return !a.hidden&&!a.fixed},beforeColMenuShow:function(){var a=this.cm,c=a.getColumnCount();this.colMenu.removeAll();for(var b=0;b<c;b++){if(a.config[b].fixed!==true&&a.config[b].hideable!==false){this.colMenu.add(new Ext.menu.CheckItem({itemId:"col-"+a.getColumnId(b),text:a.getColumnHeader(b),checked:!a.isHidden(b),hideOnClick:false,disabled:a.config[b].hideable===false}))}}},handleHdDown:function(g,d){if(Ext.fly(d).hasClass("x-grid3-hd-btn")){g.stopEvent();var f=this.findHeaderCell(d);Ext.fly(f).addClass("x-grid3-hd-menu-open");var c=this.getCellIndex(f);this.hdCtxIndex=c;var b=this.hmenu.items,a=this.cm;b.get("asc").setDisabled(!a.isSortable(c));b.get("desc").setDisabled(!a.isSortable(c));this.hmenu.on("hide",function(){Ext.fly(f).removeClass("x-grid3-hd-menu-open")},this,{single:true});this.hmenu.show(d,"tl-bl?")}},handleHdOver:function(d,a){var c=this.findHeaderCell(a);if(c&&!this.headersDisabled){this.activeHd=c;this.activeHdIndex=this.getCellIndex(c);var b=this.fly(c);this.activeHdRegion=b.getRegion();if(!this.cm.isMenuDisabled(this.activeHdIndex)){b.addClass("x-grid3-hd-over");this.activeHdBtn=b.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(c.firstChild.offsetHeight-1)+"px"}}}},handleHdMove:function(g,d){if(this.activeHd&&!this.headersDisabled){var b=this.splitHandleWidth||5;var f=this.activeHdRegion;var a=g.getPageX();var c=this.activeHd.style;if(a-f.left<=b&&this.cm.isResizable(this.activeHdIndex-1)){c.cursor=Ext.isAir?"move":Ext.isWebKit?"e-resize":"col-resize"}else{if(f.right-a<=(!this.activeHdBtn?b:2)&&this.cm.isResizable(this.activeHdIndex)){c.cursor=Ext.isAir?"move":Ext.isWebKit?"w-resize":"col-resize"}else{c.cursor=""}}}},handleHdOut:function(c,a){var b=this.findHeaderCell(a);if(b&&(!Ext.isIE||!c.within(b,true))){this.activeHd=null;this.fly(b).removeClass("x-grid3-hd-over");b.style.cursor=""}},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5};Ext.extend(Ext.grid.GridView.SplitDragZone,Ext.dd.DDProxy,{b4StartDrag:function(a,e){this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex);var c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},handleMouseDown:function(a){var h=this.view.findHeaderCell(a.getTarget());if(h){var k=this.view.fly(h).getXY(),d=k[0],c=k[1];var i=a.getXY(),b=i[0];var g=h.offsetWidth,f=false;if((b-d)<=this.hw){f=-1}else{if((d+g)-b<=this.hw){f=0}}if(f!==false){this.cm=this.grid.colModel;var j=this.view.getCellIndex(h);if(f==-1){if(j+f<0){return}while(this.cm.isHidden(j+f)){--f;if(j+f<0){return}}}this.cellIndex=j+f;this.split=h.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(d){this.marker.hide();var a=this.view;var b=Math.max(this.minX,d.getPageX());var c=b-this.startPos;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+c);setTimeout(function(){a.headersDisabled=false},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.HeaderDragZone=function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false};Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(c){var a=Ext.lib.Event.getTarget(c);var b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){var a=this.view;setTimeout(function(){a.headersDisabled=false},50)},afterInvalidDrop:function(){var a=this.view;setTimeout(function(){a.headersDisabled=false},50)}});Ext.grid.HeaderDropZone=function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)};Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c);var b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,j,i){var a=Ext.lib.Event.getPageX(i);var f=Ext.lib.Dom.getRegion(j.firstChild);var c,g,b=f.top+this.proxyOffsets[1];if((f.right-a)<=(f.right-f.left)/2){c=f.right+this.view.borderWidth;g="after"}else{c=f.left;g="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(j))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return g},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(f,b,d,c){var a=false;if(c.header!=f){a=this.positionIndicator(c.header,f,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,l,f,c){var d=c.header;if(d!=b){var j=this.grid.colModel;var i=Ext.lib.Event.getPageX(f);var a=Ext.lib.Dom.getRegion(b.firstChild);var m=(a.right-i)<=((a.right-a.left)/2)?"after":"before";var g=this.view.getCellIndex(d);var k=this.view.getCellIndex(b);if(m=="after"){k++}if(g<k){k--}j.moveColumn(g,k);this.grid.fireEvent("columnmove",g,k);return true}return false}});Ext.grid.GridView.ColumnDragZone=function(a,b){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,a,b,null);this.proxy.el.addClass("x-grid3-col-dd")};Ext.extend(Ext.grid.GridView.ColumnDragZone,Ext.grid.HeaderDragZone,{handleMouseDown:function(a){},callHandleMouseDown:function(a){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,a)}});Ext.grid.SplitDragZone=function(a,c,b){this.grid=a;this.view=a.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,c,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b));this.scroll=false};Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(a,d){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var b=this.cm.getColumnWidth(this.cellIndex);var c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,d)},handleMouseDown:function(c){var b=Ext.EventObject.setEvent(c);var a=this.fly(b.getTarget());if(a.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(a.dom);this.split=a.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}},endDrag:function(c){this.view.headersDisabled=false;var a=Math.max(this.minX,Ext.lib.Event.getPageX(c));var b=a-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+b)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.GridDragZone=function(b,a){this.view=b.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,a);this.scroll=false;this.grid=b;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(b){var a=Ext.lib.Event.getTarget(b);var d=this.view.findRowIndex(a);if(d!==false){var c=this.grid.selModel;if(!c.isSelected(d)||b.hasModifier()){c.handleMouseDown(this.grid,d,b)}return{grid:this.grid,ddel:this.ddel,rowIndex:d,selections:c.getSelections()}}return false},onInitDrag:function(b){var a=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=false},getRepairXY:function(b,a){return false},onEndDrag:function(a,b){},onValidDrop:function(a,b,c){this.hideProxy()},beforeInvalidDrop:function(a,b){}});Ext.grid.ColumnModel=function(a){if(a.columns){Ext.apply(this,a);this.setConfig(a.columns,true)}else{this.setConfig(a,true)}this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{defaultWidth:100,defaultSortable:false,getColumnId:function(a){return this.config[a].id},getColumnAt:function(a){return this.config[a]},setConfig:function(e,d){var f,g,a;if(!d){delete this.totalWidth;for(f=0,a=this.config.length;f<a;f++){g=this.config[f];if(g.editor){g.editor.destroy()}}}this.defaults=Ext.apply({width:this.defaultWidth,sortable:this.defaultSortable},this.defaults);this.config=e;this.lookup={};for(f=0,a=e.length;f<a;f++){g=Ext.applyIf(e[f],this.defaults);if(!g.isColumn){var b=Ext.grid.Column.types[g.xtype||"gridcolumn"];g=new b(g);e[f]=g}this.lookup[g.id]=g}if(!d){this.fireEvent("configchange",this)}},getColumnById:function(a){return this.lookup[a]},getIndexById:function(c){for(var b=0,a=this.config.length;b<a;b++){if(this.config[b].id==c){return b}}return -1},moveColumn:function(d,a){var b=this.config[d];this.config.splice(d,1);this.config.splice(a,0,b);this.dataMap=null;this.fireEvent("columnmoved",this,d,a)},getColumnCount:function(d){if(d===true){var e=0;for(var b=0,a=this.config.length;b<a;b++){if(!this.isHidden(b)){e++}}return e}return this.config.length},getColumnsBy:function(e,d){var f=[];for(var b=0,a=this.config.length;b<a;b++){var g=this.config[b];if(e.call(d||this,g,b)===true){f[f.length]=g}}return f},isSortable:function(a){return this.config[a].sortable},isMenuDisabled:function(a){return !!this.config[a].menuDisabled},getRenderer:function(a){if(!this.config[a].renderer){return Ext.grid.ColumnModel.defaultRenderer}return this.config[a].renderer},setRenderer:function(a,b){this.config[a].renderer=b},getColumnWidth:function(a){return this.config[a].width},setColumnWidth:function(b,c,a){this.config[b].width=c;this.totalWidth=null;if(!a){this.fireEvent("widthchange",this,b,c)}},getTotalWidth:function(b){if(!this.totalWidth){this.totalWidth=0;for(var c=0,a=this.config.length;c<a;c++){if(b||!this.isHidden(c)){this.totalWidth+=this.getColumnWidth(c)}}}return this.totalWidth},getColumnHeader:function(a){return this.config[a].header},setColumnHeader:function(a,b){this.config[a].header=b;this.fireEvent("headerchange",this,a,b)},getColumnTooltip:function(a){return this.config[a].tooltip},setColumnTooltip:function(a,b){this.config[a].tooltip=b},getDataIndex:function(a){return this.config[a].dataIndex},setDataIndex:function(a,b){this.config[a].dataIndex=b},findColumnIndex:function(d){var e=this.config;for(var b=0,a=e.length;b<a;b++){if(e[b].dataIndex==d){return b}}return -1},isCellEditable:function(a,b){return(this.config[a].editable||(typeof this.config[a].editable=="undefined"&&this.config[a].editor))?true:false},getCellEditor:function(a,b){return this.config[a].getCellEditor(b)},setEditable:function(a,b){this.config[a].editable=b},isHidden:function(a){return this.config[a].hidden},isFixed:function(a){return this.config[a].fixed},isResizable:function(a){return a>=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){Ext.destroy(this.config[a].editor);this.config[a].editor=b},destroy:function(){for(var b=0,d=this.config,a=d.length;b<a;b++){Ext.destroy(d[b].editor)}this.purgeListeners()}});Ext.grid.ColumnModel.defaultRenderer=function(a){if(typeof a=="string"&&a.length<1){return"&#160;"}return a};Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(a){this.grid=a;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},destroy:function(){this.purgeListeners()}});Ext.grid.RowSelectionModel=function(a){Ext.apply(this,a);this.selections=new Ext.util.MixedCollection(false,function(b){return b.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("rowmousedown",this.handleMouseDown,this)}else{this.grid.on("rowclick",function(b,d,c){if(c.button===0&&!c.shiftKey&&!c.ctrlKey){this.selectRow(d,false);b.view.focusRow(d)}},this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{up:function(c){if(!c.shiftKey||this.singleSelect){this.selectPrevious(false)}else{if(this.last!==false&&this.lastActive!==false){var b=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(b!==false){this.last=b}}else{this.selectFirstRow()}}},down:function(c){if(!c.shiftKey||this.singleSelect){this.selectNext(false)}else{if(this.last!==false&&this.lastActive!==false){var b=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(b!==false){this.last=b}}else{this.selectFirstRow()}}},scope:this});var a=this.grid.view;a.on("refresh",this.onRefresh,this);a.on("rowupdated",this.onRowUpdated,this);a.on("rowremoved",this.onRemove,this)},onRefresh:function(){var f=this.grid.store,b;var d=this.getSelections();this.clearSelections(true);for(var c=0,a=d.length;c<a;c++){var e=d[c];if((b=f.indexOfId(e.id))!=-1){this.selectRow(b,true)}}if(d.length!=this.selections.getCount()){this.fireEvent("selectionchange",this)}},onRemove:function(a,b,c){if(this.selections.remove(c)!==false){this.fireEvent("selectionchange",this)}},onRowUpdated:function(a,b,c){if(this.isSelected(c)){a.onRowSelect(b)}},selectRecords:function(b,e){if(!e){this.clearSelections()}var d=this.grid.store;for(var c=0,a=b.length;c<a;c++){this.selectRow(d.indexOf(b[c]),true)}},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(a){this.selectRow(this.grid.store.getCount()-1,a)},selectNext:function(a){if(this.hasNext()){this.selectRow(this.last+1,a);this.grid.getView().focusRow(this.last);return true}return false},selectPrevious:function(a){if(this.hasPrevious()){this.selectRow(this.last-1,a);this.grid.getView().focusRow(this.last);return true}return false},hasNext:function(){return this.last!==false&&(this.last+1)<this.grid.store.getCount()},hasPrevious:function(){return !!this.last},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},each:function(e,d){var c=this.getSelections();for(var b=0,a=c.length;b<a;b++){if(e.call(d||this,c[b],b)===false){return false}}return true},clearSelections:function(a){if(this.isLocked()){return}if(a!==true){var c=this.grid.store;var b=this.selections;b.each(function(d){this.deselectRow(c.indexOfId(d.id))},this);b.clear()}else{this.selections.clear()}this.last=false},selectAll:function(){if(this.isLocked()){return}this.selections.clear();for(var b=0,a=this.grid.store.getCount();b<a;b++){this.selectRow(b,true)}},hasSelection:function(){return this.selections.length>0},isSelected:function(a){var b=typeof a=="number"?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,h,f){if(f.button!==0||this.isLocked()){return}var a=this.grid.getView();if(f.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,h,f.ctrlKey);this.last=c;a.focusRow(h)}else{var b=this.isSelected(h);if(f.ctrlKey&&b){this.deselectRow(h)}else{if(!b||this.getCount()>1){this.selectRow(h,f.ctrlKey||f.shiftKey);a.focusRow(h)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b<a;b++){this.selectRow(c[b],true)}},selectRange:function(b,a,d){var c;if(this.isLocked()){return}if(!d){this.clearSelections()}if(b<=a){for(c=b;c<=a;c++){this.selectRow(c,true)}}else{for(c=b;c>=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(h,f){var c=f.getKey(),i,d=this.grid,b=d.activeEditor;var a=f.shiftKey;if(c==f.TAB){f.stopEvent();b.completeEdit();if(a){i=d.walkCells(b.row,b.col-1,-1,this.acceptsNav,this)}else{i=d.walkCells(b.row,b.col+1,1,this.acceptsNav,this)}}else{if(c==f.ENTER){f.stopEvent();b.completeEdit();if(this.moveEditorOnEnter!==false){if(a){i=d.walkCells(b.row-1,b.col,-1,this.acceptsNav,this)}else{i=d.walkCells(b.row+1,b.col,1,this.acceptsNav,this)}}}else{if(c==f.ESC){b.cancelEdit()}}}if(i){d.startEditing(i[0],i[1])}},destroy:function(){if(this.rowNav){this.rowNav.disable();this.rowNav=null}Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=function(a){Ext.apply(this,a);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}this.renderer=this.renderer.createDelegate(this.scope||a);if(this.id===undefined){this.id=++Ext.grid.Column.AUTO_ID}if(this.editor){this.editor=Ext.create(this.editor,"textfield")}};Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={isColumn:true,renderer:function(a){if(typeof a=="string"&&a.length<1){return"&#160;"}return a},getEditor:function(a){return this.editable!==false?this.editor:null},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}return a.gridEditor}else{if(a.startEdit){return a}}}return null}};Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=typeof Ext.isObject(this.tpl)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn};Ext.grid.RowNumberer=function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}};Ext.grid.RowNumberer.prototype={header:"",width:23,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}};Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'<div class="x-grid3-hd-checker">&#160;</div>',width:20,sortable:false,menuDisabled:true,fixed:true,dataIndex:"",id:"checker",constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var a=this.grid.getView();a.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(a.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'<div class="x-grid3-row-checker">&#160;</div>'}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping-debug.js	(revision 625)
@@ -0,0 +1,517 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GroupingView
+ * @extends Ext.grid.GridView
+ * Adds the ability for single level grouping to the grid. A {@link Ext.data.GroupingStore GroupingStore}
+ * must be used to enable grouping.  Some grouping characteristics may also be configured at the
+ * {@link Ext.grid.Column Column level}<div class="mdetail-params"><ul>
+ * <li><code>{@link Ext.grid.Column#emptyGroupText emptyGroupText}</li>
+ * <li><code>{@link Ext.grid.Column#groupable groupable}</li>
+ * <li><code>{@link Ext.grid.Column#groupName groupName}</li>
+ * <li><code>{@link Ext.grid.Column#groupRender groupRender}</li>
+ * </ul></div>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    // A groupingStore is required for a GroupingView
+    store: new {@link Ext.data.GroupingStore}({
+        autoDestroy: true,
+        reader: reader,
+        data: xg.dummyData,
+        sortInfo: {field: 'company', direction: 'ASC'},
+        {@link Ext.data.GroupingStore#groupOnSort groupOnSort}: true,
+        {@link Ext.data.GroupingStore#remoteGroup remoteGroup}: true,
+        {@link Ext.data.GroupingStore#groupField groupField}: 'industry'
+    }),
+    colModel: new {@link Ext.grid.ColumnModel}({
+        columns:[
+            {id:'company',header: 'Company', width: 60, dataIndex: 'company'},
+            // {@link Ext.grid.Column#groupable groupable}, {@link Ext.grid.Column#groupName groupName}, {@link Ext.grid.Column#groupRender groupRender} are also configurable at column level
+            {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price', {@link Ext.grid.Column#groupable groupable}: false},
+            {header: 'Change', dataIndex: 'change', renderer: Ext.util.Format.usMoney},
+            {header: 'Industry', dataIndex: 'industry'},
+            {header: 'Last Updated', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            menuDisabled: false,
+            width: 20
+        }
+    }),
+
+    view: new Ext.grid.GroupingView({
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+        // custom grouping text template to display the number of items per group
+        {@link #groupTextTpl}: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+
+    frame:true,
+    width: 700,
+    height: 450,
+    collapsible: true,
+    animCollapse: false,
+    title: 'Grouping Example',
+    iconCls: 'icon-grid',
+    renderTo: document.body
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
+
+    /**
+     * @cfg {String} groupByText Text displayed in the grid header menu for grouping by a column
+     * (defaults to 'Group By This Field').
+     */
+    groupByText : 'Group By This Field',
+    /**
+     * @cfg {String} showGroupsText Text displayed in the grid header for enabling/disabling grouping
+     * (defaults to 'Show in Groups').
+     */
+    showGroupsText : 'Show in Groups',
+    /**
+     * @cfg {Boolean} hideGroupedColumn <tt>true</tt> to hide the column that is currently grouped (defaults to <tt>false</tt>)
+     */
+    hideGroupedColumn : false,
+    /**
+     * @cfg {Boolean} showGroupName If <tt>true</tt> will display a prefix plus a ': ' before the group field value
+     * in the group header line.  The prefix will consist of the <tt><b>{@link Ext.grid.Column#groupName groupName}</b></tt>
+     * (or the configured <tt><b>{@link Ext.grid.Column#header header}</b></tt> if not provided) configured in the
+     * {@link Ext.grid.Column} for each set of grouped rows (defaults to <tt>true</tt>).
+     */
+    showGroupName : true,
+    /**
+     * @cfg {Boolean} startCollapsed <tt>true</tt> to start all groups collapsed (defaults to <tt>false</tt>)
+     */
+    startCollapsed : false,
+    /**
+     * @cfg {Boolean} enableGrouping <tt>false</tt> to disable grouping functionality (defaults to <tt>true</tt>)
+     */
+    enableGrouping : true,
+    /**
+     * @cfg {Boolean} enableGroupingMenu <tt>true</tt> to enable the grouping control in the column menu (defaults to <tt>true</tt>)
+     */
+    enableGroupingMenu : true,
+    /**
+     * @cfg {Boolean} enableNoGroups <tt>true</tt> to allow the user to turn off grouping (defaults to <tt>true</tt>)
+     */
+    enableNoGroups : true,
+    /**
+     * @cfg {String} emptyGroupText The text to display when there is an empty group value (defaults to <tt>'(None)'</tt>).
+     * May also be specified per column, see {@link Ext.grid.Column}.{@link Ext.grid.Column#emptyGroupText emptyGroupText}.
+     */
+    emptyGroupText : '(None)',
+    /**
+     * @cfg {Boolean} ignoreAdd <tt>true</tt> to skip refreshing the view when new rows are added (defaults to <tt>false</tt>)
+     */
+    ignoreAdd : false,
+    /**
+     * @cfg {String} groupTextTpl The template used to render the group header (defaults to <tt>'{text}'</tt>).
+     * This is used to format an object which contains the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>group</b> : String<p class="sub-desc">The <i>rendered</i> value of the group field.
+     * By default this is the unchanged value of the group field. If a <tt><b>{@link Ext.grid.Column#groupRenderer groupRenderer}</b></tt>
+     * is specified, it is the result of a call to that function.</p></li>
+     * <li><b>gvalue</b> : Object<p class="sub-desc">The <i>raw</i> value of the group field.</p></li>
+     * <li><b>text</b> : String<p class="sub-desc">The configured header (as described in <tt>{@link #showGroupName})</tt>
+     * if <tt>{@link #showGroupName}</tt> is <tt>true</tt>) plus the <i>rendered</i> group field value.</p></li>
+     * <li><b>groupId</b> : String<p class="sub-desc">A unique, generated ID which is applied to the
+     * View Element which contains the group.</p></li>
+     * <li><b>startRow</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>rs</b> : Array<p class="sub-desc">Contains a single element: The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>cls</b> : String<p class="sub-desc">The generated class name string to apply to the group header Element.</p></li>
+     * <li><b>style</b> : String<p class="sub-desc">The inline style rules to apply to the group header Element.</p></li>
+     * </ul></div></p>
+     * See {@link Ext.XTemplate} for information on how to format data using a template. Possible usage:<pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    view: new Ext.grid.GroupingView({
+        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+});
+     * </code></pre>
+     */
+    groupTextTpl : '{text}',
+    /**
+     * @cfg {Function} groupRenderer This property must be configured in the {@link Ext.grid.Column} for
+     * each column.
+     */
+
+    // private
+    gidSeed : 1000,
+
+    // private
+    initTemplates : function(){
+        Ext.grid.GroupingView.superclass.initTemplates.call(this);
+        this.state = {};
+
+        var sm = this.grid.getSelectionModel();
+        sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect',
+                this.onBeforeRowSelect, this);
+
+        if(!this.startGroup){
+            this.startGroup = new Ext.XTemplate(
+                '<div id="{groupId}" class="x-grid-group {cls}">',
+                    '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">', this.groupTextTpl ,'</div></div>',
+                    '<div id="{groupId}-bd" class="x-grid-group-body">'
+            );
+        }
+        this.startGroup.compile();
+        this.endGroup = '</div></div>';
+    },
+
+    // private
+    findGroup : function(el){
+        return Ext.fly(el).up('.x-grid-group', this.mainBody.dom);
+    },
+
+    // private
+    getGroups : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // private
+    onAdd : function(){
+        if(this.enableGrouping && !this.ignoreAdd){
+            var ss = this.getScrollState();
+            this.refresh();
+            this.restoreScroll(ss);
+        }else if(!this.enableGrouping){
+            Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments);
+        }
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments);
+        var g = document.getElementById(record._groupId);
+        if(g && g.childNodes[1].childNodes.length < 1){
+            Ext.removeNode(g);
+        }
+        this.applyEmptyText();
+    },
+
+    // private
+    refreshRow : function(record){
+        if(this.ds.getCount()==1){
+            this.refresh();
+        }else{
+            this.isUpdating = true;
+            Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
+            this.isUpdating = false;
+        }
+    },
+
+    // private
+    beforeMenuShow : function(){
+        var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false;
+        if((item = items.get('groupBy'))){
+            item.setDisabled(disabled);
+        }
+        if((item = items.get('showGroups'))){
+            item.setDisabled(disabled);
+		    item.setChecked(!!this.getGroupField(), true);
+        }
+    },
+
+    // private
+    renderUI : function(){
+        Ext.grid.GroupingView.superclass.renderUI.call(this);
+        this.mainBody.on('mousedown', this.interceptMouse, this);
+
+        if(this.enableGroupingMenu && this.hmenu){
+            this.hmenu.add('-',{
+                itemId:'groupBy',
+                text: this.groupByText,
+                handler: this.onGroupByClick,
+                scope: this,
+                iconCls:'x-group-by-icon'
+            });
+            if(this.enableNoGroups){
+                this.hmenu.add({
+                    itemId:'showGroups',
+                    text: this.showGroupsText,
+                    checked: true,
+                    checkHandler: this.onShowGroupsClick,
+                    scope: this
+                });
+            }
+            this.hmenu.on('beforeshow', this.beforeMenuShow, this);
+        }
+    },
+
+    // private
+    onGroupByClick : function(){
+        this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));
+        this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups
+    },
+
+    // private
+    onShowGroupsClick : function(mi, checked){
+        if(checked){
+            this.onGroupByClick();
+        }else{
+            this.grid.store.clearGrouping();
+        }
+    },
+
+    /**
+     * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed.
+     * @param {String} groupId The groupId assigned to the group (see getGroupId)
+     * @param {Boolean} expanded (optional)
+     */
+    toggleGroup : function(group, expanded){
+        this.grid.stopEditing(true);
+        group = Ext.getDom(group);
+        var gel = Ext.fly(group);
+        expanded = expanded !== undefined ?
+                expanded : gel.hasClass('x-grid-group-collapsed');
+
+        this.state[gel.dom.id] = expanded;
+        gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed');
+    },
+
+    /**
+     * Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed.
+     * @param {Boolean} expanded (optional)
+     */
+    toggleAllGroups : function(expanded){
+        var groups = this.getGroups();
+        for(var i = 0, len = groups.length; i < len; i++){
+            this.toggleGroup(groups[i], expanded);
+        }
+    },
+
+    /**
+     * Expands all grouped rows.
+     */
+    expandAllGroups : function(){
+        this.toggleAllGroups(true);
+    },
+
+    /**
+     * Collapses all grouped rows.
+     */
+    collapseAllGroups : function(){
+        this.toggleAllGroups(false);
+    },
+
+    // private
+    interceptMouse : function(e){
+        var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
+        if(hd){
+            e.stopEvent();
+            this.toggleGroup(hd.parentNode);
+        }
+    },
+
+    // private
+    getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){
+        var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v);
+        if(g === ''){
+            g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText;
+        }
+        return g;
+    },
+
+    // private
+    getGroupField : function(){
+        return this.grid.store.getGroupState();
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.grid.GroupingView.superclass.afterRender.call(this);
+        if(this.grid.deferRowRender){
+            this.updateGroupWidths();
+        }
+    },
+
+    // private
+    renderRows : function(){
+        var groupField = this.getGroupField();
+        var eg = !!groupField;
+        // if they turned off grouping and the last grouped field is hidden
+        if(this.hideGroupedColumn) {
+            var colIndex = this.cm.findColumnIndex(groupField);
+            if(!eg && this.lastGroupField !== undefined) {
+                this.mainBody.update('');
+                this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false);
+                delete this.lastGroupField;
+            }else if (eg && this.lastGroupField === undefined) {
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) {
+                this.mainBody.update('');
+                var oldIndex = this.cm.findColumnIndex(this.lastGroupField);
+                this.cm.setHidden(oldIndex, false);
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }
+        }
+        return Ext.grid.GroupingView.superclass.renderRows.apply(
+                    this, arguments);
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        if(rs.length < 1){
+            return '';
+        }
+        var groupField = this.getGroupField(),
+            colIndex = this.cm.findColumnIndex(groupField),
+            g;
+
+        this.enableGrouping = !!groupField;
+
+        if(!this.enableGrouping || this.isUpdating){
+            return Ext.grid.GroupingView.superclass.doRender.apply(
+                    this, arguments);
+        }
+        var gstyle = 'width:'+this.getTotalWidth()+';';
+
+        var gidPrefix = this.grid.getGridEl().id;
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var prefix = this.showGroupName ?
+                     (cfg.groupName || cfg.header)+': ' : '';
+
+        var groups = [], curGroup, i, len, gid;
+        for(i = 0, len = rs.length; i < len; i++){
+            var rowIndex = startRow + i,
+                r = rs[i],
+                gvalue = r.data[groupField];
+                
+                g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds);
+            if(!curGroup || curGroup.group != g){
+                gid = gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(g);
+               	// if state is defined use it, however state is in terms of expanded
+				// so negate it, otherwise use the default.
+				var isCollapsed  = typeof this.state[gid] !== 'undefined' ? !this.state[gid] : this.startCollapsed;
+				var gcls = isCollapsed ? 'x-grid-group-collapsed' : '';	
+                curGroup = {
+                    group: g,
+                    gvalue: gvalue,
+                    text: prefix + g,
+                    groupId: gid,
+                    startRow: rowIndex,
+                    rs: [r],
+                    cls: gcls,
+                    style: gstyle
+                };
+                groups.push(curGroup);
+            }else{
+                curGroup.rs.push(r);
+            }
+            r._groupId = gid;
+        }
+
+        var buf = [];
+        for(i = 0, len = groups.length; i < len; i++){
+            g = groups[i];
+            this.doGroupStart(buf, g, cs, ds, colCount);
+            buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call(
+                    this, cs, g.rs, ds, g.startRow, colCount, stripe);
+
+            this.doGroupEnd(buf, g, cs, ds, colCount);
+        }
+        return buf.join('');
+    },
+
+    /**
+     * Dynamically tries to determine the groupId of a specific value
+     * @param {String} value
+     * @return {String} The group id
+     */
+    getGroupId : function(value){
+        var gidPrefix = this.grid.getGridEl().id;
+        var groupField = this.getGroupField();
+        var colIndex = this.cm.findColumnIndex(groupField);
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds);
+        return gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(value);
+    },
+
+    // private
+    doGroupStart : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.startGroup.apply(g);
+    },
+
+    // private
+    doGroupEnd : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.endGroup;
+    },
+
+    // private
+    getRows : function(){
+        if(!this.enableGrouping){
+            return Ext.grid.GroupingView.superclass.getRows.call(this);
+        }
+        var r = [];
+        var g, gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            g = gs[i].childNodes[1].childNodes;
+            for(var j = 0, jlen = g.length; j < jlen; j++){
+                r[r.length] = g[j];
+            }
+        }
+        return r;
+    },
+
+    // private
+    updateGroupWidths : function(){
+        if(!this.enableGrouping || !this.hasRows()){
+            return;
+        }
+        var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px';
+        var gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            gs[i].firstChild.style.width = tw;
+        }
+    },
+
+    // private
+    onColumnWidthUpdated : function(col, w, tw){
+        Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onAllColumnWidthsUpdated : function(ws, tw){
+        Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onLayout : function(){
+        this.updateGroupWidths();
+    },
+
+    // private
+    onBeforeRowSelect : function(sm, rowIndex){
+        if(!this.enableGrouping){
+            return;
+        }
+        var row = this.getRow(rowIndex);
+        if(row && !row.offsetParent){
+            var g = this.findGroup(row);
+            this.toggleGroup(g, true);
+        }
+    }
+});
+// private
+Ext.grid.GroupingView.GROUP_ID = 1000;
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-grouping.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",gidSeed:1000,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('<div id="{groupId}" class="x-grid-group {cls}">','<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">',this.groupTextTpl,"</div></div>",'<div id="{groupId}-bd" class="x-grid-group-body">')}this.startGroup.compile();this.endGroup="</div></div>"},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var a=this.getScrollState();this.refresh();this.restoreScroll(a)}else{if(!this.enableGrouping){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(!!this.getGroupField(),true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.beforeMenuShow()},onShowGroupsClick:function(a,b){if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping()}},toggleGroup:function(c,b){this.grid.stopEditing(true);c=Ext.getDom(c);var a=Ext.fly(c);b=b!==undefined?b:a.hasClass("x-grid-group-collapsed");this.state[a.dom.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){this.toggleGroup(b[d],c)}},expandAllGroups:function(){this.toggleAllGroups(true)},collapseAllGroups:function(){this.toggleAllGroups(false)},interceptMouse:function(b){var a=b.getTarget(".x-grid-group-hd",this.mainBody);if(a){b.stopEvent();this.toggleGroup(a.parentNode)}},getGroup:function(a,d,f,h,b,e){var c=f?f(a,{},d,h,b,e):String(a);if(c===""){c=this.cm.config[b].emptyGroupText||this.emptyGroupText}return c},getGroupField:function(){return this.grid.store.getGroupState()},afterRender:function(){Ext.grid.GroupingView.superclass.afterRender.call(this);if(this.grid.deferRowRender){this.updateGroupWidths()}},renderRows:function(){var a=this.getGroupField();var d=!!a;if(this.hideGroupedColumn){var b=this.cm.findColumnIndex(a);if(!d&&this.lastGroupField!==undefined){this.mainBody.update("");this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField),false);delete this.lastGroupField}else{if(d&&this.lastGroupField===undefined){this.lastGroupField=a;this.cm.setHidden(b,true)}else{if(d&&this.lastGroupField!==undefined&&a!==this.lastGroupField){this.mainBody.update("");var c=this.cm.findColumnIndex(this.lastGroupField);this.cm.setHidden(c,false);this.lastGroupField=a;this.cm.setHidden(b,true)}}}}return Ext.grid.GroupingView.superclass.renderRows.apply(this,arguments)},doRender:function(d,h,s,a,q,u){if(h.length<1){return""}var B=this.getGroupField(),p=this.cm.findColumnIndex(B),y;this.enableGrouping=!!B;if(!this.enableGrouping||this.isUpdating){return Ext.grid.GroupingView.superclass.doRender.apply(this,arguments)}var j="width:"+this.getTotalWidth()+";";var t=this.grid.getGridEl().id;var f=this.cm.config[p];var b=f.groupRenderer||f.renderer;var v=this.showGroupName?(f.groupName||f.header)+": ":"";var A=[],m,w,x,o;for(w=0,x=h.length;w<x;w++){var l=a+w,n=h[w],e=n.data[B];y=this.getGroup(e,n,b,l,p,s);if(!m||m.group!=y){o=t+"-gp-"+B+"-"+Ext.util.Format.htmlEncode(y);var c=typeof this.state[o]!=="undefined"?!this.state[o]:this.startCollapsed;var k=c?"x-grid-group-collapsed":"";m={group:y,gvalue:e,text:v+y,groupId:o,startRow:l,rs:[n],cls:k,style:j};A.push(m)}else{m.rs.push(n)}n._groupId=o}var z=[];for(w=0,x=A.length;w<x;w++){y=A[w];this.doGroupStart(z,y,d,s,q);z[z.length]=Ext.grid.GroupingView.superclass.doRender.call(this,d,y.rs,s,y.startRow,q,u);this.doGroupEnd(z,y,d,s,q)}return z.join("")},getGroupId:function(f){var d=this.grid.getGridEl().id;var c=this.getGroupField();var e=this.cm.findColumnIndex(c);var b=this.cm.config[e];var g=b.groupRenderer||b.renderer;var a=this.getGroup(f,{data:{}},g,0,e,this.ds);return d+"-gp-"+c+"-"+Ext.util.Format.htmlEncode(f)},doGroupStart:function(a,d,b,e,c){a[a.length]=this.startGroup.apply(d)},doGroupEnd:function(a,d,b,e,c){a[a.length]=this.endGroup},getRows:function(){if(!this.enableGrouping){return Ext.grid.GroupingView.superclass.getRows.call(this)}var h=[];var f,c=this.getGroups();for(var e=0,a=c.length;e<a;e++){f=c[e].childNodes[1].childNodes;for(var d=0,b=f.length;d<b;d++){h[h.length]=f[d]}}return h},updateGroupWidths:function(){if(!this.enableGrouping||!this.hasRows()){return}var c=Math.max(this.cm.getTotalWidth(),this.el.dom.offsetWidth-this.scrollOffset)+"px";var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){b[d].firstChild.style.width=c}},onColumnWidthUpdated:function(c,a,b){Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this,c,a,b);this.updateGroupWidths()},onAllColumnWidthsUpdated:function(a,b){Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this,a,b);this.updateGroupWidths()},onColumnHiddenUpdated:function(b,c,a){Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this,b,c,a);this.updateGroupWidths()},onLayout:function(){this.updateGroupWidths()},onBeforeRowSelect:function(d,c){if(!this.enableGrouping){return}var b=this.getRow(c);if(b&&!b.offsetParent){var a=this.findGroup(b);this.toggleGroup(a,true)}}});Ext.grid.GroupingView.GROUP_ID=1000;
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property-debug.js	(revision 625)
@@ -0,0 +1,370 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.PropertyRecord
+ * A specific {@link Ext.data.Record} type that represents a name/value pair and is made to work with the
+ * {@link Ext.grid.PropertyGrid}.  Typically, PropertyRecords do not need to be created directly as they can be
+ * created implicitly by simply using the appropriate data configs either via the {@link Ext.grid.PropertyGrid#source}
+ * config property or by calling {@link Ext.grid.PropertyGrid#setSource}.  However, if the need arises, these records
+ * can also be created explicitly as shwon below.  Example usage:
+ * <pre><code>
+var rec = new Ext.grid.PropertyRecord({
+    name: 'Birthday',
+    value: new Date(Date.parse('05/26/1972'))
+});
+// Add record to an already populated grid
+grid.store.addSorted(rec);
+</code></pre>
+ * @constructor
+ * @param {Object} config A data object in the format: {name: [name], value: [value]}.  The specified value's type
+ * will be read automatically by the grid to determine the type of editor to use when displaying it.
+ */
+Ext.grid.PropertyRecord = Ext.data.Record.create([
+    {name:'name',type:'string'}, 'value'
+]);
+
+/**
+ * @class Ext.grid.PropertyStore
+ * @extends Ext.util.Observable
+ * A custom wrapper for the {@link Ext.grid.PropertyGrid}'s {@link Ext.data.Store}. This class handles the mapping
+ * between the custom data source objects supported by the grid and the {@link Ext.grid.PropertyRecord} format
+ * required for compatibility with the underlying store. Generally this class should not need to be used directly --
+ * the grid's data should be accessed from the underlying store via the {@link #store} property.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyStore = function(grid, source){
+    this.grid = grid;
+    this.store = new Ext.data.Store({
+        recordType : Ext.grid.PropertyRecord
+    });
+    this.store.on('update', this.onUpdate,  this);
+    if(source){
+        this.setSource(source);
+    }
+    Ext.grid.PropertyStore.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, {
+    // protected - should only be called by the grid.  Use grid.setSource instead.
+    setSource : function(o){
+        this.source = o;
+        this.store.removeAll();
+        var data = [];
+        for(var k in o){
+            if(this.isEditableValue(o[k])){
+                data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k));
+            }
+        }
+        this.store.loadRecords({records: data}, {}, true);
+    },
+
+    // private
+    onUpdate : function(ds, record, type){
+        if(type == Ext.data.Record.EDIT){
+            var v = record.data.value;
+            var oldValue = record.modified.value;
+            if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){
+                this.source[record.id] = v;
+                record.commit();
+                this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue);
+            }else{
+                record.reject();
+            }
+        }
+    },
+
+    // private
+    getProperty : function(row){
+       return this.store.getAt(row);
+    },
+
+    // private
+    isEditableValue: function(val){
+        if(Ext.isDate(val)){
+            return true;
+        }
+        return !(Ext.isObject(val) || Ext.isFunction(val));
+    },
+
+    // private
+    setValue : function(prop, value){
+        this.source[prop] = value;
+        this.store.getById(prop).set('value', value);
+    },
+
+    // protected - should only be called by the grid.  Use grid.getSource instead.
+    getSource : function(){
+        return this.source;
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyColumnModel
+ * @extends Ext.grid.ColumnModel
+ * A custom column model for the {@link Ext.grid.PropertyGrid}.  Generally it should not need to be used directly.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyColumnModel = function(grid, store){
+    var g = Ext.grid,
+        f = Ext.form;
+        
+    this.grid = grid;
+    g.PropertyColumnModel.superclass.constructor.call(this, [
+        {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true},
+        {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true}
+    ]);
+    this.store = store;
+
+    var bfield = new f.Field({
+        autoCreate: {tag: 'select', children: [
+            {tag: 'option', value: 'true', html: 'true'},
+            {tag: 'option', value: 'false', html: 'false'}
+        ]},
+        getValue : function(){
+            return this.el.value == 'true';
+        }
+    });
+    this.editors = {
+        'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})),
+        'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})),
+        'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})),
+        'boolean' : new g.GridEditor(bfield)
+    };
+    this.renderCellDelegate = this.renderCell.createDelegate(this);
+    this.renderPropDelegate = this.renderProp.createDelegate(this);
+};
+
+Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, {
+    // private - strings used for locale support
+    nameText : 'Name',
+    valueText : 'Value',
+    dateFormat : 'm/j/Y',
+
+    // private
+    renderDate : function(dateVal){
+        return dateVal.dateFormat(this.dateFormat);
+    },
+
+    // private
+    renderBool : function(bVal){
+        return bVal ? 'true' : 'false';
+    },
+
+    // private
+    isCellEditable : function(colIndex, rowIndex){
+        return colIndex == 1;
+    },
+
+    // private
+    getRenderer : function(col){
+        return col == 1 ?
+            this.renderCellDelegate : this.renderPropDelegate;
+    },
+
+    // private
+    renderProp : function(v){
+        return this.getPropertyName(v);
+    },
+
+    // private
+    renderCell : function(val){
+        var rv = val;
+        if(Ext.isDate(val)){
+            rv = this.renderDate(val);
+        }else if(typeof val == 'boolean'){
+            rv = this.renderBool(val);
+        }
+        return Ext.util.Format.htmlEncode(rv);
+    },
+
+    // private
+    getPropertyName : function(name){
+        var pn = this.grid.propertyNames;
+        return pn && pn[name] ? pn[name] : name;
+    },
+
+    // private
+    getCellEditor : function(colIndex, rowIndex){
+        var p = this.store.getProperty(rowIndex),
+            n = p.data.name, 
+            val = p.data.value;
+        if(this.grid.customEditors[n]){
+            return this.grid.customEditors[n];
+        }
+        if(Ext.isDate(val)){
+            return this.editors.date;
+        }else if(typeof val == 'number'){
+            return this.editors.number;
+        }else if(typeof val == 'boolean'){
+            return this.editors['boolean'];
+        }else{
+            return this.editors.string;
+        }
+    },
+
+    // inherit docs
+    destroy : function(){
+        Ext.grid.PropertyColumnModel.superclass.destroy.call(this);
+        for(var ed in this.editors){
+            Ext.destroy(ed);
+        }
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyGrid
+ * @extends Ext.grid.EditorGridPanel
+ * A specialized grid implementation intended to mimic the traditional property grid as typically seen in
+ * development IDEs.  Each row in the grid represents a property of some object, and the data is stored
+ * as a set of name/value pairs in {@link Ext.grid.PropertyRecord}s.  Example usage:
+ * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    title: 'Properties Grid',
+    autoHeight: true,
+    width: 300,
+    renderTo: 'grid-ct',
+    source: {
+        "(name)": "My Object",
+        "Created": new Date(Date.parse('10/15/2006')),
+        "Available": false,
+        "Version": .01,
+        "Description": "A test object"
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {Object} config The grid config object
+ */
+Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
+    /**
+    * @cfg {Object} propertyNames An object containing property name/display name pairs.
+    * If specified, the display name will be shown in the name column instead of the property name.
+    */
+    /**
+    * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details).
+    */
+    /**
+    * @cfg {Object} customEditors An object containing name/value pairs of custom editor type definitions that allow
+    * the grid to support additional types of editable fields.  By default, the grid supports strongly-typed editing
+    * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and
+    * associated with a custom input control by specifying a custom editor.  The name of the editor
+    * type should correspond with the name of the property that will use the editor.  Example usage:
+    * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    ...
+    customEditors: {
+        'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))
+    },
+    source: {
+        'Start Time': '10:00 AM'
+    }
+});
+</code></pre>
+    */
+
+    // private config overrides
+    enableColumnMove:false,
+    stripeRows:false,
+    trackMouseOver: false,
+    clicksToEdit:1,
+    enableHdMenu : false,
+    viewConfig : {
+        forceFit:true
+    },
+
+    // private
+    initComponent : function(){
+        this.customEditors = this.customEditors || {};
+        this.lastEditRow = null;
+        var store = new Ext.grid.PropertyStore(this);
+        this.propStore = store;
+        var cm = new Ext.grid.PropertyColumnModel(this, store);
+        store.store.sort('name', 'ASC');
+        this.addEvents(
+            /**
+             * @event beforepropertychange
+             * Fires before a property value changes.  Handlers can return false to cancel the property change
+             * (this will internally call {@link Ext.data.Record#reject} on the property's record).
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'beforepropertychange',
+            /**
+             * @event propertychange
+             * Fires after a property value has changed.
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'propertychange'
+        );
+        this.cm = cm;
+        this.ds = store.store;
+        Ext.grid.PropertyGrid.superclass.initComponent.call(this);
+
+		this.mon(this.selModel, 'beforecellselect', function(sm, rowIndex, colIndex){
+            if(colIndex === 0){
+                this.startEditing.defer(200, this, [rowIndex, 1]);
+                return false;
+            }
+        }, this);
+    },
+
+    // private
+    onRender : function(){
+        Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments);
+
+        this.getGridEl().addClass('x-props-grid');
+    },
+
+    // private
+    afterRender: function(){
+        Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments);
+        if(this.source){
+            this.setSource(this.source);
+        }
+    },
+
+    /**
+     * Sets the source data object containing the property data.  The data object can contain one or more name/value
+     * pairs representing all of the properties of an object to display in the grid, and this data will automatically
+     * be loaded into the grid's {@link #store}.  The values should be supplied in the proper data type if needed,
+     * otherwise string type will be assumed.  If the grid already contains data, this method will replace any
+     * existing data.  See also the {@link #source} config value.  Example usage:
+     * <pre><code>
+grid.setSource({
+    "(name)": "My Object",
+    "Created": new Date(Date.parse('10/15/2006')),  // date type
+    "Available": false,  // boolean type
+    "Version": .01,      // decimal type
+    "Description": "A test object"
+});
+</code></pre>
+     * @param {Object} source The data object
+     */
+    setSource : function(source){
+        this.propStore.setSource(source);
+    },
+
+    /**
+     * Gets the source data object containing the property data.  See {@link #setSource} for details regarding the
+     * format of the data object.
+     * @return {Object} The data object
+     */
+    getSource : function(){
+        return this.propStore.getSource();
+    }
+});
+Ext.reg("propertygrid", Ext.grid.PropertyGrid);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-grid-property.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)};Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){if(Ext.isDate(a)){return true}return !(Ext.isObject(a)||Ext.isFunction(a))},setValue:function(b,a){this.source[b]=a;this.store.getById(b).set("value",a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]},getValue:function(){return this.el.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a)};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)};Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return a?"true":"false"},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(a){var b=a;if(Ext.isDate(a)){b=this.renderDate(a)}else{if(typeof a=="boolean"){b=this.renderBool(a)}}return Ext.util.Format.htmlEncode(b)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);for(var a in this.editors){Ext.destroy(a)}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history-debug.js	(revision 625)
@@ -0,0 +1,203 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.History
+ * @extends Ext.util.Observable
+ * History management component that allows you to register arbitrary tokens that signify application
+ * history state on navigation actions.  You can then handle the history {@link #change} event in order
+ * to reset your application UI to the appropriate state when the user navigates forward or backward through
+ * the browser history stack.
+ * @singleton
+ */
+Ext.History = (function () {
+    var iframe, hiddenField;
+    var ready = false;
+    var currentToken;
+
+    function getHash() {
+        var href = top.location.href, i = href.indexOf("#");
+        return i >= 0 ? href.substr(i + 1) : null;
+    }
+
+    function doSave() {
+        hiddenField.value = currentToken;
+    }
+
+    function handleStateChange(token) {
+        currentToken = token;
+        Ext.History.fireEvent('change', token);
+    }
+
+    function updateIFrame (token) {
+        var html = ['<html><body><div id="state">',token,'</div></body></html>'].join('');
+        try {
+            var doc = iframe.contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    function checkIFrame() {
+        if (!iframe.contentWindow || !iframe.contentWindow.document) {
+            setTimeout(checkIFrame, 10);
+            return;
+        }
+
+        var doc = iframe.contentWindow.document;
+        var elem = doc.getElementById("state");
+        var token = elem ? elem.innerText : null;
+
+        var hash = getHash();
+
+        setInterval(function () {
+
+            doc = iframe.contentWindow.document;
+            elem = doc.getElementById("state");
+
+            var newtoken = elem ? elem.innerText : null;
+
+            var newHash = getHash();
+
+            if (newtoken !== token) {
+                token = newtoken;
+                handleStateChange(token);
+                top.location.hash = token;
+                hash = token;
+                doSave();
+            } else if (newHash !== hash) {
+                hash = newHash;
+                updateIFrame(newHash);
+            }
+
+        }, 50);
+
+        ready = true;
+
+        Ext.History.fireEvent('ready', Ext.History);
+    }
+
+    function startUp() {
+        currentToken = hiddenField.value ? hiddenField.value : getHash();
+
+        if (Ext.isIE) {
+            checkIFrame();
+        } else {
+            var hash = getHash();
+            setInterval(function () {
+                var newHash = getHash();
+                if (newHash !== hash) {
+                    hash = newHash;
+                    handleStateChange(hash);
+                    doSave();
+                }
+            }, 50);
+            ready = true;
+            Ext.History.fireEvent('ready', Ext.History);
+        }
+    }
+
+    return {
+        /**
+         * The id of the hidden field required for storing the current history token.
+         * @type String
+         * @property
+         */
+        fieldId: 'x-history-field',
+        /**
+         * The id of the iframe required by IE to manage the history stack.
+         * @type String
+         * @property
+         */
+        iframeId: 'x-history-frame',
+        
+        events:{},
+
+        /**
+         * Initialize the global History instance.
+         * @param {Boolean} onReady (optional) A callback function that will be called once the history
+         * component is fully initialized.
+         * @param {Object} scope (optional) The callback scope
+         */
+        init: function (onReady, scope) {
+            if(ready) {
+                Ext.callback(onReady, scope, [this]);
+                return;
+            }
+            if(!Ext.isReady){
+                Ext.onReady(function(){
+                    Ext.History.init(onReady, scope);
+                });
+                return;
+            }
+            hiddenField = Ext.getDom(Ext.History.fieldId);
+            if (Ext.isIE) {
+                iframe = Ext.getDom(Ext.History.iframeId);
+            }
+            this.addEvents('ready', 'change');
+            if(onReady){
+                this.on('ready', onReady, scope, {single:true});
+            }
+            startUp();
+        },
+
+        /**
+         * Add a new token to the history stack. This can be any arbitrary value, although it would
+         * commonly be the concatenation of a component id and another id marking the specifc history
+         * state of that component.  Example usage:
+         * <pre><code>
+// Handle tab changes on a TabPanel
+tabPanel.on('tabchange', function(tabPanel, tab){
+    Ext.History.add(tabPanel.id + ':' + tab.id);
+});
+</code></pre>
+         * @param {String} token The value that defines a particular application-specific history state
+         * @param {Boolean} preventDuplicates When true, if the passed token matches the current token
+         * it will not save a new history step. Set to false if the same state can be saved more than once
+         * at the same history stack location (defaults to true).
+         */
+        add: function (token, preventDup) {
+            if(preventDup !== false){
+                if(this.getToken() == token){
+                    return true;
+                }
+            }
+            if (Ext.isIE) {
+                return updateIFrame(token);
+            } else {
+                top.location.hash = token;
+                return true;
+            }
+        },
+
+        /**
+         * Programmatically steps back one step in browser history (equivalent to the user pressing the Back button).
+         */
+        back: function(){
+            history.go(-1);
+        },
+
+        /**
+         * Programmatically steps forward one step in browser history (equivalent to the user pressing the Forward button).
+         */
+        forward: function(){
+            history.go(1);
+        },
+
+        /**
+         * Retrieves the currently-active history token.
+         * @return {String} The token
+         */
+        getToken: function() {
+            return ready ? currentToken : getHash();
+        }
+    };
+})();
+Ext.apply(Ext.History, new Ext.util.Observable());
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-history.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.History=(function(){var e,c;var j=false;var d;function f(){var k=top.location.href,l=k.indexOf("#");return l>=0?k.substr(l+1):null}function a(){c.value=d}function g(k){d=k;Ext.History.fireEvent("change",k)}function h(l){var k=['<html><body><div id="state">',l,"</div></body></html>"].join("");try{var n=e.contentWindow.document;n.open();n.write(k);n.close();return true}catch(m){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var n=e.contentWindow.document;var l=n.getElementById("state");var k=l?l.innerText:null;var m=f();setInterval(function(){n=e.contentWindow.document;l=n.getElementById("state");var p=l?l.innerText:null;var o=f();if(p!==k){k=p;g(k);top.location.hash=k;m=k;a()}else{if(o!==m){m=o;h(o)}}},50);j=true;Ext.History.fireEvent("ready",Ext.History)}function i(){d=c.value?c.value:f();if(Ext.isIE){b()}else{var k=f();setInterval(function(){var l=f();if(l!==k){k=l;g(k);a()}},50);j=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(l,k){if(j){Ext.callback(l,k,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(l,k)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(l){this.on("ready",l,k,{single:true})}i()},add:function(k,l){if(l!==false){if(this.getToken()==k){return true}}if(Ext.isIE){return h(k)}else{top.location.hash=k;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return j?d:f()}}})();Ext.apply(Ext.History,new Ext.util.Observable());
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu-debug.js	(revision 625)
@@ -0,0 +1,1628 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.MenuLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.</p>
+ */
+ Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize: true,
+
+    setContainer : function(ct){
+        this.monitorResize = !ct.floating;
+        Ext.layout.MenuLayout.superclass.setContainer.call(this, ct);
+    },
+
+    renderItem : function(c, position, target){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate(
+                '<li id="{itemId}" class="{itemCls}">',
+                    '<tpl if="needsIcon">',
+                        '<img src="{icon}" class="{iconCls}"/>',
+                    '</tpl>',
+                '</li>'
+            );
+        }
+
+        if(c && !c.rendered){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            var a = this.getItemArgs(c);
+
+//          The Component's positionEl is the <li> it is rendered into
+            c.render(c.positionEl = position ?
+                this.itemTpl.insertBefore(position, a, true) :
+                this.itemTpl.append(target, a, true));
+
+//          Link the containing <li> to the item.
+            c.positionEl.menuItemId = c.itemId || c.id;
+
+//          If rendering a regular Component, and it needs an icon,
+//          move the Component rightwards.
+            if (!a.isMenuItem && a.needsIcon) {
+                c.positionEl.addClass('x-menu-list-item-indent');
+            }
+        }else if(c && !this.isValidParent(c, target)){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getActionEl().dom, position || null);
+        }
+    },
+
+    getItemArgs: function(c) {
+        var isMenuItem = c instanceof Ext.menu.Item;
+        return {
+            isMenuItem: isMenuItem,
+            needsIcon: !isMenuItem && (c.icon || c.iconCls),
+            icon: c.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: 'x-menu-item-icon ' + (c.iconCls || ''),
+            itemId: 'x-menu-el-' + c.id,
+            itemCls: 'x-menu-list-item ' + (this.extraCls || '')
+        };
+    },
+
+//  Valid if the Component is in a <li> which is part of our target <ul>
+    isValidParent: function(c, target) {
+        return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target);
+    },
+
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+        this.doAutoSize();
+    },
+
+    doAutoSize : function(){
+        var ct = this.container, w = ct.width;
+        if(ct.floating){
+            if(w){
+                ct.setWidth(w);
+            }else if(Ext.isIE){
+                ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8) ? 'auto' : ct.minWidth);
+                var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc
+                ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr'));
+            }
+        }
+    }
+});
+Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
+
+/**
+ * @class Ext.menu.Menu
+ * @extends Ext.Container
+ * <p>A menu object.  This is the container to which you may add menu items.  Menu can also serve as a base class
+ * when you want a specialized menu based off of another component (like {@link Ext.menu.DateMenu} for example).</p>
+ * <p>Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Component}s.</p>
+ * <p>To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items}
+ * specify <tt>iconCls: 'no-icon'</tt>.  This reserves a space for an icon, and indents the Component in line
+ * with the other menu items.  See {@link Ext.form.ComboBox}.{@link Ext.form.ComboBox#getListParent getListParent}
+ * for an example.</p>
+ * <p>By default, Menus are absolutely positioned, floating Components. By configuring a Menu with
+ * <b><tt>{@link #floating}:false</tt></b>, a Menu may be used as child of a Container.</p>
+ *
+ * @xtype menu
+ */
+Ext.menu.Menu = Ext.extend(Ext.Container, {
+    /**
+     * @cfg {Object} defaults
+     * A config object that will be applied to all items added to this container either via the {@link #items}
+     * config or via the {@link #add} method.  The defaults config can contain any number of
+     * name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the menu.
+     */
+    /**
+     * @cfg {Mixed} items
+     * An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items},
+     * or general {@link Ext.Component Component}s.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120)
+     */
+    minWidth : 120,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides")
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of
+     * this menu (defaults to "tl-tr?")
+     */
+    subMenuAlign : "tl-tr?",
+    /**
+     * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu
+     * relative to its element of origin (defaults to "tl-bl?")
+     */
+    defaultAlign : "tl-bl?",
+    /**
+     * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false)
+     */
+    allowOtherMenus : false,
+    /**
+     * @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays
+     * a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false).
+     */
+    ignoreParentClicks : false,
+    /**
+     * @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true).
+     */
+    enableScrolling: true,
+    /**
+     * @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null).
+     */
+    maxHeight: null,
+    /**
+     * @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24).
+     */
+    scrollIncrement: 24,
+    /**
+     * @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true).
+     */
+    showSeparator: true,
+    /**
+     * @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to
+     * change the default Menu popup position after aligning according to the {@link #defaultAlign}
+     * configuration. Defaults to <tt>[0, 0]</tt>.
+     */
+    defaultOffsets : [0, 0],
+
+
+    /**
+     * @cfg {Boolean} floating
+     * May be specified as false to create a Menu which may be used as a child item of another Container
+     * instead of a free-floating {@link Ext.Layer Layer}. (defaults to true).
+     */
+    floating: true,         // Render as a Layer by default
+
+    // private
+    hidden: true,
+    layout: 'menu',
+    hideMode: 'offsets',    // Important for laying out Components
+    scrollerHeight: 8,
+    autoLayout: true,       // Provided for backwards compat
+    defaultType: 'menuitem',
+
+    initComponent: function(){
+        if(Ext.isArray(this.initialConfig)){
+            Ext.apply(this, {items:this.initialConfig});
+        }
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this menu is clicked (or when the enter key is pressed while it is active)
+             * @param {Ext.menu.Menu} this
+            * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event mouseover
+             * Fires when the mouse is hovering over this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseout',
+            /**
+             * @event itemclick
+             * Fires when a menu item contained in this menu is clicked
+             * @param {Ext.menu.BaseItem} baseItem The BaseItem that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'itemclick'
+        );
+        Ext.menu.MenuMgr.register(this);
+        if(this.floating){
+            Ext.EventManager.onWindowResize(this.hide, this);
+        }else{
+            if(this.initialConfig.hidden !== false){
+                this.hidden = false;
+            }
+            this.internalDefaults = {hideOnClick: false};
+        }
+        Ext.menu.Menu.superclass.initComponent.call(this);
+        if(this.autoLayout){
+            this.on({
+                add: this.doLayout,
+                remove: this.doLayout,
+                scope: this
+            });
+        }
+    },
+
+    //private
+    getLayoutTarget : function() {
+        return this.ul;
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!ct){
+            ct = Ext.getBody();
+        }
+
+        var dh = {
+            id: this.getId(),
+            cls: 'x-menu ' + ((this.floating) ? 'x-menu-floating x-layer ' : '') + (this.cls || '') + (this.plain ? ' x-menu-plain' : '') + (this.showSeparator ? '' : ' x-menu-nosep'),
+            style: this.style,
+            cn: [
+                {tag: 'a', cls: 'x-menu-focus', href: '#', onclick: 'return false;', tabIndex: '-1'},
+                {tag: 'ul', cls: 'x-menu-list'}
+            ]
+        };
+        if(this.floating){
+            this.el = new Ext.Layer({
+                shadow: this.shadow,
+                dh: dh,
+                constrain: false,
+                parentEl: ct,
+                zindex:15000
+            });
+        }else{
+            this.el = ct.createChild(dh);
+        }
+        Ext.menu.Menu.superclass.onRender.call(this, ct, position);
+
+        if(!this.keyNav){
+            this.keyNav = new Ext.menu.MenuNav(this);
+        }
+        // generic focus element
+        this.focusEl = this.el.child('a.x-menu-focus');
+        this.ul = this.el.child('ul.x-menu-list');
+        this.mon(this.ul, {
+            scope: this,
+            click: this.onClick,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+        if(this.enableScrolling){
+            this.mon(this.el, {
+                scope: this,
+                delegate: '.x-menu-scroller',
+                click: this.onScroll,
+                mouseover: this.deactivateActive
+            });
+        }
+    },
+
+    // private
+    findTargetItem : function(e){
+        var t = e.getTarget(".x-menu-list-item", this.ul, true);
+        if(t && t.menuItemId){
+            return this.items.get(t.menuItemId);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.isFormField){
+                this.setActiveItem(t);
+            }else{
+                if(t.menu && this.ignoreParentClicks){
+                    t.expandMenu();
+                    e.preventDefault();
+                }else if(t.onClick){
+                    t.onClick(e);
+                    this.fireEvent("click", this, t, e);
+                }
+            }
+        }
+    },
+
+    // private
+    setActiveItem : function(item, autoExpand){
+        if(item != this.activeItem){
+            this.deactivateActive();
+            if((this.activeItem = item).isFormField){
+                item.focus();
+            }else{
+                item.activate(autoExpand);
+            }
+        }else if(autoExpand){
+            item.expandMenu();
+        }
+    },
+
+    deactivateActive: function(){
+        var a = this.activeItem;
+        if(a){
+            if(a.isFormField){
+                //Fields cannot deactivate, but Combos must collapse
+                if(a.collapse){
+                    a.collapse();
+                }
+            }else{
+                a.deactivate();
+            }
+            delete this.activeItem;
+        }
+    },
+
+    // private
+    tryActivate : function(start, step){
+        var items = this.items;
+        for(var i = start, len = items.length; i >= 0 && i < len; i+= step){
+            var item = items.get(i);
+            if(!item.disabled && (item.canActivate || item.isFormField)){
+                this.setActiveItem(item, false);
+                return item;
+            }
+        }
+        return false;
+    },
+
+    // private
+    onMouseOver : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.canActivate && !t.disabled){
+                this.setActiveItem(t, true);
+            }
+        }
+        this.over = true;
+        this.fireEvent("mouseover", this, e, t);
+    },
+
+    // private
+    onMouseOut : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t == this.activeItem && t.shouldDeactivate && t.shouldDeactivate(e)){
+                this.activeItem.deactivate();
+                delete this.activeItem;
+            }
+        }
+        this.over = false;
+        this.fireEvent("mouseout", this, e, t);
+    },
+
+    // private
+    onScroll: function(e, t){
+        if(e){
+            e.stopEvent();
+        }
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        ul.scrollTop += this.scrollIncrement * (top ? -1 : 1);
+        if(top ? ul.scrollTop <= 0 : ul.scrollTop + this.activeMax >= ul.scrollHeight){
+           this.onScrollerOut(null, t);
+        }
+    },
+
+    // private
+    onScrollerIn: function(e, t){
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){
+            Ext.fly(t).addClass(['x-menu-item-active', 'x-menu-scroller-active']);
+        }
+    },
+
+    // private
+    onScrollerOut: function(e, t){
+        Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']);
+    },
+
+    /**
+     * Displays this menu relative to another element
+     * @param {Mixed} element The element to align to
+     * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to
+     * the element (defaults to this.defaultAlign)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    show : function(el, pos, parentMenu){
+        if(this.floating){
+            this.parentMenu = parentMenu;
+            if(!this.el){
+                this.render();
+                this.doLayout(false, true);
+            }
+            if(this.fireEvent('beforeshow', this) !== false){
+                this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign, this.defaultOffsets), parentMenu, false);
+            }
+        }else{
+            Ext.menu.Menu.superclass.show.call(this);
+        }
+    },
+
+    /**
+     * Displays this menu at a specific xy position
+     * @param {Array} xyPosition Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    showAt : function(xy, parentMenu, /* private: */_e){
+        this.parentMenu = parentMenu;
+        if(!this.el){
+            this.render();
+        }
+        this.el.setXY(xy);
+        if(this.enableScrolling){
+            this.constrainScroll(xy[1]);
+        }
+        this.el.show();
+        Ext.menu.Menu.superclass.onShow.call(this);
+        if(Ext.isIE){
+            this.layout.doAutoSize();
+            if(!Ext.isIE8){
+                this.el.repaint();
+            }
+        }
+        this.hidden = false;
+        this.focus();
+        this.fireEvent("show", this);
+    },
+
+    constrainScroll: function(y){
+        var max, full = this.ul.setHeight('auto').getHeight();
+        if(this.floating){
+            max = this.maxHeight ? this.maxHeight : Ext.fly(this.el.dom.parentNode).getViewSize().height - y;
+        }else{
+            max = this.getHeight();
+        }
+        if(full > max && max > 0){
+            this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0);
+            this.ul.setHeight(this.activeMax);
+            this.createScrollers();
+            this.el.select('.x-menu-scroller').setDisplayed('');
+        }else{
+            this.ul.setHeight(full);
+            this.el.select('.x-menu-scroller').setDisplayed('none');
+        }
+        this.ul.dom.scrollTop = 0;
+    },
+
+    createScrollers: function(){
+        if(!this.scroller){
+            this.scroller = {
+                pos: 0,
+                top: this.el.insertFirst({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-top',
+                    html: '&#160;'
+                }),
+                bottom: this.el.createChild({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-bottom',
+                    html: '&#160;'
+                })
+            };
+            this.scroller.top.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.topRepeater = new Ext.util.ClickRepeater(this.scroller.top, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.top], false)
+                }
+            });
+            this.scroller.bottom.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.bottomRepeater = new Ext.util.ClickRepeater(this.scroller.bottom, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.bottom], false)
+                }
+            });
+        }
+    },
+
+    onLayout: function(){
+        if(this.isVisible()){
+            if(this.enableScrolling){
+                this.constrainScroll(this.el.getTop());
+            }
+            if(this.floating){
+                this.el.sync();
+            }
+        }
+    },
+
+    focus : function(){
+        if(!this.hidden){
+            this.doFocus.defer(50, this);
+        }
+    },
+
+    doFocus : function(){
+        if(!this.hidden){
+            this.focusEl.focus();
+        }
+    },
+
+    /**
+     * Hides this menu and optionally all parent menus
+     * @param {Boolean} deep (optional) True to hide all parent menus recursively, if any (defaults to false)
+     */
+    hide : function(deep){
+        this.deepHide = deep;
+        Ext.menu.Menu.superclass.hide.call(this);
+        delete this.deepHide;
+    },
+
+    // private
+    onHide: function(){
+        Ext.menu.Menu.superclass.onHide.call(this);
+        this.deactivateActive();
+        if(this.el && this.floating){
+            this.el.hide();
+        }
+        if(this.deepHide === true && this.parentMenu){
+            this.parentMenu.hide(true);
+        }
+    },
+
+    // private
+    lookupComponent: function(c){
+         if(Ext.isString(c)){
+            c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c);
+             this.applyDefaults(c);
+         }else{
+            if(Ext.isObject(c)){
+                c = this.getMenuItem(c);
+            }else if(c.tagName || c.el){ // element. Wrap it.
+                c = new Ext.BoxComponent({
+                    el: c
+                });
+            }
+         }
+         return c;
+    },
+
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.menu.Menu.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(d){
+                if(c.events){
+                    Ext.applyIf(c.initialConfig, d);
+                    Ext.apply(c, d);
+                }else{
+                    Ext.applyIf(c, d);
+                }
+            }
+        }
+        return c;
+    },
+
+    // private
+    getMenuItem: function(config){
+       if(!config.isXType){
+            if(!config.xtype && Ext.isBoolean(config.checked)){
+                return new Ext.menu.CheckItem(config)
+            }
+            return Ext.create(config, this.defaultType);
+        }
+        return config;
+    },
+
+    /**
+     * Adds a separator bar to the menu
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addSeparator : function(){
+        return this.add(new Ext.menu.Separator());
+    },
+
+    /**
+     * Adds an {@link Ext.Element} object to the menu
+     * @param {Mixed} el The element or DOM node to add, or its id
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addElement : function(el){
+        return this.add(new Ext.menu.BaseItem(el));
+    },
+
+    /**
+     * Adds an existing object based on {@link Ext.menu.BaseItem} to the menu
+     * @param {Ext.menu.Item} item The menu item to add
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addItem : function(item){
+        return this.add(item);
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.Item} based an the supplied config object and adds it to the menu
+     * @param {Object} config A MenuItem config object
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addMenuItem : function(config){
+        return this.add(this.getMenuItem(config));
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.TextItem} with the supplied text and adds it to the menu
+     * @param {String} text The text to display in the menu item
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addText : function(text){
+        return this.add(new Ext.menu.TextItem(text));
+    },
+
+    //private
+    onDestroy : function(){
+        Ext.menu.Menu.superclass.onDestroy.call(this);
+        Ext.menu.MenuMgr.unregister(this);
+        Ext.EventManager.removeResizeListener(this.hide, this);
+        if(this.keyNav) {
+            this.keyNav.disable();
+        }
+        var s = this.scroller;
+        if(s){
+            Ext.destroy(s.topRepeater, s.bottomRepeater, s.top, s.bottom);
+        }
+    }
+});
+
+Ext.reg('menu', Ext.menu.Menu);
+
+// MenuNav is a private utility class used internally by the Menu
+Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){
+    function up(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){
+            m.tryActivate(m.items.length-1, -1);
+        }
+    }
+    function down(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){
+            m.tryActivate(0, 1);
+        }
+    }
+    return {
+        constructor: function(menu){
+            Ext.menu.MenuNav.superclass.constructor.call(this, menu.el);
+            this.scope = this.menu = menu;
+        },
+
+        doRelay : function(e, h){
+            var k = e.getKey();
+//          Keystrokes within a form Field (e.g.: down in a Combo) do not navigate. Allow only TAB
+            if (this.menu.activeItem && this.menu.activeItem.isFormField && k != e.TAB) {
+                return false;
+            }
+            if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){
+                this.menu.tryActivate(0, 1);
+                return false;
+            }
+            return h.call(this.scope || this, e, this.menu);
+        },
+
+        tab: function(e, m) {
+            e.stopEvent();
+            if (e.shiftKey) {
+                up(e, m);
+            } else {
+                down(e, m);
+            }
+        },
+
+        up : up,
+
+        down : down,
+
+        right : function(e, m){
+            if(m.activeItem){
+                m.activeItem.expandMenu(true);
+            }
+        },
+
+        left : function(e, m){
+            m.hide();
+            if(m.parentMenu && m.parentMenu.activeItem){
+                m.parentMenu.activeItem.activate();
+            }
+        },
+
+        enter : function(e, m){
+            if(m.activeItem){
+                e.stopPropagation();
+                m.activeItem.onClick(e);
+                m.fireEvent("click", this, m.activeItem);
+                return true;
+            }
+        }
+    };
+}());/**
+ * @class Ext.menu.MenuMgr
+ * Provides a common registry of all menu items on a page so that they can be easily accessed by id.
+ * @singleton
+ */
+Ext.menu.MenuMgr = function(){
+   var menus, active, groups = {}, attached = false, lastShow = new Date();
+
+   // private - called when first menu is created
+   function init(){
+       menus = {};
+       active = new Ext.util.MixedCollection();
+       Ext.getDoc().addKeyListener(27, function(){
+           if(active.length > 0){
+               hideAll();
+           }
+       });
+   }
+
+   // private
+   function hideAll(){
+       if(active && active.length > 0){
+           var c = active.clone();
+           c.each(function(m){
+               m.hide();
+           });
+       }
+   }
+
+   // private
+   function onHide(m){
+       active.remove(m);
+       if(active.length < 1){
+           Ext.getDoc().un("mousedown", onMouseDown);
+           attached = false;
+       }
+   }
+
+   // private
+   function onShow(m){
+       var last = active.last();
+       lastShow = new Date();
+       active.add(m);
+       if(!attached){
+           Ext.getDoc().on("mousedown", onMouseDown);
+           attached = true;
+       }
+       if(m.parentMenu){
+          m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3);
+          m.parentMenu.activeChild = m;
+       }else if(last && last.isVisible()){
+          m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3);
+       }
+   }
+
+   // private
+   function onBeforeHide(m){
+       if(m.activeChild){
+           m.activeChild.hide();
+       }
+       if(m.autoHideTimer){
+           clearTimeout(m.autoHideTimer);
+           delete m.autoHideTimer;
+       }
+   }
+
+   // private
+   function onBeforeShow(m){
+       var pm = m.parentMenu;
+       if(!pm && !m.allowOtherMenus){
+           hideAll();
+       }else if(pm && pm.activeChild){
+           pm.activeChild.hide();
+       }
+   }
+
+   // private
+   function onMouseDown(e){
+       if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
+           hideAll();
+       }
+   }
+
+   // private
+   function onBeforeCheck(mi, state){
+       if(state){
+           var g = groups[mi.group];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != mi){
+                   g[i].setChecked(false);
+               }
+           }
+       }
+   }
+
+   return {
+
+       /**
+        * Hides all menus that are currently visible
+        */
+       hideAll : function(){
+            hideAll();  
+       },
+
+       // private
+       register : function(menu){
+           if(!menus){
+               init();
+           }
+           menus[menu.id] = menu;
+           menu.on("beforehide", onBeforeHide);
+           menu.on("hide", onHide);
+           menu.on("beforeshow", onBeforeShow);
+           menu.on("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menu);
+               menu.on("checkchange", onCheck);
+           }
+       },
+
+        /**
+         * Returns a {@link Ext.menu.Menu} object
+         * @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will
+         * be used to generate and return a new Menu instance.
+         * @return {Ext.menu.Menu} The specified menu, or null if none are found
+         */
+       get : function(menu){
+           if(typeof menu == "string"){ // menu id
+               if(!menus){  // not initialized, no menus to return
+                   return null;
+               }
+               return menus[menu];
+           }else if(menu.events){  // menu instance
+               return menu;
+           }else if(typeof menu.length == 'number'){ // array of menu items?
+               return new Ext.menu.Menu({items:menu});
+           }else{ // otherwise, must be a config
+               return Ext.create(menu, 'menu');
+           }
+       },
+
+       // private
+       unregister : function(menu){
+           delete menus[menu.id];
+           menu.un("beforehide", onBeforeHide);
+           menu.un("hide", onHide);
+           menu.un("beforeshow", onBeforeShow);
+           menu.un("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               groups[g].remove(menu);
+               menu.un("checkchange", onCheck);
+           }
+       },
+
+       // private
+       registerCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menuItem);
+               menuItem.on("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       // private
+       unregisterCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               groups[g].remove(menuItem);
+               menuItem.un("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       getCheckedItem : function(groupId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].checked){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       },
+
+       setCheckedItem : function(groupId, itemId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].id == itemId){
+                       g[i].setChecked(true);
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();
+/**
+ * @class Ext.menu.BaseItem
+ * @extends Ext.Component
+ * The base class for all items that render into menus.  BaseItem provides default rendering, activated state
+ * management and base configuration options shared by all menu components.
+ * @constructor
+ * Creates a new BaseItem
+ * @param {Object} config Configuration options
+ * @xtype menubaseitem
+ */
+Ext.menu.BaseItem = function(config){
+    Ext.menu.BaseItem.superclass.constructor.call(this, config);
+
+    this.addEvents(
+        /**
+         * @event click
+         * Fires when this item is clicked
+         * @param {Ext.menu.BaseItem} this
+         * @param {Ext.EventObject} e
+         */
+        'click',
+        /**
+         * @event activate
+         * Fires when this item is activated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'activate',
+        /**
+         * @event deactivate
+         * Fires when this item is deactivated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'deactivate'
+    );
+
+    if(this.handler){
+        this.on("click", this.handler, this.scope);
+    }
+};
+
+Ext.extend(Ext.menu.BaseItem, Ext.Component, {
+    /**
+     * @property parentMenu
+     * @type Ext.menu.Menu
+     * The parent Menu of this Item.
+     */
+    /**
+     * @cfg {Function} handler
+     * A function that will handle the click event of this menu item (optional).
+     * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>b</code> : Item<div class="sub-desc">This menu Item.</div></li>
+     * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope
+     * The scope (<tt><b>this</b></tt> reference) in which the handler function will be called.
+     */
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to false)
+     */
+    canActivate : false,
+    /**
+     * @cfg {String} activeClass The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
+     */
+    activeClass : "x-menu-item-active",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to true)
+     */
+    hideOnClick : true,
+    /**
+     * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100)
+     */
+    clickHideDelay : 1,
+
+    // private
+    ctype : "Ext.menu.BaseItem",
+
+    // private
+    actionMode : "container",
+
+    // private
+    onRender : function(container, position){
+        Ext.menu.BaseItem.superclass.onRender.apply(this, arguments);
+        if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){
+            this.parentMenu = this.ownerCt;
+        }else{
+            this.container.addClass('x-menu-list-item');
+            this.mon(this.el, 'click', this.onClick, this);
+            this.mon(this.el, 'mouseenter', this.activate, this);
+            this.mon(this.el, 'mouseleave', this.deactivate, this);
+        }
+    },
+
+    /**
+     * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler}
+     * config property).  If an existing handler is already registered, it will be unregistered for you.
+     * @param {Function} handler The function that should be called on click
+     * @param {Object} scope The scope that should be passed to the handler
+     */
+    setHandler : function(handler, scope){
+        if(this.handler){
+            this.un("click", this.handler, this.scope);
+        }
+        this.on("click", this.handler = handler, this.scope = scope);
+    },
+
+    // private
+    onClick : function(e){
+        if(!this.disabled && this.fireEvent("click", this, e) !== false
+                && (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){
+            this.handleClick(e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    activate : function(){
+        if(this.disabled){
+            return false;
+        }
+        var li = this.container;
+        li.addClass(this.activeClass);
+        this.region = li.getRegion().adjust(2, 2, -2, -2);
+        this.fireEvent("activate", this);
+        return true;
+    },
+
+    // private
+    deactivate : function(){
+        this.container.removeClass(this.activeClass);
+        this.fireEvent("deactivate", this);
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        return !this.region || !this.region.contains(e.getPoint());
+    },
+
+    // private
+    handleClick : function(e){
+        if(this.hideOnClick){
+            this.parentMenu.hide.defer(this.clickHideDelay, this.parentMenu, [true]);
+        }
+    },
+
+    // private. Do nothing
+    expandMenu : Ext.emptyFn,
+
+    // private. Do nothing
+    hideMenu : Ext.emptyFn
+});
+Ext.reg('menubaseitem', Ext.menu.BaseItem);/**
+ * @class Ext.menu.TextItem
+ * @extends Ext.menu.BaseItem
+ * Adds a static text string to a menu, usually used as either a heading or group separator.
+ * @constructor
+ * Creates a new TextItem
+ * @param {Object/String} config If config is a string, it is used as the text to display, otherwise it
+ * is applied as a config object (and should contain a <tt>text</tt> property).
+ * @xtype menutextitem
+ */
+Ext.menu.TextItem = function(cfg){
+    if(typeof cfg == 'string'){
+        cfg = {text: cfg}
+    }
+    Ext.menu.TextItem.superclass.constructor.call(this, cfg);
+};
+
+Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} text The text to display for this item (defaults to '')
+     */
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    /**
+     * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text")
+     */
+    itemCls : "x-menu-text",
+
+    // private
+    onRender : function(){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = this.text;
+        this.el = s;
+        Ext.menu.TextItem.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menutextitem', Ext.menu.TextItem);/**
+ * @class Ext.menu.Separator
+ * @extends Ext.menu.BaseItem
+ * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
+ * add one of these by using "-" in you call to add() or in your items config rather than creating one directly.
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype menuseparator
+ */
+Ext.menu.Separator = function(config){
+    Ext.menu.Separator.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep")
+     */
+    itemCls : "x-menu-sep",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    
+    /** 
+     * @cfg {String} activeClass
+     * @hide 
+     */
+    activeClass: '',
+
+    // private
+    onRender : function(li){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = "&#160;";
+        this.el = s;
+        li.addClass("x-menu-sep-li");
+        Ext.menu.Separator.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menuseparator', Ext.menu.Separator);/**
+ * @class Ext.menu.Item
+ * @extends Ext.menu.BaseItem
+ * A base class for all menu items that require menu-related functionality (like sub-menus) and are not static
+ * display items.  Item extends the base functionality of {@link Ext.menu.BaseItem} by adding menu-specific
+ * activation and click handling.
+ * @constructor
+ * Creates a new Item
+ * @param {Object} config Configuration options
+ * @xtype menuitem
+ */
+Ext.menu.Item = function(config){
+    Ext.menu.Item.superclass.constructor.call(this, config);
+    if(this.menu){
+        this.menu = Ext.menu.MenuMgr.get(this.menu);
+    }
+};
+Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, {
+    /**
+     * @property menu
+     * @type Ext.menu.Menu
+     * The submenu associated with this Item if one was configured.
+     */
+    /**
+     * @cfg {Mixed} menu (optional) Either an instance of {@link Ext.menu.Menu} or the config object for an
+     * {@link Ext.menu.Menu} which acts as the submenu when this item is activated.
+     */
+    /**
+     * @cfg {String} icon The path to an icon to display in this item (defaults to Ext.BLANK_IMAGE_URL).  If
+     * icon is specified {@link #iconCls} should not be.
+     */
+    /**
+     * @cfg {String} iconCls A CSS class that specifies a background image that will be used as the icon for
+     * this item (defaults to '').  If iconCls is specified {@link #icon} should not be.
+     */
+    /**
+     * @cfg {String} text The text to display in this item (defaults to '').
+     */
+    /**
+     * @cfg {String} href The href attribute to use for the underlying anchor link (defaults to '#').
+     */
+    /**
+     * @cfg {String} hrefTarget The target attribute to use for the underlying anchor link (defaults to '').
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for menu items (defaults to 'x-menu-item')
+     */
+    itemCls : 'x-menu-item',
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to true)
+     */
+    canActivate : true,
+    /**
+     * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200)
+     */
+    showDelay: 200,
+    // doc'd in BaseItem
+    hideDelay: 200,
+
+    // private
+    ctype: 'Ext.menu.Item',
+
+    // private
+    onRender : function(container, position){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
+                '<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"',
+                    '<tpl if="hrefTarget">',
+                        ' target="{hrefTarget}"',
+                    '</tpl>',
+                 '>',
+                     '<img src="{icon}" class="x-menu-item-icon {iconCls}"/>',
+                     '<span class="x-menu-item-text">{text}</span>',
+                 '</a>'
+             );
+        }
+        var a = this.getTemplateArgs();
+        this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true);
+        this.iconEl = this.el.child('img.x-menu-item-icon');
+        this.textEl = this.el.child('.x-menu-item-text');
+        Ext.menu.Item.superclass.onRender.call(this, container, position);
+    },
+
+    getTemplateArgs: function() {
+        return {
+            id: this.id,
+            cls: this.itemCls + (this.menu ?  ' x-menu-item-arrow' : '') + (this.cls ?  ' ' + this.cls : ''),
+            href: this.href || '#',
+            hrefTarget: this.hrefTarget,
+            icon: this.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: this.iconCls || '',
+            text: this.itemText||this.text||'&#160;'
+        };
+    },
+
+    /**
+     * Sets the text to display in this menu item
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.text = text||'&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+            this.parentMenu.layout.doAutoSize();
+        }
+    },
+
+    /**
+     * Sets the CSS class to apply to the item's icon element
+     * @param {String} cls The CSS class to apply
+     */
+    setIconClass : function(cls){
+        var oldCls = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered){
+            this.iconEl.replaceClass(oldCls, this.iconCls);
+        }
+    },
+    
+    //private
+    beforeDestroy: function(){
+        if (this.menu){
+            this.menu.destroy();
+        }
+        Ext.menu.Item.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    handleClick : function(e){
+        if(!this.href){ // if no link defined, stop the event automatically
+            e.stopEvent();
+        }
+        Ext.menu.Item.superclass.handleClick.apply(this, arguments);
+    },
+
+    // private
+    activate : function(autoExpand){
+        if(Ext.menu.Item.superclass.activate.apply(this, arguments)){
+            this.focus();
+            if(autoExpand){
+                this.expandMenu();
+            }
+        }
+        return true;
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){
+            if(this.menu && this.menu.isVisible()){
+                return !this.menu.getEl().getRegion().contains(e.getPoint());
+            }
+            return true;
+        }
+        return false;
+    },
+
+    // private
+    deactivate : function(){
+        Ext.menu.Item.superclass.deactivate.apply(this, arguments);
+        this.hideMenu();
+    },
+
+    // private
+    expandMenu : function(autoActivate){
+        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, [autoActivate]);
+            }else if (this.menu.isVisible() && autoActivate){
+                this.menu.tryActivate(0, 1);
+            }
+        }
+    },
+
+    // private
+    deferExpand : function(autoActivate){
+        delete this.showTimer;
+        this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu);
+        if(autoActivate){
+            this.menu.tryActivate(0, 1);
+        }
+    },
+
+    // private
+    hideMenu : function(){
+        clearTimeout(this.showTimer);
+        delete this.showTimer;
+        if(!this.hideTimer && this.menu && this.menu.isVisible()){
+            this.hideTimer = this.deferHide.defer(this.hideDelay, this);
+        }
+    },
+
+    // private
+    deferHide : function(){
+        delete this.hideTimer;
+        if(this.menu.over){
+            this.parentMenu.setActiveItem(this, false);
+        }else{
+            this.menu.hide();
+        }
+    }
+});
+Ext.reg('menuitem', Ext.menu.Item);/**
+ * @class Ext.menu.CheckItem
+ * @extends Ext.menu.Item
+ * Adds a menu item that contains a checkbox by default, but can also be part of a radio group.
+ * @constructor
+ * Creates a new CheckItem
+ * @param {Object} config Configuration options
+ * @xtype menucheckitem
+ */
+Ext.menu.CheckItem = function(config){
+    Ext.menu.CheckItem.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+         * @event beforecheckchange
+         * Fires before the checked value is set, providing an opportunity to cancel if needed
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The new checked value that will be set
+         */
+        "beforecheckchange" ,
+        /**
+         * @event checkchange
+         * Fires after the checked value has been set
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The checked value that was set
+         */
+        "checkchange"
+    );
+    /**
+     * A function that handles the checkchange event.  The function is undefined by default, but if an implementation
+     * is provided, it will be called automatically when the checkchange event fires.
+     * @param {Ext.menu.CheckItem} this
+     * @param {Boolean} checked The checked value that was set
+     * @method checkHandler
+     */
+    if(this.checkHandler){
+        this.on('checkchange', this.checkHandler, this.scope);
+    }
+    Ext.menu.MenuMgr.registerCheckable(this);
+};
+Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, {
+    /**
+     * @cfg {String} group
+     * All check items with the same group name will automatically be grouped into a single-select
+     * radio button group (defaults to '')
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item")
+     */
+    itemCls : "x-menu-item x-menu-check-item",
+    /**
+     * @cfg {String} groupClass The default CSS class to use for radio group check items (defaults to "x-menu-group-item")
+     */
+    groupClass : "x-menu-group-item",
+
+    /**
+     * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false).  Note that
+     * if this checkbox is part of a radio group (group = true) only the last item in the group that is
+     * initialized with checked = true will be rendered as checked.
+     */
+    checked: false,
+
+    // private
+    ctype: "Ext.menu.CheckItem",
+
+    // private
+    onRender : function(c){
+        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);
+        }
+    },
+
+    // private
+    destroy : function(){
+        Ext.menu.MenuMgr.unregisterCheckable(this);
+        Ext.menu.CheckItem.superclass.destroy.apply(this, arguments);
+    },
+
+    /**
+     * Set the checked state of this item
+     * @param {Boolean} checked The new checked value
+     * @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false)
+     */
+    setChecked : function(state, suppressEvent){
+        if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){
+            if(this.container){
+                this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked");
+            }
+            this.checked = state;
+            if(suppressEvent !== true){
+                this.fireEvent("checkchange", this, state);
+            }
+        }
+    },
+
+    // private
+    handleClick : function(e){
+       if(!this.disabled && !(this.checked && this.group)){// disable unselect on radio item
+           this.setChecked(!this.checked);
+       }
+       Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments);
+    }
+});
+Ext.reg('menucheckitem', Ext.menu.CheckItem);/**
+ * @class Ext.menu.DateMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.DatePicker} Component.
+ * @xtype datemenu
+ */
+ Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a date is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property picker
+     * @type DatePicker
+     * The {@link Ext.DatePicker} instance for this DateMenu
+     */
+    cls: 'x-date-menu',
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+
+    initComponent: function(){
+        this.on('beforeshow', this.onBeforeShow, this);
+        if(this.strict = (Ext.isIE7 && Ext.isStrict)){
+            this.on('show', this.onShow, this, {single: true, delay: 20});
+        }
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.picker = new Ext.DatePicker(Ext.apply({
+                internalRender: this.strict || !Ext.isIE,
+                ctCls: 'x-menu-date-item'
+            }, this.initialConfig))
+        });
+        this.picker.purgeListeners();
+        Ext.menu.DateMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.picker, ["select"]);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this);
+        }
+    },
+
+    menuHide: function() {
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    },
+
+    onBeforeShow: function(){
+        if(this.picker){
+            this.picker.hideMonthPicker(true);
+        }
+    },
+
+    onShow: function(){
+        var el = this.picker.getEl();
+        el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode
+    }
+ });
+ Ext.reg('datemenu', Ext.menu.DateMenu);/**
+ * @class Ext.menu.ColorMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.ColorPalette} Component.
+ * @xtype colormenu
+ */
+ Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a color is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property palette
+     * @type ColorPalette
+     * The {@link Ext.ColorPalette} instance for this ColorMenu
+     */
+    
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+    
+    initComponent: function(){
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.palette = new Ext.ColorPalette(this.initialConfig)
+        });
+        this.palette.purgeListeners();
+        Ext.menu.ColorMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.palette, ['select']);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this)
+        }
+    },
+
+    menuHide: function(){
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    }
+});
+Ext.reg('colormenu', Ext.menu.ColorMenu);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-menu.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.layout.MenuLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,setContainer:function(a){this.monitorResize=!a.floating;Ext.layout.MenuLayout.superclass.setContainer.call(this,a)},renderItem:function(f,b,e){if(!this.itemTpl){this.itemTpl=Ext.layout.MenuLayout.prototype.itemTpl=new Ext.XTemplate('<li id="{itemId}" class="{itemCls}">','<tpl if="needsIcon">','<img src="{icon}" class="{iconCls}"/>',"</tpl>","</li>")}if(f&&!f.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(f);f.render(f.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));f.positionEl.menuItemId=f.itemId||f.id;if(!d.isMenuItem&&d.needsIcon){f.positionEl.addClass("x-menu-list-item-indent")}}else{if(f&&!this.isValidParent(f,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(f.getActionEl().dom,b||null)}}},getItemArgs:function(b){var a=b instanceof Ext.menu.Item;return{isMenuItem:a,needsIcon:!a&&(b.icon||b.iconCls),icon:b.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(b.iconCls||""),itemId:"x-menu-el-"+b.id,itemCls:"x-menu-list-item "+(this.extraCls||"")}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){this.renderAll(a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],floating:true,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){this.on({add:this.doLayout,remove:this.doLayout,scope:this})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:15000})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},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=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(f,e){var b=this.items;for(var c=f,a=b.length;c>=0&&c<a;c+=e){var d=b.get(c);if(!d.disabled&&(d.canActivate||d.isFormField)){this.setActiveItem(d,false);return d}}return false},onMouseOver:function(b){var a=this.findTargetItem(b);if(a){if(a.canActivate&&!a.disabled){this.setActiveItem(a,true)}}this.over=true;this.fireEvent("mouseover",this,b,a)},onMouseOut:function(b){var a=this.findTargetItem(b);if(a){if(a==this.activeItem&&a.shouldDeactivate&&a.shouldDeactivate(b)){this.activeItem.deactivate();delete this.activeItem}}this.over=false;this.fireEvent("mouseout",this,b,a)},onScroll:function(d,b){if(d){d.stopEvent()}var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");a.scrollTop+=this.scrollIncrement*(c?-1:1);if(c?a.scrollTop<=0:a.scrollTop+this.activeMax>=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMax<a.scrollHeight){Ext.fly(b).addClass(["x-menu-item-active","x-menu-scroller-active"])}},onScrollerOut:function(b,a){Ext.fly(a).removeClass(["x-menu-item-active","x-menu-scroller-active"])},show:function(b,c,a){if(this.floating){this.parentMenu=a;if(!this.el){this.render();this.doLayout(false,true)}if(this.fireEvent("beforeshow",this)!==false){this.showAt(this.el.getAlignToXY(b,c||this.defaultAlign,this.defaultOffsets),a,false)}}else{Ext.menu.Menu.superclass.show.call(this)}},showAt:function(c,b,a){this.parentMenu=b;if(!this.el){this.render()}this.el.setXY(c);if(this.enableScrolling){this.constrainScroll(c[1])}this.el.show();Ext.menu.Menu.superclass.onShow.call(this);if(Ext.isIE){this.layout.doAutoSize();if(!Ext.isIE8){this.el.repaint()}}this.hidden=false;this.focus();this.fireEvent("show",this)},constrainScroll:function(c){var a,b=this.ul.setHeight("auto").getHeight();if(this.floating){a=this.maxHeight?this.maxHeight:Ext.fly(this.el.dom.parentNode).getViewSize().height-c}else{a=this.getHeight()}if(b>a&&a>0){this.activeMax=a-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(b);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:"&#160;"}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:"&#160;"})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}if(this.deepHide===true&&this.parentMenu){this.parentMenu.hide(true)}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem(a))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);Ext.EventManager.removeResizeListener(this.hide,this);if(this.keyNav){this.keyNav.disable()}var a=this.scroller;if(a){Ext.destroy(a.topRepeater,a.bottomRepeater,a.top,a.bottom)}}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(f,d){var c=f.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=f.TAB){return false}if(!this.menu.activeItem&&f.isNavKeyPress()&&c!=f.SPACE&&c!=f.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,f,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var f,d,c={},a=false,k=new Date();function m(){f={};d=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(d.length>0){h()}})}function h(){if(d&&d.length>0){var n=d.clone();n.each(function(o){o.hide()})}}function e(n){d.remove(n);if(d.length<1){Ext.getDoc().un("mousedown",l);a=false}}function j(n){var o=d.last();k=new Date();d.add(n);if(!a){Ext.getDoc().on("mousedown",l);a=true}if(n.parentMenu){n.getEl().setZIndex(parseInt(n.parentMenu.getEl().getStyle("z-index"),10)+3);n.parentMenu.activeChild=n}else{if(o&&o.isVisible()){n.getEl().setZIndex(parseInt(o.getEl().getStyle("z-index"),10)+3)}}}function b(n){if(n.activeChild){n.activeChild.hide()}if(n.autoHideTimer){clearTimeout(n.autoHideTimer);delete n.autoHideTimer}}function g(n){var o=n.parentMenu;if(!o&&!n.allowOtherMenus){h()}else{if(o&&o.activeChild){o.activeChild.hide()}}}function l(n){if(k.getElapsed()>50&&d.length>0&&!n.getTarget(".x-menu")){h()}}function i(o,r){if(r){var q=c[o.group];for(var p=0,n=q.length;p<n;p++){if(q[p]!=o){q[p].setChecked(false)}}}}return{hideAll:function(){h()},register:function(o){if(!f){m()}f[o.id]=o;o.on("beforehide",b);o.on("hide",e);o.on("beforeshow",g);o.on("show",j);var n=o.group;if(n&&o.events.checkchange){if(!c[n]){c[n]=[]}c[n].push(o);o.on("checkchange",onCheck)}},get:function(n){if(typeof n=="string"){if(!f){return null}return f[n]}else{if(n.events){return n}else{if(typeof n.length=="number"){return new Ext.menu.Menu({items:n})}else{return Ext.create(n,"menu")}}}},unregister:function(o){delete f[o.id];o.un("beforehide",b);o.un("hide",e);o.un("beforeshow",g);o.un("show",j);var n=o.group;if(n&&o.events.checkchange){c[n].remove(o);o.un("checkchange",onCheck)}},registerCheckable:function(n){var o=n.group;if(o){if(!c[o]){c[o]=[]}c[o].push(n);n.on("beforecheckchange",i)}},unregisterCheckable:function(n){var o=n.group;if(o){c[o].remove(n);n.un("beforecheckchange",i)}},getCheckedItem:function(p){var q=c[p];if(q){for(var o=0,n=q.length;o<n;o++){if(q[o].checked){return q[o]}}}return null},setCheckedItem:function(p,r){var q=c[p];if(q){for(var o=0,n=q.length;o<n;o++){if(q[o].id==r){q[o].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,clickHideDelay:1,ctype:"Ext.menu.BaseItem",actionMode:"container",onRender:function(b,a){Ext.menu.BaseItem.superclass.onRender.apply(this,arguments);if(this.ownerCt&&this.ownerCt instanceof Ext.menu.Menu){this.parentMenu=this.ownerCt}else{this.container.addClass("x-menu-list-item");this.mon(this.el,"click",this.onClick,this);this.mon(this.el,"mouseenter",this.activate,this);this.mon(this.el,"mouseleave",this.deactivate,this)}},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&&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.clickHideDelay,this.parentMenu,[true])}},expandMenu:Ext.emptyFn,hideMenu:Ext.emptyFn});Ext.reg("menubaseitem",Ext.menu.BaseItem);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.reg("menutextitem",Ext.menu.TextItem);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,activeClass:"",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.reg("menuseparator",Ext.menu.Separator);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(d,b){if(!this.itemTpl){this.itemTpl=Ext.menu.Item.prototype.itemTpl=new Ext.XTemplate('<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"','<tpl if="hrefTarget">',' target="{hrefTarget}"',"</tpl>",">",'<img src="{icon}" class="x-menu-item-icon {iconCls}"/>','<span class="x-menu-item-text">{text}</span>',"</a>")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||"&#160;"}},setText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){if(this.menu){this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},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.reg("menuitem",Ext.menu.Item);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.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.apply({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item"},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(this.initialConfig)});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs-debug.js	(revision 625)
@@ -0,0 +1,1100 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.TabPanel
+ * <p>A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel}
+ * for layout purposes, but also have special support for containing child Components
+ * (<tt>{@link Ext.Container#items items}</tt>) that are managed using a
+ * {@link Ext.layout.CardLayout CardLayout layout manager}, and displayed as separate tabs.</p>
+ *
+ * <b>Note:</b> By default, a tab's close tool <i>destroys</i> the child tab Component
+ * and all its descendants. This makes the child tab Component, and all its descendants <b>unusable</b>. To enable
+ * re-use of a tab, configure the TabPanel with <b><code>{@link #autoDestroy autoDestroy: false}</code></b>.
+ *
+ * <p><b><u>TabPanel header/footer elements</u></b></p>
+ * <p>TabPanels use their {@link Ext.Panel#header header} or {@link Ext.Panel#footer footer} element
+ * (depending on the {@link #tabPosition} configuration) to accommodate the tab selector buttons.
+ * This means that a TabPanel will not display any configured title, and will not display any
+ * configured header {@link Ext.Panel#tools tools}.</p>
+ * <p>To display a header, embed the TabPanel in a {@link Ext.Panel Panel} which uses
+ * <b><tt>{@link Ext.Container#layout layout:'fit'}</tt></b>.</p>
+ *
+ * <p><b><u>Tab Events</u></b></p>
+ * <p>There is no actual tab class &mdash; each tab is simply a {@link Ext.BoxComponent Component}
+ * such as a {@link Ext.Panel Panel}. However, when rendered in a TabPanel, each child Component
+ * can fire additional events that only exist for tabs and are not available from other Components.
+ * These events are:</p>
+ * <div><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.Panel#activate activate}</b></tt> : Fires when this Component becomes
+ * the active tab.</li>
+ * <li><tt><b>{@link Ext.Panel#deactivate deactivate}</b></tt> : Fires when the Component that
+ * was the active tab becomes deactivated.</li>
+ * </ul></div>
+ * <p><b><u>Creating TabPanels from Code</u></b></p>
+ * <p>TabPanels can be created and rendered completely in code, as in this example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: Ext.getBody(),
+    activeTab: 0,
+    items: [{
+        title: 'Tab 1',
+        html: 'A simple tab'
+    },{
+        title: 'Tab 2',
+        html: 'Another one'
+    }]
+});
+</code></pre>
+ * <p><b><u>Creating TabPanels from Existing Markup</u></b></p>
+ * <p>TabPanels can also be rendered from pre-existing markup in a couple of ways.</p>
+ * <div><ul class="mdetail-params">
+ *
+ * <li>Pre-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A container div with one or more nested tab divs with class <tt>'x-tab'</tt> can be rendered entirely
+ * from existing markup (See the {@link #autoTabs} example).</p>
+ * </div>
+ *
+ * <li>Un-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A TabPanel can also be rendered from markup that is not strictly structured by simply specifying by id
+ * which elements should be the container and the tabs. Using this method tab content can be pulled from different
+ * elements within the page by id regardless of page structure. For example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: 'my-tabs',
+    activeTab: 0,
+    items:[
+        {contentEl:'tab1', title:'Tab 1'},
+        {contentEl:'tab2', title:'Tab 2'}
+    ]
+});
+
+// Note that the tabs do not have to be nested within the container (although they can be)
+&lt;div id="my-tabs">&lt;/div>
+&lt;div id="tab1" class="x-hide-display">A simple tab&lt;/div>
+&lt;div id="tab2" class="x-hide-display">Another one&lt;/div>
+</code></pre>
+ * Note that the tab divs in this example contain the class <tt>'x-hide-display'</tt> so that they can be rendered
+ * deferred without displaying outside the tabs. You could alternately set <tt>{@link #deferredRender} = false </tt>
+ * to render all content tabs on page load.
+ * </div>
+ *
+ * </ul></div>
+ *
+ * @extends Ext.Panel
+ * @constructor
+ * @param {Object} config The configuration options
+ * @xtype tabpanel
+ */
+Ext.TabPanel = Ext.extend(Ext.Panel,  {
+    /**
+     * @cfg {Boolean} layoutOnTabChange
+     * Set to true to force a layout of the active tab when the tab is changed. Defaults to false.
+     * See {@link Ext.layout.CardLayout}.<code>{@link Ext.layout.CardLayout#layoutOnCardChange layoutOnCardChange}</code>.
+     */
+    /**
+     * @cfg {String} tabCls <b>This config option is used on <u>child Components</u> of ths TabPanel.</b> A CSS
+     * class name applied to the tab strip item representing the child Component, allowing special
+     * styling to be applied.
+     */
+    /**
+     * @cfg {Boolean} monitorResize True to automatically monitor window resize events and rerender the layout on
+     * browser resize (defaults to true).
+     */
+    monitorResize : true,
+    /**
+     * @cfg {Boolean} deferredRender
+     * <p><tt>true</tt> by default to defer the rendering of child <tt>{@link Ext.Container#items items}</tt>
+     * to the browsers DOM until a tab is activated. <tt>false</tt> will render all contained
+     * <tt>{@link Ext.Container#items items}</tt> as soon as the {@link Ext.layout.CardLayout layout}
+     * is rendered. If there is a significant amount of content or a lot of heavy controls being
+     * rendered into panels that are not displayed by default, setting this to <tt>true</tt> might
+     * improve performance.</p>
+     * <br><p>The <tt>deferredRender</tt> property is internally passed to the layout manager for
+     * TabPanels ({@link Ext.layout.CardLayout}) as its {@link Ext.layout.CardLayout#deferredRender}
+     * configuration value.</p>
+     * <br><p><b>Note</b>: leaving <tt>deferredRender</tt> as <tt>true</tt> means that the content
+     * within an unactivated tab will not be available. For example, this means that if the TabPanel
+     * is within a {@link Ext.form.FormPanel form}, then until a tab is activated, any Fields within
+     * unactivated tabs will not be rendered, and will therefore not be submitted and will not be
+     * available to either {@link Ext.form.BasicForm#getValues getValues} or
+     * {@link Ext.form.BasicForm#setValues setValues}.</p>
+     */
+    deferredRender : true,
+    /**
+     * @cfg {Number} tabWidth The initial width in pixels of each new tab (defaults to 120).
+     */
+    tabWidth : 120,
+    /**
+     * @cfg {Number} minTabWidth The minimum width in pixels for each tab when {@link #resizeTabs} = true (defaults to 30).
+     */
+    minTabWidth : 30,
+    /**
+     * @cfg {Boolean} resizeTabs True to automatically resize each tab so that the tabs will completely fill the
+     * tab strip (defaults to false).  Setting this to true may cause specific widths that might be set per tab to
+     * be overridden in order to fit them all into view (although {@link #minTabWidth} will always be honored).
+     */
+    resizeTabs : false,
+    /**
+     * @cfg {Boolean} enableTabScroll True to enable scrolling to tabs that may be invisible due to overflowing the
+     * overall TabPanel width. Only available with tabPosition:'top' (defaults to false).
+     */
+    enableTabScroll : false,
+    /**
+     * @cfg {Number} scrollIncrement The number of pixels to scroll each time a tab scroll button is pressed
+     * (defaults to <tt>100</tt>, or if <tt>{@link #resizeTabs} = true</tt>, the calculated tab width).  Only
+     * applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    scrollIncrement : 0,
+    /**
+     * @cfg {Number} scrollRepeatInterval Number of milliseconds between each scroll while a tab scroll button is
+     * continuously pressed (defaults to <tt>400</tt>).
+     */
+    scrollRepeatInterval : 400,
+    /**
+     * @cfg {Float} scrollDuration The number of milliseconds that each scroll animation should last (defaults
+     * to <tt>.35</tt>). Only applies when <tt>{@link #animScroll} = true</tt>.
+     */
+    scrollDuration : 0.35,
+    /**
+     * @cfg {Boolean} animScroll True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults
+     * to <tt>true</tt>).  Only applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    animScroll : true,
+    /**
+     * @cfg {String} tabPosition The position where the tab strip should be rendered (defaults to <tt>'top'</tt>).
+     * The only other supported value is <tt>'bottom'</tt>.  <b>Note</b>: tab scrolling is only supported for
+     * <tt>tabPosition: 'top'</tt>.
+     */
+    tabPosition : 'top',
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the panel (defaults to <tt>'x-tab-panel'</tt>).
+     */
+    baseCls : 'x-tab-panel',
+    /**
+     * @cfg {Boolean} autoTabs
+     * <p><tt>true</tt> to query the DOM for any divs with a class of 'x-tab' to be automatically converted
+     * to tabs and added to this panel (defaults to <tt>false</tt>).  Note that the query will be executed within
+     * the scope of the container element only (so that multiple tab panels from markup can be supported via this
+     * method).</p>
+     * <p>This method is only possible when the markup is structured correctly as a container with nested divs
+     * containing the class <tt>'x-tab'</tt>. To create TabPanels without these limitations, or to pull tab content
+     * from other elements on the page, see the example at the top of the class for generating tabs from markup.</p>
+     * <p>There are a couple of things to note when using this method:<ul>
+     * <li>When using the <tt>autoTabs</tt> config (as opposed to passing individual tab configs in the TabPanel's
+     * {@link #items} collection), you must use <tt>{@link #applyTo}</tt> to correctly use the specified <tt>id</tt>
+     * as the tab container. The <tt>autoTabs</tt> method <em>replaces</em> existing content with the TabPanel
+     * components.</li>
+     * <li>Make sure that you set <tt>{@link #deferredRender}: false</tt> so that the content elements for each
+     * tab will be rendered into the TabPanel immediately upon page load, otherwise they will not be transformed
+     * until each tab is activated and will be visible outside the TabPanel.</li>
+     * </ul>Example usage:</p>
+     * <pre><code>
+var tabs = new Ext.TabPanel({
+    applyTo: 'my-tabs',
+    activeTab: 0,
+    deferredRender: false,
+    autoTabs: true
+});
+
+// This markup will be converted to a TabPanel from the code above
+&lt;div id="my-tabs">
+    &lt;div class="x-tab" title="Tab 1">A simple tab&lt;/div>
+    &lt;div class="x-tab" title="Tab 2">Another one&lt;/div>
+&lt;/div>
+</code></pre>
+     */
+    autoTabs : false,
+    /**
+     * @cfg {String} autoTabSelector The CSS selector used to search for tabs in existing markup when
+     * <tt>{@link #autoTabs} = true</tt> (defaults to <tt>'div.x-tab'</tt>).  This can be any valid selector
+     * supported by {@link Ext.DomQuery#select}. Note that the query will be executed within the scope of this
+     * tab panel only (so that multiple tab panels from markup can be supported on a page).
+     */
+    autoTabSelector : 'div.x-tab',
+    /**
+     * @cfg {String/Number} activeTab A string id or the numeric index of the tab that should be initially
+     * activated on render (defaults to none).
+     */
+    activeTab : null,
+    /**
+     * @cfg {Number} tabMargin The number of pixels of space to calculate into the sizing and scrolling of
+     * tabs. If you change the margin in CSS, you will need to update this value so calculations are correct
+     * with either <tt>{@link #resizeTabs}</tt> or scrolling tabs. (defaults to <tt>2</tt>)
+     */
+    tabMargin : 2,
+    /**
+     * @cfg {Boolean} plain </tt>true</tt> to render the tab strip without a background container image
+     * (defaults to <tt>false</tt>).
+     */
+    plain : false,
+    /**
+     * @cfg {Number} wheelIncrement For scrolling tabs, the number of pixels to increment on mouse wheel
+     * scrolling (defaults to <tt>20</tt>).
+     */
+    wheelIncrement : 20,
+
+    /*
+     * This is a protected property used when concatenating tab ids to the TabPanel id for internal uniqueness.
+     * It does not generally need to be changed, but can be if external code also uses an id scheme that can
+     * potentially clash with this one.
+     */
+    idDelimiter : '__',
+
+    // private
+    itemCls : 'x-tab-item',
+
+    // private config overrides
+    elements : 'body',
+    headerAsText : false,
+    frame : false,
+    hideBorders :true,
+
+    // private
+    initComponent : function(){
+        this.frame = false;
+        Ext.TabPanel.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforetabchange
+             * Fires before the active tab changes. Handlers can <tt>return false</tt> to cancel the tab change.
+             * @param {TabPanel} this
+             * @param {Panel} newTab The tab being activated
+             * @param {Panel} currentTab The current active tab
+             */
+            'beforetabchange',
+            /**
+             * @event tabchange
+             * Fires after the active tab has changed.
+             * @param {TabPanel} this
+             * @param {Panel} tab The new active tab
+             */
+            'tabchange',
+            /**
+             * @event contextmenu
+             * Relays the contextmenu event from a tab selector element in the tab strip.
+             * @param {TabPanel} this
+             * @param {Panel} tab The target tab
+             * @param {EventObject} e
+             */
+            'contextmenu'
+        );
+        /**
+         * @cfg {Object} layoutConfig
+         * TabPanel implicitly uses {@link Ext.layout.CardLayout} as its layout manager.
+         * <code>layoutConfig</code> may be used to configure this layout manager.
+         * <code>{@link #deferredRender}</code> and <code>{@link #layoutOnTabChange}</code>
+         * configured on the TabPanel will be applied as configs to the layout manager.
+         */
+        this.setLayout(new Ext.layout.CardLayout(Ext.apply({
+            layoutOnCardChange: this.layoutOnTabChange,
+            deferredRender: this.deferredRender
+        }, this.layoutConfig)));
+
+        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();
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.TabPanel.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            var pos = this.tabPosition == 'top' ? 'header' : 'footer';
+            this[pos].addClass('x-tab-panel-'+pos+'-plain');
+        }
+
+        var st = this[this.stripTarget];
+
+        this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{
+            tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}});
+
+        var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null);
+        this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl);
+        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);
+
+        /**
+         * @cfg {Template/XTemplate} itemTpl <p>(Optional) A {@link Ext.Template Template} or
+         * {@link Ext.XTemplate XTemplate} which may be provided to process the data object returned from
+         * <tt>{@link #getTemplateArgs}</tt> to produce a clickable selector element in the tab strip.</p>
+         * <p>The main element created should be a <tt>&lt;li></tt> element. In order for a click event on
+         * a selector element to be connected to its item, it must take its <i>id</i> from the TabPanel's
+         * native <tt>{@link #getTemplateArgs}</tt>.</p>
+         * <p>The child element which contains the title text must be marked by the CSS class
+         * <tt>x-tab-strip-inner</tt>.</p>
+         * <p>To enable closability, the created element should contain an element marked by the CSS class
+         * <tt>x-tab-strip-close</tt>.</p>
+         * <p>If a custom <tt>itemTpl</tt> is supplied, it is the developer's responsibility to create CSS
+         * style rules to create the desired appearance.</p>
+         * Below is an example of how to create customized tab selector items:<pre><code>
+new Ext.TabPanel({
+    renderTo: document.body,
+    minTabWidth: 115,
+    tabWidth: 135,
+    enableTabScroll: true,
+    width: 600,
+    height: 250,
+    defaults: {autoScroll:true},
+    itemTpl: new Ext.XTemplate(
+    '&lt;li class="{cls}" id="{id}" style="overflow:hidden">',
+         '&lt;tpl if="closable">',
+            '&lt;a class="x-tab-strip-close" onclick="return false;">&lt;/a>',
+         '&lt;/tpl>',
+         '&lt;a class="x-tab-right" href="#" onclick="return false;" style="padding-left:6px">',
+            '&lt;em class="x-tab-left">',
+                '&lt;span class="x-tab-strip-inner">',
+                    '&lt;img src="{src}" style="float:left;margin:3px 3px 0 0">',
+                    '&lt;span style="margin-left:20px" class="x-tab-strip-text {iconCls}">{text} {extra}&lt;/span>',
+                '&lt;/span>',
+            '&lt;/em>',
+        '&lt;/a>',
+    '&lt;/li>'
+    ),
+    getTemplateArgs: function(item) {
+//      Call the native method to collect the base data. Like the ID!
+        var result = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
+
+//      Add stuff used in our template
+        return Ext.apply(result, {
+            closable: item.closable,
+            src: item.iconSrc,
+            extra: item.extraText || ''
+        });
+    },
+    items: [{
+        title: 'New Tab 1',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 1',
+        closable: true
+    }, {
+        title: 'New Tab 2',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 2',
+        extraText: 'Extra stuff in the tab button'
+    }]
+});
+</code></pre>
+         */
+        if(!this.itemTpl){
+            var tt = 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>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.TabPanel.prototype.itemTpl = tt;
+        }
+
+        this.items.each(this.initTab, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.TabPanel.superclass.afterRender.call(this);
+        if(this.autoTabs){
+            this.readTabs(false);
+        }
+        if(this.activeTab !== undefined){
+            var item = Ext.isObject(this.activeTab) ? this.activeTab : this.items.get(this.activeTab);
+            delete this.activeTab;
+            this.setActiveTab(item);
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.TabPanel.superclass.initEvents.call(this);
+        this.on('add', this.onAdd, this, {target: this});
+        this.on('remove', this.onRemove, this, {target: this});
+
+        this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
+        this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this);
+        if(this.enableTabScroll){
+            this.mon(this.strip, 'mousewheel', this.onWheel, this);
+        }
+    },
+
+    // private
+    findTargets : function(e){
+        var item = null;
+        var itemEl = e.getTarget('li', this.strip);
+        if(itemEl){
+            item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]);
+            if(item.disabled){
+                return {
+                    close : null,
+                    item : null,
+                    el : null
+                };
+            }
+        }
+        return {
+            close : e.getTarget('.x-tab-strip-close', this.strip),
+            item : item,
+            el : itemEl
+        };
+    },
+
+    // private
+    onStripMouseDown : function(e){
+        if(e.button !== 0){
+            return;
+        }
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.close){
+            if (t.item.fireEvent('beforeclose', t.item) !== false) {
+                t.item.fireEvent('close', t.item);
+                this.remove(t.item);
+            }
+            return;
+        }
+        if(t.item && t.item != this.activeTab){
+            this.setActiveTab(t.item);
+        }
+    },
+
+    // private
+    onStripContextMenu : function(e){
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.item){
+            this.fireEvent('contextmenu', this, t.item, e);
+        }
+    },
+
+    /**
+     * True to scan the markup in this tab panel for <tt>{@link #autoTabs}</tt> using the
+     * <tt>{@link #autoTabSelector}</tt>
+     * @param {Boolean} removeExisting True to remove existing tabs
+     */
+    readTabs : function(removeExisting){
+        if(removeExisting === true){
+            this.items.each(function(item){
+                this.remove(item);
+            }, this);
+        }
+        var tabs = this.el.query(this.autoTabSelector);
+        for(var i = 0, len = tabs.length; i < len; i++){
+            var tab = tabs[i];
+            var title = tab.getAttribute('title');
+            tab.removeAttribute('title');
+            this.add({
+                title: title,
+                contentEl: tab
+            });
+        }
+    },
+
+    // private
+    initTab : function(item, index){
+        var before = this.strip.dom.childNodes[index];
+        var p = this.getTemplateArgs(item);
+        var el = before ?
+                 this.itemTpl.insertBefore(before, p) :
+                 this.itemTpl.append(this.strip, p);
+
+        Ext.fly(el).addClassOnOver('x-tab-strip-over');
+
+        if(item.tabTip){
+            Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip;
+        }
+        item.tabEl = el;
+
+        item.on('disable', this.onItemDisabled, this);
+        item.on('enable', this.onItemEnabled, this);
+        item.on('titlechange', this.onItemTitleChanged, this);
+        item.on('iconchange', this.onItemIconChanged, this);
+        item.on('beforeshow', this.onBeforeShowItem, this);
+    },
+
+    /**
+     * <p>Provides template arguments for rendering a tab selector item in the tab strip.</p>
+     * <p>This method returns an object hash containing properties used by the TabPanel's <tt>{@link #itemTpl}</tt>
+     * to create a formatted, clickable tab selector element. The properties which must be returned
+     * are:</p><div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc">A unique identifier which links to the item</div></li>
+     * <li><b>text</b> : String<div class="sub-desc">The text to display</div></li>
+     * <li><b>cls</b> : String<div class="sub-desc">The CSS class name</div></li>
+     * <li><b>iconCls</b> : String<div class="sub-desc">A CSS class to provide appearance for an icon.</div></li>
+     * </ul></div>
+     * @param {BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip.
+     * @return {Object} An object hash containing the properties required to render the selector element.
+     */
+    getTemplateArgs : function(item) {
+        var cls = item.closable ? 'x-tab-strip-closable' : '';
+        if(item.disabled){
+            cls += ' x-item-disabled';
+        }
+        if(item.iconCls){
+            cls += ' x-tab-with-icon';
+        }
+        if(item.tabCls){
+            cls += ' ' + item.tabCls;
+        }
+
+        return {
+            id: this.id + this.idDelimiter + item.getItemId(),
+            text: item.title,
+            cls: cls,
+            iconCls: item.iconCls || ''
+        };
+    },
+
+    // private
+    onAdd : function(tp, item, index){
+        this.initTab(item, index);
+        if(this.items.getCount() == 1){
+            this.syncSize();
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
+        if(existing){
+            this.setActiveTab(item);
+            return false;
+        }
+        Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
+        var es = item.elements;
+        item.elements = es ? es.replace(',header', '') : es;
+        item.border = (item.border === true);
+    },
+
+    // private
+    onRemove : function(tp, item){
+        Ext.destroy(Ext.get(this.getTabEl(item)));
+        this.stack.remove(item);
+        item.un('disable', this.onItemDisabled, this);
+        item.un('enable', this.onItemEnabled, this);
+        item.un('titlechange', this.onItemTitleChanged, this);
+        item.un('iconchange', this.onItemIconChanged, this);
+        item.un('beforeshow', this.onBeforeShowItem, this);
+        if(item == this.activeTab){
+            var next = this.stack.next();
+            if(next){
+                this.setActiveTab(next);
+            }else if(this.items.getCount() > 0){
+                this.setActiveTab(0);
+            }else{
+                this.activeTab = null;
+            }
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeShowItem : function(item){
+        if(item != this.activeTab){
+            this.setActiveTab(item);
+            return false;
+        }
+    },
+
+    // private
+    onItemDisabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).addClass('x-item-disabled');
+        }
+        this.stack.remove(item);
+    },
+
+    // private
+    onItemEnabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).removeClass('x-item-disabled');
+        }
+    },
+
+    // private
+    onItemTitleChanged : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title;
+        }
+    },
+
+    //private
+    onItemIconChanged : function(item, iconCls, oldCls){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text').replaceClass(oldCls, iconCls);
+        }
+    },
+
+    /**
+     * Gets the DOM element for the tab strip item which activates the child panel with the specified
+     * ID. Access this to change the visual treatment of the item, for example by changing the CSS class name.
+     * @param {Panel/Number/String} tab The tab component, or the tab's index, or the tabs id or itemId.
+     * @return {HTMLElement} The DOM node
+     */
+    getTabEl : function(item){
+        return document.getElementById(this.id + this.idDelimiter + this.getComponent(item).getItemId());
+    },
+
+    // private
+    onResize : function(){
+        Ext.TabPanel.superclass.onResize.apply(this, arguments);
+        this.delegateUpdates();
+    },
+
+    /**
+     * Suspends any internal calculations or scrolling while doing a bulk operation. See {@link #endUpdate}
+     */
+    beginUpdate : function(){
+        this.suspendUpdates = true;
+    },
+
+    /**
+     * Resumes calculations and scrolling at the end of a bulk operation. See {@link #beginUpdate}
+     */
+    endUpdate : function(){
+        this.suspendUpdates = false;
+        this.delegateUpdates();
+    },
+
+    /**
+     * Hides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    hideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = 'none';
+            this.delegateUpdates();
+        }
+        this.stack.remove(item);
+    },
+
+    /**
+     * Unhides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    unhideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = '';
+            this.delegateUpdates();
+        }
+    },
+
+    // private
+    delegateUpdates : function(){
+        if(this.suspendUpdates){
+            return;
+        }
+        if(this.resizeTabs && this.rendered){
+            this.autoSizeTabs();
+        }
+        if(this.enableTabScroll && this.rendered){
+            this.autoScrollTabs();
+        }
+    },
+
+    // private
+    autoSizeTabs : function(){
+        var count = this.items.length;
+        var ce = this.tabPosition != 'bottom' ? 'header' : 'footer';
+        var ow = this[ce].dom.offsetWidth;
+        var aw = this[ce].dom.clientWidth;
+
+        if(!this.resizeTabs || count < 1 || !aw){ // !aw for display:none
+            return;
+        }
+
+        var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); // -4 for float errors in IE
+        this.lastTabWidth = each;
+        var lis = this.strip.query("li:not([className^=x-tab-edge])");
+        for(var i = 0, len = lis.length; i < len; i++) {
+            var li = lis[i];
+            var inner = Ext.fly(li).child('.x-tab-strip-inner', true);
+            var tw = li.offsetWidth;
+            var iw = inner.offsetWidth;
+            inner.style.width = (each - (tw-iw)) + 'px';
+        }
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        if(this.header){
+            this.header.setWidth(w);
+        }
+        if(this.footer){
+            this.footer.setWidth(w);
+        }
+        return w;
+    },
+
+    /**
+     * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which
+     * can <tt>return false</tt> to cancel the tab change.
+     * @param {String/Number} item
+     * The id or tab Panel to activate. This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link Ext.Container#items items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     */
+    setActiveTab : function(item){
+        item = this.getComponent(item);
+        if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeTab = item;
+            return;
+        }
+        if(this.activeTab != item){
+            if(this.activeTab){
+                var oldEl = this.getTabEl(this.activeTab);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-tab-strip-active');
+                }
+                this.activeTab.fireEvent('deactivate', this.activeTab);
+            }
+            var el = this.getTabEl(item);
+            Ext.fly(el).addClass('x-tab-strip-active');
+            this.activeTab = item;
+            this.stack.add(item);
+
+            this.layout.setActiveItem(item);
+            if(this.scrolling){
+                this.scrollToTab(item, this.animScroll);
+            }
+
+            item.fireEvent('activate', item);
+            this.fireEvent('tabchange', this, item);
+        }
+    },
+
+    /**
+     * Gets the currently active tab.
+     * @return {Panel} The active tab
+     */
+    getActiveTab : function(){
+        return this.activeTab || null;
+    },
+
+    /**
+     * Gets the specified tab by id.
+     * @param {String} id The tab id
+     * @return {Panel} The tab
+     */
+    getItem : function(item){
+        return this.getComponent(item);
+    },
+
+    // private
+    autoScrollTabs : function(){
+        this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
+        var count = this.items.length;
+        var ow = this.pos.dom.offsetWidth;
+        var tw = this.pos.dom.clientWidth;
+
+        var wrap = this.stripWrap;
+        var wd = wrap.dom;
+        var cw = wd.offsetWidth;
+        var pos = this.getScrollPos();
+        var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos;
+
+        if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues
+            return;
+        }
+        if(l <= tw){
+            wd.scrollLeft = 0;
+            wrap.setWidth(tw);
+            if(this.scrolling){
+                this.scrolling = false;
+                this.pos.removeClass('x-tab-scrolling');
+                this.scrollLeft.hide();
+                this.scrollRight.hide();
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '';
+                    wd.style.marginRight = '';
+                }
+            }
+        }else{
+            if(!this.scrolling){
+                this.pos.addClass('x-tab-scrolling');
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '18px';
+                    wd.style.marginRight = '18px';
+                }
+            }
+            tw -= wrap.getMargins('lr');
+            wrap.setWidth(tw > 20 ? tw : 20);
+            if(!this.scrolling){
+                if(!this.scrollLeft){
+                    this.createScrollers();
+                }else{
+                    this.scrollLeft.show();
+                    this.scrollRight.show();
+                }
+            }
+            this.scrolling = true;
+            if(pos > (l-tw)){ // ensure it stays within bounds
+                wd.scrollLeft = l-tw;
+            }else{ // otherwise, make sure the active tab is still visible
+                this.scrollToTab(this.activeTab, false);
+            }
+            this.updateScrollButtons();
+        }
+    },
+
+    // private
+    createScrollers : function(){
+        this.pos.addClass('x-tab-scrolling-' + this.tabPosition);
+        var h = this.stripWrap.dom.offsetHeight;
+
+        // left
+        var sl = this.pos.insertFirst({
+            cls:'x-tab-scroller-left'
+        });
+        sl.setHeight(h);
+        sl.addClassOnOver('x-tab-scroller-left-over');
+        this.leftRepeater = new Ext.util.ClickRepeater(sl, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollLeft,
+            scope: this
+        });
+        this.scrollLeft = sl;
+
+        // right
+        var sr = this.pos.insertFirst({
+            cls:'x-tab-scroller-right'
+        });
+        sr.setHeight(h);
+        sr.addClassOnOver('x-tab-scroller-right-over');
+        this.rightRepeater = new Ext.util.ClickRepeater(sr, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollRight,
+            scope: this
+        });
+        this.scrollRight = sr;
+    },
+
+    // private
+    getScrollWidth : function(){
+        return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos();
+    },
+
+    // private
+    getScrollPos : function(){
+        return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0;
+    },
+
+    // private
+    getScrollArea : function(){
+        return parseInt(this.stripWrap.dom.clientWidth, 10) || 0;
+    },
+
+    // private
+    getScrollAnim : function(){
+        return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this};
+    },
+
+    // private
+    getScrollIncrement : function(){
+        return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100);
+    },
+
+    /**
+     * Scrolls to a particular tab if tab scrolling is enabled
+     * @param {Panel} item The item to scroll to
+     * @param {Boolean} animate True to enable animations
+     */
+
+    scrollToTab : function(item, animate){
+        if(!item){ return; }
+        var el = this.getTabEl(item);
+        var pos = this.getScrollPos(), area = this.getScrollArea();
+        var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos;
+        var right = left + el.offsetWidth;
+        if(left < pos){
+            this.scrollTo(left, animate);
+        }else if(right > (pos + area)){
+            this.scrollTo(right - area, animate);
+        }
+    },
+
+    // private
+    scrollTo : function(pos, animate){
+        this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false);
+        if(!animate){
+            this.updateScrollButtons();
+        }
+    },
+
+    onWheel : function(e){
+        var d = e.getWheelDelta()*this.wheelIncrement*-1;
+        e.stopEvent();
+
+        var pos = this.getScrollPos();
+        var newpos = pos + d;
+        var sw = this.getScrollWidth()-this.getScrollArea();
+
+        var s = Math.max(0, Math.min(sw, newpos));
+        if(s != pos){
+            this.scrollTo(s, false);
+        }
+    },
+
+    // private
+    onScrollRight : function(){
+        var sw = this.getScrollWidth()-this.getScrollArea();
+        var pos = this.getScrollPos();
+        var s = Math.min(sw, pos + this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    onScrollLeft : function(){
+        var pos = this.getScrollPos();
+        var s = Math.max(0, pos - this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    updateScrollButtons : function(){
+        var pos = this.getScrollPos();
+        this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled');
+        this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('x-tab-scroller-right-disabled');
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.items){
+            this.items.each(function(item){
+                if(item && item.tabEl){
+                    Ext.get(item.tabEl).removeAllListeners();
+                    item.tabEl = null;
+                }
+            }, this);
+        }
+        if(this.strip){
+            this.strip.removeAllListeners();
+        }
+        Ext.TabPanel.superclass.beforeDestroy.apply(this);
+    }
+
+    /**
+     * @cfg {Boolean} collapsible
+     * @hide
+     */
+    /**
+     * @cfg {String} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property title
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Array} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapsed
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+});
+Ext.reg('tabpanel', Ext.TabPanel);
+
+/**
+ * See {@link #setActiveTab}. Sets the specified tab as the active tab. This method fires
+ * the {@link #beforetabchange} event which can <tt>return false</tt> to cancel the tab change.
+ * @param {String/Panel} tab The id or tab Panel to activate
+ * @method activate
+ */
+Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab;
+
+// private utility class used by TabPanel
+Ext.TabPanel.AccessStack = function(){
+    var items = [];
+    return {
+        add : function(item){
+            items.push(item);
+            if(items.length > 10){
+                items.shift();
+            }
+        },
+
+        remove : function(item){
+            var s = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                if(items[i] != item){
+                    s.push(items[i]);
+                }
+            }
+            items = s;
+        },
+
+        next : function(){
+            return items.pop();
+        }
+    };
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tabs.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig)));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()},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var f=this.tabPosition=="top"?"header":"footer";this[f].addClass("x-tab-panel-"+f+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);this.stripSpacer=b.createChild({cls:"x-tab-strip-spacer"},e);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge"});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var d=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this,{target:this});this.on("remove",this.onRemove,this,{target:this});this.mon(this.strip,"mousedown",this.onStripMouseDown,this);this.mon(this.strip,"contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.mon(this.strip,"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){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(g){this.remove(g)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b<a;b++){var e=c[b];var f=e.getAttribute("title");e.removeAttribute("title");this.add({title:f,contentEl:e})}},initTab:function(c,a){var d=this.strip.dom.childNodes[a];var e=this.getTemplateArgs(c);var b=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);Ext.fly(b).addClassOnOver("x-tab-strip-over");if(c.tabTip){Ext.fly(b).child("span.x-tab-strip-text",true).qtip=c.tabTip}c.tabEl=b;c.on("disable",this.onItemDisabled,this);c.on("enable",this.onItemEnabled,this);c.on("titlechange",this.onItemTitleChanged,this);c.on("iconchange",this.onItemIconChanged,this);c.on("beforeshow",this.onBeforeShowItem,this)},getTemplateArgs:function(b){var a=b.closable?"x-tab-strip-closable":"";if(b.disabled){a+=" x-item-disabled"}if(b.iconCls){a+=" x-tab-with-icon"}if(b.tabCls){a+=" "+b.tabCls}return{id:this.id+this.idDelimiter+b.getItemId(),text:b.title,cls:a,iconCls:b.iconCls||""}},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.destroy(Ext.get(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("iconchange",this.onItemIconChanged,this);b.un("beforeshow",this.onBeforeShowItem,this);if(b==this.activeTab){var a=this.stack.next();if(a){this.setActiveTab(a)}else{if(this.items.getCount()>0){this.setActiveTab(0)}else{this.activeTab=null}}}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}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){Ext.fly(b).child("span.x-tab-strip-text").replaceClass(c,a)}},getTabEl:function(a){return document.getElementById(this.id+this.idDelimiter+this.getComponent(a).getItemId())},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){if(this.suspendUpdates){return}if(this.resizeTabs&&this.rendered){this.autoSizeTabs()}if(this.enableTabScroll&&this.rendered){this.autoScrollTabs()}},autoSizeTabs:function(){var g=this.items.length;var b=this.tabPosition!="bottom"?"header":"footer";var c=this[b].dom.offsetWidth;var a=this[b].dom.clientWidth;if(!this.resizeTabs||g<1||!a){return}var j=Math.max(Math.min(Math.floor((a-4)/g)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=j;var l=this.strip.query("li:not([className^=x-tab-edge])");for(var e=0,h=l.length;e<h;e++){var k=l[e];var m=Ext.fly(k).child(".x-tab-strip-inner",true);var f=k.offsetWidth;var d=m.offsetWidth;m.style.width=(j-(f-d))+"px"}},adjustBodyWidth:function(a){if(this.header){this.header.setWidth(a)}if(this.footer){this.footer.setWidth(a)}return a},setActiveTab:function(c){c=this.getComponent(c);if(!c||this.fireEvent("beforetabchange",this,c,this.activeTab)===false){return}if(!this.rendered){this.activeTab=c;return}if(this.activeTab!=c){if(this.activeTab){var a=this.getTabEl(this.activeTab);if(a){Ext.fly(a).removeClass("x-tab-strip-active")}this.activeTab.fireEvent("deactivate",this.activeTab)}var b=this.getTabEl(c);Ext.fly(b).addClass("x-tab-strip-active");this.activeTab=c;this.stack.add(c);this.layout.setActiveItem(c);if(this.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(){this.pos=this.tabPosition=="bottom"?this.footer:this.header;var g=this.items.length;var d=this.pos.dom.offsetWidth;var c=this.pos.dom.clientWidth;var f=this.stripWrap;var e=f.dom;var b=e.offsetWidth;var h=this.getScrollPos();var a=this.edge.getOffsetsTo(this.stripWrap)[0]+h;if(!this.enableTabScroll||g<1||b<20){return}if(a<=c){e.scrollLeft=0;f.setWidth(c);if(this.scrolling){this.scrolling=false;this.pos.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="";e.style.marginRight=""}}}else{if(!this.scrolling){this.pos.addClass("x-tab-scrolling");if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="18px";e.style.marginRight="18px"}}c-=f.getMargins("lr");f.setWidth(c>20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(h>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.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.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e);var g=this.getScrollPos(),d=this.getScrollArea();var f=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+g;var b=f+c.offsetWidth;if(f<g){this.scrollTo(f,a)}else{if(b>(g+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(f){var g=f.getWheelDelta()*this.wheelIncrement*-1;f.stopEvent();var h=this.getScrollPos();var c=h+g;var a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=h){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")},beforeDestroy:function(){if(this.items){this.items.each(function(a){if(a&&a.tabEl){Ext.get(a.tabEl).removeAllListeners();a.tabEl=null}},this)}if(this.strip){this.strip.removeAllListeners()}Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c<b;c++){if(a[c]!=e){d.push(a[c])}}a=d},next:function(){return a.pop()}}};
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips-debug.js	(revision 625)
@@ -0,0 +1,994 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Tip
+ * @extends Ext.Panel
+ * This is the base class for {@link Ext.QuickTip} and {@link Ext.Tooltip} that provides the basic layout and
+ * positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned
+ * tips that are displayed programmatically, or it can be extended to provide custom tip implementations.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.Tip = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Boolean} closable True to render a close tool button into the tooltip header (defaults to false).
+     */
+    /**
+     * @cfg {Number} width
+     * Width in pixels of the tip (defaults to auto).  Width will be ignored if it exceeds the bounds of
+     * {@link #minWidth} or {@link #maxWidth}.  The maximum supported value is 500.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the tip in pixels (defaults to 40).
+     */
+    minWidth : 40,
+    /**
+     * @cfg {Number} maxWidth The maximum width of the tip in pixels (defaults to 300).  The maximum supported value is 500.
+     */
+    maxWidth : 300,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides").
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} defaultAlign <b>Experimental</b>. The default {@link Ext.Element#alignTo} anchor position value
+     * for this tip relative to its element of origin (defaults to "tl-bl?").
+     */
+    defaultAlign : "tl-bl?",
+    autoRender: true,
+    quickShowInterval : 250,
+
+    // private panel overrides
+    frame:true,
+    hidden:true,
+    baseCls: 'x-tip',
+    floating:{shadow:true,shim:true,useDisplay:true,constrain:false},
+    autoHeight:true,
+
+    closeAction: 'hide',
+
+    // private
+    initComponent : function(){
+        Ext.Tip.superclass.initComponent.call(this);
+        if(this.closable && !this.title){
+            this.elements += ',header';
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Tip.superclass.afterRender.call(this);
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction],
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Shows this tip at the specified XY position.  Example usage:
+     * <pre><code>
+// Show the tip at x:50 and y:100
+tip.showAt([50,100]);
+</code></pre>
+     * @param {Array} xy An array containing the x and y coordinates
+     */
+    showAt : function(xy){
+        Ext.Tip.superclass.show.call(this);
+        if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){
+            this.doAutoWidth();
+        }
+        if(this.constrainPosition){
+            xy = this.el.adjustForConstraints(xy);
+        }
+        this.setPagePosition(xy[0], xy[1]);
+    },
+
+    // protected
+    doAutoWidth : function(){
+        var bw = this.body.getTextWidth();
+        if(this.title){
+            bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
+        }
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");
+        this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
+        
+        // IE7 repaint bug on initial show
+        if(Ext.isIE7 && !this.repainted){
+            this.el.repaint();
+            this.repainted = true;
+        }
+    },
+
+    /**
+     * <b>Experimental</b>. Shows this tip at a position relative to another element using a standard {@link Ext.Element#alignTo}
+     * anchor position value.  Example usage:
+     * <pre><code>
+// Show the tip at the default position ('tl-br?')
+tip.showBy('my-el');
+
+// Show the tip's top-left corner anchored to the element's top-right corner
+tip.showBy('my-el', 'tl-tr');
+</code></pre>
+     * @param {Mixed} el An HTMLElement, Ext.Element or string id of the target element to align to
+     * @param {String} position (optional) A valid {@link Ext.Element#alignTo} anchor position (defaults to 'tl-br?' or
+     * {@link #defaultAlign} if specified).
+     */
+    showBy : function(el, pos){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign));
+    },
+
+    initDraggable : function(){
+        this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+        this.header.addClass('x-tip-draggable');
+    }
+});
+
+// private - custom Tip DD implementation
+Ext.Tip.DD = function(tip, config){
+    Ext.apply(this, config);
+    this.tip = tip;
+    Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id);
+    this.setHandleElId(tip.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(e){
+        this.tip.el.enableShadow(true);
+    }
+});/**
+ * @class Ext.ToolTip
+ * @extends Ext.Tip
+ * A standard tooltip implementation for providing additional information when hovering over a target element.
+ * @constructor
+ * Create a new Tooltip
+ * @param {Object} config The configuration options
+ */
+Ext.ToolTip = Ext.extend(Ext.Tip, {
+    /**
+     * When a Tooltip is configured with the {@link #delegate} option to cause selected child elements of the {@link #target}
+     * Element to each trigger a seperate show event, this property is set to the DOM element which triggered the show.
+     * @type DOMElement
+     * @property triggerElement
+     */
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to monitor for mouseover events to trigger
+     * showing this ToolTip.
+     */
+    /**
+     * @cfg {Boolean} autoHide True to automatically hide the tooltip after the mouse exits the target element
+     * or after the {@link #dismissDelay} has expired if set (defaults to true).  If {@link closable} = true a close
+     * tool button will be rendered into the tooltip header.
+     */
+    /**
+     * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays after the mouse enters the
+     * target element (defaults to 500)
+     */
+    showDelay: 500,
+    /**
+     * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the target element but before the
+     * tooltip actually hides (defaults to 200).  Set to 0 for the tooltip to hide immediately.
+     */
+    hideDelay: 200,
+    /**
+     * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip automatically hides (defaults to 5000).
+     * To disable automatic hiding, set dismissDelay = 0.
+     */
+    dismissDelay: 5000,
+    /**
+     * @cfg {Array} mouseOffset An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
+     */
+    /**
+     * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
+     */
+    trackMouse : false,
+    /**
+     * @cfg {Boolean} anchorToTarget True to anchor the tooltip to the target element, false to
+     * anchor it relative to the mouse coordinates (defaults to true).  When anchorToTarget is
+     * true, use {@link #defaultAlign} to control tooltip alignment to the target element.  When
+     * anchorToTarget is false, use {@link #anchorPosition} instead to control alignment.
+     */
+    anchorToTarget: true,
+    /**
+     * @cfg {Number} anchorOffset A numeric pixel value used to offset the default position of the
+     * anchor arrow (defaults to 0).  When the anchor position is on the top or bottom of the tooltip,
+     * anchorOffset will be used as a horizontal offset.  Likewise, when the anchor position is on the
+     * left or right side, anchorOffset will be used as a vertical offset.
+     */
+    anchorOffset: 0,
+    /**
+     * @cfg {String} delegate <p>Optional. A {@link Ext.DomQuery DomQuery} selector which allows selection of individual elements
+     * within the {@link #target} element to trigger showing and hiding the ToolTip as the mouse moves within the target.</p>
+     * <p>When specified, the child element of the target which caused a show event is placed into the {@link #triggerElement} property
+     * before the ToolTip is shown.</p>
+     * <p>This may be useful when a Component has regular, repeating elements in it, each of which need a Tooltip which contains
+     * information specific to that element. For example:</p><pre><code>
+var myGrid = new Ext.grid.gridPanel(gridConfig);
+myGrid.on('render', function(grid) {
+    var store = grid.getStore();  // Capture the Store.
+    var view = grid.getView();    // Capture the GridView.
+    myGrid.tip = new Ext.ToolTip({
+        target: view.mainBody,    // The overall target element.
+        delegate: '.x-grid3-row', // Each grid row causes its own seperate show and hide.
+        trackMouse: true,         // Moving within the row should not hide the tip.
+        renderTo: document.body,  // Render immediately so that tip.body can be referenced prior to the first show.
+        listeners: {              // Change content dynamically depending on which element triggered the show.
+            beforeshow: function updateTipBody(tip) {
+                var rowIndex = view.findRowIndex(tip.triggerElement);
+                tip.body.dom.innerHTML = "Over Record ID " + store.getAt(rowIndex).id;
+            }
+        }
+    });
+});</code></pre>
+     */
+
+    // private
+    targetCounter: 0,
+
+    constrainPosition: false,
+
+    // private
+    initComponent: function(){
+        Ext.ToolTip.superclass.initComponent.call(this);
+        this.lastActive = new Date();
+        this.initTarget(this.target);
+        this.origAnchor = this.anchor;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ToolTip.superclass.onRender.call(this, ct, position);
+        this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition();
+        this.anchorEl = this.el.createChild({
+            cls: 'x-tip-anchor ' + this.anchorCls
+        });
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ToolTip.superclass.afterRender.call(this);
+        this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1);
+    },
+
+    /**
+     * Binds this ToolTip to the specified element. The tooltip will be displayed when the mouse moves over the element.
+     * @param {Mixed} t The Element, HtmlElement, or ID of an element to bind to
+     */
+    initTarget : function(target){
+        var t;
+        if((t = Ext.get(target))){
+            if(this.target){
+                this.target = Ext.get(this.target);
+                this.target.un('mouseover', this.onTargetOver, this);
+                this.target.un('mouseout', this.onTargetOut, this);
+                this.target.un('mousemove', this.onMouseMove, this);
+            }
+            this.mon(t, {
+                mouseover: this.onTargetOver,
+                mouseout: this.onTargetOut,
+                mousemove: this.onMouseMove,
+                scope: this
+            });
+            this.target = t;
+        }
+        if(this.anchor){
+            this.anchorTarget = this.target;
+        }
+    },
+
+    // private
+    onMouseMove : function(e){
+        var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true;
+        if (t) {
+            this.targetXY = e.getXY();
+            if (t === this.triggerElement) {
+                if(!this.hidden && this.trackMouse){
+                    this.setPagePosition(this.getTargetXY());
+                }
+            } else {
+                this.hide();
+                this.lastActive = new Date(0);
+                this.onTargetOver(e);
+            }
+        } else if (!this.closable && this.isVisible()) {
+            this.hide();
+        }
+    },
+
+    // private
+    getTargetXY : function(){
+        if(this.anchor){
+            this.targetCounter++;
+            var offsets = this.getOffsets();
+            var xy = (this.anchorToTarget && !this.trackMouse) ?
+                this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) :
+                this.targetXY;
+
+            var dw = Ext.lib.Dom.getViewWidth()-5;
+            var dh = Ext.lib.Dom.getViewHeight()-5;
+            var scrollX = (document.documentElement.scrollLeft || document.body.scrollLeft || 0)+5;
+            var scrollY = (document.documentElement.scrollTop || document.body.scrollTop || 0)+5;
+
+            var axy = [xy[0] + offsets[0], xy[1] + offsets[1]];
+            var sz = this.getSize();
+            this.anchorEl.removeClass(this.anchorCls);
+
+            if(this.targetCounter < 2){
+                if(axy[0] < scrollX){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'l-r';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'left';
+                    return this.getTargetXY();
+                }
+                if(axy[0]+sz.width > dw){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'r-l';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'right';
+                    return this.getTargetXY();
+                }
+                if(axy[1] < scrollY){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 't-b';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'top';
+                    return this.getTargetXY();
+                }
+                if(axy[1]+sz.height > dh){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'b-t';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'bottom';
+                    return this.getTargetXY();
+                }
+            }
+
+            this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition();
+            this.anchorEl.addClass(this.anchorCls);
+            this.targetCounter = 0;
+            return axy;
+        }else{
+            var mouseOffset = this.getMouseOffset();
+            return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]];
+        }
+    },
+
+    getMouseOffset : function(){
+        var offset = this.anchor ? [0,0] : [15,18];
+        if(this.mouseOffset){
+            offset[0] += this.mouseOffset[0];
+            offset[1] += this.mouseOffset[1];
+        }
+        return offset;
+    },
+
+    // private
+    getAnchorPosition : function(){
+        if(this.anchor){
+            this.tipAnchor = this.anchor.charAt(0);
+        }else{
+            var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);
+            if(!m){
+               throw "AnchorTip.defaultAlign is invalid";
+            }
+            this.tipAnchor = m[1].charAt(0);
+        }
+
+        switch(this.tipAnchor){
+            case 't': return 'top';
+            case 'b': return 'bottom';
+            case 'r': return 'right';
+        }
+        return 'left';
+    },
+
+    // private
+    getAnchorAlign : function(){
+        switch(this.anchor){
+            case 'top'  : return 'tl-bl';
+            case 'left' : return 'tl-tr';
+            case 'right': return 'tr-tl';
+            default     : return 'bl-tl';
+        }
+    },
+
+    // private
+    getOffsets: function(){
+        var offsets, ap = this.getAnchorPosition().charAt(0);
+        if(this.anchorToTarget && !this.trackMouse){
+            switch(ap){
+                case 't':
+                    offsets = [0, 9];
+                    break;
+                case 'b':
+                    offsets = [0, -13];
+                    break;
+                case 'r':
+                    offsets = [-13, 0];
+                    break;
+                default:
+                    offsets = [9, 0];
+                    break;
+            }
+        }else{
+            switch(ap){
+                case 't':
+                    offsets = [-15-this.anchorOffset, 30];
+                    break;
+                case 'b':
+                    offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight];
+                    break;
+                case 'r':
+                    offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset];
+                    break;
+                default:
+                    offsets = [25, -13-this.anchorOffset];
+                    break;
+            }
+        }
+        var mouseOffset = this.getMouseOffset();
+        offsets[0] += mouseOffset[0];
+        offsets[1] += mouseOffset[1];
+
+        return offsets;
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        var t = e.getTarget(this.delegate);
+        if (t) {
+            this.triggerElement = t;
+            this.clearTimer('hide');
+            this.targetXY = e.getXY();
+            this.delayShow();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // private
+    delayHide : function(){
+        if(!this.hidden && !this.hideTimer){
+            this.hideTimer = this.hide.defer(this.hideDelay, this);
+        }
+    },
+
+    /**
+     * Hides this tooltip if visible.
+     */
+    hide: function(){
+        this.clearTimer('dismiss');
+        this.lastActive = new Date();
+        if(this.anchorEl){
+            this.anchorEl.hide();
+        }
+        Ext.ToolTip.superclass.hide.call(this);
+        delete this.triggerElement;
+    },
+
+    /**
+     * Shows this tooltip at the current event target XY position.
+     */
+    show : function(){
+        if(this.anchor){
+            // pre-show it off screen so that the el will have dimensions
+            // for positioning calcs when getting xy next
+            this.showAt([-1000,-1000]);
+            this.origConstrainPosition = this.constrainPosition;
+            this.constrainPosition = false;
+            this.anchor = this.origAnchor;
+        }
+        this.showAt(this.getTargetXY());
+
+        if(this.anchor){
+            this.syncAnchor();
+            this.anchorEl.show();
+            this.constrainPosition = this.origConstrainPosition;
+        }else{
+            this.anchorEl.hide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        this.lastActive = new Date();
+        this.clearTimers();
+        Ext.ToolTip.superclass.showAt.call(this, xy);
+        if(this.dismissDelay && this.autoHide !== false){
+            this.dismissTimer = this.hide.defer(this.dismissDelay, this);
+        }
+    },
+
+    // private
+    syncAnchor : function(){
+        var anchorPos, targetPos, offset;
+        switch(this.tipAnchor.charAt(0)){
+            case 't':
+                anchorPos = 'b';
+                targetPos = 'tl';
+                offset = [20+this.anchorOffset, 2];
+                break;
+            case 'r':
+                anchorPos = 'l';
+                targetPos = 'tr';
+                offset = [-2, 11+this.anchorOffset];
+                break;
+            case 'b':
+                anchorPos = 't';
+                targetPos = 'bl';
+                offset = [20+this.anchorOffset, -2];
+                break;
+            default:
+                anchorPos = 'r';
+                targetPos = 'tl';
+                offset = [2, 11+this.anchorOffset];
+                break;
+        }
+        this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset);
+    },
+
+    // private
+    setPagePosition : function(x, y){
+        Ext.ToolTip.superclass.setPagePosition.call(this, x, y);
+        if(this.anchor){
+            this.syncAnchor();
+        }
+    },
+
+    // private
+    clearTimer : function(name){
+        name = name + 'Timer';
+        clearTimeout(this[name]);
+        delete this[name];
+    },
+
+    // private
+    clearTimers : function(){
+        this.clearTimer('show');
+        this.clearTimer('dismiss');
+        this.clearTimer('hide');
+    },
+
+    // private
+    onShow : function(){
+        Ext.ToolTip.superclass.onShow.call(this);
+        Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onHide : function(){
+        Ext.ToolTip.superclass.onHide.call(this);
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onDocMouseDown : function(e){
+        if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){
+            this.disable();
+            this.enable.defer(100, this);
+        }
+    },
+
+    // private
+    onDisable : function(){
+        this.clearTimers();
+        this.hide();
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        if(this.contstrainPosition){
+            var ay = this.targetXY[1], h = this.getSize().height;
+            if(y <= ay && (y+h) >= ay){
+                y = ay-h-5;
+            }
+        }
+        return {x : x, y: y};
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+        Ext.ToolTip.superclass.onDestroy.call(this);
+    }
+});/**
+ * @class Ext.QuickTip
+ * @extends Ext.ToolTip
+ * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global
+ * {@link Ext.QuickTips} instance.  See the QuickTips class header for additional usage details and examples.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.QuickTip = Ext.extend(Ext.ToolTip, {
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document).
+     */
+    /**
+     * @cfg {Boolean} interceptTitles True to automatically use the element's DOM title value if available (defaults to false).
+     */
+    interceptTitles : false,
+
+    // private
+    tagConfig : {
+        namespace : "ext",
+        attribute : "qtip",
+        width : "qwidth",
+        target : "target",
+        title : "qtitle",
+        hide : "hide",
+        cls : "qclass",
+        align : "qalign",
+        anchor : "anchor"
+    },
+
+    // private
+    initComponent : function(){
+        this.target = this.target || Ext.getDoc();
+        this.targets = this.targets || {};
+        Ext.QuickTip.superclass.initComponent.call(this);
+    },
+
+    /**
+     * Configures a new quick tip instance and assigns it to a target element.  The following config values are
+     * supported (for example usage, see the {@link Ext.QuickTips} class header):
+     * <div class="mdetail-params"><ul>
+     * <li>autoHide</li>
+     * <li>cls</li>
+     * <li>dismissDelay (overrides the singleton value)</li>
+     * <li>target (required)</li>
+     * <li>text (required)</li>
+     * <li>title</li>
+     * <li>width</li></ul></div>
+     * @param {Object} config The config object
+     */
+    register : function(config){
+        var cs = Ext.isArray(config) ? config : arguments;
+        for(var i = 0, len = cs.length; i < len; i++){
+            var c = cs[i];
+            var target = c.target;
+            if(target){
+                if(Ext.isArray(target)){
+                    for(var j = 0, jlen = target.length; j < jlen; j++){
+                        this.targets[Ext.id(target[j])] = c;
+                    }
+                } else{
+                    this.targets[Ext.id(target)] = c;
+                }
+            }
+        }
+    },
+
+    /**
+     * Removes this quick tip from its element and destroys it.
+     * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+     */
+    unregister : function(el){
+        delete this.targets[Ext.id(el)];
+    },
+    
+    /**
+     * Hides a visible tip or cancels an impending show for a particular element.
+     * @param {String/HTMLElement/Element} el The element that is the target of the tip.
+     */
+    cancelShow: function(el){
+        var at = this.activeTarget;
+        el = Ext.get(el).dom;
+        if(this.isVisible()){
+            if(at && at.el == el){
+                this.hide();
+            }
+        }else if(at && at.el == el){
+            this.clearTimer('show');
+        }
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled){
+            return;
+        }
+        this.targetXY = e.getXY();
+        var t = e.getTarget();
+        if(!t || t.nodeType !== 1 || t == document || t == document.body){
+            return;
+        }
+        if(this.activeTarget && t == this.activeTarget.el){
+            this.clearTimer('hide');
+            this.show();
+            return;
+        }
+        if(t && this.targets[t.id]){
+            this.activeTarget = this.targets[t.id];
+            this.activeTarget.el = t;
+            this.anchor = this.activeTarget.anchor;
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+            return;
+        }
+        
+        var ttp, et = Ext.fly(t), cfg = this.tagConfig;
+        var ns = cfg.namespace;
+        if(this.interceptTitles && t.title){
+            ttp = t.title;
+            t.qtip = ttp;
+            t.removeAttribute("title");
+            e.preventDefault();
+        } else{
+            ttp = t.qtip || et.getAttribute(cfg.attribute, ns);
+        }
+        if(ttp){
+            var autoHide = et.getAttribute(cfg.hide, ns);
+            this.activeTarget = {
+                el: t,
+                text: ttp,
+                width: et.getAttribute(cfg.width, ns),
+                autoHide: autoHide != "user" && autoHide !== 'false',
+                title: et.getAttribute(cfg.title, ns),
+                cls: et.getAttribute(cfg.cls, ns),
+                align: et.getAttribute(cfg.align, ns)
+                
+            };
+            this.anchor = et.getAttribute(cfg.anchor, ns);
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        var t = this.activeTarget;
+        if(t){
+            if(!this.rendered){
+                this.render(Ext.getBody());
+                this.activeTarget = t;
+            }
+            if(t.width){
+                this.setWidth(t.width);
+                this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth()));
+                this.measureWidth = false;
+            } else{
+                this.measureWidth = true;
+            }
+            this.setTitle(t.title || '');
+            this.body.update(t.text);
+            this.autoHide = t.autoHide;
+            this.dismissDelay = t.dismissDelay || this.dismissDelay;
+            if(this.lastCls){
+                this.el.removeClass(this.lastCls);
+                delete this.lastCls;
+            }
+            if(t.cls){
+                this.el.addClass(t.cls);
+                this.lastCls = t.cls;
+            }
+            if(this.anchor){
+                this.constrainPosition = false;
+            }else if(t.align){ // TODO: this doesn't seem to work consistently
+                xy = this.el.getAlignToXY(t.el, t.align);
+                this.constrainPosition = false;
+            }else{
+                this.constrainPosition = true;
+            }
+        }
+        Ext.QuickTip.superclass.showAt.call(this, xy);
+    },
+
+    // inherit docs
+    hide: function(){
+        delete this.activeTarget;
+        Ext.QuickTip.superclass.hide.call(this);
+    }
+});/**
+ * @class Ext.QuickTips
+ * <p>Provides attractive and customizable tooltips for any element. The QuickTips
+ * singleton is used to configure and manage tooltips globally for multiple elements
+ * in a generic manner.  To create individual tooltips with maximum customizability,
+ * you should consider either {@link Ext.Tip} or {@link Ext.ToolTip}.</p>
+ * <p>Quicktips can be configured via tag attributes directly in markup, or by
+ * registering quick tips programmatically via the {@link #register} method.</p>
+ * <p>The singleton's instance of {@link Ext.QuickTip} is available via
+ * {@link #getQuickTip}, and supports all the methods, and all the all the
+ * configuration properties of Ext.QuickTip. These settings will apply to all
+ * tooltips shown by the singleton.</p>
+ * <p>Below is the summary of the configuration properties which can be used.
+ * For detailed descriptions see {@link #getQuickTip}</p>
+ * <p><b>QuickTips singleton configs (all are optional)</b></p>
+ * <div class="mdetail-params"><ul><li>dismissDelay</li>
+ * <li>hideDelay</li>
+ * <li>maxWidth</li>
+ * <li>minWidth</li>
+ * <li>showDelay</li>
+ * <li>trackMouse</li></ul></div>
+ * <p><b>Target element configs (optional unless otherwise noted)</b></p>
+ * <div class="mdetail-params"><ul><li>autoHide</li>
+ * <li>cls</li>
+ * <li>dismissDelay (overrides singleton value)</li>
+ * <li>target (required)</li>
+ * <li>text (required)</li>
+ * <li>title</li>
+ * <li>width</li></ul></div>
+ * <p>Here is an example showing how some of these config options could be used:</p>
+ * <pre><code>
+// Init the singleton.  Any tag-based quick tips will start working.
+Ext.QuickTips.init();
+
+// Apply a set of config properties to the singleton
+Ext.apply(Ext.QuickTips.getQuickTip(), {
+    maxWidth: 200,
+    minWidth: 100,
+    showDelay: 50,
+    trackMouse: true
+});
+
+// Manually register a quick tip for a specific element
+Ext.QuickTips.register({
+    target: 'my-div',
+    title: 'My Tooltip',
+    text: 'This tooltip was added in code',
+    width: 100,
+    dismissDelay: 20
+});
+</code></pre>
+ * <p>To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with
+ * the <b>ext:</b> namespace.  The HTML element itself is automatically set as the quick tip target. Here is the summary
+ * of supported attributes (optional unless otherwise noted):</p>
+ * <ul><li><b>hide</b>: Specifying "user" is equivalent to setting autoHide = false.  Any other value will be the
+ * same as autoHide = true.</li>
+ * <li><b>qclass</b>: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).</li>
+ * <li><b>qtip (required)</b>: The quick tip text (equivalent to the 'text' target element config).</li>
+ * <li><b>qtitle</b>: The quick tip title (equivalent to the 'title' target element config).</li>
+ * <li><b>qwidth</b>: The quick tip width (equivalent to the 'width' target element config).</li></ul>
+ * <p>Here is an example of configuring an HTML element to display a tooltip from markup:</p>
+ * <pre><code>
+// Add a quick tip to an HTML button
+&lt;input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
+     ext:qtip="This is a quick tip from markup!">&lt;/input>
+</code></pre>
+ * @singleton
+ */
+Ext.QuickTips = function(){
+    var tip, locks = [];
+    return {
+        /**
+         * Initialize the global QuickTips instance and prepare any quick tips.
+         * @param {Boolean} autoRender True to render the QuickTips container immediately to preload images. (Defaults to true) 
+         */
+        init : function(autoRender){
+            if(!tip){
+                if(!Ext.isReady){
+                    Ext.onReady(function(){
+                        Ext.QuickTips.init(autoRender);
+                    });
+                    return;
+                }
+                tip = new Ext.QuickTip({elements:'header,body'});
+                if(autoRender !== false){
+                    tip.render(Ext.getBody());
+                }
+            }
+        },
+
+        /**
+         * Enable quick tips globally.
+         */
+        enable : function(){
+            if(tip){
+                locks.pop();
+                if(locks.length < 1){
+                    tip.enable();
+                }
+            }
+        },
+
+        /**
+         * Disable quick tips globally.
+         */
+        disable : function(){
+            if(tip){
+                tip.disable();
+            }
+            locks.push(1);
+        },
+
+        /**
+         * Returns true if quick tips are enabled, else false.
+         * @return {Boolean}
+         */
+        isEnabled : function(){
+            return tip !== undefined && !tip.disabled;
+        },
+
+        /**
+         * Gets the global QuickTips instance.
+         */
+        getQuickTip : function(){
+            return tip;
+        },
+
+        /**
+         * Configures a new quick tip instance and assigns it to a target element.  See
+         * {@link Ext.QuickTip#register} for details.
+         * @param {Object} config The config object
+         */
+        register : function(){
+            tip.register.apply(tip, arguments);
+        },
+
+        /**
+         * Removes any registered quick tip from the target element and destroys it.
+         * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+         */
+        unregister : function(){
+            tip.unregister.apply(tip, arguments);
+        },
+
+        /**
+         * Alias of {@link #register}.
+         * @param {Object} config The config object
+         */
+        tips :function(){
+            tip.register.apply(tip, arguments);
+        }
+    }
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tips.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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,closeAction:"hide",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[this.closeAction],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,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1)},initTarget:function(b){var a;if((a=Ext.get(b))){if(this.target){this.target=Ext.get(this.target);this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.anchor){this.targetCounter++;var c=this.getOffsets();var i=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY;var a=Ext.lib.Dom.getViewWidth()-5;var f=Ext.lib.Dom.getViewHeight()-5;var h=(document.documentElement.scrollLeft||document.body.scrollLeft||0)+5;var g=(document.documentElement.scrollTop||document.body.scrollTop||0)+5;var b=[i[0]+c[0],i[1]+c[1]];var e=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]<h){if(this.anchorToTarget){this.defaultAlign="l-r";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="left";return this.getTargetXY()}if(b[0]+e.width>a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]<g){if(this.anchorToTarget){this.defaultAlign="t-b";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="top";return this.getTargetXY()}if(b[1]+e.height>f){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.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();if(this.anchorEl){this.anchorEl.hide()}Ext.ToolTip.superclass.hide.call(this);delete this.triggerElement},show:function(){if(this.anchor){this.showAt([-1000,-1000]);this.origConstrainPosition=this.constrainPosition;this.constrainPosition=false;this.anchor=this.origAnchor}this.showAt(this.getTargetXY());if(this.anchor){this.syncAnchor();this.anchorEl.show();this.constrainPosition=this.origConstrainPosition}else{this.anchorEl.hide()}},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)}},syncAnchor:function(){var a,b,c;switch(this.tipAnchor.charAt(0)){case"t":a="b";b="tl";c=[20+this.anchorOffset,2];break;case"r":a="l";b="tr";c=[-2,11+this.anchorOffset];break;case"b":a="t";b="bl";c=[20+this.anchorOffset,-2];break;default:a="r";b="tl";c=[2,11+this.anchorOffset];break}this.anchorEl.alignTo(this.el,a+"-"+b,c)},setPagePosition:function(a,b){Ext.ToolTip.superclass.setPagePosition.call(this,a,b);if(this.anchor){this.syncAnchor()}},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!==true&&!this.closable&&!a.within(this.el.dom)){this.disable();this.enable.defer(100,this)}},onDisable:function(){this.clearTimers();this.hide()},adjustPosition:function(a,d){if(this.contstrainPosition){var c=this.targetXY[1],b=this.getSize().height;if(d<=c&&(d+b)>=c){d=c-b-5}}return{x:a,y:d}},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(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",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var g=Ext.isArray(e)?e:arguments;for(var f=0,a=g.length;f<a;f++){var k=g[f];var h=k.target;if(h){if(Ext.isArray(h)){for(var d=0,b=h.length;d<b;d++){this.targets[Ext.id(h[d])]=k}}else{this.targets[Ext.id(h)]=k}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(b){var a=this.activeTarget;b=Ext.get(b).dom;if(this.isVisible()){if(a&&a.el==b){this.hide()}}else{if(a&&a.el==b){this.clearTimer("show")}}},onTargetOver:function(h){if(this.disabled){return}this.targetXY=h.getXY();var c=h.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.anchor=this.activeTarget.anchor;if(this.anchor){this.anchorTarget=c}this.delayShow();return}var f,g=Ext.fly(c),b=this.tagConfig;var d=b.namespace;if(this.interceptTitles&&c.title){f=c.title;c.qtip=f;c.removeAttribute("title");h.preventDefault()}else{f=c.qtip||g.getAttribute(b.attribute,d)}if(f){var a=g.getAttribute(b.hide,d);this.activeTarget={el:c,text:f,width:g.getAttribute(b.width,d),autoHide:a!="user"&&a!=="false",title:g.getAttribute(b.title,d),cls:g.getAttribute(b.cls,d),align:g.getAttribute(b.align,d)};this.anchor=g.getAttribute(b.anchor,d);if(this.anchor){this.anchorTarget=c}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(this.anchor){this.constrainPosition=false}else{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)}}}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars-debug.js	(revision 625)
@@ -0,0 +1,1374 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.ToolbarLayout
+ * @extends Ext.layout.ContainerLayout
+ * Layout manager implicitly used by Ext.Toolbar.
+ */
+Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize : true,
+    triggerWidth : 18,
+    lastOverflow : false,
+
+    noItemsMenuText : '<div class="x-toolbar-no-items">(None)</div>',
+    // private
+    onLayout : function(ct, target){
+        if(!this.leftTr){
+            target.addClass('x-toolbar-layout-ct');
+            target.insertHtml('beforeEnd',
+                 '<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');
+            this.leftTr = target.child('tr.x-toolbar-left-row', true);
+            this.rightTr = target.child('tr.x-toolbar-right-row', true);
+            this.extrasTr = target.child('tr.x-toolbar-extras-row', true);
+        }
+        var side = this.leftTr;
+        var pos = 0;
+
+        var items = ct.items.items;
+        for(var i = 0, len = items.length, c; i < len; i++, pos++) {
+            c = items[i];
+            if(c.isFill){
+                side = this.rightTr;
+                pos = -1;
+            }else if(!c.rendered){
+                c.render(this.insertCell(c, side, pos));
+            }else{
+                if(!c.xtbHidden && !this.isValidParent(c, side.childNodes[pos])){
+                    var td = this.insertCell(c, side, pos);
+                    td.appendChild(c.getDomPositionEl().dom);
+                    c.container = Ext.get(td);
+                }
+            }
+        }
+        //strip extra empty cells
+        this.cleanup(this.leftTr);
+        this.cleanup(this.rightTr);
+        this.cleanup(this.extrasTr);
+        this.fitToSize(target);
+    },
+
+    cleanup : function(row){
+        var cn = row.childNodes;
+        for(var i = cn.length-1, c; i >= 0 && (c = cn[i]); i--){
+            if(!c.firstChild){
+                row.removeChild(c);
+            }
+        }
+    },
+
+    insertCell : function(c, side, pos){
+        var td = document.createElement('td');
+        td.className='x-toolbar-cell';
+        side.insertBefore(td, side.childNodes[pos]||null);
+        return td;
+    },
+
+    hideItem : function(item){
+        var h = (this.hiddens = this.hiddens || []);
+        h.push(item);
+        item.xtbHidden = true;
+        item.xtbWidth = item.getDomPositionEl().dom.parentNode.offsetWidth;
+        item.hide();
+    },
+
+    unhideItem : function(item){
+        item.show();
+        item.xtbHidden = false;
+        this.hiddens.remove(item);
+        if(this.hiddens.length < 1){
+            delete this.hiddens;
+        }
+    },
+
+    getItemWidth : function(c){
+        return c.hidden ? (c.xtbWidth || 0) : c.getDomPositionEl().dom.parentNode.offsetWidth;
+    },
+
+    fitToSize : function(t){
+        if(this.container.enableOverflow === false){
+            return;
+        }
+        var w = t.dom.clientWidth;
+        var lw = this.lastWidth || 0;
+        this.lastWidth = w;
+        var iw = t.dom.firstChild.offsetWidth;
+
+        var clipWidth = w - this.triggerWidth;
+        var hideIndex = -1;
+
+        if(iw > w || (this.hiddens && w >= lw)){
+            var i, items = this.container.items.items, len = items.length, c;
+            var loopWidth = 0;
+            for(i = 0; i < len; i++) {
+                c = items[i];
+                if(!c.isFill){
+                    loopWidth += this.getItemWidth(c);
+                    if(loopWidth > clipWidth){
+                        if(!c.xtbHidden){
+                            this.hideItem(c);
+                        }
+                    }else{
+                        if(c.xtbHidden){
+                            this.unhideItem(c);
+                        }
+                    }
+                }
+            }
+        }
+        if(this.hiddens){
+            this.initMore();
+            if(!this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, true);
+                this.lastOverflow = true;
+            }
+        }else if(this.more){
+            this.clearMenu();
+            this.more.destroy();
+            delete this.more;
+            if(this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, false);
+                this.lastOverflow = false;
+            }
+        }
+    },
+
+    createMenuConfig : function(c, hideOnClick){
+        var cfg = Ext.apply({}, c.initialConfig),
+            group = c.toggleGroup;
+
+        Ext.apply(cfg, {
+            text: c.overflowText || c.text,
+            iconCls: c.iconCls,
+            icon: c.icon,
+            itemId: c.itemId,
+            disabled: c.disabled,
+            handler: c.handler,
+            scope: c.scope,
+            menu: c.menu,
+            hideOnClick: hideOnClick
+        });
+        if(group || c.enableToggle){
+            Ext.apply(cfg, {
+                group: group,
+                checked: c.pressed,
+                listeners: {
+                    checkchange: function(item, checked){
+                        c.toggle(checked);
+                    }
+                }
+            });
+        }
+        delete cfg.xtype;
+        delete cfg.id;
+        return cfg;
+    },
+
+    // private
+    addComponentToMenu : function(m, c){
+        if(c instanceof Ext.Toolbar.Separator){
+            m.add('-');
+        }else if(Ext.isFunction(c.isXType)){
+            if(c.isXType('splitbutton')){
+                m.add(this.createMenuConfig(c, true));
+            }else if(c.isXType('button')){
+                m.add(this.createMenuConfig(c, !c.menu));
+            }else if(c.isXType('buttongroup')){
+                c.items.each(function(item){
+                     this.addComponentToMenu(m, item);
+                }, this);
+            }
+        }
+    },
+
+    clearMenu : function(){
+        var m = this.moreMenu;
+        if(m && m.items){
+            this.moreMenu.items.each(function(item){
+                delete item.menu;
+            });
+        }
+    },
+
+    // private
+    beforeMoreShow : function(m){
+        var h = this.container.items.items,
+            len = h.length,
+            c,
+            prev,
+            needsSep = function(group, item){
+                return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator);
+            };
+
+        this.clearMenu();
+        m.removeAll();
+        for(var i = 0; i < len; i++){
+            c = h[i];
+            if(c.xtbHidden){
+                if(prev && (needsSep(c, prev) || needsSep(prev, c))){
+                    m.add('-');
+                }
+                this.addComponentToMenu(m, c);
+                prev = c;
+            }
+        }
+        // put something so the menu isn't empty
+        // if no compatible items found
+        if(m.items.length < 1){
+            m.add(this.noItemsMenuText);
+        }
+    },
+
+    initMore : function(){
+        if(!this.more){
+            this.moreMenu = new Ext.menu.Menu({
+                listeners: {
+                    beforeshow: this.beforeMoreShow,
+                    scope: this
+                }
+            });
+            this.more = new Ext.Button({
+                iconCls: 'x-toolbar-more-icon',
+                cls: 'x-toolbar-more',
+                menu: this.moreMenu
+            });
+            var td = this.insertCell(this.more, this.extrasTr, 100);
+            this.more.render(td);
+        }
+    },
+
+    destroy : function(){
+        Ext.destroy(this.more, this.moreMenu);
+        Ext.layout.ToolbarLayout.superclass.destroy.call(this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
+
+/**
+ * @class Ext.Toolbar
+ * @extends Ext.Container
+ * <p>Basic Toolbar class. Although the <tt>{@link Ext.Container#defaultType defaultType}</tt> for Toolbar
+ * is <tt>{@link Ext.Button button}</tt>, Toolbar elements (child items for the Toolbar container) may
+ * be virtually any type of Component. Toolbar elements can be created explicitly via their constructors,
+ * or implicitly via their xtypes, and can be <tt>{@link #add}</tt>ed dynamically.</p>
+ * <p>Some items have shortcut strings for creation:</p>
+ * <pre>
+<u>Shortcut</u>  <u>xtype</u>          <u>Class</u>                  <u>Description</u>
+'->'      'tbfill'       {@link Ext.Toolbar.Fill}       begin using the right-justified button container
+'-'       'tbseparator'  {@link Ext.Toolbar.Separator}  add a vertical separator bar between toolbar items
+' '       'tbspacer'     {@link Ext.Toolbar.Spacer}     add horiztonal space between elements
+ * </pre>
+ *
+ * Example usage of various elements:
+ * <pre><code>
+var tb = new Ext.Toolbar({
+    renderTo: document.body,
+    width: 600,
+    height: 100,
+    items: [
+        {
+            // xtype: 'button', // default for Toolbars, same as 'tbbutton'
+            text: 'Button'
+        },
+        {
+            xtype: 'splitbutton', // same as 'tbsplitbutton'
+            text: 'Split Button'
+        },
+        // begin using the right-justified button container
+        '->', // same as {xtype: 'tbfill'}, // Ext.Toolbar.Fill
+        {
+            xtype: 'textfield',
+            name: 'field1',
+            emptyText: 'enter search term'
+        },
+        // add a vertical separator bar between toolbar items
+        '-', // same as {xtype: 'tbseparator'} to create Ext.Toolbar.Separator
+        'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.Toolbar.TextItem
+        {xtype: 'tbspacer'},// same as ' ' to create Ext.Toolbar.Spacer
+        'text 2',
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'text 3'
+    ]
+});
+ * </code></pre>
+ * Example adding a ComboBox within a menu of a button:
+ * <pre><code>
+// ComboBox creation
+var combo = new Ext.form.ComboBox({
+    store: new Ext.data.ArrayStore({
+        autoDestroy: true,
+        fields: ['initials', 'fullname'],
+        data : [
+            ['FF', 'Fred Flintstone'],
+            ['BR', 'Barney Rubble']
+        ]
+    }),
+    displayField: 'fullname',
+    typeAhead: true,
+    mode: 'local',
+    forceSelection: true,
+    triggerAction: 'all',
+    emptyText: 'Select a name...',
+    selectOnFocus: true,
+    width: 135,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon' //use iconCls if placing within menu to shift to right side of menu
+});
+
+// put ComboBox in a Menu
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+
+// add a Button with the menu
+tb.add({
+        text:'Button w/ Menu',
+        menu: menu  // assign menu by instance
+    });
+tb.doLayout();
+ * </code></pre>
+ * @constructor
+ * Creates a new Toolbar
+ * @param {Object/Array} config A config object or an array of buttons to <tt>{@link #add}</tt>
+ * @xtype toolbar
+ */
+Ext.Toolbar = function(config){
+    if(Ext.isArray(config)){
+        config = {items: config, layout: 'toolbar'};
+    } else {
+        config = Ext.apply({
+            layout: 'toolbar'
+        }, config);
+        if(config.buttons) {
+            config.items = config.buttons;
+        }
+    }
+    Ext.Toolbar.superclass.constructor.call(this, config);
+};
+
+(function(){
+
+var T = Ext.Toolbar;
+
+Ext.extend(T, Ext.Container, {
+
+    defaultType: 'button',
+
+    trackMenus : true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+    toolbarCls: 'x-toolbar',
+
+    initComponent : function(){
+        T.superclass.initComponent.call(this);
+
+        /**
+         * @event overflowchange
+         * Fires after the overflow state has changed.
+         * @param {Object} c The Container
+         * @param {Boolean} lastOverflow overflow state
+         */
+        this.addEvents('overflowchange');
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            if(!this.autoCreate){
+                this.autoCreate = {
+                    cls: this.toolbarCls + ' x-small-editor'
+                };
+            }
+            this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position);
+        }
+    },
+
+    /**
+     * Adds element(s) to the toolbar -- this function takes a variable number of
+     * arguments of mixed type and adds them to the toolbar.
+     * @param {Mixed} arg1 The following types of arguments are all valid:<br />
+     * <ul>
+     * <li>{@link Ext.Button} config: A valid button config object (equivalent to {@link #addButton})</li>
+     * <li>HtmlElement: Any standard HTML element (equivalent to {@link #addElement})</li>
+     * <li>Field: Any form field (equivalent to {@link #addField})</li>
+     * <li>Item: Any subclass of {@link Ext.Toolbar.Item} (equivalent to {@link #addItem})</li>
+     * <li>String: Any generic string (gets wrapped in a {@link Ext.Toolbar.TextItem}, equivalent to {@link #addText}).
+     * Note that there are a few special strings that are treated differently as explained next.</li>
+     * <li>'-': Creates a separator element (equivalent to {@link #addSeparator})</li>
+     * <li>' ': Creates a spacer element (equivalent to {@link #addSpacer})</li>
+     * <li>'->': Creates a fill element (equivalent to {@link #addFill})</li>
+     * </ul>
+     * @param {Mixed} arg2
+     * @param {Mixed} etc.
+     * @method add
+     */
+
+    // private
+    lookupComponent : function(c){
+        if(Ext.isString(c)){
+            if(c == '-'){
+                c = new T.Separator();
+            }else if(c == ' '){
+                c = new T.Spacer();
+            }else if(c == '->'){
+                c = new T.Fill();
+            }else{
+                c = new T.TextItem(c);
+            }
+            this.applyDefaults(c);
+        }else{
+            if(c.isFormField || c.render){ // some kind of form field, some kind of Toolbar.Item
+                c = this.constructItem(c);
+            }else if(c.tag){ // DomHelper spec
+                c = new T.Item({autoEl: c});
+            }else if(c.tagName){ // element
+                c = new T.Item({el:c});
+            }else if(Ext.isObject(c)){ // must be button config?
+                c = c.xtype ? this.constructItem(c) : this.constructButton(c);
+            }
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.Toolbar.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(c.events){
+                Ext.applyIf(c.initialConfig, d);
+                Ext.apply(c, d);
+            }else{
+                Ext.applyIf(c, d);
+            }
+        }
+        return c;
+    },
+
+    // private
+    constructItem : function(item, type){
+        return Ext.create(item, type || this.defaultType);
+    },
+
+    /**
+     * Adds a separator
+     * @return {Ext.Toolbar.Item} The separator {@link Ext.Toolbar.Item item}
+     */
+    addSeparator : function(){
+        return this.add(new T.Separator());
+    },
+
+    /**
+     * Adds a spacer element
+     * @return {Ext.Toolbar.Spacer} The spacer item
+     */
+    addSpacer : function(){
+        return this.add(new T.Spacer());
+    },
+
+    /**
+     * Forces subsequent additions into the float:right toolbar
+     */
+    addFill : function(){
+        this.add(new T.Fill());
+    },
+
+    /**
+     * Adds any standard HTML element to the toolbar
+     * @param {Mixed} el The element or id of the element to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addElement : function(el){
+        return this.addItem(new T.Item({el:el}));
+    },
+
+    /**
+     * Adds any Toolbar.Item or subclass
+     * @param {Ext.Toolbar.Item} item
+     * @return {Ext.Toolbar.Item} The item
+     */
+    addItem : function(item){
+        return Ext.Toolbar.superclass.add.apply(this, arguments);
+    },
+
+    /**
+     * Adds a button (or buttons). See {@link Ext.Button} for more info on the config.
+     * @param {Object/Array} config A button config or array of configs
+     * @return {Ext.Button/Array}
+     */
+    addButton : function(config){
+        if(Ext.isArray(config)){
+            var buttons = [];
+            for(var i = 0, len = config.length; i < len; i++) {
+                buttons.push(this.addButton(config[i]));
+            }
+            return buttons;
+        }
+        return this.add(this.constructButton(config));
+    },
+
+    /**
+     * Adds text to the toolbar
+     * @param {String} text The text to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addText : function(text){
+        return this.addItem(new T.TextItem(text));
+    },
+
+    /**
+     * Adds a new element to the toolbar from the passed {@link Ext.DomHelper} config
+     * @param {Object} config
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addDom : function(config){
+        return this.add(new T.Item({autoEl: config}));
+    },
+
+    /**
+     * Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
+     * been rendered yet. For a field that has already been rendered, use {@link #addElement}.
+     * @param {Ext.form.Field} field
+     * @return {Ext.Toolbar.Item}
+     */
+    addField : function(field){
+        return this.add(field);
+    },
+
+    /**
+     * Inserts any {@link Ext.Toolbar.Item}/{@link Ext.Button} at the specified index.
+     * @param {Number} index The index where the item is to be inserted
+     * @param {Object/Ext.Toolbar.Item/Ext.Button/Array} item The button, or button config object to be
+     * inserted, or an array of buttons/configs.
+     * @return {Ext.Button/Item}
+     */
+    insertButton : function(index, item){
+        if(Ext.isArray(item)){
+            var buttons = [];
+            for(var i = 0, len = item.length; i < len; i++) {
+               buttons.push(this.insertButton(index + i, item[i]));
+            }
+            return buttons;
+        }
+        return Ext.Toolbar.superclass.insert.call(this, index, item);
+    },
+
+    // private
+    initMenuTracking : function(item){
+        if(this.trackMenus && item.menu){
+            this.mon(item, {
+                'menutriggerover' : this.onButtonTriggerOver,
+                'menushow' : this.onButtonMenuShow,
+                'menuhide' : this.onButtonMenuHide,
+                scope: this
+            });
+        }
+    },
+
+    // private
+    constructButton : function(item){
+        var b = item.events ? item : this.constructItem(item, item.split ? 'splitbutton' : this.defaultType);
+        this.initMenuTracking(b);
+        return b;
+    },
+
+    // private
+    onDisable : function(){
+        this.items.each(function(item){
+             if(item.disable){
+                 item.disable();
+             }
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.items.each(function(item){
+             if(item.enable){
+                 item.enable();
+             }
+        });
+    },
+
+    // private
+    onButtonTriggerOver : function(btn){
+        if(this.activeMenuBtn && this.activeMenuBtn != btn){
+            this.activeMenuBtn.hideMenu();
+            btn.showMenu();
+            this.activeMenuBtn = btn;
+        }
+    },
+
+    // private
+    onButtonMenuShow : function(btn){
+        this.activeMenuBtn = btn;
+    },
+
+    // private
+    onButtonMenuHide : function(btn){
+        delete this.activeMenuBtn;
+    }
+});
+Ext.reg('toolbar', Ext.Toolbar);
+
+/**
+ * @class Ext.Toolbar.Item
+ * @extends Ext.BoxComponent
+ * The base class that other non-interacting Toolbar Item classes should extend in order to
+ * get some basic common toolbar item functionality.
+ * @constructor
+ * Creates a new Item
+ * @param {HTMLElement} el
+ * @xtype tbitem
+ */
+T.Item = Ext.extend(Ext.BoxComponent, {
+    hideParent: true, //  Hiding a Toolbar.Item hides its containing TD
+    enable:Ext.emptyFn,
+    disable:Ext.emptyFn,
+    focus:Ext.emptyFn
+    /**
+     * @cfg {String} overflowText Text to be used for the menu if the item is overflowed.
+     */
+});
+Ext.reg('tbitem', T.Item);
+
+/**
+ * @class Ext.Toolbar.Separator
+ * @extends Ext.Toolbar.Item
+ * A simple class that adds a vertical separator bar between toolbar items
+ * (css class:<tt>'xtb-sep'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbseparator'}, // or '-'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Separator
+ * @xtype tbseparator
+ */
+T.Separator = Ext.extend(T.Item, {
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position);
+    }
+});
+Ext.reg('tbseparator', T.Separator);
+
+/**
+ * @class Ext.Toolbar.Spacer
+ * @extends Ext.Toolbar.Item
+ * A simple element that adds extra horizontal space between items in a toolbar.
+ * By default a 2px wide space is added via css specification:<pre><code>
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+ * </code></pre>
+ * <p>Example usage:</p>
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbspacer'}, // or ' '
+        'Item 2',
+        // space width is also configurable via javascript
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'Item 3'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Spacer
+ * @xtype tbspacer
+ */
+T.Spacer = Ext.extend(T.Item, {
+    /**
+     * @cfg {Number} width
+     * The width of the spacer in pixels (defaults to 2px via css style <tt>.x-toolbar .xtb-spacer</tt>).
+     */
+
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position);
+    }
+});
+Ext.reg('tbspacer', T.Spacer);
+
+/**
+ * @class Ext.Toolbar.Fill
+ * @extends Ext.Toolbar.Spacer
+ * A non-rendering placeholder item which instructs the Toolbar's Layout to begin using
+ * the right-justified button container.
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbfill'}, // or '->'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Fill
+ * @xtype tbfill
+ */
+T.Fill = Ext.extend(T.Item, {
+    // private
+    render : Ext.emptyFn,
+    isFill : true
+});
+Ext.reg('tbfill', T.Fill);
+
+/**
+ * @class Ext.Toolbar.TextItem
+ * @extends Ext.Toolbar.Item
+ * A simple class that renders text directly into a toolbar
+ * (with css class:<tt>'xtb-text'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new TextItem
+ * @param {String/Object} text A text string, or a config object containing a <tt>text</tt> property
+ * @xtype tbtext
+ */
+T.TextItem = Ext.extend(T.Item, {
+    constructor: function(config){
+        if (Ext.isString(config)) {
+            config = { autoEl: {cls: 'xtb-text', html: config }};
+        } else {
+            config.autoEl = {cls: 'xtb-text', html: config.text || ''};
+        }
+        T.TextItem.superclass.constructor.call(this, config);
+    },
+    /**
+     * Updates this item's text, setting the text to be used as innerHTML.
+     * @param {String} t The text to display (html accepted).
+     */
+    setText : function(t) {
+        if (this.rendered) {
+            this.el.dom.innerHTML = t;
+        } else {
+            this.autoEl.html = t;
+        }
+    }
+});
+Ext.reg('tbtext', T.TextItem);
+
+// backwards compat
+T.Button = Ext.extend(Ext.Button, {});
+T.SplitButton = Ext.extend(Ext.SplitButton, {});
+Ext.reg('tbbutton', T.Button);
+Ext.reg('tbsplit', T.SplitButton);
+
+})();
+/**
+ * @class Ext.ButtonGroup
+ * @extends Ext.Panel
+ * Container for a group of buttons. Example usage:
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Panel with Button Group',
+    width: 300,
+    height:200,
+    renderTo: document.body,
+    html: 'whatever',
+    tbar: [{
+        xtype: 'buttongroup',
+        {@link #columns}: 3,
+        title: 'Clipboard',
+        items: [{
+            text: 'Paste',
+            scale: 'large',
+            rowspan: 3, iconCls: 'add',
+            iconAlign: 'top',
+            cls: 'x-btn-as-arrow'
+        },{
+            xtype:'splitbutton',
+            text: 'Menu Button',
+            scale: 'large',
+            rowspan: 3,
+            iconCls: 'add',
+            iconAlign: 'top',
+            arrowAlign:'bottom',
+            menu: [{text: 'Menu Item 1'}]
+        },{
+            xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+        },{
+            text: 'Copy', iconCls: 'add16'
+        },{
+            text: 'Format', iconCls: 'add16'
+        }]
+    }]
+});
+ * </code></pre>
+ * @xtype buttongroup
+ */
+Ext.ButtonGroup = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} columns The <tt>columns</tt> configuration property passed to the
+     * {@link #layout configured layout manager}. See {@link Ext.layout.TableLayout#columns}.
+     */
+    /**
+     * @cfg {String} baseCls  Defaults to <tt>'x-btn-group'</tt>.  See {@link Ext.Panel#baseCls}.
+     */
+    baseCls: 'x-btn-group',
+    /**
+     * @cfg {String} layout  Defaults to <tt>'table'</tt>.  See {@link Ext.Container#layout}.
+     */
+    layout:'table',
+    defaultType: 'button',
+    /**
+     * @cfg {Boolean} frame  Defaults to <tt>true</tt>.  See {@link Ext.Panel#frame}.
+     */
+    frame: true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+
+    initComponent : function(){
+        this.layoutConfig = this.layoutConfig || {};
+        Ext.applyIf(this.layoutConfig, {
+            columns : this.columns
+        });
+        if(!this.title){
+            this.addClass('x-btn-group-notitle');
+        }
+        this.on('afterlayout', this.onAfterLayout, this);
+        Ext.ButtonGroup.superclass.initComponent.call(this);
+    },
+
+    applyDefaults : function(c){
+        c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c);
+        var d = this.internalDefaults;
+        if(c.events){
+            Ext.applyIf(c.initialConfig, d);
+            Ext.apply(c, d);
+        }else{
+            Ext.applyIf(c, d);
+        }
+        return c;
+    },
+
+    onAfterLayout : function(){
+        var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth;
+        this.body.setWidth(bodyWidth);
+        this.el.setWidth(bodyWidth + this.getFrameWidth());
+    }
+    /**
+     * @cfg {Array} tools  @hide
+     */
+});
+
+Ext.reg('buttongroup', Ext.ButtonGroup);
+/**
+ * @class Ext.PagingToolbar
+ * @extends Ext.Toolbar
+ * <p>As the amount of records increases, the time required for the browser to render
+ * them increases. Paging is used to reduce the amount of data exchanged with the client.
+ * Note: if there are more records/rows than can be viewed in the available screen area, vertical
+ * scrollbars will be added.</p>
+ * <p>Paging is typically handled on the server side (see exception below). The client sends
+ * parameters to the server side, which the server needs to interpret and then respond with the
+ * approprate data.</p>
+ * <p><b>Ext.PagingToolbar</b> is a specialized toolbar that is bound to a {@link Ext.data.Store}
+ * and provides automatic paging control. This Component {@link Ext.data.Store#load load}s blocks
+ * of data into the <tt>{@link #store}</tt> by passing {@link Ext.data.Store#paramNames paramNames} used for
+ * paging criteria.</p>
+ * <p>PagingToolbar is typically used as one of the Grid's toolbars:</p>
+ * <pre><code>
+Ext.QuickTips.init(); // to display button quicktips
+
+var myStore = new Ext.data.Store({
+    ...
+});
+
+var myPageSize = 25;  // server script should only send back 25 items
+
+var grid = new Ext.grid.GridPanel({
+    ...
+    store: myStore,
+    bbar: new Ext.PagingToolbar({
+        {@link #store}: myStore,       // grid and PagingToolbar using same store
+        {@link #displayInfo}: true,
+        {@link #pageSize}: myPageSize,
+        {@link #prependButtons}: true,
+        items: [
+            'text 1'
+        ]
+    })
+});
+ * </code></pre>
+ *
+ * <p>To use paging, pass the paging requirements to the server when the store is first loaded.</p>
+ * <pre><code>
+store.load({
+    params: {
+        start: 0,          // specify params for the first page load if using paging
+        limit: myPageSize,
+        foo:   'bar'
+    }
+});
+ * </code></pre>
+ * <p><u>Paging with Local Data</u></p>
+ * <p>Paging can also be accomplished with local data using extensions:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><a href="http://extjs.com/forum/showthread.php?t=57386">Ext.ux.data.PagingStore</a></li>
+ * <li>Paging Memory Proxy (examples/ux/PagingMemoryProxy.js)</li>
+ * </ul></div>
+ * @constructor
+ * Create a new PagingToolbar
+ * @param {Object} config The config object
+ * @xtype paging
+ */
+(function() {
+
+var T = Ext.Toolbar;
+
+Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} the paging toolbar should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} displayInfo
+     * <tt>true</tt> to display the displayMsg (defaults to <tt>false</tt>)
+     */
+    /**
+     * @cfg {Number} pageSize
+     * The number of records to display per page (defaults to <tt>20</tt>)
+     */
+    pageSize : 20,
+    /**
+     * @cfg {Boolean} prependButtons
+     * <tt>true</tt> to insert any configured <tt>items</tt> <i>before</i> the paging buttons.
+     * Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} displayMsg
+     * The paging status message to display (defaults to <tt>'Displaying {0} - {1} of {2}'</tt>).
+     * Note that this string is formatted using the braced numbers <tt>{0}-{2}</tt> as tokens
+     * that are replaced by the values for start, end and total respectively. These tokens should
+     * be preserved when overriding this string if showing those values is desired.
+     */
+    displayMsg : 'Displaying {0} - {1} of {2}',
+    /**
+     * @cfg {String} emptyMsg
+     * The message to display when no records are found (defaults to 'No data to display')
+     */
+    emptyMsg : 'No data to display',
+    /**
+     * @cfg {String} beforePageText
+     * The text displayed before the input item (defaults to <tt>'Page'</tt>).
+     */
+    beforePageText : 'Page',
+    /**
+     * @cfg {String} afterPageText
+     * Customizable piece of the default paging text (defaults to <tt>'of {0}'</tt>). Note that
+     * this string is formatted using <tt>{0}</tt> as a token that is replaced by the number of
+     * total pages. This token should be preserved when overriding this string if showing the
+     * total page count is desired.
+     */
+    afterPageText : 'of {0}',
+    /**
+     * @cfg {String} firstText
+     * The quicktip text displayed for the first page button (defaults to <tt>'First Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    firstText : 'First Page',
+    /**
+     * @cfg {String} prevText
+     * The quicktip text displayed for the previous page button (defaults to <tt>'Previous Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    prevText : 'Previous Page',
+    /**
+     * @cfg {String} nextText
+     * The quicktip text displayed for the next page button (defaults to <tt>'Next Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    nextText : 'Next Page',
+    /**
+     * @cfg {String} lastText
+     * The quicktip text displayed for the last page button (defaults to <tt>'Last Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    lastText : 'Last Page',
+    /**
+     * @cfg {String} refreshText
+     * The quicktip text displayed for the Refresh button (defaults to <tt>'Refresh'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    refreshText : 'Refresh',
+
+    /**
+     * @deprecated
+     * <b>The defaults for these should be set in the data store.</b>
+     * Object mapping of parameter names used for load calls, initially set to:
+     * <pre>{start: 'start', limit: 'limit'}</pre>
+     */
+
+    /**
+     * The number of records to display per page.  See also <tt>{@link #cursor}</tt>.
+     * @type Number
+     * @property pageSize
+     */
+
+    /**
+     * Indicator for the record position.  This property might be used to get the active page
+     * number for example:<pre><code>
+     * // t is reference to the paging toolbar instance
+     * var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
+     * </code></pre>
+     * @type Number
+     * @property cursor
+     */
+
+    initComponent : function(){
+        var pagingItems = [this.first = new T.Button({
+            tooltip: this.firstText,
+            overflowText: this.firstText,
+            iconCls: 'x-tbar-page-first',
+            disabled: true,
+            handler: this.moveFirst,
+            scope: this
+        }), this.prev = new T.Button({
+            tooltip: this.prevText,
+            overflowText: this.prevText,
+            iconCls: 'x-tbar-page-prev',
+            disabled: true,
+            handler: this.movePrevious,
+            scope: this
+        }), '-', this.beforePageText,
+        this.inputItem = new Ext.form.NumberField({
+            cls: 'x-tbar-page-number',
+            allowDecimals: false,
+            allowNegative: false,
+            enableKeyEvents: true,
+            selectOnFocus: true,
+            listeners: {
+                scope: this,
+                keydown: this.onPagingKeyDown,
+                blur: this.onPagingBlur
+            }
+        }), this.afterTextItem = new T.TextItem({
+            text: String.format(this.afterPageText, 1)
+        }), '-', this.next = new T.Button({
+            tooltip: this.nextText,
+            overflowText: this.nextText,
+            iconCls: 'x-tbar-page-next',
+            disabled: true,
+            handler: this.moveNext,
+            scope: this
+        }), this.last = new T.Button({
+            tooltip: this.lastText,
+            overflowText: this.lastText,
+            iconCls: 'x-tbar-page-last',
+            disabled: true,
+            handler: this.moveLast,
+            scope: this
+        }), '-', this.refresh = new T.Button({
+            tooltip: this.refreshText,
+            overflowText: this.refreshText,
+            iconCls: 'x-tbar-loading',
+            handler: this.refresh,
+            scope: this
+        })];
+
+
+        var userItems = this.items || this.buttons || [];
+        if (this.prependButtons) {
+            this.items = userItems.concat(pagingItems);
+        }else{
+            this.items = pagingItems.concat(userItems);
+        }
+        delete this.buttons;
+        if(this.displayInfo){
+            this.items.push('->');
+            this.items.push(this.displayItem = new T.TextItem({}));
+        }
+        Ext.PagingToolbar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the active page has been changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} pageData An object that has these properties:<ul>
+             * <li><code>total</code> : Number <div class="sub-desc">The total number of records in the dataset as
+             * returned by the server</div></li>
+             * <li><code>activePage</code> : Number <div class="sub-desc">The current page number</div></li>
+             * <li><code>pages</code> : Number <div class="sub-desc">The total number of pages (calculated from
+             * the total number of records in the dataset as returned by the server and the current {@link #pageSize})</div></li>
+             * </ul>
+             */
+            'change',
+            /**
+             * @event beforechange
+             * Fires just before the active page is changed.
+             * Return false to prevent the active page from being changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} params An object hash of the parameters which the PagingToolbar will send when
+             * loading the required page. This will contain:<ul>
+             * <li><code>start</code> : Number <div class="sub-desc">The starting row number for the next page of records to
+             * be retrieved from the server</div></li>
+             * <li><code>limit</code> : Number <div class="sub-desc">The number of records to be retrieved from the server</div></li>
+             * </ul>
+             * <p>(note: the names of the <b>start</b> and <b>limit</b> properties are determined
+             * by the store's {@link Ext.data.Store#paramNames paramNames} property.)</p>
+             * <p>Parameters may be added as required in the event handler.</p>
+             */
+            'beforechange'
+        );
+        this.on('afterlayout', this.onFirstLayout, this, {single: true});
+        this.cursor = 0;
+        this.bindStore(this.store);
+    },
+
+    // private
+    onFirstLayout : function(){
+        if(this.dsLoaded){
+            this.onLoad.apply(this, this.dsLoaded);
+        }
+    },
+
+    // private
+    updateInfo : function(){
+        if(this.displayItem){
+            var count = this.store.getCount();
+            var msg = count == 0 ?
+                this.emptyMsg :
+                String.format(
+                    this.displayMsg,
+                    this.cursor+1, this.cursor+count, this.store.getTotalCount()
+                );
+            this.displayItem.setText(msg);
+        }
+    },
+
+    // private
+    onLoad : function(store, r, o){
+        if(!this.rendered){
+            this.dsLoaded = [store, r, o];
+            return;
+        }
+        var p = this.getParams();
+        this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0;
+        var d = this.getPageData(), ap = d.activePage, ps = d.pages;
+
+        this.afterTextItem.setText(String.format(this.afterPageText, d.pages));
+        this.inputItem.setValue(ap);
+        this.first.setDisabled(ap == 1);
+        this.prev.setDisabled(ap == 1);
+        this.next.setDisabled(ap == ps);
+        this.last.setDisabled(ap == ps);
+        this.refresh.enable();
+        this.updateInfo();
+        this.fireEvent('change', this, d);
+    },
+
+    // private
+    getPageData : function(){
+        var total = this.store.getTotalCount();
+        return {
+            total : total,
+            activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize),
+            pages :  total < this.pageSize ? 1 : Math.ceil(total/this.pageSize)
+        };
+    },
+
+    /**
+     * Change the active page
+     * @param {Integer} page The page to display
+     */
+    changePage : function(page){
+        this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount()));
+    },
+
+    // private
+    onLoadError : function(){
+        if(!this.rendered){
+            return;
+        }
+        this.refresh.enable();
+    },
+
+    // private
+    readPage : function(d){
+        var v = this.inputItem.getValue(), pageNum;
+        if (!v || isNaN(pageNum = parseInt(v, 10))) {
+            this.inputItem.setValue(d.activePage);
+            return false;
+        }
+        return pageNum;
+    },
+
+    onPagingFocus : function(){
+        this.inputItem.select();
+    },
+
+    //private
+    onPagingBlur : function(e){
+        this.inputItem.setValue(this.getPageData().activePage);
+    },
+
+    // private
+    onPagingKeyDown : function(field, e){
+        var k = e.getKey(), d = this.getPageData(), pageNum;
+        if (k == e.RETURN) {
+            e.stopEvent();
+            pageNum = this.readPage(d);
+            if(pageNum !== false){
+                pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1;
+                this.doLoad(pageNum * this.pageSize);
+            }
+        }else if (k == e.HOME || k == e.END){
+            e.stopEvent();
+            pageNum = k == e.HOME ? 1 : d.pages;
+            field.setValue(pageNum);
+        }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){
+            e.stopEvent();
+            if((pageNum = this.readPage(d))){
+                var increment = e.shiftKey ? 10 : 1;
+                if(k == e.DOWN || k == e.PAGEDOWN){
+                    increment *= -1;
+                }
+                pageNum += increment;
+                if(pageNum >= 1 & pageNum <= d.pages){
+                    field.setValue(pageNum);
+                }
+            }
+        }
+    },
+
+    // private
+    getParams : function(){
+        //retain backwards compat, allow params on the toolbar itself, if they exist.
+        return this.paramNames || this.store.paramNames;
+    },
+
+    // private
+    beforeLoad : function(){
+        if(this.rendered && this.refresh){
+            this.refresh.disable();
+        }
+    },
+
+    // private
+    doLoad : function(start){
+        var o = {}, pn = this.getParams();
+        o[pn.start] = start;
+        o[pn.limit] = this.pageSize;
+        if(this.fireEvent('beforechange', this, o) !== false){
+            this.store.load({params:o});
+        }
+    },
+
+    /**
+     * Move to the first page, has the same effect as clicking the 'first' button.
+     */
+    moveFirst : function(){
+        this.doLoad(0);
+    },
+
+    /**
+     * Move to the previous page, has the same effect as clicking the 'previous' button.
+     */
+    movePrevious : function(){
+        this.doLoad(Math.max(0, this.cursor-this.pageSize));
+    },
+
+    /**
+     * Move to the next page, has the same effect as clicking the 'next' button.
+     */
+    moveNext : function(){
+        this.doLoad(this.cursor+this.pageSize);
+    },
+
+    /**
+     * Move to the last page, has the same effect as clicking the 'last' button.
+     */
+    moveLast : function(){
+        var total = this.store.getTotalCount(),
+            extra = total % this.pageSize;
+
+        this.doLoad(extra ? (total - extra) : total - this.pageSize);
+    },
+
+    /**
+     * Refresh the current page, has the same effect as clicking the 'refresh' button.
+     */
+    refresh : function(){
+        this.doLoad(this.cursor);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store}
+     * @param {Store} store The store to bind to this toolbar
+     * @param {Boolean} initial (Optional) true to not remove listeners
+     */
+    bindStore : function(store, initial){
+        var doLoad;
+        if(!initial && this.store){
+            this.store.un('beforeload', this.beforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoadError, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.beforeLoad,
+                load: this.onLoad,
+                exception: this.onLoadError
+            });
+            doLoad = store.getCount() > 0;
+        }
+        this.store = store;
+        if(doLoad){
+            this.onLoad(store, null, {});
+        }
+    },
+
+    /**
+     * Unbinds the paging toolbar from the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to unbind
+     */
+    unbind : function(store){
+        this.bindStore(null);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to bind
+     */
+    bind : function(store){
+        this.bindStore(store);
+    },
+
+    // private
+    onDestroy : function(){
+        this.bindStore(null);
+        Ext.PagingToolbar.superclass.onDestroy.call(this);
+    }
+});
+
+})();
+Ext.reg('paging', Ext.PagingToolbar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-toolbars.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,triggerWidth:18,lastOverflow:false,noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',onLayout:function(d,f){if(!this.leftTr){f.addClass("x-toolbar-layout-ct");f.insertHtml("beforeEnd",'<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');this.leftTr=f.child("tr.x-toolbar-left-row",true);this.rightTr=f.child("tr.x-toolbar-right-row",true);this.extrasTr=f.child("tr.x-toolbar-extras-row",true)}var g=this.leftTr;var k=0;var h=d.items.items;for(var b=0,e=h.length,j;b<e;b++,k++){j=h[b];if(j.isFill){g=this.rightTr;k=-1}else{if(!j.rendered){j.render(this.insertCell(j,g,k))}else{if(!j.xtbHidden&&!this.isValidParent(j,g.childNodes[k])){var a=this.insertCell(j,g,k);a.appendChild(j.getDomPositionEl().dom);j.container=Ext.get(a)}}}}this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(f)},cleanup:function(b){var e=b.childNodes;for(var a=e.length-1,d;a>=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,a,d){var b=document.createElement("td");b.className="x-toolbar-cell";a.insertBefore(b,a.childNodes[d]||null);return b},hideItem:function(b){var a=(this.hiddens=this.hiddens||[]);a.push(b);b.xtbHidden=true;b.xtbWidth=b.getDomPositionEl().dom.parentNode.offsetWidth;b.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddens.remove(a);if(this.hiddens.length<1){delete this.hiddens}},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getDomPositionEl().dom.parentNode.offsetWidth},fitToSize:function(m){if(this.container.enableOverflow===false){return}var l=m.dom.clientWidth;var b=this.lastWidth||0;this.lastWidth=l;var d=m.dom.firstChild.offsetWidth;var k=l-this.triggerWidth;var j=-1;if(d>l||(this.hiddens&&l>=b)){var e,g=this.container.items.items,f=g.length,h;var a=0;for(e=0;e<f;e++){h=g[e];if(!h.isFill){a+=this.getItemWidth(h);if(a>k){if(!h.xtbHidden){this.hideItem(h)}}else{if(h.xtbHidden){this.unhideItem(h)}}}}}if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(e,b){var a=Ext.apply({},e.initialConfig),d=e.toggleGroup;Ext.apply(a,{text:e.overflowText||e.text,iconCls:e.iconCls,icon:e.icon,itemId:e.itemId,disabled:e.disabled,handler:e.handler,scope:e.scope,menu:e.menu,hideOnClick:b});if(d||e.enableToggle){Ext.apply(a,{group:d,checked:e.pressed,listeners:{checkchange:function(f,c){e.toggle(c)}}})}delete a.xtype;delete a.id;return a},addComponentToMenu:function(a,b){if(b instanceof Ext.Toolbar.Separator){a.add("-")}else{if(Ext.isFunction(b.isXType)){if(b.isXType("splitbutton")){a.add(this.createMenuConfig(b,true))}else{if(b.isXType("button")){a.add(this.createMenuConfig(b,!b.menu))}else{if(b.isXType("buttongroup")){b.items.each(function(c){this.addComponentToMenu(a,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){this.moreMenu.items.each(function(b){delete b.menu})}},beforeMoreShow:function(b){var f=this.container.items.items,a=f.length,j,g,d=function(h,c){return h.isXType("buttongroup")&&!(c instanceof Ext.Toolbar.Separator)};this.clearMenu();b.removeAll();for(var e=0;e<a;e++){j=f[e];if(j.xtbHidden){if(g&&(d(j,g)||d(g,j))){b.add("-")}this.addComponentToMenu(b,j);g=j}}if(b.items.length<1){b.add(this.noItemsMenuText)}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.moreMenu});var a=this.insertCell(this.more,this.extrasTr,100);this.more.render(a)}},destroy:function(){Ext.destroy(this.more,this.moreMenu);Ext.layout.ToolbarLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.toolbar=Ext.layout.ToolbarLayout;Ext.Toolbar=function(a){if(Ext.isArray(a)){a={items:a,layout:"toolbar"}}else{a=Ext.apply({layout:"toolbar"},a);if(a.buttons){a.items=a.buttons}}Ext.Toolbar.superclass.constructor.call(this,a)};(function(){var a=Ext.Toolbar;Ext.extend(a,Ext.Container,{defaultType:"button",trackMenus:true,internalDefaults:{removeMode:"container",hideParent:true},toolbarCls:"x-toolbar",initComponent:function(){a.superclass.initComponent.call(this);this.addEvents("overflowchange")},onRender:function(c,b){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+" x-small-editor"}}this.el=c.createChild(Ext.apply({id:this.id},this.autoCreate),b)}},lookupComponent:function(b){if(Ext.isString(b)){if(b=="-"){b=new a.Separator()}else{if(b==" "){b=new a.Spacer()}else{if(b=="->"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.constructItem(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.constructItem(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},constructItem:function(c,b){return Ext.create(c,b||this.defaultType)},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return Ext.Toolbar.superclass.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d<b;d++){e.push(this.addButton(c[d]))}return e}return this.add(this.constructButton(c))},addText:function(b){return this.addItem(new a.TextItem(b))},addDom:function(b){return this.add(new a.Item({autoEl:b}))},addField:function(b){return this.add(b)},insertButton:function(c,f){if(Ext.isArray(f)){var e=[];for(var d=0,b=f.length;d<b;d++){e.push(this.insertButton(c+d,f[d]))}return e}return Ext.Toolbar.superclass.insert.call(this,c,f)},initMenuTracking:function(b){if(this.trackMenus&&b.menu){this.mon(b,{menutriggerover:this.onButtonTriggerOver,menushow:this.onButtonMenuShow,menuhide:this.onButtonMenuHide,scope:this})}},constructButton:function(d){var c=d.events?d:this.constructItem(d,d.split?"splitbutton":this.defaultType);this.initMenuTracking(c);return c},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg("tbitem",a.Item);a.Separator=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"span",cls:"xtb-sep"},b)}});Ext.reg("tbseparator",a.Separator);a.Spacer=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"div",cls:"xtb-spacer",style:this.width?"width:"+this.width+"px":""},b)}});Ext.reg("tbspacer",a.Spacer);a.Fill=Ext.extend(a.Item,{render:Ext.emptyFn,isFill:true});Ext.reg("tbfill",a.Fill);a.TextItem=Ext.extend(a.Item,{constructor:function(b){if(Ext.isString(b)){b={autoEl:{cls:"xtb-text",html:b}}}else{b.autoEl={cls:"xtb-text",html:b.text||""}}a.TextItem.superclass.constructor.call(this,b)},setText:function(b){if(this.rendered){this.el.dom.innerHTML=b}else{this.autoEl.html=b}}});Ext.reg("tbtext",a.TextItem);a.Button=Ext.extend(Ext.Button,{});a.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg("tbbutton",a.Button);Ext.reg("tbsplit",a.SplitButton)})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:"x-btn-group",layout:"table",defaultType:"button",frame:true,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass("x-btn-group-notitle")}this.on("afterlayout",this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this)},applyDefaults:function(b){b=Ext.ButtonGroup.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}return b},onAfterLayout:function(){var a=this.body.getFrameWidth("lr")+this.body.dom.firstChild.offsetWidth;this.body.setWidth(a);this.el.setWidth(a+this.getFrameWidth())}});Ext.reg("buttongroup",Ext.ButtonGroup);(function(){var a=Ext.Toolbar;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",initComponent:function(){var c=[this.first=new a.Button({tooltip:this.firstText,overflowText:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.moveFirst,scope:this}),this.prev=new a.Button({tooltip:this.prevText,overflowText:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.movePrevious,scope:this}),"-",this.beforePageText,this.inputItem=new Ext.form.NumberField({cls:"x-tbar-page-number",allowDecimals:false,allowNegative:false,enableKeyEvents:true,selectOnFocus:true,listeners:{scope:this,keydown:this.onPagingKeyDown,blur:this.onPagingBlur}}),this.afterTextItem=new a.TextItem({text:String.format(this.afterPageText,1)}),"-",this.next=new a.Button({tooltip:this.nextText,overflowText:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.moveNext,scope:this}),this.last=new a.Button({tooltip:this.lastText,overflowText:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.moveLast,scope:this}),"-",this.refresh=new a.Button({tooltip:this.refreshText,overflowText:this.refreshText,iconCls:"x-tbar-loading",handler:this.refresh,scope:this})];var b=this.items||this.buttons||[];if(this.prependButtons){this.items=b.concat(c)}else{this.items=c.concat(b)}delete this.buttons;if(this.displayInfo){this.items.push("->");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,i){if(!this.rendered){this.dsLoaded=[b,e,i];return}var f=this.getParams();this.cursor=(i.params&&i.params[f.start])?i.params[f.start]:0;var h=this.getPageData(),c=h.activePage,g=h.pages;this.afterTextItem.setText(String.format(this.afterPageText,h.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==g);this.last.setDisabled(c==g);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,h)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b<this.pageSize?1:Math.ceil(b/this.pageSize)}},changePage:function(b){this.doLoad(((b-1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onLoadError:function(){if(!this.rendered){return}this.refresh.enable()},readPage:function(e){var b=this.inputItem.getValue(),c;if(!b||isNaN(c=parseInt(b,10))){this.inputItem.setValue(e.activePage);return false}return c},onPagingFocus:function(){this.inputItem.select()},onPagingBlur:function(b){this.inputItem.setValue(this.getPageData().activePage)},onPagingKeyDown:function(h,g){var c=g.getKey(),i=this.getPageData(),f;if(c==g.RETURN){g.stopEvent();f=this.readPage(i);if(f!==false){f=Math.min(Math.max(1,f),i.pages)-1;this.doLoad(f*this.pageSize)}}else{if(c==g.HOME||c==g.END){g.stopEvent();f=c==g.HOME?1:i.pages;h.setValue(f)}else{if(c==g.UP||c==g.PAGEUP||c==g.DOWN||c==g.PAGEDOWN){g.stopEvent();if((f=this.readPage(i))){var b=g.shiftKey?10:1;if(c==g.DOWN||c==g.PAGEDOWN){b*=-1}f+=b;if(f>=1&f<=i.pages){h.setValue(f)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},refresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this);if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=c.getCount()>0}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree-debug.js	(revision 625)
@@ -0,0 +1,4522 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreePanel
+ * @extends Ext.Panel
+ * <p>The TreePanel provides tree-structured UI representation of tree-structured data.</p>
+ * <p>{@link Ext.tree.TreeNode TreeNode}s added to the TreePanel may each contain metadata
+ * used by your application in their {@link Ext.tree.TreeNode#attributes attributes} property.</p>
+ * <p><b>A TreePanel must have a {@link #root} node before it is rendered.</b> This may either be
+ * specified using the {@link #root} config option, or using the {@link #setRootNode} method.
+ * <p>An example of tree rendered to an existing div:</p><pre><code>
+var tree = new Ext.tree.TreePanel({
+    renderTo: 'tree-div',
+    useArrows: true,
+    autoScroll: true,
+    animate: true,
+    enableDD: true,
+    containerScroll: true,
+    border: false,
+    // auto create TreeLoader
+    dataUrl: 'get-nodes.php',
+
+    root: {
+        nodeType: 'async',
+        text: 'Ext JS',
+        draggable: false,
+        id: 'source'
+    }
+});
+
+tree.getRootNode().expand();
+ * </code></pre>
+ * <p>The example above would work with a data packet similar to this:</p><pre><code>
+[{
+    "text": "adapter",
+    "id": "source\/adapter",
+    "cls": "folder"
+}, {
+    "text": "dd",
+    "id": "source\/dd",
+    "cls": "folder"
+}, {
+    "text": "debug.js",
+    "id": "source\/debug.js",
+    "leaf": true,
+    "cls": "file"
+}]
+ * </code></pre>
+ * <p>An example of tree within a Viewport:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        xtype: 'treepanel',
+        width: 200,
+        autoScroll: true,
+        split: true,
+        loader: new Ext.tree.TreeLoader(),
+        root: new Ext.tree.AsyncTreeNode({
+            expanded: true,
+            children: [{
+                text: 'Menu Option 1',
+                leaf: true
+            }, {
+                text: 'Menu Option 2',
+                leaf: true
+            }, {
+                text: 'Menu Option 3',
+                leaf: true
+            }]
+        }),
+        rootVisible: false,
+        listeners: {
+            click: function(n) {
+                Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
+            }
+        }
+    }, {
+        region: 'center',
+        xtype: 'tabpanel',
+        // remaining code not shown ...
+    }]
+});
+</code></pre>
+ *
+ * @cfg {Ext.tree.TreeNode} root The root node for the tree.
+ * @cfg {Boolean} rootVisible <tt>false</tt> to hide the root node (defaults to <tt>true</tt>)
+ * @cfg {Boolean} lines <tt>false</tt> to disable tree lines (defaults to <tt>true</tt>)
+ * @cfg {Boolean} enableDD <tt>true</tt> to enable drag and drop
+ * @cfg {Boolean} enableDrag <tt>true</tt> to enable just drag
+ * @cfg {Boolean} enableDrop <tt>true</tt> to enable just drop
+ * @cfg {Object} dragConfig Custom config to pass to the {@link Ext.tree.TreeDragZone} instance
+ * @cfg {Object} dropConfig Custom config to pass to the {@link Ext.tree.TreeDropZone} instance
+ * @cfg {String} ddGroup The DD group this TreePanel belongs to
+ * @cfg {Boolean} ddAppendOnly <tt>true</tt> if the tree should only allow append drops (use for trees which are sorted)
+ * @cfg {Boolean} ddScroll <tt>true</tt> to enable body scrolling
+ * @cfg {Boolean} containerScroll <tt>true</tt> to register this container with ScrollManager
+ * @cfg {Boolean} hlDrop <tt>false</tt> to disable node highlight on drop (defaults to the value of {@link Ext#enableFx})
+ * @cfg {String} hlColor The color of the node highlight (defaults to <tt>'C3DAF9'</tt>)
+ * @cfg {Boolean} animate <tt>true</tt> to enable animated expand/collapse (defaults to the value of {@link Ext#enableFx})
+ * @cfg {Boolean} singleExpand <tt>true</tt> if only 1 node per branch may be expanded
+ * @cfg {Object} selModel A tree selection model to use with this TreePanel (defaults to an {@link Ext.tree.DefaultSelectionModel})
+ * @cfg {Boolean} trackMouseOver <tt>false</tt> to disable mouse over highlighting
+ * @cfg {Ext.tree.TreeLoader} loader A {@link Ext.tree.TreeLoader} for use with this TreePanel
+ * @cfg {String} pathSeparator The token used to separate sub-paths in path strings (defaults to <tt>'/'</tt>)
+ * @cfg {Boolean} useArrows <tt>true</tt> to use Vista-style arrows in the tree (defaults to <tt>false</tt>)
+ * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+ *
+ * @constructor
+ * @param {Object} config
+ * @xtype treepanel
+ */
+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);
+        }
+
+        // initialize the loader
+        var l = this.loader;
+        if(!l){
+            l = new Ext.tree.TreeLoader({
+                dataUrl: this.dataUrl,
+                requestMethod: this.requestMethod
+            });
+        }else if(typeof l == 'object' && !l.load){
+            l = new Ext.tree.TreeLoader(l);
+        }
+        this.loader = l;
+
+        this.nodeHash = {};
+
+        /**
+        * The root node of this tree.
+        * @type Ext.tree.TreeNode
+        * @property root
+        */
+        if(this.root){
+            var r = this.root;
+            delete this.root;
+            this.setRootNode(r);
+        }
+
+
+        this.addEvents(
+
+            /**
+            * @event append
+            * Fires when a new child node is appended to a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The newly appended node
+            * @param {Number} index The index of the newly appended node
+            */
+           "append",
+           /**
+            * @event remove
+            * Fires when a child node is removed from a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node removed
+            */
+           "remove",
+           /**
+            * @event movenode
+            * Fires when a node is moved to a new location in the tree
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node moved
+            * @param {Node} oldParent The old parent of this node
+            * @param {Node} newParent The new parent of this node
+            * @param {Number} index The index it was moved to
+            */
+           "movenode",
+           /**
+            * @event insert
+            * Fires when a new child node is inserted in a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node inserted
+            * @param {Node} refNode The child node the node was inserted before
+            */
+           "insert",
+           /**
+            * @event beforeappend
+            * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be appended
+            */
+           "beforeappend",
+           /**
+            * @event beforeremove
+            * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be removed
+            */
+           "beforeremove",
+           /**
+            * @event beforemovenode
+            * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node being moved
+            * @param {Node} oldParent The parent of the node
+            * @param {Node} newParent The new parent the node is moving to
+            * @param {Number} index The index it is being moved to
+            */
+           "beforemovenode",
+           /**
+            * @event beforeinsert
+            * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be inserted
+            * @param {Node} refNode The child node the node is being inserted before
+            */
+            "beforeinsert",
+
+            /**
+            * @event beforeload
+            * Fires before a node is loaded, return false to cancel
+            * @param {Node} node The node being loaded
+            */
+            "beforeload",
+            /**
+            * @event load
+            * Fires when a node is loaded
+            * @param {Node} node The node that was loaded
+            */
+            "load",
+            /**
+            * @event textchange
+            * Fires when the text for a node is changed
+            * @param {Node} node The node
+            * @param {String} text The new text
+            * @param {String} oldText The old text
+            */
+            "textchange",
+            /**
+            * @event beforeexpandnode
+            * Fires before a node is expanded, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforeexpandnode",
+            /**
+            * @event beforecollapsenode
+            * Fires before a node is collapsed, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforecollapsenode",
+            /**
+            * @event expandnode
+            * Fires when a node is expanded
+            * @param {Node} node The node
+            */
+            "expandnode",
+            /**
+            * @event disabledchange
+            * Fires when the disabled status of a node changes
+            * @param {Node} node The node
+            * @param {Boolean} disabled
+            */
+            "disabledchange",
+            /**
+            * @event collapsenode
+            * Fires when a node is collapsed
+            * @param {Node} node The node
+            */
+            "collapsenode",
+            /**
+            * @event beforeclick
+            * Fires before click processing on a node. Return false to cancel the default action.
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "beforeclick",
+            /**
+            * @event click
+            * Fires when a node is clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "click",
+            /**
+            * @event checkchange
+            * Fires when a node with a checkbox's checked property changes
+            * @param {Node} this This node
+            * @param {Boolean} checked
+            */
+            "checkchange",
+            /**
+            * @event dblclick
+            * Fires when a node is double clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "dblclick",
+            /**
+            * @event contextmenu
+            * Fires when a node is right clicked. To display a context menu in response to this
+            * event, first create a Menu object (see {@link Ext.menu.Menu} for details), then add
+            * a handler for this event:<pre><code>
+new Ext.tree.TreePanel({
+    title: 'My TreePanel',
+    root: new Ext.tree.AsyncTreeNode({
+        text: 'The Root',
+        children: [
+            { text: 'Child node 1', leaf: true },
+            { text: 'Child node 2', leaf: true }
+        ]
+    }),
+    contextMenu: new Ext.menu.Menu({
+        items: [{
+            id: 'delete-node',
+            text: 'Delete Node'
+        }],
+        listeners: {
+            itemclick: function(item) {
+                switch (item.id) {
+                    case 'delete-node':
+                        var n = item.parentMenu.contextNode;
+                        if (n.parentNode) {
+                            n.remove();
+                        }
+                        break;
+                }
+            }
+        }
+    }),
+    listeners: {
+        contextmenu: function(node, e) {
+//          Register the context node with the menu so that a Menu Item's handler function can access
+//          it via its {@link Ext.menu.BaseItem#parentMenu parentMenu} property.
+            node.select();
+            var c = node.getOwnerTree().contextMenu;
+            c.contextNode = node;
+            c.showAt(e.getXY());
+        }
+    }
+});
+</code></pre>
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "contextmenu",
+            /**
+            * @event beforechildrenrendered
+            * Fires right before the child nodes for a node are rendered
+            * @param {Node} node The node
+            */
+            "beforechildrenrendered",
+           /**
+             * @event startdrag
+             * Fires when a node starts being dragged
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "startdrag",
+            /**
+             * @event enddrag
+             * Fires when a drag operation is complete
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "enddrag",
+            /**
+             * @event dragdrop
+             * Fires when a dragged node is dropped on a valid DD target
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {DD} dd The dd it was dropped on
+             * @param {event} e The raw browser event
+             */
+            "dragdrop",
+            /**
+             * @event beforenodedrop
+             * Fires when a DD object is dropped on a node in this tree for preprocessing. Return false to cancel the drop. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source <b>OR</b> you can supply node(s)
+             * to be inserted by setting them on this object.</li>
+             * <li>cancel - Set this to true to cancel the drop.</li>
+             * <li>dropStatus - If the default drop action is cancelled but the drop is valid, setting this to true
+             * will prevent the animated "repair" from appearing.</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "beforenodedrop",
+            /**
+             * @event nodedrop
+             * Fires after a DD object is dropped on a node in this tree. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Dropped node(s).</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "nodedrop",
+             /**
+             * @event nodedragover
+             * Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed. The dragOverEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source.</li>
+             * <li>cancel - Set this to true to signal drop not allowed.</li>
+             * </ul>
+             * @param {Object} dragOverEvent
+             */
+            "nodedragover"
+        );
+        if(this.singleExpand){
+            this.on("beforeexpandnode", this.restrictExpand, this);
+        }
+    },
+
+    // private
+    proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){
+        if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){
+            ename = ename+'node';
+        }
+        // args inline for performance while bubbling events
+        return this.fireEvent(ename, a1, a2, a3, a4, a5, a6);
+    },
+
+
+    /**
+     * Returns this root node for this tree
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree. If the TreePanel has already rendered a root node, the
+     * previous root node (and all of its descendants) are destroyed before the new root node is rendered.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        Ext.destroy(this.root);
+        if(!node.render){ // attributes passed
+            node = this.loader.createNode(node);
+        }
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        if(!this.rootVisible){
+            var uiP = node.attributes.uiProvider;
+            node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node);
+        }
+        if (this.innerCt) {
+            this.innerCt.update('');
+            this.afterRender();
+        }
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    // private
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    },
+
+    // private
+    restrictExpand : function(node){
+        var p = node.parentNode;
+        if(p){
+            if(p.expandedChild && p.expandedChild.parentNode == p){
+                p.expandedChild.collapse();
+            }
+            p.expandedChild = node;
+        }
+    },
+
+    /**
+     * Retrieve an array of checked nodes, or an array of a specific attribute of checked nodes (e.g. "id")
+     * @param {String} attribute (optional) Defaults to null (return the actual nodes)
+     * @param {TreeNode} startNode (optional) The node to start from, defaults to the root
+     * @return {Array}
+     */
+    getChecked : function(a, startNode){
+        startNode = startNode || this.root;
+        var r = [];
+        var f = function(){
+            if(this.attributes.checked){
+                r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a]));
+            }
+        };
+        startNode.cascade(f);
+        return r;
+    },
+
+    /**
+     * Returns the container element for this TreePanel.
+     * @return {Element} The container element for this TreePanel.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the default {@link Ext.tree.TreeLoader} for this TreePanel.
+     * @return {Ext.tree.TreeLoader} The TreeLoader for this TreePanel.
+     */
+    getLoader : function(){
+        return this.loader;
+    },
+
+    /**
+     * Expand all nodes
+     */
+    expandAll : function(){
+        this.root.expand(true);
+    },
+
+    /**
+     * Collapse all nodes
+     */
+    collapseAll : function(){
+        this.root.collapse(true);
+    },
+
+    /**
+     * Returns the selection model used by this TreePanel.
+     * @return {TreeSelectionModel} The selection model used by this TreePanel
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.tree.DefaultSelectionModel();
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Expands a specified path in this TreePanel. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the expand is complete. The callback will be called with
+     * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded.
+     */
+    expandPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var curNode = this.root;
+        if(curNode.attributes[attr] != keys[1]){ // invalid root
+            if(callback){
+                callback(false, null);
+            }
+            return;
+        }
+        var index = 1;
+        var f = function(){
+            if(++index == keys.length){
+                if(callback){
+                    callback(true, curNode);
+                }
+                return;
+            }
+            var c = curNode.findChild(attr, keys[index]);
+            if(!c){
+                if(callback){
+                    callback(false, curNode);
+                }
+                return;
+            }
+            curNode = c;
+            c.expand(false, false, f);
+        };
+        curNode.expand(false, false, f);
+    },
+
+    /**
+     * Selects the node in this tree at the specified path. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the selection is complete. The callback will be called with
+     * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node.
+     */
+    selectPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var v = keys.pop();
+        if(keys.length > 0){
+            var f = function(success, node){
+                if(success && node){
+                    var n = node.findChild(attr, v);
+                    if(n){
+                        n.select();
+                        if(callback){
+                            callback(true, n);
+                        }
+                    }else if(callback){
+                        callback(false, n);
+                    }
+                }else{
+                    if(callback){
+                        callback(false, n);
+                    }
+                }
+            };
+            this.expandPath(keys.join(this.pathSeparator), attr, f);
+        }else{
+            this.root.select();
+            if(callback){
+                callback(true, this.root);
+            }
+        }
+    },
+
+    /**
+     * Returns the underlying Element for this tree
+     * @return {Ext.Element} The Element
+     */
+    getTreeEl : function(){
+        return this.body;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.tree.TreePanel.superclass.onRender.call(this, ct, position);
+        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")});
+    },
+
+    // private
+    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){
+           /**
+            * The dropZone used by this tree if drop is enabled (see {@link #enableDD} or {@link #enableDrop})
+            * @property dropZone
+            * @type Ext.tree.TreeDropZone
+            */
+             this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || {
+               ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true
+           });
+        }
+        if((this.enableDD || this.enableDrag) && !this.dragZone){
+           /**
+            * The dragZone used by this tree if drag is enabled (see {@link #enableDD} or {@link #enableDrag})
+            * @property dragZone
+            * @type Ext.tree.TreeDragZone
+            */
+            this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || {
+               ddGroup: this.ddGroup || "TreeDD",
+               scroll: this.ddScroll
+           });
+        }
+        this.getSelectionModel().init(this);
+    },
+
+    // private
+    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);
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoDestroy
+     * @hide
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {Object} defaults
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideBorders
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} items
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} monitorResize
+     * @hide
+     */
+    /**
+     * @property items
+     * @hide
+     */
+    /**
+     * @method cascade
+     * @hide
+     */
+    /**
+     * @method doLayout
+     * @hide
+     */
+    /**
+     * @method find
+     * @hide
+     */
+    /**
+     * @method findBy
+     * @hide
+     */
+    /**
+     * @method findById
+     * @hide
+     */
+    /**
+     * @method findByType
+     * @hide
+     */
+    /**
+     * @method getComponent
+     * @hide
+     */
+    /**
+     * @method getLayout
+     * @hide
+     */
+    /**
+     * @method getUpdater
+     * @hide
+     */
+    /**
+     * @method insert
+     * @hide
+     */
+    /**
+     * @method load
+     * @hide
+     */
+    /**
+     * @method remove
+     * @hide
+     */
+    /**
+     * @event add
+     * @hide
+     */
+    /**
+     * @method removeAll
+     * @hide
+     */
+    /**
+     * @event afterLayout
+     * @hide
+     */
+    /**
+     * @event beforeadd
+     * @hide
+     */
+    /**
+     * @event beforeremove
+     * @hide
+     */
+    /**
+     * @event remove
+     * @hide
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+
+Ext.tree.TreePanel.nodeTypes = {};
+
+Ext.reg('treepanel', Ext.tree.TreePanel);Ext.tree.TreeEventModel = function(tree){
+    this.tree = tree;
+    this.tree.on('render', this.initEvents, this);
+}
+
+Ext.tree.TreeEventModel.prototype = {
+    initEvents : function(){
+        var el = this.tree.getTreeEl();
+        el.on('click', this.delegateClick, this);
+        if(this.tree.trackMouseOver !== false){
+            this.tree.innerCt.on('mouseover', this.delegateOver, this);
+            this.tree.innerCt.on('mouseout', this.delegateOut, this);
+        }
+        el.on('dblclick', this.delegateDblClick, this);
+        el.on('contextmenu', this.delegateContextMenu, this);
+    },
+
+    getNode : function(e){
+        var t;
+        if(t = e.getTarget('.x-tree-node-el', 10)){
+            var id = Ext.fly(t, '_treeEvents').getAttribute('tree-node-id', 'ext');
+            if(id){
+                return this.tree.getNodeById(id);
+            }
+        }
+        return null;
+    },
+
+    getNodeTarget : function(e){
+        var t = e.getTarget('.x-tree-node-icon', 1);
+        if(!t){
+            t = e.getTarget('.x-tree-node-el', 6);
+        }
+        return t;
+    },
+
+    delegateOut : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            var n = this.getNode(e);
+            this.onIconOut(e, n);
+            if(n == this.lastEcOver){
+                delete this.lastEcOver;
+            }
+        }
+        if((t = this.getNodeTarget(e)) && !e.within(t, true)){
+            this.onNodeOut(e, this.getNode(e));
+        }
+    },
+
+    delegateOver : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF
+            Ext.getBody().on('mouseover', this.trackExit, this);
+            this.trackingDoc = true;
+        }
+        if(this.lastEcOver){ // prevent hung highlight
+            this.onIconOut(e, this.lastEcOver);
+            delete this.lastEcOver;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.lastEcOver = this.getNode(e);
+            this.onIconOver(e, this.lastEcOver);
+        }
+        if(t = this.getNodeTarget(e)){
+            this.onNodeOver(e, this.getNode(e));
+        }
+    },
+
+    trackExit : function(e){
+        if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){
+            this.onNodeOut(e, this.lastOverNode);
+            delete this.lastOverNode;
+            Ext.getBody().un('mouseover', this.trackExit, this);
+            this.trackingDoc = false;
+        }
+    },
+
+    delegateClick : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+
+        if(e.getTarget('input[type=checkbox]', 1)){
+            this.onCheckboxClick(e, this.getNode(e));
+        }
+        else if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.onIconClick(e, this.getNode(e));
+        }
+        else if(this.getNodeTarget(e)){
+            this.onNodeClick(e, this.getNode(e));
+        }
+    },
+
+    delegateDblClick : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeDblClick(e, this.getNode(e));
+        }
+    },
+
+    delegateContextMenu : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeContextMenu(e, this.getNode(e));
+        }
+    },
+
+    onNodeClick : function(e, node){
+        node.ui.onClick(e);
+    },
+
+    onNodeOver : function(e, node){
+        this.lastOverNode = node;
+        node.ui.onOver(e);
+    },
+
+    onNodeOut : function(e, node){
+        node.ui.onOut(e);
+    },
+
+    onIconOver : function(e, node){
+        node.ui.addClass('x-tree-ec-over');
+    },
+
+    onIconOut : function(e, node){
+        node.ui.removeClass('x-tree-ec-over');
+    },
+
+    onIconClick : function(e, node){
+        node.ui.ecClick(e);
+    },
+
+    onCheckboxClick : function(e, node){
+        node.ui.onCheckChange(e);
+    },
+
+    onNodeDblClick : function(e, node){
+        node.ui.onDblClick(e);
+    },
+
+    onNodeContextMenu : function(e, node){
+        node.ui.onContextMenu(e);
+    },
+
+    beforeEvent : function(e){
+        if(this.disabled){
+            e.stopEvent();
+            return false;
+        }
+        return true;
+    },
+
+    disable: function(){
+        this.disabled = true;
+    },
+
+    enable: function(){
+        this.disabled = false;
+    }
+};/**
+ * @class Ext.tree.DefaultSelectionModel
+ * @extends Ext.util.Observable
+ * The default single selection for a TreePanel.
+ */
+Ext.tree.DefaultSelectionModel = function(config){
+   this.selNode = null;
+   
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected node changes
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        */
+       "selectionchange",
+
+       /**
+        * @event beforeselect
+        * Fires before the selected node changes, return false to cancel the change
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        * @param {TreeNode} node the old selection
+        */
+       "beforeselect"
+   );
+
+    Ext.apply(this, config);
+    Ext.tree.DefaultSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        this.select(node);
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @return {TreeNode} The selected node
+     */
+    select : function(node){
+        var last = this.selNode;
+        if(node == last){
+            node.ui.onSelectedChange(true);
+        }else if(this.fireEvent('beforeselect', this, node, last) !== false){
+            if(last){
+                last.ui.onSelectedChange(false);
+            }
+            this.selNode = node;
+            node.ui.onSelectedChange(true);
+            this.fireEvent("selectionchange", this, node, last);
+        }
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selNode == node){
+            this.clearSelections();
+        }    
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(){
+        var n = this.selNode;
+        if(n){
+            n.ui.onSelectedChange(false);
+            this.selNode = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+        return n;
+    },
+    
+    /**
+     * Get the selected node
+     * @return {TreeNode} The selected node
+     */
+    getSelectedNode : function(){
+        return this.selNode;    
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selNode == node;  
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectPrevious : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        var ps = s.previousSibling;
+        if(ps){
+            if(!ps.isExpanded() || ps.childNodes.length < 1){
+                return this.select(ps);
+            } else{
+                var lc = ps.lastChild;
+                while(lc && lc.isExpanded() && lc.childNodes.length > 0){
+                    lc = lc.lastChild;
+                }
+                return this.select(lc);
+            }
+        } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){
+            return this.select(s.parentNode);
+        }
+        return null;
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectNext : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        if(s.firstChild && s.isExpanded()){
+             return this.select(s.firstChild);
+         }else if(s.nextSibling){
+             return this.select(s.nextSibling);
+         }else if(s.parentNode){
+            var newS = null;
+            s.parentNode.bubble(function(){
+                if(this.nextSibling){
+                    newS = this.getOwnerTree().selModel.select(this.nextSibling);
+                    return false;
+                }
+            });
+            return newS;
+         }
+        return null;
+    },
+
+    onKeyDown : function(e){
+        var s = this.selNode || this.lastSelNode;
+        // undesirable, but required
+        var sm = this;
+        if(!s){
+            return;
+        }
+        var k = e.getKey();
+        switch(k){
+             case e.DOWN:
+                 e.stopEvent();
+                 this.selectNext();
+             break;
+             case e.UP:
+                 e.stopEvent();
+                 this.selectPrevious();
+             break;
+             case e.RIGHT:
+                 e.preventDefault();
+                 if(s.hasChildNodes()){
+                     if(!s.isExpanded()){
+                         s.expand();
+                     }else if(s.firstChild){
+                         this.select(s.firstChild, e);
+                     }
+                 }
+             break;
+             case e.LEFT:
+                 e.preventDefault();
+                 if(s.hasChildNodes() && s.isExpanded()){
+                     s.collapse();
+                 }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){
+                     this.select(s.parentNode, e);
+                 }
+             break;
+        };
+    }
+});
+
+/**
+ * @class Ext.tree.MultiSelectionModel
+ * @extends Ext.util.Observable
+ * Multi selection for a TreePanel.
+ */
+Ext.tree.MultiSelectionModel = function(config){
+   this.selNodes = [];
+   this.selMap = {};
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected nodes change
+        * @param {MultiSelectionModel} this
+        * @param {Array} nodes Array of the selected nodes
+        */
+       "selectionchange"
+   );
+    Ext.apply(this, config);
+    Ext.tree.MultiSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        if(e.ctrlKey && this.isSelected(node)){
+            this.unselect(node);
+        }else{
+            this.select(node, e, e.ctrlKey);
+        }
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @param {EventObject} e (optional) An event associated with the selection
+     * @param {Boolean} keepExisting True to retain existing selections
+     * @return {TreeNode} The selected node
+     */
+    select : function(node, e, keepExisting){
+        if(keepExisting !== true){
+            this.clearSelections(true);
+        }
+        if(this.isSelected(node)){
+            this.lastSelNode = node;
+            return node;
+        }
+        this.selNodes.push(node);
+        this.selMap[node.id] = node;
+        this.lastSelNode = node;
+        node.ui.onSelectedChange(true);
+        this.fireEvent("selectionchange", this, this.selNodes);
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selMap[node.id]){
+            node.ui.onSelectedChange(false);
+            var sn = this.selNodes;
+            var index = sn.indexOf(node);
+            if(index != -1){
+                this.selNodes.splice(index, 1);
+            }
+            delete this.selMap[node.id];
+            this.fireEvent("selectionchange", this, this.selNodes);
+        }
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(suppressEvent){
+        var sn = this.selNodes;
+        if(sn.length > 0){
+            for(var i = 0, len = sn.length; i < len; i++){
+                sn[i].ui.onSelectedChange(false);
+            }
+            this.selNodes = [];
+            this.selMap = {};
+            if(suppressEvent !== true){
+                this.fireEvent("selectionchange", this, this.selNodes);
+            }
+        }
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selMap[node.id] ? true : false;  
+    },
+    
+    /**
+     * Returns an array of the selected nodes
+     * @return {Array}
+     */
+    getSelectedNodes : function(){
+        return this.selNodes;    
+    },
+
+    onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown,
+
+    selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext,
+
+    selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious
+});/**
+ * @class Ext.data.Tree
+ * @extends Ext.util.Observable
+ * Represents a tree data structure and bubbles all the events for its nodes. The nodes
+ * in the tree have most standard DOM functionality.
+ * @constructor
+ * @param {Node} root (optional) The root node
+ */
+Ext.data.Tree = function(root){
+   this.nodeHash = {};
+   /**
+    * The root node for this tree
+    * @type Node
+    */
+   this.root = null;
+   if(root){
+       this.setRootNode(root);
+   }
+   this.addEvents(
+       /**
+        * @event append
+        * Fires when a new child node is appended to a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append",
+       /**
+        * @event remove
+        * Fires when a child node is removed from a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node removed
+        */
+       "remove",
+       /**
+        * @event move
+        * Fires when a node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node moved
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move",
+       /**
+        * @event insert
+        * Fires when a new child node is inserted in a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert",
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend",
+       /**
+        * @event beforeremove
+        * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove",
+       /**
+        * @event beforemove
+        * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node being moved
+        * @param {Node} oldParent The parent of the node
+        * @param {Node} newParent The new parent the node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove",
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert"
+   );
+
+    Ext.data.Tree.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Tree, Ext.util.Observable, {
+    /**
+     * @cfg {String} pathSeparator
+     * The token used to separate paths in node ids (defaults to '/').
+     */
+    pathSeparator: "/",
+
+    // private
+    proxyNodeEvent : function(){
+        return this.fireEvent.apply(this, arguments);
+    },
+
+    /**
+     * Returns the root node for this tree.
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id.
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    }
+});
+
+/**
+ * @class Ext.data.Node
+ * @extends Ext.util.Observable
+ * @cfg {Boolean} leaf true if this node is a leaf and does not have children
+ * @cfg {String} id The id for this node. If one is not specified, one is generated.
+ * @constructor
+ * @param {Object} attributes The attributes/config for the node
+ */
+Ext.data.Node = function(attributes){
+    /**
+     * The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
+     * @type {Object}
+     */
+    this.attributes = attributes || {};
+    this.leaf = this.attributes.leaf;
+    /**
+     * The node id. @type String
+     */
+    this.id = this.attributes.id;
+    if(!this.id){
+        this.id = Ext.id(null, "xnode-");
+        this.attributes.id = this.id;
+    }
+    /**
+     * All child nodes of this node. @type Array
+     */
+    this.childNodes = [];
+    if(!this.childNodes.indexOf){ // indexOf is a must
+        this.childNodes.indexOf = function(o){
+            for(var i = 0, len = this.length; i < len; i++){
+                if(this[i] == o){
+                    return i;
+                }
+            }
+            return -1;
+        };
+    }
+    /**
+     * The parent node for this node. @type Node
+     */
+    this.parentNode = null;
+    /**
+     * The first direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.firstChild = null;
+    /**
+     * The last direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.lastChild = null;
+    /**
+     * The node immediately preceding this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.previousSibling = null;
+    /**
+     * The node immediately following this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.nextSibling = null;
+
+    this.addEvents({
+       /**
+        * @event append
+        * Fires when a new child node is appended
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append" : true,
+       /**
+        * @event remove
+        * Fires when a child node is removed
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The removed node
+        */
+       "remove" : true,
+       /**
+        * @event move
+        * Fires when this node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move" : true,
+       /**
+        * @event insert
+        * Fires when a new child node is inserted.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert" : true,
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend" : true,
+       /**
+        * @event beforeremove
+        * Fires before a child is removed, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove" : true,
+       /**
+        * @event beforemove
+        * Fires before this node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The parent of this node
+        * @param {Node} newParent The new parent this node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove" : true,
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert" : true
+   });
+    this.listeners = this.attributes.listeners;
+    Ext.data.Node.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Node, Ext.util.Observable, {
+    // private
+    fireEvent : function(evtName){
+        // first do standard event for this node
+        if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){
+            return false;
+        }
+        // then bubble it up to the tree if the event wasn't cancelled
+        var ot = this.getOwnerTree();
+        if(ot){
+            if(ot.proxyNodeEvent.apply(ot, arguments) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Returns true if this node is a leaf
+     * @return {Boolean}
+     */
+    isLeaf : function(){
+        return this.leaf === true;
+    },
+
+    // private
+    setFirstChild : function(node){
+        this.firstChild = node;
+    },
+
+    //private
+    setLastChild : function(node){
+        this.lastChild = node;
+    },
+
+
+    /**
+     * Returns true if this node is the last child of its parent
+     * @return {Boolean}
+     */
+    isLast : function(){
+       return (!this.parentNode ? true : this.parentNode.lastChild == this);
+    },
+
+    /**
+     * Returns true if this node is the first child of its parent
+     * @return {Boolean}
+     */
+    isFirst : function(){
+       return (!this.parentNode ? true : this.parentNode.firstChild == this);
+    },
+
+    /**
+     * Returns true if this node has one or more child nodes, else false.
+     * @return {Boolean}
+     */
+    hasChildNodes : function(){
+        return !this.isLeaf() && this.childNodes.length > 0;
+    },
+    
+    /**
+     * Returns true if this node has one or more child nodes, or if the <tt>expandable</tt>
+     * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false.
+     * @return {Boolean}
+     */
+    isExpandable : function(){
+        return this.attributes.expandable || this.hasChildNodes();
+    },
+
+    /**
+     * Insert node(s) as the last child node of this node.
+     * @param {Node/Array} node The node or Array of nodes to append
+     * @return {Node} The appended node if single append, or null if an array was passed
+     */
+    appendChild : function(node){
+        var multi = false;
+        if(Ext.isArray(node)){
+            multi = node;
+        }else if(arguments.length > 1){
+            multi = arguments;
+        }
+        // if passed an array or multiple args do them one by one
+        if(multi){
+            for(var i = 0, len = multi.length; i < len; i++) {
+            	this.appendChild(multi[i]);
+            }
+        }else{
+            if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){
+                return false;
+            }
+            var index = this.childNodes.length;
+            var oldParent = node.parentNode;
+            // it's a move, make sure we move it cleanly
+            if(oldParent){
+                if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){
+                    return false;
+                }
+                oldParent.removeChild(node);
+            }
+            index = this.childNodes.length;
+            if(index === 0){
+                this.setFirstChild(node);
+            }
+            this.childNodes.push(node);
+            node.parentNode = this;
+            var ps = this.childNodes[index-1];
+            if(ps){
+                node.previousSibling = ps;
+                ps.nextSibling = node;
+            }else{
+                node.previousSibling = null;
+            }
+            node.nextSibling = null;
+            this.setLastChild(node);
+            node.setOwnerTree(this.getOwnerTree());
+            this.fireEvent("append", this.ownerTree, this, node, index);
+            if(oldParent){
+                node.fireEvent("move", this.ownerTree, node, oldParent, this, index);
+            }
+            return node;
+        }
+    },
+
+    /**
+     * Removes a child node from this node.
+     * @param {Node} node The node to remove
+     * @return {Node} The removed node
+     */
+    removeChild : function(node){
+        var index = this.childNodes.indexOf(node);
+        if(index == -1){
+            return false;
+        }
+        if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){
+            return false;
+        }
+
+        // remove it from childNodes collection
+        this.childNodes.splice(index, 1);
+
+        // update siblings
+        if(node.previousSibling){
+            node.previousSibling.nextSibling = node.nextSibling;
+        }
+        if(node.nextSibling){
+            node.nextSibling.previousSibling = node.previousSibling;
+        }
+
+        // update child refs
+        if(this.firstChild == node){
+            this.setFirstChild(node.nextSibling);
+        }
+        if(this.lastChild == node){
+            this.setLastChild(node.previousSibling);
+        }
+
+        node.setOwnerTree(null);
+        // clear any references from the node
+        node.parentNode = null;
+        node.previousSibling = null;
+        node.nextSibling = null;
+        this.fireEvent("remove", this.ownerTree, this, node);
+        return node;
+    },
+
+    /**
+     * Inserts the first node before the second node in this nodes childNodes collection.
+     * @param {Node} node The node to insert
+     * @param {Node} refNode The node to insert before (if null the node is appended)
+     * @return {Node} The inserted node
+     */
+    insertBefore : function(node, refNode){
+        if(!refNode){ // like standard Dom, refNode can be null for append
+            return this.appendChild(node);
+        }
+        // nothing to do
+        if(node == refNode){
+            return false;
+        }
+
+        if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){
+            return false;
+        }
+        var index = this.childNodes.indexOf(refNode);
+        var oldParent = node.parentNode;
+        var refIndex = index;
+
+        // when moving internally, indexes will change after remove
+        if(oldParent == this && this.childNodes.indexOf(node) < index){
+            refIndex--;
+        }
+
+        // it's a move, make sure we move it cleanly
+        if(oldParent){
+            if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){
+                return false;
+            }
+            oldParent.removeChild(node);
+        }
+        if(refIndex === 0){
+            this.setFirstChild(node);
+        }
+        this.childNodes.splice(refIndex, 0, node);
+        node.parentNode = this;
+        var ps = this.childNodes[refIndex-1];
+        if(ps){
+            node.previousSibling = ps;
+            ps.nextSibling = node;
+        }else{
+            node.previousSibling = null;
+        }
+        node.nextSibling = refNode;
+        refNode.previousSibling = node;
+        node.setOwnerTree(this.getOwnerTree());
+        this.fireEvent("insert", this.ownerTree, this, node, refNode);
+        if(oldParent){
+            node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode);
+        }
+        return node;
+    },
+
+    /**
+     * Removes this node from its parent
+     * @return {Node} this
+     */
+    remove : function(){
+        this.parentNode.removeChild(this);
+        return this;
+    },
+
+    /**
+     * Returns the child node at the specified index.
+     * @param {Number} index
+     * @return {Node}
+     */
+    item : function(index){
+        return this.childNodes[index];
+    },
+
+    /**
+     * Replaces one child node in this node with another.
+     * @param {Node} newChild The replacement node
+     * @param {Node} oldChild The node to replace
+     * @return {Node} The replaced node
+     */
+    replaceChild : function(newChild, oldChild){
+        var s = oldChild ? oldChild.nextSibling : null;
+        this.removeChild(oldChild);
+        this.insertBefore(newChild, s);
+        return oldChild;
+    },
+
+    /**
+     * Returns the index of a child node
+     * @param {Node} node
+     * @return {Number} The index of the node or -1 if it was not found
+     */
+    indexOf : function(child){
+        return this.childNodes.indexOf(child);
+    },
+
+    /**
+     * Returns the tree this node is in.
+     * @return {Tree}
+     */
+    getOwnerTree : function(){
+        // if it doesn't have one, look for one
+        if(!this.ownerTree){
+            var p = this;
+            while(p){
+                if(p.ownerTree){
+                    this.ownerTree = p.ownerTree;
+                    break;
+                }
+                p = p.parentNode;
+            }
+        }
+        return this.ownerTree;
+    },
+
+    /**
+     * Returns depth of this node (the root node has a depth of 0)
+     * @return {Number}
+     */
+    getDepth : function(){
+        var depth = 0;
+        var p = this;
+        while(p.parentNode){
+            ++depth;
+            p = p.parentNode;
+        }
+        return depth;
+    },
+
+    // private
+    setOwnerTree : function(tree){
+        // if it is a move, we need to update everyone
+        if(tree != this.ownerTree){
+            if(this.ownerTree){
+                this.ownerTree.unregisterNode(this);
+            }
+            this.ownerTree = tree;
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].setOwnerTree(tree);
+            }
+            if(tree){
+                tree.registerNode(this);
+            }
+        }
+    },
+    
+    /**
+     * Changes the id of this node.
+     * @param {String} id The new id for the node.
+     */
+    setId: function(id){
+        if(id !== this.id){
+            var t = this.ownerTree;
+            if(t){
+                t.unregisterNode(this);
+            }
+            this.id = id;
+            if(t){
+                t.registerNode(this);
+            }
+            this.onIdChange(id);
+        }
+    },
+    
+    // private
+    onIdChange: Ext.emptyFn,
+
+    /**
+     * Returns the path for this node. The path can be used to expand or select this node programmatically.
+     * @param {String} attr (optional) The attr to use for the path (defaults to the node's id)
+     * @return {String} The path
+     */
+    getPath : function(attr){
+        attr = attr || "id";
+        var p = this.parentNode;
+        var b = [this.attributes[attr]];
+        while(p){
+            b.unshift(p.attributes[attr]);
+            p = p.parentNode;
+        }
+        var sep = this.getOwnerTree().pathSeparator;
+        return sep + b.join(sep);
+    },
+
+    /**
+     * Bubbles up the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.parentNode;
+        }
+    },
+
+    /**
+     * Cascades down the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].cascade(fn, scope, args);
+            }
+        }
+    },
+
+    /**
+     * Interates the child nodes of this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the iteration stops.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    eachChild : function(fn, scope, args){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.apply(scope || this, args || [cs[i]]) === false){
+        	    break;
+        	}
+        }
+    },
+
+    /**
+     * Finds the first child that has the attribute with the specified value.
+     * @param {String} attribute The attribute name
+     * @param {Mixed} value The value to search for
+     * @return {Node} The found child or null if none was found
+     */
+    findChild : function(attribute, value){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(cs[i].attributes[attribute] == value){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Finds the first child by a custom function. The child matches if the function passed
+     * returns true.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Node} The found child or null if none was found
+     */
+    findChildBy : function(fn, scope){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.call(scope||cs[i], cs[i]) === true){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Sorts this nodes children using the supplied sort function
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     */
+    sort : function(fn, scope){
+        var cs = this.childNodes;
+        var len = cs.length;
+        if(len > 0){
+            var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn;
+            cs.sort(sortFn);
+            for(var i = 0; i < len; i++){
+                var n = cs[i];
+                n.previousSibling = cs[i-1];
+                n.nextSibling = cs[i+1];
+                if(i === 0){
+                    this.setFirstChild(n);
+                }
+                if(i == len-1){
+                    this.setLastChild(n);
+                }
+            }
+        }
+    },
+
+    /**
+     * Returns true if this node is an ancestor (at any point) of the passed node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    contains : function(node){
+        return node.isAncestor(this);
+    },
+
+    /**
+     * Returns true if the passed node is an ancestor (at any point) of this node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    isAncestor : function(node){
+        var p = this.parentNode;
+        while(p){
+            if(p == node){
+                return true;
+            }
+            p = p.parentNode;
+        }
+        return false;
+    },
+
+    toString : function(){
+        return "[Node"+(this.id?" "+this.id:"")+"]";
+    }
+});/**
+ * @class Ext.tree.TreeNode
+ * @extends Ext.data.Node
+ * @cfg {String} text The text for this node
+ * @cfg {Boolean} expanded true to start the node expanded
+ * @cfg {Boolean} allowDrag False to make this node undraggable if {@link #draggable} = true (defaults to true)
+ * @cfg {Boolean} allowDrop False if this node cannot have child nodes dropped on it (defaults to true)
+ * @cfg {Boolean} disabled true to start the node disabled
+ * @cfg {String} icon The path to an icon for the node. The preferred way to do this
+ * is to use the cls or iconCls attributes and add the icon via a CSS background image.
+ * @cfg {String} cls A css class to be added to the node
+ * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images
+ * @cfg {String} href URL of the link used for the node (defaults to #)
+ * @cfg {String} hrefTarget target frame for the link
+ * @cfg {Boolean} hidden True to render hidden. (Defaults to false).
+ * @cfg {String} qtip An Ext QuickTip for the node
+ * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty
+ * @cfg {String} qtipCfg An Ext QuickTip config for the node (used instead of qtip)
+ * @cfg {Boolean} singleClickExpand True for single click expand on this node
+ * @cfg {Function} uiProvider A UI <b>class</b> to use for this node (defaults to Ext.tree.TreeNodeUI)
+ * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox
+ * (defaults to undefined with no checkbox rendered)
+ * @cfg {Boolean} draggable True to make this node draggable (defaults to false)
+ * @cfg {Boolean} isTarget False to not allow this node to act as a drop target (defaults to true)
+ * @cfg {Boolean} allowChildren False to not allow this node to have child nodes (defaults to true)
+ * @cfg {Boolean} editable False to not allow this node to be edited by an (@link Ext.tree.TreeEditor} (defaults to true)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node
+ */
+Ext.tree.TreeNode = function(attributes){
+    attributes = attributes || {};
+    if(typeof attributes == "string"){
+        attributes = {text: attributes};
+    }
+    this.childrenRendered = false;
+    this.rendered = false;
+    Ext.tree.TreeNode.superclass.constructor.call(this, attributes);
+    this.expanded = attributes.expanded === true;
+    this.isTarget = attributes.isTarget !== false;
+    this.draggable = attributes.draggable !== false && attributes.allowDrag !== false;
+    this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false;
+
+    /**
+     * Read-only. The text for this node. To change it use setText().
+     * @type String
+     */
+    this.text = attributes.text;
+    /**
+     * True if this node is disabled.
+     * @type Boolean
+     */
+    this.disabled = attributes.disabled === true;
+    /**
+     * True if this node is hidden.
+     * @type Boolean
+     */
+    this.hidden = attributes.hidden === true;
+
+    this.addEvents(
+        /**
+        * @event textchange
+        * Fires when the text for this node is changed
+        * @param {Node} this This node
+        * @param {String} text The new text
+        * @param {String} oldText The old text
+        */
+        "textchange",
+        /**
+        * @event beforeexpand
+        * Fires before this node is expanded, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforeexpand",
+        /**
+        * @event beforecollapse
+        * Fires before this node is collapsed, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforecollapse",
+        /**
+        * @event expand
+        * Fires when this node is expanded
+        * @param {Node} this This node
+        */
+        "expand",
+        /**
+        * @event disabledchange
+        * Fires when the disabled status of this node changes
+        * @param {Node} this This node
+        * @param {Boolean} disabled
+        */
+        "disabledchange",
+        /**
+        * @event collapse
+        * Fires when this node is collapsed
+        * @param {Node} this This node
+        */
+        "collapse",
+        /**
+        * @event beforeclick
+        * Fires before click processing. Return false to cancel the default action.
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "beforeclick",
+        /**
+        * @event click
+        * Fires when this node is clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "click",
+        /**
+        * @event checkchange
+        * Fires when a node with a checkbox's checked property changes
+        * @param {Node} this This node
+        * @param {Boolean} checked
+        */
+        "checkchange",
+        /**
+        * @event dblclick
+        * Fires when this node is double clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "dblclick",
+        /**
+        * @event contextmenu
+        * Fires when this node is right clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "contextmenu",
+        /**
+        * @event beforechildrenrendered
+        * Fires right before the child nodes for this node are rendered
+        * @param {Node} this This node
+        */
+        "beforechildrenrendered"
+    );
+
+    var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;
+
+    /**
+     * Read-only. The UI for this node
+     * @type TreeNodeUI
+     */
+    this.ui = new uiClass(this);
+};
+Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
+    preventHScroll: true,
+    /**
+     * Returns true if this node is expanded
+     * @return {Boolean}
+     */
+    isExpanded : function(){
+        return this.expanded;
+    },
+
+/**
+ * Returns the UI object for this node.
+ * @return {TreeNodeUI} The object which is providing the user interface for this tree
+ * node. Unless otherwise specified in the {@link #uiProvider}, this will be an instance
+ * of {@link Ext.tree.TreeNodeUI}
+ */
+    getUI : function(){
+        return this.ui;
+    },
+
+    getLoader : function(){
+        var owner;
+        return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : new Ext.tree.TreeLoader());
+    },
+
+    // private override
+    setFirstChild : function(node){
+        var of = this.firstChild;
+        Ext.tree.TreeNode.superclass.setFirstChild.call(this, node);
+        if(this.childrenRendered && of && node != of){
+            of.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // private override
+    setLastChild : function(node){
+        var ol = this.lastChild;
+        Ext.tree.TreeNode.superclass.setLastChild.call(this, node);
+        if(this.childrenRendered && ol && node != ol){
+            ol.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // these methods are overridden to provide lazy rendering support
+    // private override
+    appendChild : function(n){
+        if(!n.render && !Ext.isArray(n)){
+            n = this.getLoader().createNode(n);
+        }
+        var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n);
+        if(node && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return node;
+    },
+
+    // private override
+    removeChild : function(node){
+        this.ownerTree.getSelectionModel().unselect(node);
+        Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments);
+        // if it's been rendered remove dom node
+        if(this.childrenRendered){
+            node.ui.remove();
+        }
+        if(this.childNodes.length < 1){
+            this.collapse(false, false);
+        }else{
+            this.ui.updateExpandIcon();
+        }
+        if(!this.firstChild && !this.isHiddenRoot()) {
+            this.childrenRendered = false;
+        }
+        return node;
+    },
+
+    // private override
+    insertBefore : function(node, refNode){
+        if(!node.render){ 
+            node = this.getLoader().createNode(node);
+        }
+        var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode);
+        if(newNode && refNode && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return newNode;
+    },
+
+    /**
+     * Sets the text for this node
+     * @param {String} text
+     */
+    setText : function(text){
+        var oldText = this.text;
+        this.text = text;
+        this.attributes.text = text;
+        if(this.rendered){ // event without subscribing
+            this.ui.onTextChange(this, text, oldText);
+        }
+        this.fireEvent("textchange", this, text, oldText);
+    },
+
+    /**
+     * Triggers selection of this node
+     */
+    select : function(){
+        this.getOwnerTree().getSelectionModel().select(this);
+    },
+
+    /**
+     * Triggers deselection of this node
+     */
+    unselect : function(){
+        this.getOwnerTree().getSelectionModel().unselect(this);
+    },
+
+    /**
+     * Returns true if this node is selected
+     * @return {Boolean}
+     */
+    isSelected : function(){
+        return this.getOwnerTree().getSelectionModel().isSelected(this);
+    },
+
+    /**
+     * Expand this node.
+     * @param {Boolean} deep (optional) True to expand all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    expand : function(deep, anim, callback, scope){
+        if(!this.expanded){
+            if(this.fireEvent("beforeexpand", this, deep, anim) === false){
+                return;
+            }
+            if(!this.childrenRendered){
+                this.renderChildren();
+            }
+            this.expanded = true;
+            if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animExpand(function(){
+                    this.fireEvent("expand", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.expandChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.expand();
+                this.fireEvent("expand", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else{
+           this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            this.expandChildNodes(true);
+        }
+    },
+    
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isHiddenRoot : function(){
+        return this.isRoot && !this.getOwnerTree().rootVisible;
+    },
+
+    /**
+     * Collapse this node.
+     * @param {Boolean} deep (optional) True to collapse all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    collapse : function(deep, anim, callback, scope){
+        if(this.expanded && !this.isHiddenRoot()){
+            if(this.fireEvent("beforecollapse", this, deep, anim) === false){
+                return;
+            }
+            this.expanded = false;
+            if((this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animCollapse(function(){
+                    this.fireEvent("collapse", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.collapseChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.collapse();
+                this.fireEvent("collapse", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else if(!this.expanded){
+            this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].collapse(true, false);
+            }
+        }
+    },
+
+    // private
+    delayedExpand : function(delay){
+        if(!this.expandProcId){
+            this.expandProcId = this.expand.defer(delay, this);
+        }
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+        }
+        this.expandProcId = false;
+    },
+
+    /**
+     * Toggles expanded/collapsed state of the node
+     */
+    toggle : function(){
+        if(this.expanded){
+            this.collapse();
+        }else{
+            this.expand();
+        }
+    },
+
+    /**
+     * Ensures all parent nodes are expanded, and if necessary, scrolls
+     * the node into view.
+     * @param {Function} callback (optional) A function to call when the node has been made visible.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    ensureVisible : function(callback, scope){
+        var tree = this.getOwnerTree();
+        tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){
+            var node = tree.getNodeById(this.id);  // Somehow if we don't do this, we lose changes that happened to node in the meantime
+            tree.getTreeEl().scrollChildIntoView(node.ui.anchor);
+            this.runCallback(callback, scope || this, [this]);
+        }.createDelegate(this));
+    },
+
+    /**
+     * Expand all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes
+     */
+    expandChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].expand(deep);
+        }
+    },
+
+    /**
+     * Collapse all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also collapse their child nodes
+     */
+    collapseChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].collapse(deep);
+        }
+    },
+
+    /**
+     * Disables this node
+     */
+    disable : function(){
+        this.disabled = true;
+        this.unselect();
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, true);
+        }
+        this.fireEvent("disabledchange", this, true);
+    },
+
+    /**
+     * Enables this node
+     */
+    enable : function(){
+        this.disabled = false;
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, false);
+        }
+        this.fireEvent("disabledchange", this, false);
+    },
+
+    // private
+    renderChildren : function(suppressEvent){
+        if(suppressEvent !== false){
+            this.fireEvent("beforechildrenrendered", this);
+        }
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].render(true);
+        }
+        this.childrenRendered = true;
+    },
+
+    // private
+    sort : function(fn, scope){
+        Ext.tree.TreeNode.superclass.sort.apply(this, arguments);
+        if(this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].render(true);
+            }
+        }
+    },
+
+    // private
+    render : function(bulkRender){
+        this.ui.render(bulkRender);
+        if(!this.rendered){
+            // make sure it is registered
+            this.getOwnerTree().registerNode(this);
+            this.rendered = true;
+            if(this.expanded){
+                this.expanded = false;
+                this.expand(false, false);
+            }
+        }
+    },
+
+    // private
+    renderIndent : function(deep, refresh){
+        if(refresh){
+            this.ui.childIndent = null;
+        }
+        this.ui.renderIndent();
+        if(deep === true && this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].renderIndent(true, refresh);
+            }
+        }
+    },
+
+    beginUpdate : function(){
+        this.childrenRendered = false;
+    },
+
+    endUpdate : function(){
+        if(this.expanded && this.rendered){
+            this.renderChildren();
+        }
+    },
+
+    destroy : function(){
+        if(this.childNodes){
+            for(var i = 0,l = this.childNodes.length; i < l; i++){
+                this.childNodes[i].destroy();
+            }
+            this.childNodes = null;
+        }
+        if(this.ui.destroy){
+            this.ui.destroy();
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        this.ui.onIdChange(id);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;/**
+ * @class Ext.tree.AsyncTreeNode
+ * @extends Ext.tree.TreeNode
+ * @cfg {TreeLoader} loader A TreeLoader to be used by this node (defaults to the loader defined on the tree)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node 
+ */
+ Ext.tree.AsyncTreeNode = function(config){
+    this.loaded = config && config.loaded === true;
+    this.loading = false;
+    Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments);
+    /**
+    * @event beforeload
+    * Fires before this node is loaded, return false to cancel
+    * @param {Node} this This node
+    */
+    this.addEvents('beforeload', 'load');
+    /**
+    * @event load
+    * Fires when this node is loaded
+    * @param {Node} this This node
+    */
+    /**
+     * The loader used by this node (defaults to using the tree's defined loader)
+     * @type TreeLoader
+     * @property loader
+     */
+};
+Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
+    expand : function(deep, anim, callback, scope){
+        if(this.loading){ // if an async load is already running, waiting til it's done
+            var timer;
+            var f = function(){
+                if(!this.loading){ // done loading
+                    clearInterval(timer);
+                    this.expand(deep, anim, callback, scope);
+                }
+            }.createDelegate(this);
+            timer = setInterval(f, 200);
+            return;
+        }
+        if(!this.loaded){
+            if(this.fireEvent("beforeload", this) === false){
+                return;
+            }
+            this.loading = true;
+            this.ui.beforeLoad(this);
+            var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader();
+            if(loader){
+                loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback, scope]), this);
+                return;
+            }
+        }
+        Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node is currently loading
+     * @return {Boolean}
+     */
+    isLoading : function(){
+        return this.loading;  
+    },
+    
+    loadComplete : function(deep, anim, callback, scope){
+        this.loading = false;
+        this.loaded = true;
+        this.ui.afterLoad(this);
+        this.fireEvent("load", this);
+        this.expand(deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node has been loaded
+     * @return {Boolean}
+     */
+    isLoaded : function(){
+        return this.loaded;
+    },
+    
+    hasChildNodes : function(){
+        if(!this.isLeaf() && !this.loaded){
+            return true;
+        }else{
+            return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this);
+        }
+    },
+
+    /**
+     * Trigger a reload for this node
+     * @param {Function} callback
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    reload : function(callback, scope){
+        this.collapse(false, false);
+        while(this.firstChild){
+            this.removeChild(this.firstChild).destroy();
+        }
+        this.childrenRendered = false;
+        this.loaded = false;
+        if(this.isHiddenRoot()){
+            this.expanded = false;
+        }
+        this.expand(false, false, callback, scope);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;/**
+ * @class Ext.tree.TreeNodeUI
+ * This class provides the default UI implementation for Ext TreeNodes.
+ * The TreeNode UI implementation is separate from the
+ * tree implementation, and allows customizing of the appearance of
+ * tree nodes.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ * <p>
+ * This class provides access to the user interface components of an Ext TreeNode, through
+ * {@link Ext.tree.TreeNode#getUI}
+ */
+Ext.tree.TreeNodeUI = function(node){
+    this.node = node;
+    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 = {
+    // private
+    removeChild : function(node){
+        if(this.rendered){
+            this.ctNode.removeChild(node.ui.getEl());
+        } 
+    },
+
+    // private
+    beforeLoad : function(){
+         this.addClass("x-tree-node-loading");
+    },
+
+    // private
+    afterLoad : function(){
+         this.removeClass("x-tree-node-loading");
+    },
+
+    // private
+    onTextChange : function(node, text, oldText){
+        if(this.rendered){
+            this.textNode.innerHTML = text;
+        }
+    },
+
+    // private
+    onDisableChange : function(node, state){
+        this.disabled = state;
+		if (this.checkbox) {
+			this.checkbox.disabled = state;
+		}        
+        if(state){
+            this.addClass("x-tree-node-disabled");
+        }else{
+            this.removeClass("x-tree-node-disabled");
+        } 
+    },
+
+    // private
+    onSelectedChange : function(state){
+        if(state){
+            this.focus();
+            this.addClass("x-tree-selected");
+        }else{
+            //this.blur();
+            this.removeClass("x-tree-selected");
+        }
+    },
+
+    // private
+    onMove : function(tree, node, oldParent, newParent, index, refNode){
+        this.childIndent = null;
+        if(this.rendered){
+            var targetNode = newParent.ui.getContainer();
+            if(!targetNode){//target not rendered
+                this.holder = document.createElement("div");
+                this.holder.appendChild(this.wrap);
+                return;
+            }
+            var insertBefore = refNode ? refNode.ui.getEl() : null;
+            if(insertBefore){
+                targetNode.insertBefore(this.wrap, insertBefore);
+            }else{
+                targetNode.appendChild(this.wrap);
+            }
+            this.node.renderIndent(true, oldParent != newParent);
+        }
+    },
+
+/**
+ * Adds one or more CSS classes to the node's UI element.
+ * Duplicate classes are automatically filtered out.
+ * @param {String/Array} className The CSS class to add, or an array of classes
+ */
+    addClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).addClass(cls);
+        }
+    },
+
+/**
+ * Removes one or more CSS classes from the node's UI element.
+ * @param {String/Array} className The CSS class to remove, or an array of classes
+ */
+    removeClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).removeClass(cls);  
+        }
+    },
+
+    // private
+    remove : function(){
+        if(this.rendered){
+            this.holder = document.createElement("div");
+            this.holder.appendChild(this.wrap);
+        }  
+    },
+
+    // private
+    fireEvent : function(){
+        return this.node.fireEvent.apply(this.node, arguments);  
+    },
+
+    // private
+    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 ot = this.node.getOwnerTree();
+        var dd = ot.enableDD || ot.enableDrag || ot.enableDrop;
+        if(dd && (!this.node.isRoot || ot.rootVisible)){
+            Ext.dd.Registry.register(this.elNode, {
+                node: this.node,
+                handles: this.getDDHandles(),
+                isHandle: false
+            });
+        }
+    },
+
+    // private
+    getDDHandles : function(){
+        return [this.iconNode, this.textNode, this.elNode];
+    },
+
+/**
+ * Hides this node.
+ */
+    hide : function(){
+        this.node.hidden = true;
+        if(this.wrap){
+            this.wrap.style.display = "none";
+        }
+    },
+
+/**
+ * Shows this node.
+ */
+    show : function(){
+        this.node.hidden = false;
+        if(this.wrap){
+            this.wrap.style.display = "";
+        } 
+    },
+
+    // private
+    onContextMenu : function(e){
+        if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) {
+            e.preventDefault();
+            this.focus();
+            this.fireEvent("contextmenu", this.node, e);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        if(this.dropping){
+            e.stopEvent();
+            return;
+        }
+        if(this.fireEvent("beforeclick", this.node, e) !== false){
+            var a = e.getTarget('a');
+            if(!this.disabled && this.node.attributes.href && a){
+                this.fireEvent("click", this.node, e);
+                return;
+            }else if(a && e.ctrlKey){
+                e.stopEvent();
+            }
+            e.preventDefault();
+            if(this.disabled){
+                return;
+            }
+
+            if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){
+                this.node.toggle();
+            }
+
+            this.fireEvent("click", this.node, e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        e.preventDefault();
+        if(this.disabled){
+            return;
+        }
+        if(this.checkbox){
+            this.toggleCheck();
+        }
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+        this.fireEvent("dblclick", this.node, e);
+    },
+
+    onOver : function(e){
+        this.addClass('x-tree-node-over');
+    },
+
+    onOut : function(e){
+        this.removeClass('x-tree-node-over');
+    },
+
+    // private
+    onCheckChange : function(){
+        var checked = this.checkbox.checked;
+		// fix for IE6
+		this.checkbox.defaultChecked = checked;		
+        this.node.attributes.checked = checked;
+        this.fireEvent('checkchange', this.node, checked);
+    },
+
+    // private
+    ecClick : function(e){
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+    },
+
+    // private
+    startDrop : function(){
+        this.dropping = true;
+    },
+    
+    // delayed drop so the click event doesn't get fired on a drop
+    endDrop : function(){ 
+       setTimeout(function(){
+           this.dropping = false;
+       }.createDelegate(this), 50); 
+    },
+
+    // private
+    expand : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "";
+    },
+
+    // private
+    focus : function(){
+        if(!this.node.preventHScroll){
+            try{this.anchor.focus();
+            }catch(e){}
+        }else{
+            try{
+                var noscroll = this.node.getOwnerTree().getTreeEl().dom;
+                var l = noscroll.scrollLeft;
+                this.anchor.focus();
+                noscroll.scrollLeft = l;
+            }catch(e){}
+        }
+    },
+
+/**
+ * Sets the checked status of the tree node to the passed value, or, if no value was passed,
+ * toggles the checked status. If the node was rendered with no checkbox, this has no effect.
+ * @param {Boolean} (optional) The new checked status.
+ */
+    toggleCheck : function(value){
+        var cb = this.checkbox;
+        if(cb){
+            cb.checked = (value === undefined ? !cb.checked : value);
+            this.onCheckChange();
+        }
+    },
+
+    // private
+    blur : function(){
+        try{
+            this.anchor.blur();
+        }catch(e){} 
+    },
+
+    // private
+    animExpand : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.stopFx();
+        if(!this.node.isExpandable()){
+            this.updateExpandIcon();
+            this.ctNode.style.display = "";
+            Ext.callback(callback);
+            return;
+        }
+        this.animating = true;
+        this.updateExpandIcon();
+        
+        ct.slideIn('t', {
+           callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    highlight : function(){
+        var tree = this.node.getOwnerTree();
+        Ext.fly(this.wrap).highlight(
+            tree.hlColor || "C3DAF9",
+            {endColor: tree.hlBaseColor}
+        );
+    },
+
+    // private
+    collapse : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "none";
+    },
+
+    // private
+    animCollapse : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.enableDisplayMode('block');
+        ct.stopFx();
+
+        this.animating = true;
+        this.updateExpandIcon();
+
+        ct.slideOut('t', {
+            callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    getContainer : function(){
+        return this.ctNode;  
+    },
+
+    // private
+    getEl : function(){
+        return this.wrap;  
+    },
+
+    // private
+    appendDDGhost : function(ghostNode){
+        ghostNode.appendChild(this.elNode.cloneNode(true));
+    },
+
+    // private
+    getDDRepairXY : function(){
+        return Ext.lib.Dom.getXY(this.iconNode);
+    },
+
+    // private
+    onRender : function(){
+        this.render();    
+    },
+
+    // private
+    render : function(bulkRender){
+        var n = this.node, a = n.attributes;
+        var targetNode = n.parentNode ? 
+              n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom;
+        
+        if(!this.rendered){
+            this.rendered = true;
+
+            this.renderElements(n, a, targetNode, bulkRender);
+
+            if(a.qtip){
+               if(this.textNode.setAttributeNS){
+                   this.textNode.setAttributeNS("ext", "qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttributeNS("ext", "qtitle", a.qtipTitle);
+                   }
+               }else{
+                   this.textNode.setAttribute("ext:qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttribute("ext:qtitle", a.qtipTitle);
+                   }
+               } 
+            }else if(a.qtipCfg){
+                a.qtipCfg.target = Ext.id(this.textNode);
+                Ext.QuickTips.register(a.qtipCfg);
+            }
+            this.initEvents();
+            if(!this.node.expanded){
+                this.updateExpandIcon(true);
+            }
+        }else{
+            if(bulkRender === true) {
+                targetNode.appendChild(this.wrap);
+            }
+        }
+    },
+
+    // private
+    renderElements : function(n, a, targetNode, bulkRender){
+        // add some indent caching, this helps performance when rendering a large tree
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var cb = typeof a.checked == 'boolean';
+
+        var href = a.href ? a.href : Ext.isGecko ? "" : "#";
+        var buf = ['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.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="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
+            cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '',
+            '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',
+             a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>",
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>"].join('');
+
+        var nel;
+        if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf);
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf);
+        }
+        
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        var index = 3;
+        if(cb){
+            this.checkbox = cs[3];
+			// fix for IE6
+			this.checkbox.defaultChecked = this.checkbox.checked;						
+            index++;
+        }
+        this.anchor = cs[index];
+        this.textNode = cs[index].firstChild;
+    },
+
+/**
+ * Returns the &lt;a> element that provides focus for the node's UI.
+ * @return {HtmlElement} The DOM anchor element.
+ */
+    getAnchor : function(){
+        return this.anchor;
+    },
+    
+/**
+ * Returns the text node.
+ * @return {HtmlNode} The DOM text node.
+ */
+    getTextEl : function(){
+        return this.textNode;
+    },
+    
+/**
+ * Returns the icon &lt;img> element.
+ * @return {HtmlElement} The DOM image element.
+ */
+    getIconEl : function(){
+        return this.iconNode;
+    },
+
+/**
+ * Returns the checked status of the node. If the node was rendered with no
+ * checkbox, it returns false.
+ * @return {Boolean} The checked flag.
+ */
+    isChecked : function(){
+        return this.checkbox ? this.checkbox.checked : false; 
+    },
+
+    // private
+    updateExpandIcon : function(){
+        if(this.rendered){
+            var n = this.node, c1, c2;
+            var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
+            var hasChild = n.hasChildNodes();
+            if(hasChild || n.attributes.expandable){
+                if(n.expanded){
+                    cls += "-minus";
+                    c1 = "x-tree-node-collapsed";
+                    c2 = "x-tree-node-expanded";
+                }else{
+                    cls += "-plus";
+                    c1 = "x-tree-node-expanded";
+                    c2 = "x-tree-node-collapsed";
+                }
+                if(this.wasLeaf){
+                    this.removeClass("x-tree-node-leaf");
+                    this.wasLeaf = false;
+                }
+                if(this.c1 != c1 || this.c2 != c2){
+                    Ext.fly(this.elNode).replaceClass(c1, c2);
+                    this.c1 = c1; this.c2 = c2;
+                }
+            }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 ecc = "x-tree-ec-icon "+cls;
+            if(this.ecc != ecc){
+                this.ecNode.className = ecc;
+                this.ecc = ecc;
+            }
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        if(this.rendered){
+            this.elNode.setAttribute('ext:tree-node-id', id);
+        }
+    },
+
+    // private
+    getChildIndent : function(){
+        if(!this.childIndent){
+            var buf = [];
+            var p = this.node;
+            while(p){
+                if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){
+                    if(!p.isLast()) {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />');
+                    } else {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />');
+                    }
+                }
+                p = p.parentNode;
+            }
+            this.childIndent = buf.join("");
+        }
+        return this.childIndent;
+    },
+
+    // private
+    renderIndent : function(){
+        if(this.rendered){
+            var indent = "";
+            var p = this.node.parentNode;
+            if(p){
+                indent = p.ui.getChildIndent();
+            }
+            if(this.indentMarkup != indent){ // don't rerender if not required
+                this.indentNode.innerHTML = indent;
+                this.indentMarkup = indent;
+            }
+            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;
+        
+        if (this.holder){
+             delete this.wrap;
+             Ext.removeNode(this.holder);
+             delete this.holder;
+        }else{
+            Ext.removeNode(this.wrap);
+            delete this.wrap;
+        }
+    }
+};
+
+/**
+ * @class Ext.tree.RootTreeNodeUI
+ * This class provides the default UI implementation for <b>root</b> Ext TreeNodes.
+ * The RootTreeNode UI implementation allows customizing the appearance of the root tree node.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ */
+Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    // private
+    render : function(){
+        if(!this.rendered){
+            var targetNode = this.node.ownerTree.innerCt.dom;
+            this.node.expanded = true;
+            targetNode.innerHTML = '<div class="x-tree-root-node"></div>';
+            this.wrap = this.ctNode = targetNode.firstChild;
+        }
+    },
+    collapse : Ext.emptyFn,
+    expand : Ext.emptyFn
+});/**
+ * @class Ext.tree.TreeLoader
+ * @extends Ext.util.Observable
+ * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child
+ * nodes from a specified URL. The response must be a JavaScript Array definition
+ * whose elements are node definition objects. e.g.:
+ * <pre><code>
+    [{
+        id: 1,
+        text: 'A leaf Node',
+        leaf: true
+    },{
+        id: 2,
+        text: 'A folder Node',
+        children: [{
+            id: 3,
+            text: 'A child Node',
+            leaf: true
+        }]
+   }]
+</code></pre>
+ * <br><br>
+ * A server request is sent, and child nodes are loaded only when a node is expanded.
+ * The loading node's id is passed to the server under the parameter name "node" to
+ * enable the server to produce the correct child nodes.
+ * <br><br>
+ * To pass extra parameters, an event handler may be attached to the "beforeload"
+ * event, and the parameters specified in the TreeLoader's baseParams property:
+ * <pre><code>
+    myTreeLoader.on("beforeload", function(treeLoader, node) {
+        this.baseParams.category = node.attributes.category;
+    }, this);
+</code></pre>
+ * This would pass an HTTP parameter called "category" to the server containing
+ * the value of the Node's "category" attribute.
+ * @constructor
+ * Creates a new Treeloader.
+ * @param {Object} config A config object containing config properties.
+ */
+Ext.tree.TreeLoader = function(config){
+    this.baseParams = {};
+    Ext.apply(this, config);
+
+    this.addEvents(
+        /**
+         * @event beforeload
+         * Fires before a network request is made to retrieve the Json text which specifies a node's children.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} callback The callback function specified in the {@link #load} call.
+         */
+        "beforeload",
+        /**
+         * @event load
+         * Fires when the node has been successfuly loaded.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "load",
+        /**
+         * @event loadexception
+         * Fires if the network request failed.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "loadexception"
+    );
+    Ext.tree.TreeLoader.superclass.constructor.call(this);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+};
+
+Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
+    /**
+    * @cfg {String} dataUrl The URL from which to request a Json string which
+    * specifies an array of node definition objects representing the child nodes
+    * to be loaded.
+    */
+    /**
+     * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+     */
+    /**
+     * @cfg {String} url Equivalent to {@link #dataUrl}.
+     */
+    /**
+     * @cfg {Boolean} preloadChildren If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.
+     */
+    /**
+    * @cfg {Object} baseParams (optional) An object containing properties which
+    * specify HTTP parameters to be passed to each request for child nodes.
+    */
+    /**
+    * @cfg {Object} baseAttrs (optional) An object containing attributes to be added to all nodes
+    * created by this loader. If the attributes sent by the server have an attribute in this object,
+    * they take priority.
+    */
+    /**
+    * @cfg {Object} uiProviders (optional) An object containing properties which
+    * specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional
+    * <i>uiProvider</i> attribute of a returned child node is a string rather
+    * than a reference to a TreeNodeUI implementation, then that string value
+    * is used as a property name in the uiProviders object.
+    */
+    uiProviders : {},
+
+    /**
+    * @cfg {Boolean} clearOnLoad (optional) Default to true. Remove previously existing
+    * child nodes before loading.
+    */
+    clearOnLoad : true,
+
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. Only used when using directFn.
+     * A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used when using directFn.
+     * Send parameters as a collection of named arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.
+     */
+    directFn : undefined,
+
+    /**
+     * Load an {@link Ext.tree.TreeNode} from the URL specified in the constructor.
+     * This is called automatically when a node is expanded, but may be used to reload
+     * a node (or append new children if the {@link #clearOnLoad} option is false.)
+     * @param {Ext.tree.TreeNode} node
+     * @param {Function} callback
+     * @param (Object) scope
+     */
+    load : function(node, callback, scope){
+        if(this.clearOnLoad){
+            while(node.firstChild){
+                node.removeChild(node.firstChild);
+            }
+        }
+        if(this.doPreload(node)){ // preloaded json children
+            this.runCallback(callback, scope || node, []);
+        }else if(this.directFn || this.dataUrl || this.url){
+            this.requestData(node, callback, scope || node);
+        }
+    },
+
+    doPreload : function(node){
+        if(node.attributes.children){
+            if(node.childNodes.length < 1){ // preloaded?
+                var cs = node.attributes.children;
+                node.beginUpdate();
+                for(var i = 0, len = cs.length; i < len; i++){
+                    var cn = node.appendChild(this.createNode(cs[i]));
+                    if(this.preloadChildren){
+                        this.doPreload(cn);
+                    }
+                }
+                node.endUpdate();
+            }
+            return true;
+        }
+        return false;
+    },
+
+    getParams: function(node){
+        var buf = [], bp = this.baseParams;
+        if(this.directFn){
+            buf.push(node.id);
+            if(bp){
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        buf.push(bp[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    buf.push(bp);
+                }
+            }
+            return buf;
+        }else{
+            for(var key in bp){
+                if(!Ext.isFunction(bp[key])){
+                    buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&");
+                }
+            }
+            buf.push("node=", encodeURIComponent(node.id));
+            return buf.join("");
+        }
+    },
+
+    requestData : function(node, callback, scope){
+        if(this.fireEvent("beforeload", this, node, callback) !== false){
+            if(this.directFn){
+                var args = this.getParams(node);
+                args.push(this.processDirectResponse.createDelegate(this, [{callback: callback, node: node, scope: scope}], true));
+                this.directFn.apply(window, args);
+            }else{
+                this.transId = Ext.Ajax.request({
+                    method:this.requestMethod,
+                    url: this.dataUrl||this.url,
+                    success: this.handleResponse,
+                    failure: this.handleFailure,
+                    scope: this,
+                    argument: {callback: callback, node: node, scope: scope},
+                    params: this.getParams(node)
+                });
+            }
+        }else{
+            // if the load is cancelled, make sure we notify
+            // the node that we are done
+            this.runCallback(callback, scope || node, []);
+        }
+    },
+
+    processDirectResponse: function(result, response, args){
+        if(response.status){
+            this.handleResponse({
+                responseData: Ext.isArray(result) ? result : null,
+                responseText: result,
+                argument: args
+            });
+        }else{
+            this.handleFailure({
+                argument: args
+            });
+        }
+    },
+
+    // private
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isLoading : function(){
+        return !!this.transId;
+    },
+
+    abort : function(){
+        if(this.isLoading()){
+            Ext.Ajax.abort(this.transId);
+        }
+    },
+
+    /**
+    * <p>Override this function for custom TreeNode node implementation, or to
+    * modify the attributes at creation time.</p>
+    * Example:<pre><code>
+new Ext.tree.TreePanel({
+    ...
+    new Ext.tree.TreeLoader({
+        url: 'dataUrl',
+        createNode: function(attr) {
+//          Allow consolidation consignments to have
+//          consignments dropped into them.
+            if (attr.isConsolidation) {
+                attr.iconCls = 'x-consol',
+                attr.allowDrop = true;
+            }
+            return Ext.tree.TreeLoader.prototype.call(this, attr);
+        }
+    }),
+    ...
+});
+</code></pre>
+    * @param attr {Object} The attributes from which to create the new node.
+    */
+    createNode : function(attr){
+        // apply baseAttrs, nice idea Corey!
+        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, scope){
+        var json = response.responseText;
+        try {
+            var o = response.responseData || Ext.decode(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();
+            this.runCallback(callback, scope || node, [node]);
+        }catch(e){
+            this.handleFailure(response);
+        }
+    },
+
+    handleResponse : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.processResponse(response, a.node, a.callback, a.scope);
+        this.fireEvent("load", this, a.node, response);
+    },
+
+    handleFailure : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.fireEvent("loadexception", this, a.node, response);
+        this.runCallback(a.callback, a.scope || a.node, [a.node]);
+    }
+});/**
+ * @class Ext.tree.TreeFilter
+ * Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes
+ * @param {TreePanel} tree
+ * @param {Object} config (optional)
+ */
+Ext.tree.TreeFilter = function(tree, config){
+    this.tree = tree;
+    this.filtered = {};
+    Ext.apply(this, config);
+};
+
+Ext.tree.TreeFilter.prototype = {
+    clearBlank:false,
+    reverse:false,
+    autoClear:false,
+    remove:false,
+
+     /**
+     * Filter the data by a specific attribute.
+     * @param {String/RegExp} value Either string that the attribute value
+     * should start with or a RegExp to test against the attribute
+     * @param {String} attr (optional) The attribute passed in your node's attributes collection. Defaults to "text".
+     * @param {TreeNode} startNode (optional) The node to start the filter at.
+     */
+    filter : function(value, attr, startNode){
+        attr = attr || "text";
+        var f;
+        if(typeof value == "string"){
+            var vlen = value.length;
+            // auto clear empty filter
+            if(vlen == 0 && this.clearBlank){
+                this.clear();
+                return;
+            }
+            value = value.toLowerCase();
+            f = function(n){
+                return n.attributes[attr].substr(0, vlen).toLowerCase() == value;
+            };
+        }else if(value.exec){ // regex?
+            f = function(n){
+                return value.test(n.attributes[attr]);
+            };
+        }else{
+            throw 'Illegal filter type, must be string or regex';
+        }
+        this.filterBy(f, null, startNode);
+	},
+
+    /**
+     * Filter by a function. The passed function will be called with each
+     * node in the tree (or from the startNode). If the function returns true, the node is kept
+     * otherwise it is filtered. If a node is filtered, its children are also filtered.
+     * @param {Function} fn The filter function
+     * @param {Object} scope (optional) The scope of the function (defaults to the current node)
+     */
+    filterBy : function(fn, scope, startNode){
+        startNode = startNode || this.tree.root;
+        if(this.autoClear){
+            this.clear();
+        }
+        var af = this.filtered, rv = this.reverse;
+        var f = function(n){
+            if(n == startNode){
+                return true;
+            }
+            if(af[n.id]){
+                return false;
+            }
+            var m = fn.call(scope || n, n);
+            if(!m || rv){
+                af[n.id] = n;
+                n.ui.hide();
+                return false;
+            }
+            return true;
+        };
+        startNode.cascade(f);
+        if(this.remove){
+           for(var id in af){
+               if(typeof id != "function"){
+                   var n = af[id];
+                   if(n && n.parentNode){
+                       n.parentNode.removeChild(n);
+                   }
+               }
+           }
+        }
+    },
+
+    /**
+     * Clears the current filter. Note: with the "remove" option
+     * set a filter cannot be cleared.
+     */
+    clear : function(){
+        var t = this.tree;
+        var af = this.filtered;
+        for(var id in af){
+            if(typeof id != "function"){
+                var n = af[id];
+                if(n){
+                    n.ui.show();
+                }
+            }
+        }
+        this.filtered = {};
+    }
+};
+/**
+ * @class Ext.tree.TreeSorter
+ * Provides sorting of nodes in a {@link Ext.tree.TreePanel}.  The TreeSorter automatically monitors events on the 
+ * associated TreePanel that might affect the tree's sort order (beforechildrenrendered, append, insert and textchange).
+ * Example usage:<br />
+ * <pre><code>
+new Ext.tree.TreeSorter(myTree, {
+    folderSort: true,
+    dir: "desc",
+    sortType: function(node) {
+        // sort by a custom, typed attribute:
+        return parseInt(node.id, 10);
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} config
+ */
+Ext.tree.TreeSorter = function(tree, config){
+    /**
+     * @cfg {Boolean} folderSort True to sort leaf nodes under non-leaf nodes (defaults to false)
+     */
+    /** 
+     * @cfg {String} property The named attribute on the node to sort by (defaults to "text").  Note that this 
+     * property is only used if no {@link #sortType} function is specified, otherwise it is ignored.
+     */
+    /** 
+     * @cfg {String} dir The direction to sort ("asc" or "desc," case-insensitive, defaults to "asc")
+     */
+    /** 
+     * @cfg {String} leafAttr The attribute used to determine leaf nodes when {@link #folderSort} = true (defaults to "leaf")
+     */
+    /** 
+     * @cfg {Boolean} caseSensitive true for case-sensitive sort (defaults to false)
+     */
+    /** 
+     * @cfg {Function} sortType A custom "casting" function used to convert node values before sorting.  The function
+     * will be called with a single parameter (the {@link Ext.tree.TreeNode} being evaluated) and is expected to return
+     * the node's sort value cast to the specific data type required for sorting.  This could be used, for example, when
+     * a node's text (or other attribute) should be sorted as a date or numeric value.  See the class description for 
+     * example usage.  Note that if a sortType is specified, any {@link #property} config will be ignored.
+     */
+    
+    Ext.apply(this, config);
+    tree.on("beforechildrenrendered", this.doSort, this);
+    tree.on("append", this.updateSort, this);
+    tree.on("insert", this.updateSort, this);
+    tree.on("textchange", this.updateSortParent, this);
+    
+    var dsc = this.dir && this.dir.toLowerCase() == "desc";
+    var p = this.property || "text";
+    var sortType = this.sortType;
+    var fs = this.folderSort;
+    var cs = this.caseSensitive === true;
+    var leafAttr = this.leafAttr || 'leaf';
+
+    this.sortFn = function(n1, n2){
+        if(fs){
+            if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){
+                return 1;
+            }
+            if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){
+                return -1;
+            }
+        }
+    	var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
+    	var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
+    	if(v1 < v2){
+			return dsc ? +1 : -1;
+		}else if(v1 > v2){
+			return dsc ? -1 : +1;
+        }else{
+	    	return 0;
+        }
+    };
+};
+
+Ext.tree.TreeSorter.prototype = {
+    doSort : function(node){
+        node.sort(this.sortFn);
+    },
+    
+    compareNodes : function(n1, n2){
+        return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1);
+    },
+    
+    updateSort : function(tree, node){
+        if(node.childrenRendered){
+            this.doSort.defer(1, this, [node]);
+        }
+    },
+    
+    updateSortParent : function(node){
+		var p = node.parentNode;
+		if(p && p.childrenRendered){
+            this.doSort.defer(1, this, [p]);
+        }
+    }
+};/**
+ * @class Ext.tree.TreeDropZone
+ * @extends Ext.dd.DropZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dropping
+ * @param {Object} config
+ */
+if(Ext.dd.DropZone){
+    
+Ext.tree.TreeDropZone = function(tree, config){
+    /**
+     * @cfg {Boolean} allowParentInsert
+     * Allow inserting a dragged node between an expanded parent node and its first child that will become a
+     * sibling of the parent when dropped (defaults to false)
+     */
+    this.allowParentInsert = config.allowParentInsert || false;
+    /**
+     * @cfg {String} allowContainerDrop
+     * True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)
+     */
+    this.allowContainerDrop = config.allowContainerDrop || false;
+    /**
+     * @cfg {String} appendOnly
+     * True if the tree should only allow append drops (use for trees which are sorted, defaults to false)
+     */
+    this.appendOnly = config.appendOnly || false;
+
+    Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config);
+    /**
+    * The TreePanel for this drop zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+    /**
+    * Arbitrary data that can be associated with this tree and will be included in the event object that gets
+    * passed to any nodedragover event handler (defaults to {})
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.dragOverData = {};
+    // private
+    this.lastInsertClass = "x-tree-no-status";
+};
+
+Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    /**
+     * @cfg {String} expandDelay
+     * The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node
+     * over the target (defaults to 1000)
+     */
+    expandDelay : 1000,
+
+    // private
+    expandNode : function(node){
+        if(node.hasChildNodes() && !node.isExpanded()){
+            node.expand(false, null, this.triggerCacheRefresh.createDelegate(this));
+        }
+    },
+
+    // private
+    queueExpand : function(node){
+        this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]);
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+            this.expandProcId = false;
+        }
+    },
+
+    // private
+    isValidDropPoint : function(n, pt, dd, e, data){
+        if(!n || !data){ return false; }
+        var targetNode = n.node;
+        var dropNode = data.node;
+        // default drop rules
+        if(!(targetNode && targetNode.isTarget && pt)){
+            return false;
+        }
+        if(pt == "append" && targetNode.allowChildren === false){
+            return false;
+        }
+        if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){
+            return false;
+        }
+        if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){
+            return false;
+        }
+        // reuse the object
+        var overEvent = this.dragOverData;
+        overEvent.tree = this.tree;
+        overEvent.target = targetNode;
+        overEvent.data = data;
+        overEvent.point = pt;
+        overEvent.source = dd;
+        overEvent.rawEvent = e;
+        overEvent.dropNode = dropNode;
+        overEvent.cancel = false;  
+        var result = this.tree.fireEvent("nodedragover", overEvent);
+        return overEvent.cancel === false && result !== false;
+    },
+
+    // private
+    getDropPoint : function(e, n, dd){
+        var tn = n.node;
+        if(tn.isRoot){
+            return tn.allowChildren !== false ? "append" : false; // always append for root
+        }
+        var dragEl = n.ddel;
+        var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight;
+        var y = Ext.lib.Event.getPageY(e);
+        var noAppend = tn.allowChildren === false || tn.isLeaf();
+        if(this.appendOnly || tn.parentNode.allowChildren === false){
+            return noAppend ? false : "append";
+        }
+        var noBelow = false;
+        if(!this.allowParentInsert){
+            noBelow = tn.hasChildNodes() && tn.isExpanded();
+        }
+        var q = (b - t) / (noAppend ? 2 : 3);
+        if(y >= t && y < (t + q)){
+            return "above";
+        }else if(!noBelow && (noAppend || y >= b-q && y <= b)){
+            return "below";
+        }else{
+            return "append";
+        }
+    },
+
+    // private
+    onNodeEnter : function(n, dd, e, data){
+        this.cancelExpand();
+    },
+    
+    onContainerOver : function(dd, e, data) {
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            return this.dropAllowed;
+        }
+        return this.dropNotAllowed;
+    },
+
+    // private
+    onNodeOver : function(n, dd, e, data){
+        var pt = this.getDropPoint(e, n, dd);
+        var node = n.node;
+        
+        // auto node expand check
+        if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){
+            this.queueExpand(node);
+        }else if(pt != "append"){
+            this.cancelExpand();
+        }
+        
+        // set the insert point style on the target node
+        var returnCls = this.dropNotAllowed;
+        if(this.isValidDropPoint(n, pt, dd, e, data)){
+           if(pt){
+               var el = n.ddel;
+               var cls;
+               if(pt == "above"){
+                   returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-above";
+               }else if(pt == "below"){
+                   returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-below";
+               }else{
+                   returnCls = "x-tree-drop-ok-append";
+                   cls = "x-tree-drag-append";
+               }
+               if(this.lastInsertClass != cls){
+                   Ext.fly(el).replaceClass(this.lastInsertClass, cls);
+                   this.lastInsertClass = cls;
+               }
+           }
+       }
+       return returnCls;
+    },
+
+    // private
+    onNodeOut : function(n, dd, e, data){
+        this.cancelExpand();
+        this.removeDropIndicators(n);
+    },
+
+    // private
+    onNodeDrop : function(n, dd, e, data){
+        var point = this.getDropPoint(e, n, dd);
+        var targetNode = n.node;
+        targetNode.ui.startDrop();
+        if(!this.isValidDropPoint(n, point, dd, e, data)){
+            targetNode.ui.endDrop();
+            return false;
+        }
+        // first try to find the drop node
+        var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null);
+        return this.processDrop(targetNode, data, point, dd, e, dropNode);
+    },
+    
+    onContainerDrop : function(dd, e, data){
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            var targetNode = this.tree.getRootNode();       
+            targetNode.ui.startDrop();
+            var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null);
+            return this.processDrop(targetNode, data, 'append', dd, e, dropNode);
+        }
+        return false;
+    },
+    
+    // private
+    processDrop: function(target, data, point, dd, e, dropNode){
+        var dropEvent = {
+            tree : this.tree,
+            target: target,
+            data: data,
+            point: point,
+            source: dd,
+            rawEvent: e,
+            dropNode: dropNode,
+            cancel: !dropNode,
+            dropStatus: false
+        };
+        var retval = this.tree.fireEvent("beforenodedrop", dropEvent);
+        if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){
+            target.ui.endDrop();
+            return dropEvent.dropStatus;
+        }
+    
+        target = dropEvent.target;
+        if(point == 'append' && !target.isExpanded()){
+            target.expand(false, null, function(){
+                this.completeDrop(dropEvent);
+            }.createDelegate(this));
+        }else{
+            this.completeDrop(dropEvent);
+        }
+        return true;
+    },
+
+    // private
+    completeDrop : function(de){
+        var ns = de.dropNode, p = de.point, t = de.target;
+        if(!Ext.isArray(ns)){
+            ns = [ns];
+        }
+        var n;
+        for(var i = 0, len = ns.length; i < len; i++){
+            n = ns[i];
+            if(p == "above"){
+                t.parentNode.insertBefore(n, t);
+            }else if(p == "below"){
+                t.parentNode.insertBefore(n, t.nextSibling);
+            }else{
+                t.appendChild(n);
+            }
+        }
+        n.ui.focus();
+        if(Ext.enableFx && this.tree.hlDrop){
+            n.ui.highlight();
+        }
+        t.ui.endDrop();
+        this.tree.fireEvent("nodedrop", de);
+    },
+
+    // private
+    afterNodeMoved : function(dd, data, e, targetNode, dropNode){
+        if(Ext.enableFx && this.tree.hlDrop){
+            dropNode.ui.focus();
+            dropNode.ui.highlight();
+        }
+        this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e);
+    },
+
+    // private
+    getTree : function(){
+        return this.tree;
+    },
+
+    // private
+    removeDropIndicators : function(n){
+        if(n && n.ddel){
+            var el = n.ddel;
+            Ext.fly(el).removeClass([
+                    "x-tree-drag-insert-above",
+                    "x-tree-drag-insert-below",
+                    "x-tree-drag-append"]);
+            this.lastInsertClass = "_noclass";
+        }
+    },
+
+    // private
+    beforeDragDrop : function(target, e, id){
+        this.cancelExpand();
+        return true;
+    },
+
+    // private
+    afterRepair : function(data){
+        if(data && Ext.enableFx){
+            data.node.ui.highlight();
+        }
+        this.hideProxy();
+    }    
+});
+
+}/**
+ * @class Ext.tree.TreeDragZone
+ * @extends Ext.dd.DragZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dragging
+ * @param {Object} config
+ */
+if(Ext.dd.DragZone){
+Ext.tree.TreeDragZone = function(tree, config){
+    Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config);
+    /**
+    * The TreePanel for this drag zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+};
+
+Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    // private
+    onBeforeDrag : function(data, e){
+        var n = data.node;
+        return n && n.draggable && !n.disabled;
+    },
+
+    // private
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.tree.getSelectionModel().select(data.node);
+        this.tree.eventModel.disable();
+        this.proxy.update("");
+        data.node.ui.appendDDGhost(this.proxy.ghost.dom);
+        this.tree.fireEvent("startdrag", this.tree, data.node, e);
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return data.node.ui.getDDRepairXY();
+    },
+
+    // private
+    onEndDrag : function(data, e){
+        this.tree.eventModel.enable.defer(100, this.tree.eventModel);
+        this.tree.fireEvent("enddrag", this.tree, data.node, e);
+    },
+
+    // private
+    onValidDrop : function(dd, e, id){
+        this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e);
+        this.hideProxy();
+    },
+
+    // private
+    beforeInvalidDrop : function(e, id){
+        // this scrolls the original position back into view
+        var sm = this.tree.getSelectionModel();
+        sm.clearSelections();
+        sm.select(this.dragData.node);
+    },
+    
+    // private
+    afterRepair : function(){
+        if (Ext.enableFx && this.tree.hlDrop) {
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    }
+});
+}/**
+ * @class Ext.tree.TreeEditor
+ * @extends Ext.Editor
+ * Provides editor functionality for inline tree node editing.  Any valid {@link Ext.form.Field} subclass can be used
+ * as the editor field.
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} fieldConfig (optional) Either a prebuilt {@link Ext.form.Field} instance or a Field config object
+ * that will be applied to the default field instance (defaults to a {@link Ext.form.TextField}).
+ * @param {Object} config (optional) A TreeEditor config object
+ */
+Ext.tree.TreeEditor = function(tree, fc, config){
+    fc = fc || {};
+    var field = fc.events ? fc : new Ext.form.TextField(fc);
+    Ext.tree.TreeEditor.superclass.constructor.call(this, field, config);
+
+    this.tree = tree;
+
+    if(!tree.rendered){
+        tree.on('render', this.initEditor, this);
+    }else{
+        this.initEditor(tree);
+    }
+};
+
+Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "l-l").
+     */
+    alignment: "l-l",
+    // inherit
+    autoSize: false,
+    /**
+     * @cfg {Boolean} hideEl
+     * True to hide the bound element while the editor is displayed (defaults to false)
+     */
+    hideEl : false,
+    /**
+     * @cfg {String} cls
+     * CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")
+     */
+    cls: "x-small-editor x-tree-editor",
+    /**
+     * @cfg {Boolean} shim
+     * True to shim the editor if selects/iframes could be displayed beneath it (defaults to false)
+     */
+    shim:false,
+    // inherit
+    shadow:"frame",
+    /**
+     * @cfg {Number} maxWidth
+     * The maximum width in pixels of the editor field (defaults to 250).  Note that if the maxWidth would exceed
+     * the containing tree element's size, it will be automatically limited for you to the container width, taking
+     * scroll and client offsets into account prior to each edit.
+     */
+    maxWidth: 250,
+    /**
+     * @cfg {Number} editDelay The number of milliseconds between clicks to register a double-click that will trigger
+     * editing on the current node (defaults to 350).  If two clicks occur on the same node within this time span,
+     * the editor for the node will display, otherwise it will be processed as a regular click.
+     */
+    editDelay : 350,
+
+    initEditor : function(tree){
+        tree.on('beforeclick', this.beforeNodeClick, this);
+        tree.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);
+    },
+
+    // private
+    fitToTree : function(ed, el){
+        var td = this.tree.getTreeEl().dom, nd = el.dom;
+        if(td.scrollLeft >  nd.offsetLeft){ // ensure the node left point is visible
+            td.scrollLeft = nd.offsetLeft;
+        }
+        var w = Math.min(
+                this.maxWidth,
+                (td.clientWidth > 20 ? td.clientWidth : td.offsetWidth) - Math.max(0, nd.offsetLeft-td.scrollLeft) - /*cushion*/5);
+        this.setSize(w, '');
+    },
+
+    /**
+     * Edit the text of the passed {@link Ext.tree.TreeNode TreeNode}.
+     * @param node {Ext.tree.TreeNode} The TreeNode to edit. The TreeNode must be {@link Ext.tree.TreeNode#editable editable}.
+     */
+    triggerEdit : function(node, defer){
+        this.completeEdit();
+		if(node.attributes.editable !== false){
+           /**
+            * The {@link Ext.tree.TreeNode TreeNode} this editor is bound to. Read-only.
+            * @type Ext.tree.TreeNode
+            * @property editNode
+            */
+			this.editNode = node;
+            if(this.tree.autoScroll){
+                Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
+            }
+            var value = node.text || '';
+            if (!Ext.isGecko && Ext.isEmpty(node.text)){
+                node.setText('&#160;');
+            }
+            this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]);
+            return false;
+        }
+    },
+
+    // private
+    bindScroll : function(){
+        this.tree.getTreeEl().on('scroll', this.cancelEdit, this);
+    },
+
+    // private
+    beforeNodeClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+        if(this.tree.getSelectionModel().isSelected(node)){
+            e.stopEvent();
+            return this.triggerEdit(node);
+        }
+    },
+
+    onNodeDblClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+    },
+
+    // private
+    updateNode : function(ed, value){
+        this.tree.getTreeEl().un('scroll', this.cancelEdit, this);
+        this.editNode.setText(value);
+    },
+
+    // private
+    onHide : function(){
+        Ext.tree.TreeEditor.superclass.onHide.call(this);
+        if(this.editNode){
+            this.editNode.ui.focus.defer(50, this.editNode.ui);
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var k = e.getKey();
+        if(k == e.ESC){
+            e.stopEvent();
+            this.cancelEdit();
+        }else if(k == e.ENTER && !e.hasModifier()){
+            e.stopEvent();
+            this.completeEdit();
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/pkg-tree.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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,requestMethod:this.requestMethod})}else{if(typeof a=="object"&&!a.load){a=new Ext.tree.TreeLoader(a)}}this.loader=a;this.nodeHash={};if(this.root){var b=this.root;delete this.root;this.setRootNode(b)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(c,b,a,g,f,e,d){if(c=="collapse"||c=="expand"||c=="beforecollapse"||c=="beforeexpand"||c=="move"||c=="beforemove"){c=c+"node"}return this.fireEvent(c,b,a,g,f,e,d)},getRootNode:function(){return this.root},setRootNode:function(b){Ext.destroy(this.root);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)}if(this.innerCt){this.innerCt.update("");this.afterRender()}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 d=[];var e=function(){if(this.attributes.checked){d.push(!b?this:(b=="id"?this.id:this.attributes[b]))}};c.cascade(e);return d},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(g,a,h){a=a||"id";var d=g.split(this.pathSeparator);var c=this.root;if(c.attributes[a]!=d[1]){if(h){h(false,null)}return}var b=1;var e=function(){if(++b==d.length){if(h){h(true,c)}return}var f=c.findChild(a,d[b]);if(!f){if(h){h(false,c)}return}c=f;f.expand(false,false,e)};c.expand(false,false,e)},selectPath:function(e,a,g){a=a||"id";var c=e.split(this.pathSeparator);var b=c.pop();if(c.length>0){var d=function(h,f){if(h&&f){var i=f.findChild(a,b);if(i){i.select();if(g){g(true,i)}}else{if(g){g(false,i)}}}else{if(g){g(false,i)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(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){this.tree.innerCt.on("mouseover",this.delegateOver,this);this.tree.innerCt.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").getAttribute("tree-node-id","ext");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(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}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))}},trackExit:function(a){if(this.lastOverNode&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode);delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},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){this.lastOverNode=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(b==a){b.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,b,a)!==false){if(a){a.ui.onSelectedChange(false)}this.selNode=b;b.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,b,a)}}return b},unselect:function(a){if(this.selNode==a){this.clearSelections()}},clearSelections:function(){var a=this.selNode;if(a){a.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return a},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(){var a=this.selNode||this.lastSelNode;if(!a){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c)}else{var b=c.lastChild;while(b&&b.isExpanded()&&b.childNodes.length>0){b=b.lastChild}return this.select(b)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode)}}return null},selectNext:function(){var b=this.selNode||this.lastSelNode;if(!b){return null}if(b.firstChild&&b.isExpanded()){return this.select(b.firstChild)}else{if(b.nextSibling){return this.select(b.nextSibling)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(a){this.tree=a;a.getTreeEl().on("keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c<a;c++){d[c].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(b!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(a){return this.selMap[a.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});Ext.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,"xnode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf){this.childNodes.indexOf=function(d){for(var c=0,b=this.length;c<b;c++){if(this[c]==d){return c}}return -1}}this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(b){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false}var a=this.getOwnerTree();if(a){if(a.proxyNodeEvent.apply(a,arguments)===false){return false}}return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var f=false;if(Ext.isArray(e)){f=e}else{if(arguments.length>1){f=arguments}}if(f){for(var d=0,a=f.length;d<a;d++){this.appendChild(f[d])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,e)===false){return false}var b=this.childNodes.length;var c=e.parentNode;if(c){if(e.fireEvent("beforemove",e.getOwnerTree(),e,c,this,b)===false){return false}c.removeChild(e)}b=this.childNodes.length;if(b===0){this.setFirstChild(e)}this.childNodes.push(e);e.parentNode=this;var g=this.childNodes[b-1];if(g){e.previousSibling=g;g.nextSibling=e}else{e.previousSibling=null}e.nextSibling=null;this.setLastChild(e);e.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,e,b);if(c){e.fireEvent("move",this.ownerTree,e,c,this,b)}return e}},removeChild:function(b){var a=this.childNodes.indexOf(b);if(a==-1){return false}if(this.fireEvent("beforeremove",this.ownerTree,this,b)===false){return false}this.childNodes.splice(a,1);if(b.previousSibling){b.previousSibling.nextSibling=b.nextSibling}if(b.nextSibling){b.nextSibling.previousSibling=b.previousSibling}if(this.firstChild==b){this.setFirstChild(b.nextSibling)}if(this.lastChild==b){this.setLastChild(b.previousSibling)}b.setOwnerTree(null);b.parentNode=null;b.previousSibling=null;b.nextSibling=null;this.fireEvent("remove",this.ownerTree,this,b);return b},insertBefore:function(d,a){if(!a){return this.appendChild(d)}if(d==a){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,d,a)===false){return false}var b=this.childNodes.indexOf(a);var c=d.parentNode;var e=b;if(c==this&&this.childNodes.indexOf(d)<b){e--}if(c){if(d.fireEvent("beforemove",d.getOwnerTree(),d,c,this,b,a)===false){return false}c.removeChild(d)}if(e===0){this.setFirstChild(d)}this.childNodes.splice(e,0,d);d.parentNode=this;var f=this.childNodes[e-1];if(f){d.previousSibling=f;f.nextSibling=d}else{d.previousSibling=null}d.nextSibling=a;a.previousSibling=d;d.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,d,a);if(c){d.fireEvent("move",this.ownerTree,d,c,this,e,a)}return d},remove:function(){this.parentNode.removeChild(this);return this},item:function(a){return this.childNodes[a]},replaceChild:function(a,c){var b=c?c.nextSibling:null;this.removeChild(c);this.insertBefore(a,b);return c},indexOf:function(a){return this.childNodes.indexOf(a)},getOwnerTree:function(){if(!this.ownerTree){var a=this;while(a){if(a.ownerTree){this.ownerTree=a.ownerTree;break}a=a.parentNode}}return this.ownerTree},getDepth:function(){var b=0;var a=this;while(a.parentNode){++b;a=a.parentNode}return b},setOwnerTree:function(b){if(b!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)}this.ownerTree=b;var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].setOwnerTree(b)}if(b){b.registerNode(this)}}},setId:function(b){if(b!==this.id){var a=this.ownerTree;if(a){a.unregisterNode(this)}this.id=b;if(a){a.registerNode(this)}this.onIdChange(b)}},onIdChange:Ext.emptyFn,getPath:function(c){c=c||"id";var e=this.parentNode;var a=[this.attributes[c]];while(e){a.unshift(e.attributes[c]);e=e.parentNode}var d=this.getOwnerTree().pathSeparator;return d+a.join(d)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(f,e,b){if(f.apply(e||this,b||[this])!==false){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].cascade(f,e,b)}}},eachChild:function(f,e,b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){if(f.apply(e||this,b||[d[c]])===false){break}}},findChild:function(d,e){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(c[b].attributes[d]==e){return c[b]}}return null},findChildBy:function(e,d){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(e.call(d||c[b],c[b])===true){return c[b]}}return null},sort:function(e,d){var c=this.childNodes;var a=c.length;if(a>0){var f=d?function(){e.apply(d,arguments)}:e;c.sort(f);for(var b=0;b<a;b++){var g=c[b];g.previousSibling=c[b-1];g.nextSibling=c[b+1];if(b===0){this.setFirstChild(g)}if(b==a-1){this.setLastChild(g)}}}},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}});Ext.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.hidden=a.hidden===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.call(this,c,a);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,c,d,b){if(!this.expanded){if(this.fireEvent("beforeexpand",this,a,c)===false){return}if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&c!==false)||c){this.ui.animExpand(function(){this.fireEvent("expand",this);this.runCallback(d,b||this,[this]);if(a===true){this.expandChildNodes(true)}}.createDelegate(this));return}else{this.ui.expand();this.fireEvent("expand",this);this.runCallback(d,b||this,[this])}}else{this.runCallback(d,b||this,[this])}if(a===true){this.expandChildNodes(true)}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,b)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(b,f,g,e){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,b,f)===false){return}this.expanded=false;if((this.getOwnerTree().animate&&f!==false)||f){this.ui.animCollapse(function(){this.fireEvent("collapse",this);this.runCallback(g,e||this,[this]);if(b===true){this.collapseChildNodes(true)}}.createDelegate(this));return}else{this.ui.collapse();this.fireEvent("collapse",this);this.runCallback(g,e||this,[this])}}else{if(!this.expanded){this.runCallback(g,e||this,[this])}}if(b===true){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(true,false)}}},delayedExpand:function(a){if(!this.expandProcId){this.expandProcId=this.expand.defer(a,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(c,b){var a=this.getOwnerTree();a.expandPath(this.parentNode?this.parentNode.getPath():this.getPath(),false,function(){var d=a.getNodeById(this.id);a.getTreeEl().scrollChildIntoView(d.ui.anchor);this.runCallback(c,b||this,[this])}.createDelegate(this))},expandChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].expand(b)}},collapseChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(b)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(b){if(b!==false){this.fireEvent("beforechildrenrendered",this)}var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].render(true)}this.childrenRendered=true},sort:function(e,d){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){c[b].render(true)}}},render:function(a){this.ui.render(a);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(b,e){if(e){this.ui.childIndent=null}this.ui.renderIndent();if(b===true&&this.childrenRendered){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].renderIndent(true,e)}}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded&&this.rendered){this.renderChildren()}},destroy:function(){if(this.childNodes){for(var b=0,a=this.childNodes.length;b<a;b++){this.childNodes[b].destroy()}this.childNodes=null}if(this.ui.destroy){this.ui.destroy()}},onIdChange:function(a){this.ui.onIdChange(a)}});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,c){if(this.loading){var g;var d=function(){if(!this.loading){clearInterval(g);this.expand(b,e,h,c)}}.createDelegate(this);g=setInterval(d,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,c]),this);return}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,b,e,h,c)},isLoading:function(){return this.loading},loadComplete:function(a,c,d,b){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(a,c,d,b)},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(b,a){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild).destroy()}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,b,a)}});Ext.tree.TreePanel.nodeTypes.async=Ext.tree.AsyncTreeNode;Ext.tree.TreeNodeUI=function(a){this.node=a;this.rendered=false;this.animating=false;this.wasLeaf=true;this.ecc="x-tree-ec-icon x-tree-elbow";this.emptyIcon=Ext.BLANK_IMAGE_URL};Ext.tree.TreeNodeUI.prototype={removeChild:function(a){if(this.rendered){this.ctNode.removeChild(a.ui.getEl())}},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(b,c,a){if(this.rendered){this.textNode.innerHTML=c}},onDisableChange:function(a,b){this.disabled=b;if(this.checkbox){this.checkbox.disabled=b}if(b){this.addClass("x-tree-node-disabled")}else{this.removeClass("x-tree-node-disabled")}},onSelectedChange:function(a){if(a){this.focus();this.addClass("x-tree-selected")}else{this.removeClass("x-tree-selected")}},onMove:function(a,g,e,f,d,b){this.childIndent=null;if(this.rendered){var h=f.ui.getContainer();if(!h){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return}var c=b?b.ui.getEl():null;if(c){h.insertBefore(this.wrap,c)}else{h.appendChild(this.wrap)}this.node.renderIndent(true,e!=f)}},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{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 e=this.node,b=e.attributes;var d=e.parentNode?e.parentNode.ui.getContainer():e.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(e,b,d,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){d.appendChild(this.wrap)}}},renderElements:function(e,j,i,k){this.indentMarkup=e.parentNode?e.parentNode.ui.getChildIndent():"";var f=typeof j.checked=="boolean";var c=j.href?j.href:Ext.isGecko?"":"#";var d=['<li class="x-tree-node"><div ext:tree-node-id="',e.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',j.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="',j.icon||this.emptyIcon,'" class="x-tree-node-icon',(j.icon?" x-tree-node-inline-icon":""),(j.iconCls?" "+j.iconCls:""),'" unselectable="on" />',f?('<input class="x-tree-node-cb" type="checkbox" '+(j.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',c,'" tabIndex="1" ',j.hrefTarget?' target="'+j.hrefTarget+'"':"",'><span unselectable="on">',e.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var b;if(k!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",i,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var h=this.elNode.childNodes;this.indentNode=h[0];this.ecNode=h[1];this.iconNode=h[2];var g=3;if(f){this.checkbox=h[3];this.checkbox.defaultChecked=this.checkbox.checked;g++}this.anchor=h[g];this.textNode=h[g].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 f=this.node,d,c;var a=f.isLast()?"x-tree-elbow-end":"x-tree-elbow";var e=f.hasChildNodes();if(e||f.attributes.expandable){if(f.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},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;if(this.holder){delete this.wrap;Ext.removeNode(this.holder);delete this.holder}else{Ext.removeNode(this.wrap);delete this.wrap}}};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);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b<a;b++){var e=d.appendChild(this.createNode(c[b]));if(this.preloadChildren){this.doPreload(e)}}d.endUpdate()}return true}return false},getParams:function(f){var b=[],e=this.baseParams;if(this.directFn){b.push(f.id);if(e){if(this.paramOrder){for(var d=0,a=this.paramOrder.length;d<a;d++){b.push(e[this.paramOrder[d]])}}else{if(this.paramsAsHash){b.push(e)}}}return b}else{for(var c in e){if(!Ext.isFunction(e[c])){b.push(encodeURIComponent(c),"=",encodeURIComponent(e[c]),"&")}}b.push("node=",encodeURIComponent(f.id));return b.join("")}},requestData:function(c,d,b){if(this.fireEvent("beforeload",this,c,d)!==false){if(this.directFn){var a=this.getParams(c);a.push(this.processDirectResponse.createDelegate(this,[{callback:d,node:c,scope:b}],true));this.directFn.apply(window,a)}else{this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:d,node:c,scope:b},params:this.getParams(c)})}}else{this.runCallback(d,b||c,[])}},processDirectResponse:function(a,b,c){if(b.status){this.handleResponse({responseData:Ext.isArray(a)?a:null,responseText:a,argument:c})}else{this.handleFailure({argument:c})}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,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(d,c,j,k){var l=d.responseText;try{var a=d.responseData||Ext.decode(l);c.beginUpdate();for(var f=0,g=a.length;f<g;f++){var b=this.createNode(a[f]);if(b){c.appendChild(b)}}c.endUpdate();this.runCallback(j,k||c,[c])}catch(h){this.handleFailure(d)}},handleResponse:function(c){this.transId=false;var b=c.argument;this.processResponse(c,b.node,b.callback,b.scope);this.fireEvent("load",this,b.node,c)},handleFailure:function(c){this.transId=false;var b=c.argument;this.fireEvent("loadexception",this,b.node,c);this.runCallback(b.callback,b.scope||b.node,[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(d,a,b){a=a||"text";var c;if(typeof d=="string"){var e=d.length;if(e==0&&this.clearBlank){this.clear();return}d=d.toLowerCase();c=function(f){return f.attributes[a].substr(0,e).toLowerCase()==d}}else{if(d.exec){c=function(f){return d.test(f.attributes[a])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(c,null,b)},filterBy:function(d,c,b){b=b||this.tree.root;if(this.autoClear){this.clear()}var a=this.filtered,i=this.reverse;var e=function(j){if(j==b){return true}if(a[j.id]){return false}var f=d.call(c||j,j);if(!f||i){a[j.id]=j;j.ui.hide();return false}return true};b.cascade(e);if(this.remove){for(var h in a){if(typeof h!="function"){var g=a[h];if(g&&g.parentNode){g.parentNode.removeChild(g)}}}}},clear:function(){var b=this.tree;var a=this.filtered;for(var d in a){if(typeof d!="function"){var c=a[d];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 e=this.dir&&this.dir.toLowerCase()=="desc";var f=this.property||"text";var g=this.sortType;var a=this.folderSort;var d=this.caseSensitive===true;var h=this.leafAttr||"leaf";this.sortFn=function(j,i){if(a){if(j.attributes[h]&&!i.attributes[h]){return 1}if(!j.attributes[h]&&i.attributes[h]){return -1}}var l=g?g(j):(d?j.attributes[f]:j.attributes[f].toUpperCase());var k=g?g(i):(d?i.attributes[f]:i.attributes[f].toUpperCase());if(l<k){return e?+1:-1}else{if(l>k){return e?-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=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),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,j,h,d,c){if(!a||!c){return false}var f=a.node;var g=c.node;if(!(f&&f.isTarget&&j)){return false}if(j=="append"&&f.allowChildren===false){return false}if((j=="above"||j=="below")&&(f.parentNode&&f.parentNode.allowChildren===false)){return false}if(g&&(f==g||g.contains(f))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=f;b.data=c;b.point=j;b.source=h;b.rawEvent=d;b.dropNode=g;b.cancel=false;var i=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&i!==false},getDropPoint:function(g,f,k){var l=f.node;if(l.isRoot){return l.allowChildren!==false?"append":false}var c=f.ddel;var m=Ext.lib.Dom.getY(c),i=m+c.offsetHeight;var h=Ext.lib.Event.getPageY(g);var j=l.allowChildren===false||l.isLeaf();if(this.appendOnly||l.parentNode.allowChildren===false){return j?false:"append"}var d=false;if(!this.allowParentInsert){d=l.hasChildNodes()&&l.isExpanded()}var a=(i-m)/(j?2:3);if(h>=m&&h<(m+a)){return"above"}else{if(!d&&(j||h>=i-a&&h<=i)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,h,g,f){var j=this.getDropPoint(g,b,h);var c=b.node;if(!this.expandProcId&&j=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(j!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,j,h,g,f)){if(j){var a=b.ddel;var i;if(j=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";i="x-tree-drag-insert-above"}else{if(j=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";i="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";i="x-tree-drag-append"}}if(this.lastInsertClass!=i){Ext.fly(a).replaceClass(this.lastInsertClass,i);this.lastInsertClass=i}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(h,b,g,d){var a=this.getDropPoint(g,h,b);var f=h.node;f.ui.startDrop();if(!this.isValidDropPoint(h,a,b,g,d)){f.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,f,a,g):null);return this.processDrop(f,d,a,b,g,c)},onContainerDrop:function(a,f,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,f,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",f):null);return this.processDrop(d,c,"append",a,f,b)}return false},processDrop:function(i,g,b,a,h,d){var f={tree:this.tree,target:i,data:g,point:b,source:a,rawEvent:h,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",f);if(c===false||f.cancel===true||!f.dropNode){i.ui.endDrop();return f.dropStatus}i=f.target;if(b=="append"&&!i.isExpanded()){i.expand(false,null,function(){this.completeDrop(f)}.createDelegate(this))}else{this.completeDrop(f)}return true},completeDrop:function(g){var d=g.dropNode,e=g.point,c=g.target;if(!Ext.isArray(d)){d=[d]}var f;for(var b=0,a=d.length;b<a;b++){f=d[b];if(e=="above"){c.parentNode.insertBefore(f,c)}else{if(e=="below"){c.parentNode.insertBefore(f,c.nextSibling)}else{c.appendChild(f)}}}f.ui.focus();if(Ext.enableFx&&this.tree.hlDrop){f.ui.highlight()}c.ui.endDrop();this.tree.fireEvent("nodedrop",g)},afterNodeMoved:function(a,c,f,d,b){if(Ext.enableFx&&this.tree.hlDrop){b.ui.focus();b.ui.highlight()}this.tree.fireEvent("nodedrop",this.tree,d,c,a,f)},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.innerCt,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 d=c.events?c:new Ext.form.TextField(c);Ext.tree.TreeEditor.superclass.constructor.call(this,d,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 e=this.tree.getTreeEl().dom,d=c.dom;if(e.scrollLeft>d.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText("&#160;")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);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()}}}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable-debug.js	(revision 625)
@@ -0,0 +1,760 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Resizable
+ * @extends Ext.util.Observable
+ * <p>Applies drag handles to an element to make it resizable. The drag handles are inserted into the element 
+ * and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap
+ * the textarea in a div and set 'resizeChild' to true (or to the id of the element), <b>or</b> set wrap:true in your config and
+ * the element will be wrapped for you automatically.</p>
+ * <p>Here is the list of valid resize handles:</p>
+ * <pre>
+Value   Description
+------  -------------------
+ 'n'     north
+ 's'     south
+ 'e'     east
+ 'w'     west
+ 'nw'    northwest
+ 'sw'    southwest
+ 'se'    southeast
+ 'ne'    northeast
+ 'all'   all
+</pre>
+ * <p>Here's an example showing the creation of a typical Resizable:</p>
+ * <pre><code>
+var resizer = new Ext.Resizable('element-id', {
+    handles: 'all',
+    minWidth: 200,
+    minHeight: 100,
+    maxWidth: 500,
+    maxHeight: 400,
+    pinned: true
+});
+resizer.on('resize', myHandler);
+</code></pre>
+ * <p>To hide a particular handle, set its display to none in CSS, or through script:<br>
+ * resizer.east.setDisplayed(false);</p>
+ * @constructor
+ * Create a new resizable component
+ * @param {Mixed} el The id or element to resize
+ * @param {Object} config configuration options
+  */
+Ext.Resizable = function(el, config){
+    this.el = Ext.get(el);
+    
+    if(config && config.wrap){
+        config.resizeChild = this.el;
+        this.el = this.el.wrap(typeof config.wrap == 'object' ? config.wrap : {cls:'xresizable-wrap'});
+        this.el.id = this.el.dom.id = config.resizeChild.id + '-rzwrap';
+        this.el.setStyle('overflow', 'hidden');
+        this.el.setPositioning(config.resizeChild.getPositioning());
+        config.resizeChild.clearPositioning();
+        if(!config.width || !config.height){
+            var csize = config.resizeChild.getSize();
+            this.el.setSize(csize.width, csize.height);
+        }
+        if(config.pinned && !config.adjustments){
+            config.adjustments = 'auto';
+        }
+    }
+
+    /**
+     * The proxy Element that is resized in place of the real Element during the resize operation.
+     * This may be queried using {@link Ext.Element#getBox} to provide the new area to resize to.
+     * Read only.
+     * @type Ext.Element.
+     * @property proxy
+     */
+    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, config);
+    
+    if(this.pinned){
+        this.disableTrackOver = true;
+        this.el.addClass('x-resizable-pinned');
+    }
+    // if the element isn't positioned, make it relative
+    var position = this.el.getStyle('position');
+    if(position != 'absolute' && position != 'fixed'){
+        this.el.setStyle('position', 'relative');
+    }
+    if(!this.handles){ // no handles passed, must be legacy style
+        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 hs = this.handles.split(/\s*?[,;]\s*?| /);
+    var ps = Ext.Resizable.positions;
+    for(var i = 0, len = hs.length; i < len; i++){
+        if(hs[i] && ps[hs[i]]){
+            var pos = ps[hs[i]];
+            this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent);
+        }
+    }
+    // legacy
+    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 rc = this.resizeChild;
+        var hw = this.west, he = this.east, hn = this.north, hs = this.south;
+        if(rc && (hw || hn)){
+            rc.position('relative');
+            rc.setLeft(hw ? hw.el.getWidth() : 0);
+            rc.setTop(hn ? hn.el.getHeight() : 0);
+        }
+        this.adjustments = [
+            (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0),
+            (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.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(
+        /**
+         * @event beforeresize
+         * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize.
+         * @param {Ext.Resizable} this
+         * @param {Ext.EventObject} e The mousedown event
+         */
+        'beforeresize',
+        /**
+         * @event resize
+         * Fired after a resize.
+         * @param {Ext.Resizable} this
+         * @param {Number} width The new width
+         * @param {Number} height The new height
+         * @param {Ext.EventObject} e The mouseup event
+         */
+        '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, {
+
+    /**
+     * @cfg {Array/String} adjustments String 'auto' or an array [width, height] with values to be <b>added</b> to the
+     * resize operation's new size (defaults to <tt>[0, 0]</tt>)
+     */
+    adjustments : [0, 0],
+    /**
+     * @cfg {Boolean} animate True to animate the resize (not compatible with dynamic sizing, defaults to false)
+     */
+    animate : false,
+    /**
+     * @cfg {Mixed} constrainTo Constrain the resize to a particular element
+     */
+    /**
+     * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only applied at config time. (defaults to false)
+     */
+    disableTrackOver : false,
+    /**
+     * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to false)
+     */
+    draggable: false,
+    /**
+     * @cfg {Number} duration Animation duration if animate = true (defaults to 0.35)
+     */
+    duration : 0.35,
+    /**
+     * @cfg {Boolean} dynamic True to resize the element while dragging instead of using a proxy (defaults to false)
+     */
+    dynamic : false,
+    /**
+     * @cfg {String} easing Animation easing if animate = true (defaults to <tt>'easingOutStrong'</tt>)
+     */
+    easing : 'easeOutStrong',
+    /**
+     * @cfg {Boolean} enabled False to disable resizing (defaults to true)
+     */
+    enabled : true,
+    /**
+     * @property enabled Writable. False if resizing is disabled.
+     * @type Boolean 
+     */
+    /**
+     * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined).
+     * Specify either <tt>'all'</tt> or any of <tt>'n s e w ne nw se sw'</tt>.
+     */
+    handles : false,
+    /**
+     * @cfg {Boolean} multiDirectional <b>Deprecated</b>.  Deprecated style of adding multi-direction resize handles.
+     */
+    multiDirectional : false,
+    /**
+     * @cfg {Number} height The height of the element in pixels (defaults to null)
+     */
+    height : null,
+    /**
+     * @cfg {Number} width The width of the element in pixels (defaults to null)
+     */
+    width : null,
+    /**
+     * @cfg {Number} heightIncrement The increment to snap the height resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    heightIncrement : 0,
+    /**
+     * @cfg {Number} widthIncrement The increment to snap the width resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    widthIncrement : 0,
+    /**
+     * @cfg {Number} minHeight The minimum height for the element (defaults to 5)
+     */
+    minHeight : 5,
+    /**
+     * @cfg {Number} minWidth The minimum width for the element (defaults to 5)
+     */
+    minWidth : 5,
+    /**
+     * @cfg {Number} maxHeight The maximum height for the element (defaults to 10000)
+     */
+    maxHeight : 10000,
+    /**
+     * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000)
+     */
+    maxWidth : 10000,
+    /**
+     * @cfg {Number} minX The minimum x for the element (defaults to 0)
+     */
+    minX: 0,
+    /**
+     * @cfg {Number} minY The minimum x for the element (defaults to 0)
+     */
+    minY: 0,
+    /**
+     * @cfg {Boolean} pinned True to ensure that the resize handles are always visible, false to display them only when the
+     * user mouses over the resizable borders. This is only applied at config time. (defaults to false)
+     */
+    pinned : false,
+    /**
+     * @cfg {Boolean} preserveRatio True to preserve the original ratio between height
+     * and width during resize (defaults to false)
+     */
+    preserveRatio : false,
+    /**
+     * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) 
+     */ 
+    resizeChild : false,
+    /**
+     * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false)
+     */
+    transparent: false,
+    /**
+     * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a particular region
+     */
+    /**
+     * @cfg {Boolean} wrap True to wrap an element with a div if needed (required for textareas and images, defaults to false)
+     * in favor of the handles config option (defaults to false)
+     */
+
+    
+    /**
+     * Perform a manual resize and fires the 'resize' event.
+     * @param {Number} width
+     * @param {Number} height
+     */
+    resizeTo : function(width, height){
+        this.el.setSize(width, height);
+        this.updateChildSize();
+        this.fireEvent('resize', this, width, height, null);
+    },
+
+    // private
+    startSizing : function(e, handle){
+        this.fireEvent('beforeresize', this, e);
+        if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler
+
+            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({
+                    scope: this,
+                    mousemove: this.onMouseMove,
+                    mouseup: this.onMouseUp
+                });
+            }
+            this.overlay.setStyle('cursor', handle.el.getStyle('cursor'));
+
+            this.resizing = true;
+            this.startBox = this.el.getBox();
+            this.startPoint = e.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 ct = Ext.get(this.constrainTo);
+                this.resizeRegion = ct.getRegion().adjust(
+                    ct.getFrameWidth('t'),
+                    ct.getFrameWidth('l'),
+                    -ct.getFrameWidth('b'),
+                    -ct.getFrameWidth('r')
+                );
+            }
+
+            this.proxy.setStyle('visibility', 'hidden'); // workaround display none
+            this.proxy.show();
+            this.proxy.setBox(this.startBox);
+            if(!this.dynamic){
+                this.proxy.setStyle('visibility', 'visible');
+            }
+        }
+    },
+
+    // private
+    onMouseDown : function(handle, e){
+        if(this.enabled){
+            e.stopEvent();
+            this.activeHandle = handle;
+            this.startSizing(e, handle);
+        }          
+    },
+
+    // private
+    onMouseUp : function(e){
+        this.activeHandle = null;
+        var size = this.resizeElement();
+        this.resizing = false;
+        this.handleOut();
+        this.overlay.hide();
+        this.proxy.hide();
+        this.fireEvent('resize', this, size.width, size.height, e);
+    },
+
+    // private
+    updateChildSize : function(){
+        if(this.resizeChild){
+            var el = this.el;
+            var child = this.resizeChild;
+            var adj = this.adjustments;
+            if(el.dom.offsetWidth){
+                var b = el.getSize(true);
+                child.setSize(b.width+adj[0], b.height+adj[1]);
+            }
+            // Second call here for IE
+            // The first call enables instant resizing and
+            // the second call corrects scroll bars if they
+            // exist
+            if(Ext.isIE){
+                setTimeout(function(){
+                    if(el.dom.offsetWidth){
+                        var b = el.getSize(true);
+                        child.setSize(b.width+adj[0], b.height+adj[1]);
+                    }
+                }, 10);
+            }
+        }
+    },
+
+    // private
+    snap : function(value, inc, min){
+        if(!inc || !value){
+            return value;
+        }
+        var newValue = value;
+        var m = value % inc;
+        if(m > 0){
+            if(m > (inc/2)){
+                newValue = value + (inc-m);
+            }else{
+                newValue = value - m;
+            }
+        }
+        return Math.max(min, newValue);
+    },
+
+    /**
+     * <p>Performs resizing of the associated Element. This method is called internally by this
+     * class, and should not be called by user code.</p>
+     * <p>If a Resizable is being used to resize an Element which encapsulates a more complex UI
+     * component such as a Panel, this method may be overridden by specifying an implementation
+     * as a config option to provide appropriate behaviour at the end of the resize operation on
+     * mouseup, for example resizing the Panel, and relaying the Panel's content.</p>
+     * <p>The new area to be resized to is available by examining the state of the {@link #proxy}
+     * Element. Example:
+<pre><code>
+new Ext.Panel({
+    title: 'Resize me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    listeners: {
+        render: function(p) {
+            new Ext.Resizable(p.getEl(), {
+                handles: 'all',
+                pinned: true,
+                transparent: true,
+                resizeElement: function() {
+                    var box = this.proxy.getBox();
+                    p.updateBox(box);
+                    if (p.layout) {
+                        p.doLayout();
+                    }
+                    return box;
+                }
+           });
+       }
+    }
+}).show();
+</code></pre>
+     */
+    resizeElement : function(){
+        var box = this.proxy.getBox();
+        if(this.updateBox){
+            this.el.setBox(box, false, this.animate, this.duration, null, this.easing);
+        }else{
+            this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing);
+        }
+        this.updateChildSize();
+        if(!this.dynamic){
+            this.proxy.hide();
+        }
+        return box;
+    },
+
+    // private
+    constrain : function(v, diff, m, mx){
+        if(v - diff < m){
+            diff = v - m;    
+        }else if(v - diff > mx){
+            diff = v - mx; 
+        }
+        return diff;                
+    },
+
+    // private
+    onMouseMove : function(e){
+        if(this.enabled && this.activeHandle){
+            try{// try catch so if something goes wrong the user doesn't get hung
+
+            if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) {
+                return;
+            }
+
+            //var curXY = this.startPoint;
+            var curSize = this.curSize || this.startBox,
+                x = this.startBox.x, y = this.startBox.y,
+                ox = x, 
+                oy = y,
+                w = curSize.width, 
+                h = curSize.height,
+                ow = w, 
+                oh = h,
+                mw = this.minWidth, 
+                mh = this.minHeight,
+                mxw = this.maxWidth, 
+                mxh = this.maxHeight,
+                wi = this.widthIncrement,
+                hi = this.heightIncrement,
+                eventXY = e.getXY(),
+                diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])),
+                diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])),
+                pos = this.activeHandle.position,
+                tw,
+                th;
+            
+            switch(pos){
+                case 'east':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    break;
+                case 'south':
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'southeast':
+                    w += diffX; 
+                    h += diffY;
+                    w = Math.min(Math.max(mw, w), mxw);
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'north':
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'west':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+                case 'northeast':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'northwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    x += diffX;
+                    w -= diffX;
+                    break;
+               case 'southwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+            }
+            
+            var sw = this.snap(w, wi, mw);
+            var sh = this.snap(h, hi, mh);
+            if(sw != w || sh != h){
+                switch(pos){
+                    case 'northeast':
+                        y -= sh - h;
+                    break;
+                    case 'north':
+                        y -= sh - h;
+                        break;
+                    case 'southwest':
+                        x -= sw - w;
+                    break;
+                    case 'west':
+                        x -= sw - w;
+                        break;
+                    case 'northwest':
+                        x -= sw - w;
+                        y -= sh - h;
+                    break;
+                }
+                w = sw;
+                h = sh;
+            }
+            
+            if(this.preserveRatio){
+                switch(pos){
+                    case 'southeast':
+                    case 'east':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                       break;
+                    case 'south':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        break;
+                    case 'northeast':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                    break;
+                    case 'north':
+                        tw = w;
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        x += (tw - w) / 2;
+                        break;
+                    case 'southwest':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                        break;
+                    case 'west':
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        y += (th - h) / 2;
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                       break;
+                    case 'northwest':
+                        tw = w;
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                        y += th - h;
+                        x += tw - w;
+                        break;
+                        
+                }
+            }
+            this.proxy.setBounds(x, y, w, h);
+            if(this.dynamic){
+                this.resizeElement();
+            }
+            }catch(ex){}
+        }
+    },
+
+    // private
+    handleOver : function(){
+        if(this.enabled){
+            this.el.addClass('x-resizable-over');
+        }
+    },
+
+    // private
+    handleOut : function(){
+        if(!this.resizing){
+            this.el.removeClass('x-resizable-over');
+        }
+    },
+    
+    /**
+     * Returns the element this component is bound to.
+     * @return {Ext.Element}
+     */
+    getEl : function(){
+        return this.el;
+    },
+    
+    /**
+     * Returns the resizeChild element (or null).
+     * @return {Ext.Element}
+     */
+    getResizeChild : function(){
+        return this.resizeChild;
+    },
+    
+    /**
+     * Destroys this resizable. If the element was wrapped and 
+     * removeEl is not true then the element remains.
+     * @param {Boolean} removeEl (optional) true to remove the element from the DOM
+     */
+    destroy : function(removeEl){
+        Ext.destroy(this.dd, this.overlay, this.proxy);
+        this.overlay = null;
+        this.proxy = null;
+        
+        var ps = Ext.Resizable.positions;
+        for(var k in ps){
+            if(typeof ps[k] != 'function' && this[ps[k]]){
+                this[ps[k]].destroy();
+            }
+        }
+        if(removeEl){
+            this.el.update('');
+            Ext.destroy(this.el);
+            this.el = null;
+        }
+        this.purgeListeners();
+    },
+
+    syncHandleHeight : function(){
+        var h = this.el.getHeight(true);
+        if(this.west){
+            this.west.el.setHeight(h);
+        }
+        if(this.east){
+            this.east.el.setHeight(h);
+        }
+    }
+});
+
+// private
+// hash to map config positions to true positions
+Ext.Resizable.positions = {
+    n: 'north', s: 'south', e: 'east', w: 'west', se: 'southeast', sw: 'southwest', nw: 'northwest', ne: 'northeast'
+};
+
+// private
+Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){
+    if(!this.tpl){
+        // only initialize the template if resizable is used
+        var tpl = Ext.DomHelper.createTemplate(
+            {tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'}
+        );
+        tpl.compile();
+        Ext.Resizable.Handle.prototype.tpl = tpl;
+    }
+    this.position = pos;
+    this.rz = rz;
+    this.el = this.tpl.append(rz.el.dom, [this.position], true);
+    this.el.unselectable();
+    if(transparent){
+        this.el.setOpacity(0);
+    }
+    this.el.on('mousedown', this.onMouseDown, this);
+    if(!disableTrackOver){
+        this.el.on({
+            scope: this,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+    }
+};
+
+// private
+Ext.Resizable.Handle.prototype = {
+    // private
+    afterResize : function(rz){
+        // do nothing    
+    },
+    // private
+    onMouseDown : function(e){
+        this.rz.onMouseDown(this, e);
+    },
+    // private
+    onMouseOver : function(e){
+        this.rz.handleOver(this, e);
+    },
+    // private
+    onMouseOut : function(e){
+        this.rz.handleOut(this, e);
+    },
+    // private
+    destroy : function(){
+        Ext.destroy(this.el);
+        this.el = null;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/resizable.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.Resizable=function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var f=e.resizeChild.getSize();this.el.setSize(f.width,f.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var j=this.el.getStyle("position");if(j!="absolute"&&j!="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 n=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var h=0,k=n.length;h<k;h++){if(n[h]&&c[n[h]]){var m=c[n[h]];this[m]=new Ext.Resizable.Handle(this,m,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 l=this.west,g=this.east,a=this.north,n=this.south;if(b&&(l||a)){b.position("relative");b.setLeft(l?l.el.getWidth():0);b.setTop(a?a.el.getHeight():0)}this.adjustments=[(g?-g.el.getWidth():0)+(l?-l.el.getWidth():0),(a?-a.el.getHeight():0)+(n?-n.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,{adjustments:[0,0],animate:false,disableTrackOver:false,draggable:false,duration:0.35,dynamic:false,easing:"easeOutStrong",enabled:true,handles:false,multiDirectional:false,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:5,minWidth:5,maxHeight:10000,maxWidth:10000,minX:0,minY:0,pinned:false,preserveRatio:false,resizeChild:false,transparent: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({scope:this,mousemove:this.onMouseMove,mouseup:this.onMouseUp})}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){this.activeHandle=null;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 d=this.el;var e=this.resizeChild;var c=this.adjustments;if(d.dom.offsetWidth){var a=d.getSize(true);e.setSize(a.width+c[0],a.height+c[1])}if(Ext.isIE){setTimeout(function(){if(d.dom.offsetWidth){var f=d.getSize(true);e.setSize(f.width+c[0],f.height+c[1])}},10)}}},snap:function(c,e,b){if(!e||!c){return c}var d=c;var a=c%e;if(a>0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return a},constrain:function(b,c,a,d){if(b-c<a){c=b-a}else{if(b-c>d){c=b-d}}return c},onMouseMove:function(v){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(v.getPoint())){return}var s=this.curSize||this.startBox,k=this.startBox.x,j=this.startBox.y,c=k,b=j,l=s.width,t=s.height,d=l,n=t,m=this.minWidth,z=this.minHeight,r=this.maxWidth,C=this.maxHeight,g=this.widthIncrement,a=this.heightIncrement,A=v.getXY(),q=-(this.startPoint[0]-Math.max(this.minX,A[0])),o=-(this.startPoint[1]-Math.max(this.minY,A[1])),i=this.activeHandle.position,D,f;switch(i){case"east":l+=q;l=Math.min(Math.max(m,l),r);break;case"south":t+=o;t=Math.min(Math.max(z,t),C);break;case"southeast":l+=q;t+=o;l=Math.min(Math.max(m,l),r);t=Math.min(Math.max(z,t),C);break;case"north":o=this.constrain(t,o,z,C);j+=o;t-=o;break;case"west":q=this.constrain(l,q,m,r);k+=q;l-=q;break;case"northeast":l+=q;l=Math.min(Math.max(m,l),r);o=this.constrain(t,o,z,C);j+=o;t-=o;break;case"northwest":q=this.constrain(l,q,m,r);o=this.constrain(t,o,z,C);j+=o;t-=o;k+=q;l-=q;break;case"southwest":q=this.constrain(l,q,m,r);t+=o;t=Math.min(Math.max(z,t),C);k+=q;l-=q;break}var p=this.snap(l,g,m);var B=this.snap(t,a,z);if(p!=l||B!=t){switch(i){case"northeast":j-=B-t;break;case"north":j-=B-t;break;case"southwest":k-=p-l;break;case"west":k-=p-l;break;case"northwest":k-=p-l;j-=B-t;break}l=p;t=B}if(this.preserveRatio){switch(i){case"southeast":case"east":t=n*(l/d);t=Math.min(Math.max(z,t),C);l=d*(t/n);break;case"south":l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);break;case"northeast":l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);break;case"north":D=l;l=d*(t/n);l=Math.min(Math.max(m,l),r);t=n*(l/d);k+=(D-l)/2;break;case"southwest":t=n*(l/d);t=Math.min(Math.max(z,t),C);D=l;l=d*(t/n);k+=D-l;break;case"west":f=t;t=n*(l/d);t=Math.min(Math.max(z,t),C);j+=(f-t)/2;D=l;l=d*(t/n);k+=D-l;break;case"northwest":D=l;f=t;t=n*(l/d);t=Math.min(Math.max(z,t),C);l=d*(t/n);j+=f-t;k+=D-l;break}}this.proxy.setBounds(k,j,l,t);if(this.dynamic){this.resizeElement()}}catch(u){}}},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(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(c,e,b,d){if(!this.tpl){var a=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});a.compile();Ext.Resizable.Handle.prototype.tpl=a}this.position=e;this.rz=c;this.el=this.tpl.append(c.el.dom,[this.position],true);this.el.unselectable();if(d){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!b){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}};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)},destroy:function(){Ext.destroy(this.el);this.el=null}};
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state-debug.js	(revision 625)
@@ -0,0 +1,274 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.state.Provider
+ * Abstract base class for state provider implementations. This class provides methods
+ * for encoding and decoding <b>typed</b> variables including dates and defines the
+ * Provider interface.
+ */
+Ext.state.Provider = function(){
+    /**
+     * @event statechange
+     * Fires when a state change occurs.
+     * @param {Provider} this This state provider
+     * @param {String} key The state key which was changed
+     * @param {String} value The encoded value for the state
+     */
+    this.addEvents("statechange");
+    this.state = {};
+    Ext.state.Provider.superclass.constructor.call(this);
+};
+Ext.extend(Ext.state.Provider, Ext.util.Observable, {
+    /**
+     * Returns the current value for a key
+     * @param {String} name The key name
+     * @param {Mixed} defaultValue A default value to return if the key's value is not found
+     * @return {Mixed} The state data
+     */
+    get : function(name, defaultValue){
+        return typeof this.state[name] == "undefined" ?
+            defaultValue : this.state[name];
+    },
+
+    /**
+     * Clears a value from the state
+     * @param {String} name The key name
+     */
+    clear : function(name){
+        delete this.state[name];
+        this.fireEvent("statechange", this, name, null);
+    },
+
+    /**
+     * Sets the value for a key
+     * @param {String} name The key name
+     * @param {Mixed} value The value to set
+     */
+    set : function(name, value){
+        this.state[name] = value;
+        this.fireEvent("statechange", this, name, value);
+    },
+
+    /**
+     * Decodes a string previously encoded with {@link #encodeValue}.
+     * @param {String} value The value to decode
+     * @return {Mixed} The decoded value
+     */
+    decodeValue : function(cookie){
+        var re = /^(a|n|d|b|s|o)\:(.*)$/;
+        var matches = re.exec(unescape(cookie));
+        if(!matches || !matches[1]) return; // non state cookie
+        var type = matches[1];
+        var v = matches[2];
+        switch(type){
+            case "n":
+                return parseFloat(v);
+            case "d":
+                return new Date(Date.parse(v));
+            case "b":
+                return (v == "1");
+            case "a":
+                var all = [];
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    all.push(this.decodeValue(values[i]));
+                }
+                return all;
+           case "o":
+                var all = {};
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    var kv = values[i].split("=");
+                    all[kv[0]] = this.decodeValue(kv[1]);
+                }
+                return all;
+           default:
+                return v;
+        }
+    },
+
+    /**
+     * Encodes a value including type information.  Decode with {@link #decodeValue}.
+     * @param {Mixed} value The value to encode
+     * @return {String} The encoded value
+     */
+    encodeValue : function(v){
+        var enc;
+        if(typeof v == "number"){
+            enc = "n:" + v;
+        }else if(typeof v == "boolean"){
+            enc = "b:" + (v ? "1" : "0");
+        }else if(Ext.isDate(v)){
+            enc = "d:" + v.toGMTString();
+        }else if(Ext.isArray(v)){
+            var flat = "";
+            for(var i = 0, len = v.length; i < len; i++){
+                flat += this.encodeValue(v[i]);
+                if(i != len-1) flat += "^";
+            }
+            enc = "a:" + flat;
+        }else if(typeof v == "object"){
+            var flat = "";
+            for(var key in v){
+                if(typeof v[key] != "function" && v[key] !== undefined){
+                    flat += key + "=" + this.encodeValue(v[key]) + "^";
+                }
+            }
+            enc = "o:" + flat.substring(0, flat.length-1);
+        }else{
+            enc = "s:" + v;
+        }
+        return escape(enc);
+    }
+});
+/**
+ * @class Ext.state.Manager
+ * This is the global state manager. By default all components that are "state aware" check this class
+ * for state information if you don't pass them a custom state provider. In order for this class
+ * to be useful, it must be initialized with a provider when your application initializes. Example usage:
+ <pre><code>
+// in your initialization function
+init : function(){
+   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+   var win = new Window(...);
+   win.restoreState();
+}
+ </code></pre>
+ * @singleton
+ */
+Ext.state.Manager = function(){
+    var provider = new Ext.state.Provider();
+
+    return {
+        /**
+         * Configures the default state provider for your application
+         * @param {Provider} stateProvider The state provider to set
+         */
+        setProvider : function(stateProvider){
+            provider = stateProvider;
+        },
+
+        /**
+         * Returns the current value for a key
+         * @param {String} name The key name
+         * @param {Mixed} defaultValue The default value to return if the key lookup does not match
+         * @return {Mixed} The state data
+         */
+        get : function(key, defaultValue){
+            return provider.get(key, defaultValue);
+        },
+
+        /**
+         * Sets the value for a key
+         * @param {String} name The key name
+         * @param {Mixed} value The state data
+         */
+         set : function(key, value){
+            provider.set(key, value);
+        },
+
+        /**
+         * Clears a value from the state
+         * @param {String} name The key name
+         */
+        clear : function(key){
+            provider.clear(key);
+        },
+
+        /**
+         * Gets the currently configured state provider
+         * @return {Provider} The state provider
+         */
+        getProvider : function(){
+            return provider;
+        }
+    };
+}();
+/**
+ * @class Ext.state.CookieProvider
+ * @extends Ext.state.Provider
+ * The default Provider implementation which saves state via cookies.
+ * <br />Usage:
+ <pre><code>
+   var cp = new Ext.state.CookieProvider({
+       path: "/cgi-bin/",
+       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
+       domain: "extjs.com"
+   });
+   Ext.state.Manager.setProvider(cp);
+ </code></pre>
+ * @cfg {String} path The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
+ * @cfg {Date} expires The cookie expiration date (defaults to 7 days from now)
+ * @cfg {String} domain The domain to save the cookie for.  Note that you cannot specify a different domain than
+ * your page is on, but you can specify a sub-domain, or simply the domain itself like 'extjs.com' to include
+ * all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same
+ * domain the page is running on including the 'www' like 'www.extjs.com')
+ * @cfg {Boolean} secure True if the site is using SSL (defaults to false)
+ * @constructor
+ * Create a new CookieProvider
+ * @param {Object} config The configuration object
+ */
+Ext.state.CookieProvider = function(config){
+    Ext.state.CookieProvider.superclass.constructor.call(this);
+    this.path = "/";
+    this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days
+    this.domain = null;
+    this.secure = false;
+    Ext.apply(this, config);
+    this.state = this.readCookies();
+};
+
+Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, {
+    // private
+    set : function(name, value){
+        if(typeof value == "undefined" || value === null){
+            this.clear(name);
+            return;
+        }
+        this.setCookie(name, value);
+        Ext.state.CookieProvider.superclass.set.call(this, name, value);
+    },
+
+    // private
+    clear : function(name){
+        this.clearCookie(name);
+        Ext.state.CookieProvider.superclass.clear.call(this, name);
+    },
+
+    // private
+    readCookies : function(){
+        var cookies = {};
+        var c = document.cookie + ";";
+        var re = /\s?(.*?)=(.*?);/g;
+    	var matches;
+    	while((matches = re.exec(c)) != null){
+            var name = matches[1];
+            var value = matches[2];
+            if(name && name.substring(0,3) == "ys-"){
+                cookies[name.substr(3)] = this.decodeValue(value);
+            }
+        }
+        return cookies;
+    },
+
+    // private
+    setCookie : function(name, value){
+        document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
+           ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
+           ((this.path == null) ? "" : ("; path=" + this.path)) +
+           ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
+           ((this.secure == true) ? "; secure" : "");
+    },
+
+    // private
+    clearCookie : function(name){
+        document.cookie = "ys-" + name + "=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" : "");
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/state.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+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 k=/^(a|n|d|b|s|o)\:(.*)$/;var c=k.exec(unescape(a));if(!c||!c[1]){return}var f=c[1];var h=c[2];switch(f){case"n":return parseFloat(h);case"d":return new Date(Date.parse(h));case"b":return(h=="1");case"a":var g=[];var j=h.split("^");for(var b=0,d=j.length;b<d;b++){g.push(this.decodeValue(j[b]))}return g;case"o":var g={};var j=h.split("^");for(var b=0,d=j.length;b<d;b++){var e=j[b].split("=");g[e[0]]=this.decodeValue(e[1])}return g;default:return h}},encodeValue:function(c){var b;if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){var f="";for(var e=0,a=c.length;e<a;e++){f+=this.encodeValue(c[e]);if(e!=a-1){f+="^"}}b="a:"+f}else{if(typeof c=="object"){var f="";for(var d in c){if(typeof c[d]!="function"&&c[d]!==undefined){f+=d+"="+this.encodeValue(c[d])+"^"}}b="o:"+f.substring(0,f.length-1)}else{b="s:"+c}}}}}return escape(b)}});Ext.state.Manager=function(){var a=new Ext.state.Provider();return{setProvider:function(b){a=b},get:function(c,b){return a.get(c,b)},set:function(b,c){a.set(b,c)},clear:function(b){a.clear(b)},getProvider:function(){return a}}}();Ext.state.CookieProvider=function(a){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,a);this.state=this.readCookies()};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(a,b){if(typeof b=="undefined"||b===null){this.clear(a);return}this.setCookie(a,b);Ext.state.CookieProvider.superclass.set.call(this,a,b)},clear:function(a){this.clearCookie(a);Ext.state.CookieProvider.superclass.clear.call(this,a)},readCookies:function(){var d={};var g=document.cookie+";";var b=/\s?(.*?)=(.*?);/g;var f;while((f=b.exec(g))!=null){var a=f[1];var e=f[2];if(a&&a.substring(0,3)=="ys-"){d[a.substr(3)]=this.decodeValue(e)}}return d},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":"")}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window-debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window-debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window-debug.js	(revision 625)
@@ -0,0 +1,1888 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Window
+ * @extends Ext.Panel
+ * <p>A specialized panel intended for use as an application window.  Windows are floated, {@link #resizable}, and
+ * {@link #draggable} by default.  Windows can be {@link #maximizable maximized} to fill the viewport,
+ * restored to their prior size, and can be {@link #minimize}d.</p>
+ * <p>Windows can also be linked to a {@link Ext.WindowGroup} or managed by the {@link Ext.WindowMgr} to provide 
+ * grouping, activation, to front, to back and other application-specific behavior.</p>
+ * <p>By default, Windows will be rendered to document.body. To {@link #constrain} a Window to another element
+ * specify {@link Ext.Component#renderTo renderTo}.</p>
+ * <p><b>Note:</b> By default, the <code>{@link #closable close}</code> header tool <i>destroys</i> the Window resulting in
+ * destruction of any child Components. This makes the Window object, and all its descendants <b>unusable</b>. To enable
+ * re-use of a Window, use <b><code>{@link #closeAction closeAction: 'hide'}</code></b>.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype window
+ */
+Ext.Window = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} x
+     * The X position of the left edge of the window on initial showing. Defaults to centering the Window within
+     * the width of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Number} y
+     * The Y position of the top edge of the window on initial showing. Defaults to centering the Window within
+     * the height of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Boolean} modal
+     * True to make the window modal and mask everything behind it when displayed, false to display it without
+     * restricting access to other UI elements (defaults to false).
+     */
+    /**
+     * @cfg {String/Element} animateTarget
+     * Id or element from which the window should animate while opening (defaults to null with no animation).
+     */
+    /**
+     * @cfg {String} resizeHandles
+     * A valid {@link Ext.Resizable} handles config string (defaults to 'all').  Only applies when resizable = true.
+     */
+    /**
+     * @cfg {Ext.WindowGroup} manager
+     * A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}).
+     */
+    /**
+    * @cfg {String/Number/Button} defaultButton
+    * The id / index of a button or a button instance to focus when this window received the focus.
+    */
+    /**
+    * @cfg {Function} onEsc
+    * Allows override of the built-in processing for the escape key. Default action
+    * is to close the Window (performing whatever action is specified in {@link #closeAction}.
+    * To prevent the Window closing when the escape key is pressed, specify this as
+    * Ext.emptyFn (See {@link Ext#emptyFn}).
+    */
+    /**
+     * @cfg {Boolean} collapsed
+     * True to render the window collapsed, false to render it expanded (defaults to false). Note that if 
+     * {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window 
+     * will always be expanded when shown.
+     */
+    /**
+     * @cfg {Boolean} maximized
+     * True to initially display the window in a maximized state. (Defaults to false).
+     */
+    
+    /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to this panel's element (defaults to 'x-window').
+    */
+    baseCls : 'x-window',
+    /**
+     * @cfg {Boolean} resizable
+     * True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
+     */
+    resizable : true,
+    /**
+     * @cfg {Boolean} draggable
+     * True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true).  Note
+     * that by default the window will be centered in the viewport, so if dragging is disabled the window may need
+     * to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).
+     */
+    draggable : true,
+    /**
+     * @cfg {Boolean} closable
+     * <p>True to display the 'close' tool button and allow the user to close the window, false to
+     * hide the button and disallow closing the window (defaults to true).</p>
+     * <p>By default, when close is requested by either clicking the close button in the header
+     * or pressing ESC when the Window has focus, the {@link #close} method will be called. This
+     * will <i>{@link Ext.Component#destroy destroy}</i> the Window and its content meaning that
+     * it may not be reused.</p>
+     * <p>To make closing a Window <i>hide</i> the Window so that it may be reused, set
+     * {@link #closeAction} to 'hide'.
+     */
+    closable : true,
+    /**
+     * @cfg {String} closeAction
+     * <p>The action to take when the close header tool is clicked:
+     * <div class="mdetail-params"><ul>
+     * <li><b><code>'{@link #close}'</code></b> : <b>Default</b><div class="sub-desc">
+     * {@link #close remove} the window from the DOM and {@link Ext.Component#destroy destroy}
+     * it and all descendant Components. The window will <b>not</b> be available to be
+     * redisplayed via the {@link #show} method.
+     * </div></li>
+     * <li><b><code>'{@link #hide}'</code></b> : <div class="sub-desc">
+     * {@link #hide} the window by setting visibility to hidden and applying negative offsets.
+     * The window will be available to be redisplayed via the {@link #show} method.
+     * </div></li>
+     * </ul></div>
+     * <p><b>Note:</b> This setting does not affect the {@link #close} method
+     * which will always {@link Ext.Component#destroy destroy} the window. To
+     * programatically <i>hide</i> a window, call {@link #hide}.</p>
+     */
+    closeAction : 'close',
+    /**
+     * @cfg {Boolean} constrain
+     * True to constrain the window within its containing element, false to allow it to fall outside of its
+     * containing element. By default the window will be rendered to document.body.  To render and constrain the 
+     * window within another element specify {@link #renderTo}.
+     * (defaults to false).  Optionally the header only can be constrained using {@link #constrainHeader}.
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} constrainHeader
+     * True to constrain the window header within its containing element (allowing the window body to fall outside 
+     * of its containing element) or false to allow the header to fall outside its containing element (defaults to 
+     * false). Optionally the entire window can be constrained using {@link #constrain}.
+     */
+    constrainHeader : false,
+    /**
+     * @cfg {Boolean} plain
+     * True to render the window body with a transparent background so that it will blend into the framing
+     * elements, false to add a lighter background color to visually highlight the body element and separate it
+     * more distinctly from the surrounding frame (defaults to false).
+     */
+    plain : false,
+    /**
+     * @cfg {Boolean} minimizable
+     * True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button
+     * and disallow minimizing the window (defaults to false).  Note that this button provides no implementation --
+     * the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a
+     * custom minimize behavior implemented for this option to be useful.
+     */
+    minimizable : false,
+    /**
+     * @cfg {Boolean} maximizable
+     * True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button
+     * and disallow maximizing the window (defaults to false).  Note that when a window is maximized, the tool button
+     * will automatically change to a 'restore' button with the appropriate behavior already built-in that will
+     * restore the window to its previous size.
+     */
+    maximizable : false,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum height in pixels allowed for this window (defaults to 100).  Only applies when resizable = true.
+     */
+    minHeight : 100,
+    /**
+     * @cfg {Number} minWidth
+     * The minimum width in pixels allowed for this window (defaults to 200).  Only applies when resizable = true.
+     */
+    minWidth : 200,
+    /**
+     * @cfg {Boolean} expandOnShow
+     * True to always expand the window when it is displayed, false to keep it in its current state (which may be
+     * {@link #collapsed}) when displayed (defaults to true).
+     */
+    expandOnShow : true,
+
+    // inherited docs, same default
+    collapsible : false,
+
+    /**
+     * @cfg {Boolean} initHidden
+     * True to hide the window until show() is explicitly called (defaults to true).
+     */
+    initHidden : true,
+    /**
+    * @cfg {Boolean} monitorResize @hide
+    * This is automatically managed based on the value of constrain and constrainToHeader
+    */
+    monitorResize : true,
+
+    // The following configs are set to provide the basic functionality of a window.
+    // Changing them would require additional code to handle correctly and should
+    // usually only be done in subclasses that can provide custom behavior.  Changing them
+    // may have unexpected or undesirable results.
+    /** @cfg {String} elements @hide */
+    elements : 'header,body',
+    /** @cfg {Boolean} frame @hide */
+    frame : true,
+    /** @cfg {Boolean} floating @hide */
+    floating : true,
+
+    // private
+    initComponent : function(){
+        Ext.Window.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event activate
+             * Fires after the window has been visually activated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event deactivate
+             * Fires after the window has been visually deactivated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event resize
+             * Fires after the window has been resized.
+             * @param {Ext.Window} this
+             * @param {Number} width The window's new width
+             * @param {Number} height The window's new height
+             */
+            'resize',
+            /**
+             * @event maximize
+             * Fires after the window has been maximized.
+             * @param {Ext.Window} this
+             */
+            'maximize',
+            /**
+             * @event minimize
+             * Fires after the window has been minimized.
+             * @param {Ext.Window} this
+             */
+            'minimize',
+            /**
+             * @event restore
+             * Fires after the window has been restored to its original size after being maximized.
+             * @param {Ext.Window} this
+             */
+            'restore'
+        );
+        if(this.initHidden === false){
+            this.show();
+        }else{
+            this.hidden = true;
+        }
+    },
+
+    // private
+    getState : function(){
+        return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true));
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Window.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            this.el.addClass('x-window-plain');
+        }
+
+        // this element allows the Window to be focused for keyboard events
+        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();
+            this.mon(this.mask, 'click', this.focus, this);
+        }
+        this.initTools();
+    },
+
+    // private
+    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.mon(this.resizer, 'beforeresize', this.beforeResize, this);
+        }
+
+        if(this.draggable){
+            this.header.addClass('x-window-draggable');
+        }
+        this.mon(this.el, 'mousedown', this.toFront, this);
+        this.manager = this.manager || Ext.WindowMgr;
+        this.manager.register(this);
+        if(this.maximized){
+            this.maximized = false;
+            this.maximize();
+        }
+        if(this.closable){
+            var km = this.getKeyMap();
+            km.on(27, this.onEsc, this);
+            km.disable();
+        }
+    },
+
+    initDraggable : function(){
+        /**
+         * If this Window is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element.
+         * @type Ext.dd.DD
+         * @property dd
+         */
+        this.dd = new Ext.Window.DD(this);
+    },
+
+   // private
+    onEsc : function(){
+        this[this.closeAction]();
+    },
+
+    // private
+    beforeDestroy : function(){
+        if (this.rendered){
+            this.hide();
+          if(this.doAnchor){
+                Ext.EventManager.removeResizeListener(this.doAnchor, this);
+              Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+            }
+            Ext.destroy(
+                this.focusEl,
+                this.resizer,
+                this.dd,
+                this.proxy,
+                this.mask
+            );
+        }
+        Ext.Window.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.manager){
+            this.manager.unregister(this);
+        }
+        Ext.Window.superclass.onDestroy.call(this);
+    },
+
+    // private
+    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.mon(this.header, 'dblclick', this.toggleMaximize, this);
+        }
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction].createDelegate(this, [])
+            });
+        }
+    },
+
+    // private
+    resizerAction : function(){
+        var box = this.proxy.getBox();
+        this.proxy.hide();
+        this.window.handleResize(box);
+        return box;
+    },
+
+    // private
+    beforeResize : function(){
+        this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); // 40 is a magic minimum content size?
+        this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40);
+        this.resizeBox = this.el.getBox();
+    },
+
+    // private
+    updateHandles : function(){
+        if(Ext.isIE && this.resizer){
+            this.resizer.syncHandleHeight();
+            this.el.repaint();
+        }
+    },
+
+    // private
+    handleResize : function(box){
+        var rz = this.resizeBox;
+        if(rz.x != box.x || rz.y != box.y){
+            this.updateBox(box);
+        }else{
+            this.setSize(box);
+        }
+        this.focus();
+        this.updateHandles();
+        this.saveState();
+        this.doLayout();
+        this.fireEvent('resize', this, box.width, box.height);
+    },
+
+    /**
+     * Focuses the window.  If a defaultButton is set, it will receive focus, otherwise the
+     * window itself will receive focus.
+     */
+    focus : function(){
+        var f = this.focusEl, db = this.defaultButton, t = typeof db;
+        if(t != 'undefined'){
+            if(t == 'number' && this.fbar){
+                f = this.fbar.items.get(db);
+            }else if(t == 'string'){
+                f = Ext.getCmp(db);
+            }else{
+                f = db;
+            }
+        }
+        f = f || this.focusEl;
+        f.focus.defer(10, f);
+    },
+
+    /**
+     * Sets the target element from which the window should animate while opening.
+     * @param {String/Element} el The target element or id
+     */
+    setAnimateTarget : function(el){
+        el = Ext.get(el);
+        this.animateTarget = el;
+    },
+
+    // private
+    beforeShow : function(){
+        delete this.el.lastXY;
+        delete this.el.lastLT;
+        if(this.x === undefined || this.y === undefined){
+            var xy = this.el.getAlignToXY(this.container, 'c-c');
+            var pos = this.el.translatePoints(xy[0], xy[1]);
+            this.x = this.x === undefined? pos.left : this.x;
+            this.y = this.y === undefined? pos.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();
+        }
+    },
+
+    /**
+     * Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
+     * @param {String/Element} animateTarget (optional) The target element or id from which the window should
+     * animate while opening (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is displayed
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    show : function(animateTarget, cb, scope){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        if(this.hidden === false){
+            this.toFront();
+            return this;
+        }
+        if(this.fireEvent('beforeshow', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('show', cb, scope, {single:true});
+        }
+        this.hidden = false;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        this.beforeShow();
+        if(this.animateTarget){
+            this.animShow();
+        }else{
+            this.afterShow();
+        }
+        return this;
+    },
+
+    // private
+    afterShow : function(isAnim){
+        this.proxy.hide();
+        this.el.setStyle('display', 'block');
+        this.el.show();
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+            this.cascade(this.setAutoScroll);
+        }
+
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.onWindowResize(this.onWindowResize, this);
+        }
+        this.doConstrain();
+        this.doLayout();
+        if(this.keyMap){
+            this.keyMap.enable();
+        }
+        this.toFront();
+        this.updateHandles();
+        if(isAnim && (Ext.isIE || Ext.isWebKit)){
+            var sz = this.getSize();
+            this.onResize(sz.width, sz.height);
+        }
+        this.fireEvent('show', this);
+    },
+
+    // private
+    animShow : function(){
+        this.proxy.show();
+        this.proxy.setBox(this.animateTarget.getBox());
+        this.proxy.setOpacity(0);
+        var b = this.getBox(false);
+        b.callback = this.afterShow.createDelegate(this, [true], false);
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.opacity = 0.5;
+        b.block = true;
+        this.el.setStyle('display', 'none');
+        this.proxy.shift(b);
+    },
+
+    /**
+     * Hides the window, setting it to invisible and applying negative offsets.
+     * @param {String/Element} animateTarget (optional) The target element or id to which the window should
+     * animate while hiding (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is hidden
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    hide : function(animateTarget, cb, scope){
+        if(this.hidden || this.fireEvent('beforehide', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('hide', cb, scope, {single:true});
+        }
+        this.hidden = true;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        if(this.modal){
+            this.mask.hide();
+            Ext.getBody().removeClass('x-body-masked');
+        }
+        if(this.animateTarget){
+            this.animHide();
+        }else{
+            this.el.hide();
+            this.afterHide();
+        }
+        return this;
+    },
+
+    // private
+    afterHide : function(){
+        this.proxy.hide();
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        }
+        if(this.keyMap){
+            this.keyMap.disable();
+        }
+        this.fireEvent('hide', this);
+    },
+
+    // private
+    animHide : function(){
+        this.proxy.setOpacity(0.5);
+        this.proxy.show();
+        var tb = this.getBox(false);
+        this.proxy.setBox(tb);
+        this.el.hide();
+        var b = this.animateTarget.getBox();
+        b.callback = this.afterHide;
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.block = true;
+        b.opacity = 0;
+        this.proxy.shift(b);
+    },
+
+    // private
+    onWindowResize : function(){
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(this.modal){
+            this.mask.setSize('100%', '100%');
+            var force = this.mask.dom.offsetHeight;
+            this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
+        }
+        this.doConstrain();
+    },
+
+    // private
+    doConstrain : function(){
+        if(this.constrain || this.constrainHeader){
+            var offsets;
+            if(this.constrain){
+                offsets = {
+                    right:this.el.shadowOffset,
+                    left:this.el.shadowOffset,
+                    bottom:this.el.shadowOffset
+                };
+            }else {
+                var s = this.getSize();
+                offsets = {
+                    right:-(s.width - 100),
+                    bottom:-(s.height - 25)
+                };
+            }
+
+            var xy = this.el.getConstrainToXY(this.container, true, offsets);
+            if(xy){
+                this.setPosition(xy[0], xy[1]);
+            }
+        }
+    },
+
+    // private - used for dragging
+    ghost : function(cls){
+        var ghost = this.createGhost(cls);
+        var box = this.getBox(true);
+        ghost.setLeftTop(box.x, box.y);
+        ghost.setWidth(box.width);
+        this.el.hide();
+        this.activeGhost = ghost;
+        return ghost;
+    },
+
+    // private
+    unghost : function(show, matchPosition){
+        if(!this.activeGhost) {
+            return;
+        }
+        if(show !== false){
+            this.el.show();
+            this.focus();
+            if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+                this.cascade(this.setAutoScroll);
+            }
+        }
+        if(matchPosition !== false){
+            this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true));
+        }
+        this.activeGhost.hide();
+        this.activeGhost.remove();
+        delete this.activeGhost;
+    },
+
+    /**
+     * Placeholder method for minimizing the window.  By default, this method simply fires the {@link #minimize} event
+     * since the behavior of minimizing a window is application-specific.  To implement custom minimize behavior,
+     * either the minimize event can be handled or this method can be overridden.
+     * @return {Ext.Window} this
+     */
+    minimize : function(){
+        this.fireEvent('minimize', this);
+        return this;
+    },
+
+    /**
+     * <p>Closes the Window, removes it from the DOM, {@link Ext.Component#destroy destroy}s
+     * the Window object and all its descendant Components. The {@link Ext.Panel#beforeclose beforeclose}
+     * event is fired before the close happens and will cancel the close action if it returns false.<p>
+     * <p><b>Note:</b> This method is not affected by the {@link #closeAction} setting which
+     * only affects the action triggered when clicking the {@link #closable 'close' tool in the header}.
+     * To hide the Window without destroying it, call {@link #hide}.</p>
+     */
+    close : function(){
+        if(this.fireEvent('beforeclose', this) !== false){
+            this.hide(null, function(){
+                this.fireEvent('close', this);
+                this.destroy();
+            }, this);
+        }
+    },
+
+    /**
+     * Fits the window within its current container and automatically replaces
+     * the {@link #maximizable 'maximize' tool button} with the 'restore' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * Restores a {@link #maximizable maximized}  window back to its original
+     * size and position prior to being maximized and also replaces
+     * the 'restore' tool button with the 'maximize' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * A shortcut method for toggling between {@link #maximize} and {@link #restore} based on the current maximized
+     * state of the window.
+     * @return {Ext.Window} this
+     */
+    toggleMaximize : function(){
+        return this[this.maximized ? 'restore' : 'maximize']();
+    },
+
+    // private
+    fitContainer : function(){
+        var vs = this.container.getViewSize();
+        this.setSize(vs.width, vs.height);
+    },
+
+    // private
+    // z-index is managed by the WindowManager and may be overwritten at any time
+    setZIndex : function(index){
+        if(this.modal){
+            this.mask.setStyle('z-index', index);
+        }
+        this.el.setZIndex(++index);
+        index += 5;
+
+        if(this.resizer){
+            this.resizer.proxy.setStyle('z-index', ++index);
+        }
+
+        this.lastZIndex = index;
+    },
+
+    /**
+     * Aligns the window to the specified element
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details).
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Ext.Window} this
+     */
+    alignTo : function(element, position, offsets){
+        var xy = this.el.getAlignToXY(element, position, offsets);
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    },
+
+    /**
+     * Anchors this window to another element and realigns it when the window is resized or scrolled.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details)
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @return {Ext.Window} this
+     */
+    anchorTo : function(el, alignment, offsets, monitorScroll){
+      if(this.doAnchor){
+          Ext.EventManager.removeResizeListener(this.doAnchor, this);
+          Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+      }
+      this.doAnchor = function(){
+          this.alignTo(el, alignment, offsets);
+      };
+      Ext.EventManager.onWindowResize(this.doAnchor, this);
+      
+      var tm = typeof monitorScroll;
+      if(tm != 'undefined'){
+          Ext.EventManager.on(window, 'scroll', this.doAnchor, this,
+              {buffer: tm == 'number' ? monitorScroll : 50});
+      }
+      this.doAnchor();
+      return this;
+    },
+
+    /**
+     * Brings this window to the front of any other visible windows
+     * @param {Boolean} e (optional) Specify <tt>false</tt> to prevent the window from being focused.
+     * @return {Ext.Window} this
+     */
+    toFront : function(e){
+        if(this.manager.bringToFront(this)){
+            if(!e || !e.getTarget().focus){
+                this.focus();
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Makes this the active window by showing its shadow, or deactivates it by hiding its shadow.  This method also
+     * fires the {@link #activate} or {@link #deactivate} event depending on which action occurred.
+     * @param {Boolean} active True to activate the window, false to deactivate it (defaults to false)
+     */
+    setActive : function(active){
+        if(active){
+            if(!this.maximized){
+                this.el.enableShadow(true);
+            }
+            this.fireEvent('activate', this);
+        }else{
+            this.el.disableShadow();
+            this.fireEvent('deactivate', this);
+        }
+    },
+
+    /**
+     * Sends this window to the back of (lower z-index than) any other visible windows
+     * @return {Ext.Window} this
+     */
+    toBack : function(){
+        this.manager.sendToBack(this);
+        return this;
+    },
+
+    /**
+     * Centers this window in the viewport
+     * @return {Ext.Window} this
+     */
+    center : function(){
+        var xy = this.el.getAlignToXY(this.container, 'c-c');
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     **/
+});
+Ext.reg('window', Ext.Window);
+
+// private - custom Window DD implementation
+Ext.Window.DD = function(win){
+    this.win = win;
+    Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id);
+    this.setHandleElId(win.header.id);
+    this.scroll = false;
+};
+
+Ext.extend(Ext.Window.DD, Ext.dd.DD, {
+    moveOnly:true,
+    headerOffsets:[100, 25],
+    startDrag : function(){
+        var w = this.win;
+        this.proxy = w.ghost();
+        if(w.constrain !== false){
+            var so = w.el.shadowOffset;
+            this.constrainTo(w.container, {right: so, left: so, bottom: so});
+        }else if(w.constrainHeader !== false){
+            var s = this.proxy.getSize();
+            this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])});
+        }
+    },
+    b4Drag : Ext.emptyFn,
+
+    onDrag : function(e){
+        this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY());
+    },
+
+    endDrag : function(e){
+        this.win.unghost();
+        this.win.saveState();
+    }
+});
+/**
+ * @class Ext.WindowGroup
+ * An object that represents a group of {@link Ext.Window} instances and provides z-order management
+ * and window activation behavior.
+ * @constructor
+ */
+Ext.WindowGroup = function(){
+    var list = {};
+    var accessList = [];
+    var front = null;
+
+    // private
+    var sortWindows = function(d1, d2){
+        return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1;
+    };
+
+    // private
+    var orderWindows = function(){
+        var a = accessList, len = a.length;
+        if(len > 0){
+            a.sort(sortWindows);
+            var seed = a[0].manager.zseed;
+            for(var i = 0; i < len; i++){
+                var win = a[i];
+                if(win && !win.hidden){
+                    win.setZIndex(seed + (i*10));
+                }
+            }
+        }
+        activateLast();
+    };
+
+    // private
+    var setActiveWin = function(win){
+        if(win != front){
+            if(front){
+                front.setActive(false);
+            }
+            front = win;
+            if(win){
+                win.setActive(true);
+            }
+        }
+    };
+
+    // private
+    var activateLast = function(){
+        for(var i = accessList.length-1; i >=0; --i) {
+            if(!accessList[i].hidden){
+                setActiveWin(accessList[i]);
+                return;
+            }
+        }
+        // none to activate
+        setActiveWin(null);
+    };
+
+    return {
+        /**
+         * The starting z-index for windows (defaults to 9000)
+         * @type Number The z-index value
+         */
+        zseed : 9000,
+
+        // private
+        register : function(win){
+            list[win.id] = win;
+            accessList.push(win);
+            win.on('hide', activateLast);
+        },
+
+        // private
+        unregister : function(win){
+            delete list[win.id];
+            win.un('hide', activateLast);
+            accessList.remove(win);
+        },
+
+        /**
+         * Gets a registered window by id.
+         * @param {String/Object} id The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window}
+         */
+        get : function(id){
+            return typeof id == "object" ? id : list[id];
+        },
+
+        /**
+         * Brings the specified window to the front of any other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Boolean} True if the dialog was brought to the front, else false
+         * if it was already in front
+         */
+        bringToFront : function(win){
+            win = this.get(win);
+            if(win != front){
+                win._lastAccess = new Date().getTime();
+                orderWindows();
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Sends the specified window to the back of other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window} The window
+         */
+        sendToBack : function(win){
+            win = this.get(win);
+            win._lastAccess = -(new Date().getTime());
+            orderWindows();
+            return win;
+        },
+
+        /**
+         * Hides all windows in the group.
+         */
+        hideAll : function(){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function" && list[id].isVisible()){
+                    list[id].hide();
+                }
+            }
+        },
+
+        /**
+         * Gets the currently-active window in the group.
+         * @return {Ext.Window} The active window
+         */
+        getActive : function(){
+            return front;
+        },
+
+        /**
+         * Returns zero or more windows in the group using the custom search function passed to this method.
+         * The function should accept a single {@link Ext.Window} reference as its only argument and should
+         * return true if the window matches the search criteria, otherwise it should return false.
+         * @param {Function} fn The search function
+         * @param {Object} scope (optional) The scope in which to execute the function (defaults to the window
+         * that gets passed to the function if not specified)
+         * @return {Array} An array of zero or more matching windows
+         */
+        getBy : function(fn, scope){
+            var r = [];
+            for(var i = accessList.length-1; i >=0; --i) {
+                var win = accessList[i];
+                if(fn.call(scope||win, win) !== false){
+                    r.push(win);
+                }
+            }
+            return r;
+        },
+
+        /**
+         * Executes the specified function once for every window in the group, passing each
+         * window as the only parameter. Returning false from the function will stop the iteration.
+         * @param {Function} fn The function to execute for each item
+         * @param {Object} scope (optional) The scope in which to execute the function
+         */
+        each : function(fn, scope){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function"){
+                    if(fn.call(scope || list[id], list[id]) === false){
+                        return;
+                    }
+                }
+            }
+        }
+    };
+};
+
+
+/**
+ * @class Ext.WindowMgr
+ * @extends Ext.WindowGroup
+ * The default global window group that is available automatically.  To have more than one group of windows
+ * with separate z-order stacks, create additional instances of {@link Ext.WindowGroup} as needed.
+ * @singleton
+ */
+Ext.WindowMgr = new Ext.WindowGroup();/**
+ * @class Ext.MessageBox
+ * <p>Utility class for generating different styles of message boxes.  The alias Ext.Msg can also be used.<p/>
+ * <p>Note that the MessageBox is asynchronous.  Unlike a regular JavaScript <code>alert</code> (which will halt
+ * browser execution), showing a MessageBox will not cause the code to stop.  For this reason, if you have code
+ * that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
+ * (see the <code>function</code> parameter for {@link #show} for more details).</p>
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic alert:
+Ext.Msg.alert('Status', 'Changes saved successfully.');
+
+// Prompt for user data and process the result using a callback:
+Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
+    if (btn == 'ok'){
+        // process text value and close...
+    }
+});
+
+// Show a dialog using config options:
+Ext.Msg.show({
+   title:'Save Changes?',
+   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
+   buttons: Ext.Msg.YESNOCANCEL,
+   fn: processResult,
+   animEl: 'elId',
+   icon: Ext.MessageBox.QUESTION
+});
+</code></pre>
+ * @singleton
+ */
+Ext.MessageBox = function(){
+    var dlg, opt, mask, waitTimer;
+    var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl;
+    var buttons, activeTextEl, bwidth, iconCls = '';
+
+    // private
+    var handleButton = function(button){
+        if(dlg.isVisible()){
+            dlg.hide();
+            handleHide();
+            Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value, opt], 1);
+        }
+    };
+
+    // private
+    var handleHide = function(){
+        if(opt && opt.cls){
+            dlg.el.removeClass(opt.cls);
+        }
+        progressBar.reset();
+    };
+
+    // private
+    var handleEsc = function(d, k, e){
+        if(opt && opt.closable !== false){
+            dlg.hide();
+            handleHide();
+        }
+        if(e){
+            e.stopEvent();
+        }
+    };
+
+    // private
+    var updateButtons = function(b){
+        var width = 0;
+        if(!b){
+            buttons["ok"].hide();
+            buttons["cancel"].hide();
+            buttons["yes"].hide();
+            buttons["no"].hide();
+            return width;
+        }
+        dlg.footer.dom.style.display = '';
+        for(var k in buttons){
+            if(typeof buttons[k] != "function"){
+                if(b[k]){
+                    buttons[k].show();
+                    buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]);
+                    width += buttons[k].el.getWidth()+15;
+                }else{
+                    buttons[k].hide();
+                }
+            }
+        }
+        return width;
+    };
+
+    return {
+        /**
+         * Returns a reference to the underlying {@link Ext.Window} element
+         * @return {Ext.Window} The window
+         */
+        getDialog : function(titleText){
+           if(!dlg){
+                dlg = new Ext.Window({
+                    autoCreate : true,
+                    title:titleText,
+                    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(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){
+                            handleButton("no");
+                        }else{
+                            handleButton("cancel");
+                        }
+                    }
+                });
+                buttons = {};
+                var bt = this.buttonText;
+                //TODO: refactor this block into a buttons config to pass into the Window constructor
+                buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok"));
+                buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes"));
+                buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no"));
+                buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel"));
+                buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets';
+                dlg.render(document.body);
+                dlg.getEl().addClass('x-window-dlg');
+                mask = dlg.mask;
+                bodyEl = dlg.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>'
+                });
+                iconEl = Ext.get(bodyEl.dom.firstChild);
+                var contentEl = bodyEl.dom.childNodes[1];
+                msgEl = Ext.get(contentEl.firstChild);
+                textboxEl = Ext.get(contentEl.childNodes[2].firstChild);
+                textboxEl.enableDisplayMode();
+                textboxEl.addKeyListener([10,13], function(){
+                    if(dlg.isVisible() && opt && opt.buttons){
+                        if(opt.buttons.ok){
+                            handleButton("ok");
+                        }else if(opt.buttons.yes){
+                            handleButton("yes");
+                        }
+                    }
+                });
+                textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]);
+                textareaEl.enableDisplayMode();
+                progressBar = new Ext.ProgressBar({
+                    renderTo:bodyEl
+                });
+               bodyEl.createChild({cls:'x-clear'});
+            }
+            return dlg;
+        },
+
+        /**
+         * Updates the message box body text
+         * @param {String} text (optional) Replaces the message box element's innerHTML with the specified string (defaults to
+         * the XHTML-compliant non-breaking space character '&amp;#160;')
+         * @return {Ext.MessageBox} this
+         */
+        updateText : function(text){
+            if(!dlg.isVisible() && !opt.width){
+                dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows
+            }
+            msgEl.update(text || '&#160;');
+
+            var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0;
+            var mw = msgEl.getWidth() + msgEl.getMargins('lr');
+            var fw = dlg.getFrameWidth('lr');
+            var bw = dlg.body.getFrameWidth('lr');
+            if (Ext.isIE && iw > 0){
+                //3 pixels get subtracted in the icon CSS for an IE margin issue,
+                //so we have to add it back here for the overall width to be consistent
+                iw += 3;
+            }
+            var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth),
+                        Math.max(opt.minWidth || this.minWidth, bwidth || 0));
+
+            if(opt.prompt === true){
+                activeTextEl.setWidth(w-iw-fw-bw);
+            }
+            if(opt.progress === true || opt.wait === true){
+                progressBar.setSize(w-iw-fw-bw);
+            }
+            if(Ext.isIE && w == bwidth){
+                w += 4; //Add offset when the content width is smaller than the buttons.    
+            }
+            dlg.setSize(w, 'auto').center();
+            return this;
+        },
+
+        /**
+         * Updates a progress-style message box's text and progress bar. Only relevant on message boxes
+         * initiated via {@link Ext.MessageBox#progress} or {@link Ext.MessageBox#wait},
+         * or by calling {@link Ext.MessageBox#show} with progress: true.
+         * @param {Number} value Any number between 0 and 1 (e.g., .5, defaults to 0)
+         * @param {String} progressText The progress text to display inside the progress bar (defaults to '')
+         * @param {String} msg The message box's body text is replaced with the specified string (defaults to undefined
+         * so that any existing body text will not get overwritten by default unless a new value is passed in)
+         * @return {Ext.MessageBox} this
+         */
+        updateProgress : function(value, progressText, msg){
+            progressBar.updateProgress(value, progressText);
+            if(msg){
+                this.updateText(msg);
+            }
+            return this;
+        },
+
+        /**
+         * Returns true if the message box is currently displayed
+         * @return {Boolean} True if the message box is visible, else false
+         */
+        isVisible : function(){
+            return dlg && dlg.isVisible();
+        },
+
+        /**
+         * Hides the message box if it is displayed
+         * @return {Ext.MessageBox} this
+         */
+        hide : function(){
+            var proxy = dlg ? dlg.activeGhost : null;
+            if(this.isVisible() || proxy){
+                dlg.hide();
+                handleHide();
+                if (proxy){
+                    // unghost is a private function, but i saw no better solution
+                    // to fix the locking problem when dragging while it closes
+                    dlg.unghost(false, false);
+                } 
+            }
+            return this;
+        },
+
+        /**
+         * Displays a new message box, or reinitializes an existing message box, based on the config options
+         * passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,
+         * although those calls are basic shortcuts and do not support all of the config options allowed here.
+         * @param {Object} config The following config options are supported: <ul>
+         * <li><b>animEl</b> : String/Element<div class="sub-desc">An id or Element from which the message box should animate as it
+         * opens and closes (defaults to undefined)</div></li>
+         * <li><b>buttons</b> : Object/Boolean<div class="sub-desc">A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
+         * cancel:'Bar'}), or false to not show any buttons (defaults to false)</div></li>
+         * <li><b>closable</b> : Boolean<div class="sub-desc">False to hide the top-right close button (defaults to true). Note that
+         * progress and wait dialogs will ignore this property and always hide the close button as they can only
+         * be closed programmatically.</div></li>
+         * <li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
+         * <li><b>defaultTextHeight</b> : Number<div class="sub-desc">The default height in pixels of the message box's multiline textarea
+         * if displayed (defaults to 75)</div></li>
+         * <li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
+         * by clicking on the configured buttons, or on the dialog close button, or by pressing
+         * the return button to enter input.
+         * <p>Progress and wait dialogs will ignore this option since they do not respond to user
+         * actions and can only be closed programmatically, so any required function should be called
+         * by the same code after it closes the dialog. Parameters passed:<ul>
+         * <li><b>buttonId</b> : String<div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul>
+         * <li><tt>ok</tt></li>
+         * <li><tt>yes</tt></li>
+         * <li><tt>no</tt></li>
+         * <li><tt>cancel</tt></li>
+         * </ul></div></div></li>
+         * <li><b>text</b> : String<div class="sub-desc">Value of the input field if either <tt><a href="#show-option-prompt" ext:member="show-option-prompt" ext:cls="Ext.MessageBox">prompt</a></tt>
+         * or <tt><a href="#show-option-multiline" ext:member="show-option-multiline" ext:cls="Ext.MessageBox">multiline</a></tt> is true</div></li>
+         * <li><b>opt</b> : Object<div class="sub-desc">The config object passed to show.</div></li>
+         * </ul></p></div></li>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope of the callback function</div></li>
+         * <li><b>icon</b> : String<div class="sub-desc">A CSS class that provides a background image to be used as the body icon for the
+         * dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')</div></li>
+         * <li><b>iconCls</b> : String<div class="sub-desc">The standard {@link Ext.Window#iconCls} to
+         * add an optional header icon (defaults to '')</div></li>
+         * <li><b>maxWidth</b> : Number<div class="sub-desc">The maximum width in pixels of the message box (defaults to 600)</div></li>
+         * <li><b>minWidth</b> : Number<div class="sub-desc">The minimum width in pixels of the message box (defaults to 100)</div></li>
+         * <li><b>modal</b> : Boolean<div class="sub-desc">False to allow user interaction with the page while the message box is
+         * displayed (defaults to true)</div></li>
+         * <li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
+         * XHTML-compliant non-breaking space character '&amp;#160;')</div></li>
+         * <li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">
+         * True to prompt the user to enter multi-line text (defaults to false)</div></li>
+         * <li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
+         * <li><a id="show-option-prompt"></a><b>prompt</b> : Boolean<div class="sub-desc">True to prompt the user to enter single-line text (defaults to false)</div></li>
+         * <li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
+         * <li><b>title</b> : String<div class="sub-desc">The title text</div></li>
+         * <li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
+         * <li><b>wait</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>waitConfig</b> : Object<div class="sub-desc">A {@link Ext.ProgressBar#waitConfig} object (applies only if wait = true)</div></li>
+         * <li><b>width</b> : Number<div class="sub-desc">The width of the dialog in pixels</div></li>
+         * </ul>
+         * Example usage:
+         * <pre><code>
+Ext.Msg.show({
+   title: 'Address',
+   msg: 'Please enter your address:',
+   width: 300,
+   buttons: Ext.MessageBox.OKCANCEL,
+   multiline: true,
+   fn: saveAddress,
+   animEl: 'addAddressBtn',
+   icon: Ext.MessageBox.INFO
+});
+</code></pre>
+         * @return {Ext.MessageBox} this
+         */
+        show : function(options){
+            if(this.isVisible()){
+                this.hide();
+            }
+            opt = options;
+            var d = this.getDialog(opt.title || "&#160;");
+
+            d.setTitle(opt.title || "&#160;");
+            var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true);
+            d.tools.close.setDisplayed(allowClose);
+            activeTextEl = textboxEl;
+            opt.prompt = opt.prompt || (opt.multiline ? true : false);
+            if(opt.prompt){
+                if(opt.multiline){
+                    textboxEl.hide();
+                    textareaEl.show();
+                    textareaEl.setHeight(typeof opt.multiline == "number" ?
+                        opt.multiline : this.defaultTextHeight);
+                    activeTextEl = textareaEl;
+                }else{
+                    textboxEl.show();
+                    textareaEl.hide();
+                }
+            }else{
+                textboxEl.hide();
+                textareaEl.hide();
+            }
+            activeTextEl.dom.value = opt.value || "";
+            if(opt.prompt){
+                d.focusEl = activeTextEl;
+            }else{
+                var bs = opt.buttons;
+                var db = null;
+                if(bs && bs.ok){
+                    db = buttons["ok"];
+                }else if(bs && bs.yes){
+                    db = buttons["yes"];
+                }
+                if (db){
+                    d.focusEl = db;
+                }
+            }
+            if(opt.iconCls){
+              d.setIconClass(opt.iconCls);
+            }
+            this.setIcon(opt.icon);
+            if(opt.cls){
+                d.el.addClass(opt.cls);
+            }
+            d.proxyDrag = opt.proxyDrag === true;
+            d.modal = opt.modal !== false;
+            d.mask = opt.modal !== false ? mask : false;
+            
+            d.on('show', function(){
+                //workaround for window internally enabling keymap in afterShow
+                d.keyMap.setDisabled(allowClose !== true);
+                d.doLayout();
+                this.setIcon(opt.icon);
+                bwidth = updateButtons(opt.buttons);
+                progressBar.setVisible(opt.progress === true || opt.wait === true);
+                this.updateProgress(0, opt.progressText);
+                this.updateText(opt.msg);
+                if(opt.wait === true){
+                    progressBar.wait(opt.waitConfig);
+                }
+
+            }, this, {single:true});
+            if(!d.isVisible()){
+                // force it to the end of the z-index stack so it gets a cursor in FF
+                document.body.appendChild(dlg.el.dom);
+                d.setAnimateTarget(opt.animEl);
+                d.show(opt.animEl);
+            }
+            return this;
+        },
+
+        /**
+         * Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default
+         * styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
+         * to clear any existing icon.  The following built-in icon classes are supported, but you can also pass
+         * in a custom class name:
+         * <pre>
+Ext.MessageBox.INFO
+Ext.MessageBox.WARNING
+Ext.MessageBox.QUESTION
+Ext.MessageBox.ERROR
+         *</pre>
+         * @param {String} icon A CSS classname specifying the icon's background image url, or empty string to clear the icon
+         * @return {Ext.MessageBox} this
+         */
+        setIcon : function(icon){
+            if(icon && icon != ''){
+                iconEl.removeClass('x-hidden');
+                iconEl.replaceClass(iconCls, icon);
+                bodyEl.addClass('x-dlg-icon');
+                iconCls = icon;
+            }else{
+                iconEl.replaceClass(iconCls, 'x-hidden');
+                bodyEl.removeClass('x-dlg-icon');
+                iconCls = '';
+            }
+            return this;
+        },
+
+        /**
+         * Displays a message box with a progress bar.  This message box has no buttons and is not closeable by
+         * the user.  You are responsible for updating the progress bar as needed via {@link Ext.MessageBox#updateProgress}
+         * and closing the message box when the process is complete.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {String} progressText (optional) The text to display inside the progress bar (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        progress : function(title, msg, progressText){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                progress:true,
+                closable:false,
+                minWidth: this.minProgressWidth,
+                progressText: progressText
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user
+         * interaction while waiting for a long-running process to complete that does not have defined intervals.
+         * You are responsible for closing the message box when the process is complete.
+         * @param {String} msg The message box body text
+         * @param {String} title (optional) The title bar text
+         * @param {Object} config (optional) A {@link Ext.ProgressBar#waitConfig} object
+         * @return {Ext.MessageBox} this
+         */
+        wait : function(msg, title, config){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                closable:false,
+                wait:true,
+                modal:true,
+                minWidth: this.minProgressWidth,
+                waitConfig: config
+            });
+            return this;
+        },
+
+        /**
+         * Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
+         * If a callback function is passed it will be called after the user clicks the button, and the
+         * id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        alert : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OK,
+                fn: fn,
+                scope : scope
+            });
+            return this;
+        },
+
+        /**
+         * Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
+         * If a callback function is passed it will be called after the user clicks either button,
+         * and the id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        confirm : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.YESNO,
+                fn: fn,
+                scope : scope,
+                icon: this.QUESTION
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
+         * The prompt can be a single-line or multi-line textbox.  If a callback function is passed it will be called after the user
+         * clicks either button, and the id of the button that was clicked (could also be the top-right
+         * close button) and the text that was entered will be passed as the two parameters to the callback.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @param {Boolean/Number} multiline (optional) True to create a multiline textbox using the defaultTextHeight
+         * property, or the height in pixels to create the textbox (defaults to false / single-line)
+         * @param {String} value (optional) Default value of the text input element (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        prompt : function(title, msg, fn, scope, multiline, value){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OKCANCEL,
+                fn: fn,
+                minWidth:250,
+                scope : scope,
+                prompt:true,
+                multiline: multiline,
+                value: value
+            });
+            return this;
+        },
+
+        /**
+         * Button config that displays a single OK button
+         * @type Object
+         */
+        OK : {ok:true},
+        /**
+         * Button config that displays a single Cancel button
+         * @type Object
+         */
+        CANCEL : {cancel:true},
+        /**
+         * Button config that displays OK and Cancel buttons
+         * @type Object
+         */
+        OKCANCEL : {ok:true, cancel:true},
+        /**
+         * Button config that displays Yes and No buttons
+         * @type Object
+         */
+        YESNO : {yes:true, no:true},
+        /**
+         * Button config that displays Yes, No and Cancel buttons
+         * @type Object
+         */
+        YESNOCANCEL : {yes:true, no:true, cancel:true},
+        /**
+         * The CSS class that provides the INFO icon image
+         * @type String
+         */
+        INFO : 'ext-mb-info',
+        /**
+         * The CSS class that provides the WARNING icon image
+         * @type String
+         */
+        WARNING : 'ext-mb-warning',
+        /**
+         * The CSS class that provides the QUESTION icon image
+         * @type String
+         */
+        QUESTION : 'ext-mb-question',
+        /**
+         * The CSS class that provides the ERROR icon image
+         * @type String
+         */
+        ERROR : 'ext-mb-error',
+
+        /**
+         * The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)
+         * @type Number
+         */
+        defaultTextHeight : 75,
+        /**
+         * The maximum width in pixels of the message box (defaults to 600)
+         * @type Number
+         */
+        maxWidth : 600,
+        /**
+         * The minimum width in pixels of the message box (defaults to 110)
+         * @type Number
+         */
+        minWidth : 110,
+        /**
+         * The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful
+         * for setting a different minimum width than text-only dialogs may need (defaults to 250)
+         * @type Number
+         */
+        minProgressWidth : 250,
+        /**
+         * An object containing the default button text strings that can be overriden for localized language support.
+         * Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific
+         * resource file for handling language support across the framework.
+         * Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french
+         * @type Object
+         */
+        buttonText : {
+            ok : "OK",
+            cancel : "Cancel",
+            yes : "Yes",
+            no : "No"
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.MessageBox}
+ */
+Ext.Msg = Ext.MessageBox;/**
+ * @class Ext.dd.PanelProxy
+ * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally
+ * for the Panel's drag drop implementation, and should never need to be created directly.
+ * @constructor
+ * @param panel The {@link Ext.Panel} to proxy for
+ * @param config Configuration options
+ */
+Ext.dd.PanelProxy = function(panel, config){
+    this.panel = panel;
+    this.id = this.panel.id +'-ddproxy';
+    Ext.apply(this, config);
+};
+
+Ext.dd.PanelProxy.prototype = {
+    /**
+     * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel,
+     * false to drag with no proxy (defaults to true).
+     */
+    insertProxy : true,
+
+    // private overrides
+    setStatus : Ext.emptyFn,
+    reset : Ext.emptyFn,
+    update : Ext.emptyFn,
+    stop : Ext.emptyFn,
+    sync: Ext.emptyFn,
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getEl : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's ghost element
+     * @return {Element} The proxy's ghost element
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getProxy : function(){
+        return this.proxy;
+    },
+
+    /**
+     * Hides the 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;
+        }
+    },
+
+    /**
+     * Shows the proxy
+     */
+    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';
+        }
+    },
+
+    // private
+    repair : function(xy, callback, scope){
+        this.hide();
+        if(typeof callback == "function"){
+            callback.call(scope || this);
+        }
+    },
+
+    /**
+     * Moves the proxy to a different position in the DOM.  This is typically called while dragging the Panel
+     * to keep the proxy sync'd to the Panel's location.
+     * @param {HTMLElement} parentNode The proxy's parent DOM node
+     * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults
+     * to the parent's last child if not specified)
+     */
+    moveProxy : function(parentNode, before){
+        if(this.proxy){
+            parentNode.insertBefore(this.proxy.dom, before);
+        }
+    }
+};
+
+// private - DD implementation for Panels
+Ext.Panel.DD = function(panel, cfg){
+    this.panel = panel;
+    this.dragData = {panel: panel};
+    this.proxy = new Ext.dd.PanelProxy(panel, cfg);
+    Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg);
+    var h = panel.header;
+    if(h){
+        this.setHandleElId(h.id);
+    }
+    (h ? h : 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(x, y) {
+        this.proxy.show();
+    },
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+    },
+    onInitDrag : function(x, y){
+        this.onStartDrag(x, y);
+        return true;
+    },
+    createFrame : Ext.emptyFn,
+    getDragEl : function(e){
+        return this.proxy.ghost.dom;
+    },
+    endDrag : function(e){
+        this.proxy.hide();
+        this.panel.saveState();
+    },
+
+    autoOffset : function(x, y) {
+        x -= this.startPageX;
+        y -= this.startPageY;
+        this.setDelta(x, y);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/pkgs/window.js	(revision 625)
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,initHidden:true,monitorResize:true,elements:"header,body",frame:true,floating:true,initComponent:function(){Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(this.initHidden===false){this.show()}else{this.hidden=true}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},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();this.mon(this.mask,"click",this.focus,this)}this.initTools()},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.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);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(){if(this.rendered){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this)}Ext.destroy(this.focusEl,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.mon(this.header,"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();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"&&this.fbar){c=this.fbar.items.get(a)}else{if(b=="string"){c=Ext.getCmp(a)}else{c=a}}}c=c||this.focusEl;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 this}if(this.fireEvent("beforeshow",this)===false){return this}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()}return this},afterShow:function(b){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();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}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.createDelegate(this,[true],false);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.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}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(!this.activeGhost){return}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);return 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)}return 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)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize();this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this)}this.doAnchor=function(){this.alignTo(c,e,d)};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}this.doAnchor();return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost();if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var f={};var d=[];var e=null;var c=function(i,h){return(!i._lastAccess||i._lastAccess<h._lastAccess)?-1:1};var g=function(){var k=d,h=k.length;if(h>0){k.sort(c);var j=k[0].manager.zseed;for(var l=0;l<h;l++){var m=k[l];if(m&&!m.hidden){m.setZIndex(j+(l*10))}}}a()};var b=function(h){if(h!=e){if(e){e.setActive(false)}e=h;if(h){h.setActive(true)}}};var a=function(){for(var h=d.length-1;h>=0;--h){if(!d[h].hidden){b(d[h]);return}}b(null)};return{zseed:9000,register:function(h){f[h.id]=h;d.push(h);h.on("hide",a)},unregister:function(h){delete f[h.id];h.un("hide",a);d.remove(h)},get:function(h){return typeof h=="object"?h:f[h]},bringToFront:function(h){h=this.get(h);if(h!=e){h._lastAccess=new Date().getTime();g();return true}return false},sendToBack:function(h){h=this.get(h);h._lastAccess=-(new Date().getTime());g();return h},hideAll:function(){for(var h in f){if(f[h]&&typeof f[h]!="function"&&f[h].isVisible()){f[h].hide()}}},getActive:function(){return e},getBy:function(k,j){var l=[];for(var h=d.length-1;h>=0;--h){var m=d[h];if(k.call(j||m,m)!==false){l.push(m)}}return l},each:function(i,h){for(var j in f){if(f[j]&&typeof f[j]!="function"){if(i.call(h||f[j],f[j])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var r,b,n,q;var g,j,p,a,k,m,h,f;var o,s,l,c="";var d=function(u){if(r.isVisible()){r.hide();t();Ext.callback(b.fn,b.scope||window,[u,s.dom.value,b],1)}};var t=function(){if(b&&b.cls){r.el.removeClass(b.cls)}k.reset()};var e=function(w,u,v){if(b&&b.closable!==false){r.hide();t()}if(v){v.stopEvent()}};var i=function(u){var w=0;if(!u){o.ok.hide();o.cancel.hide();o.yes.hide();o.no.hide();return w}r.footer.dom.style.display="";for(var v in o){if(typeof o[v]!="function"){if(u[v]){o[v].show();o[v].setText(typeof u[v]=="string"?u[v]:Ext.MessageBox.buttonText[v]);w+=o[v].el.getWidth()+15}else{o[v].hide()}}}return w};return{getDialog:function(u){if(!r){r=new Ext.Window({autoCreate:true,title:u,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){d("no")}else{d("cancel")}}});o={};var v=this.buttonText;o.ok=r.addButton(v.ok,d.createCallback("ok"));o.yes=r.addButton(v.yes,d.createCallback("yes"));o.no=r.addButton(v.no,d.createCallback("no"));o.cancel=r.addButton(v.cancel,d.createCallback("cancel"));o.ok.hideMode=o.yes.hideMode=o.no.hideMode=o.cancel.hideMode="offsets";r.render(document.body);r.getEl().addClass("x-window-dlg");n=r.mask;g=r.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});h=Ext.get(g.dom.firstChild);var w=g.dom.childNodes[1];j=Ext.get(w.firstChild);p=Ext.get(w.childNodes[2].firstChild);p.enableDisplayMode();p.addKeyListener([10,13],function(){if(r.isVisible()&&b&&b.buttons){if(b.buttons.ok){d("ok")}else{if(b.buttons.yes){d("yes")}}}});a=Ext.get(w.childNodes[2].childNodes[1]);a.enableDisplayMode();k=new Ext.ProgressBar({renderTo:g});g.createChild({cls:"x-clear"})}return r},updateText:function(y){if(!r.isVisible()&&!b.width){r.setSize(this.maxWidth,100)}j.update(y||"&#160;");var v=c!=""?(h.getWidth()+h.getMargins("lr")):0;var A=j.getWidth()+j.getMargins("lr");var x=r.getFrameWidth("lr");var z=r.body.getFrameWidth("lr");if(Ext.isIE&&v>0){v+=3}var u=Math.max(Math.min(b.width||v+A+x+z,this.maxWidth),Math.max(b.minWidth||this.minWidth,l||0));if(b.prompt===true){s.setWidth(u-v-x-z)}if(b.progress===true||b.wait===true){k.setSize(u-v-x-z)}if(Ext.isIE&&u==l){u+=4}r.setSize(u,"auto").center();return this},updateProgress:function(v,u,w){k.updateProgress(v,u);if(w){this.updateText(w)}return this},isVisible:function(){return r&&r.isVisible()},hide:function(){var u=r?r.activeGhost:null;if(this.isVisible()||u){r.hide();t();if(u){r.unghost(false,false)}}return this},show:function(x){if(this.isVisible()){this.hide()}b=x;var y=this.getDialog(b.title||"&#160;");y.setTitle(b.title||"&#160;");var u=(b.closable!==false&&b.progress!==true&&b.wait!==true);y.tools.close.setDisplayed(u);s=p;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){p.hide();a.show();a.setHeight(typeof b.multiline=="number"?b.multiline:this.defaultTextHeight);s=a}else{p.show();a.hide()}}else{p.hide();a.hide()}s.dom.value=b.value||"";if(b.prompt){y.focusEl=s}else{var w=b.buttons;var v=null;if(w&&w.ok){v=o.ok}else{if(w&&w.yes){v=o.yes}}if(v){y.focusEl=v}}if(b.iconCls){y.setIconClass(b.iconCls)}this.setIcon(b.icon);if(b.cls){y.el.addClass(b.cls)}y.proxyDrag=b.proxyDrag===true;y.modal=b.modal!==false;y.mask=b.modal!==false?n:false;y.on("show",function(){y.keyMap.setDisabled(u!==true);y.doLayout();this.setIcon(b.icon);l=i(b.buttons);k.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.wait===true){k.wait(b.waitConfig)}},this,{single:true});if(!y.isVisible()){document.body.appendChild(r.el.dom);y.setAnimateTarget(b.animEl);y.show(b.animEl)}return this},setIcon:function(u){if(u&&u!=""){h.removeClass("x-hidden");h.replaceClass(c,u);g.addClass("x-dlg-icon");c=u}else{h.replaceClass(c,"x-hidden");g.removeClass("x-dlg-icon");c=""}return this},progress:function(w,v,u){this.show({title:w,msg:v,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:u});return this},wait:function(w,v,u){this.show({title:v,msg:w,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:u});return this},alert:function(x,w,v,u){this.show({title:x,msg:w,buttons:this.OK,fn:v,scope:u});return this},confirm:function(x,w,v,u){this.show({title:x,msg:w,buttons:this.YESNO,fn:v,scope:u,icon:this.QUESTION});return this},prompt:function(z,y,w,v,u,x){this.show({title:z,msg:y,buttons:this.OKCANCEL,fn:w,minWidth:250,scope:v,prompt:true,multiline:u,value:x});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:110,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;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)}});
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/README.txt
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/README.txt	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/README.txt	(revision 625)
@@ -0,0 +1,3 @@
+2006-11-21 jvs:
+ext-all.css contains all of the other css files combined and stripped of comments (except themes).
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all-notheme.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all-notheme.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all-notheme.css	(revision 625)
@@ -0,0 +1,5345 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}.ext-el-mask {
+    z-index: 100;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width: 100%;
+    height: 100%;
+    zoom: 1;
+}
+
+.ext-el-mask-msg {
+    z-index: 20001;
+    position: absolute;
+    top: 0;
+    left: 0;
+    border:1px solid;
+    background:repeat-x 0 -16px;
+    padding:2px;
+}
+
+.ext-el-mask-msg div {
+    padding:5px 10px 5px 10px;
+    border:1px solid;
+    cursor:wait;
+}
+
+.ext-shim {
+    position:absolute;
+    visibility:hidden;
+    left:0;
+    top:0;
+    overflow:hidden;
+}
+
+.ext-ie .ext-shim {
+    filter: alpha(opacity=0);
+}
+
+.ext-ie6 .ext-shim {
+    margin-left: 5px;
+    margin-top: 3px;
+}
+
+.x-mask-loading div {
+    padding:5px 10px 5px 25px;
+    background:no-repeat 5px 5px;
+    line-height:16px;
+}
+
+/* class for hiding elements without using display:none */
+.x-hidden, .x-hide-offsets {
+    position:absolute !important;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+}
+
+.x-hide-display {
+    display:none !important;
+}
+
+.x-hide-visibility {
+    visibility:hidden !important;
+}
+
+.x-masked {
+    overflow: hidden !important;
+}
+.x-masked-relative {
+    position: relative !important;
+}
+
+.x-masked select, .x-masked object, .x-masked embed {
+    visibility: hidden;
+}
+
+.x-layer {
+    visibility: hidden;
+}
+
+.x-unselectable, .x-unselectable * {
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-repaint {
+    zoom: 1;
+    background-color: transparent;
+    -moz-outline: none;
+}
+
+.x-item-disabled {
+    cursor: default;
+    opacity: .6;
+    -moz-opacity: .6;
+    filter: alpha(opacity=60);
+}
+
+.x-item-disabled * {
+    cursor: default !important;
+}
+
+.x-splitbar-proxy {
+    position: absolute;
+    visibility: hidden;
+    z-index: 20001;
+    zoom: 1;
+    line-height: 1px;
+    font-size: 1px;
+    overflow: hidden;
+}
+
+.x-splitbar-h, .x-splitbar-proxy-h {
+    cursor: e-resize;
+    cursor: col-resize;
+}
+
+.x-splitbar-v, .x-splitbar-proxy-v {
+    cursor: s-resize;
+    cursor: row-resize;
+}
+
+.x-color-palette {
+    width: 150px;
+    height: 92px;
+    cursor: pointer;
+}
+
+.x-color-palette a {
+    border: 1px solid;
+    float: left;
+    padding: 2px;
+    text-decoration: none;
+    -moz-outline: 0 none;
+    outline: 0 none;
+    cursor: pointer;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border: 1px solid;
+}
+
+.x-color-palette em {
+    display: block;
+    border: 1px solid;
+}
+
+.x-color-palette em span {
+    cursor: pointer;
+    display: block;
+    height: 10px;
+    line-height: 10px;
+    width: 10px;
+}
+
+.x-ie-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+    zoom:1;
+}
+
+.x-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+}
+
+.x-shadow * {
+    overflow: hidden;
+}
+
+.x-shadow * {
+    padding: 0;
+    border: 0;
+    margin: 0;
+    clear: none;
+    zoom: 1;
+}
+
+/* top  bottom */
+.x-shadow .xstc, .x-shadow .xsbc {
+    height: 6px;
+    float: left;
+}
+
+/* corners */
+.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
+    width: 6px;
+    height: 6px;
+    float: left;
+}
+
+/* sides */
+.x-shadow .xsc {
+    width: 100%;
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    width: 6px;
+    float: left;
+    height: 100%;
+}
+
+.x-shadow .xsmc {
+    float: left;
+    height: 100%;
+    background: transparent;
+}
+
+.x-shadow .xst, .x-shadow .xsb {
+    height: 6px;
+    overflow: hidden;
+    width: 100%;
+}
+
+.x-shadow .xsml {
+    background: transparent repeat-y 0 0;
+}
+
+.x-shadow .xsmr {
+    background: transparent repeat-y -6px 0;
+}
+
+.x-shadow .xstl {
+    background: transparent no-repeat 0 0;
+}
+
+.x-shadow .xstc {
+    background: transparent repeat-x 0 -30px;
+}
+
+.x-shadow .xstr {
+    background: transparent repeat-x 0 -18px;
+}
+
+.x-shadow .xsbl {
+    background: transparent no-repeat 0 -12px;
+}
+
+.x-shadow .xsbc {
+    background: transparent repeat-x 0 -36px;
+}
+
+.x-shadow .xsbr {
+    background: transparent repeat-x 0 -6px;
+}
+
+.loading-indicator {
+    background: no-repeat left;
+    padding-left: 20px;
+    line-height: 16px;
+    margin: 3px;
+}
+
+.x-text-resize {
+    position: absolute;
+    left: -1000px;
+    top: -1000px;
+    visibility: hidden;
+    zoom: 1;
+}
+
+.x-drag-overlay {
+    width: 100%;
+    height: 100%;
+    display: none;
+    position: absolute;
+    left: 0;
+    top: 0;
+    background-image:url(../images/default/s.gif);
+    z-index: 20000;
+}
+
+.x-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-spotlight {
+    z-index: 8999;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width:0;
+    height:0;
+    zoom: 1;
+}
+
+#x-history-frame {
+    position:absolute;
+    top:-1px;
+    left:0;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
+
+#x-history-field {
+    position:absolute;
+    top:0;
+    left:-1px;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
+.x-resizable-handle {
+    position:absolute;
+    z-index:100;
+    /* ie needs these */
+    font-size:1px;
+    line-height:6px;
+    overflow:hidden;
+	filter:alpha(opacity=0);
+	opacity:0;
+	zoom:1;
+}
+
+.x-resizable-handle-east{
+    width:6px;
+    cursor:e-resize;
+    right:0;
+    top:0;
+    height:100%;
+}
+
+.ext-ie .x-resizable-handle-east {
+    margin-right:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-south{
+    width:100%;
+    cursor:s-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+}
+
+.ext-ie .x-resizable-handle-south {
+    margin-bottom:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-west{
+    width:6px;
+    cursor:w-resize;
+    left:0;
+    top:0;
+    height:100%;
+}
+
+.x-resizable-handle-north{
+    width:100%;
+    cursor:n-resize;
+    left:0;
+    top:0;
+    height:6px;
+}
+
+.x-resizable-handle-southeast{
+    width:6px;
+    cursor:se-resize;
+    right:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northwest{
+    width:6px;
+    cursor:nw-resize;
+    left:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northeast{
+    width:6px;
+    cursor:ne-resize;
+    right:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-southwest{
+    width:6px;
+    cursor:sw-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{
+    filter:alpha(opacity=100);
+	opacity:1;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+	background-position: left;
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-position: top;
+}
+
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-position: top left;
+}
+
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-position:bottom right;
+}
+
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-position: bottom left;
+}
+
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-position: top right;
+}
+
+.x-resizable-proxy{
+    border: 1px dashed;
+    position:absolute;
+    overflow:hidden;
+    display:none;
+	left:0;
+    top:0;
+    z-index:50000;
+}
+
+.x-resizable-overlay{
+    width:100%;
+	height:100%;
+	display:none;
+	position:absolute;
+	left:0;
+	top:0;
+	z-index:200000;
+	-moz-opacity: 0;
+    opacity:0;
+    filter: alpha(opacity=0);
+}
+.x-tab-panel {
+    overflow:hidden;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border: 1px solid;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header {
+	border: 1px solid;
+	padding-bottom: 2px;
+}
+
+.x-tab-panel-footer {
+	border: 1px solid;
+	padding-top: 2px;
+}
+
+.x-tab-strip-wrap {
+	width:100%;
+    overflow:hidden;
+    position:relative;
+    zoom:1;
+}
+
+ul.x-tab-strip {
+	display:block;
+    width:5000px;
+    zoom:1;
+}
+
+ul.x-tab-strip-top{
+	padding-top: 1px;
+	background: repeat-x bottom;
+	border-bottom: 1px solid;
+}
+
+ul.x-tab-strip-bottom{
+	padding-bottom: 1px;
+	background: repeat-x top;
+	border-top: 1px solid;
+	border-bottom: 0 none;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-top {
+    background:transparent !important;
+    padding-top:0 !important;
+}
+
+.x-tab-panel-header-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border:1px solid;
+    height:2px;
+    font-size:1px;
+    line-height:1px;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer {
+    border-top: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-bottom: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-bottom {
+    background:transparent !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-footer-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-top:0 !important;
+}
+
+.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer,
+.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer {
+    height:3px;
+}
+
+ul.x-tab-strip li {
+    float:left;
+    margin-left:2px;
+}
+
+ul.x-tab-strip li.x-tab-edge {
+    float:left;
+    margin:0 !important;
+    padding:0 !important;
+    border:0 none !important;
+    font-size:1px !important;
+    line-height:1px !important;
+    overflow:hidden;
+    zoom:1;
+    background:transparent !important;
+    width:1px;
+}
+
+.x-tab-strip a, .x-tab-strip span, .x-tab-strip em {
+	display:block;
+}
+
+.x-tab-strip a {
+	text-decoration:none !important;
+	-moz-outline: none;
+	outline: none;
+	cursor:pointer;
+}
+
+.x-tab-strip-inner {
+    overflow:hidden;
+	text-overflow: ellipsis;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	white-space: nowrap;
+	cursor:pointer;
+    padding:4px 0;
+}
+
+.x-tab-strip-top .x-tab-with-icon .x-tab-right {
+    padding-left:6px;
+}
+
+.x-tab-strip .x-tab-with-icon span.x-tab-strip-text {
+	padding-left:20px;
+    background-position: 0 3px;
+    background-repeat: no-repeat;
+}
+
+.x-tab-strip-active, .x-tab-strip-active a.x-tab-right {
+    cursor:default;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	cursor:default;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	cursor:default;
+}
+
+.x-tab-panel-body {
+    overflow:hidden;
+}
+
+.x-tab-panel-bwrap {
+    overflow:hidden;
+}
+
+.ext-ie .x-tab-strip .x-tab-right {
+    position:relative;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+    margin-bottom:-1px;
+}
+
+/*
+ * Horrible hack for IE8 in quirks mode
+ */
+.ext-border-box .ext-ie8 .x-tab-strip .x-tab-right{
+    top: 1px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-bottom:5px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+    margin-top:-1px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-top:5px;
+}
+
+.x-tab-strip-top .x-tab-right {
+	background: transparent no-repeat 0 -51px;
+    padding-left:10px;
+}
+
+.x-tab-strip-top .x-tab-left {
+	background: transparent no-repeat right -351px;
+    padding-right:10px;
+}
+
+.x-tab-strip-top .x-tab-strip-inner {
+	background: transparent repeat-x 0 -201px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-right {
+	 background-position:0 -101px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-left {
+	 background-position:right -401px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner {
+	 background-position:0 -251px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+	background-position: 0 0;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-left {
+	background-position: right -301px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner {
+	background-position: 0 -151px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+    padding:0 10px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+    padding:0;
+}
+
+.x-tab-strip .x-tab-strip-close {
+    display:none;
+}
+
+.x-tab-strip-closable {
+    position:relative;
+}
+
+.x-tab-strip-closable .x-tab-left {
+    padding-right:19px;
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+    opacity:.6;
+    -moz-opacity:.6;
+    background-repeat:no-repeat;
+    display:block;
+	width:11px;
+    height:11px;
+    position:absolute;
+    top:3px;
+    right:3px;
+    cursor:pointer;
+    z-index:2;
+}
+
+.x-tab-strip .x-tab-strip-active a.x-tab-strip-close {
+    opacity:.8;
+    -moz-opacity:.8;
+}
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+    opacity:1;
+    -moz-opacity:1;
+}
+
+.x-tab-panel-body {
+    border: 1px solid;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background: transparent no-repeat -18px 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    left:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background: transparent no-repeat 0 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    right:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+
+.x-tab-scroller-right-over {
+    background-position: -18px 0;
+}
+
+.x-tab-scroller-right-disabled {
+    background-position: 0 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{
+    margin-top: 1px;
+}
+
+.x-tab-scrolling .x-tab-strip-wrap {
+    margin-left:18px;
+    margin-right:18px;
+}
+
+.x-tab-scrolling {
+    position:relative;    
+}
+
+.x-tab-panel-bbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-tab-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}/* all fields */
+.x-form-field{
+    margin: 0 0 0 0;
+}
+
+.ext-webkit *:focus{
+    outline: none !important;
+}
+
+/* ---- text fields ---- */
+.x-form-text, textarea.x-form-field{
+    padding:1px 3px;
+    background:repeat-x 0 0;
+    border:1px solid;
+}
+
+textarea.x-form-field {
+    padding:2px 3px;
+}
+
+.x-form-text, .ext-ie .x-form-file {
+    height:22px;
+    line-height:18px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-form-text, .ext-ie7 .x-form-text {
+    margin:-1px 0; /* ie bogus margin bug */
+    height:22px; /* ie quirks */
+    line-height:18px;
+}
+
+.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field {
+    margin:-1px 0; /* ie bogus margin bug */
+}
+
+.ext-strict .x-form-text {
+    height:18px;
+}
+
+.ext-safari.ext-mac textarea.x-form-field {
+    margin-bottom:-2px; /* another bogus margin bug, safari/mac only */
+}
+
+.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field {
+	margin-bottom: 1px;
+}
+
+.ext-gecko .x-form-text , .ext-ie8 .x-form-text {
+    padding-top:2px; /* FF won't center the text vertically */
+    padding-bottom:0;
+}
+
+textarea {
+    resize: none;  /* Disable browser resizable textarea */
+}
+
+/* select boxes */
+.x-form-select-one {
+    height:20px;
+    line-height:18px;
+    vertical-align:middle;
+    border: 1px solid;
+}
+
+/* multi select boxes */
+
+/* --- TODO --- */
+
+/* 2.0.2 style */
+.x-form-check-wrap {
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid;
+    margin-bottom: 5px;
+    padding-left: 3px !important;
+    float: none !important;
+}
+
+/* wrapped fields and triggers */
+.x-form-field-wrap .x-form-trigger{
+    width:17px;
+    height:21px;
+    border:0;
+    background:transparent no-repeat 0 0;
+    cursor:pointer;
+    border-bottom: 1px solid;
+    position:absolute;
+    top:0;
+}
+
+.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{
+    cursor:pointer;
+}
+
+.ext-safari .x-form-field-wrap .x-form-trigger{
+    right:0;
+}
+
+.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{
+    position:static;
+    top:auto;
+    vertical-align:top;
+}
+
+.x-form-field-wrap {
+    position:relative;
+    left:0;top:0;
+    zoom:1;
+    white-space: nowrap;
+}
+
+.x-form-field-wrap .x-form-trigger-over{
+    background-position:-17px 0;
+}
+
+.x-form-field-wrap .x-form-trigger-click{
+    background-position:-34px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    background-position:-51px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-over{
+    background-position:-68px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-click{
+    background-position:-85px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-trigger-noedit{
+    cursor:pointer;
+}
+
+/* field focus style */
+.x-form-focus, textarea.x-form-focus{
+	border: 1px solid;
+}
+
+/* invalid fields */
+.x-form-invalid, textarea.x-form-invalid{
+	background:repeat-x bottom;
+	border: 1px solid;
+}
+
+.ext-safari .x-form-invalid{
+	border: 1px solid;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+	background:repeat-x bottom;
+}
+
+/* editors */
+.x-editor {
+    visibility:hidden;
+    padding:0;
+    margin:0;
+}
+.x-form-check-wrap {
+    height: 22px;
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-grow-sizer {
+    left: -10000px;
+	padding: 8px 3px;
+    position: absolute;
+    visibility:hidden;
+    top: -10000px;
+	white-space: pre-wrap;
+    white-space: -moz-pre-wrap;
+    white-space: -pre-wrap;
+    white-space: -o-pre-wrap;
+    word-wrap: break-word;
+    zoom:1;
+}
+
+.x-form-grow-sizer p {
+    margin:0 !important;
+    border:0 none !important;
+    padding:0 !important;
+}
+
+/* Form Items CSS */
+
+.x-form-item {
+    display:block;
+    margin-bottom:4px;
+    zoom:1;
+}
+
+.x-form-item label {
+    display:block;
+    float:left;
+    width:100px;
+    padding:3px;
+    padding-left:0;
+    clear:left;
+    z-index:2;
+    position:relative;
+}
+
+.x-form-element {
+    padding-left:105px;
+    position:relative;
+}
+
+.x-form-invalid-msg {
+    padding:2px;
+    padding-left:18px;
+    background: transparent no-repeat 0 2px;
+    line-height:16px;
+    width:200px;
+}
+
+.x-form-label-left label {
+   text-align:left;
+}
+
+.x-form-label-right label {
+   text-align:right;
+}
+
+.x-form-label-top .x-form-item label {
+    width:auto;
+    float:none;
+    clear:none;
+    display:inline;
+    margin-bottom:4px;
+    position:static;
+}
+
+.x-form-label-top .x-form-element {
+    padding-left:0;
+    padding-top:4px;
+}
+
+.x-form-label-top .x-form-item {
+    padding-bottom:4px;
+}
+
+/* Editor small font for grid, toolbar and tree */
+.x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    margin-top:-1px !important; /* ie bogus margin bug */
+    margin-bottom:-1px !important;
+    height:20px !important; /* ie quirks */
+    line-height:16px !important;
+}
+
+.ext-strict .x-small-editor .x-form-text {
+    height:16px !important;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+}
+
+.ext-border-box .x-small-editor .x-form-text {
+    height:20px;
+}
+
+.x-small-editor .x-form-select-one {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.x-small-editor .x-form-num-field {
+    text-align:right;
+}
+
+.x-small-editor .x-form-field-wrap .x-form-trigger{
+    height:19px;
+}
+
+.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;}
+
+.x-form-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+.x-form-clear-left {
+    clear:left;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-form-cb-label {
+    width:auto !important;
+    float:none !important;
+    clear:none !important;
+    display:inline !important;
+    margin-left:4px;
+    top: -2px;
+}
+
+.ext-gecko2 .x-form-cb-label{
+    top: -1px;
+}
+
+.ext-ie8 .x-form-cb-label{
+    position: static;
+}
+
+.ext-strict .ext-ie8 .x-form-cb-label {
+    top: -3px;
+    position: relative;
+}
+
+.ext-opera .x-form-cb-label, .ext-safari3 .x-form-cb-label, .ext-ie7 .x-form-cb-label, .ext-ie6 .x-form-cb-label {
+    top: 0;
+}
+
+.x-form-column {
+    float:left;
+    padding:0;
+    margin:0;
+    width:48%;
+    overflow:hidden;
+    zoom:1;
+}
+
+/* buttons */
+.x-form .x-form-btns-ct .x-btn{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns td {
+	border:0;
+	padding:0;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-right table{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-left table{
+	float:left;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center table{
+	margin:0 auto; /*everyone else*/
+}
+
+.x-form .x-form-btns-ct table td.x-form-btn-td{
+	padding:3px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-form-invalid-icon {
+    width:16px;
+    height:18px;
+    visibility:hidden;
+    position:absolute;
+    left:0;
+    top:0;
+    display:block;
+    background:transparent no-repeat 0 2px;
+}
+
+/* fieldsets */
+.x-fieldset {
+    border:1px solid;
+    padding:10px;
+    margin-bottom:10px;
+    display:block; /* preserve margins in IE */
+}
+
+/* make top of checkbox/tools visible in webkit */
+.ext-webkit .x-fieldset-header {
+    padding-top: 1px;
+}        
+
+.ext-ie .x-fieldset legend {
+    margin-bottom:10px;
+}
+
+.ext-ie .x-fieldset {
+    padding-top: 0;
+    padding-bottom:10px;
+}
+
+.x-fieldset legend .x-tool-toggle {
+    margin-right:3px;
+    margin-left:0;
+    float:left !important;
+}
+
+.x-fieldset legend input {
+    margin-right:3px;
+    float:left !important;
+    height:13px;
+    width:13px;
+}
+
+fieldset.x-panel-collapsed {
+    padding-bottom:0 !important;
+    border-width: 1px 1px 0 1px !important;
+    border-left-color: transparent;
+    border-right-color: transparent;
+}      
+  
+.ext-ie6 fieldset.x-panel-collapsed{
+    padding-bottom:0 !important;
+    border-width: 1px 0 0 0 !important;
+    margin-left: 1px;
+    margin-right: 1px;
+}
+
+fieldset.x-panel-collapsed .x-fieldset-bwrap {
+    visibility:hidden;
+    position:absolute;
+    left:-1000px;
+    top:-1000px;
+}
+
+.ext-ie .x-fieldset-bwrap {
+    zoom:1;
+}
+
+.x-fieldset-noborder {
+    border:0px none transparent;
+}
+
+.x-fieldset-noborder legend {
+    margin-left:-3px;
+}
+
+/* IE legend positioing bug */
+.ext-ie .x-fieldset-noborder legend {
+    position: relative;
+    margin-bottom:23px;
+}
+.ext-ie .x-fieldset-noborder legend span {
+    position: absolute;
+    left:16px;
+}
+        
+.ext-gecko .x-window-body .x-form-item {
+    -moz-outline: none;
+    overflow: auto;
+}
+
+.ext-gecko .x-form-item {
+    -moz-outline: none;
+}
+
+.x-hide-label label.x-form-item-label {
+     display:none;
+}
+
+.x-hide-label .x-form-element {
+     padding-left: 0 !important;
+}
+
+.x-fieldset {
+    overflow:hidden;
+}
+
+.x-fieldset-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-fieldset-body {
+    overflow:hidden;
+}
+
+
+.x-btn{
+	cursor:pointer;
+	white-space: nowrap;
+}
+
+.x-btn button{
+    border:0 none;
+    background:transparent;
+    padding-left:3px;
+    padding-right:3px;
+    cursor:pointer;
+    margin:0;
+    overflow:visible;
+    width:auto;
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+* html .ext-ie .x-btn button {
+    width:1px;
+}
+
+.ext-gecko .x-btn button {
+    padding-left:0;
+    padding-right:0;
+}
+
+.ext-gecko .x-btn button::-moz-focus-inner {
+    padding:0;
+}
+
+.ext-ie .x-btn button {
+    padding-top:2px;
+}
+
+.x-btn td {
+    padding:0 !important;
+}
+
+.x-btn-text {
+    cursor:pointer;
+	white-space: nowrap;
+    padding:0;
+}
+
+/* icon placement and sizing styles */
+
+/* Only text */
+.x-btn-noicon .x-btn-small .x-btn-text{
+	height: 16px;
+}
+
+.x-btn-noicon .x-btn-medium .x-btn-text{
+    height: 24px;
+}
+
+.x-btn-noicon .x-btn-large .x-btn-text{
+    height: 32px;
+}
+
+/* Only icons */
+.x-btn-icon .x-btn-text{
+    background-position: center;
+	background-repeat: no-repeat;
+}
+
+.x-btn-icon .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 16px;
+}
+
+.x-btn-icon .x-btn-medium .x-btn-text{
+    height: 24px;
+	width: 24px;
+}
+
+.x-btn-icon .x-btn-large .x-btn-text{
+    height: 32px;
+	width: 32px;
+}
+
+/* Icons and text */
+/* left */
+.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:34px;
+    height:32px;
+}
+
+/* top */
+.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:34px;
+}
+
+/* right */
+.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:34px;
+    height:32px;
+}
+
+/* bottom */
+.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:34px;
+}
+
+/* background positioning */
+.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{
+	font-size:1px;
+    line-height:1px;
+    width:3px;
+    display:block;
+    overflow:hidden;
+}
+
+.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{
+	height:3px;
+}
+
+.x-btn-tl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 0;
+}
+.x-btn-tr{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px 0;
+}
+.x-btn-tc{
+	height:3px;
+	background:repeat-x 0 -6px;
+}
+
+.x-btn-ml{
+	width:3px;
+	background:no-repeat 0 -24px;
+}
+.x-btn-mr{
+	width:3px;
+	background:no-repeat -3px -24px;
+}
+
+.x-btn-mc{
+	background:repeat-x 0 -1096px;
+    vertical-align: middle;
+	text-align:center;
+	padding:0 5px;
+	cursor:pointer;
+	white-space:nowrap;
+}
+
+.x-btn-bl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 -3px;
+}
+
+.x-btn-br{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px -3px;
+}
+
+.x-btn-bc{
+	height:3px;
+	background:repeat-x 0 -15px;
+}
+
+.x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-btn-disabled *{
+	cursor:default !important;
+}
+
+
+/* With a menu arrow */
+/* right */
+.x-btn-mc em.x-btn-arrow {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:10px;
+}
+
+.x-btn-mc em.x-btn-split {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:14px;
+}
+
+/* bottom */
+.x-btn-mc em.x-btn-arrow-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+/* height adjustment class */
+.x-btn-as-arrow .x-btn-mc em {
+    display:block;
+    background:transparent;
+	padding-bottom:14px;
+}
+
+/* groups */
+.x-btn-group {
+    padding:1px;
+}
+
+.x-btn-group-header {
+    padding:2px;
+    text-align:center;
+}
+
+.x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+.x-btn-group-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:3px;
+}
+
+.x-btn-group-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-btn-group-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-br {
+	background: transparent no-repeat right bottom;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-mc {
+    border:0 none;
+    padding:1px 0 0 0;
+    margin:0;
+}
+
+.x-btn-group-mc .x-btn-group-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-btn-group-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-mr {
+	background: transparent repeat-y right 0;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-btn-group-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-btn-group-bc {
+	height:3px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-btn-group-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    height:2px;
+}.x-toolbar{
+    border-style:solid;
+    border-width:0 0 1px 0;
+    display: block;
+	padding:2px;
+    background:repeat-x top left;
+    position:relative;
+    left:0;
+    top:0;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-toolbar .x-item-disabled .x-btn-icon {
+    opacity: .35;
+    -moz-opacity: .35;
+    filter: alpha(opacity=35);
+}
+
+.x-toolbar td {
+	vertical-align:middle;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+	white-space: nowrap;
+}
+
+.x-toolbar .x-item-disabled {
+	cursor:default;
+	opacity:.6;
+	-moz-opacity:.6;
+	filter:alpha(opacity=60);
+}
+
+.x-toolbar .x-item-disabled * {
+	cursor:default;
+}
+
+.x-toolbar .x-toolbar-cell {
+    vertical-align:middle;
+}
+
+.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, 
+.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc
+{
+	background-position: 500px 500px;
+}
+
+/* These rules are duplicated from button.css to give priority of x-toolbar rules above */
+.x-toolbar .x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-toolbar .x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-toolbar div.xtb-text{
+    padding:2px 2px 0;
+    line-height:16px;
+    display:block;
+}
+
+.x-toolbar .xtb-sep {
+	background-position: center;
+	background-repeat: no-repeat;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	width:4px;
+	overflow: hidden;
+	cursor:default;
+	margin: 0 2px 0;
+	border:0;
+}
+
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+
+/* Paging Toolbar */
+.x-tbar-page-number{
+	width:30px;
+	height:14px;
+}
+
+.ext-ie .x-tbar-page-number{
+    margin-top: 2px;
+}
+
+.x-paging-info {
+    position:absolute;
+    top:5px;
+    right: 8px;
+}
+
+/* floating */
+.x-toolbar-ct {
+    width:100%;
+}
+
+.x-toolbar-right td {
+    text-align: center;
+}
+
+.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-toolbar-more .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 12px;
+}
+
+.x-toolbar-more em.x-btn-arrow {
+    display:inline;
+    background:transparent;
+	padding-right:0;
+}
+
+.x-toolbar-more .x-btn-mc em.x-btn-arrow {
+    background-image: none;
+}
+
+div.x-toolbar-no-items {
+    color:gray !important;
+    padding:5px 10px !important;
+}
+
+/* fix ie toolbar form items */
+.ext-border-box .x-toolbar-cell .x-form-text {
+    margin-bottom:-1px !important;
+}
+
+.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text {
+    margin:0 !important;
+}
+
+.ext-ie .x-toolbar-cell .x-form-field-wrap {
+    height:21px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text {
+    top: 0px;
+}
+
+.x-toolbar-right td .x-form-field-trigger-wrap{
+    text-align: left;
+}
+
+.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{
+    vertical-align: top;
+    margin-top: 5px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{
+    margin-top: 4px;
+}
+
+.x-toolbar-cell .x-form-check-wrap label{
+    vertical-align: bottom;
+}
+
+/* StatusBar */
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+
+.x-statusbar .x-status-busy {
+    padding-left: 25px;
+    background: transparent no-repeat 3px 3px;
+}
+
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid;
+    border-right: 1px solid;
+    border-bottom: 1px solid;
+    border-left: 1px solid;
+    padding: 2px 8px 2px 5px;
+}.x-toolbar{
+    border-style:solid;
+    border-width:0 0 1px 0;
+    display: block;
+	padding:2px;
+    background:repeat-x top left;
+    position:relative;
+    left:0;
+    top:0;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-toolbar .x-item-disabled .x-btn-icon {
+    opacity: .35;
+    -moz-opacity: .35;
+    filter: alpha(opacity=35);
+}
+
+.x-toolbar td {
+	vertical-align:middle;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+	white-space: nowrap;
+}
+
+.x-toolbar .x-item-disabled {
+	cursor:default;
+	opacity:.6;
+	-moz-opacity:.6;
+	filter:alpha(opacity=60);
+}
+
+.x-toolbar .x-item-disabled * {
+	cursor:default;
+}
+
+.x-toolbar .x-toolbar-cell {
+    vertical-align:middle;
+}
+
+.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, 
+.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc
+{
+	background-position: 500px 500px;
+}
+
+/* These rules are duplicated from button.css to give priority of x-toolbar rules above */
+.x-toolbar .x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-toolbar .x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-toolbar div.xtb-text{
+    padding:2px 2px 0;
+    line-height:16px;
+    display:block;
+}
+
+.x-toolbar .xtb-sep {
+	background-position: center;
+	background-repeat: no-repeat;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	width:4px;
+	overflow: hidden;
+	cursor:default;
+	margin: 0 2px 0;
+	border:0;
+}
+
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+
+/* Paging Toolbar */
+.x-tbar-page-number{
+	width:30px;
+	height:14px;
+}
+
+.ext-ie .x-tbar-page-number{
+    margin-top: 2px;
+}
+
+.x-paging-info {
+    position:absolute;
+    top:5px;
+    right: 8px;
+}
+
+/* floating */
+.x-toolbar-ct {
+    width:100%;
+}
+
+.x-toolbar-right td {
+    text-align: center;
+}
+
+.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-toolbar-more .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 12px;
+}
+
+.x-toolbar-more em.x-btn-arrow {
+    display:inline;
+    background:transparent;
+	padding-right:0;
+}
+
+.x-toolbar-more .x-btn-mc em.x-btn-arrow {
+    background-image: none;
+}
+
+div.x-toolbar-no-items {
+    color:gray !important;
+    padding:5px 10px !important;
+}
+
+/* fix ie toolbar form items */
+.ext-border-box .x-toolbar-cell .x-form-text {
+    margin-bottom:-1px !important;
+}
+
+.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text {
+    margin:0 !important;
+}
+
+.ext-ie .x-toolbar-cell .x-form-field-wrap {
+    height:21px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text {
+    top: 0px;
+}
+
+.x-toolbar-right td .x-form-field-trigger-wrap{
+    text-align: left;
+}
+
+.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{
+    vertical-align: top;
+    margin-top: 5px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{
+    margin-top: 4px;
+}
+
+.x-toolbar-cell .x-form-check-wrap label{
+    vertical-align: bottom;
+}
+
+/* StatusBar */
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+
+.x-statusbar .x-status-busy {
+    padding-left: 25px;
+    background: transparent no-repeat 3px 3px;
+}
+
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid;
+    border-right: 1px solid;
+    border-bottom: 1px solid;
+    border-left: 1px solid;
+    padding: 2px 8px 2px 5px;
+}/* Grid3 styles */
+.x-grid3 {
+	position:relative;
+	overflow:hidden;
+}
+
+.x-grid-panel .x-panel-body {
+    overflow:hidden !important;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border:1px solid;
+}
+
+.x-grid3 table {
+    table-layout:fixed;
+}
+
+.x-grid3-viewport{
+	overflow:hidden;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+    -moz-outline: none;
+	-moz-user-focus: normal;
+}
+
+.x-grid3-row td, .x-grid3-summary-row td {
+    line-height:13px;
+    vertical-align: top;
+	padding-left:1px;
+    padding-right:1px;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-cell{
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-row td {
+    line-height:15px;
+    vertical-align:middle;
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+.x-grid3-hd-row .x-grid3-marker-hd {
+    padding:3px;
+}
+
+.x-grid3-row .x-grid3-marker {
+    padding:3px;
+}
+
+.x-grid3-cell-inner, .x-grid3-hd-inner{
+	overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+}
+
+.x-grid3-hd-inner {
+    position:relative;
+	cursor:inherit;
+	padding:4px 3px 4px 5px;
+}
+
+.x-grid3-row-body {
+    white-space:normal;
+}
+
+.x-grid3-body-cell {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+/* IE Quirks to clip */
+.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{
+	width:100%;
+}
+
+/* reverse above in strict mode */
+.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{
+	width:auto;
+}
+
+.x-grid-row-loading {
+    background: no-repeat center center;
+}
+
+.x-grid-page {
+    overflow:hidden;
+}
+
+.x-grid3-row {
+	cursor: default;
+    border: 1px solid;
+    width:100%;
+}
+
+.x-grid3-row-over {
+	border:1px solid;
+    background: repeat-x left top;
+}
+
+.x-grid3-resize-proxy {
+	width:1px;
+    left:0;
+	cursor: e-resize;
+	cursor: col-resize;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-resize-marker {
+	width:1px;
+	left:0;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: text;
+    -khtml-user-select: text;
+    -webkit-user-select:ignore;
+}
+
+/* header styles */
+.x-grid3-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    padding:1px 0 0 0;
+}
+
+.x-grid3-header-pop {
+    border-left:1px solid;
+    float:right;
+    clear:none;
+}
+
+.x-grid3-header-pop-inner {
+    border-left:1px solid;
+    width:14px;
+    height:19px;
+    background: transparent no-repeat center center;
+}
+
+.ext-ie .x-grid3-header-pop-inner {
+    width:15px;
+}
+
+.ext-strict .x-grid3-header-pop-inner {
+    width:14px; 
+}
+
+.x-grid3-header-inner {
+    overflow:hidden;
+    zoom:1;
+    float:left;
+}
+
+.x-grid3-header-offset {
+    padding-left:1px;
+    text-align: left;
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background: repeat-x left bottom;
+
+}
+
+.x-grid3-sort-icon{
+	background-repeat: no-repeat;
+	display: none;
+	height: 4px;
+	width: 13px;
+	margin-left:3px;
+	vertical-align: middle;
+}
+
+.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon {
+	display: inline;
+}
+
+/* Header position fixes for IE strict mode */
+.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd {
+    position:relative;
+}
+
+.ext-strict .ext-ie6 .x-grid3-hd-inner{
+    position:static;
+}
+
+/* Body Styles */
+.x-grid3-body {
+	zoom:1;
+}
+
+.x-grid3-scroller {
+	overflow:auto;
+    zoom:1;
+    position:relative;
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	display: block;
+	padding: 3px 5px 3px 5px;
+	-moz-user-select: none;
+	-khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-split {
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor: e-resize;
+	cursor: col-resize;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	overflow: hidden;
+	position: absolute;
+	top: 2px;
+	width: 6px;
+	z-index: 3;
+}
+
+/* Column Reorder DD */
+.x-dd-drag-proxy .x-grid3-hd-inner{
+	background: repeat-x left bottom;
+	width:120px;
+	padding:3px;
+	border:1px solid;
+	overflow:hidden;
+}
+
+.col-move-top, .col-move-bottom{
+	width:9px;
+	height:9px;
+	position:absolute;
+	top:0;
+	line-height:1px;
+	font-size:1px;
+	overflow:hidden;
+	visibility:hidden;
+	z-index:20000;
+    background:transparent no-repeat left top;
+}
+
+/* Selection Styles */
+.x-grid3-row-selected {
+	border:1px dotted;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background: repeat-x 0 bottom !important;
+    vertical-align:middle !important;
+    padding:0;
+    border-top:1px solid;
+    border-bottom:none !important;
+    border-right:1px solid !important;
+    text-align:center;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    padding:0 4px;
+    text-align:center;
+}
+
+/* dirty cells */
+.x-grid3-dirty-cell {
+    background: transparent no-repeat 0 0;
+}
+
+/* Grid Toolbars */
+.x-grid3-topbar, .x-grid3-bottombar{
+    overflow:hidden;
+	display:none;
+	zoom:1;
+    position:relative;
+}
+
+.x-grid3-topbar .x-toolbar{
+	border-right:0 none;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-right:0 none;
+	border-bottom:0 none;
+	border-top:1px solid;
+}
+
+/* Props Grid Styles */
+.x-props-grid .x-grid3-cell{
+	padding:1px;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background:transparent repeat-y -16px !important;
+    padding-left:12px;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    padding:1px;
+    padding-right:0;
+    border:0 none;
+    border-right:1px solid;
+}
+
+/* dd */
+.x-grid3-col-dd {
+    border:0 none;
+    padding:0;
+    background:transparent;
+}
+
+.x-dd-drag-ghost .x-grid3-dd-wrap {
+    padding:1px 3px 3px 1px;
+}
+
+.x-grid3-hd {
+    -moz-user-select:none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-btn {
+    display:none;
+    position:absolute;
+    width:14px;
+    background:no-repeat left center;
+    right:0;
+    top:0;
+    z-index:2;
+	cursor:pointer;
+}
+
+.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn {
+    display:block;
+}
+
+a.x-grid3-hd-btn:hover {
+    background-position:-14px center;
+}
+
+/* Expanders */
+.x-grid3-body .x-grid3-td-expander {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-expander {
+    width:100%;
+    height:18px;
+    background-position:4px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-expander {
+    background-position:4px 2px;
+}
+
+.x-grid3-row-expanded .x-grid3-row-expander {
+    background-position:-21px 2px;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-body {
+    display:none !important;
+}
+
+.x-grid3-row-expanded .x-grid3-row-body {
+    display:block !important;
+}
+
+/* Checkers */
+.x-grid3-body .x-grid3-td-checker {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    width:100%;
+    height:18px;
+    background-position:2px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row .x-grid3-row-checker {
+    background-position:2px 2px;
+}
+
+.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker {
+    background-position:-23px 2px;
+}
+
+.x-grid3-hd-checker {
+    background-position:2px 3px;
+}
+
+.x-grid3-hd-checker-on .x-grid3-hd-checker {
+    background-position:-23px 3px;
+}
+
+/* Numberer */
+.x-grid3-body .x-grid3-td-numberer {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+    padding:3px 5px 0 0 !important;
+    text-align:right;
+}
+
+/* Row Icon */
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background:transparent repeat-y right;
+    vertical-align:top;
+    text-align:center;
+}
+
+.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner {
+    padding:0 !important;
+    background-position:center center;
+    background-repeat:no-repeat;
+    width:16px;
+    height:16px;
+    margin-left:2px;
+    margin-top:3px;
+}
+
+/* All specials */
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner {
+    padding: 1px 0 0 0 !important;
+}
+
+.x-grid3-check-col {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-check-col-on {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+/* Grouping classes */
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom: 2px solid;
+    cursor:pointer;
+    padding-top:6px;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background:transparent no-repeat 3px 3px;
+    padding:4px 4px 4px 17px;
+}
+
+.x-grid-group-collapsed .x-grid-group-body {
+    display:none;
+}
+
+.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-ie .x-props-grid .x-editor .x-form-text {
+    position:static;
+    top:0;
+}
+
+.x-grid-empty {
+    padding:10px;
+}
+
+/* fix floating toolbar issue */
+.ext-ie7 .x-grid-panel .x-panel-bbar {
+    position:relative;
+}
+
+.ext-ie6 .x-grid3-header {
+    position: relative;
+}
+
+/* column lines */
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    padding-right:0;
+    border-right:1px solid;
+}
+.x-dd-drag-proxy{
+	position:absolute;
+	left:0;
+    top:0;
+	visibility:hidden;
+	z-index:15000;
+}
+
+.x-dd-drag-ghost{
+	-moz-opacity: 0.85;
+    opacity:.85;
+    filter: alpha(opacity=85);
+    border: 1px solid;
+	padding:3px;
+	padding-left:20px;
+	white-space:nowrap;
+}
+
+.x-dd-drag-repair .x-dd-drag-ghost{
+	-moz-opacity: 0.4;
+    opacity:.4;
+    filter: alpha(opacity=40);
+	border:0 none;
+	padding:0;
+	background-color:transparent;
+}
+
+.x-dd-drag-repair .x-dd-drop-icon{
+	visibility:hidden;
+}
+
+.x-dd-drop-icon{
+    position:absolute;
+	top:3px;
+	left:3px;
+	display:block;
+	width:16px;
+	height:16px;
+	background-color:transparent;
+	background-position: center;
+	background-repeat: no-repeat;
+	z-index:1;
+}
+
+.x-view-selector {
+    position:absolute;
+    left:0;
+    top:0;
+    width:0;
+    border:1px dotted;
+	opacity: .5;
+    -moz-opacity: .5;
+    filter:alpha(opacity=50);
+    zoom:1;
+}.ext-strict .ext-ie .x-tree .x-panel-bwrap{
+    position:relative;
+    overflow:hidden;
+}
+
+.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+    background-repeat: no-repeat;
+}
+
+.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	background-position:center;
+    background-repeat: no-repeat;
+}
+
+.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon {
+    vertical-align:middle !important;
+}
+
+/* checkboxes */
+.ext-ie input.x-tree-node-cb {
+    width:15px;
+    height:15px;
+}
+
+input.x-tree-node-cb {
+    margin-left:1px;
+}
+
+.ext-ie input.x-tree-node-cb {
+    margin-left:0;
+}
+
+.x-tree-noicon .x-tree-node-icon{
+	width:0; height:0;
+}
+
+/* loading icon */
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+/* No line styles */
+.x-tree-no-lines .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-line{
+	background:transparent;
+}
+
+/* Arrows */
+.x-tree-arrows .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-line{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	cursor:pointer;
+}
+
+.ext-ie ul.x-tree-node-ct{
+    font-size:0;
+    line-height:0;
+    zoom:1;
+}
+
+.x-tree-node{
+	white-space: nowrap;
+}
+
+.x-tree-node-el {
+    line-height:18px;
+    cursor:pointer;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	text-decoration:none;
+	-khtml-user-select:none;
+	-moz-user-select:none;
+    -webkit-user-select:ignore;
+    -kthml-user-focus:normal;
+    -moz-user-focus:normal;
+    -moz-outline: 0 none;
+    outline:0 none;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	text-decoration:none;
+	padding:1px 3px 1px 2px;
+}
+
+.x-tree-node .x-tree-node-disabled .x-tree-node-icon{
+	-moz-opacity: 0.5;
+   opacity:.5;
+   filter: alpha(opacity=50);
+}
+
+.x-tree-node .x-tree-node-inline-icon{
+	background:transparent;
+}
+
+.x-tree-node a:hover, .x-dd-drag-ghost a:hover{
+	text-decoration:none;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:1px dotted;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top:1px dotted;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{
+	 border-top:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom:2px solid;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top:2px solid;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 border:1px dotted;
+}
+
+.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{
+	display:none !important;
+}
+
+/* Fix for ie rootVisible:false issue */
+.x-tree-root-ct {
+    zoom:1;
+}
+.x-date-picker {
+    border: 1px solid;
+    border-top:0 none;
+	position:relative;
+}
+
+.x-date-picker a {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+.x-date-inner, .x-date-inner td, .x-date-inner th{
+    border-collapse:separate;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background: repeat-x 0 -83px;
+	overflow:hidden;
+}
+
+.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr,
+.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr,
+.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{
+	background:transparent !important;
+    vertical-align:middle;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background:transparent no-repeat right 0;
+}
+
+.x-date-right, .x-date-left {
+    width:18px;
+}
+
+.x-date-right{
+    text-align:right;
+}
+
+.x-date-middle {
+    padding-top:2px;
+    padding-bottom:2px;
+    width:130px; /* FF3 */
+}
+
+.x-date-right a, .x-date-left a{
+    display:block;
+    width:16px;
+	height:16px;
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor:pointer;
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a:hover, .x-date-left a:hover{
+    -moz-opacity: 1;
+    opacity:1;
+    filter: alpha(opacity=100);
+}
+
+.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a {
+    margin-right:2px;
+    text-decoration:none !important;
+}
+
+.x-date-left a{
+    margin-left:2px;
+    text-decoration:none !important;
+}
+
+table.x-date-inner {
+    width:100%;
+    table-layout:fixed;
+}
+
+.x-date-inner th {
+    width:25px;
+}
+
+.x-date-inner th {
+    background: repeat-x left top;
+    text-align:right !important;
+	border-bottom: 1px solid;
+	cursor:default;
+    padding:0;
+    border-collapse:separate;
+}
+
+.x-date-inner th span {
+    display:block;
+    padding:2px;
+    padding-right:7px;
+}
+
+.x-date-inner td {
+    border: 1px solid;
+	text-align:right;
+    padding:0;
+}
+
+.x-date-inner a {
+    padding:2px 5px;
+    display:block;
+	text-decoration:none;
+    text-align:right;
+    zoom:1;
+}
+
+.x-date-inner .x-date-active{
+	cursor:pointer;
+	color:black;
+}
+
+.x-date-inner .x-date-selected a{
+	background: repeat-x left top;
+	border:1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-today a{
+	border: 1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+    text-decoration:none !important;
+}
+
+.x-date-bottom {
+    padding:4px;
+    border-top: 1px solid;
+    background: repeat-x left top;
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    text-decoration:none !important;
+}
+
+.x-item-disabled .x-date-inner a:hover{
+    background: none;
+}
+
+.x-date-inner .x-date-disabled a {
+	cursor:default;
+}
+
+.x-date-menu .x-menu-item {
+	padding:1px 24px 1px 4px;
+	white-space: nowrap;
+}
+
+.x-date-menu .x-menu-item .x-menu-item-icon {
+    width:10px;
+    height:10px;
+    margin-right:5px;
+    background-position:center -4px !important;
+}
+
+.x-date-mp {
+	position:absolute;
+	left:0;
+	top:0;
+	display:none;
+}
+
+.x-date-mp td {
+    padding:2px;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn {
+    border: 0 none;
+	text-align:center;
+	vertical-align: middle;
+	width:25%;
+}
+
+.x-date-mp-ok {
+	margin-right:3px;
+}
+
+.x-date-mp-btns button {
+	text-decoration:none;
+	text-align:center;
+	text-decoration:none !important;
+	border:1px solid;
+	padding:1px 3px 1px;
+	cursor:pointer;
+}
+
+.x-date-mp-btns {
+	background: repeat-x left top;
+}
+
+.x-date-mp-btns td {
+	border-top: 1px solid;
+    text-align:center;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	display:block;
+	padding:2px 4px;
+	text-decoration:none;
+	text-align:center;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	text-decoration:none;
+	cursor:pointer;
+}
+
+td.x-date-mp-sel a {
+	padding:1px 3px;
+	background: repeat-x left top;
+	border:1px solid;
+}
+
+.x-date-mp-ybtn a {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    cursor:pointer;
+    background:transparent no-repeat;
+    display:block;
+    margin:0 auto;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next {
+    background-position:0 -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next:hover {
+    background-position:-15px -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev {
+    background-position:0 -105px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev:hover {
+    background-position:-15px -105px;
+}
+
+.x-date-mp-ybtn {
+   text-align:center;
+}
+
+td.x-date-mp-sep {
+   border-right:1px solid;
+}.x-tip{
+	position: absolute;
+	top: 0;
+    left:0;
+    visibility: hidden;
+	z-index: 20000;
+    border:0 none;
+}
+
+.x-tip .x-tip-close{
+	height: 15px;
+	float:right;
+	width: 15px;
+    margin:0 0 2px 2px;
+    cursor:pointer;
+    display:none;
+}
+
+.x-tip .x-tip-tc {
+	background: transparent no-repeat 0 -62px;
+	padding-top:3px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-bc {
+	background: transparent no-repeat 0 -121px;
+	height:3px;
+    overflow:hidden;
+}
+
+.x-tip .x-tip-bl {
+	background: transparent no-repeat 0 -59px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-br {
+	background: transparent no-repeat right -59px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mc {
+    border:0 none;
+}
+
+.x-tip .x-tip-ml {
+	background: no-repeat 0 -124px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mr {
+	background: transparent no-repeat right -124px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc {
+    font-size:0;
+    line-height:0;
+}
+
+.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{
+    line-height: 1px;
+}
+
+.x-tip .x-tip-header-text {
+    padding:0;
+    margin:0 0 2px 0;
+}
+
+.x-tip .x-tip-body {
+    margin:0 !important;
+    line-height:14px;
+    padding:0;
+}
+
+.x-tip .x-tip-body .loading-indicator {
+    margin:0;
+}
+
+.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text {
+    cursor:move;
+}
+
+.x-form-invalid-tip .x-tip-tc {
+	background: repeat-x 0 -12px;
+    padding-top:6px;
+}
+
+.x-form-invalid-tip .x-tip-bc {
+	background: repeat-x 0 -18px;
+    height:6px;
+}
+
+.x-form-invalid-tip .x-tip-bl {
+	background: no-repeat 0 -6px;
+}
+
+.x-form-invalid-tip .x-tip-br {
+	background: no-repeat right -6px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding:2px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding-left:24px;
+    background:transparent no-repeat 2px 2px;
+}
+
+.x-tip-anchor {
+    position: absolute;
+    width: 9px;
+    height: 10px;
+    overflow:hidden;
+    background: transparent no-repeat 0 0;
+    zoom:1;
+}
+.x-tip-anchor-bottom {
+    background-position: -9px 0;
+}
+.x-tip-anchor-right {
+    background-position: -18px 0;
+    width: 10px;
+}
+.x-tip-anchor-left {
+    background-position: -28px 0;
+    width: 10px;
+}.x-menu {
+	z-index: 15000;
+	zoom: 1;
+	background: repeat-y;
+}
+
+.x-menu-floating{
+    border: 1px solid;
+}
+
+.x-menu a {
+    text-decoration: none !important;
+}
+
+.ext-ie .x-menu {
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-menu-list{
+    padding: 2px;
+	background:transparent;
+	border:0 none;
+    overflow:hidden;
+    overflow-y: hidden;
+}
+
+.ext-strict .ext-ie .x-menu-list{
+    position: relative;
+}
+
+.x-menu li{
+	line-height:100%;
+}
+
+.x-menu li.x-menu-sep-li{
+	font-size:1px;
+	line-height:1px;
+}
+
+.x-menu-list-item{
+    white-space: nowrap;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	padding:1px;
+}
+
+.x-menu-item-arrow{
+	background:transparent no-repeat right;
+}
+
+.x-menu-sep {
+	display:block;
+	font-size:1px;
+	line-height:1px;
+	margin: 2px 3px;
+	border-bottom:1px solid;
+    overflow:hidden;
+}
+
+.x-menu-focus {
+	position:absolute;
+	left:-1px;
+	top:-1px;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+    overflow:hidden;
+    display:block;
+}
+
+a.x-menu-item {
+    cursor: pointer;
+    display: block;
+    line-height: 16px;
+    outline-color: -moz-use-text-color;
+    outline-style: none;
+    outline-width: 0;
+    padding: 3px 21px 3px 27px;
+    position: relative;
+    text-decoration: none;
+    white-space: nowrap;
+}
+
+.x-menu-item-active {
+    background-repeat: repeat-x;
+    background-position: left bottom;
+    border-style:solid;
+    border-width: 1px 0;
+    margin:0 1px;
+	padding: 0;
+}
+
+.x-menu-item-active a.x-menu-item {
+    border-style:solid;
+    border-width:0 1px;
+    margin:0 -1px;
+}
+
+.x-menu-item-icon {
+	border: 0 none;
+	height: 16px;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	position: absolute;
+    left: 3px;
+    top: 3px;
+    margin: 0;
+    background-position:center;
+}
+
+.ext-ie .x-menu-item-icon {
+    left: -24px;
+}
+.ext-strict .x-menu-item-icon {
+    left: 3px;
+}
+
+.ext-ie6 .x-menu-item-icon {
+    left: -24px;
+}
+
+.ext-ie .x-menu-item-icon {
+    vertical-align: middle;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background: transparent no-repeat center;
+}
+
+.x-menu-group-item .x-menu-item-icon{
+	background: transparent;
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background: transparent no-repeat center;
+}
+
+.x-date-menu .x-menu-list{
+    padding: 0;
+}
+
+.x-menu-date-item{
+	padding:0;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+    margin-left: 26px;
+	margin-right:4px;
+}
+
+.x-menu .x-date-picker{
+    border:1px solid;
+    margin-top:2px;
+    margin-bottom:2px;
+}
+
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+	 margin: 0;
+	 border: 0 none;
+}
+
+.x-date-menu {
+   padding:0 !important;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border:1px dotted !important;
+	padding:0;
+}
+
+.x-menu .x-menu-scroller {
+    width: 100%;
+	background-repeat:no-repeat;
+	background-position:center;
+	height:8px;
+    line-height: 8px;
+	cursor:pointer;
+    margin: 0;
+    padding: 0;
+}
+
+.x-menu .x-menu-scroller-active{
+    height: 6px;
+    line-height: 6px;
+}
+
+.x-menu-list-item-indent{
+    padding-left: 27px;
+}
+/*
+ Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
+  <div class="x-box-blue">
+        <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
+        <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
+            <h3>YOUR TITLE HERE (optional)</h3>
+            <div>YOUR CONTENT HERE</div>
+        </div></div></div>
+        <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
+    </div>
+ */
+
+.x-box-tl {
+	background: transparent no-repeat 0 0;
+    zoom:1;
+}
+
+.x-box-tc {
+	height: 8px;
+	background: transparent repeat-x 0 0;
+	overflow: hidden;
+}
+
+.x-box-tr {
+	background: transparent no-repeat right -8px;
+}
+
+.x-box-ml {
+	background: transparent repeat-y 0;
+	padding-left: 4px;
+	overflow: hidden;
+    zoom:1;
+}
+
+.x-box-mc {
+	background: repeat-x 0 -16px;
+	padding: 4px 10px;
+}
+
+.x-box-mc h3 {
+	margin: 0 0 4px 0;
+    zoom:1;
+}
+
+.x-box-mr {
+	background: transparent repeat-y right;
+	padding-right: 4px;
+	overflow: hidden;
+}
+
+.x-box-bl {
+	background: transparent no-repeat 0 -16px;
+    zoom:1;
+}
+
+.x-box-bc {
+	background: transparent repeat-x 0 -8px;
+	height: 8px;
+	overflow: hidden;
+}
+
+.x-box-br {
+	background: transparent no-repeat right -24px;
+}
+
+.x-box-tl, .x-box-bl {
+	padding-left: 8px;
+	overflow: hidden;
+}
+
+.x-box-tr, .x-box-br {
+	padding-right: 8px;
+	overflow: hidden;
+}#x-debug-browser .x-tree .x-tree-node a span {
+    padding-top:2px;
+    line-height:18px;
+}
+
+#x-debug-browser  .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+#x-debug-browser  .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -60px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -60px;
+}.x-combo-list {
+    border:1px solid;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-combo-list-inner {
+    overflow:auto;
+    position:relative; /* for calculating scroll offsets */
+    zoom:1;
+    overflow-x:hidden;
+}
+
+.x-combo-list-hd {
+    border-bottom:1px solid;
+    padding:3px;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom:1px solid;
+}
+
+.x-combo-list-item {
+    padding:2px;
+    border:1px solid;
+    white-space: nowrap;
+    overflow:hidden;
+    text-overflow: ellipsis;
+}
+
+.x-combo-list .x-combo-selected{
+	border:1px dotted !important;
+    cursor:pointer;
+}
+
+.x-combo-list .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}.x-panel {
+    border-style: solid;
+    border-width:0;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+    padding:5px 3px 4px 5px;
+    border:1px solid;
+    line-height: 15px;
+    background: transparent repeat-x 0 -1px;
+}
+
+.x-panel-body {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    position: relative; /* added for item scroll positioning */
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom: 0 none;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top:1px solid;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-tl .x-panel-header {
+    padding:5px 0 4px 0;
+    border:0 none;
+    background:transparent;
+}
+
+.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon {
+    padding-left:20px !important;
+    background-repeat:no-repeat;
+    background-position:0 4px;
+    zoom:1;
+}
+
+.x-panel-inline-icon {
+    width:16px;
+	height:16px;
+    background-repeat:no-repeat;
+    background-position:0 0;
+	vertical-align:middle;
+	margin-right:4px;
+	margin-top:-1px;
+	margin-bottom:-1px;
+}
+
+.x-panel-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+/* fix ie7 strict mode bug */
+.ext-strict .ext-ie7 .x-panel-tc {
+    overflow: visible;
+}
+
+.x-panel-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    border-bottom:1px solid;
+}
+
+.x-panel-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:6px;
+}
+
+.x-panel-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-panel-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-mc {
+    border:0 none;
+    padding:0;
+    margin:0;
+    padding-top:6px;
+}
+
+.x-panel-mc .x-panel-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-panel-ml {
+	background: repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc {
+	height:6px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-panel-bwrap {
+    overflow:hidden;
+    zoom:1;
+    left:0;
+    top:0;
+}
+.x-panel-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-collapsed .x-resizable-handle{
+    display:none;
+}
+
+.ext-gecko .x-panel-animated div {
+    overflow:hidden !important;
+}
+
+/* Plain */
+.x-plain-body {
+    overflow:hidden;
+}
+
+.x-plain-bbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-tbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-plain {
+    overflow:hidden;
+}
+
+/* Tools */
+.x-tool {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    float:right;
+    cursor:pointer;
+    background:transparent no-repeat;
+    margin-left:2px;
+}
+
+/* expand / collapse tools */
+.x-tool-toggle {
+    background-position:0 -60px;
+}
+
+.x-tool-toggle-over {
+    background-position:-15px -60px;
+}
+
+.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+
+.x-tool-close {
+    background-position:0 -0;
+}
+
+.x-tool-close-over {
+    background-position:-15px 0;
+}
+
+.x-tool-minimize {
+    background-position:0 -15px;
+}
+
+.x-tool-minimize-over {
+    background-position:-15px -15px;
+}
+
+.x-tool-maximize {
+    background-position:0 -30px;
+}
+
+.x-tool-maximize-over {
+    background-position:-15px -30px;
+}
+
+.x-tool-restore {
+    background-position:0 -45px;
+}
+
+.x-tool-restore-over {
+    background-position:-15px -45px;
+}
+
+.x-tool-gear {
+    background-position:0 -90px;
+}
+
+.x-tool-gear-over {
+    background-position:-15px -90px;
+}
+
+.x-tool-pin {
+    background-position:0 -135px;
+}
+
+.x-tool-pin-over {
+    background-position:-15px -135px;
+}
+
+.x-tool-unpin {
+    background-position:0 -150px;
+}
+
+.x-tool-unpin-over {
+    background-position:-15px -150px;
+}
+
+.x-tool-right {
+    background-position:0 -165px;
+}
+
+.x-tool-right-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-left {
+    background-position:0 -180px;
+}
+
+.x-tool-left-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-up {
+    background-position:0 -210px;
+}
+
+.x-tool-up-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-down {
+    background-position:0 -195px;
+}
+
+.x-tool-down-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-refresh {
+    background-position:0 -225px;
+}
+
+.x-tool-refresh-over {
+    background-position:-15px -225px;
+}
+
+.x-tool-minus {
+    background-position:0 -255px;
+}
+
+.x-tool-minus-over {
+    background-position:-15px -255px;
+}
+
+.x-tool-plus {
+    background-position:0 -240px;
+}
+
+.x-tool-plus-over {
+    background-position:-15px -240px;
+}
+
+.x-tool-search {
+    background-position:0 -270px;
+}
+
+.x-tool-search-over {
+    background-position:-15px -270px;
+}
+
+.x-tool-save {
+    background-position:0 -285px;
+}
+
+.x-tool-save-over {
+    background-position:-15px -285px;
+}
+
+.x-tool-help {
+    background-position:0 -300px;
+}
+
+.x-tool-help-over {
+    background-position:-15px -300px;
+}
+
+.x-tool-print {
+    background-position:0 -315px;
+}
+
+.x-tool-print-over {
+    background-position:-15px -315px;
+}
+
+/* Ghosting */
+.x-panel-ghost {
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    opacity:.65;
+    -moz-opacity:.65;
+    filter:alpha(opacity=65);
+}
+
+.x-panel-ghost ul {
+    margin:0;
+    padding:0;
+    overflow:hidden;
+    font-size:0;
+    line-height:0;
+    border:1px solid;
+    border-top:0 none;
+    display:block;
+}
+
+.x-panel-ghost * {
+    cursor:move !important;
+}
+
+.x-panel-dd-spacer {
+    border:2px dashed;
+}
+
+/* Buttons */
+.x-panel-btns {
+    padding:5px;
+    overflow:hidden;
+}
+
+.x-panel-btns-right .x-panel-fbar {
+	float:right;
+	clear:none;
+}
+
+.x-panel-btns-left .x-panel-fbar {
+	clear:none;
+}
+
+.x-panel-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-panel-btns-center .x-toolbar-ct {
+	margin:0 auto; /*everyone else*/
+    text-align:left;
+    width:auto;
+}
+
+.ext-gecko2 .x-panel-btns-right .x-toolbar-ct {
+    width:auto;
+}
+
+.x-panel-btns td.x-toolbar-cell{
+	padding:3px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-center{
+	background-position:0 -105px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-panel-btns .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+	white-space: nowrap;
+}
+/**
+ * W3C Suggested Default style sheet for HTML 4
+ * http://www.w3.org/TR/CSS21/sample.html
+ *
+ * Resets for Ext.Panel @cfg normal: true
+ */
+.x-panel-reset .x-panel-body html,
+.x-panel-reset .x-panel-body address,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body body,
+.x-panel-reset .x-panel-body dd,
+.x-panel-reset .x-panel-body div,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dt,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body frame, frameset,
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body noframes,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body center,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body hr,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body pre 			  { display: block }
+.x-panel-reset .x-panel-body li              { display: list-item }
+.x-panel-reset .x-panel-body head            { display: none }
+.x-panel-reset .x-panel-body table           { display: table }
+.x-panel-reset .x-panel-body tr              { display: table-row }
+.x-panel-reset .x-panel-body thead           { display: table-header-group }
+.x-panel-reset .x-panel-body tbody           { display: table-row-group }
+.x-panel-reset .x-panel-body tfoot           { display: table-footer-group }
+.x-panel-reset .x-panel-body col             { display: table-column }
+.x-panel-reset .x-panel-body colgroup        { display: table-column-group }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th 	          { display: table-cell }
+.x-panel-reset .x-panel-body caption         { display: table-caption }
+.x-panel-reset .x-panel-body th              { font-weight: bolder; text-align: center }
+.x-panel-reset .x-panel-body caption         { text-align: center }
+.x-panel-reset .x-panel-body body            { margin: 8px }
+.x-panel-reset .x-panel-body h1              { font-size: 2em; margin: .67em 0 }
+.x-panel-reset .x-panel-body h2              { font-size: 1.5em; margin: .75em 0 }
+.x-panel-reset .x-panel-body h3              { font-size: 1.17em; margin: .83em 0 }
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu            { margin: 1.12em 0 }
+.x-panel-reset .x-panel-body h5              { font-size: .83em; margin: 1.5em 0 }
+.x-panel-reset .x-panel-body h6              { font-size: .75em; margin: 1.67em 0 }
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body b,
+.x-panel-reset .x-panel-body strong          { font-weight: bolder }
+.x-panel-reset .x-panel-body blockquote      { margin-left: 40px; margin-right: 40px }
+.x-panel-reset .x-panel-body i,
+.x-panel-reset .x-panel-body cite,
+.x-panel-reset .x-panel-body em,
+.x-panel-reset .x-panel-body var,
+.x-panel-reset .x-panel-body address    	  { font-style: italic }
+.x-panel-reset .x-panel-body pre,
+.x-panel-reset .x-panel-body tt,
+.x-panel-reset .x-panel-body code,
+.x-panel-reset .x-panel-body kbd,
+.x-panel-reset .x-panel-body samp       	  { font-family: monospace }
+.x-panel-reset .x-panel-body pre             { white-space: pre }
+.x-panel-reset .x-panel-body button,
+.x-panel-reset .x-panel-body textarea,
+.x-panel-reset .x-panel-body input,
+.x-panel-reset .x-panel-body select   		  { display: inline-block }
+.x-panel-reset .x-panel-body big             { font-size: 1.17em }
+.x-panel-reset .x-panel-body small,
+.x-panel-reset .x-panel-body sub,
+.x-panel-reset .x-panel-body sup 			  { font-size: .83em }
+.x-panel-reset .x-panel-body sub             { vertical-align: sub }
+.x-panel-reset .x-panel-body sup             { vertical-align: super }
+.x-panel-reset .x-panel-body table           { border-spacing: 2px; }
+.x-panel-reset .x-panel-body thead,
+.x-panel-reset .x-panel-body tbody,
+.x-panel-reset .x-panel-body tfoot           { vertical-align: middle }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th          	  { vertical-align: inherit }
+.x-panel-reset .x-panel-body s,
+.x-panel-reset .x-panel-body strike,
+.x-panel-reset .x-panel-body del  			  { text-decoration: line-through }
+.x-panel-reset .x-panel-body hr              { border: 1px inset }
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body dd        	  { margin-left: 40px }
+.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;}
+.x-panel-reset .x-panel-body ol              { list-style-type: decimal }
+.x-panel-reset .x-panel-body ol ul,
+.x-panel-reset .x-panel-body ul ol,
+.x-panel-reset .x-panel-body ul ul,
+.x-panel-reset .x-panel-body ol ol    		  { margin-top: 0; margin-bottom: 0 }
+.x-panel-reset .x-panel-body u,
+.x-panel-reset .x-panel-body ins          	  { text-decoration: underline }
+.x-panel-reset .x-panel-body br:before       { content: "\A" }
+.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line }
+.x-panel-reset .x-panel-body center          { text-align: center }
+.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline }
+.x-panel-reset .x-panel-body :focus          { outline: thin dotted invert }
+
+/* Begin bidirectionality settings (do not change) */
+.x-panel-reset .x-panel-body BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }
+.x-panel-reset .x-panel-body BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }
+.x-window {
+    zoom:1;
+}
+
+.x-window .x-resizable-handle {
+    opacity:0;
+    -moz-opacity:0;
+    filter:alpha(opacity=0);
+}
+
+.x-window-proxy {
+    border:1px solid;
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    display:none;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-window-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-window-bwrap {
+    z-index:1;
+    position:relative;
+    zoom:1;
+    left:0;top:0;
+}
+
+.x-window-tl .x-window-header {
+    padding:5px 0 4px 0;
+}
+
+.x-window-header-text {
+    cursor:pointer;
+}
+
+.x-window-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    zoom:1;
+}
+
+.x-window-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    z-index:1;
+    position:relative;
+}
+
+.x-window-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+}
+
+.x-window-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-window-bc .x-window-footer {
+    padding-bottom:6px;
+    zoom:1;
+    font-size:0;
+    line-height:0;
+}
+
+.x-window-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-mc {
+    border:1px solid;
+    padding:0;
+    margin:0;
+}
+
+.x-window-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-body {
+    overflow:hidden;
+}
+
+.x-window-bwrap {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br,
+    .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr,
+    .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr {
+    padding:0;
+}
+
+.x-window-maximized .x-window-footer {
+    padding-bottom:0;
+}
+
+.x-window-maximized .x-window-tc {
+    padding-left:3px;
+    padding-right:3px;
+}
+
+.x-window-maximized .x-window-mc {
+    border-left:0 none;
+    border-right:0 none;
+}
+
+.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar {
+    border-left:0 none;
+    border-right: 0 none;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}
+
+.x-window-draggable, .x-window-draggable .x-window-header-text {
+    cursor:move;
+}
+
+.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text {
+    cursor:default;
+}
+
+.x-window-body {
+    background:transparent;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-window-maximized-ct {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-resizable-handle {
+    display:none;
+}
+
+.x-window-sizing-ghost ul {
+    border:0 none !important;
+}
+
+.x-dlg-focus{
+	-moz-outline:0 none;
+	outline:0 none;
+	width:0;
+	height:0;
+	overflow:hidden;
+	position:absolute;
+	top:0;
+	left:0;
+}
+
+.ext-webkit .x-dlg-focus{
+    width: 1px;
+    height: 1px;
+}
+
+.x-dlg-mask{
+    z-index:10000;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+}
+
+body.ext-ie6.x-body-masked select {
+	visibility:hidden;
+}
+
+body.ext-ie6.x-body-masked .x-window select {
+	visibility:visible;
+}
+
+.x-window-plain .x-window-mc {
+    border: 1px solid;
+}
+
+.x-window-plain .x-window-body {
+    border: 1px solid;
+    background:transparent !important;
+}.x-html-editor-wrap {
+    border:1px solid;
+}
+
+.x-html-editor-tb .x-btn-text {
+    background:transparent no-repeat;
+}
+
+.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold {
+    background-position:0 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);    
+}
+
+.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic {
+    background-position:-16px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline {
+    background-position:-32px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor {
+    background-position:-160px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor {
+    background-position:-176px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft {
+    background-position:-112px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter {
+    background-position:-128px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright {
+    background-position:-144px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist {
+    background-position:-80px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist {
+    background-position:-96px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize {
+    background-position:-48px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize {
+    background-position:-64px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit {
+    background-position:-192px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink {
+    background-position:-208px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tip .x-tip-bd .x-tip-bd-inner {
+    padding:5px;
+    padding-bottom:1px;
+}
+
+.x-html-editor-tb .x-toolbar {
+    position:static !important;
+}.x-panel-noborder .x-panel-body-noborder {
+    border-width:0;
+}
+
+.x-panel-noborder .x-panel-header-noborder {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-width:1px 0 0 0;
+    border-style:solid;
+}
+
+.x-window-noborder .x-window-mc {
+    border-width:0;
+}
+
+.x-window-plain .x-window-body-noborder {
+    border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-body-noborder {
+	border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-header-noborder {
+    border-width: 0 0 1px 0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-footer-noborder {
+    border-width: 1px 0 0 0;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-width: 1px 0 0 0;
+    border-style:solid;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}.x-border-layout-ct {
+    position: relative;
+}
+
+.x-border-panel {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-tool-collapse-south {
+    background-position:0 -195px;
+}
+
+.x-tool-collapse-south-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-collapse-north {
+    background-position:0 -210px;
+}
+
+.x-tool-collapse-north-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-collapse-west {
+    background-position:0 -180px;
+}
+
+.x-tool-collapse-west-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-collapse-east {
+    background-position:0 -165px;
+}
+
+.x-tool-collapse-east-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-south {
+    background-position:0 -210px;
+}
+
+.x-tool-expand-south-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-expand-north {
+    background-position:0 -195px;
+}
+.x-tool-expand-north-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-expand-west {
+    background-position:0 -165px;
+}
+
+.x-tool-expand-west-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-east {
+    background-position:0 -180px;
+}
+
+.x-tool-expand-east-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-expand-north, .x-tool-expand-south {
+    float:right;
+    margin:3px;
+}
+
+.x-tool-expand-east, .x-tool-expand-west {
+    float:none;
+    margin:3px auto;
+}
+
+.x-accordion-hd .x-tool-toggle {
+    background-position:0 -255px;
+}
+
+.x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -255px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle {
+    background-position:0 -240px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -240px;
+}
+
+.x-accordion-hd {
+	padding-top:4px;
+	padding-bottom:3px;
+	border-top:0 none;
+    background: transparent repeat-x 0 -9px;
+}
+
+.x-layout-collapsed{
+    position:absolute;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+    width:20px;
+    height:20px;
+    overflow:hidden;
+	border:1px solid;
+	z-index:20;
+}
+
+.ext-border-box .x-layout-collapsed{
+    width:22px;
+    height:22px;
+}
+
+.x-layout-collapsed-over{
+    cursor:pointer;
+}
+
+.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{
+	position:absolute;
+    top:0;
+    left:0;
+    width:20px;
+    height:20px;
+}
+
+
+.x-layout-split{
+    position:absolute;
+    height:5px;
+    width:5px;
+    line-height:1px;
+    font-size:1px;
+    z-index:3;
+    background-color:transparent;
+}
+
+/* IE6 strict won't drag w/out a color */
+.ext-strict .ext-ie6 .x-layout-split{
+    background-color: #fff !important;
+    filter: alpha(opacity=1);
+}
+
+.x-layout-split-h{
+    background-image:url(../images/default/s.gif);
+    background-position: left;
+}
+
+.x-layout-split-v{
+    background-image:url(../images/default/s.gif);
+    background-position: top;
+}
+
+.x-column-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column {
+    float:left;
+    padding:0;
+    margin:0;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column-inner {
+    overflow:hidden;
+    zoom:1;
+}
+
+/* mini mode */
+.x-layout-mini {
+    position:absolute;
+    top:0;
+    left:0;
+    display:block;
+    width:5px;
+    height:35px;
+    cursor:pointer;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{
+    opacity:1;
+    -moz-opacity:1;
+    filter:none;
+}
+
+.x-layout-split-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-split-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west, .x-layout-cmini-east {
+    border:0 none;
+    width:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-layout-cmini-north, .x-layout-cmini-south {
+    border:0 none;
+    height:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-viewport, .x-viewport body {
+    margin: 0;
+    padding: 0;
+    border: 0 none;
+    overflow: hidden;
+    height: 100%;
+}
+
+.x-abs-layout-item {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item {
+    margin:0;
+}
+
+.x-box-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-box-inner {
+    overflow:hidden;
+    zoom:1;
+    position:relative;
+    left:0;
+    top:0;
+}
+
+.x-box-item {
+    position:absolute;
+    left:0;
+    top:0;
+}.x-progress-wrap {
+    border:1px solid;
+    overflow:hidden;
+}
+
+.x-progress-inner {
+    height:18px;
+    background:repeat-x;
+    position:relative;
+}
+
+.x-progress-bar {
+    height:18px;
+    float:left;
+    width:0;
+    background: repeat-x left center;
+    border-top:1px solid;
+    border-bottom:1px solid;
+    border-right:1px solid;
+}
+
+.x-progress-text {
+    padding:1px 5px;
+    overflow:hidden;
+    position:absolute;
+    left:0;
+    text-align:center;
+}
+
+.x-progress-text-back {
+    line-height:16px;
+}
+
+.ext-ie .x-progress-text-back {
+    line-height:15px;
+}.x-list-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    height:22px;
+}
+
+.x-list-header-inner div {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.x-list-header-inner div em {
+    display:block;
+    border-left:1px solid;
+    padding:4px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    line-height:14px;
+}
+
+.x-list-body {
+    overflow:auto;
+    overflow-x:hidden;
+    overflow-y:auto;
+    zoom:1;
+    float: left;
+    width: 100%;
+}
+
+.x-list-body dl {
+    zoom:1;
+}
+
+.x-list-body dt {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor:pointer;
+    zoom:1;
+}
+
+.x-list-body dt em {
+    display:block;
+    padding:3px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+}
+
+.x-list-resizer {
+    border-left:1px solid;
+    border-right:1px solid;
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-list-header-inner em.sort-asc {
+    background: transparent no-repeat center 0;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
+
+.x-list-header-inner em.sort-desc {
+    background: transparent no-repeat center -23px;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
+/* Shared styles */
+.x-slider {
+    zoom:1;
+}
+
+.x-slider-inner {
+    position:relative;
+    left:0;
+    top:0;
+    overflow:visible;
+    zoom:1;
+}
+
+.x-slider-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	overflow:hidden;  
+}
+
+/* Horizontal styles */
+.x-slider-horz {
+    padding-left:7px;
+    background:transparent no-repeat 0 -22px;
+}
+
+.x-slider-horz .x-slider-end {
+    padding-right:7px;
+    zoom:1;
+    background:transparent no-repeat right -44px;
+}
+
+.x-slider-horz .x-slider-inner {
+    background:transparent repeat-x 0 0;
+    height:22px;
+}
+
+.x-slider-horz .x-slider-thumb {
+    width:14px;
+    height:15px;
+    position:absolute;
+    left:0;
+    top:3px;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-horz .x-slider-thumb-over {
+    background-position: -14px -15px;
+}
+
+.x-slider-horz .x-slider-thumb-drag {
+    background-position: -28px -30px;
+}
+
+/* Vertical styles */
+.x-slider-vert {
+    padding-top:7px;
+    background:transparent no-repeat -44px 0;
+    width:22px;
+}
+
+.x-slider-vert .x-slider-end {
+    padding-bottom:7px;
+    zoom:1;
+    background:transparent no-repeat -22px bottom;
+}
+
+.x-slider-vert .x-slider-inner {
+    background:transparent repeat-y 0 0;
+}
+
+.x-slider-vert .x-slider-thumb {
+    width:15px;
+    height:14px;
+    position:absolute;
+    left:3px;
+    bottom:0;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-vert .x-slider-thumb-over {
+    background-position: -15px -14px;
+}
+
+.x-slider-vert .x-slider-thumb-drag {
+    background-position: -30px -28px;
+}.x-window-dlg .x-window-body {
+    border:0 none !important;
+    padding:5px 10px;
+    overflow:hidden !important;
+}
+
+.x-window-dlg .x-window-mc {
+    border:0 none !important;
+}
+
+.x-window-dlg .ext-mb-input {
+    margin-top:4px;
+    width:95%;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    margin-top:4px;
+}
+
+.x-window-dlg .x-progress-wrap {
+    margin-top:4px;
+}
+
+.ext-ie .x-window-dlg .x-progress-wrap {
+    margin-top:6px;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background:transparent no-repeat left;
+    display:block;
+    width:300px;
+    padding-left:18px;
+    line-height:18px;
+}
+
+.x-window-dlg .ext-mb-icon {
+    float:left;
+    width:47px;
+    height:32px;
+}
+
+.ext-ie .x-window-dlg .ext-mb-icon {
+    width:44px; /* 3px IE margin issue */
+}
+
+.x-window-dlg .x-dlg-icon .ext-mb-content{
+    zoom: 1; margin-left: 47px;
+}
+
+.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error {
+    background:transparent no-repeat top left;
+}
+
+.ext-gecko2 .ext-mb-fix-cursor {
+    overflow:auto;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/ext-all.css	(revision 625)
@@ -0,0 +1,6990 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}.ext-el-mask {
+    z-index: 100;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width: 100%;
+    height: 100%;
+    zoom: 1;
+}
+
+.ext-el-mask-msg {
+    z-index: 20001;
+    position: absolute;
+    top: 0;
+    left: 0;
+    border:1px solid;
+    background:repeat-x 0 -16px;
+    padding:2px;
+}
+
+.ext-el-mask-msg div {
+    padding:5px 10px 5px 10px;
+    border:1px solid;
+    cursor:wait;
+}
+
+.ext-shim {
+    position:absolute;
+    visibility:hidden;
+    left:0;
+    top:0;
+    overflow:hidden;
+}
+
+.ext-ie .ext-shim {
+    filter: alpha(opacity=0);
+}
+
+.ext-ie6 .ext-shim {
+    margin-left: 5px;
+    margin-top: 3px;
+}
+
+.x-mask-loading div {
+    padding:5px 10px 5px 25px;
+    background:no-repeat 5px 5px;
+    line-height:16px;
+}
+
+/* class for hiding elements without using display:none */
+.x-hidden, .x-hide-offsets {
+    position:absolute !important;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+}
+
+.x-hide-display {
+    display:none !important;
+}
+
+.x-hide-visibility {
+    visibility:hidden !important;
+}
+
+.x-masked {
+    overflow: hidden !important;
+}
+.x-masked-relative {
+    position: relative !important;
+}
+
+.x-masked select, .x-masked object, .x-masked embed {
+    visibility: hidden;
+}
+
+.x-layer {
+    visibility: hidden;
+}
+
+.x-unselectable, .x-unselectable * {
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-repaint {
+    zoom: 1;
+    background-color: transparent;
+    -moz-outline: none;
+}
+
+.x-item-disabled {
+    cursor: default;
+    opacity: .6;
+    -moz-opacity: .6;
+    filter: alpha(opacity=60);
+}
+
+.x-item-disabled * {
+    cursor: default !important;
+}
+
+.x-splitbar-proxy {
+    position: absolute;
+    visibility: hidden;
+    z-index: 20001;
+    zoom: 1;
+    line-height: 1px;
+    font-size: 1px;
+    overflow: hidden;
+}
+
+.x-splitbar-h, .x-splitbar-proxy-h {
+    cursor: e-resize;
+    cursor: col-resize;
+}
+
+.x-splitbar-v, .x-splitbar-proxy-v {
+    cursor: s-resize;
+    cursor: row-resize;
+}
+
+.x-color-palette {
+    width: 150px;
+    height: 92px;
+    cursor: pointer;
+}
+
+.x-color-palette a {
+    border: 1px solid;
+    float: left;
+    padding: 2px;
+    text-decoration: none;
+    -moz-outline: 0 none;
+    outline: 0 none;
+    cursor: pointer;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border: 1px solid;
+}
+
+.x-color-palette em {
+    display: block;
+    border: 1px solid;
+}
+
+.x-color-palette em span {
+    cursor: pointer;
+    display: block;
+    height: 10px;
+    line-height: 10px;
+    width: 10px;
+}
+
+.x-ie-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+    zoom:1;
+}
+
+.x-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+}
+
+.x-shadow * {
+    overflow: hidden;
+}
+
+.x-shadow * {
+    padding: 0;
+    border: 0;
+    margin: 0;
+    clear: none;
+    zoom: 1;
+}
+
+/* top  bottom */
+.x-shadow .xstc, .x-shadow .xsbc {
+    height: 6px;
+    float: left;
+}
+
+/* corners */
+.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
+    width: 6px;
+    height: 6px;
+    float: left;
+}
+
+/* sides */
+.x-shadow .xsc {
+    width: 100%;
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    width: 6px;
+    float: left;
+    height: 100%;
+}
+
+.x-shadow .xsmc {
+    float: left;
+    height: 100%;
+    background: transparent;
+}
+
+.x-shadow .xst, .x-shadow .xsb {
+    height: 6px;
+    overflow: hidden;
+    width: 100%;
+}
+
+.x-shadow .xsml {
+    background: transparent repeat-y 0 0;
+}
+
+.x-shadow .xsmr {
+    background: transparent repeat-y -6px 0;
+}
+
+.x-shadow .xstl {
+    background: transparent no-repeat 0 0;
+}
+
+.x-shadow .xstc {
+    background: transparent repeat-x 0 -30px;
+}
+
+.x-shadow .xstr {
+    background: transparent repeat-x 0 -18px;
+}
+
+.x-shadow .xsbl {
+    background: transparent no-repeat 0 -12px;
+}
+
+.x-shadow .xsbc {
+    background: transparent repeat-x 0 -36px;
+}
+
+.x-shadow .xsbr {
+    background: transparent repeat-x 0 -6px;
+}
+
+.loading-indicator {
+    background: no-repeat left;
+    padding-left: 20px;
+    line-height: 16px;
+    margin: 3px;
+}
+
+.x-text-resize {
+    position: absolute;
+    left: -1000px;
+    top: -1000px;
+    visibility: hidden;
+    zoom: 1;
+}
+
+.x-drag-overlay {
+    width: 100%;
+    height: 100%;
+    display: none;
+    position: absolute;
+    left: 0;
+    top: 0;
+    background-image:url(../images/default/s.gif);
+    z-index: 20000;
+}
+
+.x-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-spotlight {
+    z-index: 8999;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width:0;
+    height:0;
+    zoom: 1;
+}
+
+#x-history-frame {
+    position:absolute;
+    top:-1px;
+    left:0;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
+
+#x-history-field {
+    position:absolute;
+    top:0;
+    left:-1px;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
+.x-resizable-handle {
+    position:absolute;
+    z-index:100;
+    /* ie needs these */
+    font-size:1px;
+    line-height:6px;
+    overflow:hidden;
+	filter:alpha(opacity=0);
+	opacity:0;
+	zoom:1;
+}
+
+.x-resizable-handle-east{
+    width:6px;
+    cursor:e-resize;
+    right:0;
+    top:0;
+    height:100%;
+}
+
+.ext-ie .x-resizable-handle-east {
+    margin-right:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-south{
+    width:100%;
+    cursor:s-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+}
+
+.ext-ie .x-resizable-handle-south {
+    margin-bottom:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-west{
+    width:6px;
+    cursor:w-resize;
+    left:0;
+    top:0;
+    height:100%;
+}
+
+.x-resizable-handle-north{
+    width:100%;
+    cursor:n-resize;
+    left:0;
+    top:0;
+    height:6px;
+}
+
+.x-resizable-handle-southeast{
+    width:6px;
+    cursor:se-resize;
+    right:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northwest{
+    width:6px;
+    cursor:nw-resize;
+    left:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northeast{
+    width:6px;
+    cursor:ne-resize;
+    right:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-southwest{
+    width:6px;
+    cursor:sw-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{
+    filter:alpha(opacity=100);
+	opacity:1;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+	background-position: left;
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-position: top;
+}
+
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-position: top left;
+}
+
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-position:bottom right;
+}
+
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-position: bottom left;
+}
+
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-position: top right;
+}
+
+.x-resizable-proxy{
+    border: 1px dashed;
+    position:absolute;
+    overflow:hidden;
+    display:none;
+	left:0;
+    top:0;
+    z-index:50000;
+}
+
+.x-resizable-overlay{
+    width:100%;
+	height:100%;
+	display:none;
+	position:absolute;
+	left:0;
+	top:0;
+	z-index:200000;
+	-moz-opacity: 0;
+    opacity:0;
+    filter: alpha(opacity=0);
+}
+.x-tab-panel {
+    overflow:hidden;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border: 1px solid;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header {
+	border: 1px solid;
+	padding-bottom: 2px;
+}
+
+.x-tab-panel-footer {
+	border: 1px solid;
+	padding-top: 2px;
+}
+
+.x-tab-strip-wrap {
+	width:100%;
+    overflow:hidden;
+    position:relative;
+    zoom:1;
+}
+
+ul.x-tab-strip {
+	display:block;
+    width:5000px;
+    zoom:1;
+}
+
+ul.x-tab-strip-top{
+	padding-top: 1px;
+	background: repeat-x bottom;
+	border-bottom: 1px solid;
+}
+
+ul.x-tab-strip-bottom{
+	padding-bottom: 1px;
+	background: repeat-x top;
+	border-top: 1px solid;
+	border-bottom: 0 none;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-top {
+    background:transparent !important;
+    padding-top:0 !important;
+}
+
+.x-tab-panel-header-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border:1px solid;
+    height:2px;
+    font-size:1px;
+    line-height:1px;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer {
+    border-top: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-bottom: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-bottom {
+    background:transparent !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-footer-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-top:0 !important;
+}
+
+.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer,
+.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer {
+    height:3px;
+}
+
+ul.x-tab-strip li {
+    float:left;
+    margin-left:2px;
+}
+
+ul.x-tab-strip li.x-tab-edge {
+    float:left;
+    margin:0 !important;
+    padding:0 !important;
+    border:0 none !important;
+    font-size:1px !important;
+    line-height:1px !important;
+    overflow:hidden;
+    zoom:1;
+    background:transparent !important;
+    width:1px;
+}
+
+.x-tab-strip a, .x-tab-strip span, .x-tab-strip em {
+	display:block;
+}
+
+.x-tab-strip a {
+	text-decoration:none !important;
+	-moz-outline: none;
+	outline: none;
+	cursor:pointer;
+}
+
+.x-tab-strip-inner {
+    overflow:hidden;
+	text-overflow: ellipsis;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	white-space: nowrap;
+	cursor:pointer;
+    padding:4px 0;
+}
+
+.x-tab-strip-top .x-tab-with-icon .x-tab-right {
+    padding-left:6px;
+}
+
+.x-tab-strip .x-tab-with-icon span.x-tab-strip-text {
+	padding-left:20px;
+    background-position: 0 3px;
+    background-repeat: no-repeat;
+}
+
+.x-tab-strip-active, .x-tab-strip-active a.x-tab-right {
+    cursor:default;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	cursor:default;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	cursor:default;
+}
+
+.x-tab-panel-body {
+    overflow:hidden;
+}
+
+.x-tab-panel-bwrap {
+    overflow:hidden;
+}
+
+.ext-ie .x-tab-strip .x-tab-right {
+    position:relative;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+    margin-bottom:-1px;
+}
+
+/*
+ * Horrible hack for IE8 in quirks mode
+ */
+.ext-border-box .ext-ie8 .x-tab-strip .x-tab-right{
+    top: 1px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-bottom:5px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+    margin-top:-1px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-top:5px;
+}
+
+.x-tab-strip-top .x-tab-right {
+	background: transparent no-repeat 0 -51px;
+    padding-left:10px;
+}
+
+.x-tab-strip-top .x-tab-left {
+	background: transparent no-repeat right -351px;
+    padding-right:10px;
+}
+
+.x-tab-strip-top .x-tab-strip-inner {
+	background: transparent repeat-x 0 -201px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-right {
+	 background-position:0 -101px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-left {
+	 background-position:right -401px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner {
+	 background-position:0 -251px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+	background-position: 0 0;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-left {
+	background-position: right -301px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner {
+	background-position: 0 -151px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+    padding:0 10px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+    padding:0;
+}
+
+.x-tab-strip .x-tab-strip-close {
+    display:none;
+}
+
+.x-tab-strip-closable {
+    position:relative;
+}
+
+.x-tab-strip-closable .x-tab-left {
+    padding-right:19px;
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+    opacity:.6;
+    -moz-opacity:.6;
+    background-repeat:no-repeat;
+    display:block;
+	width:11px;
+    height:11px;
+    position:absolute;
+    top:3px;
+    right:3px;
+    cursor:pointer;
+    z-index:2;
+}
+
+.x-tab-strip .x-tab-strip-active a.x-tab-strip-close {
+    opacity:.8;
+    -moz-opacity:.8;
+}
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+    opacity:1;
+    -moz-opacity:1;
+}
+
+.x-tab-panel-body {
+    border: 1px solid;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background: transparent no-repeat -18px 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    left:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background: transparent no-repeat 0 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    right:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+
+.x-tab-scroller-right-over {
+    background-position: -18px 0;
+}
+
+.x-tab-scroller-right-disabled {
+    background-position: 0 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{
+    margin-top: 1px;
+}
+
+.x-tab-scrolling .x-tab-strip-wrap {
+    margin-left:18px;
+    margin-right:18px;
+}
+
+.x-tab-scrolling {
+    position:relative;    
+}
+
+.x-tab-panel-bbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-tab-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}/* all fields */
+.x-form-field{
+    margin: 0 0 0 0;
+}
+
+.ext-webkit *:focus{
+    outline: none !important;
+}
+
+/* ---- text fields ---- */
+.x-form-text, textarea.x-form-field{
+    padding:1px 3px;
+    background:repeat-x 0 0;
+    border:1px solid;
+}
+
+textarea.x-form-field {
+    padding:2px 3px;
+}
+
+.x-form-text, .ext-ie .x-form-file {
+    height:22px;
+    line-height:18px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-form-text, .ext-ie7 .x-form-text {
+    margin:-1px 0; /* ie bogus margin bug */
+    height:22px; /* ie quirks */
+    line-height:18px;
+}
+
+.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field {
+    margin:-1px 0; /* ie bogus margin bug */
+}
+
+.ext-strict .x-form-text {
+    height:18px;
+}
+
+.ext-safari.ext-mac textarea.x-form-field {
+    margin-bottom:-2px; /* another bogus margin bug, safari/mac only */
+}
+
+.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field {
+	margin-bottom: 1px;
+}
+
+.ext-gecko .x-form-text , .ext-ie8 .x-form-text {
+    padding-top:2px; /* FF won't center the text vertically */
+    padding-bottom:0;
+}
+
+textarea {
+    resize: none;  /* Disable browser resizable textarea */
+}
+
+/* select boxes */
+.x-form-select-one {
+    height:20px;
+    line-height:18px;
+    vertical-align:middle;
+    border: 1px solid;
+}
+
+/* multi select boxes */
+
+/* --- TODO --- */
+
+/* 2.0.2 style */
+.x-form-check-wrap {
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid;
+    margin-bottom: 5px;
+    padding-left: 3px !important;
+    float: none !important;
+}
+
+/* wrapped fields and triggers */
+.x-form-field-wrap .x-form-trigger{
+    width:17px;
+    height:21px;
+    border:0;
+    background:transparent no-repeat 0 0;
+    cursor:pointer;
+    border-bottom: 1px solid;
+    position:absolute;
+    top:0;
+}
+
+.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{
+    cursor:pointer;
+}
+
+.ext-safari .x-form-field-wrap .x-form-trigger{
+    right:0;
+}
+
+.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{
+    position:static;
+    top:auto;
+    vertical-align:top;
+}
+
+.x-form-field-wrap {
+    position:relative;
+    left:0;top:0;
+    zoom:1;
+    white-space: nowrap;
+}
+
+.x-form-field-wrap .x-form-trigger-over{
+    background-position:-17px 0;
+}
+
+.x-form-field-wrap .x-form-trigger-click{
+    background-position:-34px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    background-position:-51px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-over{
+    background-position:-68px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-click{
+    background-position:-85px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-trigger-noedit{
+    cursor:pointer;
+}
+
+/* field focus style */
+.x-form-focus, textarea.x-form-focus{
+	border: 1px solid;
+}
+
+/* invalid fields */
+.x-form-invalid, textarea.x-form-invalid{
+	background:repeat-x bottom;
+	border: 1px solid;
+}
+
+.ext-safari .x-form-invalid{
+	border: 1px solid;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+	background:repeat-x bottom;
+}
+
+/* editors */
+.x-editor {
+    visibility:hidden;
+    padding:0;
+    margin:0;
+}
+.x-form-check-wrap {
+    height: 22px;
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-grow-sizer {
+    left: -10000px;
+	padding: 8px 3px;
+    position: absolute;
+    visibility:hidden;
+    top: -10000px;
+	white-space: pre-wrap;
+    white-space: -moz-pre-wrap;
+    white-space: -pre-wrap;
+    white-space: -o-pre-wrap;
+    word-wrap: break-word;
+    zoom:1;
+}
+
+.x-form-grow-sizer p {
+    margin:0 !important;
+    border:0 none !important;
+    padding:0 !important;
+}
+
+/* Form Items CSS */
+
+.x-form-item {
+    display:block;
+    margin-bottom:4px;
+    zoom:1;
+}
+
+.x-form-item label {
+    display:block;
+    float:left;
+    width:100px;
+    padding:3px;
+    padding-left:0;
+    clear:left;
+    z-index:2;
+    position:relative;
+}
+
+.x-form-element {
+    padding-left:105px;
+    position:relative;
+}
+
+.x-form-invalid-msg {
+    padding:2px;
+    padding-left:18px;
+    background: transparent no-repeat 0 2px;
+    line-height:16px;
+    width:200px;
+}
+
+.x-form-label-left label {
+   text-align:left;
+}
+
+.x-form-label-right label {
+   text-align:right;
+}
+
+.x-form-label-top .x-form-item label {
+    width:auto;
+    float:none;
+    clear:none;
+    display:inline;
+    margin-bottom:4px;
+    position:static;
+}
+
+.x-form-label-top .x-form-element {
+    padding-left:0;
+    padding-top:4px;
+}
+
+.x-form-label-top .x-form-item {
+    padding-bottom:4px;
+}
+
+/* Editor small font for grid, toolbar and tree */
+.x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    margin-top:-1px !important; /* ie bogus margin bug */
+    margin-bottom:-1px !important;
+    height:20px !important; /* ie quirks */
+    line-height:16px !important;
+}
+
+.ext-strict .x-small-editor .x-form-text {
+    height:16px !important;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+}
+
+.ext-border-box .x-small-editor .x-form-text {
+    height:20px;
+}
+
+.x-small-editor .x-form-select-one {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.x-small-editor .x-form-num-field {
+    text-align:right;
+}
+
+.x-small-editor .x-form-field-wrap .x-form-trigger{
+    height:19px;
+}
+
+.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;}
+
+.x-form-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+.x-form-clear-left {
+    clear:left;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-form-cb-label {
+    width:auto !important;
+    float:none !important;
+    clear:none !important;
+    display:inline !important;
+    margin-left:4px;
+    top: -2px;
+}
+
+.ext-gecko2 .x-form-cb-label{
+    top: -1px;
+}
+
+.ext-ie8 .x-form-cb-label{
+    position: static;
+}
+
+.ext-strict .ext-ie8 .x-form-cb-label {
+    top: -3px;
+    position: relative;
+}
+
+.ext-opera .x-form-cb-label, .ext-safari3 .x-form-cb-label, .ext-ie7 .x-form-cb-label, .ext-ie6 .x-form-cb-label {
+    top: 0;
+}
+
+.x-form-column {
+    float:left;
+    padding:0;
+    margin:0;
+    width:48%;
+    overflow:hidden;
+    zoom:1;
+}
+
+/* buttons */
+.x-form .x-form-btns-ct .x-btn{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns td {
+	border:0;
+	padding:0;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-right table{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-left table{
+	float:left;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center table{
+	margin:0 auto; /*everyone else*/
+}
+
+.x-form .x-form-btns-ct table td.x-form-btn-td{
+	padding:3px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-form-invalid-icon {
+    width:16px;
+    height:18px;
+    visibility:hidden;
+    position:absolute;
+    left:0;
+    top:0;
+    display:block;
+    background:transparent no-repeat 0 2px;
+}
+
+/* fieldsets */
+.x-fieldset {
+    border:1px solid;
+    padding:10px;
+    margin-bottom:10px;
+    display:block; /* preserve margins in IE */
+}
+
+/* make top of checkbox/tools visible in webkit */
+.ext-webkit .x-fieldset-header {
+    padding-top: 1px;
+}        
+
+.ext-ie .x-fieldset legend {
+    margin-bottom:10px;
+}
+
+.ext-ie .x-fieldset {
+    padding-top: 0;
+    padding-bottom:10px;
+}
+
+.x-fieldset legend .x-tool-toggle {
+    margin-right:3px;
+    margin-left:0;
+    float:left !important;
+}
+
+.x-fieldset legend input {
+    margin-right:3px;
+    float:left !important;
+    height:13px;
+    width:13px;
+}
+
+fieldset.x-panel-collapsed {
+    padding-bottom:0 !important;
+    border-width: 1px 1px 0 1px !important;
+    border-left-color: transparent;
+    border-right-color: transparent;
+}      
+  
+.ext-ie6 fieldset.x-panel-collapsed{
+    padding-bottom:0 !important;
+    border-width: 1px 0 0 0 !important;
+    margin-left: 1px;
+    margin-right: 1px;
+}
+
+fieldset.x-panel-collapsed .x-fieldset-bwrap {
+    visibility:hidden;
+    position:absolute;
+    left:-1000px;
+    top:-1000px;
+}
+
+.ext-ie .x-fieldset-bwrap {
+    zoom:1;
+}
+
+.x-fieldset-noborder {
+    border:0px none transparent;
+}
+
+.x-fieldset-noborder legend {
+    margin-left:-3px;
+}
+
+/* IE legend positioing bug */
+.ext-ie .x-fieldset-noborder legend {
+    position: relative;
+    margin-bottom:23px;
+}
+.ext-ie .x-fieldset-noborder legend span {
+    position: absolute;
+    left:16px;
+}
+        
+.ext-gecko .x-window-body .x-form-item {
+    -moz-outline: none;
+    overflow: auto;
+}
+
+.ext-gecko .x-form-item {
+    -moz-outline: none;
+}
+
+.x-hide-label label.x-form-item-label {
+     display:none;
+}
+
+.x-hide-label .x-form-element {
+     padding-left: 0 !important;
+}
+
+.x-fieldset {
+    overflow:hidden;
+}
+
+.x-fieldset-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-fieldset-body {
+    overflow:hidden;
+}
+
+
+.x-btn{
+	cursor:pointer;
+	white-space: nowrap;
+}
+
+.x-btn button{
+    border:0 none;
+    background:transparent;
+    padding-left:3px;
+    padding-right:3px;
+    cursor:pointer;
+    margin:0;
+    overflow:visible;
+    width:auto;
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+* html .ext-ie .x-btn button {
+    width:1px;
+}
+
+.ext-gecko .x-btn button {
+    padding-left:0;
+    padding-right:0;
+}
+
+.ext-gecko .x-btn button::-moz-focus-inner {
+    padding:0;
+}
+
+.ext-ie .x-btn button {
+    padding-top:2px;
+}
+
+.x-btn td {
+    padding:0 !important;
+}
+
+.x-btn-text {
+    cursor:pointer;
+	white-space: nowrap;
+    padding:0;
+}
+
+/* icon placement and sizing styles */
+
+/* Only text */
+.x-btn-noicon .x-btn-small .x-btn-text{
+	height: 16px;
+}
+
+.x-btn-noicon .x-btn-medium .x-btn-text{
+    height: 24px;
+}
+
+.x-btn-noicon .x-btn-large .x-btn-text{
+    height: 32px;
+}
+
+/* Only icons */
+.x-btn-icon .x-btn-text{
+    background-position: center;
+	background-repeat: no-repeat;
+}
+
+.x-btn-icon .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 16px;
+}
+
+.x-btn-icon .x-btn-medium .x-btn-text{
+    height: 24px;
+	width: 24px;
+}
+
+.x-btn-icon .x-btn-large .x-btn-text{
+    height: 32px;
+	width: 32px;
+}
+
+/* Icons and text */
+/* left */
+.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:34px;
+    height:32px;
+}
+
+/* top */
+.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:34px;
+}
+
+/* right */
+.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:34px;
+    height:32px;
+}
+
+/* bottom */
+.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:34px;
+}
+
+/* background positioning */
+.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{
+	font-size:1px;
+    line-height:1px;
+    width:3px;
+    display:block;
+    overflow:hidden;
+}
+
+.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{
+	height:3px;
+}
+
+.x-btn-tl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 0;
+}
+.x-btn-tr{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px 0;
+}
+.x-btn-tc{
+	height:3px;
+	background:repeat-x 0 -6px;
+}
+
+.x-btn-ml{
+	width:3px;
+	background:no-repeat 0 -24px;
+}
+.x-btn-mr{
+	width:3px;
+	background:no-repeat -3px -24px;
+}
+
+.x-btn-mc{
+	background:repeat-x 0 -1096px;
+    vertical-align: middle;
+	text-align:center;
+	padding:0 5px;
+	cursor:pointer;
+	white-space:nowrap;
+}
+
+.x-btn-bl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 -3px;
+}
+
+.x-btn-br{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px -3px;
+}
+
+.x-btn-bc{
+	height:3px;
+	background:repeat-x 0 -15px;
+}
+
+.x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-btn-disabled *{
+	cursor:default !important;
+}
+
+
+/* With a menu arrow */
+/* right */
+.x-btn-mc em.x-btn-arrow {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:10px;
+}
+
+.x-btn-mc em.x-btn-split {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:14px;
+}
+
+/* bottom */
+.x-btn-mc em.x-btn-arrow-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+/* height adjustment class */
+.x-btn-as-arrow .x-btn-mc em {
+    display:block;
+    background:transparent;
+	padding-bottom:14px;
+}
+
+/* groups */
+.x-btn-group {
+    padding:1px;
+}
+
+.x-btn-group-header {
+    padding:2px;
+    text-align:center;
+}
+
+.x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+.x-btn-group-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:3px;
+}
+
+.x-btn-group-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-btn-group-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-br {
+	background: transparent no-repeat right bottom;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-mc {
+    border:0 none;
+    padding:1px 0 0 0;
+    margin:0;
+}
+
+.x-btn-group-mc .x-btn-group-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-btn-group-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-mr {
+	background: transparent repeat-y right 0;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-btn-group-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-btn-group-bc {
+	height:3px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-btn-group-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    height:2px;
+}.x-toolbar{
+    border-style:solid;
+    border-width:0 0 1px 0;
+    display: block;
+	padding:2px;
+    background:repeat-x top left;
+    position:relative;
+    left:0;
+    top:0;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-toolbar .x-item-disabled .x-btn-icon {
+    opacity: .35;
+    -moz-opacity: .35;
+    filter: alpha(opacity=35);
+}
+
+.x-toolbar td {
+	vertical-align:middle;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+	white-space: nowrap;
+}
+
+.x-toolbar .x-item-disabled {
+	cursor:default;
+	opacity:.6;
+	-moz-opacity:.6;
+	filter:alpha(opacity=60);
+}
+
+.x-toolbar .x-item-disabled * {
+	cursor:default;
+}
+
+.x-toolbar .x-toolbar-cell {
+    vertical-align:middle;
+}
+
+.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, 
+.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc
+{
+	background-position: 500px 500px;
+}
+
+/* These rules are duplicated from button.css to give priority of x-toolbar rules above */
+.x-toolbar .x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-toolbar .x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-toolbar div.xtb-text{
+    padding:2px 2px 0;
+    line-height:16px;
+    display:block;
+}
+
+.x-toolbar .xtb-sep {
+	background-position: center;
+	background-repeat: no-repeat;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	width:4px;
+	overflow: hidden;
+	cursor:default;
+	margin: 0 2px 0;
+	border:0;
+}
+
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+
+/* Paging Toolbar */
+.x-tbar-page-number{
+	width:30px;
+	height:14px;
+}
+
+.ext-ie .x-tbar-page-number{
+    margin-top: 2px;
+}
+
+.x-paging-info {
+    position:absolute;
+    top:5px;
+    right: 8px;
+}
+
+/* floating */
+.x-toolbar-ct {
+    width:100%;
+}
+
+.x-toolbar-right td {
+    text-align: center;
+}
+
+.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-toolbar-more .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 12px;
+}
+
+.x-toolbar-more em.x-btn-arrow {
+    display:inline;
+    background:transparent;
+	padding-right:0;
+}
+
+.x-toolbar-more .x-btn-mc em.x-btn-arrow {
+    background-image: none;
+}
+
+div.x-toolbar-no-items {
+    color:gray !important;
+    padding:5px 10px !important;
+}
+
+/* fix ie toolbar form items */
+.ext-border-box .x-toolbar-cell .x-form-text {
+    margin-bottom:-1px !important;
+}
+
+.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text {
+    margin:0 !important;
+}
+
+.ext-ie .x-toolbar-cell .x-form-field-wrap {
+    height:21px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text {
+    top: 0px;
+}
+
+.x-toolbar-right td .x-form-field-trigger-wrap{
+    text-align: left;
+}
+
+.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{
+    vertical-align: top;
+    margin-top: 5px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{
+    margin-top: 4px;
+}
+
+.x-toolbar-cell .x-form-check-wrap label{
+    vertical-align: bottom;
+}
+
+/* StatusBar */
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+
+.x-statusbar .x-status-busy {
+    padding-left: 25px;
+    background: transparent no-repeat 3px 3px;
+}
+
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid;
+    border-right: 1px solid;
+    border-bottom: 1px solid;
+    border-left: 1px solid;
+    padding: 2px 8px 2px 5px;
+}.x-toolbar{
+    border-style:solid;
+    border-width:0 0 1px 0;
+    display: block;
+	padding:2px;
+    background:repeat-x top left;
+    position:relative;
+    left:0;
+    top:0;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-toolbar .x-item-disabled .x-btn-icon {
+    opacity: .35;
+    -moz-opacity: .35;
+    filter: alpha(opacity=35);
+}
+
+.x-toolbar td {
+	vertical-align:middle;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+	white-space: nowrap;
+}
+
+.x-toolbar .x-item-disabled {
+	cursor:default;
+	opacity:.6;
+	-moz-opacity:.6;
+	filter:alpha(opacity=60);
+}
+
+.x-toolbar .x-item-disabled * {
+	cursor:default;
+}
+
+.x-toolbar .x-toolbar-cell {
+    vertical-align:middle;
+}
+
+.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, 
+.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc
+{
+	background-position: 500px 500px;
+}
+
+/* These rules are duplicated from button.css to give priority of x-toolbar rules above */
+.x-toolbar .x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-toolbar .x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-toolbar div.xtb-text{
+    padding:2px 2px 0;
+    line-height:16px;
+    display:block;
+}
+
+.x-toolbar .xtb-sep {
+	background-position: center;
+	background-repeat: no-repeat;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	width:4px;
+	overflow: hidden;
+	cursor:default;
+	margin: 0 2px 0;
+	border:0;
+}
+
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+
+/* Paging Toolbar */
+.x-tbar-page-number{
+	width:30px;
+	height:14px;
+}
+
+.ext-ie .x-tbar-page-number{
+    margin-top: 2px;
+}
+
+.x-paging-info {
+    position:absolute;
+    top:5px;
+    right: 8px;
+}
+
+/* floating */
+.x-toolbar-ct {
+    width:100%;
+}
+
+.x-toolbar-right td {
+    text-align: center;
+}
+
+.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-toolbar-more .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 12px;
+}
+
+.x-toolbar-more em.x-btn-arrow {
+    display:inline;
+    background:transparent;
+	padding-right:0;
+}
+
+.x-toolbar-more .x-btn-mc em.x-btn-arrow {
+    background-image: none;
+}
+
+div.x-toolbar-no-items {
+    color:gray !important;
+    padding:5px 10px !important;
+}
+
+/* fix ie toolbar form items */
+.ext-border-box .x-toolbar-cell .x-form-text {
+    margin-bottom:-1px !important;
+}
+
+.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text {
+    margin:0 !important;
+}
+
+.ext-ie .x-toolbar-cell .x-form-field-wrap {
+    height:21px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text {
+    top: 0px;
+}
+
+.x-toolbar-right td .x-form-field-trigger-wrap{
+    text-align: left;
+}
+
+.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{
+    vertical-align: top;
+    margin-top: 5px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{
+    margin-top: 4px;
+}
+
+.x-toolbar-cell .x-form-check-wrap label{
+    vertical-align: bottom;
+}
+
+/* StatusBar */
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+
+.x-statusbar .x-status-busy {
+    padding-left: 25px;
+    background: transparent no-repeat 3px 3px;
+}
+
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid;
+    border-right: 1px solid;
+    border-bottom: 1px solid;
+    border-left: 1px solid;
+    padding: 2px 8px 2px 5px;
+}/* Grid3 styles */
+.x-grid3 {
+	position:relative;
+	overflow:hidden;
+}
+
+.x-grid-panel .x-panel-body {
+    overflow:hidden !important;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border:1px solid;
+}
+
+.x-grid3 table {
+    table-layout:fixed;
+}
+
+.x-grid3-viewport{
+	overflow:hidden;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+    -moz-outline: none;
+	-moz-user-focus: normal;
+}
+
+.x-grid3-row td, .x-grid3-summary-row td {
+    line-height:13px;
+    vertical-align: top;
+	padding-left:1px;
+    padding-right:1px;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-cell{
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-row td {
+    line-height:15px;
+    vertical-align:middle;
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+.x-grid3-hd-row .x-grid3-marker-hd {
+    padding:3px;
+}
+
+.x-grid3-row .x-grid3-marker {
+    padding:3px;
+}
+
+.x-grid3-cell-inner, .x-grid3-hd-inner{
+	overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+}
+
+.x-grid3-hd-inner {
+    position:relative;
+	cursor:inherit;
+	padding:4px 3px 4px 5px;
+}
+
+.x-grid3-row-body {
+    white-space:normal;
+}
+
+.x-grid3-body-cell {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+/* IE Quirks to clip */
+.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{
+	width:100%;
+}
+
+/* reverse above in strict mode */
+.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{
+	width:auto;
+}
+
+.x-grid-row-loading {
+    background: no-repeat center center;
+}
+
+.x-grid-page {
+    overflow:hidden;
+}
+
+.x-grid3-row {
+	cursor: default;
+    border: 1px solid;
+    width:100%;
+}
+
+.x-grid3-row-over {
+	border:1px solid;
+    background: repeat-x left top;
+}
+
+.x-grid3-resize-proxy {
+	width:1px;
+    left:0;
+	cursor: e-resize;
+	cursor: col-resize;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-resize-marker {
+	width:1px;
+	left:0;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: text;
+    -khtml-user-select: text;
+    -webkit-user-select:ignore;
+}
+
+/* header styles */
+.x-grid3-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    padding:1px 0 0 0;
+}
+
+.x-grid3-header-pop {
+    border-left:1px solid;
+    float:right;
+    clear:none;
+}
+
+.x-grid3-header-pop-inner {
+    border-left:1px solid;
+    width:14px;
+    height:19px;
+    background: transparent no-repeat center center;
+}
+
+.ext-ie .x-grid3-header-pop-inner {
+    width:15px;
+}
+
+.ext-strict .x-grid3-header-pop-inner {
+    width:14px; 
+}
+
+.x-grid3-header-inner {
+    overflow:hidden;
+    zoom:1;
+    float:left;
+}
+
+.x-grid3-header-offset {
+    padding-left:1px;
+    text-align: left;
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background: repeat-x left bottom;
+
+}
+
+.x-grid3-sort-icon{
+	background-repeat: no-repeat;
+	display: none;
+	height: 4px;
+	width: 13px;
+	margin-left:3px;
+	vertical-align: middle;
+}
+
+.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon {
+	display: inline;
+}
+
+/* Header position fixes for IE strict mode */
+.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd {
+    position:relative;
+}
+
+.ext-strict .ext-ie6 .x-grid3-hd-inner{
+    position:static;
+}
+
+/* Body Styles */
+.x-grid3-body {
+	zoom:1;
+}
+
+.x-grid3-scroller {
+	overflow:auto;
+    zoom:1;
+    position:relative;
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	display: block;
+	padding: 3px 5px 3px 5px;
+	-moz-user-select: none;
+	-khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-split {
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor: e-resize;
+	cursor: col-resize;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	overflow: hidden;
+	position: absolute;
+	top: 2px;
+	width: 6px;
+	z-index: 3;
+}
+
+/* Column Reorder DD */
+.x-dd-drag-proxy .x-grid3-hd-inner{
+	background: repeat-x left bottom;
+	width:120px;
+	padding:3px;
+	border:1px solid;
+	overflow:hidden;
+}
+
+.col-move-top, .col-move-bottom{
+	width:9px;
+	height:9px;
+	position:absolute;
+	top:0;
+	line-height:1px;
+	font-size:1px;
+	overflow:hidden;
+	visibility:hidden;
+	z-index:20000;
+    background:transparent no-repeat left top;
+}
+
+/* Selection Styles */
+.x-grid3-row-selected {
+	border:1px dotted;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background: repeat-x 0 bottom !important;
+    vertical-align:middle !important;
+    padding:0;
+    border-top:1px solid;
+    border-bottom:none !important;
+    border-right:1px solid !important;
+    text-align:center;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    padding:0 4px;
+    text-align:center;
+}
+
+/* dirty cells */
+.x-grid3-dirty-cell {
+    background: transparent no-repeat 0 0;
+}
+
+/* Grid Toolbars */
+.x-grid3-topbar, .x-grid3-bottombar{
+    overflow:hidden;
+	display:none;
+	zoom:1;
+    position:relative;
+}
+
+.x-grid3-topbar .x-toolbar{
+	border-right:0 none;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-right:0 none;
+	border-bottom:0 none;
+	border-top:1px solid;
+}
+
+/* Props Grid Styles */
+.x-props-grid .x-grid3-cell{
+	padding:1px;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background:transparent repeat-y -16px !important;
+    padding-left:12px;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    padding:1px;
+    padding-right:0;
+    border:0 none;
+    border-right:1px solid;
+}
+
+/* dd */
+.x-grid3-col-dd {
+    border:0 none;
+    padding:0;
+    background:transparent;
+}
+
+.x-dd-drag-ghost .x-grid3-dd-wrap {
+    padding:1px 3px 3px 1px;
+}
+
+.x-grid3-hd {
+    -moz-user-select:none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-btn {
+    display:none;
+    position:absolute;
+    width:14px;
+    background:no-repeat left center;
+    right:0;
+    top:0;
+    z-index:2;
+	cursor:pointer;
+}
+
+.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn {
+    display:block;
+}
+
+a.x-grid3-hd-btn:hover {
+    background-position:-14px center;
+}
+
+/* Expanders */
+.x-grid3-body .x-grid3-td-expander {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-expander {
+    width:100%;
+    height:18px;
+    background-position:4px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-expander {
+    background-position:4px 2px;
+}
+
+.x-grid3-row-expanded .x-grid3-row-expander {
+    background-position:-21px 2px;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-body {
+    display:none !important;
+}
+
+.x-grid3-row-expanded .x-grid3-row-body {
+    display:block !important;
+}
+
+/* Checkers */
+.x-grid3-body .x-grid3-td-checker {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    width:100%;
+    height:18px;
+    background-position:2px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row .x-grid3-row-checker {
+    background-position:2px 2px;
+}
+
+.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker {
+    background-position:-23px 2px;
+}
+
+.x-grid3-hd-checker {
+    background-position:2px 3px;
+}
+
+.x-grid3-hd-checker-on .x-grid3-hd-checker {
+    background-position:-23px 3px;
+}
+
+/* Numberer */
+.x-grid3-body .x-grid3-td-numberer {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+    padding:3px 5px 0 0 !important;
+    text-align:right;
+}
+
+/* Row Icon */
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background:transparent repeat-y right;
+    vertical-align:top;
+    text-align:center;
+}
+
+.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner {
+    padding:0 !important;
+    background-position:center center;
+    background-repeat:no-repeat;
+    width:16px;
+    height:16px;
+    margin-left:2px;
+    margin-top:3px;
+}
+
+/* All specials */
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner {
+    padding: 1px 0 0 0 !important;
+}
+
+.x-grid3-check-col {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-check-col-on {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+/* Grouping classes */
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom: 2px solid;
+    cursor:pointer;
+    padding-top:6px;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background:transparent no-repeat 3px 3px;
+    padding:4px 4px 4px 17px;
+}
+
+.x-grid-group-collapsed .x-grid-group-body {
+    display:none;
+}
+
+.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-ie .x-props-grid .x-editor .x-form-text {
+    position:static;
+    top:0;
+}
+
+.x-grid-empty {
+    padding:10px;
+}
+
+/* fix floating toolbar issue */
+.ext-ie7 .x-grid-panel .x-panel-bbar {
+    position:relative;
+}
+
+.ext-ie6 .x-grid3-header {
+    position: relative;
+}
+
+/* column lines */
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    padding-right:0;
+    border-right:1px solid;
+}
+.x-dd-drag-proxy{
+	position:absolute;
+	left:0;
+    top:0;
+	visibility:hidden;
+	z-index:15000;
+}
+
+.x-dd-drag-ghost{
+	-moz-opacity: 0.85;
+    opacity:.85;
+    filter: alpha(opacity=85);
+    border: 1px solid;
+	padding:3px;
+	padding-left:20px;
+	white-space:nowrap;
+}
+
+.x-dd-drag-repair .x-dd-drag-ghost{
+	-moz-opacity: 0.4;
+    opacity:.4;
+    filter: alpha(opacity=40);
+	border:0 none;
+	padding:0;
+	background-color:transparent;
+}
+
+.x-dd-drag-repair .x-dd-drop-icon{
+	visibility:hidden;
+}
+
+.x-dd-drop-icon{
+    position:absolute;
+	top:3px;
+	left:3px;
+	display:block;
+	width:16px;
+	height:16px;
+	background-color:transparent;
+	background-position: center;
+	background-repeat: no-repeat;
+	z-index:1;
+}
+
+.x-view-selector {
+    position:absolute;
+    left:0;
+    top:0;
+    width:0;
+    border:1px dotted;
+	opacity: .5;
+    -moz-opacity: .5;
+    filter:alpha(opacity=50);
+    zoom:1;
+}.ext-strict .ext-ie .x-tree .x-panel-bwrap{
+    position:relative;
+    overflow:hidden;
+}
+
+.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+    background-repeat: no-repeat;
+}
+
+.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	background-position:center;
+    background-repeat: no-repeat;
+}
+
+.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon {
+    vertical-align:middle !important;
+}
+
+/* checkboxes */
+.ext-ie input.x-tree-node-cb {
+    width:15px;
+    height:15px;
+}
+
+input.x-tree-node-cb {
+    margin-left:1px;
+}
+
+.ext-ie input.x-tree-node-cb {
+    margin-left:0;
+}
+
+.x-tree-noicon .x-tree-node-icon{
+	width:0; height:0;
+}
+
+/* loading icon */
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+/* No line styles */
+.x-tree-no-lines .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-line{
+	background:transparent;
+}
+
+/* Arrows */
+.x-tree-arrows .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-line{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	cursor:pointer;
+}
+
+.ext-ie ul.x-tree-node-ct{
+    font-size:0;
+    line-height:0;
+    zoom:1;
+}
+
+.x-tree-node{
+	white-space: nowrap;
+}
+
+.x-tree-node-el {
+    line-height:18px;
+    cursor:pointer;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	text-decoration:none;
+	-khtml-user-select:none;
+	-moz-user-select:none;
+    -webkit-user-select:ignore;
+    -kthml-user-focus:normal;
+    -moz-user-focus:normal;
+    -moz-outline: 0 none;
+    outline:0 none;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	text-decoration:none;
+	padding:1px 3px 1px 2px;
+}
+
+.x-tree-node .x-tree-node-disabled .x-tree-node-icon{
+	-moz-opacity: 0.5;
+   opacity:.5;
+   filter: alpha(opacity=50);
+}
+
+.x-tree-node .x-tree-node-inline-icon{
+	background:transparent;
+}
+
+.x-tree-node a:hover, .x-dd-drag-ghost a:hover{
+	text-decoration:none;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:1px dotted;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top:1px dotted;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{
+	 border-top:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom:2px solid;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top:2px solid;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 border:1px dotted;
+}
+
+.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{
+	display:none !important;
+}
+
+/* Fix for ie rootVisible:false issue */
+.x-tree-root-ct {
+    zoom:1;
+}
+.x-date-picker {
+    border: 1px solid;
+    border-top:0 none;
+	position:relative;
+}
+
+.x-date-picker a {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+.x-date-inner, .x-date-inner td, .x-date-inner th{
+    border-collapse:separate;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background: repeat-x 0 -83px;
+	overflow:hidden;
+}
+
+.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr,
+.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr,
+.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{
+	background:transparent !important;
+    vertical-align:middle;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background:transparent no-repeat right 0;
+}
+
+.x-date-right, .x-date-left {
+    width:18px;
+}
+
+.x-date-right{
+    text-align:right;
+}
+
+.x-date-middle {
+    padding-top:2px;
+    padding-bottom:2px;
+    width:130px; /* FF3 */
+}
+
+.x-date-right a, .x-date-left a{
+    display:block;
+    width:16px;
+	height:16px;
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor:pointer;
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a:hover, .x-date-left a:hover{
+    -moz-opacity: 1;
+    opacity:1;
+    filter: alpha(opacity=100);
+}
+
+.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a {
+    margin-right:2px;
+    text-decoration:none !important;
+}
+
+.x-date-left a{
+    margin-left:2px;
+    text-decoration:none !important;
+}
+
+table.x-date-inner {
+    width:100%;
+    table-layout:fixed;
+}
+
+.x-date-inner th {
+    width:25px;
+}
+
+.x-date-inner th {
+    background: repeat-x left top;
+    text-align:right !important;
+	border-bottom: 1px solid;
+	cursor:default;
+    padding:0;
+    border-collapse:separate;
+}
+
+.x-date-inner th span {
+    display:block;
+    padding:2px;
+    padding-right:7px;
+}
+
+.x-date-inner td {
+    border: 1px solid;
+	text-align:right;
+    padding:0;
+}
+
+.x-date-inner a {
+    padding:2px 5px;
+    display:block;
+	text-decoration:none;
+    text-align:right;
+    zoom:1;
+}
+
+.x-date-inner .x-date-active{
+	cursor:pointer;
+	color:black;
+}
+
+.x-date-inner .x-date-selected a{
+	background: repeat-x left top;
+	border:1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-today a{
+	border: 1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+    text-decoration:none !important;
+}
+
+.x-date-bottom {
+    padding:4px;
+    border-top: 1px solid;
+    background: repeat-x left top;
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    text-decoration:none !important;
+}
+
+.x-item-disabled .x-date-inner a:hover{
+    background: none;
+}
+
+.x-date-inner .x-date-disabled a {
+	cursor:default;
+}
+
+.x-date-menu .x-menu-item {
+	padding:1px 24px 1px 4px;
+	white-space: nowrap;
+}
+
+.x-date-menu .x-menu-item .x-menu-item-icon {
+    width:10px;
+    height:10px;
+    margin-right:5px;
+    background-position:center -4px !important;
+}
+
+.x-date-mp {
+	position:absolute;
+	left:0;
+	top:0;
+	display:none;
+}
+
+.x-date-mp td {
+    padding:2px;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn {
+    border: 0 none;
+	text-align:center;
+	vertical-align: middle;
+	width:25%;
+}
+
+.x-date-mp-ok {
+	margin-right:3px;
+}
+
+.x-date-mp-btns button {
+	text-decoration:none;
+	text-align:center;
+	text-decoration:none !important;
+	border:1px solid;
+	padding:1px 3px 1px;
+	cursor:pointer;
+}
+
+.x-date-mp-btns {
+	background: repeat-x left top;
+}
+
+.x-date-mp-btns td {
+	border-top: 1px solid;
+    text-align:center;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	display:block;
+	padding:2px 4px;
+	text-decoration:none;
+	text-align:center;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	text-decoration:none;
+	cursor:pointer;
+}
+
+td.x-date-mp-sel a {
+	padding:1px 3px;
+	background: repeat-x left top;
+	border:1px solid;
+}
+
+.x-date-mp-ybtn a {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    cursor:pointer;
+    background:transparent no-repeat;
+    display:block;
+    margin:0 auto;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next {
+    background-position:0 -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next:hover {
+    background-position:-15px -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev {
+    background-position:0 -105px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev:hover {
+    background-position:-15px -105px;
+}
+
+.x-date-mp-ybtn {
+   text-align:center;
+}
+
+td.x-date-mp-sep {
+   border-right:1px solid;
+}.x-tip{
+	position: absolute;
+	top: 0;
+    left:0;
+    visibility: hidden;
+	z-index: 20000;
+    border:0 none;
+}
+
+.x-tip .x-tip-close{
+	height: 15px;
+	float:right;
+	width: 15px;
+    margin:0 0 2px 2px;
+    cursor:pointer;
+    display:none;
+}
+
+.x-tip .x-tip-tc {
+	background: transparent no-repeat 0 -62px;
+	padding-top:3px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-bc {
+	background: transparent no-repeat 0 -121px;
+	height:3px;
+    overflow:hidden;
+}
+
+.x-tip .x-tip-bl {
+	background: transparent no-repeat 0 -59px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-br {
+	background: transparent no-repeat right -59px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mc {
+    border:0 none;
+}
+
+.x-tip .x-tip-ml {
+	background: no-repeat 0 -124px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mr {
+	background: transparent no-repeat right -124px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc {
+    font-size:0;
+    line-height:0;
+}
+
+.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{
+    line-height: 1px;
+}
+
+.x-tip .x-tip-header-text {
+    padding:0;
+    margin:0 0 2px 0;
+}
+
+.x-tip .x-tip-body {
+    margin:0 !important;
+    line-height:14px;
+    padding:0;
+}
+
+.x-tip .x-tip-body .loading-indicator {
+    margin:0;
+}
+
+.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text {
+    cursor:move;
+}
+
+.x-form-invalid-tip .x-tip-tc {
+	background: repeat-x 0 -12px;
+    padding-top:6px;
+}
+
+.x-form-invalid-tip .x-tip-bc {
+	background: repeat-x 0 -18px;
+    height:6px;
+}
+
+.x-form-invalid-tip .x-tip-bl {
+	background: no-repeat 0 -6px;
+}
+
+.x-form-invalid-tip .x-tip-br {
+	background: no-repeat right -6px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding:2px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding-left:24px;
+    background:transparent no-repeat 2px 2px;
+}
+
+.x-tip-anchor {
+    position: absolute;
+    width: 9px;
+    height: 10px;
+    overflow:hidden;
+    background: transparent no-repeat 0 0;
+    zoom:1;
+}
+.x-tip-anchor-bottom {
+    background-position: -9px 0;
+}
+.x-tip-anchor-right {
+    background-position: -18px 0;
+    width: 10px;
+}
+.x-tip-anchor-left {
+    background-position: -28px 0;
+    width: 10px;
+}.x-menu {
+	z-index: 15000;
+	zoom: 1;
+	background: repeat-y;
+}
+
+.x-menu-floating{
+    border: 1px solid;
+}
+
+.x-menu a {
+    text-decoration: none !important;
+}
+
+.ext-ie .x-menu {
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-menu-list{
+    padding: 2px;
+	background:transparent;
+	border:0 none;
+    overflow:hidden;
+    overflow-y: hidden;
+}
+
+.ext-strict .ext-ie .x-menu-list{
+    position: relative;
+}
+
+.x-menu li{
+	line-height:100%;
+}
+
+.x-menu li.x-menu-sep-li{
+	font-size:1px;
+	line-height:1px;
+}
+
+.x-menu-list-item{
+    white-space: nowrap;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	padding:1px;
+}
+
+.x-menu-item-arrow{
+	background:transparent no-repeat right;
+}
+
+.x-menu-sep {
+	display:block;
+	font-size:1px;
+	line-height:1px;
+	margin: 2px 3px;
+	border-bottom:1px solid;
+    overflow:hidden;
+}
+
+.x-menu-focus {
+	position:absolute;
+	left:-1px;
+	top:-1px;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+    overflow:hidden;
+    display:block;
+}
+
+a.x-menu-item {
+    cursor: pointer;
+    display: block;
+    line-height: 16px;
+    outline-color: -moz-use-text-color;
+    outline-style: none;
+    outline-width: 0;
+    padding: 3px 21px 3px 27px;
+    position: relative;
+    text-decoration: none;
+    white-space: nowrap;
+}
+
+.x-menu-item-active {
+    background-repeat: repeat-x;
+    background-position: left bottom;
+    border-style:solid;
+    border-width: 1px 0;
+    margin:0 1px;
+	padding: 0;
+}
+
+.x-menu-item-active a.x-menu-item {
+    border-style:solid;
+    border-width:0 1px;
+    margin:0 -1px;
+}
+
+.x-menu-item-icon {
+	border: 0 none;
+	height: 16px;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	position: absolute;
+    left: 3px;
+    top: 3px;
+    margin: 0;
+    background-position:center;
+}
+
+.ext-ie .x-menu-item-icon {
+    left: -24px;
+}
+.ext-strict .x-menu-item-icon {
+    left: 3px;
+}
+
+.ext-ie6 .x-menu-item-icon {
+    left: -24px;
+}
+
+.ext-ie .x-menu-item-icon {
+    vertical-align: middle;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background: transparent no-repeat center;
+}
+
+.x-menu-group-item .x-menu-item-icon{
+	background: transparent;
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background: transparent no-repeat center;
+}
+
+.x-date-menu .x-menu-list{
+    padding: 0;
+}
+
+.x-menu-date-item{
+	padding:0;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+    margin-left: 26px;
+	margin-right:4px;
+}
+
+.x-menu .x-date-picker{
+    border:1px solid;
+    margin-top:2px;
+    margin-bottom:2px;
+}
+
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+	 margin: 0;
+	 border: 0 none;
+}
+
+.x-date-menu {
+   padding:0 !important;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border:1px dotted !important;
+	padding:0;
+}
+
+.x-menu .x-menu-scroller {
+    width: 100%;
+	background-repeat:no-repeat;
+	background-position:center;
+	height:8px;
+    line-height: 8px;
+	cursor:pointer;
+    margin: 0;
+    padding: 0;
+}
+
+.x-menu .x-menu-scroller-active{
+    height: 6px;
+    line-height: 6px;
+}
+
+.x-menu-list-item-indent{
+    padding-left: 27px;
+}
+/*
+ Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
+  <div class="x-box-blue">
+        <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
+        <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
+            <h3>YOUR TITLE HERE (optional)</h3>
+            <div>YOUR CONTENT HERE</div>
+        </div></div></div>
+        <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
+    </div>
+ */
+
+.x-box-tl {
+	background: transparent no-repeat 0 0;
+    zoom:1;
+}
+
+.x-box-tc {
+	height: 8px;
+	background: transparent repeat-x 0 0;
+	overflow: hidden;
+}
+
+.x-box-tr {
+	background: transparent no-repeat right -8px;
+}
+
+.x-box-ml {
+	background: transparent repeat-y 0;
+	padding-left: 4px;
+	overflow: hidden;
+    zoom:1;
+}
+
+.x-box-mc {
+	background: repeat-x 0 -16px;
+	padding: 4px 10px;
+}
+
+.x-box-mc h3 {
+	margin: 0 0 4px 0;
+    zoom:1;
+}
+
+.x-box-mr {
+	background: transparent repeat-y right;
+	padding-right: 4px;
+	overflow: hidden;
+}
+
+.x-box-bl {
+	background: transparent no-repeat 0 -16px;
+    zoom:1;
+}
+
+.x-box-bc {
+	background: transparent repeat-x 0 -8px;
+	height: 8px;
+	overflow: hidden;
+}
+
+.x-box-br {
+	background: transparent no-repeat right -24px;
+}
+
+.x-box-tl, .x-box-bl {
+	padding-left: 8px;
+	overflow: hidden;
+}
+
+.x-box-tr, .x-box-br {
+	padding-right: 8px;
+	overflow: hidden;
+}#x-debug-browser .x-tree .x-tree-node a span {
+    padding-top:2px;
+    line-height:18px;
+}
+
+#x-debug-browser  .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+#x-debug-browser  .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -60px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -60px;
+}.x-combo-list {
+    border:1px solid;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-combo-list-inner {
+    overflow:auto;
+    position:relative; /* for calculating scroll offsets */
+    zoom:1;
+    overflow-x:hidden;
+}
+
+.x-combo-list-hd {
+    border-bottom:1px solid;
+    padding:3px;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom:1px solid;
+}
+
+.x-combo-list-item {
+    padding:2px;
+    border:1px solid;
+    white-space: nowrap;
+    overflow:hidden;
+    text-overflow: ellipsis;
+}
+
+.x-combo-list .x-combo-selected{
+	border:1px dotted !important;
+    cursor:pointer;
+}
+
+.x-combo-list .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}.x-panel {
+    border-style: solid;
+    border-width:0;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+    padding:5px 3px 4px 5px;
+    border:1px solid;
+    line-height: 15px;
+    background: transparent repeat-x 0 -1px;
+}
+
+.x-panel-body {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    position: relative; /* added for item scroll positioning */
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom: 0 none;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top:1px solid;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-tl .x-panel-header {
+    padding:5px 0 4px 0;
+    border:0 none;
+    background:transparent;
+}
+
+.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon {
+    padding-left:20px !important;
+    background-repeat:no-repeat;
+    background-position:0 4px;
+    zoom:1;
+}
+
+.x-panel-inline-icon {
+    width:16px;
+	height:16px;
+    background-repeat:no-repeat;
+    background-position:0 0;
+	vertical-align:middle;
+	margin-right:4px;
+	margin-top:-1px;
+	margin-bottom:-1px;
+}
+
+.x-panel-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+/* fix ie7 strict mode bug */
+.ext-strict .ext-ie7 .x-panel-tc {
+    overflow: visible;
+}
+
+.x-panel-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    border-bottom:1px solid;
+}
+
+.x-panel-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:6px;
+}
+
+.x-panel-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-panel-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-mc {
+    border:0 none;
+    padding:0;
+    margin:0;
+    padding-top:6px;
+}
+
+.x-panel-mc .x-panel-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-panel-ml {
+	background: repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc {
+	height:6px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-panel-bwrap {
+    overflow:hidden;
+    zoom:1;
+    left:0;
+    top:0;
+}
+.x-panel-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-collapsed .x-resizable-handle{
+    display:none;
+}
+
+.ext-gecko .x-panel-animated div {
+    overflow:hidden !important;
+}
+
+/* Plain */
+.x-plain-body {
+    overflow:hidden;
+}
+
+.x-plain-bbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-tbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-plain {
+    overflow:hidden;
+}
+
+/* Tools */
+.x-tool {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    float:right;
+    cursor:pointer;
+    background:transparent no-repeat;
+    margin-left:2px;
+}
+
+/* expand / collapse tools */
+.x-tool-toggle {
+    background-position:0 -60px;
+}
+
+.x-tool-toggle-over {
+    background-position:-15px -60px;
+}
+
+.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+
+.x-tool-close {
+    background-position:0 -0;
+}
+
+.x-tool-close-over {
+    background-position:-15px 0;
+}
+
+.x-tool-minimize {
+    background-position:0 -15px;
+}
+
+.x-tool-minimize-over {
+    background-position:-15px -15px;
+}
+
+.x-tool-maximize {
+    background-position:0 -30px;
+}
+
+.x-tool-maximize-over {
+    background-position:-15px -30px;
+}
+
+.x-tool-restore {
+    background-position:0 -45px;
+}
+
+.x-tool-restore-over {
+    background-position:-15px -45px;
+}
+
+.x-tool-gear {
+    background-position:0 -90px;
+}
+
+.x-tool-gear-over {
+    background-position:-15px -90px;
+}
+
+.x-tool-pin {
+    background-position:0 -135px;
+}
+
+.x-tool-pin-over {
+    background-position:-15px -135px;
+}
+
+.x-tool-unpin {
+    background-position:0 -150px;
+}
+
+.x-tool-unpin-over {
+    background-position:-15px -150px;
+}
+
+.x-tool-right {
+    background-position:0 -165px;
+}
+
+.x-tool-right-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-left {
+    background-position:0 -180px;
+}
+
+.x-tool-left-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-up {
+    background-position:0 -210px;
+}
+
+.x-tool-up-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-down {
+    background-position:0 -195px;
+}
+
+.x-tool-down-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-refresh {
+    background-position:0 -225px;
+}
+
+.x-tool-refresh-over {
+    background-position:-15px -225px;
+}
+
+.x-tool-minus {
+    background-position:0 -255px;
+}
+
+.x-tool-minus-over {
+    background-position:-15px -255px;
+}
+
+.x-tool-plus {
+    background-position:0 -240px;
+}
+
+.x-tool-plus-over {
+    background-position:-15px -240px;
+}
+
+.x-tool-search {
+    background-position:0 -270px;
+}
+
+.x-tool-search-over {
+    background-position:-15px -270px;
+}
+
+.x-tool-save {
+    background-position:0 -285px;
+}
+
+.x-tool-save-over {
+    background-position:-15px -285px;
+}
+
+.x-tool-help {
+    background-position:0 -300px;
+}
+
+.x-tool-help-over {
+    background-position:-15px -300px;
+}
+
+.x-tool-print {
+    background-position:0 -315px;
+}
+
+.x-tool-print-over {
+    background-position:-15px -315px;
+}
+
+/* Ghosting */
+.x-panel-ghost {
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    opacity:.65;
+    -moz-opacity:.65;
+    filter:alpha(opacity=65);
+}
+
+.x-panel-ghost ul {
+    margin:0;
+    padding:0;
+    overflow:hidden;
+    font-size:0;
+    line-height:0;
+    border:1px solid;
+    border-top:0 none;
+    display:block;
+}
+
+.x-panel-ghost * {
+    cursor:move !important;
+}
+
+.x-panel-dd-spacer {
+    border:2px dashed;
+}
+
+/* Buttons */
+.x-panel-btns {
+    padding:5px;
+    overflow:hidden;
+}
+
+.x-panel-btns-right .x-panel-fbar {
+	float:right;
+	clear:none;
+}
+
+.x-panel-btns-left .x-panel-fbar {
+	clear:none;
+}
+
+.x-panel-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-panel-btns-center .x-toolbar-ct {
+	margin:0 auto; /*everyone else*/
+    text-align:left;
+    width:auto;
+}
+
+.ext-gecko2 .x-panel-btns-right .x-toolbar-ct {
+    width:auto;
+}
+
+.x-panel-btns td.x-toolbar-cell{
+	padding:3px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-center{
+	background-position:0 -105px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-panel-btns .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+	white-space: nowrap;
+}
+/**
+ * W3C Suggested Default style sheet for HTML 4
+ * http://www.w3.org/TR/CSS21/sample.html
+ *
+ * Resets for Ext.Panel @cfg normal: true
+ */
+.x-panel-reset .x-panel-body html,
+.x-panel-reset .x-panel-body address,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body body,
+.x-panel-reset .x-panel-body dd,
+.x-panel-reset .x-panel-body div,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dt,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body frame, frameset,
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body noframes,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body center,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body hr,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body pre 			  { display: block }
+.x-panel-reset .x-panel-body li              { display: list-item }
+.x-panel-reset .x-panel-body head            { display: none }
+.x-panel-reset .x-panel-body table           { display: table }
+.x-panel-reset .x-panel-body tr              { display: table-row }
+.x-panel-reset .x-panel-body thead           { display: table-header-group }
+.x-panel-reset .x-panel-body tbody           { display: table-row-group }
+.x-panel-reset .x-panel-body tfoot           { display: table-footer-group }
+.x-panel-reset .x-panel-body col             { display: table-column }
+.x-panel-reset .x-panel-body colgroup        { display: table-column-group }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th 	          { display: table-cell }
+.x-panel-reset .x-panel-body caption         { display: table-caption }
+.x-panel-reset .x-panel-body th              { font-weight: bolder; text-align: center }
+.x-panel-reset .x-panel-body caption         { text-align: center }
+.x-panel-reset .x-panel-body body            { margin: 8px }
+.x-panel-reset .x-panel-body h1              { font-size: 2em; margin: .67em 0 }
+.x-panel-reset .x-panel-body h2              { font-size: 1.5em; margin: .75em 0 }
+.x-panel-reset .x-panel-body h3              { font-size: 1.17em; margin: .83em 0 }
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu            { margin: 1.12em 0 }
+.x-panel-reset .x-panel-body h5              { font-size: .83em; margin: 1.5em 0 }
+.x-panel-reset .x-panel-body h6              { font-size: .75em; margin: 1.67em 0 }
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body b,
+.x-panel-reset .x-panel-body strong          { font-weight: bolder }
+.x-panel-reset .x-panel-body blockquote      { margin-left: 40px; margin-right: 40px }
+.x-panel-reset .x-panel-body i,
+.x-panel-reset .x-panel-body cite,
+.x-panel-reset .x-panel-body em,
+.x-panel-reset .x-panel-body var,
+.x-panel-reset .x-panel-body address    	  { font-style: italic }
+.x-panel-reset .x-panel-body pre,
+.x-panel-reset .x-panel-body tt,
+.x-panel-reset .x-panel-body code,
+.x-panel-reset .x-panel-body kbd,
+.x-panel-reset .x-panel-body samp       	  { font-family: monospace }
+.x-panel-reset .x-panel-body pre             { white-space: pre }
+.x-panel-reset .x-panel-body button,
+.x-panel-reset .x-panel-body textarea,
+.x-panel-reset .x-panel-body input,
+.x-panel-reset .x-panel-body select   		  { display: inline-block }
+.x-panel-reset .x-panel-body big             { font-size: 1.17em }
+.x-panel-reset .x-panel-body small,
+.x-panel-reset .x-panel-body sub,
+.x-panel-reset .x-panel-body sup 			  { font-size: .83em }
+.x-panel-reset .x-panel-body sub             { vertical-align: sub }
+.x-panel-reset .x-panel-body sup             { vertical-align: super }
+.x-panel-reset .x-panel-body table           { border-spacing: 2px; }
+.x-panel-reset .x-panel-body thead,
+.x-panel-reset .x-panel-body tbody,
+.x-panel-reset .x-panel-body tfoot           { vertical-align: middle }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th          	  { vertical-align: inherit }
+.x-panel-reset .x-panel-body s,
+.x-panel-reset .x-panel-body strike,
+.x-panel-reset .x-panel-body del  			  { text-decoration: line-through }
+.x-panel-reset .x-panel-body hr              { border: 1px inset }
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body dd        	  { margin-left: 40px }
+.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;}
+.x-panel-reset .x-panel-body ol              { list-style-type: decimal }
+.x-panel-reset .x-panel-body ol ul,
+.x-panel-reset .x-panel-body ul ol,
+.x-panel-reset .x-panel-body ul ul,
+.x-panel-reset .x-panel-body ol ol    		  { margin-top: 0; margin-bottom: 0 }
+.x-panel-reset .x-panel-body u,
+.x-panel-reset .x-panel-body ins          	  { text-decoration: underline }
+.x-panel-reset .x-panel-body br:before       { content: "\A" }
+.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line }
+.x-panel-reset .x-panel-body center          { text-align: center }
+.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline }
+.x-panel-reset .x-panel-body :focus          { outline: thin dotted invert }
+
+/* Begin bidirectionality settings (do not change) */
+.x-panel-reset .x-panel-body BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }
+.x-panel-reset .x-panel-body BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }
+.x-window {
+    zoom:1;
+}
+
+.x-window .x-resizable-handle {
+    opacity:0;
+    -moz-opacity:0;
+    filter:alpha(opacity=0);
+}
+
+.x-window-proxy {
+    border:1px solid;
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    display:none;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-window-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-window-bwrap {
+    z-index:1;
+    position:relative;
+    zoom:1;
+    left:0;top:0;
+}
+
+.x-window-tl .x-window-header {
+    padding:5px 0 4px 0;
+}
+
+.x-window-header-text {
+    cursor:pointer;
+}
+
+.x-window-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    zoom:1;
+}
+
+.x-window-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    z-index:1;
+    position:relative;
+}
+
+.x-window-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+}
+
+.x-window-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-window-bc .x-window-footer {
+    padding-bottom:6px;
+    zoom:1;
+    font-size:0;
+    line-height:0;
+}
+
+.x-window-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-mc {
+    border:1px solid;
+    padding:0;
+    margin:0;
+}
+
+.x-window-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-body {
+    overflow:hidden;
+}
+
+.x-window-bwrap {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br,
+    .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr,
+    .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr {
+    padding:0;
+}
+
+.x-window-maximized .x-window-footer {
+    padding-bottom:0;
+}
+
+.x-window-maximized .x-window-tc {
+    padding-left:3px;
+    padding-right:3px;
+}
+
+.x-window-maximized .x-window-mc {
+    border-left:0 none;
+    border-right:0 none;
+}
+
+.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar {
+    border-left:0 none;
+    border-right: 0 none;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}
+
+.x-window-draggable, .x-window-draggable .x-window-header-text {
+    cursor:move;
+}
+
+.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text {
+    cursor:default;
+}
+
+.x-window-body {
+    background:transparent;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-window-maximized-ct {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-resizable-handle {
+    display:none;
+}
+
+.x-window-sizing-ghost ul {
+    border:0 none !important;
+}
+
+.x-dlg-focus{
+	-moz-outline:0 none;
+	outline:0 none;
+	width:0;
+	height:0;
+	overflow:hidden;
+	position:absolute;
+	top:0;
+	left:0;
+}
+
+.ext-webkit .x-dlg-focus{
+    width: 1px;
+    height: 1px;
+}
+
+.x-dlg-mask{
+    z-index:10000;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+}
+
+body.ext-ie6.x-body-masked select {
+	visibility:hidden;
+}
+
+body.ext-ie6.x-body-masked .x-window select {
+	visibility:visible;
+}
+
+.x-window-plain .x-window-mc {
+    border: 1px solid;
+}
+
+.x-window-plain .x-window-body {
+    border: 1px solid;
+    background:transparent !important;
+}.x-html-editor-wrap {
+    border:1px solid;
+}
+
+.x-html-editor-tb .x-btn-text {
+    background:transparent no-repeat;
+}
+
+.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold {
+    background-position:0 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);    
+}
+
+.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic {
+    background-position:-16px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline {
+    background-position:-32px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor {
+    background-position:-160px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor {
+    background-position:-176px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft {
+    background-position:-112px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter {
+    background-position:-128px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright {
+    background-position:-144px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist {
+    background-position:-80px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist {
+    background-position:-96px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize {
+    background-position:-48px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize {
+    background-position:-64px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit {
+    background-position:-192px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink {
+    background-position:-208px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tip .x-tip-bd .x-tip-bd-inner {
+    padding:5px;
+    padding-bottom:1px;
+}
+
+.x-html-editor-tb .x-toolbar {
+    position:static !important;
+}.x-panel-noborder .x-panel-body-noborder {
+    border-width:0;
+}
+
+.x-panel-noborder .x-panel-header-noborder {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-width:1px 0 0 0;
+    border-style:solid;
+}
+
+.x-window-noborder .x-window-mc {
+    border-width:0;
+}
+
+.x-window-plain .x-window-body-noborder {
+    border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-body-noborder {
+	border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-header-noborder {
+    border-width: 0 0 1px 0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-footer-noborder {
+    border-width: 1px 0 0 0;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-width: 1px 0 0 0;
+    border-style:solid;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}.x-border-layout-ct {
+    position: relative;
+}
+
+.x-border-panel {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-tool-collapse-south {
+    background-position:0 -195px;
+}
+
+.x-tool-collapse-south-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-collapse-north {
+    background-position:0 -210px;
+}
+
+.x-tool-collapse-north-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-collapse-west {
+    background-position:0 -180px;
+}
+
+.x-tool-collapse-west-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-collapse-east {
+    background-position:0 -165px;
+}
+
+.x-tool-collapse-east-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-south {
+    background-position:0 -210px;
+}
+
+.x-tool-expand-south-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-expand-north {
+    background-position:0 -195px;
+}
+.x-tool-expand-north-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-expand-west {
+    background-position:0 -165px;
+}
+
+.x-tool-expand-west-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-east {
+    background-position:0 -180px;
+}
+
+.x-tool-expand-east-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-expand-north, .x-tool-expand-south {
+    float:right;
+    margin:3px;
+}
+
+.x-tool-expand-east, .x-tool-expand-west {
+    float:none;
+    margin:3px auto;
+}
+
+.x-accordion-hd .x-tool-toggle {
+    background-position:0 -255px;
+}
+
+.x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -255px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle {
+    background-position:0 -240px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -240px;
+}
+
+.x-accordion-hd {
+	padding-top:4px;
+	padding-bottom:3px;
+	border-top:0 none;
+    background: transparent repeat-x 0 -9px;
+}
+
+.x-layout-collapsed{
+    position:absolute;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+    width:20px;
+    height:20px;
+    overflow:hidden;
+	border:1px solid;
+	z-index:20;
+}
+
+.ext-border-box .x-layout-collapsed{
+    width:22px;
+    height:22px;
+}
+
+.x-layout-collapsed-over{
+    cursor:pointer;
+}
+
+.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{
+	position:absolute;
+    top:0;
+    left:0;
+    width:20px;
+    height:20px;
+}
+
+
+.x-layout-split{
+    position:absolute;
+    height:5px;
+    width:5px;
+    line-height:1px;
+    font-size:1px;
+    z-index:3;
+    background-color:transparent;
+}
+
+/* IE6 strict won't drag w/out a color */
+.ext-strict .ext-ie6 .x-layout-split{
+    background-color: #fff !important;
+    filter: alpha(opacity=1);
+}
+
+.x-layout-split-h{
+    background-image:url(../images/default/s.gif);
+    background-position: left;
+}
+
+.x-layout-split-v{
+    background-image:url(../images/default/s.gif);
+    background-position: top;
+}
+
+.x-column-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column {
+    float:left;
+    padding:0;
+    margin:0;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column-inner {
+    overflow:hidden;
+    zoom:1;
+}
+
+/* mini mode */
+.x-layout-mini {
+    position:absolute;
+    top:0;
+    left:0;
+    display:block;
+    width:5px;
+    height:35px;
+    cursor:pointer;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{
+    opacity:1;
+    -moz-opacity:1;
+    filter:none;
+}
+
+.x-layout-split-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-split-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west, .x-layout-cmini-east {
+    border:0 none;
+    width:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-layout-cmini-north, .x-layout-cmini-south {
+    border:0 none;
+    height:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-viewport, .x-viewport body {
+    margin: 0;
+    padding: 0;
+    border: 0 none;
+    overflow: hidden;
+    height: 100%;
+}
+
+.x-abs-layout-item {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item {
+    margin:0;
+}
+
+.x-box-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-box-inner {
+    overflow:hidden;
+    zoom:1;
+    position:relative;
+    left:0;
+    top:0;
+}
+
+.x-box-item {
+    position:absolute;
+    left:0;
+    top:0;
+}.x-progress-wrap {
+    border:1px solid;
+    overflow:hidden;
+}
+
+.x-progress-inner {
+    height:18px;
+    background:repeat-x;
+    position:relative;
+}
+
+.x-progress-bar {
+    height:18px;
+    float:left;
+    width:0;
+    background: repeat-x left center;
+    border-top:1px solid;
+    border-bottom:1px solid;
+    border-right:1px solid;
+}
+
+.x-progress-text {
+    padding:1px 5px;
+    overflow:hidden;
+    position:absolute;
+    left:0;
+    text-align:center;
+}
+
+.x-progress-text-back {
+    line-height:16px;
+}
+
+.ext-ie .x-progress-text-back {
+    line-height:15px;
+}.x-list-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    height:22px;
+}
+
+.x-list-header-inner div {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.x-list-header-inner div em {
+    display:block;
+    border-left:1px solid;
+    padding:4px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    line-height:14px;
+}
+
+.x-list-body {
+    overflow:auto;
+    overflow-x:hidden;
+    overflow-y:auto;
+    zoom:1;
+    float: left;
+    width: 100%;
+}
+
+.x-list-body dl {
+    zoom:1;
+}
+
+.x-list-body dt {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor:pointer;
+    zoom:1;
+}
+
+.x-list-body dt em {
+    display:block;
+    padding:3px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+}
+
+.x-list-resizer {
+    border-left:1px solid;
+    border-right:1px solid;
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-list-header-inner em.sort-asc {
+    background: transparent no-repeat center 0;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
+
+.x-list-header-inner em.sort-desc {
+    background: transparent no-repeat center -23px;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
+/* Shared styles */
+.x-slider {
+    zoom:1;
+}
+
+.x-slider-inner {
+    position:relative;
+    left:0;
+    top:0;
+    overflow:visible;
+    zoom:1;
+}
+
+.x-slider-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	overflow:hidden;  
+}
+
+/* Horizontal styles */
+.x-slider-horz {
+    padding-left:7px;
+    background:transparent no-repeat 0 -22px;
+}
+
+.x-slider-horz .x-slider-end {
+    padding-right:7px;
+    zoom:1;
+    background:transparent no-repeat right -44px;
+}
+
+.x-slider-horz .x-slider-inner {
+    background:transparent repeat-x 0 0;
+    height:22px;
+}
+
+.x-slider-horz .x-slider-thumb {
+    width:14px;
+    height:15px;
+    position:absolute;
+    left:0;
+    top:3px;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-horz .x-slider-thumb-over {
+    background-position: -14px -15px;
+}
+
+.x-slider-horz .x-slider-thumb-drag {
+    background-position: -28px -30px;
+}
+
+/* Vertical styles */
+.x-slider-vert {
+    padding-top:7px;
+    background:transparent no-repeat -44px 0;
+    width:22px;
+}
+
+.x-slider-vert .x-slider-end {
+    padding-bottom:7px;
+    zoom:1;
+    background:transparent no-repeat -22px bottom;
+}
+
+.x-slider-vert .x-slider-inner {
+    background:transparent repeat-y 0 0;
+}
+
+.x-slider-vert .x-slider-thumb {
+    width:15px;
+    height:14px;
+    position:absolute;
+    left:3px;
+    bottom:0;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-vert .x-slider-thumb-over {
+    background-position: -15px -14px;
+}
+
+.x-slider-vert .x-slider-thumb-drag {
+    background-position: -30px -28px;
+}.x-window-dlg .x-window-body {
+    border:0 none !important;
+    padding:5px 10px;
+    overflow:hidden !important;
+}
+
+.x-window-dlg .x-window-mc {
+    border:0 none !important;
+}
+
+.x-window-dlg .ext-mb-input {
+    margin-top:4px;
+    width:95%;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    margin-top:4px;
+}
+
+.x-window-dlg .x-progress-wrap {
+    margin-top:4px;
+}
+
+.ext-ie .x-window-dlg .x-progress-wrap {
+    margin-top:6px;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background:transparent no-repeat left;
+    display:block;
+    width:300px;
+    padding-left:18px;
+    line-height:18px;
+}
+
+.x-window-dlg .ext-mb-icon {
+    float:left;
+    width:47px;
+    height:32px;
+}
+
+.ext-ie .x-window-dlg .ext-mb-icon {
+    width:44px; /* 3px IE margin issue */
+}
+
+.x-window-dlg .x-dlg-icon .ext-mb-content{
+    zoom: 1; margin-left: 47px;
+}
+
+.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error {
+    background:transparent no-repeat top left;
+}
+
+.ext-gecko2 .ext-mb-fix-cursor {
+    overflow:auto;
+}.ext-el-mask {
+    background-color: #ccc;
+}
+
+.ext-el-mask-msg {
+    border-color:#6593cf;
+    background-color:#c3daf9;
+    background-image:url(../images/default/box/tb-blue.gif);
+}
+.ext-el-mask-msg div {
+    background-color: #eee;
+    border-color:#a3bad9;
+    color:#222;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-mask-loading div {
+    background-color:#fbfbfb;
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-item-disabled {
+    color: gray;
+}
+
+.x-item-disabled * {
+    color: gray !important;
+}
+
+.x-splitbar-proxy {
+    background-color: #aaa;
+}
+
+.x-color-palette a {
+    border-color:#fff;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border-color:#8bb8f3;
+    background-color: #deecfd;
+}
+
+.x-color-palette em {
+    border-color:#aca899;
+}
+
+.x-ie-shadow {
+    background-color:#777;
+}
+
+.x-shadow .xsmc {
+    background-image: url(../images/default/shadow-c.png);
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    background-image: url(../images/default/shadow-lr.png);
+}
+
+.x-shadow .xstl, .x-shadow .xstc,  .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{
+    background-image: url(../images/default/shadow.png);
+}
+
+.loading-indicator {
+    font-size: 11px;
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-spotlight {
+    background-color: #ccc;
+}
+.x-tab-panel-header, .x-tab-panel-footer {
+	background-color: #deecfd;
+	border-color:#8db2e3;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border-color:#8db2e3;
+}
+
+ul.x-tab-strip-top{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-bg.gif);
+	border-bottom-color:#8db2e3;
+}
+
+ul.x-tab-strip-bottom{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-btm-bg.gif);
+	border-top-color:#8db2e3;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-color:#8db2e3;
+    background-color: #deecfd;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	font:normal 11px tahoma,arial,helvetica;
+	color:#416aa3;
+}
+
+.x-tab-strip-over span.x-tab-strip-text {
+	color:#15428b;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	color:#15428b;
+    font-weight:bold;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	color:#aaaaaa;
+}
+
+.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{
+	background-image: url(../images/default/tabs/tabs-sprite.gif);
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-left-bg.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-panel-body {
+    border-color:#8db2e3;
+    background-color:#fff;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background-image:url(../images/default/tabs/scroll-left.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background-image:url(../images/default/tabs/scroll-right.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}.x-form-field{
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-text, textarea.x-form-field{
+    background-color:#fff;
+    background-image:url(../images/default/form/text-bg.gif);
+    border-color:#b5b8c8;
+}
+
+.x-form-select-one {
+    background-color:#fff;
+    border-color:#b5b8c8;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid #99bbe8;
+    color: #15428b;
+}
+
+.x-editor .x-form-check-wrap {
+    background-color:#fff;
+}
+
+.x-form-field-wrap .x-form-trigger{
+    background-image:url(../images/default/form/trigger.gif);
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-field-wrap .x-form-date-trigger{
+    background-image: url(../images/default/form/date-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-clear-trigger{
+    background-image: url(../images/default/form/clear-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-search-trigger{
+    background-image: url(../images/default/form/search-trigger.gif);
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom-color:#7eadd9;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-focus, textarea.x-form-focus{
+	border-color:#7eadd9;
+}
+
+.x-form-invalid, textarea.x-form-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+	border-color:#c30;
+}
+
+.ext-safari .x-form-invalid{
+	background-color:#fee;
+	border-color:#ff7870;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+}
+
+.x-form-grow-sizer {
+	font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-item {
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-invalid-msg {
+    color:#c0272b;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    background-image:url(../images/default/shared/warning.gif);
+}
+
+.x-form-empty-field {
+    color:gray;
+}
+
+.x-small-editor .x-form-field {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.ext-safari .x-small-editor .x-form-field {
+    font:normal 12px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-form-invalid-icon {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-fieldset {
+    border-color:#b5b8c8;
+}
+
+.x-fieldset legend {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+}
+.x-btn{
+	font:normal 11px tahoma, verdana, helvetica;
+}
+
+.x-btn button{
+    font:normal 11px arial,tahoma,verdana,helvetica;
+    color:#333;
+}
+
+.x-btn em {
+    font-style:normal;
+    font-weight:normal;
+}
+
+.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{
+	background-image:url(../images/default/button/btn.gif);
+}
+
+.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{
+    color:#000;
+}
+
+.x-btn-disabled *{
+	color:gray !important;
+}
+
+.x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/button/arrow.gif);
+}
+
+.x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-btn-mc em.x-btn-arrow-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-btn-group-header {
+    color: #3e6aaa;
+}
+
+.x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-tl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-tr {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-bc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-bl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-br {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-ml {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+.x-btn-group-mr {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}.x-toolbar{
+	border-color:#a9bfd3;
+    background-color:#d0def0;
+    background-image:url(../images/default/toolbar/bg.gif);
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
+
+.x-toolbar .x-item-disabled {
+	color:gray;
+}
+
+.x-toolbar .x-item-disabled * {
+	color:gray;
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split 
+{
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom 
+{
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-toolbar .xtb-sep {
+	background-image: url(../images/default/grid/grid-blue-split.gif);
+}
+
+.x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first.gif) !important;
+}
+
+.x-tbar-loading{
+	background-image: url(../images/default/grid/refresh.gif) !important;
+}
+
+.x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last.gif) !important;
+}
+
+.x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next.gif) !important;
+}
+
+.x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev.gif) !important;
+}
+
+.x-item-disabled .x-tbar-loading{
+	background-image: url(../images/default/grid/loading.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev-disabled.gif) !important;
+}
+
+.x-paging-info {
+    color:#444;
+}
+
+.x-toolbar-more-icon {
+    background-image: url(../images/default/toolbar/more.gif) !important;
+}
+
+.x-statusbar .x-status-busy {
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-statusbar .x-status-text-panel {
+    border-color: #99bbe8 #fff #fff #99bbe8;
+}.x-resizable-handle {
+	background-color:#fff;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+    background-image:url(../images/default/sizer/e-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-image:url(../images/default/sizer/se-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-image:url(../images/default/sizer/nw-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-image:url(../images/default/sizer/ne-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-image:url(../images/default/sizer/sw-handle.gif);
+}
+.x-resizable-proxy{
+    border-color:#3b5a82;
+}
+.x-resizable-overlay{
+    background-color:#fff;
+}
+.x-grid3 {
+    background-color:#fff;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border-color:#99bbe8;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-hd-row td {
+    border-left-color:#eee;
+    border-right-color:#d0d0d0;
+}
+
+.x-grid-row-loading {
+    background-color: #fff;
+    background-image:url(../images/default/shared/loading-balls.gif);
+}
+
+.x-grid3-row {
+    border-color:#ededed;
+    border-top-color:#fff;
+}
+
+.x-grid3-row-alt{
+	background-color:#fafafa;
+}
+
+.x-grid3-row-over {
+	border-color:#ddd;
+    background-color:#efefef;
+    background-image:url(../images/default/grid/row-over.gif);
+}
+
+.x-grid3-resize-proxy {
+    background-color:#777;
+}
+
+.x-grid3-resize-marker {
+    background-color:#777;
+}
+
+.x-grid3-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-grid3-header-pop {
+    border-left-color:#d0d0d0;
+}
+
+.x-grid3-header-pop-inner {
+    border-left-color:#eee;
+    background-image:url(../images/default/grid/hd-pop.gif);
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left-color:#aaccf6;
+    border-right-color:#aaccf6;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background-color:#ebf3fd;
+    background-image:url(../images/default/grid/grid3-hrow-over.gif);
+
+}
+
+.sort-asc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_asc.gif);
+}
+
+.sort-desc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_desc.gif);
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	color:#000;
+}
+
+.x-grid3-split {
+	background-image: url(../images/default/grid/grid-split.gif);
+}
+
+.x-grid3-hd-text {
+	color:#15428b;
+}
+
+.x-dd-drag-proxy .x-grid3-hd-inner{
+    background-color:#ebf3fd;
+	background-image:url(../images/default/grid/grid3-hrow-over.gif);
+	border-color:#aaccf6;
+}
+
+.col-move-top{
+	background-image:url(../images/default/grid/col-move-top.gif);
+}
+
+.col-move-bottom{
+	background-image:url(../images/default/grid/col-move-bottom.gif);
+}
+
+.x-grid3-row-selected {
+	background-color: #dfe8f6 !important;
+	background-image: none;
+	border-color:#a3bae9;
+}
+
+.x-grid3-cell-selected{
+	background-color: #b8cfee !important;
+	color:#000;
+}
+
+.x-grid3-cell-selected span{
+	color:#000 !important;
+}
+
+.x-grid3-cell-selected .x-grid3-cell-text{
+	color:#000;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background-color:#ebeadb !important;
+    background-image:url(../images/default/grid/grid-hrow.gif) !important;
+    color:#000;
+    border-top-color:#fff;
+    border-right-color:#6fa0df !important;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    color:#15428b !important;
+}
+
+.x-grid3-dirty-cell {
+    background-image:url(../images/default/grid/dirty.gif);
+}
+
+.x-grid3-topbar, .x-grid3-bottombar{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-top-color:#a9bfd3;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important;
+    color:#000 !important;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    background-color:#fff !important;
+    border-right-color:#eee;
+}
+
+.xg-hmenu-sort-asc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-asc.gif);
+}
+
+.xg-hmenu-sort-desc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-desc.gif);
+}
+
+.xg-hmenu-lock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-lock.gif);
+}
+
+.xg-hmenu-unlock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-unlock.gif);
+}
+
+.x-grid3-hd-btn {
+    background-color:#c3daf9;
+    background-image:url(../images/default/grid/grid3-hd-btn.gif);
+}
+
+.x-grid3-body .x-grid3-td-expander {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-expander {
+    background-image:url(../images/default/grid/row-expand-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-checker {
+    background-image: url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    background-image:url(../images/default/grid/row-check-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+	color:#444;
+}
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif);
+}
+
+.x-grid3-check-col {
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-grid3-check-col-on {
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom-color:#99bbe8;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-collapse.gif);
+    color:#3764a0;
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-expand.gif);
+}
+
+.x-group-by-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-cols-icon {
+    background-image:url(../images/default/grid/columns.gif);
+}
+
+.x-show-groups-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-grid-empty {
+    color:gray;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    border-right-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row{
+    border-top-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row-selected {
+	border-top-color:#a3bae9;
+}.x-dd-drag-ghost{
+	color:#000;
+	font: normal 11px arial, helvetica, sans-serif;
+    border-color: #ddd #bbb #bbb #ddd;
+	background-color:#fff;
+}
+
+.x-dd-drop-nodrop .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-no.gif);
+}
+
+.x-dd-drop-ok .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-yes.gif);
+}
+
+.x-dd-drop-ok-add .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-add.gif);
+}
+
+.x-view-selector {
+    background-color:#c3daf9;
+    border-color:#3399bb;
+}.x-tree-node-expanded .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder-open.gif);
+}
+
+.x-tree-node-leaf .x-tree-node-icon{
+	background-image:url(../images/default/tree/leaf.gif);
+}
+
+.x-tree-node-collapsed .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder.gif);
+}
+
+.x-tree-node-loading .x-tree-node-icon{
+	background-image:url(../images/default/tree/loading.gif) !important;
+}
+
+.x-tree-node .x-tree-node-inline-icon {
+    background-image: none;
+}
+
+.x-tree-node-loading a span{
+	 font-style: italic;
+	 color:#444444;
+}
+
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+.x-tree-lines .x-tree-elbow{
+	background-image:url(../images/default/tree/elbow.gif);
+}
+
+.x-tree-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end{
+	background-image:url(../images/default/tree/elbow-end.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-line{
+	background-image:url(../images/default/tree/elbow-line.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus-nl.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-node{
+	color:#000;
+	font: normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	color:#000;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	color:#000;
+}
+
+.x-tree-node .x-tree-node-disabled a span{
+	color:gray !important;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top-color:#36c;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 background-color:#ddd;
+	 border-color:gray;
+}
+
+.x-tree-node .x-tree-node-over {
+	background-color: #eee;
+}
+
+.x-tree-node .x-tree-selected {
+	background-color: #d9e8fb;
+}
+
+.x-tree-drop-ok-append .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-add.gif);
+}
+
+.x-tree-drop-ok-above .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-over.gif);
+}
+
+.x-tree-drop-ok-below .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-under.gif);
+}
+
+.x-tree-drop-ok-between .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-between.gif);
+}.x-date-picker {
+    border-color: #1b376c;
+    background-color:#fff;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background-image: url(../images/default/shared/hd-sprite.gif);
+	color:#fff;
+	font:bold 11px "sans serif", tahoma, verdana, helvetica;
+}
+
+.x-date-middle .x-btn .x-btn-text {
+    color:#fff;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/toolbar/btn-arrow-light.gif);
+}
+
+.x-date-right a {
+    background-image: url(../images/default/shared/right-btn.gif);
+}
+
+.x-date-left a{
+	background-image: url(../images/default/shared/left-btn.gif);
+}
+
+.x-date-inner th {
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+	border-bottom-color:#a3bad9;
+    font:normal 10px arial, helvetica,tahoma,sans-serif;
+	color:#233d6d;
+}
+
+.x-date-inner td {
+    border-color:#fff;
+}
+
+.x-date-inner a {
+    font:normal 11px arial, helvetica,tahoma,sans-serif;
+    color:#000;
+}
+
+.x-date-inner .x-date-active{
+	color:#000;
+}
+
+.x-date-inner .x-date-selected a{
+    background-color:#dfecfb;
+	background-image:url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-inner .x-date-today a{
+	border-color:darkred;
+}
+
+.x-date-inner .x-date-selected span{
+    font-weight:bold;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+	color:#aaa;
+}
+
+.x-date-bottom {
+    border-top-color:#a3bad9;
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    color:#000;
+    background-color:#ddecfe;
+}
+
+.x-date-inner .x-date-disabled a {
+	background-color:#eee;
+	color:#bbb;
+}
+
+.x-date-mmenu{
+    background-color:#eee !important;
+}
+
+.x-date-mmenu .x-menu-item {
+	font-size:10px;
+	color:#000;
+}
+
+.x-date-mp {
+	background-color:#fff;
+}
+
+.x-date-mp td {
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns button {
+	background-color:#083772;
+	color:#fff;
+	border-color: #3366cc #000055 #000055 #3366cc;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-mp-btns td {
+	border-top-color: #c5d2df;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	color:#15428b;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	color:#15428b;
+	background-color: #ddecfe;
+}
+
+td.x-date-mp-sel a {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-mp-ybtn a {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+td.x-date-mp-sep {
+   border-right-color:#c5d2df;
+}.x-tip .x-tip-close{
+	background-image: url(../images/default/qtip/close.gif);
+}
+
+.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr {
+	background-image: url(../images/default/qtip/tip-sprite.gif);
+}
+
+.x-tip .x-tip-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+}
+.x-tip .x-tip-ml {
+	background-color: #fff;
+}
+
+.x-tip .x-tip-header-text {
+    font: bold 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-tip .x-tip-body {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc,
+.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr
+{
+	background-image: url(../images/default/form/error-tip-corners.gif);
+}
+
+.x-form-invalid-tip .x-tip-body {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-tip-anchor {
+    background-image:url(../images/default/qtip/tip-anchor-sprite.gif);
+}.x-menu {
+    background-color:#f0f0f0;
+	background-image:url(../images/default/menu/menu.gif);
+}
+
+.x-menu-floating{
+    border-color:#718bb7;
+}
+
+.x-menu-nosep {
+	background-image:none;
+}
+
+.x-menu-list-item{
+	font:normal 11px arial,tahoma,sans-serif;
+}
+
+.x-menu-item-arrow{
+	background-image:url(../images/default/menu/menu-parent.gif);
+}
+
+.x-menu-sep {
+    background-color:#e0e0e0;
+	border-bottom-color:#fff;
+}
+
+a.x-menu-item {
+	color:#222;
+}
+
+.x-menu-item-active {
+    background-image: url(../images/default/menu/item-over.gif);
+	background-color: #dbecf4;
+    border-color:#aaccf6;
+}
+
+.x-menu-item-active a.x-menu-item {
+	border-color:#aaccf6;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-menu-item-checked .x-menu-item-icon{
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background-image:url(../images/default/menu/group-checked.gif);
+}
+
+.x-menu-group-item .x-menu-item-icon{
+    background-image:none;
+}
+
+.x-menu-plain {
+	background-color:#fff !important;
+}
+
+.x-menu .x-date-picker{
+    border-color:#a3bad9;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border-color:#a3bae9 !important;
+    background-color:#def8f6;
+}
+
+.x-menu-scroller-top {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+
+.x-menu-scroller-bottom {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+.x-box-tl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-tc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-tr {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-ml {
+	background-image: url(../images/default/box/l.gif);
+}
+
+.x-box-mc {
+	background-color: #eee;
+    background-image: url(../images/default/box/tb.gif);
+	font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
+	color: #393939;
+	font-size: 12px;
+}
+
+.x-box-mc h3 {
+	font-size: 14px;
+	font-weight: bold;
+}
+
+.x-box-mr {
+	background-image: url(../images/default/box/r.gif);
+}
+
+.x-box-bl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-bc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-br {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
+	background-image: url(../images/default/box/corners-blue.gif);
+}
+
+.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
+	background-image: url(../images/default/box/tb-blue.gif);
+}
+
+.x-box-blue .x-box-mc {
+	background-color: #c3daf9;
+}
+
+.x-box-blue .x-box-mc h3 {
+	color: #17385b;
+}
+
+.x-box-blue .x-box-ml {
+	background-image: url(../images/default/box/l-blue.gif);
+}
+
+.x-box-blue .x-box-mr {
+	background-image: url(../images/default/box/r-blue.gif);
+}#x-debug-browser .x-tree .x-tree-node a span {
+    color:#222297;
+    font-size:11px;
+    font-family:"monotype","courier new",sans-serif;
+}
+
+#x-debug-browser .x-tree a i {
+    color:#ff4545;
+    font-style:normal;
+}
+
+#x-debug-browser .x-tree a em {
+    color:#999;
+}
+
+#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
+    background-color:#c3daf9;
+}.x-combo-list {
+    border-color:#98c0f4;
+    background-color:#ddecfe;
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-combo-list-inner {
+    background-color:#fff;
+}
+
+.x-combo-list-hd {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+    background-image: url(../images/default/layout/panel-title-light-bg.gif);
+    border-bottom-color:#98c0f4;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom-color:#98c0f4;
+}
+
+.x-combo-list-item {
+    border-color:#fff;
+}
+
+.x-combo-list .x-combo-selected{
+	border-color:#a3bae9 !important;
+    background-color:#dfe8f6;
+}
+
+.x-combo-list .x-toolbar {
+    border-top-color:#98c0f4;
+}
+
+.x-combo-list-small {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}.x-panel {
+    border-color: #99bbe8;
+}
+
+.x-panel-header {
+    color:#15428b;
+	font-weight:bold; 
+    font-size: 11px;
+    font-family: tahoma,arial,verdana,sans-serif;
+    border-color:#99bbe8;
+    background-image: url(../images/default/panel/white-top-bottom.gif);
+}
+
+.x-panel-body {
+    border-color:#99bbe8;
+    background-color:#fff;
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-tl .x-panel-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-panel-tc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-tl, .x-panel-tr, .x-panel-bl,  .x-panel-br{
+	background-image: url(../images/default/panel/corners-sprite.gif);
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-bc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-panel-ml {
+	background-color: #fff;
+    background-image:url(../images/default/panel/left-right.gif);
+}
+
+.x-panel-mr {
+	background-image: url(../images/default/panel/left-right.gif);
+}
+
+.x-tool {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+.x-panel-ghost {
+    background-color:#cbddf3;
+}
+
+.x-panel-ghost ul {
+    border-color:#99bbe8;
+}
+
+.x-panel-dd-spacer {
+    border-color:#99bbe8;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
+.x-window-proxy {
+    background-color:#c7dffc;
+    border-color:#99bbe8;
+}
+
+.x-window-tl .x-window-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-window-tc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-tl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-tr {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-bc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-bl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-br {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-mc {
+    border-color:#99bbe8;
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-window-ml {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-mr {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-maximized .x-window-tc {
+    background-color:#fff;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom-color:#84a0c4;
+}
+
+.x-dlg-mask{
+   background-color:#ccc;
+}
+
+.x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+    border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9;
+}
+
+.x-window-plain .x-window-body {
+    border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6;
+}
+
+body.x-body-masked .x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+}.x-html-editor-wrap {
+    border-color:#a9bfd3;
+    background-color:#fff;
+}
+.x-html-editor-tb .x-btn-text {
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}.x-panel-noborder .x-panel-header-noborder {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}.x-border-layout-ct {
+    background-color:#dfe8f6;
+}
+
+.x-accordion-hd {
+	color:#222;
+    font-weight:normal;
+    background-image: url(../images/default/panel/light-hd.gif);
+}
+
+.x-layout-collapsed{
+    background-color:#d2e0f2;
+	border-color:#98c0f4;
+}
+
+.x-layout-collapsed-over{
+    background-color:#d9e8fb;
+}
+
+.x-layout-split-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+.x-layout-split-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+.x-layout-split-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+.x-layout-split-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}.x-progress-wrap {
+    border-color:#6593cf;
+}
+
+.x-progress-inner {
+    background-color:#e0e8f3;
+    background-image:url(../images/default/qtip/bg.gif);
+}
+
+.x-progress-bar {
+    background-color:#9cbfee;
+    background-image:url(../images/default/progress/progress-bg.gif);
+    border-top-color:#d1e4fd;
+    border-bottom-color:#7fa9e4;
+    border-right-color:#7fa9e4;
+}
+
+.x-progress-text {
+    font-size:11px;
+    font-weight:bold;
+    color:#fff;
+}
+
+.x-progress-text-back {
+    color:#396095;
+}.x-list-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-list-header-inner div em {
+    border-left-color:#ddd;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-body dt em {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-over {
+    background-color:#eee;
+}
+
+.x-list-selected {
+    background-color:#dfe8f6;
+}
+
+.x-list-resizer {
+    border-left-color:#555;
+    border-right-color:#555;
+}
+
+.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc {
+    background-image:url(../images/default/grid/sort-hd.gif);
+    border-color: #99bbe8;
+}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner {
+    background-image:url(../images/default/slider/slider-bg.png);
+}
+
+.x-slider-horz .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-thumb.png);
+}
+
+.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner {
+    background-image:url(../images/default/slider/slider-v-bg.png);
+}
+
+.x-slider-vert .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-v-thumb.png);
+}.x-window-dlg .ext-mb-text,
+.x-window-dlg .x-window-header-text {
+    font-size:12px;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    font:normal 12px tahoma,arial,helvetica,sans-serif;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-window-dlg .ext-mb-info {
+    background-image:url(../images/default/window/icon-info.gif);
+}
+
+.x-window-dlg .ext-mb-warning {
+    background-image:url(../images/default/window/icon-warning.gif);
+}
+
+.x-window-dlg .ext-mb-question {
+    background-image:url(../images/default/window/icon-question.gif);
+}
+
+.x-window-dlg .ext-mb-error {
+    background-image:url(../images/default/window/icon-error.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/reset-min.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/reset-min.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/reset-min.css	(revision 625)
@@ -0,0 +1,7 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/borders.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/borders.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/borders.css	(revision 625)
@@ -0,0 +1,54 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel-noborder .x-panel-body-noborder {
+    border-width:0;
+}
+
+.x-panel-noborder .x-panel-header-noborder {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-width:1px 0 0 0;
+    border-style:solid;
+}
+
+.x-window-noborder .x-window-mc {
+    border-width:0;
+}
+
+.x-window-plain .x-window-body-noborder {
+    border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-body-noborder {
+	border-width:0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-header-noborder {
+    border-width: 0 0 1px 0;
+}
+
+.x-tab-panel-noborder .x-tab-panel-footer-noborder {
+    border-width: 1px 0 0 0;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-width: 1px 0 0 0;
+    border-style:solid;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-width:0 0 1px;
+    border-style:solid;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/box.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/box.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/box.css	(revision 625)
@@ -0,0 +1,80 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
+  <div class="x-box-blue">
+        <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
+        <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
+            <h3>YOUR TITLE HERE (optional)</h3>
+            <div>YOUR CONTENT HERE</div>
+        </div></div></div>
+        <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
+    </div>
+ */
+
+.x-box-tl {
+	background: transparent no-repeat 0 0;
+    zoom:1;
+}
+
+.x-box-tc {
+	height: 8px;
+	background: transparent repeat-x 0 0;
+	overflow: hidden;
+}
+
+.x-box-tr {
+	background: transparent no-repeat right -8px;
+}
+
+.x-box-ml {
+	background: transparent repeat-y 0;
+	padding-left: 4px;
+	overflow: hidden;
+    zoom:1;
+}
+
+.x-box-mc {
+	background: repeat-x 0 -16px;
+	padding: 4px 10px;
+}
+
+.x-box-mc h3 {
+	margin: 0 0 4px 0;
+    zoom:1;
+}
+
+.x-box-mr {
+	background: transparent repeat-y right;
+	padding-right: 4px;
+	overflow: hidden;
+}
+
+.x-box-bl {
+	background: transparent no-repeat 0 -16px;
+    zoom:1;
+}
+
+.x-box-bc {
+	background: transparent repeat-x 0 -8px;
+	height: 8px;
+	overflow: hidden;
+}
+
+.x-box-br {
+	background: transparent no-repeat right -24px;
+}
+
+.x-box-tl, .x-box-bl {
+	padding-left: 8px;
+	overflow: hidden;
+}
+
+.x-box-tr, .x-box-br {
+	padding-right: 8px;
+	overflow: hidden;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/button.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/button.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/button.css	(revision 625)
@@ -0,0 +1,440 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-btn{
+	cursor:pointer;
+	white-space: nowrap;
+}
+
+.x-btn button{
+    border:0 none;
+    background:transparent;
+    padding-left:3px;
+    padding-right:3px;
+    cursor:pointer;
+    margin:0;
+    overflow:visible;
+    width:auto;
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+* html .ext-ie .x-btn button {
+    width:1px;
+}
+
+.ext-gecko .x-btn button {
+    padding-left:0;
+    padding-right:0;
+}
+
+.ext-gecko .x-btn button::-moz-focus-inner {
+    padding:0;
+}
+
+.ext-ie .x-btn button {
+    padding-top:2px;
+}
+
+.x-btn td {
+    padding:0 !important;
+}
+
+.x-btn-text {
+    cursor:pointer;
+	white-space: nowrap;
+    padding:0;
+}
+
+/* icon placement and sizing styles */
+
+/* Only text */
+.x-btn-noicon .x-btn-small .x-btn-text{
+	height: 16px;
+}
+
+.x-btn-noicon .x-btn-medium .x-btn-text{
+    height: 24px;
+}
+
+.x-btn-noicon .x-btn-large .x-btn-text{
+    height: 32px;
+}
+
+/* Only icons */
+.x-btn-icon .x-btn-text{
+    background-position: center;
+	background-repeat: no-repeat;
+}
+
+.x-btn-icon .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 16px;
+}
+
+.x-btn-icon .x-btn-medium .x-btn-text{
+    height: 24px;
+	width: 24px;
+}
+
+.x-btn-icon .x-btn-large .x-btn-text{
+    height: 32px;
+	width: 32px;
+}
+
+/* Icons and text */
+/* left */
+.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{
+    background-position: 0 center;
+	background-repeat: no-repeat;
+    padding-left:34px;
+    height:32px;
+}
+
+/* top */
+.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{
+    background-position: center 0;
+	background-repeat: no-repeat;
+    padding-top:34px;
+}
+
+/* right */
+.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:18px;
+    height:16px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:26px;
+    height:24px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{
+    background-position: right center;
+	background-repeat: no-repeat;
+    padding-right:34px;
+    height:32px;
+}
+
+/* bottom */
+.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:18px;
+}
+
+.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:26px;
+}
+
+.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{
+    background-position: center bottom;
+	background-repeat: no-repeat;
+    padding-bottom:34px;
+}
+
+/* background positioning */
+.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{
+	font-size:1px;
+    line-height:1px;
+    width:3px;
+    display:block;
+    overflow:hidden;
+}
+
+.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{
+	height:3px;
+}
+
+.x-btn-tl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 0;
+}
+.x-btn-tr{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px 0;
+}
+.x-btn-tc{
+	height:3px;
+	background:repeat-x 0 -6px;
+}
+
+.x-btn-ml{
+	width:3px;
+	background:no-repeat 0 -24px;
+}
+.x-btn-mr{
+	width:3px;
+	background:no-repeat -3px -24px;
+}
+
+.x-btn-mc{
+	background:repeat-x 0 -1096px;
+    vertical-align: middle;
+	text-align:center;
+	padding:0 5px;
+	cursor:pointer;
+	white-space:nowrap;
+}
+
+.x-btn-bl{
+	width:3px;
+	height:3px;
+	background:no-repeat 0 -3px;
+}
+
+.x-btn-br{
+	width:3px;
+	height:3px;
+	background:no-repeat -3px -3px;
+}
+
+.x-btn-bc{
+	height:3px;
+	background:repeat-x 0 -15px;
+}
+
+.x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-btn-disabled *{
+	cursor:default !important;
+}
+
+
+/* With a menu arrow */
+/* right */
+.x-btn-mc em.x-btn-arrow {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:10px;
+}
+
+.x-btn-mc em.x-btn-split {
+    display:block;
+    background:transparent no-repeat right center;
+	padding-right:14px;
+}
+
+/* bottom */
+.x-btn-mc em.x-btn-arrow-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    display:block;
+    background:transparent no-repeat center bottom;
+	padding-bottom:14px;
+}
+
+/* height adjustment class */
+.x-btn-as-arrow .x-btn-mc em {
+    display:block;
+    background:transparent;
+	padding-bottom:14px;
+}
+
+/* groups */
+.x-btn-group {
+    padding:1px;
+}
+
+.x-btn-group-header {
+    padding:2px;
+    text-align:center;
+}
+
+.x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+.x-btn-group-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:3px;
+}
+
+.x-btn-group-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-btn-group-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-br {
+	background: transparent no-repeat right bottom;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-mc {
+    border:0 none;
+    padding:1px 0 0 0;
+    margin:0;
+}
+
+.x-btn-group-mc .x-btn-group-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-btn-group-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:3px;
+    zoom:1;
+}
+
+.x-btn-group-mr {
+	background: transparent repeat-y right 0;
+	padding-right:3px;
+    zoom:1;
+}
+
+.x-btn-group-bc .x-btn-group-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-btn-group-bc {
+	height:3px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-btn-group-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    height:2px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/combo.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/combo.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/combo.css	(revision 625)
@@ -0,0 +1,45 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-combo-list {
+    border:1px solid;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-combo-list-inner {
+    overflow:auto;
+    position:relative; /* for calculating scroll offsets */
+    zoom:1;
+    overflow-x:hidden;
+}
+
+.x-combo-list-hd {
+    border-bottom:1px solid;
+    padding:3px;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom:1px solid;
+}
+
+.x-combo-list-item {
+    padding:2px;
+    border:1px solid;
+    white-space: nowrap;
+    overflow:hidden;
+    text-overflow: ellipsis;
+}
+
+.x-combo-list .x-combo-selected{
+	border:1px dotted !important;
+    cursor:pointer;
+}
+
+.x-combo-list .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/core.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/core.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/core.css	(revision 625)
@@ -0,0 +1,326 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ext-el-mask {
+    z-index: 100;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width: 100%;
+    height: 100%;
+    zoom: 1;
+}
+
+.ext-el-mask-msg {
+    z-index: 20001;
+    position: absolute;
+    top: 0;
+    left: 0;
+    border:1px solid;
+    background:repeat-x 0 -16px;
+    padding:2px;
+}
+
+.ext-el-mask-msg div {
+    padding:5px 10px 5px 10px;
+    border:1px solid;
+    cursor:wait;
+}
+
+.ext-shim {
+    position:absolute;
+    visibility:hidden;
+    left:0;
+    top:0;
+    overflow:hidden;
+}
+
+.ext-ie .ext-shim {
+    filter: alpha(opacity=0);
+}
+
+.ext-ie6 .ext-shim {
+    margin-left: 5px;
+    margin-top: 3px;
+}
+
+.x-mask-loading div {
+    padding:5px 10px 5px 25px;
+    background:no-repeat 5px 5px;
+    line-height:16px;
+}
+
+/* class for hiding elements without using display:none */
+.x-hidden, .x-hide-offsets {
+    position:absolute !important;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+}
+
+.x-hide-display {
+    display:none !important;
+}
+
+.x-hide-visibility {
+    visibility:hidden !important;
+}
+
+.x-masked {
+    overflow: hidden !important;
+}
+.x-masked-relative {
+    position: relative !important;
+}
+
+.x-masked select, .x-masked object, .x-masked embed {
+    visibility: hidden;
+}
+
+.x-layer {
+    visibility: hidden;
+}
+
+.x-unselectable, .x-unselectable * {
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-repaint {
+    zoom: 1;
+    background-color: transparent;
+    -moz-outline: none;
+}
+
+.x-item-disabled {
+    cursor: default;
+    opacity: .6;
+    -moz-opacity: .6;
+    filter: alpha(opacity=60);
+}
+
+.x-item-disabled * {
+    cursor: default !important;
+}
+
+.x-splitbar-proxy {
+    position: absolute;
+    visibility: hidden;
+    z-index: 20001;
+    zoom: 1;
+    line-height: 1px;
+    font-size: 1px;
+    overflow: hidden;
+}
+
+.x-splitbar-h, .x-splitbar-proxy-h {
+    cursor: e-resize;
+    cursor: col-resize;
+}
+
+.x-splitbar-v, .x-splitbar-proxy-v {
+    cursor: s-resize;
+    cursor: row-resize;
+}
+
+.x-color-palette {
+    width: 150px;
+    height: 92px;
+    cursor: pointer;
+}
+
+.x-color-palette a {
+    border: 1px solid;
+    float: left;
+    padding: 2px;
+    text-decoration: none;
+    -moz-outline: 0 none;
+    outline: 0 none;
+    cursor: pointer;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border: 1px solid;
+}
+
+.x-color-palette em {
+    display: block;
+    border: 1px solid;
+}
+
+.x-color-palette em span {
+    cursor: pointer;
+    display: block;
+    height: 10px;
+    line-height: 10px;
+    width: 10px;
+}
+
+.x-ie-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+    zoom:1;
+}
+
+.x-shadow {
+    display: none;
+    position: absolute;
+    overflow: hidden;
+    left:0;
+    top:0;
+}
+
+.x-shadow * {
+    overflow: hidden;
+}
+
+.x-shadow * {
+    padding: 0;
+    border: 0;
+    margin: 0;
+    clear: none;
+    zoom: 1;
+}
+
+/* top  bottom */
+.x-shadow .xstc, .x-shadow .xsbc {
+    height: 6px;
+    float: left;
+}
+
+/* corners */
+.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
+    width: 6px;
+    height: 6px;
+    float: left;
+}
+
+/* sides */
+.x-shadow .xsc {
+    width: 100%;
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    width: 6px;
+    float: left;
+    height: 100%;
+}
+
+.x-shadow .xsmc {
+    float: left;
+    height: 100%;
+    background: transparent;
+}
+
+.x-shadow .xst, .x-shadow .xsb {
+    height: 6px;
+    overflow: hidden;
+    width: 100%;
+}
+
+.x-shadow .xsml {
+    background: transparent repeat-y 0 0;
+}
+
+.x-shadow .xsmr {
+    background: transparent repeat-y -6px 0;
+}
+
+.x-shadow .xstl {
+    background: transparent no-repeat 0 0;
+}
+
+.x-shadow .xstc {
+    background: transparent repeat-x 0 -30px;
+}
+
+.x-shadow .xstr {
+    background: transparent repeat-x 0 -18px;
+}
+
+.x-shadow .xsbl {
+    background: transparent no-repeat 0 -12px;
+}
+
+.x-shadow .xsbc {
+    background: transparent repeat-x 0 -36px;
+}
+
+.x-shadow .xsbr {
+    background: transparent repeat-x 0 -6px;
+}
+
+.loading-indicator {
+    background: no-repeat left;
+    padding-left: 20px;
+    line-height: 16px;
+    margin: 3px;
+}
+
+.x-text-resize {
+    position: absolute;
+    left: -1000px;
+    top: -1000px;
+    visibility: hidden;
+    zoom: 1;
+}
+
+.x-drag-overlay {
+    width: 100%;
+    height: 100%;
+    display: none;
+    position: absolute;
+    left: 0;
+    top: 0;
+    background-image:url(../images/default/s.gif);
+    z-index: 20000;
+}
+
+.x-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-spotlight {
+    z-index: 8999;
+    position: absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity: .50;
+    filter: alpha(opacity=50);
+    width:0;
+    height:0;
+    zoom: 1;
+}
+
+#x-history-frame {
+    position:absolute;
+    top:-1px;
+    left:0;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
+
+#x-history-field {
+    position:absolute;
+    top:0;
+    left:-1px;
+	width:1px;
+    height:1px;
+    visibility:hidden;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/date-picker.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/date-picker.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/date-picker.css	(revision 625)
@@ -0,0 +1,265 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-date-picker {
+    border: 1px solid;
+    border-top:0 none;
+	position:relative;
+}
+
+.x-date-picker a {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+.x-date-inner, .x-date-inner td, .x-date-inner th{
+    border-collapse:separate;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background: repeat-x 0 -83px;
+	overflow:hidden;
+}
+
+.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr,
+.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr,
+.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{
+	background:transparent !important;
+    vertical-align:middle;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background:transparent no-repeat right 0;
+}
+
+.x-date-right, .x-date-left {
+    width:18px;
+}
+
+.x-date-right{
+    text-align:right;
+}
+
+.x-date-middle {
+    padding-top:2px;
+    padding-bottom:2px;
+    width:130px; /* FF3 */
+}
+
+.x-date-right a, .x-date-left a{
+    display:block;
+    width:16px;
+	height:16px;
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor:pointer;
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a:hover, .x-date-left a:hover{
+    -moz-opacity: 1;
+    opacity:1;
+    filter: alpha(opacity=100);
+}
+
+.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{
+    -moz-opacity: 0.6;
+    opacity:.6;
+    filter: alpha(opacity=60);
+}
+
+.x-date-right a {
+    margin-right:2px;
+    text-decoration:none !important;
+}
+
+.x-date-left a{
+    margin-left:2px;
+    text-decoration:none !important;
+}
+
+table.x-date-inner {
+    width:100%;
+    table-layout:fixed;
+}
+
+.x-date-inner th {
+    width:25px;
+}
+
+.x-date-inner th {
+    background: repeat-x left top;
+    text-align:right !important;
+	border-bottom: 1px solid;
+	cursor:default;
+    padding:0;
+    border-collapse:separate;
+}
+
+.x-date-inner th span {
+    display:block;
+    padding:2px;
+    padding-right:7px;
+}
+
+.x-date-inner td {
+    border: 1px solid;
+	text-align:right;
+    padding:0;
+}
+
+.x-date-inner a {
+    padding:2px 5px;
+    display:block;
+	text-decoration:none;
+    text-align:right;
+    zoom:1;
+}
+
+.x-date-inner .x-date-active{
+	cursor:pointer;
+	color:black;
+}
+
+.x-date-inner .x-date-selected a{
+	background: repeat-x left top;
+	border:1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-today a{
+	border: 1px solid;
+    padding:1px 4px;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+    text-decoration:none !important;
+}
+
+.x-date-bottom {
+    padding:4px;
+    border-top: 1px solid;
+    background: repeat-x left top;
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    text-decoration:none !important;
+}
+
+.x-item-disabled .x-date-inner a:hover{
+    background: none;
+}
+
+.x-date-inner .x-date-disabled a {
+	cursor:default;
+}
+
+.x-date-menu .x-menu-item {
+	padding:1px 24px 1px 4px;
+	white-space: nowrap;
+}
+
+.x-date-menu .x-menu-item .x-menu-item-icon {
+    width:10px;
+    height:10px;
+    margin-right:5px;
+    background-position:center -4px !important;
+}
+
+.x-date-mp {
+	position:absolute;
+	left:0;
+	top:0;
+	display:none;
+}
+
+.x-date-mp td {
+    padding:2px;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn {
+    border: 0 none;
+	text-align:center;
+	vertical-align: middle;
+	width:25%;
+}
+
+.x-date-mp-ok {
+	margin-right:3px;
+}
+
+.x-date-mp-btns button {
+	text-decoration:none;
+	text-align:center;
+	text-decoration:none !important;
+	border:1px solid;
+	padding:1px 3px 1px;
+	cursor:pointer;
+}
+
+.x-date-mp-btns {
+	background: repeat-x left top;
+}
+
+.x-date-mp-btns td {
+	border-top: 1px solid;
+    text-align:center;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	display:block;
+	padding:2px 4px;
+	text-decoration:none;
+	text-align:center;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	text-decoration:none;
+	cursor:pointer;
+}
+
+td.x-date-mp-sel a {
+	padding:1px 3px;
+	background: repeat-x left top;
+	border:1px solid;
+}
+
+.x-date-mp-ybtn a {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    cursor:pointer;
+    background:transparent no-repeat;
+    display:block;
+    margin:0 auto;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next {
+    background-position:0 -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-next:hover {
+    background-position:-15px -120px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev {
+    background-position:0 -105px;
+}
+
+.x-date-mp-ybtn a.x-date-mp-prev:hover {
+    background-position:-15px -105px;
+}
+
+.x-date-mp-ybtn {
+   text-align:center;
+}
+
+td.x-date-mp-sep {
+   border-right:1px solid;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dd.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dd.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dd.css	(revision 625)
@@ -0,0 +1,61 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-dd-drag-proxy{
+	position:absolute;
+	left:0;
+    top:0;
+	visibility:hidden;
+	z-index:15000;
+}
+
+.x-dd-drag-ghost{
+	-moz-opacity: 0.85;
+    opacity:.85;
+    filter: alpha(opacity=85);
+    border: 1px solid;
+	padding:3px;
+	padding-left:20px;
+	white-space:nowrap;
+}
+
+.x-dd-drag-repair .x-dd-drag-ghost{
+	-moz-opacity: 0.4;
+    opacity:.4;
+    filter: alpha(opacity=40);
+	border:0 none;
+	padding:0;
+	background-color:transparent;
+}
+
+.x-dd-drag-repair .x-dd-drop-icon{
+	visibility:hidden;
+}
+
+.x-dd-drop-icon{
+    position:absolute;
+	top:3px;
+	left:3px;
+	display:block;
+	width:16px;
+	height:16px;
+	background-color:transparent;
+	background-position: center;
+	background-repeat: no-repeat;
+	z-index:1;
+}
+
+.x-view-selector {
+    position:absolute;
+    left:0;
+    top:0;
+    width:0;
+    border:1px dotted;
+	opacity: .5;
+    -moz-opacity: .5;
+    filter:alpha(opacity=50);
+    zoom:1;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/debug.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/debug.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/debug.css	(revision 625)
@@ -0,0 +1,26 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#x-debug-browser .x-tree .x-tree-node a span {
+    padding-top:2px;
+    line-height:18px;
+}
+
+#x-debug-browser  .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+#x-debug-browser  .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -60px;
+}
+
+#x-debug-browser.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -60px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dialog.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dialog.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/dialog.css	(revision 625)
@@ -0,0 +1,62 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-window-dlg .x-window-body {
+    border:0 none !important;
+    padding:5px 10px;
+    overflow:hidden !important;
+}
+
+.x-window-dlg .x-window-mc {
+    border:0 none !important;
+}
+
+.x-window-dlg .ext-mb-input {
+    margin-top:4px;
+    width:95%;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    margin-top:4px;
+}
+
+.x-window-dlg .x-progress-wrap {
+    margin-top:4px;
+}
+
+.ext-ie .x-window-dlg .x-progress-wrap {
+    margin-top:6px;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background:transparent no-repeat left;
+    display:block;
+    width:300px;
+    padding-left:18px;
+    line-height:18px;
+}
+
+.x-window-dlg .ext-mb-icon {
+    float:left;
+    width:47px;
+    height:32px;
+}
+
+.ext-ie .x-window-dlg .ext-mb-icon {
+    width:44px; /* 3px IE margin issue */
+}
+
+.x-window-dlg .x-dlg-icon .ext-mb-content{
+    zoom: 1; margin-left: 47px;
+}
+
+.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error {
+    background:transparent no-repeat top left;
+}
+
+.ext-gecko2 .ext-mb-fix-cursor {
+    overflow:auto;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/editor.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/editor.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/editor.css	(revision 625)
@@ -0,0 +1,92 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-html-editor-wrap {
+    border:1px solid;
+}
+
+.x-html-editor-tb .x-btn-text {
+    background:transparent no-repeat;
+}
+
+.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold {
+    background-position:0 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);    
+}
+
+.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic {
+    background-position:-16px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline {
+    background-position:-32px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor {
+    background-position:-160px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor {
+    background-position:-176px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft {
+    background-position:-112px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter {
+    background-position:-128px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright {
+    background-position:-144px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist {
+    background-position:-80px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist {
+    background-position:-96px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize {
+    background-position:-48px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize {
+    background-position:-64px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit {
+    background-position:-192px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink {
+    background-position:-208px 0;
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
+
+.x-html-editor-tip .x-tip-bd .x-tip-bd-inner {
+    padding:5px;
+    padding-bottom:1px;
+}
+
+.x-html-editor-tb .x-toolbar {
+    position:static !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/form.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/form.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/form.css	(revision 625)
@@ -0,0 +1,562 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/* all fields */
+.x-form-field{
+    margin: 0 0 0 0;
+}
+
+.ext-webkit *:focus{
+    outline: none !important;
+}
+
+/* ---- text fields ---- */
+.x-form-text, textarea.x-form-field{
+    padding:1px 3px;
+    background:repeat-x 0 0;
+    border:1px solid;
+}
+
+textarea.x-form-field {
+    padding:2px 3px;
+}
+
+.x-form-text, .ext-ie .x-form-file {
+    height:22px;
+    line-height:18px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-form-text, .ext-ie7 .x-form-text {
+    margin:-1px 0; /* ie bogus margin bug */
+    height:22px; /* ie quirks */
+    line-height:18px;
+}
+
+.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field {
+    margin:-1px 0; /* ie bogus margin bug */
+}
+
+.ext-strict .x-form-text {
+    height:18px;
+}
+
+.ext-safari.ext-mac textarea.x-form-field {
+    margin-bottom:-2px; /* another bogus margin bug, safari/mac only */
+}
+
+.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field {
+	margin-bottom: 1px;
+}
+
+.ext-gecko .x-form-text , .ext-ie8 .x-form-text {
+    padding-top:2px; /* FF won't center the text vertically */
+    padding-bottom:0;
+}
+
+textarea {
+    resize: none;  /* Disable browser resizable textarea */
+}
+
+/* select boxes */
+.x-form-select-one {
+    height:20px;
+    line-height:18px;
+    vertical-align:middle;
+    border: 1px solid;
+}
+
+/* multi select boxes */
+
+/* --- TODO --- */
+
+/* 2.0.2 style */
+.x-form-check-wrap {
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid;
+    margin-bottom: 5px;
+    padding-left: 3px !important;
+    float: none !important;
+}
+
+/* wrapped fields and triggers */
+.x-form-field-wrap .x-form-trigger{
+    width:17px;
+    height:21px;
+    border:0;
+    background:transparent no-repeat 0 0;
+    cursor:pointer;
+    border-bottom: 1px solid;
+    position:absolute;
+    top:0;
+}
+
+.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{
+    cursor:pointer;
+}
+
+.ext-safari .x-form-field-wrap .x-form-trigger{
+    right:0;
+}
+
+.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{
+    position:static;
+    top:auto;
+    vertical-align:top;
+}
+
+.x-form-field-wrap {
+    position:relative;
+    left:0;top:0;
+    zoom:1;
+    white-space: nowrap;
+}
+
+.x-form-field-wrap .x-form-trigger-over{
+    background-position:-17px 0;
+}
+
+.x-form-field-wrap .x-form-trigger-click{
+    background-position:-34px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    background-position:-51px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-over{
+    background-position:-68px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger-click{
+    background-position:-85px 0;
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    background-position:0 0 !important;
+    border-bottom: 1px solid;
+}
+
+.x-trigger-noedit{
+    cursor:pointer;
+}
+
+/* field focus style */
+.x-form-focus, textarea.x-form-focus{
+	border: 1px solid;
+}
+
+/* invalid fields */
+.x-form-invalid, textarea.x-form-invalid{
+	background:repeat-x bottom;
+	border: 1px solid;
+}
+
+.ext-safari .x-form-invalid{
+	border: 1px solid;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+	background:repeat-x bottom;
+}
+
+/* editors */
+.x-editor {
+    visibility:hidden;
+    padding:0;
+    margin:0;
+}
+.x-form-check-wrap {
+    height: 22px;
+    line-height:18px;
+}
+
+.ext-ie .x-form-check-wrap input {
+    width:15px;
+    height:15px;
+}
+
+.x-editor .x-form-check-wrap {
+    padding:3px;
+}
+
+.x-editor .x-form-checkbox {
+    height:13px;
+}
+
+.x-form-grow-sizer {
+    left: -10000px;
+	padding: 8px 3px;
+    position: absolute;
+    visibility:hidden;
+    top: -10000px;
+	white-space: pre-wrap;
+    white-space: -moz-pre-wrap;
+    white-space: -pre-wrap;
+    white-space: -o-pre-wrap;
+    word-wrap: break-word;
+    zoom:1;
+}
+
+.x-form-grow-sizer p {
+    margin:0 !important;
+    border:0 none !important;
+    padding:0 !important;
+}
+
+/* Form Items CSS */
+
+.x-form-item {
+    display:block;
+    margin-bottom:4px;
+    zoom:1;
+}
+
+.x-form-item label {
+    display:block;
+    float:left;
+    width:100px;
+    padding:3px;
+    padding-left:0;
+    clear:left;
+    z-index:2;
+    position:relative;
+}
+
+.x-form-element {
+    padding-left:105px;
+    position:relative;
+}
+
+.x-form-invalid-msg {
+    padding:2px;
+    padding-left:18px;
+    background: transparent no-repeat 0 2px;
+    line-height:16px;
+    width:200px;
+}
+
+.x-form-label-left label {
+   text-align:left;
+}
+
+.x-form-label-right label {
+   text-align:right;
+}
+
+.x-form-label-top .x-form-item label {
+    width:auto;
+    float:none;
+    clear:none;
+    display:inline;
+    margin-bottom:4px;
+    position:static;
+}
+
+.x-form-label-top .x-form-element {
+    padding-left:0;
+    padding-top:4px;
+}
+
+.x-form-label-top .x-form-item {
+    padding-bottom:4px;
+}
+
+/* Editor small font for grid, toolbar and tree */
+.x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    margin-top:-1px !important; /* ie bogus margin bug */
+    margin-bottom:-1px !important;
+    height:20px !important; /* ie quirks */
+    line-height:16px !important;
+}
+
+.ext-strict .x-small-editor .x-form-text {
+    height:16px !important;
+}
+
+.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text {
+    height:20px;
+    line-height:16px;
+}
+
+.ext-border-box .x-small-editor .x-form-text {
+    height:20px;
+}
+
+.x-small-editor .x-form-select-one {
+    height:20px;
+    line-height:16px;
+    vertical-align:middle;
+}
+
+.x-small-editor .x-form-num-field {
+    text-align:right;
+}
+
+.x-small-editor .x-form-field-wrap .x-form-trigger{
+    height:19px;
+}
+
+.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;}
+
+.x-form-clear {
+    clear:both;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+.x-form-clear-left {
+    clear:left;
+    height:0;
+    overflow:hidden;
+    line-height:0;
+    font-size:0;
+}
+
+.x-form-cb-label {
+    width:auto !important;
+    float:none !important;
+    clear:none !important;
+    display:inline !important;
+    margin-left:4px;
+    top: -2px;
+}
+
+.ext-gecko2 .x-form-cb-label{
+    top: -1px;
+}
+
+.ext-ie8 .x-form-cb-label{
+    position: static;
+}
+
+.ext-strict .ext-ie8 .x-form-cb-label {
+    top: -3px;
+    position: relative;
+}
+
+.ext-opera .x-form-cb-label, .ext-safari3 .x-form-cb-label, .ext-ie7 .x-form-cb-label, .ext-ie6 .x-form-cb-label {
+    top: 0;
+}
+
+.x-form-column {
+    float:left;
+    padding:0;
+    margin:0;
+    width:48%;
+    overflow:hidden;
+    zoom:1;
+}
+
+/* buttons */
+.x-form .x-form-btns-ct .x-btn{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns td {
+	border:0;
+	padding:0;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-right table{
+	float:right;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-left table{
+	float:left;
+	clear:none;
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-form .x-form-btns-ct .x-form-btns-center table{
+	margin:0 auto; /*everyone else*/
+}
+
+.x-form .x-form-btns-ct table td.x-form-btn-td{
+	padding:3px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-form .x-form-btns-ct .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-form-invalid-icon {
+    width:16px;
+    height:18px;
+    visibility:hidden;
+    position:absolute;
+    left:0;
+    top:0;
+    display:block;
+    background:transparent no-repeat 0 2px;
+}
+
+/* fieldsets */
+.x-fieldset {
+    border:1px solid;
+    padding:10px;
+    margin-bottom:10px;
+    display:block; /* preserve margins in IE */
+}
+
+/* make top of checkbox/tools visible in webkit */
+.ext-webkit .x-fieldset-header {
+    padding-top: 1px;
+}        
+
+.ext-ie .x-fieldset legend {
+    margin-bottom:10px;
+}
+
+.ext-ie .x-fieldset {
+    padding-top: 0;
+    padding-bottom:10px;
+}
+
+.x-fieldset legend .x-tool-toggle {
+    margin-right:3px;
+    margin-left:0;
+    float:left !important;
+}
+
+.x-fieldset legend input {
+    margin-right:3px;
+    float:left !important;
+    height:13px;
+    width:13px;
+}
+
+fieldset.x-panel-collapsed {
+    padding-bottom:0 !important;
+    border-width: 1px 1px 0 1px !important;
+    border-left-color: transparent;
+    border-right-color: transparent;
+}      
+  
+.ext-ie6 fieldset.x-panel-collapsed{
+    padding-bottom:0 !important;
+    border-width: 1px 0 0 0 !important;
+    margin-left: 1px;
+    margin-right: 1px;
+}
+
+fieldset.x-panel-collapsed .x-fieldset-bwrap {
+    visibility:hidden;
+    position:absolute;
+    left:-1000px;
+    top:-1000px;
+}
+
+.ext-ie .x-fieldset-bwrap {
+    zoom:1;
+}
+
+.x-fieldset-noborder {
+    border:0px none transparent;
+}
+
+.x-fieldset-noborder legend {
+    margin-left:-3px;
+}
+
+/* IE legend positioing bug */
+.ext-ie .x-fieldset-noborder legend {
+    position: relative;
+    margin-bottom:23px;
+}
+.ext-ie .x-fieldset-noborder legend span {
+    position: absolute;
+    left:16px;
+}
+        
+.ext-gecko .x-window-body .x-form-item {
+    -moz-outline: none;
+    overflow: auto;
+}
+
+.ext-gecko .x-form-item {
+    -moz-outline: none;
+}
+
+.x-hide-label label.x-form-item-label {
+     display:none;
+}
+
+.x-hide-label .x-form-element {
+     padding-left: 0 !important;
+}
+
+.x-fieldset {
+    overflow:hidden;
+}
+
+.x-fieldset-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-fieldset-body {
+    overflow:hidden;
+}
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/grid.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/grid.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/grid.css	(revision 625)
@@ -0,0 +1,552 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/* Grid3 styles */
+.x-grid3 {
+	position:relative;
+	overflow:hidden;
+}
+
+.x-grid-panel .x-panel-body {
+    overflow:hidden !important;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border:1px solid;
+}
+
+.x-grid3 table {
+    table-layout:fixed;
+}
+
+.x-grid3-viewport{
+	overflow:hidden;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+    -moz-outline: none;
+	-moz-user-focus: normal;
+}
+
+.x-grid3-row td, .x-grid3-summary-row td {
+    line-height:13px;
+    vertical-align: top;
+	padding-left:1px;
+    padding-right:1px;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-cell{
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-row td {
+    line-height:15px;
+    vertical-align:middle;
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+.x-grid3-hd-row .x-grid3-marker-hd {
+    padding:3px;
+}
+
+.x-grid3-row .x-grid3-marker {
+    padding:3px;
+}
+
+.x-grid3-cell-inner, .x-grid3-hd-inner{
+	overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    padding:3px 3px 3px 5px;
+    white-space: nowrap;
+}
+
+.x-grid3-hd-inner {
+    position:relative;
+	cursor:inherit;
+	padding:4px 3px 4px 5px;
+}
+
+.x-grid3-row-body {
+    white-space:normal;
+}
+
+.x-grid3-body-cell {
+    -moz-outline:0 none;
+    outline:0 none;
+}
+
+/* IE Quirks to clip */
+.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{
+	width:100%;
+}
+
+/* reverse above in strict mode */
+.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{
+	width:auto;
+}
+
+.x-grid-row-loading {
+    background: no-repeat center center;
+}
+
+.x-grid-page {
+    overflow:hidden;
+}
+
+.x-grid3-row {
+	cursor: default;
+    border: 1px solid;
+    width:100%;
+}
+
+.x-grid3-row-over {
+	border:1px solid;
+    background: repeat-x left top;
+}
+
+.x-grid3-resize-proxy {
+	width:1px;
+    left:0;
+	cursor: e-resize;
+	cursor: col-resize;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-resize-marker {
+	width:1px;
+	left:0;
+	position:absolute;
+	top:0;
+	height:100px;
+	overflow:hidden;
+	visibility:hidden;
+	border:0 none;
+	z-index:7;
+}
+
+.x-grid3-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: text;
+    -khtml-user-select: text;
+    -webkit-user-select:ignore;
+}
+
+/* header styles */
+.x-grid3-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    padding:1px 0 0 0;
+}
+
+.x-grid3-header-pop {
+    border-left:1px solid;
+    float:right;
+    clear:none;
+}
+
+.x-grid3-header-pop-inner {
+    border-left:1px solid;
+    width:14px;
+    height:19px;
+    background: transparent no-repeat center center;
+}
+
+.ext-ie .x-grid3-header-pop-inner {
+    width:15px;
+}
+
+.ext-strict .x-grid3-header-pop-inner {
+    width:14px; 
+}
+
+.x-grid3-header-inner {
+    overflow:hidden;
+    zoom:1;
+    float:left;
+}
+
+.x-grid3-header-offset {
+    padding-left:1px;
+    text-align: left;
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left:1px solid;
+    border-right:1px solid;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background: repeat-x left bottom;
+
+}
+
+.x-grid3-sort-icon{
+	background-repeat: no-repeat;
+	display: none;
+	height: 4px;
+	width: 13px;
+	margin-left:3px;
+	vertical-align: middle;
+}
+
+.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon {
+	display: inline;
+}
+
+/* Header position fixes for IE strict mode */
+.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd {
+    position:relative;
+}
+
+.ext-strict .ext-ie6 .x-grid3-hd-inner{
+    position:static;
+}
+
+/* Body Styles */
+.x-grid3-body {
+	zoom:1;
+}
+
+.x-grid3-scroller {
+	overflow:auto;
+    zoom:1;
+    position:relative;
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	display: block;
+	padding: 3px 5px 3px 5px;
+	-moz-user-select: none;
+	-khtml-user-select: none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-split {
+	background-position: center;
+	background-repeat: no-repeat;
+	cursor: e-resize;
+	cursor: col-resize;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	overflow: hidden;
+	position: absolute;
+	top: 2px;
+	width: 6px;
+	z-index: 3;
+}
+
+/* Column Reorder DD */
+.x-dd-drag-proxy .x-grid3-hd-inner{
+	background: repeat-x left bottom;
+	width:120px;
+	padding:3px;
+	border:1px solid;
+	overflow:hidden;
+}
+
+.col-move-top, .col-move-bottom{
+	width:9px;
+	height:9px;
+	position:absolute;
+	top:0;
+	line-height:1px;
+	font-size:1px;
+	overflow:hidden;
+	visibility:hidden;
+	z-index:20000;
+    background:transparent no-repeat left top;
+}
+
+/* Selection Styles */
+.x-grid3-row-selected {
+	border:1px dotted;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background: repeat-x 0 bottom !important;
+    vertical-align:middle !important;
+    padding:0;
+    border-top:1px solid;
+    border-bottom:none !important;
+    border-right:1px solid !important;
+    text-align:center;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    padding:0 4px;
+    text-align:center;
+}
+
+/* dirty cells */
+.x-grid3-dirty-cell {
+    background: transparent no-repeat 0 0;
+}
+
+/* Grid Toolbars */
+.x-grid3-topbar, .x-grid3-bottombar{
+    overflow:hidden;
+	display:none;
+	zoom:1;
+    position:relative;
+}
+
+.x-grid3-topbar .x-toolbar{
+	border-right:0 none;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-right:0 none;
+	border-bottom:0 none;
+	border-top:1px solid;
+}
+
+/* Props Grid Styles */
+.x-props-grid .x-grid3-cell{
+	padding:1px;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background:transparent repeat-y -16px !important;
+    padding-left:12px;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    padding:1px;
+    padding-right:0;
+    border:0 none;
+    border-right:1px solid;
+}
+
+/* dd */
+.x-grid3-col-dd {
+    border:0 none;
+    padding:0;
+    background:transparent;
+}
+
+.x-dd-drag-ghost .x-grid3-dd-wrap {
+    padding:1px 3px 3px 1px;
+}
+
+.x-grid3-hd {
+    -moz-user-select:none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+}
+
+.x-grid3-hd-btn {
+    display:none;
+    position:absolute;
+    width:14px;
+    background:no-repeat left center;
+    right:0;
+    top:0;
+    z-index:2;
+	cursor:pointer;
+}
+
+.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn {
+    display:block;
+}
+
+a.x-grid3-hd-btn:hover {
+    background-position:-14px center;
+}
+
+/* Expanders */
+.x-grid3-body .x-grid3-td-expander {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-expander {
+    width:100%;
+    height:18px;
+    background-position:4px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-expander {
+    background-position:4px 2px;
+}
+
+.x-grid3-row-expanded .x-grid3-row-expander {
+    background-position:-21px 2px;
+}
+
+.x-grid3-row-collapsed .x-grid3-row-body {
+    display:none !important;
+}
+
+.x-grid3-row-expanded .x-grid3-row-body {
+    display:block !important;
+}
+
+/* Checkers */
+.x-grid3-body .x-grid3-td-checker {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner {
+    padding:0 !important;
+    height:100%;
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    width:100%;
+    height:18px;
+    background-position:2px 2px;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-row .x-grid3-row-checker {
+    background-position:2px 2px;
+}
+
+.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker {
+    background-position:-23px 2px;
+}
+
+.x-grid3-hd-checker {
+    background-position:2px 3px;
+}
+
+.x-grid3-hd-checker-on .x-grid3-hd-checker {
+    background-position:-23px 3px;
+}
+
+/* Numberer */
+.x-grid3-body .x-grid3-td-numberer {
+    background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+    padding:3px 5px 0 0 !important;
+    text-align:right;
+}
+
+/* Row Icon */
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background:transparent repeat-y right;
+    vertical-align:top;
+    text-align:center;
+}
+
+.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner {
+    padding:0 !important;
+    background-position:center center;
+    background-repeat:no-repeat;
+    width:16px;
+    height:16px;
+    margin-left:2px;
+    margin-top:3px;
+}
+
+/* All specials */
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background:transparent repeat-y right;
+}
+
+.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner {
+    padding: 1px 0 0 0 !important;
+}
+
+.x-grid3-check-col {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+.x-grid3-check-col-on {
+    width:100%;
+    height:16px;
+    background-position:center center;
+    background-repeat:no-repeat;
+    background-color:transparent;
+}
+
+/* Grouping classes */
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom: 2px solid;
+    cursor:pointer;
+    padding-top:6px;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background:transparent no-repeat 3px 3px;
+    padding:4px 4px 4px 17px;
+}
+
+.x-grid-group-collapsed .x-grid-group-body {
+    display:none;
+}
+
+.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-ie .x-props-grid .x-editor .x-form-text {
+    position:static;
+    top:0;
+}
+
+.x-grid-empty {
+    padding:10px;
+}
+
+/* fix floating toolbar issue */
+.ext-ie7 .x-grid-panel .x-panel-bbar {
+    position:relative;
+}
+
+.ext-ie6 .x-grid3-header {
+    position: relative;
+}
+
+/* column lines */
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    padding-right:0;
+    border-right:1px solid;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/layout.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/layout.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/layout.css	(revision 625)
@@ -0,0 +1,296 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-border-layout-ct {
+    position: relative;
+}
+
+.x-border-panel {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-tool-collapse-south {
+    background-position:0 -195px;
+}
+
+.x-tool-collapse-south-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-collapse-north {
+    background-position:0 -210px;
+}
+
+.x-tool-collapse-north-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-collapse-west {
+    background-position:0 -180px;
+}
+
+.x-tool-collapse-west-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-collapse-east {
+    background-position:0 -165px;
+}
+
+.x-tool-collapse-east-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-south {
+    background-position:0 -210px;
+}
+
+.x-tool-expand-south-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-expand-north {
+    background-position:0 -195px;
+}
+.x-tool-expand-north-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-expand-west {
+    background-position:0 -165px;
+}
+
+.x-tool-expand-west-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-expand-east {
+    background-position:0 -180px;
+}
+
+.x-tool-expand-east-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-expand-north, .x-tool-expand-south {
+    float:right;
+    margin:3px;
+}
+
+.x-tool-expand-east, .x-tool-expand-west {
+    float:none;
+    margin:3px auto;
+}
+
+.x-accordion-hd .x-tool-toggle {
+    background-position:0 -255px;
+}
+
+.x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -255px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle {
+    background-position:0 -240px;
+}
+
+.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over {
+    background-position:-15px -240px;
+}
+
+.x-accordion-hd {
+	padding-top:4px;
+	padding-bottom:3px;
+	border-top:0 none;
+    background: transparent repeat-x 0 -9px;
+}
+
+.x-layout-collapsed{
+    position:absolute;
+    left:-10000px;
+    top:-10000px;
+    visibility:hidden;
+    width:20px;
+    height:20px;
+    overflow:hidden;
+	border:1px solid;
+	z-index:20;
+}
+
+.ext-border-box .x-layout-collapsed{
+    width:22px;
+    height:22px;
+}
+
+.x-layout-collapsed-over{
+    cursor:pointer;
+}
+
+.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{
+	position:absolute;
+    top:0;
+    left:0;
+    width:20px;
+    height:20px;
+}
+
+
+.x-layout-split{
+    position:absolute;
+    height:5px;
+    width:5px;
+    line-height:1px;
+    font-size:1px;
+    z-index:3;
+    background-color:transparent;
+}
+
+/* IE6 strict won't drag w/out a color */
+.ext-strict .ext-ie6 .x-layout-split{
+    background-color: #fff !important;
+    filter: alpha(opacity=1);
+}
+
+.x-layout-split-h{
+    background-image:url(../images/default/s.gif);
+    background-position: left;
+}
+
+.x-layout-split-v{
+    background-image:url(../images/default/s.gif);
+    background-position: top;
+}
+
+.x-column-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column {
+    float:left;
+    padding:0;
+    margin:0;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-column-inner {
+    overflow:hidden;
+    zoom:1;
+}
+
+/* mini mode */
+.x-layout-mini {
+    position:absolute;
+    top:0;
+    left:0;
+    display:block;
+    width:5px;
+    height:35px;
+    cursor:pointer;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{
+    opacity:1;
+    -moz-opacity:1;
+    filter:none;
+}
+
+.x-layout-split-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-split-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-split-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    top:48%;
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    left:48%;
+    height:5px;
+    width:35px;
+}
+
+.x-layout-cmini-west, .x-layout-cmini-east {
+    border:0 none;
+    width:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-layout-cmini-north, .x-layout-cmini-south {
+    border:0 none;
+    height:5px !important;
+    padding:0;
+    background:transparent;
+}
+
+.x-viewport, .x-viewport body {
+    margin: 0;
+    padding: 0;
+    border: 0 none;
+    overflow: hidden;
+    height: 100%;
+}
+
+.x-abs-layout-item {
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item {
+    margin:0;
+}
+
+.x-box-layout-ct {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-box-inner {
+    overflow:hidden;
+    zoom:1;
+    position:relative;
+    left:0;
+    top:0;
+}
+
+.x-box-item {
+    position:absolute;
+    left:0;
+    top:0;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/list-view.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/list-view.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/list-view.css	(revision 625)
@@ -0,0 +1,85 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-list-header{
+	background: repeat-x 0 bottom;
+	cursor:default;
+    zoom:1;
+    height:22px;
+}
+
+.x-list-header-inner div {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.x-list-header-inner div em {
+    display:block;
+    border-left:1px solid;
+    padding:4px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+    line-height:14px;
+}
+
+.x-list-body {
+    overflow:auto;
+    overflow-x:hidden;
+    overflow-y:auto;
+    zoom:1;
+    float: left;
+    width: 100%;
+}
+
+.x-list-body dl {
+    zoom:1;
+}
+
+.x-list-body dt {
+    display:block;
+    float:left;
+    overflow:hidden;
+	-o-text-overflow: ellipsis;
+	text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor:pointer;
+    zoom:1;
+}
+
+.x-list-body dt em {
+    display:block;
+    padding:3px 4px;
+    overflow:hidden;
+    -moz-user-select: none;
+    -khtml-user-select: none;
+}
+
+.x-list-resizer {
+    border-left:1px solid;
+    border-right:1px solid;
+    position:absolute;
+    left:0;
+    top:0;
+}
+
+.x-list-header-inner em.sort-asc {
+    background: transparent no-repeat center 0;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
+
+.x-list-header-inner em.sort-desc {
+    background: transparent no-repeat center -23px;
+    border-style:solid;
+    border-width: 0 1px 1px;
+    padding-bottom:3px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/menu.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/menu.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/menu.css	(revision 625)
@@ -0,0 +1,205 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-menu {
+	z-index: 15000;
+	zoom: 1;
+	background: repeat-y;
+}
+
+.x-menu-floating{
+    border: 1px solid;
+}
+
+.x-menu a {
+    text-decoration: none !important;
+}
+
+.ext-ie .x-menu {
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-menu-list{
+    padding: 2px;
+	background:transparent;
+	border:0 none;
+    overflow:hidden;
+    overflow-y: hidden;
+}
+
+.ext-strict .ext-ie .x-menu-list{
+    position: relative;
+}
+
+.x-menu li{
+	line-height:100%;
+}
+
+.x-menu li.x-menu-sep-li{
+	font-size:1px;
+	line-height:1px;
+}
+
+.x-menu-list-item{
+    white-space: nowrap;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	padding:1px;
+}
+
+.x-menu-item-arrow{
+	background:transparent no-repeat right;
+}
+
+.x-menu-sep {
+	display:block;
+	font-size:1px;
+	line-height:1px;
+	margin: 2px 3px;
+	border-bottom:1px solid;
+    overflow:hidden;
+}
+
+.x-menu-focus {
+	position:absolute;
+	left:-1px;
+	top:-1px;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+    overflow:hidden;
+    display:block;
+}
+
+a.x-menu-item {
+    cursor: pointer;
+    display: block;
+    line-height: 16px;
+    outline-color: -moz-use-text-color;
+    outline-style: none;
+    outline-width: 0;
+    padding: 3px 21px 3px 27px;
+    position: relative;
+    text-decoration: none;
+    white-space: nowrap;
+}
+
+.x-menu-item-active {
+    background-repeat: repeat-x;
+    background-position: left bottom;
+    border-style:solid;
+    border-width: 1px 0;
+    margin:0 1px;
+	padding: 0;
+}
+
+.x-menu-item-active a.x-menu-item {
+    border-style:solid;
+    border-width:0 1px;
+    margin:0 -1px;
+}
+
+.x-menu-item-icon {
+	border: 0 none;
+	height: 16px;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	position: absolute;
+    left: 3px;
+    top: 3px;
+    margin: 0;
+    background-position:center;
+}
+
+.ext-ie .x-menu-item-icon {
+    left: -24px;
+}
+.ext-strict .x-menu-item-icon {
+    left: 3px;
+}
+
+.ext-ie6 .x-menu-item-icon {
+    left: -24px;
+}
+
+.ext-ie .x-menu-item-icon {
+    vertical-align: middle;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background: transparent no-repeat center;
+}
+
+.x-menu-group-item .x-menu-item-icon{
+	background: transparent;
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background: transparent no-repeat center;
+}
+
+.x-date-menu .x-menu-list{
+    padding: 0;
+}
+
+.x-menu-date-item{
+	padding:0;
+}
+
+.x-menu .x-color-palette, .x-menu .x-date-picker{
+    margin-left: 26px;
+	margin-right:4px;
+}
+
+.x-menu .x-date-picker{
+    border:1px solid;
+    margin-top:2px;
+    margin-bottom:2px;
+}
+
+.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{
+	 margin: 0;
+	 border: 0 none;
+}
+
+.x-date-menu {
+   padding:0 !important;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border:1px dotted !important;
+	padding:0;
+}
+
+.x-menu .x-menu-scroller {
+    width: 100%;
+	background-repeat:no-repeat;
+	background-position:center;
+	height:8px;
+    line-height: 8px;
+	cursor:pointer;
+    margin: 0;
+    padding: 0;
+}
+
+.x-menu .x-menu-scroller-active{
+    height: 6px;
+    line-height: 6px;
+}
+
+.x-menu-list-item-indent{
+    padding-left: 27px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel-reset.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel-reset.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel-reset.css	(revision 625)
@@ -0,0 +1,130 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * W3C Suggested Default style sheet for HTML 4
+ * http://www.w3.org/TR/CSS21/sample.html
+ *
+ * Resets for Ext.Panel @cfg normal: true
+ */
+.x-panel-reset .x-panel-body html,
+.x-panel-reset .x-panel-body address,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body body,
+.x-panel-reset .x-panel-body dd,
+.x-panel-reset .x-panel-body div,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dt,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body frame, frameset,
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body noframes,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body center,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body hr,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body pre 			  { display: block }
+.x-panel-reset .x-panel-body li              { display: list-item }
+.x-panel-reset .x-panel-body head            { display: none }
+.x-panel-reset .x-panel-body table           { display: table }
+.x-panel-reset .x-panel-body tr              { display: table-row }
+.x-panel-reset .x-panel-body thead           { display: table-header-group }
+.x-panel-reset .x-panel-body tbody           { display: table-row-group }
+.x-panel-reset .x-panel-body tfoot           { display: table-footer-group }
+.x-panel-reset .x-panel-body col             { display: table-column }
+.x-panel-reset .x-panel-body colgroup        { display: table-column-group }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th 	          { display: table-cell }
+.x-panel-reset .x-panel-body caption         { display: table-caption }
+.x-panel-reset .x-panel-body th              { font-weight: bolder; text-align: center }
+.x-panel-reset .x-panel-body caption         { text-align: center }
+.x-panel-reset .x-panel-body body            { margin: 8px }
+.x-panel-reset .x-panel-body h1              { font-size: 2em; margin: .67em 0 }
+.x-panel-reset .x-panel-body h2              { font-size: 1.5em; margin: .75em 0 }
+.x-panel-reset .x-panel-body h3              { font-size: 1.17em; margin: .83em 0 }
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body p,
+.x-panel-reset .x-panel-body blockquote,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body fieldset,
+.x-panel-reset .x-panel-body form,
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body dl,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu            { margin: 1.12em 0 }
+.x-panel-reset .x-panel-body h5              { font-size: .83em; margin: 1.5em 0 }
+.x-panel-reset .x-panel-body h6              { font-size: .75em; margin: 1.67em 0 }
+.x-panel-reset .x-panel-body h1,
+.x-panel-reset .x-panel-body h2,
+.x-panel-reset .x-panel-body h3,
+.x-panel-reset .x-panel-body h4,
+.x-panel-reset .x-panel-body h5,
+.x-panel-reset .x-panel-body h6,
+.x-panel-reset .x-panel-body b,
+.x-panel-reset .x-panel-body strong          { font-weight: bolder }
+.x-panel-reset .x-panel-body blockquote      { margin-left: 40px; margin-right: 40px }
+.x-panel-reset .x-panel-body i,
+.x-panel-reset .x-panel-body cite,
+.x-panel-reset .x-panel-body em,
+.x-panel-reset .x-panel-body var,
+.x-panel-reset .x-panel-body address    	  { font-style: italic }
+.x-panel-reset .x-panel-body pre,
+.x-panel-reset .x-panel-body tt,
+.x-panel-reset .x-panel-body code,
+.x-panel-reset .x-panel-body kbd,
+.x-panel-reset .x-panel-body samp       	  { font-family: monospace }
+.x-panel-reset .x-panel-body pre             { white-space: pre }
+.x-panel-reset .x-panel-body button,
+.x-panel-reset .x-panel-body textarea,
+.x-panel-reset .x-panel-body input,
+.x-panel-reset .x-panel-body select   		  { display: inline-block }
+.x-panel-reset .x-panel-body big             { font-size: 1.17em }
+.x-panel-reset .x-panel-body small,
+.x-panel-reset .x-panel-body sub,
+.x-panel-reset .x-panel-body sup 			  { font-size: .83em }
+.x-panel-reset .x-panel-body sub             { vertical-align: sub }
+.x-panel-reset .x-panel-body sup             { vertical-align: super }
+.x-panel-reset .x-panel-body table           { border-spacing: 2px; }
+.x-panel-reset .x-panel-body thead,
+.x-panel-reset .x-panel-body tbody,
+.x-panel-reset .x-panel-body tfoot           { vertical-align: middle }
+.x-panel-reset .x-panel-body td,
+.x-panel-reset .x-panel-body th          	  { vertical-align: inherit }
+.x-panel-reset .x-panel-body s,
+.x-panel-reset .x-panel-body strike,
+.x-panel-reset .x-panel-body del  			  { text-decoration: line-through }
+.x-panel-reset .x-panel-body hr              { border: 1px inset }
+.x-panel-reset .x-panel-body ol,
+.x-panel-reset .x-panel-body ul,
+.x-panel-reset .x-panel-body dir,
+.x-panel-reset .x-panel-body menu,
+.x-panel-reset .x-panel-body dd        	  { margin-left: 40px }
+.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;}
+.x-panel-reset .x-panel-body ol              { list-style-type: decimal }
+.x-panel-reset .x-panel-body ol ul,
+.x-panel-reset .x-panel-body ul ol,
+.x-panel-reset .x-panel-body ul ul,
+.x-panel-reset .x-panel-body ol ol    		  { margin-top: 0; margin-bottom: 0 }
+.x-panel-reset .x-panel-body u,
+.x-panel-reset .x-panel-body ins          	  { text-decoration: underline }
+.x-panel-reset .x-panel-body br:before       { content: "\A" }
+.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line }
+.x-panel-reset .x-panel-body center          { text-align: center }
+.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline }
+.x-panel-reset .x-panel-body :focus          { outline: thin dotted invert }
+
+/* Begin bidirectionality settings (do not change) */
+.x-panel-reset .x-panel-body BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }
+.x-panel-reset .x-panel-body BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/panel.css	(revision 625)
@@ -0,0 +1,468 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel {
+    border-style: solid;
+    border-width:0;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+    padding:5px 3px 4px 5px;
+    border:1px solid;
+    line-height: 15px;
+    background: transparent repeat-x 0 -1px;
+}
+
+.x-panel-body {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    position: relative; /* added for item scroll positioning */
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom: 0 none;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top:1px solid;
+}
+
+.x-panel-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-tl .x-panel-header {
+    padding:5px 0 4px 0;
+    border:0 none;
+    background:transparent;
+}
+
+.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon {
+    padding-left:20px !important;
+    background-repeat:no-repeat;
+    background-position:0 4px;
+    zoom:1;
+}
+
+.x-panel-inline-icon {
+    width:16px;
+	height:16px;
+    background-repeat:no-repeat;
+    background-position:0 0;
+	vertical-align:middle;
+	margin-right:4px;
+	margin-top:-1px;
+	margin-bottom:-1px;
+}
+
+.x-panel-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+}
+
+/* fix ie7 strict mode bug */
+.ext-strict .ext-ie7 .x-panel-tc {
+    overflow: visible;
+}
+
+.x-panel-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    border-bottom:1px solid;
+}
+
+.x-panel-tr {
+	background: transparent no-repeat right 0;
+	zoom:1;
+    padding-right:6px;
+}
+
+.x-panel-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    zoom:1;
+}
+
+.x-panel-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-mc {
+    border:0 none;
+    padding:0;
+    margin:0;
+    padding-top:6px;
+}
+
+.x-panel-mc .x-panel-body {
+    background:transparent;
+    border: 0 none;
+}
+
+.x-panel-ml {
+	background: repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-panel-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-panel-bc .x-panel-footer {
+    padding-bottom:6px;
+}
+
+.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc {
+	height:6px;
+    font-size:0;
+    line-height:0;
+}
+
+.x-panel-bwrap {
+    overflow:hidden;
+    zoom:1;
+    left:0;
+    top:0;
+}
+.x-panel-body {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-panel-collapsed .x-resizable-handle{
+    display:none;
+}
+
+.ext-gecko .x-panel-animated div {
+    overflow:hidden !important;
+}
+
+/* Plain */
+.x-plain-body {
+    overflow:hidden;
+}
+
+.x-plain-bbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-tbar .x-toolbar {
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-plain-bwrap {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-plain {
+    overflow:hidden;
+}
+
+/* Tools */
+.x-tool {
+    overflow:hidden;
+    width:15px;
+    height:15px;
+    float:right;
+    cursor:pointer;
+    background:transparent no-repeat;
+    margin-left:2px;
+}
+
+/* expand / collapse tools */
+.x-tool-toggle {
+    background-position:0 -60px;
+}
+
+.x-tool-toggle-over {
+    background-position:-15px -60px;
+}
+
+.x-panel-collapsed .x-tool-toggle {
+    background-position:0 -75px;
+}
+
+.x-panel-collapsed .x-tool-toggle-over {
+    background-position:-15px -75px;
+}
+
+
+.x-tool-close {
+    background-position:0 -0;
+}
+
+.x-tool-close-over {
+    background-position:-15px 0;
+}
+
+.x-tool-minimize {
+    background-position:0 -15px;
+}
+
+.x-tool-minimize-over {
+    background-position:-15px -15px;
+}
+
+.x-tool-maximize {
+    background-position:0 -30px;
+}
+
+.x-tool-maximize-over {
+    background-position:-15px -30px;
+}
+
+.x-tool-restore {
+    background-position:0 -45px;
+}
+
+.x-tool-restore-over {
+    background-position:-15px -45px;
+}
+
+.x-tool-gear {
+    background-position:0 -90px;
+}
+
+.x-tool-gear-over {
+    background-position:-15px -90px;
+}
+
+.x-tool-pin {
+    background-position:0 -135px;
+}
+
+.x-tool-pin-over {
+    background-position:-15px -135px;
+}
+
+.x-tool-unpin {
+    background-position:0 -150px;
+}
+
+.x-tool-unpin-over {
+    background-position:-15px -150px;
+}
+
+.x-tool-right {
+    background-position:0 -165px;
+}
+
+.x-tool-right-over {
+    background-position:-15px -165px;
+}
+
+.x-tool-left {
+    background-position:0 -180px;
+}
+
+.x-tool-left-over {
+    background-position:-15px -180px;
+}
+
+.x-tool-up {
+    background-position:0 -210px;
+}
+
+.x-tool-up-over {
+    background-position:-15px -210px;
+}
+
+.x-tool-down {
+    background-position:0 -195px;
+}
+
+.x-tool-down-over {
+    background-position:-15px -195px;
+}
+
+.x-tool-refresh {
+    background-position:0 -225px;
+}
+
+.x-tool-refresh-over {
+    background-position:-15px -225px;
+}
+
+.x-tool-minus {
+    background-position:0 -255px;
+}
+
+.x-tool-minus-over {
+    background-position:-15px -255px;
+}
+
+.x-tool-plus {
+    background-position:0 -240px;
+}
+
+.x-tool-plus-over {
+    background-position:-15px -240px;
+}
+
+.x-tool-search {
+    background-position:0 -270px;
+}
+
+.x-tool-search-over {
+    background-position:-15px -270px;
+}
+
+.x-tool-save {
+    background-position:0 -285px;
+}
+
+.x-tool-save-over {
+    background-position:-15px -285px;
+}
+
+.x-tool-help {
+    background-position:0 -300px;
+}
+
+.x-tool-help-over {
+    background-position:-15px -300px;
+}
+
+.x-tool-print {
+    background-position:0 -315px;
+}
+
+.x-tool-print-over {
+    background-position:-15px -315px;
+}
+
+/* Ghosting */
+.x-panel-ghost {
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    opacity:.65;
+    -moz-opacity:.65;
+    filter:alpha(opacity=65);
+}
+
+.x-panel-ghost ul {
+    margin:0;
+    padding:0;
+    overflow:hidden;
+    font-size:0;
+    line-height:0;
+    border:1px solid;
+    border-top:0 none;
+    display:block;
+}
+
+.x-panel-ghost * {
+    cursor:move !important;
+}
+
+.x-panel-dd-spacer {
+    border:2px dashed;
+}
+
+/* Buttons */
+.x-panel-btns {
+    padding:5px;
+    overflow:hidden;
+}
+
+.x-panel-btns-right .x-panel-fbar {
+	float:right;
+	clear:none;
+}
+
+.x-panel-btns-left .x-panel-fbar {
+	clear:none;
+}
+
+.x-panel-btns-center{
+	text-align:center; /*ie*/
+}
+
+.x-panel-btns-center .x-toolbar-ct {
+	margin:0 auto; /*everyone else*/
+    text-align:left;
+    width:auto;
+}
+
+.ext-gecko2 .x-panel-btns-right .x-toolbar-ct {
+    width:auto;
+}
+
+.x-panel-btns td.x-toolbar-cell{
+	padding:3px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-left{
+	background-position:0 -147px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-right{
+	background-position:0 -168px;
+}
+
+.x-panel-btns .x-btn-focus .x-btn-center{
+	background-position:0 -189px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-over .x-btn-center{
+	background-position:0 -105px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-center{
+	background-position:0 -126px;
+}
+
+.x-panel-btns .x-btn-click  .x-btn-right{
+	background-position:0 -84px;
+}
+
+.x-panel-btns .x-btn-click .x-btn-left{
+	background-position:0 -63px;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+	white-space: nowrap;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/progress.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/progress.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/progress.css	(revision 625)
@@ -0,0 +1,42 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-progress-wrap {
+    border:1px solid;
+    overflow:hidden;
+}
+
+.x-progress-inner {
+    height:18px;
+    background:repeat-x;
+    position:relative;
+}
+
+.x-progress-bar {
+    height:18px;
+    float:left;
+    width:0;
+    background: repeat-x left center;
+    border-top:1px solid;
+    border-bottom:1px solid;
+    border-right:1px solid;
+}
+
+.x-progress-text {
+    padding:1px 5px;
+    overflow:hidden;
+    position:absolute;
+    left:0;
+    text-align:center;
+}
+
+.x-progress-text-back {
+    line-height:16px;
+}
+
+.ext-ie .x-progress-text-back {
+    line-height:15px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/qtips.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/qtips.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/qtips.css	(revision 625)
@@ -0,0 +1,153 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tip{
+	position: absolute;
+	top: 0;
+    left:0;
+    visibility: hidden;
+	z-index: 20000;
+    border:0 none;
+}
+
+.x-tip .x-tip-close{
+	height: 15px;
+	float:right;
+	width: 15px;
+    margin:0 0 2px 2px;
+    cursor:pointer;
+    display:none;
+}
+
+.x-tip .x-tip-tc {
+	background: transparent no-repeat 0 -62px;
+	padding-top:3px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tip .x-tip-bc {
+	background: transparent no-repeat 0 -121px;
+	height:3px;
+    overflow:hidden;
+}
+
+.x-tip .x-tip-bl {
+	background: transparent no-repeat 0 -59px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-br {
+	background: transparent no-repeat right -59px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mc {
+    border:0 none;
+}
+
+.x-tip .x-tip-ml {
+	background: no-repeat 0 -124px;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-tip .x-tip-mr {
+	background: transparent no-repeat right -124px;
+	padding-right:6px;
+    zoom:1;
+}
+
+.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc {
+    font-size:0;
+    line-height:0;
+}
+
+.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{
+    line-height: 1px;
+}
+
+.x-tip .x-tip-header-text {
+    padding:0;
+    margin:0 0 2px 0;
+}
+
+.x-tip .x-tip-body {
+    margin:0 !important;
+    line-height:14px;
+    padding:0;
+}
+
+.x-tip .x-tip-body .loading-indicator {
+    margin:0;
+}
+
+.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text {
+    cursor:move;
+}
+
+.x-form-invalid-tip .x-tip-tc {
+	background: repeat-x 0 -12px;
+    padding-top:6px;
+}
+
+.x-form-invalid-tip .x-tip-bc {
+	background: repeat-x 0 -18px;
+    height:6px;
+}
+
+.x-form-invalid-tip .x-tip-bl {
+	background: no-repeat 0 -6px;
+}
+
+.x-form-invalid-tip .x-tip-br {
+	background: no-repeat right -6px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding:2px;
+}
+
+.x-form-invalid-tip .x-tip-body {
+    padding-left:24px;
+    background:transparent no-repeat 2px 2px;
+}
+
+.x-tip-anchor {
+    position: absolute;
+    width: 9px;
+    height: 10px;
+    overflow:hidden;
+    background: transparent no-repeat 0 0;
+    zoom:1;
+}
+.x-tip-anchor-bottom {
+    background-position: -9px 0;
+}
+.x-tip-anchor-right {
+    background-position: -18px 0;
+    width: 10px;
+}
+.x-tip-anchor-left {
+    background-position: -28px 0;
+    width: 10px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/reset.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/reset.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/reset.css	(revision 625)
@@ -0,0 +1,7 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/resizable.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/resizable.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/resizable.css	(revision 625)
@@ -0,0 +1,149 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-resizable-handle {
+    position:absolute;
+    z-index:100;
+    /* ie needs these */
+    font-size:1px;
+    line-height:6px;
+    overflow:hidden;
+	filter:alpha(opacity=0);
+	opacity:0;
+	zoom:1;
+}
+
+.x-resizable-handle-east{
+    width:6px;
+    cursor:e-resize;
+    right:0;
+    top:0;
+    height:100%;
+}
+
+.ext-ie .x-resizable-handle-east {
+    margin-right:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-south{
+    width:100%;
+    cursor:s-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+}
+
+.ext-ie .x-resizable-handle-south {
+    margin-bottom:-1px; /*IE rounding error*/
+}
+
+.x-resizable-handle-west{
+    width:6px;
+    cursor:w-resize;
+    left:0;
+    top:0;
+    height:100%;
+}
+
+.x-resizable-handle-north{
+    width:100%;
+    cursor:n-resize;
+    left:0;
+    top:0;
+    height:6px;
+}
+
+.x-resizable-handle-southeast{
+    width:6px;
+    cursor:se-resize;
+    right:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northwest{
+    width:6px;
+    cursor:nw-resize;
+    left:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-northeast{
+    width:6px;
+    cursor:ne-resize;
+    right:0;
+    top:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-handle-southwest{
+    width:6px;
+    cursor:sw-resize;
+    left:0;
+    bottom:0;
+    height:6px;
+    z-index:101;
+}
+
+.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{
+    filter:alpha(opacity=100);
+	opacity:1;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+	background-position: left;
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-position: top;
+}
+
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-position: top left;
+}
+
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-position:bottom right;
+}
+
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-position: bottom left;
+}
+
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-position: top right;
+}
+
+.x-resizable-proxy{
+    border: 1px dashed;
+    position:absolute;
+    overflow:hidden;
+    display:none;
+	left:0;
+    top:0;
+    z-index:50000;
+}
+
+.x-resizable-overlay{
+    width:100%;
+	height:100%;
+	display:none;
+	position:absolute;
+	left:0;
+	top:0;
+	z-index:200000;
+	-moz-opacity: 0;
+    opacity:0;
+    filter: alpha(opacity=0);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/slider.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/slider.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/slider.css	(revision 625)
@@ -0,0 +1,103 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/* Shared styles */
+.x-slider {
+    zoom:1;
+}
+
+.x-slider-inner {
+    position:relative;
+    left:0;
+    top:0;
+    overflow:visible;
+    zoom:1;
+}
+
+.x-slider-focus {
+	position:absolute;
+	left:0;
+	top:0;
+	width:1px;
+	height:1px;
+    line-height:1px;
+    font-size:1px;
+    -moz-outline:0 none;
+    outline:0 none;
+    -moz-user-select: none;
+    -khtml-user-select:none;
+    -webkit-user-select:ignore;
+	display:block;
+	overflow:hidden;  
+}
+
+/* Horizontal styles */
+.x-slider-horz {
+    padding-left:7px;
+    background:transparent no-repeat 0 -22px;
+}
+
+.x-slider-horz .x-slider-end {
+    padding-right:7px;
+    zoom:1;
+    background:transparent no-repeat right -44px;
+}
+
+.x-slider-horz .x-slider-inner {
+    background:transparent repeat-x 0 0;
+    height:22px;
+}
+
+.x-slider-horz .x-slider-thumb {
+    width:14px;
+    height:15px;
+    position:absolute;
+    left:0;
+    top:3px;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-horz .x-slider-thumb-over {
+    background-position: -14px -15px;
+}
+
+.x-slider-horz .x-slider-thumb-drag {
+    background-position: -28px -30px;
+}
+
+/* Vertical styles */
+.x-slider-vert {
+    padding-top:7px;
+    background:transparent no-repeat -44px 0;
+    width:22px;
+}
+
+.x-slider-vert .x-slider-end {
+    padding-bottom:7px;
+    zoom:1;
+    background:transparent no-repeat -22px bottom;
+}
+
+.x-slider-vert .x-slider-inner {
+    background:transparent repeat-y 0 0;
+}
+
+.x-slider-vert .x-slider-thumb {
+    width:15px;
+    height:14px;
+    position:absolute;
+    left:3px;
+    bottom:0;
+    background:transparent no-repeat 0 0;
+}
+
+.x-slider-vert .x-slider-thumb-over {
+    background-position: -15px -14px;
+}
+
+.x-slider-vert .x-slider-thumb-drag {
+    background-position: -30px -28px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tabs.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tabs.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tabs.css	(revision 625)
@@ -0,0 +1,372 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tab-panel {
+    overflow:hidden;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border: 1px solid;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header {
+	border: 1px solid;
+	padding-bottom: 2px;
+}
+
+.x-tab-panel-footer {
+	border: 1px solid;
+	padding-top: 2px;
+}
+
+.x-tab-strip-wrap {
+	width:100%;
+    overflow:hidden;
+    position:relative;
+    zoom:1;
+}
+
+ul.x-tab-strip {
+	display:block;
+    width:5000px;
+    zoom:1;
+}
+
+ul.x-tab-strip-top{
+	padding-top: 1px;
+	background: repeat-x bottom;
+	border-bottom: 1px solid;
+}
+
+ul.x-tab-strip-bottom{
+	padding-bottom: 1px;
+	background: repeat-x top;
+	border-top: 1px solid;
+	border-bottom: 0 none;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-top {
+    background:transparent !important;
+    padding-top:0 !important;
+}
+
+.x-tab-panel-header-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border:1px solid;
+    height:2px;
+    font-size:1px;
+    line-height:1px;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer {
+    border-top: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-bottom: 0 none;
+}
+
+.x-tab-panel-footer-plain .x-tab-strip-bottom {
+    background:transparent !important;
+    padding-bottom:0 !important;
+}
+
+.x-tab-panel-footer-plain {
+    background:transparent !important;
+    border-width:0 !important;
+    padding-top:0 !important;
+}
+
+.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer,
+.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer {
+    height:3px;
+}
+
+ul.x-tab-strip li {
+    float:left;
+    margin-left:2px;
+}
+
+ul.x-tab-strip li.x-tab-edge {
+    float:left;
+    margin:0 !important;
+    padding:0 !important;
+    border:0 none !important;
+    font-size:1px !important;
+    line-height:1px !important;
+    overflow:hidden;
+    zoom:1;
+    background:transparent !important;
+    width:1px;
+}
+
+.x-tab-strip a, .x-tab-strip span, .x-tab-strip em {
+	display:block;
+}
+
+.x-tab-strip a {
+	text-decoration:none !important;
+	-moz-outline: none;
+	outline: none;
+	cursor:pointer;
+}
+
+.x-tab-strip-inner {
+    overflow:hidden;
+	text-overflow: ellipsis;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	white-space: nowrap;
+	cursor:pointer;
+    padding:4px 0;
+}
+
+.x-tab-strip-top .x-tab-with-icon .x-tab-right {
+    padding-left:6px;
+}
+
+.x-tab-strip .x-tab-with-icon span.x-tab-strip-text {
+	padding-left:20px;
+    background-position: 0 3px;
+    background-repeat: no-repeat;
+}
+
+.x-tab-strip-active, .x-tab-strip-active a.x-tab-right {
+    cursor:default;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	cursor:default;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	cursor:default;
+}
+
+.x-tab-panel-body {
+    overflow:hidden;
+}
+
+.x-tab-panel-bwrap {
+    overflow:hidden;
+}
+
+.ext-ie .x-tab-strip .x-tab-right {
+    position:relative;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+    margin-bottom:-1px;
+}
+
+/*
+ * Horrible hack for IE8 in quirks mode
+ */
+.ext-border-box .ext-ie8 .x-tab-strip .x-tab-right{
+    top: 1px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-bottom:5px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+    margin-top:-1px;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text {
+    padding-top:5px;
+}
+
+.x-tab-strip-top .x-tab-right {
+	background: transparent no-repeat 0 -51px;
+    padding-left:10px;
+}
+
+.x-tab-strip-top .x-tab-left {
+	background: transparent no-repeat right -351px;
+    padding-right:10px;
+}
+
+.x-tab-strip-top .x-tab-strip-inner {
+	background: transparent repeat-x 0 -201px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-right {
+	 background-position:0 -101px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-left {
+	 background-position:right -401px;
+}
+
+.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner {
+	 background-position:0 -251px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-right {
+	background-position: 0 0;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-left {
+	background-position: right -301px;
+}
+
+.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner {
+	background-position: 0 -151px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background: no-repeat bottom left;
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background: no-repeat bottom right;
+}
+
+.x-tab-strip-bottom .x-tab-left {
+    padding:0 10px;
+}
+
+.x-tab-strip-bottom .x-tab-right {
+    padding:0;
+}
+
+.x-tab-strip .x-tab-strip-close {
+    display:none;
+}
+
+.x-tab-strip-closable {
+    position:relative;
+}
+
+.x-tab-strip-closable .x-tab-left {
+    padding-right:19px;
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+    opacity:.6;
+    -moz-opacity:.6;
+    background-repeat:no-repeat;
+    display:block;
+	width:11px;
+    height:11px;
+    position:absolute;
+    top:3px;
+    right:3px;
+    cursor:pointer;
+    z-index:2;
+}
+
+.x-tab-strip .x-tab-strip-active a.x-tab-strip-close {
+    opacity:.8;
+    -moz-opacity:.8;
+}
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+    opacity:1;
+    -moz-opacity:1;
+}
+
+.x-tab-panel-body {
+    border: 1px solid;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background: transparent no-repeat -18px 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    left:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background: transparent no-repeat 0 0;
+    border-bottom: 1px solid;
+    width:18px;
+    position:absolute;
+    right:0;
+    top:0;
+    z-index:10;
+    cursor:pointer;
+}
+
+.x-tab-scroller-right-over {
+    background-position: -18px 0;
+}
+
+.x-tab-scroller-right-disabled {
+    background-position: 0 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{
+    margin-top: 1px;
+}
+
+.x-tab-scrolling .x-tab-strip-wrap {
+    margin-left:18px;
+    margin-right:18px;
+}
+
+.x-tab-scrolling {
+    position:relative;    
+}
+
+.x-tab-panel-bbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
+
+.x-tab-panel-tbar .x-toolbar {
+    border:1px solid;
+    border-top:0 none;
+    overflow:hidden;
+    padding:2px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/toolbar.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/toolbar.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/toolbar.css	(revision 625)
@@ -0,0 +1,259 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-toolbar{
+    border-style:solid;
+    border-width:0 0 1px 0;
+    display: block;
+	padding:2px;
+    background:repeat-x top left;
+    position:relative;
+    left:0;
+    top:0;
+    zoom:1;
+    overflow:hidden;
+}
+
+.x-toolbar .x-item-disabled .x-btn-icon {
+    opacity: .35;
+    -moz-opacity: .35;
+    filter: alpha(opacity=35);
+}
+
+.x-toolbar td {
+	vertical-align:middle;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+	white-space: nowrap;
+}
+
+.x-toolbar .x-item-disabled {
+	cursor:default;
+	opacity:.6;
+	-moz-opacity:.6;
+	filter:alpha(opacity=60);
+}
+
+.x-toolbar .x-item-disabled * {
+	cursor:default;
+}
+
+.x-toolbar .x-toolbar-cell {
+    vertical-align:middle;
+}
+
+.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, 
+.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc
+{
+	background-position: 500px 500px;
+}
+
+/* These rules are duplicated from button.css to give priority of x-toolbar rules above */
+.x-toolbar .x-btn-over .x-btn-tl{
+	background-position: -6px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tr{
+	background-position: -9px 0;
+}
+
+.x-toolbar .x-btn-over .x-btn-tc{
+	background-position: 0 -9px;
+}
+
+.x-toolbar .x-btn-over .x-btn-ml{
+	background-position: -6px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mr{
+	background-position: -9px -24px;
+}
+
+.x-toolbar .x-btn-over .x-btn-mc{
+	background-position: 0 -2168px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bl{
+	background-position: -6px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-br{
+	background-position: -9px -3px;
+}
+
+.x-toolbar .x-btn-over .x-btn-bc{
+	background-position: 0 -18px;
+}
+
+.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{
+	background-position: -12px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{
+	background-position: -15px 0;
+}
+
+.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{
+	background-position: 0 -12px;
+}
+
+.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{
+	background-position: -12px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{
+	background-position: -15px -24px;
+}
+
+.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{
+	background-position: 0 -3240px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{
+	background-position: -12px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{
+	background-position: -15px -3px;
+}
+
+.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{
+	background-position: 0 -21px;
+}
+
+.x-toolbar div.xtb-text{
+    padding:2px 2px 0;
+    line-height:16px;
+    display:block;
+}
+
+.x-toolbar .xtb-sep {
+	background-position: center;
+	background-repeat: no-repeat;
+	display: block;
+	font-size: 1px;
+	height: 16px;
+	width:4px;
+	overflow: hidden;
+	cursor:default;
+	margin: 0 2px 0;
+	border:0;
+}
+
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+
+/* Paging Toolbar */
+.x-tbar-page-number{
+	width:30px;
+	height:14px;
+}
+
+.ext-ie .x-tbar-page-number{
+    margin-top: 2px;
+}
+
+.x-paging-info {
+    position:absolute;
+    top:5px;
+    right: 8px;
+}
+
+/* floating */
+.x-toolbar-ct {
+    width:100%;
+}
+
+.x-toolbar-right td {
+    text-align: center;
+}
+
+.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-toolbar-more .x-btn-small .x-btn-text{
+	height: 16px;
+	width: 12px;
+}
+
+.x-toolbar-more em.x-btn-arrow {
+    display:inline;
+    background:transparent;
+	padding-right:0;
+}
+
+.x-toolbar-more .x-btn-mc em.x-btn-arrow {
+    background-image: none;
+}
+
+div.x-toolbar-no-items {
+    color:gray !important;
+    padding:5px 10px !important;
+}
+
+/* fix ie toolbar form items */
+.ext-border-box .x-toolbar-cell .x-form-text {
+    margin-bottom:-1px !important;
+}
+
+.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text {
+    margin:0 !important;
+}
+
+.ext-ie .x-toolbar-cell .x-form-field-wrap {
+    height:21px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-text {
+    position:relative;
+    top:-1px;
+}
+
+.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text {
+    top: 0px;
+}
+
+.x-toolbar-right td .x-form-field-trigger-wrap{
+    text-align: left;
+}
+
+.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{
+    vertical-align: top;
+    margin-top: 5px;
+}
+
+.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{
+    margin-top: 4px;
+}
+
+.x-toolbar-cell .x-form-check-wrap label{
+    vertical-align: bottom;
+}
+
+/* StatusBar */
+.x-statusbar .x-status-text {
+    height: 21px;
+    line-height: 21px;
+    padding: 0 4px;
+    cursor: default;
+}
+
+.x-statusbar .x-status-busy {
+    padding-left: 25px;
+    background: transparent no-repeat 3px 3px;
+}
+
+.x-statusbar .x-status-text-panel {
+    border-top: 1px solid;
+    border-right: 1px solid;
+    border-bottom: 1px solid;
+    border-left: 1px solid;
+    padding: 2px 8px 2px 5px;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tree.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tree.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/tree.css	(revision 625)
@@ -0,0 +1,203 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ext-strict .ext-ie .x-tree .x-panel-bwrap{
+    position:relative;
+    overflow:hidden;
+}
+
+.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+    background-repeat: no-repeat;
+}
+
+.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{
+	border: 0 none;
+	height: 18px;
+	margin: 0;
+	padding: 0;
+	vertical-align: top;
+	width: 16px;
+	background-position:center;
+    background-repeat: no-repeat;
+}
+
+.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon {
+    vertical-align:middle !important;
+}
+
+/* checkboxes */
+.ext-ie input.x-tree-node-cb {
+    width:15px;
+    height:15px;
+}
+
+input.x-tree-node-cb {
+    margin-left:1px;
+}
+
+.ext-ie input.x-tree-node-cb {
+    margin-left:0;
+}
+
+.x-tree-noicon .x-tree-node-icon{
+	width:0; height:0;
+}
+
+/* loading icon */
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+/* No line styles */
+.x-tree-no-lines .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-no-lines .x-tree-elbow-line{
+	background:transparent;
+}
+
+/* Arrows */
+.x-tree-arrows .x-tree-elbow{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background:transparent no-repeat 0 0;
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background:transparent no-repeat -16px 0;
+}
+
+.x-tree-arrows .x-tree-elbow-line{
+	background:transparent;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{
+    background-position:-32px 0;
+}
+
+.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{
+    background-position:-48px 0;
+}
+
+.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{
+	cursor:pointer;
+}
+
+.ext-ie ul.x-tree-node-ct{
+    font-size:0;
+    line-height:0;
+    zoom:1;
+}
+
+.x-tree-node{
+	white-space: nowrap;
+}
+
+.x-tree-node-el {
+    line-height:18px;
+    cursor:pointer;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	text-decoration:none;
+	-khtml-user-select:none;
+	-moz-user-select:none;
+    -webkit-user-select:ignore;
+    -kthml-user-focus:normal;
+    -moz-user-focus:normal;
+    -moz-outline: 0 none;
+    outline:0 none;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	text-decoration:none;
+	padding:1px 3px 1px 2px;
+}
+
+.x-tree-node .x-tree-node-disabled .x-tree-node-icon{
+	-moz-opacity: 0.5;
+   opacity:.5;
+   filter: alpha(opacity=50);
+}
+
+.x-tree-node .x-tree-node-inline-icon{
+	background:transparent;
+}
+
+.x-tree-node a:hover, .x-dd-drag-ghost a:hover{
+	text-decoration:none;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:1px dotted;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top:1px dotted;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{
+	 border-top:0 none;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom:2px solid;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top:2px solid;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 border:1px dotted;
+}
+
+.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{
+	display:none !important;
+}
+
+/* Fix for ie rootVisible:false issue */
+.x-tree-root-ct {
+    zoom:1;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/window.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/window.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/structure/window.css	(revision 625)
@@ -0,0 +1,222 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-window {
+    zoom:1;
+}
+
+.x-window .x-resizable-handle {
+    opacity:0;
+    -moz-opacity:0;
+    filter:alpha(opacity=0);
+}
+
+.x-window-proxy {
+    border:1px solid;
+    z-index:12000;
+    overflow:hidden;
+    position:absolute;
+    left:0;top:0;
+    display:none;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+}
+
+.x-window-header {
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-window-bwrap {
+    z-index:1;
+    position:relative;
+    zoom:1;
+    left:0;top:0;
+}
+
+.x-window-tl .x-window-header {
+    padding:5px 0 4px 0;
+}
+
+.x-window-header-text {
+    cursor:pointer;
+}
+
+.x-window-tc {
+	background: transparent repeat-x 0 0;
+	overflow:hidden;
+    zoom:1;
+}
+
+.x-window-tl {
+	background: transparent no-repeat 0 0;
+	padding-left:6px;
+    zoom:1;
+    z-index:1;
+    position:relative;
+}
+
+.x-window-tr {
+	background: transparent no-repeat right 0;
+	padding-right:6px;
+}
+
+.x-window-bc {
+	background: transparent repeat-x 0 bottom;
+    zoom:1;
+}
+
+.x-window-bc .x-window-footer {
+    padding-bottom:6px;
+    zoom:1;
+    font-size:0;
+    line-height:0;
+}
+
+.x-window-bl {
+	background: transparent no-repeat 0 bottom;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-br {
+	background: transparent no-repeat right bottom;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-mc {
+    border:1px solid;
+    padding:0;
+    margin:0;
+}
+
+.x-window-ml {
+	background: transparent repeat-y 0 0;
+	padding-left:6px;
+    zoom:1;
+}
+
+.x-window-mr {
+	background: transparent repeat-y right 0;
+	padding-right:6px;
+    zoom:1;
+}
+
+.x-window-body {
+    overflow:hidden;
+}
+
+.x-window-bwrap {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br,
+    .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr,
+    .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr {
+    padding:0;
+}
+
+.x-window-maximized .x-window-footer {
+    padding-bottom:0;
+}
+
+.x-window-maximized .x-window-tc {
+    padding-left:3px;
+    padding-right:3px;
+}
+
+.x-window-maximized .x-window-mc {
+    border-left:0 none;
+    border-right:0 none;
+}
+
+.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar {
+    border-left:0 none;
+    border-right: 0 none;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top:1px solid;
+    border-bottom:0 none;
+}
+
+.x-window-draggable, .x-window-draggable .x-window-header-text {
+    cursor:move;
+}
+
+.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text {
+    cursor:default;
+}
+
+.x-window-body {
+    background:transparent;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom:1px solid;
+}
+
+.x-window-maximized-ct {
+    overflow:hidden;
+}
+
+.x-window-maximized .x-resizable-handle {
+    display:none;
+}
+
+.x-window-sizing-ghost ul {
+    border:0 none !important;
+}
+
+.x-dlg-focus{
+	-moz-outline:0 none;
+	outline:0 none;
+	width:0;
+	height:0;
+	overflow:hidden;
+	position:absolute;
+	top:0;
+	left:0;
+}
+
+.ext-webkit .x-dlg-focus{
+    width: 1px;
+    height: 1px;
+}
+
+.x-dlg-mask{
+    z-index:10000;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+}
+
+body.ext-ie6.x-body-masked select {
+	visibility:hidden;
+}
+
+body.ext-ie6.x-body-masked .x-window select {
+	visibility:visible;
+}
+
+.x-window-plain .x-window-mc {
+    border: 1px solid;
+}
+
+.x-window-plain .x-window-body {
+    border: 1px solid;
+    background:transparent !important;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/borders.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/borders.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/borders.css	(revision 625)
@@ -0,0 +1,25 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel-noborder .x-panel-header-noborder {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/box.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/box.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/box.css	(revision 625)
@@ -0,0 +1,74 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-box-tl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-tc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-tr {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-ml {
+	background-image: url(../images/default/box/l.gif);
+}
+
+.x-box-mc {
+	background-color: #eee;
+    background-image: url(../images/default/box/tb.gif);
+	font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
+	color: #393939;
+	font-size: 12px;
+}
+
+.x-box-mc h3 {
+	font-size: 14px;
+	font-weight: bold;
+}
+
+.x-box-mr {
+	background-image: url(../images/default/box/r.gif);
+}
+
+.x-box-bl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-bc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-br {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
+	background-image: url(../images/default/box/corners-blue.gif);
+}
+
+.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
+	background-image: url(../images/default/box/tb-blue.gif);
+}
+
+.x-box-blue .x-box-mc {
+	background-color: #c3daf9;
+}
+
+.x-box-blue .x-box-mc h3 {
+	color: #17385b;
+}
+
+.x-box-blue .x-box-ml {
+	background-image: url(../images/default/box/l-blue.gif);
+}
+
+.x-box-blue .x-box-mr {
+	background-image: url(../images/default/box/r-blue.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/button.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/button.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/button.css	(revision 625)
@@ -0,0 +1,94 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-btn{
+	font:normal 11px tahoma, verdana, helvetica;
+}
+
+.x-btn button{
+    font:normal 11px arial,tahoma,verdana,helvetica;
+    color:#333;
+}
+
+.x-btn em {
+    font-style:normal;
+    font-weight:normal;
+}
+
+.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{
+	background-image:url(../images/default/button/btn.gif);
+}
+
+.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{
+    color:#000;
+}
+
+.x-btn-disabled *{
+	color:gray !important;
+}
+
+.x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/button/arrow.gif);
+}
+
+.x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-btn-mc em.x-btn-arrow-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-btn-group-header {
+    color: #3e6aaa;
+}
+
+.x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-tl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-tr {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-bc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-bl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-br {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-ml {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+.x-btn-group-mr {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/combo.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/combo.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/combo.css	(revision 625)
@@ -0,0 +1,43 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-combo-list {
+    border-color:#98c0f4;
+    background-color:#ddecfe;
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-combo-list-inner {
+    background-color:#fff;
+}
+
+.x-combo-list-hd {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+    background-image: url(../images/default/layout/panel-title-light-bg.gif);
+    border-bottom-color:#98c0f4;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom-color:#98c0f4;
+}
+
+.x-combo-list-item {
+    border-color:#fff;
+}
+
+.x-combo-list .x-combo-selected{
+	border-color:#a3bae9 !important;
+    background-color:#dfe8f6;
+}
+
+.x-combo-list .x-toolbar {
+    border-top-color:#98c0f4;
+}
+
+.x-combo-list-small {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/core.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/core.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/core.css	(revision 625)
@@ -0,0 +1,76 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ext-el-mask {
+    background-color: #ccc;
+}
+
+.ext-el-mask-msg {
+    border-color:#6593cf;
+    background-color:#c3daf9;
+    background-image:url(../images/default/box/tb-blue.gif);
+}
+.ext-el-mask-msg div {
+    background-color: #eee;
+    border-color:#a3bad9;
+    color:#222;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-mask-loading div {
+    background-color:#fbfbfb;
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-item-disabled {
+    color: gray;
+}
+
+.x-item-disabled * {
+    color: gray !important;
+}
+
+.x-splitbar-proxy {
+    background-color: #aaa;
+}
+
+.x-color-palette a {
+    border-color:#fff;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border-color:#8bb8f3;
+    background-color: #deecfd;
+}
+
+.x-color-palette em {
+    border-color:#aca899;
+}
+
+.x-ie-shadow {
+    background-color:#777;
+}
+
+.x-shadow .xsmc {
+    background-image: url(../images/default/shadow-c.png);
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    background-image: url(../images/default/shadow-lr.png);
+}
+
+.x-shadow .xstl, .x-shadow .xstc,  .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{
+    background-image: url(../images/default/shadow.png);
+}
+
+.loading-indicator {
+    font-size: 11px;
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-spotlight {
+    background-color: #ccc;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/date-picker.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/date-picker.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/date-picker.css	(revision 625)
@@ -0,0 +1,143 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-date-picker {
+    border-color: #1b376c;
+    background-color:#fff;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background-image: url(../images/default/shared/hd-sprite.gif);
+	color:#fff;
+	font:bold 11px "sans serif", tahoma, verdana, helvetica;
+}
+
+.x-date-middle .x-btn .x-btn-text {
+    color:#fff;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/toolbar/btn-arrow-light.gif);
+}
+
+.x-date-right a {
+    background-image: url(../images/default/shared/right-btn.gif);
+}
+
+.x-date-left a{
+	background-image: url(../images/default/shared/left-btn.gif);
+}
+
+.x-date-inner th {
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+	border-bottom-color:#a3bad9;
+    font:normal 10px arial, helvetica,tahoma,sans-serif;
+	color:#233d6d;
+}
+
+.x-date-inner td {
+    border-color:#fff;
+}
+
+.x-date-inner a {
+    font:normal 11px arial, helvetica,tahoma,sans-serif;
+    color:#000;
+}
+
+.x-date-inner .x-date-active{
+	color:#000;
+}
+
+.x-date-inner .x-date-selected a{
+    background-color:#dfecfb;
+	background-image:url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-inner .x-date-today a{
+	border-color:darkred;
+}
+
+.x-date-inner .x-date-selected span{
+    font-weight:bold;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+	color:#aaa;
+}
+
+.x-date-bottom {
+    border-top-color:#a3bad9;
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    color:#000;
+    background-color:#ddecfe;
+}
+
+.x-date-inner .x-date-disabled a {
+	background-color:#eee;
+	color:#bbb;
+}
+
+.x-date-mmenu{
+    background-color:#eee !important;
+}
+
+.x-date-mmenu .x-menu-item {
+	font-size:10px;
+	color:#000;
+}
+
+.x-date-mp {
+	background-color:#fff;
+}
+
+.x-date-mp td {
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns button {
+	background-color:#083772;
+	color:#fff;
+	border-color: #3366cc #000055 #000055 #3366cc;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-mp-btns td {
+	border-top-color: #c5d2df;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	color:#15428b;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	color:#15428b;
+	background-color: #ddecfe;
+}
+
+td.x-date-mp-sel a {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-mp-ybtn a {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+td.x-date-mp-sep {
+   border-right-color:#c5d2df;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dd.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dd.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dd.css	(revision 625)
@@ -0,0 +1,29 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-dd-drag-ghost{
+	color:#000;
+	font: normal 11px arial, helvetica, sans-serif;
+    border-color: #ddd #bbb #bbb #ddd;
+	background-color:#fff;
+}
+
+.x-dd-drop-nodrop .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-no.gif);
+}
+
+.x-dd-drop-ok .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-yes.gif);
+}
+
+.x-dd-drop-ok-add .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-add.gif);
+}
+
+.x-view-selector {
+    background-color:#c3daf9;
+    border-color:#3399bb;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/debug.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/debug.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/debug.css	(revision 625)
@@ -0,0 +1,24 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+#x-debug-browser .x-tree .x-tree-node a span {
+    color:#222297;
+    font-size:11px;
+    font-family:"monotype","courier new",sans-serif;
+}
+
+#x-debug-browser .x-tree a i {
+    color:#ff4545;
+    font-style:normal;
+}
+
+#x-debug-browser .x-tree a em {
+    color:#999;
+}
+
+#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
+    background-color:#c3daf9;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dialog.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dialog.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/dialog.css	(revision 625)
@@ -0,0 +1,34 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-window-dlg .ext-mb-text,
+.x-window-dlg .x-window-header-text {
+    font-size:12px;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    font:normal 12px tahoma,arial,helvetica,sans-serif;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-window-dlg .ext-mb-info {
+    background-image:url(../images/default/window/icon-info.gif);
+}
+
+.x-window-dlg .ext-mb-warning {
+    background-image:url(../images/default/window/icon-warning.gif);
+}
+
+.x-window-dlg .ext-mb-question {
+    background-image:url(../images/default/window/icon-question.gif);
+}
+
+.x-window-dlg .ext-mb-error {
+    background-image:url(../images/default/window/icon-error.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/editor.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/editor.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/editor.css	(revision 625)
@@ -0,0 +1,13 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-html-editor-wrap {
+    border-color:#a9bfd3;
+    background-color:#fff;
+}
+.x-html-editor-tb .x-btn-text {
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/form.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/form.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/form.css	(revision 625)
@@ -0,0 +1,117 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-form-field{
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-text, textarea.x-form-field{
+    background-color:#fff;
+    background-image:url(../images/default/form/text-bg.gif);
+    border-color:#b5b8c8;
+}
+
+.x-form-select-one {
+    background-color:#fff;
+    border-color:#b5b8c8;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid #99bbe8;
+    color: #15428b;
+}
+
+.x-editor .x-form-check-wrap {
+    background-color:#fff;
+}
+
+.x-form-field-wrap .x-form-trigger{
+    background-image:url(../images/default/form/trigger.gif);
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-field-wrap .x-form-date-trigger{
+    background-image: url(../images/default/form/date-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-clear-trigger{
+    background-image: url(../images/default/form/clear-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-search-trigger{
+    background-image: url(../images/default/form/search-trigger.gif);
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom-color:#7eadd9;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-focus, textarea.x-form-focus{
+	border-color:#7eadd9;
+}
+
+.x-form-invalid, textarea.x-form-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+	border-color:#c30;
+}
+
+.ext-safari .x-form-invalid{
+	background-color:#fee;
+	border-color:#ff7870;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+}
+
+.x-form-grow-sizer {
+	font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-item {
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-invalid-msg {
+    color:#c0272b;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    background-image:url(../images/default/shared/warning.gif);
+}
+
+.x-form-empty-field {
+    color:gray;
+}
+
+.x-small-editor .x-form-field {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.ext-safari .x-small-editor .x-form-field {
+    font:normal 12px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-form-invalid-icon {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-fieldset {
+    border-color:#b5b8c8;
+}
+
+.x-fieldset legend {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/grid.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/grid.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/grid.css	(revision 625)
@@ -0,0 +1,272 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-grid3 {
+    background-color:#fff;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border-color:#99bbe8;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-hd-row td {
+    border-left-color:#eee;
+    border-right-color:#d0d0d0;
+}
+
+.x-grid-row-loading {
+    background-color: #fff;
+    background-image:url(../images/default/shared/loading-balls.gif);
+}
+
+.x-grid3-row {
+    border-color:#ededed;
+    border-top-color:#fff;
+}
+
+.x-grid3-row-alt{
+	background-color:#fafafa;
+}
+
+.x-grid3-row-over {
+	border-color:#ddd;
+    background-color:#efefef;
+    background-image:url(../images/default/grid/row-over.gif);
+}
+
+.x-grid3-resize-proxy {
+    background-color:#777;
+}
+
+.x-grid3-resize-marker {
+    background-color:#777;
+}
+
+.x-grid3-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-grid3-header-pop {
+    border-left-color:#d0d0d0;
+}
+
+.x-grid3-header-pop-inner {
+    border-left-color:#eee;
+    background-image:url(../images/default/grid/hd-pop.gif);
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left-color:#aaccf6;
+    border-right-color:#aaccf6;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background-color:#ebf3fd;
+    background-image:url(../images/default/grid/grid3-hrow-over.gif);
+
+}
+
+.sort-asc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_asc.gif);
+}
+
+.sort-desc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_desc.gif);
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	color:#000;
+}
+
+.x-grid3-split {
+	background-image: url(../images/default/grid/grid-split.gif);
+}
+
+.x-grid3-hd-text {
+	color:#15428b;
+}
+
+.x-dd-drag-proxy .x-grid3-hd-inner{
+    background-color:#ebf3fd;
+	background-image:url(../images/default/grid/grid3-hrow-over.gif);
+	border-color:#aaccf6;
+}
+
+.col-move-top{
+	background-image:url(../images/default/grid/col-move-top.gif);
+}
+
+.col-move-bottom{
+	background-image:url(../images/default/grid/col-move-bottom.gif);
+}
+
+.x-grid3-row-selected {
+	background-color: #dfe8f6 !important;
+	background-image: none;
+	border-color:#a3bae9;
+}
+
+.x-grid3-cell-selected{
+	background-color: #b8cfee !important;
+	color:#000;
+}
+
+.x-grid3-cell-selected span{
+	color:#000 !important;
+}
+
+.x-grid3-cell-selected .x-grid3-cell-text{
+	color:#000;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background-color:#ebeadb !important;
+    background-image:url(../images/default/grid/grid-hrow.gif) !important;
+    color:#000;
+    border-top-color:#fff;
+    border-right-color:#6fa0df !important;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    color:#15428b !important;
+}
+
+.x-grid3-dirty-cell {
+    background-image:url(../images/default/grid/dirty.gif);
+}
+
+.x-grid3-topbar, .x-grid3-bottombar{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-top-color:#a9bfd3;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important;
+    color:#000 !important;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    background-color:#fff !important;
+    border-right-color:#eee;
+}
+
+.xg-hmenu-sort-asc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-asc.gif);
+}
+
+.xg-hmenu-sort-desc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-desc.gif);
+}
+
+.xg-hmenu-lock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-lock.gif);
+}
+
+.xg-hmenu-unlock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-unlock.gif);
+}
+
+.x-grid3-hd-btn {
+    background-color:#c3daf9;
+    background-image:url(../images/default/grid/grid3-hd-btn.gif);
+}
+
+.x-grid3-body .x-grid3-td-expander {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-expander {
+    background-image:url(../images/default/grid/row-expand-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-checker {
+    background-image: url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    background-image:url(../images/default/grid/row-check-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+	color:#444;
+}
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif);
+}
+
+.x-grid3-check-col {
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-grid3-check-col-on {
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom-color:#99bbe8;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-collapse.gif);
+    color:#3764a0;
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-expand.gif);
+}
+
+.x-group-by-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-cols-icon {
+    background-image:url(../images/default/grid/columns.gif);
+}
+
+.x-show-groups-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-grid-empty {
+    color:gray;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    border-right-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row{
+    border-top-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row-selected {
+	border-top-color:#a3bae9;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/layout.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/layout.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/layout.css	(revision 625)
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-border-layout-ct {
+    background-color:#dfe8f6;
+}
+
+.x-accordion-hd {
+	color:#222;
+    font-weight:normal;
+    background-image: url(../images/default/panel/light-hd.gif);
+}
+
+.x-layout-collapsed{
+    background-color:#d2e0f2;
+	border-color:#98c0f4;
+}
+
+.x-layout-collapsed-over{
+    background-color:#d9e8fb;
+}
+
+.x-layout-split-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+.x-layout-split-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+.x-layout-split-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+.x-layout-split-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/list-view.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/list-view.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/list-view.css	(revision 625)
@@ -0,0 +1,37 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-list-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-list-header-inner div em {
+    border-left-color:#ddd;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-body dt em {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-over {
+    background-color:#eee;
+}
+
+.x-list-selected {
+    background-color:#dfe8f6;
+}
+
+.x-list-resizer {
+    border-left-color:#555;
+    border-right-color:#555;
+}
+
+.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc {
+    background-image:url(../images/default/grid/sort-hd.gif);
+    border-color: #99bbe8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/menu.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/menu.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/menu.css	(revision 625)
@@ -0,0 +1,82 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-menu {
+    background-color:#f0f0f0;
+	background-image:url(../images/default/menu/menu.gif);
+}
+
+.x-menu-floating{
+    border-color:#718bb7;
+}
+
+.x-menu-nosep {
+	background-image:none;
+}
+
+.x-menu-list-item{
+	font:normal 11px arial,tahoma,sans-serif;
+}
+
+.x-menu-item-arrow{
+	background-image:url(../images/default/menu/menu-parent.gif);
+}
+
+.x-menu-sep {
+    background-color:#e0e0e0;
+	border-bottom-color:#fff;
+}
+
+a.x-menu-item {
+	color:#222;
+}
+
+.x-menu-item-active {
+    background-image: url(../images/default/menu/item-over.gif);
+	background-color: #dbecf4;
+    border-color:#aaccf6;
+}
+
+.x-menu-item-active a.x-menu-item {
+	border-color:#aaccf6;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-menu-item-checked .x-menu-item-icon{
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background-image:url(../images/default/menu/group-checked.gif);
+}
+
+.x-menu-group-item .x-menu-item-icon{
+    background-image:none;
+}
+
+.x-menu-plain {
+	background-color:#fff !important;
+}
+
+.x-menu .x-date-picker{
+    border-color:#a3bad9;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border-color:#a3bae9 !important;
+    background-color:#def8f6;
+}
+
+.x-menu-scroller-top {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+
+.x-menu-scroller-bottom {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/panel.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/panel.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/panel.css	(revision 625)
@@ -0,0 +1,87 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-panel {
+    border-color: #99bbe8;
+}
+
+.x-panel-header {
+    color:#15428b;
+	font-weight:bold; 
+    font-size: 11px;
+    font-family: tahoma,arial,verdana,sans-serif;
+    border-color:#99bbe8;
+    background-image: url(../images/default/panel/white-top-bottom.gif);
+}
+
+.x-panel-body {
+    border-color:#99bbe8;
+    background-color:#fff;
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-tl .x-panel-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-panel-tc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-tl, .x-panel-tr, .x-panel-bl,  .x-panel-br{
+	background-image: url(../images/default/panel/corners-sprite.gif);
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-bc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-panel-ml {
+	background-color: #fff;
+    background-image:url(../images/default/panel/left-right.gif);
+}
+
+.x-panel-mr {
+	background-image: url(../images/default/panel/left-right.gif);
+}
+
+.x-tool {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+.x-panel-ghost {
+    background-color:#cbddf3;
+}
+
+.x-panel-ghost ul {
+    border-color:#99bbe8;
+}
+
+.x-panel-dd-spacer {
+    border-color:#99bbe8;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/progress.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/progress.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/progress.css	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-progress-wrap {
+    border-color:#6593cf;
+}
+
+.x-progress-inner {
+    background-color:#e0e8f3;
+    background-image:url(../images/default/qtip/bg.gif);
+}
+
+.x-progress-bar {
+    background-color:#9cbfee;
+    background-image:url(../images/default/progress/progress-bg.gif);
+    border-top-color:#d1e4fd;
+    border-bottom-color:#7fa9e4;
+    border-right-color:#7fa9e4;
+}
+
+.x-progress-text {
+    font-size:11px;
+    font-weight:bold;
+    color:#fff;
+}
+
+.x-progress-text-back {
+    color:#396095;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/qtips.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/qtips.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/qtips.css	(revision 625)
@@ -0,0 +1,44 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tip .x-tip-close{
+	background-image: url(../images/default/qtip/close.gif);
+}
+
+.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr {
+	background-image: url(../images/default/qtip/tip-sprite.gif);
+}
+
+.x-tip .x-tip-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+}
+.x-tip .x-tip-ml {
+	background-color: #fff;
+}
+
+.x-tip .x-tip-header-text {
+    font: bold 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-tip .x-tip-body {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc,
+.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr
+{
+	background-image: url(../images/default/form/error-tip-corners.gif);
+}
+
+.x-form-invalid-tip .x-tip-body {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-tip-anchor {
+    background-image:url(../images/default/qtip/tip-anchor-sprite.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/resizable.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/resizable.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/resizable.css	(revision 625)
@@ -0,0 +1,43 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-resizable-handle {
+	background-color:#fff;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+    background-image:url(../images/default/sizer/e-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-image:url(../images/default/sizer/se-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-image:url(../images/default/sizer/nw-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-image:url(../images/default/sizer/ne-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-image:url(../images/default/sizer/sw-handle.gif);
+}
+.x-resizable-proxy{
+    border-color:#3b5a82;
+}
+.x-resizable-overlay{
+    background-color:#fff;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/slider.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/slider.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/slider.css	(revision 625)
@@ -0,0 +1,21 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner {
+    background-image:url(../images/default/slider/slider-bg.png);
+}
+
+.x-slider-horz .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-thumb.png);
+}
+
+.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner {
+    background-image:url(../images/default/slider/slider-v-bg.png);
+}
+
+.x-slider-vert .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-v-thumb.png);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tabs.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tabs.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tabs.css	(revision 625)
@@ -0,0 +1,119 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tab-panel-header, .x-tab-panel-footer {
+	background-color: #deecfd;
+	border-color:#8db2e3;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border-color:#8db2e3;
+}
+
+ul.x-tab-strip-top{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-bg.gif);
+	border-bottom-color:#8db2e3;
+}
+
+ul.x-tab-strip-bottom{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-btm-bg.gif);
+	border-top-color:#8db2e3;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-color:#8db2e3;
+    background-color: #deecfd;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	font:normal 11px tahoma,arial,helvetica;
+	color:#416aa3;
+}
+
+.x-tab-strip-over span.x-tab-strip-text {
+	color:#15428b;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	color:#15428b;
+    font-weight:bold;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	color:#aaaaaa;
+}
+
+.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{
+	background-image: url(../images/default/tabs/tabs-sprite.gif);
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-left-bg.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-panel-body {
+    border-color:#8db2e3;
+    background-color:#fff;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background-image:url(../images/default/tabs/scroll-left.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background-image:url(../images/default/tabs/scroll-right.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/toolbar.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/toolbar.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/toolbar.css	(revision 625)
@@ -0,0 +1,103 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-toolbar{
+	border-color:#a9bfd3;
+    background-color:#d0def0;
+    background-image:url(../images/default/toolbar/bg.gif);
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
+
+.x-toolbar .x-item-disabled {
+	color:gray;
+}
+
+.x-toolbar .x-item-disabled * {
+	color:gray;
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split 
+{
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom 
+{
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-toolbar .xtb-sep {
+	background-image: url(../images/default/grid/grid-blue-split.gif);
+}
+
+.x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first.gif) !important;
+}
+
+.x-tbar-loading{
+	background-image: url(../images/default/grid/refresh.gif) !important;
+}
+
+.x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last.gif) !important;
+}
+
+.x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next.gif) !important;
+}
+
+.x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev.gif) !important;
+}
+
+.x-item-disabled .x-tbar-loading{
+	background-image: url(../images/default/grid/loading.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev-disabled.gif) !important;
+}
+
+.x-paging-info {
+    color:#444;
+}
+
+.x-toolbar-more-icon {
+    background-image: url(../images/default/toolbar/more.gif) !important;
+}
+
+.x-statusbar .x-status-busy {
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-statusbar .x-status-text-panel {
+    border-color: #99bbe8 #fff #fff #99bbe8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tree.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tree.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/tree.css	(revision 625)
@@ -0,0 +1,157 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-tree-node-expanded .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder-open.gif);
+}
+
+.x-tree-node-leaf .x-tree-node-icon{
+	background-image:url(../images/default/tree/leaf.gif);
+}
+
+.x-tree-node-collapsed .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder.gif);
+}
+
+.x-tree-node-loading .x-tree-node-icon{
+	background-image:url(../images/default/tree/loading.gif) !important;
+}
+
+.x-tree-node .x-tree-node-inline-icon {
+    background-image: none;
+}
+
+.x-tree-node-loading a span{
+	 font-style: italic;
+	 color:#444444;
+}
+
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+.x-tree-lines .x-tree-elbow{
+	background-image:url(../images/default/tree/elbow.gif);
+}
+
+.x-tree-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end{
+	background-image:url(../images/default/tree/elbow-end.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-line{
+	background-image:url(../images/default/tree/elbow-line.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus-nl.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-node{
+	color:#000;
+	font: normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	color:#000;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	color:#000;
+}
+
+.x-tree-node .x-tree-node-disabled a span{
+	color:gray !important;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top-color:#36c;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 background-color:#ddd;
+	 border-color:gray;
+}
+
+.x-tree-node .x-tree-node-over {
+	background-color: #eee;
+}
+
+.x-tree-node .x-tree-selected {
+	background-color: #d9e8fb;
+}
+
+.x-tree-drop-ok-append .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-add.gif);
+}
+
+.x-tree-drop-ok-above .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-over.gif);
+}
+
+.x-tree-drop-ok-below .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-under.gif);
+}
+
+.x-tree-drop-ok-between .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-between.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/window.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/window.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/visual/window.css	(revision 625)
@@ -0,0 +1,86 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.x-window-proxy {
+    background-color:#c7dffc;
+    border-color:#99bbe8;
+}
+
+.x-window-tl .x-window-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-window-tc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-tl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-tr {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-bc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-bl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-br {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-mc {
+    border-color:#99bbe8;
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-window-ml {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-mr {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-maximized .x-window-tc {
+    background-color:#fff;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom-color:#84a0c4;
+}
+
+.x-dlg-mask{
+   background-color:#ccc;
+}
+
+.x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+    border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9;
+}
+
+.x-window-plain .x-window-body {
+    border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6;
+}
+
+body.x-body-masked .x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/resources/css/xtheme-blue.css
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/resources/css/xtheme-blue.css	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/resources/css/xtheme-blue.css	(revision 625)
@@ -0,0 +1,1652 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+.ext-el-mask {
+    background-color: #ccc;
+}
+
+.ext-el-mask-msg {
+    border-color:#6593cf;
+    background-color:#c3daf9;
+    background-image:url(../images/default/box/tb-blue.gif);
+}
+.ext-el-mask-msg div {
+    background-color: #eee;
+    border-color:#a3bad9;
+    color:#222;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-mask-loading div {
+    background-color:#fbfbfb;
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-item-disabled {
+    color: gray;
+}
+
+.x-item-disabled * {
+    color: gray !important;
+}
+
+.x-splitbar-proxy {
+    background-color: #aaa;
+}
+
+.x-color-palette a {
+    border-color:#fff;
+}
+
+.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
+    border-color:#8bb8f3;
+    background-color: #deecfd;
+}
+
+.x-color-palette em {
+    border-color:#aca899;
+}
+
+.x-ie-shadow {
+    background-color:#777;
+}
+
+.x-shadow .xsmc {
+    background-image: url(../images/default/shadow-c.png);
+}
+
+.x-shadow .xsml, .x-shadow .xsmr {
+    background-image: url(../images/default/shadow-lr.png);
+}
+
+.x-shadow .xstl, .x-shadow .xstc,  .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{
+    background-image: url(../images/default/shadow.png);
+}
+
+.loading-indicator {
+    font-size: 11px;
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-spotlight {
+    background-color: #ccc;
+}
+.x-tab-panel-header, .x-tab-panel-footer {
+	background-color: #deecfd;
+	border-color:#8db2e3;
+    overflow:hidden;
+    zoom:1;
+}
+
+.x-tab-panel-header, .x-tab-panel-footer {
+	border-color:#8db2e3;
+}
+
+ul.x-tab-strip-top{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-bg.gif);
+	border-bottom-color:#8db2e3;
+}
+
+ul.x-tab-strip-bottom{
+    background-color:#cedff5;
+	background-image: url(../images/default/tabs/tab-strip-btm-bg.gif);
+	border-top-color:#8db2e3;
+}
+
+.x-tab-panel-header-plain .x-tab-strip-spacer,
+.x-tab-panel-footer-plain .x-tab-strip-spacer {
+    border-color:#8db2e3;
+    background-color: #deecfd;
+}
+
+.x-tab-strip span.x-tab-strip-text {
+	font:normal 11px tahoma,arial,helvetica;
+	color:#416aa3;
+}
+
+.x-tab-strip-over span.x-tab-strip-text {
+	color:#15428b;
+}
+
+.x-tab-strip-active span.x-tab-strip-text {
+	color:#15428b;
+    font-weight:bold;
+}
+
+.x-tab-strip-disabled .x-tabs-text {
+	color:#aaaaaa;
+}
+
+.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{
+	background-image: url(../images/default/tabs/tabs-sprite.gif);
+}
+
+.x-tab-strip-bottom .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
+	background-image: url(../images/default/tabs/tab-btm-right-bg.gif);
+}
+
+.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
+	background-image: url(../images/default/tabs/tab-btm-left-bg.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
+	background-image:url(../images/default/tabs/tab-close.gif);
+}
+
+.x-tab-panel-body {
+    border-color:#8db2e3;
+    background-color:#fff;
+}
+
+.x-tab-panel-body-top {
+    border-top: 0 none;
+}
+
+.x-tab-panel-body-bottom {
+    border-bottom: 0 none;
+}
+
+.x-tab-scroller-left {
+    background-image:url(../images/default/tabs/scroll-left.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-scroller-left-over {
+    background-position: 0 0;
+}
+
+.x-tab-scroller-left-disabled {
+    background-position: -18px 0;
+    opacity:.5;
+    -moz-opacity:.5;
+    filter:alpha(opacity=50);
+    cursor:default;
+}
+
+.x-tab-scroller-right {
+    background-image:url(../images/default/tabs/scroll-right.gif);
+    border-bottom-color:#8db2e3;
+}
+
+.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}.x-form-field{
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-text, textarea.x-form-field{
+    background-color:#fff;
+    background-image:url(../images/default/form/text-bg.gif);
+    border-color:#b5b8c8;
+}
+
+.x-form-select-one {
+    background-color:#fff;
+    border-color:#b5b8c8;
+}
+
+.x-form-check-group-label {
+    border-bottom: 1px solid #99bbe8;
+    color: #15428b;
+}
+
+.x-editor .x-form-check-wrap {
+    background-color:#fff;
+}
+
+.x-form-field-wrap .x-form-trigger{
+    background-image:url(../images/default/form/trigger.gif);
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-field-wrap .x-form-date-trigger{
+    background-image: url(../images/default/form/date-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-clear-trigger{
+    background-image: url(../images/default/form/clear-trigger.gif);
+}
+
+.x-form-field-wrap .x-form-search-trigger{
+    background-image: url(../images/default/form/search-trigger.gif);
+}
+
+.x-trigger-wrap-focus .x-form-trigger{
+    border-bottom-color:#7eadd9;
+}
+
+.x-item-disabled .x-form-trigger-over{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-item-disabled .x-form-trigger-click{
+    border-bottom-color:#b5b8c8;
+}
+
+.x-form-focus, textarea.x-form-focus{
+	border-color:#7eadd9;
+}
+
+.x-form-invalid, textarea.x-form-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+	border-color:#c30;
+}
+
+.ext-safari .x-form-invalid{
+	background-color:#fee;
+	border-color:#ff7870;
+}
+
+.x-form-inner-invalid, textarea.x-form-inner-invalid{
+    background-color:#fff;
+	background-image:url(../images/default/grid/invalid_line.gif);
+}
+
+.x-form-grow-sizer {
+	font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-item {
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-form-invalid-msg {
+    color:#c0272b;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+    background-image:url(../images/default/shared/warning.gif);
+}
+
+.x-form-empty-field {
+    color:gray;
+}
+
+.x-small-editor .x-form-field {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.ext-safari .x-small-editor .x-form-field {
+    font:normal 12px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-form-invalid-icon {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-fieldset {
+    border-color:#b5b8c8;
+}
+
+.x-fieldset legend {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+}
+.x-btn{
+	font:normal 11px tahoma, verdana, helvetica;
+}
+
+.x-btn button{
+    font:normal 11px arial,tahoma,verdana,helvetica;
+    color:#333;
+}
+
+.x-btn em {
+    font-style:normal;
+    font-weight:normal;
+}
+
+.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{
+	background-image:url(../images/default/button/btn.gif);
+}
+
+.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{
+    color:#000;
+}
+
+.x-btn-disabled *{
+	color:gray !important;
+}
+
+.x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/button/arrow.gif);
+}
+
+.x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-btn-mc em.x-btn-arrow-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b.gif);
+}
+
+.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-btn-group-header {
+    color: #3e6aaa;
+}
+
+.x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-tl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-tr {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-bc {
+	background-image: url(../images/default/button/group-tb.gif);
+}
+
+.x-btn-group-bl {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-br {
+	background-image: url(../images/default/button/group-cs.gif);
+}
+
+.x-btn-group-ml {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+.x-btn-group-mr {
+	background-image: url(../images/default/button/group-lr.gif);
+}
+
+.x-btn-group-notitle .x-btn-group-tc {
+	background-image: url(../images/default/button/group-tb.gif);
+}.x-toolbar{
+	border-color:#a9bfd3;
+    background-color:#d0def0;
+    background-image:url(../images/default/toolbar/bg.gif);
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
+
+.x-toolbar .x-item-disabled {
+	color:gray;
+}
+
+.x-toolbar .x-item-disabled * {
+	color:gray;
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split {
+    background-image:url(../images/default/button/s-arrow-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split 
+{
+    background-image:url(../images/default/button/s-arrow-o.gif);
+}
+
+.x-toolbar .x-btn-mc em.x-btn-split-bottom {
+    background-image:url(../images/default/button/s-arrow-b-noline.gif);
+}
+
+.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, 
+.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom 
+{
+    background-image:url(../images/default/button/s-arrow-bo.gif);
+}
+
+.x-toolbar .xtb-sep {
+	background-image: url(../images/default/grid/grid-blue-split.gif);
+}
+
+.x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first.gif) !important;
+}
+
+.x-tbar-loading{
+	background-image: url(../images/default/grid/refresh.gif) !important;
+}
+
+.x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last.gif) !important;
+}
+
+.x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next.gif) !important;
+}
+
+.x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev.gif) !important;
+}
+
+.x-item-disabled .x-tbar-loading{
+	background-image: url(../images/default/grid/loading.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-first{
+	background-image: url(../images/default/grid/page-first-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-last{
+	background-image: url(../images/default/grid/page-last-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-next{
+	background-image: url(../images/default/grid/page-next-disabled.gif) !important;
+}
+
+.x-item-disabled .x-tbar-page-prev{
+	background-image: url(../images/default/grid/page-prev-disabled.gif) !important;
+}
+
+.x-paging-info {
+    color:#444;
+}
+
+.x-toolbar-more-icon {
+    background-image: url(../images/default/toolbar/more.gif) !important;
+}
+
+.x-statusbar .x-status-busy {
+    background-image: url(../images/default/grid/loading.gif);
+}
+
+.x-statusbar .x-status-text-panel {
+    border-color: #99bbe8 #fff #fff #99bbe8;
+}.x-resizable-handle {
+	background-color:#fff;
+}
+
+.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east,
+.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west
+{
+    background-image:url(../images/default/sizer/e-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south,
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north
+{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+
+.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{
+    background-image:url(../images/default/sizer/s-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{
+    background-image:url(../images/default/sizer/se-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{
+    background-image:url(../images/default/sizer/nw-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{
+    background-image:url(../images/default/sizer/ne-handle.gif);
+}
+.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{
+    background-image:url(../images/default/sizer/sw-handle.gif);
+}
+.x-resizable-proxy{
+    border-color:#3b5a82;
+}
+.x-resizable-overlay{
+    background-color:#fff;
+}
+.x-grid3 {
+    background-color:#fff;
+}
+
+.x-grid-panel .x-panel-mc .x-panel-body {
+    border-color:#99bbe8;
+}
+
+.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-hd-row td {
+    border-left-color:#eee;
+    border-right-color:#d0d0d0;
+}
+
+.x-grid-row-loading {
+    background-color: #fff;
+    background-image:url(../images/default/shared/loading-balls.gif);
+}
+
+.x-grid3-row {
+    border-color:#ededed;
+    border-top-color:#fff;
+}
+
+.x-grid3-row-alt{
+	background-color:#fafafa;
+}
+
+.x-grid3-row-over {
+	border-color:#ddd;
+    background-color:#efefef;
+    background-image:url(../images/default/grid/row-over.gif);
+}
+
+.x-grid3-resize-proxy {
+    background-color:#777;
+}
+
+.x-grid3-resize-marker {
+    background-color:#777;
+}
+
+.x-grid3-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-grid3-header-pop {
+    border-left-color:#d0d0d0;
+}
+
+.x-grid3-header-pop-inner {
+    border-left-color:#eee;
+    background-image:url(../images/default/grid/hd-pop.gif);
+}
+
+td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open {
+    border-left-color:#aaccf6;
+    border-right-color:#aaccf6;
+}
+
+td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner {
+    background-color:#ebf3fd;
+    background-image:url(../images/default/grid/grid3-hrow-over.gif);
+
+}
+
+.sort-asc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_asc.gif);
+}
+
+.sort-desc .x-grid3-sort-icon {
+	background-image: url(../images/default/grid/sort_desc.gif);
+}
+
+.x-grid3-cell-text, .x-grid3-hd-text {
+	color:#000;
+}
+
+.x-grid3-split {
+	background-image: url(../images/default/grid/grid-split.gif);
+}
+
+.x-grid3-hd-text {
+	color:#15428b;
+}
+
+.x-dd-drag-proxy .x-grid3-hd-inner{
+    background-color:#ebf3fd;
+	background-image:url(../images/default/grid/grid3-hrow-over.gif);
+	border-color:#aaccf6;
+}
+
+.col-move-top{
+	background-image:url(../images/default/grid/col-move-top.gif);
+}
+
+.col-move-bottom{
+	background-image:url(../images/default/grid/col-move-bottom.gif);
+}
+
+.x-grid3-row-selected {
+	background-color: #dfe8f6 !important;
+	background-image: none;
+	border-color:#a3bae9;
+}
+
+.x-grid3-cell-selected{
+	background-color: #b8cfee !important;
+	color:#000;
+}
+
+.x-grid3-cell-selected span{
+	color:#000 !important;
+}
+
+.x-grid3-cell-selected .x-grid3-cell-text{
+	color:#000;
+}
+
+.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{
+    background-color:#ebeadb !important;
+    background-image:url(../images/default/grid/grid-hrow.gif) !important;
+    color:#000;
+    border-top-color:#fff;
+    border-right-color:#6fa0df !important;
+}
+
+.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{
+    color:#15428b !important;
+}
+
+.x-grid3-dirty-cell {
+    background-image:url(../images/default/grid/dirty.gif);
+}
+
+.x-grid3-topbar, .x-grid3-bottombar{
+	font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-grid3-bottombar .x-toolbar{
+	border-top-color:#a9bfd3;
+}
+
+.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{
+	background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important;
+    color:#000 !important;
+}
+
+.x-props-grid .x-grid3-body .x-grid3-td-name{
+    background-color:#fff !important;
+    border-right-color:#eee;
+}
+
+.xg-hmenu-sort-asc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-asc.gif);
+}
+
+.xg-hmenu-sort-desc .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-desc.gif);
+}
+
+.xg-hmenu-lock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-lock.gif);
+}
+
+.xg-hmenu-unlock .x-menu-item-icon{
+	background-image: url(../images/default/grid/hmenu-unlock.gif);
+}
+
+.x-grid3-hd-btn {
+    background-color:#c3daf9;
+    background-image:url(../images/default/grid/grid3-hd-btn.gif);
+}
+
+.x-grid3-body .x-grid3-td-expander {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-expander {
+    background-image:url(../images/default/grid/row-expand-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-checker {
+    background-image: url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-row-checker, .x-grid3-hd-checker {
+    background-image:url(../images/default/grid/row-check-sprite.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner {
+	color:#444;
+}
+
+.x-grid3-body .x-grid3-td-row-icon {
+    background-image:url(../images/default/grid/grid3-special-col-bg.gif);
+}
+
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,
+.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander {
+	background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif);
+}
+
+.x-grid3-check-col {
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-grid3-check-col-on {
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-grid-group, .x-grid-group-body, .x-grid-group-hd {
+    zoom:1;
+}
+
+.x-grid-group-hd {
+    border-bottom-color:#99bbe8;
+}
+
+.x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-collapse.gif);
+    color:#3764a0;
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title {
+    background-image:url(../images/default/grid/group-expand.gif);
+}
+
+.x-group-by-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-cols-icon {
+    background-image:url(../images/default/grid/columns.gif);
+}
+
+.x-show-groups-icon {
+    background-image:url(../images/default/grid/group-by.gif);
+}
+
+.x-grid-empty {
+    color:gray;
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell {
+    border-right-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row{
+    border-top-color:#ededed;
+}
+
+.x-grid-with-col-lines .x-grid3-row-selected {
+	border-top-color:#a3bae9;
+}.x-dd-drag-ghost{
+	color:#000;
+	font: normal 11px arial, helvetica, sans-serif;
+    border-color: #ddd #bbb #bbb #ddd;
+	background-color:#fff;
+}
+
+.x-dd-drop-nodrop .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-no.gif);
+}
+
+.x-dd-drop-ok .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-yes.gif);
+}
+
+.x-dd-drop-ok-add .x-dd-drop-icon{
+  background-image: url(../images/default/dd/drop-add.gif);
+}
+
+.x-view-selector {
+    background-color:#c3daf9;
+    border-color:#3399bb;
+}.x-tree-node-expanded .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder-open.gif);
+}
+
+.x-tree-node-leaf .x-tree-node-icon{
+	background-image:url(../images/default/tree/leaf.gif);
+}
+
+.x-tree-node-collapsed .x-tree-node-icon{
+	background-image:url(../images/default/tree/folder.gif);
+}
+
+.x-tree-node-loading .x-tree-node-icon{
+	background-image:url(../images/default/tree/loading.gif) !important;
+}
+
+.x-tree-node .x-tree-node-inline-icon {
+    background-image: none;
+}
+
+.x-tree-node-loading a span{
+	 font-style: italic;
+	 color:#444444;
+}
+
+.ext-ie .x-tree-node-el input {
+    width:15px;
+    height:15px;
+}
+
+.x-tree-lines .x-tree-elbow{
+	background-image:url(../images/default/tree/elbow.gif);
+}
+
+.x-tree-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end{
+	background-image:url(../images/default/tree/elbow-end.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus.gif);
+}
+
+.x-tree-lines .x-tree-elbow-line{
+	background-image:url(../images/default/tree/elbow-line.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-plus{
+	background-image:url(../images/default/tree/elbow-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-minus{
+	background-image:url(../images/default/tree/elbow-minus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-plus{
+	background-image:url(../images/default/tree/elbow-end-plus-nl.gif);
+}
+
+.x-tree-no-lines .x-tree-elbow-end-minus{
+	background-image:url(../images/default/tree/elbow-end-minus-nl.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-plus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-arrows .x-tree-elbow-end-minus{
+    background-image:url(../images/default/tree/arrows.gif);
+}
+
+.x-tree-node{
+	color:#000;
+	font: normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-tree-node a, .x-dd-drag-ghost a{
+	color:#000;
+}
+
+.x-tree-node a span, .x-dd-drag-ghost a span{
+	color:#000;
+}
+
+.x-tree-node .x-tree-node-disabled a span{
+	color:gray !important;
+}
+
+.x-tree-node div.x-tree-drag-insert-below{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-node div.x-tree-drag-insert-above{
+	 border-top-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{
+ 	 border-bottom-color:#36c;
+}
+
+.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{
+	 border-top-color:#36c;
+}
+
+.x-tree-node .x-tree-drag-append a span{
+	 background-color:#ddd;
+	 border-color:gray;
+}
+
+.x-tree-node .x-tree-node-over {
+	background-color: #eee;
+}
+
+.x-tree-node .x-tree-selected {
+	background-color: #d9e8fb;
+}
+
+.x-tree-drop-ok-append .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-add.gif);
+}
+
+.x-tree-drop-ok-above .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-over.gif);
+}
+
+.x-tree-drop-ok-below .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-under.gif);
+}
+
+.x-tree-drop-ok-between .x-dd-drop-icon{
+  background-image: url(../images/default/tree/drop-between.gif);
+}.x-date-picker {
+    border-color: #1b376c;
+    background-color:#fff;
+}
+
+.x-date-middle,.x-date-left,.x-date-right {
+	background-image: url(../images/default/shared/hd-sprite.gif);
+	color:#fff;
+	font:bold 11px "sans serif", tahoma, verdana, helvetica;
+}
+
+.x-date-middle .x-btn .x-btn-text {
+    color:#fff;
+}
+
+.x-date-middle .x-btn-mc em.x-btn-arrow {
+    background-image:url(../images/default/toolbar/btn-arrow-light.gif);
+}
+
+.x-date-right a {
+    background-image: url(../images/default/shared/right-btn.gif);
+}
+
+.x-date-left a{
+	background-image: url(../images/default/shared/left-btn.gif);
+}
+
+.x-date-inner th {
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+	border-bottom-color:#a3bad9;
+    font:normal 10px arial, helvetica,tahoma,sans-serif;
+	color:#233d6d;
+}
+
+.x-date-inner td {
+    border-color:#fff;
+}
+
+.x-date-inner a {
+    font:normal 11px arial, helvetica,tahoma,sans-serif;
+    color:#000;
+}
+
+.x-date-inner .x-date-active{
+	color:#000;
+}
+
+.x-date-inner .x-date-selected a{
+    background-color:#dfecfb;
+	background-image:url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-inner .x-date-today a{
+	border-color:darkred;
+}
+
+.x-date-inner .x-date-selected span{
+    font-weight:bold;
+}
+
+.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
+	color:#aaa;
+}
+
+.x-date-bottom {
+    border-top-color:#a3bad9;
+    background-color:#dfecfb;
+    background-image:url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
+    color:#000;
+    background-color:#ddecfe;
+}
+
+.x-date-inner .x-date-disabled a {
+	background-color:#eee;
+	color:#bbb;
+}
+
+.x-date-mmenu{
+    background-color:#eee !important;
+}
+
+.x-date-mmenu .x-menu-item {
+	font-size:10px;
+	color:#000;
+}
+
+.x-date-mp {
+	background-color:#fff;
+}
+
+.x-date-mp td {
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns button {
+	background-color:#083772;
+	color:#fff;
+	border-color: #3366cc #000055 #000055 #3366cc;
+	font:normal 11px arial, helvetica,tahoma,sans-serif;
+}
+
+.x-date-mp-btns {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+}
+
+.x-date-mp-btns td {
+	border-top-color: #c5d2df;
+}
+
+td.x-date-mp-month a,td.x-date-mp-year a {
+	color:#15428b;
+}
+
+td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
+	color:#15428b;
+	background-color: #ddecfe;
+}
+
+td.x-date-mp-sel a {
+    background-color: #dfecfb;
+	background-image: url(../images/default/shared/glass-bg.gif);
+	border-color:#8db2e3;
+}
+
+.x-date-mp-ybtn a {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+td.x-date-mp-sep {
+   border-right-color:#c5d2df;
+}.x-tip .x-tip-close{
+	background-image: url(../images/default/qtip/close.gif);
+}
+
+.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr {
+	background-image: url(../images/default/qtip/tip-sprite.gif);
+}
+
+.x-tip .x-tip-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+}
+.x-tip .x-tip-ml {
+	background-color: #fff;
+}
+
+.x-tip .x-tip-header-text {
+    font: bold 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-tip .x-tip-body {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    color:#444;
+}
+
+.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc,
+.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr
+{
+	background-image: url(../images/default/form/error-tip-corners.gif);
+}
+
+.x-form-invalid-tip .x-tip-body {
+    background-image:url(../images/default/form/exclamation.gif);
+}
+
+.x-tip-anchor {
+    background-image:url(../images/default/qtip/tip-anchor-sprite.gif);
+}.x-menu {
+    background-color:#f0f0f0;
+	background-image:url(../images/default/menu/menu.gif);
+}
+
+.x-menu-floating{
+    border-color:#718bb7;
+}
+
+.x-menu-nosep {
+	background-image:none;
+}
+
+.x-menu-list-item{
+	font:normal 11px arial,tahoma,sans-serif;
+}
+
+.x-menu-item-arrow{
+	background-image:url(../images/default/menu/menu-parent.gif);
+}
+
+.x-menu-sep {
+    background-color:#e0e0e0;
+	border-bottom-color:#fff;
+}
+
+a.x-menu-item {
+	color:#222;
+}
+
+.x-menu-item-active {
+    background-image: url(../images/default/menu/item-over.gif);
+	background-color: #dbecf4;
+    border-color:#aaccf6;
+}
+
+.x-menu-item-active a.x-menu-item {
+	border-color:#aaccf6;
+}
+
+.x-menu-check-item .x-menu-item-icon{
+	background-image:url(../images/default/menu/unchecked.gif);
+}
+
+.x-menu-item-checked .x-menu-item-icon{
+	background-image:url(../images/default/menu/checked.gif);
+}
+
+.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{
+    background-image:url(../images/default/menu/group-checked.gif);
+}
+
+.x-menu-group-item .x-menu-item-icon{
+    background-image:none;
+}
+
+.x-menu-plain {
+	background-color:#fff !important;
+}
+
+.x-menu .x-date-picker{
+    border-color:#a3bad9;
+}
+
+.x-cycle-menu .x-menu-item-checked {
+    border-color:#a3bae9 !important;
+    background-color:#def8f6;
+}
+
+.x-menu-scroller-top {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+
+.x-menu-scroller-bottom {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+.x-box-tl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-tc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-tr {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-ml {
+	background-image: url(../images/default/box/l.gif);
+}
+
+.x-box-mc {
+	background-color: #eee;
+    background-image: url(../images/default/box/tb.gif);
+	font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
+	color: #393939;
+	font-size: 12px;
+}
+
+.x-box-mc h3 {
+	font-size: 14px;
+	font-weight: bold;
+}
+
+.x-box-mr {
+	background-image: url(../images/default/box/r.gif);
+}
+
+.x-box-bl {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-bc {
+	background-image: url(../images/default/box/tb.gif);
+}
+
+.x-box-br {
+	background-image: url(../images/default/box/corners.gif);
+}
+
+.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
+	background-image: url(../images/default/box/corners-blue.gif);
+}
+
+.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
+	background-image: url(../images/default/box/tb-blue.gif);
+}
+
+.x-box-blue .x-box-mc {
+	background-color: #c3daf9;
+}
+
+.x-box-blue .x-box-mc h3 {
+	color: #17385b;
+}
+
+.x-box-blue .x-box-ml {
+	background-image: url(../images/default/box/l-blue.gif);
+}
+
+.x-box-blue .x-box-mr {
+	background-image: url(../images/default/box/r-blue.gif);
+}#x-debug-browser .x-tree .x-tree-node a span {
+    color:#222297;
+    font-size:11px;
+    font-family:"monotype","courier new",sans-serif;
+}
+
+#x-debug-browser .x-tree a i {
+    color:#ff4545;
+    font-style:normal;
+}
+
+#x-debug-browser .x-tree a em {
+    color:#999;
+}
+
+#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
+    background-color:#c3daf9;
+}.x-combo-list {
+    border-color:#98c0f4;
+    background-color:#ddecfe;
+    font:normal 12px tahoma, arial, helvetica, sans-serif;
+}
+
+.x-combo-list-inner {
+    background-color:#fff;
+}
+
+.x-combo-list-hd {
+    font:bold 11px tahoma, arial, helvetica, sans-serif;
+    color:#15428b;
+    background-image: url(../images/default/layout/panel-title-light-bg.gif);
+    border-bottom-color:#98c0f4;
+}
+
+.x-resizable-pinned .x-combo-list-inner {
+    border-bottom-color:#98c0f4;
+}
+
+.x-combo-list-item {
+    border-color:#fff;
+}
+
+.x-combo-list .x-combo-selected{
+	border-color:#a3bae9 !important;
+    background-color:#dfe8f6;
+}
+
+.x-combo-list .x-toolbar {
+    border-top-color:#98c0f4;
+}
+
+.x-combo-list-small {
+    font:normal 11px tahoma, arial, helvetica, sans-serif;
+}.x-panel {
+    border-color: #99bbe8;
+}
+
+.x-panel-header {
+    color:#15428b;
+	font-weight:bold; 
+    font-size: 11px;
+    font-family: tahoma,arial,verdana,sans-serif;
+    border-color:#99bbe8;
+    background-image: url(../images/default/panel/white-top-bottom.gif);
+}
+
+.x-panel-body {
+    border-color:#99bbe8;
+    background-color:#fff;
+}
+
+.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar {
+    border-color:#99bbe8;
+}
+
+.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-body-noheader, .x-panel-mc .x-panel-body {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-tl .x-panel-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-panel-tc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-tl, .x-panel-tr, .x-panel-bl,  .x-panel-br{
+	background-image: url(../images/default/panel/corners-sprite.gif);
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-bc {
+	background-image: url(../images/default/panel/top-bottom.gif);
+}
+
+.x-panel-mc {
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-panel-ml {
+	background-color: #fff;
+    background-image:url(../images/default/panel/left-right.gif);
+}
+
+.x-panel-mr {
+	background-image: url(../images/default/panel/left-right.gif);
+}
+
+.x-tool {
+    background-image:url(../images/default/panel/tool-sprites.gif);
+}
+
+.x-panel-ghost {
+    background-color:#cbddf3;
+}
+
+.x-panel-ghost ul {
+    border-color:#99bbe8;
+}
+
+.x-panel-dd-spacer {
+    border-color:#99bbe8;
+}
+
+.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{
+    font:normal 11px arial,tahoma, helvetica, sans-serif;
+}
+.x-window-proxy {
+    background-color:#c7dffc;
+    border-color:#99bbe8;
+}
+
+.x-window-tl .x-window-header {
+    color:#15428b;
+	font:bold 11px tahoma,arial,verdana,sans-serif;
+}
+
+.x-window-tc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-tl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-tr {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-bc {
+	background-image: url(../images/default/window/top-bottom.png);
+}
+
+.x-window-bl {
+	background-image: url(../images/default/window/left-corners.png);
+}
+
+.x-window-br {
+	background-image: url(../images/default/window/right-corners.png);
+}
+
+.x-window-mc {
+    border-color:#99bbe8;
+    font: normal 11px tahoma,arial,helvetica,sans-serif;
+    background-color:#dfe8f6;
+}
+
+.x-window-ml {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-mr {
+	background-image: url(../images/default/window/left-right.png);
+}
+
+.x-window-maximized .x-window-tc {
+    background-color:#fff;
+}
+
+.x-window-bbar .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-panel-ghost .x-window-tl {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-collapsed .x-window-tl {
+    border-bottom-color:#84a0c4;
+}
+
+.x-dlg-mask{
+   background-color:#ccc;
+}
+
+.x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+    border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9;
+}
+
+.x-window-plain .x-window-body {
+    border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6;
+}
+
+body.x-body-masked .x-window-plain .x-window-mc {
+    background-color: #ccd9e8;
+}.x-html-editor-wrap {
+    border-color:#a9bfd3;
+    background-color:#fff;
+}
+.x-html-editor-tb .x-btn-text {
+    background-image:url(../images/default/editor/tb-sprite.gif);
+}.x-panel-noborder .x-panel-header-noborder {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}
+
+.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-bbar-noborder .x-toolbar {
+    border-top-color:#99bbe8;
+}
+
+.x-tab-panel-tbar-noborder .x-toolbar {
+    border-bottom-color:#99bbe8;
+}.x-border-layout-ct {
+    background-color:#dfe8f6;
+}
+
+.x-accordion-hd {
+	color:#222;
+    font-weight:normal;
+    background-image: url(../images/default/panel/light-hd.gif);
+}
+
+.x-layout-collapsed{
+    background-color:#d2e0f2;
+	border-color:#98c0f4;
+}
+
+.x-layout-collapsed-over{
+    background-color:#d9e8fb;
+}
+
+.x-layout-split-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+.x-layout-split-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+.x-layout-split-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}
+.x-layout-split-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-west .x-layout-mini {
+    background-image:url(../images/default/layout/mini-right.gif);
+}
+
+.x-layout-cmini-east .x-layout-mini {
+    background-image:url(../images/default/layout/mini-left.gif);
+}
+
+.x-layout-cmini-north .x-layout-mini {
+    background-image:url(../images/default/layout/mini-bottom.gif);
+}
+
+.x-layout-cmini-south .x-layout-mini {
+    background-image:url(../images/default/layout/mini-top.gif);
+}.x-progress-wrap {
+    border-color:#6593cf;
+}
+
+.x-progress-inner {
+    background-color:#e0e8f3;
+    background-image:url(../images/default/qtip/bg.gif);
+}
+
+.x-progress-bar {
+    background-color:#9cbfee;
+    background-image:url(../images/default/progress/progress-bg.gif);
+    border-top-color:#d1e4fd;
+    border-bottom-color:#7fa9e4;
+    border-right-color:#7fa9e4;
+}
+
+.x-progress-text {
+    font-size:11px;
+    font-weight:bold;
+    color:#fff;
+}
+
+.x-progress-text-back {
+    color:#396095;
+}.x-list-header{
+    background-color:#f9f9f9;
+	background-image:url(../images/default/grid/grid3-hrow.gif);
+}
+
+.x-list-header-inner div em {
+    border-left-color:#ddd;
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-body dt em {
+    font:normal 11px arial, tahoma, helvetica, sans-serif;
+}
+
+.x-list-over {
+    background-color:#eee;
+}
+
+.x-list-selected {
+    background-color:#dfe8f6;
+}
+
+.x-list-resizer {
+    border-left-color:#555;
+    border-right-color:#555;
+}
+
+.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc {
+    background-image:url(../images/default/grid/sort-hd.gif);
+    border-color: #99bbe8;
+}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner {
+    background-image:url(../images/default/slider/slider-bg.png);
+}
+
+.x-slider-horz .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-thumb.png);
+}
+
+.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner {
+    background-image:url(../images/default/slider/slider-v-bg.png);
+}
+
+.x-slider-vert .x-slider-thumb {
+    background-image:url(../images/default/slider/slider-v-thumb.png);
+}.x-window-dlg .ext-mb-text,
+.x-window-dlg .x-window-header-text {
+    font-size:12px;
+}
+
+.x-window-dlg .ext-mb-textarea {
+    font:normal 12px tahoma,arial,helvetica,sans-serif;
+}
+
+.x-window-dlg .x-msg-box-wait {
+    background-image:url(../images/default/grid/loading.gif);
+}
+
+.x-window-dlg .ext-mb-info {
+    background-image:url(../images/default/window/icon-info.gif);
+}
+
+.x-window-dlg .ext-mb-warning {
+    background-image:url(../images/default/window/icon-warning.gif);
+}
+
+.x-window-dlg .ext-mb-question {
+    background-image:url(../images/default/window/icon-question.gif);
+}
+
+.x-window-dlg .ext-mb-error {
+    background-image:url(../images/default/window/icon-error.gif);
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-ajax.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-ajax.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-ajax.js	(revision 625)
@@ -0,0 +1,371 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * 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.Ajax = function() {	    
+	    var activeX = ['MSXML2.XMLHTTP.3.0',
+			           'MSXML2.XMLHTTP',
+			           'Microsoft.XMLHTTP'],
+            CONTENTTYPE = 'Content-Type';
+			           
+		// private
+		function setHeader(o) {
+	        var conn = o.conn,
+	        	prop;
+	        
+	        function setTheHeaders(conn, headers){
+		     	for (prop in headers) {
+                    if (headers.hasOwnProperty(prop)) {
+                        conn.setRequestHeader(prop, headers[prop]);
+                    }
+                }   
+	        }		
+	        
+            if (pub.defaultHeaders) {
+	            setTheHeaders(conn, pub.defaultHeaders);
+            }
+
+            if (pub.headers) {
+				setTheHeaders(conn, pub.headers);
+                pub.headers = null;                
+            }
+        }    
+        
+        // private
+        function createExceptionObject(tId, callbackArg, isAbort, isTimeout) {	        
+            return {
+	            tId : tId,
+	            status : isAbort ? -1 : 0,
+	            statusText : isAbort ? 'transaction aborted' : 'communication failure',
+                    isAbort: true,
+                    isTimeout: true,
+	            argument : callbackArg
+            };
+        }  
+        
+        // private 
+        function initHeader(label, value) {         
+			(pub.headers = pub.headers || {})[label] = value;			            
+        }
+	    
+        // private
+        function createResponseObject(o, callbackArg) {
+            var headerObj = {},
+                headerStr,              
+                conn = o.conn,
+                t,
+                s;
+
+            try {
+                headerStr = o.conn.getAllResponseHeaders();   
+                Ext.each(headerStr.replace(/\r\n/g, '\n').split('\n'), function(v){
+                    t = v.indexOf(':');
+                    if(t >= 0){
+                        s = v.substr(0, t).toLowerCase();
+                        if(v.charAt(t + 1) == ' '){
+                            ++t;
+                        }
+                        headerObj[s] = v.substr(t + 1);
+                    }
+                });
+            } catch(e) {}
+                        
+            return {
+                tId : o.tId,
+                status : conn.status,
+                statusText : conn.statusText,
+                getResponseHeader : function(header){return headerObj[header.toLowerCase()];},
+                getAllResponseHeaders : function(){return headerStr},
+                responseText : conn.responseText,
+                responseXML : conn.responseXML,
+                argument : callbackArg
+            };
+        }
+        
+        // private
+        function releaseObject(o) {
+            o.conn = null;
+            o = null;
+        }        
+	    
+        // private
+        function handleTransactionResponse(o, callback, isAbort, isTimeout) {
+            if (!callback) {
+                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) || (Ext.isIE && httpStatus == 1223)) {
+                responseObject = 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 = createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false), isTimeout);
+                        if (callback.failure) {
+                            if (!callback.scope) {
+                                callback.failure(responseObject);
+                            }
+                            else {
+                                callback.failure.apply(callback.scope, [responseObject]);
+                            }
+                        }
+                        break;
+                    default:
+                        responseObject = createResponseObject(o, callback.argument);
+                        if (callback.failure) {
+                            if (!callback.scope) {
+                                callback.failure(responseObject);
+                            }
+                            else {
+                                callback.failure.apply(callback.scope, [responseObject]);
+                            }
+                        }
+                }
+            }
+
+            releaseObject(o);
+            responseObject = null;
+        }  
+        
+        // private
+        function handleReadyState(o, callback){
+	    callback = callback || {};
+            var conn = o.conn,
+            	tId = o.tId,
+            	poll = pub.poll,
+		cbTimeout = callback.timeout || null;
+
+            if (cbTimeout) {
+                pub.timeout[tId] = setTimeout(function() {
+                    pub.abort(o, callback, true);
+                }, cbTimeout);
+            }
+
+            poll[tId] = setInterval(
+                function() {
+                    if (conn && conn.readyState == 4) {
+                        clearInterval(poll[tId]);
+                        poll[tId] = null;
+
+                        if (cbTimeout) {
+                            clearTimeout(pub.timeout[tId]);
+                            pub.timeout[tId] = null;
+                        }
+
+                        handleTransactionResponse(o, callback);
+                    }
+                },
+                pub.pollInterval);
+        }
+        
+        // private
+        function asyncRequest(method, uri, callback, postData) {
+            var o = getConnectionObject() || null;
+
+            if (o) {
+                o.conn.open(method, uri, true);
+
+                if (pub.useDefaultXhrHeader) {                    
+                	initHeader('X-Requested-With', pub.defaultXhrHeader);
+                }
+
+                if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])){
+                    initHeader(CONTENTTYPE, pub.defaultPostHeader);
+                }
+
+                if (pub.defaultHeaders || pub.headers) {
+                    setHeader(o);
+                }
+
+                handleReadyState(o, callback);
+                o.conn.send(postData || null);
+            }
+            return o;
+        }
+        
+        // private
+        function getConnectionObject() {
+            var o;      	
+
+            try {
+                if (o = createXhrObject(pub.transactionId)) {
+                    pub.transactionId++;
+                }
+            } catch(e) {
+            } finally {
+                return o;
+            }
+        }
+	       
+        // private
+        function createXhrObject(transactionId) {
+            var http;
+            	
+            try {
+                http = new XMLHttpRequest();                
+            } catch(e) {
+                for (var i = 0; i < activeX.length; ++i) {	            
+                    try {
+                        http = new ActiveXObject(activeX[i]);                        
+                        break;
+                    } catch(e) {}
+                }
+            } finally {
+                return {conn : http, tId : transactionId};
+            }
+        }
+	         
+	    var pub = {
+	        request : function(method, uri, cb, data, options) {
+			    if(options){
+			        var me = this,		        
+			        	xmlData = options.xmlData,
+			        	jsonData = options.jsonData,
+                        hs;
+			        	
+			        Ext.applyIf(me, options);	        
+		            
+		            if(xmlData || jsonData){
+                        hs = me.headers;
+                        if(!hs || !hs[CONTENTTYPE]){
+			                initHeader(CONTENTTYPE, xmlData ? 'text/xml' : 'application/json');
+                        }
+			            data = xmlData || (Ext.isObject(jsonData) ? Ext.encode(jsonData) : jsonData);
+			        }
+			    }		    		    
+			    return asyncRequest(method || options.method || "POST", uri, cb, data);
+	        },
+	
+	        serializeForm : function(form) {
+		        var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements,
+	            	hasSubmit = false,
+	            	encoder = encodeURIComponent,
+		        	element,
+	            	options, 
+	            	name, 
+	            	val,             	
+	            	data = '',
+	            	type;
+	            	
+		        Ext.each(fElements, function(element) {		            
+	                name = element.name;	             
+					type = element.type;
+					
+	                if (!element.disabled && name){
+		                if(/select-(one|multiple)/i.test(type)){			                
+				            Ext.each(element.options, function(opt) {
+					            if (opt.selected) {
+						            data += String.format("{0}={1}&", 						            					  
+						            					 encoder(name),						            					 
+						            					  (opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified) ? opt.value : opt.text);
+                                }								
+                            });
+		                } else if(!/file|undefined|reset|button/i.test(type)) {
+			                if(!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)){
+                                    
+                                data += encoder(name) + '=' + encoder(element.value) + '&';                     
+                                hasSubmit = /submit/i.test(type);    
+                            } 		                
+		                } 
+	                }
+	            });            
+	            return data.substr(0, data.length - 1);
+	        },
+	        
+	        useDefaultHeader : true,
+	        defaultPostHeader : 'application/x-www-form-urlencoded; charset=UTF-8',
+	        useDefaultXhrHeader : true,
+	        defaultXhrHeader : 'XMLHttpRequest',        
+	        poll : {},
+	        timeout : {},
+	        pollInterval : 50,
+	        transactionId : 0,
+	        
+//	This is never called - Is it worth exposing this?  		        
+// 	        setProgId : function(id) {
+// 	            activeX.unshift(id);
+// 	        },
+
+//	This is never called - Is it worth exposing this?  	
+// 	        setDefaultPostHeader : function(b) {
+// 	            this.useDefaultHeader = b;
+// 	        },
+	        
+//	This is never called - Is it worth exposing this?  	
+// 	        setDefaultXhrHeader : function(b) {
+// 	            this.useDefaultXhrHeader = b;
+// 	        },
+
+//	This is never called - Is it worth exposing this?        	
+// 	        setPollingInterval : function(i) {
+// 	            if (typeof i == 'number' && isFinite(i)) {
+// 	                this.pollInterval = i;
+// 	            }
+// 	        },
+	        
+//	This is never called - Is it worth exposing this?
+// 	        resetDefaultHeaders : function() {
+// 	            this.defaultHeaders = null;
+// 	        },
+	
+	        abort : function(o, callback, isTimeout) {
+		        var me = this,
+		        	tId = o.tId,
+		        	isAbort = false;
+		        
+	            if (me.isCallInProgress(o)) {
+	                o.conn.abort();
+	                clearInterval(me.poll[tId]);
+	               	me.poll[tId] = null;
+	                if (isTimeout) {
+	                    me.timeout[tId] = null;
+	                }
+					
+	                handleTransactionResponse(o, callback, (isAbort = true), isTimeout);                
+	            }
+	            return isAbort;
+	        },
+	
+	        isCallInProgress : function(o) {
+	            // if there is a connection and readyState is not 0 or 4
+	            return o.conn && !{0:true,4:true}[o.conn.readyState];	        
+	        }
+	    };
+	    return pub;
+    }();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim-extra.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim-extra.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim-extra.js	(revision 625)
@@ -0,0 +1,301 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// Easing functions
+(function(){
+	// shortcuts to aid compression
+	var abs = Math.abs,
+	 	pi = Math.PI,
+	 	asin = Math.asin,
+	 	pow = Math.pow,
+	 	sin = Math.sin,
+		EXTLIB = Ext.lib;
+	 	
+    Ext.apply(EXTLIB.Easing, {
+        
+        easeBoth: function (t, b, c, d) {
+	        return ((t /= d / 2) < 1)  ?  c / 2 * t * t + b  :  -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) {
+            return ((t /= d / 2) < 1)  ?  c / 2 * t * t * t * t + b  :  -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+        },
+
+        elasticIn: function (t, b, c, d, a, p) {
+	        if (t == 0 || (t /= d) == 1) {
+                return t == 0 ? b : b + c;
+            }	            
+            p = p || (d * .3);	            
+
+			var s;
+			if (a >= abs(c)) {
+				s = p / (2 * pi) * asin(c / a);
+			} else {
+				a = c;
+				s = p / 4;
+			}
+	
+            return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b;
+            	      
+        }, 	
+	
+		elasticOut: function (t, b, c, d, a, p) {
+	        if (t == 0 || (t /= d) == 1) {
+                return t == 0 ? b : b + c;
+            }	            
+            p = p || (d * .3);	            
+
+			var s;
+			if (a >= abs(c)) {
+				s = p / (2 * pi) * asin(c / a);
+			} else {
+				a = c;
+				s = p / 4;
+			}
+	
+            return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b;	 
+        }, 	
+	
+        elasticBoth: function (t, b, c, d, a, p) {
+            if (t == 0 || (t /= d / 2) == 2) {
+                return t == 0 ? b : b + c;
+            }		         	
+	            
+            p = p || (d * (.3 * 1.5)); 	            
+
+            var s;
+            if (a >= abs(c)) {
+	            s = p / (2 * pi) * asin(c / a);
+            } else {
+	            a = c;
+                s = p / 4;
+            }
+
+            return t < 1 ?
+            	   	-.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b :
+                    a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b;
+        },
+
+        backIn: function (t, b, c, d, s) {
+            s = s ||  1.70158; 	            
+            return c * (t /= d) * t * ((s + 1) * t - s) + b;
+        },
+
+
+        backOut: function (t, b, c, d, s) {
+            if (!s) {
+                s = 1.70158;
+            }
+            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
+        },
+
+
+        backBoth: function (t, b, c, d, s) {
+            s = s || 1.70158; 	            
+
+            return ((t /= d / 2 ) < 1) ?
+                    c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : 	            
+            		c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
+        },
+
+
+        bounceIn: function (t, b, c, d) {
+            return c - EXTLIB.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) {
+            return (t < d / 2) ?
+                   EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : 
+            	   EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
+        }
+    });
+})();
+
+(function() {
+    var EXTLIB = Ext.lib;
+	// Color Animation
+	EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) {
+	    return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim);
+	}
+	
+    EXTLIB.ColorAnim = function(el, attributes, duration, method) {
+        EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+    };
+
+    Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase);
+
+    var superclass = EXTLIB.ColorAnim.superclass,
+    	colorRE = /color$/i,
+    	transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/,
+        rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,
+        hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,
+        hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,
+        isset = function(v){
+            return typeof v !== 'undefined';
+        }
+         	
+   	// private	
+    function parseColor(s) {	
+        var pi = parseInt,
+            base,
+            out = null,
+            c;
+        
+	    if (s.length == 3) {
+            return s;
+        }
+        
+        Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){
+            base = (idx % 2 == 0) ? 16 : 10;
+            c = re.exec(s);
+            if(c && c.length == 4){
+                out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)];
+                return false;
+            }
+        });
+        return out;
+    }	
+
+    Ext.apply(EXTLIB.ColorAnim.prototype, {
+        getAttr : function(attr) {
+            var me = this,
+                el = me.el,
+                val;                
+            if(colorRE.test(attr)){
+                while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){
+                    el = el.parentNode;
+                    val = "fff";
+                }
+            }else{
+                val = superclass.getAttr.call(me, attr);
+            }
+            return val;
+        },
+
+        doMethod : function(attr, start, end) {
+            var me = this,
+            	val,
+            	floor = Math.floor;            
+
+            if(colorRE.test(attr)){
+                val = [];
+             
+	            Ext.each(start, function(v, i) {
+                    val[i] = superclass.doMethod.call(me, attr, v, end[i]);
+                });
+
+                val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')';
+            }else{
+                val = superclass.doMethod.call(me, attr, start, end);
+            }
+            return val;
+        },
+
+        setRunAttr : function(attr) {
+            var me = this,
+                a = me.attributes[attr],
+                to = a.to,
+                by = a.by,
+                ra;
+                
+            superclass.setRunAttr.call(me, attr);
+            ra = me.runAttrs[attr];
+            if(colorRE.test(attr)){
+                var start = parseColor(ra.start),
+                    end = parseColor(ra.end);
+
+                if(!isset(to) && isset(by)){
+                    end = parseColor(by);
+                    Ext.each(start, function(item, i){
+                        end[i] = item + end[i];
+                    });
+                }
+                ra.start = start;
+                ra.end = end;
+            }
+        }
+	});
+})();	
+
+	
+(function() {
+	    // Scroll Animation	
+    var EXTLIB = Ext.lib;
+	EXTLIB.Anim.scroll = function(el, args, duration, easing, cb, scope) {	        
+	    return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.Scroll);
+	}
+	
+    EXTLIB.Scroll = function(el, attributes, duration, method) {
+        if(el){
+            EXTLIB.Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+        }
+    };
+
+    Ext.extend(EXTLIB.Scroll, EXTLIB.ColorAnim);
+
+    var superclass = EXTLIB.Scroll.superclass,
+    	SCROLL = 'scroll';
+
+    Ext.apply(EXTLIB.Scroll.prototype, {
+
+        doMethod : function(attr, start, end) {
+            var val,
+            	me = this,
+            	curFrame = me.curFrame,
+            	totalFrames = me.totalFrames;
+
+            if(attr == SCROLL){
+                val = [me.method(curFrame, start[0], end[0] - start[0], totalFrames),
+                       me.method(curFrame, start[1], end[1] - start[1], totalFrames)];
+            }else{
+                val = superclass.doMethod.call(me, attr, start, end);
+            }
+            return val;
+        },
+
+        getAttr : function(attr) {
+            var me = this;
+
+            if (attr == SCROLL) {
+                return [me.el.scrollLeft, me.el.scrollTop];
+            }else{
+                return superclass.getAttr.call(me, attr);
+            }
+        },
+
+        setAttr : function(attr, val, unit) {
+            var me = this;
+
+            if(attr == SCROLL){
+                me.el.scrollLeft = val[0];
+                me.el.scrollTop = val[1];
+            }else{
+                superclass.setAttr.call(me, attr, val, unit);
+            }
+        }
+    });
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-anim.js	(revision 625)
@@ -0,0 +1,477 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){    
+    var EXTLIB = Ext.lib,
+        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,
+        isset = function(v){
+            return typeof v !== 'undefined';
+        },
+        now = function(){
+            return new Date();    
+        };
+        
+    EXTLIB.Anim = {
+        motion : function(el, args, duration, easing, cb, scope) {
+            return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion);
+        },
+
+        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() {
+                if(Ext.isFunction(cb)){
+                    cb.call(scope);
+                }
+            });
+            return anim;
+        }
+    };
+    
+    EXTLIB.AnimBase = function(el, attributes, duration, method) {
+        if (el) {
+            this.init(el, attributes, duration, method);
+        }
+    };
+
+    EXTLIB.AnimBase.prototype = {
+        doMethod: function(attr, start, end) {
+            var me = this;
+            return me.method(me.curFrame, start, end - start, me.totalFrames);
+        },
+
+
+        setAttr: function(attr, val, unit) {
+            if (noNegatives.test(attr) && val < 0) {
+                val = 0;
+            }
+            Ext.fly(this.el, '_anim').setStyle(attr, val + unit);
+        },
+
+
+        getAttr: function(attr) {
+            var el = Ext.fly(this.el),
+                val = el.getStyle(attr),
+                a = offsetAttribute.exec(attr) || []
+
+            if (val !== 'auto' && !offsetUnit.test(val)) {
+                return parseFloat(val);
+            }
+
+            return (!!(a[2]) || (el.getStyle('position') == 'absolute' && !!(a[3]))) ? el.dom['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)] : 0;
+        },
+
+
+        getDefaultUnit: function(attr) {
+            return defaultUnit.test(attr) ? 'px' : '';
+        },
+
+        animateX : function(callback, scope) {
+            var me = this,
+                f = function() {
+                me.onComplete.removeListener(f);
+                if (Ext.isFunction(callback)) {
+                    callback.call(scope || me, me);
+                }
+            };
+            me.onComplete.addListener(f, me);
+            me.animate();
+        },
+
+
+        setRunAttr: function(attr) {            
+            var me = this,
+                a = this.attributes[attr],
+                to = a.to,
+                by = a.by,
+                from = a.from,
+                unit = a.unit,
+                ra = (this.runAttrs[attr] = {}),
+                end;
+
+            if (!isset(to) && !isset(by)){
+                return false;
+            }
+
+            var start = isset(from) ? from : me.getAttr(attr);
+            if (isset(to)) {
+                end = to;
+            }else if(isset(by)) {
+                if (Ext.isArray(start)){
+                    end = [];
+                    Ext.each(start, function(v, i){
+                        end[i] = v + by[i];
+                    });
+                }else{
+                    end = start + by;
+                }
+            }
+
+            Ext.apply(ra, {
+                start: start,
+                end: end,
+                unit: isset(unit) ? unit : me.getDefaultUnit(attr)
+            });
+        },
+
+
+        init: function(el, attributes, duration, method) {
+            var me = this,
+                actualFrames = 0,
+                mgr = EXTLIB.AnimMgr;
+                
+            Ext.apply(me, {
+                isAnimated: false,
+                startTime: null,
+                el: Ext.getDom(el),
+                attributes: attributes || {},
+                duration: duration || 1,
+                method: method || EXTLIB.Easing.easeNone,
+                useSec: true,
+                curFrame: 0,
+                totalFrames: mgr.fps,
+                runAttrs: {},
+                animate: function(){
+                    var me = this,
+                        d = me.duration;
+                    
+                    if(me.isAnimated){
+                        return false;
+                    }
+
+                    me.curFrame = 0;
+                    me.totalFrames = me.useSec ? Math.ceil(mgr.fps * d) : d;
+                    mgr.registerElement(me); 
+                },
+                
+                stop: function(finish){
+                    var me = this;
+                
+                    if(finish){
+                        me.curFrame = me.totalFrames;
+                        me._onTween.fire();
+                    }
+                    mgr.stop(me);
+                }
+            });
+
+            var onStart = function(){
+                var me = this,
+                    attr;
+                
+                me.onStart.fire();
+                me.runAttrs = {};
+                for(attr in this.attributes){
+                    this.setRunAttr(attr);
+                }
+
+                me.isAnimated = true;
+                me.startTime = now();
+                actualFrames = 0;
+            };
+
+
+            var onTween = function(){
+                var me = this;
+
+                me.onTween.fire({
+                    duration: now() - me.startTime,
+                    curFrame: me.curFrame
+                });
+
+                var ra = me.runAttrs;
+                for (var attr in ra) {
+                    this.setAttr(attr, me.doMethod(attr, ra[attr].start, ra[attr].end), ra[attr].unit);
+                }
+
+                ++actualFrames;
+            };
+
+            var onComplete = function() {
+                var me = this,
+                    actual = (now() - me.startTime) / 1000,
+                    data = {
+                        duration: actual,
+                        frames: actualFrames,
+                        fps: actualFrames / actual
+                    };
+
+                me.isAnimated = false;
+                actualFrames = 0;
+                me.onComplete.fire(data);
+            };
+
+            me.onStart = new Ext.util.Event(me);
+            me.onTween = new Ext.util.Event(me);            
+            me.onComplete = new Ext.util.Event(me);
+            (me._onStart = new Ext.util.Event(me)).addListener(onStart);
+            (me._onTween = new Ext.util.Event(me)).addListener(onTween);
+            (me._onComplete = new Ext.util.Event(me)).addListener(onComplete); 
+        }
+    };
+
+
+    Ext.lib.AnimMgr = new function() {
+        var me = this,
+            thread = null,
+            queue = [],
+            tweenCount = 0;
+
+
+        Ext.apply(me, {
+            fps: 1000,
+            delay: 1,
+            registerElement: function(tween){
+                queue.push(tween);
+                ++tweenCount;
+                tween._onStart.fire();
+                me.start();
+            },
+            
+            unRegister: function(tween, index){
+                tween._onComplete.fire();
+                index = index || getIndex(tween);
+                if (index != -1) {
+                    queue.splice(index, 1);
+                }
+
+                if (--tweenCount <= 0) {
+                    me.stop();
+                }
+            },
+            
+            start: function(){
+                if(thread === null){
+                    thread = setInterval(me.run, me.delay);
+                }
+            },
+            
+            stop: function(tween){
+                if(!tween){
+                    clearInterval(thread);
+                    for(var i = 0, len = queue.length; i < len; ++i){
+                        if(queue[0].isAnimated){
+                            me.unRegister(queue[0], 0);
+                        }
+                    }
+
+                    queue = [];
+                    thread = null;
+                    tweenCount = 0;
+                }else{
+                    me.unRegister(tween);
+                }
+            },
+            
+            run: function(){
+                var tf;
+                Ext.each(queue, function(tween){
+                    if(tween && tween.isAnimated){
+                        tf = tween.totalFrames;
+                        if(tween.curFrame < tf || tf === null){
+                            ++tween.curFrame;
+                            if(tween.useSec){
+                                correctFrame(tween);
+                            }
+                            tween._onTween.fire();
+                        }else{
+                            me.stop(tween);
+                        }
+                    }
+                }, me);
+            }
+        });
+
+        var getIndex = function(anim) {
+            var out = -1;
+            Ext.each(queue, function(item, idx){
+                if(item == anim){
+                    out = idx;
+                    return false;
+                }
+            });
+            return out;
+        };
+
+
+        var correctFrame = function(tween) {
+            var frames = tween.totalFrames,
+                frame = tween.curFrame,
+                duration = tween.duration,
+                expected = (frame * duration * 1000 / frames),
+                elapsed = (now() - tween.startTime),
+                tweak = 0;
+
+            if(elapsed < duration * 1000){
+                tweak = Math.round((elapsed / expected - 1) * frame);
+            }else{
+                tweak = frames - (frame + 1);
+            }
+            if(tweak > 0 && isFinite(tweak)){
+                if(tween.curFrame + tweak >= frames){
+                    tweak = frames - (frame + 1);
+                }
+                tween.curFrame += tweak;
+            }
+        };
+    };
+
+    EXTLIB.Bezier = new function() {
+
+        this.getPosition = function(points, t) {
+            var n = points.length,
+                tmp = [],
+                c = 1 - t, 
+                i,
+                j;
+
+            for (i = 0; i < n; ++i) {
+                tmp[i] = [points[i][0], points[i][1]];
+            }
+
+            for (j = 1; j < n; ++j) {
+                for (i = 0; i < n - j; ++i) {
+                    tmp[i][0] = c * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];
+                    tmp[i][1] = c * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1];
+                }
+            }
+
+            return [ tmp[0][0], tmp[0][1] ];
+
+        };
+    };
+
+
+    EXTLIB.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;
+        }
+    };
+
+    (function() {
+        EXTLIB.Motion = function(el, attributes, duration, method) {
+            if (el) {
+                EXTLIB.Motion.superclass.constructor.call(this, el, attributes, duration, method);
+            }
+        };
+
+        Ext.extend(EXTLIB.Motion, Ext.lib.AnimBase);
+
+        var superclass = EXTLIB.Motion.superclass,
+            proto = EXTLIB.Motion.prototype,
+            pointsRe = /^points$/i;
+
+        Ext.apply(EXTLIB.Motion.prototype, {
+            setAttr: function(attr, val, unit){
+                var me = this,
+                    setAttr = superclass.setAttr;
+                    
+                if (pointsRe.test(attr)) {
+                    unit = unit || 'px';
+                    setAttr.call(me, 'left', val[0], unit);
+                    setAttr.call(me, 'top', val[1], unit);
+                } else {
+                    setAttr.call(me, attr, val, unit);
+                }
+            },
+            
+            getAttr: function(attr){
+                var me = this,
+                    getAttr = superclass.getAttr;
+                    
+                return pointsRe.test(attr) ? [getAttr.call(me, 'left'), getAttr.call(me, 'top')] : getAttr.call(me, attr);
+            },
+            
+            doMethod: function(attr, start, end){
+                var me = this;
+                
+                return pointsRe.test(attr)
+                        ? EXTLIB.Bezier.getPosition(me.runAttrs[attr], me.method(me.curFrame, 0, 100, me.totalFrames) / 100)
+                        : superclass.doMethod.call(me, attr, start, end);
+            },
+            
+            setRunAttr: function(attr){
+                if(pointsRe.test(attr)){
+                    
+                    var me = this,
+                        el = this.el,
+                        points = this.attributes.points,
+                        control = points.control || [],
+                        from = points.from,
+                        to = points.to,
+                        by = points.by,
+                        DOM = EXTLIB.Dom,
+                        start,
+                        i,
+                        end,
+                        len,
+                        ra;
+                  
+
+                    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();
+                    DOM.setXY(el, isset(from) ? from : DOM.getXY(el));
+                    start = me.getAttr('points');
+
+
+                    if(isset(to)){
+                        end = translateValues.call(me, to, start);
+                        for (i = 0,len = control.length; i < len; ++i) {
+                            control[i] = translateValues.call(me, control[i], start);
+                        }
+                    } else if (isset(by)) {
+                        end = [start[0] + by[0], start[1] + by[1]];
+
+                        for (i = 0,len = control.length; i < len; ++i) {
+                            control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ];
+                        }
+                    }
+
+                    ra = this.runAttrs[attr] = [start];
+                    if (control.length > 0) {
+                        ra = ra.concat(control);
+                    }
+
+                    ra[ra.length] = end;
+                }else{
+                    superclass.setRunAttr.call(this, attr);
+                }
+            }
+        });
+
+        var translateValues = function(val, start) {
+            var pageXY = EXTLIB.Dom.getXY(this.el);
+            return [val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1]];
+        };
+    })();
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-begin.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-begin.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-begin.js	(revision 625)
@@ -0,0 +1,18 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+	var libFlyweight;
+	
+	function fly(el) {
+        if (!libFlyweight) {
+            libFlyweight = new Ext.Element.Flyweight();
+        }
+        libFlyweight.dom = el;
+        return libFlyweight;
+    }
+    
+    
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-dom.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-dom.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-dom.js	(revision 625)
@@ -0,0 +1,157 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+	var doc = document,
+		isCSS1 = doc.compatMode == "CSS1Compat",
+		MAX = Math.max,		
+		PARSEINT = parseInt;
+		
+	Ext.lib.Dom = {
+	    isAncestor : function(p, c) {
+		    var ret = false;
+			
+			p = Ext.getDom(p);
+			c = Ext.getDom(c);
+			if (p && c) {
+				if (p.contains) {
+					return p.contains(c);
+				} else if (p.compareDocumentPosition) {
+					return !!(p.compareDocumentPosition(c) & 16);
+				} else {
+					while (c = c.parentNode) {
+						ret = c == p || ret;	        			
+					}
+				}	            
+			}	
+			return ret;
+		},
+		
+        getViewWidth : function(full) {
+            return full ? this.getDocumentWidth() : this.getViewportWidth();
+        },
+
+        getViewHeight : function(full) {
+            return full ? this.getDocumentHeight() : this.getViewportHeight();
+        },
+
+        getDocumentHeight: function() {            
+            return MAX(!isCSS1 ? doc.body.scrollHeight : doc.documentElement.scrollHeight, this.getViewportHeight());
+        },
+
+        getDocumentWidth: function() {            
+            return MAX(!isCSS1 ? doc.body.scrollWidth : doc.documentElement.scrollWidth, this.getViewportWidth());
+        },
+
+        getViewportHeight: function(){
+	        return Ext.isIE ? 
+	        	   (Ext.isStrict ? doc.documentElement.clientHeight : doc.body.clientHeight) :
+	        	   self.innerHeight;
+        },
+
+        getViewportWidth : function() {
+	        return !Ext.isStrict && !Ext.isOpera ? doc.body.clientWidth :
+	        	   Ext.isIE ? doc.documentElement.clientWidth : self.innerWidth;
+        },
+        
+        getY : function(el) {
+            return this.getXY(el)[1];
+        },
+
+        getX : function(el) {
+            return this.getXY(el)[0];
+        },
+
+        getXY : function(el) {
+            var p, 
+            	pe, 
+            	b,
+            	bt, 
+            	bl,     
+            	dbd,       	
+            	x = 0,
+            	y = 0, 
+            	scroll,
+            	hasAbsolute, 
+            	bd = (doc.body || doc.documentElement),
+            	ret = [0,0];
+            	
+            el = Ext.getDom(el);
+
+            if(el != bd){
+	            if (el.getBoundingClientRect) {
+	                b = el.getBoundingClientRect();
+	                scroll = fly(document).getScroll();
+	                ret = [b.left + scroll.left, b.top + scroll.top];
+	            } else {  
+		            p = el;		
+		            hasAbsolute = fly(el).isStyle("position", "absolute");
+		
+		            while (p) {
+			            pe = fly(p);		
+		                x += p.offsetLeft;
+		                y += p.offsetTop;
+		
+		                hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute");
+		                		
+		                if (Ext.isGecko) {		                    
+		                    y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0;
+		                    x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0;	
+		
+		                    if (p != el && !pe.isStyle('overflow','visible')) {
+		                        x += bl;
+		                        y += bt;
+		                    }
+		                }
+		                p = p.offsetParent;
+		            }
+		
+		            if (Ext.isSafari && hasAbsolute) {
+		                x -= bd.offsetLeft;
+		                y -= bd.offsetTop;
+		            }
+		
+		            if (Ext.isGecko && !hasAbsolute) {
+		                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).isStyle("display", "inline"))) {
+		                    x -= p.scrollLeft;
+		                    y -= p.scrollTop;
+		                }
+		                p = p.parentNode;
+		            }
+		            ret = [x,y];
+	            }
+         	}
+            return ret
+        },
+
+        setXY : function(el, xy) {
+            (el = Ext.fly(el, '_setXY')).position();
+            
+            var pts = el.translatePoints(xy),
+            	style = el.dom.style,
+            	pos;            	
+            
+            for (pos in pts) {	            
+	            if(!isNaN(pts[pos])) style[pos] = pts[pos] + "px"
+            }
+        },
+
+        setX : function(el, x) {
+            this.setXY(el, [x, false]);
+        },
+
+        setY : function(el, y) {
+            this.setXY(el, [false, y]);
+        }
+    };
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-end.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-end.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-end.js	(revision 625)
@@ -0,0 +1,21 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+	
+	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);
+    }
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-event.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-event.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-event.js	(revision 625)
@@ -0,0 +1,453 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.lib.Event = function() {
+    var loadComplete = false,
+        listeners = [],
+        unloadListeners = [],
+        retryCount = 0,
+        onAvailStack = [],
+        _interval,
+        locked = false,
+        win = window,
+        doc = document,
+        
+        // constants            
+        POLL_RETRYS = 200,
+        POLL_INTERVAL = 20,
+        EL = 0,
+        TYPE = 1,
+        FN = 2,
+        WFN = 3,
+        OBJ = 3,
+        ADJ_SCOPE = 4,   
+        SCROLLLEFT = 'scrollLeft',
+        SCROLLTOP = 'scrollTop',
+        UNLOAD = 'unload',
+        MOUSEOVER = 'mouseover',
+        MOUSEOUT = 'mouseout',
+        // private
+        doAdd = function() {
+            var ret;
+            if (win.addEventListener) {
+                ret = function(el, eventName, fn, capture) {
+                    if (eventName == 'mouseenter') {
+                        fn = fn.createInterceptor(checkRelatedTarget);
+                        el.addEventListener(MOUSEOVER, fn, (capture));
+                    } else if (eventName == 'mouseleave') {
+                        fn = fn.createInterceptor(checkRelatedTarget);
+                        el.addEventListener(MOUSEOUT, fn, (capture));
+                    } else {
+                        el.addEventListener(eventName, fn, (capture));
+                    }
+                    return fn;
+                };
+            } else if (win.attachEvent) {
+                ret = function(el, eventName, fn, capture) {
+                    el.attachEvent("on" + eventName, fn);
+                    return fn;
+                };
+            } else {
+                ret = function(){};
+            }
+            return ret;
+        }(),    
+        // private
+        doRemove = function(){
+            var ret;
+            if (win.removeEventListener) {
+                ret = function (el, eventName, fn, capture) {
+                    if (eventName == 'mouseenter') {
+                        eventName = MOUSEOVER;
+                    } else if (eventName == 'mouseleave') {
+                        eventName = MOUSEOUT;
+                    }                        
+                    el.removeEventListener(eventName, fn, (capture));
+                };
+            } else if (win.detachEvent) {
+                ret = function (el, eventName, fn) {
+                    el.detachEvent("on" + eventName, fn);
+                };
+            } else {
+                ret = function(){};
+            }
+            return ret;
+        }();        
+
+    var isXUL = Ext.isGecko ? function(node){ 
+        return Object.prototype.toString.call(node) == '[object XULElement]';
+    } : function(){};
+        
+    var isTextNode = Ext.isGecko ? function(node){
+        try{
+            return node.nodeType == 3;
+        }catch(e) {
+            return false;
+        }
+
+    } : function(node){
+        return node.nodeType == 3;
+    };
+        
+    function checkRelatedTarget(e) {
+        var related = pub.getRelatedTarget(e);
+        return !(isXUL(related) || elContains(e.currentTarget,related));
+    }
+
+    function elContains(parent, child) {
+       if(parent && parent.firstChild){  
+         while(child) {
+            if(child === parent) {
+                return true;
+            }
+            try {
+                child = child.parentNode;
+            } catch(e) {
+                // In FF if you mouseout an text input element
+                // thats inside a div sometimes it randomly throws
+                // Permission denied to get property HTMLDivElement.parentNode
+                // See https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+                
+                return false;
+            }                
+            if(child && (child.nodeType != 1)) {
+                child = null;
+            }
+          }
+        }
+        return false;
+    }
+
+        
+    // private  
+    function _getCacheIndex(el, eventName, fn) {
+        var index = -1;
+        Ext.each(listeners, function (v,i) {
+            if(v && v[FN] == fn && v[EL] == el && v[TYPE] == eventName) {
+                index = i;
+            }
+        });
+        return index;
+    }
+                    
+    // private
+    function _tryPreloadAttach() {
+        var ret = false,                
+            notAvail = [],
+            element,
+            tryAgain = !loadComplete || (retryCount > 0);                       
+        
+        if (!locked) {
+            locked = true;
+            
+            Ext.each(onAvailStack, function (v,i,a){
+                if(v && (element = doc.getElementById(v.id))){
+                    if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) {
+                        element = v.override ? (v.override === true ? v.obj : v.override) : element;
+                        v.fn.call(element, v.obj);
+                        onAvailStack[i] = null;
+                    } else {
+                        notAvail.push(v);
+                    }
+                }   
+            });
+
+            retryCount = (notAvail.length === 0) ? 0 : retryCount - 1;
+
+            if (tryAgain) { 
+                startInterval();
+            } else {
+                clearInterval(_interval);
+                _interval = null;
+            }
+
+            ret = !(locked = false);
+        }
+        return ret;
+    }
+    
+    // private              
+    function startInterval() {            
+        if(!_interval){                    
+            var callback = function() {
+                _tryPreloadAttach();
+            };
+            _interval = setInterval(callback, POLL_INTERVAL);
+        }
+    }
+    
+    // private 
+    function getScroll() {
+        var dd = doc.documentElement, 
+            db = doc.body;
+        if(dd && (dd[SCROLLTOP] || dd[SCROLLLEFT])){
+            return [dd[SCROLLLEFT], dd[SCROLLTOP]];
+        }else if(db){
+            return [db[SCROLLLEFT], db[SCROLLTOP]];
+        }else{
+            return [0, 0];
+        }
+    }
+        
+    // private
+    function getPageCoord (ev, xy) {
+        ev = ev.browserEvent || ev;
+        var coord  = ev['page' + xy];
+        if (!coord && coord !== 0) {
+            coord = ev['client' + xy] || 0;
+
+            if (Ext.isIE) {
+                coord += getScroll()[xy == "X" ? 0 : 1];
+            }
+        }
+
+        return coord;
+    }
+
+    var pub =  {
+        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 = POLL_RETRYS;
+            startInterval();
+        },
+
+
+        addListener: function(el, eventName, fn) {
+            var ret;                
+            el = Ext.getDom(el);                
+            if (el && fn) {
+                if (UNLOAD == eventName) {
+                    ret = !!(unloadListeners[unloadListeners.length] = [el, eventName, fn]);                    
+                } else {
+                    listeners.push([el, eventName, fn, ret = doAdd(el, eventName, fn, false)]);
+                }
+            }
+            return !!ret;
+        },
+
+        removeListener: function(el, eventName, fn) {
+            var ret = false,
+                index, 
+                cacheItem;
+
+            el = Ext.getDom(el);
+
+            if(!fn) {                   
+                ret = this.purgeElement(el, false, eventName);
+            } else if (UNLOAD == eventName) {   
+                Ext.each(unloadListeners, function(v, i, a) {
+                    if( v && v[0] == el && v[1] == eventName && v[2] == fn) {
+                        unloadListeners.splice(i, 1);
+                        ret = true;
+                    }
+                });
+            } else {    
+                index = arguments[3] || _getCacheIndex(el, eventName, fn);
+                cacheItem = listeners[index];
+                
+                if (el && cacheItem) {
+                    doRemove(el, eventName, cacheItem[WFN], false);     
+                    cacheItem[WFN] = cacheItem[FN] = null;                       
+                    listeners.splice(index, 1);     
+                    ret = true;
+                }
+            }
+            return ret;
+        },
+
+        getTarget : function(ev) {
+            ev = ev.browserEvent || ev;                
+            return this.resolveTextNode(ev.target || ev.srcElement);
+        },
+
+        resolveTextNode : function(node) {
+            return node && !isXUL(node) && isTextNode(node) ? node.parentNode : node;
+        },
+
+        getRelatedTarget : function(ev) {
+            ev = ev.browserEvent || ev;
+            return this.resolveTextNode(ev.relatedTarget || 
+                    (ev.type == MOUSEOUT ? ev.toElement :
+                     ev.type == MOUSEOVER ? ev.fromElement : null));
+        },
+        
+        getPageX : function(ev) {
+            return getPageCoord(ev, "X");
+        },
+
+        getPageY : function(ev) {
+            return getPageCoord(ev, "Y");
+        },
+
+
+        getXY : function(ev) {                             
+            return [this.getPageX(ev), this.getPageY(ev)];
+        },
+
+// Is this useful?  Removing to save space unless use case exists.
+//             getTime: function(ev) {
+//                 ev = ev.browserEvent || ev;
+//                 if (!ev.time) {
+//                     var t = new Date().getTime();
+//                     try {
+//                         ev.time = t;
+//                     } catch(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) {
+            e = e || win.event;
+            if (!e) {
+                var c = this.getEvent.caller;
+                while (c) {
+                    e = c.arguments[0];
+                    if (e && Event == e.constructor) {
+                        break;
+                    }
+                    c = c.caller;
+                }
+            }
+            return e;
+        },
+
+        getCharCode : function(ev) {
+            ev = ev.browserEvent || ev;
+            return ev.charCode || ev.keyCode || 0;
+        },
+
+        //clearCache: function() {},
+
+        _load : function(e) {
+            loadComplete = true;
+            var EU = Ext.lib.Event;    
+            if (Ext.isIE && e !== true) {
+        // IE8 complains that _load is null or not an object
+        // so lets remove self via arguments.callee
+                doRemove(win, "load", arguments.callee);
+            }
+        },            
+        
+        purgeElement : function(el, recurse, eventName) {
+            var me = this;
+            Ext.each( me.getListeners(el, eventName), function(v){
+                if(v){
+                    me.removeListener(el, v.type, v.fn);
+                }
+            });
+
+            if (recurse && el && el.childNodes) {
+                Ext.each(el.childNodes, function(v){
+                    me.purgeElement(v, recurse, eventName);
+                });
+            }
+        },
+
+        getListeners : function(el, eventName) {
+            var me = this,
+                results = [], 
+                searchLists;
+
+            if (eventName){  
+                searchLists = eventName == UNLOAD ? unloadListeners : listeners;
+            }else{
+                searchLists = listeners.concat(unloadListeners);
+            }
+
+            Ext.each(searchLists, function(v, i){
+                if (v && v[EL] == el && (!eventName || eventName == v[TYPE])) {
+                    results.push({
+                                type:   v[TYPE],
+                                fn:     v[FN],
+                                obj:    v[OBJ],
+                                adjust: v[ADJ_SCOPE],
+                                index:  i
+                            });
+                }   
+            });                
+
+            return results.length ? results : null;
+        },
+
+        _unload : function(e) {
+             var EU = Ext.lib.Event, 
+                i, 
+                j, 
+                l, 
+                len, 
+                index,
+                scope;
+                
+
+            Ext.each(unloadListeners, function(v) {
+                if (v) {
+                    try{
+                        scope =  v[ADJ_SCOPE] ? (v[ADJ_SCOPE] === true ? v[OBJ] : v[ADJ_SCOPE]) :  win; 
+                        v[FN].call(scope, EU.getEvent(e), v[OBJ]);
+                    }catch(ex){}
+                }   
+            });     
+
+            unloadListeners = null;
+
+            if(listeners && (j = listeners.length)){                    
+                while(j){                        
+                    if((l = listeners[index = --j])){
+                        EU.removeListener(l[EL], l[TYPE], l[FN], index);
+                    }                        
+                }
+                //EU.clearCache();
+            }
+
+            doRemove(win, UNLOAD, EU._unload);
+        }            
+    };        
+    
+    // Initialize stuff.
+    pub.on = pub.addListener;
+    pub.un = pub.removeListener;
+    if (doc && doc.body) {
+        pub._load(true);
+    } else {
+        doAdd(win, "load", pub._load);
+    }
+    doAdd(win, UNLOAD, pub._unload);    
+    _tryPreloadAttach();
+    
+    return pub;
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-point.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-point.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-point.js	(revision 625)
@@ -0,0 +1,17 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+	Ext.lib.Point = function(x, y) {
+        if (Ext.isArray(x)) {
+            y = x[1];
+            x = x[0];
+        }
+        var me = this;
+        me.x = me.right = me.left = me[0] = x;
+        me.y = me.top = me.bottom = me[1] = y;
+    };
+
+    Ext.lib.Point.prototype = new Ext.lib.Region();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-region.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-region.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/core/ext-base-region.js	(revision 625)
@@ -0,0 +1,81 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+	Ext.lib.Region = function(t, r, b, l) {
+		var me = this;
+        me.top = t;
+        me[1] = t;
+        me.right = r;
+        me.bottom = b;
+        me.left = l;
+        me[0] = l;
+    };
+
+    Ext.lib.Region.prototype = {
+        contains : function(region) {
+	        var me = this;
+            return ( region.left >= me.left &&
+                     region.right <= me.right &&
+                     region.top >= me.top &&
+                     region.bottom <= me.bottom );
+
+        },
+
+        getArea : function() {
+	        var me = this;
+            return ( (me.bottom - me.top) * (me.right - me.left) );
+        },
+
+        intersect : function(region) {
+            var me = this,
+            	t = Math.max(me.top, region.top),
+            	r = Math.min(me.right, region.right),
+            	b = Math.min(me.bottom, region.bottom),
+            	l = Math.max(me.left, region.left);
+
+            if (b >= t && r >= l) {
+                return new Ext.lib.Region(t, r, b, l);
+            }
+        },
+        
+        union : function(region) {
+	        var me = this,
+            	t = Math.min(me.top, region.top),
+            	r = Math.max(me.right, region.right),
+            	b = Math.max(me.bottom, region.bottom),
+            	l = Math.min(me.left, region.left);
+
+            return new Ext.lib.Region(t, r, b, l);
+        },
+
+        constrainTo : function(r) {
+	        var me = this;
+            me.top = me.top.constrain(r.top, r.bottom);
+            me.bottom = me.bottom.constrain(r.top, r.bottom);
+            me.left = me.left.constrain(r.left, r.right);
+            me.right = me.right.constrain(r.left, r.right);
+            return me;
+        },
+
+        adjust : function(t, l, b, r) {
+	        var me = this;
+            me.top += t;
+            me.left += l;
+            me.right += r;
+            me.bottom += b;
+            return me;
+        }
+    };
+
+    Ext.lib.Region.getRegion = function(el) {
+        var p = Ext.lib.Dom.getXY(el),
+        	t = p[1],
+        	r = p[0] + el.offsetWidth,
+        	b = p[1] + el.offsetHeight,
+        	l = p[0];
+
+        return new Ext.lib.Region(t, r, b, l);
+    };
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/ext-base-dom-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/ext-base-dom-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/ext-base-dom-more.js	(revision 625)
@@ -0,0 +1,9 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.lib.Dom.getRegion = function(el) {
+    return Ext.lib.Region.getRegion(el);
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/jquery-bridge.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/jquery-bridge.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/jquery-bridge.js	(revision 625)
@@ -0,0 +1,546 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+if(typeof jQuery == "undefined"){
+    throw "Unable to load Ext, jQuery not found.";
+}
+
+(function(){
+var libFlyweight;
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        // jQuery doesn't report full window size on document query, so max both
+        return full ? Math.max(jQuery(document).width(),jQuery(window).width()) : jQuery(window).width();
+    },
+
+    getViewHeight : function(full){
+        // jQuery doesn't report full window size on document query, so max both
+        return full ? Math.max(jQuery(document).height(),jQuery(window).height()) : jQuery(window).height();
+    },
+
+    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);
+    },
+
+    //////////////////////////////////////////////////////////////////////////////////////
+    // Use of jQuery.offset() removed to promote consistent behavior across libs.
+    // JVS 05/23/07
+    //////////////////////////////////////////////////////////////////////////////////////
+
+    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 [Math.round(b.left + scroll.left), Math.round(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]);
+    }
+};
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+Ext.lib.Event = {
+    getPageX : function(e){
+        e = e.browserEvent || e;
+        return e.pageX;
+    },
+
+    getPageY : function(e){
+        e = e.browserEvent || e;
+        return e.pageY;
+    },
+
+    getXY : function(e){
+        e = e.browserEvent || e;
+        return [e.pageX, e.pageY];
+    },
+
+    getTarget : function(e){
+        return e.target;
+    },
+
+    // all Ext events will go through event manager which provides scoping
+    on : function(el, eventName, fn, scope, override){
+        jQuery(el).bind(eventName, fn);
+    },
+
+    un : function(el, eventName, fn){
+        jQuery(el).unbind(eventName, fn);
+    },
+
+    purgeElement : function(el){
+        jQuery(el).unbind();
+    },
+
+    preventDefault : function(e){
+        e = e.browserEvent || e;
+        if(e.preventDefault){
+            e.preventDefault();
+        }else{
+            e.returnValue = false;
+        }
+    },
+
+    stopPropagation : function(e){
+        e = e.browserEvent || e;
+        if(e.stopPropagation){
+            e.stopPropagation();
+        }else{
+            e.cancelBubble = true;
+        }
+    },
+
+    stopEvent : function(e){
+        this.preventDefault(e);
+        this.stopPropagation(e);
+    },
+
+    onAvailable : function(id, fn, scope){
+        var start = new Date();
+        var f = function(){
+            if(start.getElapsed() > 10000){
+                clearInterval(iid);
+            }
+            var el = document.getElementById(id);
+            if(el){
+                clearInterval(iid);
+                fn.call(scope||window, el);
+            }
+        };
+        var iid = setInterval(f, 50);
+    },
+
+    resolveTextNode: function(node) {
+        if (node && 3 == node.nodeType) {
+            return node.parentNode;
+        } else {
+            return node;
+        }
+    },
+
+    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);
+    }
+};
+
+Ext.lib.Ajax = function(){
+    var createComplete = function(cb){
+         return function(xhr, status){
+            if((status == 'error' || status == 'timeout') && cb.failure){
+                cb.failure.call(cb.scope||window, {
+                    responseText: xhr.responseText,
+                    responseXML : xhr.responseXML,
+                    argument: cb.argument
+                });
+            }else if(cb.success){
+                cb.success.call(cb.scope||window, {
+                    responseText: xhr.responseText,
+                    responseXML : xhr.responseXML,
+                    argument: cb.argument
+                });
+            }
+         };
+    };
+    return {
+        request : function(method, uri, cb, data, options){
+            var o = {
+                type: method,
+                url: uri,
+                data: data,
+                timeout: cb.timeout,
+                complete: createComplete(cb)
+            };
+
+            if(options){
+                var hs = options.headers;
+                if(options.xmlData){
+                    o.data = options.xmlData;
+                    o.processData = false;
+                    o.type = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'text/xml';
+                    }
+                }else if(options.jsonData){
+                    o.data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData;
+                    o.processData = false;
+                    o.type = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'application/json';
+                    }
+                }
+                if(hs){
+                    o.beforeSend = function(xhr){
+                        for(var h in hs){
+                            if(hs.hasOwnProperty(h)){
+                                xhr.setRequestHeader(h, hs[h]);
+                            }
+                        }
+                    }
+                }
+            }
+            jQuery.ajax(o);
+        },
+
+        formRequest : function(form, uri, cb, data, isUpload, sslUri){
+            jQuery.ajax({
+                type: Ext.getDom(form).method ||'POST',
+                url: uri,
+                data: jQuery(form).serialize()+(data?'&'+data:''),
+                timeout: cb.timeout,
+                complete: createComplete(cb)
+            });
+        },
+
+        isCallInProgress : function(trans){
+            return false;
+        },
+
+        abort : function(trans){
+            return false;
+        },
+
+        serializeForm : function(form){
+            return jQuery(form.dom||form).serialize();
+        }
+    };
+}();
+
+Ext.lib.Anim = function(){
+    var createAnim = function(cb, scope){
+        var animated = true;
+        return {
+            stop : function(skipToLast){
+                // do nothing
+            },
+
+            isAnimated : function(){
+                return animated;
+            },
+
+            proxyCallback : function(){
+                animated = false;
+                Ext.callback(cb, scope);
+            }
+        };
+    };
+    return {
+        scroll : function(el, args, duration, easing, cb, scope){
+            // scroll anim not supported so just scroll immediately
+            var anim = createAnim(cb, scope);
+            el = Ext.getDom(el);
+            if(typeof args.scroll.to[0] == 'number'){
+                el.scrollLeft = args.scroll.to[0];
+            }
+            if(typeof args.scroll.to[1] == 'number'){
+                el.scrollTop = args.scroll.to[1];
+            }
+            anim.proxyCallback();
+            return anim;
+        },
+
+        motion : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        color : function(el, args, duration, easing, cb, scope){
+            // color anim not supported, so execute callback immediately
+            var anim = createAnim(cb, scope);
+            anim.proxyCallback();
+            return anim;
+        },
+
+        run : function(el, args, duration, easing, cb, scope, type){
+            var anim = createAnim(cb, scope), e = Ext.fly(el, '_animrun');
+            var o = {};
+            for(var k in args){
+                switch(k){   // jquery doesn't support, so convert
+                    case 'points':
+                        var by, pts;
+                        e.position();
+                        if(by = args.points.by){
+                            var xy = e.getXY();
+                            pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]);
+                        }else{
+                            pts = e.translatePoints(args.points.to);
+                        }
+                        o.left = pts.left;
+                        o.top = pts.top;
+                        if(!parseInt(e.getStyle('left'), 10)){ // auto bug
+                            e.setLeft(0);
+                        }
+                        if(!parseInt(e.getStyle('top'), 10)){
+                            e.setTop(0);
+                        }
+                        if(args.points.from){
+                            e.setXY(args.points.from);
+                        }
+                    break;
+                    case 'width':
+                        o.width = args.width.to;
+                        if (args.width.from)
+                            e.setWidth(args.width.from);
+                    break;
+                    case 'height':
+                        o.height = args.height.to;
+                        if (args.height.from)
+                            e.setHeight(args.height.from);
+                    break;
+                    case 'opacity':
+                        o.opacity = args.opacity.to;
+                        if (args.opacity.from)
+                            e.setOpacity(args.opacity.from);
+                    break;
+                    case 'left':
+                        o.left = args.left.to;
+                        if (args.left.from)
+                            e.setLeft(args.left.from);
+                    break;
+                    case 'top':
+                        o.top = args.top.to;
+                        if (args.top.from)
+                            e.setTop(args.top.from);
+                    break;
+                    default:
+                        o[k] = args[k].to;
+                        if (args[k].from)
+                            e.setStyle(k, args[k].from);
+                    break;
+                }
+            }
+            // TODO: find out about easing plug in?
+            jQuery(el).animate(o, duration*1000, undefined, anim.proxyCallback);
+            return anim;
+        }
+    };
+}();
+
+
+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();
+
+// prevent IE leaks
+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);
+}
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/prototype-bridge.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/prototype-bridge.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/prototype-bridge.js	(revision 625)
@@ -0,0 +1,600 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+
+var libFlyweight,
+    version = Prototype.Version.split('.'),
+    mouseEnterSupported = (parseInt(version[0]) >= 2) || (parseInt(version[1]) >= 7) || (parseInt(version[2]) >= 1),
+    mouseCache = {},
+    isXUL = Ext.isGecko ? function(node){ 
+        return Object.prototype.toString.call(node) == '[object XULElement]';
+    } : function(){},
+    isTextNode = Ext.isGecko ? function(node){
+        try{
+            return node.nodeType == 3;
+        }catch(e) {
+            return false;
+        }
+
+    } : function(node){
+        return node.nodeType == 3;
+    },
+    elContains = function(parent, child) {
+       if(parent && parent.firstChild){  
+         while(child) {
+            if(child === parent) {
+                return true;
+            }
+            try {
+                child = child.parentNode;
+            } catch(e) {
+                // In FF if you mouseout an text input element
+                // thats inside a div sometimes it randomly throws
+                // Permission denied to get property HTMLDivElement.parentNode
+                // See https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+                return false;
+            }                
+            if(child && (child.nodeType != 1)) {
+                child = null;
+            }
+          }
+        }
+        return false;
+    },
+    checkRelatedTarget = function(e) {
+        var related = Ext.lib.Event.getRelatedTarget(e);
+        return !(isXUL(related) || elContains(e.currentTarget,related));
+    };
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        return full ? this.getDocumentWidth() : this.getViewportWidth();
+    },
+
+    getViewHeight : function(full){
+        return full ? this.getDocumentHeight() : this.getViewportHeight();
+    },
+
+    getDocumentHeight: function() { // missing from prototype?
+        var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight;
+        return Math.max(scrollHeight, this.getViewportHeight());
+    },
+
+    getDocumentWidth: function() { // missing from prototype?
+        var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth;
+        return Math.max(scrollWidth, this.getViewportWidth());
+    },
+
+    getViewportHeight: function() { // missing from prototype?
+        var height = self.innerHeight;
+        var mode = document.compatMode;
+
+        if ( (mode || Ext.isIE) && !Ext.isOpera ) {
+            height = (mode == "CSS1Compat") ?
+                    document.documentElement.clientHeight : // Standards
+                    document.body.clientHeight; // Quirks
+        }
+
+        return height;
+    },
+
+    getViewportWidth: function() { // missing from prototype?
+        var width = self.innerWidth;  // Safari
+        var mode = document.compatMode;
+
+        if (mode || Ext.isIE) { // IE, Gecko, Opera
+            width = (mode == "CSS1Compat") ?
+                    document.documentElement.clientWidth : // Standards
+                    document.body.clientWidth; // Quirks
+        }
+        return width;
+    },
+
+    isAncestor : function(p, c){ // missing from prototype?
+        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){ // this initially used Position.cumulativeOffset but it is not accurate enough
+        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 [Math.round(b.left + scroll.left), Math.round(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){ // this initially used Position.cumulativeOffset but it is not accurate enough
+        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]);
+    }
+};
+
+Ext.lib.Event = {
+    getPageX : function(e){
+        return Event.pointerX(e.browserEvent || e);
+    },
+
+    getPageY : function(e){
+        return Event.pointerY(e.browserEvent || e);
+    },
+
+    getXY : function(e){
+        e = e.browserEvent || e;
+        return [Event.pointerX(e), Event.pointerY(e)];
+    },
+
+    getTarget : function(e){
+        return Event.element(e.browserEvent || e);
+    },
+
+    resolveTextNode: function(node) {
+        return node && !isXUL(node) && isTextNode(node) ? node.parentNode : node;
+    },
+
+    getRelatedTarget: function(ev) { // missing from prototype?
+        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);
+    },
+
+    on : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id] || (mouseCache[el.id] = {});
+            item[eventName] = fn;
+            fn = fn.createInterceptor(checkRelatedTarget);
+            eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+        }
+        Event.observe(el, eventName, fn, false);
+    },
+
+    un : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id], 
+                ev = item && item[eventName];
+
+            if(ev){
+                fn = ev.fn;
+                delete item[eventName];
+                eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+            }
+        }
+        Event.stopObserving(el, eventName, fn, false);
+    },
+
+    purgeElement : function(el){
+        // no equiv?
+    },
+
+    preventDefault : function(e){   // missing from prototype?
+        e = e.browserEvent || e;
+        if(e.preventDefault) {
+            e.preventDefault();
+        } else {
+            e.returnValue = false;
+        }
+    },
+
+    stopPropagation : function(e){   // missing from prototype?
+        e = e.browserEvent || e;
+        if(e.stopPropagation) {
+            e.stopPropagation();
+        } else {
+            e.cancelBubble = true;
+        }
+    },
+
+    stopEvent : function(e){
+        Event.stop(e.browserEvent || e);
+    },
+
+    onAvailable : function(id, fn, scope){  // no equiv
+        var start = new Date(), iid;
+        var f = function(){
+            if(start.getElapsed() > 10000){
+                clearInterval(iid);
+            }
+            var el = document.getElementById(id);
+            if(el){
+                clearInterval(iid);
+                fn.call(scope||window, el);
+            }
+        };
+        iid = setInterval(f, 50);
+    }
+};
+
+Ext.lib.Ajax = function(){
+    var createSuccess = function(cb){
+         return cb.success ? function(xhr){
+            cb.success.call(cb.scope||window, {
+                responseText: xhr.responseText,
+                responseXML : xhr.responseXML,
+                argument: cb.argument
+            });
+         } : Ext.emptyFn;
+    };
+    var createFailure = function(cb){
+         return cb.failure ? function(xhr){
+            cb.failure.call(cb.scope||window, {
+                responseText: xhr.responseText,
+                responseXML : xhr.responseXML,
+                argument: cb.argument
+            });
+         } : Ext.emptyFn;
+    };
+    return {
+        request : function(method, uri, cb, data, options){
+            var o = {
+                method: method,
+                parameters: data || '',
+                timeout: cb.timeout,
+                onSuccess: createSuccess(cb),
+                onFailure: createFailure(cb)
+            };
+            if(options){
+                var hs = options.headers;
+                if(hs){
+                    o.requestHeaders = hs;
+                }
+                if(options.xmlData){
+                    method = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'text/xml';
+                    }
+                    o.postBody = options.xmlData;
+                    delete o.parameters;
+                }
+                if(options.jsonData){
+                    method = (method ? method : (options.method ? options.method : 'POST'));
+                    if (!hs || !hs['Content-Type']){
+                        o.contentType = 'application/json';
+                    }
+                    o.postBody = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData;
+                    delete o.parameters;
+                }
+            }
+            new Ajax.Request(uri, o);
+        },
+
+        formRequest : function(form, uri, cb, data, isUpload, sslUri){
+            new Ajax.Request(uri, {
+                method: Ext.getDom(form).method ||'POST',
+                parameters: Form.serialize(form)+(data?'&'+data:''),
+                timeout: cb.timeout,
+                onSuccess: createSuccess(cb),
+                onFailure: createFailure(cb)
+            });
+        },
+
+        isCallInProgress : function(trans){
+            return false;
+        },
+
+        abort : function(trans){
+            return false;
+        },
+        
+        serializeForm : function(form){
+            return Form.serialize(form.dom||form);
+        }
+    };
+}();
+
+
+Ext.lib.Anim = function(){
+    
+    var easings = {
+        easeOut: function(pos) {
+            return 1-Math.pow(1-pos,2);
+        },
+        easeIn: function(pos) {
+            return 1-Math.pow(1-pos,2);
+        }
+    };
+    var createAnim = function(cb, scope){
+        return {
+            stop : function(skipToLast){
+                this.effect.cancel();
+            },
+
+            isAnimated : function(){
+                return this.effect.state == 'running';
+            },
+
+            proxyCallback : function(){
+                Ext.callback(cb, scope);
+            }
+        };
+    };
+    return {
+        scroll : function(el, args, duration, easing, cb, scope){
+            // not supported so scroll immediately?
+            var anim = createAnim(cb, scope);
+            el = Ext.getDom(el);
+            if(typeof args.scroll.to[0] == 'number'){
+                el.scrollLeft = args.scroll.to[0];
+            }
+            if(typeof args.scroll.to[1] == 'number'){
+                el.scrollTop = args.scroll.to[1];
+            }
+            anim.proxyCallback();
+            return anim;
+        },
+
+        motion : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        color : function(el, args, duration, easing, cb, scope){
+            return this.run(el, args, duration, easing, cb, scope);
+        },
+
+        run : function(el, args, duration, easing, cb, scope, type){
+            var o = {};
+            for(var k in args){
+                switch(k){   // scriptaculous doesn't support, so convert these
+                    case 'points':
+                        var by, pts, e = Ext.fly(el, '_animrun');
+                        e.position();
+                        if(by = args.points.by){
+                            var xy = e.getXY();
+                            pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]);
+                        }else{
+                            pts = e.translatePoints(args.points.to);
+                        }
+                        o.left = pts.left+'px';
+                        o.top = pts.top+'px';
+                    break;
+                    case 'width':
+                        o.width = args.width.to+'px';
+                    break;
+                    case 'height':
+                        o.height = args.height.to+'px';
+                    break;
+                    case 'opacity':
+                        o.opacity = String(args.opacity.to);
+                    break;
+                    default:
+                        o[k] = String(args[k].to);
+                    break;
+                }
+            }
+            var anim = createAnim(cb, scope);
+            anim.effect = new Effect.Morph(Ext.id(el), {
+                duration: duration,
+                afterFinish: anim.proxyCallback,
+                transition: easings[easing] || Effect.Transitions.linear,
+                style: o
+            });
+            return anim;
+        }
+    };
+}();
+
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+    
+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();
+
+
+// prevent IE leaks
+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);
+}
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/yui-bridge.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/yui-bridge.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/adapter/yui-bridge.js	(revision 625)
@@ -0,0 +1,390 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+if(typeof YAHOO == "undefined"){
+    throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found.";
+}
+
+(function(){
+    var E = YAHOO.util.Event,
+        D = YAHOO.util.Dom,
+        CN = YAHOO.util.Connect,
+        ES = YAHOO.util.Easing,
+        A = YAHOO.util.Anim,
+        libFlyweight,
+        version = YAHOO.env.getVersion('yahoo').version.split('.'),
+        mouseEnterSupported = parseInt(version[0]) >= 3,
+        mouseCache = {},
+        isXUL = Ext.isGecko ? function(node){
+            return Object.prototype.toString.call(node) == '[object XULElement]';
+        } : function(){
+        }, isTextNode = Ext.isGecko ? function(node){
+            try{
+                return node.nodeType == 3;
+            }catch (e){
+                return false;
+            }
+        } : function(node){
+            return node.nodeType == 3;
+        }, elContains = function(parent, child){
+            if(parent && parent.firstChild){
+                while(child){
+                    if(child === parent){
+                        return true;
+                    }
+                    try{
+                        child = child.parentNode;
+                    }catch (e){
+                        return false;
+                    }
+                    if(child && (child.nodeType != 1)){
+                        child = null;
+                    }
+                }
+            }
+            return false;
+        }, checkRelatedTarget = function(e){
+            var related = Ext.lib.Event.getRelatedTarget(e);
+            return !(isXUL(related) || elContains(e.currentTarget, related));
+        };
+
+Ext.lib.Dom = {
+    getViewWidth : function(full){
+        return full ? D.getDocumentWidth() : D.getViewportWidth();
+    },
+
+    getViewHeight : function(full){
+        return full ? D.getDocumentHeight() : D.getViewportHeight();
+    },
+
+    isAncestor : function(haystack, needle){
+        return D.isAncestor(haystack, needle);
+    },
+
+    getRegion : function(el){
+        return D.getRegion(el);
+    },
+
+    getY : function(el){
+        return this.getXY(el)[1];
+    },
+
+    getX : function(el){
+        return this.getXY(el)[0];
+    },
+
+    // original version based on YahooUI getXY
+    // this version fixes several issues in Safari and FF
+    // and boosts performance by removing the batch overhead, repetitive dom lookups and array index calls
+    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 [Math.round(b.left + scroll.left), Math.round(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]);
+    }
+};
+
+Ext.lib.Event = {
+    getPageX : function(e){
+        return E.getPageX(e.browserEvent || e);
+    },
+
+    getPageY : function(e){
+        return E.getPageY(e.browserEvent || e);
+    },
+
+    getXY : function(e){
+        return E.getXY(e.browserEvent || e);
+    },
+
+    getTarget : function(e){
+        return E.getTarget(e.browserEvent || e);
+    },
+
+    getRelatedTarget : function(e){
+        return E.getRelatedTarget(e.browserEvent || e);
+    },
+
+    on : function(el, eventName, fn, scope, override){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id] || (mouseCache[el.id] = {});
+            item[eventName] = fn;
+            fn = fn.createInterceptor(checkRelatedTarget);
+            eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+        }
+        E.on(el, eventName, fn, scope, override);
+    },
+
+    un : function(el, eventName, fn){
+        if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){
+            var item = mouseCache[el.id], 
+                ev = item && item[eventName];
+
+            if(ev){
+                fn = ev.fn;
+                delete item[eventName];
+                eventName = (eventName == 'mouseenter') ? 'mouseover' : 'mouseout';
+            }
+        }
+        E.removeListener(el, eventName, fn);;
+    },
+
+    purgeElement : function(el){
+        E.purgeElement(el);
+    },
+
+    preventDefault : function(e){
+        E.preventDefault(e.browserEvent || e);
+    },
+
+    stopPropagation : function(e){
+        E.stopPropagation(e.browserEvent || e);
+    },
+
+    stopEvent : function(e){
+        E.stopEvent(e.browserEvent || e);
+    },
+
+    onAvailable : function(el, fn, scope, override){
+        return E.onAvailable(el, fn, scope, override);
+    }
+};
+
+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)){
+                        CN.initHeader(h, hs[h], false);
+                    }
+                }
+            }
+            if(options.xmlData){
+                if (!hs || !hs['Content-Type']){
+                    CN.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']){
+                    CN.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 CN.asyncRequest(method, uri, cb, data);
+    },
+
+    formRequest : function(form, uri, cb, data, isUpload, sslUri){
+        CN.setForm(form, isUpload, sslUri);
+        return CN.asyncRequest(Ext.getDom(form).method ||'POST', uri, cb, data);
+    },
+
+    isCallInProgress : function(trans){
+        return CN.isCallInProgress(trans);
+    },
+
+    abort : function(trans){
+        return CN.abort(trans);
+    },
+
+    serializeForm : function(form){
+        var d = CN.setForm(form.dom || form);
+        CN.resetFormState();
+        return d;
+    }
+};
+
+Ext.lib.Region = YAHOO.util.Region;
+Ext.lib.Point = YAHOO.util.Point;
+
+
+Ext.lib.Anim = {
+    scroll : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.Scroll);
+    },
+
+    motion : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.Motion);
+    },
+
+    color : function(el, args, duration, easing, cb, scope){
+        this.run(el, args, duration, easing, cb, scope, YAHOO.util.ColorAnim);
+    },
+
+    run : function(el, args, duration, easing, cb, scope, type){
+        type = type || YAHOO.util.Anim;
+        if(typeof easing == "string"){
+            easing = YAHOO.util.Easing[easing];
+        }
+        var anim = new type(el, args, duration, easing);
+        anim.animateX(function(){
+            Ext.callback(cb, scope);
+        });
+        return anim;
+    }
+};
+
+// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights
+function fly(el){
+    if(!libFlyweight){
+        libFlyweight = new Ext.Element.Flyweight();
+    }
+    libFlyweight.dom = el;
+    return libFlyweight;
+}
+
+// prevent IE leaks
+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);
+}
+// various overrides
+
+// add ability for callbacks with animations
+if(YAHOO.util.Anim){
+    YAHOO.util.Anim.prototype.animateX = function(callback, scope){
+        var f = function(){
+            this.onComplete.unsubscribe(f);
+            if(typeof callback == "function"){
+                callback.call(scope || this, this);
+            }
+        };
+        this.onComplete.subscribe(f, this, true);
+        this.animate();
+    };
+}
+
+if(YAHOO.util.DragDrop && Ext.dd.DragDrop){
+    YAHOO.util.DragDrop.defaultPadding = Ext.dd.DragDrop.defaultPadding;
+    YAHOO.util.DragDrop.constrainTo = Ext.dd.DragDrop.constrainTo;
+}
+
+YAHOO.util.Dom.getXY = function(el) {
+    var f = function(el) {
+        return Ext.lib.Dom.getXY(el);
+    };
+    return YAHOO.util.Dom.batch(el, f, YAHOO.util.Dom, true);
+};
+
+
+// workaround for Safari anim duration speed problems
+if(YAHOO.util.AnimMgr){
+    YAHOO.util.AnimMgr.fps = 1000;
+}
+
+YAHOO.util.Region.prototype.adjust = function(t, l, b, r){
+    this.top += t;
+    this.left += l;
+    this.right += r;
+    this.bottom += b;
+    return this;
+};
+    
+YAHOO.util.Region.prototype.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;
+};
+
+
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElement.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElement.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElement.js	(revision 625)
@@ -0,0 +1,136 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.CompositeElement
+ * @extends Ext.CompositeElementLite
+ * Standard composite class. Creates a Ext.Element for every element in the collection.
+ * <br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ * <br><br>
+ * All methods return <i>this</i> and can be chained.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class", true);
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class', true);
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre>
+ */
+Ext.CompositeElement = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+};
+
+Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, {
+    invoke : function(fn, args){
+	    Ext.each(this.elements, function(e) {
+        	Ext.Element.prototype[fn].apply(e, args);
+        });
+        return this;
+    },
+    
+    /**
+    * Adds elements to this composite.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    add : function(els, root){
+	    if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },    
+    
+    /**
+     * Returns the Element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+        return this.elements[index] || null;
+    },
+
+
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.get(el));
+    },
+        
+    filter : function(selector){
+		var me = this,
+			out = [];
+			
+		Ext.each(me.elements, function(el) {	
+			if(el.is(selector)){
+				out.push(Ext.get(el));
+			}
+		});
+		me.elements = out;
+		return me;
+	},
+	
+	/**
+    * Calls the passed function passing (el, this, index) for each element in this composite.
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){        
+        Ext.each(this.elements, function(e,i) {
+	        return fn.call(scope || e, e, this, i);
+        }, this);
+        return this;
+    }
+});
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+
+    return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els);
+};
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.select = Ext.Element.select;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElementLite-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElementLite-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/CompositeElementLite-more.js	(revision 625)
@@ -0,0 +1,102 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.CompositeElementLite
+ */
+Ext.apply(Ext.CompositeElementLite.prototype, {	
+	addElements : function(els, root){
+        if(!els){
+            return this;
+        }
+        if(typeof els == "string"){
+            els = Ext.Element.selectorFunction(els, root);
+        }
+        var yels = this.elements;        
+	    Ext.each(els, function(e) {
+        	yels.push(Ext.get(e));
+        });
+        return this;
+    },
+    
+    /**
+    * Clears this composite and adds the elements returned by the passed selector.
+    * @param {String/Array} els A string CSS selector, an array of elements or an element
+    * @return {CompositeElement} this
+    */
+    fill : function(els){
+        this.elements = [];
+        this.add(els);
+        return this;
+    },
+    
+    /**
+     * Returns the first Element
+     * @return {Ext.Element}
+     */
+    first : function(){
+        return this.item(0);
+    },   
+    
+    /**
+     * Returns the last Element
+     * @return {Ext.Element}
+     */
+    last : function(){
+        return this.item(this.getCount()-1);
+    },
+    
+    /**
+     * Returns true if this composite contains the passed element
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Boolean
+     */
+    contains : function(el){
+        return this.indexOf(el) != -1;
+    },
+
+    /**
+    * Filters this composite to only elements that match the passed selector.
+    * @param {String} selector A string CSS selector
+    * @return {CompositeElement} this
+    */
+    filter : function(selector){
+        var els = [];
+        this.each(function(el){
+            if(el.is(selector)){
+                els[els.length] = el.dom;
+            }
+        });
+        this.fill(els);
+        return this;
+    },
+    
+    /**
+    * Removes the specified element(s).
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * or an array of any of those.
+    * @param {Boolean} removeDom (optional) True to also remove the element from the document
+    * @return {CompositeElement} this
+    */
+    removeElement : function(keys, removeDom){
+        var me = this,
+	        els = this.elements,	    
+	    	el;	    	
+	    Ext.each(keys, function(val){
+		    if ((el = (els[val] || els[val = me.indexOf(val)]))) {
+		    	if(removeDom){
+                    if(el.dom){
+                        el.remove();
+                    }else{
+                        Ext.removeNode(el);
+                    }
+                }
+		    	els.splice(val, 1);		    	
+			}
+	    });
+        return this;
+    }    
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/DomHelper-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/DomHelper-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/DomHelper-more.js	(revision 625)
@@ -0,0 +1,179 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DomHelper
+ */
+Ext.apply(Ext.DomHelper,
+function(){
+	var pub,
+		afterbegin = 'afterbegin',
+    	afterend = 'afterend',
+    	beforebegin = 'beforebegin',
+    	beforeend = 'beforeend';
+
+	// private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        el = Ext.getDom(el);
+        var newNode;
+        if (pub.useDom) {
+            newNode = createDom(o, null);
+            if (append) {
+	            el.appendChild(newNode);
+            } else {
+	        	(sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el);
+            }
+        } else {
+            newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o));
+        }
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+	// build as dom
+    /** @ignore */
+    function createDom(o, parentNode){
+        var el,
+        	doc = document,
+        	useSet,
+        	attr,
+        	val,
+        	cn;
+
+        if (Ext.isArray(o)) {                       // Allow Arrays of siblings to be inserted
+            el = doc.createDocumentFragment(); // in one shot using a DocumentFragment
+	        Ext.each(o, function(v) {
+                createDom(v, el);
+            });
+        } else if (Ext.isString(o)) {         // Allow a string as a child spec.
+            el = doc.createTextNode(o);
+        } else {
+            el = doc.createElement( o.tag || 'div' );
+            useSet = !!el.setAttribute; // In IE some elements don't have setAttribute
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html|style/.test(attr)){
+	                if(attr == 'cls'){
+	                    el.className = val;
+	                }else{
+                        if(useSet){
+                            el.setAttribute(attr, val);
+                        }else{
+                            el[attr] = val;
+                        }
+	                }
+                }
+            });
+            pub.applyStyles(el, o.style);
+
+            if ((cn = o.children || o.cn)) {
+                createDom(cn, el);
+            } else if (o.html) {
+                el.innerHTML = o.html;
+            }
+        }
+        if(parentNode){
+           parentNode.appendChild(el);
+        }
+        return el;
+    }
+
+	pub = {
+		/**
+	     * Creates a new Ext.Template from the DOM object spec.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {Ext.Template} The new template
+	     */
+	    createTemplate : function(o){
+	        var html = Ext.DomHelper.createHtml(o);
+	        return new Ext.Template(html);
+	    },
+
+		/** True to force the use of DOM instead of html fragments @type Boolean */
+	    useDom : false,
+
+	    /**
+	     * Applies a style specification to an element.
+	     * @param {String/HTMLElement} el The element to apply styles to
+	     * @param {String/Object/Function} styles A style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or
+	     * a function which returns such a specification.
+	     */
+	    applyStyles : function(el, styles){
+		    if(styles){
+				var i = 0,
+	    			len,
+	    			style;
+
+	    		el = Ext.fly(el);
+				if(Ext.isFunction(styles)){
+   					styles = styles.call();
+				}
+				if(Ext.isString(styles)){
+					styles = styles.trim().split(/\s*(?::|;)\s*/);
+					for(len = styles.length; i < len;){
+						el.setStyle(styles[i++], styles[i++]);
+					}
+				}else if (Ext.isObject(styles)){
+					el.setStyle(styles);
+				}
+			}
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, 'nextSibling');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, 'firstChild');
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+         * @hide (repeat)
+	     */
+	    append: function(el, o, returnElement){
+            return doInsert(el, o, returnElement, beforeend, '', true);
+        },
+
+	    /**
+	     * Creates new DOM element(s) without inserting them to the document.
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @return {HTMLElement} The new uninserted node
+	     */
+        createDom: createDom
+	};
+	return pub;
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element-more.js	(revision 625)
@@ -0,0 +1,192 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({    
+    /**
+     * Stops the specified event(s) from bubbling and optionally prevents the default action
+     * @param {String/Array} eventName an event / array of events to stop from bubbling
+     * @param {Boolean} preventDefault (optional) true to prevent the default action too
+     * @return {Ext.Element} this
+     */
+    swallowEvent : function(eventName, preventDefault){
+	    var me = this;
+        function fn(e){
+            e.stopPropagation();
+            if(preventDefault){
+                e.preventDefault();
+            }
+        }
+        if(Ext.isArray(eventName)){            
+	        Ext.each(eventName, function(e) {
+                 me.on(e, fn);
+            });
+            return me;
+        }
+        me.on(eventName, fn);
+        return me;
+    },
+    
+    /**
+     * Create an event handler on this element such that when the event fires and is handled by this element,
+     * it will be relayed to another object (i.e., fired again as if it originated from that object instead).
+     * @param {String} eventName The type of event to relay
+     * @param {Object} object Any object that extends {@link Ext.util.Observable} that will provide the context
+     * for firing the relayed event
+     */
+    relayEvent : function(eventName, observable){
+        this.on(eventName, function(e){
+            observable.fireEvent(eventName, e);
+        });
+    },
+    
+	/**
+     * Removes worthless text nodes
+     * @param {Boolean} forceReclean (optional) By default the element
+     * keeps track if it has been cleaned already so
+     * you can call this over and over. However, if you update the element and
+     * need to force a reclean, you can pass true.
+     */
+    clean : function(forceReclean){
+        var me = this, 
+            dom = me.dom,
+        	n = dom.firstChild, 
+        	ni = -1;
+        	
+	    if(Ext.Element.data(dom, 'isCleaned') && forceReclean !== true){
+            return me;
+        }      
+        	
+ 	    while(n){
+ 	        var nx = n.nextSibling;
+            if(n.nodeType == 3 && !/\S/.test(n.nodeValue)){
+                dom.removeChild(n);
+            }else{
+                n.nodeIndex = ++ni;
+            }
+ 	        n = nx;
+ 	    }
+        Ext.Element.data(dom, 'isCleaned', true);
+ 	    return me;
+ 	},
+    
+    /**
+     * Direct access to the Updater {@link Ext.Updater#update} method. The method takes the same object
+     * parameter as {@link Ext.Updater#update}
+     * @return {Ext.Element} this
+     */
+    load : function(){
+        var um = this.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    /**
+    * Gets this element's {@link Ext.Updater Updater}
+    * @return {Ext.Updater} The Updater
+    */
+    getUpdater : function(){
+        return this.updateManager || (this.updateManager = new Ext.Updater(this));
+    },
+    
+	/**
+    * Update the innerHTML of this element, optionally searching for and processing scripts
+    * @param {String} html The new HTML
+    * @param {Boolean} loadScripts (optional) True to look for and process scripts (defaults to false)
+    * @param {Function} callback (optional) For async script loading you can be notified when the update completes
+    * @return {Ext.Element} this
+     */
+    update : function(html, loadScripts, callback){
+        html = html || "";
+	    
+        if(loadScripts !== true){
+            this.dom.innerHTML = html;
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+            return this;
+        }
+        
+        var id = Ext.id(),
+        	dom = this.dom;
+
+        html += '<span id="' + id + '"></span>';
+
+        Ext.lib.Event.onAvailable(id, function(){
+            var DOC = document,
+                hd = DOC.getElementsByTagName("head")[0],
+            	re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+            	srcRe = /\ssrc=([\'\"])(.*?)\1/i,
+            	typeRe = /\stype=([\'\"])(.*?)\1/i,
+            	match,
+            	attrs,
+            	srcMatch,
+            	typeMatch,
+            	el,
+            	s;
+
+            while((match = re.exec(html))){
+                attrs = match[1];
+                srcMatch = attrs ? attrs.match(srcRe) : false;
+                if(srcMatch && srcMatch[2]){
+                   s = DOC.createElement("script");
+                   s.src = srcMatch[2];
+                   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]);
+                    }
+                }
+            }
+            el = DOC.getElementById(id);
+            if(el){Ext.removeNode(el);}
+            if(Ext.isFunction(callback)){
+                callback();
+            }
+        });
+        dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
+        return this;
+    },
+    
+    /**
+     * Creates a proxy element of this element
+     * @param {String/Object} config The class name of the proxy element or a DomHelper config object
+     * @param {String/HTMLElement} renderTo (optional) The element or element id to render the proxy to (defaults to document.body)
+     * @param {Boolean} matchBox (optional) True to align and size the proxy to this element now (defaults to false)
+     * @return {Ext.Element} The new proxy element
+     */
+    createProxy : function(config, renderTo, matchBox){
+        config = Ext.isObject(config) ? config : {tag : "div", cls: config};
+
+        var me = this,
+        	proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
+        					   Ext.DomHelper.insertBefore(me.dom, config, true);        
+        
+        if(matchBox && me.setBox && me.getBox){ // check to make sure Element.position.js is loaded
+           proxy.setBox(me.getBox());
+        }
+        return proxy;
+    }
+});
+
+Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater;
+
+// private
+Ext.Element.uncache = function(el){
+    for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+        if(a[i]){
+            delete Ext.Element.cache[a[i].id || a[i]];
+        }
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.alignment.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.alignment.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.alignment.js	(revision 625)
@@ -0,0 +1,370 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Gets the x,y coordinates specified by the anchor position on the element.
+     * @param {String} anchor (optional) The specified anchor position (defaults to "c").  See {@link #alignTo}
+     * for details on supported anchor positions.
+     * @param {Boolean} local (optional) True to get the local (element top/left-relative) anchor position instead
+     * of page coordinates
+     * @param {Object} size (optional) An object containing the size to use for calculating anchor position
+     * {width: (target width), height: (target height)} (defaults to the element's current size)
+     * @return {Array} [x, y] An array containing the element's x and y coordinates
+     */
+    getAnchorXY : function(anchor, local, s){
+        //Passing a different size is useful for pre-calculating anchors,
+        //especially for anchored animations that change the el size.
+		anchor = (anchor || "tl").toLowerCase();
+        s = s || {};
+        
+        var me = this,        
+        	vp = me.dom == document.body || me.dom == document,
+        	w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(),
+        	h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(),         	        	
+        	xy,       	
+        	r = Math.round,
+        	o = me.getXY(),
+        	scroll = me.getScroll(),
+        	extraX = vp ? scroll.left : !local ? o[0] : 0,
+        	extraY = vp ? scroll.top : !local ? o[1] : 0,
+        	hash = {
+	        	c  : [r(w * 0.5), r(h * 0.5)],
+	        	t  : [r(w * 0.5), 0],
+	        	l  : [0, r(h * 0.5)],
+	        	r  : [w, r(h * 0.5)],
+	        	b  : [r(w * 0.5), h],
+	        	tl : [0, 0],	
+	        	bl : [0, h],
+	        	br : [w, h],
+	        	tr : [w, 0]
+        	};
+        
+        xy = hash[anchor];	
+        return [xy[0] + extraX, xy[1] + extraY]; 
+    },
+
+    /**
+     * Anchors an element to another element and realigns it when the window is resized.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) True for the default animation or a standard Element animation config object
+     * @param {Boolean/Number} monitorScroll (optional) True to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @param {Function} callback The function to call after the animation finishes
+     * @return {Ext.Element} this
+     */
+    anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){        
+	    var me = this,
+            dom = me.dom;
+	    
+	    function action(){
+            Ext.fly(dom).alignTo(el, alignment, offsets, animate);
+            Ext.callback(callback, Ext.fly(dom));
+        }
+        
+        Ext.EventManager.onWindowResize(action, me);
+        
+        if(!Ext.isEmpty(monitorScroll)){
+            Ext.EventManager.on(window, 'scroll', action, me,
+                {buffer: !isNaN(monitorScroll) ? monitorScroll : 50});
+        }
+        action.call(me); // align immediately
+        return me;
+    },
+
+    /**
+     * Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
+     * supported position values.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Array} [x, y]
+     */
+    getAlignToXY : function(el, p, o){	    
+        el = Ext.get(el);
+        
+        if(!el || !el.dom){
+            throw "Element.alignToXY with an element that doesn't exist";
+        }
+        
+        o = o || [0,0];
+        p = (p == "?" ? "tl-bl?" : (!/-/.test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase();       
+                
+        var me = this,
+        	d = me.dom,
+        	a1,
+        	a2,
+        	x,
+        	y,
+        	//constrain the aligned el to viewport if necessary
+        	w,
+        	h,
+        	r,
+        	dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie
+        	dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie
+        	p1y,
+        	p1x,        	
+        	p2y,
+        	p2x,
+        	swapY,
+        	swapX,
+        	doc = document,
+        	docElement = doc.documentElement,
+        	docBody = doc.body,
+        	scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5,
+        	scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5,
+        	c = false, //constrain to viewport
+        	p1 = "", 
+        	p2 = "",
+        	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];
+
+        //Subtract the aligned el's internal xy from the target's offset xy
+        //plus custom offset to get the aligned el's new offset xy
+        a1 = me.getAnchorXY(p1, true);
+        a2 = el.getAnchorXY(p2, false);
+
+        x = a2[0] - a1[0] + o[0];
+        y = a2[1] - a1[1] + o[1];
+
+        if(c){    
+	       w = me.getWidth();
+           h = me.getHeight();
+           r = el.getRegion();       
+           //If we are at a viewport boundary and the aligned el is anchored on a target border that is
+           //perpendicular to the vp border, allow the aligned el to slide on that border,
+           //otherwise swap the aligned el to the opposite border of the target.
+           p1y = p1.charAt(0);
+           p1x = p1.charAt(p1.length-1);
+           p2y = p2.charAt(0);
+           p2x = p2.charAt(p2.length-1);
+           swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t"));
+           swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r"));          
+           
+
+           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];
+    },
+
+    /**
+     * Aligns this element with another element relative to the specified anchor points. If the other element is the
+     * document it aligns it to the viewport.
+     * The position parameter is optional, and can be specified in any one of the following formats:
+     * <ul>
+     *   <li><b>Blank</b>: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").</li>
+     *   <li><b>One anchor (deprecated)</b>: The passed anchor position is used as the target element's anchor point.
+     *       The element being aligned will position its top-left corner (tl) to that point.  <i>This method has been
+     *       deprecated in favor of the newer two anchor syntax below</i>.</li>
+     *   <li><b>Two anchors</b>: If two values from the table below are passed separated by a dash, the first value is used as the
+     *       element's anchor point, and the second value is used as the target's anchor point.</li>
+     * </ul>
+     * In addition to the anchor points, the position parameter also supports the "?" character.  If "?" is passed at the end of
+     * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to
+     * the viewport if necessary.  Note that the element being aligned might be swapped to align to a different position than
+     * that specified in order to enforce the viewport constraints.
+     * Following are all of the supported anchor positions:
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner (default)
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+c      In the center of the element
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+Example Usage:
+<pre><code>
+// align el to other-el using the default positioning ("tl-bl", non-constrained)
+el.alignTo("other-el");
+
+// align the top left corner of el with the top right corner of other-el (constrained to viewport)
+el.alignTo("other-el", "tr?");
+
+// align the bottom right corner of el with the center left edge of other-el
+el.alignTo("other-el", "br-l?");
+
+// align the center of el with the bottom left corner of other-el and
+// adjust the x position by -6 pixels (and the y position by 0)
+el.alignTo("other-el", "c-bl", [-6, 0]);
+</code></pre>
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to.
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    alignTo : function(element, position, offsets, animate){
+	    var me = this;
+        return me.setXY(me.getAlignToXY(element, position, offsets),
+          		        me.preanim && !!animate ? me.preanim(arguments, 3) : false);
+    },
+    
+    // private ==>  used outside of core
+    adjustForConstraints : function(xy, parent, offsets){
+        return this.getConstrainToXY(parent || document, false, offsets, xy) ||  xy;
+    },
+
+    // private ==>  used outside of core
+    getConstrainToXY : function(el, local, offsets, proposedXY){   
+	    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;
+
+            // only move it if it needs it
+            var moved = false;
+
+            // first validate right/bottom
+            if((x + w) > vr){
+                x = vr - w;
+                moved = true;
+            }
+            if((y + h) > vb){
+                y = vb - h;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < vx){
+                x = vx;
+                moved = true;
+            }
+            if(y < vy){
+                y = vy;
+                moved = true;
+            }
+            return moved ? [x, y] : false;
+        };
+    }(),
+	    
+	    
+	        
+//         el = Ext.get(el);
+//         offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0});
+
+//         var	me = this,
+//         	doc = document,
+//         	s = el.getScroll(),
+//         	vxy = el.getXY(),
+//         	vx = offsets.left + s.left, 
+//         	vy = offsets.top + s.top,            	
+//         	vw = -offsets.right, 
+//         	vh = -offsets.bottom, 
+//         	vr,
+//         	vb,
+//         	xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]),
+//         	x = xy[0],
+//         	y = xy[1],
+//         	w = me.dom.offsetWidth, h = me.dom.offsetHeight,
+//         	moved = false; // only move it if it needs it
+//       
+//         	
+//         if(el.dom == doc.body || el.dom == doc){
+//             vw += Ext.lib.Dom.getViewWidth();
+//             vh += Ext.lib.Dom.getViewHeight();
+//         }else{
+//             vw += el.dom.clientWidth;
+//             vh += el.dom.clientHeight;
+//             if(!local){                    
+//                 vx += vxy[0];
+//                 vy += vxy[1];
+//             }
+//         }
+
+//         // first validate right/bottom
+//         if(x + w > vx + vw){
+//             x = vx + vw - w;
+//             moved = true;
+//         }
+//         if(y + h > vy + vh){
+//             y = vy + vh - h;
+//             moved = true;
+//         }
+//         // then make sure top/left isn't negative
+//         if(x < vx){
+//             x = vx;
+//             moved = true;
+//         }
+//         if(y < vy){
+//             y = vy;
+//             moved = true;
+//         }
+//         return moved ? [x, y] : false;
+//    },
+    
+    /**
+    * Calculates the x, y to center this element on the screen
+    * @return {Array} The x, y values [x, y]
+    */
+    getCenterXY : function(){
+        return this.getAlignToXY(document, 'c-c');
+    },
+
+    /**
+    * Centers the Element in either the viewport, or another Element.
+    * @param {Mixed} centerIn (optional) The element in which to center the element.
+    */
+    center : function(centerIn){
+        return this.alignTo(centerIn || document, 'c-c');        
+    }    
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.dd.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.dd.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.dd.js	(revision 625)
@@ -0,0 +1,46 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Initializes a {@link Ext.dd.DD} drag drop object for this element.
+     * @param {String} group The group the DD object is member of
+     * @param {Object} config The DD config object
+     * @param {Object} overrides An object containing methods to override/implement on the DD object
+     * @return {Ext.dd.DD} The DD object
+     */
+    initDD : function(group, config, overrides){
+        var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDProxy} object for this element.
+     * @param {String} group The group the DDProxy object is member of
+     * @param {Object} config The DDProxy config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
+     * @return {Ext.dd.DDProxy} The DDProxy object
+     */
+    initDDProxy : function(group, config, overrides){
+        var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    },
+
+    /**
+     * Initializes a {@link Ext.dd.DDTarget} object for this element.
+     * @param {String} group The group the DDTarget object is member of
+     * @param {Object} config The DDTarget config object
+     * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
+     * @return {Ext.dd.DDTarget} The DDTarget object
+     */
+    initDDTarget : function(group, config, overrides){
+        var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
+        return Ext.apply(dd, overrides);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.fx-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.fx-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.fx-more.js	(revision 625)
@@ -0,0 +1,152 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",
+	    XMASKED = "x-masked",
+		XMASKEDRELATIVE = "x-masked-relative",
+        data = Ext.Element.data;
+		
+	return {
+		/**
+	     * Checks whether the element is currently visible using both visibility and display properties.
+	     * @param {Boolean} deep (optional) True to walk the dom and see if parent elements are hidden (defaults to false)
+	     * @return {Boolean} True if the element is currently visible, else false
+	     */
+	    isVisible : function(deep) {
+	        var vis = !this.isStyle(VISIBILITY,HIDDEN) && !this.isStyle(DISPLAY,NONE),
+	        	p = this.dom.parentNode;
+	        if(deep !== true || !vis){
+	            return vis;
+	        }	        
+	        while(p && !/body/i.test(p.tagName)){
+	            if(!Ext.fly(p, '_isVisible').isVisible()){
+	                return false;
+	            }
+	            p = p.parentNode;
+	        }
+	        return true;
+	    },
+	    
+	    /**
+	     * Returns true if display is not "none"
+	     * @return {Boolean}
+	     */
+	    isDisplayed : function() {
+	        return !this.isStyle(DISPLAY, NONE);
+	    },
+	    
+		/**
+	     * Convenience method for setVisibilityMode(Element.DISPLAY)
+	     * @param {String} display (optional) What to set display to when visible
+	     * @return {Ext.Element} this
+	     */
+	    enableDisplayMode : function(display){	    
+	        this.setVisibilityMode(Ext.Element.DISPLAY);
+	        if(!Ext.isEmpty(display)){
+                data(this.dom, 'originalDisplay', display);
+            }
+	        return this;
+	    },
+	    
+		/**
+	     * Puts a mask over this element to disable user interaction. Requires core.css.
+	     * This method can only be applied to elements which accept child nodes.
+	     * @param {String} msg (optional) A message to display in the mask
+	     * @param {String} msgCls (optional) A css class to apply to the msg element
+	     * @return {Element} The mask element
+	     */
+	    mask : function(msg, msgCls){
+		    var me = this,
+		    	dom = me.dom,
+		    	dh = Ext.DomHelper,
+		    	EXTELMASKMSG = "ext-el-mask-msg",
+                el, 
+                mask;
+		    	
+	        if(me.getStyle("position") == "static"){
+	            me.addClass(XMASKEDRELATIVE);
+	        }
+	        if((el = data(dom, 'maskMsg'))){
+	            el.remove();
+	        }
+	        if((el = data(dom, 'mask'))){
+	            el.remove();
+	        }
+	
+            mask = dh.append(dom, {cls : "ext-el-mask"}, true);
+	        data(dom, 'mask', mask);
+	
+	        me.addClass(XMASKED);
+	        mask.setDisplayed(true);
+	        if(typeof msg == 'string'){
+                var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
+                data(dom, 'maskMsg', mm);
+	            mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG;
+	            mm.dom.firstChild.innerHTML = msg;
+	            mm.setDisplayed(true);
+	            mm.center(me);
+	        }
+	        if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto'){ // ie will not expand full height automatically
+	            mask.setSize(undefined, me.getHeight());
+	        }
+	        return mask;
+	    },
+	
+	    /**
+	     * Removes a previously applied mask.
+	     */
+	    unmask : function(){
+		    var me = this,
+                dom = me.dom,
+		    	mask = data(dom, 'mask'),
+		    	maskMsg = data(dom, 'maskMsg');
+	        if(mask){
+	            if(maskMsg){
+	                maskMsg.remove();
+                    data(dom, 'maskMsg', undefined);
+	            }
+	            mask.remove();
+                data(dom, 'mask', undefined);
+	        }
+	        me.removeClass([XMASKED, XMASKEDRELATIVE]);
+	    },
+	
+	    /**
+	     * Returns true if this element is masked
+	     * @return {Boolean}
+	     */
+	    isMasked : function(){
+            var m = data(this.dom, 'mask');
+	        return m && m.isVisible();
+	    },
+	    
+	    /**
+	     * Creates an iframe shim for this element to keep selects and other windowed objects from
+	     * showing through.
+	     * @return {Ext.Element} The new shim element
+	     */
+	    createShim : function(){
+	        var el = document.createElement('iframe'),        	
+	        	shim;
+	        el.frameBorder = '0';
+	        el.className = 'ext-shim';
+	        if(Ext.isIE && Ext.isSecure){
+	            el.src = Ext.SSL_SECURE_URL;
+	        }
+	        shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
+	        shim.autoBoxAdjust = false;
+	        return shim;
+	    }
+    };
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.insertion-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.insertion-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.insertion-more.js	(revision 625)
@@ -0,0 +1,52 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.apply(Ext.Element.prototype, function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper;
+	
+	return {	
+		/**
+	     * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
+	     * @param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert *or* an array of any of those.
+	     * @param {String} where (optional) 'before' or 'after' defaults to before
+	     * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+	     * @return {Ext.Element} the inserted Element
+	     */
+	    insertSibling: function(el, where, returnDom){
+	        var me = this,
+	        	rt;
+	        	
+	        if(Ext.isArray(el)){            
+	            Ext.each(el, function(e) {
+		            rt = me.insertSibling(e, where, returnDom);
+	            });
+	            return rt;
+	        }
+	                
+	        where = (where || 'before').toLowerCase();
+	        el = el || {};
+	       	
+            if(el.nodeType || el.dom){
+                rt = me.dom.parentNode.insertBefore(GETDOM(el), where == 'before' ? me.dom : me.dom.nextSibling);
+                if (!returnDom) {
+                    rt = GET(rt);
+                }
+            }else{
+                if (where == 'after' && !me.dom.nextSibling) {
+                    rt = DH.append(me.dom.parentNode, el, !returnDom);
+                } else {                    
+                    rt = DH[where == 'after' ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom);
+                }
+            }
+	        return rt;
+	    }
+    };
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.keys.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.keys.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.keys.js	(revision 625)
@@ -0,0 +1,48 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Convenience method for constructing a KeyMap
+     * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
+     *                                  {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyListener : function(key, fn, scope){
+        var config;
+        if(!Ext.isObject(key) || 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);
+    },
+
+    /**
+     * Creates a KeyMap for this element
+     * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details
+     * @return {Ext.KeyMap} The KeyMap created
+     */
+    addKeyMap : function(config){
+        return new Ext.KeyMap(this, config);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.legacy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.legacy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.legacy.js	(revision 625)
@@ -0,0 +1,42 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Measures the element's content height and updates height to match. Note: this function uses setTimeout so
+     * the new height may not be available immediately.
+     * @param {Boolean} animate (optional) Animate the transition (defaults to false)
+     * @param {Float} duration (optional) Length of the animation in seconds (defaults to .35)
+     * @param {Function} onComplete (optional) Function to call when animation completes
+     * @param {String} easing (optional) Easing method to use (defaults to easeOut)
+     * @return {Ext.Element} this
+     */
+    autoHeight : function(animate, duration, onComplete, easing){
+        var oldHeight = this.getHeight();
+        this.clip();
+        this.setHeight(1); // force clipping
+        setTimeout(function(){
+            var height = parseInt(this.dom.scrollHeight, 10); // parseInt for Safari
+            if(!animate){
+                this.setHeight(height);
+                this.unclip();
+                if(typeof onComplete == "function"){
+                    onComplete();
+                }
+            }else{
+                this.setHeight(oldHeight); // restore original height
+                this.setHeight(height, animate, duration, function(){
+                    this.unclip();
+                    if(typeof onComplete == "function") onComplete();
+                }.createDelegate(this), easing);
+            }
+        }.createDelegate(this), 0);
+        return this;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.position-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.position-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.position-more.js	(revision 625)
@@ -0,0 +1,165 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
+     * @param {Object} box The box to fill {x, y, width, height}
+     * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBox : function(box, adjust, animate){
+        var me = this,
+        	w = box.width, 
+        	h = box.height;
+        if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){
+           w -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+           h -= (me.getBorderWidth("tb") + me.getPadding("tb"));
+        }
+        me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2));
+        return me;
+    },
+    
+    /**
+     * Return a box {x, y, width, height} that can be used to set another elements
+     * size/location to match this element.
+     * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y.
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+	getBox : function(contentBox, local) {	    
+	    var me = this,
+        	xy,
+        	left,
+        	top,
+        	getBorderWidth = me.getBorderWidth,
+        	getPadding = me.getPadding, 
+        	l,
+        	r,
+        	t,
+        	b;
+        if(!local){
+            xy = me.getXY();
+        }else{
+            left = parseInt(me.getStyle("left"), 10) || 0;
+            top = parseInt(me.getStyle("top"), 10) || 0;
+            xy = [left, top];
+        }
+        var el = me.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{
+            l = getBorderWidth.call(me, "l") + getPadding.call(me, "l");
+            r = getBorderWidth.call(me, "r") + getPadding.call(me, "r");
+            t = getBorderWidth.call(me, "t") + getPadding.call(me, "t");
+            b = getBorderWidth.call(me, "b") + getPadding.call(me, "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;
+	},
+	
+    /**
+     * Move this element relative to its current position.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to move the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+     move : function(direction, distance, animate){
+        var me = this,        	
+        	xy = me.getXY(),
+        	x = xy[0],
+        	y = xy[1],        	
+        	left = [x - distance, y],
+        	right = [x + distance, y],
+        	top = [x, y - distance],
+        	bottom = [x, y + distance],
+	       	hash = {
+	        	l :	left,
+	        	left : left,
+	        	r : right,
+	        	right : right,
+	        	t : top,
+	        	top : top,
+	        	up : top,
+	        	b : bottom, 
+	        	bottom : bottom,
+	        	down : bottom	        		
+	        };
+        
+ 	    direction = direction.toLowerCase();    
+ 	    me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2));
+    },
+    
+    /**
+     * Quick set left and top adding default units
+     * @param {String} left The left CSS property value
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+     setLeftTop : function(left, top){
+	    var me = this,
+	    	style = me.dom.style;
+        style.left = me.addUnits(left);
+        style.top = me.addUnits(top);
+        return me;
+    },
+    
+    /**
+     * Returns the region of the given element.
+     * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
+     * @return {Region} A Ext.lib.Region containing "top, left, bottom, right" member data.
+     */
+    getRegion : function(){
+        return Ext.lib.Dom.getRegion(this.dom);
+    },
+    
+    /**
+     * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+     * </ul></div>
+     * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * </ul></div>
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setBounds : function(x, y, width, height, animate){
+	    var me = this;
+        if (!animate || !me.anim) {
+            me.setSize(width, height);
+            me.setLocation(x, y);
+        } else {
+            me.anim({points: {to: [x, y]}, 
+            		 width: {to: me.adjustWidth(width)}, 
+            		 height: {to: me.adjustHeight(height)}},
+                     me.preanim(arguments, 4), 
+                     'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the element's position and size the specified region. If animation is true then width, height, x and y will be animated concurrently.
+     * @param {Ext.lib.Region} region The region to fill
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setRegion : function(region, animate) {
+        return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1));
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.scroll-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.scroll-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.scroll-more.js	(revision 625)
@@ -0,0 +1,110 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Element} this
+     */
+    scrollTo : function(side, value, animate){
+        var tester = /top/i,
+        	prop = "scroll" + (tester.test(side) ? "Top" : "Left"),
+        	me = this,
+        	dom = me.dom;
+        if (!animate || !me.anim) {
+            dom[prop] = value;
+        } else {
+            me.anim({scroll: {to: tester.test(prop) ? [dom[prop], value] : [value, dom[prop]]}},
+            		 me.preanim(arguments, 2), 'scroll');
+        }
+        return me;
+    },
+    
+    /**
+     * Scrolls this element into view within the passed container.
+     * @param {Mixed} container (optional) The container element to scroll (defaults to document.body).  Should be a
+     * string (id), dom node, or Ext.Element.
+     * @param {Boolean} hscroll (optional) False to disable horizontal scroll (defaults to true)
+     * @return {Ext.Element} this
+     */
+    scrollIntoView : function(container, hscroll){
+        var c = Ext.getDom(container) || Ext.getBody().dom,
+        	el = this.dom,
+        	o = this.getOffsetsTo(c),
+            l = o[0] + c.scrollLeft,
+            t = o[1] + c.scrollTop,
+            b = t + el.offsetHeight,
+            r = l + el.offsetWidth,
+        	ch = c.clientHeight,
+        	ct = parseInt(c.scrollTop, 10),
+        	cl = parseInt(c.scrollLeft, 10),
+        	cb = ct + ch,
+        	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; // corrects IE, other browsers will ignore
+
+        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;
+    },
+
+    // private
+    scrollChildIntoView : function(child, hscroll){
+        Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll);
+    },
+    
+    /**
+     * Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
+     * within this element's scrollable range.
+     * @param {String} direction Possible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down").
+     * @param {Number} distance How far to scroll the element in pixels
+     * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+     * @return {Boolean} Returns true if a scroll was triggered or false if the element
+     * was scrolled as far as it could go.
+     */
+     scroll : function(direction, distance, animate){
+         if(!this.isScrollable()){
+             return;
+         }
+         var el = this.dom,
+            l = el.scrollLeft, t = el.scrollTop,
+            w = el.scrollWidth, h = el.scrollHeight,
+            cw = el.clientWidth, ch = el.clientHeight,
+            scrolled = false, v,
+            hash = {
+                l: Math.min(l + distance, w-cw),
+                r: v = Math.max(l - distance, 0),
+                t: Math.max(t - distance, 0),
+                b: Math.min(t + distance, h-ch)
+            };
+            hash.d = hash.b;
+            hash.u = hash.t;
+            
+         direction = direction.substr(0, 1);
+         if((v = hash[direction]) > -1){
+            scrolled = true;
+            this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2));
+         }
+         return scrolled;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.style-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.style-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Element.style-more.js	(revision 625)
@@ -0,0 +1,318 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+
+// special markup used throughout Ext when box wrapping elements
+Ext.Element.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>';
+
+Ext.Element.addMethods(function(){
+	var INTERNAL = "_internal";
+	return {
+	    /**
+	     * More flexible version of {@link #setStyle} for setting style properties.
+	     * @param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
+	     * a function which returns such a specification.
+	     * @return {Ext.Element} this
+	     */
+	    applyStyles : function(style){
+	        Ext.DomHelper.applyStyles(this.dom, style);
+	        return this;
+	    },
+
+		/**
+	     * Returns an object with properties matching the styles requested.
+	     * For example, el.getStyles('color', 'font-size', 'width') might return
+	     * {'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.
+	     * @param {String} style1 A style name
+	     * @param {String} style2 A style name
+	     * @param {String} etc.
+	     * @return {Object} The style object
+	     */
+	    getStyles : function(){
+		    var ret = {};
+		    Ext.each(arguments, function(v) {
+			   ret[v] = this.getStyle(v);
+		    },
+		    this);
+		    return ret;
+	    },
+
+		getStyleSize : function(){
+	        var me = this,
+	        	w,
+	        	h,
+	        	d = this.dom,
+	        	s = d.style;
+	        if(s.width && s.width != 'auto'){
+	            w = parseInt(s.width, 10);
+	            if(me.isBorderBox()){
+	               w -= me.getFrameWidth('lr');
+	            }
+	        }
+	        if(s.height && s.height != 'auto'){
+	            h = parseInt(s.height, 10);
+	            if(me.isBorderBox()){
+	               h -= me.getFrameWidth('tb');
+	            }
+	        }
+	        return {width: w || me.getWidth(true), height: h || me.getHeight(true)};
+	    },
+
+	    // private  ==> used by ext full
+		setOverflow : function(v){
+			var dom = this.dom;
+	    	if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
+	    		dom.style.overflow = 'hidden';
+	        	(function(){dom.style.overflow = 'auto';}).defer(1);
+	    	}else{
+	    		dom.style.overflow = v;
+	    	}
+		},
+
+	   /**
+		* <p>Wraps the specified element with a special 9 element markup/CSS block that renders by default as
+		* a gray container with a gradient background, rounded corners and a 4-way shadow.</p>
+		* <p>This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button},
+		* {@link Ext.Panel} when <tt>{@link Ext.Panel#frame frame=true}</tt>, {@link Ext.Window}).  The markup
+		* is of this form:</p>
+		* <pre><code>
+Ext.Element.boxMarkup =
+    &#39;&lt;div class="{0}-tl">&lt;div class="{0}-tr">&lt;div class="{0}-tc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-ml">&lt;div class="{0}-mr">&lt;div class="{0}-mc">&lt;/div>&lt;/div>&lt;/div>
+     &lt;div class="{0}-bl">&lt;div class="{0}-br">&lt;div class="{0}-bc">&lt;/div>&lt;/div>&lt;/div>&#39;;
+		* </code></pre>
+		* <p>Example usage:</p>
+		* <pre><code>
+// Basic box wrap
+Ext.get("foo").boxWrap();
+
+// You can also add a custom class and use CSS inheritance rules to customize the box look.
+// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
+// for how to create a custom box wrap style.
+Ext.get("foo").boxWrap().addClass("x-box-blue");
+		* </code></pre>
+		* @param {String} class (optional) A base CSS class to apply to the containing wrapper element
+		* (defaults to <tt>'x-box'</tt>). Note that there are a number of CSS rules that are dependent on
+		* this name to make the overall effect work, so if you supply an alternate base class, make sure you
+		* also supply all of the necessary rules.
+		* @return {Ext.Element} this
+		*/
+	    boxWrap : function(cls){
+	        cls = cls || 'x-box';
+	        var el = Ext.get(this.insertHtml("beforeBegin", "<div class='" + cls + "'>" + String.format(Ext.Element.boxMarkup, cls) + "</div>"));        //String.format('<div class="{0}">'+Ext.Element.boxMarkup+'</div>', cls)));
+	        Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom);
+	        return el;
+	    },
+
+        /**
+         * Set the size of this Element. If animation is true, both width and height will be animated concurrently.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+         * </ul></div>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+	    setSize : function(width, height, animate){
+			var me = this;
+			if(Ext.isObject(width)){ // in case of object from getSize()
+			    height = width.height;
+			    width = width.width;
+			}
+			width = me.adjustWidth(width);
+			height = me.adjustHeight(height);
+			if(!animate || !me.anim){
+			    me.dom.style.width = me.addUnits(width);
+			    me.dom.style.height = me.addUnits(height);
+			}else{
+			    me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2));
+			}
+			return me;
+	    },
+
+	    /**
+	     * Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
+	     * when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements
+	     * if a height has not been set using CSS.
+	     * @return {Number}
+	     */
+	    getComputedHeight : function(){
+		    var me = this,
+	        	h = Math.max(me.dom.offsetHeight, me.dom.clientHeight);
+	        if(!h){
+	            h = parseInt(me.getStyle('height'), 10) || 0;
+	            if(!me.isBorderBox()){
+	                h += me.getFrameWidth('tb');
+	            }
+	        }
+	        return h;
+	    },
+
+	    /**
+	     * Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
+	     * when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements
+	     * if a width has not been set using CSS.
+	     * @return {Number}
+	     */
+	    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;
+	    },
+
+	    /**
+	     * Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
+	     for more information about the sides.
+	     * @param {String} sides
+	     * @return {Number}
+	     */
+	    getFrameWidth : function(sides, onlyContentBox){
+	        return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides));
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is over this element
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnOver : function(className){
+	        this.hover(
+	            function(){
+	                Ext.fly(this, INTERNAL).addClass(className);
+	            },
+	            function(){
+	                Ext.fly(this, INTERNAL).removeClass(className);
+	            }
+	        );
+	        return this;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when this element has the focus
+	     * @param {String} className
+	     * @return {Ext.Element} 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;
+	    },
+
+	    /**
+	     * Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)
+	     * @param {String} className
+	     * @return {Ext.Element} this
+	     */
+	    addClassOnClick : function(className){
+	        var dom = this.dom;
+	        this.on("mousedown", function(){
+	            Ext.fly(dom, INTERNAL).addClass(className);
+	            var d = Ext.getDoc(),
+	            	fn = function(){
+		                Ext.fly(dom, INTERNAL).removeClass(className);
+		                d.removeListener("mouseup", fn);
+		            };
+	            d.on("mouseup", fn);
+	        });
+	        return this;
+	    },
+
+	    /**
+	     * Returns the width and height of the viewport.
+        * <pre><code>
+        var vpSize = Ext.getBody().getViewSize();
+
+        // all Windows created afterwards will have a default value of 90% height and 95% width
+        Ext.Window.override({
+            width: vpSize.width * 0.9,
+            height: vpSize.height * 0.95
+        });
+        // To handle window resizing you would have to hook onto onWindowResize.
+        </code></pre>
+	     * @return {Object} An object containing the viewport's size {width: (viewport width), height: (viewport height)}
+	     */
+	    getViewSize : function(){
+	        var doc = document,
+	        	d = this.dom,
+	        	extdom = Ext.lib.Dom,
+	        	isDoc = (d == doc || d == doc.body);
+	        return { width : (isDoc ? extdom.getViewWidth() : d.clientWidth),
+	        		 height : (isDoc ? extdom.getViewHeight() : d.clientHeight) };
+	    },
+
+	    /**
+	     * Returns the size of the element.
+	     * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding
+	     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+	     */
+	    getSize : function(contentSize){
+	        return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)};
+	    },
+
+	    /**
+	     * Forces the browser to repaint this element
+	     * @return {Ext.Element} this
+	     */
+	    repaint : function(){
+	        var dom = this.dom;
+	        this.addClass("x-repaint");
+	        setTimeout(function(){
+	            Ext.fly(dom).removeClass("x-repaint");
+	        }, 1);
+	        return this;
+	    },
+
+	    /**
+	     * Disables text selection for this element (normalized across browsers)
+	     * @return {Ext.Element} this
+	     */
+	    unselectable : function(){
+	        this.dom.unselectable = "on";
+	        return this.swallowEvent("selectstart", true).
+	        		    applyStyles("-moz-user-select:none;-khtml-user-select:none;").
+	        		    addClass("x-unselectable");
+	    },
+
+	    /**
+	     * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
+	     * then it returns the calculated width of the sides (see getPadding)
+	     * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides
+	     * @return {Object/Number}
+	     */
+	    getMargins : function(side){
+		    var me = this,
+		    	key,
+		    	hash = {t:"top", l:"left", r:"right", b: "bottom"},
+		    	o = {};
+
+		    if (!side) {
+		        for (key in me.margins){
+		        	o[hash[key]] = parseInt(me.getStyle(me.margins[key]), 10) || 0;
+                }
+		        return o;
+	        } else {
+	            return me.addStyles.call(me, side, me.margins);
+	        }
+	    }
+    };
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Error.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Error.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Error.js	(revision 625)
@@ -0,0 +1,81 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Framework-wide error-handler.  Developers can override this method to provide
+ * custom exception-handling.  Framework errors will often extend from the base
+ * Ext.Error class.
+ * @param {Object/Error} e The thrown exception object.
+ */
+Ext.handleError = function(e) {
+    throw e;
+};
+
+/**
+ * @class Ext.Error
+ * @extends Error
+ * <p>A base error class. Future implementations are intended to provide more
+ * robust error handling throughout the framework (<b>in the debug build only</b>)
+ * to check for common errors and problems. The messages issued by this class
+ * will aid error checking. Error checks will be automatically removed in the
+ * production build so that performance is not negatively impacted.</p>
+ * <p>Some sample messages currently implemented:</p><pre>
+"DataProxy attempted to execute an API-action but found an undefined
+url / function. Please review your Proxy url/api-configuration."
+ * </pre><pre>
+"Could not locate your "root" property in your server response.
+Please review your JsonReader config to ensure the config-property
+"root" matches the property your server-response.  See the JsonReader
+docs for additional assistance."
+ * </pre>
+ * <p>An example of the code used for generating error messages:</p><pre><code>
+try {
+    generateError({
+        foo: 'bar'
+    });
+}
+catch (e) {
+    console.error(e);
+}
+function generateError(data) {
+    throw new Ext.Error('foo-error', data);
+}
+ * </code></pre>
+ * @param {String} message
+ */
+Ext.Error = function(message) {
+    // Try to read the message from Ext.Error.lang
+    this.message = (this.lang[message]) ? this.lang[message] : message;
+}
+Ext.Error.prototype = new Error();
+Ext.apply(Ext.Error.prototype, {
+    // protected.  Extensions place their error-strings here.
+    lang: {},
+
+    name: 'Ext.Error',
+    /**
+     * getName
+     * @return {String}
+     */
+    getName : function() {
+        return this.name;
+    },
+    /**
+     * getMessage
+     * @return {String}
+     */
+    getMessage : function() {
+        return this.message;
+    },
+    /**
+     * toJson
+     * @return {String}
+     */
+    toJson : function() {
+        return Ext.encode(this);
+    }
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/EventManager-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/EventManager-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/EventManager-more.js	(revision 625)
@@ -0,0 +1,334 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.EventManager
+ */
+Ext.apply(Ext.EventManager, function(){
+	var resizeEvent, 
+    	resizeTask, 
+    	textEvent, 
+    	textSize,
+    	D = Ext.lib.Dom,
+    	E = Ext.lib.Event,
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
+        curWidth = 0,
+        curHeight = 0,
+        // note 1: IE fires ONLY the keydown event on specialkey autorepeat
+        // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat
+        // (research done by @Jan Wolter at http://unixpapa.com/js/key.html)
+        useKeydown = Ext.isSafari ? 
+                    Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1] || 2) >= 3.1 :
+                    !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera);
+      	
+	return { 
+		// private
+	    doResizeEvent: function(){
+            var h = D.getViewHeight(),
+                w = D.getViewWidth();
+            
+            //whacky problem in IE where the resize event will fire even though the w/h are the same.
+            if(curHeight != h || curWidth != w){
+                resizeEvent.fire(curWidth = w, curHeight = h);
+            }
+	    },
+	    
+	    /**
+	     * Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onWindowResize : function(fn, scope, options){
+	        if(!resizeEvent){
+	            resizeEvent = new Ext.util.Event();
+	            resizeTask = new Ext.util.DelayedTask(this.doResizeEvent);
+	            E.on(window, "resize", this.fireWindowResize, this);
+	        }
+	        resizeEvent.addListener(fn, scope, options);
+	    },
+	
+	    // exposed only to allow manual firing
+	    fireWindowResize : function(){
+	        if(resizeEvent){
+	            if((Ext.isIE||Ext.isAir) && resizeTask){
+	                resizeTask.delay(50);
+	            }else{
+	                resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	            }
+	        }
+	    },
+	
+	    /**
+	     * Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    An object that becomes the scope of the handler
+	     * @param {boolean}  options
+	     */
+	    onTextResize : function(fn, scope, options){
+	        if(!textEvent){
+	            textEvent = new Ext.util.Event();
+	            var textEl = new Ext.Element(document.createElement('div'));
+	            textEl.dom.className = 'x-text-resize';
+	            textEl.dom.innerHTML = 'X';
+	            textEl.appendTo(document.body);
+	            textSize = textEl.dom.offsetHeight;
+	            setInterval(function(){
+	                if(textEl.dom.offsetHeight != textSize){
+	                    textEvent.fire(textSize, textSize = textEl.dom.offsetHeight);
+	                }
+	            }, this.textResizeInterval);
+	        }
+	        textEvent.addListener(fn, scope, options);
+	    },
+	
+	    /**
+	     * Removes the passed window resize listener.
+	     * @param {Function} fn        The method the event invokes
+	     * @param {Object}   scope    The scope of handler
+	     */
+	    removeResizeListener : function(fn, scope){
+	        if(resizeEvent){
+	            resizeEvent.removeListener(fn, scope);
+	        }
+	    },
+	
+	    // private
+	    fireResize : function(){
+	        if(resizeEvent){
+	            resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
+	        }
+	    },
+	    
+	     /**
+	     * The frequency, in milliseconds, to check for text resize events (defaults to 50)
+	     */
+	    textResizeInterval : 50,
+	    
+	    /**
+         * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
+         */
+        ieDeferSrc : false,
+        
+        // protected for use inside the framework
+        // detects whether we should use keydown or keypress based on the browser.
+        useKeydown: useKeydown
+    };
+}());
+
+Ext.EventManager.on = Ext.EventManager.addListener;
+
+
+Ext.apply(Ext.EventObjectImpl.prototype, {
+    /** Key constant @type Number */
+    BACKSPACE: 8,
+    /** Key constant @type Number */
+    TAB: 9,
+    /** Key constant @type Number */
+    NUM_CENTER: 12,
+    /** Key constant @type Number */
+    ENTER: 13,
+    /** Key constant @type Number */
+    RETURN: 13,
+    /** Key constant @type Number */
+    SHIFT: 16,
+    /** Key constant @type Number */
+    CTRL: 17,
+    CONTROL : 17, // legacy
+    /** Key constant @type Number */
+    ALT: 18,
+    /** Key constant @type Number */
+    PAUSE: 19,
+    /** Key constant @type Number */
+    CAPS_LOCK: 20,
+    /** Key constant @type Number */
+    ESC: 27,
+    /** Key constant @type Number */
+    SPACE: 32,
+    /** Key constant @type Number */
+    PAGE_UP: 33,
+    PAGEUP : 33, // legacy
+    /** Key constant @type Number */
+    PAGE_DOWN: 34,
+    PAGEDOWN : 34, // legacy
+    /** Key constant @type Number */
+    END: 35,
+    /** Key constant @type Number */
+    HOME: 36,
+    /** Key constant @type Number */
+    LEFT: 37,
+    /** Key constant @type Number */
+    UP: 38,
+    /** Key constant @type Number */
+    RIGHT: 39,
+    /** Key constant @type Number */
+    DOWN: 40,
+    /** Key constant @type Number */
+    PRINT_SCREEN: 44,
+    /** Key constant @type Number */
+    INSERT: 45,
+    /** Key constant @type Number */
+    DELETE: 46,
+    /** Key constant @type Number */
+    ZERO: 48,
+    /** Key constant @type Number */
+    ONE: 49,
+    /** Key constant @type Number */
+    TWO: 50,
+    /** Key constant @type Number */
+    THREE: 51,
+    /** Key constant @type Number */
+    FOUR: 52,
+    /** Key constant @type Number */
+    FIVE: 53,
+    /** Key constant @type Number */
+    SIX: 54,
+    /** Key constant @type Number */
+    SEVEN: 55,
+    /** Key constant @type Number */
+    EIGHT: 56,
+    /** Key constant @type Number */
+    NINE: 57,
+    /** Key constant @type Number */
+    A: 65,
+    /** Key constant @type Number */
+    B: 66,
+    /** Key constant @type Number */
+    C: 67,
+    /** Key constant @type Number */
+    D: 68,
+    /** Key constant @type Number */
+    E: 69,
+    /** Key constant @type Number */
+    F: 70,
+    /** Key constant @type Number */
+    G: 71,
+    /** Key constant @type Number */
+    H: 72,
+    /** Key constant @type Number */
+    I: 73,
+    /** Key constant @type Number */
+    J: 74,
+    /** Key constant @type Number */
+    K: 75,
+    /** Key constant @type Number */
+    L: 76,
+    /** Key constant @type Number */
+    M: 77,
+    /** Key constant @type Number */
+    N: 78,
+    /** Key constant @type Number */
+    O: 79,
+    /** Key constant @type Number */
+    P: 80,
+    /** Key constant @type Number */
+    Q: 81,
+    /** Key constant @type Number */
+    R: 82,
+    /** Key constant @type Number */
+    S: 83,
+    /** Key constant @type Number */
+    T: 84,
+    /** Key constant @type Number */
+    U: 85,
+    /** Key constant @type Number */
+    V: 86,
+    /** Key constant @type Number */
+    W: 87,
+    /** Key constant @type Number */
+    X: 88,
+    /** Key constant @type Number */
+    Y: 89,
+    /** Key constant @type Number */
+    Z: 90,
+    /** Key constant @type Number */
+    CONTEXT_MENU: 93,
+    /** Key constant @type Number */
+    NUM_ZERO: 96,
+    /** Key constant @type Number */
+    NUM_ONE: 97,
+    /** Key constant @type Number */
+    NUM_TWO: 98,
+    /** Key constant @type Number */
+    NUM_THREE: 99,
+    /** Key constant @type Number */
+    NUM_FOUR: 100,
+    /** Key constant @type Number */
+    NUM_FIVE: 101,
+    /** Key constant @type Number */
+    NUM_SIX: 102,
+    /** Key constant @type Number */
+    NUM_SEVEN: 103,
+    /** Key constant @type Number */
+    NUM_EIGHT: 104,
+    /** Key constant @type Number */
+    NUM_NINE: 105,
+    /** Key constant @type Number */
+    NUM_MULTIPLY: 106,
+    /** Key constant @type Number */
+    NUM_PLUS: 107,
+    /** Key constant @type Number */
+    NUM_MINUS: 109,
+    /** Key constant @type Number */
+    NUM_PERIOD: 110,
+    /** Key constant @type Number */
+    NUM_DIVISION: 111,
+    /** Key constant @type Number */
+    F1: 112,
+    /** Key constant @type Number */
+    F2: 113,
+    /** Key constant @type Number */
+    F3: 114,
+    /** Key constant @type Number */
+    F4: 115,
+    /** Key constant @type Number */
+    F5: 116,
+    /** Key constant @type Number */
+    F6: 117,
+    /** Key constant @type Number */
+    F7: 118,
+    /** Key constant @type Number */
+    F8: 119,
+    /** Key constant @type Number */
+    F9: 120,
+    /** Key constant @type Number */
+    F10: 121,
+    /** Key constant @type Number */
+    F11: 122,
+    /** Key constant @type Number */
+    F12: 123,	
+    
+    /** @private */
+    isNavKeyPress : function(){
+        var me = this,
+        	k = this.normalizeKey(me.keyCode);		
+        return (k >= 33 && k <= 40) ||  // Page Up/Down, End, Home, Left, Up, Right, Down
+		k == me.RETURN ||
+		k == me.TAB ||
+		k == me.ESC;
+    },
+
+    isSpecialKey : function(){
+        var k = this.normalizeKey(this.keyCode);
+        return (this.type == 'keypress' && this.ctrlKey) ||
+		this.isNavKeyPress() ||
+        (k == this.BACKSPACE) || // Backspace
+		(k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock
+		(k >= 44 && k <= 45);   // Print Screen, Insert
+    },
+	
+	getPoint : function(){
+	    return new Ext.lib.Point(this.xy[0], this.xy[1]);
+	},
+
+    /**
+     * Returns true if the control, meta, shift or alt key was pressed during this event.
+     * @return {Boolean}
+     */
+    hasModifier : function(){
+        return ((this.ctrlKey || this.altKey) || this.shiftKey);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Ext-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Ext-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Ext-more.js	(revision 625)
@@ -0,0 +1,669 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext
+ */
+
+Ext.ns("Ext.grid", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
+       "Ext.state", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct");
+    /**
+     * Namespace alloted for extensions to the framework.
+     * @property ux
+     * @type Object
+     */
+
+Ext.apply(Ext, function(){
+    var E = Ext, idSeed = 0;
+
+    return {
+        /**
+        * A reusable empty function
+        * @property
+        * @type Function
+        */
+        emptyFn : function(){},
+
+        /**
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
+         * For other browsers it uses an inline data URL.
+         * @type String
+         */
+        BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 ?
+                            'http:/' + '/extjs.com/s.gif' :
+                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
+
+        extendX : function(supr, fn){
+            return Ext.extend(supr, fn(supr.prototype));
+        },
+
+        /**
+         * Returns the current HTML document object as an {@link Ext.Element}.
+         * @return Ext.Element The document
+         */
+        getDoc : function(){
+            return Ext.get(document);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript date object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isDate : function(v){
+            return Object.prototype.toString.apply(v) === '[object Date]';
+        },
+
+        /**
+         * 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){
+            v = Number(v === null || typeof v == 'boolean'? NaN : v);
+            return isNaN(v)? defaultValue : v;
+        },
+
+        /**
+         * <p>Utility method for returning a default value if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Mixed} defaultValue The value to return if the original value is empty
+         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
+         * @return {Mixed} value, if non-empty, else defaultValue
+         */
+        value : function(v, defaultValue, allowBlank){
+            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
+        },
+
+        /**
+         * Escapes the passed string for use in a regular expression
+         * @param {String} str
+         * @return {String}
+         */
+        escapeRe : function(s) {
+            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
+        },
+
+        sequence : function(o, name, fn, scope){
+            o[name] = o[name].createSequence(fn, scope);
+        },
+
+        /**
+         * Applies event listeners to elements by selectors when the document is ready.
+         * The event name is specified with an <tt>&#64;</tt> suffix.
+         * <pre><code>
+Ext.addBehaviors({
+    // add a listener for click on all anchors in element with id foo
+    '#foo a&#64;click' : function(e, t){
+        // do something
+    },
+    
+    // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
+    '#foo a, #bar span.some-class&#64;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);
+                });
+            } else {
+                var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
+                    parts,
+                    b,
+                    s;
+                for (b in o) {
+                    if ((parts = b.split('@'))[1]) { // for Object prototype breakers
+                        s = parts[0];
+                        if(!cache[s]){
+                            cache[s] = Ext.select(s);
+                        }
+                        cache[s].on(parts[1], o[b]);
+                    }
+                }
+                cache = null;
+            }
+        },
+
+
+        // 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;
+        },
+
+        /**
+         * Copies a set of named properties fom the source object to the destination object.
+         * <p>example:<pre><code>
+ImageComponent = Ext.extend(Ext.BoxComponent, {
+    initComponent: function() {
+        this.autoEl = { tag: 'img' };
+        MyComponent.superclass.initComponent.apply(this, arguments);
+        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
+    }
+});
+         * </code></pre> 
+         * @param {Object} The destination object.
+         * @param {Object} The source object.
+         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * of property names to copy.
+         * @return {Object} The modified object.
+        */
+        copyTo : function(dest, source, names){
+            if(typeof names == 'string'){
+                names = names.split(/[,;\s]/);
+            }
+            Ext.each(names, function(name){
+                if(source.hasOwnProperty(name)){
+                    dest[name] = source[name];
+                }
+            }, this);
+            return dest;
+        },
+
+        /**
+         * 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}, {@link Ext.Component}, or an Array of either of these to destroy
+         * @param {Mixed} arg2 (optional)
+         * @param {Mixed} etc... (optional)
+         */
+        destroy : function(){
+            Ext.each(arguments, function(arg){
+                if(arg){
+                    if(Ext.isArray(arg)){
+                        this.destroy.apply(this, arg);
+                    }else if(Ext.isFunction(arg.destroy)){
+                        arg.destroy();
+                    }else if(arg.dom){
+                        arg.remove();
+                    }    
+                }
+            }, this);
+        },
+
+        /**
+         * Attempts to destroy and then remove a set of named properties of the passed object.
+         * @param {Object} o The object (most likely a Component) who's properties you wish to destroy.
+         * @param {Mixed} arg1 The name of the property to destroy and remove from the object.
+         * @param {Mixed} etc... More property names to destroy and remove.
+         */
+        destroyMembers : function(o, arg1, arg2, etc){
+            for(var i = 1, a = arguments, len = a.length; i < len; i++) {
+                Ext.destroy(o[a[i]]);
+                delete o[a[i]];
+            }
+        },
+
+        /**
+         * Creates a copy of the passed Array with falsy values removed.
+         * @param {Array/NodeList} arr The Array from which to remove falsy values.
+         * @return {Array} The new, compressed Array.
+         */
+        clean : function(arr){
+            var ret = [];
+            Ext.each(arr, function(v){
+                if(!!v){
+                    ret.push(v);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Creates a copy of the passed Array, filtered to contain only unique values.
+         * @param {Array} arr The Array to filter
+         * @return {Array} The new Array containing unique values.
+         */
+        unique : function(arr){
+            var ret = [],
+                collect = {};
+
+            Ext.each(arr, function(v) {
+                if(!collect[v]){
+                    ret.push(v);
+                }
+                collect[v] = true;
+            });
+            return ret;
+        },
+
+        /**
+         * Recursively flattens into 1-d Array. Injects Arrays inline.
+         * @param {Array} arr The array to flatten
+         * @return {Array} The new, flattened array.
+         */
+        flatten : function(arr){
+            var worker = [];
+            function rFlatten(a) {
+                Ext.each(a, function(v) {
+                    if(Ext.isArray(v)){
+                        rFlatten(v);
+                    }else{
+                        worker.push(v);
+                    }
+                });
+                return worker;
+            }
+            return rFlatten(arr);
+        },
+
+        /**
+         * Returns the minimum value in the Array.
+         * @param {Array|NodeList} arr The Array from which to select the minimum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines minimization.
+         *                   If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The minimum value in the Array.
+         */
+        min : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a < b ? -1 : 1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == -1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Returns the maximum value in the Array
+         * @param {Array|NodeList} arr The Array from which to select the maximum value.
+         * @param {Function} comp (optional) a function to perform the comparision which determines maximization.
+         *                   If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1
+         * @return {Object} The maximum value in the Array.
+         */
+        max : function(arr, comp){
+            var ret = arr[0];
+            comp = comp || function(a,b){ return a > b ? 1 : -1; };
+            Ext.each(arr, function(v) {
+                ret = comp(ret, v) == 1 ? ret : v;
+            });
+            return ret;
+        },
+
+        /**
+         * Calculates the mean of the Array
+         * @param {Array} arr The Array to calculate the mean value of.
+         * @return {Number} The mean.
+         */
+        mean : function(arr){
+           return Ext.sum(arr) / arr.length;
+        },
+
+        /**
+         * Calculates the sum of the Array
+         * @param {Array} arr The Array to calculate the sum value of.
+         * @return {Number} The sum.
+         */
+        sum : function(arr){
+           var ret = 0;
+           Ext.each(arr, function(v) {
+               ret += v;
+           });
+           return ret;
+        },
+
+        /**
+         * Partitions the set into two sets: a true set and a false set.
+         * Example: 
+         * Example2: 
+         * <pre><code>
+// Example 1:
+Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
+
+// Example 2:
+Ext.partition(
+    Ext.query("p"),
+    function(val){
+        return val.className == "class1"
+    }
+);
+// true are those paragraph elements with a className of "class1",
+// false set are those that do not have that className.
+         * </code></pre>
+         * @param {Array|NodeList} arr The array to partition
+         * @param {Function} truth (optional) a function to determine truth.  If this is omitted the element
+         *                   itself must be able to be evaluated for its truthfulness.
+         * @return {Array} [true<Array>,false<Array>]
+         */
+        partition : function(arr, truth){
+            var ret = [[],[]];
+            Ext.each(arr, function(v, i, a) {
+                ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v);
+            });
+            return ret;
+        },
+
+        /**
+         * Invokes a method on each item in an Array.
+         * <pre><code>
+// Example:
+Ext.invoke(Ext.query("p"), "getAttribute", "id");
+// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to invoke the method on.
+         * @param {String} methodName The method name to invoke.
+         * @param {Anything} ... Arguments to send into the method invocation.
+         * @return {Array} The results of invoking the method on each item in the array.
+         */
+        invoke : function(arr, methodName){
+            var ret = [],
+                args = Array.prototype.slice.call(arguments, 2);
+            Ext.each(arr, function(v,i) {
+                if (v && typeof v[methodName] == "function") {
+                    ret.push(v[methodName].apply(v, args));
+                } else {
+                    ret.push(undefined);
+                }
+            });
+            return ret;
+        },
+
+        /**
+         * Plucks the value of a property from each item in the Array
+         * <pre><code>
+// Example:
+Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
+         * </code></pre>
+         * @param {Array|NodeList} arr The Array of items to pluck the value from.
+         * @param {String} prop The property name to pluck from each element.
+         * @return {Array} The value from each item in the Array.
+         */
+        pluck : function(arr, prop){
+            var ret = [];
+            Ext.each(arr, function(v) {
+                ret.push( v[prop] );
+            });
+            return ret;
+        },
+
+        /**
+         * <p>Zips N sets together.</p>
+         * <pre><code>
+// Example 1:
+Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
+// Example 2:
+Ext.zip(
+    [ "+", "-", "+"],
+    [  12,  10,  22],
+    [  43,  15,  96],
+    function(a, b, c){
+        return "$" + a + "" + b + "." + c
+    }
+); // ["$+12.43", "$-10.15", "$+22.96"]
+         * </code></pre>
+         * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values.
+         * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together.
+         * @return {Array} The zipped set.
+         */
+        zip : function(){
+            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+                arrs = parts[0],
+                fn = parts[1][0],
+                len = Ext.max(Ext.pluck(arrs, "length")),
+                ret = [];
+
+            for (var i = 0; i < len; i++) {
+                ret[i] = [];
+                if(fn){
+                    ret[i] = fn.apply(fn, Ext.pluck(arrs, i));
+                }else{
+                    for (var j = 0, aLen = arrs.length; j < aLen; j++){
+                        ret[i].push( arrs[j][i] );
+                    }
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * This is shorthand reference to {@link Ext.ComponentMgr#get}.
+         * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id}
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+        */
+        getCmp : function(id){
+            return Ext.ComponentMgr.get(id);
+        },
+
+        /**
+         * 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: E.isIE6 || (E.isMac && E.isGecko2),
+
+        // 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:<div class="mdetail-params"><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>date</b>: If the object passed is a Date object</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>
+         * </ul></div>
+         * @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';
+                    case Date: return 'date';
+                }
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
+                    return 'nodelist';
+                }
+            }
+            return t;
+        },
+
+        intercept : function(o, name, fn, scope){
+            o[name] = o[name].createInterceptor(fn, scope);
+        },
+
+        // internal
+        callback : function(cb, scope, args, delay){
+            if(Ext.isFunction(cb)){
+                if(delay){
+                    cb.defer(delay, scope, args || []);
+                }else{
+                    cb.apply(scope, args || []);
+                }
+            }
+        }
+    };
+}());
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+    /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function(){
+                    var retval = method.apply(this || window, arguments);
+                    fcn.apply(scope || this || window, arguments);
+                    return retval;
+                };
+    }
+});
+
+
+/**
+ * @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 = String(val);
+        if(!ch) {
+            ch = " ";
+        }
+        while (result.length < size) {
+            result = ch + result;
+        }
+        return result;
+    }
+});
+
+/**
+ * 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, ""); };
+}();
+
+// here to prevent dependency on Date.js
+/**
+ 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());
+};
+
+
+/**
+ * @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);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/Template-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/Template-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/Template-more.js	(revision 625)
@@ -0,0 +1,115 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Template
+ */
+Ext.apply(Ext.Template.prototype, {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     * @hide repeat doc
+     */
+    applyTemplate : function(values){
+		var me = this,
+			useF = me.disableFormats !== true,
+        	fm = Ext.util.Format, 
+        	tpl = me;	    
+	    
+        if(me.compiled){
+            return me.compiled(values);
+        }
+        function fn(m, name, format, args){
+            if (format && useF) {
+                if (format.substr(0, 5) == "this.") {
+                    return tpl.call(format.substr(5), values[name], values);
+                } else {
+                    if (args) {
+                        // quoted values are required for strings in compiled templates,
+                        // but for non compiled we need to strip them
+                        // quoted reversed for jsmin
+                        var re = /^\s*['"](.*)["']\s*$/;
+                        args = args.split(',');
+                        for(var i = 0, len = args.length; i < len; i++){
+                            args[i] = args[i].replace(re, "$1");
+                        }
+                        args = [values[name]].concat(args);
+                    } else {
+                        args = [values[name]];
+                    }
+                    return fm[format].apply(fm, args);
+                }
+            } else {
+                return values[name] !== undefined ? values[name] : "";
+            }
+        }
+        return me.html.replace(me.re, fn);
+    },
+		
+    /**
+     * <tt>true</tt> to disable format functions (defaults to <tt>false</tt>)
+     * @type Boolean
+     * @property
+     */
+    disableFormats : false,				
+	
+    /**
+     * The regular expression used to match template variables
+     * @type RegExp
+     * @property
+     * @hide repeat doc
+     */
+    re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
+    
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     * @hide repeat doc
+     */
+    compile : function(){
+        var me = this,
+        	fm = Ext.util.Format,
+        	useF = me.disableFormats !== true,
+        	sep = Ext.isGecko ? "+" : ",",
+        	body;
+        
+        function fn(m, name, format, args){
+            if(format && useF){
+                args = args ? ',' + args : "";
+                if(format.substr(0, 5) != "this."){
+                    format = "fm." + format + '(';
+                }else{
+                    format = 'this.call("'+ format.substr(5) + '", ';
+                    args = ", values";
+                }
+            }else{
+                args= ''; format = "(values['" + name + "'] == undefined ? '' : ";
+            }
+            return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'";
+        }
+        
+        // branched to use + in gecko and [].join() in others
+        if(Ext.isGecko){
+            body = "this.compiled = function(values){ return '" +
+                   me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+                    "';};";
+        }else{
+            body = ["this.compiled = function(values){ return ['"];
+            body.push(me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn));
+            body.push("'].join('');};");
+            body = body.join('');
+        }
+        eval(body);
+        return me;
+    },
+    
+    // private function used to call members
+    call : function(fnName, value, allValues){
+        return this[fnName](value, allValues);
+    }
+});
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; 
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/CompositeElementLite.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/CompositeElementLite.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/CompositeElementLite.js	(revision 625)
@@ -0,0 +1,197 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.CompositeElementLite
+ * Flyweight composite class. Reuses the same Ext.Element for element operations.
+ <pre><code>
+ var els = Ext.select("#some-el div.some-class");
+ // or select directly from an existing element
+ var el = Ext.get('some-el');
+ el.select('div.some-class');
+
+ els.setWidth(100); // all elements become 100 width
+ els.hide(true); // all elements fade out and hide
+ // or
+ els.setWidth(100).hide(true);
+ </code></pre><br><br>
+ * <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
+ * actions will be performed on all the elements in this collection.</b>
+ */
+Ext.CompositeElementLite = function(els, root){
+    this.elements = [];
+    this.add(els, root);
+    this.el = new Ext.Element.Flyweight();
+};
+
+Ext.CompositeElementLite.prototype = {
+	isComposite: true,	
+	/**
+     * Returns the number of elements in this composite
+     * @return Number
+     */
+    getCount : function(){
+        return this.elements.length;
+    },    
+	add : function(els){
+        if(els){
+            if (Ext.isArray(els)) {
+                this.elements = this.elements.concat(els);
+            } else {
+                var yels = this.elements;                	                
+	            Ext.each(els, function(e) {
+                    yels.push(e);
+                });
+            }
+        }
+        return this;
+    },
+    invoke : function(fn, args){
+        var els = this.elements,
+        	el = this.el;        
+	    Ext.each(els, function(e) {    
+            el.dom = e;
+        	Ext.Element.prototype[fn].apply(el, args);
+        });
+        return this;
+    },
+    /**
+     * Returns a flyweight Element of the dom element object at the specified index
+     * @param {Number} index
+     * @return {Ext.Element}
+     */
+    item : function(index){
+	    var me = this;
+        if(!me.elements[index]){
+            return null;
+        }
+        me.el.dom = me.elements[index];
+        return me.el;
+    },
+
+    // fixes scope with flyweight
+    addListener : function(eventName, handler, scope, opt){
+        Ext.each(this.elements, function(e) {
+	        Ext.EventManager.on(e, eventName, handler, scope || e, opt);
+        });
+        return this;
+    },
+    /**
+    * Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
+    * passed is the flyweight (shared) Ext.Element instance, so if you require a
+    * a reference to the dom node, use el.dom.</b>
+    * @param {Function} fn The function to call
+    * @param {Object} scope (optional) The <i>this</i> object (defaults to the element)
+    * @return {CompositeElement} this
+    */
+    each : function(fn, scope){       
+        var me = this,
+        	el = me.el;
+       
+	    Ext.each(me.elements, function(e,i) {    
+            el.dom = e;
+        	return fn.call(scope || el, el, me, i);
+        });
+        return me;
+    },
+    
+    /**
+     * Find the index of the passed element within the composite collection.
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found.
+     */
+    indexOf : function(el){
+        return this.elements.indexOf(Ext.getDom(el));
+    },
+    
+    /**
+    * Replaces the specified element with the passed element.
+    * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
+    * to replace.
+    * @param {Mixed} replacement The id of an element or the Element itself.
+    * @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too.
+    * @return {CompositeElement} this
+    */    
+    replaceElement : function(el, replacement, domReplace){
+        var index = !isNaN(el) ? el : this.indexOf(el),
+        	d;
+        if(index > -1){
+            replacement = Ext.getDom(replacement);
+            if(domReplace){
+                d = this.elements[index];
+                d.parentNode.insertBefore(replacement, d);
+                Ext.removeNode(d);
+            }
+            this.elements.splice(index, 1, replacement);
+        }
+        return this;
+    },
+    
+    /**
+     * Removes all elements.
+     */
+    clear : function(){
+        this.elements = [];
+    }
+};
+
+Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener;
+
+(function(){
+var fnName,
+	ElProto = Ext.Element.prototype,
+	CelProto = Ext.CompositeElementLite.prototype;
+	
+for(fnName in ElProto){
+    if(Ext.isFunction(ElProto[fnName])){
+	    (function(fnName){ 
+		    CelProto[fnName] = CelProto[fnName] || function(){
+		    	return this.invoke(fnName, arguments);
+	    	};
+    	}).call(CelProto, fnName);
+        
+    }
+}
+})();
+
+if(Ext.DomQuery){
+    Ext.Element.selectorFunction = Ext.DomQuery.select;
+} 
+
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) <b>Not supported in core</b>
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext.Element
+ * @method select
+ */
+Ext.Element.select = function(selector, unique, root){
+    var els;
+    if(typeof selector == "string"){
+        els = Ext.Element.selectorFunction(selector, root);
+    }else if(selector.length !== undefined){
+        els = selector;
+    }else{
+        throw "Invalid selector";
+    }
+    return new Ext.CompositeElementLite(els);
+};
+/**
+ * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
+ * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
+ * {@link Ext.CompositeElementLite CompositeElementLite} object.
+ * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)
+ * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
+ * @return {CompositeElementLite/CompositeElement}
+ * @member Ext
+ * @method select
+ */
+Ext.select = Ext.Element.select;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomHelper.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomHelper.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomHelper.js	(revision 625)
@@ -0,0 +1,378 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DomHelper
+ * <p>The DomHelper class provides a layer of abstraction from DOM and transparently supports creating
+ * elements via DOM or using HTML fragments. It also has the ability to create HTML fragment templates
+ * from your DOM building code.</p>
+ *
+ * <p><b><u>DomHelper element specification object</u></b></p>
+ * <p>A specification object is used when creating elements. Attributes of this object
+ * are assumed to be element attributes, except for 4 special attributes:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>tag</tt></b> : <div class="sub-desc">The tag name of the element</div></li>
+ * <li><b><tt>children</tt></b> : or <tt>cn</tt><div class="sub-desc">An array of the
+ * same kind of element definition objects to be created and appended. These can be nested
+ * as deep as you want.</div></li>
+ * <li><b><tt>cls</tt></b> : <div class="sub-desc">The class attribute of the element.
+ * This will end up being either the "class" attribute on a HTML fragment or className
+ * for a DOM node, depending on whether DomHelper is using fragments or DOM.</div></li>
+ * <li><b><tt>html</tt></b> : <div class="sub-desc">The innerHTML for the element</div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Insertion methods</u></b></p>
+ * <p>Commonly used insertion methods:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #append}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertBefore}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertAfter}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #overwrite}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #createTemplate}</tt></b> : <div class="sub-desc"></div></li>
+ * <li><b><tt>{@link #insertHtml}</tt></b> : <div class="sub-desc"></div></li>
+ * </ul></div></p>
+ *
+ * <p><b><u>Example</u></b></p>
+ * <p>This is an example, where an unordered list with 3 children items is appended to an existing
+ * element with id <tt>'my-div'</tt>:<br>
+ <pre><code>
+var dh = Ext.DomHelper; // create shorthand alias
+// specification object
+var spec = {
+    id: 'my-ul',
+    tag: 'ul',
+    cls: 'my-list',
+    // append children after creating
+    children: [     // may also specify 'cn' instead of 'children'
+        {tag: 'li', id: 'item0', html: 'List Item 0'},
+        {tag: 'li', id: 'item1', html: 'List Item 1'},
+        {tag: 'li', id: 'item2', html: 'List Item 2'}
+    ]
+};
+var list = dh.append(
+    'my-div', // the context element 'my-div' can either be the id or the actual node
+    spec      // the specification object
+);
+ </code></pre></p>
+ * <p>Element creation specification parameters in this class may also be passed as an Array of
+ * specification objects. This can be used to insert multiple sibling nodes into an existing
+ * container very efficiently. For example, to add more list items to the example above:<pre><code>
+dh.append('my-ul', [
+    {tag: 'li', id: 'item3', html: 'List Item 3'},
+    {tag: 'li', id: 'item4', html: 'List Item 4'}
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Templating</u></b></p>
+ * <p>The real power is in the built-in templating. Instead of creating or appending any elements,
+ * <tt>{@link #createTemplate}</tt> returns a Template object which can be used over and over to
+ * insert new elements. Revisiting the example above, we could utilize templating this time:
+ * <pre><code>
+// create the node
+var list = dh.append('my-div', {tag: 'ul', cls: 'my-list'});
+// get template
+var tpl = dh.createTemplate({tag: 'li', id: 'item{0}', html: 'List Item {0}'});
+
+for(var i = 0; i < 5, i++){
+    tpl.append(list, [i]); // use template to append to the actual node
+}
+ * </code></pre></p>
+ * <p>An example using a template:<pre><code>
+var html = '<a id="{0}" href="{1}" class="nav">{2}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', ['link1', 'http://www.jackslocum.com/', "Jack&#39;s Site"]);
+tpl.append('blog-roll', ['link2', 'http://www.dustindiaz.com/', "Dustin&#39;s Site"]);
+ * </code></pre></p>
+ *
+ * <p>The same example using named parameters:<pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.append('blog-roll', {
+    id: 'link1',
+    url: 'http://www.jackslocum.com/',
+    text: "Jack&#39;s Site"
+});
+tpl.append('blog-roll', {
+    id: 'link2',
+    url: 'http://www.dustindiaz.com/',
+    text: "Dustin&#39;s Site"
+});
+ * </code></pre></p>
+ *
+ * <p><b><u>Compiling Templates</u></b></p>
+ * <p>Templates are applied using regular expressions. The performance is great, but if
+ * you are adding a bunch of DOM elements using the same template, you can increase
+ * performance even further by {@link Ext.Template#compile "compiling"} the template.
+ * The way "{@link Ext.Template#compile compile()}" works is the template is parsed and
+ * broken up at the different variable points and a dynamic function is created and eval'ed.
+ * The generated function performs string concatenation of these parts and the passed
+ * variables instead of using regular expressions.
+ * <pre><code>
+var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';
+
+var tpl = new Ext.DomHelper.createTemplate(html);
+tpl.compile();
+
+//... use template like normal
+ * </code></pre></p>
+ *
+ * <p><b><u>Performance Boost</u></b></p>
+ * <p>DomHelper will transparently create HTML fragments when it can. Using HTML fragments instead
+ * of DOM can significantly boost performance.</p>
+ * <p>Element creation specification parameters may also be strings. If {@link #useDom} is <tt>false</tt>,
+ * then the string is used as innerHTML. If {@link #useDom} is <tt>true</tt>, a string specification
+ * results in the creation of a text node. Usage:</p>
+ * <pre><code>
+Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
+ * </code></pre>
+ * @singleton
+ */
+Ext.DomHelper = function(){
+    var tempTableEl = null,
+    	emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,
+    	tableRe = /^table|tbody|tr|td$/i,
+    	pub,
+    	// kill repeat to save bytes
+    	afterbegin = "afterbegin",
+    	afterend = "afterend",
+    	beforebegin = "beforebegin",
+    	beforeend = "beforeend",
+    	ts = '<table>',
+        te = '</table>',
+        tbs = ts+'<tbody>',
+        tbe = '</tbody>'+te,
+        trs = tbs + '<tr>',
+        tre = '</tr>'+tbe;
+
+    // private
+    function doInsert(el, o, returnElement, pos, sibling, append){
+        var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o));
+        return returnElement ? Ext.get(newNode, true) : newNode;
+    }
+
+    // build as innerHTML where available
+    function createHtml(o){
+	    var b = "",
+	    	attr,
+	    	val,
+	    	key,
+	    	keyVal,
+	    	cn;
+
+        if(typeof o == 'string'){
+            b = o;
+        } else if (Ext.isArray(o)) {
+	        Ext.each(o, function(v) {
+                b += createHtml(v);
+            });
+        } else {
+	        b += "<" + (o.tag = o.tag || "div");
+            Ext.iterate(o, function(attr, val){
+                if(!/tag|children|cn|html$/i.test(attr)){
+                    if (Ext.isObject(val)) {
+                        b += " " + attr + "='";
+                        Ext.iterate(val, function(key, keyVal){
+                            b += key + ":" + keyVal + ";";
+                        });
+                        b += "'";
+                    }else{
+                        b += " " + ({cls : "class", htmlFor : "for"}[attr] || attr) + "='" + val + "'";
+                    }
+                }
+            });
+	        // Now either just close the tag or try to add children and close the tag.
+	        if (emptyTags.test(o.tag)) {
+	            b += "/>";
+	        } else {
+	            b += ">";
+	            if ((cn = o.children || o.cn)) {
+	                b += createHtml(cn);
+	            } else if(o.html){
+	                b += o.html;
+	            }
+	            b += "</" + o.tag + ">";
+        	}
+        }
+        return b;
+    }
+
+    function ieTable(depth, s, h, e){
+        tempTableEl.innerHTML = [s, h, e].join('');
+        var i = -1,
+        	el = tempTableEl;
+        while(++i < depth){
+            el = el.firstChild;
+        }
+        return el;
+    }
+
+    /**
+     * @ignore
+     * Nasty code for IE's broken table implementation
+     */
+    function insertIntoTable(tag, where, el, html) {
+	    var node,
+        	before;
+
+        tempTableEl = tempTableEl || document.createElement('div');
+
+  	    if(tag == 'td' && (where == afterbegin || where == beforeend) ||
+  	       !/td|tr|tbody/i.test(tag) && (where == beforebegin || where == afterend)) {
+            return;
+        }
+        before = where == beforebegin ? el :
+		 		 where == afterend ? el.nextSibling :
+				 where == afterbegin ? el.firstChild : null;
+
+        if (where == beforebegin || where == afterend) {
+        	el = el.parentNode;
+    	}
+
+        if (tag == 'td' || (tag == "tr" && (where == beforeend || where == afterbegin))) {
+	        node = ieTable(4, trs, html, tre);
+        } else if ((tag == "tbody" && (where == beforeend || where == afterbegin)) ||
+        		   (tag == "tr" && (where == beforebegin || where == afterend))) {
+	        node = ieTable(3, tbs, html, tbe);
+        } else {
+	     	node = ieTable(2, ts, html, te);
+        }
+        el.insertBefore(node, before);
+        return node;
+    }
+
+
+    pub = {
+	    /**
+	     * Returns the markup for the passed Element(s) config.
+	     * @param {Object} o The DOM object spec (and children)
+	     * @return {String}
+	     */
+	    markup : function(o){
+	        return createHtml(o);
+	    },
+
+	    /**
+	     * Inserts an HTML fragment into the DOM.
+	     * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
+	     * @param {HTMLElement} el The context element
+	     * @param {String} html The HTML fragmenet
+	     * @return {HTMLElement} The new node
+	     */
+	    insertHtml : function(where, el, html){
+	        var hash = {},
+	        	hashVal,
+ 	        	setStart,
+	        	range,
+	        	frag,
+	        	rangeEl,
+	        	rs;
+
+	        where = where.toLowerCase();
+	        // add these here because they are used in both branches of the condition.
+	        hash[beforebegin] = ['BeforeBegin', 'previousSibling'];
+	        hash[afterend] = ['AfterEnd', 'nextSibling'];
+
+	        if (el.insertAdjacentHTML) {
+	            if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){
+	            	return rs;
+	            }
+	            // add these two to the hash.
+	            hash[afterbegin] = ['AfterBegin', 'firstChild'];
+	            hash[beforeend] = ['BeforeEnd', 'lastChild'];
+	            if ((hashVal = hash[where])) {
+		        	el.insertAdjacentHTML(hashVal[0], html);
+	            	return el[hashVal[1]];
+	            }
+	        } else {
+		        range = el.ownerDocument.createRange();
+		        setStart = "setStart" + (/end/i.test(where) ? "After" : "Before");
+		        if (hash[where]) {
+			     	range[setStart](el);
+			     	frag = range.createContextualFragment(html);
+			     	el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling);
+			     	return el[(where == beforebegin ? "previous" : "next") + "Sibling"];
+		        } else {
+			        rangeEl = (where == afterbegin ? "first" : "last") + "Child";
+			        if (el.firstChild) {
+				        range[setStart](el[rangeEl]);
+				        frag = range.createContextualFragment(html);
+                        if(where == afterbegin){
+                            el.insertBefore(frag, el.firstChild);
+                        }else{
+                            el.appendChild(frag);
+                        }
+			        } else {
+		 	            el.innerHTML = html;
+	 	            }
+	 	            return el[rangeEl];
+		        }
+	        }
+	        throw 'Illegal insertion point -> "' + where + '"';
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them before el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertBefore : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, beforebegin);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them after el.
+	     * @param {Mixed} el The context element
+	     * @param {Object} o The DOM object spec (and children)
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertAfter : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterend, "nextSibling");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and inserts them as the first child of el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    insertFirst : function(el, o, returnElement){
+	        return doInsert(el, o, returnElement, afterbegin, "firstChild");
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and appends them to el.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    append : function(el, o, returnElement){
+		    return doInsert(el, o, returnElement, beforeend, "", true);
+	    },
+
+	    /**
+	     * Creates new DOM element(s) and overwrites the contents of el with them.
+	     * @param {Mixed} el The context element
+	     * @param {Object/String} o The DOM object spec (and children) or raw HTML blob
+	     * @param {Boolean} returnElement (optional) true to return a Ext.Element
+	     * @return {HTMLElement/Ext.Element} The new node
+	     */
+	    overwrite : function(el, o, returnElement){
+	        el = Ext.getDom(el);
+	        el.innerHTML = createHtml(o);
+	        return returnElement ? Ext.get(el.firstChild) : el.firstChild;
+	    },
+
+	    createHtml : createHtml
+    };
+    return pub;
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomQuery.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomQuery.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/DomQuery.js	(revision 625)
@@ -0,0 +1,826 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * This is code is also distributed under MIT license for use
+ * with jQuery and prototype JavaScript libraries.
+ */
+/**
+ * @class Ext.DomQuery
+Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
+<p>
+DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p>
+
+<p>
+All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.
+</p>
+<h4>Element Selectors:</h4>
+<ul class="list">
+    <li> <b>*</b> any element</li>
+    <li> <b>E</b> an element with the tag E</li>
+    <li> <b>E F</b> All descendent elements of E that have the tag F</li>
+    <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li>
+    <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li>
+    <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li>
+</ul>
+<h4>Attribute Selectors:</h4>
+<p>The use of &#64; and quotes are optional. For example, div[&#64;foo='bar'] is also a valid attribute selector.</p>
+<ul class="list">
+    <li> <b>E[foo]</b> has an attribute "foo"</li>
+    <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li>
+    <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li>
+    <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li>
+    <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li>
+    <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li>
+    <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li>
+</ul>
+<h4>Pseudo Classes:</h4>
+<ul class="list">
+    <li> <b>E:first-child</b> E is the first child of its parent</li>
+    <li> <b>E:last-child</b> E is the last child of its parent</li>
+    <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li>
+    <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li>
+    <li> <b>E:nth-child(even)</b> E is an even child of its parent</li>
+    <li> <b>E:only-child</b> E is the only child of its parent</li>
+    <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li>
+    <li> <b>E:first</b> the first E in the resultset</li>
+    <li> <b>E:last</b> the last E in the resultset</li>
+    <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li>
+    <li> <b>E:odd</b> shortcut for :nth-child(odd)</li>
+    <li> <b>E:even</b> shortcut for :nth-child(even)</li>
+    <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li>
+    <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li>
+    <li> <b>E:not(S)</b> an E element that does not match simple selector S</li>
+    <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li>
+    <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li>
+    <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li>
+</ul>
+<h4>CSS Value Selectors:</h4>
+<ul class="list">
+    <li> <b>E{display=none}</b> css value "display" that equals "none"</li>
+    <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li>
+    <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li>
+    <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li>
+    <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li>
+    <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li>
+</ul>
+ * @singleton
+ */
+Ext.DomQuery = function(){
+    var cache = {}, 
+    	simpleCache = {}, 
+    	valueCache = {},
+    	nonSpace = /\S/,
+    	trimRe = /^\s+|\s+$/g,
+    	tplRe = /\{(\d+)\}/g,
+    	modeRe = /^(\s?[\/>+~]\s?|\s|$)/,
+    	tagTokenRe = /^(#)?([\w-\*]+)/,
+    	nthRe = /(\d*)n\+?(\d*)/, 
+    	nthRe2 = /\D/,
+    	// This is for IE MSXML which does not support expandos.
+	    // IE runs the same speed using setAttribute, however FF slows way down
+	    // and Safari completely fails so they need to continue to use expandos.
+	    isIE = window.ActiveXObject ? true : false,
+        isOpera = Ext.isOpera,
+	    key = 30803;
+	    
+    // this eval is stop the compressor from
+	// renaming the variable to something shorter
+	eval("var batch = 30803;");    	
+
+    function child(p, index){
+        var i = 0,
+        	n = p.firstChild;
+        while(n){
+            if(n.nodeType == 1){
+               if(++i == index){
+                   return n;
+               }
+            }
+            n = n.nextSibling;
+        }
+        return null;
+    };
+
+    function next(n){
+        while((n = n.nextSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function prev(n){
+        while((n = n.previousSibling) && n.nodeType != 1);
+        return n;
+    };
+
+    function children(d){
+        var n = d.firstChild, ni = -1,
+        	nx;
+ 	    while(n){
+ 	        nx = n.nextSibling;
+ 	        if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
+ 	            d.removeChild(n);
+ 	        }else{
+ 	            n.nodeIndex = ++ni;
+ 	        }
+ 	        n = nx;
+ 	    }
+ 	    return this;
+ 	};
+
+    function byClassName(c, a, v){
+        if(!v){
+            return c;
+        }
+        var r = [], ri = -1, cn;
+        for(var i = 0, ci; ci = c[i]; i++){
+            if((' '+ci.className+' ').indexOf(v) != -1){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function attrValue(n, attr){
+        if(!n.tagName && typeof n.length != "undefined"){
+            n = n[0];
+        }
+        if(!n){
+            return null;
+        }
+        if(attr == "for"){
+            return n.htmlFor;
+        }
+        if(attr == "class" || attr == "className"){
+            return n.className;
+        }
+        return n.getAttribute(attr) || n[attr];
+
+    };
+
+    function getNodes(ns, mode, tagName){
+        var result = [], ri = -1, cs;
+        if(!ns){
+            return result;
+        }
+        tagName = tagName || "*";
+        if(typeof ns.getElementsByTagName != "undefined"){
+            ns = [ns];
+        }
+        if(!mode){
+            for(var i = 0, ni; ni = ns[i]; i++){
+                cs = ni.getElementsByTagName(tagName);
+                for(var j = 0, ci; ci = cs[j]; j++){
+                    result[++ri] = ci;
+                }
+            }
+        }else if(mode == "/" || mode == ">"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, ni, cn; ni = ns[i]; i++){
+                cn = isOpera ? ni.childNodes : (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 == "~"){
+            var utag = tagName.toUpperCase();
+            for(var i = 0, n; n = ns[i]; i++){
+                while((n = n.nextSibling)){
+                    if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){
+                        result[++ri] = n;
+                    }
+                }
+            }
+        }
+        return result;
+    };
+
+    function concat(a, b){
+        if(b.slice){
+            return a.concat(b);
+        }
+        for(var i = 0, l = b.length; i < l; i++){
+            a[a.length] = b[i];
+        }
+        return a;
+    }
+
+    function byTag(cs, tagName){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!tagName){
+            return cs;
+        }
+        var r = [], ri = -1;
+        tagName = tagName.toLowerCase();
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byId(cs, attr, id){
+        if(cs.tagName || cs == document){
+            cs = [cs];
+        }
+        if(!id){
+            return cs;
+        }
+        var r = [], ri = -1;
+        for(var i = 0,ci; ci = cs[i]; i++){
+            if(ci && ci.id == id){
+                r[++ri] = ci;
+                return r;
+            }
+        }
+        return r;
+    };
+
+    function byAttribute(cs, attr, value, op, custom){
+        var r = [], 
+        	ri = -1, 
+        	st = custom=="{",
+        	f = Ext.DomQuery.operators[op];
+        for(var i = 0, ci; ci = cs[i]; i++){
+            if(ci.nodeType != 1){
+                continue;
+            }
+            var a;
+            if(st){
+                a = Ext.DomQuery.getStyle(ci, attr);
+            }
+            else if(attr == "class" || attr == "className"){
+                a = ci.className;
+            }else if(attr == "for"){
+                a = ci.htmlFor;
+            }else if(attr == "href"){
+                a = ci.getAttribute("href", 2);
+            }else{
+                a = ci.getAttribute(attr);
+            }
+            if((f && f(a, value)) || (!f && a)){
+                r[++ri] = ci;
+            }
+        }
+        return r;
+    };
+
+    function byPseudo(cs, name, value){
+        return Ext.DomQuery.pseudos[name](cs, value);
+    };
+
+    function nodupIEXml(cs){
+        var d = ++key, 
+        	r;
+        cs[0].setAttribute("_nodup", d);
+        r = [cs[0]];
+        for(var i = 1, len = cs.length; i < len; i++){
+            var c = cs[i];
+            if(!c.getAttribute("_nodup") != d){
+                c.setAttribute("_nodup", d);
+                r[r.length] = c;
+            }
+        }
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].removeAttribute("_nodup");
+        }
+        return r;
+    }
+
+    function nodup(cs){
+        if(!cs){
+            return [];
+        }
+        var len = cs.length, c, i, r = cs, cj, ri = -1;
+        if(!len || typeof cs.nodeType != "undefined" || len == 1){
+            return cs;
+        }
+        if(isIE && typeof cs[0].selectSingleNode != "undefined"){
+            return nodupIEXml(cs);
+        }
+        var d = ++key;
+        cs[0]._nodup = d;
+        for(i = 1; c = cs[i]; i++){
+            if(c._nodup != d){
+                c._nodup = d;
+            }else{
+                r = [];
+                for(var j = 0; j < i; j++){
+                    r[++ri] = cs[j];
+                }
+                for(j = i+1; cj = cs[j]; j++){
+                    if(cj._nodup != d){
+                        cj._nodup = d;
+                        r[++ri] = cj;
+                    }
+                }
+                return r;
+            }
+        }
+        return r;
+    }
+
+    function quickDiffIEXml(c1, c2){
+        var d = ++key,
+        	r = [];
+        for(var i = 0, len = c1.length; i < len; i++){
+            c1[i].setAttribute("_qdiff", d);
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i].getAttribute("_qdiff") != d){
+                r[r.length] = c2[i];
+            }
+        }
+        for(var i = 0, len = c1.length; i < len; i++){
+           c1[i].removeAttribute("_qdiff");
+        }
+        return r;
+    }
+
+    function quickDiff(c1, c2){
+        var len1 = c1.length,
+        	d = ++key,
+        	r = [];
+        if(!len1){
+            return c2;
+        }
+        if(isIE && c1[0].selectSingleNode){
+            return quickDiffIEXml(c1, c2);
+        }        
+        for(var i = 0; i < len1; i++){
+            c1[i]._qdiff = d;
+        }        
+        for(var i = 0, len = c2.length; i < len; i++){
+            if(c2[i]._qdiff != d){
+                r[r.length] = c2[i];
+            }
+        }
+        return r;
+    }
+
+    function quickId(ns, mode, root, id){
+        if(ns == root){
+           var d = root.ownerDocument || root;
+           return d.getElementById(id);
+        }
+        ns = getNodes(ns, mode, "*");
+        return byId(ns, null, id);
+    }
+
+    return {
+        getStyle : function(el, name){
+            return Ext.fly(el).getStyle(name);
+        },
+        /**
+         * Compiles a selector/xpath query into a reusable function. The returned function
+         * takes one parameter "root" (optional), which is the context node from where the query should start.
+         * @param {String} selector The selector/xpath query
+         * @param {String} type (optional) Either "select" (the default) or "simple" for a simple selector match
+         * @return {Function}
+         */
+        compile : function(path, type){
+            type = type || "select";
+
+            var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],
+            	q = path, mode, lq,
+            	tk = Ext.DomQuery.matchers,
+            	tklen = tk.length,
+            	mm,
+            	// accept leading mode switch
+            	lmode = q.match(modeRe);
+            
+            if(lmode && lmode[1]){
+                fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
+                q = q.replace(lmode[1], "");
+            }
+            // strip leading slashes
+            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;
+                        }
+                    }
+                    // prevent infinite loop on bad selector
+                    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;
+        },
+
+        /**
+         * Selects a group of elements.
+         * @param {String} selector The selector/xpath query (can be a comma separated list of selectors)
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        select : function(path, root, type){
+            if(!root || root == document){
+                root = document;
+            }
+            if(typeof root == "string"){
+                root = document.getElementById(root);
+            }
+            var paths = path.split(","),
+            	results = [];
+            for(var i = 0, len = paths.length; i < len; i++){
+                var p = paths[i].replace(trimRe, "");
+                if(!cache[p]){
+                    cache[p] = Ext.DomQuery.compile(p);
+                    if(!cache[p]){
+                        throw p + " is not a valid selector";
+                    }
+                }
+                var result = cache[p](root);
+                if(result && result != document){
+                    results = results.concat(result);
+                }
+            }
+            if(paths.length > 1){
+                return nodup(results);
+            }
+            return results;
+        },
+
+        /**
+         * Selects a single element.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @return {Element} The DOM element which matched the selector.
+         */
+        selectNode : function(path, root){
+            return Ext.DomQuery.select(path, root)[0];
+        },
+
+        /**
+         * Selects the value of a node, optionally replacing null with the defaultValue.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {String} defaultValue
+         * @return {String}
+         */
+        selectValue : function(path, root, defaultValue){
+            path = path.replace(trimRe, "");
+            if(!valueCache[path]){
+                valueCache[path] = Ext.DomQuery.compile(path, "select");
+            }
+            var n = valueCache[path](root),
+            	v;
+            n = n[0] ? n[0] : n;
+            v = (n && n.firstChild ? n.firstChild.nodeValue : null);
+            return ((v === null||v === undefined||v==='') ? defaultValue : v);
+        },
+
+        /**
+         * Selects the value of a node, parsing integers and floats. Returns the defaultValue, or 0 if none is specified.
+         * @param {String} selector The selector/xpath query
+         * @param {Node} root (optional) The start of the query (defaults to document).
+         * @param {Number} defaultValue
+         * @return {Number}
+         */
+        selectNumber : function(path, root, defaultValue){
+            var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0);
+            return parseFloat(v);
+        },
+
+        /**
+         * Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child)
+         * @param {String/HTMLElement/Array} el An element id, element or array of elements
+         * @param {String} selector The simple selector to test
+         * @return {Boolean}
+         */
+        is : function(el, ss){
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            var isArray = Ext.isArray(el),
+            	result = Ext.DomQuery.filter(isArray ? el : [el], ss);
+            return isArray ? (result.length == el.length) : (result.length > 0);
+        },
+
+        /**
+         * Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child)
+         * @param {Array} el An array of elements to filter
+         * @param {String} selector The simple selector to test
+         * @param {Boolean} nonMatches If true, it returns the elements that DON'T match
+         * the selector instead of the ones that match
+         * @return {Array} An Array of DOM elements which match the selector. If there are
+         * no matches, and empty Array is returned.
+         */
+        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;
+        },
+
+        /**
+         * Collection of matching regular expressions and code snippets.
+         */
+        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}")}};'
+            }
+        ],
+
+        /**
+         * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=.
+         * New operators can be added as long as the match the format <i>c</i>= where <i>c</i> is any character other than space, &gt; &lt;.
+         */
+        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;
+            }
+        },
+
+        /**
+         * Collection of "pseudo class" processors. Each processor is passed the current nodeset (array)
+         * and the argument (if any) supplied in the selector.
+         */
+        pseudos : {
+            "first-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.previousSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "last-child" : function(c){
+                var r = [], ri = -1, n;
+                for(var i = 0, ci; ci = n = c[i]; i++){
+                    while((n = n.nextSibling) && n.nodeType != 1);
+                    if(!n){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nth-child" : function(c, a) {
+                var r = [], ri = -1,
+                	m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a),
+                	f = (m[1] || 1) - 0, l = m[2] - 0;
+                for(var i = 0, n; n = c[i]; i++){
+                    var pn = n.parentNode;
+                    if (batch != pn._batch) {
+                        var j = 0;
+                        for(var cn = pn.firstChild; cn; cn = cn.nextSibling){
+                            if(cn.nodeType == 1){
+                               cn.nodeIndex = ++j;
+                            }
+                        }
+                        pn._batch = batch;
+                    }
+                    if (f == 1) {
+                        if (l == 0 || n.nodeIndex == l){
+                            r[++ri] = n;
+                        }
+                    } else if ((n.nodeIndex + l) % f == 0){
+                        r[++ri] = n;
+                    }
+                }
+
+                return r;
+            },
+
+            "only-child" : function(c){
+                var r = [], ri = -1;;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(!prev(ci) && !next(ci)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "empty" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var cns = ci.childNodes, j = 0, cn, empty = true;
+                    while(cn = cns[j]){
+                        ++j;
+                        if(cn.nodeType == 1 || cn.nodeType == 3){
+                            empty = false;
+                            break;
+                        }
+                    }
+                    if(empty){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "contains" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if((ci.textContent||ci.innerText||'').indexOf(v) != -1){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "nodeValue" : function(c, v){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.firstChild && ci.firstChild.nodeValue == v){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "checked" : function(c){
+                var r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(ci.checked == true){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "not" : function(c, ss){
+                return Ext.DomQuery.filter(c, ss, true);
+            },
+
+            "any" : function(c, selectors){
+                var ss = selectors.split('|'),
+                	r = [], ri = -1, s;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    for(var j = 0; s = ss[j]; j++){
+                        if(Ext.DomQuery.is(ci, s)){
+                            r[++ri] = ci;
+                            break;
+                        }
+                    }
+                }
+                return r;
+            },
+
+            "odd" : function(c){
+                return this["nth-child"](c, "odd");
+            },
+
+            "even" : function(c){
+                return this["nth-child"](c, "even");
+            },
+
+            "nth" : function(c, a){
+                return c[a-1] || [];
+            },
+
+            "first" : function(c){
+                return c[0] || [];
+            },
+
+            "last" : function(c){
+                return c[c.length-1] || [];
+            },
+
+            "has" : function(c, ss){
+                var s = Ext.DomQuery.select,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    if(s(ss, ci).length > 0){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "next" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = next(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            },
+
+            "prev" : function(c, ss){
+                var is = Ext.DomQuery.is,
+                	r = [], ri = -1;
+                for(var i = 0, ci; ci = c[i]; i++){
+                    var n = prev(ci);
+                    if(n && is(n, ss)){
+                        r[++ri] = ci;
+                    }
+                }
+                return r;
+            }
+        }
+    };
+}();
+
+/**
+ * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select}
+ * @param {String} path The selector/xpath query
+ * @param {Node} root (optional) The start of the query (defaults to document).
+ * @return {Array}
+ * @member Ext
+ * @method query
+ */
+Ext.query = Ext.DomQuery.select;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.fx.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.fx.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.fx.js	(revision 625)
@@ -0,0 +1,324 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use visibility to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.VISIBILITY = 1;
+/**
+ * Visibility mode constant for use with {@link #setVisibilityMode}. Use display to hide element
+ * @static
+ * @type Number
+ */
+Ext.Element.DISPLAY = 2;
+
+Ext.Element.addMethods(function(){
+    var VISIBILITY = "visibility",
+        DISPLAY = "display",
+        HIDDEN = "hidden",
+        NONE = "none",      
+        ORIGINALDISPLAY = 'originalDisplay',
+        VISMODE = 'visibilityMode',
+        ELDISPLAY = Ext.Element.DISPLAY,
+        data = Ext.Element.data,
+        getDisplay = function(dom){
+            var d = data(dom, ORIGINALDISPLAY);
+            if(d === undefined){
+                data(dom, ORIGINALDISPLAY, d = '');
+            }
+            return d;
+        },
+        getVisMode = function(dom){
+            var m = data(dom, VISMODE);
+            if(m === undefined){
+                data(dom, VISMODE, m = 1)
+            }
+            return m;
+        };
+    
+    return {
+        /**
+         * The element's default display mode  (defaults to "")
+         * @type String
+         */
+        originalDisplay : "",
+        visibilityMode : 1,
+        
+        /**
+         * Sets the element's visibility mode. When setVisible() is called it
+         * will use this to determine whether to set the visibility or the display property.
+         * @param visMode Ext.Element.VISIBILITY or Ext.Element.DISPLAY
+         * @return {Ext.Element} this
+         */
+        setVisibilityMode : function(visMode){  
+            data(this.dom, VISMODE, visMode);
+            return this;
+        },
+        
+        /**
+         * Perform custom animation on this element.
+         * <div><ul class="mdetail-params">
+         * <li><u>Animation Properties</u></li>
+         * 
+         * <p>The Animation Control Object enables gradual transitions for any member of an
+         * element's style object that takes a numeric value including but not limited to
+         * these properties:</p><div><ul class="mdetail-params">
+         * <li><tt>bottom, top, left, right</tt></li>
+         * <li><tt>height, width</tt></li>
+         * <li><tt>margin, padding</tt></li>
+         * <li><tt>borderWidth</tt></li>
+         * <li><tt>opacity</tt></li>
+         * <li><tt>fontSize</tt></li>
+         * <li><tt>lineHeight</tt></li>
+         * </ul></div>
+         * 
+         * 
+         * <li><u>Animation Property Attributes</u></li>
+         * 
+         * <p>Each Animation Property is a config object with optional properties:</p>
+         * <div><ul class="mdetail-params">
+         * <li><tt>by</tt>*  : relative change - start at current value, change by this value</li>
+         * <li><tt>from</tt> : ignore current value, start from this value</li>
+         * <li><tt>to</tt>*  : start at current value, go to this value</li>
+         * <li><tt>unit</tt> : any allowable unit specification</li>
+         * <p>* do not specify both <tt>to</tt> and <tt>by</tt> for an animation property</p>
+         * </ul></div>
+         * 
+         * <li><u>Animation Types</u></li>
+         * 
+         * <p>The supported animation types:</p><div><ul class="mdetail-params">
+         * <li><tt>'run'</tt> : Default
+         * <pre><code>
+var el = Ext.get('complexEl');
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'run'      // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre>
+         * </li>
+         * <li><tt>'color'</tt>
+         * <p>Animates transition of background, text, or border colors.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        color: { to: '#06e' },
+        backgroundColor: { to: '#e06' }
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'color'    // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * 
+         * <li><tt>'motion'</tt>
+         * <p>Animates the motion of an element to/from specific points using optional bezier
+         * way points during transit.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        borderWidth: {to: 3, from: 0},
+        opacity: {to: .3, from: 1},
+        height: {to: 50, from: el.getHeight()},
+        width: {to: 300, from: el.getWidth()},
+        top  : {by: - 100, unit: 'px'},
+        points: {
+            to: [50, 100],  // go to this point
+            control: [      // optional bezier way points
+                [ 600, 800],
+                [-100, 200]
+            ]
+        }
+    },
+    3000,      // animation duration (milliseconds!)
+    null,      // callback
+    'easeOut', // easing method
+    'motion'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * <li><tt>'scroll'</tt>
+         * <p>Animate horizontal or vertical scrolling of an overflowing page element.</p>
+         * <pre><code>
+el.animate(
+    // animation control object
+    {
+        scroll: {to: [400, 300]}
+    },
+    0.35,      // animation duration
+    null,      // callback
+    'easeOut', // easing method
+    'scroll'   // animation type ('run','color','motion','scroll')    
+);
+         * </code></pre> 
+         * </li>
+         * </ul></div>
+         * 
+         * </ul></div>
+         * 
+         * @param {Object} args The animation control args
+         * @param {Float} duration (optional) How long the animation lasts in seconds (defaults to <tt>.35</tt>)
+         * @param {Function} onComplete (optional) Function to call when animation completes
+         * @param {String} easing (optional) {@link Ext.Fx#easing} method to use (defaults to <tt>'easeOut'</tt>)
+         * @param {String} animType (optional) <tt>'run'</tt> is the default. Can also be <tt>'color'</tt>,
+         * <tt>'motion'</tt>, or <tt>'scroll'</tt>
+         * @return {Ext.Element} this
+         */
+        animate : function(args, duration, onComplete, easing, animType){       
+            this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType);
+            return this;
+        },
+    
+        /*
+         * @private Internal animation call
+         */
+        anim : function(args, opt, animType, defaultDur, defaultEase, cb){
+            animType = animType || 'run';
+            opt = opt || {};
+            var me = this,              
+                anim = Ext.lib.Anim[animType](
+                    me.dom, 
+                    args,
+                    (opt.duration || defaultDur) || .35,
+                    (opt.easing || defaultEase) || 'easeOut',
+                    function(){
+                        if(cb) cb.call(me);
+                        if(opt.callback) opt.callback.call(opt.scope || me, me, opt);
+                    },
+                    me
+                );
+            opt.anim = anim;
+            return anim;
+        },
+    
+        // private legacy anim prep
+        preanim : function(a, i){
+            return !a[i] ? false : (Ext.isObject(a[i]) ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]});
+        },
+        
+        /**
+         * Checks whether the element is currently visible using both visibility and display properties.         
+         * @return {Boolean} True if the element is currently visible, else false
+         */
+        isVisible : function() {
+            return !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE);
+        },
+        
+        /**
+         * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
+         * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
+         * @param {Boolean} visible Whether the element is visible
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setVisible : function(visible, animate){
+            var me = this,
+                dom = me.dom,
+                isDisplay = getVisMode(this.dom) == ELDISPLAY;
+                
+            if (!animate || !me.anim) {
+                if(isDisplay){
+                    me.setDisplayed(visible);
+                }else{
+                    me.fixDisplay();
+                    dom.style.visibility = visible ? "visible" : HIDDEN;
+                }
+            }else{
+                // closure for composites            
+                if(visible){
+                    me.setOpacity(.01);
+                    me.setVisible(true);
+                }
+                me.anim({opacity: { to: (visible?1:0) }},
+                        me.preanim(arguments, 1),
+                        null,
+                        .35,
+                        'easeIn',
+                        function(){
+                             if(!visible){
+                                 dom.style[isDisplay ? DISPLAY : VISIBILITY] = (isDisplay) ? NONE : HIDDEN;                     
+                                 Ext.fly(dom).setOpacity(1);
+                             }
+                        });
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the element's visibility or display, depending on visibility mode.
+         * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        toggle : function(animate){
+            var me = this;
+            me.setVisible(!me.isVisible(), me.preanim(arguments, 0));
+            return me;
+        },
+    
+        /**
+         * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
+         * @param {Mixed} value Boolean value to display the element using its default display, or a string to set the display directly.
+         * @return {Ext.Element} this
+         */
+        setDisplayed : function(value) {            
+            if(typeof value == "boolean"){
+               value = value ? getDisplay(this.dom) : NONE;
+            }
+            this.setStyle(DISPLAY, value);
+            return this;
+        },
+        
+        // private
+        fixDisplay : function(){
+            var me = this;
+            if(me.isStyle(DISPLAY, NONE)){
+                me.setStyle(VISIBILITY, HIDDEN);
+                me.setStyle(DISPLAY, getDisplay(this.dom)); // first try reverting to default
+                if(me.isStyle(DISPLAY, NONE)){ // if that fails, default to block
+                    me.setStyle(DISPLAY, "block");
+                }
+            }
+        },
+    
+        /**
+         * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        hide : function(animate){
+            this.setVisible(false, this.preanim(arguments, 0));
+            return this;
+        },
+    
+        /**
+        * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
+        * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        show : function(animate){
+            this.setVisible(true, this.preanim(arguments, 0));
+            return this;
+        }
+    }
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.insertion.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.insertion.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.insertion.js	(revision 625)
@@ -0,0 +1,147 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(
+function() {
+	var GETDOM = Ext.getDom,
+		GET = Ext.get,
+		DH = Ext.DomHelper,
+        isEl = function(el){
+            return  (el.nodeType || el.dom || typeof el == 'string');  
+        };
+	
+	return {
+	    /**
+	     * Appends the passed element(s) to this element
+	     * @param {String/HTMLElement/Array/Element/CompositeElement} el
+	     * @return {Ext.Element} this
+	     */
+	    appendChild: function(el){        
+	        return GET(el).appendTo(this);        
+	    },
+	
+	    /**
+	     * Appends this element to the passed element
+	     * @param {Mixed} el The new parent element
+	     * @return {Ext.Element} this
+	     */
+	    appendTo: function(el){        
+	        GETDOM(el).appendChild(this.dom);        
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element before the passed element in the DOM
+	     * @param {Mixed} el The element before which this element will be inserted
+	     * @return {Ext.Element} this
+	     */
+	    insertBefore: function(el){  	          
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts this element after the passed element in the DOM
+	     * @param {Mixed} el The element to insert after
+	     * @return {Ext.Element} this
+	     */
+	    insertAfter: function(el){
+	        (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling);
+	        return this;
+	    },
+	
+	    /**
+	     * Inserts (or creates) an element (or DomHelper config) as the first child of this element
+	     * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert
+	     * @return {Ext.Element} The new child
+	     */
+	    insertFirst: function(el, returnDom){
+            el = el || {};
+            if(isEl(el)){ // element
+                el = GETDOM(el);
+                this.dom.insertBefore(el, this.dom.firstChild);
+                return !returnDom ? GET(el) : el;
+            }else{ // dh config
+                return this.createChild(el, this.dom.firstChild, returnDom);
+            }
+    },
+	
+	    /**
+	     * Replaces the passed element with this element
+	     * @param {Mixed} el The element to replace
+	     * @return {Ext.Element} this
+	     */
+	    replace: function(el){
+	        el = GET(el);
+	        this.insertBefore(el);
+	        el.remove();
+	        return this;
+	    },
+	
+	    /**
+	     * Replaces this element with the passed element
+	     * @param {Mixed/Object} el The new element or a DomHelper config of an element to create
+	     * @return {Ext.Element} this
+	     */
+	    replaceWith: function(el){
+		    var me = this,
+		    	Element = Ext.Element;
+            if(isEl(el)){
+                el = GETDOM(el);
+                me.dom.parentNode.insertBefore(el, me.dom);
+            }else{
+                el = DH.insertBefore(me.dom, el);
+            }
+	        
+	        delete Element.cache[me.id];
+	        Ext.removeNode(me.dom);      
+	        me.id = Ext.id(me.dom = el);
+	        return Element.cache[me.id] = me;        
+	    },
+	    
+		/**
+		 * Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.
+		 * @param {Object} config DomHelper element config object.  If no tag is specified (e.g., {tag:'input'}) then a div will be
+		 * automatically generated with the specified attributes.
+		 * @param {HTMLElement} insertBefore (optional) a child element of this element
+		 * @param {Boolean} returnDom (optional) true to return the dom node instead of creating an Element
+		 * @return {Ext.Element} The new child element
+		 */
+		createChild: function(config, insertBefore, returnDom){
+		    config = config || {tag:'div'};
+		    return insertBefore ? 
+		    	   DH.insertBefore(insertBefore, config, returnDom !== true) :	
+		    	   DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config,  returnDom !== true);
+		},
+		
+		/**
+		 * Creates and wraps this element with another element
+		 * @param {Object} config (optional) DomHelper element config object for the wrapper element or null for an empty div
+		 * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element
+		 * @return {HTMLElement/Element} The newly created wrapper element
+		 */
+		wrap: function(config, returnDom){        
+		    var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom);
+		    newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom);
+		    return newEl;
+		},
+		
+		/**
+		 * Inserts an html fragment into this element
+		 * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd.
+		 * @param {String} html The HTML fragment
+		 * @param {Boolean} returnEl (optional) True to return an Ext.Element (defaults to false)
+		 * @return {HTMLElement/Ext.Element} The inserted node (or nearest related if more than 1 inserted)
+		 */
+		insertHtml : function(where, html, returnEl){
+		    var el = DH.insertHtml(where, this.dom, html);
+		    return returnEl ? Ext.get(el) : el;
+		}
+	}
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.js	(revision 625)
@@ -0,0 +1,945 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ * <p>Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.</p>
+ * <p>All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.</p>
+ * <p>Note that the events documented in this class are not Ext events, they encapsulate browser events. To
+ * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older
+ * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.</p>
+ * Usage:<br>
+<pre><code>
+// by id
+var el = Ext.get("my-div");
+
+// by DOM element reference
+var el = Ext.get(myDivElement);
+</code></pre>
+ * <b>Animations</b><br />
+ * <p>When an element is manipulated, by default there is no animation.</p>
+ * <pre><code>
+var el = Ext.get("my-div");
+
+// no animation
+el.setWidth(100);
+ * </code></pre>
+ * <p>Many of the functions for manipulating an element have an optional "animate" parameter.  This
+ * parameter can be specified as boolean (<tt>true</tt>) for default animation effects.</p>
+ * <pre><code>
+// default animation
+el.setWidth(100, true);
+ * </code></pre>
+ * 
+ * <p>To configure the effects, an object literal with animation options to use as the Element animation
+ * configuration object can also be specified. Note that the supported Element animation configuration
+ * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects.  The supported
+ * Element animation configuration options are:</p>
+<pre>
+Option    Default   Description
+--------- --------  ---------------------------------------------
+{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
+{@link Ext.Fx#easing easing}    easeOut   The easing method
+{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
+{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
+</pre>
+ * 
+ * <pre><code>
+// Element animation options object
+var opt = {
+    {@link Ext.Fx#duration duration}: 1,
+    {@link Ext.Fx#easing easing}: 'elasticIn',
+    {@link Ext.Fx#callback callback}: this.foo,
+    {@link Ext.Fx#scope scope}: this
+};
+// animation with some options set
+el.setWidth(100, opt);
+ * </code></pre>
+ * <p>The Element animation object being used for the animation will be set on the options
+ * object as "anim", which allows you to stop or manipulate the animation. Here is an example:</p>
+ * <pre><code>
+// using the "anim" property to get the Anim object
+if(opt.anim.isAnimated()){
+    opt.anim.stop();
+}
+ * </code></pre>
+ * <p>Also see the <tt>{@link #animate}</tt> method for another animation technique.</p>
+ * <p><b> Composite (Collections of) Elements</b></p>
+ * <p>For working with collections of Elements, see {@link Ext.CompositeElement}</p>
+ * @constructor Create a new Element directly.
+ * @param {String/HTMLElement} element
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).
+ */
+(function(){
+var DOC = document;
+
+Ext.Element = function(element, forceNew){
+    var dom = typeof element == "string" ?
+              DOC.getElementById(element) : element,
+        id;
+
+    if(!dom) return null;
+
+    id = dom.id;
+
+    if(!forceNew && id && Ext.Element.cache[id]){ // element object already exists
+        return Ext.Element.cache[id];
+    }
+
+    /**
+     * The DOM element
+     * @type HTMLElement
+     */
+    this.dom = dom;
+
+    /**
+     * The DOM element ID
+     * @type String
+     */
+    this.id = id || Ext.id(dom);
+};
+
+var D = Ext.lib.Dom,
+    DH = Ext.DomHelper,
+    E = Ext.lib.Event,
+    A = Ext.lib.Anim,
+    El = Ext.Element;
+
+El.prototype = {
+    /**
+     * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
+     * @param {Object} o The object with the attributes
+     * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos.
+     * @return {Ext.Element} this
+     */
+    set : function(o, useSet){
+        var el = this.dom,
+            attr,
+            val;        
+       
+        for(attr in o){
+            val = o[attr];
+            if (attr != "style" && !Ext.isFunction(val)) {
+                if (attr == "cls" ) {
+                    el.className = val;
+                } else if (o.hasOwnProperty(attr)) {
+                    if (useSet || !!el.setAttribute) el.setAttribute(attr, val);
+                    else el[attr] = val;
+                }
+            }
+        }
+        if(o.style){
+            Ext.DomHelper.applyStyles(el, o.style);
+        }
+        return this;
+    },
+    
+//  Mouse events
+    /**
+     * @event click
+     * Fires when a mouse click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event dblclick
+     * Fires when a mouse double click is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousedown
+     * Fires when a mousedown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseup
+     * Fires when a mouseup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseover
+     * Fires when a mouseover is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mousemove
+     * Fires when a mousemove is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseout
+     * Fires when a mouseout is detected with the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseenter
+     * Fires when the mouse enters the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event mouseleave
+     * Fires when the mouse leaves the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    
+//  Keyboard events
+    /**
+     * @event keypress
+     * Fires when a keypress is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keydown
+     * Fires when a keydown is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event keyup
+     * Fires when a keyup is detected within the element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+
+//  HTML frame/object events
+    /**
+     * @event load
+     * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event unload
+     * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event abort
+     * Fires when an object/image is stopped from loading before completely loaded.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event error
+     * Fires when an object/image/frame cannot be loaded properly.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event resize
+     * Fires when a document view is resized.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event scroll
+     * Fires when a document view is scrolled.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  Form events
+    /**
+     * @event select
+     * Fires when a user selects some text in a text field, including input and textarea.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event change
+     * Fires when a control loses the input focus and its value has been modified since gaining focus.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event submit
+     * Fires when a form is submitted.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event reset
+     * Fires when a form is reset.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event focus
+     * Fires when an element receives focus either via the pointing device or by tab navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event blur
+     * Fires when an element loses focus either via the pointing device or by tabbing navigation.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  User Interface events
+    /**
+     * @event DOMFocusIn
+     * Where supported. Similar to HTML focus event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMFocusOut
+     * Where supported. Similar to HTML blur event, but can be applied to any focusable element.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMActivate
+     * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  DOM Mutation events
+    /**
+     * @event DOMSubtreeModified
+     * Where supported. Fires when the subtree is modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInserted
+     * Where supported. Fires when a node has been added as a child of another node.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemoved
+     * Where supported. Fires when a descendant node of the element is removed.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeRemovedFromDocument
+     * Where supported. Fires when a node is being removed from a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMNodeInsertedIntoDocument
+     * Where supported. Fires when a node is being inserted into a document.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMAttrModified
+     * Where supported. Fires when an attribute has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+    /**
+     * @event DOMCharacterDataModified
+     * Where supported. Fires when the character data has been modified.
+     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+    /**
+     * The default unit to append to CSS values where a unit isn't provided (defaults to px).
+     * @type String
+     */
+    defaultUnit : "px",
+
+    /**
+     * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
+     * @param {String} selector The simple selector to test
+     * @return {Boolean} True if this element matches the selector, else false
+     */
+    is : function(simpleSelector){
+        return Ext.DomQuery.is(this.dom, simpleSelector);
+    },
+
+    /**
+     * Tries to focus the element. Any exceptions are caught and ignored.
+     * @param {Number} defer (optional) Milliseconds to defer the focus
+     * @return {Ext.Element} this
+     */
+    focus : function(defer, /* private */ dom) {
+        var me = this,
+            dom = dom || me.dom;
+        try{
+            if(Number(defer)){
+                me.focus.defer(defer, null, [null, dom]);
+            }else{
+                dom.focus();
+            }
+        }catch(e){}
+        return me;
+    },
+
+    /**
+     * Tries to blur the element. Any exceptions are caught and ignored.
+     * @return {Ext.Element} this
+     */
+    blur : function() {
+        try{
+            this.dom.blur();
+        }catch(e){}
+        return this;
+    },
+
+    /**
+     * Returns the value of the "value" attribute
+     * @param {Boolean} asNumber true to parse the value as a number
+     * @return {String/Number}
+     */
+    getValue : function(asNumber){
+        var val = this.dom.value;
+        return asNumber ? parseInt(val, 10) : val;
+    },
+
+    /**
+     * Appends an event handler to this element.  The shorthand version {@link #on} is equivalent.
+     * @param {String} eventName The type of event to handle
+     * @param {Function} fn The handler function the event invokes. This function is passed
+     * the following parameters:<ul>
+     * <li><b>evt</b> : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+     * <li><b>el</b> : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+     * <li><b>o</b> : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b>.
+     * @param {Object} options (optional) An object containing handler configuration properties.
+     * This may contain any of the following properties:<ul>
+     * <li><b>scope</b> Object : <div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b></div></li>
+     * <li><b>delegate</b> String: <div class="sub-desc">A simple selector to filter the target or look for a descendant of the target. See below for additional details.</div></li>
+     * <li><b>stopEvent</b> Boolean: <div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+     * <li><b>preventDefault</b> Boolean: <div class="sub-desc">True to prevent the default action</div></li>
+     * <li><b>stopPropagation</b> Boolean: <div class="sub-desc">True to prevent event propagation</div></li>
+     * <li><b>normalized</b> Boolean: <div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+     * <li><b>target</b> Ext.Element: <div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+     * <li><b>delay</b> Number: <div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+     * <li><b>single</b> Boolean: <div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+     * <li><b>buffer</b> Number: <div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+     * by the specified number of milliseconds. If the event fires again within that time, the original
+     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+     * </ul><br>
+     * <p>
+     * <b>Combining Options</b><br>
+     * In the following examples, the shorthand form {@link #on} is used rather than the more verbose
+     * addListener.  The two are equivalent.  Using the options argument, it is possible to combine different
+     * types of listeners:<br>
+     * <br>
+     * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the
+     * options object. The options object is available as the third parameter in the handler function.<div style="margin: 5px 20px 20px;">
+     * Code:<pre><code>
+el.on('click', this.onClick, this, {
+    single: true,
+    delay: 100,
+    stopEvent : true,
+    forumId: 4
+});</code></pre></p>
+     * <p>
+     * <b>Attaching multiple handlers in 1 call</b><br>
+     * The method also allows for a single argument to be passed which is a config object containing properties
+     * which specify multiple handlers.</p>
+     * <p>
+     * Code:<pre><code>
+el.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * Code:<pre><code></p>
+el.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+    scope: this
+});
+     * </code></pre></p>
+     * <p><b>delegate</b></p>
+     * <p>This is a configuration option that you can pass along when registering a handler for
+     * an event to assist with event delegation. Event delegation is a technique that is used to
+     * reduce memory consumption and prevent exposure to memory-leaks. By registering an event
+     * for a container element as opposed to each element within a container. By setting this
+     * configuration option to a simple selector, the target element will be filtered to look for
+     * a descendant of the target.
+     * For example:<pre><code>
+// using this markup:
+&lt;div id='elId'>
+    &lt;p id='p1'>paragraph one&lt;/p>
+    &lt;p id='p2' class='clickable'>paragraph two&lt;/p>
+    &lt;p id='p3'>paragraph three&lt;/p>
+&lt;/div>
+// utilize event delegation to registering just one handler on the container element: 
+el = Ext.get('elId');
+el.on(
+    'click',
+    function(e,t) {
+        // handle click
+        console.info(t.id); // 'p2'
+    },
+    this,
+    {
+        // filter the target element to be a descendant with the class 'clickable'
+        delegate: '.clickable' 
+    }
+);
+     * </code></pre></p>
+     * @return {Ext.Element} this
+     */
+    addListener : function(eventName, fn, scope, options){
+        Ext.EventManager.on(this.dom,  eventName, fn, scope || this, options);
+        return this;
+    },
+
+    /**
+     * Removes an event handler from this element.  The shorthand version {@link #un} is equivalent.
+     * <b>Note</b>: if a <i>scope</i> was explicitly specified when {@link #addListener adding} the
+     * listener, the same scope must be specified here.
+     * Example:
+     * <pre><code>
+el.removeListener('click', this.handlerFn);
+// or
+el.un('click', this.handlerFn);
+</code></pre>
+     * @param {String} eventName the type of event to remove
+     * @param {Function} fn the method the event invokes
+     * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+     * to this Element.
+     * @return {Ext.Element} this
+     */
+    removeListener : function(eventName, fn, scope){
+        Ext.EventManager.removeListener(this.dom,  eventName, fn, scope || this);
+        return this;
+    },
+
+    /**
+     * Removes all previous added listeners from this element
+     * @return {Ext.Element} this
+     */
+    removeAllListeners : function(){
+        Ext.EventManager.removeAll(this.dom);
+        return this;
+    },
+
+    /**
+     * @private Test if size has a unit, otherwise appends the default
+     */
+    addUnits : function(size){
+        if(size === "" || size == "auto" || size === undefined){
+            size = size || '';
+        } else if(!isNaN(size) || !unitPattern.test(size)){
+            size = size + (this.defaultUnit || 'px');
+        }
+        return size;
+    },
+
+    /**
+     * <p>Updates the <a href="http://developer.mozilla.org/en/DOM/element.innerHTML">innerHTML</a> of this Element
+     * from a specified URL. Note that this is subject to the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">Same Origin Policy</a></p>
+     * <p>Updating innerHTML of an element will <b>not</b> execute embedded <tt>&lt;script></tt> elements. This is a browser restriction.</p>
+     * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying
+     * exactly how to request the HTML.
+     * @return {Ext.Element} this
+     */
+    load : function(url, params, cb){
+        Ext.Ajax.request(Ext.apply({
+            params: params,
+            url: url.url || url,
+            callback: cb,
+            el: this.dom,
+            indicatorText: url.indicatorText || ''
+        }, Ext.isObject(url) ? url : {}));
+        return this;
+    },
+
+    /**
+     * Tests various css rules/browsers to determine if this element uses a border box
+     * @return {Boolean}
+     */
+    isBorderBox : function(){
+        return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;
+    },
+
+    /**
+     * Removes this element from the DOM and deletes it from the cache
+     */
+    remove : function(){
+        var me = this,
+            dom = me.dom;
+        
+        me.removeAllListeners();
+        delete El.cache[dom.id];
+        delete El.dataCache[dom.id]
+        Ext.removeNode(dom);
+    },
+
+    /**
+     * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
+     * @param {Function} overFn The function to call when the mouse enters the Element.
+     * @param {Function} outFn The function to call when the mouse leaves the Element.
+     * @param {Object} scope (optional) The scope (<tt>this</tt> reference) in which the functions are executed. Defaults to the Element's DOM element.
+     * @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the <tt>options</tt> parameter}.
+     * @return {Ext.Element} this
+     */
+    hover : function(overFn, outFn, scope, options){
+        var me = this;
+        me.on('mouseenter', overFn, scope || me.dom, options);
+        me.on('mouseleave', outFn, scope || me.dom, options);
+        return me;
+    },
+
+    /**
+     * Returns true if this element is an ancestor of the passed element
+     * @param {HTMLElement/String} el The element to check
+     * @return {Boolean} True if this element is an ancestor of el, else false
+     */
+    contains : function(el){
+        return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);
+    },
+
+    /**
+     * Returns the value of a namespaced attribute from the element's underlying DOM node.
+     * @param {String} namespace The namespace in which to look for the attribute
+     * @param {String} name The attribute name
+     * @return {String} The attribute value
+     * @deprecated
+     */
+    getAttributeNS : function(ns, name){
+        return this.getAttribute(name, ns); 
+    },
+    
+    /**
+     * Returns the value of an attribute from the element's underlying DOM node.
+     * @param {String} name The attribute name
+     * @param {String} namespace (optional) The namespace in which to look for the attribute
+     * @return {String} The attribute value
+     */
+    getAttribute : Ext.isIE ? function(name, ns){
+        var d = this.dom,
+            type = typeof d[ns + ":" + name];
+
+        if(['undefined', 'unknown'].indexOf(type) == -1){
+            return d[ns + ":" + name];
+        }
+        return d[name];
+    } : function(name, ns){
+        var d = this.dom;
+        return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name];
+    },
+    
+    /**
+    * Update the innerHTML of this element
+    * @param {String} html The new HTML
+    * @return {Ext.Element} this
+     */
+    update : function(html) {
+        this.dom.innerHTML = html;
+        return this;
+    }
+};
+
+var ep = El.prototype;
+
+El.addMethods = function(o){
+   Ext.apply(ep, o);
+};
+
+/**
+ * Appends an event handler (shorthand for {@link #addListener}).
+ * @param {String} eventName The type of event to handle
+ * @param {Function} fn The handler function the event invokes
+ * @param {Object} scope (optional) The scope (this element) of the handler function
+ * @param {Object} options (optional) An object containing standard {@link #addListener} options
+ * @member Ext.Element
+ * @method on
+ */
+ep.on = ep.addListener;
+
+/**
+ * Removes an event handler from this element (see {@link #removeListener} for additional notes).
+ * @param {String} eventName the type of event to remove
+ * @param {Function} fn the method the event invokes
+ * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults
+ * to this Element.
+ * @return {Ext.Element} this
+ * @member Ext.Element
+ * @method un
+ */
+ep.un = ep.removeListener;
+
+/**
+ * true to automatically adjust width and height settings for box-model issues (default to true)
+ */
+ep.autoBoxAdjust = true;
+
+// private
+var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
+    docEl;
+
+/**
+ * @private
+ */
+El.cache = {};
+El.dataCache = {};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @static
+ * @member Ext.Element
+ * @method get
+ */
+El.get = function(el){
+    var ex,
+        elm,
+        id;
+    if(!el){ return null; }
+    if (typeof el == "string") { // element id
+        if (!(elm = DOC.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) { // dom element
+        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 = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid,
+                                                          // catch case where it hasn't been appended
+            El.cache[el.id] = el; // in case it was created directly with Element(), let's cache it
+        }
+        return el;
+    } else if(el.isComposite) {
+        return el;
+    } else if(Ext.isArray(el)) {
+        return El.select(el);
+    } else if(el == DOC) {
+        // create a bogus element object representing the document object
+        if(!docEl){
+            var f = function(){};
+            f.prototype = El.prototype;
+            docEl = new f();
+            docEl.dom = DOC;
+        }
+        return docEl;
+    }
+    return null;
+};
+
+// private method for getting and setting element data
+El.data = function(el, key, value){
+    var c = El.dataCache[el.id];
+    if(!c){
+        c = El.dataCache[el.id] = {};
+    }
+    if(arguments.length == 2){
+        return c[key];    
+    }else{
+        c[key] = value;
+    }
+};
+
+// private
+// Garbage collection - uncache elements/purge listeners on orphaned elements
+// so we don't hold a reference and cause the browser to retain them
+function garbageCollect(){
+    if(!Ext.enableGarbageCollector){
+        clearInterval(El.collectorThread);
+    } else {
+        var eid,
+            el,
+            d;
+
+        for(eid in El.cache){
+            el = El.cache[eid];
+            d = el.dom;
+            // -------------------------------------------------------
+            // Determining what is garbage:
+            // -------------------------------------------------------
+            // !d
+            // dom node is null, definitely garbage
+            // -------------------------------------------------------
+            // !d.parentNode
+            // no parentNode == direct orphan, definitely garbage
+            // -------------------------------------------------------
+            // !d.offsetParent && !document.getElementById(eid)
+            // display none elements have no offsetParent so we will
+            // also try to look it up by it's id. However, check
+            // offsetParent first so we don't do unneeded lookups.
+            // This enables collection of elements that are not orphans
+            // directly, but somewhere up the line they have an orphan
+            // parent.
+            // -------------------------------------------------------
+            if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){
+                delete El.cache[eid];
+                if(d && Ext.enableListenerCollection){
+                    Ext.EventManager.removeAll(d);
+                }
+            }
+        }
+    }
+}
+El.collectorThreadId = setInterval(garbageCollect, 30000);
+
+var flyFn = function(){};
+flyFn.prototype = El.prototype;
+
+// dom is optional
+El.Flyweight = function(dom){
+    this.dom = dom;
+};
+
+El.Flyweight.prototype = new flyFn();
+El.Flyweight.prototype.isFlyweight = true;
+El._flyweights = {};
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext.Element
+ * @method fly
+ */
+El.fly = function(el, named){
+    var ret = null;
+    named = named || '_global';
+
+    if (el = Ext.getDom(el)) {
+        (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el;
+        ret = El._flyweights[named];
+    }
+    return ret;
+};
+
+/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * Shorthand of {@link Ext.Element#get}
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @member Ext
+ * @method get
+ */
+Ext.get = El.get;
+
+/**
+ * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
+ * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext
+ * @method fly
+ */
+Ext.fly = El.fly;
+
+// speedy lookup for elements never to box adjust
+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.dataCache;
+    delete El._flyweights;
+});
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.position.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.position.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.position.js	(revision 625)
@@ -0,0 +1,303 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+(function(){
+var D = Ext.lib.Dom,
+        LEFT = "left",
+        RIGHT = "right",
+        TOP = "top",
+        BOTTOM = "bottom",
+        POSITION = "position",
+        STATIC = "static",
+        RELATIVE = "relative",
+        AUTO = "auto",
+        ZINDEX = "z-index";
+
+function animTest(args, animate, i) {
+	return this.preanim && !!animate ? this.preanim(args, i) : false	
+}
+
+Ext.Element.addMethods({
+	/**
+      * Gets the current X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The X position of the element
+      */
+    getX : function(){
+        return D.getX(this.dom);
+    },
+
+    /**
+      * Gets the current Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Number} The Y position of the element
+      */
+    getY : function(){
+        return D.getY(this.dom);
+    },
+
+    /**
+      * Gets the current position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+      * @return {Array} The XY position of the element
+      */
+    getXY : function(){
+        return D.getXY(this.dom);
+    },
+
+    /**
+      * Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.
+      * @param {Mixed} element The element to get the offsets from.
+      * @return {Array} The XY page offsets (e.g. [100, -200])
+      */
+    getOffsetsTo : function(el){
+        var o = this.getXY(),
+        	e = Ext.fly(el, '_internal').getXY();
+        return [o[0]-e[0],o[1]-e[1]];
+    },
+
+    /**
+     * Sets the X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The X position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setX : function(x, animate){	    
+	    return this.setXY([x, this.getY()], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the Y position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} The Y position of the element
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setY : function(y, animate){	    
+	    return this.setXY([this.getX(), y], animTest.call(this, arguments, animate, 1));
+    },
+
+    /**
+     * Sets the element's left position directly using CSS style (instead of {@link #setX}).
+     * @param {String} left The left CSS property value
+     * @return {Ext.Element} this
+     */
+    setLeft : function(left){
+        this.setStyle(LEFT, this.addUnits(left));
+        return this;
+    },
+
+    /**
+     * Sets the element's top position directly using CSS style (instead of {@link #setY}).
+     * @param {String} top The top CSS property value
+     * @return {Ext.Element} this
+     */
+    setTop : function(top){
+        this.setStyle(TOP, this.addUnits(top));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS right style.
+     * @param {String} right The right CSS property value
+     * @return {Ext.Element} this
+     */
+    setRight : function(right){
+        this.setStyle(RIGHT, this.addUnits(right));
+        return this;
+    },
+
+    /**
+     * Sets the element's CSS bottom style.
+     * @param {String} bottom The bottom CSS property value
+     * @return {Ext.Element} this
+     */
+    setBottom : function(bottom){
+        this.setStyle(BOTTOM, this.addUnits(bottom));
+        return this;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setXY : function(pos, animate){
+	    var me = this;
+        if(!animate || !me.anim){
+            D.setXY(me.dom, pos);
+        }else{
+            me.anim({points: {to: pos}}, me.preanim(arguments, 1), 'motion');
+        }
+        return me;
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    setLocation : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));
+    },
+
+    /**
+     * Sets the position of the element in page coordinates, regardless of how the element is positioned.
+     * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
+     * @param {Number} x X value for new position (coordinates are page-based)
+     * @param {Number} y Y value for new position (coordinates are page-based)
+     * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object
+     * @return {Ext.Element} this
+     */
+    moveTo : function(x, y, animate){
+        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));        
+    },    
+    
+    /**
+     * Gets the left X coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getLeft : function(local){
+	    return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0;
+    },
+
+    /**
+     * Gets the right X coordinate of the element (element X position + element width)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getRight : function(local){
+	    var me = this;
+	    return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0;
+    },
+
+    /**
+     * Gets the top Y coordinate
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getTop : function(local) {
+	    return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0;
+    },
+
+    /**
+     * Gets the bottom Y coordinate of the element (element Y position + element height)
+     * @param {Boolean} local True to get the local css position instead of page coordinate
+     * @return {Number}
+     */
+    getBottom : function(local){
+	    var me = this;
+	    return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0;
+    },
+
+    /**
+    * Initializes positioning on this element. If a desired position is not passed, it will make the
+    * the element positioned relative IF it is not already positioned.
+    * @param {String} pos (optional) Positioning to use "relative", "absolute" or "fixed"
+    * @param {Number} zIndex (optional) The zIndex to apply
+    * @param {Number} x (optional) Set the page X position
+    * @param {Number} y (optional) Set the page Y position
+    */
+    position : function(pos, zIndex, x, y){
+	    var me = this;
+	    
+        if(!pos && me.isStyle(POSITION, STATIC)){           
+            me.setStyle(POSITION, RELATIVE);           
+        } else if(pos) {
+            me.setStyle(POSITION, pos);
+        }
+        if(zIndex){
+            me.setStyle(ZINDEX, zIndex);
+        }
+        if(x || y) me.setXY([x || false, y || false]);
+    },
+
+    /**
+    * Clear positioning back to the default when the document was loaded
+    * @param {String} value (optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'.
+    * @return {Ext.Element} this
+     */
+    clearPositioning : function(value){
+        value = value || '';
+        this.setStyle({
+            left : value,
+            right : value,
+            top : value,
+            bottom : value,
+            "z-index" : "",
+            position : STATIC
+        });
+        return this;
+    },
+
+    /**
+    * Gets an object with all CSS positioning properties. Useful along with setPostioning to get
+    * snapshot before performing an update and then restoring the element.
+    * @return {Object}
+    */
+    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(ZINDEX)
+        };
+    },
+    
+    /**
+    * Set positioning with an object returned by getPositioning().
+    * @param {Object} posCfg
+    * @return {Ext.Element} this
+     */
+    setPositioning : function(pc){
+	    var me = this,
+	    	style = me.dom.style;
+	    	
+        me.setStyle(pc);
+        
+        if(pc.right == AUTO){
+            style.right = "";
+        }
+        if(pc.bottom == AUTO){
+            style.bottom = "";
+        }
+        
+        return me;
+    },    
+	
+    /**
+     * Translates the passed page coordinates into left/top css values for this element
+     * @param {Number/Array} x The page x or an array containing [x, y]
+     * @param {Number} y (optional) The page y, required if x is not an array
+     * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)}
+     */
+    translatePoints : function(x, y){        	     
+	    y = isNaN(x[1]) ? y : x[1];
+        x = isNaN(x[0]) ? x : x[0];
+        var me = this,
+        	relative = me.isStyle(POSITION, RELATIVE),
+        	o = me.getXY(),
+        	l = parseInt(me.getStyle(LEFT), 10),
+        	t = parseInt(me.getStyle(TOP), 10);
+        
+        l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft);
+        t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);        
+
+        return {left: (x - o[0] + l), top: (y - o[1] + t)}; 
+    },
+    
+    animTest : animTest
+});
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.scroll.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.scroll.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.scroll.js	(revision 625)
@@ -0,0 +1,58 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods({
+    /**
+     * Returns true if this element is scrollable.
+     * @return {Boolean}
+     */
+    isScrollable : function(){
+        var dom = this.dom;
+        return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth;
+    },
+
+    /**
+     * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
+     * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values.
+     * @param {Number} value The new scroll value.
+     * @return {Element} this
+     */
+    scrollTo : function(side, value){
+        this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value;
+        return this;
+    },
+
+    /**
+     * Returns the current scroll position of the element.
+     * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)}
+     */
+    getScroll : function(){
+        var d = this.dom, 
+            doc = document,
+            body = doc.body,
+            docElement = doc.documentElement,
+            l,
+            t,
+            ret;
+
+        if(d == doc || d == body){
+            if(Ext.isIE && Ext.isStrict){
+                l = docElement.scrollLeft; 
+                t = docElement.scrollTop;
+            }else{
+                l = window.pageXOffset;
+                t = window.pageYOffset;
+            }
+            ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)};
+        }else{
+            ret = {left: d.scrollLeft, top: d.scrollTop};
+        }
+        return ret;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.style.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.style.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.style.js	(revision 625)
@@ -0,0 +1,439 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){  
+    // local style camelizing for speed
+    var propCache = {},
+        camelRe = /(-[a-z])/gi,
+        classReCache = {},
+        view = document.defaultView,
+        propFloat = Ext.isIE ? 'styleFloat' : 'cssFloat',
+        opacityRe = /alpha\(opacity=(.*)\)/i,
+        trimRe = /^\s+|\s+$/g,
+        EL = Ext.Element,   
+        PADDING = "padding",
+        MARGIN = "margin",
+        BORDER = "border",
+        LEFT = "-left",
+        RIGHT = "-right",
+        TOP = "-top",
+        BOTTOM = "-bottom",
+        WIDTH = "-width",    
+        MATH = Math,
+        HIDDEN = 'hidden',
+        ISCLIPPED = 'isClipped',
+        OVERFLOW = 'overflow',
+        OVERFLOWX = 'overflow-x',
+        OVERFLOWY = 'overflow-y',
+        ORIGINALCLIP = 'originalClip',
+        // special markup used throughout Ext when box wrapping elements    
+        borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH},
+        paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM},
+        margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM},
+        data = Ext.Element.data;
+        
+    
+    // private  
+    function camelFn(m, a) {
+        return a.charAt(1).toUpperCase();
+    }
+    
+    // private (needs to be called => addStyles.call(this, sides, styles))
+    function addStyles(sides, styles){
+        var val = 0;    
+        
+        Ext.each(sides.match(/\w/g), function(s) {
+            if (s = parseInt(this.getStyle(styles[s]), 10)) {
+                val += MATH.abs(s);      
+            }
+        },
+        this);
+        return val;
+    }
+
+    function chkCache(prop) {
+        return propCache[prop] || (propCache[prop] = prop == 'float' ? propFloat : prop.replace(camelRe, camelFn));
+
+    }
+            
+    return {    
+        // private  ==> used by Fx  
+        adjustWidth : function(width) {
+            var me = this;
+            var isNum = (typeof width == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               width -= (me.getBorderWidth("lr") + me.getPadding("lr"));
+            }
+            return (isNum && width < 0) ? 0 : width;
+        },
+        
+        // private   ==> used by Fx 
+        adjustHeight : function(height) {
+            var me = this;
+            var isNum = (typeof height == "number");
+            if(isNum && me.autoBoxAdjust && !me.isBorderBox()){
+               height -= (me.getBorderWidth("tb") + me.getPadding("tb"));               
+            }
+            return (isNum && height < 0) ? 0 : height;
+        },
+    
+    
+        /**
+         * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        addClass : function(className){
+            var me = this;
+            Ext.each(className, function(v) {
+                me.dom.className += (!me.hasClass(v) && v ? " " + v : "");  
+            });
+            return me;
+        },
+    
+        /**
+         * Adds one or more CSS classes to this element and removes the same class(es) from all siblings.
+         * @param {String/Array} className The CSS class to add, or an array of classes
+         * @return {Ext.Element} this
+         */
+        radioClass : function(className){
+            Ext.each(this.dom.parentNode.childNodes, function(v) {
+                if(v.nodeType == 1) {
+                    Ext.fly(v, '_internal').removeClass(className);          
+                }
+            });
+            return this.addClass(className);
+        },
+    
+        /**
+         * Removes one or more CSS classes from the element.
+         * @param {String/Array} className The CSS class to remove, or an array of classes
+         * @return {Ext.Element} this
+         */
+        removeClass : function(className){
+            var me = this;
+            if (me.dom.className) {
+                Ext.each(className, function(v) {               
+                    me.dom.className = me.dom.className.replace(
+                        classReCache[v] = classReCache[v] || new RegExp('(?:^|\\s+)' + v + '(?:\\s+|$)', "g"), 
+                        " ");               
+                });    
+            }
+            return me;
+        },
+    
+        /**
+         * Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).
+         * @param {String} className The CSS class to toggle
+         * @return {Ext.Element} this
+         */
+        toggleClass : function(className){
+            return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
+        },
+    
+        /**
+         * Checks if the specified CSS class exists on this element's DOM node.
+         * @param {String} className The CSS class to check for
+         * @return {Boolean} True if the class exists, else false
+         */
+        hasClass : function(className){
+            return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1;
+        },
+    
+        /**
+         * Replaces a CSS class on the element with another.  If the old name does not exist, the new name will simply be added.
+         * @param {String} oldClassName The CSS class to replace
+         * @param {String} newClassName The replacement CSS class
+         * @return {Ext.Element} this
+         */
+        replaceClass : function(oldClassName, newClassName){
+            return this.removeClass(oldClassName).addClass(newClassName);
+        },
+        
+        isStyle : function(style, val) {
+            return this.getStyle(style) == val;  
+        },
+    
+        /**
+         * Normalizes currentStyle and computedStyle.
+         * @param {String} property The style property whose value is returned.
+         * @return {String} The current value of the style property for this element.
+         */
+        getStyle : function(){         
+            return view && view.getComputedStyle ?
+                function(prop){
+                    var el = this.dom,
+                        v,                  
+                        cs;
+                    if(el == document) return null;
+                    prop = chkCache(prop);
+                    return (v = el.style[prop]) ? v : 
+                           (cs = view.getComputedStyle(el, "")) ? cs[prop] : null;
+                } :
+                function(prop){      
+                    var el = this.dom, 
+                        m, 
+                        cs;     
+                        
+                    if(el == document) return null;      
+                    if (prop == 'opacity') {
+                        if (el.style.filter.match) {                       
+                            if(m = el.style.filter.match(opacityRe)){
+                                var fv = parseFloat(m[1]);
+                                if(!isNaN(fv)){
+                                    return fv ? fv / 100 : 0;
+                                }
+                            }
+                        }
+                        return 1;
+                    }
+                    prop = chkCache(prop);  
+                    return el.style[prop] || ((cs = el.currentStyle) ? cs[prop] : null);
+                };
+        }(),
+        
+        /**
+         * Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values
+         * are convert to standard 6 digit hex color.
+         * @param {String} attr The css attribute
+         * @param {String} defaultValue The default value to use when a valid color isn't found
+         * @param {String} prefix (optional) defaults to #. Use an empty string when working with
+         * color anims.
+         */
+        getColor : function(attr, defaultValue, prefix){
+            var v = this.getStyle(attr),
+                color = prefix || '#',
+                h;
+                
+            if(!v || /transparent|inherit/.test(v)){
+                return defaultValue;
+            }
+            if(/^r/.test(v)){
+                Ext.each(v.slice(4, v.length -1).split(','), function(s){
+                    h = parseInt(s, 10);
+                    color += (h < 16 ? '0' : '') + h.toString(16); 
+                });
+            }else{
+                v = v.replace('#', '');
+                color += v.length == 3 ? v.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3') : v;
+            }
+            return(color.length > 5 ? color.toLowerCase() : defaultValue);
+        },
+    
+        /**
+         * Wrapper for setting style properties, also takes single object parameter of multiple styles.
+         * @param {String/Object} property The style property to be set, or an object of multiple styles.
+         * @param {String} value (optional) The value to apply to the given property, or null if an object was passed.
+         * @return {Ext.Element} this
+         */
+        setStyle : function(prop, value){
+            var tmp, 
+                style,
+                camel;
+            if (!Ext.isObject(prop)) {
+                tmp = {};
+                tmp[prop] = value;          
+                prop = tmp;
+            }
+            for (style in prop) {
+                value = prop[style];            
+                style == 'opacity' ? 
+                    this.setOpacity(value) : 
+                    this.dom.style[chkCache(style)] = value;
+            }
+            return this;
+        },
+        
+        /**
+         * Set the opacity of the element
+         * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc
+         * @param {Boolean/Object} animate (optional) a standard Element animation config object or <tt>true</tt> for
+         * the default animation (<tt>{duration: .35, easing: 'easeIn'}</tt>)
+         * @return {Ext.Element} this
+         */
+         setOpacity : function(opacity, animate){
+            var me = this,
+                s = me.dom.style;
+                
+            if(!animate || !me.anim){            
+                if(Ext.isIE){
+                    var opac = opacity < 1 ? 'alpha(opacity=' + opacity * 100 + ')' : '', 
+                    val = s.filter.replace(opacityRe, '').replace(trimRe, '');
+
+                    s.zoom = 1;
+                    s.filter = val + (val.length > 0 ? ' ' : '') + opac;
+                }else{
+                    s.opacity = opacity;
+                }
+            }else{
+                me.anim({opacity: {to: opacity}}, me.preanim(arguments, 1), null, .35, 'easeIn');
+            }
+            return me;
+        },
+        
+        /**
+         * Clears any opacity settings from this element. Required in some cases for IE.
+         * @return {Ext.Element} this
+         */
+        clearOpacity : function(){
+            var style = this.dom.style;
+            if(Ext.isIE){
+                if(!Ext.isEmpty(style.filter)){
+                    style.filter = style.filter.replace(opacityRe, '').replace(trimRe, '');
+                }
+            }else{
+                style.opacity = style['-moz-opacity'] = style['-khtml-opacity'] = '';
+            }
+            return this;
+        },
+    
+        /**
+         * Returns the offset height of the element
+         * @param {Boolean} contentHeight (optional) true to get the height minus borders and padding
+         * @return {Number} The element's height
+         */
+        getHeight : function(contentHeight){
+            var me = this,
+                dom = me.dom,
+                h = MATH.max(dom.offsetHeight, dom.clientHeight) || 0;
+            h = !contentHeight ? h : h - me.getBorderWidth("tb") - me.getPadding("tb");
+            return h < 0 ? 0 : h;
+        },
+    
+        /**
+         * Returns the offset width of the element
+         * @param {Boolean} contentWidth (optional) true to get the width minus borders and padding
+         * @return {Number} The element's width
+         */
+        getWidth : function(contentWidth){
+            var me = this,
+                dom = me.dom,
+                w = MATH.max(dom.offsetWidth, dom.clientWidth) || 0;
+            w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr");
+            return w < 0 ? 0 : w;
+        },
+    
+        /**
+         * Set the width of this Element.
+         * @param {Mixed} width The new width. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).</li>
+         * <li>A String used to set the CSS width style. Animation may <b>not</b> be used.
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+        setWidth : function(width, animate){
+            var me = this;
+            width = me.adjustWidth(width);
+            !animate || !me.anim ? 
+                me.dom.style.width = me.addUnits(width) :
+                me.anim({width : {to : width}}, me.preanim(arguments, 1));
+            return me;
+        },
+    
+        /**
+         * Set the height of this Element.
+         * <pre><code>
+// change the height to 200px and animate with default configuration
+Ext.fly('elementId').setHeight(200, true);
+
+// change the height to 150px and animate with a custom configuration
+Ext.fly('elId').setHeight(150, {
+    duration : .5, // animation will have a duration of .5 seconds
+    // will change the content to "finished"
+    callback: function(){ this.{@link #update}("finished"); } 
+});
+         * </code></pre>
+         * @param {Mixed} height The new height. This may be one of:<div class="mdetail-params"><ul>
+         * <li>A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels.)</li>
+         * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+         * </ul></div>
+         * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object
+         * @return {Ext.Element} this
+         */
+         setHeight : function(height, animate){
+            var me = this;
+            height = me.adjustHeight(height);
+            !animate || !me.anim ? 
+                me.dom.style.height = me.addUnits(height) :
+                me.anim({height : {to : height}}, me.preanim(arguments, 1));
+            return me;
+        },
+        
+        /**
+         * Gets the width of the border(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the border <b><u>l</u></b>eft width + the border <b><u>r</u></b>ight width.
+         * @return {Number} The width of the sides passed added together
+         */
+        getBorderWidth : function(side){
+            return addStyles.call(this, side, borders);
+        },
+    
+        /**
+         * Gets the width of the padding(s) for the specified side(s)
+         * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example,
+         * passing <tt>'lr'</tt> would get the padding <b><u>l</u></b>eft + the padding <b><u>r</u></b>ight.
+         * @return {Number} The padding of the sides passed added together
+         */
+        getPadding : function(side){
+            return addStyles.call(this, side, paddings);
+        },
+    
+        /**
+         *  Store the current overflow setting and clip overflow on the element - use <tt>{@link #unclip}</tt> to remove
+         * @return {Ext.Element} this
+         */
+        clip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(!data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, true);
+                data(dom, ORIGINALCLIP, {
+                    o: me.getStyle(OVERFLOW),
+                    x: me.getStyle(OVERFLOWX),
+                    y: me.getStyle(OVERFLOWY)
+                });
+                me.setStyle(OVERFLOW, HIDDEN);
+                me.setStyle(OVERFLOWX, HIDDEN);
+                me.setStyle(OVERFLOWY, HIDDEN);
+            }
+            return me;
+        },
+    
+        /**
+         *  Return clipping (overflow) to original clipping before <tt>{@link #clip}</tt> was called
+         * @return {Ext.Element} this
+         */
+        unclip : function(){
+            var me = this,
+                dom = me.dom;
+                
+            if(data(dom, ISCLIPPED)){
+                data(dom, ISCLIPPED, false);
+                var o = data(dom, ORIGINALCLIP);
+                if(o.o){
+                    me.setStyle(OVERFLOW, o.o);
+                }
+                if(o.x){
+                    me.setStyle(OVERFLOWX, o.x);
+                }
+                if(o.y){
+                    me.setStyle(OVERFLOWY, o.y);
+                }
+            }
+            return me;
+        },
+        
+        addStyles : addStyles,
+        margins : margins
+    }
+}()         
+);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.traversal.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.traversal.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Element.traversal.js	(revision 625)
@@ -0,0 +1,176 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Element
+ */
+Ext.Element.addMethods(function(){
+	var PARENTNODE = 'parentNode',
+		NEXTSIBLING = 'nextSibling',
+		PREVIOUSSIBLING = 'previousSibling',
+		DQ = Ext.DomQuery,
+		GET = Ext.get;
+	
+	return {
+		/**
+	     * Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to search as a number or element (defaults to 50 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParent : function(simpleSelector, maxDepth, returnEl){
+	        var p = this.dom,
+	        	b = document.body, 
+	        	depth = 0, 	        	
+	        	stopEl;	        
+            if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') {
+                return null;
+            }
+	        maxDepth = maxDepth || 50;
+	        if (isNaN(maxDepth)) {
+	            stopEl = Ext.getDom(maxDepth);
+	            maxDepth = Number.MAX_VALUE;
+	        }
+	        while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){
+	            if(DQ.is(p, simpleSelector)){
+	                return returnEl ? GET(p) : p;
+	            }
+	            depth++;
+	            p = p.parentNode;
+	        }
+	        return null;
+	    },
+	
+	    /**
+	     * Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+	     * @return {HTMLElement} The matching DOM node (or null if no match was found)
+	     */
+	    findParentNode : function(simpleSelector, maxDepth, returnEl){
+	        var p = Ext.fly(this.dom.parentNode, '_internal');
+	        return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null;
+	    },
+	
+	    /**
+	     * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
+	     * This is a shortcut for findParentNode() that always returns an Ext.Element.
+	     * @param {String} selector The simple selector to test
+	     * @param {Number/Mixed} maxDepth (optional) The max depth to
+	            search as a number or element (defaults to 10 || document.body)
+	     * @return {Ext.Element} The matching DOM node (or null if no match was found)
+	     */
+	    up : function(simpleSelector, maxDepth){
+	        return this.findParentNode(simpleSelector, maxDepth, true);
+	    },
+	
+	    /**
+	     * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} unique (optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object)
+	     * @return {CompositeElement/CompositeElementLite} The composite element
+	     */
+	    select : function(selector, unique){
+	        return Ext.Element.select(selector, unique, this.dom);
+	    },
+	
+	    /**
+	     * Selects child nodes based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @return {Array} An array of the matched nodes
+	     */
+	    query : function(selector, unique){
+	        return DQ.select(selector, this.dom);
+	    },
+	
+	    /**
+	     * Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    child : function(selector, returnDom){
+	        var n = DQ.selectNode(selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+	    /**
+	     * Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).
+	     * @param {String} selector The CSS selector
+	     * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false)
+	     * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true)
+	     */
+	    down : function(selector, returnDom){
+	        var n = DQ.selectNode(" > " + selector, this.dom);
+	        return returnDom ? n : GET(n);
+	    },
+	
+		 /**
+	     * Gets the parent node for this element, optionally chaining up trying to match a selector
+	     * @param {String} selector (optional) Find a parent node that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The parent node or null
+		 */
+	    parent : function(selector, returnDom){
+	        return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom);
+	    },
+	
+	     /**
+	     * Gets the next sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The next sibling or null
+		 */
+	    next : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the previous sibling, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The previous sibling or null
+		 */
+	    prev : function(selector, returnDom){
+	        return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom);
+	    },
+	
+	
+	    /**
+	     * Gets the first child, skipping text nodes
+	     * @param {String} selector (optional) Find the next sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The first child or null
+		 */
+	    first : function(selector, returnDom){
+	        return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom);
+	    },
+	
+	    /**
+	     * Gets the last child, skipping text nodes
+	     * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector
+	     * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element
+	     * @return {Ext.Element/HTMLElement} The last child or null
+		 */
+	    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 || DQ.is(n, selector))){
+	                return !returnDom ? GET(n) : n;
+	            }
+	            n = n[dir];
+	        }
+	        return null;
+	    }	
+    }
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/EventManager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/EventManager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/EventManager.js	(revision 625)
@@ -0,0 +1,623 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.EventManager
+ * Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides
+ * several useful events directly.
+ * See {@link Ext.EventObject} for more details on normalized event objects.
+ * @singleton
+ */
+Ext.EventManager = function(){
+    var docReadyEvent, 
+    	docReadyProcId, 
+    	docReadyState = false,    	
+    	E = Ext.lib.Event,
+    	D = Ext.lib.Dom,
+    	DOC = document,
+    	WINDOW = window,
+    	IEDEFERED = "ie-deferred-loader",
+    	DOMCONTENTLOADED = "DOMContentLoaded",
+    	elHash = {},
+    	propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+    /// There is some jquery work around stuff here that isn't needed in Ext Core.
+    function addListener(el, ename, fn, wrap, scope){	    
+        var id = Ext.id(el),
+        	es = elHash[id] = elHash[id] || {};     	
+       
+        (es[ename] = es[ename] || []).push([fn, wrap, scope]);
+        E.on(el, ename, wrap);
+
+        // this is a workaround for jQuery and should somehow be removed from Ext Core in the future
+        // without breaking ExtJS.
+        if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery
+        	var args = ["DOMMouseScroll", wrap, false];
+        	el.addEventListener.apply(el, args);
+            E.on(window, 'unload', function(){
+	            el.removeEventListener.apply(el, args);                
+            });
+        }
+        if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document
+            Ext.EventManager.stoppedMouseDownEvent.addListener(wrap);
+        }
+    };
+    
+    function fireDocReady(){
+        if(!docReadyState){            
+            Ext.isReady = docReadyState = true;
+            if(docReadyProcId){
+                clearInterval(docReadyProcId);
+            }
+            if(Ext.isGecko || Ext.isOpera) {
+                DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false);
+            }
+            if(Ext.isIE){
+                var defer = DOC.getElementById(IEDEFERED);
+                if(defer){
+                    defer.onreadystatechange = null;
+                    defer.parentNode.removeChild(defer);
+                }
+            }
+            if(docReadyEvent){
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();
+            }
+        }
+    };
+
+    function initDocReady(){
+	    var COMPLETE = "complete";
+	    	
+        docReadyEvent = new Ext.util.Event();
+        if (Ext.isGecko || Ext.isOpera) {
+            DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false);
+        } else if (Ext.isIE){
+            DOC.write("<s"+'cript id=' + IEDEFERED + ' defer="defer" src="/'+'/:"></s'+"cript>");            
+            DOC.getElementById(IEDEFERED).onreadystatechange = function(){
+                if(this.readyState == COMPLETE){
+                    fireDocReady();
+                }
+            };
+        } else if (Ext.isWebKit){
+            docReadyProcId = setInterval(function(){                
+                if(DOC.readyState == COMPLETE) {
+                    fireDocReady();
+                 }
+            }, 10);
+        }
+        // no matter what, make sure it fires on load
+        E.on(WINDOW, "load", fireDocReady);
+    };
+
+    function createTargeted(h, o){
+        return function(){
+	        var args = Ext.toArray(arguments);
+            if(o.target == Ext.EventObject.setEvent(args[0]).target){
+                h.apply(this, args);
+            }
+        };
+    };    
+    
+    function createBuffered(h, o){
+        var task = new Ext.util.DelayedTask(h);
+        return function(e){
+            // create new event object impl so new events don't wipe out properties            
+            task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
+        };
+    };
+
+    function createSingle(h, el, ename, fn, scope){
+        return function(e){
+            Ext.EventManager.removeListener(el, ename, fn, scope);
+            h(e);
+        };
+    };
+
+    function createDelayed(h, o){
+        return function(e){
+            // create new event object impl so new events don't wipe out properties   
+            e = new Ext.EventObjectImpl(e);
+            setTimeout(function(){
+                h(e);
+            }, o.delay || 10);
+        };
+    };
+
+    function listen(element, ename, opt, fn, scope){
+        var o = !Ext.isObject(opt) ? {} : opt,
+        	el = Ext.getDom(element);
+        	
+        fn = fn || o.fn; 
+        scope = scope || o.scope;
+        
+        if(!el){
+            throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.';
+        }
+        function h(e){
+            // prevent errors while unload occurring
+            if(!Ext){// !window[xname]){  ==> can't we do this? 
+                return;
+            }
+            e = Ext.EventObject.setEvent(e);
+            var t;
+            if (o.delegate) {
+                if(!(t = e.getTarget(o.delegate, el))){
+                    return;
+                }
+            } else {
+                t = e.target;
+            }            
+            if (o.stopEvent) {
+                e.stopEvent();
+            }
+            if (o.preventDefault) {
+               e.preventDefault();
+            }
+            if (o.stopPropagation) {
+                e.stopPropagation();
+            }
+            if (o.normalized) {
+                e = e.browserEvent;
+            }
+            
+            fn.call(scope || el, e, t, o);
+        };
+        if(o.target){
+            h = createTargeted(h, o);
+        }
+        if(o.delay){
+            h = createDelayed(h, o);
+        }
+        if(o.single){
+            h = createSingle(h, el, ename, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o);
+        }
+
+        addListener(el, ename, fn, h, scope);
+        return h;
+    };
+
+    var pub = {
+	    /**
+	     * Appends an event handler to an element.  The shorthand version {@link #on} is equivalent.  Typically you will
+	     * use {@link Ext.Element#addListener} directly on an Element in favor of calling this version.
+	     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+	     * @param {String} eventName The type of event to listen for
+	     * @param {Function} handler The handler function the event invokes This function is passed
+	     * the following parameters:<ul>
+	     * <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+	     * <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
+	     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+	     * <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+	     * </ul>
+	     * @param {Object} scope (optional) The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.
+	     * @param {Object} options (optional) An object containing handler configuration properties.
+	     * This may contain any of the following properties:<ul>
+	     * <li>scope : Object<div class="sub-desc">The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.</div></li>
+	     * <li>delegate : String<div class="sub-desc">A simple selector to filter the target or look for a descendant of the target</div></li>
+	     * <li>stopEvent : Boolean<div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+	     * <li>preventDefault : Boolean<div class="sub-desc">True to prevent the default action</div></li>
+	     * <li>stopPropagation : Boolean<div class="sub-desc">True to prevent event propagation</div></li>
+	     * <li>normalized : Boolean<div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+	     * <li>delay : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after te event fires.</div></li>
+	     * <li>single : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+	     * <li>buffer : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+	     * by the specified number of milliseconds. If the event fires again within that time, the original
+	     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+	     * <li>target : Element<div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+	     * </ul><br>
+	     * <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p>
+	     */
+		addListener : function(element, eventName, fn, scope, options){		     		     		     
+            if(Ext.isObject(eventName)){                
+	            var o = eventName, e, val;
+                for(e in o){
+	                val = o[e];
+                    if(!propRe.test(e)){                            		         
+	                    if(Ext.isFunction(val)){
+	                        // shared options
+	                        listen(element, e, o, val, o.scope);
+	                    }else{
+	                        // individual options
+	                        listen(element, e, val);
+	                    }
+                    }
+                }
+            } else {
+            	listen(element, eventName, options, fn, scope);
+        	}
+        },
+        
+        /**
+         * Removes an event handler from an element.  The shorthand version {@link #un} is equivalent.  Typically
+         * you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         * @param {String} eventName The type of event
+         * @param {Function} fn The handler function to remove
+         */
+        removeListener : function(element, eventName, fn, scope){            
+            var el = Ext.getDom(element),
+                id = Ext.id(el),
+        	    wrap;      
+	        
+	        Ext.each((elHash[id] || {})[eventName], function (v,i,a) {
+			    if (Ext.isArray(v) && v[0] == fn && (!scope || v[2] == scope)) {		        			        
+			        E.un(el, eventName, wrap = v[1]);
+			        a.splice(i,1);
+			        return false;			        
+		        }
+	        });	
+
+            // jQuery workaround that should be removed from Ext Core
+	        if(eventName == "mousewheel" && el.addEventListener && wrap){
+	            el.removeEventListener("DOMMouseScroll", wrap, false);
+	        }
+            	        
+	        if(eventName == "mousedown" && el == DOC && wrap){ // fix stopped mousedowns on the document
+	            Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
+	        }
+        },
+        
+        /**
+         * Removes all event handers from an element.  Typically you will use {@link Ext.Element#removeAllListeners}
+         * directly on an Element in favor of calling this version.
+         * @param {String/HTMLElement} el The id or html element from which to remove the event
+         */
+        removeAll : function(el){
+	        var id = Ext.id(el = Ext.getDom(el)), 
+				es = elHash[id], 				
+				ename;
+	       
+	        for(ename in es){
+	            if(es.hasOwnProperty(ename)){	                    
+	                Ext.each(es[ename], function(v) {
+	                    E.un(el, ename, v.wrap);                    
+	                });
+	            }            
+	        }
+	        elHash[id] = null;       
+        },
+
+        /**
+         * Fires when the document is ready (before onload and before images are loaded). Can be
+         * accessed shorthanded as Ext.onReady().
+         * @param {Function} fn The method the event invokes
+         * @param {Object} scope (optional) An object that becomes the scope of the handler
+         * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+         */
+        onDocumentReady : function(fn, scope, options){
+            if(docReadyState){ // if it already fired
+                docReadyEvent.addListener(fn, scope, options);
+                docReadyEvent.fire();
+                docReadyEvent.clearListeners();               
+            } else {
+                if(!docReadyEvent) initDocReady();
+                options = options || {};
+	            options.delay = options.delay || 1;	            
+	            docReadyEvent.addListener(fn, scope, options);
+            }
+        },
+        
+        elHash : elHash   
+    };
+     /**
+     * Appends an event handler to an element.  Shorthand for {@link #addListener}.
+     * @param {String/HTMLElement} el The html element or id to assign the event handler to
+     * @param {String} eventName The type of event to listen for
+     * @param {Function} handler The handler function the event invokes
+     * @param {Object} scope (optional) The scope in which to execute the handler
+     * function (the handler function's "this" context)
+     * @param {Object} options (optional) An object containing standard {@link #addListener} options
+     * @member Ext.EventManager
+     * @method on
+     */
+    pub.on = pub.addListener;
+    /**
+     * Removes an event handler from an element.  Shorthand for {@link #removeListener}.
+     * @param {String/HTMLElement} el The id or html element from which to remove the event
+     * @param {String} eventName The type of event
+     * @param {Function} fn The handler function to remove
+     * @return {Boolean} True if a listener was actually removed, else false
+     * @member Ext.EventManager
+     * @method un
+     */
+    pub.un = pub.removeListener;
+
+    pub.stoppedMouseDownEvent = new Ext.util.Event();
+    return pub;
+}();
+/**
+  * Fires when the document is ready (before onload and before images are loaded).  Shorthand of {@link Ext.EventManager#onDocumentReady}.
+  * @param {Function} fn The method the event invokes
+  * @param {Object} scope An object that becomes the scope of the handler
+  * @param {boolean} options (optional) An object containing standard {@link #addListener} options
+  * @member Ext
+  * @method onReady
+ */
+Ext.onReady = Ext.EventManager.onDocumentReady;
+
+
+//Initialize doc classes
+(function(){
+    
+    var initExtCss = function(){
+        // find the body element
+        var bd = document.body || document.getElementsByTagName('body')[0];
+        if(!bd){ return false; }
+        var cls = [' ',
+                Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8'))
+                : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3')
+                : Ext.isOpera ? "ext-opera"
+                : Ext.isWebKit ? "ext-webkit" : ""];
+
+        if(Ext.isSafari){
+            cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4')));
+        }else if(Ext.isChrome){
+            cls.push("ext-chrome");
+        }
+
+        if(Ext.isMac){
+            cls.push("ext-mac");
+        }
+        if(Ext.isLinux){
+            cls.push("ext-linux");
+        }
+
+        if(Ext.isStrict || Ext.isBorderBox){ // add to the parent to allow for selectors like ".ext-strict .ext-ie"
+            var p = bd.parentNode;
+            if(p){
+                p.className += Ext.isStrict ? ' ext-strict' : ' ext-border-box';
+            }
+        }
+        bd.className += cls.join(' ');
+        return true;
+    }
+
+    if(!initExtCss()){
+        Ext.onReady(initExtCss);
+    }
+})();
+
+
+/**
+ * @class Ext.EventObject
+ * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject 
+ * wraps the browser's native event-object normalizing cross-browser differences,
+ * such as which mouse button is clicked, keys pressed, mechanisms to stop
+ * event-propagation along with a method to prevent default actions from taking place.
+ * <p>For example:</p>
+ * <pre><code>
+function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
+    e.preventDefault();
+    var target = e.getTarget(); // same as t (the target HTMLElement)
+    ...
+}
+var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
+myDiv.on(         // 'on' is shorthand for addListener
+    "click",      // perform an action on click of myDiv
+    handleClick   // reference to the action handler
+);  
+// other methods to do the same:
+Ext.EventManager.on("myDiv", 'click', handleClick);
+Ext.EventManager.addListener("myDiv", 'click', handleClick);
+ </code></pre>
+ * @singleton
+ */
+Ext.EventObject = function(){
+    var E = Ext.lib.Event,
+    	// safari keypress events for special keys return bad keycodes
+    	safariKeys = {
+	        3 : 13, // enter
+	        63234 : 37, // left
+	        63235 : 39, // right
+	        63232 : 38, // up
+	        63233 : 40, // down
+	        63276 : 33, // page up
+	        63277 : 34, // page down
+	        63272 : 46, // delete
+	        63273 : 36, // home
+	        63275 : 35  // end
+    	},
+    	// normalize button clicks
+    	btnMap = Ext.isIE ? {1:0,4:1,2:2} :
+                (Ext.isWebKit ? {1:0,2:1,3:2} : {0:0,1:1,2:2});
+
+    Ext.EventObjectImpl = function(e){
+        if(e){
+            this.setEvent(e.browserEvent || e);
+        }
+    };
+
+    Ext.EventObjectImpl.prototype = {
+           /** @private */
+        setEvent : function(e){
+	        var me = this;
+            if(e == me || (e && e.browserEvent)){ // already wrapped
+                return e;
+            }
+            me.browserEvent = e;
+            if(e){
+                // normalize buttons
+                me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1);
+                if(e.type == 'click' && me.button == -1){
+                    me.button = 0;
+                }
+                me.type = e.type;
+                me.shiftKey = e.shiftKey;
+                // mac metaKey behaves like ctrlKey
+                me.ctrlKey = e.ctrlKey || e.metaKey || false;
+                me.altKey = e.altKey;
+                // in getKey these will be normalized for the mac
+                me.keyCode = e.keyCode;
+                me.charCode = e.charCode;
+                // cache the target for the delayed and or buffered events
+                me.target = E.getTarget(e);
+                // same for XY
+                me.xy = E.getXY(e);
+            }else{
+                me.button = -1;
+                me.shiftKey = false;
+                me.ctrlKey = false;
+                me.altKey = false;
+                me.keyCode = 0;
+                me.charCode = 0;
+                me.target = null;
+                me.xy = [0, 0];
+            }
+            return me;
+        },
+
+        /**
+         * Stop the event (preventDefault and stopPropagation)
+         */
+        stopEvent : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopEvent(me.browserEvent);
+            }
+        },
+
+        /**
+         * Prevents the browsers default handling of the event.
+         */
+        preventDefault : function(){
+            if(this.browserEvent){
+                E.preventDefault(this.browserEvent);
+            }
+        },        
+
+        /**
+         * Cancels bubbling of the event.
+         */
+        stopPropagation : function(){
+	        var me = this;
+            if(me.browserEvent){
+                if(me.browserEvent.type == 'mousedown'){
+                    Ext.EventManager.stoppedMouseDownEvent.fire(me);
+                }
+                E.stopPropagation(me.browserEvent);
+            }
+        },
+
+        /**
+         * Gets the character code for the event.
+         * @return {Number}
+         */
+        getCharCode : function(){
+            return this.charCode || this.keyCode;
+        },
+
+        /**
+         * Returns a normalized keyCode for the event.
+         * @return {Number} The key code
+         */
+        getKey : function(){
+            return this.normalizeKey(this.keyCode || this.charCode)
+        },
+		
+		// private
+		normalizeKey: function(k){
+			return Ext.isSafari ? (safariKeys[k] || k) : k; 
+		},
+
+        /**
+         * Gets the x coordinate of the event.
+         * @return {Number}
+         */
+        getPageX : function(){
+            return this.xy[0];
+        },
+
+        /**
+         * Gets the y coordinate of the event.
+         * @return {Number}
+         */
+        getPageY : function(){
+            return this.xy[1];
+        },
+
+        /**
+         * Gets the page coordinates of the event.
+         * @return {Array} The xy values like [x, y]
+         */
+        getXY : function(){
+            return this.xy;
+        },
+
+        /**
+         * Gets the target for the event.
+         * @param {String} selector (optional) A simple selector to filter the target or look for an ancestor of the target
+         * @param {Number/Mixed} maxDepth (optional) The max depth to
+                search as a number or element (defaults to 10 || document.body)
+         * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
+         * @return {HTMLelement}
+         */
+        getTarget : function(selector, maxDepth, returnEl){
+            return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target);
+        },
+
+        /**
+         * Gets the related target.
+         * @return {HTMLElement}
+         */
+        getRelatedTarget : function(){
+            return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null;
+        },
+
+        /**
+         * Normalizes mouse wheel delta across browsers
+         * @return {Number} The delta
+         */
+        getWheelDelta : function(){
+            var e = this.browserEvent;
+            var delta = 0;
+            if(e.wheelDelta){ /* IE/Opera. */
+                delta = e.wheelDelta/120;
+            }else if(e.detail){ /* Mozilla case. */
+                delta = -e.detail/3;
+            }
+            return delta;
+        },
+		
+		/**
+		* Returns true if the target of this event is a child of el.  Unless the allowEl parameter is set, it will return false if if the target is el.
+		* Example usage:<pre><code>
+		// Handle click on any child of an element
+		Ext.getBody().on('click', function(e){
+			if(e.within('some-el')){
+				alert('Clicked on a child of some-el!');
+			}
+		});
+		
+		// Handle click directly on an element, ignoring clicks on child nodes
+		Ext.getBody().on('click', function(e,t){
+			if((t.id == 'some-el') && !e.within(t, true)){
+				alert('Clicked directly on some-el!');
+			}
+		});
+		</code></pre>
+		 * @param {Mixed} el The id, DOM element or Ext.Element to check
+		 * @param {Boolean} related (optional) true to test if the related target is within el instead of the target
+		 * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target
+		 * @return {Boolean}
+		 */
+		within : function(el, related, allowEl){
+            if(el){
+			    var t = this[related ? "getRelatedTarget" : "getTarget"]();
+			    return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t));
+            }
+            return false;
+		}
+	 };
+
+    return new Ext.EventObjectImpl();
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Ext.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Ext.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Ext.js	(revision 625)
@@ -0,0 +1,922 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+// for old browsers
+window.undefined = window.undefined;
+
+/**
+ * @class Ext
+ * Ext core utilities and functions.
+ * @singleton
+ */
+
+Ext = {
+    /**
+     * The version of the framework
+     * @type String
+     */
+    version : '3.0'
+};
+
+/**
+ * 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){
+    // no "this" reference for friendly out of scope calls
+    if(defaults){
+        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,
+        toString = Object.prototype.toString,
+        //assume it's not null and not an array
+        isIterable = function(v){
+            //check for array or arguments
+            if(Ext.isArray(v) || v.callee){
+                return true;
+            }
+            //check for node list type
+            if(/NodeList|HTMLCollection/.test(toString.call(v))){
+                return true;
+            }
+            //NodeList has an item and length property
+            //IXMLDOMNodeList has nextNode method, needs to be checked first.
+            return ((v.nextNode || v.item) && Ext.isNumber(v.length));
+        },
+        ua = navigator.userAgent.toLowerCase(),
+        check = function(r){
+            return r.test(ua);
+        },
+        DOC = document,
+        isStrict = DOC.compatMode == "CSS1Compat",
+        isOpera = check(/opera/),
+        isChrome = check(/chrome/),
+        isWebKit = check(/webkit/),
+        isSafari = !isChrome && check(/safari/),
+        isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
+        isSafari3 = isSafari && check(/version\/3/),
+        isSafari4 = isSafari && check(/version\/4/),
+        isIE = !isOpera && check(/msie/),
+        isIE7 = isIE && check(/msie 7/),
+        isIE8 = isIE && check(/msie 8/),
+        isIE6 = isIE && !isIE7 && !isIE8,
+        isGecko = !isWebKit && check(/gecko/),
+        isGecko2 = isGecko && check(/rv:1\.8/),
+        isGecko3 = isGecko && check(/rv:1\.9/),
+        isBorderBox = isIE && !isStrict,
+        isWindows = check(/windows|win32/),
+        isMac = check(/macintosh|mac os x/),
+        isAir = check(/adobeair/),
+        isLinux = check(/linux/),
+        isSecure = /^https/i.test(window.location.protocol);
+
+    // remove css image flicker
+    if(isIE6){
+        try{
+            DOC.execCommand("BackgroundImageCache", false, true);
+        }catch(e){}
+    }
+
+    Ext.apply(Ext, {
+        /**
+         * 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',
+        /**
+         * 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 if the {@link Ext.Fx} Class is available
+         * @type Boolean
+         * @property enableFx
+         */
+
+        /**
+         * 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 {@link #enableGarbageCollector} is true.
+         * @type Boolean
+         */
+        enableListenerCollection : false,
+
+        /**
+         * Indicates whether to use native browser parsing for JSON methods.
+         * This option is ignored if the browser does not support native JSON methods.
+         * <b>Note: Native JSON methods will not work with objects that have functions.
+         * Also, property names must be quoted, otherwise the data will not parse.</b> (Defaults to false)
+         * @type Boolean
+         */
+        USE_NATIVE_JSON : false,
+
+        /**
+         * 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){
+                for(var p in c){
+                    if(Ext.isEmpty(o[p])){
+                        o[p] = c[p];
+                    }
+                }
+            }
+            return o;
+        },
+
+        /**
+         * 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){
+            return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed);
+        },
+
+        /**
+         * 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(Ext.isObject(sp)){
+                    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.superclass = sbp.supr = (function(){
+                    return spp;
+                });
+                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;
+                Ext.apply(p, overrides);
+                if(Ext.isIE && overrides.toString != origclass.toString){
+                    p.toString = overrides.toString;
+                }
+            }
+        },
+
+        /**
+         * Creates namespaces to be used for scoping variables and classes so that they are not global.
+         * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+         * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+         * @param {String} namespace1
+         * @param {String} namespace2
+         * @param {String} etc
+         * @method namespace
+         */
+        namespace : function(){
+            var o, d;
+            Ext.each(arguments, function(v) {
+                d = v.split(".");
+                o = window[d[0]] = window[d[0]] || {};
+                Ext.each(d.slice(1), function(v2){
+                    o = o[v2] = o[v2] || {};
+                });
+            });
+            return o;
+        },
+
+        /**
+         * 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
+         * @param {String} pre (optional) A prefix to add to the url encoded string
+         * @return {String}
+         */
+        urlEncode: function(o, pre){
+            var undef, buf = [], key, e = encodeURIComponent;
+
+            for(key in o){
+                undef = !Ext.isDefined(o[key]);
+                Ext.each(undef ? key : o[key], function(val, i){
+                    buf.push("&", e(key), "=", (val != key || !undef) ? e(val) : "");
+                });
+            }
+            if(!pre){
+                buf.shift();
+                pre = "";
+            }
+            return pre + buf.join('');
+        },
+
+        /**
+         * Takes an encoded URL and and converts it to an object. Example: <pre><code>
+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+</code></pre>
+         * @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){
+            var obj = {},
+                pairs = string.split('&'),
+                d = decodeURIComponent,
+                name,
+                value;
+            Ext.each(pairs, function(pair) {
+                pair = pair.split('=');
+                name = d(pair[0]);
+                value = d(pair[1]);
+                obj[name] = overwrite || !obj[name] ? value :
+                            [].concat(obj[name]).concat(value);
+            });
+            return obj;
+        },
+
+        /**
+         * Appends content to the query string of a URL, which handles logic for whether to place
+         * a question mark or ampersand.
+         * @param {String} url The url to append to.
+         * @@param {String} s The content to append to the url.
+         * @return (String) The appended string
+         */
+        urlAppend : function(url, s){
+            if(!Ext.isEmpty(s)){
+                return url + (url.indexOf('?') === -1 ? '?' : '&') + s;
+            }
+            return url;
+        },
+
+        /**
+         * Converts any iterable (numeric indices and a length property) into a true array
+         * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on.
+         * For strings, use this instead: "abc".match(/./g) => [a,b,c];
+         * @param {Iterable} the iterable object to be turned into a true Array.
+         * @return (Array) array
+         */
+        toArray : function(){
+            return isIE ?
+                function(a, i, j, res){
+                    res = [];
+                    Ext.each(a, function(v) {
+                        res.push(v);
+                    });
+                    return res.slice(i || 0, j || res.length);
+                } :
+                function(a, i, j){
+                    return Array.prototype.slice.call(a, i || 0, j || a.length);
+                }
+        }(),
+
+        /**
+         * 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(Ext.isEmpty(array, true)){
+                return;
+            }
+            if(!isIterable(array) || Ext.isPrimitive(array)){
+                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;
+                };
+            }
+        },
+
+        /**
+         * Iterates either the elements in an array, or each of the properties in an object.
+         * <b>Note</b>: If you are only iterating arrays, it is better to call {@link #each}.
+         * @param {Object/Array} object The object or array to be iterated
+         * @param {Function} fn The function to be called for each iteration.
+         * The iteration will stop if the supplied function returns false, or
+         * all array elements / object properties have been covered. The signature
+         * varies depending on the type of object being interated:
+         * <div class="mdetail-params"><ul>
+         * <li>Arrays : <tt>(Object item, Number index, Array allItems)</tt>
+         * <div class="sub-desc">
+         * When iterating an array, the supplied function is called with each item.</div></li>
+         * <li>Objects : <tt>(String key, Object value)</tt>
+         * <div class="sub-desc">
+         * When iterating an object, the supplied function is called with each key-value pair in
+         * the object.</div></li>
+         * </ul></div>
+         * @param {Object} scope The scope to call the supplied function with, defaults to
+         * the specified <tt>object</tt>
+         */
+        iterate : function(obj, fn, scope){
+            if(isIterable(obj)){
+                Ext.each(obj, fn, scope);
+                return;
+            }else if(Ext.isObject(obj)){
+                for(var prop in obj){
+                    if(obj.hasOwnProperty(prop)){
+                        if(fn.call(scope || obj, prop, obj[prop]) === false){
+                            return;
+                        };
+                    }
+                }
+            }
+        },
+
+        /**
+         * Return the dom node for the passed String (id), dom node, or Ext.Element.
+         * Here are some examples:
+         * <pre><code>
+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don&#39;t know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * </code></pre>
+         * <b>Note</b>: the dom node to be found actually needs to exist (be rendered, etc)
+         * when this method is called to be successful.
+         * @param {Mixed} el
+         * @return HTMLElement
+         */
+        getDom : function(el){
+            if(!el || !DOC){
+                return null;
+            }
+            return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el);
+        },
+
+        /**
+         * Returns the current document body as an {@link Ext.Element}.
+         * @return Ext.Element The document body
+         */
+        getBody : function(){
+            return Ext.get(DOC.body || DOC.documentElement);
+        },
+
+        /**
+         * 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 || DOC.createElement('div');
+                    d.appendChild(n);
+                    d.innerHTML = '';
+                }
+            }
+        }() : function(n){
+            if(n && n.parentNode && n.tagName != 'BODY'){
+                n.parentNode.removeChild(n);
+            }
+        },
+
+        /**
+         * <p>Returns true if the passed value is empty.</p>
+         * <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
+         * <li>null</li>
+         * <li>undefined</li>
+         * <li>an empty array</li>
+         * <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
+         * </ul></div>
+         * @param {Mixed} value The value to test
+         * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false)
+         * @return {Boolean}
+         */
+        isEmpty : function(v, allowBlank){
+            return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript array, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isArray : function(v){
+            return toString.apply(v) === '[object Array]';
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Object, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isObject : function(v){
+            return v && typeof v == "object";
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript 'primitive', a string, number or boolean.
+         * @param {Mixed} value The value to test
+         * @return {Boolean}
+         */
+        isPrimitive : function(v){
+            return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v);
+        },
+
+        /**
+         * Returns true if the passed object is a JavaScript Function, otherwise false.
+         * @param {Object} object The object to test
+         * @return {Boolean}
+         */
+        isFunction : function(v){
+            return toString.apply(v) === '[object Function]';
+        },
+
+        /**
+         * Returns true if the passed object is a number. Returns false for non-finite numbers.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isNumber: function(v){
+            return typeof v === 'number' && isFinite(v);
+        },
+
+        /**
+         * Returns true if the passed object is a string.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isString: function(v){
+            return typeof v === 'string';
+        },
+
+        /**
+         * Returns true if the passed object is a boolean.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isBoolean: function(v){
+            return typeof v === 'boolean';
+        },
+
+        /**
+         * Returns true if the passed object is not undefined.
+         * @param {Object} v The object to test
+         * @return {Boolean}
+         */
+        isDefined: function(v){
+            return typeof v !== 'undefined';
+        },
+
+        /**
+         * True if the detected browser is Opera.
+         * @type Boolean
+         */
+        isOpera : isOpera,
+        /**
+         * True if the detected browser uses WebKit.
+         * @type Boolean
+         */
+        isWebKit: isWebKit,
+        /**
+         * True if the detected browser is Chrome.
+         * @type Boolean
+         */
+        isChrome : isChrome,
+        /**
+         * 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 4.x.
+         * @type Boolean
+         */
+        isSafari4 : isSafari4,
+        /**
+         * True if the detected browser is Safari 2.x.
+         * @type Boolean
+         */
+        isSafari2 : isSafari2,
+        /**
+         * 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 : isIE6,
+        /**
+         * True if the detected browser is Internet Explorer 7.x.
+         * @type Boolean
+         */
+        isIE7 : isIE7,
+        /**
+         * True if the detected browser is Internet Explorer 8.x.
+         * @type Boolean
+         */
+        isIE8 : isIE8,
+        /**
+         * 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 : isGecko2,
+        /**
+         * 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
+    });
+
+    /**
+     * Creates namespaces to be used for scoping variables and classes so that they are not global.
+     * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+     * <pre><code>
+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+</code></pre>
+     * @param {String} namespace1
+     * @param {String} namespace2
+     * @param {String} etc
+     * @method namespace
+     */
+    Ext.ns = Ext.namespace;
+})();
+
+Ext.ns("Ext", "Ext.util", "Ext.lib", "Ext.data");
+
+
+/**
+ * @class Function
+ * These functions are available on every Function object (any JavaScript function).
+ */
+Ext.apply(Function.prototype, {
+     /**
+     * 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){
+        var method = this;
+        return !Ext.isFunction(fcn) ?
+                this :
+                function() {
+                    var me = this,
+                        args = arguments;
+                    fcn.target = me;
+                    fcn.method = method;
+                    return (fcn.apply(scope || me || window, args) !== false) ?
+                            method.apply(me || window, args) :
+                            null;
+                };
+    },
+
+     /**
+     * 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,
+            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 (Ext.isNumber(appendArgs)){
+                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 less than or equal to 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 > 0){
+            return setTimeout(fn, millis);
+        }
+        fn();
+        return 0;
+    }
+});
+
+/**
+ * @class String
+ * These functions are available on every String object.
+ */
+Ext.applyIf(String, {
+    /**
+     * 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 = Ext.toArray(arguments, 1);
+        return format.replace(/\{(\d+)\}/g, function(m, i){
+            return args[i];
+        });
+    }
+});
+
+/**
+ * @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;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Fx.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Fx.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Fx.js	(revision 625)
@@ -0,0 +1,1115 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+    // contants
+    var NULL = null,
+        UNDEFINED = undefined,
+        TRUE = true,
+        FALSE = false,
+        SETX = "setX",
+        SETY = "setY",
+        SETXY = "setXY",
+        LEFT = "left",
+        BOTTOM = "bottom",
+        TOP = "top",
+        RIGHT = "right",
+        HEIGHT = "height",
+        WIDTH = "width",
+        POINTS = "points",
+        HIDDEN = "hidden",
+        ABSOLUTE = "absolute",
+        VISIBLE = "visible",
+        MOTION = "motion",
+        POSITION = "position",
+        EASEOUT = "easeOut",
+        /*
+         * Use a light flyweight here since we are using so many callbacks and are always assured a DOM element
+         */
+        flyEl = new Ext.Element.Flyweight(),
+        queues = {},
+        getObject = function(o){
+            return o || {};
+        },
+        fly = function(dom){
+            flyEl.dom = dom;
+            flyEl.id = Ext.id(dom);
+            return flyEl;
+        },
+        /*
+         * Queueing now stored outside of the element due to closure issues
+         */
+        getQueue = function(id){
+            if(!queues[id]){
+                queues[id] = [];
+            }
+            return queues[id];
+        },
+        setQueue = function(id, value){
+            queues[id] = value;
+        };
+        
+//Notifies Element that fx methods are available
+Ext.enableFx = TRUE;
+
+/**
+ * @class Ext.Fx
+ * <p>A class to provide basic animation and visual effects support.  <b>Note:</b> This class is automatically applied
+ * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}.
+ * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx <b>must</b> be
+ * {@link Ext#enableFx included} in order for the Element effects to work.</p><br/>
+ * 
+ * <p><b><u>Method Chaining</u></b></p>
+ * <p>It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that
+ * they return the Element object itself as the method return value, it is not always possible to mix the two in a single
+ * method chain.  The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced.
+ * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately.  For this reason,
+ * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the
+ * expected results and should be done with care.  Also see <tt>{@link #callback}</tt>.</p><br/>
+ *
+ * <p><b><u>Anchor Options for Motion Effects</u></b></p>
+ * <p>Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element
+ * that will serve as either the start or end point of the animation.  Following are all of the supported anchor positions:</p>
+<pre>
+Value  Description
+-----  -----------------------------
+tl     The top left corner
+t      The center of the top edge
+tr     The top right corner
+l      The center of the left edge
+r      The center of the right edge
+bl     The bottom left corner
+b      The center of the bottom edge
+br     The bottom right corner
+</pre>
+ * <b>Note</b>: some Fx methods accept specific custom config parameters.  The options shown in the Config Options
+ * section below are common options that can be passed to any Fx method unless otherwise noted.</b>
+ * 
+ * @cfg {Function} callback A function called when the effect is finished.  Note that effects are queued internally by the
+ * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together
+ * and called in sequence (see note for <b><u>Method Chaining</u></b> above), for example:<pre><code>
+ * el.slideIn().highlight();
+ * </code></pre>
+ * The callback is intended for any additional code that should run once a particular effect has completed. The Element
+ * being operated upon is passed as the first parameter.
+ * 
+ * @cfg {Object} scope The scope of the <tt>{@link #callback}</tt> function
+ * 
+ * @cfg {String} easing A valid Ext.lib.Easing value for the effect:</p><div class="mdetail-params"><ul>
+ * <li><b><tt>backBoth</tt></b></li>
+ * <li><b><tt>backIn</tt></b></li>
+ * <li><b><tt>backOut</tt></b></li>
+ * <li><b><tt>bounceBoth</tt></b></li>
+ * <li><b><tt>bounceIn</tt></b></li>
+ * <li><b><tt>bounceOut</tt></b></li>
+ * <li><b><tt>easeBoth</tt></b></li>
+ * <li><b><tt>easeBothStrong</tt></b></li>
+ * <li><b><tt>easeIn</tt></b></li>
+ * <li><b><tt>easeInStrong</tt></b></li>
+ * <li><b><tt>easeNone</tt></b></li>
+ * <li><b><tt>easeOut</tt></b></li>
+ * <li><b><tt>easeOutStrong</tt></b></li>
+ * <li><b><tt>elasticBoth</tt></b></li>
+ * <li><b><tt>elasticIn</tt></b></li>
+ * <li><b><tt>elasticOut</tt></b></li>
+ * </ul></div>
+ *
+ * @cfg {String} afterCls A css class to apply after the effect
+ * @cfg {Number} duration The length of time (in seconds) that the effect should last
+ * 
+ * @cfg {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between
+ * <tt>0</tt> and <tt>1</tt> inclusive to configure the ending opacity value.
+ *  
+ * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes
+ * @cfg {Boolean} useDisplay Whether to use the <i>display</i> CSS property instead of <i>visibility</i> when hiding Elements (only applies to 
+ * effects that end with the element being visually hidden, ignored otherwise)
+ * @cfg {String/Object/Function} afterStyle A style specification string, e.g. <tt>"width:100px"</tt>, or an object
+ * in the form <tt>{width:"100px"}</tt>, or a function which returns such a specification that will be applied to the
+ * Element after the effect finishes.
+ * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs
+ * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence
+ * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects)
+ */
+Ext.Fx = {
+    
+    // private - calls the function taking arguments from the argHash based on the key.  Returns the return value of the function.
+    //           this is useful for replacing switch statements (for example).
+    switchStatements : function(key, fn, argHash){
+        return fn.apply(this, argHash[key]);
+    },
+    
+    /**
+     * Slides the element into view.  An anchor point can be optionally passed to set the point of
+     * origin for the slide effect.  This function automatically handles wrapping the element with
+     * a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element in from the top
+el.slideIn();
+
+// custom: slide the element in from the right with a 2-second duration
+el.slideIn('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideIn('t', {
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideIn : function(anchor, o){ 
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy,
+            r,
+            b,              
+            wrap,               
+            after,
+            st,
+            args, 
+            pt,
+            bw,
+            bh;
+            
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){            
+            xy = fly(dom).getXY();
+            // fix display to visibility
+            fly(dom).fixDisplay();            
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore();      
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+            
+            // fixed size for slide
+            fly(dom).setWidth(b.width).setHeight(b.height);            
+            
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, HIDDEN);
+            
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            
+            // clear out temp styles after slide and unwrap
+            function after(){
+                 fly(dom).fxUnwrap(wrap, r.pos, o);
+                 st.width = r.width;
+                 st.height = r.height;
+                 fly(dom).afterFx(o);
+            }
+            
+            // time to calculate the positions        
+            pt = {to: [b.x, b.y]}; 
+            bw = {to: b.width};
+            bh = {to: b.height};
+                
+            function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){                    
+                var ret = {};
+                fly(wrap).setWidth(ww).setHeight(wh);
+                if(fly(wrap)[sXY]){
+                    fly(wrap)[sXY](sXYval);                  
+                }
+                style[s1] = style[s2] = "0";                    
+                if(w){
+                    ret.width = w
+                };
+                if(h){
+                    ret.height = h;
+                }
+                if(p){
+                    ret.points = p;
+                }
+                return ret;
+            };
+
+            args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                    t  : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL],
+                    l  : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL],
+                    r  : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt],
+                    b  : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt],
+                    tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt],
+                    bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt],
+                    br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt],
+                    tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt]
+                });
+            
+            st.visibility = VISIBLE;
+            fly(wrap).show();
+
+            arguments.callee.anim = fly(wrap).fxanim(args,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+    
+    /**
+     * Slides the element out of view.  An anchor point can be optionally passed to set the end point
+     * for the slide effect.  When the effect is completed, the element will be hidden (visibility = 
+     * 'hidden') but block elements will still take up space in the document.  The element must be removed
+     * from the DOM using the 'remove' config option if desired.  This function automatically handles 
+     * wrapping the element with a fixed-size container if needed.  See the Fx class overview for valid anchor point options.
+     * Usage:
+     *<pre><code>
+// default: slide the element out to the top
+el.slideOut();
+
+// custom: slide the element out to the right with a 2-second duration
+el.slideOut('r', { duration: 2 });
+
+// common config options shown with default values
+el.slideOut('t', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    slideOut : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            xy = me.getXY(),
+            wrap,
+            r,
+            b,
+            a,
+            zero = {to: 0}; 
+                    
+        anchor = anchor || "t";
+
+        me.queueFx(o, function(){
+            
+            // restore values after effect
+            r = fly(dom).getFxRestore(); 
+            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
+            b.right = b.x + b.width;
+            b.bottom = b.y + b.height;
+                
+            // fixed size for slide   
+            fly(dom).setWidth(b.width).setHeight(b.height);
+
+            // wrap if needed
+            wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
+                
+            st.visibility = VISIBLE;
+            st.position = ABSOLUTE;
+            fly(wrap).setWidth(b.width).setHeight(b.height);            
+
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                
+                fly(dom).fxUnwrap(wrap, r.pos, o);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }            
+            
+            function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){                    
+                var ret = {};
+                
+                style[s1] = style[s2] = "0";
+                ret[p1] = v1;               
+                if(p2){
+                    ret[p2] = v2;               
+                }
+                if(p3){
+                    ret[p3] = v3;
+                }
+                
+                return ret;
+            };
+            
+            a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
+                t  : [st, LEFT, BOTTOM, HEIGHT, zero],
+                l  : [st, RIGHT, TOP, WIDTH, zero],
+                r  : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}],
+                b  : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero],
+                bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
+                br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
+                tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
+            });
+            
+            arguments.callee.anim = fly(wrap).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, 
+                after);
+        });
+        return me;
+    },
+
+    /**
+     * Fades the element out while slowly expanding it in all directions.  When the effect is completed, the 
+     * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. 
+     * The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.puff();
+
+// common config options shown with default values
+el.puff({
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    puff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            width,
+            height,
+            r;
+
+        me.queueFx(o, function(){
+            width = fly(dom).getWidth();
+            height = fly(dom).getHeight();
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();                   
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                  
+                fly(dom).clearOpacity();  
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                st.fontSize = '';
+                fly(dom).afterFx(o);
+            }   
+
+            arguments.callee.anim = fly(dom).fxanim({
+                    width : {to : fly(dom).adjustWidth(width * 2)},
+                    height : {to : fly(dom).adjustHeight(height * 2)},
+                    points : {by : [-width * .5, -height * .5]},
+                    opacity : {to : 0},
+                    fontSize: {to : 200, unit: "%"}
+                },
+                o,
+                MOTION,
+                .5,
+                EASEOUT,
+                 after);
+        });
+        return me;
+    },
+
+    /**
+     * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
+     * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still 
+     * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired.
+     * Usage:
+     *<pre><code>
+// default
+el.switchOff();
+
+// all config options shown with default values
+el.switchOff({
+    easing: 'easeIn',
+    duration: .3,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    switchOff : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            r;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).clip();
+
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+                
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();  
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;   
+                fly(dom).afterFx(o);
+            };
+
+            fly(dom).fxanim({opacity : {to : 0.3}}, 
+                NULL, 
+                NULL, 
+                .1, 
+                NULL, 
+                function(){                                 
+                    fly(dom).clearOpacity();
+                        (function(){                            
+                            fly(dom).fxanim({
+                                height : {to : 1},
+                                points : {by : [0, fly(dom).getHeight() * .5]}
+                            }, 
+                            o, 
+                            MOTION, 
+                            0.3, 
+                            'easeIn', 
+                            after);
+                        }).defer(100);
+                });
+        });
+        return me;
+    },
+
+    /**
+     * Highlights the Element by setting a color (applies to the background-color by default, but can be
+     * changed using the "attr" config option) and then fading back to the original color. If no original
+     * color is available, you should provide the "endColor" config option which will be cleared after the animation.
+     * Usage:
+<pre><code>
+// default: highlight background to yellow
+el.highlight();
+
+// custom: highlight foreground text to blue for 2 seconds
+el.highlight("0000ff", { attr: 'color', duration: 2 });
+
+// common config options shown with default values
+el.highlight("ffff9c", {
+    attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
+    endColor: (current color) or "ffffff",
+    easing: 'easeIn',
+    duration: 1
+});
+</code></pre>
+     * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */ 
+    highlight : function(color, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            attr = o.attr || "backgroundColor",
+            a = {},
+            restore;
+
+        me.queueFx(o, function(){
+            fly(dom).clearOpacity();
+            fly(dom).show();
+
+            function after(){
+                dom.style[attr] = restore;
+                fly(dom).afterFx(o);
+            }            
+            restore = dom.style[attr];
+            a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"};
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                'color',
+                1,
+                'easeIn', 
+                after);
+        });
+        return me;
+    },
+
+   /**
+    * Shows a ripple of exploding, attenuating borders to draw attention to an Element.
+    * Usage:
+<pre><code>
+// default: a single light blue ripple
+el.frame();
+
+// custom: 3 red ripples lasting 3 seconds total
+el.frame("ff0000", 3, { duration: 3 });
+
+// common config options shown with default values
+el.frame("C3DAF9", 1, {
+    duration: 1 //duration of each individual ripple.
+    // Note: Easing is not configurable and will be ignored if included
+});
+</code></pre>
+    * @param {String} color (optional) The color of the border.  Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').
+    * @param {Number} count (optional) The number of ripples to display (defaults to 1)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    frame : function(color, count, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            proxy,
+            active;
+
+        me.queueFx(o, function(){
+            color = color || "#C3DAF9"
+            if(color.length == 6){
+                color = "#" + color;
+            }            
+            count = count || 1;
+            fly(dom).show();
+
+            var xy = fly(dom).getXY(),
+                b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight},
+                queue = function(){
+                    proxy = fly(document.body || document.documentElement).createChild({
+                        style:{
+                            visbility: HIDDEN,
+                            position : ABSOLUTE,
+                            "z-index": 35000, // yee haw
+                            border : "0px solid " + color
+                        }
+                    });
+                    return proxy.queueFx({}, animFn);
+                };
+            
+            
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function() {
+                    count = 0;
+                    proxy.stopFx();
+                }
+            };
+            
+            function animFn(){
+                var scale = Ext.isBorderBox ? 2 : 1;
+                active = proxy.anim({
+                    top : {from : b.y, to : b.y - 20},
+                    left : {from : b.x, to : b.x - 20},
+                    borderWidth : {from : 0, to : 10},
+                    opacity : {from : 1, to : 0},
+                    height : {from : b.height, to : b.height + 20 * scale},
+                    width : {from : b.width, to : b.width + 20 * scale}
+                },{
+                    duration: o.duration || 1,
+                    callback: function() {
+                        proxy.remove();
+                        --count > 0 ? queue() : fly(dom).afterFx(o);
+                    }
+                });
+                arguments.callee.anim = {
+                    isAnimated: true,
+                    stop: function(){
+                        active.stop();
+                    }
+                };
+            };
+            queue();
+        });
+        return me;
+    },
+
+   /**
+    * Creates a pause before any subsequent queued effects begin.  If there are
+    * no effects queued after the pause it will have no effect.
+    * Usage:
+<pre><code>
+el.pause(1);
+</code></pre>
+    * @param {Number} seconds The length of time to pause (in seconds)
+    * @return {Ext.Element} The Element
+    */
+    pause : function(seconds){        
+        var dom = this.dom,
+            t;
+
+        this.queueFx({}, function(){
+            t = setTimeout(function(){
+                fly(dom).afterFx({});
+            }, seconds * 1000);
+            arguments.callee.anim = {
+                isAnimated: true,
+                stop: function(){
+                    clearTimeout(t);
+                    fly(dom).afterFx({});
+                }
+            };
+        });
+        return this;
+    },
+
+   /**
+    * Fade an element in (from transparent to opaque).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.
+    * Usage:
+<pre><code>
+// default: fade in from opacity 0 to 100%
+el.fadeIn();
+
+// custom: fade in from opacity 0 to 75% over 2 seconds
+el.fadeIn({ endOpacity: .75, duration: 2});
+
+// common config options shown with default values
+el.fadeIn({
+    endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeIn : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            to = o.endOpacity || 1;
+        
+        me.queueFx(o, function(){
+            fly(dom).setOpacity(0);
+            fly(dom).fixDisplay();
+            dom.style.visibility = VISIBLE;
+            arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}},
+                o, NULL, .5, EASEOUT, function(){
+                if(to == 1){
+                    fly(dom).clearOpacity();
+                }
+                fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Fade an element out (from opaque to transparent).  The ending opacity can be specified
+    * using the <tt>{@link #endOpacity}</tt> config option.  Note that IE may require
+    * <tt>{@link #useDisplay}:true</tt> in order to redisplay correctly.
+    * Usage:
+<pre><code>
+// default: fade out from the element's current opacity to 0
+el.fadeOut();
+
+// custom: fade out from the element's current opacity to 25% over 2 seconds
+el.fadeOut({ endOpacity: .25, duration: 2});
+
+// common config options shown with default values
+el.fadeOut({
+    endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    fadeOut : function(o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            style = dom.style,
+            to = o.endOpacity || 0;         
+        
+        me.queueFx(o, function(){  
+            arguments.callee.anim = fly(dom).fxanim({ 
+                opacity : {to : to}},
+                o, 
+                NULL, 
+                .5, 
+                EASEOUT, 
+                function(){
+                    if(to == 0){
+                        Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? 
+                            style.display = "none" :
+                            style.visibility = HIDDEN;
+                            
+                        fly(dom).clearOpacity();
+                    }
+                    fly(dom).afterFx(o);
+            });
+        });
+        return me;
+    },
+
+   /**
+    * Animates the transition of an element's dimensions from a starting height/width
+    * to an ending height/width.  This method is a convenience implementation of {@link shift}.
+    * Usage:
+<pre><code>
+// change height and width to 100x100 pixels
+el.scale(100, 100);
+
+// common config options shown with default values.  The height and width will default to
+// the element&#39;s existing values if passed as null.
+el.scale(
+    [element&#39;s width],
+    [element&#39;s height], {
+        easing: 'easeOut',
+        duration: .35
+    }
+);
+</code></pre>
+    * @param {Number} width  The new width (pass undefined to keep the original width)
+    * @param {Number} height  The new height (pass undefined to keep the original height)
+    * @param {Object} options (optional) Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    scale : function(w, h, o){
+        this.shift(Ext.apply({}, o, {
+            width: w,
+            height: h
+        }));
+        return this;
+    },
+
+   /**
+    * Animates the transition of any combination of an element's dimensions, xy position and/or opacity.
+    * Any of these properties not specified in the config object will not be changed.  This effect 
+    * requires that at least one new dimension, position or opacity setting must be passed in on
+    * the config object in order for the function to have any effect.
+    * Usage:
+<pre><code>
+// slide the element horizontally to x position 200 while changing the height and opacity
+el.shift({ x: 200, height: 50, opacity: .8 });
+
+// common config options shown with default values.
+el.shift({
+    width: [element&#39;s width],
+    height: [element&#39;s height],
+    x: [element&#39;s x position],
+    y: [element&#39;s y position],
+    opacity: [element&#39;s opacity],
+    easing: 'easeOut',
+    duration: .35
+});
+</code></pre>
+    * @param {Object} options  Object literal with any of the Fx config options
+    * @return {Ext.Element} The Element
+    */
+    shift : function(o){
+        o = getObject(o);
+        var dom = this.dom,
+            a = {};
+                
+        this.queueFx(o, function(){
+            for (var prop in o) {
+                if (o[prop] != UNDEFINED) {                                                 
+                    a[prop] = {to : o[prop]};                   
+                }
+            } 
+            
+            a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
+            a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;   
+            
+            if (a.x || a.y || a.xy) {
+                a.points = a.xy || 
+                           {to : [ a.x ? a.x.to : fly(dom).getX(),
+                                   a.y ? a.y.to : fly(dom).getY()]};                  
+            }
+
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o, 
+                MOTION, 
+                .35, 
+                EASEOUT, 
+                function(){
+                    fly(dom).afterFx(o);
+                });
+        });
+        return this;
+    },
+
+    /**
+     * Slides the element while fading it out of view.  An anchor point can be optionally passed to set the 
+     * ending point of the effect.
+     * Usage:
+     *<pre><code>
+// default: slide the element downward while fading out
+el.ghost();
+
+// custom: slide the element out to the right with a 2-second duration
+el.ghost('r', { duration: 2 });
+
+// common config options shown with default values
+el.ghost('b', {
+    easing: 'easeOut',
+    duration: .5,
+    remove: false,
+    useDisplay: false
+});
+</code></pre>
+     * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
+     * @param {Object} options (optional) Object literal with any of the Fx config options
+     * @return {Ext.Element} The Element
+     */
+    ghost : function(anchor, o){
+        o = getObject(o);
+        var me = this,
+            dom = me.dom,
+            st = dom.style,
+            a = {opacity: {to: 0}, points: {}},
+            pt = a.points,
+            r,
+            w,
+            h;
+            
+        anchor = anchor || "b";
+
+        me.queueFx(o, function(){
+            // restore values after effect
+            r = fly(dom).getFxRestore();
+            w = fly(dom).getWidth();
+            h = fly(dom).getHeight();
+            
+            function after(){
+                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();   
+                fly(dom).clearOpacity();
+                fly(dom).setPositioning(r.pos);
+                st.width = r.width;
+                st.height = r.height;
+                fly(dom).afterFx(o);
+            }
+                
+            pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, {
+               t  : [0, -h],
+               l  : [-w, 0],
+               r  : [w, 0],
+               b  : [0, h],
+               tl : [-w, -h],
+               bl : [-w, h],
+               br : [w, h],
+               tr : [w, -h] 
+            });
+                
+            arguments.callee.anim = fly(dom).fxanim(a,
+                o,
+                MOTION,
+                .5,
+                EASEOUT, after);
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after syncFx is called on the element are
+     * run concurrently.  This is the opposite of {@link #sequenceFx}.
+     * @return {Ext.Element} The Element
+     */
+    syncFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : TRUE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /**
+     * Ensures that all effects queued after sequenceFx is called on the element are
+     * run in sequence.  This is the opposite of {@link #syncFx}.
+     * @return {Ext.Element} The Element
+     */
+    sequenceFx : function(){
+        var me = this;
+        me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
+            block : FALSE,
+            concurrent : FALSE,
+            stopFx : FALSE
+        });
+        return me;
+    },
+
+    /* @private */
+    nextFx : function(){        
+        var ef = getQueue(this.dom.id)[0];
+        if(ef){
+            ef.call(this);
+        }
+    },
+
+    /**
+     * Returns true if the element has any effects actively running or queued, else returns false.
+     * @return {Boolean} True if element has active effects, else false
+     */
+    hasActiveFx : function(){
+        return getQueue(this.dom.id)[0];
+    },
+
+    /**
+     * Stops any running effects and clears the element's internal effects queue if it contains
+     * any additional effects that haven't started yet.
+     * @return {Ext.Element} The Element
+     */
+    stopFx : function(finish){
+        var me = this,
+            id = me.dom.id;
+        if(me.hasActiveFx()){
+            var cur = getQueue(id)[0];
+            if(cur && cur.anim){
+                if(cur.anim.isAnimated){
+                    setQueue(id, [cur]); //clear
+                    cur.anim.stop(finish !== undefined ? finish : TRUE);
+                }else{
+                    setQueue(id, []);
+                }
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    beforeFx : function(o){
+        if(this.hasActiveFx() && !o.concurrent){
+           if(o.stopFx){
+               this.stopFx();
+               return TRUE;
+           }
+           return FALSE;
+        }
+        return TRUE;
+    },
+
+    /**
+     * Returns true if the element is currently blocking so that no other effect can be queued
+     * until this effect is finished, else returns false if blocking is not set.  This is commonly
+     * used to ensure that an effect initiated by a user action runs to completion prior to the
+     * same effect being restarted (e.g., firing only one effect even if the user clicks several times).
+     * @return {Boolean} True if blocking, else false
+     */
+    hasFxBlock : function(){
+        var q = getQueue(this.dom.id);
+        return q && q[0] && q[0].block;
+    },
+
+    /* @private */
+    queueFx : function(o, fn){
+        var me = this;
+        if(!me.hasFxBlock()){
+            Ext.applyIf(o, me.fxDefaults);
+            if(!o.concurrent){
+                var run = me.beforeFx(o);
+                fn.block = o.block;
+                getQueue(me.dom.id).push(fn);
+                if(run){
+                    me.nextFx();
+                }
+            }else{
+                fn.call(me);
+            }
+        }
+        return me;
+    },
+
+    /* @private */
+    fxWrap : function(pos, o, vis){ 
+        var dom = this.dom,
+            wrap,
+            wrapXY;
+        if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){            
+            if(o.fixPosition){
+                wrapXY = fly(dom).getXY();
+            }
+            var div = document.createElement("div");
+            div.style.visibility = vis;
+            wrap = dom.parentNode.insertBefore(div, dom);
+            fly(wrap).setPositioning(pos);
+            if(fly(wrap).isStyle(POSITION, "static")){
+                fly(wrap).position("relative");
+            }
+            fly(dom).clearPositioning('auto');
+            fly(wrap).clip();
+            wrap.appendChild(dom);
+            if(wrapXY){
+                fly(wrap).setXY(wrapXY);
+            }
+        }
+        return wrap;
+    },
+
+    /* @private */
+    fxUnwrap : function(wrap, pos, o){      
+        var dom = this.dom;
+        fly(dom).clearPositioning();
+        fly(dom).setPositioning(pos);
+        if(!o.wrap){
+            wrap.parentNode.insertBefore(dom, wrap);
+            fly(wrap).remove();
+        }
+    },
+
+    /* @private */
+    getFxRestore : function(){
+        var st = this.dom.style;
+        return {pos: this.getPositioning(), width: st.width, height : st.height};
+    },
+
+    /* @private */
+    afterFx : function(o){
+        var dom = this.dom,
+            id = dom.id,
+            notConcurrent = !o.concurrent;
+        if(o.afterStyle){
+            fly(dom).setStyle(o.afterStyle);            
+        }
+        if(o.afterCls){
+            fly(dom).addClass(o.afterCls);
+        }
+        if(o.remove == TRUE){
+            fly(dom).remove();
+        }
+        if(notConcurrent){
+            getQueue(id).shift();
+        }
+        if(o.callback){
+            o.callback.call(o.scope, fly(dom));
+        }
+        if(notConcurrent){
+            fly(dom).nextFx();
+        }
+    },
+
+    /* @private */
+    fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
+        animType = animType || 'run';
+        opt = opt || {};
+        var anim = Ext.lib.Anim[animType](
+                this.dom, 
+                args,
+                (opt.duration || defaultDur) || .35,
+                (opt.easing || defaultEase) || EASEOUT,
+                cb,            
+                this
+            );
+        opt.anim = anim;
+        return anim;
+    }
+};
+
+// backwards compat
+Ext.Fx.resize = Ext.Fx.scale;
+
+//When included, Ext.Fx is automatically applied to Element so that all basic
+//effects are available directly via the Element API
+Ext.Element.addMethods(Ext.Fx);
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Template.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Template.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/core/core/Template.js	(revision 625)
@@ -0,0 +1,185 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Template
+ * Represents an HTML fragment template. Templates can be precompiled for greater performance.
+ * For a list of available format functions, see {@link Ext.util.Format}.<br />
+ * Usage:
+<pre><code>
+var t = new Ext.Template(
+    '&lt;div name="{id}"&gt;',
+        '&lt;span class="{cls}"&gt;{name:trim} {value:ellipsis(10)}&lt;/span&gt;',
+    '&lt;/div&gt;'
+);
+t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
+</code></pre>
+ * @constructor
+ * @param {String/Array} html The HTML fragment or an array of fragments to join("") or multiple arguments to join("")
+ */
+Ext.Template = function(html){
+    var me = this,
+    	a = arguments,
+    	buf = [];
+
+    if (Ext.isArray(html)) {
+        html = html.join("");
+    } else if (a.length > 1) {
+	    Ext.each(a, function(v) {
+            if (Ext.isObject(v)) {
+                Ext.apply(me, v);
+            } else {
+                buf.push(v);
+            }
+        });
+        html = buf.join('');
+    }
+
+    /**@private*/
+    me.html = html;
+    if (me.compiled) {
+        me.compile();
+    }
+};
+Ext.Template.prototype = {
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+		var me = this;
+
+        return me.compiled ?
+        		me.compiled(values) :
+				me.html.replace(me.re, function(m, name){
+		        	return values[name] !== undefined ? values[name] : "";
+		        });
+	},
+
+    /**
+     * Sets the HTML used as the template and optionally compiles it.
+     * @param {String} html
+     * @param {Boolean} compile (optional) True to compile the template (defaults to undefined)
+     * @return {Ext.Template} this
+     */
+    set : function(html, compile){
+	    var me = this;
+        me.html = html;
+        me.compiled = null;
+        return compile ? me.compile() : me;
+    },
+
+    /**
+    * The regular expression used to match template variables
+    * @type RegExp
+    * @property
+    */
+    re : /\{([\w-]+)\}/g,
+
+    /**
+     * Compiles the template into an internal function, eliminating the RegEx overhead.
+     * @return {Ext.Template} this
+     */
+    compile : function(){
+        var me = this,
+        	sep = Ext.isGecko ? "+" : ",";
+
+        function fn(m, name){                        
+	        name = "values['" + name + "']";
+	        return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'";
+        }
+                
+        eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") +
+             me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
+             (Ext.isGecko ?  "';};" : "'].join('');};"));
+        return me;
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) as the first child of el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertFirst: function(el, values, returnElement){
+        return this.doInsert('afterBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) before el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertBefore: function(el, values, returnElement){
+        return this.doInsert('beforeBegin', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and inserts the new node(s) after el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    insertAfter : function(el, values, returnElement){
+        return this.doInsert('afterEnd', el, values, returnElement);
+    },
+
+    /**
+     * Applies the supplied values to the template and appends the new node(s) to el.
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    append : function(el, values, returnElement){
+        return this.doInsert('beforeEnd', el, values, returnElement);
+    },
+
+    doInsert : function(where, el, values, returnEl){
+        el = Ext.getDom(el);
+        var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values));
+        return returnEl ? Ext.get(newNode, true) : newNode;
+    },
+
+    /**
+     * Applies the supplied values to the template and overwrites the content of el with the new node(s).
+     * @param {Mixed} el The context element
+     * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
+     * @return {HTMLElement/Ext.Element} The new node or Element
+     */
+    overwrite : function(el, values, returnElement){
+        el = Ext.getDom(el);
+        el.innerHTML = this.applyTemplate(values);
+        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
+    }
+};
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.Template
+ * @method apply
+ */
+Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @param {Object} config A configuration object
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.Template.from = function(el, config){
+    el = Ext.getDom(el);
+    return new Ext.Template(el.value || el.innerHTML, config || '');
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/Api.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/Api.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/Api.js	(revision 625)
@@ -0,0 +1,210 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Api
+ * @extends Object
+ * Ext.data.Api is a singleton designed to manage the data API including methods
+ * for validating a developer's DataProxy API.  Defines variables for CRUD actions
+ * create, read, update and destroy in addition to a mapping of RESTful HTTP methods
+ * GET, POST, PUT and DELETE to CRUD actions.
+ * @singleton
+ */
+Ext.data.Api = (function() {
+
+    // private validActions.  validActions is essentially an inverted hash of Ext.data.Api.actions, where value becomes the key.
+    // Some methods in this singleton (e.g.: getActions, getVerb) will loop through actions with the code <code>for (var verb in this.actions)</code>
+    // For efficiency, some methods will first check this hash for a match.  Those methods which do acces validActions will cache their result here.
+    // We cannot pre-define this hash since the developer may over-ride the actions at runtime.
+    var validActions = {};
+
+    return {
+        /**
+         * Defined actions corresponding to remote actions:
+         * <pre><code>
+actions: {
+    create  : 'create',  // Text representing the remote-action to create records on server.
+    read    : 'read',    // Text representing the remote-action to read/load data from server.
+    update  : 'update',  // Text representing the remote-action to update records on server.
+    destroy : 'destroy'  // Text representing the remote-action to destroy records on server.
+}
+         * </code></pre>
+         * @property actions
+         * @type Object
+         */
+        actions : {
+            create  : 'create',
+            read    : 'read',
+            update  : 'update',
+            destroy : 'destroy'
+        },
+
+        /**
+         * Defined {CRUD action}:{HTTP method} pairs to associate HTTP methods with the
+         * corresponding actions for {@link Ext.data.DataProxy#restful RESTful proxies}.
+         * Defaults to:
+         * <pre><code>
+restActions : {
+    create  : 'POST',
+    read    : 'GET',
+    update  : 'PUT',
+    destroy : 'DELETE'
+},
+         * </code></pre>
+         */
+        restActions : {
+            create  : 'POST',
+            read    : 'GET',
+            update  : 'PUT',
+            destroy : 'DELETE'
+        },
+
+        /**
+         * Returns true if supplied action-name is a valid API action defined in <code>{@link #actions}</code> constants
+         * @param {String} action
+         * @param {String[]}(Optional) List of available CRUD actions.  Pass in list when executing multiple times for efficiency.
+         * @return {Boolean}
+         */
+        isAction : function(action) {
+            return (Ext.data.Api.actions[action]) ? true : false;
+        },
+
+        /**
+         * Returns the actual CRUD action KEY "create", "read", "update" or "destroy" from the supplied action-name.  This method is used internally and shouldn't generally
+         * need to be used directly.  The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true.  A developer can override this naming
+         * convention if desired.  However, the framework internally calls methods based upon the KEY so a way of retreiving the the words "create", "read", "update" and "destroy" is
+         * required.  This method will cache discovered KEYS into the private validActions hash.
+         * @param {String} name The runtime name of the action.
+         * @return {String||null} returns the action-key, or verb of the user-action or null if invalid.
+         * @nodoc
+         */
+        getVerb : function(name) {
+            if (validActions[name]) {
+                return validActions[name];  // <-- found in cache.  return immediately.
+            }
+            for (var verb in this.actions) {
+                if (this.actions[verb] === name) {
+                    validActions[name] = verb;
+                    break;
+                }
+            }
+            return (validActions[name] !== undefined) ? validActions[name] : null;
+        },
+
+        /**
+         * Returns true if the supplied API is valid; that is, check that all keys match defined actions
+         * otherwise returns an array of mistakes.
+         * @return {String[]||true}
+         */
+        isValid : function(api){
+            var invalid = [];
+            var crud = this.actions; // <-- cache a copy of the actions.
+            for (var action in api) {
+                if (!(action in crud)) {
+                    invalid.push(action);
+                }
+            }
+            return (!invalid.length) ? true : invalid;
+        },
+
+        /**
+         * Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions
+         * point to the same url.  The question is important for deciding whether to insert the "xaction" HTTP parameter within an
+         * Ajax request.  This method is used internally and shouldn't generally need to be called directly.
+         * @param {Ext.data.DataProxy} proxy
+         * @param {String} verb
+         * @return {Boolean}
+         */
+        hasUniqueUrl : function(proxy, verb) {
+            var url = (proxy.api[verb]) ? proxy.api[verb].url : null;
+            var unique = true;
+            for (var action in proxy.api) {
+                if ((unique = (action === verb) ? true : (proxy.api[action].url != url) ? true : false) === false) {
+                    break;
+                }
+            }
+            return unique;
+        },
+
+        /**
+         * This method is used internally by <tt>{@link Ext.data.DataProxy DataProxy}</tt> and should not generally need to be used directly.
+         * Each action of a DataProxy api can be initially defined as either a String or an Object.  When specified as an object,
+         * one can explicitly define the HTTP method (GET|POST) to use for each CRUD action.  This method will prepare the supplied API, setting
+         * each action to the Object form.  If your API-actions do not explicitly define the HTTP method, the "method" configuration-parameter will
+         * be used.  If the method configuration parameter is not specified, POST will be used.
+         <pre><code>
+new Ext.data.HttpProxy({
+    method: "POST",     // <-- default HTTP method when not specified.
+    api: {
+        create: 'create.php',
+        load: 'read.php',
+        save: 'save.php',
+        destroy: 'destroy.php'
+    }
+});
+
+// Alternatively, one can use the object-form to specify the API
+new Ext.data.HttpProxy({
+    api: {
+        load: {url: 'read.php', method: 'GET'},
+        create: 'create.php',
+        destroy: 'destroy.php',
+        save: 'update.php'
+    }
+});
+        </code></pre>
+         *
+         * @param {Ext.data.DataProxy} proxy
+         */
+        prepare : function(proxy) {
+            if (!proxy.api) {
+                proxy.api = {}; // <-- No api?  create a blank one.
+            }
+            for (var verb in this.actions) {
+                var action = this.actions[verb];
+                proxy.api[action] = proxy.api[action] || proxy.url || proxy.directFn;
+                if (typeof(proxy.api[action]) == 'string') {
+                    proxy.api[action] = {
+                        url: proxy.api[action]
+                    };
+                }
+            }
+        },
+
+        /**
+         * Prepares a supplied Proxy to be RESTful.  Sets the HTTP method for each api-action to be one of
+         * GET, POST, PUT, DELETE according to the defined {@link #restActions}.
+         * @param {Ext.data.DataProxy} proxy
+         */
+        restify : function(proxy) {
+            proxy.restful = true;
+            for (var verb in this.restActions) {
+                proxy.api[this.actions[verb]].method = this.restActions[verb];
+            }
+        }
+    };
+})();
+
+/**
+ * @class Ext.data.Api.Error
+ * @extends Ext.Error
+ * Error class for Ext.data.Api errors
+ */
+Ext.data.Api.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.Api'
+});
+Ext.apply(Ext.data.Api.Error.prototype, {
+    lang: {
+        'action-url-undefined': 'No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.',
+        'invalid': 'received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions',
+        'invalid-url': 'Invalid url.  Please review your proxy configuration.',
+        'execute': 'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayReader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayReader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayReader.js	(revision 625)
@@ -0,0 +1,102 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.ArrayReader
+ * @extends Ext.data.JsonReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an Array.
+ * Each element of that Array represents a row of data fields. The
+ * fields are pulled into a Record object using as a subscript, the <code>mapping</code> property
+ * of the field definition if it exists, or the field's ordinal position in the definition.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
+    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
+]);
+var myReader = new Ext.data.ArrayReader({
+    {@link #idIndex}: 0
+}, Employee);
+</code></pre>
+ * <p>This would consume an Array like this:</p>
+ * <pre><code>
+[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
+ * </code></pre>
+ * @constructor
+ * Create a new ArrayReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
+    /**
+     * @cfg {String} successProperty
+     * @hide
+     */
+    /**
+     * @cfg {Number} id (optional) The subscript within row Array that provides an ID for the Record.
+     * Deprecated. Use {@link #idIndex} instead.
+     */
+    /**
+     * @cfg {Number} idIndex (optional) The subscript within row Array that provides an ID for the Record.
+     */
+    /**
+     * Create a data block containing Ext.data.Records from an Array.
+     * @param {Object} o An Array of row objects which represents the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        this.arrayData = o;
+        var s = this.meta,
+            sid = s ? Ext.num(s.idIndex, s.id) : null,
+            recordType = this.recordType, 
+            fields = recordType.prototype.fields,
+            records = [],
+            v;
+
+        if(!this.getRoot) {
+            this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p) {return p;};
+            if(s.totalProperty) {
+                this.getTotal = this.getJsonAccessor(s.totalProperty);
+            }
+        }
+
+        var root = this.getRoot(o);
+
+        for(var i = 0; i < root.length; i++) {
+            var n = root[i];
+            var values = {};
+            var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null);
+            for(var j = 0, jlen = fields.length; j < jlen; j++) {
+                var f = fields.items[j];
+                var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j;
+                v = n[k] !== undefined ? n[k] : f.defaultValue;
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.json = n;
+            records[records.length] = record;
+        }
+
+        var totalRecords = records.length;
+
+        if(s.totalProperty) {
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)) {
+                totalRecords = v;
+            }
+        }
+
+        return {
+            records : records,
+            totalRecords : totalRecords
+        };
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayStore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayStore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/ArrayStore.js	(revision 625)
@@ -0,0 +1,70 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.ArrayStore
+ * @extends Ext.data.Store
+ * <p>Formerly known as "SimpleStore".</p>
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from Array data easier.
+ * An ArrayStore will be automatically configured with a {@link Ext.data.ArrayReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.ArrayStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    // reader configs
+    idIndex: 0,  
+    fields: [
+       'company',
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+var myData = [
+    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
+    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
+    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
+    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
+    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
+];
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.ArrayReader ArrayReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype arraystore
+ */
+Ext.data.ArrayStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.ArrayReader(config)
+        }));
+    },
+
+    loadData : function(data, append){
+        if(this.expandData === true){
+            var r = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                r[r.length] = [data[i]];
+            }
+            data = r;
+        }
+        Ext.data.ArrayStore.superclass.loadData.call(this, data, append);
+    }
+});
+Ext.reg('arraystore', Ext.data.ArrayStore);
+
+// backwards compat
+Ext.data.SimpleStore = Ext.data.ArrayStore;
+Ext.reg('simplestore', Ext.data.SimpleStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataField.js	(revision 625)
@@ -0,0 +1,249 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Field
+ * <p>This class encapsulates the field definition information specified in the field definition objects
+ * passed to {@link Ext.data.Record#create}.</p>
+ * <p>Developers do not need to instantiate this class. Instances are created by {@link Ext.data.Record.create}
+ * and cached in the {@link Ext.data.Record#fields fields} property of the created Record constructor's <b>prototype.</b></p>
+ */
+Ext.data.Field = function(config){
+    if(typeof config == "string"){
+        config = {name: config};
+    }
+    Ext.apply(this, config);
+
+    if(!this.type){
+        this.type = "auto";
+    }
+
+    var st = Ext.data.SortTypes;
+    // named sortTypes are supported, here we look them up
+    if(typeof this.sortType == "string"){
+        this.sortType = st[this.sortType];
+    }
+
+    // set default sortType for strings and dates
+    if(!this.sortType){
+        switch(this.type){
+            case "string":
+                this.sortType = st.asUCString;
+                break;
+            case "date":
+                this.sortType = st.asDate;
+                break;
+            default:
+                this.sortType = st.none;
+        }
+    }
+
+    // define once
+    var stripRe = /[\$,%]/g;
+
+    // prebuilt conversion function for this field, instead of
+    // switching every time we're reading a value
+    if(!this.convert){
+        var cv, dateFormat = this.dateFormat;
+        switch(this.type){
+            case "":
+            case "auto":
+            case undefined:
+                cv = function(v){ return v; };
+                break;
+            case "string":
+                cv = function(v){ return (v === undefined || v === null) ? '' : String(v); };
+                break;
+            case "int":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseInt(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "float":
+                cv = function(v){
+                    return v !== undefined && v !== null && v !== '' ?
+                           parseFloat(String(v).replace(stripRe, ""), 10) : '';
+                    };
+                break;
+            case "bool":
+            case "boolean":
+                cv = function(v){ return v === true || v === "true" || v == 1; };
+                break;
+            case "date":
+                cv = function(v){
+                    if(!v){
+                        return '';
+                    }
+                    if(Ext.isDate(v)){
+                        return v;
+                    }
+                    if(dateFormat){
+                        if(dateFormat == "timestamp"){
+                            return new Date(v*1000);
+                        }
+                        if(dateFormat == "time"){
+                            return new Date(parseInt(v, 10));
+                        }
+                        return Date.parseDate(v, dateFormat);
+                    }
+                    var parsed = Date.parse(v);
+                    return parsed ? new Date(parsed) : null;
+                };
+             break;
+
+        }
+        this.convert = cv;
+    }
+};
+
+Ext.data.Field.prototype = {
+    /**
+     * @cfg {String} name
+     * The name by which the field is referenced within the Record. This is referenced by, for example,
+     * the <tt>dataIndex</tt> property in column definition objects passed to {@link Ext.grid.ColumnModel}.
+     * <p>Note: In the simplest case, if no properties other than <tt>name</tt> are required, a field
+     * definition may consist of just a String for the field name.</p>
+     */
+    /**
+     * @cfg {String} type
+     * (Optional) The data type for conversion to displayable value if <tt>{@link Ext.data.Field#convert convert}</tt>
+     * has not been specified. Possible values are
+     * <div class="mdetail-params"><ul>
+     * <li>auto (Default, implies no conversion)</li>
+     * <li>string</li>
+     * <li>int</li>
+     * <li>float</li>
+     * <li>boolean</li>
+     * <li>date</li></ul></div>
+     */
+    /**
+     * @cfg {Function} convert
+     * (Optional) A function which converts the value provided by the Reader into an object that will be stored
+     * in the Record. It is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><b>v</b> : Mixed<div class="sub-desc">The data value as read by the Reader, if undefined will use
+     * the configured <tt>{@link Ext.data.Field#defaultValue defaultValue}</tt>.</div></li>
+     * <li><b>rec</b> : Mixed<div class="sub-desc">The data object containing the row as read by the Reader.
+     * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object
+     *  ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).</div></li>
+     * </ul></div>
+     * <pre><code>
+// example of convert function
+function fullName(v, record){
+    return record.name.last + ', ' + record.name.first;
+}
+
+function location(v, record){
+    return !record.city ? '' : (record.city + ', ' + record.state);
+}
+
+var Dude = Ext.data.Record.create([
+    {name: 'fullname',  convert: fullName},
+    {name: 'firstname', mapping: 'name.first'},
+    {name: 'lastname',  mapping: 'name.last'},
+    {name: 'city', defaultValue: 'homeless'},
+    'state',
+    {name: 'location',  convert: location}
+]);
+
+// create the data store
+var store = new Ext.data.Store({
+    reader: new Ext.data.JsonReader(
+        {
+            idProperty: 'key',
+            root: 'daRoot',  
+            totalProperty: 'total'
+        },
+        Dude  // recordType
+    )
+});
+
+var myData = [
+    { key: 1,
+      name: { first: 'Fat',    last:  'Albert' }
+      // notice no city, state provided in data object
+    },
+    { key: 2,
+      name: { first: 'Barney', last:  'Rubble' },
+      city: 'Bedrock', state: 'Stoneridge'
+    },
+    { key: 3,
+      name: { first: 'Cliff',  last:  'Claven' },
+      city: 'Boston',  state: 'MA'
+    }
+];
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} dateFormat
+     * (Optional) A format string for the {@link Date#parseDate Date.parseDate} function, or "timestamp" if the
+     * value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a
+     * javascript millisecond timestamp.
+     */
+    dateFormat: null,
+    /**
+     * @cfg {Mixed} defaultValue
+     * (Optional) The default value used <b>when a Record is being created by a {@link Ext.data.Reader Reader}</b>
+     * when the item referenced by the <tt>{@link Ext.data.Field#mapping mapping}</tt> does not exist in the data
+     * object (i.e. undefined). (defaults to "")
+     */
+    defaultValue: "",
+    /**
+     * @cfg {String/Number} mapping
+     * <p>(Optional) A path expression for use by the {@link Ext.data.DataReader} implementation
+     * that is creating the {@link Ext.data.Record Record} to extract the Field value from the data object.
+     * If the path expression is the same as the field name, the mapping may be omitted.</p>
+     * <p>The form of the mapping expression depends on the Reader being used.</p>
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.data.JsonReader}<div class="sub-desc">The mapping is a string containing the javascript
+     * expression to reference the data from an element of the data item's {@link Ext.data.JsonReader#root root} Array. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.XmlReader}<div class="sub-desc">The mapping is an {@link Ext.DomQuery} path to the data
+     * item relative to the DOM element that represents the {@link Ext.data.XmlReader#record record}. Defaults to the field name.</div></li>
+     * <li>{@link Ext.data.ArrayReader}<div class="sub-desc">The mapping is a number indicating the Array index
+     * of the field's value. Defaults to the field specification's Array position.</div></li>
+     * </ul></div>
+     * <p>If a more complex value extraction strategy is required, then configure the Field with a {@link #convert}
+     * function. This is passed the whole row object, and may interrogate it in whatever way is necessary in order to
+     * return the desired data.</p>
+     */
+    mapping: null,
+    /**
+     * @cfg {Function} sortType
+     * (Optional) A function which converts a Field's value to a comparable value in order to ensure
+     * correct sort ordering. Predefined functions are provided in {@link Ext.data.SortTypes}. A custom
+     * sort example:<pre><code>
+// current sort     after sort we want
+// +-+------+          +-+------+
+// |1|First |          |1|First |
+// |2|Last  |          |3|Second|
+// |3|Second|          |2|Last  |
+// +-+------+          +-+------+
+
+sortType: function(value) {
+   switch (value.toLowerCase()) // native toLowerCase():
+   {
+      case 'first': return 1;
+      case 'second': return 2;
+      default: return 3;
+   }
+}
+     * </code></pre>
+     */
+    sortType : null,
+    /**
+     * @cfg {String} sortDir
+     * (Optional) Initial direction to sort (<tt>"ASC"</tt> or  <tt>"DESC"</tt>).  Defaults to
+     * <tt>"ASC"</tt>.
+     */
+    sortDir : "ASC",
+	/**
+	 * @cfg {Boolean} allowBlank 
+	 * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to <tt>true</tt>.
+	 * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid}
+	 * to evaluate to <tt>false</tt>.
+	 */
+	allowBlank : true
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataProxy.js	(revision 625)
@@ -0,0 +1,427 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DataProxy
+ * @extends Ext.util.Observable
+ * <p>Abstract base class for implementations which provide retrieval of unformatted data objects.
+ * This class is intended to be extended and should not be created directly. For existing implementations,
+ * see {@link Ext.data.DirectProxy}, {@link Ext.data.HttpProxy}, {@link Ext.data.ScriptTagProxy} and
+ * {@link Ext.data.MemoryProxy}.</p>
+ * <p>DataProxy implementations are usually used in conjunction with an implementation of {@link Ext.data.DataReader}
+ * (of the appropriate type which knows how to parse the data object) to provide a block of
+ * {@link Ext.data.Records} to an {@link Ext.data.Store}.</p>
+ * <p>The parameter to a DataProxy constructor may be an {@link Ext.data.Connection} or can also be the
+ * config object to an {@link Ext.data.Connection}.</p>
+ * <p>Custom implementations must implement either the <code><b>doRequest</b></code> method (preferred) or the
+ * <code>load</code> method (deprecated). See
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#doRequest doRequest} or
+ * {@link Ext.data.HttpProxy}.{@link Ext.data.HttpProxy#load load} for additional details.</p>
+ * <p><b><u>Example 1</u></b></p>
+ * <pre><code>
+proxy: new Ext.data.ScriptTagProxy({
+    {@link Ext.data.Connection#url url}: 'http://extjs.com/forum/topics-remote.php'
+}),
+ * </code></pre>
+ * <p><b><u>Example 2</u></b></p>
+ * <pre><code>
+proxy : new Ext.data.HttpProxy({
+    {@link Ext.data.Connection#method method}: 'GET',
+    {@link Ext.data.HttpProxy#prettyUrls prettyUrls}: false,
+    {@link Ext.data.Connection#url url}: 'local/default.php', // see options parameter for {@link Ext.Ajax#request}
+    {@link #api}: {
+        // all actions except the following will use above url
+        create  : 'local/new.php',
+        update  : 'local/update.php'
+    }
+}),
+ * </code></pre>
+ */
+Ext.data.DataProxy = function(conn){
+    // make sure we have a config object here to support ux proxies.
+    // All proxies should now send config into superclass constructor.
+    conn = conn || {};
+
+    // This line caused a bug when people use custom Connection object having its own request method.
+    // http://extjs.com/forum/showthread.php?t=67194.  Have to set DataProxy config
+    //Ext.applyIf(this, conn);
+
+    this.api     = conn.api;
+    this.url     = conn.url;
+    this.restful = conn.restful;
+    this.listeners = conn.listeners;
+
+    // deprecated
+    this.prettyUrls = conn.prettyUrls;
+
+    /**
+     * @cfg {Object} api
+     * Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
+     * Defaults to:<pre><code>
+api: {
+    read    : undefined,
+    create  : undefined,
+    update  : undefined,
+    destroy : undefined
+}
+</code></pre>
+     * <p>If the specific URL for a given CRUD action is undefined, the CRUD action request
+     * will be directed to the configured <tt>{@link Ext.data.Connection#url url}</tt>.</p>
+     * <br><p><b>Note</b>: To modify the URL for an action dynamically the appropriate API
+     * property should be modified before the action is requested using the corresponding before
+     * action event.  For example to modify the URL associated with the load action:
+     * <pre><code>
+// modify the url for the action
+myStore.on({
+    beforeload: {
+        fn: function (store, options) {
+            // use <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> to change the URL for *just* this request.
+            store.proxy.setUrl('changed1.php');
+
+            // set optional second parameter to true to make this URL change
+            // permanent, applying this URL for all subsequent requests.
+            store.proxy.setUrl('changed1.php', true);
+
+            // manually set the <b>private</b> connection URL.
+            // <b>Warning:</b>  Accessing the private URL property should be avoided.
+            // Use the public method <tt>{@link Ext.data.HttpProxy#setUrl setUrl}</tt> instead, shown above.
+            // It should be noted that changing the URL like this will affect
+            // the URL for just this request.  Subsequent requests will use the
+            // API or URL defined in your initial proxy configuration.
+            store.proxy.conn.url = 'changed1.php';
+
+            // proxy URL will be superseded by API (only if proxy created to use ajax):
+            // It should be noted that proxy API changes are permanent and will
+            // be used for all subsequent requests.
+            store.proxy.api.load = 'changed2.php';
+
+            // However, altering the proxy API should be done using the public
+            // method <tt>{@link Ext.data.DataProxy#setApi setApi}</tt> instead.
+            store.proxy.setApi('load', 'changed2.php');
+
+            // Or set the entire API with a config-object.
+            // When using the config-object option, you must redefine the <b>entire</b>
+            // API -- not just a specific action of it.
+            store.proxy.setApi({
+                read    : 'changed_read.php',
+                create  : 'changed_create.php',
+                update  : 'changed_update.php',
+                destroy : 'changed_destroy.php'
+            });
+        }
+    }
+});
+     * </code></pre>
+     * </p>
+     */
+    // Prepare the proxy api.  Ensures all API-actions are defined with the Object-form.
+    try {
+        Ext.data.Api.prepare(this);
+    } catch (e) {
+        if (e instanceof Ext.data.Api.Error) {
+            e.toConsole();
+        }
+    }
+
+    this.addEvents(
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through a corresponding
+         * {@link Ext.data.Store}.{@link Ext.data.Store#exception exception},
+         * so any Store instance may observe this event.
+         * This event can be fired for one of two reasons:</p>
+         * <div class="mdetail-params"><ul>
+         * <li>remote-request <b>failed</b> : <div class="sub-desc">
+         * The server did not return status === 200.
+         * </div></li>
+         * <li>remote-request <b>succeeded</b> : <div class="sub-desc">
+         * The remote-request succeeded but the reader could not read the response.
+         * This means the server returned data, but the configured Reader threw an
+         * error while reading the response.  In this case, this event will be
+         * raised and the caught error will be passed along into this event.
+         * </div></li>
+         * </ul></div>
+         * <br><p>This event fires with two different contexts based upon the 2nd
+         * parameter <tt>type [remote|response]</tt>.  The first four parameters
+         * are identical between the two contexts -- only the final two parameters
+         * differ.</p>
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} type
+         * <p>The value of this parameter will be either <tt>'response'</tt> or <tt>'remote'</tt>.</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>An <b>invalid</b> response from the server was returned: either 404,
+         * 500 or the response meta-data does not match that defined in the DataReader
+         * (e.g.: root, idProperty, successProperty).</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>A <b>valid</b> response was returned from the server having
+         * successProperty === false.  This response might contain an error-message
+         * sent from the server.  For example, the user may have failed
+         * authentication/authorization or a database validation error occurred.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {String} action Name of the action (see {@link Ext.data.Api#actions}.
+         * @param {Object} options The options for the action that were specified in the {@link #request}.
+         * @param {Object} response
+         * <p>The value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : <div class="sub-desc">
+         * <p>The raw browser response object (e.g.: XMLHttpRequest)</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : <div class="sub-desc">
+         * <p>The decoded response object sent from the server.</p>
+         * </div></li>
+         * </ul></div>
+         * @param {Mixed} arg
+         * <p>The type and value of this parameter depends on the value of the <code>type</code> parameter:</p>
+         * <div class="mdetail-params"><ul>
+         * <li><b><tt>'response'</tt></b> : Error<div class="sub-desc">
+         * <p>The JavaScript Error object caught if the configured Reader could not read the data.
+         * If the remote request returns success===false, this parameter will be null.</p>
+         * </div></li>
+         * <li><b><tt>'remote'</tt></b> : Record/Record[]<div class="sub-desc">
+         * <p>This parameter will only exist if the <tt>action</tt> was a <b>write</b> action
+         * (Ext.data.Api.actions.create|update|destroy).</p>
+         * </div></li>
+         * </ul></div>
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request to retrieve a data object.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} params The params object passed to the {@link #request} function
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires before the load method's callback is called.
+         * @param {DataProxy} this The proxy for the request
+         * @param {Object} o The request transaction object
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b>.  The signature of the loadexception event
+         * varies depending on the proxy, use the catch-all {@link #exception} event instead.
+         * This event will fire in addition to the {@link #exception} event.</p>
+         * @param {misc} misc See {@link #exception}.
+         * @deprecated
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy
+         * @param {DataProxy} this The proxy for the request
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs The Record(s) to create|update|destroy.
+         * @param {Object} params The request <code>params</code> object.  Edit <code>params</code> to add parameters to the request.
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires before the request-callback is called
+         * @param {DataProxy} this The proxy that sent the request
+         * @param {String} action [Ext.data.Api.actions.create|upate|destroy]
+         * @param {Object} data The data object extracted from the server-response
+         * @param {Object} response The decoded response from server
+         * @param {Record/Record{}} rs The records from Store
+         * @param {Object} options The callback's <tt>options</tt> property as passed to the {@link #request} function
+         */
+        'write'
+    );
+    Ext.data.DataProxy.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>Defaults to <tt>false</tt>.  Set to <tt>true</tt> to operate in a RESTful manner.</p>
+     * <br><p> Note: this parameter will automatically be set to <tt>true</tt> if the
+     * {@link Ext.data.Store} it is plugged into is set to <code>restful: true</code>. If the
+     * Store is RESTful, there is no need to set this option on the proxy.</p>
+     * <br><p>RESTful implementations enable the serverside framework to automatically route
+     * actions sent to one url based upon the HTTP method, for example:
+     * <pre><code>
+store: new Ext.data.Store({
+    restful: true,
+    proxy: new Ext.data.HttpProxy({url:'/users'}); // all requests sent to /users
+    ...
+)}
+     * </code></pre>
+     * There is no <code>{@link #api}</code> specified in the configuration of the proxy,
+     * all requests will be marshalled to a single RESTful url (/users) so the serverside
+     * framework can inspect the HTTP Method and act accordingly:
+     * <pre>
+<u>Method</u>   <u>url</u>        <u>action</u>
+POST     /users     create
+GET      /users     read
+PUT      /users/23  update
+DESTROY  /users/23  delete
+     * </pre></p>
+     */
+    restful: false,
+
+    /**
+     * <p>Redefines the Proxy's API or a single action of an API. Can be called with two method signatures.</p>
+     * <p>If called with an object as the only parameter, the object should redefine the <b>entire</b> API, e.g.:</p><pre><code>
+proxy.setApi({
+    read    : '/users/read',
+    create  : '/users/create',
+    update  : '/users/update',
+    destroy : '/users/destroy'
+});
+</code></pre>
+     * <p>If called with two parameters, the first parameter should be a string specifying the API action to
+     * redefine and the second parameter should be the URL (or function if using DirectProxy) to call for that action, e.g.:</p><pre><code>
+proxy.setApi(Ext.data.Api.actions.read, '/users/new_load_url');
+</code></pre>
+     * @param {String/Object} api An API specification object, or the name of an action.
+     * @param {String/Function} url The URL (or function if using DirectProxy) to call for the action.
+     */
+    setApi : function() {
+        if (arguments.length == 1) {
+            var valid = Ext.data.Api.isValid(arguments[0]);
+            if (valid === true) {
+                this.api = arguments[0];
+            }
+            else {
+                throw new Ext.data.Api.Error('invalid', valid);
+            }
+        }
+        else if (arguments.length == 2) {
+            if (!Ext.data.Api.isAction(arguments[0])) {
+                throw new Ext.data.Api.Error('invalid', arguments[0]);
+            }
+            this.api[arguments[0]] = arguments[1];
+        }
+        Ext.data.Api.prepare(this);
+    },
+
+    /**
+     * Returns true if the specified action is defined as a unique action in the api-config.
+     * request.  If all API-actions are routed to unique urls, the xaction parameter is unecessary.  However, if no api is defined
+     * and all Proxy actions are routed to DataProxy#url, the server-side will require the xaction parameter to perform a switch to
+     * the corresponding code for CRUD action.
+     * @param {String [Ext.data.Api.CREATE|READ|UPDATE|DESTROY]} action
+     * @return {Boolean}
+     */
+    isApiAction : function(action) {
+        return (this.api[action]) ? true : false;
+    },
+
+    /**
+     * All proxy actions are executed through this method.  Automatically fires the "before" + action event
+     * @param {String} action Name of the action
+     * @param {Ext.data.Record/Ext.data.Record[]/null} rs Will be null when action is 'load'
+     * @param {Object} params
+     * @param {Ext.data.DataReader} reader
+     * @param {Function} callback
+     * @param {Object} scope Scope with which to call the callback (defaults to the Proxy object)
+     * @param {Object} options Any options specified for the action (e.g. see {@link Ext.data.Store#load}.
+     */
+    request : function(action, rs, params, reader, callback, scope, options) {
+        if (!this.api[action] && !this.load) {
+            throw new Ext.data.DataProxy.Error('action-undefined', action);
+        }
+        params = params || {};
+        if ((action === Ext.data.Api.actions.read) ? this.fireEvent("beforeload", this, params) : this.fireEvent("beforewrite", this, action, rs, params) !== false) {
+            this.doRequest.apply(this, arguments);
+        }
+        else {
+            callback.call(scope || this, null, options, false);
+        }
+    },
+
+
+    /**
+     * <b>Deprecated</b> load method using old method signature. See {@doRequest} for preferred method.
+     * @deprecated
+     * @param {Object} params
+     * @param {Object} reader
+     * @param {Object} callback
+     * @param {Object} scope
+     * @param {Object} arg
+     */
+    load : null,
+
+    /**
+     * @cfg {Function} doRequest Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest},
+     * {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}).
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        // default implementation of doRequest for backwards compatibility with 2.0 proxies.
+        // If we're executing here, the action is probably "load".
+        // Call with the pre-3.0 method signature.
+        this.load(params, reader, callback, scope, options);
+    },
+
+    /**
+     * buildUrl
+     * Sets the appropriate url based upon the action being executed.  If restful is true, and only a single record is being acted upon,
+     * url will be built Rails-style, as in "/controller/action/32".  restful will aply iff the supplied record is an
+     * instance of Ext.data.Record rather than an Array of them.
+     * @param {String} action The api action being executed [read|create|update|destroy]
+     * @param {Ext.data.Record/Array[Ext.data.Record]} The record or Array of Records being acted upon.
+     * @return {String} url
+     * @private
+     */
+    buildUrl : function(action, record) {
+        record = record || null;
+        var url = (this.api[action]) ? this.api[action].url : this.url;
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', action);
+        }
+
+        var format = null;
+        var m = url.match(/(.*)(\.\w+)$/);  // <-- look for urls with "provides" suffix, e.g.: /users.json, /users.xml, etc
+        if (m) {
+            format = m[2];
+            url = m[1];
+        }
+        // prettyUrls is deprectated in favor of restful-config
+        if ((this.prettyUrls === true || this.restful === true) && record instanceof Ext.data.Record && !record.phantom) {
+            url += '/' + record.id;
+        }
+        if (format) {   // <-- append the request format if exists (ie: /users/update/69[.json])
+            url += format;
+        }
+        return url;
+    },
+
+    /**
+     * Destroys the proxy by purging any event listeners and cancelling any active requests.
+     */
+    destroy: function(){
+        this.purgeListeners();
+    }
+});
+
+/**
+ * @class Ext.data.DataProxy.Error
+ * @extends Ext.Error
+ * DataProxy Error extension.
+ * constructor
+ * @param {String} name
+ * @param {Record/Array[Record]/Array}
+ */
+Ext.data.DataProxy.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataProxy'
+});
+Ext.apply(Ext.data.DataProxy.Error.prototype, {
+    lang: {
+        'action-undefined': "DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.",
+        'api-invalid': 'Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions.'
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataReader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataReader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataReader.js	(revision 625)
@@ -0,0 +1,160 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DataReader
+ * Abstract base class for reading structured data from a data source and converting
+ * it into an object containing {@link Ext.data.Record} objects and metadata for use
+ * by an {@link Ext.data.Store}.  This class is intended to be extended and should not
+ * be created directly. For existing implementations, see {@link Ext.data.ArrayReader},
+ * {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader}.
+ * @constructor Create a new DataReader
+ * @param {Object} meta Metadata configuration options (implementation-specific).
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created using {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.DataReader = function(meta, recordType){
+    /**
+     * This DataReader's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    this.meta = meta;
+    /**
+     * @cfg {Array/Object} fields
+     * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+     * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+     * constructor created from {@link Ext.data.Record#create}.</p>
+     */
+    this.recordType = Ext.isArray(recordType) ?
+        Ext.data.Record.create(recordType) : recordType;
+};
+
+Ext.data.DataReader.prototype = {
+
+    /**
+     * Abstract method, overridden in {@link Ext.data.JsonReader}
+     */
+    buildExtractors : Ext.emptyFn,
+
+    /**
+     * Used for un-phantoming a record after a successful database insert.  Sets the records pk along with new data from server.
+     * You <b>must</b> return at least the database pk using the idProperty defined in your DataReader configuration.  The incoming
+     * data from server will be merged with the data in the local record.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed.
+     * @param {Record/Record[]} record The phantom record to be realized.
+     * @param {Object/Object[]} data The new record data to apply.  Must include the primary-key from database defined in idProperty field.
+     */
+    realize: function(rs, data){
+        if (Ext.isArray(rs)) {
+            for (var i = rs.length - 1; i >= 0; i--) {
+                // recurse
+                if (Ext.isArray(data)) {
+                    this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole invalid data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.realize(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+            // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: Let exception-handler choose to commit or not rather than blindly rs.commit() here.
+                //rs.commit();
+                throw new Ext.data.DataReader.Error('realize', rs);
+            }
+            this.buildExtractors();
+            var values = this.extractValues(data, rs.fields.items, rs.fields.items.length);
+            rs.phantom = false; // <-- That's what it's all about
+            rs._phid = rs.id;  // <-- copy phantom-id -> _phid, so we can remap in Store#onCreateRecords
+            rs.id = data[this.meta.idProperty];
+            rs.data = values;
+            rs.commit();
+        }
+    },
+
+    /**
+     * Used for updating a non-phantom or "real" record's data with fresh data from server after remote-save.
+     * You <b>must</b> return a complete new record from the server.  If you don't, your local record's missing fields
+     * will be populated with the default values specified in your Ext.data.Record.create specification.  Without a defaultValue,
+     * local fields will be populated with empty string "".  So return your entire record's data after both remote create and update.
+     * In addition, you <b>must</b> return record-data from the server in the same order received.
+     * Will perform a commit as well, un-marking dirty-fields.  Store's "update" event will be suppressed as the record receives
+     * a fresh new data-hash.
+     * @param {Record/Record[]} rs
+     * @param {Object/Object[]} data
+     */
+    update : function(rs, data) {
+        if (Ext.isArray(rs)) {
+            for (var i=rs.length-1; i >= 0; i--) {
+                if (Ext.isArray(data)) {
+                    this.update(rs.splice(i,1).shift(), data.splice(i,1).shift());
+                }
+                else {
+                    // weird...rs is an array but data isn't??  recurse but just send in the whole data object.
+                    // the else clause below will detect !this.isData and throw exception.
+                    this.update(rs.splice(i,1).shift(), data);
+                }
+            }
+        }
+        else {
+                     // If rs is NOT an array but data IS, see if data contains just 1 record.  If so extract it and carry on.
+            if (Ext.isArray(data) && data.length == 1) {
+                data = data.shift();
+            }
+            if (!this.isData(data)) {
+                // TODO: create custom Exception class to return record in thrown exception.  Allow exception-handler the choice
+                // to commit or not rather than blindly rs.commit() here.
+                rs.commit();
+                throw new Ext.data.DataReader.Error('update', rs);
+            }
+            this.buildExtractors();
+            rs.data = this.extractValues(Ext.apply(rs.data, data), rs.fields.items, rs.fields.items.length);
+            rs.commit();
+        }
+    },
+
+    /**
+     * Returns true if the supplied data-hash <b>looks</b> and quacks like data.  Checks to see if it has a key
+     * corresponding to idProperty defined in your DataReader config containing non-empty pk.
+     * @param {Object} data
+     * @return {Boolean}
+     */
+    isData : function(data) {
+        return (data && Ext.isObject(data) && !Ext.isEmpty(data[this.meta.idProperty])) ? true : false;
+    }
+};
+
+/**
+ * @class Ext.data.DataReader.Error
+ * @extends Ext.Error
+ * General error class for Ext.data.DataReader
+ */
+Ext.data.DataReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name: 'Ext.data.DataReader'
+});
+Ext.apply(Ext.data.DataReader.Error.prototype, {
+    lang : {
+        'update': "#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",
+        'realize': "#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.",
+        'invalid-response': "#readResponse received an invalid response from the server."
+    }
+});
+
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataWriter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataWriter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DataWriter.js	(revision 625)
@@ -0,0 +1,201 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DataWriter
+ * <p>Ext.data.DataWriter facilitates create, update, and destroy actions between
+ * an Ext.data.Store and a server-side framework. A Writer enabled Store will
+ * automatically manage the Ajax requests to perform CRUD actions on a Store.</p>
+ * <p>Ext.data.DataWriter is an abstract base class which is intended to be extended
+ * and should not be created directly. For existing implementations, see
+ * {@link Ext.data.JsonWriter}.</p>
+ * <p>Creating a writer is simple:</p>
+ * <pre><code>
+var writer = new Ext.data.JsonWriter();
+ * </code></pre>
+ * <p>The proxy for a writer enabled store can be configured with a simple <code>url</code>:</p>
+ * <pre><code>
+// Create a standard HttpProxy instance.
+var proxy = new Ext.data.HttpProxy({
+    url: 'app.php/users'
+});
+ * </code></pre>
+ * <p>For finer grained control, the proxy may also be configured with an <code>api</code>:</p>
+ * <pre><code>
+// Use the api specification
+var proxy = new Ext.data.HttpProxy({
+    api: {
+        read    : 'app.php/users/read',
+        create  : 'app.php/users/create',
+        update  : 'app.php/users/update',
+        destroy : 'app.php/users/destroy'
+    }
+});
+ * </code></pre>
+ * <p>Creating a Writer enabled store:</p>
+ * <pre><code>
+var store = new Ext.data.Store({
+    proxy: proxy,
+    reader: reader,
+    writer: writer
+});
+ * </code></pre>
+ * @constructor Create a new DataWriter
+ * @param {Object} meta Metadata configuration options (implementation-specific)
+ * @param {Object} recordType Either an Array of field definition objects as specified
+ * in {@link Ext.data.Record#create}, or an {@link Ext.data.Record} object created
+ * using {@link Ext.data.Record#create}.
+ */
+Ext.data.DataWriter = function(config){
+    /**
+     * This DataWriter's configured metadata as passed to the constructor.
+     * @type Mixed
+     * @property meta
+     */
+    Ext.apply(this, config);
+};
+
+Ext.data.DataWriter.prototype = {
+
+    /**
+     * @cfg {Boolean} writeAllFields
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have DataWriter return ALL fields of a modified
+     * record -- not just those that changed.
+     * <tt>false</tt> to have DataWriter only request modified fields from a record.
+     */
+    writeAllFields : false,
+    /**
+     * @cfg {Boolean} listful
+     * <tt>false</tt> by default.  Set <tt>true</tt> to have the DataWriter <b>always</b> write HTTP params as a list,
+     * even when acting upon a single record.
+     */
+    listful : false,    // <-- listful is actually not used internally here in DataWriter.  @see Ext.data.Store#execute.
+
+    /**
+     * Writes data in preparation for server-write action.  Simply proxies to DataWriter#update, DataWriter#create
+     * DataWriter#destroy.
+     * @param {String} action [CREATE|UPDATE|DESTROY]
+     * @param {Object} params The params-hash to write-to
+     * @param {Record/Record[]} rs The recordset write.
+     */
+    write : function(action, params, rs) {
+        this.render(action, rs, params, this[action](rs));
+    },
+
+    /**
+     * abstract method meant to be overridden by all DataWriter extensions.  It's the extension's job to apply the "data" to the "params".
+     * The data-object provided to render is populated with data according to the meta-info defined in the user's DataReader config,
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs Store recordset
+     * @param {Object} params Http params to be sent to server.
+     * @param {Object} data object populated according to DataReader meta-data.
+     */
+    render : Ext.emptyFn,
+
+    /**
+     * update
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    update : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                ids.push(val.id);
+                data.push(this.updateRecord(val));
+            }, this);
+            params[this.meta.idProperty] = ids;
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.idProperty] = rs.id;
+            params[this.meta.root] = this.updateRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} saveRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#saveRecord JsonWriter.saveRecord}
+     */
+    updateRecord : Ext.emptyFn,
+
+    /**
+     * create
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    create : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [];
+            Ext.each(rs, function(val){
+                data.push(this.createRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        }
+        else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.createRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} createRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#createRecord JsonWriter.createRecord})
+     */
+    createRecord : Ext.emptyFn,
+
+    /**
+     * destroy
+     * @param {Object} p Params-hash to apply result to.
+     * @param {Record/Record[]} rs Record(s) to write
+     * @private
+     */
+    destroy : function(rs) {
+        var params = {};
+        if (Ext.isArray(rs)) {
+            var data = [],
+                ids = [];
+            Ext.each(rs, function(val){
+                data.push(this.destroyRecord(val));
+            }, this);
+            params[this.meta.root] = data;
+        } else if (rs instanceof Ext.data.Record) {
+            params[this.meta.root] = this.destroyRecord(rs);
+        }
+        return params;
+    },
+
+    /**
+     * @cfg {Function} destroyRecord Abstract method that should be implemented in all subclasses
+     * (e.g.: {@link Ext.data.JsonWriter#destroyRecord JsonWriter.destroyRecord})
+     */
+    destroyRecord : Ext.emptyFn,
+
+    /**
+     * Converts a Record to a hash
+     * @param {Record}
+     * @private
+     */
+    toHash : function(rec) {
+        var map = rec.fields.map,
+            data = {},
+            raw = (this.writeAllFields === false && rec.phantom === false) ? rec.getChanges() : rec.data,
+            m;
+        Ext.iterate(raw, function(prop, value){
+            if((m = map[prop])){
+                data[m.mapping ? m.mapping : m.name] = value;
+            }
+        });
+        data[this.meta.idProperty] = rec.id;
+        return data;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectProxy.js	(revision 625)
@@ -0,0 +1,141 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DirectProxy
+ * @extends Ext.data.DataProxy
+ */
+Ext.data.DirectProxy = function(config){
+    Ext.apply(this, config);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    Ext.data.DirectProxy.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash
+     * Send parameters as a collection of named arguments (defaults to <tt>true</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: true,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.  directFn is a simple alternative to defining the api configuration-parameter
+     * for Store's which will not implement a full CRUD api.
+     */
+    directFn : undefined,
+
+    // protected
+    doRequest : function(action, rs, params, reader, callback, scope, options) {
+        var args = [];
+        var directFn = this.api[action] || this.directFn;
+
+        switch (action) {
+            case Ext.data.Api.actions.create:
+                args.push(params[reader.meta.root]);		// <-- create(Hash)
+                break;
+            case Ext.data.Api.actions.read:
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        args.push(params[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    args.push(params);
+                }
+                break;
+            case Ext.data.Api.actions.update:
+                args.push(params[reader.meta.idProperty]);  // <-- save(Integer/Integer[], Hash/Hash[])
+                args.push(params[reader.meta.root]);
+                break;
+            case Ext.data.Api.actions.destroy:
+                args.push(params[reader.meta.root]);        // <-- destroy(Int/Int[])
+                break;
+        }
+
+        var trans = {
+            params : params || {},
+            callback : callback,
+            scope : scope,
+            arg : options,
+            reader: reader
+        };
+
+        args.push(this.createCallback(action, rs, trans), this);
+        directFn.apply(window, args);
+    },
+
+    // private
+    createCallback : function(action, rs, trans) {
+        return function(result, res) {
+            if (!res.status) {
+                // @deprecated fire loadexception
+                if (action === Ext.data.Api.actions.read) {
+                    this.fireEvent("loadexception", this, trans, res, null);
+                }
+                this.fireEvent('exception', this, 'remote', action, trans, res, null);
+                trans.callback.call(trans.scope, null, trans.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, trans, result, res);
+            } else {
+                this.onWrite(action, trans, result, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, result, res) {
+        var records;
+        try {
+            records = trans.reader.readRecords(result);
+        }
+        catch (ex) {
+            // @deprecated: Fire old loadexception for backwards-compat.
+            this.fireEvent("loadexception", this, trans, res, ex);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, ex);
+            trans.callback.call(trans.scope, null, trans.arg, false);
+            return;
+        }
+        this.fireEvent("load", this, res, trans.arg);
+        trans.callback.call(trans.scope, records, trans.arg, true);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, result, res, rs) {
+        this.fireEvent("write", this, action, result, res, rs, trans.arg);
+        trans.callback.call(trans.scope, result, res, true);
+    }
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectStore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectStore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/DirectStore.js	(revision 625)
@@ -0,0 +1,52 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.DirectStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to create an {@link Ext.data.Store} configured with an
+ * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting
+ * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
+ * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
+ * configured as needed.</p>
+ *
+ * <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
+ * <div><ul class="mdetail-params">
+ * <li><b>{@link Ext.data.Store Store}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ *
+ * </ul></div>
+ * <li><b>{@link Ext.data.JsonReader JsonReader}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.JsonReader#root root}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#idProperty idProperty}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.JsonReader#totalProperty totalProperty}</b></tt></li>
+ * </ul></div>
+ *
+ * <li><b>{@link Ext.data.DirectProxy DirectProxy}</b></li>
+ * <div class="sub-desc"><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.data.DirectProxy#directFn directFn}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramOrder paramOrder}</b></tt></li>
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}</b></tt></li>
+ * </ul></div>
+ * </ul></div>
+ *
+ * @xtype directstore
+ *
+ * @constructor
+ * @param {Object} config
+ */
+Ext.data.DirectStore = function(c){
+    // each transaction upon a singe record will generatie a distinct Direct transaction since Direct queues them into one Ajax request.
+    c.batchTransactions = false;
+
+    Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {
+        proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
+        reader: (typeof(c.reader) == 'undefined' && typeof(c.fields) == 'object') ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader
+    }));
+};
+Ext.extend(Ext.data.DirectStore, Ext.data.Store, {});
+Ext.reg('directstore', Ext.data.DirectStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/GroupingStore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/GroupingStore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/GroupingStore.js	(revision 625)
@@ -0,0 +1,139 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.GroupingStore
+ * @extends Ext.data.Store
+ * A specialized store implementation that provides for grouping records by one of the available fields. This
+ * is usually used in conjunction with an {@link Ext.grid.GroupingView} to proved the data model for
+ * a grouped GridPanel.
+ * @constructor
+ * Creates a new GroupingStore.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype groupingstore
+ */
+Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
+    
+    //inherit docs
+    constructor: function(config){
+        Ext.data.GroupingStore.superclass.constructor.call(this, config);
+        this.applyGroupField();
+    },
+    
+    /**
+     * @cfg {String} groupField
+     * The field name by which to sort the store's data (defaults to '').
+     */
+    /**
+     * @cfg {Boolean} remoteGroup
+     * True if the grouping should apply on the server side, false if it is local only (defaults to false).  If the
+     * grouping is local, it can be applied immediately to the data.  If it is remote, then it will simply act as a
+     * helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call.
+     */
+    remoteGroup : false,
+    /**
+     * @cfg {Boolean} groupOnSort
+     * True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the
+     * existing sort info (defaults to false).
+     */
+    groupOnSort:false,
+
+	groupDir : 'ASC',
+	
+    /**
+     * Clears any existing grouping and refreshes the data using the default sort.
+     */
+    clearGrouping : function(){
+        this.groupField = false;
+        if(this.remoteGroup){
+            if(this.baseParams){
+                delete this.baseParams.groupBy;
+            }
+            var lo = this.lastOptions;
+            if(lo && lo.params){
+                delete lo.params.groupBy;
+            }
+            this.reload();
+        }else{
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }
+    },
+
+    /**
+     * Groups the data by the specified field.
+     * @param {String} field The field name by which to sort the store's data
+     * @param {Boolean} forceRegroup (optional) True to force the group to be refreshed even if the field passed
+     * in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)
+     */
+    groupBy : function(field, forceRegroup, direction){
+		direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir;
+        if(this.groupField == field && this.groupDir == direction && !forceRegroup){
+            return; // already grouped by this field
+        }
+        this.groupField = field;
+		this.groupDir = direction;
+        this.applyGroupField();
+        if(this.groupOnSort){
+            this.sort(field, direction);
+            return;
+        }
+        if(this.remoteGroup){
+            this.reload();
+        }else{
+            var si = this.sortInfo || {};
+            if(si.field != field || si.direction != direction){
+                this.applySort();
+            }else{
+                this.sortData(field, direction);
+            }
+            this.fireEvent('datachanged', this);
+        }
+    },
+    
+    // private
+    applyGroupField: function(){
+        if(this.remoteGroup){
+            if(!this.baseParams){
+                this.baseParams = {};
+            }
+            this.baseParams.groupBy = this.groupField;
+            this.baseParams.groupDir = this.groupDir;
+        }
+    },
+
+    // private
+    applySort : function(){
+        Ext.data.GroupingStore.superclass.applySort.call(this);
+        if(!this.groupOnSort && !this.remoteGroup){
+            var gs = this.getGroupState();
+            if(gs && (gs != this.sortInfo.field || this.groupDir != this.sortInfo.direction)){
+                this.sortData(this.groupField, this.groupDir);
+            }
+        }
+    },
+
+    // private
+    applyGrouping : function(alwaysFireChange){
+        if(this.groupField !== false){
+            this.groupBy(this.groupField, true, this.groupDir);
+            return true;
+        }else{
+            if(alwaysFireChange === true){
+                this.fireEvent('datachanged', this);
+            }
+            return false;
+        }
+    },
+
+    // private
+    getGroupState : function(){
+        return this.groupOnSort && this.groupField !== false ?
+               (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField;
+    }
+});
+Ext.reg('groupingstore', Ext.data.GroupingStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/HttpProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/HttpProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/HttpProxy.js	(revision 625)
@@ -0,0 +1,276 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.HttpProxy
+ * @extends Ext.data.DataProxy
+ * <p>An implementation of {@link Ext.data.DataProxy} that processes data requests within the same
+ * domain of the originating page.</p>
+ * <p><b>Note</b>: this class cannot be used to retrieve data from a domain other
+ * than the domain from which the running page was served. For cross-domain requests, use a
+ * {@link Ext.data.ScriptTagProxy ScriptTagProxy}.</p>
+ * <p>Be aware that to enable the browser to parse an XML document, the server must set
+ * the Content-Type header in the HTTP response to "<tt>text/xml</tt>".</p>
+ * @constructor
+ * @param {Object} conn
+ * An {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}.
+ * <p>Note that if this HttpProxy is being used by a (@link Ext.data.Store Store}, then the
+ * Store's call to {@link #load} will override any specified <tt>callback</tt> and <tt>params</tt>
+ * options. In this case, use the Store's {@link Ext.data.Store#events events} to modify parameters,
+ * or react to loading events. The Store's {@link Ext.data.Store#baseParams baseParams} may also be
+ * used to pass parameters known at instantiation time.</p>
+ * <p>If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make
+ * the request.</p>
+ */
+Ext.data.HttpProxy = function(conn){
+    Ext.data.HttpProxy.superclass.constructor.call(this, conn);
+
+    /**
+     * The Connection object (Or options parameter to {@link Ext.Ajax#request}) which this HttpProxy
+     * uses to make requests to the server. Properties of this object may be changed dynamically to
+     * change the way data is requested.
+     * @property
+     */
+    this.conn = conn;
+
+    // nullify the connection url.  The url param has been copied to 'this' above.  The connection
+    // url will be set during each execution of doRequest when buildUrl is called.  This makes it easier for users to override the
+    // connection url during beforeaction events (ie: beforeload, beforesave, etc).  The connection url will be nullified
+    // after each request as well.  Url is always re-defined during doRequest.
+    this.conn.url = null;
+
+    this.useAjax = !conn || !conn.events;
+
+    //private.  A hash containing active requests, keyed on action [Ext.data.Api.actions.create|read|update|destroy]
+    var actions = Ext.data.Api.actions;
+    this.activeRequest = {};
+    for (var verb in actions) {
+        this.activeRequest[actions[verb]] = undefined;
+    }
+};
+
+Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {Boolean} restful
+     * <p>If set to <tt>true</tt>, a {@link Ext.data.Record#phantom non-phantom} record's
+     * {@link Ext.data.Record#id id} will be appended to the url (defaults to <tt>false</tt>).</p><br>
+     * <p>The url is built based upon the action being executed <tt>[load|create|save|destroy]</tt>
+     * using the commensurate <tt>{@link #api}</tt> property, or if undefined default to the
+     * configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.</p><br>
+     * <p>Some MVC (e.g., Ruby on Rails, Merb and Django) support this style of segment based urls
+     * where the segments in the URL follow the Model-View-Controller approach.</p><pre><code>
+     * someSite.com/controller/action/id
+     * </code></pre>
+     * Where the segments in the url are typically:<div class="mdetail-params"><ul>
+     * <li>The first segment : represents the controller class that should be invoked.</li>
+     * <li>The second segment : represents the class function, or method, that should be called.</li>
+     * <li>The third segment : represents the ID (a variable typically passed to the method).</li>
+     * </ul></div></p>
+     * <p>For example:</p>
+     * <pre><code>
+api: {
+    load :    '/controller/load',
+    create :  '/controller/new',  // Server MUST return idProperty of new record
+    save :    '/controller/update',
+    destroy : '/controller/destroy_action'
+}
+
+// Alternatively, one can use the object-form to specify each API-action
+api: {
+    load: {url: 'read.php', method: 'GET'},
+    create: 'create.php',
+    destroy: 'destroy.php',
+    save: 'update.php'
+}
+     */
+
+    /**
+     * Return the {@link Ext.data.Connection} object being used by this Proxy.
+     * @return {Connection} The Connection object. This object may be used to subscribe to events on
+     * a finer-grained basis than the DataProxy events.
+     */
+    getConnection : function() {
+        return this.useAjax ? Ext.Ajax : this.conn;
+    },
+
+    /**
+     * Used for overriding the url used for a single request.  Designed to be called during a beforeaction event.  Calling setUrl
+     * will override any urls set via the api configuration parameter.  Set the optional parameter makePermanent to set the url for
+     * all subsequent requests.  If not set to makePermanent, the next request will use the same url or api configuration defined
+     * in the initial proxy configuration.
+     * @param {String} url
+     * @param {Boolean} makePermanent (Optional) [false]
+     *
+     * (e.g.: beforeload, beforesave, etc).
+     */
+    setUrl : function(url, makePermanent) {
+        this.conn.url = url;
+        if (makePermanent === true) {
+            this.url = url;
+            Ext.data.Api.prepare(this);
+        }
+    },
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action The crud action type (create, read, update, destroy)
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback
+     * <div class="sub-desc"><p>A function to be called after the request.
+     * The <tt>callback</tt> is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[] The block of Ext.data.Records.</li>
+     * <li><tt>options</tt>: Options object from the action request</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, cb, scope, arg) {
+        var  o = {
+            method: (this.api[action]) ? this.api[action]['method'] : undefined,
+            request: {
+                callback : cb,
+                scope : scope,
+                arg : arg
+            },
+            reader: reader,
+            callback : this.createCallback(action, rs),
+            scope: this
+        };
+        // Sample the request data:  If it's an object, then it hasn't been json-encoded yet.
+        // Transmit data using jsonData config of Ext.Ajax.request
+        if (typeof(params[reader.meta.root]) === 'object') {
+            o.jsonData = params;
+        } else {
+            o.params = params || {};
+        }
+        // Set the connection url.  If this.conn.url is not null here,
+        // the user may have overridden the url during a beforeaction event-handler.
+        // this.conn.url is nullified after each request.
+        if (this.conn.url === null) {
+            this.conn.url = this.buildUrl(action, rs);
+        }
+        else if (this.restful === true && rs instanceof Ext.data.Record && !rs.phantom) {
+            this.conn.url += '/' + rs.id;
+        }
+        if(this.useAjax){
+
+            Ext.applyIf(o, this.conn);
+
+            // If a currently running request is found for this action, abort it.
+            if (this.activeRequest[action]) {
+                // Disabled aborting activeRequest while implementing REST.  activeRequest[action] will have to become an array
+                //Ext.Ajax.abort(this.activeRequest[action]);
+            }
+            this.activeRequest[action] = Ext.Ajax.request(o);
+        }else{
+            this.conn.request(o);
+        }
+        // request is sent, nullify the connection url in preparation for the next request
+        this.conn.url = null;
+    },
+
+    /**
+     * Returns a callback function for a request.  Note a special case is made for the
+     * read action vs all the others.
+     * @param {String} action [create|update|delete|load]
+     * @param {Ext.data.Record[]} rs The Store-recordset being acted upon
+     * @private
+     */
+    createCallback : function(action, rs) {
+        return function(o, success, response) {
+            this.activeRequest[action] = undefined;
+            if (!success) {
+                if (action === Ext.data.Api.actions.read) {
+                    // @deprecated: fire loadexception for backwards compat.
+                    this.fireEvent('loadexception', this, o, response);
+                }
+                this.fireEvent('exception', this, 'response', action, o, response);
+                o.request.callback.call(o.request.scope, null, o.request.arg, false);
+                return;
+            }
+            if (action === Ext.data.Api.actions.read) {
+                this.onRead(action, o, response);
+            } else {
+                this.onWrite(action, o, response, rs);
+            }
+        }
+    },
+
+    /**
+     * Callback for read action
+     * @param {String} action Action name as per {@link Ext.data.Api.actions#read}.
+     * @param {Object} o The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, o, response) {
+        var result;
+        try {
+            result = o.reader.read(response);
+        }catch(e){
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response, e);
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, o, response);
+
+            // Get DataReader read-back a response-object to pass along to exception event
+            var res = o.reader.readResponse(action, response);
+            this.fireEvent('exception', this, 'remote', action, o, res, null);
+        }
+        else {
+            this.fireEvent('load', this, o, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, result, o.request.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, o, response, rs) {
+        var reader = o.reader;
+        var res;
+        try {
+            res = reader.readResponse(action, response);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, o, response, e);
+            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            return;
+        }
+        if (res[reader.meta.successProperty] === false) {
+            this.fireEvent('exception', this, 'remote', action, o, res, rs);
+        } else {
+            this.fireEvent('write', this, action, res[reader.meta.root], res, rs, o.request.arg);
+        }
+        o.request.callback.call(o.request.scope, res[reader.meta.root], res, res[reader.meta.successProperty]);
+    },
+
+    // inherit docs
+    destroy: function(){
+        if(!this.useAjax){
+            this.conn.abort();
+        }else if(this.activeRequest){
+            var actions = Ext.data.Api.actions;
+            for (var verb in actions) {
+                if(this.activeRequest[actions[verb]]){
+                    Ext.Ajax.abort(this.activeRequest[actions[verb]]);
+                }
+            }
+        }
+        Ext.data.HttpProxy.superclass.destroy.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonReader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonReader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonReader.js	(revision 625)
@@ -0,0 +1,311 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.JsonReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from a JSON response
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+    {name: 'firstname'},                  // map the Record's "firstname" field to the row object's key of the same name
+    {name: 'job', mapping: 'occupation'}  // map the Record's "job" field to the row object's "occupation" key
+]);
+var myReader = new Ext.data.JsonReader(
+    {                             // The metadata property, with configuration options:
+        totalProperty: "results", //   the property which contains the total dataset size (optional)
+        root: "rows",             //   the property which contains an Array of record data objects
+        idProperty: "id"          //   the property within each row object that provides an ID for the record (optional)
+    },
+    Employee  // {@link Ext.data.Record} constructor that provides mapping for JSON object
+);
+</code></pre>
+ * <p>This would consume a JSON data object of the form:</p><pre><code>
+{
+    results: 2,  // Reader's configured totalProperty
+    rows: [      // Reader's configured root
+        { id: 1, firstname: 'Bill', occupation: 'Gardener' },         // a row object
+        { id: 2, firstname: 'Ben' , occupation: 'Horticulturalist' }  // another row object
+    ]
+}
+</code></pre>
+ * <p><b><u>Automatic configuration using metaData</u></b></p>
+ * <p>It is possible to change a JsonReader's metadata at any time by including a <b><tt>metaData</tt></b>
+ * property in the JSON data object. If the JSON data object has a <b><tt>metaData</tt></b> property, a
+ * {@link Ext.data.Store Store} object using this Reader will reconfigure itself to use the newly provided
+ * field definition and fire its {@link Ext.data.Store#metachange metachange} event. The metachange event
+ * handler may interrogate the <b><tt>metaData</tt></b> property to perform any configuration required.
+ * Note that reconfiguring a Store potentially invalidates objects which may refer to Fields or Records
+ * which no longer exist.</p>
+ * <p>The <b><tt>metaData</tt></b> property in the JSON data object may contain:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>any of the configuration options for this class</li>
+ * <li>a <b><tt>{@link Ext.data.Record#fields fields}</tt></b> property which the JsonReader will
+ * use as an argument to the {@link Ext.data.Record#create data Record create method} in order to
+ * configure the layout of the Records it will produce.</li>
+ * <li>a <b><tt>{@link Ext.data.Store#sortInfo sortInfo}</tt></b> property which the JsonReader will
+ * use to set the {@link Ext.data.Store}'s {@link Ext.data.Store#sortInfo sortInfo} property</li>
+ * <li>any user-defined properties needed</li>
+ * </ul></div>
+ * <p>To use this facility to send the same data as the example above (without having to code the creation
+ * of the Record constructor), you would create the JsonReader like this:</p><pre><code>
+var myReader = new Ext.data.JsonReader();
+</code></pre>
+ * <p>The first data packet from the server would configure the reader by containing a
+ * <b><tt>metaData</tt></b> property <b>and</b> the data. For example, the JSON data object might take
+ * the form:</p>
+<pre><code>
+{
+    metaData: {
+        idProperty: 'id',
+        root: 'rows',
+        totalProperty: 'results',
+        fields: [
+            {name: 'name'},
+            {name: 'job', mapping: 'occupation'}
+        ],
+        sortInfo: {field: 'name', direction:'ASC'}, // used by store to set its sortInfo
+        foo: 'bar' // custom property
+    },
+    results: 2,
+    rows: [ // an Array
+        { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
+        { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' }
+    ]
+}
+</code></pre>
+ * @cfg {String} totalProperty [total] Name of the property from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.  Defaults to <tt>total</tt>.
+ * @cfg {String} successProperty [success] Name of the property from which to
+ * retrieve the success attribute. Defaults to <tt>success</tt>.  See
+ * {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+ * for additional information.
+ * @cfg {String} root [undefined] <b>Required</b>.  The name of the property
+ * which contains the Array of row objects.  Defaults to <tt>undefined</tt>.
+ * An exception will be thrown if the root property is undefined. The data packet
+ * value for this property should be an empty array to clear the data or show
+ * no data.
+ * @cfg {String} idProperty [id] Name of the property within a row object that contains a record identifier value.  Defaults to <tt>id</tt>
+ * @constructor
+ * Create a new JsonReader
+ * @param {Object} meta Metadata configuration options.
+ * @param {Array/Object} recordType
+ * <p>Either an Array of {@link Ext.data.Field Field} definition objects (which
+ * will be passed to {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record}
+ * constructor created from {@link Ext.data.Record#create}.</p>
+ */
+Ext.data.JsonReader = function(meta, recordType){
+    meta = meta || {};
+
+    // default idProperty, successProperty & totalProperty -> "id", "success", "total"
+    Ext.applyIf(meta, {
+        idProperty: 'id',
+        successProperty: 'success',
+        totalProperty: 'total'
+    });
+
+    Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
+    /**
+     * This JsonReader's metadata as passed to the constructor, or as passed in
+     * the last data packet's <b><tt>metaData</tt></b> property.
+     * @type Mixed
+     * @property meta
+     */
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the JSON data in its responseText.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var json = response.responseText;
+        var o = Ext.decode(json);
+        if(!o) {
+            throw {message: "JsonReader.read: Json object not found"};
+        }
+        return this.readRecords(o);
+    },
+
+    // private function a store will implement
+    onMetaChange : function(meta, recordType, o){
+
+    },
+
+    /**
+     * @ignore
+     */
+    simpleAccess: function(obj, subsc) {
+        return obj[subsc];
+    },
+
+    /**
+     * @ignore
+     */
+    getJsonAccessor: function(){
+        var re = /[\[\.]/;
+        return function(expr) {
+            try {
+                return(re.test(expr)) ?
+                new Function("obj", "return obj." + expr) :
+                function(obj){
+                    return obj[expr];
+                };
+            } catch(e){}
+            return Ext.emptyFn;
+        };
+    }(),
+
+    /**
+     * Create a data block containing Ext.data.Records from a JSON object.
+     * @param {Object} o An object which contains an Array of row objects in the property specified
+     * in the config as 'root, and optionally a property, specified in the config as 'totalProperty'
+     * which contains the total size of the dataset.
+     * @return {Object} data A data block which is used by an Ext.data.Store object as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(o){
+        /**
+         * After any data loads, the raw JSON data is available for further custom processing.  If no data is
+         * loaded or there is a load exception this property will be undefined.
+         * @type Object
+         */
+        this.jsonData = o;
+        if(o.metaData){
+            delete this.ef;
+            this.meta = o.metaData;
+            this.recordType = Ext.data.Record.create(o.metaData.fields);
+            this.onMetaChange(this.meta, this.recordType, o);
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length, v;
+
+        // Generate extraction functions for the totalProperty, the root, the id, and for each field
+        this.buildExtractors();
+        var root = this.getRoot(o), c = root.length, totalRecords = c, success = true;
+        if(s.totalProperty){
+            v = parseInt(this.getTotal(o), 10);
+            if(!isNaN(v)){
+                totalRecords = v;
+            }
+        }
+        if(s.successProperty){
+            v = this.getSuccess(o);
+            if(v === false || v === 'false'){
+                success = false;
+            }
+        }
+
+        var records = [];
+        for(var i = 0; i < c; i++){
+            var n = root[i];
+            var record = new Record(this.extractValues(n, fi, fl), this.getId(n));
+            record.json = n;
+            records[i] = record;
+        }
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords
+        };
+    },
+
+    // private
+    buildExtractors : function() {
+        if(this.ef){
+            return;
+        }
+        var s = this.meta, Record = this.recordType,
+            f = Record.prototype.fields, fi = f.items, fl = f.length;
+
+        if(s.totalProperty) {
+            this.getTotal = this.getJsonAccessor(s.totalProperty);
+        }
+        if(s.successProperty) {
+            this.getSuccess = this.getJsonAccessor(s.successProperty);
+        }
+        this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;};
+        if (s.id || s.idProperty) {
+            var g = this.getJsonAccessor(s.id || s.idProperty);
+            this.getId = function(rec) {
+                var r = g(rec);
+                return (r === undefined || r === "") ? null : r;
+            };
+        } else {
+            this.getId = function(){return null;};
+        }
+        var ef = [];
+        for(var i = 0; i < fl; i++){
+            f = fi[i];
+            var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name;
+            ef.push(this.getJsonAccessor(map));
+        }
+        this.ef = ef;
+    },
+
+    // private extractValues
+    extractValues: function(data, items, len) {
+        var f, values = {};
+        for(var j = 0; j < len; j++){
+            f = items[j];
+            var v = this.ef[j](data);
+            values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data);
+        }
+        return values;
+    },
+
+    /**
+     * Decode a json response from server.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} response
+     */
+    readResponse : function(action, response) {
+        var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response;
+        if(!o) {
+            throw new Ext.data.JsonReader.Error('response');
+        }
+        if (Ext.isEmpty(o[this.meta.successProperty])) {
+            throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty);
+        }
+        // TODO, separate empty and undefined exceptions.
+        if ((action === Ext.data.Api.actions.create || action === Ext.data.Api.actions.update)) {
+            if (Ext.isEmpty(o[this.meta.root])) {
+                throw new Ext.data.JsonReader.Error('root-emtpy', this.meta.root);
+            }
+            else if (o[this.meta.root] === undefined) {
+                throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root);
+            }
+        }
+        // make sure extraction functions are defined.
+        this.ef = this.buildExtractors();
+        return o;
+    }
+});
+
+/**
+ * @class Ext.data.JsonReader.Error
+ * Error class for JsonReader
+ */
+Ext.data.JsonReader.Error = Ext.extend(Ext.Error, {
+    constructor : function(message, arg) {
+        this.arg = arg;
+        Ext.Error.call(this, message);
+    },
+    name : 'Ext.data.JsonReader'
+});
+Ext.apply(Ext.data.JsonReader.Error.prototype, {
+    lang: {
+        'response': "An error occurred while json-decoding your server response",
+        'successProperty-response': 'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',
+        'root-undefined-response': 'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',
+        'root-undefined-config': 'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',
+        'idProperty-undefined' : 'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',
+        'root-emtpy': 'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonStore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonStore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonStore.js	(revision 625)
@@ -0,0 +1,49 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.JsonStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from JSON data easier.
+ * A JsonStore will be automatically configured with a {@link Ext.data.JsonReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.JsonStore({
+    // store configs
+    autoDestroy: true,
+    url: 'get-images.php',
+    storeId: 'myStore',
+    // reader configs
+    root: 'images',
+    idProperty: 'name',  
+    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+{
+    images: [
+        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
+        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
+    ]
+}
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.JsonReader JsonReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype jsonstore
+ */
+Ext.data.JsonStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.JsonReader(config)
+        }));
+    }
+});
+Ext.reg('jsonstore', Ext.data.JsonStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonWriter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonWriter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/JsonWriter.js	(revision 625)
@@ -0,0 +1,77 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.JsonWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action.
+ */
+Ext.data.JsonWriter = function(config) {
+    Ext.data.JsonWriter.superclass.constructor.call(this, config);
+    // careful to respect "returnJson", renamed to "encode"
+    if (this.returnJson != undefined) {
+        this.encode = this.returnJson;
+    }
+}
+Ext.extend(Ext.data.JsonWriter, Ext.data.DataWriter, {
+    /**
+     * @cfg {Boolean} returnJson <b>Deprecated.  Use {@link Ext.data.JsonWriter#encode} instead.
+     */
+    returnJson : undefined,
+    /**
+     * @cfg {Boolean} encode <tt>true</tt> to {@link Ext.util.JSON#encode encode} the
+     * {@link Ext.data.DataWriter#toHash hashed data}. Defaults to <tt>true</tt>.  When using
+     * {@link Ext.data.DirectProxy}, set this to <tt>false</tt> since Ext.Direct.JsonProvider will perform
+     * its own json-encoding.  In addition, if you're using {@link Ext.data.HttpProxy}, setting to <tt>false</tt>
+     * will cause HttpProxy to transmit data using the <b>jsonData</b> configuration-params of {@link Ext.Ajax#request}
+     * instead of <b>params</b>.  When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are
+     * tuned to expect data through the jsonData mechanism.  In those cases, one will want to set <b>encode: <tt>false</tt></b>
+     */
+    encode : true,
+
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        Ext.apply(params, data);
+
+        if (this.encode === true) { // <-- @deprecated returnJson
+            if (Ext.isArray(rs) && data[this.meta.idProperty]) {
+                params[this.meta.idProperty] = Ext.encode(params[this.meta.idProperty]);
+            }
+            params[this.meta.root] = Ext.encode(params[this.meta.root]);
+        }
+    },
+    /**
+     * createRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        return this.toHash(rec);
+    },
+    /**
+     * updateRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        return this.toHash(rec);
+
+    },
+    /**
+     * destroyRecord
+     * @protected
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        return rec.id;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/MemoryProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/MemoryProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/MemoryProxy.js	(revision 625)
@@ -0,0 +1,69 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.MemoryProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor
+ * to the Reader when its load method is called.
+ * @constructor
+ * @param {Object} data The data object which the Reader uses to construct a block of Ext.data.Records.
+ */
+Ext.data.MemoryProxy = function(data){
+    // Must define a dummy api with "read" action to satisfy DataProxy#doRequest and Ext.data.Api#prepare *before* calling super
+    var api = {};
+    api[Ext.data.Api.actions.read] = true;
+    Ext.data.MemoryProxy.superclass.constructor.call(this, {
+        api: api
+    });
+    this.data = data;
+};
+
+Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {
+    /**
+     * @event loadexception
+     * Fires if an exception occurs in the Proxy during data loading. Note that this event is also relayed
+     * through {@link Ext.data.Store}, so you can listen for it directly on any Store instance.
+     * @param {Object} this
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Object} null This parameter does not apply and will always be null for MemoryProxy
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data
+     */
+
+       /**
+     * MemoryProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is load, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        // No implementation for CRUD in MemoryProxy.  Assumes all actions are 'load'
+        params = params || {};
+        var result;
+        try {
+            result = reader.readRecords(this.data);
+        }catch(e){
+            // @deprecated loadexception
+            this.fireEvent("loadexception", this, null, arg, e);
+
+            this.fireEvent('exception', this, 'response', action, arg, null, e);
+            callback.call(scope, null, arg, false);
+            return;
+        }
+        callback.call(scope, result, arg, true);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/Record.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/Record.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/Record.js	(revision 625)
@@ -0,0 +1,400 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Record
+ * <p>Instances of this class encapsulate both Record <em>definition</em> information, and Record
+ * <em>value</em> information for use in {@link Ext.data.Store} objects, or any code which needs
+ * to access Records cached in an {@link Ext.data.Store} object.</p>
+ * <p>Constructors for this class are generated by passing an Array of field definition objects to {@link #create}.
+ * Instances are usually only created by {@link Ext.data.Reader} implementations when processing unformatted data
+ * objects.</p>
+ * <p>Note that an instance of a Record class may only belong to one {@link Ext.data.Store Store} at a time.
+ * In order to copy data from one Store to another, use the {@link #copy} method to create an exact
+ * copy of the Record, and insert the new instance into the other Store.</p>
+ * <p>When serializing a Record for submission to the server, be aware that it contains many private
+ * properties, and also a reference to its owning Store which in turn holds references to its Records.
+ * This means that a whole Record may not be encoded using {@link Ext.util.JSON.encode}. Instead, use the
+ * <code>{@link #data}</code> and <code>{@link #id}</code> properties.</p>
+ * <p>Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.</p>
+ * @constructor
+ * This constructor should not be used to create Record objects. Instead, use {@link #create} to
+ * generate a subclass of Ext.data.Record configured with information about its constituent fields.
+ * @param {Object} data (Optional) An object, the properties of which provide values for the new Record's
+ * fields. If not specified the <code>{@link Ext.data.Field#defaultValue defaultValue}</code>
+ * for each field will be assigned.
+ * @param {Object} id (Optional) The id of the Record. This id should be unique, and is used by the
+ * {@link Ext.data.Store} object which owns the Record to index its collection of Records. If
+ * an <code>id</code> is not specified a <b><code>{@link #phantom}</code></b> Record will be created
+ * with an {@link #Record.id automatically generated id}.
+ */
+Ext.data.Record = function(data, id){
+    // if no id, call the auto id method
+    this.id = (id || id === 0) ? id : Ext.data.Record.id(this);
+    this.data = data || {};
+};
+
+/**
+ * Generate a constructor for a specific Record layout.
+ * @param {Array} o An Array of <b>{@link Ext.data.Field Field}</b> definition objects.
+ * The constructor generated by this method may be used to create new Record instances. The data
+ * object must contain properties named after the {@link Ext.data.Field field}
+ * <b><tt>{@link Ext.data.Field#name}s</tt></b>.  Example usage:<pre><code>
+// create a Record constructor from a description of the fields
+var TopicRecord = Ext.data.Record.create([ // creates a subclass of Ext.data.Record
+    {{@link Ext.data.Field#name name}: 'title', {@link Ext.data.Field#mapping mapping}: 'topic_title'},
+    {name: 'author', mapping: 'username', allowBlank: false},
+    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
+    {name: 'lastPost', mapping: 'post_time', type: 'date'},
+    {name: 'lastPoster', mapping: 'user2'},
+    {name: 'excerpt', mapping: 'post_text', allowBlank: false},
+    // In the simplest case, if no properties other than <tt>name</tt> are required,
+    // a field definition may consist of just a String for the field name.
+    'signature'
+]);
+
+// create Record instance
+var myNewRecord = new TopicRecord(
+    {
+        title: 'Do my job please',
+        author: 'noobie',
+        totalPosts: 1,
+        lastPost: new Date(),
+        lastPoster: 'Animal',
+        excerpt: 'No way dude!',
+        signature: ''
+    },
+    id // optionally specify the id of the record otherwise {@link #Record.id one is auto-assigned}
+);
+myStore.{@link Ext.data.Store#add add}(myNewRecord);
+</code></pre>
+ * @method create
+ * @return {function} A constructor which is used to create new Records according
+ * to the definition. The constructor has the same signature as {@link #Ext.data.Record}.
+ * @static
+ */
+Ext.data.Record.create = function(o){
+    var f = Ext.extend(Ext.data.Record, {});
+    var p = f.prototype;
+    p.fields = new Ext.util.MixedCollection(false, function(field){
+        return field.name;
+    });
+    for(var i = 0, len = o.length; i < len; i++){
+        p.fields.add(new Ext.data.Field(o[i]));
+    }
+    f.getField = function(name){
+        return p.fields.get(name);
+    };
+    return f;
+};
+
+Ext.data.Record.PREFIX = 'ext-record';
+Ext.data.Record.AUTO_ID = 1;
+Ext.data.Record.EDIT = 'edit';
+Ext.data.Record.REJECT = 'reject';
+Ext.data.Record.COMMIT = 'commit';
+
+
+/**
+ * Generates a sequential id. This method is typically called when a record is {@link #create}d
+ * and {@link #Record no id has been specified}. The returned id takes the form:
+ * <tt>&#123;PREFIX}-&#123;AUTO_ID}</tt>.<div class="mdetail-params"><ul>
+ * <li><b><tt>PREFIX</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.PREFIX</tt>
+ * (defaults to <tt>'ext-record'</tt>)</p></li>
+ * <li><b><tt>AUTO_ID</tt></b> : String<p class="sub-desc"><tt>Ext.data.Record.AUTO_ID</tt>
+ * (defaults to <tt>1</tt> initially)</p></li>
+ * </ul></div>
+ * @param {Record} rec The record being created.  The record does not exist, it's a {@link #phantom}.
+ * @return {String} auto-generated string id, <tt>"ext-record-i++'</tt>;
+ */
+Ext.data.Record.id = function(rec) {
+    rec.phantom = true;
+    return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join('');
+};
+
+Ext.data.Record.prototype = {
+    /**
+     * <p><b>This property is stored in the Record definition's <u>prototype</u></b></p>
+     * A MixedCollection containing the defined {@link Ext.data.Field Field}s for this Record.  Read-only.
+     * @property fields
+     * @type Ext.util.MixedCollection
+     */
+    /**
+     * An object hash representing the data for this Record. Every field name in the Record definition
+     * is represented by a property of that name in this object. Note that unless you specified a field
+     * with {@link Ext.data.Field#name name} "id" in the Record definition, this will <b>not</b> contain
+     * an <tt>id</tt> property.
+     * @property data
+     * @type {Object}
+     */
+    /**
+     * The unique ID of the Record {@link #Record as specified at construction time}.
+     * @property id
+     * @type {Object}
+     */
+    /**
+     * Readonly flag - true if this Record has been modified.
+     * @type Boolean
+     */
+    dirty : false,
+    editing : false,
+    error: null,
+    /**
+     * This object contains a key and value storing the original values of all modified
+     * fields or is null if no fields have been modified.
+     * @property modified
+     * @type {Object}
+     */
+    modified: null,
+    /**
+     * <tt>false</tt> when the record does not yet exist in a server-side database (see
+     * {@link #markDirty}).  Any record which has a real database pk set as its id property
+     * is NOT a phantom -- it's real.
+     * @property phantom
+     * @type {Boolean}
+     */
+    phantom : false,
+
+    // private
+    join : function(store){
+        /**
+         * The {@link Ext.data.Store} to which this Record belongs.
+         * @property store
+         * @type {Ext.data.Store}
+         */
+        this.store = store;
+    },
+
+    /**
+     * Set the {@link Ext.data.Field#name named field} to the specified value.  For example:
+     * <pre><code>
+// record has a field named 'firstname'
+var Employee = Ext.data.Record.{@link #create}([
+    {name: 'firstname'},
+    ...
+]);
+
+// update the 2nd record in the store:
+var rec = myStore.{@link Ext.data.Store#getAt getAt}(1);
+
+// set the value (shows dirty flag):
+rec.set('firstname', 'Betty');
+
+// commit the change (removes dirty flag):
+rec.{@link #commit}();
+
+// update the record in the store, bypass setting dirty flag,
+// and do not store the change in the {@link Ext.data.Store#getModifiedRecords modified records}
+rec.{@link #data}['firstname'] = 'Wilma'); // updates record, but not the view
+rec.{@link #commit}(); // updates the view
+     * </code></pre>
+     * <b>Notes</b>:<div class="mdetail-params"><ul>
+     * <li>If the store has a writer and <code>autoSave=true</code>, each set()
+     * will execute an XHR to the server.</li>
+     * <li>Use <code>{@link #beginEdit}</code> to prevent the store's <code>update</code>
+     * event firing while using set().</li>
+     * <li>Use <code>{@link #endEdit}</code> to have the store's <code>update</code>
+     * event fire.</li>
+     * </ul></div>
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to set.
+     * @param {Object} value The value to set the field to.
+     */
+    set : function(name, value){
+        var isObj = (typeof value === 'object');
+        if(!isObj && String(this.data[name]) === String(value)){
+            return;
+        } else if (isObj && Ext.encode(this.data[name]) === Ext.encode(value)) {
+            return;
+        }
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        if(typeof this.modified[name] == 'undefined'){
+            this.modified[name] = this.data[name];
+        }
+        this.data[name] = value;
+        if(!this.editing){
+            this.afterEdit();
+        }
+    },
+
+    // private
+    afterEdit: function(){
+        if(this.store){
+            this.store.afterEdit(this);
+        }
+    },
+
+    // private
+    afterReject: function(){
+        if(this.store){
+            this.store.afterReject(this);
+        }
+    },
+
+    // private
+    afterCommit: function(){
+        if(this.store){
+            this.store.afterCommit(this);
+        }
+    },
+
+    /**
+     * Get the value of the {@link Ext.data.Field#name named field}.
+     * @param {String} name The {@link Ext.data.Field#name name of the field} to get the value of.
+     * @return {Object} The value of the field.
+     */
+    get : function(name){
+        return this.data[name];
+    },
+
+    /**
+     * Begin an edit. While in edit mode, no events (e.g.. the <code>update</code> event)
+     * are relayed to the containing store.
+     * See also: <code>{@link #endEdit}</code> and <code>{@link #cancelEdit}</code>.
+     */
+    beginEdit : function(){
+        this.editing = true;
+        this.modified = this.modified || {};
+    },
+
+    /**
+     * Cancels all changes made in the current edit operation.
+     */
+    cancelEdit : function(){
+        this.editing = false;
+        delete this.modified;
+    },
+
+    /**
+     * End an edit. If any data was modified, the containing store is notified
+     * (ie, the store's <code>update</code> event will fire).
+     */
+    endEdit : function(){
+        this.editing = false;
+        if(this.dirty){
+            this.afterEdit();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Rejects all changes made to the Record since either creation, or the last commit operation.
+     * Modified fields are reverted to their original values.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of reject operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    reject : function(silent){
+        var m = this.modified;
+        for(var n in m){
+            if(typeof m[n] != "function"){
+                this.data[n] = m[n];
+            }
+        }
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterReject();
+        }
+    },
+
+    /**
+     * Usually called by the {@link Ext.data.Store} which owns the Record.
+     * Commits all changes made to the Record since either creation, or the last commit operation.
+     * <p>Developers should subscribe to the {@link Ext.data.Store#update} event
+     * to have their code notified of commit operations.</p>
+     * @param {Boolean} silent (optional) True to skip notification of the owning
+     * store of the change (defaults to false)
+     */
+    commit : function(silent){
+        this.dirty = false;
+        delete this.modified;
+        this.editing = false;
+        if(silent !== true){
+            this.afterCommit();
+        }
+    },
+
+    /**
+     * Gets a hash of only the fields that have been modified since this Record was created or commited.
+     * @return Object
+     */
+    getChanges : function(){
+        var m = this.modified, cs = {};
+        for(var n in m){
+            if(m.hasOwnProperty(n)){
+                cs[n] = this.data[n];
+            }
+        }
+        return cs;
+    },
+
+    // private
+    hasError : function(){
+        return this.error !== null;
+    },
+
+    // private
+    clearError : function(){
+        this.error = null;
+    },
+
+    /**
+     * Creates a copy of this Record.
+     * @param {String} id (optional) A new Record id, defaults to {@link #Record.id autogenerating an id}.
+     * Note: if an <code>id</code> is not specified the copy created will be a
+     * <code>{@link #phantom}</code> Record.
+     * @return {Record}
+     */
+    copy : function(newId) {
+        return new this.constructor(Ext.apply({}, this.data), newId || this.id);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the passed field name has been <code>{@link #modified}</code>
+     * since the load or last commit.
+     * @param {String} fieldName {@link Ext.data.Field.{@link Ext.data.Field#name}
+     * @return {Boolean}
+     */
+    isModified : function(fieldName){
+        return !!(this.modified && this.modified.hasOwnProperty(fieldName));
+    },
+
+    /**
+     * By default returns <tt>false</tt> if any {@link Ext.data.Field field} within the
+     * record configured with <tt>{@link Ext.data.Field#allowBlank} = false</tt> returns
+     * <tt>true</tt> from an {@link Ext}.{@link Ext#isEmpty isempty} test.
+     * @return {Boolean}
+     */
+    isValid : function() {
+        return this.fields.find(function(f) {
+            return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false;
+        },this) ? false : true;
+    },
+
+    /**
+     * <p>Marks this <b>Record</b> as <code>{@link #dirty}</code>.  This method
+     * is used interally when adding <code>{@link #phantom}</code> records to a
+     * {@link Ext.data.Store#writer writer enabled store}.</p>
+     * <br><p>Marking a record <code>{@link #dirty}</code> causes the phantom to
+     * be returned by {@link Ext.data.Store#getModifiedRecords} where it will
+     * have a create action composed for it during {@link Ext.data.Store#save store save}
+     * operations.</p>
+     */
+    markDirty : function(){
+        this.dirty = true;
+        if(!this.modified){
+            this.modified = {};
+        }
+        this.fields.each(function(f) {
+            this.modified[f.name] = this.data[f.name];
+        },this);
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/ScriptTagProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/ScriptTagProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/ScriptTagProxy.js	(revision 625)
@@ -0,0 +1,279 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.ScriptTagProxy
+ * @extends Ext.data.DataProxy
+ * An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain
+ * other than the originating domain of the running page.<br>
+ * <p>
+ * <b>Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain
+ * of the running page, you must use this class, rather than HttpProxy.</b><br>
+ * <p>
+ * The content passed back from a server resource requested by a ScriptTagProxy <b>must</b> be executable JavaScript
+ * source code because it is used as the source inside a &lt;script> tag.<br>
+ * <p>
+ * In order for the browser to process the returned data, the server must wrap the data object
+ * with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy.
+ * Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy
+ * depending on whether the callback name was passed:
+ * <p>
+ * <pre><code>
+boolean scriptTag = false;
+String cb = request.getParameter("callback");
+if (cb != null) {
+    scriptTag = true;
+    response.setContentType("text/javascript");
+} else {
+    response.setContentType("application/x-json");
+}
+Writer out = response.getWriter();
+if (scriptTag) {
+    out.write(cb + "(");
+}
+out.print(dataBlock.toJsonString());
+if (scriptTag) {
+    out.write(");");
+}
+</code></pre>
+ *
+ * @constructor
+ * @param {Object} config A configuration object.
+ */
+Ext.data.ScriptTagProxy = function(config){
+    Ext.apply(this, config);
+
+    Ext.data.ScriptTagProxy.superclass.constructor.call(this, config);
+
+    this.head = document.getElementsByTagName("head")[0];
+
+    /**
+     * @event loadexception
+     * <b>Deprecated</b> in favor of 'exception' event.
+     * Fires if an exception occurs in the Proxy during data loading.  This event can be fired for one of two reasons:
+     * <ul><li><b>The load call timed out.</b>  This means the load callback did not execute within the time limit
+     * specified by {@link #timeout}.  In this case, this event will be raised and the
+     * fourth parameter (read error) will be null.</li>
+     * <li><b>The load succeeded but the reader could not read the response.</b>  This means the server returned
+     * data, but the configured Reader threw an error while reading the data.  In this case, this event will be
+     * raised and the caught error will be passed along as the fourth parameter of this event.</li></ul>
+     * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly
+     * on any Store instance.
+     * @param {Object} this
+     * @param {Object} options The loading options that were specified (see {@link #load} for details).  If the load
+     * call timed out, this parameter will be null.
+     * @param {Object} arg The callback's arg object passed to the {@link #load} function
+     * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data.
+     * If the remote request returns success: false, this parameter will be null.
+     */
+};
+
+Ext.data.ScriptTagProxy.TRANS_ID = 1000;
+
+Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
+    /**
+     * @cfg {String} url The URL from which to request the data object.
+     */
+    /**
+     * @cfg {Number} timeout (optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
+     */
+    timeout : 30000,
+    /**
+     * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells
+     * the server the name of the callback function set up by the load call to process the returned data object.
+     * Defaults to "callback".<p>The server-side processing must read this parameter value, and generate
+     * javascript output which calls this named function passing the data object as its only parameter.
+     */
+    callbackParam : "callback",
+    /**
+     *  @cfg {Boolean} nocache (optional) Defaults to true. Disable caching by adding a unique parameter
+     * name to the request.
+     */
+    nocache : true,
+
+    /**
+     * HttpProxy implementation of DataProxy#doRequest
+     * @param {String} action
+     * @param {Ext.data.Record/Ext.data.Record[]} rs If action is <tt>read</tt>, rs will be null
+     * @param {Object} params An object containing properties which are to be used as HTTP parameters
+     * for the request to the remote server.
+     * @param {Ext.data.DataReader} reader The Reader object which converts the data
+     * object into a block of Ext.data.Records.
+     * @param {Function} callback The function into which to pass the block of Ext.data.Records.
+     * The function must be passed <ul>
+     * <li>The Record block object</li>
+     * <li>The "arg" argument from the load function</li>
+     * <li>A boolean success indicator</li>
+     * </ul>
+     * @param {Object} scope The scope in which to call the callback
+     * @param {Object} arg An optional argument which is passed to the callback as its second parameter.
+     */
+    doRequest : function(action, rs, params, reader, callback, scope, arg) {
+        var p = Ext.urlEncode(Ext.apply(params, this.extraParams));
+
+        var url = this.buildUrl(action, rs);
+        if (!url) {
+            throw new Ext.data.Api.Error('invalid-url', url);
+        }
+        url = Ext.urlAppend(url, p);
+
+        if(this.nocache){
+            url = Ext.urlAppend(url, '_dc=' + (new Date().getTime()));
+        }
+        var transId = ++Ext.data.ScriptTagProxy.TRANS_ID;
+        var trans = {
+            id : transId,
+            action: action,
+            cb : "stcCallback"+transId,
+            scriptId : "stcScript"+transId,
+            params : params,
+            arg : arg,
+            url : url,
+            callback : callback,
+            scope : scope,
+            reader : reader
+        };
+        window[trans.cb] = this.createCallback(action, rs, trans);
+        url += String.format("&{0}={1}", this.callbackParam, trans.cb);
+        if(this.autoAbort !== false){
+            this.abort();
+        }
+
+        trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]);
+
+        var script = document.createElement("script");
+        script.setAttribute("src", url);
+        script.setAttribute("type", "text/javascript");
+        script.setAttribute("id", trans.scriptId);
+        this.head.appendChild(script);
+
+        this.trans = trans;
+    },
+
+    // @private createCallback
+    createCallback : function(action, rs, trans) {
+        var self = this;
+        return function(res) {
+            self.trans = false;
+            self.destroyTrans(trans, true);
+            if (action === Ext.data.Api.actions.read) {
+                self.onRead.call(self, action, trans, res);
+            } else {
+                self.onWrite.call(self, action, trans, res, rs);
+            }
+        };
+    },
+    /**
+     * Callback for read actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onRead : function(action, trans, res) {
+        var result;
+        try {
+            result = trans.reader.readRecords(res);
+        }catch(e){
+            // @deprecated: fire loadexception
+            this.fireEvent("loadexception", this, trans, res, e);
+
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, trans.arg, false);
+            return;
+        }
+        if (result.success === false) {
+            // @deprecated: fire old loadexception for backwards-compat.
+            this.fireEvent('loadexception', this, trans, res);
+
+            this.fireEvent('exception', this, 'remote', action, trans, res, null);
+        } else {
+            this.fireEvent("load", this, res, trans.arg);
+        }
+        trans.callback.call(trans.scope||window, result, trans.arg, result.success);
+    },
+    /**
+     * Callback for write actions
+     * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
+     * @param {Object} trans The request transaction object
+     * @param {Object} res The server response
+     * @private
+     */
+    onWrite : function(action, trans, res, rs) {
+        var reader = trans.reader;
+        try {
+            // though we already have a response object here in STP, run through readResponse to catch any meta-data exceptions.
+            reader.readResponse(action, res);
+        } catch (e) {
+            this.fireEvent('exception', this, 'response', action, trans, res, e);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        if(!res[reader.meta.successProperty] === true){
+            this.fireEvent('exception', this, 'remote', action, trans, res, rs);
+            trans.callback.call(trans.scope||window, null, res, false);
+            return;
+        }
+        this.fireEvent("write", this, action, res[reader.meta.root], res, rs, trans.arg );
+        trans.callback.call(trans.scope||window, res[reader.meta.root], res, true);
+    },
+
+    // private
+    isLoading : function(){
+        return this.trans ? true : false;
+    },
+
+    /**
+     * Abort the current server request.
+     */
+    abort : function(){
+        if(this.isLoading()){
+            this.destroyTrans(this.trans);
+        }
+    },
+
+    // private
+    destroyTrans : function(trans, isLoaded){
+        this.head.removeChild(document.getElementById(trans.scriptId));
+        clearTimeout(trans.timeoutId);
+        if(isLoaded){
+            window[trans.cb] = undefined;
+            try{
+                delete window[trans.cb];
+            }catch(e){}
+        }else{
+            // if hasn't been loaded, wait for load to remove it to prevent script error
+            window[trans.cb] = function(){
+                window[trans.cb] = undefined;
+                try{
+                    delete window[trans.cb];
+                }catch(e){}
+            };
+        }
+    },
+
+    // private
+    handleFailure : function(trans){
+        this.trans = false;
+        this.destroyTrans(trans, false);
+        if (trans.action === Ext.data.Api.actions.read) {
+            // @deprecated firing loadexception
+            this.fireEvent("loadexception", this, null, trans.arg);
+        }
+
+        this.fireEvent('exception', this, 'response', trans.action, {
+            response: null,
+            options: trans.arg
+        });
+        trans.callback.call(trans.scope||window, null, trans.arg, false);
+    },
+
+    // inherit docs
+    destroy: function(){
+        this.abort();
+        Ext.data.ScriptTagProxy.superclass.destroy.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/SortTypes.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/SortTypes.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/SortTypes.js	(revision 625)
@@ -0,0 +1,91 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+/**
+ * @class Ext.data.SortTypes
+ * @singleton
+ * Defines the default sorting (casting?) comparison functions used when sorting data.
+ */
+Ext.data.SortTypes = {
+    /**
+     * Default sort that does nothing
+     * @param {Mixed} s The value being converted
+     * @return {Mixed} The comparison value
+     */
+    none : function(s){
+        return s;
+    },
+    
+    /**
+     * The regular expression used to strip tags
+     * @type {RegExp}
+     * @property
+     */
+    stripTagsRE : /<\/?[^>]+>/gi,
+    
+    /**
+     * Strips all HTML tags to sort on text only
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asText : function(s){
+        return String(s).replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Strips all HTML tags to sort on text only - Case insensitive
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCText : function(s){
+        return String(s).toUpperCase().replace(this.stripTagsRE, "");
+    },
+    
+    /**
+     * Case insensitive string
+     * @param {Mixed} s The value being converted
+     * @return {String} The comparison value
+     */
+    asUCString : function(s) {
+    	return String(s).toUpperCase();
+    },
+    
+    /**
+     * Date sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asDate : function(s) {
+        if(!s){
+            return 0;
+        }
+        if(Ext.isDate(s)){
+            return s.getTime();
+        }
+    	return Date.parse(String(s));
+    },
+    
+    /**
+     * Float sorting
+     * @param {Mixed} s The value being converted
+     * @return {Float} The comparison value
+     */
+    asFloat : function(s) {
+    	var val = parseFloat(String(s).replace(/,/g, ""));
+    	return isNaN(val) ? 0 : val;
+    },
+    
+    /**
+     * Integer sorting
+     * @param {Mixed} s The value being converted
+     * @return {Number} The comparison value
+     */
+    asInt : function(s) {
+        var val = parseInt(String(s).replace(/,/g, ""), 10);
+        return isNaN(val) ? 0 : val;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/Store.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/Store.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/Store.js	(revision 625)
@@ -0,0 +1,1492 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Store
+ * @extends Ext.util.Observable
+ * <p>The Store class encapsulates a client side cache of {@link Ext.data.Record Record}
+ * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel},
+ * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}.</p>
+ * <p><u>Retrieving Data</u></p>
+ * <p>A Store object may access a data object using:<div class="mdetail-params"><ul>
+ * <li>{@link #proxy configured implementation} of {@link Ext.data.DataProxy DataProxy}</li>
+ * <li>{@link #data} to automatically pass in data</li>
+ * <li>{@link #loadData} to manually pass in data</li>
+ * </ul></div></p>
+ * <p><u>Reading Data</u></p>
+ * <p>A Store object has no inherent knowledge of the format of the data object (it could be
+ * an Array, XML, or JSON). A Store object uses an appropriate {@link #reader configured implementation}
+ * of a {@link Ext.data.DataReader DataReader} to create {@link Ext.data.Record Record} instances from the data
+ * object.</p>
+ * <p><u>Store Types</u></p>
+ * <p>There are several implementations of Store available which are customized for use with
+ * a specific DataReader implementation.  Here is an example using an ArrayStore which implicitly
+ * creates a reader commensurate to an Array data object.</p>
+ * <pre><code>
+var myStore = new Ext.data.ArrayStore({
+    fields: ['fullname', 'first'],
+    idIndex: 0 // id for each record will be the first element
+});
+ * </code></pre>
+ * <p>For custom implementations create a basic {@link Ext.data.Store} configured as needed:</p>
+ * <pre><code>
+// create a {@link Ext.data.Record Record} constructor:
+var rt = Ext.data.Record.create([
+    {name: 'fullname'},
+    {name: 'first'}
+]);
+var myStore = new Ext.data.Store({
+    // explicitly create reader
+    reader: new Ext.data.ArrayReader(
+        {
+            idIndex: 0  // id for each record will be the first element
+        },
+        rt // recordType
+    )
+});
+ * </code></pre>
+ * <p>Load some data into store (note the data object is an array which corresponds to the reader):</p>
+ * <pre><code>
+var myData = [
+    [1, 'Fred Flintstone', 'Fred'],  // note that id for the record is the first element
+    [2, 'Barney Rubble', 'Barney']
+];
+myStore.loadData(myData);
+ * </code></pre>
+ * <p>Records are cached and made available through accessor functions.  An example of adding
+ * a record to the store:</p>
+ * <pre><code>
+var defaultData = {
+    fullname: 'Full Name',
+    first: 'First Name'
+};
+var recId = 100; // provide unique id for the record
+var r = new myStore.recordType(defaultData, ++recId); // create new record
+myStore.{@link #insert}(0, r); // insert a new record into the store (also see {@link #add})
+ * </code></pre>
+ * @constructor
+ * Creates a new Store.
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
+ * and read the data into Records.
+ * @xtype store
+ */
+Ext.data.Store = function(config){
+    this.data = new Ext.util.MixedCollection(false);
+    this.data.getKey = function(o){
+        return o.id;
+    };
+    /**
+     * See the <code>{@link #baseParams corresponding configuration option}</code>
+     * for a description of this property.
+     * To modify this property see <code>{@link #setBaseParam}</code>.
+     * @property
+     */
+    this.baseParams = {};
+
+    // temporary removed-records cache
+    this.removed = [];
+
+    if(config && config.data){
+        this.inlineData = config.data;
+        delete config.data;
+    }
+
+    Ext.apply(this, config);
+    
+    this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames);
+
+    if(this.url && !this.proxy){
+        this.proxy = new Ext.data.HttpProxy({url: this.url});
+    }
+    // If Store is RESTful, so too is the DataProxy
+    if (this.restful === true && this.proxy) {
+        // When operating RESTfully, a unique transaction is generated for each record.
+        this.batch = false;
+        Ext.data.Api.restify(this.proxy);
+    }
+
+    if(this.reader){ // reader passed
+        if(!this.recordType){
+            this.recordType = this.reader.recordType;
+        }
+        if(this.reader.onMetaChange){
+            this.reader.onMetaChange = this.onMetaChange.createDelegate(this);
+        }
+        if (this.writer) { // writer passed
+            this.writer.meta = this.reader.meta;
+            this.pruneModifiedRecords = true;
+        }
+    }
+
+    /**
+     * The {@link Ext.data.Record Record} constructor as supplied to (or created by) the
+     * {@link Ext.data.DataReader Reader}. Read-only.
+     * <p>If the Reader was constructed by passing in an Array of {@link Ext.data.Field} definition objects,
+     * instead of a Record constructor, it will implicitly create a Record constructor from that Array (see
+     * {@link Ext.data.Record}.{@link Ext.data.Record#create create} for additional details).</p>
+     * <p>This property may be used to create new Records of the type held in this Store, for example:</p><pre><code>
+// create the data store
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: [
+       {name: 'company'},
+       {name: 'price', type: 'float'},
+       {name: 'change', type: 'float'},
+       {name: 'pctChange', type: 'float'},
+       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+    ]
+});
+store.loadData(myData);
+
+// create the Grid
+var grid = new Ext.grid.EditorGridPanel({
+    store: store,
+    colModel: new Ext.grid.ColumnModel({
+        columns: [
+            {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
+            {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
+            {header: 'Change', renderer: change, dataIndex: 'change'},
+            {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
+            {header: 'Last Updated', width: 85,
+                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+                dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            width: 75
+        }
+    }),
+    autoExpandColumn: 'company', // match the id specified in the column model
+    height:350,
+    width:600,
+    title:'Array Grid',
+    tbar: [{
+        text: 'Add Record',
+        handler : function(){
+            var defaultData = {
+                change: 0,
+                company: 'New Company',
+                lastChange: (new Date()).clearTime(),
+                pctChange: 0,
+                price: 10
+            };
+            var recId = 3; // provide unique id
+            var p = new store.recordType(defaultData, recId); // create new record
+            grid.stopEditing();
+            store.{@link #insert}(0, p); // insert a new record into the store (also see {@link #add})
+            grid.startEditing(0, 0);
+        }
+    }]
+});
+     * </code></pre>
+     * @property recordType
+     * @type Function
+     */
+
+    if(this.recordType){
+        /**
+         * A {@link Ext.util.MixedCollection MixedCollection} containing the defined {@link Ext.data.Field Field}s
+         * for the {@link Ext.data.Record Records} stored in this Store. Read-only.
+         * @property fields
+         * @type Ext.util.MixedCollection
+         */
+        this.fields = this.recordType.prototype.fields;
+    }
+    this.modified = [];
+
+    this.addEvents(
+        /**
+         * @event datachanged
+         * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
+         * widget that is using this Store as a Record cache should refresh its view.
+         * @param {Store} this
+         */
+        'datachanged',
+        /**
+         * @event metachange
+         * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.
+         * @param {Store} this
+         * @param {Object} meta The JSON metadata
+         */
+        'metachange',
+        /**
+         * @event add
+         * Fires when Records have been {@link #add}ed to the Store
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The array of Records added
+         * @param {Number} index The index at which the record(s) were added
+         */
+        'add',
+        /**
+         * @event remove
+         * Fires when a Record has been {@link #remove}d from the Store
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was removed
+         * @param {Number} index The index at which the record was removed
+         */
+        'remove',
+        /**
+         * @event update
+         * Fires when a Record has been updated
+         * @param {Store} this
+         * @param {Ext.data.Record} record The Record that was updated
+         * @param {String} operation The update operation being performed.  Value may be one of:
+         * <pre><code>
+ Ext.data.Record.EDIT
+ Ext.data.Record.REJECT
+ Ext.data.Record.COMMIT
+         * </code></pre>
+         */
+        'update',
+        /**
+         * @event clear
+         * Fires when the data cache has been cleared.
+         * @param {Store} this
+         */
+        'clear',
+        /**
+         * @event exception
+         * <p>Fires if an exception occurs in the Proxy during a remote request.
+         * This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
+         * for description.
+         */
+        'exception',
+        /**
+         * @event beforeload
+         * Fires before a request is made for a new data object.  If the beforeload handler returns
+         * <tt>false</tt> the {@link #load} action will be canceled.
+         * @param {Store} this
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'beforeload',
+        /**
+         * @event load
+         * Fires after a new set of Records has been loaded.
+         * @param {Store} this
+         * @param {Ext.data.Record[]} records The Records that were loaded
+         * @param {Object} options The loading options that were specified (see {@link #load} for details)
+         */
+        'load',
+        /**
+         * @event loadexception
+         * <p>This event is <b>deprecated</b> in favor of the catch-all <b><code>{@link #exception}</code></b>
+         * event instead.</p>
+         * <p>This event is relayed through the corresponding {@link Ext.data.DataProxy}.
+         * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for additional details.
+         * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
+         * for description.
+         */
+        'loadexception',
+        /**
+         * @event beforewrite
+         * @param {DataProxy} this
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Record/Array[Record]} rs
+         * @param {Object} options The loading options that were specified. Edit <code>options.params</code> to add Http parameters to the request.  (see {@link #save} for details)
+         * @param {Object} arg The callback's arg object passed to the {@link #request} function
+         */
+        'beforewrite',
+        /**
+         * @event write
+         * Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
+         * Success or failure of the action is available in the <code>result['successProperty']</code> property.
+         * The server-code might set the <code>successProperty</code> to <tt>false</tt> if a database validation
+         * failed, for example.
+         * @param {Ext.data.Store} store
+         * @param {String} action [Ext.data.Api.actions.create|update|destroy]
+         * @param {Object} result The 'data' picked-out out of the response for convenience.
+         * @param {Ext.Direct.Transaction} res
+         * @param {Record/Record[]} rs Store's records, the subject(s) of the write-action
+         */
+        'write'
+    );
+
+    if(this.proxy){
+        this.relayEvents(this.proxy,  ['loadexception', 'exception']);
+    }
+    // With a writer set for the Store, we want to listen to add/remove events to remotely create/destroy records.
+    if (this.writer) {
+        this.on({
+            scope: this,
+            add: this.createRecords,
+            remove: this.destroyRecord,
+            update: this.updateRecord
+        });
+    }
+
+    this.sortToggle = {};
+    if(this.sortField){
+        this.setDefaultSort(this.sortField, this.sortDir);
+    }else if(this.sortInfo){
+        this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction);
+    }
+
+    Ext.data.Store.superclass.constructor.call(this);
+
+    if(this.id){
+        this.storeId = this.id;
+        delete this.id;
+    }
+    if(this.storeId){
+        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, {
+    /**
+     * @cfg {String} storeId If passed, the id to use to register with the <b>{@link Ext.StoreMgr StoreMgr}</b>.
+     * <p><b>Note</b>: if a (deprecated) <tt>{@link #id}</tt> is specified it will supersede the <tt>storeId</tt>
+     * assignment.</p>
+     */
+    /**
+     * @cfg {String} url If a <tt>{@link #proxy}</tt> is not specified the <tt>url</tt> will be used to
+     * implicitly configure a {@link Ext.data.HttpProxy HttpProxy} if an <tt>url</tt> is specified.
+     * Typically this option, or the <code>{@link #data}</code> option will be specified.
+     */
+    /**
+     * @cfg {Boolean/Object} autoLoad If <tt>{@link #data}</tt> is not specified, and if <tt>autoLoad</tt>
+     * is <tt>true</tt> or an <tt>Object</tt>, this store's {@link #load} method is automatically called
+     * after creation. If the value of <tt>autoLoad</tt> is an <tt>Object</tt>, this <tt>Object</tt> will
+     * be passed to the store's {@link #load} method.
+     */
+    /**
+     * @cfg {Ext.data.DataProxy} proxy The {@link Ext.data.DataProxy DataProxy} object which provides
+     * access to a data object.  See <code>{@link #url}</code>.
+     */
+    /**
+     * @cfg {Array} data An inline data object readable by the <code>{@link #reader}</code>.
+     * Typically this option, or the <code>{@link #url}</code> option will be specified.
+     */
+    /**
+     * @cfg {Ext.data.DataReader} reader The {@link Ext.data.DataReader Reader} object which processes the
+     * data object and returns an Array of {@link Ext.data.Record} objects which are cached keyed by their
+     * <b><tt>{@link Ext.data.Record#id id}</tt></b> property.
+     */
+    /**
+     * @cfg {Ext.data.DataWriter} writer
+     * <p>The {@link Ext.data.DataWriter Writer} object which processes a record object for being written
+     * to the server-side database.</p>
+     * <br><p>When a writer is installed into a Store the {@link #add}, {@link #remove}, and {@link #update}
+     * events on the store are monitored in order to remotely {@link #createRecords create records},
+     * {@link #destroyRecord destroy records}, or {@link #updateRecord update records}.</p>
+     * <br><p>The proxy for this store will relay any {@link #writexception} events to this store.</p>
+     * <br><p>Sample implementation:
+     * <pre><code>
+var writer = new {@link Ext.data.JsonWriter}({
+    encode: true,
+    writeAllFields: true // write all fields, not just those that changed
+});
+
+// Typical Store collecting the Proxy, Reader and Writer together.
+var store = new Ext.data.Store({
+    storeId: 'user',
+    root: 'records',
+    proxy: proxy,
+    reader: reader,
+    writer: writer,     // <-- plug a DataWriter into the store just as you would a Reader
+    paramsAsHash: true,
+    autoSave: false    // <-- false to delay executing create, update, destroy requests
+                        //     until specifically told to do so.
+});
+     * </code></pre></p>
+     */
+    writer : undefined,
+    /**
+     * @cfg {Object} baseParams
+     * <p>An object containing properties which are to be sent as parameters
+     * for <i>every</i> HTTP request.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     * <p><b>Note</b>: <code>baseParams</code> may be superseded by any <code>params</code>
+     * specified in a <code>{@link #load}</code> request, see <code>{@link #load}</code>
+     * for more details.</p>
+     * This property may be modified after creation using the <code>{@link #setBaseParam}</code>
+     * method.
+     * @property
+     */
+    /**
+     * @cfg {Object} sortInfo A config object to specify the sort order in the request of a Store's
+     * {@link #load} operation.  Note that for local sorting, the <tt>direction</tt> property is
+     * case-sensitive. See also {@link #remoteSort} and {@link #paramNames}.
+     * For example:<pre><code>
+sortInfo: {
+    field: 'fieldName',
+    direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
+}
+</code></pre>
+     */
+    /**
+     * @cfg {boolean} remoteSort <tt>true</tt> if sorting is to be handled by requesting the <tt>{@link #proxy Proxy}</tt>
+     * to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache
+     * in place (defaults to <tt>false</tt>).
+     * <p>If <tt>remoteSort</tt> is <tt>true</tt>, then clicking on a {@link Ext.grid.Column Grid Column}'s
+     * {@link Ext.grid.Column#header header} causes the current page to be requested from the server appending
+     * the following two parameters to the <b><tt>{@link #load params}</tt></b>:<div class="mdetail-params"><ul>
+     * <li><b><tt>sort</tt></b> : String<p class="sub-desc">The <tt>name</tt> (as specified in the Record's
+     * {@link Ext.data.Field Field definition}) of the field to sort on.</p></li>
+     * <li><b><tt>dir</tt></b> : String<p class="sub-desc">The direction of the sort, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul></div></p>
+     */
+    remoteSort : false,
+
+    /**
+     * @cfg {Boolean} autoDestroy <tt>true</tt> to destroy the store when the component the store is bound
+     * to is destroyed (defaults to <tt>false</tt>).
+     * <p><b>Note</b>: this should be set to true when using stores that are bound to only 1 component.</p>
+     */
+    autoDestroy : false,
+
+    /**
+     * @cfg {Boolean} pruneModifiedRecords <tt>true</tt> to clear all modified record information each time
+     * the store is loaded or when a record is removed (defaults to <tt>false</tt>). See {@link #getModifiedRecords}
+     * for the accessor method to retrieve the modified records.
+     */
+    pruneModifiedRecords : false,
+
+    /**
+     * Contains the last options object used as the parameter to the {@link #load} method. See {@link #load}
+     * for the details of what this may contain. This may be useful for accessing any params which were used
+     * to load the current Record cache.
+     * @property
+     */
+    lastOptions : null,
+
+    /**
+     * @cfg {Boolean} autoSave
+     * <p>Defaults to <tt>true</tt> causing the store to automatically {@link #save} records to
+     * the server when a record is modified (ie: becomes 'dirty'). Specify <tt>false</tt> to manually call {@link #save}
+     * to send all modifiedRecords to the server.</p>
+     * <br><p><b>Note</b>: each CRUD action will be sent as a separate request.</p>
+     */
+    autoSave : true,
+
+    /**
+     * @cfg {Boolean} batch
+     * <p>Defaults to <tt>true</tt> (unless <code>{@link #restful}:true</code>). Multiple
+     * requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined
+     * and sent as one transaction. Only applies when <code>{@link #autoSave}</code> is set
+     * to <tt>false</tt>.</p>
+     * <br><p>If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is
+     * generated for each record.</p>
+     */
+    batch : true,
+
+    /**
+     * @cfg {Boolean} restful
+     * Defaults to <tt>false</tt>.  Set to <tt>true</tt> to have the Store and the set
+     * Proxy operate in a RESTful manner. The store will automatically generate GET, POST,
+     * PUT and DELETE requests to the server. The HTTP method used for any given CRUD
+     * action is described in {@link Ext.data.Api#restActions}.  For additional information
+     * see {@link Ext.data.DataProxy#restful}.
+     * <p><b>Note</b>: if <code>{@link #restful}:true</code> <code>batch</code> will
+     * internally be set to <tt>false</tt>.</p>
+     */
+    restful: false,
+    
+    /**
+     * @cfg {Object} paramNames
+     * <p>An object containing properties which specify the names of the paging and
+     * sorting parameters passed to remote servers when loading blocks of data. By default, this
+     * object takes the following form:</p><pre><code>
+{
+    start : 'start',  // The parameter name which specifies the start row
+    limit : 'limit',  // The parameter name which specifies number of rows to return
+    sort : 'sort',    // The parameter name which specifies the column to sort on
+    dir : 'dir'       // The parameter name which specifies the sort direction
+}
+</code></pre>
+     * <p>The server must produce the requested data block upon receipt of these parameter names.
+     * If different parameter names are required, this property can be overriden using a configuration
+     * property.</p>
+     * <p>A {@link Ext.PagingToolbar PagingToolbar} bound to this Store uses this property to determine
+     * the parameter names to use in its {@link #load requests}.
+     */
+    paramNames : undefined,
+    
+    /**
+     * @cfg {Object} defaultParamNames
+     * Provides the default values for the {@link #paramNames} property. To globally modify the parameters
+     * for all stores, this object should be changed on the store prototype.
+     */
+    defaultParamNames : {
+        start : 'start',
+        limit : 'limit',
+        sort : 'sort',
+        dir : 'dir'
+    },
+
+    /**
+     * Destroys the store.
+     */
+    destroy : function(){
+        if(this.storeId){
+            Ext.StoreMgr.unregister(this);
+        }
+        this.data = null;
+        Ext.destroy(this.proxy);
+        this.reader = this.writer = null;
+        this.purgeListeners();
+    },
+
+    /**
+     * Add Records to the Store and fires the {@link #add} event.  To add Records
+     * to the store from a remote source use <code>{@link #load}({add:true})</code>.
+     * See also <code>{@link #recordType}</code> and <code>{@link #insert}</code>.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects
+     * to add to the cache. See {@link #recordType}.
+     */
+    add : function(records){
+        records = [].concat(records);
+        if(records.length < 1){
+            return;
+        }
+        for(var i = 0, len = records.length; i < len; i++){
+            records[i].join(this);
+        }
+        var index = this.data.length;
+        this.data.addAll(records);
+        if(this.snapshot){
+            this.snapshot.addAll(records);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * (Local sort only) Inserts the passed Record into the Store at the index where it
+     * should go based on the current sort information.
+     * @param {Ext.data.Record} record
+     */
+    addSorted : function(record){
+        var index = this.findInsertIndex(record);
+        this.insert(index, record);
+    },
+
+    /**
+     * Remove a Record from the Store and fires the {@link #remove} event.
+     * @param {Ext.data.Record} record The Ext.data.Record object to remove from the cache.
+     */
+    remove : function(record){
+        var index = this.data.indexOf(record);
+        if(index > -1){
+            this.data.removeAt(index);
+            if(this.pruneModifiedRecords){
+                this.modified.remove(record);
+            }
+            if(this.snapshot){
+                this.snapshot.remove(record);
+            }
+            this.fireEvent('remove', this, record, index);
+        }
+    },
+
+    /**
+     * Remove a Record from the Store at the specified index. Fires the {@link #remove} event.
+     * @param {Number} index The index of the record to remove.
+     */
+    removeAt : function(index){
+        this.remove(this.getAt(index));
+    },
+
+    /**
+     * Remove all Records from the Store and fires the {@link #clear} event.
+     */
+    removeAll : function(){
+        this.data.clear();
+        if(this.snapshot){
+            this.snapshot.clear();
+        }
+        if(this.pruneModifiedRecords){
+            this.modified = [];
+        }
+        this.fireEvent('clear', this);
+    },
+
+    /**
+     * Inserts Records into the Store at the given index and fires the {@link #add} event.
+     * See also <code>{@link #add}</code> and <code>{@link #addSorted}</code>.
+     * @param {Number} index The start index at which to insert the passed Records.
+     * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache.
+     */
+    insert : function(index, records){
+        records = [].concat(records);
+        for(var i = 0, len = records.length; i < len; i++){
+            this.data.insert(index, records[i]);
+            records[i].join(this);
+        }
+        this.fireEvent('add', this, records, index);
+    },
+
+    /**
+     * Get the index within the cache of the passed Record.
+     * @param {Ext.data.Record} record The Ext.data.Record object to find.
+     * @return {Number} The index of the passed Record. Returns -1 if not found.
+     */
+    indexOf : function(record){
+        return this.data.indexOf(record);
+    },
+
+    /**
+     * Get the index within the cache of the Record with the passed id.
+     * @param {String} id The id of the Record to find.
+     * @return {Number} The index of the Record. Returns -1 if not found.
+     */
+    indexOfId : function(id){
+        return this.data.indexOfKey(id);
+    },
+
+    /**
+     * Get the Record with the specified id.
+     * @param {String} id The id of the Record to find.
+     * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found.
+     */
+    getById : function(id){
+        return this.data.key(id);
+    },
+
+    /**
+     * Get the Record at the specified index.
+     * @param {Number} index The index of the Record to find.
+     * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found.
+     */
+    getAt : function(index){
+        return this.data.itemAt(index);
+    },
+
+    /**
+     * Returns a range of Records between specified indices.
+     * @param {Number} startIndex (optional) The starting index (defaults to 0)
+     * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store)
+     * @return {Ext.data.Record[]} An array of Records
+     */
+    getRange : function(start, end){
+        return this.data.getRange(start, end);
+    },
+
+    // private
+    storeOptions : function(o){
+        o = Ext.apply({}, o);
+        delete o.callback;
+        delete o.scope;
+        this.lastOptions = o;
+    },
+
+    /**
+     * <p>Loads the Record cache from the configured <tt>{@link #proxy}</tt> using the configured <tt>{@link #reader}</tt>.</p>
+     * <br><p>Notes:</p><div class="mdetail-params"><ul>
+     * <li><b><u>Important</u></b>: loading is asynchronous! This call will return before the new data has been
+     * loaded. To perform any post-processing where information from the load call is required, specify
+     * the <tt>callback</tt> function to be called, or use a {@link Ext.util.Observable#listeners a 'load' event handler}.</li>
+     * <li>If using {@link Ext.PagingToolbar remote paging}, the first load call must specify the <tt>start</tt> and <tt>limit</tt>
+     * properties in the <code>options.params</code> property to establish the initial position within the
+     * dataset, and the number of Records to cache on each read from the Proxy.</li>
+     * <li>If using {@link #remoteSort remote sorting}, the configured <code>{@link #sortInfo}</code>
+     * will be automatically included with the posted parameters according to the specified
+     * <code>{@link #paramNames}</code>.</li>
+     * </ul></div>
+     * @param {Object} options An object containing properties which control loading options:<ul>
+     * <li><b><tt>params</tt></b> :Object<div class="sub-desc"><p>An object containing properties to pass as HTTP
+     * parameters to a remote data source. <b>Note</b>: <code>params</code> will override any
+     * <code>{@link #baseParams}</code> of the same name.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     * <li><b><tt>callback</tt></b> : Function<div class="sub-desc"><p>A function to be called after the Records
+     * have been loaded. The <tt>callback</tt> is called after the load event and is passed the following arguments:<ul>
+     * <li><tt>r</tt> : Ext.data.Record[]</li>
+     * <li><tt>options</tt>: Options object from the load call</li>
+     * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div></li>
+     * <li><b><tt>scope</tt></b> : Object<div class="sub-desc"><p>Scope with which to call the callback (defaults
+     * to the Store object)</p></div></li>
+     * <li><b><tt>add</tt></b> : Boolean<div class="sub-desc"><p>Indicator to append loaded records rather than
+     * replace the current cache.  <b>Note</b>: see note for <tt>{@link #loadData}</tt></p></div></li>
+     * </ul>
+     * @return {Boolean} If the <i>developer</i> provided <tt>{@link #beforeload}</tt> event handler returns
+     * <tt>false</tt>, the load call will abort and will return <tt>false</tt>; otherwise will return <tt>true</tt>.
+     */
+    load : function(options) {
+        options = options || {};
+        this.storeOptions(options);
+        if(this.sortInfo && this.remoteSort){
+            var pn = this.paramNames;
+            options.params = options.params || {};
+            options.params[pn.sort] = this.sortInfo.field;
+            options.params[pn.dir] = this.sortInfo.direction;
+        }
+        try {
+            return this.execute('read', null, options); // <-- null represents rs.  No rs for load actions.
+        } catch(e) {
+            this.handleException(e);
+            return false;
+        }
+    },
+
+    /**
+     * updateRecord  Should not be used directly.  This method will be called automatically if a Writer is set.
+     * Listens to 'update' event.
+     * @param {Object} store
+     * @param {Object} record
+     * @param {Object} action
+     * @private
+     */
+    updateRecord : function(store, record, action) {
+        if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid))) {
+            this.save();
+        }
+    },
+
+    /**
+     * Should not be used directly.  Store#add will call this automatically if a Writer is set
+     * @param {Object} store
+     * @param {Object} rs
+     * @param {Object} index
+     * @private
+     */
+    createRecords : function(store, rs, index) {
+        for (var i = 0, len = rs.length; i < len; i++) {
+            if (rs[i].phantom && rs[i].isValid()) {
+                rs[i].markDirty();  // <-- Mark new records dirty
+                this.modified.push(rs[i]);  // <-- add to modified
+            }
+        }
+        if (this.autoSave === true) {
+            this.save();
+        }
+    },
+
+    /**
+     * Destroys a record or records.  Should not be used directly.  It's called by Store#remove if a Writer is set.
+     * @param {Store} this
+     * @param {Ext.data.Record/Ext.data.Record[]}
+     * @param {Number} index
+     * @private
+     */
+    destroyRecord : function(store, record, index) {
+        if (this.modified.indexOf(record) != -1) {  // <-- handled already if @cfg pruneModifiedRecords == true
+            this.modified.remove(record);
+        }
+        if (!record.phantom) {
+            this.removed.push(record);
+
+            // since the record has already been removed from the store but the server request has not yet been executed,
+            // must keep track of the last known index this record existed.  If a server error occurs, the record can be
+            // put back into the store.  @see Store#createCallback where the record is returned when response status === false
+            record.lastIndex = index;
+
+            if (this.autoSave === true) {
+                this.save();
+            }
+        }
+    },
+
+    /**
+     * This method should generally not be used directly.  This method is called internally
+     * by {@link #load}, or if a Writer is set will be called automatically when {@link #add},
+     * {@link #remove}, or {@link #update} events fire.
+     * @param {String} action Action name ('read', 'create', 'update', or 'destroy')
+     * @param {Record/Record[]} rs
+     * @param {Object} options
+     * @throws Error
+     * @private
+     */
+    execute : function(action, rs, options) {
+        // blow up if action not Ext.data.CREATE, READ, UPDATE, DESTROY
+        if (!Ext.data.Api.isAction(action)) {
+            throw new Ext.data.Api.Error('execute', action);
+        }
+        // make sure options has a params key
+        options = Ext.applyIf(options||{}, {
+            params: {}
+        });
+
+        // have to separate before-events since load has a different signature than create,destroy and save events since load does not
+        // include the rs (record resultset) parameter.  Capture return values from the beforeaction into doRequest flag.
+        var doRequest = true;
+
+        if (action === 'read') {
+            doRequest = this.fireEvent('beforeload', this, options);
+        }
+        else {
+            // if Writer is configured as listful, force single-recoord rs to be [{}} instead of {}
+            if (this.writer.listful === true && this.restful !== true) {
+                rs = (Ext.isArray(rs)) ? rs : [rs];
+            }
+            // if rs has just a single record, shift it off so that Writer writes data as '{}' rather than '[{}]'
+            else if (Ext.isArray(rs) && rs.length == 1) {
+                rs = rs.shift();
+            }
+            // Write the action to options.params
+            if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) {
+                this.writer.write(action, options.params, rs);
+            }
+        }
+        if (doRequest !== false) {
+            // Send request to proxy.
+            var params = Ext.apply({}, options.params, this.baseParams);
+            if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) {
+                params.xaction = action;
+            }
+            // Note:  Up until this point we've been dealing with 'action' as a key from Ext.data.Api.actions.  We'll flip it now
+            // and send the value into DataProxy#request, since it's the value which maps to the DataProxy#api
+            this.proxy.request(Ext.data.Api.actions[action], rs, params, this.reader, this.createCallback(action, rs), this, options);
+        }
+        return doRequest;
+    },
+
+    /**
+     * Saves all pending changes to the store.  If the commensurate Ext.data.Api.actions action is not configured, then
+     * the configured <code>{@link #url}</code> will be used.
+     * <pre>
+     * change            url
+     * ---------------   --------------------
+     * removed records   Ext.data.Api.actions.destroy
+     * phantom records   Ext.data.Api.actions.create
+     * {@link #getModifiedRecords modified records}  Ext.data.Api.actions.update
+     * </pre>
+     * @TODO:  Create extensions of Error class and send associated Record with thrown exceptions.
+     * e.g.:  Ext.data.DataReader.Error or Ext.data.Error or Ext.data.DataProxy.Error, etc.
+     */
+    save : function() {
+        if (!this.writer) {
+            throw new Ext.data.Store.Error('writer-undefined');
+        }
+
+        // DESTROY:  First check for removed records.  Records in this.removed are guaranteed non-phantoms.  @see Store#remove
+        if (this.removed.length) {
+            this.doTransaction('destroy', this.removed);
+        }
+
+        // Check for modified records. Use a copy so Store#rejectChanges will work if server returns error.
+        var rs = [].concat(this.getModifiedRecords());
+        if (!rs.length) { // Bail-out if empty...
+            return true;
+        }
+
+        // CREATE:  Next check for phantoms within rs.  splice-off and execute create.
+        var phantoms = [];
+        for (var i = rs.length-1; i >= 0; i--) {
+            if (rs[i].phantom === true) {
+                var rec = rs.splice(i, 1).shift();
+                if (rec.isValid()) {
+                    phantoms.push(rec);
+                }
+            } else if (!rs[i].isValid()) { // <-- while we're here, splice-off any !isValid real records
+                rs.splice(i,1);
+            }
+        }
+        // If we have valid phantoms, create them...
+        if (phantoms.length) {
+            this.doTransaction('create', phantoms);
+        }
+
+        // UPDATE:  And finally, if we're still here after splicing-off phantoms and !isValid real records, update the rest...
+        if (rs.length) {
+            this.doTransaction('update', rs);
+        }
+        return true;
+    },
+
+    // private.  Simply wraps call to Store#execute in try/catch.  Defers to Store#handleException on error.  Loops if batch: false
+    doTransaction : function(action, rs) {
+        function transaction(records) {
+            try {
+                this.execute(action, records);
+            } catch (e) {
+                this.handleException(e);
+            }
+        }
+        if (this.batch === false) {
+            for (var i = 0, len = rs.length; i < len; i++) {
+                transaction.call(this, rs[i]);
+            }
+        } else {
+            transaction.call(this, rs);
+        }
+    },
+
+    // @private callback-handler for remote CRUD actions
+    // Do not override -- override loadRecords, onCreateRecords, onDestroyRecords and onUpdateRecords instead.
+    createCallback : function(action, rs) {
+        var actions = Ext.data.Api.actions;
+        return (action == 'read') ? this.loadRecords : function(data, response, success) {
+            // calls: onCreateRecords | onUpdateRecords | onDestroyRecords
+            this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, data);
+            // If success === false here, exception will have been called in DataProxy
+            if (success === true) {
+                this.fireEvent('write', this, action, data, response, rs);
+            }
+        };
+    },
+
+    // Clears records from modified array after an exception event.
+    // NOTE:  records are left marked dirty.  Do we want to commit them even though they were not updated/realized?
+    clearModified : function(rs) {
+        if (Ext.isArray(rs)) {
+            for (var n=rs.length-1;n>=0;n--) {
+                this.modified.splice(this.modified.indexOf(rs[n]), 1);
+            }
+        } else {
+            this.modified.splice(this.modified.indexOf(rs), 1);
+        }
+    },
+
+    // remap record ids in MixedCollection after records have been realized.  @see Store#onCreateRecords, @see DataReader#realize
+    reMap : function(record) {
+        if (Ext.isArray(record)) {
+            for (var i = 0, len = record.length; i < len; i++) {
+                this.reMap(record[i]);
+            }
+        } else {
+            delete this.data.map[record._phid];
+            this.data.map[record.id] = record;
+            var index = this.data.keys.indexOf(record._phid);
+            this.data.keys.splice(index, 1, record.id);
+            delete record._phid;
+        }
+    },
+
+    // @protected onCreateRecord proxy callback for create action
+    onCreateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.realize(rs, data);
+                this.reMap(rs);
+            }
+            catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#realize splices-off the rs until empty.
+                    this.onCreateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected, onUpdateRecords proxy callback for update action
+    onUpdateRecords : function(success, rs, data) {
+        if (success === true) {
+            try {
+                this.reader.update(rs, data);
+            } catch (e) {
+                this.handleException(e);
+                if (Ext.isArray(rs)) {
+                    // Recurse to run back into the try {}.  DataReader#update splices-off the rs until empty.
+                    this.onUpdateRecords(success, rs, data);
+                }
+            }
+        }
+    },
+
+    // @protected onDestroyRecords proxy callback for destroy action
+    onDestroyRecords : function(success, rs, data) {
+        // splice each rec out of this.removed
+        rs = (rs instanceof Ext.data.Record) ? [rs] : rs;
+        for (var i=0,len=rs.length;i<len;i++) {
+            this.removed.splice(this.removed.indexOf(rs[i]), 1);
+        }
+        if (success === false) {
+            // put records back into store if remote destroy fails.
+            // @TODO: Might want to let developer decide.
+            for (i=rs.length-1;i>=0;i--) {
+                this.insert(rs[i].lastIndex, rs[i]);    // <-- lastIndex set in Store#destroyRecord
+            }
+        }
+    },
+
+    // protected handleException.  Possibly temporary until Ext framework has an exception-handler.
+    handleException : function(e) {
+        // @see core/Error.js
+        Ext.handleError(e);
+    },
+
+    /**
+     * <p>Reloads the Record cache from the configured Proxy using the configured {@link Ext.data.Reader Reader} and
+     * the options from the last load operation performed.</p>
+     * <p><b>Note</b>: see the Important note in {@link #load}.</p>
+     * @param {Object} options (optional) An <tt>Object</tt> containing {@link #load loading options} which may
+     * override the options used in the last {@link #load} operation. See {@link #load} for details (defaults to
+     * <tt>null</tt>, in which case the {@link #lastOptions} are used).
+     */
+    reload : function(options){
+        this.load(Ext.applyIf(options||{}, this.lastOptions));
+    },
+
+    // private
+    // Called as a callback by the Reader during a load operation.
+    loadRecords : function(o, options, success){
+        if(!o || success === false){
+            if(success !== false){
+                this.fireEvent('load', this, [], options);
+            }
+            if(options.callback){
+                options.callback.call(options.scope || this, [], options, false, o);
+            }
+            return;
+        }
+        var r = o.records, t = o.totalRecords || r.length;
+        if(!options || options.add !== true){
+            if(this.pruneModifiedRecords){
+                this.modified = [];
+            }
+            for(var i = 0, len = r.length; i < len; i++){
+                r[i].join(this);
+            }
+            if(this.snapshot){
+                this.data = this.snapshot;
+                delete this.snapshot;
+            }
+            this.data.clear();
+            this.data.addAll(r);
+            this.totalLength = t;
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            this.totalLength = Math.max(t, this.data.length+r.length);
+            this.add(r);
+        }
+        this.fireEvent('load', this, r, options);
+        if(options.callback){
+            options.callback.call(options.scope || this, r, options, true);
+        }
+    },
+
+    /**
+     * Loads data from a passed data block and fires the {@link #load} event. A {@link Ext.data.Reader Reader}
+     * which understands the format of the data must have been configured in the constructor.
+     * @param {Object} data The data block from which to read the Records.  The format of the data expected
+     * is dependent on the type of {@link Ext.data.Reader Reader} that is configured and should correspond to
+     * that {@link Ext.data.Reader Reader}'s <tt>{@link Ext.data.Reader#readRecords}</tt> parameter.
+     * @param {Boolean} append (Optional) <tt>true</tt> to append the new Records rather the default to replace
+     * the existing cache.
+     * <b>Note</b>: that Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records
+     * with ids which are already present in the Store will <i>replace</i> existing Records. Only Records with
+     * new, unique ids will be added.
+     */
+    loadData : function(o, append){
+        var r = this.reader.readRecords(o);
+        this.loadRecords(r, {add: append}, true);
+    },
+
+    /**
+     * Gets the number of cached records.
+     * <p>If using paging, this may not be the total size of the dataset. If the data object
+     * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns
+     * the dataset size.  <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records in the Store's cache.
+     */
+    getCount : function(){
+        return this.data.length || 0;
+    },
+
+    /**
+     * Gets the total number of records in the dataset as returned by the server.
+     * <p>If using paging, for this to be accurate, the data object used by the {@link #reader Reader}
+     * must contain the dataset size. For remote data sources, the value for this property
+     * (<tt>totalProperty</tt> for {@link Ext.data.JsonReader JsonReader},
+     * <tt>totalRecords</tt> for {@link Ext.data.XmlReader XmlReader}) shall be returned by a query on the server.
+     * <b>Note</b>: see the Important note in {@link #load}.</p>
+     * @return {Number} The number of Records as specified in the data object passed to the Reader
+     * by the Proxy.
+     * <p><b>Note</b>: this value is not updated when changing the contents of the Store locally.</p>
+     */
+    getTotalCount : function(){
+        return this.totalLength || 0;
+    },
+
+    /**
+     * Returns an object describing the current sort state of this Store.
+     * @return {Object} The sort state of the Store. An object with two properties:<ul>
+     * <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li>
+     * <li><b>direction : String<p class="sub-desc">The sort order, 'ASC' or 'DESC' (case-sensitive).</p></li>
+     * </ul>
+     * See <tt>{@link #sortInfo}</tt> for additional details.
+     */
+    getSortState : function(){
+        return this.sortInfo;
+    },
+
+    // private
+    applySort : function(){
+        if(this.sortInfo && !this.remoteSort){
+            var s = this.sortInfo, f = s.field;
+            this.sortData(f, s.direction);
+        }
+    },
+
+    // private
+    sortData : function(f, direction){
+        direction = direction || 'ASC';
+        var st = this.fields.get(f).sortType;
+        var fn = function(r1, r2){
+            var v1 = st(r1.data[f]), v2 = st(r2.data[f]);
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        };
+        this.data.sort(direction, fn);
+        if(this.snapshot && this.snapshot != this.data){
+            this.snapshot.sort(direction, fn);
+        }
+    },
+
+    /**
+     * Sets the default sort column and order to be used by the next {@link #load} operation.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    setDefaultSort : function(field, dir){
+        dir = dir ? dir.toUpperCase() : 'ASC';
+        this.sortInfo = {field: field, direction: dir};
+        this.sortToggle[field] = dir;
+    },
+
+    /**
+     * Sort the Records.
+     * If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local
+     * sorting is used, the cache is sorted internally. See also {@link #remoteSort} and {@link #paramNames}.
+     * @param {String} fieldName The name of the field to sort by.
+     * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
+     */
+    sort : function(fieldName, dir){
+        var f = this.fields.get(fieldName);
+        if(!f){
+            return false;
+        }
+        if(!dir){
+            if(this.sortInfo && this.sortInfo.field == f.name){ // toggle sort dir
+                dir = (this.sortToggle[f.name] || 'ASC').toggle('ASC', 'DESC');
+            }else{
+                dir = f.sortDir;
+            }
+        }
+        var st = (this.sortToggle) ? this.sortToggle[f.name] : null;
+        var si = (this.sortInfo) ? this.sortInfo : null;
+
+        this.sortToggle[f.name] = dir;
+        this.sortInfo = {field: f.name, direction: dir};
+        if(!this.remoteSort){
+            this.applySort();
+            this.fireEvent('datachanged', this);
+        }else{
+            if (!this.load(this.lastOptions)) {
+                if (st) {
+                    this.sortToggle[f.name] = st;
+                }
+                if (si) {
+                    this.sortInfo = si;
+                }
+            }
+        }
+    },
+
+    /**
+     * Calls the specified function for each of the {@link Ext.data.Record Records} in the cache.
+     * @param {Function} fn The function to call. The {@link Ext.data.Record Record} is passed as the first parameter.
+     * Returning <tt>false</tt> aborts and exits the iteration.
+     * @param {Object} scope (optional) The scope in which to call the function (defaults to the {@link Ext.data.Record Record}).
+     */
+    each : function(fn, scope){
+        this.data.each(fn, scope);
+    },
+
+    /**
+     * Gets all {@link Ext.data.Record records} modified since the last commit.  Modified records are
+     * persisted across load operations (e.g., during paging). <b>Note</b>: deleted records are not
+     * included.  See also <tt>{@link #pruneModifiedRecords}</tt> and
+     * {@link Ext.data.Record}<tt>{@link Ext.data.Record#markDirty markDirty}.</tt>.
+     * @return {Ext.data.Record[]} An array of {@link Ext.data.Record Records} containing outstanding
+     * modifications.  To obtain modified fields within a modified record see
+     *{@link Ext.data.Record}<tt>{@link Ext.data.Record#modified modified}.</tt>.
+     */
+    getModifiedRecords : function(){
+        return this.modified;
+    },
+
+    // private
+    createFilterFn : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return false;
+        }
+        value = this.data.createValueMatcher(value, anyMatch, caseSensitive);
+        return function(r){
+            return value.test(r.data[property]);
+        };
+    },
+
+    /**
+     * Sums the value of <tt>property</tt> for each {@link Ext.data.Record record} between <tt>start</tt>
+     * and <tt>end</tt> and returns the result.
+     * @param {String} property A field in each record
+     * @param {Number} start (optional) The record index to start at (defaults to <tt>0</tt>)
+     * @param {Number} end (optional) The last record index to include (defaults to length - 1)
+     * @return {Number} The sum
+     */
+    sum : function(property, start, end){
+        var rs = this.data.items, v = 0;
+        start = start || 0;
+        end = (end || end === 0) ? end : rs.length-1;
+
+        for(var i = start; i <= end; i++){
+            v += (rs[i].data[property] || 0);
+        }
+        return v;
+    },
+
+    /**
+     * Filter the {@link Ext.data.Record records} by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field should begin with, or a RegExp to test
+     * against the field.
+     * @param {Boolean} anyMatch (optional) <tt>true</tt> to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) <tt>true</tt> for case sensitive comparison
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.filterBy(fn) : this.clearFilter();
+    },
+
+    /**
+     * Filter by a function. The specified function will be called for each
+     * Record in this Store. If the function returns <tt>true</tt> the Record is included,
+     * otherwise it is filtered out.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     */
+    filterBy : function(fn, scope){
+        this.snapshot = this.snapshot || this.data;
+        this.data = this.queryBy(fn, scope||this);
+        this.fireEvent('datachanged', this);
+    },
+
+    /**
+     * Query the records by a specified property.
+     * @param {String} field A field on your records
+     * @param {String/RegExp} value Either a string that the field
+     * should begin with, or a RegExp to test against the field.
+     * @param {Boolean} anyMatch (optional) True to match any part not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     */
+    query : function(property, value, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.queryBy(fn) : this.data.clone();
+    },
+
+    /**
+     * Query the cached records in this Store using a filtering function. The specified function
+     * will be called with each record in this Store. If the function returns <tt>true</tt> the record is
+     * included in the results.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
+     **/
+    queryBy : function(fn, scope){
+        var data = this.snapshot || this.data;
+        return data.filterBy(fn, scope||this);
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either a string that the property value
+     * should begin with, or a RegExp to test against the property.
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
+     * @return {Number} The matched index or -1
+     */
+    find : function(property, value, start, anyMatch, caseSensitive){
+        var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
+        return fn ? this.data.findIndexBy(fn, null, start) : -1;
+    },
+
+    /**
+     * Finds the index of the first matching record in this store by a specific property/value.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value The value to match against
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findExact: function(property, value, start){
+        return this.data.findIndexBy(function(rec){
+            return rec.get(property) === value;
+        }, this, start);
+    },
+
+    /**
+     * Find the index of the first matching Record in this Store by a function.
+     * If the function returns <tt>true</tt> it is considered a match.
+     * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
+     * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
+     * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
+     * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @param {Number} startIndex (optional) The index to start searching at
+     * @return {Number} The matched index or -1
+     */
+    findBy : function(fn, scope, start){
+        return this.data.findIndexBy(fn, scope, start);
+    },
+
+    /**
+     * Collects unique values for a particular dataIndex from this store.
+     * @param {String} dataIndex The property to collect
+     * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values
+     * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered
+     * @return {Array} An array of the unique values
+     **/
+    collect : function(dataIndex, allowNull, bypassFilter){
+        var d = (bypassFilter === true && this.snapshot) ?
+                this.snapshot.items : this.data.items;
+        var v, sv, r = [], l = {};
+        for(var i = 0, len = d.length; i < len; i++){
+            v = d[i].data[dataIndex];
+            sv = String(v);
+            if((allowNull || !Ext.isEmpty(v)) && !l[sv]){
+                l[sv] = true;
+                r[r.length] = v;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Revert to a view of the Record cache with no filtering applied.
+     * @param {Boolean} suppressEvent If <tt>true</tt> the filter is cleared silently without firing the
+     * {@link #datachanged} event.
+     */
+    clearFilter : function(suppressEvent){
+        if(this.isFiltered()){
+            this.data = this.snapshot;
+            delete this.snapshot;
+            if(suppressEvent !== true){
+                this.fireEvent('datachanged', this);
+            }
+        }
+    },
+
+    /**
+     * Returns true if this store is currently filtered
+     * @return {Boolean}
+     */
+    isFiltered : function(){
+        return this.snapshot && this.snapshot != this.data;
+    },
+
+    // private
+    afterEdit : function(record){
+        if(this.modified.indexOf(record) == -1){
+            this.modified.push(record);
+        }
+        this.fireEvent('update', this, record, Ext.data.Record.EDIT);
+    },
+
+    // private
+    afterReject : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.REJECT);
+    },
+
+    // private
+    afterCommit : function(record){
+        this.modified.remove(record);
+        this.fireEvent('update', this, record, Ext.data.Record.COMMIT);
+    },
+
+    /**
+     * Commit all Records with {@link #getModifiedRecords outstanding changes}. To handle updates for changes,
+     * subscribe to the Store's {@link #update update event}, and perform updating when the third parameter is
+     * Ext.data.Record.COMMIT.
+     */
+    commitChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].commit();
+        }
+    },
+
+    /**
+     * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}.
+     */
+    rejectChanges : function(){
+        var m = this.modified.slice(0);
+        this.modified = [];
+        for(var i = 0, len = m.length; i < len; i++){
+            m[i].reject();
+        }
+    },
+
+    // private
+    onMetaChange : function(meta, rtype, o){
+        this.recordType = rtype;
+        this.fields = rtype.prototype.fields;
+        delete this.snapshot;
+        if(meta.sortInfo){
+            this.sortInfo = meta.sortInfo;
+        }else if(this.sortInfo  && !this.fields.get(this.sortInfo.field)){
+            delete this.sortInfo;
+        }
+        this.modified = [];
+        this.fireEvent('metachange', this, this.reader.meta);
+    },
+
+    // private
+    findInsertIndex : function(record){
+        this.suspendEvents();
+        var data = this.data.clone();
+        this.data.add(record);
+        this.applySort();
+        var index = this.data.indexOf(record);
+        this.data = data;
+        this.resumeEvents();
+        return index;
+    },
+
+    /**
+     * Set the value for a property name in this store's {@link #baseParams}.  Usage:</p><pre><code>
+myStore.setBaseParam('foo', {bar:3});
+</code></pre>
+     * @param {String} name Name of the property to assign
+     * @param {Mixed} value Value to assign the <tt>name</tt>d property
+     **/
+    setBaseParam : function (name, value){
+        this.baseParams = this.baseParams || {};
+        this.baseParams[name] = value;
+    }
+});
+
+Ext.reg('store', Ext.data.Store);
+
+/**
+ * @class Ext.data.Store.Error
+ * @extends Ext.Error
+ * Store Error extension.
+ * @param {String} name
+ */
+Ext.data.Store.Error = Ext.extend(Ext.Error, {
+    name: 'Ext.data.Store'
+});
+Ext.apply(Ext.data.Store.Error.prototype, {
+    lang: {
+        'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.'
+    }
+});
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/StoreMgr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/StoreMgr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/StoreMgr.js	(revision 625)
@@ -0,0 +1,72 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.StoreMgr
+ * @extends Ext.util.MixedCollection
+ * The default global group of stores.
+ * @singleton
+ */
+Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
+    /**
+     * @cfg {Object} listeners @hide
+     */
+
+    /**
+     * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
+     * manually.  Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. 
+     * @param {Ext.data.Store} store1 A Store instance
+     * @param {Ext.data.Store} store2 (optional)
+     * @param {Ext.data.Store} etc... (optional)
+     */
+    register : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.add(s);
+        }
+    },
+
+    /**
+     * Unregisters one or more Stores with the StoreMgr
+     * @param {String/Object} id1 The id of the Store, or a Store instance
+     * @param {String/Object} id2 (optional)
+     * @param {String/Object} etc... (optional)
+     */
+    unregister : function(){
+        for(var i = 0, s; (s = arguments[i]); i++){
+            this.remove(this.lookup(s));
+        }
+    },
+
+    /**
+     * Gets a registered Store by id
+     * @param {String/Object} id The id of the Store, or a Store instance
+     * @return {Ext.data.Store}
+     */
+    lookup : function(id){
+        if(Ext.isArray(id)){
+            var fields = ['field1'], expand = !Ext.isArray(id[0]);
+            if(!expand){
+                for(var i = 2, len = id[0].length; i <= len; ++i){
+                    fields.push('field' + i);
+                }
+            }
+            return new Ext.data.ArrayStore({
+                fields: fields,
+                data: id,
+                expandData: expand,
+                autoDestroy: true,
+                autoCreated: true
+
+            });
+        }
+        return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
+    },
+
+    // getKey implementation for MixedCollection
+    getKey : function(o){
+         return o.storeId;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/Tree.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/Tree.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/Tree.js	(revision 625)
@@ -0,0 +1,785 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.Tree
+ * @extends Ext.util.Observable
+ * Represents a tree data structure and bubbles all the events for its nodes. The nodes
+ * in the tree have most standard DOM functionality.
+ * @constructor
+ * @param {Node} root (optional) The root node
+ */
+Ext.data.Tree = function(root){
+   this.nodeHash = {};
+   /**
+    * The root node for this tree
+    * @type Node
+    */
+   this.root = null;
+   if(root){
+       this.setRootNode(root);
+   }
+   this.addEvents(
+       /**
+        * @event append
+        * Fires when a new child node is appended to a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append",
+       /**
+        * @event remove
+        * Fires when a child node is removed from a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node removed
+        */
+       "remove",
+       /**
+        * @event move
+        * Fires when a node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node moved
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move",
+       /**
+        * @event insert
+        * Fires when a new child node is inserted in a node in this tree.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert",
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend",
+       /**
+        * @event beforeremove
+        * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove",
+       /**
+        * @event beforemove
+        * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} node The node being moved
+        * @param {Node} oldParent The parent of the node
+        * @param {Node} newParent The new parent the node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove",
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} parent The parent node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert"
+   );
+
+    Ext.data.Tree.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Tree, Ext.util.Observable, {
+    /**
+     * @cfg {String} pathSeparator
+     * The token used to separate paths in node ids (defaults to '/').
+     */
+    pathSeparator: "/",
+
+    // private
+    proxyNodeEvent : function(){
+        return this.fireEvent.apply(this, arguments);
+    },
+
+    /**
+     * Returns the root node for this tree.
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id.
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    }
+});
+
+/**
+ * @class Ext.data.Node
+ * @extends Ext.util.Observable
+ * @cfg {Boolean} leaf true if this node is a leaf and does not have children
+ * @cfg {String} id The id for this node. If one is not specified, one is generated.
+ * @constructor
+ * @param {Object} attributes The attributes/config for the node
+ */
+Ext.data.Node = function(attributes){
+    /**
+     * The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
+     * @type {Object}
+     */
+    this.attributes = attributes || {};
+    this.leaf = this.attributes.leaf;
+    /**
+     * The node id. @type String
+     */
+    this.id = this.attributes.id;
+    if(!this.id){
+        this.id = Ext.id(null, "xnode-");
+        this.attributes.id = this.id;
+    }
+    /**
+     * All child nodes of this node. @type Array
+     */
+    this.childNodes = [];
+    if(!this.childNodes.indexOf){ // indexOf is a must
+        this.childNodes.indexOf = function(o){
+            for(var i = 0, len = this.length; i < len; i++){
+                if(this[i] == o){
+                    return i;
+                }
+            }
+            return -1;
+        };
+    }
+    /**
+     * The parent node for this node. @type Node
+     */
+    this.parentNode = null;
+    /**
+     * The first direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.firstChild = null;
+    /**
+     * The last direct child node of this node, or null if this node has no child nodes. @type Node
+     */
+    this.lastChild = null;
+    /**
+     * The node immediately preceding this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.previousSibling = null;
+    /**
+     * The node immediately following this node in the tree, or null if there is no sibling node. @type Node
+     */
+    this.nextSibling = null;
+
+    this.addEvents({
+       /**
+        * @event append
+        * Fires when a new child node is appended
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The newly appended node
+        * @param {Number} index The index of the newly appended node
+        */
+       "append" : true,
+       /**
+        * @event remove
+        * Fires when a child node is removed
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The removed node
+        */
+       "remove" : true,
+       /**
+        * @event move
+        * Fires when this node is moved to a new location in the tree
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The old parent of this node
+        * @param {Node} newParent The new parent of this node
+        * @param {Number} index The index it was moved to
+        */
+       "move" : true,
+       /**
+        * @event insert
+        * Fires when a new child node is inserted.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node inserted
+        * @param {Node} refNode The child node the node was inserted before
+        */
+       "insert" : true,
+       /**
+        * @event beforeappend
+        * Fires before a new child is appended, return false to cancel the append.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be appended
+        */
+       "beforeappend" : true,
+       /**
+        * @event beforeremove
+        * Fires before a child is removed, return false to cancel the remove.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be removed
+        */
+       "beforeremove" : true,
+       /**
+        * @event beforemove
+        * Fires before this node is moved to a new location in the tree. Return false to cancel the move.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} oldParent The parent of this node
+        * @param {Node} newParent The new parent this node is moving to
+        * @param {Number} index The index it is being moved to
+        */
+       "beforemove" : true,
+       /**
+        * @event beforeinsert
+        * Fires before a new child is inserted, return false to cancel the insert.
+        * @param {Tree} tree The owner tree
+        * @param {Node} this This node
+        * @param {Node} node The child node to be inserted
+        * @param {Node} refNode The child node the node is being inserted before
+        */
+       "beforeinsert" : true
+   });
+    this.listeners = this.attributes.listeners;
+    Ext.data.Node.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.data.Node, Ext.util.Observable, {
+    // private
+    fireEvent : function(evtName){
+        // first do standard event for this node
+        if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){
+            return false;
+        }
+        // then bubble it up to the tree if the event wasn't cancelled
+        var ot = this.getOwnerTree();
+        if(ot){
+            if(ot.proxyNodeEvent.apply(ot, arguments) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Returns true if this node is a leaf
+     * @return {Boolean}
+     */
+    isLeaf : function(){
+        return this.leaf === true;
+    },
+
+    // private
+    setFirstChild : function(node){
+        this.firstChild = node;
+    },
+
+    //private
+    setLastChild : function(node){
+        this.lastChild = node;
+    },
+
+
+    /**
+     * Returns true if this node is the last child of its parent
+     * @return {Boolean}
+     */
+    isLast : function(){
+       return (!this.parentNode ? true : this.parentNode.lastChild == this);
+    },
+
+    /**
+     * Returns true if this node is the first child of its parent
+     * @return {Boolean}
+     */
+    isFirst : function(){
+       return (!this.parentNode ? true : this.parentNode.firstChild == this);
+    },
+
+    /**
+     * Returns true if this node has one or more child nodes, else false.
+     * @return {Boolean}
+     */
+    hasChildNodes : function(){
+        return !this.isLeaf() && this.childNodes.length > 0;
+    },
+    
+    /**
+     * Returns true if this node has one or more child nodes, or if the <tt>expandable</tt>
+     * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false.
+     * @return {Boolean}
+     */
+    isExpandable : function(){
+        return this.attributes.expandable || this.hasChildNodes();
+    },
+
+    /**
+     * Insert node(s) as the last child node of this node.
+     * @param {Node/Array} node The node or Array of nodes to append
+     * @return {Node} The appended node if single append, or null if an array was passed
+     */
+    appendChild : function(node){
+        var multi = false;
+        if(Ext.isArray(node)){
+            multi = node;
+        }else if(arguments.length > 1){
+            multi = arguments;
+        }
+        // if passed an array or multiple args do them one by one
+        if(multi){
+            for(var i = 0, len = multi.length; i < len; i++) {
+            	this.appendChild(multi[i]);
+            }
+        }else{
+            if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){
+                return false;
+            }
+            var index = this.childNodes.length;
+            var oldParent = node.parentNode;
+            // it's a move, make sure we move it cleanly
+            if(oldParent){
+                if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){
+                    return false;
+                }
+                oldParent.removeChild(node);
+            }
+            index = this.childNodes.length;
+            if(index === 0){
+                this.setFirstChild(node);
+            }
+            this.childNodes.push(node);
+            node.parentNode = this;
+            var ps = this.childNodes[index-1];
+            if(ps){
+                node.previousSibling = ps;
+                ps.nextSibling = node;
+            }else{
+                node.previousSibling = null;
+            }
+            node.nextSibling = null;
+            this.setLastChild(node);
+            node.setOwnerTree(this.getOwnerTree());
+            this.fireEvent("append", this.ownerTree, this, node, index);
+            if(oldParent){
+                node.fireEvent("move", this.ownerTree, node, oldParent, this, index);
+            }
+            return node;
+        }
+    },
+
+    /**
+     * Removes a child node from this node.
+     * @param {Node} node The node to remove
+     * @return {Node} The removed node
+     */
+    removeChild : function(node){
+        var index = this.childNodes.indexOf(node);
+        if(index == -1){
+            return false;
+        }
+        if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){
+            return false;
+        }
+
+        // remove it from childNodes collection
+        this.childNodes.splice(index, 1);
+
+        // update siblings
+        if(node.previousSibling){
+            node.previousSibling.nextSibling = node.nextSibling;
+        }
+        if(node.nextSibling){
+            node.nextSibling.previousSibling = node.previousSibling;
+        }
+
+        // update child refs
+        if(this.firstChild == node){
+            this.setFirstChild(node.nextSibling);
+        }
+        if(this.lastChild == node){
+            this.setLastChild(node.previousSibling);
+        }
+
+        node.setOwnerTree(null);
+        // clear any references from the node
+        node.parentNode = null;
+        node.previousSibling = null;
+        node.nextSibling = null;
+        this.fireEvent("remove", this.ownerTree, this, node);
+        return node;
+    },
+
+    /**
+     * Inserts the first node before the second node in this nodes childNodes collection.
+     * @param {Node} node The node to insert
+     * @param {Node} refNode The node to insert before (if null the node is appended)
+     * @return {Node} The inserted node
+     */
+    insertBefore : function(node, refNode){
+        if(!refNode){ // like standard Dom, refNode can be null for append
+            return this.appendChild(node);
+        }
+        // nothing to do
+        if(node == refNode){
+            return false;
+        }
+
+        if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){
+            return false;
+        }
+        var index = this.childNodes.indexOf(refNode);
+        var oldParent = node.parentNode;
+        var refIndex = index;
+
+        // when moving internally, indexes will change after remove
+        if(oldParent == this && this.childNodes.indexOf(node) < index){
+            refIndex--;
+        }
+
+        // it's a move, make sure we move it cleanly
+        if(oldParent){
+            if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){
+                return false;
+            }
+            oldParent.removeChild(node);
+        }
+        if(refIndex === 0){
+            this.setFirstChild(node);
+        }
+        this.childNodes.splice(refIndex, 0, node);
+        node.parentNode = this;
+        var ps = this.childNodes[refIndex-1];
+        if(ps){
+            node.previousSibling = ps;
+            ps.nextSibling = node;
+        }else{
+            node.previousSibling = null;
+        }
+        node.nextSibling = refNode;
+        refNode.previousSibling = node;
+        node.setOwnerTree(this.getOwnerTree());
+        this.fireEvent("insert", this.ownerTree, this, node, refNode);
+        if(oldParent){
+            node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode);
+        }
+        return node;
+    },
+
+    /**
+     * Removes this node from its parent
+     * @return {Node} this
+     */
+    remove : function(){
+        this.parentNode.removeChild(this);
+        return this;
+    },
+
+    /**
+     * Returns the child node at the specified index.
+     * @param {Number} index
+     * @return {Node}
+     */
+    item : function(index){
+        return this.childNodes[index];
+    },
+
+    /**
+     * Replaces one child node in this node with another.
+     * @param {Node} newChild The replacement node
+     * @param {Node} oldChild The node to replace
+     * @return {Node} The replaced node
+     */
+    replaceChild : function(newChild, oldChild){
+        var s = oldChild ? oldChild.nextSibling : null;
+        this.removeChild(oldChild);
+        this.insertBefore(newChild, s);
+        return oldChild;
+    },
+
+    /**
+     * Returns the index of a child node
+     * @param {Node} node
+     * @return {Number} The index of the node or -1 if it was not found
+     */
+    indexOf : function(child){
+        return this.childNodes.indexOf(child);
+    },
+
+    /**
+     * Returns the tree this node is in.
+     * @return {Tree}
+     */
+    getOwnerTree : function(){
+        // if it doesn't have one, look for one
+        if(!this.ownerTree){
+            var p = this;
+            while(p){
+                if(p.ownerTree){
+                    this.ownerTree = p.ownerTree;
+                    break;
+                }
+                p = p.parentNode;
+            }
+        }
+        return this.ownerTree;
+    },
+
+    /**
+     * Returns depth of this node (the root node has a depth of 0)
+     * @return {Number}
+     */
+    getDepth : function(){
+        var depth = 0;
+        var p = this;
+        while(p.parentNode){
+            ++depth;
+            p = p.parentNode;
+        }
+        return depth;
+    },
+
+    // private
+    setOwnerTree : function(tree){
+        // if it is a move, we need to update everyone
+        if(tree != this.ownerTree){
+            if(this.ownerTree){
+                this.ownerTree.unregisterNode(this);
+            }
+            this.ownerTree = tree;
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].setOwnerTree(tree);
+            }
+            if(tree){
+                tree.registerNode(this);
+            }
+        }
+    },
+    
+    /**
+     * Changes the id of this node.
+     * @param {String} id The new id for the node.
+     */
+    setId: function(id){
+        if(id !== this.id){
+            var t = this.ownerTree;
+            if(t){
+                t.unregisterNode(this);
+            }
+            this.id = id;
+            if(t){
+                t.registerNode(this);
+            }
+            this.onIdChange(id);
+        }
+    },
+    
+    // private
+    onIdChange: Ext.emptyFn,
+
+    /**
+     * Returns the path for this node. The path can be used to expand or select this node programmatically.
+     * @param {String} attr (optional) The attr to use for the path (defaults to the node's id)
+     * @return {String} The path
+     */
+    getPath : function(attr){
+        attr = attr || "id";
+        var p = this.parentNode;
+        var b = [this.attributes[attr]];
+        while(p){
+            b.unshift(p.attributes[attr]);
+            p = p.parentNode;
+        }
+        var sep = this.getOwnerTree().pathSeparator;
+        return sep + b.join(sep);
+    },
+
+    /**
+     * Bubbles up the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.parentNode;
+        }
+    },
+
+    /**
+     * Cascades down the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].cascade(fn, scope, args);
+            }
+        }
+    },
+
+    /**
+     * Interates the child nodes of this node, calling the specified function with each node. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current node. The arguments to the function
+     * will be the args provided or the current node. If the function returns false at any point,
+     * the iteration stops.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current node)
+     */
+    eachChild : function(fn, scope, args){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.apply(scope || this, args || [cs[i]]) === false){
+        	    break;
+        	}
+        }
+    },
+
+    /**
+     * Finds the first child that has the attribute with the specified value.
+     * @param {String} attribute The attribute name
+     * @param {Mixed} value The value to search for
+     * @return {Node} The found child or null if none was found
+     */
+    findChild : function(attribute, value){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(cs[i].attributes[attribute] == value){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Finds the first child by a custom function. The child matches if the function passed
+     * returns true.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Node} The found child or null if none was found
+     */
+    findChildBy : function(fn, scope){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	if(fn.call(scope||cs[i], cs[i]) === true){
+        	    return cs[i];
+        	}
+        }
+        return null;
+    },
+
+    /**
+     * Sorts this nodes children using the supplied sort function
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     */
+    sort : function(fn, scope){
+        var cs = this.childNodes;
+        var len = cs.length;
+        if(len > 0){
+            var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn;
+            cs.sort(sortFn);
+            for(var i = 0; i < len; i++){
+                var n = cs[i];
+                n.previousSibling = cs[i-1];
+                n.nextSibling = cs[i+1];
+                if(i === 0){
+                    this.setFirstChild(n);
+                }
+                if(i == len-1){
+                    this.setLastChild(n);
+                }
+            }
+        }
+    },
+
+    /**
+     * Returns true if this node is an ancestor (at any point) of the passed node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    contains : function(node){
+        return node.isAncestor(this);
+    },
+
+    /**
+     * Returns true if the passed node is an ancestor (at any point) of this node.
+     * @param {Node} node
+     * @return {Boolean}
+     */
+    isAncestor : function(node){
+        var p = this.parentNode;
+        while(p){
+            if(p == node){
+                return true;
+            }
+            p = p.parentNode;
+        }
+        return false;
+    },
+
+    toString : function(){
+        return "[Node"+(this.id?" "+this.id:"")+"]";
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlReader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlReader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlReader.js	(revision 625)
@@ -0,0 +1,128 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.XmlReader
+ * @extends Ext.data.DataReader
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
+ * <p><b>Note</b>: that in order for the browser to parse a returned XML document, the Content-Type
+ * header in the HTTP response must be set to "text/xml" or "application/xml".</p>
+ * <p>Example code:</p>
+ * <pre><code>
+var Employee = Ext.data.Record.create([
+   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it is the same as "name"
+   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
+]);
+var myReader = new Ext.data.XmlReader({
+   totalRecords: "results", // The element which contains the total dataset size (optional)
+   record: "row",           // The repeated element which contains row information
+   id: "id"                 // The element within the row that provides an ID for the record (optional)
+}, Employee);
+</code></pre>
+ * <p>
+ * This would consume an XML file like this:
+ * <pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;dataset>
+ &lt;results>2&lt;/results>
+ &lt;row>
+   &lt;id>1&lt;/id>
+   &lt;name>Bill&lt;/name>
+   &lt;occupation>Gardener&lt;/occupation>
+ &lt;/row>
+ &lt;row>
+   &lt;id>2&lt;/id>
+   &lt;name>Ben&lt;/name>
+   &lt;occupation>Horticulturalist&lt;/occupation>
+ &lt;/row>
+&lt;/dataset>
+</code></pre>
+ * @cfg {String} totalRecords The DomQuery path from which to retrieve the total number of records
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
+ * paged from the remote server.
+ * @cfg {String} record The DomQuery path to the repeated element which contains record information.
+ * @cfg {String} success The DomQuery path to the success attribute used by forms.
+ * @cfg {String} idPath The DomQuery path relative from the record element to the element that contains
+ * a record identifier value.
+ * @constructor
+ * Create a new XmlReader.
+ * @param {Object} meta Metadata configuration options
+ * @param {Object} recordType Either an Array of field definition objects as passed to
+ * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}.
+ */
+Ext.data.XmlReader = function(meta, recordType){
+    meta = meta || {};
+    Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
+    /**
+     * This method is only used by a DataProxy which has retrieved data from a remote server.
+     * @param {Object} response The XHR object which contains the parsed XML document.  The response is expected
+     * to contain a property called <tt>responseXML</tt> which refers to an XML document object.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    read : function(response){
+        var doc = response.responseXML;
+        if(!doc) {
+            throw {message: "XmlReader.read: XML Document not available"};
+        }
+        return this.readRecords(doc);
+    },
+
+    /**
+     * Create a data block containing Ext.data.Records from an XML document.
+     * @param {Object} doc A parsed XML document.
+     * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
+     * a cache of Ext.data.Records.
+     */
+    readRecords : function(doc){
+        /**
+         * After any data loads/reads, the raw XML Document is available for further custom processing.
+         * @type XMLDocument
+         */
+        this.xmlData = doc;
+        var root = doc.documentElement || doc;
+        var q = Ext.DomQuery;
+        var recordType = this.recordType, fields = recordType.prototype.fields;
+        var sid = this.meta.idPath || this.meta.id;
+        var totalRecords = 0, success = true;
+        if(this.meta.totalRecords){
+            totalRecords = q.selectNumber(this.meta.totalRecords, root, 0);
+        }
+
+        if(this.meta.success){
+            var sv = q.selectValue(this.meta.success, root, true);
+            success = sv !== false && sv !== 'false';
+        }
+        var records = [];
+        var ns = q.select(this.meta.record, root);
+        for(var i = 0, len = ns.length; i < len; i++) {
+            var n = ns[i];
+            var values = {};
+            var id = sid ? q.selectValue(sid, n) : undefined;
+            for(var j = 0, jlen = fields.length; j < jlen; j++){
+                var f = fields.items[j];
+                var v = q.selectValue(Ext.value(f.mapping, f.name, true), n, f.defaultValue);
+                v = f.convert(v, n);
+                values[f.name] = v;
+            }
+            var record = new recordType(values, id);
+            record.node = n;
+            records[records.length] = record;
+        }
+
+        return {
+            success : success,
+            records : records,
+            totalRecords : totalRecords || records.length
+        };
+    },
+
+    // TODO: implement readResponse for XmlReader
+    readResponse : Ext.emptyFn
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlStore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlStore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlStore.js	(revision 625)
@@ -0,0 +1,75 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.XmlStore
+ * @extends Ext.data.Store
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
+ * A XmlStore will be automatically configured with a {@link Ext.data.XmlReader}.</p>
+ * <p>A store configuration would be something like:<pre><code>
+var store = new Ext.data.XmlStore({
+    // store configs
+    autoDestroy: true,
+    storeId: 'myStore',
+    url: 'sheldon.xml', // automatically configures a HttpProxy
+    // reader configs
+    record: 'Item', // records will have an "Item" tag
+    idPath: 'ASIN',
+    totalRecords: '@TotalResults'
+    fields: [
+        // set up the fields mapping into the xml doc
+        // The first needs mapping, the others are very basic
+        {name: 'Author', mapping: 'ItemAttributes > Author'},
+        'Title', 'Manufacturer', 'ProductGroup'
+    ]
+});
+ * </code></pre></p>
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
+&#60?xml version="1.0" encoding="UTF-8"?>
+&#60ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
+    &#60Items>
+        &#60Request>
+            &#60IsValid>True&#60/IsValid>
+            &#60ItemSearchRequest>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60SearchIndex>Books&#60/SearchIndex>
+            &#60/ItemSearchRequest>
+        &#60/Request>
+        &#60TotalResults>203&#60/TotalResults>
+        &#60TotalPages>21&#60/TotalPages>
+        &#60Item>
+            &#60ASIN>0446355453&#60/ASIN>
+            &#60DetailPageURL>
+                http://www.amazon.com/
+            &#60/DetailPageURL>
+            &#60ItemAttributes>
+                &#60Author>Sidney Sheldon&#60/Author>
+                &#60Manufacturer>Warner Books&#60/Manufacturer>
+                &#60ProductGroup>Book&#60/ProductGroup>
+                &#60Title>Master of the Game&#60/Title>
+            &#60/ItemAttributes>
+        &#60/Item>
+    &#60/Items>
+&#60/ItemSearchResponse>
+ * </code></pre>
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
+ * <p><b>Note:</b> Although not listed here, this class accepts all of the configuration options of 
+ * <b>{@link Ext.data.XmlReader XmlReader}</b>.</p>
+ * @constructor
+ * @param {Object} config
+ * @xtype xmlstore
+ */
+Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
+    /**
+     * @cfg {Ext.data.DataReader} reader @hide
+     */
+    constructor: function(config){
+        Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, {
+            reader: new Ext.data.XmlReader(config)
+        }));
+    }
+});
+Ext.reg('xmlstore', Ext.data.XmlStore);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlWriter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlWriter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/XmlWriter.js	(revision 625)
@@ -0,0 +1,45 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.data.XmlWriter
+ * @extends Ext.data.DataWriter
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action via XML.
+ */
+Ext.data.XmlWriter = Ext.extend(Ext.data.DataWriter, {
+    /**
+     * Final action of a write event.  Apply the written data-object to params.
+     * @param {String} action [Ext.data.Api.create|read|update|destroy]
+     * @param {Record[]} rs
+     * @param {Object} http params
+     * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
+     */
+    render : function(action, rs, params, data) {
+        // no impl.
+    },
+    /**
+     * createRecord
+     * @param {Ext.data.Record} rec
+     */
+    createRecord : function(rec) {
+        // no impl
+    },
+    /**
+     * updateRecord
+     * @param {Ext.data.Record} rec
+     */
+    updateRecord : function(rec) {
+        // no impl.
+
+    },
+    /**
+     * destroyRecord
+     * @param {Ext.data.Record} rec
+     */
+    destroyRecord : function(rec) {
+        // no impl
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/data/core/Connection.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/data/core/Connection.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/data/core/Connection.js	(revision 625)
@@ -0,0 +1,575 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+    var BEFOREREQUEST = "beforerequest",
+        REQUESTCOMPLETE = "requestcomplete",
+        REQUESTEXCEPTION = "requestexception",
+        UNDEFINED = undefined,
+        LOAD = 'load',
+        POST = 'POST',
+        GET = 'GET',
+        WINDOW = window;
+    
+    /**
+     * @class Ext.data.Connection
+     * @extends Ext.util.Observable
+     * <p>The class encapsulates a connection to the page's originating domain, allowing requests to be made
+     * either to a configured URL, or to a URL specified at request time.</p>
+     * <p>Requests made by this class are asynchronous, and will return immediately. No data from
+     * the server will be available to the statement immediately following the {@link #request} call.
+     * To process returned data, use a
+     * <a href="#request-option-success" ext:member="request-option-success" ext:cls="Ext.data.Connection">success callback</a>
+     * in the request options object,
+     * or an {@link #requestcomplete event listener}.</p>
+     * <p><h3>File Uploads</h3><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that
+     * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+     * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     * @constructor
+     * @param {Object} config a configuration object.
+     */
+    Ext.data.Connection = function(config){    
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event beforerequest
+             * Fires before a network request is made to retrieve a data object.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            BEFOREREQUEST,
+            /**
+             * @event requestcomplete
+             * Fires if the request was successfully completed.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTCOMPLETE,
+            /**
+             * @event requestexception
+             * Fires if an error HTTP status was returned from the server.
+             * See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP Status Code Definitions</a>
+             * for details of HTTP status codes.
+             * @param {Connection} conn This Connection object.
+             * @param {Object} response The XHR object containing the response data.
+             * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a>
+             * for details.
+             * @param {Object} options The options config object passed to the {@link #request} method.
+             */
+            REQUESTEXCEPTION
+        );
+        Ext.data.Connection.superclass.constructor.call(this);
+    };
+
+    // private
+    function handleResponse(response){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTCOMPLETE, this, response, options);
+        if(options.success){
+            options.success.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, true, response);
+        }
+    }
+
+    // private
+    function handleFailure(response, e){
+        this.transId = false;
+        var options = response.argument.options;
+        response.argument = options ? options.argument : null;
+        this.fireEvent(REQUESTEXCEPTION, this, response, options, e);
+        if(options.failure){
+            options.failure.call(options.scope, response, options);
+        }
+        if(options.callback){
+            options.callback.call(options.scope, options, false, response);
+        }
+    }
+
+    // private
+    function doFormUpload(o, ps, url){
+        var id = Ext.id(),
+            doc = document,
+            frame = doc.createElement('iframe'),
+            form = Ext.getDom(o.form),
+            hiddens = [],
+            hd,
+            encoding = 'multipart/form-data',
+            buf = {
+                target: form.target,
+                method: form.method,
+                encoding: form.encoding,
+                enctype: form.enctype,
+                action: form.action
+            };
+            
+        Ext.apply(frame, {
+            id: id,
+            name: id,
+            className: 'x-hidden',
+            src: Ext.SSL_SECURE_URL // for IE
+        });     
+        doc.body.appendChild(frame);
+        
+        // This is required so that IE doesn't pop the response up in a new window.
+        if(Ext.isIE){
+           document.frames[id].name = id;
+        }
+        
+        Ext.apply(form, {
+            target: id,
+            method: POST,
+            enctype: encoding,
+            encoding: encoding,
+            action: url || buf.action
+        });
+        
+        // add dynamic params            
+        ps = Ext.urlDecode(ps, false);
+        for(var k in ps){
+            if(ps.hasOwnProperty(k)){
+                hd = doc.createElement('input');
+                hd.type = 'hidden';                    
+                hd.value = ps[hd.name = k];
+                form.appendChild(hd);
+                hiddens.push(hd);
+            }
+        }        
+
+        function cb(){
+            var me = this,
+                // bogus response object
+                r = {responseText : '',
+                     responseXML : null,
+                     argument : o.argument},
+                doc,
+                firstChild;
+
+            try{ 
+                doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document;
+                if(doc){
+                    if(doc.body){
+                        if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){ // json response wrapped in textarea                        
+                            r.responseText = firstChild.value;
+                        }else{
+                            r.responseText = doc.body.innerHTML;
+                        }
+                    }
+                    //in IE the document may still have a body even if returns XML.
+                    r.responseXML = doc.XMLDocument || doc;
+                }
+            }
+            catch(e) {}
+
+            Ext.EventManager.removeListener(frame, LOAD, cb, me);
+
+            me.fireEvent(REQUESTCOMPLETE, me, r, o);
+            
+            function runCallback(fn, scope, args){
+                if(Ext.isFunction(fn)){
+                    fn.apply(scope, args);
+                }
+            }
+
+            runCallback(o.success, o.scope, [r, o]);
+            runCallback(o.callback, o.scope, [o, true, r]);
+
+            if(!me.debugUploads){
+                setTimeout(function(){Ext.removeNode(frame);}, 100);
+            }
+        }
+
+        Ext.EventManager.on(frame, LOAD, cb, this);
+        form.submit();
+        
+        Ext.apply(form, buf);
+        Ext.each(hiddens, function(h) {
+            Ext.removeNode(h);
+        });
+    }
+
+    Ext.extend(Ext.data.Connection, Ext.util.Observable, {
+        /**
+         * @cfg {String} url (Optional) <p>The default URL to be used for requests to the server. Defaults to undefined.</p>
+         * <p>The <code>url</code> config may be a function which <i>returns</i> the URL to use for the Ajax request. The scope
+         * (<code><b>this</b></code> reference) of the function is the <code>scope</code> option passed to the {@link #request} method.</p>
+         */
+        /**
+         * @cfg {Object} extraParams (Optional) An object containing properties which are used as
+         * extra parameters to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added
+         *  to each request made by this object. (defaults to undefined)
+         */
+        /**
+         * @cfg {String} method (Optional) The default HTTP method to be used for requests.
+         * (defaults to undefined; if not set, but {@link #request} params are present, POST will be used;
+         * otherwise, GET will be used.)
+         */
+        /**
+         * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
+         */
+        timeout : 30000,
+        /**
+         * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false)
+         * @type Boolean
+         */
+        autoAbort:false,
+    
+        /**
+         * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
+         * @type Boolean
+         */
+        disableCaching: true,
+        
+        /**
+         * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching
+         * through a cache buster. Defaults to '_dc'
+         * @type String
+         */
+        disableCachingParam: '_dc',
+        
+        /**
+         * <p>Sends an HTTP request to a remote server.</p>
+         * <p><b>Important:</b> Ajax server requests are asynchronous, and this call will
+         * return before the response has been received. Process any returned data
+         * in a callback function.</p>
+         * <pre><code>
+Ext.Ajax.request({
+   url: 'ajax_demo/sample.json',
+   success: function(response, opts) {
+      var obj = Ext.decode(response.responseText);
+      console.dir(obj);
+   },
+   failure: function(response, opts) {
+      console.log('server-side failure with status code ' + response.status);
+   }
+});
+         * </code></pre>
+         * <p>To execute a callback function in the correct scope, use the <tt>scope</tt> option.</p>
+         * @param {Object} options An object which may contain the following properties:<ul>
+         * <li><b>url</b> : String/Function (Optional)<div class="sub-desc">The URL to
+         * which to send the request, or a function to call which returns a URL string. The scope of the
+         * function is specified by the <tt>scope</tt> option. Defaults to the configured
+         * <tt>{@link #url}</tt>.</div></li>
+         * <li><b>params</b> : Object/String/Function (Optional)<div class="sub-desc">
+         * An object containing properties which are used as parameters to the
+         * request, a url encoded string or a function to call to get either. The scope of the function
+         * is specified by the <tt>scope</tt> option.</div></li>
+         * <li><b>method</b> : String (Optional)<div class="sub-desc">The HTTP method to use
+         * for the request. Defaults to the configured method, or if no method was configured,
+         * "GET" if no parameters are being sent, and "POST" if parameters are being sent.  Note that
+         * the method name is case-sensitive and should be all caps.</div></li>
+         * <li><b>callback</b> : Function (Optional)<div class="sub-desc">The
+         * function to be called upon receipt of the HTTP response. The callback is
+         * called regardless of success or failure and is passed the following
+         * parameters:<ul>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * <li><b>success</b> : Boolean<div class="sub-desc">True if the request succeeded.</div></li>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data. 
+         * See <a href="http://www.w3.org/TR/XMLHttpRequest/">http://www.w3.org/TR/XMLHttpRequest/</a> for details about 
+         * accessing elements of the response.</div></li>
+         * </ul></div></li>
+         * <li><a id="request-option-success"></a><b>success</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon success of the request. The callback is passed the following
+         * parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>failure</b> : Function (Optional)<div class="sub-desc">The function
+         * to be called upon failure of the request. The callback is passed the
+         * following parameters:<ul>
+         * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li>
+         * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
+         * </ul></div></li>
+         * <li><b>scope</b> : Object (Optional)<div class="sub-desc">The scope in
+         * which to execute the callbacks: The "this" object for the callback function. If the <tt>url</tt>, or <tt>params</tt> options were
+         * specified as functions from which to draw values, then this also serves as the scope for those function calls.
+         * Defaults to the browser window.</div></li>
+         * <li><b>timeout</b> : Number (Optional)<div class="sub-desc">The timeout in milliseconds to be used for this request. Defaults to 30 seconds.</div></li>
+         * <li><b>form</b> : Element/HTMLElement/String (Optional)<div class="sub-desc">The <tt>&lt;form&gt;</tt>
+         * Element or the id of the <tt>&lt;form&gt;</tt> to pull parameters from.</div></li>
+         * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc"><b>Only meaningful when used 
+         * with the <tt>form</tt> option</b>.
+         * <p>True if the form object is a file upload (will be set automatically if the form was
+         * configured with <b><tt>enctype</tt></b> "multipart/form-data").</p>
+         * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+         * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+         * DOM <tt>&lt;form></tt> element temporarily modified to have its
+         * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+         * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+         * but removed after the return data has been gathered.</p>
+         * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+         * server is using JSON to send the return object, then the
+         * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+         * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+         * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+         * is created containing a <tt>responseText</tt> property in order to conform to the
+         * requirements of event handlers and callbacks.</p>
+         * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+         * and some server technologies (notably JEE) may require some custom processing in order to
+         * retrieve parameter names and parameter values from the packet content.</p>
+         * </div></li>
+         * <li><b>headers</b> : Object (Optional)<div class="sub-desc">Request
+         * headers to set for the request.</div></li>
+         * <li><b>xmlData</b> : Object (Optional)<div class="sub-desc">XML document
+         * to use for the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>jsonData</b> : Object/String (Optional)<div class="sub-desc">JSON
+         * data to use as the post. Note: This will be used instead of params for the post
+         * data. Any params will be appended to the URL.</div></li>
+         * <li><b>disableCaching</b> : Boolean (Optional)<div class="sub-desc">True
+         * to add a unique cache-buster param to GET requests.</div></li>
+         * </ul></p>
+         * <p>The options object may also contain any other property which might be needed to perform
+         * postprocessing in a callback because it is passed to callback functions.</p>
+         * @return {Number} transactionId The id of the server transaction. This may be used
+         * to cancel the request.
+         */
+        request : function(o){
+            var me = this;
+            if(me.fireEvent(BEFOREREQUEST, me, o)){
+                if (o.el) {
+                    if(!Ext.isEmpty(o.indicatorText)){
+                        me.indicatorText = '<div class="loading-indicator">'+o.indicatorText+"</div>";
+                    }
+                    if(me.indicatorText) {
+                        Ext.getDom(o.el).innerHTML = me.indicatorText;                        
+                    }
+                    o.success = (Ext.isFunction(o.success) ? o.success : function(){}).createInterceptor(function(response) {
+                        Ext.getDom(o.el).innerHTML = response.responseText;
+                    });
+                }
+                
+                var p = o.params,
+                    url = o.url || me.url,                
+                    method,
+                    cb = {success: handleResponse,
+                          failure: handleFailure,
+                          scope: me,
+                          argument: {options: o},
+                          timeout : o.timeout || me.timeout
+                    },
+                    form,                    
+                    serForm;                    
+                  
+                     
+                if (Ext.isFunction(p)) {
+                    p = p.call(o.scope||WINDOW, o);
+                }
+                                                           
+                p = Ext.urlEncode(me.extraParams, Ext.isObject(p) ? Ext.urlEncode(p) : p);    
+                
+                if (Ext.isFunction(url)) {
+                    url = url.call(o.scope || WINDOW, o);
+                }
+    
+                if((form = Ext.getDom(o.form))){
+                    url = url || form.action;
+                     if(o.isUpload || /multipart\/form-data/i.test(form.getAttribute("enctype"))) { 
+                         return doFormUpload.call(me, o, p, url);
+                     }
+                    serForm = Ext.lib.Ajax.serializeForm(form);                    
+                    p = p ? (p + '&' + serForm) : serForm;
+                }
+                
+                method = o.method || me.method || ((p || o.xmlData || o.jsonData) ? POST : GET);
+                
+                if(method === GET && (me.disableCaching && o.disableCaching !== false) || o.disableCaching === true){
+                    var dcp = o.disableCachingParam || me.disableCachingParam;
+                    url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime()));
+                }
+                
+                o.headers = Ext.apply(o.headers || {}, me.defaultHeaders || {});
+                
+                if(o.autoAbort === true || me.autoAbort) {
+                    me.abort();
+                }
+                 
+                if((method == GET || o.xmlData || o.jsonData) && p){
+                    url = Ext.urlAppend(url, p);  
+                    p = '';
+                }
+                return (me.transId = Ext.lib.Ajax.request(method, url, cb, p, o));
+            }else{                
+                return o.callback ? o.callback.apply(o.scope, [o,UNDEFINED,UNDEFINED]) : null;
+            }
+        },
+    
+        /**
+         * Determine whether this object has a request outstanding.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         * @return {Boolean} True if there is an outstanding request.
+         */
+        isLoading : function(transId){
+            return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId;            
+        },
+    
+        /**
+         * Aborts any outstanding request.
+         * @param {Number} transactionId (Optional) defaults to the last transaction
+         */
+        abort : function(transId){
+            if(transId || this.isLoading()){
+                Ext.lib.Ajax.abort(transId || this.transId);
+            }
+        }
+    });
+})();
+
+/**
+ * @class Ext.Ajax
+ * @extends Ext.data.Connection
+ * <p>The global Ajax request class that provides a simple way to make Ajax requests
+ * with maximum flexibility.</p>
+ * <p>Since Ext.Ajax is a singleton, you can set common properties/events for it once
+ * and override them at the request function level only if necessary.</p>
+ * <p>Common <b>Properties</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link #method}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #extraParams}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link #url}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Default headers to pass in every request
+Ext.Ajax.defaultHeaders = {
+    'Powered-By': 'Ext'
+};
+ * </code></pre> 
+ * </p>
+ * <p>Common <b>Events</b> you may want to set are:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.data.Connection#beforerequest beforerequest}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestcomplete requestcomplete}</tt></b><p class="sub-desc"></p></li>
+ * <li><b><tt>{@link Ext.data.Connection#requestexception requestexception}</tt></b><p class="sub-desc"></p></li>
+ * </ul></div>
+ * <pre><code>
+// Example: show a spinner during all Ajax requests
+Ext.Ajax.on('beforerequest', this.showSpinner, this);
+Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
+Ext.Ajax.on('requestexception', this.hideSpinner, this);
+ * </code></pre> 
+ * </p>
+ * <p>An example request:</p>
+ * <pre><code>
+// Basic request
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+   url: 'foo.php',
+   success: someFn,
+   failure: otherFn,
+   headers: {
+       'my-header': 'foo'
+   },
+   params: { foo: 'bar' }
+});
+
+// Simple ajax form submission
+Ext.Ajax.{@link Ext.data.Connection#request request}({
+    form: 'some-form',
+    params: 'foo=bar'
+});
+ * </code></pre> 
+ * </p>
+ * @singleton
+ */
+Ext.Ajax = new Ext.data.Connection({
+    /**
+     * @cfg {String} url @hide
+     */
+    /**
+     * @cfg {Object} extraParams @hide
+     */
+    /**
+     * @cfg {Object} defaultHeaders @hide
+     */
+    /**
+     * @cfg {String} method (Optional) @hide
+     */
+    /**
+     * @cfg {Number} timeout (Optional) @hide
+     */
+    /**
+     * @cfg {Boolean} autoAbort (Optional) @hide
+     */
+
+    /**
+     * @cfg {Boolean} disableCaching (Optional) @hide
+     */
+
+    /**
+     * @property  disableCaching
+     * True to add a unique cache-buster param to GET requests. (defaults to true)
+     * @type Boolean
+     */
+    /**
+     * @property  url
+     * The default URL to be used for requests to the server. (defaults to undefined)
+     * If the server receives all requests through one URL, setting this once is easier than
+     * entering it on every request.
+     * @type String
+     */
+    /**
+     * @property  extraParams
+     * An object containing properties which are used as extra parameters to each request made
+     * by this object (defaults to undefined). Session information and other data that you need
+     * to pass with each request are commonly put here.
+     * @type Object
+     */
+    /**
+     * @property  defaultHeaders
+     * An object containing request headers which are added to each request made by this object
+     * (defaults to undefined).
+     * @type Object
+     */
+    /**
+     * @property  method
+     * The default HTTP method to be used for requests. Note that this is case-sensitive and
+     * should be all caps (defaults to undefined; if not set but params are present will use
+     * <tt>"POST"</tt>, otherwise will use <tt>"GET"</tt>.)
+     * @type String
+     */
+    /**
+     * @property  timeout
+     * The timeout in milliseconds to be used for requests. (defaults to 30000)
+     * @type Number
+     */
+
+    /**
+     * @property  autoAbort
+     * Whether a new request should abort any pending requests. (defaults to false)
+     * @type Boolean
+     */
+    autoAbort : false,
+
+    /**
+     * Serialize the passed form into a url encoded string
+     * @param {String/HTMLElement} form
+     * @return {String}
+     */
+    serializeForm : function(form){
+        return Ext.lib.Ajax.serializeForm(form);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DDCore.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DDCore.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DDCore.js	(revision 625)
@@ -0,0 +1,2992 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * These classes are derivatives of the similarly named classes in the YUI Library.
+ * The original license:
+ * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.net/yui/license.txt
+ */
+
+(function() {
+
+var Event=Ext.EventManager;
+var Dom=Ext.lib.Dom;
+
+/**
+ * @class Ext.dd.DragDrop
+ * Defines the interface and base operation of items that that can be
+ * dragged or can be drop targets.  It was designed to be extended, overriding
+ * the event handlers for startDrag, onDrag, onDragOver and onDragOut.
+ * Up to three html elements can be associated with a DragDrop instance:
+ * <ul>
+ * <li>linked element: the element that is passed into the constructor.
+ * This is the element which defines the boundaries for interaction with
+ * other DragDrop objects.</li>
+ * <li>handle element(s): The drag operation only occurs if the element that
+ * was clicked matches a handle element.  By default this is the linked
+ * element, but there are times that you will want only a portion of the
+ * linked element to initiate the drag operation, and the setHandleElId()
+ * method provides a way to define this.</li>
+ * <li>drag element: this represents the element that would be moved along
+ * with the cursor during a drag operation.  By default, this is the linked
+ * element itself as in {@link Ext.dd.DD}.  setDragElId() lets you define
+ * a separate element that would be moved, as in {@link Ext.dd.DDProxy}.
+ * </li>
+ * </ul>
+ * This class should not be instantiated until the onload event to ensure that
+ * the associated elements are available.
+ * The following would define a DragDrop obj that would interact with any
+ * other DragDrop obj in the "group1" group:
+ * <pre>
+ *  dd = new Ext.dd.DragDrop("div1", "group1");
+ * </pre>
+ * Since none of the event handlers have been implemented, nothing would
+ * actually happen if you were to run the code above.  Normally you would
+ * override this class or one of the default implementations, but you can
+ * also override the methods you want on an instance of the class...
+ * <pre>
+ *  dd.onDragDrop = function(e, id) {
+ *  &nbsp;&nbsp;alert("dd was dropped on " + id);
+ *  }
+ * </pre>
+ * @constructor
+ * @param {String} id of the element that is linked to this instance
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DragDrop:
+ *                    padding, isTarget, maintainOffset, primaryButtonOnly
+ */
+Ext.dd.DragDrop = function(id, sGroup, config) {
+    if(id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.dd.DragDrop.prototype = {
+
+    /**
+     * Set to false to enable a DragDrop object to fire drag events while dragging
+     * over its own Element. Defaults to true - DragDrop objects do not by default
+     * fire drag events to themselves.
+     * @property ignoreSelf
+     * @type Boolean
+     */
+
+    /**
+     * The id of the element associated with this object.  This is what we
+     * refer to as the "linked element" because the size and position of
+     * this element is used to determine when the drag and drop objects have
+     * interacted.
+     * @property id
+     * @type String
+     */
+    id: null,
+
+    /**
+     * Configuration attributes passed into the constructor
+     * @property config
+     * @type object
+     */
+    config: null,
+
+    /**
+     * The id of the element that will be dragged.  By default this is same
+     * as the linked element , but could be changed to another element. Ex:
+     * Ext.dd.DDProxy
+     * @property dragElId
+     * @type String
+     * @private
+     */
+    dragElId: null,
+
+    /**
+     * The ID of the element that initiates the drag operation.  By default
+     * this is the linked element, but could be changed to be a child of this
+     * element.  This lets us do things like only starting the drag when the
+     * header element within the linked html element is clicked.
+     * @property handleElId
+     * @type String
+     * @private
+     */
+    handleElId: null,
+
+    /**
+     * An object who's property names identify HTML tags to be considered invalid as drag handles.
+     * A non-null property value identifies the tag as invalid. Defaults to the 
+     * following value which prevents drag operations from being initiated by &lt;a> elements:<pre><code>
+{
+    A: "A"
+}</code></pre>
+     * @property invalidHandleTypes
+     * @type Object
+     */
+    invalidHandleTypes: null,
+
+    /**
+     * An object who's property names identify the IDs of elements to be considered invalid as drag handles.
+     * A non-null property value identifies the ID as invalid. For example, to prevent
+     * dragging from being initiated on element ID "foo", use:<pre><code>
+{
+    foo: true
+}</code></pre>
+     * @property invalidHandleIds
+     * @type Object
+     */
+    invalidHandleIds: null,
+
+    /**
+     * An Array of CSS class names for elements to be considered in valid as drag handles.
+     * @property invalidHandleClasses
+     * @type Array
+     */
+    invalidHandleClasses: null,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageX
+     * @type int
+     * @private
+     */
+    startPageX: 0,
+
+    /**
+     * The linked element's absolute X position at the time the drag was
+     * started
+     * @property startPageY
+     * @type int
+     * @private
+     */
+    startPageY: 0,
+
+    /**
+     * The group defines a logical collection of DragDrop objects that are
+     * related.  Instances only get events when interacting with other
+     * DragDrop object in the same group.  This lets us define multiple
+     * groups using a single DragDrop subclass if we want.
+     * @property groups
+     * @type object An object in the format {'group1':true, 'group2':true}
+     */
+    groups: null,
+
+    /**
+     * Individual drag/drop instances can be locked.  This will prevent
+     * onmousedown start drag.
+     * @property locked
+     * @type boolean
+     * @private
+     */
+    locked: false,
+
+    /**
+     * Lock this instance
+     * @method lock
+     */
+    lock: function() { this.locked = true; },
+
+    /**
+     * When set to true, other DD objects in cooperating DDGroups do not receive
+     * notification events when this DD object is dragged over them. Defaults to false.
+     * @property moveOnly
+     * @type boolean
+     */
+    moveOnly: false,
+
+    /**
+     * Unlock this instace
+     * @method unlock
+     */
+    unlock: function() { this.locked = false; },
+
+    /**
+     * By default, all instances can be a drop target.  This can be disabled by
+     * setting isTarget to false.
+     * @property isTarget
+     * @type boolean
+     */
+    isTarget: true,
+
+    /**
+     * The padding configured for this drag and drop object for calculating
+     * the drop zone intersection with this object.
+     * @property padding
+     * @type int[] An array containing the 4 padding values: [top, right, bottom, left]
+     */
+    padding: null,
+
+    /**
+     * Cached reference to the linked element
+     * @property _domRef
+     * @private
+     */
+    _domRef: null,
+
+    /**
+     * Internal typeof flag
+     * @property __ygDragDrop
+     * @private
+     */
+    __ygDragDrop: true,
+
+    /**
+     * Set to true when horizontal contraints are applied
+     * @property constrainX
+     * @type boolean
+     * @private
+     */
+    constrainX: false,
+
+    /**
+     * Set to true when vertical contraints are applied
+     * @property constrainY
+     * @type boolean
+     * @private
+     */
+    constrainY: false,
+
+    /**
+     * The left constraint
+     * @property minX
+     * @type int
+     * @private
+     */
+    minX: 0,
+
+    /**
+     * The right constraint
+     * @property maxX
+     * @type int
+     * @private
+     */
+    maxX: 0,
+
+    /**
+     * The up constraint
+     * @property minY
+     * @type int
+     * @type int
+     * @private
+     */
+    minY: 0,
+
+    /**
+     * The down constraint
+     * @property maxY
+     * @type int
+     * @private
+     */
+    maxY: 0,
+
+    /**
+     * Maintain offsets when we resetconstraints.  Set to true when you want
+     * the position of the element relative to its parent to stay the same
+     * when the page changes
+     *
+     * @property maintainOffset
+     * @type boolean
+     */
+    maintainOffset: false,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * horizontal graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property xTicks
+     * @type int[]
+     */
+    xTicks: null,
+
+    /**
+     * Array of pixel locations the element will snap to if we specified a
+     * vertical graduation/interval.  This array is generated automatically
+     * when you define a tick interval.
+     * @property yTicks
+     * @type int[]
+     */
+    yTicks: null,
+
+    /**
+     * By default the drag and drop instance will only respond to the primary
+     * button click (left button for a right-handed mouse).  Set to true to
+     * allow drag and drop to start with any mouse click that is propogated
+     * by the browser
+     * @property primaryButtonOnly
+     * @type boolean
+     */
+    primaryButtonOnly: true,
+
+    /**
+     * The availabe property is false until the linked dom element is accessible.
+     * @property available
+     * @type boolean
+     */
+    available: false,
+
+    /**
+     * By default, drags can only be initiated if the mousedown occurs in the
+     * region the linked element is.  This is done in part to work around a
+     * bug in some browsers that mis-report the mousedown if the previous
+     * mouseup happened outside of the window.  This property is set to true
+     * if outer handles are defined.
+     *
+     * @property hasOuterHandles
+     * @type boolean
+     * @default false
+     */
+    hasOuterHandles: false,
+
+    /**
+     * Code that executes immediately before the startDrag event
+     * @method b4StartDrag
+     * @private
+     */
+    b4StartDrag: function(x, y) { },
+
+    /**
+     * Abstract method called after a drag/drop object is clicked
+     * and the drag or mousedown time thresholds have beeen met.
+     * @method startDrag
+     * @param {int} X click location
+     * @param {int} Y click location
+     */
+    startDrag: function(x, y) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDrag event
+     * @method b4Drag
+     * @private
+     */
+    b4Drag: function(e) { },
+
+    /**
+     * Abstract method called during the onMouseMove event while dragging an
+     * object.
+     * @method onDrag
+     * @param {Event} e the mousemove event
+     */
+    onDrag: function(e) { /* override this */ },
+
+    /**
+     * Abstract method called when this element fist begins hovering over
+     * another DragDrop obj
+     * @method onDragEnter
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of one or more
+     * dragdrop items being hovered over.
+     */
+    onDragEnter: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOver event
+     * @method b4DragOver
+     * @private
+     */
+    b4DragOver: function(e) { },
+
+    /**
+     * Abstract method called when this element is hovering over another
+     * DragDrop obj
+     * @method onDragOver
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this is hovering over.  In INTERSECT mode, an array of dd items
+     * being hovered over.
+     */
+    onDragOver: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragOut event
+     * @method b4DragOut
+     * @private
+     */
+    b4DragOut: function(e) { },
+
+    /**
+     * Abstract method called when we are no longer hovering over an element
+     * @method onDragOut
+     * @param {Event} e the mousemove event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was hovering over.  In INTERSECT mode, an array of dd items
+     * that the mouse is no longer over.
+     */
+    onDragOut: function(e, id) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the onDragDrop event
+     * @method b4DragDrop
+     * @private
+     */
+    b4DragDrop: function(e) { },
+
+    /**
+     * Abstract method called when this item is dropped on another DragDrop
+     * obj
+     * @method onDragDrop
+     * @param {Event} e the mouseup event
+     * @param {String|DragDrop[]} id In POINT mode, the element
+     * id this was dropped on.  In INTERSECT mode, an array of dd items this
+     * was dropped on.
+     */
+    onDragDrop: function(e, id) { /* override this */ },
+
+    /**
+     * Abstract method called when this item is dropped on an area with no
+     * drop target
+     * @method onInvalidDrop
+     * @param {Event} e the mouseup event
+     */
+    onInvalidDrop: function(e) { /* override this */ },
+
+    /**
+     * Code that executes immediately before the endDrag event
+     * @method b4EndDrag
+     * @private
+     */
+    b4EndDrag: function(e) { },
+
+    /**
+     * Fired when we are done dragging the object
+     * @method endDrag
+     * @param {Event} e the mouseup event
+     */
+    endDrag: function(e) { /* override this */ },
+
+    /**
+     * Code executed immediately before the onMouseDown event
+     * @method b4MouseDown
+     * @param {Event} e the mousedown event
+     * @private
+     */
+    b4MouseDown: function(e) {  },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mousedown
+     * @method onMouseDown
+     * @param {Event} e the mousedown event
+     */
+    onMouseDown: function(e) { /* override this */ },
+
+    /**
+     * Event handler that fires when a drag/drop obj gets a mouseup
+     * @method onMouseUp
+     * @param {Event} e the mouseup event
+     */
+    onMouseUp: function(e) { /* override this */ },
+
+    /**
+     * Override the onAvailable method to do what is needed after the initial
+     * position was determined.
+     * @method onAvailable
+     */
+    onAvailable: function () {
+    },
+
+    /**
+     * Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}).
+     * @type Object
+     */
+    defaultPadding : {left:0, right:0, top:0, bottom:0},
+
+    /**
+     * Initializes the drag drop object's constraints to restrict movement to a certain element.
+ *
+ * Usage:
+ <pre><code>
+ var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
+                { dragElId: "existingProxyDiv" });
+ dd.startDrag = function(){
+     this.constrainTo("parent-id");
+ };
+ </code></pre>
+ * Or you can initalize it using the {@link Ext.Element} object:
+ <pre><code>
+ Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
+     startDrag : function(){
+         this.constrainTo("parent-id");
+     }
+ });
+ </code></pre>
+     * @param {Mixed} constrainTo The element to constrain to.
+     * @param {Object/Number} pad (optional) Pad provides a way to specify "padding" of the constraints,
+     * and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or
+     * an object containing the sides to pad. For example: {right:10, bottom:10}
+     * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders)
+     */
+    constrainTo : function(constrainTo, pad, inContent){
+        if(typeof pad == "number"){
+            pad = {left: pad, right:pad, top:pad, bottom:pad};
+        }
+        pad = pad || this.defaultPadding;
+        var b = Ext.get(this.getEl()).getBox();
+        var ce = Ext.get(constrainTo);
+        var s = ce.getScroll();
+        var c, cd = ce.dom;
+        if(cd == document.body){
+            c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()};
+        }else{
+            var xy = ce.getXY();
+            c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight};
+        }
+
+
+        var topSpace = b.y - c.y;
+        var leftSpace = b.x - c.x;
+
+        this.resetConstraints();
+        this.setXConstraint(leftSpace - (pad.left||0), // left
+                c.width - leftSpace - b.width - (pad.right||0), //right
+				this.xTickSize
+        );
+        this.setYConstraint(topSpace - (pad.top||0), //top
+                c.height - topSpace - b.height - (pad.bottom||0), //bottom
+				this.yTickSize
+        );
+    },
+
+    /**
+     * Returns a reference to the linked element
+     * @method getEl
+     * @return {HTMLElement} the html element
+     */
+    getEl: function() {
+        if (!this._domRef) {
+            this._domRef = Ext.getDom(this.id);
+        }
+
+        return this._domRef;
+    },
+
+    /**
+     * Returns a reference to the actual element to drag.  By default this is
+     * the same as the html element, but it can be assigned to another
+     * element. An example of this can be found in Ext.dd.DDProxy
+     * @method getDragEl
+     * @return {HTMLElement} the html element
+     */
+    getDragEl: function() {
+        return Ext.getDom(this.dragElId);
+    },
+
+    /**
+     * Sets up the DragDrop object.  Must be called in the constructor of any
+     * Ext.dd.DragDrop subclass
+     * @method init
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    init: function(id, sGroup, config) {
+        this.initTarget(id, sGroup, config);
+        Event.on(this.id, "mousedown", this.handleMouseDown, this);
+        // Event.on(this.id, "selectstart", Event.preventDefault);
+    },
+
+    /**
+     * Initializes Targeting functionality only... the object does not
+     * get a mousedown handler.
+     * @method initTarget
+     * @param id the id of the linked element
+     * @param {String} sGroup the group of related items
+     * @param {object} config configuration attributes
+     */
+    initTarget: function(id, sGroup, config) {
+
+        // configuration attributes
+        this.config = config || {};
+
+        // create a local reference to the drag and drop manager
+        this.DDM = Ext.dd.DDM;
+        // initialize the groups array
+        this.groups = {};
+
+        // assume that we have an element reference instead of an id if the
+        // parameter is not a string
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+
+        // set the id
+        this.id = id;
+
+        // add to an interaction group
+        this.addToGroup((sGroup) ? sGroup : "default");
+
+        // We don't want to register this as the handle with the manager
+        // so we just set the id rather than calling the setter.
+        this.handleElId = id;
+
+        // the linked element is the element that gets dragged by default
+        this.setDragElId(id);
+
+        // by default, clicked anchors will not start drag operations.
+        this.invalidHandleTypes = { A: "A" };
+        this.invalidHandleIds = {};
+        this.invalidHandleClasses = [];
+
+        this.applyConfig();
+
+        this.handleOnAvailable();
+    },
+
+    /**
+     * Applies the configuration parameters that were passed into the constructor.
+     * This is supposed to happen at each level through the inheritance chain.  So
+     * a DDProxy implentation will execute apply config on DDProxy, DD, and
+     * DragDrop in order to get all of the parameters that are available in
+     * each object.
+     * @method applyConfig
+     */
+    applyConfig: function() {
+
+        // configurable properties:
+        //    padding, isTarget, maintainOffset, primaryButtonOnly
+        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);
+
+    },
+
+    /**
+     * Executed when the linked element is available
+     * @method handleOnAvailable
+     * @private
+     */
+    handleOnAvailable: function() {
+        this.available = true;
+        this.resetConstraints();
+        this.onAvailable();
+    },
+
+     /**
+     * Configures the padding for the target zone in px.  Effectively expands
+     * (or reduces) the virtual object size for targeting calculations.
+     * Supports css-style shorthand; if only one parameter is passed, all sides
+     * will have that padding, and if only two are passed, the top and bottom
+     * will have the first param, the left and right the second.
+     * @method setPadding
+     * @param {int} iTop    Top pad
+     * @param {int} iRight  Right pad
+     * @param {int} iBot    Bot pad
+     * @param {int} iLeft   Left pad
+     */
+    setPadding: function(iTop, iRight, iBot, iLeft) {
+        // this.padding = [iLeft, iRight, iTop, iBot];
+        if (!iRight && 0 !== iRight) {
+            this.padding = [iTop, iTop, iTop, iTop];
+        } else if (!iBot && 0 !== iBot) {
+            this.padding = [iTop, iRight, iTop, iRight];
+        } else {
+            this.padding = [iTop, iRight, iBot, iLeft];
+        }
+    },
+
+    /**
+     * Stores the initial placement of the linked element.
+     * @method setInitPosition
+     * @param {int} diffX   the X offset, default 0
+     * @param {int} diffY   the Y offset, default 0
+     */
+    setInitPosition: function(diffX, diffY) {
+        var el = this.getEl();
+
+        if (!this.DDM.verifyEl(el)) {
+            return;
+        }
+
+        var dx = diffX || 0;
+        var dy = diffY || 0;
+
+        var p = Dom.getXY( el );
+
+        this.initPageX = p[0] - dx;
+        this.initPageY = p[1] - dy;
+
+        this.lastPageX = p[0];
+        this.lastPageY = p[1];
+
+
+        this.setStartPosition(p);
+    },
+
+    /**
+     * Sets the start position of the element.  This is set when the obj
+     * is initialized, the reset when a drag is started.
+     * @method setStartPosition
+     * @param pos current position (from previous lookup)
+     * @private
+     */
+    setStartPosition: function(pos) {
+        var p = pos || Dom.getXY( this.getEl() );
+        this.deltaSetXY = null;
+
+        this.startPageX = p[0];
+        this.startPageY = p[1];
+    },
+
+    /**
+     * Add this instance to a group of related drag/drop objects.  All
+     * instances belong to at least one group, and can belong to as many
+     * groups as needed.
+     * @method addToGroup
+     * @param sGroup {string} the name of the group
+     */
+    addToGroup: function(sGroup) {
+        this.groups[sGroup] = true;
+        this.DDM.regDragDrop(this, sGroup);
+    },
+
+    /**
+     * Remove's this instance from the supplied interaction group
+     * @method removeFromGroup
+     * @param {string}  sGroup  The group to drop
+     */
+    removeFromGroup: function(sGroup) {
+        if (this.groups[sGroup]) {
+            delete this.groups[sGroup];
+        }
+
+        this.DDM.removeDDFromGroup(this, sGroup);
+    },
+
+    /**
+     * Allows you to specify that an element other than the linked element
+     * will be moved with the cursor during a drag
+     * @method setDragElId
+     * @param id {string} the id of the element that will be used to initiate the drag
+     */
+    setDragElId: function(id) {
+        this.dragElId = id;
+    },
+
+    /**
+     * Allows you to specify a child of the linked element that should be
+     * used to initiate the drag operation.  An example of this would be if
+     * you have a content div with text and links.  Clicking anywhere in the
+     * content area would normally start the drag operation.  Use this method
+     * to specify that an element inside of the content div is the element
+     * that starts the drag operation.
+     * @method setHandleElId
+     * @param id {string} the id of the element that will be used to
+     * initiate the drag.
+     */
+    setHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.handleElId = id;
+        this.DDM.regHandle(this.id, id);
+    },
+
+    /**
+     * Allows you to set an element outside of the linked element as a drag
+     * handle
+     * @method setOuterHandleElId
+     * @param id the id of the element that will be used to initiate the drag
+     */
+    setOuterHandleElId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        Event.on(id, "mousedown",
+                this.handleMouseDown, this);
+        this.setHandleElId(id);
+
+        this.hasOuterHandles = true;
+    },
+
+    /**
+     * Remove all drag and drop hooks for this element
+     * @method unreg
+     */
+    unreg: function() {
+        Event.un(this.id, "mousedown",
+                this.handleMouseDown);
+        this._domRef = null;
+        this.DDM._remove(this);
+    },
+
+    destroy : function(){
+        this.unreg();
+    },
+
+    /**
+     * Returns true if this instance is locked, or the drag drop mgr is locked
+     * (meaning that all drag/drop is disabled on the page.)
+     * @method isLocked
+     * @return {boolean} true if this obj or all drag/drop is locked, else
+     * false
+     */
+    isLocked: function() {
+        return (this.DDM.isLocked() || this.locked);
+    },
+
+    /**
+     * Fired when this object is clicked
+     * @method handleMouseDown
+     * @param {Event} e
+     * @param {Ext.dd.DragDrop} oDD the clicked dd object (this dd obj)
+     * @private
+     */
+    handleMouseDown: function(e, oDD){
+        if (this.primaryButtonOnly && e.button != 0) {
+            return;
+        }
+
+        if (this.isLocked()) {
+            return;
+        }
+
+        this.DDM.refreshCache(this.groups);
+
+        var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e));
+        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
+        } else {
+            if (this.clickValidator(e)) {
+
+                // set the initial element position
+                this.setStartPosition();
+
+
+                this.b4MouseDown(e);
+                this.onMouseDown(e);
+
+                this.DDM.handleMouseDown(e, this);
+
+                this.DDM.stopEvent(e);
+            } else {
+
+
+            }
+        }
+    },
+
+    clickValidator: function(e) {
+        var target = e.getTarget();
+        return ( this.isValidHandleChild(target) &&
+                    (this.id == this.handleElId ||
+                        this.DDM.handleWasClicked(target, this.id)) );
+    },
+
+    /**
+     * Allows you to specify a tag name that should not start a drag operation
+     * when clicked.  This is designed to facilitate embedding links within a
+     * drag handle that do something other than start the drag.
+     * @method addInvalidHandleType
+     * @param {string} tagName the type of element to exclude
+     */
+    addInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        this.invalidHandleTypes[type] = type;
+    },
+
+    /**
+     * Lets you to specify an element id for a child of a drag handle
+     * that should not initiate a drag
+     * @method addInvalidHandleId
+     * @param {string} id the element id of the element you wish to ignore
+     */
+    addInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        this.invalidHandleIds[id] = id;
+    },
+
+    /**
+     * Lets you specify a css class of elements that will not initiate a drag
+     * @method addInvalidHandleClass
+     * @param {string} cssClass the class of the elements you wish to ignore
+     */
+    addInvalidHandleClass: function(cssClass) {
+        this.invalidHandleClasses.push(cssClass);
+    },
+
+    /**
+     * Unsets an excluded tag name set by addInvalidHandleType
+     * @method removeInvalidHandleType
+     * @param {string} tagName the type of element to unexclude
+     */
+    removeInvalidHandleType: function(tagName) {
+        var type = tagName.toUpperCase();
+        // this.invalidHandleTypes[type] = null;
+        delete this.invalidHandleTypes[type];
+    },
+
+    /**
+     * Unsets an invalid handle id
+     * @method removeInvalidHandleId
+     * @param {string} id the id of the element to re-enable
+     */
+    removeInvalidHandleId: function(id) {
+        if (typeof id !== "string") {
+            id = Ext.id(id);
+        }
+        delete this.invalidHandleIds[id];
+    },
+
+    /**
+     * Unsets an invalid css class
+     * @method removeInvalidHandleClass
+     * @param {string} cssClass the class of the element(s) you wish to
+     * re-enable
+     */
+    removeInvalidHandleClass: function(cssClass) {
+        for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
+            if (this.invalidHandleClasses[i] == cssClass) {
+                delete this.invalidHandleClasses[i];
+            }
+        }
+    },
+
+    /**
+     * Checks the tag exclusion list to see if this click should be ignored
+     * @method isValidHandleChild
+     * @param {HTMLElement} node the HTMLElement to evaluate
+     * @return {boolean} true if this is a valid tag type, false if not
+     */
+    isValidHandleChild: function(node) {
+
+        var valid = true;
+        // var n = (node.nodeName == "#text") ? node.parentNode : node;
+        var nodeName;
+        try {
+            nodeName = node.nodeName.toUpperCase();
+        } catch(e) {
+            nodeName = node.nodeName;
+        }
+        valid = valid && !this.invalidHandleTypes[nodeName];
+        valid = valid && !this.invalidHandleIds[node.id];
+
+        for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) {
+            valid = !Ext.fly(node).hasClass(this.invalidHandleClasses[i]);
+        }
+
+
+        return valid;
+
+    },
+
+    /**
+     * Create the array of horizontal tick marks if an interval was specified
+     * in setXConstraint().
+     * @method setXTicks
+     * @private
+     */
+    setXTicks: function(iStartX, iTickSize) {
+        this.xTicks = [];
+        this.xTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.xTicks[this.xTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.xTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * Create the array of vertical tick marks if an interval was specified in
+     * setYConstraint().
+     * @method setYTicks
+     * @private
+     */
+    setYTicks: function(iStartY, iTickSize) {
+        this.yTicks = [];
+        this.yTickSize = iTickSize;
+
+        var tickMap = {};
+
+        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
+            if (!tickMap[i]) {
+                this.yTicks[this.yTicks.length] = i;
+                tickMap[i] = true;
+            }
+        }
+
+        this.yTicks.sort(this.DDM.numericSort) ;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Use
+     * this method to limit the horizontal travel of the element.  Pass in
+     * 0,0 for the parameters if you want to lock the drag to the y axis.
+     * @method setXConstraint
+     * @param {int} iLeft the number of pixels the element can move to the left
+     * @param {int} iRight the number of pixels the element can move to the
+     * right
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element
+     * should move iTickSize pixels at a time.
+     */
+    setXConstraint: function(iLeft, iRight, iTickSize) {
+        this.leftConstraint = iLeft;
+        this.rightConstraint = iRight;
+
+        this.minX = this.initPageX - iLeft;
+        this.maxX = this.initPageX + iRight;
+        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }
+
+        this.constrainX = true;
+    },
+
+    /**
+     * Clears any constraints applied to this instance.  Also clears ticks
+     * since they can't exist independent of a constraint at this time.
+     * @method clearConstraints
+     */
+    clearConstraints: function() {
+        this.constrainX = false;
+        this.constrainY = false;
+        this.clearTicks();
+    },
+
+    /**
+     * Clears any tick interval defined for this instance
+     * @method clearTicks
+     */
+    clearTicks: function() {
+        this.xTicks = null;
+        this.yTicks = null;
+        this.xTickSize = 0;
+        this.yTickSize = 0;
+    },
+
+    /**
+     * By default, the element can be dragged any place on the screen.  Set
+     * this to limit the vertical travel of the element.  Pass in 0,0 for the
+     * parameters if you want to lock the drag to the x axis.
+     * @method setYConstraint
+     * @param {int} iUp the number of pixels the element can move up
+     * @param {int} iDown the number of pixels the element can move down
+     * @param {int} iTickSize optional parameter for specifying that the
+     * element should move iTickSize pixels at a time.
+     */
+    setYConstraint: function(iUp, iDown, iTickSize) {
+        this.topConstraint = iUp;
+        this.bottomConstraint = iDown;
+
+        this.minY = this.initPageY - iUp;
+        this.maxY = this.initPageY + iDown;
+        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }
+
+        this.constrainY = true;
+
+    },
+
+    /**
+     * resetConstraints must be called if you manually reposition a dd element.
+     * @method resetConstraints
+     * @param {boolean} maintainOffset
+     */
+    resetConstraints: function() {
+
+
+        // Maintain offsets if necessary
+        if (this.initPageX || this.initPageX === 0) {
+            // figure out how much this thing has moved
+            var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
+            var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
+
+            this.setInitPosition(dx, dy);
+
+        // This is the first time we have detected the element's position
+        } 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         );
+        }
+    },
+
+    /**
+     * Normally the drag element is moved pixel by pixel, but we can specify
+     * that it move a number of pixels at a time.  This method resolves the
+     * location when we have it set up like this.
+     * @method getTick
+     * @param {int} val where we want to place the object
+     * @param {int[]} tickArray sorted array of valid points
+     * @return {int} the closest tick
+     * @private
+     */
+    getTick: function(val, tickArray) {
+
+        if (!tickArray) {
+            // If tick interval is not defined, it is effectively 1 pixel,
+            // so we return the value passed to us.
+            return val;
+        } else if (tickArray[0] >= val) {
+            // The value is lower than the first tick, so we return the first
+            // tick.
+            return tickArray[0];
+        } else {
+            for (var i=0, len=tickArray.length; i<len; ++i) {
+                var next = i + 1;
+                if (tickArray[next] && tickArray[next] >= val) {
+                    var diff1 = val - tickArray[i];
+                    var diff2 = tickArray[next] - val;
+                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
+                }
+            }
+
+            // The value is larger than the last tick, so we return the last
+            // tick.
+            return tickArray[tickArray.length - 1];
+        }
+    },
+
+    /**
+     * toString method
+     * @method toString
+     * @return {string} string representation of the dd obj
+     */
+    toString: function() {
+        return ("DragDrop " + this.id);
+    }
+
+};
+
+})();
+/**
+ * The drag and drop utility provides a framework for building drag and drop
+ * applications.  In addition to enabling drag and drop for specific elements,
+ * the drag and drop elements are tracked by the manager class, and the
+ * interactions between the various elements are tracked during the drag and
+ * the implementing code is notified about these important moments.
+ */
+
+// Only load the library once.  Rewriting the manager class would orphan
+// existing drag and drop instances.
+if (!Ext.dd.DragDropMgr) {
+
+/**
+ * @class Ext.dd.DragDropMgr
+ * DragDropMgr is a singleton that tracks the element interaction for
+ * all DragDrop items in the window.  Generally, you will not call
+ * this class directly, but it does have helper methods that could
+ * be useful in your DragDrop implementations.
+ * @singleton
+ */
+Ext.dd.DragDropMgr = function() {
+
+    var Event = Ext.EventManager;
+
+    return {
+
+        /**
+         * Two dimensional Array of registered DragDrop objects.  The first
+         * dimension is the DragDrop item group, the second the DragDrop
+         * object.
+         * @property ids
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        ids: {},
+
+        /**
+         * Array of element ids defined as drag handles.  Used to determine
+         * if the element that generated the mousedown event is actually the
+         * handle and not the html element itself.
+         * @property handleIds
+         * @type {string: string}
+         * @private
+         * @static
+         */
+        handleIds: {},
+
+        /**
+         * the DragDrop object that is currently being dragged
+         * @property dragCurrent
+         * @type DragDrop
+         * @private
+         * @static
+         **/
+        dragCurrent: null,
+
+        /**
+         * the DragDrop object(s) that are being hovered over
+         * @property dragOvers
+         * @type Array
+         * @private
+         * @static
+         */
+        dragOvers: {},
+
+        /**
+         * the X distance between the cursor and the object being dragged
+         * @property deltaX
+         * @type int
+         * @private
+         * @static
+         */
+        deltaX: 0,
+
+        /**
+         * the Y distance between the cursor and the object being dragged
+         * @property deltaY
+         * @type int
+         * @private
+         * @static
+         */
+        deltaY: 0,
+
+        /**
+         * Flag to determine if we should prevent the default behavior of the
+         * events we define. By default this is true, but this can be set to
+         * false if you need the default behavior (not recommended)
+         * @property preventDefault
+         * @type boolean
+         * @static
+         */
+        preventDefault: true,
+
+        /**
+         * Flag to determine if we should stop the propagation of the events
+         * we generate. This is true by default but you may want to set it to
+         * false if the html element contains other features that require the
+         * mouse click.
+         * @property stopPropagation
+         * @type boolean
+         * @static
+         */
+        stopPropagation: true,
+
+        /**
+         * Internal flag that is set to true when drag and drop has been
+         * intialized
+         * @property initialized
+         * @private
+         * @static
+         */
+        initialized: false,
+
+        /**
+         * All drag and drop can be disabled.
+         * @property locked
+         * @private
+         * @static
+         */
+        locked: false,
+
+        /**
+         * Called the first time an element is registered.
+         * @method init
+         * @private
+         * @static
+         */
+        init: function() {
+            this.initialized = true;
+        },
+
+        /**
+         * In point mode, drag and drop interaction is defined by the
+         * location of the cursor during the drag/drop
+         * @property POINT
+         * @type int
+         * @static
+         */
+        POINT: 0,
+
+        /**
+         * In intersect mode, drag and drop interaction is defined by the
+         * overlap of two or more drag and drop objects.
+         * @property INTERSECT
+         * @type int
+         * @static
+         */
+        INTERSECT: 1,
+
+        /**
+         * The current drag and drop mode.  Default: POINT
+         * @property mode
+         * @type int
+         * @static
+         */
+        mode: 0,
+
+        /**
+         * Runs method on all drag and drop objects
+         * @method _execOnAll
+         * @private
+         * @static
+         */
+        _execOnAll: function(sMethod, args) {
+            for (var i in this.ids) {
+                for (var j in this.ids[i]) {
+                    var oDD = this.ids[i][j];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+                    oDD[sMethod].apply(oDD, args);
+                }
+            }
+        },
+
+        /**
+         * Drag and drop initialization.  Sets up the global event handlers
+         * @method _onLoad
+         * @private
+         * @static
+         */
+        _onLoad: function() {
+
+            this.init();
+
+
+            Event.on(document, "mouseup",   this.handleMouseUp, this, true);
+            Event.on(document, "mousemove", this.handleMouseMove, this, true);
+            Event.on(window,   "unload",    this._onUnload, this, true);
+            Event.on(window,   "resize",    this._onResize, this, true);
+            // Event.on(window,   "mouseout",    this._test);
+
+        },
+
+        /**
+         * Reset constraints on all drag and drop objs
+         * @method _onResize
+         * @private
+         * @static
+         */
+        _onResize: function(e) {
+            this._execOnAll("resetConstraints", []);
+        },
+
+        /**
+         * Lock all drag and drop functionality
+         * @method lock
+         * @static
+         */
+        lock: function() { this.locked = true; },
+
+        /**
+         * Unlock all drag and drop functionality
+         * @method unlock
+         * @static
+         */
+        unlock: function() { this.locked = false; },
+
+        /**
+         * Is drag and drop locked?
+         * @method isLocked
+         * @return {boolean} True if drag and drop is locked, false otherwise.
+         * @static
+         */
+        isLocked: function() { return this.locked; },
+
+        /**
+         * Location cache that is set for all drag drop objects when a drag is
+         * initiated, cleared when the drag is finished.
+         * @property locationCache
+         * @private
+         * @static
+         */
+        locationCache: {},
+
+        /**
+         * Set useCache to false if you want to force object the lookup of each
+         * drag and drop linked element constantly during a drag.
+         * @property useCache
+         * @type boolean
+         * @static
+         */
+        useCache: true,
+
+        /**
+         * The number of pixels that the mouse needs to move after the
+         * mousedown before the drag is initiated.  Default=3;
+         * @property clickPixelThresh
+         * @type int
+         * @static
+         */
+        clickPixelThresh: 3,
+
+        /**
+         * The number of milliseconds after the mousedown event to initiate the
+         * drag if we don't get a mouseup event. Default=1000
+         * @property clickTimeThresh
+         * @type int
+         * @static
+         */
+        clickTimeThresh: 350,
+
+        /**
+         * Flag that indicates that either the drag pixel threshold or the
+         * mousdown time threshold has been met
+         * @property dragThreshMet
+         * @type boolean
+         * @private
+         * @static
+         */
+        dragThreshMet: false,
+
+        /**
+         * Timeout used for the click time threshold
+         * @property clickTimeout
+         * @type Object
+         * @private
+         * @static
+         */
+        clickTimeout: null,
+
+        /**
+         * The X position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startX
+         * @type int
+         * @private
+         * @static
+         */
+        startX: 0,
+
+        /**
+         * The Y position of the mousedown event stored for later use when a
+         * drag threshold is met.
+         * @property startY
+         * @type int
+         * @private
+         * @static
+         */
+        startY: 0,
+
+        /**
+         * Each DragDrop instance must be registered with the DragDropMgr.
+         * This is executed in DragDrop.init()
+         * @method regDragDrop
+         * @param {DragDrop} oDD the DragDrop object to register
+         * @param {String} sGroup the name of the group this element belongs to
+         * @static
+         */
+        regDragDrop: function(oDD, sGroup) {
+            if (!this.initialized) { this.init(); }
+
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+            this.ids[sGroup][oDD.id] = oDD;
+        },
+
+        /**
+         * Removes the supplied dd instance from the supplied group. Executed
+         * by DragDrop.removeFromGroup, so don't call this function directly.
+         * @method removeDDFromGroup
+         * @private
+         * @static
+         */
+        removeDDFromGroup: function(oDD, sGroup) {
+            if (!this.ids[sGroup]) {
+                this.ids[sGroup] = {};
+            }
+
+            var obj = this.ids[sGroup];
+            if (obj && obj[oDD.id]) {
+                delete obj[oDD.id];
+            }
+        },
+
+        /**
+         * Unregisters a drag and drop item.  This is executed in
+         * DragDrop.unreg, use that method instead of calling this directly.
+         * @method _remove
+         * @private
+         * @static
+         */
+        _remove: function(oDD) {
+            for (var g in oDD.groups) {
+                if (g && this.ids[g] && this.ids[g][oDD.id]) {
+                    delete this.ids[g][oDD.id];
+                }
+            }
+            delete this.handleIds[oDD.id];
+        },
+
+        /**
+         * Each DragDrop handle element must be registered.  This is done
+         * automatically when executing DragDrop.setHandleElId()
+         * @method regHandle
+         * @param {String} sDDId the DragDrop id this element is a handle for
+         * @param {String} sHandleId the id of the element that is the drag
+         * handle
+         * @static
+         */
+        regHandle: function(sDDId, sHandleId) {
+            if (!this.handleIds[sDDId]) {
+                this.handleIds[sDDId] = {};
+            }
+            this.handleIds[sDDId][sHandleId] = sHandleId;
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop item.
+         * @method isDragDrop
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop item,
+         * false otherwise
+         * @static
+         */
+        isDragDrop: function(id) {
+            return ( this.getDDById(id) ) ? true : false;
+        },
+
+        /**
+         * Returns the drag and drop instances that are in all groups the
+         * passed in instance belongs to.
+         * @method getRelated
+         * @param {DragDrop} p_oDD the obj to get related data for
+         * @param {boolean} bTargetsOnly if true, only return targetable objs
+         * @return {DragDrop[]} the related instances
+         * @static
+         */
+        getRelated: function(p_oDD, bTargetsOnly) {
+            var oDDs = [];
+            for (var i in p_oDD.groups) {
+                for (var j in this.ids[i]) {
+                    var dd = this.ids[i][j];
+                    if (! this.isTypeOfDD(dd)) {
+                        continue;
+                    }
+                    if (!bTargetsOnly || dd.isTarget) {
+                        oDDs[oDDs.length] = dd;
+                    }
+                }
+            }
+
+            return oDDs;
+        },
+
+        /**
+         * Returns true if the specified dd target is a legal target for
+         * the specifice drag obj
+         * @method isLegalTarget
+         * @param {DragDrop} the drag obj
+         * @param {DragDrop} the target
+         * @return {boolean} true if the target is a legal target for the
+         * dd obj
+         * @static
+         */
+        isLegalTarget: function (oDD, oTargetDD) {
+            var targets = this.getRelated(oDD, true);
+            for (var i=0, len=targets.length;i<len;++i) {
+                if (targets[i].id == oTargetDD.id) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * My goal is to be able to transparently determine if an object is
+         * typeof DragDrop, and the exact subclass of DragDrop.  typeof
+         * returns "object", oDD.constructor.toString() always returns
+         * "DragDrop" and not the name of the subclass.  So for now it just
+         * evaluates a well-known variable in DragDrop.
+         * @method isTypeOfDD
+         * @param {Object} the object to evaluate
+         * @return {boolean} true if typeof oDD = DragDrop
+         * @static
+         */
+        isTypeOfDD: function (oDD) {
+            return (oDD && oDD.__ygDragDrop);
+        },
+
+        /**
+         * Utility function to determine if a given element has been
+         * registered as a drag drop handle for the given Drag Drop object.
+         * @method isHandle
+         * @param {String} id the element id to check
+         * @return {boolean} true if this element is a DragDrop handle, false
+         * otherwise
+         * @static
+         */
+        isHandle: function(sDDId, sHandleId) {
+            return ( this.handleIds[sDDId] &&
+                            this.handleIds[sDDId][sHandleId] );
+        },
+
+        /**
+         * Returns the DragDrop instance for a given id
+         * @method getDDById
+         * @param {String} id the id of the DragDrop object
+         * @return {DragDrop} the drag drop object, null if it is not found
+         * @static
+         */
+        getDDById: function(id) {
+            for (var i in this.ids) {
+                if (this.ids[i][id]) {
+                    return this.ids[i][id];
+                }
+            }
+            return null;
+        },
+
+        /**
+         * Fired after a registered DragDrop object gets the mousedown event.
+         * Sets up the events required to track the object being dragged
+         * @method handleMouseDown
+         * @param {Event} e the event
+         * @param oDD the DragDrop object being dragged
+         * @private
+         * @static
+         */
+        handleMouseDown: function(e, oDD) {
+            if(Ext.QuickTips){
+                Ext.QuickTips.disable();
+            }
+            if(this.dragCurrent){
+                // the original browser mouseup wasn't handled (e.g. outside FF browser window)
+                // so clean up first to avoid breaking the next drag
+                this.handleMouseUp(e);
+            }
+            
+            this.currentTarget = e.getTarget();
+            this.dragCurrent = oDD;
+
+            var el = oDD.getEl();
+
+            // track start position
+            this.startX = e.getPageX();
+            this.startY = e.getPageY();
+
+            this.deltaX = this.startX - el.offsetLeft;
+            this.deltaY = this.startY - el.offsetTop;
+
+            this.dragThreshMet = false;
+
+            this.clickTimeout = setTimeout(
+                    function() {
+                        var DDM = Ext.dd.DDM;
+                        DDM.startDrag(DDM.startX, DDM.startY);
+                    },
+                    this.clickTimeThresh );
+        },
+
+        /**
+         * Fired when either the drag pixel threshol or the mousedown hold
+         * time threshold has been met.
+         * @method startDrag
+         * @param x {int} the X position of the original mousedown
+         * @param y {int} the Y position of the original mousedown
+         * @static
+         */
+        startDrag: function(x, y) {
+            clearTimeout(this.clickTimeout);
+            if (this.dragCurrent) {
+                this.dragCurrent.b4StartDrag(x, y);
+                this.dragCurrent.startDrag(x, y);
+            }
+            this.dragThreshMet = true;
+        },
+
+        /**
+         * Internal function to handle the mouseup event.  Will be invoked
+         * from the context of the document.
+         * @method handleMouseUp
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseUp: function(e) {
+
+            if(Ext.QuickTips){
+                Ext.QuickTips.enable();
+            }
+            if (! this.dragCurrent) {
+                return;
+            }
+
+            clearTimeout(this.clickTimeout);
+
+            if (this.dragThreshMet) {
+                this.fireEvents(e, true);
+            } else {
+            }
+
+            this.stopDrag(e);
+
+            this.stopEvent(e);
+        },
+
+        /**
+         * Utility to stop event propagation and event default, if these
+         * features are turned on.
+         * @method stopEvent
+         * @param {Event} e the event as returned by this.getEvent()
+         * @static
+         */
+        stopEvent: function(e){
+            if(this.stopPropagation) {
+                e.stopPropagation();
+            }
+
+            if (this.preventDefault) {
+                e.preventDefault();
+            }
+        },
+
+        /**
+         * Internal function to clean up event handlers after the drag
+         * operation is complete
+         * @method stopDrag
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        stopDrag: function(e) {
+            // Fire the drag end event for the item that was dragged
+            if (this.dragCurrent) {
+                if (this.dragThreshMet) {
+                    this.dragCurrent.b4EndDrag(e);
+                    this.dragCurrent.endDrag(e);
+                }
+
+                this.dragCurrent.onMouseUp(e);
+            }
+
+            this.dragCurrent = null;
+            this.dragOvers = {};
+        },
+
+        /**
+         * Internal function to handle the mousemove event.  Will be invoked
+         * from the context of the html element.
+         *
+         * @TODO figure out what we can do about mouse events lost when the
+         * user drags objects beyond the window boundary.  Currently we can
+         * detect this in internet explorer by verifying that the mouse is
+         * down during the mousemove event.  Firefox doesn't give us the
+         * button state on the mousemove event.
+         * @method handleMouseMove
+         * @param {Event} e the event
+         * @private
+         * @static
+         */
+        handleMouseMove: function(e) {
+            if (! this.dragCurrent) {
+                return true;
+            }
+            // var button = e.which || e.button;
+
+            // check for IE mouseup outside of page boundary
+            if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) {
+                this.stopEvent(e);
+                return this.handleMouseUp(e);
+            }
+
+            if (!this.dragThreshMet) {
+                var diffX = Math.abs(this.startX - e.getPageX());
+                var diffY = Math.abs(this.startY - e.getPageY());
+                if (diffX > this.clickPixelThresh ||
+                            diffY > this.clickPixelThresh) {
+                    this.startDrag(this.startX, this.startY);
+                }
+            }
+
+            if (this.dragThreshMet) {
+                this.dragCurrent.b4Drag(e);
+                this.dragCurrent.onDrag(e);
+                if(!this.dragCurrent.moveOnly){
+                    this.fireEvents(e, false);
+                }
+            }
+
+            this.stopEvent(e);
+
+            return true;
+        },
+
+        /**
+         * Iterates over all of the DragDrop elements to find ones we are
+         * hovering over or dropping on
+         * @method fireEvents
+         * @param {Event} e the event
+         * @param {boolean} isDrop is this a drop op or a mouseover op?
+         * @private
+         * @static
+         */
+        fireEvents: function(e, isDrop) {
+            var dc = this.dragCurrent;
+
+            // If the user did the mouse up outside of the window, we could
+            // get here even though we have ended the drag.
+            if (!dc || dc.isLocked()) {
+                return;
+            }
+
+            var pt = e.getPoint();
+
+            // cache the previous dragOver array
+            var oldOvers = [];
+
+            var outEvts   = [];
+            var overEvts  = [];
+            var dropEvts  = [];
+            var enterEvts = [];
+
+            // Check to see if the object(s) we were hovering over is no longer
+            // being hovered over so we can fire the onDragOut event
+            for (var i in this.dragOvers) {
+
+                var ddo = this.dragOvers[i];
+
+                if (! this.isTypeOfDD(ddo)) {
+                    continue;
+                }
+
+                if (! this.isOverTarget(pt, ddo, this.mode)) {
+                    outEvts.push( ddo );
+                }
+
+                oldOvers[i] = true;
+                delete this.dragOvers[i];
+            }
+
+            for (var sGroup in dc.groups) {
+
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+
+                for (i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+                    if (! this.isTypeOfDD(oDD)) {
+                        continue;
+                    }
+
+                    if (oDD.isTarget && !oDD.isLocked() && ((oDD != dc) || (dc.ignoreSelf === false))) {
+                        if (this.isOverTarget(pt, oDD, this.mode)) {
+                            // look for drop interactions
+                            if (isDrop) {
+                                dropEvts.push( oDD );
+                            // look for drag enter and drag over interactions
+                            } else {
+
+                                // initial drag over: dragEnter fires
+                                if (!oldOvers[oDD.id]) {
+                                    enterEvts.push( oDD );
+                                // subsequent drag overs: dragOver fires
+                                } else {
+                                    overEvts.push( oDD );
+                                }
+
+                                this.dragOvers[oDD.id] = oDD;
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (this.mode) {
+                if (outEvts.length) {
+                    dc.b4DragOut(e, outEvts);
+                    dc.onDragOut(e, outEvts);
+                }
+
+                if (enterEvts.length) {
+                    dc.onDragEnter(e, enterEvts);
+                }
+
+                if (overEvts.length) {
+                    dc.b4DragOver(e, overEvts);
+                    dc.onDragOver(e, overEvts);
+                }
+
+                if (dropEvts.length) {
+                    dc.b4DragDrop(e, dropEvts);
+                    dc.onDragDrop(e, dropEvts);
+                }
+
+            } else {
+                // fire dragout events
+                var len = 0;
+                for (i=0, len=outEvts.length; i<len; ++i) {
+                    dc.b4DragOut(e, outEvts[i].id);
+                    dc.onDragOut(e, outEvts[i].id);
+                }
+
+                // fire enter events
+                for (i=0,len=enterEvts.length; i<len; ++i) {
+                    // dc.b4DragEnter(e, oDD.id);
+                    dc.onDragEnter(e, enterEvts[i].id);
+                }
+
+                // fire over events
+                for (i=0,len=overEvts.length; i<len; ++i) {
+                    dc.b4DragOver(e, overEvts[i].id);
+                    dc.onDragOver(e, overEvts[i].id);
+                }
+
+                // fire drop events
+                for (i=0, len=dropEvts.length; i<len; ++i) {
+                    dc.b4DragDrop(e, dropEvts[i].id);
+                    dc.onDragDrop(e, dropEvts[i].id);
+                }
+
+            }
+
+            // notify about a drop that did not find a target
+            if (isDrop && !dropEvts.length) {
+                dc.onInvalidDrop(e);
+            }
+
+        },
+
+        /**
+         * Helper function for getting the best match from the list of drag
+         * and drop objects returned by the drag and drop events when we are
+         * in INTERSECT mode.  It returns either the first object that the
+         * cursor is over, or the object that has the greatest overlap with
+         * the dragged element.
+         * @method getBestMatch
+         * @param  {DragDrop[]} dds The array of drag and drop objects
+         * targeted
+         * @return {DragDrop}       The best single match
+         * @static
+         */
+        getBestMatch: function(dds) {
+            var winner = null;
+            // Return null if the input is not what we expect
+            //if (!dds || !dds.length || dds.length == 0) {
+               // winner = null;
+            // If there is only one item, it wins
+            //} else if (dds.length == 1) {
+
+            var len = dds.length;
+
+            if (len == 1) {
+                winner = dds[0];
+            } else {
+                // Loop through the targeted items
+                for (var i=0; i<len; ++i) {
+                    var dd = dds[i];
+                    // If the cursor is over the object, it wins.  If the
+                    // cursor is over multiple matches, the first one we come
+                    // to wins.
+                    if (dd.cursorIsOver) {
+                        winner = dd;
+                        break;
+                    // Otherwise the object with the most overlap wins
+                    } else {
+                        if (!winner ||
+                            winner.overlap.getArea() < dd.overlap.getArea()) {
+                            winner = dd;
+                        }
+                    }
+                }
+            }
+
+            return winner;
+        },
+
+        /**
+         * Refreshes the cache of the top-left and bottom-right points of the
+         * drag and drop objects in the specified group(s).  This is in the
+         * format that is stored in the drag and drop instance, so typical
+         * usage is:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache(ddinstance.groups);
+         * </code>
+         * Alternatively:
+         * <code>
+         * Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true});
+         * </code>
+         * @TODO this really should be an indexed array.  Alternatively this
+         * method could accept both.
+         * @method refreshCache
+         * @param {Object} groups an associative array of groups to refresh
+         * @static
+         */
+        refreshCache: function(groups) {
+            for (var sGroup in groups) {
+                if ("string" != typeof sGroup) {
+                    continue;
+                }
+                for (var i in this.ids[sGroup]) {
+                    var oDD = this.ids[sGroup][i];
+
+                    if (this.isTypeOfDD(oDD)) {
+                    // if (this.isTypeOfDD(oDD) && oDD.isTarget) {
+                        var loc = this.getLocation(oDD);
+                        if (loc) {
+                            this.locationCache[oDD.id] = loc;
+                        } else {
+                            delete this.locationCache[oDD.id];
+                            // this will unregister the drag and drop object if
+                            // the element is not in a usable state
+                            // oDD.unreg();
+                        }
+                    }
+                }
+            }
+        },
+
+        /**
+         * This checks to make sure an element exists and is in the DOM.  The
+         * main purpose is to handle cases where innerHTML is used to remove
+         * drag and drop objects from the DOM.  IE provides an 'unspecified
+         * error' when trying to access the offsetParent of such an element
+         * @method verifyEl
+         * @param {HTMLElement} el the element to check
+         * @return {boolean} true if the element looks usable
+         * @static
+         */
+        verifyEl: function(el) {
+            if (el) {
+                var parent;
+                if(Ext.isIE){
+                    try{
+                        parent = el.offsetParent;
+                    }catch(e){}
+                }else{
+                    parent = el.offsetParent;
+                }
+                if (parent) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        /**
+         * Returns a Region object containing the drag and drop element's position
+         * and size, including the padding configured for it
+         * @method getLocation
+         * @param {DragDrop} oDD the drag and drop object to get the
+         *                       location for
+         * @return {Ext.lib.Region} a Region object representing the total area
+         *                             the element occupies, including any padding
+         *                             the instance is configured for.
+         * @static
+         */
+        getLocation: function(oDD) {
+            if (! this.isTypeOfDD(oDD)) {
+                return null;
+            }
+
+            var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
+
+            try {
+                pos= Ext.lib.Dom.getXY(el);
+            } catch (e) { }
+
+            if (!pos) {
+                return null;
+            }
+
+            x1 = pos[0];
+            x2 = x1 + el.offsetWidth;
+            y1 = pos[1];
+            y2 = y1 + el.offsetHeight;
+
+            t = y1 - oDD.padding[0];
+            r = x2 + oDD.padding[1];
+            b = y2 + oDD.padding[2];
+            l = x1 - oDD.padding[3];
+
+            return new Ext.lib.Region( t, r, b, l );
+        },
+
+        /**
+         * Checks the cursor location to see if it over the target
+         * @method isOverTarget
+         * @param {Ext.lib.Point} pt The point to evaluate
+         * @param {DragDrop} oTarget the DragDrop object we are inspecting
+         * @return {boolean} true if the mouse is over the target
+         * @private
+         * @static
+         */
+        isOverTarget: function(pt, oTarget, intersect) {
+            // use cache if available
+            var loc = this.locationCache[oTarget.id];
+            if (!loc || !this.useCache) {
+                loc = this.getLocation(oTarget);
+                this.locationCache[oTarget.id] = loc;
+
+            }
+
+            if (!loc) {
+                return false;
+            }
+
+            oTarget.cursorIsOver = loc.contains( pt );
+
+            // DragDrop is using this as a sanity check for the initial mousedown
+            // in this case we are done.  In POINT mode, if the drag obj has no
+            // contraints, we are also done. Otherwise we need to evaluate the
+            // location of the target as related to the actual location of the
+            // dragged element.
+            var dc = this.dragCurrent;
+            if (!dc || !dc.getTargetCoord ||
+                    (!intersect && !dc.constrainX && !dc.constrainY)) {
+                return oTarget.cursorIsOver;
+            }
+
+            oTarget.overlap = null;
+
+            // Get the current location of the drag element, this is the
+            // location of the mouse event less the delta that represents
+            // where the original mousedown happened on the element.  We
+            // need to consider constraints and ticks as well.
+            var pos = dc.getTargetCoord(pt.x, pt.y);
+
+            var el = dc.getDragEl();
+            var curRegion = new Ext.lib.Region( pos.y,
+                                                   pos.x + el.offsetWidth,
+                                                   pos.y + el.offsetHeight,
+                                                   pos.x );
+
+            var overlap = curRegion.intersect(loc);
+
+            if (overlap) {
+                oTarget.overlap = overlap;
+                return (intersect) ? true : oTarget.cursorIsOver;
+            } else {
+                return false;
+            }
+        },
+
+        /**
+         * unload event handler
+         * @method _onUnload
+         * @private
+         * @static
+         */
+        _onUnload: function(e, me) {
+            Ext.dd.DragDropMgr.unregAll();
+        },
+
+        /**
+         * Cleans up the drag and drop events and objects.
+         * @method unregAll
+         * @private
+         * @static
+         */
+        unregAll: function() {
+
+            if (this.dragCurrent) {
+                this.stopDrag();
+                this.dragCurrent = null;
+            }
+
+            this._execOnAll("unreg", []);
+
+            for (var i in this.elementCache) {
+                delete this.elementCache[i];
+            }
+
+            this.elementCache = {};
+            this.ids = {};
+        },
+
+        /**
+         * A cache of DOM elements
+         * @property elementCache
+         * @private
+         * @static
+         */
+        elementCache: {},
+
+        /**
+         * Get the wrapper for the DOM element specified
+         * @method getElWrapper
+         * @param {String} id the id of the element to get
+         * @return {Ext.dd.DDM.ElementWrapper} the wrapped element
+         * @private
+         * @deprecated This wrapper isn't that useful
+         * @static
+         */
+        getElWrapper: function(id) {
+            var oWrapper = this.elementCache[id];
+            if (!oWrapper || !oWrapper.el) {
+                oWrapper = this.elementCache[id] =
+                    new this.ElementWrapper(Ext.getDom(id));
+            }
+            return oWrapper;
+        },
+
+        /**
+         * Returns the actual DOM element
+         * @method getElement
+         * @param {String} id the id of the elment to get
+         * @return {Object} The element
+         * @deprecated use Ext.lib.Ext.getDom instead
+         * @static
+         */
+        getElement: function(id) {
+            return Ext.getDom(id);
+        },
+
+        /**
+         * Returns the style property for the DOM element (i.e.,
+         * document.getElById(id).style)
+         * @method getCss
+         * @param {String} id the id of the elment to get
+         * @return {Object} The style property of the element
+         * @deprecated use Ext.lib.Dom instead
+         * @static
+         */
+        getCss: function(id) {
+            var el = Ext.getDom(id);
+            return (el) ? el.style : null;
+        },
+
+        /**
+         * Inner class for cached elements
+         * @class DragDropMgr.ElementWrapper
+         * @for DragDropMgr
+         * @private
+         * @deprecated
+         */
+        ElementWrapper: function(el) {
+                /**
+                 * The element
+                 * @property el
+                 */
+                this.el = el || null;
+                /**
+                 * The element id
+                 * @property id
+                 */
+                this.id = this.el && el.id;
+                /**
+                 * A reference to the style property
+                 * @property css
+                 */
+                this.css = this.el && el.style;
+            },
+
+        /**
+         * Returns the X position of an html element
+         * @method getPosX
+         * @param el the element for which to get the position
+         * @return {int} the X coordinate
+         * @for DragDropMgr
+         * @deprecated use Ext.lib.Dom.getX instead
+         * @static
+         */
+        getPosX: function(el) {
+            return Ext.lib.Dom.getX(el);
+        },
+
+        /**
+         * Returns the Y position of an html element
+         * @method getPosY
+         * @param el the element for which to get the position
+         * @return {int} the Y coordinate
+         * @deprecated use Ext.lib.Dom.getY instead
+         * @static
+         */
+        getPosY: function(el) {
+            return Ext.lib.Dom.getY(el);
+        },
+
+        /**
+         * Swap two nodes.  In IE, we use the native method, for others we
+         * emulate the IE behavior
+         * @method swapNode
+         * @param n1 the first node to swap
+         * @param n2 the other node to swap
+         * @static
+         */
+        swapNode: function(n1, n2) {
+            if (n1.swapNode) {
+                n1.swapNode(n2);
+            } else {
+                var p = n2.parentNode;
+                var s = n2.nextSibling;
+
+                if (s == n1) {
+                    p.insertBefore(n1, n2);
+                } else if (n2 == n1.nextSibling) {
+                    p.insertBefore(n2, n1);
+                } else {
+                    n1.parentNode.replaceChild(n2, n1);
+                    p.insertBefore(n1, s);
+                }
+            }
+        },
+
+        /**
+         * Returns the current scroll position
+         * @method getScroll
+         * @private
+         * @static
+         */
+        getScroll: function () {
+            var t, l, dde=document.documentElement, db=document.body;
+            if (dde && (dde.scrollTop || dde.scrollLeft)) {
+                t = dde.scrollTop;
+                l = dde.scrollLeft;
+            } else if (db) {
+                t = db.scrollTop;
+                l = db.scrollLeft;
+            } else {
+
+            }
+            return { top: t, left: l };
+        },
+
+        /**
+         * Returns the specified element style property
+         * @method getStyle
+         * @param {HTMLElement} el          the element
+         * @param {string}      styleProp   the style property
+         * @return {string} The value of the style property
+         * @deprecated use Ext.lib.Dom.getStyle
+         * @static
+         */
+        getStyle: function(el, styleProp) {
+            return Ext.fly(el).getStyle(styleProp);
+        },
+
+        /**
+         * Gets the scrollTop
+         * @method getScrollTop
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollTop: function () { return this.getScroll().top; },
+
+        /**
+         * Gets the scrollLeft
+         * @method getScrollLeft
+         * @return {int} the document's scrollTop
+         * @static
+         */
+        getScrollLeft: function () { return this.getScroll().left; },
+
+        /**
+         * Sets the x/y position of an element to the location of the
+         * target element.
+         * @method moveToEl
+         * @param {HTMLElement} moveEl      The element to move
+         * @param {HTMLElement} targetEl    The position reference element
+         * @static
+         */
+        moveToEl: function (moveEl, targetEl) {
+            var aCoord = Ext.lib.Dom.getXY(targetEl);
+            Ext.lib.Dom.setXY(moveEl, aCoord);
+        },
+
+        /**
+         * Numeric array sort function
+         * @method numericSort
+         * @static
+         */
+        numericSort: function(a, b) { return (a - b); },
+
+        /**
+         * Internal counter
+         * @property _timeoutCount
+         * @private
+         * @static
+         */
+        _timeoutCount: 0,
+
+        /**
+         * Trying to make the load order less important.  Without this we get
+         * an error if this file is loaded before the Event Utility.
+         * @method _addListeners
+         * @private
+         * @static
+         */
+        _addListeners: function() {
+            var DDM = Ext.dd.DDM;
+            if ( Ext.lib.Event && document ) {
+                DDM._onLoad();
+            } else {
+                if (DDM._timeoutCount > 2000) {
+                } else {
+                    setTimeout(DDM._addListeners, 10);
+                    if (document && document.body) {
+                        DDM._timeoutCount += 1;
+                    }
+                }
+            }
+        },
+
+        /**
+         * Recursively searches the immediate parent and all child nodes for
+         * the handle element in order to determine wheter or not it was
+         * clicked.
+         * @method handleWasClicked
+         * @param node the html element to inspect
+         * @static
+         */
+        handleWasClicked: function(node, id) {
+            if (this.isHandle(id, node.id)) {
+                return true;
+            } else {
+                // check to see if this is a text node child of the one we want
+                var p = node.parentNode;
+
+                while (p) {
+                    if (this.isHandle(id, p.id)) {
+                        return true;
+                    } else {
+                        p = p.parentNode;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+    };
+
+}();
+
+// shorter alias, save a few bytes
+Ext.dd.DDM = Ext.dd.DragDropMgr;
+Ext.dd.DDM._addListeners();
+
+}
+
+/**
+ * @class Ext.dd.DD
+ * A DragDrop implementation where the linked element follows the
+ * mouse cursor during a drag.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the linked element
+ * @param {String} sGroup the group of related DragDrop items
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DD:
+ *                    scroll
+ */
+Ext.dd.DD = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+    }
+};
+
+Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {
+
+    /**
+     * When set to true, the utility automatically tries to scroll the browser
+     * window when a drag and drop element is dragged near the viewport boundary.
+     * Defaults to true.
+     * @property scroll
+     * @type boolean
+     */
+    scroll: true,
+
+    /**
+     * Sets the pointer offset to the distance between the linked element's top
+     * left corner and the location the element was clicked
+     * @method autoOffset
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     */
+    autoOffset: function(iPageX, iPageY) {
+        var x = iPageX - this.startPageX;
+        var y = iPageY - this.startPageY;
+        this.setDelta(x, y);
+    },
+
+    /**
+     * Sets the pointer offset.  You can call this directly to force the
+     * offset to be in a particular location (e.g., pass in 0,0 to set it
+     * to the center of the object)
+     * @method setDelta
+     * @param {int} iDeltaX the distance from the left
+     * @param {int} iDeltaY the distance from the top
+     */
+    setDelta: function(iDeltaX, iDeltaY) {
+        this.deltaX = iDeltaX;
+        this.deltaY = iDeltaY;
+    },
+
+    /**
+     * Sets the drag element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method setDragElPos
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    setDragElPos: function(iPageX, iPageY) {
+        // the first time we do this, we are going to check to make sure
+        // the element has css positioning
+
+        var el = this.getDragEl();
+        this.alignElWithMouse(el, iPageX, iPageY);
+    },
+
+    /**
+     * Sets the element to the location of the mousedown or click event,
+     * maintaining the cursor location relative to the location on the element
+     * that was clicked.  Override this if you want to place the element in a
+     * location other than where the cursor is.
+     * @method alignElWithMouse
+     * @param {HTMLElement} el the element to move
+     * @param {int} iPageX the X coordinate of the mousedown or drag event
+     * @param {int} iPageY the Y coordinate of the mousedown or drag event
+     */
+    alignElWithMouse: function(el, iPageX, iPageY) {
+        var oCoord = this.getTargetCoord(iPageX, iPageY);
+        var fly = el.dom ? el : Ext.fly(el, '_dd');
+        if (!this.deltaSetXY) {
+            var aCoord = [oCoord.x, oCoord.y];
+            fly.setXY(aCoord);
+            var newLeft = fly.getLeft(true);
+            var newTop  = fly.getTop(true);
+            this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ];
+        } else {
+            fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]);
+        }
+
+        this.cachePosition(oCoord.x, oCoord.y);
+        this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        return oCoord;
+    },
+
+    /**
+     * Saves the most recent position so that we can reset the constraints and
+     * tick marks on-demand.  We need to know this so that we can calculate the
+     * number of pixels the element is offset from its original position.
+     * @method cachePosition
+     * @param iPageX the current x position (optional, this just makes it so we
+     * don't have to look it up again)
+     * @param iPageY the current y position (optional, this just makes it so we
+     * don't have to look it up again)
+     */
+    cachePosition: function(iPageX, iPageY) {
+        if (iPageX) {
+            this.lastPageX = iPageX;
+            this.lastPageY = iPageY;
+        } else {
+            var aCoord = Ext.lib.Dom.getXY(this.getEl());
+            this.lastPageX = aCoord[0];
+            this.lastPageY = aCoord[1];
+        }
+    },
+
+    /**
+     * Auto-scroll the window if the dragged object has been moved beyond the
+     * visible window boundary.
+     * @method autoScroll
+     * @param {int} x the drag element's x position
+     * @param {int} y the drag element's y position
+     * @param {int} h the height of the drag element
+     * @param {int} w the width of the drag element
+     * @private
+     */
+    autoScroll: function(x, y, h, w) {
+
+        if (this.scroll) {
+            // The client height
+            var clientH = Ext.lib.Dom.getViewHeight();
+
+            // The client width
+            var clientW = Ext.lib.Dom.getViewWidth();
+
+            // The amt scrolled down
+            var st = this.DDM.getScrollTop();
+
+            // The amt scrolled right
+            var sl = this.DDM.getScrollLeft();
+
+            // Location of the bottom of the element
+            var bot = h + y;
+
+            // Location of the right of the element
+            var right = w + x;
+
+            // The distance from the cursor to the bottom of the visible area,
+            // adjusted so that we don't scroll if the cursor is beyond the
+            // element drag constraints
+            var toBot = (clientH + st - y - this.deltaY);
+
+            // The distance from the cursor to the right of the visible area
+            var toRight = (clientW + sl - x - this.deltaX);
+
+
+            // How close to the edge the cursor must be before we scroll
+            // var thresh = (document.all) ? 100 : 40;
+            var thresh = 40;
+
+            // How many pixels to scroll per autoscroll op.  This helps to reduce
+            // clunky scrolling. IE is more sensitive about this ... it needs this
+            // value to be higher.
+            var scrAmt = (document.all) ? 80 : 30;
+
+            // Scroll down if we are near the bottom of the visible page and the
+            // obj extends below the crease
+            if ( bot > clientH && toBot < thresh ) {
+                window.scrollTo(sl, st + scrAmt);
+            }
+
+            // Scroll up if the window is scrolled down and the top of the object
+            // goes above the top border
+            if ( y < st && st > 0 && y - st < thresh ) {
+                window.scrollTo(sl, st - scrAmt);
+            }
+
+            // Scroll right if the obj is beyond the right border and the cursor is
+            // near the border.
+            if ( right > clientW && toRight < thresh ) {
+                window.scrollTo(sl + scrAmt, st);
+            }
+
+            // Scroll left if the window has been scrolled to the right and the obj
+            // extends past the left border
+            if ( x < sl && sl > 0 && x - sl < thresh ) {
+                window.scrollTo(sl - scrAmt, st);
+            }
+        }
+    },
+
+    /**
+     * Finds the location the element should be placed if we want to move
+     * it to where the mouse location less the click offset would place us.
+     * @method getTargetCoord
+     * @param {int} iPageX the X coordinate of the click
+     * @param {int} iPageY the Y coordinate of the click
+     * @return an object that contains the coordinates (Object.x and Object.y)
+     * @private
+     */
+    getTargetCoord: function(iPageX, iPageY) {
+
+
+        var x = iPageX - this.deltaX;
+        var y = iPageY - this.deltaY;
+
+        if (this.constrainX) {
+            if (x < this.minX) { x = this.minX; }
+            if (x > this.maxX) { x = this.maxX; }
+        }
+
+        if (this.constrainY) {
+            if (y < this.minY) { y = this.minY; }
+            if (y > this.maxY) { y = this.maxY; }
+        }
+
+        x = this.getTick(x, this.xTicks);
+        y = this.getTick(y, this.yTicks);
+
+
+        return {x:x, y:y};
+    },
+
+    /**
+     * Sets up config options specific to this class. Overrides
+     * Ext.dd.DragDrop, but all versions of this method through the
+     * inheritance chain are called
+     */
+    applyConfig: function() {
+        Ext.dd.DD.superclass.applyConfig.call(this);
+        this.scroll = (this.config.scroll !== false);
+    },
+
+    /**
+     * Event that fires prior to the onMouseDown event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4MouseDown: function(e) {
+        // this.resetConstraints();
+        this.autoOffset(e.getPageX(),
+                            e.getPageY());
+    },
+
+    /**
+     * Event that fires prior to the onDrag event.  Overrides
+     * Ext.dd.DragDrop.
+     */
+    b4Drag: function(e) {
+        this.setDragElPos(e.getPageX(),
+                            e.getPageY());
+    },
+
+    toString: function() {
+        return ("DD " + this.id);
+    }
+
+    //////////////////////////////////////////////////////////////////////////
+    // Debugging ygDragDrop events that can be overridden
+    //////////////////////////////////////////////////////////////////////////
+    /*
+    startDrag: function(x, y) {
+    },
+
+    onDrag: function(e) {
+    },
+
+    onDragEnter: function(e, id) {
+    },
+
+    onDragOver: function(e, id) {
+    },
+
+    onDragOut: function(e, id) {
+    },
+
+    onDragDrop: function(e, id) {
+    },
+
+    endDrag: function(e) {
+    }
+
+    */
+
+});
+/**
+ * @class Ext.dd.DDProxy
+ * A DragDrop implementation that inserts an empty, bordered div into
+ * the document that follows the cursor during drag operations.  At the time of
+ * the click, the frame div is resized to the dimensions of the linked html
+ * element, and moved to the exact location of the linked element.
+ *
+ * References to the "frame" element refer to the single proxy element that
+ * was created to be dragged in place of all DDProxy elements on the
+ * page.
+ *
+ * @extends Ext.dd.DD
+ * @constructor
+ * @param {String} id the id of the linked html element
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                Valid properties for DDProxy in addition to those in DragDrop:
+ *                   resizeFrame, centerFrame, dragElId
+ */
+Ext.dd.DDProxy = function(id, sGroup, config) {
+    if (id) {
+        this.init(id, sGroup, config);
+        this.initFrame();
+    }
+};
+
+/**
+ * The default drag frame div id
+ * @property Ext.dd.DDProxy.dragElId
+ * @type String
+ * @static
+ */
+Ext.dd.DDProxy.dragElId = "ygddfdiv";
+
+Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
+
+    /**
+     * By default we resize the drag frame to be the same size as the element
+     * we want to drag (this is to get the frame effect).  We can turn it off
+     * if we want a different behavior.
+     * @property resizeFrame
+     * @type boolean
+     */
+    resizeFrame: true,
+
+    /**
+     * By default the frame is positioned exactly where the drag element is, so
+     * we use the cursor offset provided by Ext.dd.DD.  Another option that works only if
+     * you do not have constraints on the obj is to have the drag frame centered
+     * around the cursor.  Set centerFrame to true for this effect.
+     * @property centerFrame
+     * @type boolean
+     */
+    centerFrame: false,
+
+    /**
+     * Creates the proxy element if it does not yet exist
+     * @method createFrame
+     */
+    createFrame: function() {
+        var self = this;
+        var body = document.body;
+
+        if (!body || !body.firstChild) {
+            setTimeout( function() { self.createFrame(); }, 50 );
+            return;
+        }
+
+        var div = this.getDragEl();
+
+        if (!div) {
+            div    = document.createElement("div");
+            div.id = this.dragElId;
+            var s  = div.style;
+
+            s.position   = "absolute";
+            s.visibility = "hidden";
+            s.cursor     = "move";
+            s.border     = "2px solid #aaa";
+            s.zIndex     = 999;
+
+            // appendChild can blow up IE if invoked prior to the window load event
+            // while rendering a table.  It is possible there are other scenarios
+            // that would cause this to happen as well.
+            body.insertBefore(div, body.firstChild);
+        }
+    },
+
+    /**
+     * Initialization for the drag frame element.  Must be called in the
+     * constructor of all subclasses
+     * @method initFrame
+     */
+    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);
+    },
+
+    /**
+     * Resizes the drag frame to the dimensions of the clicked object, positions
+     * it over the object, and finally displays it
+     * @method showFrame
+     * @param {int} iPageX X click position
+     * @param {int} iPageY Y click position
+     * @private
+     */
+    showFrame: function(iPageX, iPageY) {
+        var el = this.getEl();
+        var dragEl = this.getDragEl();
+        var s = dragEl.style;
+
+        this._resizeProxy();
+
+        if (this.centerFrame) {
+            this.setDelta( Math.round(parseInt(s.width,  10)/2),
+                           Math.round(parseInt(s.height, 10)/2) );
+        }
+
+        this.setDragElPos(iPageX, iPageY);
+
+        Ext.fly(dragEl).show();
+    },
+
+    /**
+     * The proxy is automatically resized to the dimensions of the linked
+     * element when a drag is initiated, unless resizeFrame is set to false
+     * @method _resizeProxy
+     * @private
+     */
+    _resizeProxy: function() {
+        if (this.resizeFrame) {
+            var el = this.getEl();
+            Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight);
+        }
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+        this.setDragElPos(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4StartDrag: function(x, y) {
+        // show the drag frame
+        this.showFrame(x, y);
+    },
+
+    // overrides Ext.dd.DragDrop
+    b4EndDrag: function(e) {
+        Ext.fly(this.getDragEl()).hide();
+    },
+
+    // overrides Ext.dd.DragDrop
+    // By default we try to move the element to the last location of the frame.
+    // This is so that the default behavior mirrors that of Ext.dd.DD.
+    endDrag: function(e) {
+
+        var lel = this.getEl();
+        var del = this.getDragEl();
+
+        // Show the drag frame briefly so we can get its position
+        del.style.visibility = "";
+
+        this.beforeMove();
+        // Hide the linked element before the move to get around a Safari
+        // rendering bug.
+        lel.style.visibility = "hidden";
+        Ext.dd.DDM.moveToEl(lel, del);
+        del.style.visibility = "hidden";
+        lel.style.visibility = "";
+
+        this.afterDrag();
+    },
+
+    beforeMove : function(){
+
+    },
+
+    afterDrag : function(){
+
+    },
+
+    toString: function() {
+        return ("DDProxy " + this.id);
+    }
+
+});
+/**
+ * @class Ext.dd.DDTarget
+ * A DragDrop implementation that does not move, but can be a drop
+ * target.  You would get the same result by simply omitting implementation
+ * for the event callbacks, but this way we reduce the processing cost of the
+ * event listener and the callbacks.
+ * @extends Ext.dd.DragDrop
+ * @constructor
+ * @param {String} id the id of the element that is a drop target
+ * @param {String} sGroup the group of related DragDrop objects
+ * @param {object} config an object containing configurable attributes
+ *                 Valid properties for DDTarget in addition to those in
+ *                 DragDrop:
+ *                    none
+ */
+Ext.dd.DDTarget = function(id, sGroup, config) {
+    if (id) {
+        this.initTarget(id, sGroup, config);
+    }
+};
+
+// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop();
+Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, {
+    toString: function() {
+        return ("DDTarget " + this.id);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragSource.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragSource.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragSource.js	(revision 625)
@@ -0,0 +1,365 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.DragSource
+ * @extends Ext.dd.DDProxy
+ * A simple class that provides the basic implementation needed to make any element draggable.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragSource = function(el, config){
+    this.el = Ext.get(el);
+    if(!this.dragData){
+        this.dragData = {};
+    }
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Returns the data object associated with this drag source
+     * @return {Object} data An object containing arbitrary data
+     */
+    getDragData : function(e){
+        return this.dragData;
+    },
+
+    // private
+    onDragEnter : function(e, id){
+        var target = Ext.dd.DragDropMgr.getDDById(id);
+        this.cachedTarget = target;
+        if(this.beforeDragEnter(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyEnter(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }else{
+                this.proxy.setStatus(this.dropAllowed);
+            }
+            
+            if(this.afterDragEnter){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * when the dragged item enters the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragEnter
+                 */
+                this.afterDragEnter(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * before the dragged item enters the drop target and optionally cancel the onDragEnter.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragEnter : function(target, e, id){
+        return true;
+    },
+
+    // private
+    alignElWithMouse: function() {
+        Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments);
+        this.proxy.sync();
+    },
+
+    // private
+    onDragOver : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOver(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                var status = target.notifyOver(this, e, this.dragData);
+                this.proxy.setStatus(status);
+            }
+
+            if(this.afterDragOver){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * while the dragged item is over the drop target by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOver
+                 */
+                this.afterDragOver(target, e, id);
+            }
+        }
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action
+     * while the dragged item is over the drop target and optionally cancel the onDragOver.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOver : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onDragOut : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragOut(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                target.notifyOut(this, e, this.dragData);
+            }
+            this.proxy.reset();
+            if(this.afterDragOut){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after the dragged item is dragged out of the target without dropping.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dragged element
+                 * @method afterDragOut
+                 */
+                this.afterDragOut(target, e, id);
+            }
+        }
+        this.cachedTarget = null;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dragged out of the target without dropping, and optionally cancel the onDragOut.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    beforeDragOut : function(target, e, id){
+        return true;
+    },
+    
+    // private
+    onDragDrop : function(e, id){
+        var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
+        if(this.beforeDragDrop(target, e, id) !== false){
+            if(target.isNotifyTarget){
+                if(target.notifyDrop(this, e, this.dragData)){ // valid drop?
+                    this.onValidDrop(target, e, id);
+                }else{
+                    this.onInvalidDrop(target, e, id);
+                }
+            }else{
+                this.onValidDrop(target, e, id);
+            }
+            
+            if(this.afterDragDrop){
+                /**
+                 * An empty function by default, but provided so that you can perform a custom action
+                 * after a valid drag drop has occurred by providing an implementation.
+                 * @param {Ext.dd.DragDrop} target The drop target
+                 * @param {Event} e The event object
+                 * @param {String} id The id of the dropped element
+                 * @method afterDragDrop
+                 */
+                this.afterDragDrop(target, e, id);
+            }
+        }
+        delete this.cachedTarget;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the dragged
+     * item is dropped onto the target and optionally cancel the onDragDrop.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the drag drop event is valid, else false to cancel
+     */
+    beforeDragDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    onValidDrop : function(target, e, id){
+        this.hideProxy();
+        if(this.afterValidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after a valid drop has occurred by providing an implementation.
+             * @param {Object} target The target DD 
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterValidDrop(target, e, id);
+        }
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return this.el.getXY();  
+    },
+
+    // private
+    onInvalidDrop : function(target, e, id){
+        this.beforeInvalidDrop(target, e, id);
+        if(this.cachedTarget){
+            if(this.cachedTarget.isNotifyTarget){
+                this.cachedTarget.notifyOut(this, e, this.dragData);
+            }
+            this.cacheTarget = null;
+        }
+        this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this);
+
+        if(this.afterInvalidDrop){
+            /**
+             * An empty function by default, but provided so that you can perform a custom action
+             * after an invalid drop has occurred by providing an implementation.
+             * @param {Event} e The event object
+             * @param {String} id The id of the dropped element
+             * @method afterInvalidDrop
+             */
+            this.afterInvalidDrop(e, id);
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        if(Ext.enableFx){
+            this.el.highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action after an invalid
+     * drop has occurred.
+     * @param {Ext.dd.DragDrop} target The drop target
+     * @param {Event} e The event object
+     * @param {String} id The id of the dragged element
+     * @return {Boolean} isValid True if the invalid drop should proceed, else false to cancel
+     */
+    beforeInvalidDrop : function(target, e, id){
+        return true;
+    },
+
+    // private
+    handleMouseDown : function(e){
+        if(this.dragging) {
+            return;
+        }
+        var data = this.getDragData(e);
+        if(data && this.onBeforeDrag(data, e) !== false){
+            this.dragData = data;
+            this.proxy.stop();
+            Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments);
+        } 
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action before the initial
+     * drag event begins and optionally cancel it.
+     * @param {Object} data An object containing arbitrary data to be shared with drop targets
+     * @param {Event} e The event object
+     * @return {Boolean} isValid True if the drag event is valid, else false to cancel
+     */
+    onBeforeDrag : function(data, e){
+        return true;
+    },
+
+    /**
+     * An empty function by default, but provided so that you can perform a custom action once the initial
+     * drag event has begun.  The drag cannot be canceled from this function.
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     */
+    onStartDrag : Ext.emptyFn,
+
+    // private override
+    startDrag : function(x, y){
+        this.proxy.reset();
+        this.dragging = true;
+        this.proxy.update("");
+        this.onInitDrag(x, y);
+        this.proxy.show();
+    },
+
+    // private
+    onInitDrag : function(x, y){
+        var clone = this.el.dom.cloneNode(true);
+        clone.id = Ext.id(); // prevent duplicate ids
+        this.proxy.update(clone);
+        this.onStartDrag(x, y);
+        return true;
+    },
+
+    /**
+     * Returns the drag source's underlying {@link Ext.dd.StatusProxy}
+     * @return {Ext.dd.StatusProxy} proxy The StatusProxy
+     */
+    getProxy : function(){
+        return this.proxy;  
+    },
+
+    /**
+     * Hides the drag source's {@link Ext.dd.StatusProxy}
+     */
+    hideProxy : function(){
+        this.proxy.hide();  
+        this.proxy.reset(true);
+        this.dragging = false;
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    },
+
+    // private - override to prevent hiding
+    b4EndDrag: function(e) {
+    },
+
+    // private - override to prevent moving
+    endDrag : function(e){
+        this.onEndDrag(this.dragData, e);
+    },
+
+    // private
+    onEndDrag : function(data, e){
+    },
+    
+    // private - pin to cursor
+    autoOffset : function(x, y) {
+        this.setDelta(-12, -20);
+    }    
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragTracker.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragTracker.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragTracker.js	(revision 625)
@@ -0,0 +1,217 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.DragTracker
+ * @extends Ext.util.Observable
+ */
+Ext.dd.DragTracker = function(config){
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event mousedown
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousedown',
+        /**
+         * @event mouseup
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mouseup',
+        /**
+         * @event mousemove
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'mousemove',
+        /**
+         * @event dragstart
+         * @param {Object} this
+         * @param {Object} startXY the page coordinates of the event
+         */
+        'dragstart',
+        /**
+         * @event dragend
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        'dragend',
+        /**
+         * @event drag
+         * @param {Object} this
+         * @param {Object} e event object
+         */
+        '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,  {
+    /**
+     * @cfg {Boolean} active
+	 * Defaults to <tt>false</tt>.
+	 */	
+    active: false,
+    /**
+     * @cfg {Number} tolerance
+	 * Defaults to <tt>5</tt>.
+	 */	
+    tolerance: 5,
+    /**
+     * @cfg {Boolean/Number} autoStart
+	 * Defaults to <tt>false</tt>. Specify <tt>true</tt> to defer trigger start by 1000 ms.
+	 * Specify a Number for the number of milliseconds to defer trigger start.
+	 */	
+    autoStart: false,
+
+    initEl: function(el){
+        this.el = Ext.get(el);
+        el.on('mousedown', this.onMouseDown, this,
+                this.delegate ? {delegate: this.delegate} : undefined);
+    },
+
+    destroy : function(){
+        this.el.un('mousedown', this.onMouseDown, this);
+    },
+
+    onMouseDown: function(e, target){
+        if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){
+            this.startXY = this.lastXY = e.getXY();
+            this.dragTarget = this.delegate ? target : this.el.dom;
+            if(this.preventDefault !== false){
+                e.preventDefault();
+            }
+            var doc = Ext.getDoc();
+            doc.on('mouseup', this.onMouseUp, this);
+            doc.on('mousemove', this.onMouseMove, this);
+            doc.on('selectstart', this.stopSelect, this);
+            if(this.autoStart){
+                this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this);
+            }
+        }
+    },
+
+    onMouseMove: function(e, target){
+        // HACK: IE hack to see if button was released outside of window. */
+        if(this.active && Ext.isIE && !e.browserEvent.button){
+            e.preventDefault();
+            this.onMouseUp(e);
+            return;
+        }
+
+        e.preventDefault();
+        var xy = e.getXY(), s = this.startXY;
+        this.lastXY = xy;
+        if(!this.active){
+            if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){
+                this.triggerStart();
+            }else{
+                return;
+            }
+        }
+        this.fireEvent('mousemove', this, e);
+        this.onDrag(e);
+        this.fireEvent('drag', this, e);
+    },
+
+    onMouseUp: function(e){
+        var doc = Ext.getDoc();
+        doc.un('mousemove', this.onMouseMove, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        doc.un('selectstart', this.stopSelect, this);
+        e.preventDefault();
+        this.clearStart();
+        var wasActive = this.active;
+        this.active = false;
+        delete this.elRegion;
+        this.fireEvent('mouseup', this, e);
+        if(wasActive){
+            this.onEnd(e);
+            this.fireEvent('dragend', this, e);
+        }
+    },
+
+    triggerStart: function(isTimer){
+        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(e){
+        e.stopEvent();
+        return false;
+    },
+
+    onBeforeStart : function(e){
+
+    },
+
+    onStart : function(xy){
+
+    },
+
+    onDrag : function(e){
+
+    },
+
+    onEnd : function(e){
+
+    },
+
+    getDragTarget : function(){
+        return this.dragTarget;
+    },
+
+    getDragCt : function(){
+        return this.el;
+    },
+
+    getXY : function(constrain){
+        return constrain ?
+               this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY;
+    },
+
+    getOffset : function(constrain){
+        var xy = this.getXY(constrain);
+        var s = this.startXY;
+        return [s[0]-xy[0], s[1]-xy[1]];
+    },
+
+    constrainModes: {
+        'point' : function(xy){
+
+            if(!this.elRegion){
+                this.elRegion = this.getDragCt().getRegion();
+            }
+
+            var dr = this.dragRegion;
+
+            dr.left = xy[0];
+            dr.top = xy[1];
+            dr.right = xy[0];
+            dr.bottom = xy[1];
+
+            dr.constrainTo(this.elRegion);
+
+            return [dr.left, dr.top];
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragZone.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragZone.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DragZone.js	(revision 625)
@@ -0,0 +1,133 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.DragZone
+ * @extends Ext.dd.DragSource
+ * <p>This class provides a container DD instance that allows dragging of multiple child source nodes.</p>
+ * <p>This class does not move the drag target nodes, but a proxy element which may contain
+ * any DOM structure you wish. The DOM element to show in the proxy is provided by either a
+ * provided implementation of {@link #getDragData}, or by registered draggables registered with {@link Ext.dd.Registry}</p>
+ * <p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some
+ * application object (For example nodes in a {@link Ext.DataView DataView}) then use of this class
+ * is the most efficient way to "activate" those nodes.</p>
+ * <p>By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DragZone to manage any number of draggable elements is to configure
+ * the DragZone with  an implementation of the {@link #getDragData} method which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector. For example, to make the nodes of a DataView draggable, use the following
+ * technique. Knowledge of the use of the DataView is required:</p><pre><code>
+myDataView.on('render', function() {
+    myDataView.dragZone = new Ext.dd.DragZone(myDataView.getEl(), {
+
+//      On receipt of a mousedown event, see if it is within a DataView node.
+//      Return a drag data object if so.
+        getDragData: function(e) {
+
+//          Use the DataView's own itemSelector (a mandatory property) to
+//          test if the mousedown is within one of the DataView's nodes.
+            var sourceEl = e.getTarget(myDataView.itemSelector, 10);
+
+//          If the mousedown is within a DataView node, clone the node to produce
+//          a ddel element for use by the drag proxy. Also add application data
+//          to the returned data object.
+            if (sourceEl) {
+                d = sourceEl.cloneNode(true);
+                d.id = Ext.id();
+                return {
+                    ddel: d,
+                    sourceEl: sourceEl,
+                    repairXY: Ext.fly(sourceEl).getXY(),
+                    sourceStore: myDataView.store,
+                    draggedRecord: v.getRecord(sourceEl)
+                }
+            }
+        },
+
+//      Provide coordinates for the proxy to slide back to on failed drag.
+//      This is the original XY coordinates of the draggable element captured
+//      in the getDragData method.
+        getRepairXY: function() {
+            return this.dragData.repairXY;
+        }
+    });
+});</code></pre>
+ * See the {@link Ext.dd.DropZone DropZone} documentation for details about building a DropZone which
+ * cooperates with this DragZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DragZone = function(el, config){
+    Ext.dd.DragZone.superclass.constructor.call(this, el, config);
+    if(this.containerScroll){
+        Ext.dd.ScrollManager.register(this.el);
+    }
+};
+
+Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, {
+    /**
+     * This property contains the data representing the dragged object. This data is set up by the implementation
+     * of the {@link #getDragData} method. It must contain a <tt>ddel</tt> property, but can contain
+     * any other data according to the application's needs.
+     * @type Object
+     * @property dragData
+     */
+    /**
+     * @cfg {Boolean} containerScroll True to register this container with the Scrollmanager
+     * for auto scrolling during drag operations.
+     */
+    /**
+     * @cfg {String} hlColor The color to use when visually highlighting the drag source in the afterRepair
+     * method after a failed drop (defaults to "c3daf9" - light blue)
+     */
+
+    /**
+     * Called when a mousedown occurs in this container. Looks in {@link Ext.dd.Registry}
+     * for a valid target to drag based on the mouse down. Override this method
+     * to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned
+     * object has a "ddel" attribute (with an HTML Element) for other functions to work.
+     * @param {EventObject} e The mouse down event
+     * @return {Object} The dragData
+     */
+    getDragData : function(e){
+        return Ext.dd.Registry.getHandleFromEvent(e);
+    },
+    
+    /**
+     * Called once drag threshold has been reached to initialize the proxy element. By default, it clones the
+     * this.dragData.ddel
+     * @param {Number} x The x position of the click on the dragged object
+     * @param {Number} y The y position of the click on the dragged object
+     * @return {Boolean} true to continue the drag, false to cancel
+     */
+    onInitDrag : function(x, y){
+        this.proxy.update(this.dragData.ddel.cloneNode(true));
+        this.onStartDrag(x, y);
+        return true;
+    },
+    
+    /**
+     * Called after a repair of an invalid drop. By default, highlights this.dragData.ddel 
+     */
+    afterRepair : function(){
+        if(Ext.enableFx){
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    },
+
+    /**
+     * Called before a repair of an invalid drop to get the XY to animate to. By default returns
+     * the XY of this.dragData.ddel
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e){
+        return Ext.Element.fly(this.dragData.ddel).getXY();  
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropTarget.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropTarget.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropTarget.js	(revision 625)
@@ -0,0 +1,115 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.DropTarget
+ * @extends Ext.dd.DDTarget
+ * A simple class that provides the basic implementation needed to make any element a drop target that can have
+ * draggable items dropped onto it.  The drop has no effect until an implementation of notifyDrop is provided.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropTarget = function(el, config){
+    this.el = Ext.get(el);
+    
+    Ext.apply(this, config);
+    
+    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, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to undefined).
+     */
+    /**
+     * @cfg {String} overClass
+     * The CSS class applied to the drop target element while the drag source is over it (defaults to "").
+     */
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    // private
+    isTarget : true,
+
+    // private
+    isNotifyTarget : true,
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source is now over the
+     * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
+     * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        if(this.overClass){
+            this.el.addClass(this.overClass);
+        }
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the target.
+     * This method will be called on every mouse movement while the drag source is over the drop target.
+     * This default implementation simply returns the dropAllowed config value.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source has been dragged
+     * out of the target without dropping.  This default implementation simply removes the CSS class specified by
+     * overClass (if any) from the drop element.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    notifyOut : function(dd, e, data){
+        if(this.overClass){
+            this.el.removeClass(this.overClass);
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the dragged item has
+     * been dropped on it.  This method has no default implementation and returns false, so you must provide an
+     * implementation that does something to process the drop event and returns true so that the drag source's
+     * repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        return false;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropZone.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropZone.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/DropZone.js	(revision 625)
@@ -0,0 +1,262 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.DropZone
+ * @extends Ext.dd.DropTarget
+ * <p>This class provides a container DD instance that allows dropping on multiple child target nodes.</p>
+ * <p>By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}.
+ * However a simpler way to allow a DropZone to manage any number of target elements is to configure the
+ * DropZone with an implementation of {@link #getTargetFromEvent} which interrogates the passed
+ * mouse event to see if it has taken place within an element, or class of elements. This is easily done
+ * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a
+ * {@link Ext.DomQuery} selector.</p>
+ * <p>Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over
+ * a drop target, that target is passed as the first parameter to {@link #onNodeEnter}, {@link #onNodeOver},
+ * {@link #onNodeOut}, {@link #onNodeDrop}. You may configure the instance of DropZone with implementations
+ * of these methods to provide application-specific behaviour for these events to update both
+ * application state, and UI state.</p>
+ * <p>For example to make a GridPanel a cooperating target with the example illustrated in
+ * {@link Ext.dd.DragZone DragZone}, the following technique might be used:</p><pre><code>
+myGridPanel.on('render', function() {
+    myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, {
+
+//      If the mouse is over a grid row, return that node. This is
+//      provided as the "target" parameter in all "onNodeXXXX" node event handling functions
+        getTargetFromEvent: function(e) {
+            return e.getTarget(myGridPanel.getView().rowSelector);
+        },
+
+//      On entry into a target node, highlight that node.
+        onNodeEnter : function(target, dd, e, data){ 
+            Ext.fly(target).addClass('my-row-highlight-class');
+        },
+
+//      On exit from a target node, unhighlight that node.
+        onNodeOut : function(target, dd, e, data){ 
+            Ext.fly(target).removeClass('my-row-highlight-class');
+        },
+
+//      While over a target node, return the default drop allowed class which
+//      places a "tick" icon into the drag proxy.
+        onNodeOver : function(target, dd, e, data){ 
+            return Ext.dd.DropZone.prototype.dropAllowed;
+        },
+
+//      On node drop we can interrogate the target to find the underlying
+//      application object that is the real target of the dragged data.
+//      In this case, it is a Record in the GridPanel's Store.
+//      We can use the data set up by the DragZone's getDragData method to read
+//      any data we decided to attach in the DragZone's getDragData method.
+        onNodeDrop : function(target, dd, e, data){
+            var rowIndex = myGridPanel.getView().findRowIndex(target);
+            var r = myGridPanel.getStore().getAt(rowIndex);
+            Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id +
+                ' on Record id ' + r.id);
+            return true;
+        }
+    });
+}
+</code></pre>
+ * See the {@link Ext.dd.DragZone DragZone} documentation for details about building a DragZone which
+ * cooperates with this DropZone.
+ * @constructor
+ * @param {Mixed} el The container element
+ * @param {Object} config
+ */
+Ext.dd.DropZone = function(el, config){
+    Ext.dd.DropZone.superclass.constructor.call(this, el, config);
+};
+
+Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
+    /**
+     * Returns a custom data object associated with the DOM node that is the target of the event.  By default
+     * this looks up the event target in the {@link Ext.dd.Registry}, although you can override this method to
+     * provide your own custom lookup.
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+    getTargetFromEvent : function(e){
+        return Ext.dd.Registry.getTargetFromEvent(e);
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from 
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeEnter : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node
+     * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}.
+     * The default implementation returns this.dropNotAllowed, so it should be
+     * overridden to provide the proper feedback.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onNodeOver : function(n, dd, e, data){
+        return this.dropAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dragged out of
+     * the drop node without dropping.  This method has no default implementation and should be overridden to provide
+     * node-specific processing if necessary.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     */
+    onNodeOut : function(n, dd, e, data){
+        
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped onto
+     * the drop node.  The default implementation returns false, so it should be overridden to provide the
+     * appropriate processing of the drop event and return true so that the drag source's repair action does not run.
+     * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from
+     * {@link #getTargetFromEvent} for this node)
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onNodeDrop : function(n, dd, e, data){
+        return false;
+    },
+
+    /**
+     * Called while the DropZone determines that a {@link Ext.dd.DragSource} is being dragged over it,
+     * but not over any of its registered drop nodes.  The default implementation returns this.dropNotAllowed, so
+     * it should be overridden to provide the proper feedback if necessary.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    onContainerOver : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * Called when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped on it,
+     * but not on any of its registered drop nodes.  The default implementation returns false, so it should be
+     * overridden to provide the appropriate processing of the drop event if you need the drop zone itself to
+     * be able to accept drops.  It should return true when valid so that the drag source's repair action does not run.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    onContainerDrop : function(dd, e, data){
+        return false;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source is now over
+     * the zone.  The default implementation returns this.dropNotAllowed and expects that only registered drop
+     * nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops
+     * you should override this method and provide a custom implementation.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyEnter : function(dd, e, data){
+        return this.dropNotAllowed;
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the drop zone.
+     * This method will be called on every mouse movement while the drag source is over the drop zone.
+     * It will call {@link #onNodeOver} while the drag source is over a registered node, and will also automatically
+     * delegate to the appropriate node-specific methods as necessary when the drag source enters and exits
+     * registered nodes ({@link #onNodeEnter}, {@link #onNodeOut}). If the drag source is not currently over a
+     * registered node, it will call {@link #onContainerOver}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {String} status The CSS class that communicates the drop status back to the source so that the
+     * underlying {@link Ext.dd.StatusProxy} can be updated
+     */
+    notifyOver : function(dd, e, data){
+        var n = this.getTargetFromEvent(e);
+        if(!n){ // not over valid drop target
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+                this.lastOverNode = null;
+            }
+            return this.onContainerOver(dd, e, data);
+        }
+        if(this.lastOverNode != n){
+            if(this.lastOverNode){
+                this.onNodeOut(this.lastOverNode, dd, e, data);
+            }
+            this.onNodeEnter(n, dd, e, data);
+            this.lastOverNode = n;
+        }
+        return this.onNodeOver(n, dd, e, data);
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source has been dragged
+     * out of the zone without dropping.  If the drag source is currently over a registered node, the notification
+     * will be delegated to {@link #onNodeOut} for node-specific handling, otherwise it will be ignored.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag zone
+     */
+    notifyOut : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+    },
+
+    /**
+     * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the dragged item has
+     * been dropped on it.  The drag zone will look up the target node based on the event passed in, and if there
+     * is a node registered for that event, it will delegate to {@link #onNodeDrop} for node-specific handling,
+     * otherwise it will call {@link #onContainerDrop}.
+     * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone
+     * @param {Event} e The event
+     * @param {Object} data An object containing arbitrary data supplied by the drag source
+     * @return {Boolean} True if the drop was valid, else false
+     */
+    notifyDrop : function(dd, e, data){
+        if(this.lastOverNode){
+            this.onNodeOut(this.lastOverNode, dd, e, data);
+            this.lastOverNode = null;
+        }
+        var n = this.getTargetFromEvent(e);
+        return n ?
+            this.onNodeDrop(n, dd, e, data) :
+            this.onContainerDrop(dd, e, data);
+    },
+
+    // private
+    triggerCacheRefresh : function(){
+        Ext.dd.DDM.refreshCache(this.groups);
+    }  
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/Registry.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/Registry.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/Registry.js	(revision 625)
@@ -0,0 +1,127 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.Registry
+ * Provides easy access to all drag drop components that are registered on a page.  Items can be retrieved either
+ * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.
+ * @singleton
+ */
+Ext.dd.Registry = function(){
+    var elements = {}; 
+    var handles = {}; 
+    var autoIdSeed = 0;
+
+    var getId = function(el, autogen){
+        if(typeof el == "string"){
+            return el;
+        }
+        var id = el.id;
+        if(!id && autogen !== false){
+            id = "extdd-" + (++autoIdSeed);
+            el.id = id;
+        }
+        return id;
+    };
+    
+    return {
+    /**
+     * Resgister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to register
+     * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved
+     * in drag drop operations.  You can populate this object with any arbitrary properties that your own code
+     * knows how to interpret, plus there are some specific properties known to the Registry that should be
+     * populated in the data object (if applicable):
+     * <pre>
+Value      Description<br />
+---------  ------------------------------------------<br />
+handles    Array of DOM nodes that trigger dragging<br />
+           for the element being registered<br />
+isHandle   True if the element passed in triggers<br />
+           dragging itself, else false
+</pre>
+     */
+        register : function(el, data){
+            data = data || {};
+            if(typeof el == "string"){
+                el = document.getElementById(el);
+            }
+            data.ddel = el;
+            elements[getId(el)] = data;
+            if(data.isHandle !== false){
+                handles[data.ddel.id] = data;
+            }
+            if(data.handles){
+                var hs = data.handles;
+                for(var i = 0, len = hs.length; i < len; i++){
+                	handles[getId(hs[i])] = data;
+                }
+            }
+        },
+
+    /**
+     * Unregister a drag drop element
+     * @param {String/HTMLElement) element The id or DOM node to unregister
+     */
+        unregister : function(el){
+            var id = getId(el, false);
+            var data = elements[id];
+            if(data){
+                delete elements[id];
+                if(data.handles){
+                    var hs = data.handles;
+                    for(var i = 0, len = hs.length; i < len; i++){
+                    	delete handles[getId(hs[i], false)];
+                    }
+                }
+            }
+        },
+
+    /**
+     * Returns the handle registered for a DOM Node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} handle The custom handle data
+     */
+        getHandle : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return handles[id];
+        },
+
+    /**
+     * Returns the handle that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} handle The custom handle data
+     */
+        getHandleFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? handles[t.id] : null;
+        },
+
+    /**
+     * Returns a custom data object that is registered for a DOM node by id
+     * @param {String/HTMLElement} id The DOM node or id to look up
+     * @return {Object} data The custom data
+     */
+        getTarget : function(id){
+            if(typeof id != "string"){ // must be element?
+                id = id.id;
+            }
+            return elements[id];
+        },
+
+    /**
+     * Returns a custom data object that is registered for the DOM node that is the target of the event
+     * @param {Event} e The event
+     * @return {Object} data The custom data
+     */
+        getTargetFromEvent : function(e){
+            var t = Ext.lib.Event.getTarget(e);
+            return t ? elements[t.id] || handles[t.id] : null;
+        }
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/ScrollManager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/ScrollManager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/ScrollManager.js	(revision 625)
@@ -0,0 +1,201 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.ScrollManager
+ * <p>Provides automatic scrolling of overflow regions in the page during drag operations.</p>
+ * <p>The ScrollManager configs will be used as the defaults for any scroll container registered with it,
+ * but you can also override most of the configs per scroll container by adding a 
+ * <tt>ddScrollConfig</tt> object to the target element that contains these properties: {@link #hthresh},
+ * {@link #vthresh}, {@link #increment} and {@link #frequency}.  Example usage:
+ * <pre><code>
+var el = Ext.get('scroll-ct');
+el.ddScrollConfig = {
+    vthresh: 50,
+    hthresh: -1,
+    frequency: 100,
+    increment: 200
+};
+Ext.dd.ScrollManager.register(el);
+</code></pre>
+ * <b>Note: This class uses "Point Mode" and is untested in "Intersect Mode".</b>
+ * @singleton
+ */
+Ext.dd.ScrollManager = function(){
+    var ddm = Ext.dd.DragDropMgr;
+    var els = {};
+    var dragEl = null;
+    var proc = {};
+    
+    var onStop = function(e){
+        dragEl = null;
+        clearProc();
+    };
+    
+    var triggerRefresh = function(){
+        if(ddm.dragCurrent){
+             ddm.refreshCache(ddm.dragCurrent.groups);
+        }
+    };
+    
+    var doScroll = function(){
+        if(ddm.dragCurrent){
+            var dds = Ext.dd.ScrollManager;
+            var inc = proc.el.ddScrollConfig ?
+                      proc.el.ddScrollConfig.increment : dds.increment;
+            if(!dds.animate){
+                if(proc.el.scroll(proc.dir, inc)){
+                    triggerRefresh();
+                }
+            }else{
+                proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh);
+            }
+        }
+    };
+    
+    var clearProc = function(){
+        if(proc.id){
+            clearInterval(proc.id);
+        }
+        proc.id = 0;
+        proc.el = null;
+        proc.dir = "";
+    };
+    
+    var startProc = function(el, dir){
+        clearProc();
+        proc.el = el;
+        proc.dir = dir;
+        var freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) ? 
+                el.ddScrollConfig.frequency : Ext.dd.ScrollManager.frequency;
+        proc.id = setInterval(doScroll, freq);
+    };
+    
+    var onFire = function(e, isDrop){
+        if(isDrop || !ddm.dragCurrent){ return; }
+        var dds = Ext.dd.ScrollManager;
+        if(!dragEl || dragEl != ddm.dragCurrent){
+            dragEl = ddm.dragCurrent;
+            // refresh regions on drag start
+            dds.refreshCache();
+        }
+        
+        var xy = Ext.lib.Event.getXY(e);
+        var pt = new Ext.lib.Point(xy[0], xy[1]);
+        for(var id in els){
+            var el = els[id], r = el._region;
+            var c = el.ddScrollConfig ? el.ddScrollConfig : dds;
+            if(r && r.contains(pt) && el.isScrollable()){
+                if(r.bottom - pt.y <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "down");
+                    }
+                    return;
+                }else if(r.right - pt.x <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "left");
+                    }
+                    return;
+                }else if(pt.y - r.top <= c.vthresh){
+                    if(proc.el != el){
+                        startProc(el, "up");
+                    }
+                    return;
+                }else if(pt.x - r.left <= c.hthresh){
+                    if(proc.el != el){
+                        startProc(el, "right");
+                    }
+                    return;
+                }
+            }
+        }
+        clearProc();
+    };
+    
+    ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm);
+    ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm);
+    
+    return {
+        /**
+         * Registers new overflow element(s) to auto scroll
+         * @param {Mixed/Array} el The id of or the element to be scrolled or an array of either
+         */
+        register : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.register(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                els[el.id] = el;
+            }
+        },
+        
+        /**
+         * Unregisters overflow element(s) so they are no longer scrolled
+         * @param {Mixed/Array} el The id of or the element to be removed or an array of either
+         */
+        unregister : function(el){
+            if(Ext.isArray(el)){
+                for(var i = 0, len = el.length; i < len; i++) {
+                	this.unregister(el[i]);
+                }
+            }else{
+                el = Ext.get(el);
+                delete els[el.id];
+            }
+        },
+        
+        /**
+         * The number of pixels from the top or bottom edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        vthresh : 25,
+        /**
+         * The number of pixels from the right or left edge of a container the pointer needs to be to
+         * trigger scrolling (defaults to 25)
+         * @type Number
+         */
+        hthresh : 25,
+
+        /**
+         * The number of pixels to scroll in each scroll increment (defaults to 50)
+         * @type Number
+         */
+        increment : 100,
+        
+        /**
+         * The frequency of scrolls in milliseconds (defaults to 500)
+         * @type Number
+         */
+        frequency : 500,
+        
+        /**
+         * True to animate the scroll (defaults to true)
+         * @type Boolean
+         */
+        animate: true,
+        
+        /**
+         * The animation duration in seconds - 
+         * MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4)
+         * @type Number
+         */
+        animDuration: .4,
+        
+        /**
+         * Manually trigger a cache refresh.
+         */
+        refreshCache : function(){
+            for(var id in els){
+                if(typeof els[id] == 'object'){ // for people extending the object prototype
+                    els[id]._region = els[id].getRegion();
+                }
+            }
+        }
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/dd/StatusProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/dd/StatusProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/dd/StatusProxy.js	(revision 625)
@@ -0,0 +1,171 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.StatusProxy
+ * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair.  This is the
+ * default drag proxy used by all Ext.dd components.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.dd.StatusProxy = function(config){
+    Ext.apply(this, config);
+    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: !config || config.shadow !== false
+    });
+    this.ghost = Ext.get(this.el.dom.childNodes[1]);
+    this.dropStatus = this.dropNotAllowed;
+};
+
+Ext.dd.StatusProxy.prototype = {
+    /**
+     * @cfg {String} dropAllowed
+     * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
+     */
+    dropAllowed : "x-dd-drop-ok",
+    /**
+     * @cfg {String} dropNotAllowed
+     * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
+     */
+    dropNotAllowed : "x-dd-drop-nodrop",
+
+    /**
+     * Updates the proxy's visual element to indicate the status of whether or not drop is allowed
+     * over the current target element.
+     * @param {String} cssClass The css class for the new drop status indicator image
+     */
+    setStatus : function(cssClass){
+        cssClass = cssClass || this.dropNotAllowed;
+        if(this.dropStatus != cssClass){
+            this.el.replaceClass(this.dropStatus, cssClass);
+            this.dropStatus = cssClass;
+        }
+    },
+
+    /**
+     * Resets the status indicator to the default dropNotAllowed value
+     * @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it
+     */
+    reset : function(clearGhost){
+        this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed;
+        this.dropStatus = this.dropNotAllowed;
+        if(clearGhost){
+            this.ghost.update("");
+        }
+    },
+
+    /**
+     * Updates the contents of the ghost element
+     * @param {String/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a
+     * DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first).
+     */
+    update : function(html){
+        if(typeof html == "string"){
+            this.ghost.update(html);
+        }else{
+            this.ghost.update("");
+            html.style.margin = "0";
+            this.ghost.dom.appendChild(html);
+        }
+        var el = this.ghost.dom.firstChild; 
+        if(el){
+            Ext.fly(el).setStyle('float', 'none');
+        }
+    },
+
+    /**
+     * Returns the underlying proxy {@link Ext.Layer}
+     * @return {Ext.Layer} el
+    */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the ghost element
+     * @return {Ext.Element} el
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Hides the proxy
+     * @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them
+     */
+    hide : function(clear){
+        this.el.hide();
+        if(clear){
+            this.reset(true);
+        }
+    },
+
+    /**
+     * Stops the repair animation if it's currently running
+     */
+    stop : function(){
+        if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){
+            this.anim.stop();
+        }
+    },
+
+    /**
+     * Displays this proxy
+     */
+    show : function(){
+        this.el.show();
+    },
+
+    /**
+     * Force the Layer to sync its shadow and shim positions to the element
+     */
+    sync : function(){
+        this.el.sync();
+    },
+
+    /**
+     * Causes the proxy to return to its position of origin via an animation.  Should be called after an
+     * invalid drop operation by the item being dragged.
+     * @param {Array} xy The XY position of the element ([x, y])
+     * @param {Function} callback The function to call after the repair is complete
+     * @param {Object} scope The scope in which to execute the callback
+     */
+    repair : function(xy, callback, scope){
+        this.callback = callback;
+        this.scope = scope;
+        if(xy && this.animRepair !== false){
+            this.el.addClass("x-dd-drag-repair");
+            this.el.hideUnders(true);
+            this.anim = this.el.shift({
+                duration: this.repairDuration || .5,
+                easing: 'easeOut',
+                xy: xy,
+                stopFx: true,
+                callback: this.afterRepair,
+                scope: this
+            });
+        }else{
+            this.afterRepair();
+        }
+    },
+
+    // private
+    afterRepair : function(){
+        this.hide(true);
+        if(typeof this.callback == "function"){
+            this.callback.call(this.scope || this);
+        }
+        this.callback = null;
+        this.scope = null;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/debug.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/debug.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/debug.js	(revision 625)
@@ -0,0 +1,906 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.debug = {};
+
+(function(){
+
+var cp;
+
+function createConsole(){
+
+    var scriptPanel = new Ext.debug.ScriptsPanel();
+    var logView = new Ext.debug.LogPanel();
+    var tree = new Ext.debug.DomTree();
+    var compInspector = new Ext.debug.ComponentInspector();
+    var compInfoPanel = new Ext.debug.ComponentInfoPanel();
+    var storeInspector = new Ext.debug.StoreInspector();
+    var objInspector = new Ext.debug.ObjectInspector();
+
+    var tabs = new Ext.TabPanel({
+        activeTab: 0,
+        border: false,
+        tabPosition: 'bottom',
+        items: [{
+            title: 'Debug Console',
+            layout:'border',
+            items: [logView, scriptPanel]
+        },{
+            title: 'HTML Inspector',
+            layout:'border',
+            items: [tree]
+        },{
+            title: 'Component Inspector',
+            layout: 'border',
+            items: [compInspector,compInfoPanel]
+        },{
+            title: 'Object Inspector',
+            layout: 'border',
+            items: [objInspector]
+        },{
+            title: 'Data Stores',
+            layout: 'border',
+            items: [storeInspector]
+        }]
+    });
+
+    cp = new Ext.Panel({
+        id: 'x-debug-browser',
+        title: 'Console',
+        collapsible: true,
+        animCollapse: false,
+        style: 'position:absolute;left:0;bottom:0;z-index:101',
+        height:200,
+        logView: logView,
+        layout: 'fit',
+
+        tools:[{
+            id: 'close',
+            handler: function(){
+                cp.destroy();
+                cp = null;
+                Ext.EventManager.removeResizeListener(handleResize);
+            }
+        }],
+
+        items: tabs
+    });
+
+    cp.render(Ext.getBody());
+
+    cp.resizer = new Ext.Resizable(cp.el, {
+        minHeight:50,
+        handles: "n",
+        pinned: true,
+        transparent:true,
+        resizeElement : function(){
+            var box = this.proxy.getBox();
+            this.proxy.hide();
+            cp.setHeight(box.height);
+            return box;
+        }
+    });
+
+//     function handleResize(){
+//         cp.setWidth(Ext.getBody().getViewSize().width);
+//     }
+//     Ext.EventManager.onWindowResize(handleResize);
+//
+//     handleResize();
+
+    function handleResize(){
+        var b = Ext.getBody()
+        var size = b.getViewSize();
+        if(size.height < b.dom.scrollHeight) {
+            size.width -= 18;
+        }
+        cp.setWidth(size.width);
+    }
+    Ext.EventManager.onWindowResize(handleResize);
+    handleResize();
+}
+
+
+Ext.apply(Ext, {
+    log : function(){
+        if(!cp){
+            createConsole();
+        }
+        cp.logView.log.apply(cp.logView, arguments);
+    },
+
+    logf : function(format, arg1, arg2, etc){
+        Ext.log(String.format.apply(String, arguments));
+    },
+
+    dump : function(o){
+        if(typeof o == 'string' || typeof o == 'number' || typeof o == 'undefined' || Ext.isDate(o)){
+            Ext.log(o);
+        }else if(!o){
+            Ext.log("null");
+        }else if(typeof o != "object"){
+            Ext.log('Unknown return type');
+        }else if(Ext.isArray(o)){
+            Ext.log('['+o.join(',')+']');
+        }else{
+            var b = ["{\n"];
+            for(var key in o){
+                var to = typeof o[key];
+                if(to != "function" && to != "object"){
+                    b.push(String.format("  {0}: {1},\n", key, o[key]));
+                }
+            }
+            var s = b.join("");
+            if(s.length > 3){
+                s = s.substr(0, s.length-2);
+            }
+            Ext.log(s + "\n}");
+        }
+    },
+
+    _timers : {},
+
+    time : function(name){
+        name = name || "def";
+        Ext._timers[name] = new Date().getTime();
+    },
+
+    timeEnd : function(name, printResults){
+        var t = new Date().getTime();
+        name = name || "def";
+        var v = String.format("{0} ms", t-Ext._timers[name]);
+        Ext._timers[name] = new Date().getTime();
+        if(printResults !== false){
+            Ext.log('Timer ' + (name == "def" ? v : name + ": " + v));
+        }
+        return v;
+    }
+});
+
+})();
+
+
+Ext.debug.ScriptsPanel = Ext.extend(Ext.Panel, {
+    id:'x-debug-scripts',
+    region: 'east',
+    minWidth: 200,
+    split: true,
+    width: 350,
+    border: false,
+    layout:'anchor',
+    style:'border-width:0 0 0 1px;',
+
+    initComponent : function(){
+
+        this.scriptField = new Ext.form.TextArea({
+            anchor: '100% -26',
+            style:'border-width:0;'
+        });
+
+        this.trapBox = new Ext.form.Checkbox({
+            id: 'console-trap',
+            boxLabel: 'Trap Errors',
+            checked: true
+        });
+
+        this.toolbar = new Ext.Toolbar([{
+                text: 'Run',
+                scope: this,
+                handler: this.evalScript
+            },{
+                text: 'Clear',
+                scope: this,
+                handler: this.clear
+            },
+            '->',
+            this.trapBox,
+            ' ', ' '
+        ]);
+
+        this.items = [this.toolbar, this.scriptField];
+
+        Ext.debug.ScriptsPanel.superclass.initComponent.call(this);
+    },
+
+    evalScript : function(){
+        var s = this.scriptField.getValue();
+        if(this.trapBox.getValue()){
+            try{
+                var rt = eval(s);
+                Ext.dump(rt === undefined? '(no return)' : rt);
+            }catch(e){
+                Ext.log(e.message || e.descript);
+            }
+        }else{
+            var rt = eval(s);
+            Ext.dump(rt === undefined? '(no return)' : rt);
+        }
+    },
+
+    clear : function(){
+        this.scriptField.setValue('');
+        this.scriptField.focus();
+    }
+
+});
+
+Ext.debug.LogPanel = Ext.extend(Ext.Panel, {
+    autoScroll: true,
+    region: 'center',
+    border: false,
+    style:'border-width:0 1px 0 0',
+
+    log : function(){
+        var markup = [  '<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '<br/>').replace(/\s/g, '&#160;'),
+                    '</div>'].join('');
+
+        this.body.insertHtml('beforeend', markup);
+        this.body.scrollTo('top', 100000);
+    },
+
+    clear : function(){
+        this.body.update('');
+        this.body.dom.scrollTop = 0;
+    }
+});
+
+Ext.debug.DomTree = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent : function(){
+
+
+        Ext.debug.DomTree.superclass.initComponent.call(this);
+
+        // tree related stuff
+        var styles = false, hnode;
+        var nonSpace = /^\s*$/;
+        var html = Ext.util.Format.htmlEncode;
+        var ellipsis = Ext.util.Format.ellipsis;
+        var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;
+
+        function findNode(n){
+            if(!n || n.nodeType != 1 || n == document.body || n == document){
+                return false;
+            }
+            var pn = [n], p = n;
+            while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){
+                pn.unshift(p);
+            }
+            var cn = hnode;
+            for(var i = 0, len = pn.length; i < len; i++){
+                cn.expand();
+                cn = cn.findChild('htmlNode', pn[i]);
+                if(!cn){ // in this dialog?
+                    return false;
+                }
+            }
+            cn.select();
+            var a = cn.ui.anchor;
+            this.getTreeEl().dom.scrollTop = Math.max(0 ,a.offsetTop-10);
+            //treeEl.dom.scrollLeft = Math.max(0 ,a.offsetLeft-10); no likey
+            cn.highlight();
+            return true;
+        }
+
+        function nodeTitle(n){
+            var s = n.tagName;
+            if(n.id){
+                s += '#'+n.id;
+            }else if(n.className){
+                s += '.'+n.className;
+            }
+            return s;
+        }
+
+        /*
+        function onNodeSelect(t, n, last){
+            return;
+            if(last && last.unframe){
+                last.unframe();
+            }
+            var props = {};
+            if(n && n.htmlNode){
+                if(frameEl.pressed){
+                    n.frame();
+                }
+                if(inspecting){
+                    return;
+                }
+                addStyle.enable();
+                reload.setDisabled(n.leaf);
+                var dom = n.htmlNode;
+                stylePanel.setTitle(nodeTitle(dom));
+                if(styles && !showAll.pressed){
+                    var s = dom.style ? dom.style.cssText : '';
+                    if(s){
+                        var m;
+                        while ((m = styleRe.exec(s)) != null){
+                            props[m[1].toLowerCase()] = m[2];
+                        }
+                    }
+                }else if(styles){
+                    var cl = Ext.debug.cssList;
+                    var s = dom.style, fly = Ext.fly(dom);
+                    if(s){
+                        for(var i = 0, len = cl.length; i<len; i++){
+                            var st = cl[i];
+                            var v = s[st] || fly.getStyle(st);
+                            if(v != undefined && v !== null && v !== ''){
+                                props[st] = v;
+                            }
+                        }
+                    }
+                }else{
+                    for(var a in dom){
+                        var v = dom[a];
+                        if((isNaN(a+10)) && v != undefined && v !== null && v !== '' && !(Ext.isGecko && a[0] == a[0].toUpperCase())){
+                            props[a] = v;
+                        }
+                    }
+                }
+            }else{
+                if(inspecting){
+                    return;
+                }
+                addStyle.disable();
+                reload.disabled();
+            }
+            stylesGrid.setSource(props);
+            stylesGrid.treeNode = n;
+            stylesGrid.view.fitColumns();
+        }
+        */
+
+        this.loader = new Ext.tree.TreeLoader();
+        this.loader.load = function(n, cb){
+            var isBody = n.htmlNode == document.body;
+            var cn = n.htmlNode.childNodes;
+            for(var i = 0, c; c = cn[i]; i++){
+                if(isBody && c.id == 'x-debug-browser'){
+                    continue;
+                }
+                if(c.nodeType == 1){
+                    n.appendChild(new Ext.debug.HtmlNode(c));
+                }else if(c.nodeType == 3 && !nonSpace.test(c.nodeValue)){
+                    n.appendChild(new Ext.tree.TreeNode({
+                        text:'<em>' + ellipsis(html(String(c.nodeValue)), 35) + '</em>',
+                        cls: 'x-tree-noicon'
+                    }));
+                }
+            }
+            cb();
+        };
+
+        //tree.getSelectionModel().on('selectionchange', onNodeSelect, null, {buffer:250});
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode('Ext'));
+
+        hnode = this.root.appendChild(new Ext.debug.HtmlNode(
+                document.getElementsByTagName('html')[0]
+        ));
+
+    }
+});
+
+Ext.debug.ComponentNodeUI = Ext.extend(Ext.tree.TreeNodeUI,{
+    onOver : function(e){
+        Ext.debug.ComponentNodeUI.superclass.onOver.call(this);
+        var cmp = this.node.attributes.component;
+        if (cmp.el && cmp.el.mask && cmp.id !='x-debug-browser') {
+            try { // Oddly bombs on some elements in IE, gets any we care about though
+                cmp.el.mask();
+            } catch(e) {}
+        }
+    },
+
+    onOut : function(e){
+        Ext.debug.ComponentNodeUI.superclass.onOut.call(this);
+        var cmp = this.node.attributes.component;
+        if (cmp.el && cmp.el.unmask && cmp.id !='x-debug-browser') {
+            try {
+                cmp.el.unmask();
+            } catch(e) {}
+        }
+    }
+});
+
+Ext.debug.ComponentInspector = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent : function(){
+        this.loader = new Ext.tree.TreeLoader();
+        this.bbar = new Ext.Toolbar([{
+            text: 'Refresh',
+            handler: this.refresh,
+            scope: this
+        }]);
+        Ext.debug.ComponentInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Ext Components',
+            component: Ext.ComponentMgr.all,
+            leaf: false
+        }));
+        this.parseRootNode();
+
+        this.on('click', this.onClick, this);
+    },
+
+    createNode: function(n,c) {
+        var leaf = (c.items && c.items.length > 0);
+        return n.appendChild(new Ext.tree.TreeNode({
+            text: c.id + (c.getXType() ? ' [ ' + c.getXType() + ' ]': '' ),
+            component: c,
+            uiProvider:Ext.debug.ComponentNodeUI,
+            leaf: !leaf
+        }));
+    },
+
+    parseChildItems: function(n) {
+        var cn = n.attributes.component.items;
+        if (cn) {
+            for (var i = 0;i < cn.length; i++) {
+                var c = cn.get(i);
+                if (c.id != this.id && c.id != this.bottomToolbar.id) {
+                    var newNode = this.createNode(n,c);
+                    if (!newNode.leaf) {
+                        this.parseChildItems(newNode)
+                    }
+                }
+            }
+        }
+    },
+
+    parseRootNode: function() {
+        var n = this.root;
+        var cn = n.attributes.component.items;
+        for (var i = 0,c;c = cn[i];i++) {
+            if (c.id != this.id && c.id != this.bottomToolbar.id) {
+                if (!c.ownerCt) {
+                    var newNode = this.createNode(n,c);
+                    if (!newNode.leaf) {
+                        this.parseChildItems(newNode);
+                    }
+                }
+            }
+        }
+    },
+
+    onClick: function(node, e) {
+        var oi = Ext.getCmp('x-debug-objinspector');
+        oi.refreshNodes(node.attributes.component);
+        oi.ownerCt.show();
+    },
+
+    refresh: function() {
+        while (this.root.firstChild) {
+            this.root.removeChild(this.root.firstChild);
+        }
+        this.parseRootNode();
+        var ci = Ext.getCmp('x-debug-compinfo');
+        if (ci) {
+            ci.message('refreshed component tree - '+Ext.ComponentMgr.all.length)
+        }
+    }
+});
+
+Ext.debug.ComponentInfoPanel = Ext.extend(Ext.Panel,{
+    id:'x-debug-compinfo',
+    region: 'east',
+    minWidth: 200,
+    split: true,
+    width: 350,
+    border: false,
+    autoScroll: true,
+    layout:'anchor',
+    style:'border-width:0 0 0 1px;',
+
+    initComponent: function() {
+        this.watchBox = new Ext.form.Checkbox({
+            id: 'x-debug-watchcomp',
+            boxLabel: 'Watch ComponentMgr',
+            listeners: {
+                check: function(cb, val) {
+                    if (val) {
+                        Ext.ComponentMgr.all.on('add', this.onAdd, this);
+                        Ext.ComponentMgr.all.on('remove', this.onRemove, this);
+                    } else {
+                        Ext.ComponentMgr.all.un('add', this.onAdd, this);
+                        Ext.ComponentMgr.all.un('remove', this.onRemove, this);
+                    }
+                },
+                scope: this
+            }
+        });
+
+        this.tbar = new Ext.Toolbar([{
+            text: 'Clear',
+            handler: this.clear,
+            scope: this
+        },'->',this.watchBox
+        ]);
+        Ext.debug.ComponentInfoPanel.superclass.initComponent.call(this);
+    },
+
+    onAdd: function(i, o, key) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    'Added: '+o.id,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+
+    onRemove: function(o, key) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    'Removed: '+o.id,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+
+    message: function(msg) {
+        var markup = ['<div style="padding:5px !important;border-bottom:1px solid #ccc;">',
+                    msg,
+                    '</div>'].join('');
+        this.insertMarkup(markup);
+    },
+    insertMarkup: function(markup) {
+        this.body.insertHtml('beforeend', markup);
+        this.body.scrollTo('top', 100000);
+    },
+    clear : function(){
+        this.body.update('');
+        this.body.dom.scrollTop = 0;
+    }
+});
+
+Ext.debug.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    focus: Ext.emptyFn, // prevent odd scrolling behavior
+
+    renderElements : function(n, a, targetNode, bulkRender){
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var t = n.getOwnerTree();
+        var cols = t.columns;
+        var bw = t.borderWidth;
+        var c = cols[0];
+
+        var buf = [
+             '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf ', a.cls,'">',
+                '<div class="x-tree-col" style="width:',c.width-bw,'px;">',
+                    '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
+                    '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow"/>',
+                    '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on"/>',
+                    '<a hidefocus="on" class="x-tree-node-anchor" href="',a.href ? a.href : "#",'" tabIndex="1" ',
+                    a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
+                    '<span unselectable="on">', n.text || (c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",
+                "</div>"];
+         for(var i = 1, len = cols.length; i < len; i++){
+             c = cols[i];
+
+             buf.push('<div class="x-tree-col ',(c.cls?c.cls:''),'" style="width:',c.width-bw,'px;">',
+                        '<div class="x-tree-col-text">',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</div>",
+                      "</div>");
+         }
+         buf.push(
+            '<div class="x-clear"></div></div>',
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>");
+
+        if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin",
+                                n.nextSibling.ui.getEl(), buf.join(""));
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join(""));
+        }
+
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.firstChild.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        this.anchor = cs[3];
+        this.textNode = cs[3].firstChild;
+    }
+});
+
+Ext.debug.ObjectInspector = Ext.extend(Ext.tree.TreePanel, {
+    id: 'x-debug-objinspector',
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+    lines:false,
+    borderWidth: Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell
+    cls:'x-column-tree',
+
+    initComponent : function(){
+        this.showFunc = false;
+        this.toggleFunc = function() {
+            this.showFunc = !this.showFunc;
+            this.refreshNodes(this.currentObject);
+        }
+        this.bbar = new Ext.Toolbar([{
+            text: 'Show Functions',
+            enableToggle: true,
+            pressed: false,
+            handler: this.toggleFunc,
+            scope: this
+        }]);
+
+        Ext.apply(this,{
+            title: ' ',
+            loader: new Ext.tree.TreeLoader(),
+            columns:[{
+                header:'Property',
+                width: 300,
+                dataIndex:'name'
+            },{
+                header:'Value',
+                width: 900,
+                dataIndex:'value'
+            }]
+        });
+
+        Ext.debug.ObjectInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Dummy Node',
+            leaf: false
+        }));
+
+        if (this.currentObject) {
+            this.parseNodes();
+        }
+    },
+
+    refreshNodes: function(newObj) {
+        this.currentObject = newObj;
+        var node = this.root;
+        while(node.firstChild){
+            node.removeChild(node.firstChild);
+        }
+        this.parseNodes();
+    },
+
+    parseNodes: function() {
+        for (var o in this.currentObject) {
+            if (!this.showFunc) {
+                if (Ext.isFunction(this.currentObject[o])) {
+                    continue;
+                }
+            }
+            this.createNode(o);
+        }
+    },
+
+    createNode: function(o) {
+        return this.root.appendChild(new Ext.tree.TreeNode({
+            name: o,
+            value: this.currentObject[o],
+            uiProvider:Ext.debug.ColumnNodeUI,
+            iconCls: 'x-debug-node',
+            leaf: true
+        }));
+    },
+
+    onRender : function(){
+        Ext.debug.ObjectInspector.superclass.onRender.apply(this, arguments);
+        this.headers = this.header.createChild({cls:'x-tree-headers'});
+
+        var cols = this.columns, c;
+        var totalWidth = 0;
+
+        for(var i = 0, len = cols.length; i < len; i++){
+             c = cols[i];
+             totalWidth += c.width;
+             this.headers.createChild({
+                 cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''),
+                 cn: {
+                     cls:'x-tree-hd-text',
+                     html: c.header
+                 },
+                 style:'width:'+(c.width-this.borderWidth)+'px;'
+             });
+        }
+        this.headers.createChild({cls:'x-clear'});
+        // prevent floats from wrapping when clipped
+        this.headers.setWidth(totalWidth);
+        this.innerCt.setWidth(totalWidth);
+    }
+});
+
+
+Ext.debug.StoreInspector = Ext.extend(Ext.tree.TreePanel, {
+    enableDD:false ,
+    lines:false,
+    rootVisible:false,
+    animate:false,
+    hlColor:'ffff9c',
+    autoScroll: true,
+    region:'center',
+    border:false,
+
+    initComponent: function() {
+        this.bbar = new Ext.Toolbar([{
+            text: 'Refresh',
+            handler: this.refresh,
+            scope: this
+        }]);
+        Ext.debug.StoreInspector.superclass.initComponent.call(this);
+
+        this.root = this.setRootNode(new Ext.tree.TreeNode({
+            text: 'Data Stores',
+            leaf: false
+        }));
+        this.on('click', this.onClick, this);
+
+        this.parseStores();
+    },
+
+    parseStores: function() {
+        var cn = Ext.StoreMgr.items;
+        for (var i = 0,c;c = cn[i];i++) {
+            this.root.appendChild({
+                text: c.storeId + ' - ' + c.totalLength + ' records',
+                component: c,
+                leaf: true
+            });
+        }
+    },
+
+    onClick: function(node, e) {
+        var oi = Ext.getCmp('x-debug-objinspector');
+        oi.refreshNodes(node.attributes.component);
+        oi.ownerCt.show();
+    },
+
+    refresh: function() {
+        while (this.root.firstChild) {
+            this.root.removeChild(this.root.firstChild);
+        }
+        this.parseStores();
+    }
+});
+
+// highly unusual class declaration
+Ext.debug.HtmlNode = function(){
+    var html = Ext.util.Format.htmlEncode;
+    var ellipsis = Ext.util.Format.ellipsis;
+    var nonSpace = /^\s*$/;
+
+    var attrs = [
+        {n: 'id', v: 'id'},
+        {n: 'className', v: 'class'},
+        {n: 'name', v: 'name'},
+        {n: 'type', v: 'type'},
+        {n: 'src', v: 'src'},
+        {n: 'href', v: 'href'}
+    ];
+
+    function hasChild(n){
+        for(var i = 0, c; c = n.childNodes[i]; i++){
+            if(c.nodeType == 1){
+                return true;
+            }
+        }
+        return false;
+    }
+
+    function renderNode(n, leaf){
+        var tag = n.tagName.toLowerCase();
+        var s = '&lt;' + tag;
+        for(var i = 0, len = attrs.length; i < len; i++){
+            var a = attrs[i];
+            var v = n[a.n];
+            if(v && !nonSpace.test(v)){
+                s += ' ' + a.v + '=&quot;<i>' + html(v) +'</i>&quot;';
+            }
+        }
+        var style = n.style ? n.style.cssText : '';
+        if(style){
+            s += ' style=&quot;<i>' + html(style.toLowerCase()) +'</i>&quot;';
+        }
+        if(leaf && n.childNodes.length > 0){
+            s+='&gt;<em>' + ellipsis(html(String(n.innerHTML)), 35) + '</em>&lt;/'+tag+'&gt;';
+        }else if(leaf){
+            s += ' /&gt;';
+        }else{
+            s += '&gt;';
+        }
+        return s;
+    }
+
+    var HtmlNode = function(n){
+        var leaf = !hasChild(n);
+        this.htmlNode = n;
+        this.tagName = n.tagName.toLowerCase();
+        var attr = {
+            text : renderNode(n, leaf),
+            leaf : leaf,
+            cls: 'x-tree-noicon'
+        };
+        HtmlNode.superclass.constructor.call(this, attr);
+        this.attributes.htmlNode = n; // for searching
+        if(!leaf){
+            this.on('expand', this.onExpand,  this);
+            this.on('collapse', this.onCollapse,  this);
+        }
+    };
+
+
+    Ext.extend(HtmlNode, Ext.tree.AsyncTreeNode, {
+        cls: 'x-tree-noicon',
+        preventHScroll: true,
+        refresh : function(highlight){
+            var leaf = !hasChild(this.htmlNode);
+            this.setText(renderNode(this.htmlNode, leaf));
+            if(highlight){
+                Ext.fly(this.ui.textNode).highlight();
+            }
+        },
+
+        onExpand : function(){
+            if(!this.closeNode && this.parentNode){
+                this.closeNode = this.parentNode.insertBefore(new Ext.tree.TreeNode({
+                    text:'&lt;/' + this.tagName + '&gt;',
+                    cls: 'x-tree-noicon'
+                }), this.nextSibling);
+            }else if(this.closeNode){
+                this.closeNode.ui.show();
+            }
+        },
+
+        onCollapse : function(){
+            if(this.closeNode){
+                this.closeNode.ui.hide();
+            }
+        },
+
+        render : function(bulkRender){
+            HtmlNode.superclass.render.call(this, bulkRender);
+        },
+
+        highlightNode : function(){
+            //Ext.fly(this.htmlNode).highlight();
+        },
+
+        highlight : function(){
+            //Ext.fly(this.ui.textNode).highlight();
+        },
+
+        frame : function(){
+            this.htmlNode.style.border = '1px solid #0000ff';
+            //this.highlightNode();
+        },
+
+        unframe : function(){
+            //Ext.fly(this.htmlNode).removeClass('x-debug-frame');
+            this.htmlNode.style.border = '';
+        }
+    });
+
+    return HtmlNode;
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Direct.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Direct.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Direct.js	(revision 625)
@@ -0,0 +1,235 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Direct
+ * @extends Ext.util.Observable
+ * <p><b><u>Overview</u></b></p>
+ * 
+ * <p>Ext.Direct aims to streamline communication between the client and server
+ * by providing a single interface that reduces the amount of common code
+ * typically required to validate data and handle returned data packets
+ * (reading data, error conditions, etc).</p>
+ *  
+ * <p>The Ext.direct namespace includes several classes for a closer integration
+ * with the server-side. The Ext.data namespace also includes classes for working
+ * with Ext.data.Stores which are backed by data from an Ext.Direct method.</p>
+ * 
+ * <p><b><u>Specification</u></b></p>
+ * 
+ * <p>For additional information consult the 
+ * <a href="http://extjs.com/products/extjs/direct.php">Ext.Direct Specification</a>.</p>
+ *   
+ * <p><b><u>Providers</u></b></p>
+ * 
+ * <p>Ext.Direct uses a provider architecture, where one or more providers are
+ * used to transport data to and from the server. There are several providers
+ * that exist in the core at the moment:</p><div class="mdetail-params"><ul>
+ * 
+ * <li>{@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations</li>
+ * <li>{@link Ext.direct.PollingProvider PollingProvider} for repeated requests</li>
+ * <li>{@link Ext.direct.RemotingProvider RemotingProvider} exposes server side
+ * on the client.</li>
+ * </ul></div>
+ * 
+ * <p>A provider does not need to be invoked directly, providers are added via
+ * {@link Ext.Direct}.{@link Ext.Direct#add add}.</p>
+ * 
+ * <p><b><u>Router</u></b></p>
+ * 
+ * <p>Ext.Direct utilizes a "router" on the server to direct requests from the client
+ * to the appropriate server-side method. Because the Ext.Direct API is completely
+ * platform-agnostic, you could completely swap out a Java based server solution
+ * and replace it with one that uses C# without changing the client side JavaScript
+ * at all.</p>
+ * 
+ * <p><b><u>Server side events</u></b></p>
+ * 
+ * <p>Custom events from the server may be handled by the client by adding
+ * listeners, for example:</p>
+ * <pre><code>
+{"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
+
+// add a handler for a 'message' event sent by the server 
+Ext.Direct.on('message', function(e){
+    out.append(String.format('&lt;p>&lt;i>{0}&lt;/i>&lt;/p>', e.data));
+            out.el.scrollTo('t', 100000, true);
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.Direct = Ext.extend(Ext.util.Observable, {
+    /**
+     * Each event type implements a getData() method. The default event types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>event</tt></b> : Ext.Direct.Event</li>
+     * <li><b><tt>exception</tt></b> : Ext.Direct.ExceptionEvent</li>
+     * <li><b><tt>rpc</tt></b> : Ext.Direct.RemotingEvent</li>
+     * </ul></div>
+     * @property eventTypes
+     * @type Object
+     */
+
+    /**
+     * Four types of possible exceptions which can occur:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>Ext.Direct.exceptions.TRANSPORT</tt></b> : 'xhr'</li>
+     * <li><b><tt>Ext.Direct.exceptions.PARSE</tt></b> : 'parse'</li>
+     * <li><b><tt>Ext.Direct.exceptions.LOGIN</tt></b> : 'login'</li>
+     * <li><b><tt>Ext.Direct.exceptions.SERVER</tt></b> : 'exception'</li>
+     * </ul></div>
+     * @property exceptions
+     * @type Object
+     */
+    exceptions: {
+        TRANSPORT: 'xhr',
+        PARSE: 'parse',
+        LOGIN: 'login',
+        SERVER: 'exception'
+    },
+    
+    // private
+    constructor: function(){
+        this.addEvents(
+            /**
+             * @event event
+             * Fires after an event.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */
+            'event',
+            /**
+             * @event exception
+             * Fires after an event exception.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */
+            'exception'
+        );
+        this.transactions = {};
+        this.providers = {};
+    },
+
+    /**
+     * Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods.
+     * If the provider is not already connected, it will auto-connect.
+     * <pre><code>
+var pollProv = new Ext.direct.PollingProvider({
+    url: 'php/poll2.php'
+}); 
+
+Ext.Direct.addProvider(
+    {
+        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider} 
+        "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
+        "actions":{              // each property within the actions object represents a Class 
+            "TestAction":[       // array of methods within each server side Class   
+            {
+                "name":"doEcho", // name of method
+                "len":1
+            },{
+                "name":"multiply",
+                "len":1
+            },{
+                "name":"doForm",
+                "formHandler":true, // handle form on server with Ext.Direct.Transaction 
+                "len":1
+            }]
+        },
+        "namespace":"myApplication",// namespace to create the Remoting Provider in
+    },{
+        type: 'polling', // create a {@link Ext.direct.PollingProvider} 
+        url:  'php/poll.php'
+    },
+    pollProv // reference to previously created instance
+);
+     * </code></pre>
+     * @param {Object/Array} provider Accepts either an Array of Provider descriptions (an instance
+     * or config object for a Provider) or any number of Provider descriptions as arguments.  Each
+     * Provider description instructs Ext.Direct how to create client-side stub methods.
+     */
+    addProvider : function(provider){        
+        var a = arguments;
+        if(a.length > 1){
+            for(var i = 0, len = a.length; i < len; i++){
+                this.addProvider(a[i]);
+            }
+            return;
+        }
+        
+        // if provider has not already been instantiated
+        if(!provider.events){
+            provider = new Ext.Direct.PROVIDERS[provider.type](provider);
+        }
+        provider.id = provider.id || Ext.id();
+        this.providers[provider.id] = provider;
+
+        provider.on('data', this.onProviderData, this);
+        provider.on('exception', this.onProviderException, this);
+
+
+        if(!provider.isConnected()){
+            provider.connect();
+        }
+
+        return provider;
+    },
+
+    /**
+     * Retrieve a {@link Ext.direct.Provider provider} by the
+     * <b><tt>{@link Ext.direct.Provider#id id}</tt></b> specified when the provider is
+     * {@link #addProvider added}.
+     * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider} 
+     */
+    getProvider : function(id){
+        return this.providers[id];
+    },
+
+    removeProvider : function(id){
+        var provider = id.id ? id : this.providers[id.id];
+        provider.un('data', this.onProviderData, this);
+        provider.un('exception', this.onProviderException, this);
+        delete this.providers[provider.id];
+        return provider;
+    },
+
+    addTransaction: function(t){
+        this.transactions[t.tid] = t;
+        return t;
+    },
+
+    removeTransaction: function(t){
+        delete this.transactions[t.tid || t];
+        return t;
+    },
+
+    getTransaction: function(tid){
+        return this.transactions[tid.tid || tid];
+    },
+
+    onProviderData : function(provider, e){
+        if(Ext.isArray(e)){
+            for(var i = 0, len = e.length; i < len; i++){
+                this.onProviderData(provider, e[i]);
+            }
+            return;
+        }
+        if(e.name && e.name != 'event' && e.name != 'exception'){
+            this.fireEvent(e.name, e);
+        }else if(e.type == 'exception'){
+            this.fireEvent('exception', e);
+        }
+        this.fireEvent('event', e, provider);
+    },
+
+    createEvent : function(response, extraProps){
+        return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps));
+    }
+});
+// overwrite impl. with static instance
+Ext.Direct = new Ext.Direct();
+
+Ext.Direct.TID = 1;
+Ext.Direct.PROVIDERS = {};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Event.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Event.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Event.js	(revision 625)
@@ -0,0 +1,34 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.Direct.Event = function(config){
+    Ext.apply(this, config);
+}
+Ext.Direct.Event.prototype = {
+    status: true,
+    getData: function(){
+        return this.data;
+    }
+};
+
+Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, {
+    type: 'rpc',
+    getTransaction: function(){
+        return this.transaction || Ext.Direct.getTransaction(this.tid);
+    }
+});
+
+Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, {
+    status: false,
+    type: 'exception'
+});
+
+Ext.Direct.eventTypes = {
+    'rpc':  Ext.Direct.RemotingEvent,
+    'event':  Ext.Direct.Event,
+    'exception':  Ext.Direct.ExceptionEvent
+};
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/JsonProvider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/JsonProvider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/JsonProvider.js	(revision 625)
@@ -0,0 +1,45 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.direct.JsonProvider
+ * @extends Ext.direct.Provider
+ */
+Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
+    parseResponse: function(xhr){
+        if(!Ext.isEmpty(xhr.responseText)){
+            if(typeof xhr.responseText == 'object'){
+                return xhr.responseText;
+            }
+            return Ext.decode(xhr.responseText);
+        }
+        return null;
+    },
+
+    getEvents: function(xhr){
+        var data = null;
+        try{
+            data = this.parseResponse(xhr);
+        }catch(e){
+            var event = new Ext.Direct.ExceptionEvent({
+                data: e,
+                xhr: xhr,
+                code: Ext.Direct.exceptions.PARSE,
+                message: 'Error parsing json response: \n\n ' + data
+            })
+            return [event];
+        }
+        var events = [];
+        if(Ext.isArray(data)){
+            for(var i = 0, len = data.length; i < len; i++){
+                events.push(Ext.Direct.createEvent(data[i]));
+            }
+        }else{
+            events.push(Ext.Direct.createEvent(data));
+        }
+        return events;
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/PollingProvider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/PollingProvider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/PollingProvider.js	(revision 625)
@@ -0,0 +1,151 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.direct.PollingProvider
+ * @extends Ext.direct.JsonProvider
+ *
+ * <p>Provides for repetitive polling of the server at distinct {@link #interval intervals}.
+ * The initial request for data originates from the client, and then is responded to by the
+ * server.</p>
+ * 
+ * <p>All configurations for the PollingProvider should be generated by the server-side
+ * API portion of the Ext.Direct stack.</p>
+ *
+ * <p>An instance of PollingProvider may be created directly via the new keyword or by simply
+ * specifying <tt>type = 'polling'</tt>.  For example:</p>
+ * <pre><code>
+var pollA = new Ext.direct.PollingProvider({
+    type:'polling',
+    url: 'php/pollA.php',
+});
+Ext.Direct.addProvider(pollA);
+pollA.disconnect();
+
+Ext.Direct.addProvider(
+    {
+        type:'polling',
+        url: 'php/pollB.php',
+        id: 'pollB-provider'
+    }
+);
+var pollB = Ext.Direct.getProvider('pollB-provider');
+ * </code></pre>
+ */
+Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
+    /**
+     * @cfg {Number} priority
+     * Priority of the request (defaults to <tt>3</tt>). See {@link Ext.direct.Provider#priority}.
+     */
+    // override default priority
+    priority: 3,
+    
+    /**
+     * @cfg {Number} interval
+     * How often to poll the server-side in milliseconds (defaults to <tt>3000</tt> - every
+     * 3 seconds).
+     */
+    interval: 3000,
+
+    /**
+     * @cfg {Object} baseParams An object containing properties which are to be sent as parameters
+     * on every polling request
+     */
+    
+    /**
+     * @cfg {String/Function} url
+     * The url which the PollingProvider should contact with each request. This can also be
+     * an imported Ext.Direct method which will accept the baseParams as its only argument.
+     */
+
+    // private
+    constructor : function(config){
+        Ext.direct.PollingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforepoll
+             * Fired immediately before a poll takes place, an event handler can return false
+             * in order to cancel the poll.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'beforepoll',            
+            /**
+             * @event poll
+             * This event has not yet been implemented.
+             * @param {Ext.direct.PollingProvider}
+             */
+            'poll'
+        );
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.pollTask;
+    },
+
+    /**
+     * Connect to the server-side and begin the polling process. To handle each
+     * response subscribe to the data event.
+     */
+    connect: function(){
+        if(this.url && !this.pollTask){
+            this.pollTask = Ext.TaskMgr.start({
+                run: function(){
+                    if(this.fireEvent('beforepoll', this) !== false){
+                        if(typeof this.url == 'function'){
+                            this.url(this.baseParams);
+                        }else{
+                            Ext.Ajax.request({
+                                url: this.url,
+                                callback: this.onData,
+                                scope: this,
+                                params: this.baseParams
+                            });
+                        }
+                    }
+                },
+                interval: this.interval,
+                scope: this
+            });
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing PollingProvider, no url configured.';
+        }
+    },
+
+    /**
+     * Disconnect from the server-side and stop the polling process. The disconnect
+     * event will be fired on a successful disconnect.
+     */
+    disconnect: function(){
+        if(this.pollTask){
+            Ext.TaskMgr.stop(this.pollTask);
+            delete this.pollTask;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    // private
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                this.fireEvent('data', this, e);
+            }
+        }else{
+            var e = new Ext.Direct.ExceptionEvent({
+                data: e,
+                code: Ext.Direct.exceptions.TRANSPORT,
+                message: 'Unable to connect to the server.',
+                xhr: xhr
+            });
+            this.fireEvent('data', this, e);
+        }
+    }
+});
+
+Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Provider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Provider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Provider.js	(revision 625)
@@ -0,0 +1,110 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.direct.Provider
+ * @extends Ext.util.Observable
+ * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
+ * 
+ * <p>For example ExtJs implements the following subclasses:</p>
+ * <pre><code>
+Provider
+|
++---{@link Ext.direct.JsonProvider JsonProvider} 
+    |
+    +---{@link Ext.direct.PollingProvider PollingProvider}   
+    |
+    +---{@link Ext.direct.RemotingProvider RemotingProvider}   
+ * </code></pre>
+ * @abstract
+ */
+Ext.direct.Provider = Ext.extend(Ext.util.Observable, {    
+    /**
+     * @cfg {String} id
+     * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
+     * You should assign an id if you need to be able to access the provider later and you do
+     * not have an object reference available, for example:
+     * <pre><code>
+Ext.Direct.addProvider(
+    {
+        type: 'polling',
+        url:  'php/poll.php',
+        id:   'poll-provider'
+    }
+);
+     
+var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
+p.disconnect();
+     * </code></pre>
+     */
+        
+    /**
+     * @cfg {Number} priority
+     * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
+     * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
+     */    
+    priority: 1,
+
+    /**
+     * @cfg {String} type
+     * <b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified
+     * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
+     * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
+     * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
+     * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
+     * </ul></div>
+     */    
+ 
+    // private
+    constructor : function(config){
+        Ext.apply(this, config);
+        this.addEvents(
+            /**
+             * @event connect
+             * Fires when the Provider connects to the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'connect',
+            /**
+             * @event disconnect
+             * Fires when the Provider disconnects from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */            
+            'disconnect',
+            /**
+             * @event data
+             * Fires when the Provider receives data from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
+             */            
+            'data',
+            /**
+             * @event exception
+             * Fires when the Provider receives an exception from the server-side
+             */                        
+            'exception'
+        );
+        Ext.direct.Provider.superclass.constructor.call(this, config);
+    },
+
+    /**
+     * Returns whether or not the server-side is currently connected.
+     * Abstract method for subclasses to implement.
+     */
+    isConnected: function(){
+        return false;
+    },
+
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    connect: Ext.emptyFn,
+    
+    /**
+     * Abstract methods for subclasses to implement.
+     */
+    disconnect: Ext.emptyFn
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/RemotingProvider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/RemotingProvider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/RemotingProvider.js	(revision 625)
@@ -0,0 +1,373 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.direct.RemotingProvider
+ * @extends Ext.direct.JsonProvider
+ * 
+ * <p>The {@link Ext.direct.RemotingProvider RemotingProvider} exposes access to
+ * server side methods on the client (a remote procedure call (RPC) type of
+ * connection where the client can initiate a procedure on the server).</p>
+ * 
+ * <p>This allows for code to be organized in a fashion that is maintainable,
+ * while providing a clear path between client and server, something that is
+ * not always apparent when using URLs.</p>
+ * 
+ * <p>To accomplish this the server-side needs to describe what classes and methods
+ * are available on the client-side. This configuration will typically be
+ * outputted by the server-side Ext.Direct stack when the API description is built.</p>
+ */
+Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {       
+    /**
+     * @cfg {Object} actions
+     * Object literal defining the server side actions and methods. For example, if
+     * the Provider is configured with:
+     * <pre><code>
+"actions":{ // each property within the 'actions' object represents a server side Class 
+    "TestAction":[ // array of methods within each server side Class to be   
+    {              // stubbed out on client
+        "name":"doEcho", 
+        "len":1            
+    },{
+        "name":"multiply",// name of method
+        "len":2           // The number of parameters that will be used to create an
+                          // array of data to send to the server side function.
+                          // Ensure the server sends back a Number, not a String. 
+    },{
+        "name":"doForm",
+        "formHandler":true, // direct the client to use specialized form handling method 
+        "len":1
+    }]
+}
+     * </code></pre>
+     * <p>Note that a Store is not required, a server method can be called at any time.
+     * In the following example a <b>client side</b> handler is used to call the
+     * server side method "multiply" in the server-side "TestAction" Class:</p>
+     * <pre><code>
+TestAction.multiply(
+    2, 4, // pass two arguments to server, so specify len=2
+    // callback function after the server is called
+    // result: the result returned by the server
+    //      e: Ext.Direct.RemotingEvent object
+    function(result, e){
+        var t = e.getTransaction();
+        var action = t.action; // server side Class called
+        var method = t.method; // server side method called
+        if(e.status){
+            var answer = Ext.encode(result); // 8
+    
+        }else{
+            var msg = e.message; // failure message
+        }
+    }
+);
+     * </code></pre>
+     * In the example above, the server side "multiply" function will be passed two
+     * arguments (2 and 4).  The "multiply" method should return the value 8 which will be
+     * available as the <tt>result</tt> in the example above. 
+     */
+    
+    /**
+     * @cfg {String/Object} namespace
+     * Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>).
+     * Explicitly specify the namespace Object, or specify a String to have a
+     * {@link Ext#namespace namespace created} implicitly.
+     */
+    
+    /**
+     * @cfg {String} url
+     * <b>Required<b>. The url to connect to the {@link Ext.Direct} server-side router. 
+     */
+    
+    /**
+     * @cfg {String} enableUrlEncode
+     * Specify which param will hold the arguments for the method.
+     * Defaults to <tt>'data'</tt>.
+     */
+    
+    /**
+     * @cfg {Number/Boolean} enableBuffer
+     * <p><tt>true</tt> or <tt>false</tt> to enable or disable combining of method
+     * calls. If a number is specified this is the amount of time in milliseconds
+     * to wait before sending a batched request (defaults to <tt>10</tt>).</p>
+     * <br><p>Calls which are received within the specified timeframe will be
+     * concatenated together and sent in a single request, optimizing the
+     * application by reducing the amount of round trips that have to be made
+     * to the server.</p>
+     */
+    enableBuffer: 10,
+    
+    /**
+     * @cfg {Number} maxRetries
+     * Number of times to re-attempt delivery on failure of a call.
+     */
+    maxRetries: 1,
+
+    constructor : function(config){
+        Ext.direct.RemotingProvider.superclass.constructor.call(this, config);
+        this.addEvents(
+            /**
+             * @event beforecall
+             * Fires immediately before the client-side sends off the RPC call.
+             * By returning false from an event handler you can prevent the call from
+             * executing.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'beforecall',
+            /**
+             * @event call
+             * Fires immediately after the request to the server-side is sent. This does
+             * NOT fire after the response has come back from the call.
+             * @param {Ext.direct.RemotingProvider} provider
+             * @param {Ext.Direct.Transaction} transaction
+             */            
+            'call'
+        );
+        this.namespace = (typeof this.namespace === 'string') ? Ext.ns(this.namespace) : this.namespace || window;
+        this.transactions = {};
+        this.callBuffer = [];
+    },
+
+    // private
+    initAPI : function(){
+        var o = this.actions;
+        for(var c in o){
+            var cls = this.namespace[c] || (this.namespace[c] = {});
+            var ms = o[c];
+            for(var i = 0, len = ms.length; i < len; i++){
+                var m = ms[i];
+                cls[m.name] = this.createMethod(c, m);
+            }
+        }
+    },
+
+    // inherited
+    isConnected: function(){
+        return !!this.connected;
+    },
+
+    connect: function(){
+        if(this.url){
+            this.initAPI();
+            this.connected = true;
+            this.fireEvent('connect', this);
+        }else if(!this.url){
+            throw 'Error initializing RemotingProvider, no url configured.';
+        }
+    },
+
+    disconnect: function(){
+        if(this.connected){
+            this.connected = false;
+            this.fireEvent('disconnect', this);
+        }
+    },
+
+    onData: function(opt, success, xhr){
+        if(success){
+            var events = this.getEvents(xhr);
+            for(var i = 0, len = events.length; i < len; i++){
+                var e = events[i];
+                var t = this.getTransaction(e);
+                this.fireEvent('data', this, e);
+                if(t){
+                    this.doCallback(t, e, true);
+                    Ext.Direct.removeTransaction(t);
+                }
+            }
+        }else{
+            var ts = [].concat(opt.ts);
+            for(var i = 0, len = ts.length; i < len; i++){
+                var t = this.getTransaction(ts[i]);
+                if(t && t.retryCount < this.maxRetries){
+                    t.retry();
+                }else{
+                    var e = new Ext.Direct.ExceptionEvent({
+                        data: e,
+                        transaction: t,
+                        code: Ext.Direct.exceptions.TRANSPORT,
+                        message: 'Unable to connect to the server.',
+                        xhr: xhr
+                    });
+                    this.fireEvent('data', this, e);
+                    if(t){
+                        this.doCallback(t, e, false);
+                        Ext.Direct.removeTransaction(t);
+                    }
+                }
+            }
+        }
+    },
+
+    getCallData: function(t){
+        return {
+            action: t.action,
+            method: t.method,
+            data: t.data,
+            type: 'rpc',
+            tid: t.tid
+        };
+    },
+
+    doSend : function(data){
+        var o = {
+            url: this.url,
+            callback: this.onData,
+            scope: this,
+            ts: data
+        };
+
+        // send only needed data
+        var callData;
+        if(Ext.isArray(data)){
+            callData = [];
+            for(var i = 0, len = data.length; i < len; i++){
+                callData.push(this.getCallData(data[i]));
+            }
+        }else{
+            callData = this.getCallData(data);
+        }
+
+        if(this.enableUrlEncode){
+            var params = {};
+            params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData);
+            o.params = params;
+        }else{
+            o.jsonData = callData;
+        }
+        Ext.Ajax.request(o);
+    },
+
+    combineAndSend : function(){
+        var len = this.callBuffer.length;
+        if(len > 0){
+            this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer);
+            this.callBuffer = [];
+        }
+    },
+
+    queueTransaction: function(t){
+        if(t.form){
+            this.processForm(t);
+            return;
+        }
+        this.callBuffer.push(t);
+        if(this.enableBuffer){
+            if(!this.callTask){
+                this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this);
+            }
+            this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10);
+        }else{
+            this.combineAndSend();
+        }
+    },
+
+    doCall : function(c, m, args){
+        var data = null, hs = args[m.len], scope = args[m.len+1];
+
+        if(m.len !== 0){
+            data = args.slice(0, m.len);
+        }
+
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            args: args,
+            action: c,
+            method: m.name,
+            data: data,
+            cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            this.queueTransaction(t);
+            this.fireEvent('call', this, t);
+        }
+    },
+
+    doForm : function(c, m, form, callback, scope){
+        var t = new Ext.Direct.Transaction({
+            provider: this,
+            action: c,
+            method: m.name,
+            args:[form, callback, scope],
+            cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback,
+            isForm: true
+        });
+
+        if(this.fireEvent('beforecall', this, t) !== false){
+            Ext.Direct.addTransaction(t);
+            var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
+                params = {
+                    extTID: t.tid,
+                    extAction: c,
+                    extMethod: m.name,
+                    extType: 'rpc',
+                    extUpload: String(isUpload)
+                };
+            
+            // change made from typeof callback check to callback.params
+            // to support addl param passing in DirectSubmit EAC 6/2
+            Ext.apply(t, {
+                form: Ext.getDom(form),
+                isUpload: isUpload,
+                params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params
+            });
+            this.fireEvent('call', this, t);
+            this.processForm(t);
+        }
+    },
+    
+    processForm: function(t){
+        Ext.Ajax.request({
+            url: this.url,
+            params: t.params,
+            callback: this.onData,
+            scope: this,
+            form: t.form,
+            isUpload: t.isUpload,
+            ts: t
+        });
+    },
+
+    createMethod : function(c, m){
+        var f;
+        if(!m.formHandler){
+            f = function(){
+                this.doCall(c, m, Array.prototype.slice.call(arguments, 0));
+            }.createDelegate(this);
+        }else{
+            f = function(form, callback, scope){
+                this.doForm(c, m, form, callback, scope);
+            }.createDelegate(this);
+        }
+        f.directCfg = {
+            action: c,
+            method: m
+        };
+        return f;
+    },
+
+    getTransaction: function(opt){
+        return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null;
+    },
+
+    doCallback: function(t, e){
+        var fn = e.status ? 'success' : 'failure';
+        if(t && t.cb){
+            var hs = t.cb;
+            var result = e.result || e.data;
+            if(Ext.isFunction(hs)){
+                hs(result, e);
+            } else{
+                Ext.callback(hs[fn], hs.scope, [result, e]);
+                Ext.callback(hs.callback, hs.scope, [result, e]);
+            }
+        }
+    }
+});
+Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Transaction.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Transaction.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/direct/Transaction.js	(revision 625)
@@ -0,0 +1,32 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Direct.Transaction
+ * @extends Object
+ * <p>Supporting Class for Ext.Direct (not intended to be used directly).</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Direct.Transaction = function(config){
+    Ext.apply(this, config);
+    this.tid = ++Ext.Direct.TID;
+    this.retryCount = 0;
+};
+Ext.Direct.Transaction.prototype = {
+    send: function(){
+        this.provider.queueTransaction(this);
+    },
+
+    retry: function(){
+        this.retryCount++;
+        this.send();
+    },
+
+    getProvider: function(){
+        return this.provider;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-af.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-af.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-af.js	(revision 625)
@@ -0,0 +1,184 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * Afrikaans Translations
+ * by Thys Meintjes (20 July 2007)
+ */
+
+/* Ext Core translations */
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Besig om te laai...</div>';
+
+/* Ext single string translations */
+if(Ext.View){
+    Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+    Ext.grid.GridPanel.prototype.ddText = "{0} geselekteerde ry(e)";
+}
+
+if(Ext.TabPanelItem){
+    Ext.TabPanelItem.prototype.closeText = "Maak die oortjie toe";
+}
+
+if(Ext.form.Field){
+    Ext.form.Field.prototype.invalidText = "Die waarde in hierdie veld is foutief";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Besig om te laai...";
+}
+
+/* Javascript month and days translations */
+Date.monthNames = [
+   "Januarie",
+   "Februarie",
+   "Maart",
+   "April",
+   "Mei",
+   "Junie",
+   "Julie",
+   "Augustus",
+   "September",
+   "Oktober",
+   "November",
+   "Desember"
+];
+
+Date.dayNames = [
+   "Sondag",
+   "Maandag",
+   "Dinsdag",
+   "Woensdag",
+   "Donderdag",
+   "Vrydag",
+   "Saterdag"
+];
+
+/* Ext components translations */
+if(Ext.MessageBox){
+    Ext.MessageBox.buttonText = {
+       ok     : "OK",
+       cancel : "Kanselleer",
+       yes    : "Ja",
+       no     : "Nee"
+    };
+}
+
+if(Ext.util.Format){
+    Ext.util.Format.date = function(v, format){
+       if(!v) return "";
+       if(!(v instanceof Date)) v = new Date(Date.parse(v));
+       return v.dateFormat(format || "d-m-y");
+    };
+}
+
+if(Ext.DatePicker){
+    Ext.apply(Ext.DatePicker.prototype, {
+       todayText         : "Vandag",
+       minText           : "Hierdie datum is vroër as die minimum datum",
+       maxText           : "Hierdie dataum is later as die maximum datum",
+       disabledDaysText  : "",
+       disabledDatesText : "",
+       monthNames	 : Date.monthNames,
+       dayNames		 : Date.dayNames,
+       nextText          : 'Volgende Maand (Beheer+Regs)',
+       prevText          : 'Vorige Maand (Beheer+Links)',
+       monthYearText     : "Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)",
+       todayTip          : "{0} (Spasie)",
+       format            : "d-m-y",
+       startDay          : 0
+    });
+}
+
+if(Ext.PagingToolbar){
+    Ext.apply(Ext.PagingToolbar.prototype, {
+       beforePageText : "Bladsy",
+       afterPageText  : "van {0}",
+       firstText      : "Eerste Bladsy",
+       prevText       : "Vorige Bladsy",
+       nextText       : "Volgende Bladsy",
+       lastText       : "Laatste Bladsy",
+       refreshText    : "Verfris",
+       displayMsg     : "Wys {0} - {1} van {2}",
+       emptyMsg       : 'Geen data om te wys nie'
+    });
+}
+
+if(Ext.form.TextField){
+    Ext.apply(Ext.form.TextField.prototype, {
+       minLengthText : "Die minimum lengte van die veld is {0}",
+       maxLengthText : "Die maximum lengte van die veld is {0}",
+       blankText     : "Die veld is verpligtend",
+       regexText     : "",
+       emptyText     : null
+    });
+}
+
+if(Ext.form.NumberField){
+    Ext.apply(Ext.form.NumberField.prototype, {
+       minText : "Die minimum waarde vir die veld is {0}",
+       maxText : "Die maximum waarde vir die veld is {0}",
+       nanText : "{0} is nie 'n geldige waarde nie"
+    });
+}
+
+if(Ext.form.DateField){
+    Ext.apply(Ext.form.DateField.prototype, {
+       disabledDaysText  : "Afgeskakel",
+       disabledDatesText : "Afgeskakel",
+       minText           : "Die datum in hierdie veld moet na {0} wees",
+       maxText           : "Die datum in hierdie veld moet voor {0} wees",
+       invalidText       : "{0} is nie 'n geldige datum nie - datumformaat is {1}",
+       format            : "d/m/y",
+       altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+    });
+}
+
+if(Ext.form.ComboBox){
+    Ext.apply(Ext.form.ComboBox.prototype, {
+       loadingText       : "Besig om te laai...",
+       valueNotFoundText : undefined
+    });
+}
+
+if(Ext.form.VTypes){
+    Ext.apply(Ext.form.VTypes, {
+       emailText    : "Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'",
+       urlText      : "Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'",
+       alphaText    : 'Die veld mag alleenlik letters en _ bevat',
+       alphanumText : 'Die veld mag alleenlik letters, syfers en _ bevat'
+    });
+}
+
+if(Ext.grid.GridView){
+    Ext.apply(Ext.grid.GridView.prototype, {
+       sortAscText  : "Sorteer Oplopend",
+       sortDescText : "Sorteer Aflopend",
+       lockText     : "Vries Kolom",
+       unlockText   : "Ontvries Kolom",
+       columnsText  : "Kolomme"
+    });
+}
+
+if(Ext.grid.PropertyColumnModel){
+    Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+       nameText   : "Naam",
+       valueText  : "Waarde",
+       dateFormat : "Y-m-j"
+    });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+    Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+       splitTip            : "Trek om grootte aan te pas.",
+       collapsibleSplitTip : "Trek om grootte aan te pas. Dubbel-klik om weg te steek."
+    });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-bg.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-bg.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-bg.js	(revision 625)
@@ -0,0 +1,278 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Bulgarian Translation
+ *
+ * By Георги Костадинов, Калгари, Канада
+ * 10 October 2007
+ * By Nedko Penev 
+ * 26 October 2007
+ *
+ * (utf-8 encoding)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Зареждане...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} избрани колони";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Затвори таб";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Невалидна стойност на полето";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Зареждане...";
+}
+
+Date.monthNames = [
+  "Януари",
+  "Февруари",
+  "Март",
+  "Април",
+  "Май",
+  "Юни",
+  "Юли",
+  "Август",
+  "Септември",
+  "Октомври",
+  "Ноември",
+  "Декември"
+];
+
+Date.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
+};
+
+Date.dayNames = [
+  "Неделя",
+  "Понеделник",
+  "Вторник",
+  "Сряда",
+  "Четвъртък",
+  "Петък",
+  "Събота"
+];
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Отмени",
+    yes    : "Да",
+    no     : "Не"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d.m.Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Днес",
+    minText           : "Тази дата е преди минималната",
+    maxText           : "Тази дата е след максималната",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Следващ месец (Control+Right)',
+    prevText          : 'Предишен месец (Control+Left)',
+    monthYearText     : 'Избери месец (Control+Up/Down за преместване по години)',
+    todayTip          : "{0} (Spacebar)",
+    format            : "d.m.y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Отмени",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Страница",
+    afterPageText  : "от {0}",
+    firstText      : "Първа страница",
+    prevText       : "Предишна страница",
+    nextText       : "Следваща страница",
+    lastText       : "Последна страница",
+    refreshText    : "Презареди",
+    displayMsg     : "Показвайки {0} - {1} от {2}",
+    emptyMsg       : 'Няма данни за показване'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Минималната дължина на това поле е {0}",
+    maxLengthText : "Максималната дължина на това поле е {0}",
+    blankText     : "Това поле е задължително",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Минималната стойност за това поле е {0}",
+    maxText : "Максималната стойност за това поле е {0}",
+    nanText : "{0} не е валидно число"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Недостъпен",
+    disabledDatesText : "Недостъпен",
+    minText           : "Датата в това поле трябва да е след {0}",
+    maxText           : "Датата в това поле трябва да е преди {0}",
+    invalidText       : "{0} не е валидна дата - трябва да бъде във формат {1}",
+    format            : "d.m.y",
+    altFormats        : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Зареждане...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Това поле трябва да бъде емейл във формат "user@example.com"',
+    urlText      : 'Това поле трябва да бъде URL във формат "http:/'+'/www.example.com"',
+    alphaText    : 'Това поле трябва да съдържа само букви и _',
+    alphanumText : 'Това поле трябва да съдържа само букви, цифри и _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Моля, въведете URL за връзката:',
+    buttonTips : {
+      bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Удебелява избрания текст.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Прави избрания текст курсив.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Underline (Ctrl+U)',
+        text: 'Подчертава избрания текст.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Уголеми текста',
+        text: 'Уголемява размера на шрифта.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Намали текста',
+        text: 'Намалява размера на шрифта.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Цвят на маркирания текст',
+        text: 'Променя фоновия цвят на избрания текст.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Цвят на шрифта',
+        text: 'Променя цвета на избрания текст.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Ляво подравняване',
+        text: 'Подравнява текста на ляво.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Центриране',
+        text: 'Центрира текста.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Дясно подравняване',
+        text: 'Подравнява текста на дясно.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Неномериран списък',
+        text: 'Започва неномериран списък.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Номериран списък',
+        text: 'Започва номериран списък.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Хипервръзка',
+        text: 'Превръща избрания текст в хипервръзка.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Редактиране на кода',
+        text: 'Преминаване в режим на редактиране на кода.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Подреди в нарастващ ред",
+    sortDescText : "Подреди в намаляващ ред",
+    lockText     : "Заключи колона",
+    unlockText   : "Отключи колона",
+    columnsText  : "Колони"
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Име",
+    valueText  : "Стойност",
+    dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Влачете с мишката за да промените размера.",
+    collapsibleSplitTip : "Влачете с мишката за да промените размера. Чукнете два пъти за да скриете."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ca.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ca.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ca.js	(revision 625)
@@ -0,0 +1,315 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Catalonian Translation by halkon_polako 6-12-2007
+ * December correction halkon_polako 11-12-2007
+ *
+ * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) 
+ *     by halkon_polako 14-aug-2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Carregant...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} fila(es) seleccionada(es)";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Carregant...";
+}
+
+Date.monthNames = [
+  "Gener",
+  "Febrer",
+  "Mar&#231;",
+  "Abril",
+  "Maig",
+  "Juny",
+  "Juliol",
+  "Agost",
+  "Setembre",
+  "Octubre",
+  "Novembre",
+  "Desembre"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Gen : 0,
+  Feb : 1,
+  Mar : 2,
+  Abr : 3,
+  Mai : 4,
+  Jun : 5,
+  Jul : 6,
+  Ago : 7,
+  Set : 8,
+  Oct : 9,
+  Nov : 10,
+  Dec : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Diumenge",
+  "Dilluns",
+  "Dimarts",
+  "Dimecres",
+  "Dijous",
+  "Divendres",
+  "Dissabte"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:st|nd|rd|th)";
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "Acceptar",
+    cancel : "Cancel&#183;lar",
+    yes    : "S&#237;",
+    no     : "No"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Avui",
+    minText           : "Aquesta data &#233;s anterior a la data m&#237;nima",
+    maxText           : "Aquesta data &#233;s posterior a la data m&#224;xima",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Mes Seg&#252;ent (Control+Fletxa Dreta)',
+    prevText          : 'Mes Anterior (Control+Fletxa Esquerra)',
+    monthYearText     : 'Seleccioni un mes (Control+Fletxa a Dalt o Abaix per canviar els anys)',
+    todayTip          : "{0} (Barra d&#39;espai)",
+    format            : "d/m/Y",
+    okText            : "&#160;Acceptar&#160;",
+    cancelText        : "Cancel&#183;lar",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "P&#224;gina",
+    afterPageText  : "de {0}",
+    firstText      : "Primera P&#224;gina",
+    prevText       : "P&#224;gina Anterior",
+    nextText       : "P&#224;gina Seg&#252;ent",
+    lastText       : "Darrera P&#224;gina",
+    refreshText    : "Refrescar",
+    displayMsg     : "Mostrant {0} - {1} de {2}",
+    emptyMsg       : 'Sense dades per mostrar'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "El valor d&#39;aquest camp &#233;s inv&#224;lid";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "El tamany m&#237;nim per aquest camp &#233;s {0}",
+    maxLengthText : "El tamany m&#224;xim per aquest camp &#233;s {0}",
+    blankText     : "Aquest camp &#233;s obligatori",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ",",
+    decimalPrecision : 2,
+    minText : "El valor m&#237;nim per aquest camp &#233;s {0}",
+    maxText : "El valor m&#224;xim per aquest camp &#233;s {0}",
+    nanText : "{0} no &#233;s un nombre v&#224;lid"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Deshabilitat",
+    disabledDatesText : "Deshabilitat",
+    minText           : "La data en aquest camp ha de ser posterior a {0}",
+    maxText           : "La data en aquest camp ha de ser inferior a {0}",
+    invalidText       : "{0} no &#233;s una data v&#224;lida - ha de tenir el format {1}",
+    format            : "d/m/Y",
+    altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Carregant...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Aquest camp ha de ser una adre&#231;a de e-mail amb el format "user@example.com"',
+    urlText      : 'Aquest camp ha de ser una URL amb el format "http:/'+'/www.example.com"',
+    alphaText    : 'Aquest camp nom&#233;s pot contenir lletres i _',
+    alphanumText : 'Aquest camp nom&#233;s por contenir lletres, nombres i _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Si us plau, tecleixi la URL per l\'enlla&#231;:',
+    buttonTips : {
+      bold : {
+        title: 'Negreta (Ctrl+B)',
+        text: 'Posa el text seleccionat en negreta.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'It&#224;lica (Ctrl+I)',
+        text: 'Posa el text seleccionat en it&#224;lica.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Subratllat (Ctrl+U)',
+        text: 'Subratlla el text seleccionat.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Augmentar Text',
+        text: 'Augmenta el tamany de la font de text.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Disminuir Text',
+        text: 'Disminueix el tamany de la font de text.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Color de fons',
+        text: 'Canvia el color de fons del text seleccionat.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Color de la font de text',
+        text: 'Canvia el color del text seleccionat.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Alinear a la esquerra',
+        text: 'Alinea el text a la esquerra.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centrar el text',
+        text: 'Centra el text a l\'editor',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Alinear a la dreta',
+        text: 'Alinea el text a la dreta.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Llista amb vinyetes',
+        text: 'Comen&#231;a una llista amb vinyetes.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Llista numerada',
+        text: 'Comen&#231;a una llista numerada.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Enlla&#231;',
+        text: 'Transforma el text seleccionat en un enlla&#231;.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Editar Codi',
+        text: 'Canvia al mode d\'edici&#243; de codi.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Ordenaci&#243; Ascendent",
+    sortDescText : "Ordenaci&#243; Descendent",
+    columnsText  : "Columnes"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Buit)',
+    groupByText    : 'Agrupar Per Aquest Camp',
+    showGroupsText : 'Mostrar en Grups'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nom",
+    valueText  : "Valor",
+    dateFormat : "d/m/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Cliqueu i arrossegueu per canviar el tamany del panell.",
+    collapsibleSplitTip : "Cliqueu i arrossegueu per canviar el tamany del panell. Doble clic per ocultar-ho."
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "L\'hora en aquest camp ha de ser igual o posterior a {0}",
+    maxText : "L\'hora en aquest camp ha de ser igual o anterior {0}",
+    invalidText : "{0} no &#233;s un hora v&#224;lida",
+    format : "g:i A",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "Ha de seleccionar almenys un &#233;tem d\'aquest group"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "Ha de seleccionar un &#233;tem d\'aquest grup"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-cs.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-cs.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-cs.js	(revision 625)
@@ -0,0 +1,293 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Czech Translations
+ * Translated by Tomáš Korčák (72)
+ * 2008/02/08 18:02, Ext-2.0.1
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Prosím čekejte...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} vybraných řádků";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zavřít záložku";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je neplatná";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Prosím čekejte...";
+}
+
+Date.monthNames = [
+   "Leden",
+   "Únor",
+   "Březen",
+   "Duben",
+   "Květen",
+   "Červen",
+   "Červenec",
+   "Srpen",
+   "Září",
+   "Říjen",
+   "Listopad",
+   "Prosinec"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Neděle",
+   "Pondělí",
+   "Úterý",
+   "Středa",
+   "Čtvrtek",
+   "Pátek",
+   "Sobota"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Storno",
+      yes    : "Ano",
+      no     : "Ne"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Dnes",
+      minText           : "Datum nesmí být starší než je minimální",
+      maxText           : "Datum nesmí být dřívější než je maximální",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Následující měsíc (Control+Right)',
+      prevText          : 'Předcházející měsíc (Control+Left)',
+      monthYearText     : 'Zvolte měsíc (ke změně let použijte Control+Up/Down)',
+      todayTip          : "{0} (Spacebar)",
+      format            : "d.m.Y",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Storno",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Strana",
+      afterPageText  : "z {0}",
+      firstText      : "První strana",
+      prevText       : "Přecházející strana",
+      nextText       : "Následující strana",
+      lastText       : "Poslední strana",
+      refreshText    : "Aktualizovat",
+      displayMsg     : "Zobrazeno {0} - {1} z celkových {2}",
+      emptyMsg       : 'Žádné záznamy nebyly nalezeny'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Pole nesmí mít méně {0} znaků",
+      maxLengthText : "Pole nesmí být delší než {0} znaků",
+      blankText     : "This field is required",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Hodnota v tomto poli nesmí být menší než {0}",
+      maxText : "Hodnota v tomto poli nesmí být větší než {0}",
+      nanText : "{0} není platné číslo"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Neaktivní",
+      disabledDatesText : "Neaktivní",
+      minText           : "Datum v tomto poli nesmí být starší než {0}",
+      maxText           : "Datum v tomto poli nesmí být novější než {0}",
+      invalidText       : "{0} není platným datem - zkontrolujte zda-li je ve formátu {1}",
+      format            : "d.m.Y",
+      altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Prosím čekejte...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'V tomto poli může být vyplněna pouze emailová adresa ve formátu "uživatel@doména.cz"',
+      urlText      : 'V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu "http:/'+'/www.doména.cz"',
+      alphaText    : 'Toto pole může obsahovat pouze písmena abecedy a znak _',
+      alphanumText : 'Toto pole může obsahovat pouze písmena abecedy, čísla a znak _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Zadejte URL adresu odkazu:',
+    buttonTips : {
+      bold : {
+        title: 'Tučné (Ctrl+B)',
+        text: 'Označí vybraný text tučně.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kurzíva (Ctrl+I)',
+        text: 'Označí vybraný text kurzívou.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Podtržení (Ctrl+U)',
+        text: 'Podtrhne vybraný text.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Zvětšit písmo',
+        text: 'Zvětší velikost písma.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Zúžit písmo',
+        text: 'Zmenší velikost písma.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Barva zvýraznění textu',
+        text: 'Označí vybraný text tak, aby vypadal jako označený zvýrazňovačem.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Barva písma',
+        text: 'Změní barvu textu.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Zarovnat text vlevo',
+        text: 'Zarovná text doleva.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Zarovnat na střed',
+        text: 'Zarovná text na střed.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Zarovnat text vpravo',
+        text: 'Zarovná text doprava.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Odrážky',
+        text: 'Začne seznam s odrážkami.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Číslování',
+        text: 'Začne číslovaný seznam.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Internetový odkaz',
+        text: 'Z vybraného textu vytvoří internetový odkaz.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Zdrojový kód',
+        text: 'Přepne do módu úpravy zdrojového kódu.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Řadit vzestupně",
+      sortDescText : "Řadit sestupně",
+      lockText     : "Ukotvit sloupec",
+      unlockText   : "Uvolnit sloupec",
+      columnsText  : "Sloupce"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Žádná data)',
+    groupByText    : 'Seskupit dle tohoto pole',
+    showGroupsText : 'Zobrazit ve skupině'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Název",
+      valueText  : "Hodnota",
+      dateFormat : "j.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Tahem změnit velikost.",
+      collapsibleSplitTip : "Tahem změnit velikost. Dvojklikem skrýt."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-da.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-da.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-da.js	(revision 625)
@@ -0,0 +1,296 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Danish translation
+ * By JohnF
+ * 04-09-2007, 05:28 AM
+ * 
+ * Extended and modified by Karl Krukow, 
+ * December, 2007.
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Henter...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} markerede rækker";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Luk denne fane";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Værdien i dette felt er ugyldig";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Henter...";
+}
+
+Date.monthNames = [
+   "januar",
+   "februar",
+   "marts",
+   "april",
+   "maj",
+   "juni",
+   "juli",
+   "august",
+   "september",
+   "oktober",
+   "november",
+   "december"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "søndag",
+   "mandag",
+   "tirsdag",
+   "onsdag",
+   "torsdag",
+   "fredag",
+   "lørdag"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Fortryd",
+      yes    : "Ja",
+      no     : "Nej"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "I dag",
+      minText           : "Denne dato er før den tidligst tilladte",
+      maxText           : "Denne dato er senere end den senest tilladte",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,      
+      nextText          : 'Næste måned (Ctrl + højre piltast)',
+      prevText          : 'Forrige måned (Ctrl + venstre piltast)',
+      monthYearText     : 'Vælg en måned (Ctrl + op/ned pil for at ændre årstal)',
+      todayTip          : "{0} (mellemrum)",
+      format            : "d/m/y",
+	  okText            : "&#160;OK&#160;",
+      cancelText        : "Cancel",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Side",
+      afterPageText  : "af {0}",
+      firstText      : "Første side",
+      prevText       : "Forrige side",
+      nextText       : "Næste side",
+      lastText       : "Sidste side",
+      refreshText    : "Opfrisk",
+      displayMsg     : "Viser {0} - {1} af {2}",
+      emptyMsg       : 'Der er ingen data at vise'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimum længden for dette felt er {0}",
+      maxLengthText : "Maksimum længden for dette felt er {0}",
+      blankText     : "Dette felt skal udfyldes",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Mindste-værdien for dette felt er {0}",
+      maxText : "Maksimum-værdien for dette felt er {0}",
+      nanText : "{0} er ikke et tilladt nummer"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Inaktiveret",
+      disabledDatesText : "Inaktiveret",
+      minText           : "Datoen i dette felt skal være efter {0}",
+      maxText           : "Datoen i dette felt skal være før {0}",
+      invalidText       : "{0} er ikke en tilladt dato - datoer skal angives i formatet {1}",
+      format            : "d/m/y",
+      altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Henter...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Dette felt skal være en email adresse i formatet "xxx@yyy.zzz"',
+      urlText      : 'Dette felt skal være en URL i formatet "http:/'+'/xxx.yyy"',
+      alphaText    : 'Dette felt kan kun indeholde bogstaver og "_" (understregning)',
+      alphanumText : 'Dette felt kan kun indeholde bogstaver, tal og "_" (understregning)'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Indtast URL:',
+    buttonTips : {
+      bold : {
+        title: 'Fed (Ctrl+B)', //Can I change this to Ctrl+F?
+        text: 'Formater det markerede tekst med fed.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursiv (Ctrl+I)',//Ctrl+K
+        text: 'Formater det markerede tekst med kursiv.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Understreg (Ctrl+U)',
+        text: 'Understreg det markerede tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Forstør tekst',
+        text: 'Forøg fontstørrelsen.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Formindsk tekst',
+        text: 'Formindsk fontstørrelsen.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Farve for tekstfremhævelse',
+        text: 'Skift baggrundsfarve for det markerede tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Skriftfarve',
+        text: 'Skift skriftfarve for det markerede tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Juster venstre',
+        text: 'Venstrestil tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centreret',
+        text: 'Centrer tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Juster højre',
+        text: 'Højrestil tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Punktopstilling',
+        text: 'Påbegynd punktopstilling.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Nummereret opstilling',
+        text: 'Påbegynd nummereret opstilling.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Lav det markerede test til et hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Kildetekstredigering',
+        text: 'Skift til redigering af kildetekst.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Sortér stigende",
+      sortDescText : "Sortér faldende",
+      lockText     : "Lås kolonne",
+      unlockText   : "Fjern lås fra kolonne",
+      columnsText  : "Kolonner"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Ingen)',
+    groupByText    : 'Gruppér efter dette felt',
+    showGroupsText : 'Vis i grupper' //should this be sort in groups?
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Navn",
+      valueText  : "Værdi",
+      dateFormat : "j/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Træk for at ændre størrelsen.",
+      collapsibleSplitTip : "Træk for at ændre størrelsen. Dobbelt-klik for at skjule."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-de.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-de.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-de.js	(revision 625)
@@ -0,0 +1,326 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * German translation
+ * By schmidetzki and humpdi
+ * 04-07-2007
+ * Updated by wm003 10-31-2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Übertrage Daten ...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} Zeile(n) ausgewählt";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Diesen Tab schließen";
+}
+
+if(Ext.form.BasicForm){
+   Ext.form.BasicForm.prototype.waitTitle = "Bitte warten...";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Der Wert des Feldes ist nicht korrekt";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Übertrage Daten...";
+}
+
+Date.monthNames = [
+   "Januar",
+   "Februar",
+   "März",
+   "April",
+   "Mai",
+   "Juni",
+   "Juli",
+   "August",
+   "September",
+   "Oktober",
+   "November",
+   "Dezember"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Jan : 0,
+  Feb : 1,
+  "M\u00e4r" : 2,
+  Apr : 3,
+  Mai : 4,
+  Jun : 5,
+  Jul : 6,
+  Aug : 7,
+  Sep : 8,
+  Okt : 9,
+  Nov : 10,
+  Dez : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Sonntag",
+   "Montag",
+   "Dienstag",
+   "Mittwoch",
+   "Donnerstag",
+   "Freitag",
+   "Samstag"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Abbrechen",
+      yes    : "Ja",
+      no     : "Nein"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Heute",
+      minText           : "Dieses Datum liegt von dem erstmöglichen Datum",
+      maxText           : "Dieses Datum liegt nach dem letztmöglichen Datum",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	    : Date.monthNames,
+      dayNames		    : Date.dayNames,
+      nextText          : "Nächster Monat (Strg/Control + Rechts)",
+      prevText          : "Vorheriger Monat (Strg/Control + Links)",
+      monthYearText     : "Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)",
+      todayTip          : "Heute ({0}) (Leertaste)",
+      format            : "d.m.Y",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Abbrechen",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Seite",
+      afterPageText  : "von {0}",
+      firstText      : "Erste Seite",
+      prevText       : "vorherige Seite",
+      nextText       : "nächste Seite",
+      lastText       : "letzte Seite",
+      refreshText    : "Aktualisieren",
+      displayMsg     : "Anzeige Eintrag {0} - {1} von {2}",
+      emptyMsg       : "Keine Daten vorhanden"
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Bitte geben Sie mindestens {0} Zeichen ein",
+      maxLengthText : "Bitte geben Sie maximal {0} Zeichen ein",
+      blankText     : "Dieses Feld darf nicht leer sein",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Der Mindestwert für dieses Feld ist {0}",
+      maxText : "Der Maximalwert für dieses Feld ist {0}",
+      nanText : "{0} ist keine Zahl"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "nicht erlaubt",
+      disabledDatesText : "nicht erlaubt",
+      minText           : "Das Datum in diesem Feld muß nach dem {0} liegen",
+      maxText           : "Das Datum in diesem Feld muß vor dem {0} liegen",
+      invalidText       : "{0} ist kein valides Datum - es muß im Format {1} eingegeben werden",
+      format            : "d.m.Y",
+      altFormats        : "d.m.Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Lade Daten ...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: "user@example.com"',
+      urlText      : 'Dieses Feld sollte eine URL enthalten. Format: "http:/'+'/www.example.com"',
+      alphaText    : 'Dieses Feld darf nur Buchstaben enthalten und _',
+      alphanumText : 'Dieses Feld darf nur Buchstaben und Zahlen enthalten und _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Bitte geben Sie die URL für den Link ein:',
+    buttonTips : {
+      bold : {
+        title: 'Fett (Ctrl+B)',
+        text: 'Erstellt den ausgewählten Text in Fettschrift.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursiv (Ctrl+I)',
+        text: 'Erstellt den ausgewählten Text in Schrägschrift.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Unterstrichen (Ctrl+U)',
+        text: 'Unterstreicht den ausgewählten Text.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Text vergößern',
+        text: 'Erhöht die Schriftgröße.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Text verkleinern',
+        text: 'Verringert die Schriftgröße.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Text farblich hervorheben',
+        text: 'Hintergrundfarbe des ausgewählten Textes ändern.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Schriftfarbe',
+        text: 'Farbe des ausgewählten Textes ändern.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Linksbündig',
+        text: 'Setzt den Text linksbündig.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Zentrieren',
+        text: 'Zentriert den Text in Editor.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Rechtsbündig',
+        text: 'Setzt den Text rechtsbündig.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Aufzählungsliste',
+        text: 'Beginnt eine Aufzählungsliste mit Spiegelstrichen.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numerierte Liste',
+        text: 'Beginnt eine numerierte Liste.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Erstellt einen Hyperlink aus dem ausgewählten text.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Source bearbeiten',
+        text: 'Zur Bearbeitung des Quelltextes wechseln.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Aufsteigend sortieren",
+      sortDescText : "Absteigend sortieren",
+      lockText     : "Spalte sperren",
+      unlockText   : "Spalte freigeben (entsperren)",
+      columnsText  : "Spalten"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Keine)',
+    groupByText    : 'Dieses Feld gruppieren',
+    showGroupsText : 'In Gruppen anzeigen'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Name",
+      valueText  : "Wert",
+      dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.grid.BooleanColumn){
+   Ext.apply(Ext.grid.BooleanColumn.prototype, {
+      trueText  : "wahr",
+      falseText : "falsch"
+   });
+}
+
+if(Ext.grid.NumberColumn){
+    Ext.apply(Ext.grid.NumberColumn.prototype, {
+        format : '0.000,00'
+    });
+}
+
+if(Ext.grid.DateColumn){
+    Ext.apply(Ext.grid.DateColumn.prototype, {
+        format : 'd.m.Y'
+    });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Ziehen, um Größe zu ändern.",
+    collapsibleSplitTip : "Ziehen, um Größe zu ändern. Doppelklick um Panel auszublenden."
+  });
+}
+
+if(Ext.form.TimeField){
+   Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "Die Zeit muss gleich oder nach {0} liegen",
+    maxText : "Die Zeit muss gleich oder vor {0} liegen",
+    invalidText : "{0} ist keine gültige Zeit",
+    format : "H:i"
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-el_GR.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-el_GR.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-el_GR.js	(revision 625)
@@ -0,0 +1,309 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Greek translation
+ * By thesilentman (utf8 encoding)
+ * 27 Apr 2008
+ *
+ * Changes since previous (second) Version:
+ * + added Date.shortMonthNames 
+ * + added Date.getShortMonthName 
+ * + added Date.monthNumbers
+ * + added Ext.grid.GroupingView
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Μεταφόρτωση δεδομένων...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} Επιλεγμένες σειρές";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Κλείστε το tab";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Το περιεχόμενο του πεδίου δεν είναι αποδεκτό";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Μεταφόρτωση δεδομένων...";
+}
+
+Date.monthNames = [
+   "Ιανουάριος",
+   "Φεβρουάριος",
+   "Μάρτιος",
+   "Απρίλιος",
+   "Μάιος",
+   "Ιούνιος",
+   "Ιούλιος",
+   "Αύγουστος",
+   "Σεπτέμβριος",
+   "Οκτώβριος",
+   "Νοέμβριος",
+   "Δεκέμβριος"
+];
+
+Date.shortMonthNames = [
+   "Ιαν",
+   "Φεβ",
+   "Μάρ",
+   "Απρ",
+   "Μάι",
+   "Ιού",
+   "Ιού",
+   "Αύγ",
+   "Σεπ",
+   "Οκτ",
+   "Νοέ",
+   "Δεκ"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+
+Date.dayNames = [
+   "Κυριακή",
+   "Δευτέρα",
+   "Τρίτη",
+   "Τετάρτη",
+   "Πέμπτη",
+   "Παρασκευή",
+   "Σάββατο"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Άκυρο",
+      yes    : "Ναι",
+      no     : "Όχι"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Σήμερα",
+      minText           : "Η Ημερομηνία είναι προγενέστερη από την παλαιότερη αποδεκτή",
+      maxText           : "Η Ημερομηνία είναι μεταγενέστερη από την νεότερη αποδεκτή",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames  : Date.monthNames,
+      dayNames    : Date.dayNames,
+      nextText          : 'Επόμενος Μήνας (Control+Δεξί Βέλος)',
+      prevText          : 'Προηγούμενος Μήνας (Control + Αριστερό Βέλος)',
+      monthYearText     : 'Επιλογή Μηνός (Control + Επάνω/Κάτω Βέλος για μεταβολή ετών)',
+      todayTip          : "{0} (ΠΛήκτρο Διαστήματος)",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Σελίδα",
+      afterPageText  : "από {0}",
+      firstText      : "Πρώτη Σελίδα",
+      prevText       : "Προηγούμενη Σελίδα",
+      nextText       : "Επόμενη Σελίδα",
+      lastText       : "Τελευταία Σελίδα",
+      refreshText    : "Ανανέωση",
+      displayMsg     : "Εμφάνιση {0} - {1} από {2}",
+      emptyMsg       : 'Δεν υπάρχουν δεδομένα'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Το μικρότερο αποδεκτό μήκος για το πεδίο είναι {0}",
+      maxLengthText : "Το μεγαλύτερο αποδεκτό μήκος για το πεδίο είναι {0}",
+      blankText     : "Το πεδίο είναι υποχρεωτικό",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Η μικρότερη τιμή του πεδίου είναι {0}",
+      maxText : "Η μεγαλύτερη τιμή του πεδίου είναι {0}",
+      nanText : "{0} δεν είναι αποδεκτός αριθμός"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Ανενεργό",
+      disabledDatesText : "Ανενεργό",
+      minText           : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι μετά την {0}",
+      maxText           : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι πριν την {0}",
+      invalidText       : "{0} δεν είναι έγκυρη ημερομηνία - πρέπει να είναι στη μορφή {1}",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Μεταφόρτωση δεδομένων...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Το πεδίο δέχεται μόνο διευθύνσεις Email σε μορφή "user@example.com"',
+      urlText      : 'Το πεδίο δέχεται μόνο URL σε μορφή "http:/'+'/www.example.com"',
+      alphaText    : 'Το πεδίο δέχεται μόνο χαρακτήρες και _',
+      alphanumText : 'Το πεδίο δέχεται μόνο χαρακτήρες, αριθμούς και _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+        createLinkText : 'Δώστε τη διεύθυνση (URL) για το σύνδεσμο (link):',
+        buttonTips : {
+            bold : {
+               title: 'Έντονα (Ctrl+B)',
+               text: 'Κάνετε το προεπιλεγμένο κείμενο έντονο.',
+               cls: 'x-html-editor-tip'
+            },
+            italic : {
+               title: 'Πλάγια (Ctrl+I)',
+               text: 'Κάνετε το προεπιλεγμένο κείμενο πλάγιο.',
+               cls: 'x-html-editor-tip'
+            },
+            underline : {
+               title: 'Υπογράμμιση (Ctrl+U)',
+               text: 'Υπογραμμίζετε το προεπιλεγμένο κείμενο.',
+               cls: 'x-html-editor-tip'
+           },
+           increasefontsize : {
+               title: 'Μεγέθυνση κειμένου',
+               text: 'Μεγαλώνετε τη γραμματοσειρά.',
+               cls: 'x-html-editor-tip'
+           },
+           decreasefontsize : {
+               title: 'Σμίκρυνση κειμένου',
+               text: 'Μικραίνετε τη γραμματοσειρά.',
+               cls: 'x-html-editor-tip'
+           },
+           backcolor : {
+               title: 'Χρώμα Φόντου Κειμένου',
+               text: 'Αλλάζετε το χρώμα στο φόντο του προεπιλεγμένου κειμένου.',
+               cls: 'x-html-editor-tip'
+           },
+           forecolor : {
+               title: 'Χρώμα Γραμματοσειράς',
+               text: 'Αλλάζετε το χρώμα στη γραμματοσειρά του προεπιλεγμένου κειμένου.',               
+               cls: 'x-html-editor-tip'
+           },
+           justifyleft : {
+               title: 'Αριστερή Στοίχιση Κειμένου',
+               text: 'Στοιχίζετε το κείμενο στα αριστερά.',
+               cls: 'x-html-editor-tip'
+           },
+           justifycenter : {
+               title: 'Κεντράρισμα Κειμένου',
+               text: 'Στοιχίζετε το κείμενο στο κέντρο.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyright : {
+               title: 'Δεξιά Στοίχιση Κειμένου',
+               text: 'Στοιχίζετε το κείμενο στα δεξιά.',
+               cls: 'x-html-editor-tip'
+           },
+           insertunorderedlist : {
+               title: 'Εισαγωγή Λίστας Κουκίδων',
+               text: 'Ξεκινήστε μια λίστα με κουκίδες.',
+               cls: 'x-html-editor-tip'
+           },
+           insertorderedlist : {
+               title: 'Εισαγωγή Λίστας Αρίθμησης',
+               text: 'Ξεκινήστε μια λίστα με αρίθμηση.',
+               cls: 'x-html-editor-tip'
+           },
+           createlink : {
+               title: 'Hyperlink',
+               text: 'Μετατρέπετε το προεπιλεγμένο κείμενο σε Link.',
+               cls: 'x-html-editor-tip'
+           },
+           sourceedit : {
+               title: 'Επεξεργασία Κώδικα',
+               text: 'Μεταβαίνετε στη λειτουργία επεξεργασίας κώδικα.',
+               cls: 'x-html-editor-tip'
+           }
+        }
+   });
+}
+
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Αύξουσα ταξινόμηση",
+      sortDescText : "Φθίνουσα ταξινόμηση",
+      lockText     : "Κλείδωμα στήλης",
+      unlockText   : "Ξεκλείδωμα στήλης",
+      columnsText  : "Στήλες"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+  emptyGroupText : '(Καμμία)',
+  groupByText    : 'Ομαδοποίηση βάσει αυτού του πεδίου',
+  showGroupsText : 'Να εμφανίζεται στις ομάδες'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Όνομα",
+      valueText  : "Περιεχόμενο",
+      dateFormat : "m/d/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Σύρετε για αλλαγή μεγέθους.",
+      collapsibleSplitTip : "Σύρετε για αλλαγή μεγέθους. Διπλό κλικ για απόκρυψη."
+   });
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en.js	(revision 625)
@@ -0,0 +1,335 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * English Translations
+ * updated to 2.2 by Condor (8 Aug 2008)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Loading...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} selected row{1}";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Loading...";
+}
+
+Date.monthNames = [
+  "January",
+  "February",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Sunday",
+  "Monday",
+  "Tuesday",
+  "Wednesday",
+  "Thursday",
+  "Friday",
+  "Saturday"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:st|nd|rd|th)";
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Cancel",
+    yes    : "Yes",
+    no     : "No"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "m/d/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Today",
+    minText           : "This date is before the minimum date",
+    maxText           : "This date is after the maximum date",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    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)',
+    todayTip          : "{0} (Spacebar)",
+    format            : "m/d/y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Cancel",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Page",
+    afterPageText  : "of {0}",
+    firstText      : "First Page",
+    prevText       : "Previous Page",
+    nextText       : "Next Page",
+    lastText       : "Last Page",
+    refreshText    : "Refresh",
+    displayMsg     : "Displaying {0} - {1} of {2}",
+    emptyMsg       : 'No data to display'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "The value in this field is invalid";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "The minimum length for this field is {0}",
+    maxLengthText : "The maximum length for this field is {0}",
+    blankText     : "This field is required",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ".",
+    decimalPrecision : 2,
+    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"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Disabled",
+    disabledDatesText : "Disabled",
+    minText           : "The date in this field must be after {0}",
+    maxText           : "The date in this field must be before {0}",
+    invalidText       : "{0} is not a valid date - it must be in the format {1}",
+    format            : "m/d/y",
+    altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Loading...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'This field should be an e-mail address in the format "user@example.com"',
+    urlText      : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+    alphaText    : 'This field should only contain letters and _',
+    alphanumText : 'This field should only contain letters, numbers and _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Please enter the URL for the link:',
+    buttonTips : {
+      bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Underline (Ctrl+U)',
+        text: 'Underline the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Grow Text',
+        text: 'Increase the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Shrink Text',
+        text: 'Decrease the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Text Highlight Color',
+        text: 'Change the background color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Font Color',
+        text: 'Change the color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Align Text Left',
+        text: 'Align text to the left.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Center Text',
+        text: 'Center text in the editor.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Align Text Right',
+        text: 'Align text to the right.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Bullet List',
+        text: 'Start a bulleted list.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numbered List',
+        text: 'Start a numbered list.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Make the selected text a hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Source Edit',
+        text: 'Switch to source editing mode.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Sort Ascending",
+    sortDescText : "Sort Descending",
+    columnsText  : "Columns"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(None)',
+    groupByText    : 'Group By This Field',
+    showGroupsText : 'Show in Groups'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Name",
+    valueText  : "Value",
+    dateFormat : "m/j/Y"
+  });
+}
+
+if(Ext.grid.BooleanColumn){
+   Ext.apply(Ext.grid.BooleanColumn.prototype, {
+      trueText  : "true",
+      falseText : "false",
+      undefinedText: '&#160;'
+   });
+}
+
+if(Ext.grid.NumberColumn){
+    Ext.apply(Ext.grid.NumberColumn.prototype, {
+        format : '0,000.00'
+    });
+}
+
+if(Ext.grid.DateColumn){
+    Ext.apply(Ext.grid.DateColumn.prototype, {
+        format : 'm/d/Y'
+    });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Drag to resize.",
+    collapsibleSplitTip : "Drag to resize. Double click to hide."
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "The time in this field must be equal to or after {0}",
+    maxText : "The time in this field must be equal to or before {0}",
+    invalidText : "{0} is not a valid time",
+    format : "g:i A",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "You must select at least one item in this group"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "You must select one item in this group"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en_GB.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en_GB.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-en_GB.js	(revision 625)
@@ -0,0 +1,315 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * English (UK) Translations
+ * updated to 2.2 by Condor (8 Aug 2008)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Loading...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} selected row{1}";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Loading...";
+}
+
+Date.monthNames = [
+  "January",
+  "February",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Sunday",
+  "Monday",
+  "Tuesday",
+  "Wednesday",
+  "Thursday",
+  "Friday",
+  "Saturday"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:st|nd|rd|th)";
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Cancel",
+    yes    : "Yes",
+    no     : "No"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Today",
+    minText           : "This date is before the minimum date",
+    maxText           : "This date is after the maximum date",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    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)',
+    todayTip          : "{0} (Spacebar)",
+    format            : "d/m/Y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Cancel",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Page",
+    afterPageText  : "of {0}",
+    firstText      : "First Page",
+    prevText       : "Previous Page",
+    nextText       : "Next Page",
+    lastText       : "Last Page",
+    refreshText    : "Refresh",
+    displayMsg     : "Displaying {0} - {1} of {2}",
+    emptyMsg       : 'No data to display'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "The value in this field is invalid";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "The minimum length for this field is {0}",
+    maxLengthText : "The maximum length for this field is {0}",
+    blankText     : "This field is required",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ".",
+    decimalPrecision : 2,
+    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"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Disabled",
+    disabledDatesText : "Disabled",
+    minText           : "The date in this field must be after {0}",
+    maxText           : "The date in this field must be before {0}",
+    invalidText       : "{0} is not a valid date - it must be in the format {1}",
+    format            : "d/m/y",
+    altFormats        : "d/m/Y|d/m/y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Loading...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'This field should be an e-mail address in the format "user@example.com"',
+    urlText      : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+    alphaText    : 'This field should only contain letters and _',
+    alphanumText : 'This field should only contain letters, numbers and _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Please enter the URL for the link:',
+    buttonTips : {
+      bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Underline (Ctrl+U)',
+        text: 'Underline the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Grow Text',
+        text: 'Increase the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Shrink Text',
+        text: 'Decrease the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Text Highlight Color',
+        text: 'Change the background color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Font Color',
+        text: 'Change the color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Align Text Left',
+        text: 'Align text to the left.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Center Text',
+        text: 'Center text in the editor.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Align Text Right',
+        text: 'Align text to the right.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Bullet List',
+        text: 'Start a bulleted list.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numbered List',
+        text: 'Start a numbered list.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Make the selected text a hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Source Edit',
+        text: 'Switch to source editing mode.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Sort Ascending",
+    sortDescText : "Sort Descending",
+    columnsText  : "Columns"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(None)',
+    groupByText    : 'Group By This Field',
+    showGroupsText : 'Show in Groups'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Name",
+    valueText  : "Value",
+    dateFormat : "j/m/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Drag to resize.",
+    collapsibleSplitTip : "Drag to resize. Double click to hide."
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "The time in this field must be equal to or after {0}",
+    maxText : "The time in this field must be equal to or before {0}",
+    invalidText : "{0} is not a valid time",
+    format : "g:i A",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "You must select at least one item in this group"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "You must select one item in this group"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-es.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-es.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-es.js	(revision 625)
@@ -0,0 +1,318 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Spanish/Latin American Translation by genius551v 04-08-2007
+ * Revised by efege, 2007-04-15.
+ * Revised by Rafaga2k 10-01-2007 (mm/dd/yyyy)
+ * Revised by FeDe 12-13-2007 (mm/dd/yyyy)
+ * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) 
+ *     by halkon_polako 14-aug-2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Cargando...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} fila(s) seleccionada(s)";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Cargando...";
+}
+
+Date.monthNames = [
+  "Enero",
+  "Febrero",
+  "Marzo",
+  "Abril",
+  "Mayo",
+  "Junio",
+  "Julio",
+  "Agosto",
+  "Septiembre",
+  "Octubre",
+  "Noviembre",
+  "Diciembre"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Ene : 0,
+  Feb : 1,
+  Mar : 2,
+  Abr : 3,
+  May : 4,
+  Jun : 5,
+  Jul : 6,
+  Ago : 7,
+  Sep : 8,
+  Oct : 9,
+  Nov : 10,
+  Dic : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Domingo",
+  "Lunes",
+  "Martes",
+  "Mi&#233;rcoles",
+  "Jueves",
+  "Viernes",
+  "S&#225;bado"
+];
+
+Date.getShortDayName = function(day) {
+  if (day==3) return "Mié";
+  if (day==6) return "Sáb";
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:st|nd|rd|th)";
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "Aceptar",
+    cancel : "Cancelar",
+    yes    : "S&#237;",
+    no     : "No"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Hoy",
+    minText           : "Esta fecha es anterior a la fecha m&#237;nima",
+    maxText           : "Esta fecha es posterior a la fecha m&#225;xima",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames	      : Date.monthNames,
+    dayNames		  : Date.dayNames,
+    nextText          : 'Mes Siguiente (Control+Right)',
+    prevText          : 'Mes Anterior (Control+Left)',
+    monthYearText     : 'Seleccione un mes (Control+Up/Down para desplazar el a&#241;o)',
+    todayTip          : "{0} (Barra espaciadora)",
+    format            : "d/m/Y",
+    okText            : "&#160;Ok&#160;",
+    cancelText        : "Cancelar",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "P&#225;gina",
+    afterPageText  : "de {0}",
+    firstText      : "Primera p&#225;gina",
+    prevText       : "P&#225;gina anterior",
+    nextText       : "P&#225;gina siguiente",
+    lastText       : "Última p&#225;gina",
+    refreshText    : "Actualizar",
+    displayMsg     : "Mostrando {0} - {1} de {2}",
+    emptyMsg       : 'Sin datos para mostrar'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "El valor en este campo es inv&#225;lido";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "El tama&#241;o m&#237;nimo para este campo es de {0}",
+    maxLengthText : "El tama&#241;o m&#225;ximo para este campo es de {0}",
+    blankText     : "Este campo es obligatorio",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ".",
+    decimalPrecision : 2,
+    minText : "El valor m&#237;nimo para este campo es de {0}",
+    maxText : "El valor m&#225;ximo para este campo es de {0}",
+    nanText : "{0} no es un n&#250;mero v&#225;lido"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Deshabilitado",
+    disabledDatesText : "Deshabilitado",
+    minText           : "La fecha para este campo debe ser posterior a {0}",
+    maxText           : "La fecha para este campo debe ser anterior a {0}",
+    invalidText       : "{0} no es una fecha v&#225;lida - debe tener el formato {1}",
+    format            : "d/m/Y",
+    altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Cargando...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Este campo debe ser una direcci&#243;n de correo electr&#243;nico con el formato "usuario@dominio.com"',
+    urlText      : 'Este campo debe ser una URL con el formato "http:/'+'/www.dominio.com"',
+    alphaText    : 'Este campo s&#243;lo debe contener letras y _',
+    alphanumText : 'Este campo s&#243;lo debe contener letras, n&#250;meros y _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : "Por favor proporcione la URL para el enlace:",
+    buttonTips : {
+      bold : {
+        title: 'Negritas (Ctrl+B)',
+	    text: 'Transforma el texto seleccionado en Negritas.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'It&#225;lica (Ctrl+I)',
+        text: 'Transforma el texto seleccionado en It&#225;licas.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Subrayado (Ctrl+U)',
+        text: 'Subraya el texto seleccionado.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Aumentar la fuente',
+        text: 'Aumenta el tama&#241;o de la fuente',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Reducir la fuente',
+        text: 'Reduce el tama&#241;o de la fuente.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Color de fondo',
+        text: 'Modifica el color de fondo del texto seleccionado.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Color de la fuente',
+        text: 'Modifica el color del texto seleccionado.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Alinear a la izquierda',
+        text: 'Alinea el texto a la izquierda.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centrar',
+        text: 'Centrar el texto.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Alinear a la derecha',
+        text: 'Alinea el texto a la derecha.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Lista de vi&#241;etas',
+        text: 'Inicia una lista con vi&#241;etas.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Lista numerada',
+        text: 'Inicia una lista numerada.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Enlace',
+        text: 'Inserta un enlace de hipertexto.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'C&#243;digo Fuente',
+        text: 'Pasar al modo de edici&#243;n de c&#243;digo fuente.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Ordenar en forma ascendente",
+    sortDescText : "Ordenar en forma descendente",
+    columnsText  : "Columnas"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Ninguno)',
+    groupByText    : 'Agrupar por este campo',
+    showGroupsText : 'Mostrar en grupos'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nombre",
+    valueText  : "Valor",
+    dateFormat : "j/m/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Arrastre para redimensionar.",
+    collapsibleSplitTip : "Arrastre para redimensionar. Doble clic para ocultar."
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "La hora en este campo debe ser igual o posterior a {0}",
+    maxText : "La hora en este campo debe ser igual o anterior a {0}",
+    invalidText : "{0} no es una hora v&#225;lida",
+    format : "g:i A",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "Debe seleccionar al menos un &#233;tem de este grupo"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "Debe seleccionar un &#233;tem de este grupo"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fa.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fa.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fa.js	(revision 625)
@@ -0,0 +1,272 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Farsi (Persian) translation
+ * By Mohaqa
+ * 03-10-2007, 06:23 PM
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">در حال بارگذاری ...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} رکورد انتخاب شده";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "بستن";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "مقدار فیلد صحیح نیست";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "در حال بارگذاری ...";
+}
+
+Date.monthNames = [
+   "ژانویه",
+   "فوریه",
+   "مارس",
+   "آپریل",
+   "می",
+   "ژوئن",
+   "جولای",
+   "آگوست",
+   "سپتامبر",
+   "اکتبر",
+   "نوامبر",
+   "دسامبر"
+];
+
+Date.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
+};
+
+Date.dayNames = [
+   "یکشنبه",
+   "دوشنبه",
+   "سه شنبه",
+   "چهارشنبه",
+   "پنجشنبه",
+   "جمعه",
+   "شنبه"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "تایید",
+      cancel : "بازگشت",
+      yes    : "بله",
+      no     : "خیر"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "Y/m/d");
+   };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "امروز",
+    minText           : "این تاریخ قبل از محدوده مجاز است",
+    maxText           : "این تاریخ پس از محدوده مجاز است",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'ماه بعد (Control + Right)',
+    prevText          : 'ماه قبل (Control+Left)',
+    monthYearText     : 'یک ماه را انتخاب کنید (Control+Up/Down برای انتقال در سال)',
+    todayTip          : "{0} (Spacebar)",
+    format            : "y/m/d",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Cancel",
+    startDay          : 0
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "صفحه",
+      afterPageText  : "از {0}",
+      firstText      : "صفحه اول",
+      prevText       : "صفحه قبل",
+      nextText       : "صفحه بعد",
+      lastText       : "صفحه آخر",
+      refreshText    : "بازخوانی",
+      displayMsg     : "نمایش {0} - {1} of {2}",
+      emptyMsg       : 'داده ای برای نمایش وجود ندارد'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "حداقل طول این فیلد برابر است با {0}",
+      maxLengthText : "حداکثر طول این فیلد برابر است با {0}",
+      blankText     : "این فیلد باید مقداری داشته باشد",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "حداقل مقدار این فیلد برابر است با {0}",
+      maxText : "حداکثر مقدار این فیلد برابر است با {0}",
+      nanText : "{0} یک عدد نیست"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "غیرفعال",
+      disabledDatesText : "غیرفعال",
+      minText           : "تاریخ باید پس از {0} باشد",
+      maxText           : "تاریخ باید پس از {0} باشد",
+      invalidText       : "{0} تاریخ صحیحی نیست - فرمت صحیح {1}",
+      format            : "y/m/d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "در حال بارگذاری ...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'مقدار این فیلد باید یک ایمیل با این فرمت باشد "user@example.com"',
+      urlText      : 'مقدار این آدرس باید یک آدرس سایت با این فرمت باشد "http:/'+'/www.example.com"',
+      alphaText    : 'مقدار این فیلد باید فقط از حروف الفبا و _ تشکیل شده باشد ',
+      alphanumText : 'مقدار این فیلد باید فقط از حروف الفبا، اعداد و _ تشکیل شده باشد'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'لطفا آدرس لینک را وارد کنید:',
+    buttonTips : {
+      bold : {
+        title: 'تیره (Ctrl+B)',
+        text: 'متن انتخاب شده را تیره می کند.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'ایتالیک (Ctrl+I)',
+        text: 'متن انتخاب شده را ایتالیک می کند.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'زیرخط (Ctrl+U)',
+        text: 'زیر هر نوشته یک خط نمایش می دهد.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'افزایش اندازه',
+        text: 'اندازه فونت را افزایش می دهد.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'کاهش اندازه',
+        text: 'اندازه متن را کاهش می دهد.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'رنگ زمینه متن',
+        text: 'برای تغییر رنگ زمینه متن استفاده می شود.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'رنگ قلم',
+        text: 'رنگ  قلم متن را تغییر می دهد.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'چیدن متن از سمت چپ',
+        text: 'متن از سمت چپ چیده شده می شود.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'متن در وسط ',
+        text: 'نمایش متن در قسمت وسط صفحه و رعابت سمت چپ و راست.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'چیدن متن از سمت راست',
+        text: 'متن از سمت راست پیده خواهد شد.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'لیست همراه با علامت',
+        text: 'یک لیست جدید ایجاد می کند.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'لیست عددی',
+        text: 'یک لیست عددی ایجاد می کند. ',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'لینک',
+        text: 'متن انتخاب شده را به لینک تبدیل کنید.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'ویرایش سورس',
+        text: 'رفتن به حالت ویرایش سورس.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "مرتب سازی افزایشی",
+      sortDescText : "مرتب سازی کاهشی",
+      lockText     : "قفل ستون ها",
+      unlockText   : "بازکردن ستون ها",
+      columnsText  : "ستون ها"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "نام",
+      valueText  : "مقدار",
+      dateFormat : "Y/m/d"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "درگ برای تغییر اندازه.",
+      collapsibleSplitTip : "برای تغییر اندازه درگ کنید."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fi.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fi.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fi.js	(revision 625)
@@ -0,0 +1,302 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Finnish Translations
+ * <tuomas.salo (at) iki.fi>
+ * 'ä' should read as lowercase 'a' with two dots on top (&auml;)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Ladataan...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} rivi(ä) valittu";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Sulje tämä välilehti";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Ladataan...";
+}
+
+Date.monthNames = [
+  "tammikuu",
+  "helmikuu",
+  "maaliskuu",
+  "huhtikuu",
+  "toukokuu",
+  "kesäkuu",
+  "heinäkuu",
+  "elokuu",
+  "syyskuu",
+  "lokakuu",
+  "marraskuu",
+  "joulukuu"
+];
+
+Date.getShortMonthName = function(month) {
+  //return Date.monthNames[month].substring(0, 3);
+  return (month+1) + ".";
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  if(name.match(/^(1?\d)\./)) {
+	return -1+RegExp.$1;
+  } else {
+	return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+  }
+};
+
+Date.dayNames = [
+  "sunnuntai",
+  "maanantai",
+  "tiistai",
+  "keskiviikko",
+  "torstai",
+  "perjantai",
+  "lauantai"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 2);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Peruuta",
+    yes    : "Kyllä",
+    no     : "Ei"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "j.n.Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Tänään",
+    minText           : "Tämä päivämäärä on aikaisempi kuin ensimmäinen sallittu",
+    maxText           : "Tämä päivämäärä on myöhäisempi kuin viimeinen sallittu",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Seuraava kuukausi (Control+oikealle)',
+    prevText          : 'Edellinen kuukausi (Control+vasemmalle)',
+    monthYearText     : 'Valitse kuukausi (vaihda vuotta painamalla Control+ylös/alas)',
+    todayTip          : "{0} (välilyönti)",
+    format            : "j.n.Y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Peruuta",
+    startDay          : 1 // viikko alkaa maanantaista
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Sivu",
+    afterPageText  : "/ {0}",
+    firstText      : "Ensimmäinen sivu",
+    prevText       : "Edellinen sivu",
+    nextText       : "Seuraava sivu",
+    lastText       : "Viimeinen sivu",
+    refreshText    : "Päivitä",
+    displayMsg     : "Näytetään {0} - {1} / {2}",
+    emptyMsg       : 'Ei tietoja'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Tämän kentän arvo ei kelpaa";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Tämän kentän minimipituus on {0}",
+    maxLengthText : "Tämän kentän maksimipituus on {0}",
+    blankText     : "Tämä kenttä on pakollinen",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Tämän kentän pienin sallittu arvo on {0}",
+    maxText : "Tämän kentän suurin sallittu arvo on {0}",
+    nanText : "{0} ei ole numero"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Ei käytössä",
+    disabledDatesText : "Ei käytössä",
+    minText           : "Tämän kentän päivämäärän tulee olla {0} jälkeen",
+    maxText           : "Tämän kentän päivämäärän tulee olla ennen {0}",
+    invalidText       : "Päivämäärä {0} ei ole oikeassa muodossa - kirjoita päivämäärä muodossa {1}",
+    format            : "j.n.Y",
+    altFormats        : "j.n.|d.m.|mdy|mdY|d|Y-m-d|Y/m/d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Ladataan...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Syötä tähän kenttään sähköpostiosoite, esim. "etunimi.sukunimi@osoite.fi"',
+    urlText      : 'Syötä tähän kenttään URL-osoite, esim. "http:/'+'/www.osoite.fi"',
+    alphaText    : 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z) ja alaviivoja (_)',
+    alphanumText : 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z), numeroita (0-9) ja alaviivoja (_)'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Anna linkin URL-osoite:',
+    buttonTips : {
+      bold : {
+        title: 'Lihavoi (Ctrl+B)',
+        text: 'Lihavoi valittu teksti.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursivoi (Ctrl+I)',
+        text: 'Kursivoi valittu teksti.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Alleviivaa (Ctrl+U)',
+        text: 'Alleviivaa valittu teksti.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Suurenna tekstiä',
+        text: 'Kasvata tekstin kirjasinkokoa.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Pienennä tekstiä',
+        text: 'Pienennä tekstin kirjasinkokoa.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Tekstin korostusväri',
+        text: 'Vaihda valitun tekstin taustaväriä.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Tekstin väri',
+        text: 'Vaihda valitun tekstin väriä.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Tasaa vasemmalle',
+        text: 'Tasaa teksti vasempaan reunaan.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Keskitä',
+        text: 'Keskitä teksti.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Tasaa oikealle',
+        text: 'Tasaa teksti oikeaan reunaan.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Luettelo',
+        text: 'Luo luettelo.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numeroitu luettelo',
+        text: 'Luo numeroitu luettelo.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Linkki',
+        text: 'Tee valitusta tekstistä hyperlinkki.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Lähdekoodin muokkaus',
+        text: 'Vaihda lähdekoodin muokkausnäkymään.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.form.BasicForm){
+  Ext.form.BasicForm.prototype.waitTitle = "Odota...";
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Järjestä A-Ö",
+    sortDescText : "Järjestä Ö-A",
+    lockText     : "Lukitse sarake",
+    unlockText   : "Vapauta sarakkeen lukitus",
+    columnsText  : "Sarakkeet"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(ei mitään)',
+    groupByText    : 'Ryhmittele tämän kentän mukaan',
+    showGroupsText : 'Näytä ryhmissä'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nimi",
+    valueText  : "Arvo",
+    dateFormat : "j.m.Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Muuta kokoa vetämällä.",
+    collapsibleSplitTip : "Muuta kokoa vetämällä. Piilota kaksoisklikkauksella."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr.js	(revision 625)
@@ -0,0 +1,335 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * France (France) translation
+ * By Thylia
+ * 09-11-2007, 02:22 PM
+ * updated to 2.2 by disizben (22 Sep 2008)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">En cours de chargement...</div>';
+
+if(Ext.DataView){
+   Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} ligne{1} sélectionnée{1}";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "En cours de chargement...";
+}
+
+Date.shortMonthNames = [
+   "Janv",
+   "Févr",
+   "Mars",
+   "Avr",
+   "Mai",
+   "Juin",
+   "Juil",
+   "Août",
+   "Sept",
+   "Oct",
+   "Nov",
+   "Déc"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.shortMonthNames[month];
+};
+
+Date.monthNames = [
+   "Janvier",
+   "Février",
+   "Mars",
+   "Avril",
+   "Mai",
+   "Juin",
+   "Juillet",
+   "Août",
+   "Septembre",
+   "Octobre",
+   "Novembre",
+   "Décembre"
+];
+
+Date.monthNumbers = {
+  "Janvier" : 0,
+  "Février" : 1,
+  "Mars" : 2,
+  "Avril" : 3,
+  "Mai" : 4,
+  "Juin" : 5,
+  "Juillet" : 6,
+  "Août" : 7,
+  "Septembre" : 8,
+  "Octobre" : 9,
+  "Novembre" : 10,
+  "Décembre" : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[Ext.util.Format.capitalize(name)];
+};
+
+Date.dayNames = [
+   "Dimanche",
+   "Lundi",
+   "Mardi",
+   "Mercredi",
+   "Jeudi",
+   "Vendredi",
+   "Samedi"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:er)";
+
+Ext.override(Date, {
+	getSuffix : function() {
+		return (this.getDate() == 1) ? "er" : "";
+	}
+});
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Annuler",
+      yes    : "Oui",
+      no     : "Non"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Aujourd'hui",
+      minText           : "Cette date est antérieure à la date minimum",
+      maxText           : "Cette date est postérieure à la date maximum",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames		: Date.monthNames,
+      dayNames			: Date.dayNames,
+      nextText          : 'Mois suivant (CTRL+Flèche droite)',
+      prevText          : "Mois précédent (CTRL+Flèche gauche)",
+      monthYearText     : "Choisissez un mois (CTRL+Flèche haut ou bas pour changer d'année.)",
+      todayTip          : "{0} (Barre d'espace)",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Annuler",
+      format            : "d/m/y",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Page",
+      afterPageText  : "sur {0}",
+      firstText      : "Première page",
+      prevText       : "Page précédente",
+      nextText       : "Page suivante",
+      lastText       : "Dernière page",
+      refreshText    : "Actualiser la page",
+      displayMsg     : "Page courante {0} - {1} sur {2}",
+      emptyMsg       : 'Aucune donnée à afficher'
+   });
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide";
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "La longueur minimum de ce champ est de {0} caractères",
+      maxLengthText : "La longueur maximum de ce champ est de {0} caractères",
+      blankText     : "Ce champ est obligatoire",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      decimalSeparator : ",",
+      decimalPrecision : 2,
+      minText : "La valeur minimum de ce champ doit être de {0}",
+      maxText : "La valeur maximum de ce champ doit être de {0}",
+      nanText : "{0} n'est pas un nombre valide"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Désactivé",
+      disabledDatesText : "Désactivé",
+      minText           : "La date de ce champ ne peut être antérieure au {0}",
+      maxText           : "La date de ce champ ne peut être postérieure au {0}",
+      invalidText       : "{0} n'est pas une date valide - elle doit être au format suivant: {1}",
+      format            : "d/m/y",
+      altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "En cours de chargement...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ce champ doit contenir une adresse email au format: "usager@example.com"',
+      urlText      : 'Ce champ doit contenir une URL au format suivant: "http:/'+'/www.example.com"',
+      alphaText    : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)',
+      alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+      createLinkText : "Veuillez entrer l'URL pour ce lien:",
+          buttonTips : {
+              bold : {
+                  title: 'Gras (Ctrl+B)',
+                  text: 'Met le texte sélectionné en gras.',
+                  cls: 'x-html-editor-tip'
+              },
+              italic : {
+                  title: 'Italique (Ctrl+I)',
+                  text: 'Met le texte sélectionné en italique.',
+                  cls: 'x-html-editor-tip'
+              },
+              underline : {
+                  title: 'Souligné (Ctrl+U)',
+                  text: 'Souligne le texte sélectionné.',
+                  cls: 'x-html-editor-tip'
+              },
+              increasefontsize : {
+                  title: 'Agrandir la police',
+                  text: 'Augmente la taille de la police.',
+                  cls: 'x-html-editor-tip'
+              },
+              decreasefontsize : {
+                  title: 'Réduire la police',
+                  text: 'Réduit la taille de la police.',
+                  cls: 'x-html-editor-tip'
+              },
+              backcolor : {
+                  title: 'Couleur de surbrillance',
+                  text: 'Modifie la couleur de fond du texte sélectionné.',
+                  cls: 'x-html-editor-tip'
+              },
+              forecolor : {
+                  title: 'Couleur de police',
+                  text: 'Modifie la couleur du texte sélectionné.',
+                  cls: 'x-html-editor-tip'
+              },
+              justifyleft : {
+                  title: 'Aligner à gauche',
+                  text: 'Aligne le texte à gauche.',
+                  cls: 'x-html-editor-tip'
+              },
+              justifycenter : {
+                  title: 'Centrer',
+                  text: 'Centre le texte.',
+                  cls: 'x-html-editor-tip'
+              },
+              justifyright : {
+                  title: 'Aligner à droite',
+                  text: 'Aligner le texte à droite.',
+                  cls: 'x-html-editor-tip'
+              },
+              insertunorderedlist : {
+                  title: 'Liste à puce',
+                  text: 'Démarre une liste à puce.',
+                  cls: 'x-html-editor-tip'
+              },
+              insertorderedlist : {
+                  title: 'Liste numérotée',
+                  text: 'Démarre une liste numérotée.',
+                  cls: 'x-html-editor-tip'
+              },
+              createlink : {
+                  title: 'Lien hypertexte',
+                  text: 'Transforme en lien hypertexte.',
+                  cls: 'x-html-editor-tip'
+              },
+              sourceedit : {
+                  title: 'Code source',
+                  text: 'Basculer en mode édition du code source.',
+                  cls: 'x-html-editor-tip'
+              }
+        }
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Tri croissant",
+      sortDescText : "Tri décroissant",
+      columnsText  : "Colonnes"
+   });
+}
+
+if(Ext.grid.GroupingView){
+   Ext.apply(Ext.grid.GroupingView.prototype, {
+      emptyGroupText : '(Aucun)',
+      groupByText    : 'Grouper par ce champ',
+      showGroupsText : 'Afficher par groupes'
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Propriété",
+      valueText  : "Valeur",
+      dateFormat : "d/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Cliquer et glisser pour redimensionner le panneau.",
+      collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher."
+   });
+}
+
+if(Ext.form.TimeField){
+   Ext.apply(Ext.form.TimeField.prototype, {
+      minText     : "L'heure de ce champ ne peut être antérieure à {0}",
+      maxText     : "L'heure de ce champ ne peut être postérieure à {0}",
+      invalidText : "{0} n'est pas une heure valide",
+      format      : "H:i",
+      altFormats  : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H"
+   });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "Vous devez sélectionner au moins un élément dans ce groupe"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "Vous devez sélectionner au moins un élément dans ce groupe"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr_CA.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr_CA.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-fr_CA.js	(revision 625)
@@ -0,0 +1,218 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * France (Canadian) translation
+ * By BernardChhun
+ * 04-08-2007, 03:07 AM
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">En cours de chargement...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} ligne(s) sélectionné(s)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Fermer cette onglet";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "En cours de chargement...";
+}
+
+Date.shortMonthNames = [
+   "Janv",
+   "Févr",
+   "Mars",
+   "Avr",
+   "Mai",
+   "Juin",
+   "Juil",
+   "Août",
+   "Sept",
+   "Oct",
+   "Nov",
+   "Déc"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.shortMonthNames[month];
+};
+
+Date.monthNames = [
+   "Janvier",
+   "Février",
+   "Mars",
+   "Avril",
+   "Mai",
+   "Juin",
+   "Juillet",
+   "Août",
+   "Septembre",
+   "Octobre",
+   "Novembre",
+   "Décembre"
+];
+
+Date.monthNumbers = {
+  "Janvier" : 0,
+  "Février" : 1,
+  "Mars" : 2,
+  "Avril" : 3,
+  "Mai" : 4,
+  "Juin" : 5,
+  "Juillet" : 6,
+  "Août" : 7,
+  "Septembre" : 8,
+  "Octobre" : 9,
+  "Novembre" : 10,
+  "Décembre" : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[Ext.util.Format.capitalize(name)];
+};
+
+Date.dayNames = [
+   "Dimanche",
+   "Lundi",
+   "Mardi",
+   "Mercredi",
+   "Jeudi",
+   "Vendredi",
+   "Samedi"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Annuler",
+      yes    : "Oui",
+      no     : "Non"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Aujourd'hui",
+      minText           : "Cette date est plus petite que la date minimum",
+      maxText           : "Cette date est plus grande que la date maximum",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Prochain mois (CTRL+Fléche droite)',
+      prevText          : 'Mois précédent (CTRL+Fléche gauche)',
+      monthYearText     : 'Choissisez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)',
+      todayTip          : "{0} (Barre d'espace)",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Page",
+      afterPageText  : "de {0}",
+      firstText      : "Première page",
+      prevText       : "Page précédente",
+      nextText       : "Prochaine page",
+      lastText       : "Dernière page",
+      refreshText    : "Recharger la page",
+      displayMsg     : "Page courante {0} - {1} de {2}",
+      emptyMsg       : 'Aucune donnée à afficher'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "La longueur minimum de ce champ est de {0} caractères",
+      maxLengthText : "La longueur maximum de ce champ est de {0} caractères",
+      blankText     : "Ce champ est obligatoire",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "La valeur minimum de ce champ doit être de {0}",
+      maxText : "La valeur maximum de ce champ doit être de {0}",
+      nanText : "{0} n'est pas un nombre valide"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Désactivé",
+      disabledDatesText : "Désactivé",
+      minText           : "La date de ce champ doit être avant le {0}",
+      maxText           : "La date de ce champ doit être après le {0}",
+      invalidText       : "{0} n'est pas une date valide - il doit être au format suivant: {1}",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "En cours de chargement...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ce champ doit contenir un courriel et doit être sous ce format: "usager@example.com"',
+      urlText      : 'Ce champ doit contenir une URL sous le format suivant: "http:/'+'/www.example.com"',
+      alphaText    : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)',
+      alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Tri ascendant",
+      sortDescText : "Tri descendant",
+      lockText     : "Verrouillé la colonne",
+      unlockText   : "Déverrouillé la colonne",
+      columnsText  : "Colonnes"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Propriété",
+      valueText  : "Valeur",
+      dateFormat : "d/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Cliquer et glisser pour redimensionner le panneau.",
+      collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour cacher le panneau."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-gr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-gr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-gr.js	(revision 625)
@@ -0,0 +1,175 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Greek (Old Version) Translations by Vagelis
+ * 03-June-2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Öüñôùóç...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} åðéëåãìÝíç(åò) ãñáììÞ(Ýò)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Êëåßóôå áõôÞ ôçí êáñôÝëá";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Ç ôéìÞ óôï ðåäßï äåí åßíáé Ýãêõñç";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Öüñôùóç...";
+}
+
+Date.monthNames = [
+   "ÉáíïõÜñéïò",
+   "ÖåâñïõÜñéïò",
+   "ÌÜñôéïò",
+   "Áðñßëéïò",
+   "ÌÜéïò",
+   "Éïýíéïò",
+   "Éïýëéïò",
+   "Áýãïõóôïò",
+   "ÓåðôÝìâñéïò",
+   "Ïêôþâñéïò",
+   "ÍïÝìâñéïò",
+   "ÄåêÝìâñéïò"
+];
+
+Date.dayNames = [
+   "ÊõñéáêÞ",
+   "ÄåõôÝñá",
+   "Ôñßôç",
+   "ÔåôÜñôç",
+   "ÐÝìðôç",
+   "ÐáñáóêåõÞ",
+   "ÓÜââáôï"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "ÅíôÜîåé",
+      cancel : "Áêýñùóç",
+      yes    : "Íáé",
+      no     : "¼÷é"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "ì/ç/Å");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "ÓÞìåñá",
+      minText           : "Ç çìåñïìçíßá áõôÞ åßíáé ðñéí ôçí ìéêñüôåñç çìåñïìçíßá",
+      maxText           : "Ç çìåñïìçíßá áõôÞ åßíáé ìåôÜ ôçí ìåãáëýôåñç çìåñïìçíßá",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Åðüìåíïò ÌÞíáò (Control+Right)',
+      prevText          : 'Ðñïçãïýìåíïò ÌÞíáò (Control+Left)',
+      monthYearText     : 'ÅðéëÝîôå ÌÞíá (Control+Up/Down ãéá ìåôáêßíçóç óôá Ýôç)',
+      todayTip          : "{0} (Spacebar)",
+      format            : "ì/ç/Å"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Óåëßäá",
+      afterPageText  : "áðü {0}",
+      firstText      : "Ðñþôç óåëßäá",
+      prevText       : "Ðñïçãïýìåíç óåëßäá",
+      nextText       : "Åðüìåíç óåëßäá",
+      lastText       : "Ôåëåõôáßá óåëßäá",
+      refreshText    : "ÁíáíÝùóç",
+      displayMsg     : "ÅìöÜíéóç {0} - {1} áðü {2}",
+      emptyMsg       : 'Äåí âñÝèçêáí åããñáöÝò ãéá åìöÜíéóç'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Ôï åëÜ÷éóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}",
+      maxLengthText : "Ôï ìÝãéóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}",
+      blankText     : "Ôï ðåäßï áõôü åßíáé õðï÷ñåùôïêü",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}",
+      maxText : "Ç ìÝãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}",
+      nanText : "{0} äåí åßíáé Ýãêõñïò áñéèìüò"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "ÁðåíåñãïðïéçìÝíï",
+      disabledDatesText : "ÁðåíåñãïðïéçìÝíï",
+      minText           : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}",
+      maxText           : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ðñéí áðü {0}",
+      invalidText       : "{0} äåí åßíáé Ýãêõñç çìåñïìçíßá - ðñÝðåé íá åßíáé ôçò ìïñöÞò {1}",
+      format            : "ì/ç/Å"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Öüñôùóç...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé e-mail address ôçò ìïñöÞò "user@example.com"',
+      urlText      : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìéá äéåýèõíóç URL ôçò ìïñöÞò "http:/'+'/www.example.com"',
+      alphaText    : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá êáé _',
+      alphanumText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá, áñéèìïýò êáé _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Áýîïõóá Ôáîéíüìçóç",
+      sortDescText : "Öèßíïõóá Ôáîéíüìçóç",
+      lockText     : "Êëåßäùìá óôÞëçò",
+      unlockText   : "Îåêëåßäùìá óôÞëçò",
+      columnsText  : "ÓôÞëåò"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "¼íïìá",
+      valueText  : "ÔéìÞ",
+      dateFormat : "ì/ç/Å"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò.",
+      collapsibleSplitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò. Double click ãéá áðüêñõøç."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-he.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-he.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-he.js	(revision 625)
@@ -0,0 +1,292 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Hebrew Translations
+ * By spartacus (from forums) 06-12-2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">...����</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "����� ������ {0}";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "���� ������";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "���� ���� �� ����";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "...����";
+}
+
+Date.monthNames = [
+  "�����",
+  "������",
+  "���",
+  "�����",
+  "���",
+  "����",
+  "����",
+  "������",
+  "������",
+  "�������",
+  "������",
+  "�����"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "�",
+  "�",
+  "�",
+  "�",
+  "�",
+  "�",
+  "�"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "�����",
+    cancel : "�����",
+    yes    : "��",
+    no     : "��"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "����",
+    minText           : ".����� �� �� ���� ������ ������� �����",
+    maxText           : ".����� �� �� ���� ������ ����� �����",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : '(Control+Right) ����� ���',
+    prevText          : '(Control+Left) ����� �����',
+    monthYearText     : '(������ ��� Control+Up/Down) ��� ����',
+    todayTip          : "��� ����) {0})",
+    format            : "d/m/Y",
+    okText            : "&#160;�����&#160;",
+    cancelText        : "�����",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "����",
+    afterPageText  : "{0} ����",
+    firstText      : "���� �����",
+    prevText       : "���� ����",
+    nextText       : "���� ���",
+    lastText       : "���� �����",
+    refreshText    : "����",
+    displayMsg     : "���� {0} - {1} ���� {2}",
+    emptyMsg       : '��� ���� �����'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "{0} ����� ��������� ���� �� ���",
+    maxLengthText : "{0} ����� ������ ���� �� ���",
+    blankText     : "��� �� �����",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "{0} ���� ��������� ���� �� ���",
+    maxText : "{0} ���� ������ ���� �� ���",
+    nanText : "��� �� ���� {0}"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "������",
+    disabledDatesText : "������",
+    minText           : "{0} ������ ���� �� ���� ����� ����",
+    maxText           : "{0} ������ ���� �� ���� ����� ����",
+    invalidText       : "{1} ��� �� ����� ���� - ���� ����� ������ {0}",
+    format            : "m/d/y",
+    altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "...����",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : '"user@example.com" ��� �� ���� ����� ����� ���� �������� ������',
+    urlText      : '"http:/'+'/www.example.com" ��� �� ���� ����� ����� ������� ������',
+    alphaText    : '_��� �� ���� ����� �� ������ �',
+    alphanumText : '_��� �� ���� ����� �� ������, ������ �'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : ':��� ���� �� ����� �������� ���� ������',
+    buttonTips : {
+      bold : {
+        title: '(Ctrl+B) �����',
+        text: '.���� �� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: '(Ctrl+I) ����',
+        text: '.��� �� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: '(Ctrl+U) �� ����',
+        text: '.���� �� ���� ���� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: '���� ����',
+        text: '.���� ���� ���� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: '���� ����',
+        text: '.���� ���� ���� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: '��� ��� �����',
+        text: '.��� �� ��� ���� ���� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: '��� ����',
+        text: '.��� �� ��� ����� ���� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: '���� �����',
+        text: '.��� ����� �� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: '���� �����',
+        text: '.��� ����� �� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: '���� �����',
+        text: '.��� ����� �� ����� �����',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: '����� ������',
+        text: '.���� ����� ������',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: '����� �������',
+        text: '.���� ����� �������',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: '�����',
+        text: '.���� �� ����� ����� ������',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: '����� ��� ����',
+        text: '.��� ��� ����',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "���� ���� ����",
+    sortDescText : "���� ���� ����",
+    lockText     : "��� �����",
+    unlockText   : "���� �����",
+    columnsText  : "������"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(���)',
+    groupByText    : '��� ������� ��� ��� ��',
+    showGroupsText : '��� �������'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "��",
+    valueText  : "���",
+    dateFormat : "m/j/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : ".���� ������ ����",
+    collapsibleSplitTip : ".���� ������ ����. ����� ����� ������"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hr.js	(revision 625)
@@ -0,0 +1,295 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Croatian translation
+ * By Ylodi (utf8 encoding)
+ * 8 May 2007
+ *
+ * By Stjepan at gmail dot com (utf8 encoding)
+ * 17 May 2008
+ */
+ 
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Učitavanje...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} odabranih redova";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zatvori ovaj tab";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Unesena vrijednost u ovom polju je neispravna";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Učitavanje...";
+}
+
+Date.monthNames = [
+   "Siječanj",
+   "Veljača",
+   "Ožujak",
+   "Travanj",
+   "Svibanj",
+   "Lipanj",
+   "Srpanj",
+   "Kolovoz",
+   "Rujan",
+   "Listopad",
+   "Studeni",
+   "Prosinac"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Nedjelja",
+   "Ponedjeljak",
+   "Utorak",
+   "Srijeda",
+   "Četvrtak",
+   "Petak",
+   "Subota"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "U redu",
+      cancel : "Odustani",
+      yes    : "Da",
+      no     : "Ne"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Danas",
+      minText           : "Taj datum je prije najmanjeg datuma",
+      maxText           : "Taj datum je poslije najvećeg datuma",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Slijedeći mjesec (Control+Desno)',
+      prevText          : 'Prethodni mjesec (Control+Lijevo)',
+      monthYearText     : 'Odaberite mjesec (Control+Gore/Dolje za promjenu godine)',
+      todayTip          : "{0} (Razmaknica)",
+      format            : "d.m.y",
+      okText            : "&#160;U redu&#160;",
+      cancelText        : "Odustani",      
+      startDay 		 : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Stranica",
+      afterPageText  : "od {0}",
+      firstText      : "Prva stranica",
+      prevText       : "Prethodna stranica",
+      nextText       : "Slijedeća stranica",
+      lastText       : "Posljednja stranica",
+      refreshText    : "Obnovi",
+      displayMsg     : "Prikazujem {0} - {1} od {2}",
+      emptyMsg       : 'Nema podataka za prikaz'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimalna dužina za ovo polje je {0}",
+      maxLengthText : "Maksimalna dužina za ovo polje je {0}",
+      blankText     : "Ovo polje je obavezno",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minimalna vrijednost za ovo polje je {0}",
+      maxText : "Maksimalna vrijednost za ovo polje je {0}",
+      nanText : "{0} nije ispravan broj"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Neaktivno",
+      disabledDatesText : "Neaktivno",
+      minText           : "Datum u ovom polje mora biti poslije {0}",
+      maxText           : "Datum u ovom polju mora biti prije {0}",
+      invalidText       : "{0} nije ispravan datum - mora biti u obliku {1}",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Učitavanje...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ovdje možete unijeti samo e-mail adresu u obliku "korisnik@domena.com"',
+      urlText      : 'Ovdje možete unijeti samo URL u obliku "http:/'+'/www.domena.com"',
+      alphaText    : 'Ovo polje može sadržavati samo slova i znak _',
+      alphanumText : 'Ovo polje može sadržavati samo slova, brojeve i znak _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Unesite URL za link:',
+    buttonTips : {
+      bold : {
+        title: 'Podebljano (Ctrl+B)',
+        text: 'Podebljavanje označenog teksta.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kurziv (Ctrl+I)',
+        text: 'Pretvaranje označenog tekst u kurziv',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Podcrtano (Ctrl+U)',
+        text: 'Potcrtavanje označenog teksta',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Povećanje teksta',
+        text: 'Povećavanje veličine fonta.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Smanjivanje teksta',
+        text: 'Smanjivanje veličine fonta.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Boja označenog teksta',
+        text: 'Promjena boje pozadine označenog teksta.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Boja fonta',
+        text: 'Promjena boje označenog teksta.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Lijevo poravnanje teksta',
+        text: 'Poravnanje teksta na lijevu stranu.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centriranje teksta',
+        text: 'Centriranje teksta u uređivaču teksta.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Desno poravnanje teksta',
+        text: 'Poravnanje teksta na desnu stranu.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Označena lista',
+        text: 'Započinjanje označene liste.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numerirana lista',
+        text: 'Započinjanje numerirane liste.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hiperveza',
+        text: 'Stvaranje hiperveze od označenog teksta.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Uređivanje izvornog koda',
+        text: 'Prebacivanje u način rada za uređivanje izvornog koda.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Sortiraj rastućim redoslijedom",
+      sortDescText : "Sortiraj padajućim redoslijedom",
+      lockText     : "Zaključaj stupac",
+      unlockText   : "Otključaj stupac",
+      columnsText  : "Stupci"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Ništa)',
+    groupByText    : 'Grupiranje po ovom polju',
+    showGroupsText : 'Prikaz u grupama'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Naziv",
+      valueText  : "Vrijednost",
+      dateFormat : "d.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Povuci za promjenu veličine.",
+      collapsibleSplitTip : "Povuci za promjenu veličine. Dvostruki klik za skrivanje."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-hu.js	(revision 625)
@@ -0,0 +1,296 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * Hungarian Translations (utf-8 encoded)
+ * by Amon <amon@theba.hu> (27 Apr 2008)
+ * encoding fixed by Vili (17 Feb 2009)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Betöltés...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} kiválasztott sor";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Fül bezárása";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Hibás érték!";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Betöltés...";
+}
+
+Date.monthNames = [
+  "Január",
+  "Február",
+  "Március",
+  "Április",
+  "Május",
+  "Június",
+  "Július",
+  "Augusztus",
+  "Szeptember",
+  "Október",
+  "November",
+  "December"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  'Jan' : 0,
+  'Feb' : 1,
+  'Már' : 2,
+  'Ápr' : 3,
+  'Máj' : 4,
+  'Jún' : 5,
+  'Júl' : 6,
+  'Aug' : 7,
+  'Sze' : 8,
+  'Okt' : 9,
+  'Nov' : 10,
+  'Dec' : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Vasárnap",
+  "Hétfő",
+  "Kedd",
+  "Szerda",
+  "Csütörtök",
+  "Péntek",
+  "Szombat"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Mégsem",
+    yes    : "Igen",
+    no     : "Nem"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "Y m d");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Mai nap",
+    minText           : "A dátum korábbi a megengedettnél",
+    maxText           : "A dátum későbbi a megengedettnél",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Köv. hónap (CTRL+Jobbra)',
+    prevText          : 'Előző hónap (CTRL+Balra)',
+    monthYearText     : 'Válassz hónapot (Évválasztás: CTRL+Fel/Le)',
+    todayTip          : "{0} (Szóköz)",
+    format            : "y-m-d",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Mégsem",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Oldal",
+    afterPageText  : "a {0}-ból/ből",
+    firstText      : "Első oldal",
+    prevText       : "Előző oldal",
+    nextText       : "Következő oldal",
+    lastText       : "Utolsó oldal",
+    refreshText    : "Frissítés",
+    displayMsg     : "{0} - {1} sorok láthatók a {2}-ból/ből",
+    emptyMsg       : 'Nincs megjeleníthető adat'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "A mező tartalma legalább {0} hosszú kell legyen",
+    maxLengthText : "A mező tartalma legfeljebb {0} hosszú lehet",
+    blankText     : "Kötelezően kitöltendő mező",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "A mező tartalma nem lehet kissebb, mint {0}",
+    maxText : "A mező tartalma nem lehet nagyobb, mint {0}",
+    nanText : "{0} nem szám"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Nem választható",
+    disabledDatesText : "Nem választható",
+    minText           : "A dátum nem lehet korábbi, mint {0}",
+    maxText           : "A dátum nem lehet későbbi, mint {0}",
+    invalidText       : "{0} nem megfelelő dátum - a helyes formátum: {1}",
+    format            : "Y m d",
+    altFormats        : "Y-m-d|y-m-d|y/m/d|m/d|m-d|md|ymd|Ymd|d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Betöltés...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'A mező email címet tartalmazhat, melynek formátuma "felhasználó@szolgáltató.hu"',
+    urlText      : 'A mező webcímet tartalmazhat, melynek formátuma "http:/'+'/www.weboldal.hu"',
+    alphaText    : 'A mező csak betűket és aláhúzást (_) tartalmazhat',
+    alphanumText : 'A mező csak betűket, számokat és aláhúzást (_) tartalmazhat'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Add meg a webcímet:',
+    buttonTips : {
+      bold : {
+        title: 'Félkövér (Ctrl+B)',
+        text: 'Félkövérré teszi a kijelölt szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Dőlt (Ctrl+I)',
+        text: 'Dőlté teszi a kijelölt szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Aláhúzás (Ctrl+U)',
+        text: 'Aláhúzza a kijelölt szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Szöveg nagyítás',
+        text: 'Növeli a szövegméretet.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Szöveg kicsinyítés',
+        text: 'Csökkenti a szövegméretet.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Háttérszín',
+        text: 'A kijelölt szöveg háttérszínét módosítja.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Szövegszín',
+        text: 'A kijelölt szöveg színét módosítja.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Balra zárt',
+        text: 'Balra zárja a szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Középre zárt',
+        text: 'Középre zárja a szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Jobbra zárt',
+        text: 'Jobbra zárja a szöveget.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Felsorolás',
+        text: 'Felsorolást kezd.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Számozás',
+        text: 'Számozott listát kezd.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hiperlink',
+        text: 'A kijelölt szöveget linkké teszi.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Forrás nézet',
+        text: 'Forrás nézetbe kapcsol.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Növekvő rendezés",
+    sortDescText : "Csökkenő rendezés",
+    lockText     : "Oszlop zárolás",
+    unlockText   : "Oszlop feloldás",
+    columnsText  : "Oszlopok"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Nincs)',
+    groupByText    : 'Oszlop szerint csoportosítás',
+    showGroupsText : 'Csoportos nézet'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Név",
+    valueText  : "Érték",
+    dateFormat : "Y m j"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Átméretezés húzásra.",
+    collapsibleSplitTip : "Átméretezés húzásra. Eltüntetés duplaklikk."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-id.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-id.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-id.js	(revision 625)
@@ -0,0 +1,302 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Pedoman translasi:
+ * http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Tahun_2001_Tentang_Penggunaan_Komputer_Dengan_Aplikasi_Komputer_Berbahasa_Indonesia
+ * Original source: http://vlsm.org/etc/baku-0.txt
+ * by Farid GS
+ * farid [at] pulen.net
+ * 10:13 04 Desember 2007
+ * Indonesian Translations
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Pemuatan...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} selected row(s)";
+  Ext.grid.GridPanel.prototype.ddText = "{0} baris terpilih";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Close this tab";
+  Ext.TabPanelItem.prototype.closeText = "Tutup tab ini";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "The value in this field is invalid";
+  Ext.form.Field.prototype.invalidText = "Isian belum benar";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Loading...";
+  Ext.LoadMask.prototype.msg = "Pemuatan...";
+}
+
+Date.monthNames = [
+  "Januari",
+  "Februari",
+  "Maret",
+  "April",
+  "Mei",
+  "Juni",
+  "Juli",
+  "Agustus",
+  "September",
+  "Oktober",
+  "November",
+  "Desember"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Jan : 0,
+  Feb : 1,
+  Mar : 2,
+  Apr : 3,
+  Mei : 4,
+  Jun : 5,
+  Jul : 6,
+  Agu : 7,
+  Sep : 8,
+  Okt : 9,
+  Nov : 10,
+  Des : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Minggu",
+  "Senin",
+  "Selasa",
+  "Rabu",
+  "Kamis",
+  "Jumat",
+  "Sabtu"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Batal",
+    yes    : "Ya",
+    no     : "Tidak"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Hari ini",
+    minText           : "Tanggal ini sebelum batas tanggal minimal", 
+    maxText           : "Tanggal ini setelah batas tanggal maksimal", 
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Bulan Berikut (Kontrol+Kanan)', 
+    prevText          : 'Bulan Sebelum (Kontrol+Kiri)', 
+    monthYearText     : 'Pilih bulan (Kontrol+Atas/Bawah untuk pindah tahun)', 
+    todayTip          : "{0} (Spacebar)",
+    format            : "d/m/y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Batal",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Hal",
+    afterPageText  : "dari {0}",
+    firstText      : "Hal. Pertama",
+    prevText       : "Hal. Sebelum",
+    nextText       : "Hal. Berikut",
+    lastText       : "Hal. Akhir",
+    refreshText    : "Segarkan", 
+    displayMsg     : "Menampilkan {0} - {1} dari {2}",
+    emptyMsg       : 'Data tidak ditemukan' 
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Panjang minimal untuk field ini adalah {0}",  
+    maxLengthText : "Panjang maksimal untuk field ini adalah {0}", 
+    blankText     : "Field ini wajib diisi", 
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Nilai minimal untuk field ini adalah {0}",  
+    maxText : "Nilai maksimal untuk field ini adalah {0}",  
+    nanText : "{0} bukan angka" 
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Disfungsi",  
+    disabledDatesText : "Disfungsi",  
+    minText           : "Tanggal dalam field ini harus setelah {0}", 
+    maxText           : "Tanggal dalam field ini harus sebelum {0}", 
+    invalidText       : "{0} tanggal salah - Harus dalam format {1}", 
+    format            : "d/m/y", 
+    //altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+    altFormats        : "d/m/Y|d-m-y|d-m-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Pemuatan...",  
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Field ini harus dalam format email seperti "user@example.com"', 
+    urlText      : 'Field ini harus dalam format URL seperti "http:/'+'/www.example.com"', 
+    alphaText    : 'Field ini harus terdiri dari huruf dan _', 
+    alphanumText : 'Field ini haris terdiri dari huruf, angka dan _'  
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Silakan masukkan URL untuk tautan:', 
+    buttonTips : {
+      bold : {
+        title: 'Tebal (Ctrl+B)', 
+        text: 'Buat tebal teks terpilih', 
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Miring (CTRL+I)', 
+        text: 'Buat miring teks terpilih', 
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Garisbawah (CTRl+U)', 
+        text: 'Garisbawahi teks terpilih', 
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Perbesar teks', 
+        text: 'Perbesar ukuran fonta', 
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Perkecil teks',  
+        text: 'Perkecil ukuran fonta', 
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Sorot Warna Teks',  
+        text: 'Ubah warna latar teks terpilih', 
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Warna Fonta', 
+        text: 'Ubah warna teks terpilih',  
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Rata Kiri', 
+        text: 'Ratakan teks ke kiri', 
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Rata Tengah', 
+        text: 'Ratakan teks ke tengah editor', 
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Rata Kanan', 
+        text: 'Ratakan teks ke kanan', 
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Daftar Bulet', 
+        text: 'Membuat daftar berbasis bulet', 
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Daftar Angka', 
+        text: 'Membuat daftar berbasis angka', 
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hipertaut', 
+        text: 'Buat teks terpilih sebagai Hipertaut', 
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Edit Kode Sumber', 
+        text: 'Pindah dalam mode kode sumber', 
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Urut Naik", 
+    sortDescText : "Urut Turun", 
+    lockText     : "Kancing Kolom", 
+    unlockText   : "Lepas Kunci Kolom", 
+    columnsText  : "Kolom"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Kosong)', 
+    groupByText    : 'Kelompokkan Berdasar Field Ini', 
+    showGroupsText : 'Tampil Dalam Kelompok' 
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nama", 
+    valueText  : "Nilai", 
+    dateFormat : "d/m/Y" 
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Seret untuk ubah ukuran.", 
+    collapsibleSplitTip : "Seret untuk ubah ukuran, Dobel klik untuk sembunyikan." 
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-it.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-it.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-it.js	(revision 625)
@@ -0,0 +1,295 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Italian translation
+ * By eric_void
+ * 04-10-2007, 11:25 AM
+ * Updated by Federico Grilli 21/12/2007 
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Caricamento in corso...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} righe selezionate";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Chiudi pannello";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Valore non valido";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Caricamento in corso...";
+}
+
+Date.monthNames = [
+   "Gennaio",
+   "Febbraio",
+   "Marzo",
+   "Aprile",
+   "Maggio",
+   "Giugno",
+   "Luglio",
+   "Agosto",
+   "Settembre",
+   "Ottobre",
+   "Novembre",
+   "Dicembre"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Gen : 0,
+  Feb : 1,
+  Mar : 2,
+  Apr : 3,
+  Mag : 4,
+  Giu : 5,
+  Lug : 6,
+  Ago : 7,
+  Set : 8,
+  Ott : 9,
+  Nov : 10,
+  Dic : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Domenica",
+   "Luned\u00EC",
+   "Marted\u00EC",
+   "Mercoled\u00EC",
+   "Gioved\u00EC",
+   "Venerd\u00EC",
+   "Sabato"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Annulla",
+      yes    : "S\u00EC",
+      no     : "No"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Oggi",
+      minText           : "Data precedente alla data minima",
+      maxText           : "Data successiva alla data massima",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames		: Date.monthNames,
+      dayNames			: Date.dayNames,
+      nextText          : 'Mese successivo (Ctrl+Destra)',
+      prevText          : 'Mese precedente (Ctrl+Sinistra)',
+      monthYearText     : 'Scegli un mese (Ctrl+Su/Giu per cambiare anno)',
+      todayTip          : "{0} (Barra spaziatrice)",
+      format            : "d/m/y",
+      cancelText		: "Annulla",
+	  okText            : "&#160;OK&#160;",
+	  startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Pagina",
+      afterPageText  : "di {0}",
+      firstText      : "Prima pagina",
+      prevText       : "Pagina precedente",
+      nextText       : "Pagina successiva",
+      lastText       : "Ultima pagina",
+      refreshText    : "Aggiorna",
+      displayMsg     : "Record {0} - {1} di {2}",
+      emptyMsg       : 'Nessun dato da mostrare'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "La lunghezza minima \u00E8 {0}",
+      maxLengthText : "La lunghezza massima \u00E8 {0}",
+      blankText     : "Campo obbligatorio",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Il valore minimo \u00E8 {0}",
+      maxText : "Il valore massimo \u00E8 {0}",
+      nanText : "{0} non \u00E8 un valore numerico corretto"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Disabilitato",
+      disabledDatesText : "Disabilitato",
+      minText           : "La data deve essere successiva al {0}",
+      maxText           : "La data deve essere precedente al {0}",
+      invalidText       : "{0} non \u00E8 una data valida. Deve essere nel formato {1}",
+      format            : "d/m/y",
+      altFormats        : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Caricamento in corso...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Il campo deve essere un indirizzo e-mail nel formato "user@example.com"',
+      urlText      : 'Il campo deve essere un indirizzo web nel formato "http:/'+'/www.example.com"',
+      alphaText    : 'Il campo deve contenere solo lettere e _',
+      alphanumText : 'Il campo deve contenere solo lettere, numeri e _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Inserire un URL per il link:',
+    buttonTips : {
+      bold : {
+        title: 'Grassetto (Ctrl+B)',
+        text: 'Rende il testo selezionato in grassetto.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Corsivo (Ctrl+I)',
+        text: 'Rende il testo selezionato in corsivo.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Sottolinea (Ctrl+U)',
+        text: 'Sottolinea il testo selezionato.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Ingrandisci testo',
+        text: 'Aumenta la dimensione del carattere.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Rimpicciolisci testo',
+        text: 'Diminuisce la dimensione del carattere.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Colore evidenziatore testo',
+        text: 'Modifica il colore di sfondo del testo selezionato.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Colore carattere',
+        text: 'Modifica il colore del testo selezionato.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Allinea a sinistra',
+        text: 'Allinea il testo a sinistra.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centra',
+        text: 'Centra il testo.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Allinea a destra',
+        text: 'Allinea il testo a destra.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Elenco puntato',
+        text: 'Elenco puntato.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Elenco numerato',
+        text: 'Elenco numerato.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Collegamento',
+        text: 'Trasforma il testo selezionato in un collegamanto.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Sorgente',
+        text: 'Passa alla modalit\u00E0 editing del sorgente.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Ordinamento crescente",
+      sortDescText : "Ordinamento decrescente",
+      lockText     : "Blocca colonna",
+      unlockText   : "Sblocca colonna",
+      columnsText  : "Colonne"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Nessun dato)',
+    groupByText    : 'Raggruppa per questo campo',
+    showGroupsText : 'Mostra nei gruppi'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Nome",
+      valueText  : "Valore",
+      dateFormat : "j/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Trascina per cambiare dimensioni.",
+      collapsibleSplitTip : "Trascina per cambiare dimensioni. Doppio click per nascondere."
+   });
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ja.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ja.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ja.js	(revision 625)
@@ -0,0 +1,318 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Japanese translation
+ * By tyama
+ * 04-08-2007, 05:49 AM
+ *
+ * update based on English Translations by Condor (8 Aug 2008)
+ * By sakuro (30 Aug 2008)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">読み込み中...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} 行選択";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "読み込み中...";
+}
+
+Date.monthNames = [
+  '1月',
+  '2月',
+  '3月',
+  '4月',
+  '5月',
+  '6月',
+  '7月',
+  '8月',
+  '9月',
+  '10月',
+  '11月',
+  '12月'
+];
+
+Date.getShortMonthName = function(month) {
+  return "" + (month + 1);
+};
+
+Date.monthNumbers = {
+  "1" : 0,
+  "2" : 1,
+  "3" : 2,
+  "4" : 3,
+  "5" : 4,
+  "6" : 5,
+  "7" : 6,
+  "8" : 7,
+  "9" : 8,
+  "10" : 9,
+  "11" : 10,
+  "12" : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, name.length - 1)];
+  // or simply parseInt(name.substring(0, name.length - 1)) - 1
+};
+
+Date.dayNames = [
+  "日曜日",
+  "月曜日",
+  "火曜日",
+  "水曜日",
+  "木曜日",
+  "金曜日",
+  "土曜日"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 1); // just remove "曜日" suffix
+};
+
+Date.formatCodes.a = "(this.getHours() < 12 ? '午前' : '午後')";
+Date.formatCodes.A = "(this.getHours() < 12 ? '午前' : '午後')"; // no case difference
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "キャンセル",
+    yes    : "はい",
+    no     : "いいえ"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "Y/m/d");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "今日",
+    minText           : "選択した日付は最小値以下です。",
+    maxText           : "選択した日付は最大値以上です。",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : '次月へ (コントロール+右)',
+    prevText          : '前月へ (コントロール+左)',
+    monthYearText     : '月選択 (コントロール+上/下で年移動)',
+    todayTip          : "{0} (スペースキー)",
+    format            : "Y/m/d",
+    okText            : "OK",
+    cancelText        : "キャンセル",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "ページ",
+    afterPageText  : "/ {0}",
+    firstText      : "最初のページ",
+    prevText       : "前のページ",
+    nextText       : "次のページ",
+    lastText       : "最後のページ",
+    refreshText    : "更新",
+    displayMsg     : "{2} 件中 {0} - {1} を表示",
+    emptyMsg       : '表示するデータがありません。'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "フィールドの値が不正です。";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "このフィールドの最小値は {0} です。",
+    maxLengthText : "このフィールドの最大値は {0} です。",
+    blankText     : "必須項目です。",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ".",
+    decimalPrecision : 2,
+    minText : "このフィールドの最小値は {0} です。",
+    maxText : "このフィールドの最大値は {0} です。",
+    nanText : "{0} は数値ではありません。"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "無効",
+    disabledDatesText : "無効",
+    minText           : "このフィールドの日付は、 {0} 以降の日付に設定してください。",
+    maxText           : "このフィールドの日付は、 {0} 以前の日付に設定してください。",
+    invalidText       : "{0} は間違った日付入力です。 - 入力形式は「{1}」です。",
+    format            : "Y/m/d",
+    altFormats        : "y/m/d|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "読み込み中...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'メールアドレスを"user@example.com"の形式で入力してください。',
+    urlText      : 'URLを"http:/'+'/www.example.com"の形式で入力してください。',
+    alphaText    : '半角英字と"_"のみです。',
+    alphanumText : '半角英数と"_"のみです。'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'リンクのURLを入力してください:',
+    buttonTips : {
+      bold : {
+        title: '太字 (コントロール+B)',
+        text: '選択テキストを太字にします。',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: '斜体 (コントロール+I)',
+        text: '選択テキストを斜体にします。',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: '下線 (コントロール+U)',
+        text: '選択テキストに下線を引きます。',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: '文字を大きく',
+        text: 'フォントサイズを大きくします。',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: '文字を小さく',
+        text: 'フォントサイズを小さくします。',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: '文字のハイライト',
+        text: '選択テキストの背景色を変更します。',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: '文字の色',
+        text: '選択テキストの色を変更します。',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: '左揃え',
+        text: 'テキストを左揃えにします。',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: '中央揃え',
+        text: 'テキストを中央揃えにします。',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: '右揃え',
+        text: 'テキストを右揃えにします。',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: '番号なし箇条書き',
+        text: '番号なし箇条書きを開始します。',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: '番号付き箇条書き',
+        text: '番号付き箇条書きを開始します。',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'ハイパーリンク',
+        text: '選択テキストをハイパーリンクにします。',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'ソース編集',
+        text: 'ソース編集モードに切り替えます。',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "昇順",
+    sortDescText : "降順",
+    columnsText  : "カラム"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(なし)',
+    groupByText    : 'このカラムでグルーピング',
+    showGroupsText : 'グルーピング'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "名称",
+    valueText  : "値",
+    dateFormat : "Y/m/d"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "ドラッグするとリサイズできます。",
+    collapsibleSplitTip : "ドラッグでリサイズ。 ダブルクリックで隠す。"
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "このフィールドの時刻は、 {0} 以降の時刻に設定してください。",
+    maxText : "このフィールドの時刻は、 {0} 以前の時刻に設定してください。",
+    invalidText : "{0} は間違った時刻入力です。",
+    format : "g:i A",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "このグループから最低１つのアイテムを選択しなければなりません。"
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : "このグループから１つのアイテムを選択しなければなりません。"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ko.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ko.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ko.js	(revision 625)
@@ -0,0 +1,267 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Korean Translations By nicetip
+ * 05 September 2007
+ * Modify by techbug / 25 February 2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">로딩중...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} 개가 선택되었습니다.";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "닫기";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "올바른 값이 아닙니다.";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "로딩중...";
+}
+
+Date.monthNames = [
+   "1월",
+   "2월",
+   "3월",
+   "4월",
+   "5월",
+   "6월",
+   "7월",
+   "8월",
+   "9월",
+   "10월",
+   "11월",
+   "12월"
+];
+
+Date.dayNames = [
+   "일",
+   "월",
+   "화",
+   "수",
+   "목",
+   "금",
+   "토"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "확인",
+      cancel : "취소",
+      yes    : "예",
+      no     : "아니오"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "m/d/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "오늘",
+      minText           : "최소 날짜범위를 넘었습니다.",
+      maxText           : "최대 날짜범위를 넘었습니다.",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,
+      nextText          : '다음달(컨트롤키+오른쪽 화살표)',
+      prevText          : '이전달 (컨트롤키+왼족 화살표)',
+      monthYearText     : '월을 선택해주세요. (컨트롤키+위/아래 화살표)',
+      todayTip          : "{0} (스페이스바)",
+      format            : "m/d/y",
+      okText            : "확인",
+      cancelText        : "취소",
+      startDay          : 0
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "페이지",
+      afterPageText  : "/ {0}",
+      firstText      : "첫 페이지",
+      prevText       : "이전 페이지",
+      nextText       : "다음 페이지",
+      lastText       : "마지막 페이지",
+      refreshText    : "새로고침",
+      displayMsg     : "전체 {2} 중 {0} - {1}",
+      emptyMsg       : '표시할 데이터가 없습니다.'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "최소길이는 {0}입니다.",
+      maxLengthText : "최대길이는 {0}입니다.",
+      blankText     : "값을 입력해주세요.",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "최소값은 {0}입니다.",
+      maxText : "최대값은 {0}입니다.",
+      nanText : "{0}는 올바른 숫자가 아닙니다."
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "비활성",
+      disabledDatesText : "비활성",
+      minText           : "{0}일 이후여야 합니다.",
+      maxText           : "{0}일 이전이어야 합니다.",
+      invalidText       : "{0}는 올바른 날짜형식이 아닙니다. - 다음과 같은 형식이어야 합니다. {1}",
+      format            : "m/d/y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "로딩중...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : '이메일 주소 형식에 맞게 입력해야합니다. (예: "user@example.com")',
+      urlText      : 'URL 형식에 맞게 입력해야합니다. (예: "http:/'+'/www.example.com")',
+      alphaText    : '영문, 밑줄(_)만 입력할 수 있습니다.',
+      alphanumText : '영문, 숫자, 밑줄(_)만 입력할 수 있습니다.'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+   createLinkText : 'URL을 입력해주세요:',
+   buttonTips : {
+            bold : {
+               title: '굵게 (Ctrl+B)',
+               text: '선택한 텍스트를 굵게 표시합니다.',
+               cls: 'x-html-editor-tip'
+            },
+            italic : {
+               title: '기울임꼴 (Ctrl+I)',
+               text: '선택한 텍스트를 기울임꼴로 표시합니다.',
+               cls: 'x-html-editor-tip'
+            },
+            underline : {
+               title: '밑줄 (Ctrl+U)',
+               text: '선택한 텍스트에 밑줄을 표시합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           increasefontsize : {
+               title: '글꼴크기 늘림',
+               text: '글꼴 크기를 크게 합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           decreasefontsize : {
+               title: '글꼴크기 줄임',
+               text: '글꼴 크기를 작게 합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           backcolor : {
+               title: '텍스트 강조 색',
+               text: '선택한 텍스트의 배경색을 변경합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           forecolor : {
+               title: '글꼴색',
+               text: '선택한 텍스트의 색을 변경합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyleft : {
+               title: '텍스트 왼쪽 맞춤',
+               text: '왼쪽에 텍스트를 맞춥니다.',
+               cls: 'x-html-editor-tip'
+           },
+           justifycenter : {
+               title: '가운데 맞춤',
+               text: '가운데에 텍스트를 맞춥니다.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyright : {
+               title: '텍스트 오른쪽 맞춤',
+               text: '오른쪽에 텍스트를 맞춥니다.',
+               cls: 'x-html-editor-tip'
+           },
+           insertunorderedlist : {
+               title: '글머리 기호',
+               text: '글머리 기호 목록을 시작합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           insertorderedlist : {
+               title: '번호 매기기',
+               text: '번호 매기기 목록을 시작합니다.',
+               cls: 'x-html-editor-tip'
+           },
+           createlink : {
+               title: '하이퍼링크',
+               text: '선택한 텍스트에 하이퍼링크를 만듭니다.',
+               cls: 'x-html-editor-tip'
+           },
+           sourceedit : {
+               title: '소스편집',
+               text: '소스편집 모드로 변환합니다.',
+               cls: 'x-html-editor-tip'
+           }
+        }
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "오름차순 정렬",
+      sortDescText : "내림차순 정렬",
+      lockText     : "칼럼 잠금",
+      unlockText   : "칼럼 잠금해제",
+      columnsText  : "칼럼 목록"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(None)',
+    groupByText    : '현재 필드로 그룹핑합니다.',
+    showGroupsText : '그룹으로 보여주기'
+
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "항목",
+      valueText  : "값",
+      dateFormat : "m/j/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "크기변경을 위해 드래그하세요.",
+      collapsibleSplitTip : "크기변경을 위해 드래그, 숨기기 위해 더블클릭 하세요."
+   });
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lt.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lt.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lt.js	(revision 625)
@@ -0,0 +1,333 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Lithuanian Translations (UTF-8)
+ * Vladas Saulis (vladas at prodata dot lt),  03-29-2009
+ * Vladas Saulis (vladas at prodata dot lt),  10-18-2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Kraunasi...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = "";
+}
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} pažymėtų eilučių";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Uždaryti šią užsklandą";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Šio lauko reikšmė neteisinga";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Kraunasi...";
+}
+
+Date.monthNames = [
+  "Sausis",
+  "Vasaris",
+  "Kovas",
+  "Balandis",
+  "Gegužė",
+  "Birželis",
+  "Liepa",
+  "Rugpjūtis",
+  "Rugsėjis",
+  "Spalis",
+  "Lapkritis",
+  "Gruodis"
+];
+
+Date.getShortMonthName = function(month) {
+    // Uncommons
+    if (month == 7) return "Rgp";
+    if (month == 8) return "Rgs";
+    if (month == 11) return "Grd";
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Sau : 0,
+  Vas : 1,
+  Kov : 2,
+  Bal : 3,
+  Geg : 4,
+  Bir : 5,
+  Lie : 6,
+  Rgp : 7,
+  Rgs : 8,
+  Spa : 9,
+  Lap : 10,
+  Grd : 11
+};
+
+Date.getMonthNumber = function(name) {
+
+    // Some uncommons
+    if (name == "Rugpjūtis") return 7;
+    if (name == "Rugsėjis") return 8;
+    if (name == "Gruodis") return 11;
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Sekmadienis",
+  "Pirmadienis",
+  "Antradienis",
+  "Trečiadienis",
+  "Ketvirtadienis",
+  "Penktadienis",
+  "Šeštadienis"
+];
+
+Date.parseCodes.S.s = "(?:as|as|as|as)";
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "Gerai",
+    cancel : "Atsisakyti",
+    yes    : "Taip",
+    no     : "Ne"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "Y-m-d");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Šiandien",
+    minText           : "Ši data yra mažesnė už leistiną",
+    maxText           : "Ši data yra didesnė už leistiną",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Kitas mėnuo (Control+Right)',
+    prevText          : 'Ankstesnis mėnuo (Control+Left)',
+    monthYearText     : 'Pasirinkti mėnesį (Control+Up/Down perėjimui tarp metų)',
+    todayTip          : "{0} (Tarpas)",
+    format            : "y-m-d",
+    okText            : "&#160;Gerai&#160;",
+    cancelText        : "Atsisaktyi",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Puslapis",
+    afterPageText  : "iš {0}",
+    firstText      : "Pirmas puslapis",
+    prevText       : "Ankstesnis pusl.",
+    nextText       : "Kitas puslapis",
+    lastText       : "Pakutinis pusl.",
+    refreshText    : "Atnaujinti",
+    displayMsg     : "Rodomi įrašai {0} - {1} iš {2}",
+    emptyMsg       : 'Nėra duomenų'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Minimalus šio lauko ilgis yra {0}",
+    maxLengthText : "Maksimalus šio lauko ilgis yra {0}",
+    blankText     : "Šis laukas yra privalomas",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Minimalus šio lauko ilgis yra {0}",
+    maxText : "Maksimalus šio lauko ilgis yra {0}",
+    nanText : "{0} yra neleistina reikšmė"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Neprieinama",
+    disabledDatesText : "Neprieinama",
+    minText           : "Šiame lauke data turi būti didesnė už {0}",
+    maxText           : "Šiame lauke data turi būti mažesnėė už {0}",
+    invalidText       : "{0} yra neteisinga data - ji turi būti įvesta formatu {1}",
+    format            : "y-m-d",
+    altFormats        : "y-m-d|y/m/d|Y-m-d|m/d|m-d|md|ymd|Ymd|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Kraunasi...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Šiame lauke turi būti el.pašto adresas formatu "user@example.com"',
+    urlText      : 'Šiame lauke turi būti nuoroda (URL) formatu "http:/'+'/www.example.com"',
+    alphaText    : 'Šiame lauke gali būti tik raidės ir ženklas "_"',
+    alphanumText : 'Šiame lauke gali būti tik raidės, skaičiai ir ženklas "_"'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Įveskite URL šiai nuorodai:',
+    buttonTips : {
+      bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Teksto paryškinimas.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Kursyvinis tekstas.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Underline (Ctrl+U)',
+        text: 'Teksto pabraukimas.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Padidinti šriftą',
+        text: 'Padidinti šrifto dydį.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Sumažinti šriftą',
+        text: 'Sumažinti šrifto dydį.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Nuspalvinti teksto foną',
+        text: 'Pakeisti teksto fono spalvą.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Teksto spalva',
+        text: 'Pakeisti pažymėto teksto spalvą.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Išlyginti kairen',
+        text: 'Išlyginti tekstą į kairę.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centruoti tekstą',
+        text: 'Centruoti tektą redaktoriaus lange.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Išlyginti dešinėn',
+        text: 'Išlyginti tekstą į dešinę.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Paprastas sąrašas',
+        text: 'Pradėti neorganizuotą sąrašą.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numeruotas sąrašas',
+        text: 'Pradėti numeruotą sąrašą.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Nuoroda',
+        text: 'Padaryti pažymėta tekstą nuoroda.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Išeities tekstas',
+        text: 'Persijungti į išeities teksto koregavimo režimą.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.form.BasicForm){
+  Ext.form.BasicForm.prototype.waitTitle = "Palaukite...";
+}
+  
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Rūšiuoti didėjančia tvarka",
+    sortDescText : "Rūšiuoti mažėjančia tvarka",
+    lockText     : "Užfiksuoti stulpelį",
+    unlockText   : "Atlaisvinti stulpelį",
+    columnsText  : "Stulpeliai"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Nėra)',
+    groupByText    : 'Grupuoti pagal šį lauką',
+    showGroupsText : 'Rodyti grupėse'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Pavadinimas",
+    valueText  : "Reikšmė",
+    dateFormat : "Y-m-d"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Patraukite juostelę.",
+    collapsibleSplitTip : "Patraukite juostelę arba Paspauskite dvigubai kad paslėpti."
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText : "Laikas turi buti lygus arba vėlesnis už {0}",
+    maxText : "Laikas turi būti lygus arba ankstesnis už {0}",
+    invalidText : "{0} yra neteisingas laikas",
+    format : "H:i",
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
+  });
+}
+			
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : "Jūs turite padaryti bent vieną pasirinkimą šioje grupėje"
+  });
+}
+	
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+      blankText : "Jūs turite padaryti bent vieną pasirinkimą šioje grupėje"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lv.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lv.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-lv.js	(revision 625)
@@ -0,0 +1,176 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Latvian Translations
+ * By salix 17 April 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Notiek ielāde...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} iezīmētu rindu";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Aizver šo zīmni";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Vērtība šajā laukā nav pareiza";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Ielādē...";
+}
+
+Date.monthNames = [
+   "Janvāris",
+   "Februāris",
+   "Marts",
+   "Aprīlis",
+   "Maijs",
+   "Jūnijs",
+   "Jūlijs",
+   "Augusts",
+   "Septembris",
+   "Oktobris",
+   "Novembris",
+   "Decembris"
+];
+
+Date.dayNames = [
+   "Svētdiena",
+   "Pirmdiena",
+   "Otrdiena",
+   "Trešdiena",
+   "Ceturtdiena",
+   "Piektdiena",
+   "Sestdiena"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "Labi",
+      cancel : "Atcelt",
+      yes    : "Jā",
+      no     : "Nē"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Šodiena",
+      minText           : "Norādītais datums ir mazāks par minimālo datumu",
+      maxText           : "Norādītais datums ir lielāks par maksimālo datumu",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Nākamais mēnesis (Control+pa labi)',
+      prevText          : 'Iepriekšējais mēnesis (Control+pa kreisi)',
+      monthYearText     : 'Mēneša izvēle (Control+uz augšu/uz leju lai pārslēgtu gadus)',
+      todayTip          : "{0} (Tukšumzīme)",
+      format            : "d.m.Y",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Lapa",
+      afterPageText  : "no {0}",
+      firstText      : "Pirmā lapa",
+      prevText       : "iepriekšējā lapa",
+      nextText       : "Nākamā lapa",
+      lastText       : "Pēdējā lapa",
+      refreshText    : "Atsvaidzināt",
+      displayMsg     : "Rāda no {0} līdz {1} ierakstiem, kopā {2}",
+      emptyMsg       : 'Nav datu, ko parādīt'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimālais garums šim laukam ir {0}",
+      maxLengthText : "Maksimālais garums šim laukam ir {0}",
+      blankText     : "Šis ir obligāts lauks",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minimālais garums šim laukam ir  {0}",
+      maxText : "Maksimālais garums šim laukam ir  {0}",
+      nanText : "{0} nav pareizs skaitlis"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Atspējots",
+      disabledDatesText : "Atspējots",
+      minText           : "Datumam šajā laukā jābūt lielākam kā {0}",
+      maxText           : "Datumam šajā laukā jābūt mazākam kā {0}",
+      invalidText       : "{0} nav pareizs datums - tam jābūt šādā formātā: {1}",
+      format            : "d.m.Y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Ielādē...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Šajā laukā jāieraksta e-pasta adrese formātā "lietotās@domēns.lv"',
+      urlText      : 'Šajā laukā jāieraksta URL formātā "http:/'+'/www.domēns.lv"',
+      alphaText    : 'Šis lauks drīkst saturēt tikai burtus un _ zīmi',
+      alphanumText : 'Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Kārtot pieaugošā secībā",
+      sortDescText : "Kārtot dilstošā secībā",
+      lockText     : "Noslēgt kolonnu",
+      unlockText   : "Atslēgt kolonnu",
+      columnsText  : "Kolonnas"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Nosaukums",
+      valueText  : "Vērtība",
+      dateFormat : "j.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Velc, lai mainītu izmēru.",
+      collapsibleSplitTip : "Velc, lai mainītu izmēru. Dubultklikšķis noslēpj apgabalu."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-mk.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-mk.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-mk.js	(revision 625)
@@ -0,0 +1,176 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Macedonia translation
+ * By PetarD petar.dimitrijevic@vorteksed.com.mk (utf8 encoding)
+ * 23 April 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Вчитувам...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} избрани редици";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Затвори tab";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Вредноста во ова поле е невалидна";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Вчитувам...";
+}
+
+Date.monthNames = [
+   "Јануари",
+   "Февруари",
+   "Март",
+   "Април",
+   "Мај",
+   "Јуни",
+   "Јули",
+   "Август",
+   "Септември",
+   "Октомври",
+   "Ноември",
+   "Декември"
+];
+
+Date.dayNames = [
+   "Недела",
+   "Понеделник",
+   "Вторник",
+   "Среда",
+   "Четврток",
+   "Петок",
+   "Сабота"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "Потврди",
+      cancel : "Поништи",
+      yes    : "Да",
+      no     : "Не"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Денеска",
+      minText           : "Овој датум е пред најмалиот датум",
+      maxText           : "Овој датум е пред најголемиот датум",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Следен месец (Control+Стрелка десно)',
+      prevText          : 'Претходен месец (Control+Стрелка лево)',
+      monthYearText     : 'Изберете месец (Control+Стрелка горе/Стрелка десно за менување година)',
+      todayTip          : "{0} (Spacebar)",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Страница",
+      afterPageText  : "од {0}",
+      firstText      : "Прва Страница",
+      prevText       : "Претходна Страница",
+      nextText       : "Следна Страница",
+      lastText       : "Последна Страница",
+      refreshText    : "Освежи",
+      displayMsg     : "Прикажувам {0} - {1} од {2}",
+      emptyMsg       : 'Нема податоци за приказ'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Минималната должина за ова поле е {0}",
+      maxLengthText : "Максималната должина за ова поле е {0}",
+      blankText     : "Податоците во ова поле се потребни",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Минималната вредност за ова поле е {0}",
+      maxText : "Максималната вредност за ова поле е {0}",
+      nanText : "{0} не е валиден број"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Неактивно",
+      disabledDatesText : "Неактивно",
+      minText           : "Датумот во ова поле мора да биде пред {0}",
+      maxText           : "Датумот во ова поле мора да биде по {0}",
+      invalidText       : "{0} не е валиден датум - мора да биде во формат {1}",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Вчитувам...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ова поле треба да биде e-mail адреса во формат "user@example.com"',
+      urlText      : 'Ова поле треба да биде URL во формат "http:/'+'/www.example.com"',
+      alphaText    : 'Ова поле треба да содржи само букви и _',
+      alphanumText : 'Ова поле треба да содржи само букви, бројки и _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Сортирај Растечки",
+      sortDescText : "Сортирај Опаѓачки",
+      lockText     : "Заклучи Колона",
+      unlockText   : "Отклучи колона",
+      columnsText  : "Колони"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Име",
+      valueText  : "Вредност",
+      dateFormat : "m.d.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Повлечете за менување на големината.",
+      collapsibleSplitTip : "Повлечете за менување на големината. Дупли клик за криење."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-nl.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-nl.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-nl.js	(revision 625)
@@ -0,0 +1,323 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * Dutch Translations
+ * by Ido Sebastiaan Bas van Oostveen (12 Oct 2007)
+ * updated to 2.2 by Condor (8 Aug 2008)
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Bezig met laden...</div>';
+
+if(Ext.DataView){
+  Ext.DataView.prototype.emptyText = '';
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = '{0} geselecteerde rij(en)';
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = 'Bezig met laden...';
+}
+
+Date.monthNames = [
+  'januari',
+  'februari',
+  'maart',
+  'april',
+  'mei',
+  'juni',
+  'juli',
+  'augustus',
+  'september',
+  'oktober',
+  'november',
+  'december'
+];
+
+Date.getShortMonthName = function(month) {
+  if (month == 2) {
+    return 'mrt';
+  }
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  jan: 0,
+  feb: 1,
+  mrt: 2,
+  apr: 3,
+  mei: 4,
+  jun: 5,
+  jul: 6,
+  aug: 7,
+  sep: 8,
+  okt: 9,
+  nov: 10,
+  dec: 11
+};
+
+Date.getMonthNumber = function(name) {
+  var sname = name.substring(0, 3).toLowerCase();
+  if (sname == 'maa') {
+    return 2;
+  }
+  return Date.monthNumbers[sname];
+};
+
+Date.dayNames = [
+  'zondag',
+  'maandag',
+  'dinsdag',
+  'woensdag',
+  'donderdag',
+  'vrijdag',
+  'zaterdag'
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+Date.parseCodes.S.s = "(?:ste|e)";
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok: 'OK',
+    cancel: 'Annuleren',
+    yes: 'Ja',
+    no: 'Nee'
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if (!v) return '';
+    if (!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || 'j-m-y');
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText: 'Vandaag',
+    minText: 'Deze datum is eerder dan de minimale datum',
+    maxText: 'Deze datum is later dan de maximale datum',
+    disabledDaysText: '',
+    disabledDatesText: '',
+    monthNames: Date.monthNames,
+    dayNames: Date.dayNames,
+    nextText: 'Volgende maand (Ctrl+rechts)',
+    prevText: 'Vorige maand (Ctrl+links)',
+    monthYearText: 'Kies een maand (Ctrl+omhoog/omlaag volgend/vorig jaar)',
+    todayTip: '{0} (spatie)',
+    format: 'j-m-y',
+    okText: '&#160;OK&#160;',
+    cancelText: 'Annuleren',
+    startDay: 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText: 'Pagina',
+    afterPageText: 'van {0}',
+    firstText: 'Eerste pagina',
+    prevText: 'Vorige pagina',
+    nextText: 'Volgende pagina',
+    lastText: 'Laatste pagina',
+    refreshText: 'Ververs',
+    displayMsg: 'Getoond {0} - {1} van {2}',
+    emptyMsg: 'Geen gegevens om weer te geven'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = 'De waarde van dit veld is ongeldig';
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText: 'De minimale lengte van dit veld is {0}',
+    maxLengthText: 'De maximale lengte van dit veld is {0}',
+    blankText: 'Dit veld is verplicht',
+    regexText: '',
+    emptyText: null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    decimalSeparator : ",",
+    decimalPrecision : 2,
+    minText: 'De minimale waarde van dit veld is {0}',
+    maxText: 'De maximale waarde van dit veld is {0}',
+    nanText: '{0} is geen geldig getal'
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText: 'Uitgeschakeld',
+    disabledDatesText: 'Uitgeschakeld',
+    minText: 'De datum in dit veld moet na {0} liggen',
+    maxText: 'De datum in dit veld moet voor {0} liggen',
+    invalidText: '{0} is geen geldige datum - formaat voor datum is {1}',
+    format: 'j-m-y',
+    altFormats: 'd/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d'
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText: 'Bezig met laden...',
+    valueNotFoundText: undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText: 'Dit veld moet een e-mail adres bevatten in het formaat "gebruiker@domein.nl"',
+    urlText: 'Dit veld moet een URL bevatten in het formaat "http:/'+'/www.domein.nl"',
+    alphaText: 'Dit veld mag alleen letters en _ bevatten',
+    alphanumText: 'Dit veld mag alleen letters, cijfers en _ bevatten'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText: 'Vul hier de URL voor de hyperlink in:',
+    buttonTips: {
+      bold: {
+        title: 'Vet (Ctrl+B)',
+        text: 'Maak de geselecteerde tekst vet.',
+        cls: 'x-html-editor-tip'
+      },
+      italic: {
+        title: 'Cursief (Ctrl+I)',
+        text: 'Maak de geselecteerde tekst cursief.',
+        cls: 'x-html-editor-tip'
+      },
+      underline: {
+        title: 'Onderstrepen (Ctrl+U)',
+        text: 'Onderstreep de geselecteerde tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize: {
+        title: 'Tekst vergroten',
+        text: 'Vergroot het lettertype.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize: {
+        title: 'Tekst verkleinen',
+        text: 'Verklein het lettertype.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor: {
+        title: 'Tekst achtergrondkleur',
+        text: 'Verander de achtergrondkleur van de geselecteerde tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor: {
+        title: 'Tekst kleur',
+        text: 'Verander de kleur van de geselecteerde tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft: {
+        title: 'Tekst links uitlijnen',
+        text: 'Lijn de tekst links uit.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter: {
+        title: 'Tekst centreren',
+        text: 'Centreer de tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright: {
+        title: 'Tekst rechts uitlijnen',
+        text: 'Lijn de tekst rechts uit.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist: {
+        title: 'Opsommingstekens',
+        text: 'Begin een ongenummerde lijst.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist: {
+        title: 'Genummerde lijst',
+        text: 'Begin een genummerde lijst.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink: {
+        title: 'Hyperlink',
+        text: 'Maak van de geselecteerde tekst een hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit: {
+        title: 'Bron aanpassen',
+        text: 'Schakel modus over naar bron aanpassen.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText: 'Sorteer oplopend',
+    sortDescText: 'Sorteer aflopend',
+    columnsText: 'Kolommen'
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+  emptyGroupText: '(Geen)',
+  groupByText: 'Dit veld groeperen',
+  showGroupsText: 'Toon in groepen'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText: 'Naam',
+    valueText: 'Waarde',
+    dateFormat: 'j-m-Y'
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip: 'Sleep om grootte aan te passen.',
+    collapsibleSplitTip: 'Sleep om grootte aan te passen. Dubbel klikken om te verbergen.'
+  });
+}
+
+if(Ext.form.TimeField){
+  Ext.apply(Ext.form.TimeField.prototype, {
+    minText: 'De tijd in dit veld moet op of na {0} liggen',
+    maxText: 'De tijd in dit veld moet op of voor {0} liggen',
+    invalidText: '{0} is geen geldig tijdstip',
+    format: 'G:i',
+    altFormats: 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H'
+  });
+}
+
+if(Ext.form.CheckboxGroup){
+  Ext.apply(Ext.form.CheckboxGroup.prototype, {
+    blankText : 'Selecteer minimaal een element in deze groep'
+  });
+}
+
+if(Ext.form.RadioGroup){
+  Ext.apply(Ext.form.RadioGroup.prototype, {
+    blankText : 'Selecteer een element in deze groep'
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NB.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NB.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NB.js	(revision 625)
@@ -0,0 +1,294 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ *
+ * Norwegian translation (Bokmål: no-NB)
+ * By Tore Kjørsvik 21-January-2008
+ *  
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Laster...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} markert(e) rad(er)";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Lukk denne fanen";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Verdien i dette feltet er ugyldig";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Laster...";
+}
+
+Date.monthNames = [
+  "Januar",
+  "Februar",
+  "Mars",
+  "April",
+  "Mai",
+  "Juni",
+  "Juli",
+  "August",
+  "September",
+  "Oktober",
+  "November",
+  "Desember"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Jan : 0,
+  Feb : 1,
+  Mar : 2,
+  Apr : 3,
+  Mai : 4,
+  Jun : 5,
+  Jul : 6,
+  Aug : 7,
+  Sep : 8,
+  Okt : 9,
+  Nov : 10,
+  Des : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Søndag",
+  "Mandag",
+  "Tirsdag",
+  "Onsdag",
+  "Torsdag",
+  "Fredag",
+  "Lørdag"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Avbryt",
+    yes    : "Ja",
+    no     : "Nei"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d.m.Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "I dag",
+    minText           : "Denne datoen er før tidligste tillatte dato",
+    maxText           : "Denne datoen er etter seneste tillatte dato",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames	      : Date.monthNames,
+    dayNames		      : Date.dayNames,
+    nextText          : 'Neste måned (Control+Pil Høyre)',
+    prevText          : 'Forrige måned (Control+Pil Venstre)',
+    monthYearText     : 'Velg en måned (Control+Pil Opp/Ned for å skifte år)',
+    todayTip          : "{0} (Mellomrom)",
+    format            : "d.m.y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Avbryt",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Side",
+    afterPageText  : "av {0}",
+    firstText      : "Første side",
+    prevText       : "Forrige side",
+    nextText       : "Neste side",
+    lastText       : "Siste side",
+    refreshText    : "Oppdater",
+    displayMsg     : "Viser {0} - {1} av {2}",
+    emptyMsg       : 'Ingen data å vise'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Den minste lengden for dette feltet er {0}",
+    maxLengthText : "Den største lengden for dette feltet er {0}",
+    blankText     : "Dette feltet er påkrevd",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Den minste verdien for dette feltet er {0}",
+    maxText : "Den største verdien for dette feltet er {0}",
+    nanText : "{0} er ikke et gyldig nummer"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Deaktivert",
+    disabledDatesText : "Deaktivert",
+    minText           : "Datoen i dette feltet må være etter {0}",
+    maxText           : "Datoen i dette feltet må være før {0}",
+    invalidText       : "{0} er ikke en gyldig dato - den må være på formatet {1}",
+    format            : "d.m.y",
+    altFormats        : "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Laster...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Dette feltet skal være en epost adresse på formatet "bruker@domene.no"',
+      urlText      : 'Dette feltet skal være en link (URL) på formatet "http:/'+'/www.domene.no"',
+      alphaText    : 'Dette feltet skal kun inneholde bokstaver og _',
+      alphanumText : 'Dette feltet skal kun inneholde bokstaver, tall og _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Vennligst skriv inn URL for lenken:',
+    buttonTips : {
+      bold : {
+        title: 'Fet (Ctrl+B)',
+        text: 'Gjør den valgte teksten fet.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursiv (Ctrl+I)',
+        text: 'Gjør den valgte teksten kursiv.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Understrek (Ctrl+U)',
+        text: 'Understrek den valgte teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Forstørr tekst',
+        text: 'Gjør fontstørrelse større.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Forminsk tekst',
+        text: 'Gjør fontstørrelse mindre.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Tekst markeringsfarge',
+        text: 'Endre bakgrunnsfarge til den valgte teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Font farge',
+        text: 'Endre farge på den valgte teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Venstrejuster tekst',
+        text: 'Venstrejuster teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Sentrer tekst',
+        text: 'Sentrer teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Høyrejuster tekst',
+        text: 'Høyrejuster teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Punktliste',
+        text: 'Start en punktliste.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Nummerert liste',
+        text: 'Start en nummerert liste.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Lenke',
+        text: 'Gjør den valgte teksten til en lenke.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Rediger kilde',
+        text: 'Bytt til kilderedigeringsvisning.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Sorter stigende",
+    sortDescText : "Sorter synkende",
+    lockText     : "Lås kolonne",
+    unlockText   : "Lås opp kolonne",
+    columnsText  : "Kolonner"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Ingen)',
+    groupByText    : 'Grupper etter dette feltet',
+    showGroupsText : 'Vis i grupper'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Navn",
+    valueText  : "Verdi",
+    dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Dra for å endre størrelse.",
+    collapsibleSplitTip : "Dra for å endre størrelse. Dobbelklikk for å skjule."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NN.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NN.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-no_NN.js	(revision 625)
@@ -0,0 +1,294 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ *
+ * Norwegian translation (Nynorsk: no-NN)
+ * By Tore Kjørsvik 21-January-2008
+ *  
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Lastar...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} markert(e) rad(er)";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Lukk denne fana";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Verdien i dette feltet er ugyldig";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Lastar...";
+}
+
+Date.monthNames = [
+  "Januar",
+  "Februar",
+  "Mars",
+  "April",
+  "Mai",
+  "Juni",
+  "Juli",
+  "August",
+  "September",
+  "Oktober",
+  "November",
+  "Desember"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Jan : 0,
+  Feb : 1,
+  Mar : 2,
+  Apr : 3,
+  Mai : 4,
+  Jun : 5,
+  Jul : 6,
+  Aug : 7,
+  Sep : 8,
+  Okt : 9,
+  Nov : 10,
+  Des : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Søndag",
+  "Måndag",
+  "Tysdag",
+  "Onsdag",
+  "Torsdag",
+  "Fredag",
+  "Laurdag"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Avbryt",
+    yes    : "Ja",
+    no     : "Nei"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d.m.Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "I dag",
+    minText           : "Denne datoen er før tidlegaste tillatne dato",
+    maxText           : "Denne datoen er etter seinaste tillatne dato",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames	      : Date.monthNames,
+    dayNames		      : Date.dayNames,
+    nextText          : 'Neste månad (Control+Pil Høgre)',
+    prevText          : 'Førre månad (Control+Pil Venstre)',
+    monthYearText     : 'Velj ein månad (Control+Pil Opp/Ned for å skifte år)',
+    todayTip          : "{0} (Mellomrom)",
+    format            : "d.m.y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Avbryt",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Side",
+    afterPageText  : "av {0}",
+    firstText      : "Første sida",
+    prevText       : "Førre sida",
+    nextText       : "Neste sida",
+    lastText       : "Siste sida",
+    refreshText    : "Oppdater",
+    displayMsg     : "Viser {0} - {1} av {2}",
+    emptyMsg       : 'Ingen data å vise'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Den minste lengda for dette feltet er {0}",
+    maxLengthText : "Den største lengda for dette feltet er {0}",
+    blankText     : "Dette feltet er påkravd",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Den minste verdien for dette feltet er {0}",
+    maxText : "Den største verdien for dette feltet er {0}",
+    nanText : "{0} er ikkje eit gyldig nummer"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Deaktivert",
+    disabledDatesText : "Deaktivert",
+    minText           : "Datoen i dette feltet må vere etter {0}",
+    maxText           : "Datoen i dette feltet må vere før {0}",
+    invalidText       : "{0} er ikkje ein gyldig dato - han må vere på formatet {1}",
+    format            : "d.m.y",
+    altFormats        : "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Lastar...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Dette feltet skal vere ei epost adresse på formatet "bruker@domene.no"',
+      urlText      : 'Dette feltet skal vere ein link (URL) på formatet "http:/'+'/www.domene.no"',
+      alphaText    : 'Dette feltet skal berre innehalde bokstavar og _',
+      alphanumText : 'Dette feltet skal berre innehalde bokstavar, tal og _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Ver venleg og skriv inn URL for lenken:',
+    buttonTips : {
+      bold : {
+        title: 'Feit (Ctrl+B)',
+        text: 'Gjer den valde teksten feit.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursiv (Ctrl+I)',
+        text: 'Gjer den valde teksten kursiv.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Understrek (Ctrl+U)',
+        text: 'Understrek den valde teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Forstørr tekst',
+        text: 'Gjer fontstorleik større.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Forminsk tekst',
+        text: 'Gjer fontstorleik mindre.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Tekst markeringsfarge',
+        text: 'Endre bakgrunnsfarge til den valde teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Font farge',
+        text: 'Endre farge på den valde teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Venstrejuster tekst',
+        text: 'Venstrejuster teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Sentrer tekst',
+        text: 'Sentrer teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Høgrejuster tekst',
+        text: 'Høgrejuster teksten.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Punktliste',
+        text: 'Start ei punktliste.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Nummerert liste',
+        text: 'Start ei nummerert liste.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Lenke',
+        text: 'Gjer den valde teksten til ei lenke.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Rediger kjelde',
+        text: 'Bytt til kjelderedigeringsvising.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Sorter stigande",
+    sortDescText : "Sorter fallande",
+    lockText     : "Lås kolonne",
+    unlockText   : "Lås opp kolonne",
+    columnsText  : "Kolonner"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Ingen)',
+    groupByText    : 'Grupper etter dette feltet',
+    showGroupsText : 'Vis i grupper'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Namn",
+    valueText  : "Verdi",
+    dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Dra for å endre storleik.",
+    collapsibleSplitTip : "Dra for å endre storleik. Dobbelklikk for å skjule."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pl.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pl.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pl.js	(revision 625)
@@ -0,0 +1,304 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Polish Translations
+ * By vbert 17-April-2007
+ * Updated by mmar 16-November-2007
+ * Encoding: utf-8
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Wczytywanie danych...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} wybrano wiersze(y)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zamknij zakładkę";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Wartość tego pola jest niewłaściwa";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Wczytywanie danych...";
+}
+
+Date.monthNames = [
+    "Styczeń",
+    "Luty",
+    "Marzec",
+    "Kwiecień",
+    "Maj",
+    "Czerwiec",
+    "Lipiec",
+    "Sierpień",
+    "Wrzesień",
+    "Październik",
+    "Listopad",
+    "Grudzień"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Sty : 0,
+  Lut : 1,
+  Mar : 2,
+  Kwi : 3,
+  Maj : 4,
+  Cze : 5,
+  Lip : 6,
+  Sie : 7,
+  Wrz : 8,
+  Paź : 9,
+  Lis : 10,
+  Gru : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+    "Niedziela",
+    "Poniedziałek",
+    "Wtorek",
+    "Środa",
+    "Czwartek",
+    "Piątek",
+    "Sobota"
+];
+
+Date.getShortDayName = function(day) {
+	switch(day) {
+		case 0: return 'ndz';
+		case 1: return 'pon';
+		case 2: return 'wt';
+		case 3: return 'śr';
+		case 4: return 'czw';
+		case 5: return 'pt';				
+		case 6: return 'sob';
+                default: return '';
+	}
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Anuluj",
+      yes    : "Tak",
+      no     : "Nie"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "Y-m-d");
+   };
+}
+
+if(Ext.DatePicker){
+	Ext.apply(Ext.DatePicker.prototype, {
+		startDay			: 1,
+		todayText			: "Dzisiaj",
+		minText				: "Data jest wcześniejsza od daty minimalnej",
+		maxText				: "Data jest późniejsza od daty maksymalnej",
+		disabledDaysText	: "",
+		disabledDatesText	: "",
+		monthNames			: Date.monthNames,
+		dayNames			: Date.dayNames,
+		nextText			: "Następny miesiąc (Control+StrzałkaWPrawo)",
+		prevText			: "Poprzedni miesiąc (Control+StrzałkaWLewo)",
+		monthYearText		: "Wybierz miesiąc (Control+Up/Down aby zmienić rok)",
+		todayTip			: "{0} (Spacja)",
+		format				: "Y-m-d",
+		okText            	: "&#160;OK&#160;",
+    	cancelText        	: "Anuluj",
+    	startDay          	: 1
+	});
+}
+
+if(Ext.PagingToolbar){
+	Ext.apply(Ext.PagingToolbar.prototype, {
+		beforePageText	: "Strona",
+		afterPageText	: "z {0}",
+		firstText		: "Pierwsza strona",
+	    prevText		: "Poprzednia strona",
+		nextText		: "Następna strona",
+	    lastText		: "Ostatnia strona",
+		refreshText		: "Odśwież",
+	    displayMsg		: "Wyświetlono {0} - {1} z {2}",
+		emptyMsg		: "Brak danych do wyświetlenia"
+	});
+}
+
+if(Ext.form.TextField){
+	Ext.apply(Ext.form.TextField.prototype, {
+	    minLengthText	: "Minimalna ilość znaków dla tego pola to {0}",
+		maxLengthText	: "Maksymalna ilość znaków dla tego pola to {0}",
+	    blankText		: "To pole jest wymagane",
+		regexText		: "",
+	    emptyText		: null
+	});
+}
+
+if(Ext.form.NumberField){
+	Ext.apply(Ext.form.NumberField.prototype, {
+	    minText	: "Minimalna wartość dla tego pola to {0}",
+	    maxText	: "Maksymalna wartość dla tego pola to {0}",
+		nanText	: "{0} to nie jest właściwa wartość"
+	});
+}
+
+if(Ext.form.DateField){
+	Ext.apply(Ext.form.DateField.prototype, {
+	    disabledDaysText	: "Wyłączony",
+	    disabledDatesText	: "Wyłączony",
+		minText				: "Data w tym polu musi być późniejsza od {0}",
+	    maxText				: "Data w tym polu musi być wcześniejsza od {0}",
+		invalidText			: "{0} to nie jest prawidłowa data - prawidłowy format daty {1}",
+	    format				: "Y-m-d",
+    	altFormats    	    : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+	});
+}
+
+if(Ext.form.ComboBox){
+	Ext.apply(Ext.form.ComboBox.prototype, {
+		loadingText       : "Wczytuję...",
+		valueNotFoundText : undefined
+	});
+}
+
+if(Ext.form.VTypes){
+	Ext.apply(Ext.form.VTypes, {
+	    emailText		: 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"',
+	    urlText			: 'To pole wymaga podania adresu strony www w formacie: "http:/'+'/www.domena.pl"',
+		alphaText		: 'To pole wymaga podania tylko liter i _',
+		alphanumText	: 'To pole wymaga podania tylko liter, cyfr i _'
+	});
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Wprowadź adres URL strony:',
+    buttonTips : {
+      bold : {
+        title: 'Pogrubienie (Ctrl+B)',
+        text: 'Ustaw styl zaznaczonego tekstu na pogrubiony.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Kursywa (Ctrl+I)',
+        text: 'Ustaw styl zaznaczonego tekstu na kursywę.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Podkreślenie (Ctrl+U)',
+        text: 'Podkreśl zaznaczony tekst.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Zwiększ czcionkę',
+        text: 'Zwiększ rozmiar czcionki.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Zmniejsz czcionkę',
+        text: 'Zmniejsz rozmiar czcionki.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Wyróżnienie',
+        text: 'Zmień kolor wyróżnienia zaznaczonego tekstu.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Kolor czcionki',
+        text: 'Zmień kolor zaznaczonego tekstu.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Do lewej',
+        text: 'Wyrównaj tekst do lewej.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Wyśrodkuj',
+        text: 'Wyrównaj tekst do środka.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Do prawej',
+        text: 'Wyrównaj tekst do prawej.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Lista wypunktowana',
+        text: 'Rozpocznij listę wypunktowaną.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Lista numerowana',
+        text: 'Rozpocznij listę numerowaną.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hiperłącze',
+        text: 'Przekształć zaznaczony tekst w hiperłącze.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Edycja źródła',
+        text: 'Przełącz w tryb edycji źródła.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+	Ext.apply(Ext.grid.GridView.prototype, {
+	    sortAscText		: "Sortuj rosnąco",
+	    sortDescText	: "Sortuj malejąco",
+		lockText		: "Zablokuj kolumnę",
+	    unlockText		: "Odblokuj kolumnę",
+		columnsText		: "Kolumny"
+	});
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(None)',
+    groupByText    : 'Grupuj po tym polu',
+    showGroupsText : 'Pokaż w grupach'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+	Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+	    nameText	: "Nazwa",
+	    valueText	: "Wartość",
+		dateFormat	: "Y-m-d"
+	});
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+	Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+	    splitTip			: "Przeciągnij aby zmienić rozmiar.",
+		collapsibleSplitTip	: "Przeciągnij aby zmienić rozmiar. Kliknij dwukrotnie aby ukryć."
+	});
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt.js	(revision 625)
@@ -0,0 +1,260 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Portuguese/Brazil Translation by Weber Souza
+ * 08 April 2007
+ * Updated by Allan Brazute Alves (EthraZa)
+ * 06 September 2007
+ * Adapted to European Portuguese by Helder Batista (hbatista)
+ * 31 January 2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Carregando...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} linha(s) seleccionada(s)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Fechar";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "O valor para este campo &eacute; inv&aacute;lido";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Carregando...";
+}
+
+Date.monthNames = [
+   "Janeiro",
+   "Fevereiro",
+   "Mar&ccedil;o",
+   "Abril",
+   "Maio",
+   "Junho",
+   "Julho",
+   "Agosto",
+   "Setembro",
+   "Outubro",
+   "Novembro",
+   "Dezembro"
+];
+
+Date.dayNames = [
+   "Domingo",
+   "Segunda",
+   "Ter&ccedil;a",
+   "Quarta",
+   "Quinta",
+   "Sexta",
+   "S&aacute;bado"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Cancelar",
+      yes    : "Sim",
+      no     : "N&atilde;o"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Hoje",
+      minText           : "Esta data &eacute; anterior &agrave; menor data",
+      maxText           : "Esta data &eacute; posterior &agrave; maior data",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,
+      nextText          : 'Pr&oacute;ximo M&ecirc;s (Control+Direita)',
+      prevText          : 'M&ecirc;s Anterior (Control+Esquerda)',
+      monthYearText     : 'Escolha um M&ecirc;s (Control+Cima/Baixo para mover entre os anos)',
+      todayTip          : "{0} (Espa&ccedil;o)",
+      format            : "d/m/Y",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Cancelar",
+      startDay          : 0
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "P&aacute;gina",
+      afterPageText  : "de {0}",
+      firstText      : "Primeira P&aacute;gina",
+      prevText       : "P&aacute;gina Anterior",
+      nextText       : "Pr&oacute;xima P&aacute;gina",
+      lastText       : "&Uacute;ltima P&aacute;gina",
+      refreshText    : "Atualizar",
+      displayMsg     : "<b>{0} &agrave; {1} de {2} registo(s)</b>",
+      emptyMsg       : 'Sem registos para exibir'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "O tamanho m&iacute;nimo para este campo &eacute; {0}",
+      maxLengthText : "O tamanho m&aacute;ximo para este campo &eacute; {0}",
+      blankText     : "Este campo &eacute; obrigat&oacute;rio.",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "O valor m&iacute;nimo para este campo &eacute; {0}",
+      maxText : "O valor m&aacute;ximo para este campo &eacute; {0}",
+      nanText : "{0} n&atilde;o &eacute; um n&uacute;mero v&aacute;lido"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Desabilitado",
+      disabledDatesText : "Desabilitado",
+      minText           : "A data deste campo deve ser posterior a {0}",
+      maxText           : "A data deste campo deve ser anterior a {0}",
+      invalidText       : "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve ser usado o formato {1}",
+      format            : "d/m/Y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Carregando...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Este campo deve ser um endere&ccedil;o de e-mail v&aacute;lido, no formato "utilizador@dominio.com"',
+      urlText      : 'Este campo deve ser um URL no formato "http:/'+'/www.dominio.com"',
+      alphaText    : 'Este campo deve conter apenas letras e _',
+      alphanumText : 'Este campo deve conter apenas letras, n&uacute;meros e _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+	 createLinkText : 'Por favor, entre com o URL do link:',
+	 buttonTips : {
+            bold : {
+               title: 'Negrito (Ctrl+B)',
+               text: 'Deixa o texto seleccionado em negrito.',
+               cls: 'x-html-editor-tip'
+            },
+            italic : {
+               title: 'Italico (Ctrl+I)',
+               text: 'Deixa o texto seleccionado em italico.',
+               cls: 'x-html-editor-tip'
+            },
+            underline : {
+               title: 'Sublinhado (Ctrl+U)',
+               text: 'Sublinha o texto seleccionado.',
+               cls: 'x-html-editor-tip'
+           },
+           increasefontsize : {
+               title: 'Aumentar Texto',
+               text: 'Aumenta o tamanho da fonte.',
+               cls: 'x-html-editor-tip'
+           },
+           decreasefontsize : {
+               title: 'Diminuir Texto',
+               text: 'Diminui o tamanho da fonte.',
+               cls: 'x-html-editor-tip'
+           },
+           backcolor : {
+               title: 'Cor de Fundo',
+               text: 'Muda a cor do fundo do texto seleccionado.',
+               cls: 'x-html-editor-tip'
+           },
+           forecolor : {
+               title: 'Cor da Fonte',
+               text: 'Muda a cor do texto seleccionado.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyleft : {
+               title: 'Alinhar &agrave; Esquerda',
+               text: 'Alinha o texto &agrave; esquerda.',
+               cls: 'x-html-editor-tip'
+           },
+           justifycenter : {
+               title: 'Centrar Texto',
+               text: 'Centra o texto no editor.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyright : {
+               title: 'Alinhar &agrave; Direita',
+               text: 'Alinha o texto &agrave; direita.',
+               cls: 'x-html-editor-tip'
+           },
+           insertunorderedlist : {
+               title: 'Lista com Marcadores',
+               text: 'Inicia uma lista com marcadores.',
+               cls: 'x-html-editor-tip'
+           },
+           insertorderedlist : {
+               title: 'Lista Numerada',
+               text: 'Inicia uma lista numerada.',
+               cls: 'x-html-editor-tip'
+           },
+           createlink : {
+               title: 'Hyperliga&ccedil;&atilde;o',
+               text: 'Transforma o texto selecionado num hyperlink.',
+               cls: 'x-html-editor-tip'
+           },
+           sourceedit : {
+               title: 'Editar Fonte',
+               text: 'Troca para o modo de edi&ccedil;&atilde;o de c&oacute;digo fonte.',
+               cls: 'x-html-editor-tip'
+           }
+        }
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Ordem Ascendente",
+      sortDescText : "Ordem Descendente",
+      lockText     : "Bloquear Coluna",
+      unlockText   : "Desbloquear Coluna",
+      columnsText  : "Colunas"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Nome",
+      valueText  : "Valor",
+      dateFormat : "d/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Arraste para redimensionar.",
+      collapsibleSplitTip : "Arraste para redimensionar. Duplo clique para esconder."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_BR.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_BR.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_BR.js	(revision 625)
@@ -0,0 +1,302 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Portuguese/Brazil Translation by Weber Souza
+ * 08 April 2007
+ * Updated by Allan Brazute Alves (EthraZa)
+ * 06 September 2007
+ * Updated by Leonardo Lima
+ * 05 March 2008
+ * Updated by Juliano Tarini (jtarini)
+ * 22 April 2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Carregando...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} linha(s) selecionada(s)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Fechar";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "O valor para este campo &eacute; inv&aacute;lido";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Carregando...";
+}
+
+Date.monthNames = [
+   "Janeiro",
+   "Fevereiro",
+   "Mar&ccedil;o",
+   "Abril",
+   "Maio",
+   "Junho",
+   "Julho",
+   "Agosto",
+   "Setembro",
+   "Outubro",
+   "Novembro",
+   "Dezembro"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Jan : 0,
+  Fev : 1,
+  Mar : 2,
+  Abr : 3,
+  Mai : 4,
+  Jun : 5,
+  Jul : 6,
+  Ago : 7,
+  Set : 8,
+  Out : 9,
+  Nov : 10,
+  Dez : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Domingo",
+   "Segunda",
+   "Ter&ccedil;a",
+   "Quarta",
+   "Quinta",
+   "Sexta",
+   "S&aacute;bado"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Cancelar",
+      yes    : "Sim",
+      no     : "N&atilde;o"
+   };
+}
+
+if (Ext.util.Format) {
+  Ext.util.Format.date = function(v, format){
+    if (!v) return "";
+    if (!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+  Ext.util.Format.brMoney = 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 '- R$ ' + v.substr(1);
+    }
+    return "R$ " + v;
+  }
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Hoje",
+      minText           : "Esta data &eacute; anterior a menor data",
+      maxText           : "Esta data &eacute; posterior a maior data",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,
+      nextText          : 'Pr&oacute;ximo M&ecirc;s (Control+Direita)',
+      prevText          : 'M&ecirc;s Anterior (Control+Esquerda)',
+      monthYearText     : 'Escolha um M&ecirc;s (Control+Cima/Baixo para mover entre os anos)',
+      todayTip          : "{0} (Espa&ccedil;o)",
+      format            : "d/m/Y",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Cancelar",
+      startDay          : 0
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "P&aacute;gina",
+      afterPageText  : "de {0}",
+      firstText      : "Primeira P&aacute;gina",
+      prevText       : "P&aacute;gina Anterior",
+      nextText       : "Pr&oacute;xima P&aacute;gina",
+      lastText       : "&Uacute;ltima P&aacute;gina",
+      refreshText    : "Atualizar",
+      displayMsg     : "<b>{0} &agrave; {1} de {2} registro(s)</b>",
+      emptyMsg       : 'Sem registros para exibir'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "O tamanho m&iacute;nimo para este campo &eacute; {0}",
+      maxLengthText : "O tamanho m&aacute;ximo para este campo &eacute; {0}",
+      blankText     : "Este campo &eacute; obrigat&oacute;rio.",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "O valor m&iacute;nimo para este campo &eacute; {0}",
+      maxText : "O valor m&aacute;ximo para este campo &eacute; {0}",
+      nanText : "{0} n&atilde;o &eacute; um n&uacute;mero v&aacute;lido"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Desabilitado",
+      disabledDatesText : "Desabilitado",
+      minText           : "A data deste campo deve ser posterior a {0}",
+      maxText           : "A data deste campo deve ser anterior a {0}",
+      invalidText       : "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve ser informado no formato {1}",
+      format            : "d/m/Y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Carregando...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Este campo deve ser um endere&ccedil;o de e-mail v&aacute;lido, no formado "usuario@dominio.com.br"',
+      urlText      : 'Este campo deve ser uma URL no formato "http:/'+'/www.dominio.com.br"',
+      alphaText    : 'Este campo deve conter apenas letras e _',
+      alphanumText : 'Este campo deve conter apenas letras, n&uacute;meros e _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+        createLinkText : 'Porfavor, entre com a URL do link:',
+        buttonTips : {
+            bold : {
+               title: 'Negrito (Ctrl+B)',
+               text: 'Deixa o texto selecionado em negrito.',
+               cls: 'x-html-editor-tip'
+            },
+            italic : {
+               title: 'Italico (Ctrl+I)',
+               text: 'Deixa o texto selecionado em italico.',
+               cls: 'x-html-editor-tip'
+            },
+            underline : {
+               title: 'Sublinhado (Ctrl+U)',
+               text: 'Sublinha o texto selecionado.',
+               cls: 'x-html-editor-tip'
+           },
+           increasefontsize : {
+               title: 'Aumentar Texto',
+               text: 'Aumenta o tamanho da fonte.',
+               cls: 'x-html-editor-tip'
+           },
+           decreasefontsize : {
+               title: 'Diminuir Texto',
+               text: 'Diminui o tamanho da fonte.',
+               cls: 'x-html-editor-tip'
+           },
+           backcolor : {
+               title: 'Cor de Fundo',
+               text: 'Muda a cor do fundo do texto selecionado.',
+               cls: 'x-html-editor-tip'
+           },
+           forecolor : {
+               title: 'Cor da Fonte',
+               text: 'Muda a cor do texto selecionado.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyleft : {
+               title: 'Alinhar &agrave; Esquerda',
+               text: 'Alinha o texto &agrave; esquerda.',
+               cls: 'x-html-editor-tip'
+           },
+           justifycenter : {
+               title: 'Centralizar Texto',
+               text: 'Centraliza o texto no editor.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyright : {
+               title: 'Alinhar &agrave; Direita',
+               text: 'Alinha o texto &agrave; direita.',
+               cls: 'x-html-editor-tip'
+           },
+           insertunorderedlist : {
+               title: 'Lista com Marcadores',
+               text: 'Inicia uma lista com marcadores.',
+               cls: 'x-html-editor-tip'
+           },
+           insertorderedlist : {
+               title: 'Lista Numerada',
+               text: 'Inicia uma lista numerada.',
+               cls: 'x-html-editor-tip'
+           },
+           createlink : {
+               title: 'Hyperliga&ccedil;&atilde;o',
+               text: 'Transforma o texto selecionado em um hyperlink.',
+               cls: 'x-html-editor-tip'
+           },
+           sourceedit : {
+               title: 'Editar Fonte',
+               text: 'Troca para o modo de edi&ccedil;&atilde;o de c&oacute;digo fonte.',
+               cls: 'x-html-editor-tip'
+           }
+        }
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Ordem Ascendente",
+      sortDescText : "Ordem Descendente",
+      lockText     : "Bloquear Coluna",
+      unlockText   : "Desbloquear Coluna",
+      columnsText  : "Colunas"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Nome",
+      valueText  : "Valor",
+      dateFormat : "d/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Arraste para redimensionar.",
+      collapsibleSplitTip : "Arraste para redimensionar. Duplo clique para esconder."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_PT.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_PT.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-pt_PT.js	(revision 625)
@@ -0,0 +1,298 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/**
+ * Ext 2.2.0 - Portuguese/Portugal (pt_PT) Translation
+ * by Nuno Franco da Costa - francodacosta.com
+ * translated from ext-lang-en.js
+ * 11 Nov 2008
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">A carregar...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} linha(s) seleccionada(s)";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Fechar aba";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "A carregar...";
+}
+
+Date.monthNames = [
+  "Janeiro",
+  "Fevereiro",
+  "Mar&ccedil;o",
+  "Abril",
+  "Maio",
+  "Junho",
+  "Julho",
+  "Agosto",
+  "Setembro",
+  "Outubro",
+  "Novembro",
+  "Dezembro"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Domingo",
+  "Segunda",
+  "Ter&ccedil;a",
+  "Quarta",
+  "Quinta",
+  "Sexta",
+  "Sabado"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Cancelar",
+    yes    : "Sim",
+    no     : "N&atilde;o"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "Y/m/d");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Hoje",
+    minText           : "A data &eacute; anterior ao m&iacute;nimo definido",
+    maxText           : "A data &eacute; posterior ao m�ximo definido",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'M&ecirc;s Seguinte (Control+Right)',
+    prevText          : 'M&ecirc;s Anterior (Control+Left)',
+    monthYearText     : 'Escolha um m&ecirc;s (Control+Up/Down ava&ccedil;ar/recuar anos)',
+    todayTip          : "{0} (barra de espa�o)",
+    format            : "y/m/d",
+    okText            : "*OK*",
+    cancelText        : "Cancelar",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "P&aacute;gina",
+    afterPageText  : "de {0}",
+    firstText      : "Primeira P&aacute;gina",
+    prevText       : "P&aacute;gina Anterior",
+    nextText       : "Pr%oacute;xima P&aacute;gina",
+    lastText       : "&Uacute;ltima P&aacute;gina",
+    refreshText    : "Recaregar",
+    displayMsg     : "A mostrar {0} - {1} de {2}",
+    emptyMsg       : 'Sem dados para mostrar'
+  });
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "O valor deste campo &eacute; inv&aacute;lido";
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "O comprimento m&iacute;nimo deste campo &eaute; {0}",
+    maxLengthText : "O comprimento m&aacute;ximo deste campo &eaute; {0}",
+    blankText     : "Este campo &eacute; de preenchimento obrigat&oacute;rio",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "O valor m&iacute;nimo deste campo &eaute; {0}",
+    maxText : "O valor m&aacute;ximo deste campo &eaute; {0}",
+    nanText : "{0} n&atilde;o &eacute; um numero"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Desabilitado",
+    disabledDatesText : "Desabilitado",
+    minText           : "A data deste campo deve ser posterior a {0}",
+    maxText           : "A data deste campo deve ser anterior a {0}",
+    invalidText       : "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve estar no seguinte formato{1}",
+    format            : "y/m/d",
+    altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "A Carregar...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'Este campo deve ser um endere&ccedil;o de email no formato "utilizaor@dominio.com"',
+    urlText      : 'Este campo deve ser um URL no formato "http:/'+'/www.dominio.com"',
+    alphaText    : 'Este campo deve conter apenas letras e _',
+    alphanumText : 'Este campo deve conter apenas letras, numeros e _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Indique o endere&ccedil;o do link:',
+    buttonTips : {
+      bold : {
+        title: 'Negrito (Ctrl+B)',
+        text: 'Transforma o texto em Negrito.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italico (Ctrl+I)',
+        text: 'Transforma o texto em italico.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'SUblinhar (Ctrl+U)',
+        text: 'Sublinha o texto.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Aumentar texto',
+        text: 'Aumenta o tamanho da fonte.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Encolher texto',
+        text: 'Diminui o tamanho da fonte.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'C&ocirc;r de fundo do texto',
+        text: 'Altera a c&ocirc;r de fundo do texto.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'C&ocirc;r do texo',
+        text: 'Altera a a&ocirc;r do texo.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'ALinhar &agrave; esquerda',
+        text: 'ALinha o texto &agrave; esquerda.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centrar',
+        text: 'Centra o texto.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'ALinhar &agrave; direita',
+        text: 'ALinha o texto &agravce; direita.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Lista',
+        text: 'Inicia uma lista.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Lista Numerada',
+        text: 'Inicia uma lista numerada.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Transforma o texto num hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Editar c&oacute;digo',
+        text: 'Alterar para o modo de edi&ccedil;&atilde;o de c&oacute;digo.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.form.BasicForm){
+  Ext.form.BasicForm.prototype.waitTitle = "Por favor espere...";
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Ordena&ccedil;&atilde;o Crescente",
+    sortDescText : "Ordena&ccedil;&atilde;o Decrescente",
+    lockText     : "Fixar Coluna",
+    unlockText   : "Libertar Coluna",
+    columnsText  : "Colunas"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Nenhum)',
+    groupByText    : 'Agrupar por este campo',
+    showGroupsText : 'Mostrar nos Grupos'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nome",
+    valueText  : "Valor",
+    dateFormat : "Y/j/m"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Arastar para redimensionar.",
+    collapsibleSplitTip : "Arastar para redimensionar. DUplo clique para esconder"
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ro.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ro.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ro.js	(revision 625)
@@ -0,0 +1,295 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Romanian translations for ExtJS 2.1
+ * First released by Lucian Lature on 2007-04-24
+ * Changed locale for Romania (date formats) as suggested by keypoint
+ * on ExtJS forums: http://www.extjs.com/forum/showthread.php?p=129524#post129524
+ * Removed some useless parts
+ * Changed by: Emil Cazamir, 2008-04-24
+ * Fixed some errors left behind
+ * Changed by: Emil Cazamir, 2008-09-01
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Încărcare...</div>';
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} rând(uri) selectate";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Închide acest tab";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Valoarea acestui câmp este invalidă";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Încărcare...";
+}
+
+Date.monthNames = [
+   "Ianuarie",
+   "Februarie",
+   "Martie",
+   "Aprilie",
+   "Mai",
+   "Iunie",
+   "Iulie",
+   "August",
+   "Septembrie",
+   "Octombrie",
+   "Noiembrie",
+   "Decembrie"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  Ian : 0,
+  Feb : 1,
+  Mar : 2,
+  Apr : 3,
+  Mai : 4,
+  Iun : 5,
+  Iul : 6,
+  Aug : 7,
+  Sep : 8,
+  Oct : 9,
+  Noi : 10,
+  Dec : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+   "Duminică",
+   "Luni",
+   "Marţi",
+   "Miercuri",
+   "Joi",
+   "Vineri",
+   "Sâmbătă"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Renunţă",
+      yes    : "Da",
+      no     : "Nu"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Astăzi",
+    minText           : "Această dată este anterioară datei minime",
+    maxText           : "Această dată este ulterioară datei maxime",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Luna următoare (Control+Dreapta)',
+    prevText          : 'Luna precedentă (Control+Stânga)',
+    monthYearText     : 'Alege o lună (Control+Sus/Jos pentru a parcurge anii)',
+    todayTip          : "{0} (Bara spațiu)",
+    format            : "d.m.Y",
+    okText            : "&#160;OK&#160;",
+    cancelText        : "Renunță",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Pagina",
+    afterPageText  : "din {0}",
+    firstText      : "Prima pagină",
+    prevText       : "Pagina anterioară",
+    nextText       : "Pagina următoare",
+    lastText       : "Ultima pagină",
+    refreshText    : "Împrospătează",
+    displayMsg     : "Afișare înregistrările {0} - {1} din {2}",
+    emptyMsg       : 'Nu sunt date de afișat'
+  });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Lungimea minimă pentru acest câmp este de {0}",
+      maxLengthText : "Lungimea maximă pentru acest câmp este {0}",
+      blankText     : "Acest câmp este obligatoriu",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Valoarea minimă permisă a acestui câmp este {0}",
+      maxText : "Valaorea maximă permisă a acestui câmp este {0}",
+      nanText : "{0} nu este un număr valid"
+   });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Indisponibil",
+    disabledDatesText : "Indisponibil",
+    minText           : "Data din această casetă trebuie să fie după {0}",
+    maxText           : "Data din această casetă trebuie să fie inainte de {0}",
+    invalidText       : "{0} nu este o dată validă, trebuie să fie în formatul {1}",
+    format            : "d.m.Y",
+    altFormats        : "d-m-Y|d.m.y|d-m-y|d.m|d-m|dm|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Încărcare...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Acest câmp trebuie să conţină o adresă de e-mail în formatul "user@domeniu.com"',
+      urlText      : 'Acest câmp trebuie să conţină o adresă URL în formatul "http:/'+'/www.domeniu.com"',
+      alphaText    : 'Acest câmp trebuie să conţină doar litere şi _',
+      alphanumText : 'Acest câmp trebuie să conţină doar litere, cifre şi _'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Vă rugăm introduceti un URL pentru această legătură web:',
+    buttonTips : {
+      bold : {
+        title: 'Îngroşat (Ctrl+B)',
+        text: 'Îngroşati caracterele textului selectat.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Înclinat (Ctrl+I)',
+        text: 'Înclinaţi caracterele textului selectat.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Subliniat (Ctrl+U)',
+        text: 'Subliniaţi caracterele textului selectat.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Mărit',
+        text: 'Măreşte dimensiunea fontului.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Micşorat',
+        text: 'Micşorează dimensiunea textului.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Culoarea fundalului',
+        text: 'Schimbă culoarea fundalului pentru textul selectat.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Culoarea textului',
+        text: 'Schimbă culoarea textului selectat.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Aliniat la stânga',
+        text: 'Aliniază textul la stânga.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Centrat',
+        text: 'Centrează textul în editor.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Aliniat la dreapta',
+        text: 'Aliniază textul la dreapta.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Listă cu puncte',
+        text: 'Inserează listă cu puncte.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Listă numerotată',
+        text: 'Inserează o listă numerotată.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Legătură web',
+        text: 'Transformă textul selectat în legătură web.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Editare sursă',
+        text: 'Schimbă pe modul de editare al codului HTML.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Sortare ascendentă",
+      sortDescText : "Sortare descendentă",
+      lockText     : "Blochează coloana",
+      unlockText   : "Deblochează coloana",
+      columnsText  : "Coloane"
+   });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Fără)',
+    groupByText    : 'Grupează după această coloană',
+    showGroupsText : 'Afișează grupat'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Nume",
+    valueText  : "Valoare",
+    dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Trage pentru redimensionare.",
+      collapsibleSplitTip : "Trage pentru redimensionare. Dublu-click pentru ascundere."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ru.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ru.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ru.js	(revision 625)
@@ -0,0 +1,319 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * Russian translation
+ * By ZooKeeper (utf-8 encoding)
+ * 6 November 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Идет загрузка...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} выбранных строк";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Закрыть эту вкладку";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Значение в этом поле неверное";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Загрузка...";
+}
+
+Date.monthNames = [
+    "Январь",
+    "Февраль",
+    "Март",
+    "Апрель",
+    "Май",
+    "Июнь",
+    "Июль",
+    "Август",
+    "Сентябрь",
+    "Октябрь",
+    "Ноябрь",
+    "Декабрь"
+];
+
+Date.shortMonthNames = [
+  "Янв",
+  "Февр",
+  "Март",
+  "Апр",
+  "Май",
+  "Июнь",
+  "Июль",
+  "Авг",
+  "Сент",
+  "Окт",
+  "Нояб",
+  "Дек"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.shortMonthNames[month];
+};
+
+Date.monthNumbers = {
+  'Янв': 0,
+  'Фев': 1,
+  'Мар': 2,
+  'Апр': 3,
+  'Май': 4,
+  'Июн': 5,
+  'Июл': 6,
+  'Авг': 7,
+  'Сен': 8,
+  'Окт': 9,
+  'Ноя': 10,
+  'Дек': 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Воскресенье",
+  "Понедельник",
+  "Вторник",
+  "Среда",
+  "Четверг",
+  "Пятница",
+  "Суббота"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "OK",
+    cancel : "Отмена",
+    yes    : "Да",
+    no     : "Нет"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d.m.Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText          : "Сегодня",
+    minText            : "Эта дата раньше минимальной даты",
+    maxText            : "Эта дата позже максимальной даты",
+    disabledDaysText   : "",
+    disabledDatesText  : "",
+    monthNames         : Date.monthNames,
+    dayNames           : Date.dayNames,
+    nextText           : 'Следующий месяц (Control+Вправо)',
+    prevText           : 'Предыдущий месяц (Control+Влево)',
+    monthYearText      : 'Выбор месяца (Control+Вверх/Вниз для выбора года)',
+    todayTip           : "{0} (Пробел)",
+    format             : "d.m.y",
+    okText             : "&#160;OK&#160;",
+    cancelText         : "Отмена",
+    startDay           : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Страница",
+    afterPageText  : "из {0}",
+    firstText      : "Первая страница",
+    prevText       : "Предыдущая страница",
+    nextText       : "Следующая страница",
+    lastText       : "Последняя страница",
+    refreshText    : "Обновить",
+    displayMsg     : "Отображаются записи с {0} по {1}, всего {2}",
+    emptyMsg       : 'Нет данных для отображения'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Минимальная длина этого поля {0}",
+    maxLengthText : "Максимальная длина этого поля {0}",
+    blankText     : "Это поле обязательно для заполнения",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "Значение этого поля не может быть меньше {0}",
+    maxText : "Значение этого поля не может быть больше {0}",
+    nanText : "{0} не является числом"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Не доступно",
+    disabledDatesText : "Не доступно",
+    minText           : "Дата в этом поле должна быть позде {0}",
+    maxText           : "Дата в этом поле должна быть раньше {0}",
+    invalidText       : "{0} не является правильной датой - дата должна быть указана в формате {1}",
+    format            : "d.m.y",
+    altFormats        : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Загрузка...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText     : 'Это поле должно содержать адрес электронной почты в формате "user@example.com"',
+    urlText       : 'Это поле должно содержать URL в формате "http:/'+'/www.example.com"',
+    alphaText     : 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"',
+    alphanumText  : 'Это поле должно содержать только латинские буквы, цифры и символ подчеркивания "_"'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Пожалуйста введите адрес:',
+    buttonTips : {
+      bold : {
+        title: 'Полужирный (Ctrl+B)',
+        text: 'Применение полужирного начертания к выделенному тексту.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Курсив (Ctrl+I)',
+        text: 'Применение курсивного начертания к выделенному тексту.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Подчёркнутый (Ctrl+U)',
+        text: 'Подчёркивание выделенного текста.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Увеличить размер',
+        text: 'Увеличение размера шрифта.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Уменьшить размер',
+        text: 'Уменьшение размера шрифта.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Заливка',
+        text: 'Изменение цвета фона для выделенного текста или абзаца.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Цвет текста',
+        text: 'Измение цвета текста.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Выровнять текст по левому краю',
+        text: 'Выровнивание текста по левому краю.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'По центру',
+        text: 'Выровнивание текста по центру.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Выровнять текст по правому краю',
+        text: 'Выровнивание текста по правому краю.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Маркеры',
+        text: 'Начать маркированный список.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Нумерация',
+        text: 'Начать нумернованный список.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Вставить гиперссылку',
+        text: 'Создание ссылки из выделенного текста.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Исходный код',
+        text: 'Переключиться на исходный код.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.form.BasicForm){
+  Ext.form.BasicForm.prototype.waitTitle = "Пожалуйста подождите...";
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Сортировать по возрастанию",
+    sortDescText : "Сортировать по убыванию",
+    lockText     : "Закрепить столбец",
+    unlockText   : "Снять закрепление столбца",
+    columnsText  : "Столбцы"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Пусто)',
+    groupByText    : 'Группировать по этому полю',
+    showGroupsText : 'Отображать по группам'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Название",
+    valueText  : "Значение",
+    dateFormat : "d.m.Y"
+  });
+}
+
+if(Ext.SplitLayoutRegion){
+  Ext.apply(Ext.SplitLayoutRegion.prototype, {
+    splitTip            : "Тяните для изменения размера.",
+    collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель."
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Тяните для изменения размера.",
+    collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sk.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sk.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sk.js	(revision 625)
@@ -0,0 +1,182 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ */
+ 
+ /*  Slovak Translation by Michal Thomka
+  *  14 April 2007
+  */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Nahrávam...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} označených riadkov";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zavrieť túto záložku";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je nesprávna";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Nahrávam...";
+}
+
+Date.monthNames = [
+   "Január",
+   "Február",
+   "Marec",
+   "Apríl",
+   "Máj",
+   "Jún",
+   "Júl",
+   "August",
+   "September",
+   "Október",
+   "November",
+   "December"
+];
+
+Date.dayNames = [
+   "Nedeľa",
+   "Pondelok",
+   "Utorok",
+   "Streda",
+   "Štvrtok",
+   "Piatok",
+   "Sobota"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Zrušiť",
+      yes    : "Áno",
+      no     : "Nie"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Dnes",
+      minText           : "Tento dátum je menší ako minimálny možný dátum",
+      maxText           : "Tento dátum je väčší ako maximálny možný dátum",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,
+      nextText          : 'Ďalší Mesiac (Control+Doprava)',
+      prevText          : 'Predch. Mesiac (Control+Doľava)',
+      monthYearText     : 'Vyberte Mesiac (Control+Hore/Dole pre posun rokov)',
+      todayTip          : "{0} (Medzerník)",
+      format            : "d.m.Y"
+   });
+}
+
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Strana",
+      afterPageText  : "z {0}",
+      firstText      : "Prvá Strana",
+      prevText       : "Predch. Strana",
+      nextText       : "Ďalšia Strana",
+      lastText       : "Posledná strana",
+      refreshText    : "Obnoviť",
+      displayMsg     : "Zobrazujem {0} - {1} z {2}",
+      emptyMsg       : 'iadne dáta'
+   });
+}
+
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimálna dĺžka pre toto pole je {0}",
+      maxLengthText : "Maximálna dĺžka pre toto pole je {0}",
+      blankText     : "Toto pole je povinné",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minimálna hodnota pre toto pole je {0}",
+      maxText : "Maximálna hodnota pre toto pole je {0}",
+      nanText : "{0} je nesprávne číslo"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Zablokované",
+      disabledDatesText : "Zablokované",
+      minText           : "Dátum v tomto poli musí byť až po {0}",
+      maxText           : "Dátum v tomto poli musí byť pred {0}",
+      invalidText       : "{0} nie je správny dátum - musí byť vo formáte {1}",
+      format            : "d.m.Y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Nahrávam...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Toto pole musí byť e-mailová adresa vo formáte "user@example.com"',
+      urlText      : 'Toto pole musí byť URL vo formáte "http:/'+'/www.example.com"',
+      alphaText    : 'Toto pole može obsahovať iba písmená a znak _',
+      alphanumText : 'Toto pole može obsahovať iba písmená, čísla a znak _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Zoradiť vzostupne",
+      sortDescText : "Zoradiť zostupne",
+      lockText     : "Zamknúť stľpec",
+      unlockText   : "Odomknúť stľpec",
+      columnsText  : "Stľpce"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Názov",
+      valueText  : "Hodnota",
+      dateFormat : "d.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Potiahnite pre zmenu rozmeru",
+      collapsibleSplitTip : "Potiahnite pre zmenu rozmeru. Dvojklikom schováte."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sl.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sl.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sl.js	(revision 625)
@@ -0,0 +1,176 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Slovenian translation by Matjaž (UTF-8 encoding)
+ * 25 April 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Nalagam...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} izbranih vrstic";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zapri zavihek";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Neveljavna vrednost";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Nalagam...";
+}
+
+Date.monthNames = [
+   "Januar",
+   "Februar",
+   "Marec",
+   "April",
+   "Maj",
+   "Junij",
+   "Julij",
+   "Avgust",
+   "September",
+   "Oktober",
+   "November",
+   "December"
+];
+
+Date.dayNames = [
+   "Nedelja",
+   "Ponedeljek",
+   "Torek",
+   "Sreda",
+   "Četrtek",
+   "Petek",
+   "Sobota"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "V redu",
+      cancel : "Prekliči",
+      yes    : "Da",
+      no     : "Ne"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Danes",
+      minText           : "Navedeni datum je pred spodnjim datumom",
+      maxText           : "Navedeni datum je za zgornjim datumom",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Naslednji mesec (Control+Desno)',
+      prevText          : 'Prejšnji mesec (Control+Levo)',
+      monthYearText     : 'Izberite mesec (Control+Gor/Dol za premik let)',
+      todayTip          : "{0} (Preslednica)",
+      format            : "d.m.y",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Stran",
+      afterPageText  : "od {0}",
+      firstText      : "Prva stran",
+      prevText       : "Prejšnja stran",
+      nextText       : "Naslednja stran",
+      lastText       : "Zadnja stran",
+      refreshText    : "Osveži",
+      displayMsg     : "Prikazujem {0} - {1} od {2}",
+      emptyMsg       : 'Ni podatkov za prikaz'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimalna dolžina tega polja je {0}",
+      maxLengthText : "Maksimalna dolžina tega polja je {0}",
+      blankText     : "To polje je obvezno",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minimalna vrednost tega polja je {0}",
+      maxText : "Maksimalna vrednost tega polja je {0}",
+      nanText : "{0} ni veljavna številka"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Onemogočen",
+      disabledDatesText : "Onemogočen",
+      minText           : "Datum mora biti po {0}",
+      maxText           : "Datum mora biti pred {0}",
+      invalidText       : "{0} ni veljaven datum - mora biti v tem formatu {1}",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Nalagam...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'To polje je e-mail naslov formata "ime@domena.si"',
+      urlText      : 'To polje je URL naslov formata "http:/'+'/www.domena.si"',
+      alphaText    : 'To polje lahko vsebuje samo črke in _',
+      alphanumText : 'To polje lahko vsebuje samo črke, številke in _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Sortiraj naraščajoče",
+      sortDescText : "Sortiraj padajoče",
+      lockText     : "Zakleni stolpec",
+      unlockText   : "Odkleni stolpec",
+      columnsText  : "Stolpci"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Ime",
+      valueText  : "Vrednost",
+      dateFormat : "j.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Potegni za razširitev.",
+      collapsibleSplitTip : "Potegni za razširitev. Dvojni klik, če želite skriti."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr.js	(revision 625)
@@ -0,0 +1,179 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Serbian Latin Translation
+ * by Atila Hajnal (latin, utf8 encoding)
+ * sr
+ * 14 Sep 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Učitavam...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "Ne postoji ni jedan slog";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} izabranih redova";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Zatvori оvu »karticu«";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Unešena vrednost nije pravilna";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Učitavam...";
+}
+
+Date.monthNames = [
+   "Januar",
+   "Februar",
+   "Mart",
+   "April",
+   "Мај",
+   "Jun",
+   "Јul",
+   "Avgust",
+   "Septembar",
+   "Oktobar",
+   "Novembar",
+   "Decembar"
+];
+
+Date.dayNames = [
+   "Nedelja",
+   "Ponedeljak",
+   "Utorak",
+   "Sreda",
+   "Četvrtak",
+   "Petak",
+   "Subota"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "U redu",
+      cancel : "Odustani",
+      yes    : "Da",
+      no     : "Ne"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Danas",
+      minText           : "Datum је ispred najmanjeg dozvoljenog datuma",
+      maxText           : "Datum је nakon najvećeg dozvoljenog datuma",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Sledeći mesec (Control+Desno)',
+      prevText          : 'Prethodni mesec (Control+Levo)',
+      monthYearText     : 'Izaberite mesec (Control+Gore/Dole za izbor godine)',
+      todayTip          : "{0} (Razmaknica)",
+      format            : "d.m.y",
+      startDay 		 : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Strana",
+      afterPageText  : "od {0}",
+      firstText      : "Prva strana",
+      prevText       : "Prethodna strana",
+      nextText       : "Sledeća strana",
+      lastText       : "Poslednja strana",
+      refreshText    : "Osveži",
+      displayMsg     : "Prikazana {0} - {1} od {2}",
+      emptyMsg       : 'Nemam šta prikazati'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minimalna dužina ovog polja је {0}",
+      maxLengthText : "Maksimalna dužina ovog polja је {0}",
+      blankText     : "Polje је obavezno",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minimalna vrednost u polju је {0}",
+      maxText : "Maksimalna vrednost u polju је {0}",
+      nanText : "{0} nije pravilan broj"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Pasivno",
+      disabledDatesText : "Pasivno",
+      minText           : "Datum u ovom polju mora biti nakon {0}",
+      maxText           : "Datum u ovom polju mora biti pre {0}",
+      invalidText       : "{0} nije pravilan datum - zahtevani oblik je {1}",
+      format            : "d.m.y",
+      altFormats        : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Učitavam...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ovo polje prihavata e-mail adresu isključivo u obliku "korisnik@domen.com"',
+      urlText      : 'Ovo polje prihavata URL adresu isključivo u obliku "http:/'+'/www.domen.com"',
+      alphaText    : 'Ovo polje može sadržati isključivo slova i znak _',
+      alphanumText : 'Ovo polje može sadržati само slova, brojeve i znak _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Rastući redosled",
+      sortDescText : "Opadajući redosled",
+      lockText     : "Zaključaj kolonu",
+      unlockText   : "Otključaj kolonu",
+      columnsText  : "Kolone"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Naziv",
+      valueText  : "Vrednost",
+      dateFormat : "d.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Povući za izmenu veličine.",
+      collapsibleSplitTip : "Povući za izmenu veličine. Dvostruku klik za sakrivanje."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr_RS.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr_RS.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sr_RS.js	(revision 625)
@@ -0,0 +1,178 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * Serbian Cyrillic Translation
+ * by Čolovic Vladan (cyrillic, utf8 encoding)
+ * sr_RS (ex: sr_CS, sr_YU)
+ * 12 May 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Учитавам...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} изабраних редова";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Затвори ову »картицу«";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Унешена вредност није правилна";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Учитавам...";
+}
+
+Date.monthNames = [
+   "Јануар",
+   "Фебруар",
+   "Март",
+   "Април",
+   "Мај",
+   "Јун",
+   "Јул",
+   "Август",
+   "Септембар",
+   "Октобар",
+   "Новембар",
+   "Децембар"
+];
+
+Date.dayNames = [
+   "Недеља",
+   "Понедељак",
+   "Уторак",
+   "Среда",
+   "Четвртак",
+   "Петак",
+   "Субота"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "У реду",
+      cancel : "Одустани",
+      yes    : "Да",
+      no     : "Не"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Данас",
+      minText           : "Датум је испред најмањег дозвољеног датума",
+      maxText           : "Датум је након највећег дозвољеног датума",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Следећи месец (Control+Десно)',
+      prevText          : 'Претходни месец (Control+Лево)',
+      monthYearText     : 'Изаберите месец (Control+Горе/Доле за избор године)',
+      todayTip          : "{0} (Размакница)",
+      format            : "d.m.y",
+      startDay 		 : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Страна",
+      afterPageText  : "од {0}",
+      firstText      : "Прва страна",
+      prevText       : "Претходна страна",
+      nextText       : "Следећа страна",
+      lastText       : "Последња страна",
+      refreshText    : "Освежи",
+      displayMsg     : "Приказана {0} - {1} од {2}",
+      emptyMsg       : 'Немам шта приказати'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Минимална дужина овог поља је {0}",
+      maxLengthText : "Максимална дужина овог поља је {0}",
+      blankText     : "Поље је обавезно",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Минимална вредност у пољу је {0}",
+      maxText : "Максимална вредност у пољу је {0}",
+      nanText : "{0} није правилан број"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Пасивно",
+      disabledDatesText : "Пасивно",
+      minText           : "Датум у овом пољу мора бити након {0}",
+      maxText           : "Датум у овом пољу мора бити пре {0}",
+      invalidText       : "{0} није правилан датум - захтевани облик је {1}",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Учитавам...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Ово поље прихвата e-mail адресу искључиво у облику "korisnik@domen.com"',
+      urlText      : 'Ово поље прихвата URL адресу искључиво у облику "http:/'+'/www.domen.com"',
+      alphaText    : 'Ово поље може садржати искључиво слова и знак _',
+      alphanumText : 'Ово поље може садржати само слова, бројеве и знак _'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Растући редослед",
+      sortDescText : "Опадајући редослед",
+      lockText     : "Закључај колону",
+      unlockText   : "Откључај колону",
+      columnsText  : "Колоне"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Назив",
+      valueText  : "Вредност",
+      dateFormat : "d.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Повући за измену величине.",
+      collapsibleSplitTip : "Повући за измену величине. Двоструки клик за сакривање."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sv_SE.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sv_SE.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-sv_SE.js	(revision 625)
@@ -0,0 +1,178 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * Swedish translation (utf8-encoding)
+ * By Erik Andersson, Monator Technologies
+ * 24 April 2007
+ * Changed by Cariad, 29 July 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Laddar...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} markerade rad(er)";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Stäng denna flik";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Värdet i detta fält är inte tillåtet";
+}
+
+if(Ext.LoadMask){
+   Ext.LoadMask.prototype.msg = "Laddar...";
+}
+
+Date.monthNames = [
+   "januari",
+   "februari",
+   "mars",
+   "april",
+   "maj",
+   "juni",
+   "juli",
+   "augusti",
+   "september",
+   "oktober",
+   "november",
+   "december"
+];
+
+Date.dayNames = [
+   "söndag",
+   "måndag",
+   "tisdag",
+   "onsdag",
+   "torsdag",
+   "fredag",
+   "lördag"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Avbryt",
+      yes    : "Ja",
+      no     : "Nej"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "Y-m-d");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Idag",
+      minText           : "Detta datum inträffar före det tidigast tillåtna",
+      maxText           : "Detta datum inträffar efter det senast tillåtna",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Nästa månad (Ctrl + högerpil)',
+      prevText          : 'Föregående månad (Ctrl + vänsterpil)',
+      monthYearText     : 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)',
+      todayTip          : "{0} (mellanslag)",
+      format            : "Y-m-d",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Sida",
+      afterPageText  : "av {0}",
+      firstText      : "Första sidan",
+      prevText       : "Föregående sida",
+      nextText       : "Nästa sida",
+      lastText       : "Sista sidan",
+      refreshText    : "Uppdatera",
+      displayMsg     : "Visar {0} - {1} av {2}",
+      emptyMsg       : 'Det finns ingen data att visa'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Minsta tillåtna längd för detta fält är {0}",
+      maxLengthText : "Största tillåtna längd för detta fält är {0}",
+      blankText     : "Detta fält är obligatoriskt",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Minsta tillåtna värde för detta fält är {0}",
+      maxText : "Största tillåtna värde för detta fält är {0}",
+      nanText : "{0} är inte ett tillåtet nummer"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Inaktiverad",
+      disabledDatesText : "Inaktiverad",
+      minText           : "Datumet i detta fält måste inträffa efter {0}",
+      maxText           : "Datumet i detta fält måste inträffa före {0}",
+      invalidText       : "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}",
+      format            : "Y-m-d"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Laddar...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"',
+      urlText      : 'Detta fält ska innehålla en länk (URL) i formatet "http:/'+'/www.domän.se"',
+      alphaText    : 'Detta fält får bara innehålla bokstäver och "_"',
+      alphanumText : 'Detta fält får bara innehålla bokstäver, nummer och "_"'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Sortera stigande",
+      sortDescText : "Sortera fallande",
+      lockText     : "Lås kolumn",
+      unlockText   : "Lås upp kolumn",
+      columnsText  : "Kolumner"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Namn",
+      valueText  : "Värde",
+      dateFormat : "Y-m-d"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Dra för att ändra storleken.",
+      collapsibleSplitTip : "Dra för att ändra storleken. Dubbelklicka för att gömma."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-th.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-th.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-th.js	(revision 625)
@@ -0,0 +1,294 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by KillerNay on the extjs.com forums.
+ * Thank you KillerNay!
+ *
+ * Thailand Translations
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">¡ÓÅÑ§âËÅŽ...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+  Ext.grid.GridPanel.prototype.ddText = "{0} àÅ×Í¡áÅéÇ·Ñé§ËÁŽá¶Ç";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "»ÔŽá·çº¹Õé";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "€èÒ¢Í§ªèÍ§¹ÕéäÁè¶Ù¡µéÍ§";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "¡ÓÅÑ§âËÅŽ...";
+}
+
+Date.monthNames = [
+  "Á¡ÃÒ€Á",
+  "¡ØÁŸÒÓŸÑ¹žì",
+  "ÁÕ¹Ò€Á",
+  "àÁÉÒÂ¹",
+  "ŸÄÉÀÒ€Á",
+  "ÁÔ¶Ø¹ÒÂ¹",
+  "¡Ä¡¯Ò€Á",
+  "ÊÔ§ËÒ€Á",
+  "¡Ñ¹ÂÒÂ¹",
+  "µØÅÒ€Á",
+  "ŸÄÈšÔ¡ÒÂ¹",
+  "žÑ¹ÇÒ€Á"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.monthNumbers = {
+  "Á€" : 0,
+  "¡Ÿ" : 1,
+  "ÁÕ€" : 2,
+  "àÁÂ" : 3,
+  "Ÿ€" : 4,
+  "ÁÔÂ" : 5,
+  "¡€" : 6,
+  "Ê€" : 7,
+  "¡Â" : 8,
+  "µ€" : 9,
+  "ŸÂ" : 10,
+  "ž€" : 11
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "ÍÒ·ÔµÂì",
+  "šÑ¹·Ãì",
+  "ÍÑ§€ÒÃ",
+  "ŸØ×ž",
+  "ŸÄËÑÊºŽÕ",
+  "ÈØ¡Ãì",
+  "àÊÒÃì"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.dayNames[day].substring(0, 3);
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "µ¡Å§",
+    cancel : "Â¡àÅÔ¡",
+    yes    : "ãªè",
+    no     : "äÁèãªè"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "m/d/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "ÇÑ¹¹Õé",
+    minText           : "This date is before the minimum date",
+    maxText           : "This date is after the maximum date",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'àŽ×Í¹¶ÑŽä» (Control+Right)',
+    prevText          : 'àŽ×Í¹¡èÍ¹Ë¹éÒ (Control+Left)',
+    monthYearText     : 'àÅ×Í¡àŽ×Í¹ (Control+Up/Down to move years)',
+    todayTip          : "{0} (Spacebar)",
+    format            : "m/d/y",
+    okText            : "&#160;µ¡Å§&#160;",
+    cancelText        : "Â¡àÅÔ¡",
+    startDay          : 0
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Ë¹éÒ",
+    afterPageText  : "of {0}",
+    firstText      : "Ë¹éÒáÃ¡",
+    prevText       : "¡èÍ¹Ë¹éÒ",
+    nextText       : "¶ÑŽä»",
+    lastText       : "Ë¹éÒÊØŽ·éÒÂ",
+    refreshText    : "ÃÕà¿Ãª",
+    displayMsg     : "¡ÓÅÑ§áÊŽ§ {0} - {1} šÒ¡ {2}",
+    emptyMsg       : 'äÁèÁÕ¢éÍÁÙÅáÊŽ§'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "The minimum length for this field is {0}",
+    maxLengthText : "The maximum length for this field is {0}",
+    blankText     : "This field is required",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    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"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "»ÔŽ",
+    disabledDatesText : "»ÔŽ",
+    minText           : "The date in this field must be after {0}",
+    maxText           : "The date in this field must be before {0}",
+    invalidText       : "{0} is not a valid date - it must be in the format {1}",
+    format            : "m/d/y",
+    altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "¡ÓÅÑ§âËÅŽ...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+  Ext.apply(Ext.form.VTypes, {
+    emailText    : 'This field should be an e-mail address in the format "user@example.com"',
+    urlText      : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+    alphaText    : 'This field should only contain letters and _',
+    alphanumText : 'This field should only contain letters, numbers and _'
+  });
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Please enter the URL for the link:',
+    buttonTips : {
+      bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Underline (Ctrl+U)',
+        text: 'Underline the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Grow Text',
+        text: 'Increase the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Shrink Text',
+        text: 'Decrease the font size.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Text Highlight Color',
+        text: 'Change the background color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Font Color',
+        text: 'Change the color of the selected text.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Align Text Left',
+        text: 'Align text to the left.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Center Text',
+        text: 'Center text in the editor.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Align Text Right',
+        text: 'Align text to the right.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Bullet List',
+        text: 'Start a bulleted list.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numbered List',
+        text: 'Start a numbered list.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Hyperlink',
+        text: 'Make the selected text a hyperlink.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Source Edit',
+        text: 'Switch to source editing mode.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Sort Ascending",
+    sortDescText : "Sort Descending",
+    lockText     : "Lock Column",
+    unlockText   : "Unlock Column",
+    columnsText  : "Columns"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(None)',
+    groupByText    : 'Group By This Field',
+    showGroupsText : 'Show in Groups'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Name",
+    valueText  : "Value",
+    dateFormat : "m/j/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Drag to resize.",
+    collapsibleSplitTip : "Drag to resize. Double click to hide."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-tr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-tr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-tr.js	(revision 625)
@@ -0,0 +1,306 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ *
+ * Turkish translation by Alper YAZGAN
+ * 2008-01-24, 10:29 AM 
+ * 
+ * Updated to 2.2 by YargicX
+ * 2008-10-05, 06:22 PM
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Yükleniyor ...</div>';
+
+if(Ext.View){
+  Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.Grid){
+  Ext.grid.Grid.prototype.ddText = "Seçili satýr sayýsý : {0}";
+}
+
+if(Ext.TabPanelItem){
+  Ext.TabPanelItem.prototype.closeText = "Sekmeyi kapat";
+}
+
+if(Ext.form.Field){
+  Ext.form.Field.prototype.invalidText = "Bu alandaki deðer geçersiz";
+}
+
+if(Ext.LoadMask){
+  Ext.LoadMask.prototype.msg = "Yükleniyor ...";
+}
+
+Date.monthNames = [
+  "Ocak",
+  "Þžubat",
+  "Mart",
+  "Nisan",
+  "Mayýs",
+  "Haziran",
+  "Temmuz",
+  "Aðustos",
+  "Eylül",
+  "Ekim",
+  "Kasým",
+  "Aralýk"
+];
+
+Date.getShortMonthName = function(month) {
+  return Date.monthNames[month].substring(0, 3);
+};
+
+Date.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
+};
+
+Date.getMonthNumber = function(name) {
+  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+};
+
+Date.dayNames = [
+  "Pazar",
+  "Pazartesi",
+  "Salý",
+  "Ç‡arþŸamba",
+  "PerþŸembe",
+  "Cuma",
+  "Cumartesi"
+];
+
+Date.shortDayNames = [
+  "Paz",
+  "Pzt",
+  "Sal",
+  "ÇrþŸ",
+  "Prþ",
+  "Cum",
+  "Cmt"
+];
+
+Date.getShortDayName = function(day) {
+  return Date.shortDayNames[day];
+};
+
+if(Ext.MessageBox){
+  Ext.MessageBox.buttonText = {
+    ok     : "Tamam",
+    cancel : "Ä°ptal",
+    yes    : "Evet",
+    no     : "Hayýr"
+  };
+}
+
+if(Ext.util.Format){
+  Ext.util.Format.date = function(v, format){
+    if(!v) return "";
+    if(!(v instanceof Date)) v = new Date(Date.parse(v));
+    return v.dateFormat(format || "d/m/Y");
+  };
+}
+
+if(Ext.DatePicker){
+  Ext.apply(Ext.DatePicker.prototype, {
+    todayText         : "Bugün",
+    minText           : "Bu tarih izin verilen en küçük tarihten daha önce",
+    maxText           : "Bu tarih izin verilen en büyük tarihten daha sonra",
+    disabledDaysText  : "",
+    disabledDatesText : "",
+    monthNames        : Date.monthNames,
+    dayNames          : Date.dayNames,
+    nextText          : 'Gelecek Ay (Control+Right)',
+    prevText          : 'Ã–nceki Ay (Control+Left)',
+    monthYearText     : 'Bir ay sŸeçiniz (Yýlý artýrmak/azaltmak için Control+Up/Down)',
+    todayTip          : "{0} (BoþŸluk TuþŸu - Spacebar)",
+    format            : "d/m/Y",
+    okText            : "&#160;Tamam&#160;",
+    cancelText        : "Ä°ptal",
+    startDay          : 1
+  });
+}
+
+if(Ext.PagingToolbar){
+  Ext.apply(Ext.PagingToolbar.prototype, {
+    beforePageText : "Sayfa",
+    afterPageText  : " / {0}",
+    firstText      : "Ä°lk Sayfa",
+    prevText       : "Ã–nceki Sayfa",
+    nextText       : "Sonraki Sayfa",
+    lastText       : "Son Sayfa",
+    refreshText    : "Yenile",
+    displayMsg     : "Gösterilen {0} - {1} / {2}",
+    emptyMsg       : 'Gösterilebilecek veri yok'
+  });
+}
+
+if(Ext.form.TextField){
+  Ext.apply(Ext.form.TextField.prototype, {
+    minLengthText : "Girilen verinin uzunluðu en az {0} olabilir",
+    maxLengthText : "Girilen verinin uzunluðu en fazla {0} olabilir",
+    blankText     : "Bu alan boþŸ býrakýlamaz",
+    regexText     : "",
+    emptyText     : null
+  });
+}
+
+if(Ext.form.NumberField){
+  Ext.apply(Ext.form.NumberField.prototype, {
+    minText : "En az {0} girilebilir",
+    maxText : "En çok {0} girilebilir",
+    nanText : "{0} geçersiz bir sayýdýr"
+  });
+}
+
+if(Ext.form.DateField){
+  Ext.apply(Ext.form.DateField.prototype, {
+    disabledDaysText  : "Disabled",
+    disabledDatesText : "Disabled",
+    minText           : "Bu tarih, {0} tarihinden daha sonra olmalýdýr", 
+    maxText           : "Bu tarih, {0} tarihinden daha önce olmalýdýr",
+    invalidText       : "{0} geçersiz bir tarihdir - tarih formatý {1} þŸeklinde olmalýdýr",
+    format            : "d/m/Y",
+    altFormats        : "d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d"
+  });
+}
+
+if(Ext.form.ComboBox){
+  Ext.apply(Ext.form.ComboBox.prototype, {
+    loadingText       : "Yükleniyor ...",
+    valueNotFoundText : undefined
+  });
+}
+
+if(Ext.form.VTypes){
+	Ext.form.VTypes["emailText"]='Bu alan "user@example.com" þŸeklinde elektronik posta formatýnda olmalýdýr';
+	Ext.form.VTypes["urlText"]='Bu alan "http://www.example.com" þŸeklinde URL adres formatýnda olmalýdýr';
+	Ext.form.VTypes["alphaText"]='Bu alan sadece harf ve _ içermeli';
+	Ext.form.VTypes["alphanumText"]='Bu alan sadece harf, sayý ve _ içermeli';
+}
+
+if(Ext.form.HtmlEditor){
+  Ext.apply(Ext.form.HtmlEditor.prototype, {
+    createLinkText : 'Lütfen bu baðlantý için gerekli URL adresini giriniz:',
+    buttonTips : {
+      bold : {
+        title: 'Kalýn(Bold) (Ctrl+B)',
+        text: 'Þžeçili yazýyý kalýn yapar.',
+        cls: 'x-html-editor-tip'
+      },
+      italic : {
+        title: 'Ä°talik(Italic) (Ctrl+I)',
+        text: 'Þžeçili yazýyý italik yapar.',
+        cls: 'x-html-editor-tip'
+      },
+      underline : {
+        title: 'Alt Ã‡izgi(Underline) (Ctrl+U)',
+        text: 'Þžeçili yazýnýn altýný çizer.',
+        cls: 'x-html-editor-tip'
+      },
+      increasefontsize : {
+        title: 'Fontu büyült',
+        text: 'Yazý fontunu büyütür.',
+        cls: 'x-html-editor-tip'
+      },
+      decreasefontsize : {
+        title: 'Fontu küçült',
+        text: 'Yazý fontunu küçültür.',
+        cls: 'x-html-editor-tip'
+      },
+      backcolor : {
+        title: 'Arka Plan Rengi',
+        text: 'Seçili yazýnýn arka plan rengini deðiþŸtir.',
+        cls: 'x-html-editor-tip'
+      },
+      forecolor : {
+        title: 'Yazý Rengi',
+        text: 'Seçili yazýnýn rengini deðiþŸtir.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyleft : {
+        title: 'Sola Daya',
+        text: 'Yazýyý sola daya.',
+        cls: 'x-html-editor-tip'
+      },
+      justifycenter : {
+        title: 'Ortala',
+        text: 'Yazýyý editörde ortala.',
+        cls: 'x-html-editor-tip'
+      },
+      justifyright : {
+        title: 'Saða daya',
+        text: 'Yazýyý saða daya.',
+        cls: 'x-html-editor-tip'
+      },
+      insertunorderedlist : {
+        title: 'Noktalý Liste',
+        text: 'Noktalý listeye baþŸla.',
+        cls: 'x-html-editor-tip'
+      },
+      insertorderedlist : {
+        title: 'Numaralý Liste',
+        text: 'Numaralý lisyeye baþŸla.',
+        cls: 'x-html-editor-tip'
+      },
+      createlink : {
+        title: 'Web Adresi(Hyperlink)',
+        text: 'Seçili yazýyý web adresi(hyperlink) yap.',
+        cls: 'x-html-editor-tip'
+      },
+      sourceedit : {
+        title: 'Kaynak kodu Düzenleme',
+        text: 'Kaynak kodu düzenleme moduna geç.',
+        cls: 'x-html-editor-tip'
+      }
+    }
+  });
+}
+
+if(Ext.grid.GridView){
+  Ext.apply(Ext.grid.GridView.prototype, {
+    sortAscText  : "Artan sýrada sýrala",
+    sortDescText : "Azalan sýrada sýrala",
+    lockText     : "Kolonu kilitle",
+    unlockText   : "Kolon kilidini kaldýr",
+    columnsText  : "Kolonlar"
+  });
+}
+
+if(Ext.grid.GroupingView){
+  Ext.apply(Ext.grid.GroupingView.prototype, {
+    emptyGroupText : '(Yok)',
+    groupByText    : 'Bu Alana Göre Grupla',
+    showGroupsText : 'Gruplar Halinde Göster'
+  });
+}
+
+if(Ext.grid.PropertyColumnModel){
+  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+    nameText   : "Ad",
+    valueText  : "Deðer",
+    dateFormat : "d/m/Y"
+  });
+}
+
+if(Ext.layout.BorderLayout.SplitRegion){
+  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+    splitTip            : "Yeniden boyutlandýrmak için sürükle.",
+    collapsibleSplitTip : "Yeniden boyutlandýrmak için sürükle. Saklamak için çift týkla."
+  });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ukr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ukr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-ukr.js	(revision 625)
@@ -0,0 +1,258 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * Ukrainian translation
+ * By zlatko (utf-8 encoding)
+ * 3 October 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Триває завантаження...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} вибраних стрічок";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Закрити цю вкладку";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Значення у цьому полі невірне";
+}
+
+if(Ext.LoadMask){
+   Ext.LoadMask.prototype.msg = "Завантаження...";
+}
+
+Date.monthNames = [
+   "Січень",
+   "Лютий",
+   "Березень",
+   "Квітень",
+   "Травень",
+   "Червень",
+   "Липень",
+   "Серпень",
+   "Вересень",
+   "Жовтень",
+   "Листопад",
+   "Грудень"
+];
+
+Date.dayNames = [
+   "Неділя",
+   "Понеділок",
+   "Вівторок",
+   "Середа",
+   "Четвер",
+   "Пятниця",
+   "Субота"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "OK",
+      cancel : "Відміна",
+      yes    : "Так",
+      no     : "Ні"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d.m.Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Сьогодні",
+      minText           : "Ця дата менше мінімальної дати",
+      maxText           : "Ця дата більше максимальної дати",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames	        : Date.dayNames,
+      nextText          : 'Наступний місяць (Control+Вправо)',
+      prevText          : 'Попередній місяць (Control+Вліво)',
+      monthYearText     : 'Вибір місяця (Control+Вверх/Вниз для вибору року)',
+      todayTip          : "{0} (Пробіл)",
+      format            : "d.m.y",
+      okText            : "&#160;OK&#160;",
+      cancelText        : "Відміна",
+      startDay          : 1
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Сторінка",
+      afterPageText  : "з {0}",
+      firstText      : "Перша сторінка",
+      prevText       : "Попередня сторінка",
+      nextText       : "Наступна сторінка",
+      lastText       : "Остання сторінка",
+      refreshText    : "Обновити",
+      displayMsg     : "Відображаються записи з {0} по {1}, всього {2}",
+      emptyMsg       : 'Дані для відображення відсутні'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Мінімальна довжина цього поля {0}",
+      maxLengthText : "Максимальна довжина цього поля {0}",
+      blankText     : "Це поле є обов’язковим для заповнення",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Значення цього поля не може бути менше {0}",
+      maxText : "Значення цього поля не може бути більше {0}",
+      nanText : "{0} не являється числом"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Не доступно",
+      disabledDatesText : "Не доступно",
+      minText           : "Дата в цьому полі повинна бути більше {0}",
+      maxText           : "Дата в цьому полі повинна бути менше {0}",
+      invalidText       : "{0} неправильна дата - дата повинна бути вказана у  форматі {1}",
+      format            : "d.m.y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Завантаження...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Це поле повинно містити адресу електронної почти у форматі "user@example.com"',
+      urlText      : 'Це поле повинно містити URL у форматі "http:/'+'/www.example.com"',
+      alphaText    : 'Це поле повинно містити виключно латинські літери та символ підкреслення "_"',
+      alphanumText : 'Це поле повинно містити виключно латинські літери, цифри та символ підкреслення "_"'
+   });
+}
+
+if(Ext.form.HtmlEditor){
+   Ext.apply(Ext.form.HtmlEditor.prototype, {
+     createLinkText : 'Будь-ласка введіть адресу:',
+     buttonTips : {
+            bold : {
+               title: 'Напівжирний (Ctrl+B)',
+               text: 'Застосування напівжирного до виділеного тексту.',
+               cls: 'x-html-editor-tip'
+            },
+            italic : {
+               title: 'Курсив (Ctrl+I)',
+               text: ' Застосування курсиву до виділеного тексту.',
+               cls: 'x-html-editor-tip'
+            },
+            underline : {
+               title: 'Підкреслений (Ctrl+U)',
+               text: ' Застосування підкреслення до виділенного тексту.',
+               cls: 'x-html-editor-tip'
+           },
+           increasefontsize : {
+               title: 'Збільшити розмір',
+               text: 'Збільшення розміру шрифта.',
+               cls: 'x-html-editor-tip'
+           },
+           decreasefontsize : {
+               title: 'Зменшити розмір',
+               text: 'Зменшення розміру шрифта.',
+               cls: 'x-html-editor-tip'
+           },
+           backcolor : {
+               title: 'Заливка',
+               text: 'Зміна кольору фону для виділеного тексту або абзацу.',
+               cls: 'x-html-editor-tip'
+           },
+           forecolor : {
+               title: 'Колір тексту',
+               text: 'Зміна кольору тексту.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyleft : {
+               title: 'Вирівняти текст по лівій границі',
+               text: 'Вирівнювання тексту по лівій границі.',
+               cls: 'x-html-editor-tip'
+           },
+           justifycenter : {
+               title: 'Вирівняти текст по центру',
+               text: 'Вирівнювання тексту по центру.',
+               cls: 'x-html-editor-tip'
+           },
+           justifyright : {
+               title: 'Вирівняти текст по правій границі',
+               text: 'Вирівнювання тексту по правій границі.',
+               cls: 'x-html-editor-tip'
+           },
+           insertunorderedlist : {
+               title: 'Маркери',
+               text: 'Почати маркований список.',
+               cls: 'x-html-editor-tip'
+           },
+           insertorderedlist : {
+               title: 'Нумерація',
+               text: 'Почати нумернований список.',
+               cls: 'x-html-editor-tip'
+           },
+           createlink : {
+               title: 'Вставити гіперпосилання',
+               text: 'Створення посилання із виділеного тексту.',
+               cls: 'x-html-editor-tip'
+           },
+           sourceedit : {
+               title: 'Вихідний код',
+               text: 'Переключитись на вихідний код.',
+               cls: 'x-html-editor-tip'
+           }
+        }
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Сортувати по зростанню",
+      sortDescText : "Сортувати по спаданню",
+      lockText     : "Закріпити колонку",
+      unlockText   : "Зняти закріплення колонки",
+      columnsText  : "Колонки"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Назва",
+      valueText  : "Значення",
+      dateFormat : "j.m.Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Тягніть для зміни розміру.",
+      collapsibleSplitTip : "Тягніть для зміни розміру. Подвійний клік сховає панель."
+   });
+}
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-vn.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-vn.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-vn.js	(revision 625)
@@ -0,0 +1,181 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/**
+ * List compiled by mystix on the extjs.com forums.
+ * Thank you Mystix!
+ */
+
+/**
+ * Vietnamese translation
+ * By bpmtri
+ * 12-April-2007 04:06PM
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Đang tải...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} dòng được chọn";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "Đóng thẻ này";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "Giá trị của ô này không hợp lệ.";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "Đang tải...";
+}
+
+Date.monthNames = [
+   "Tháng 1",
+   "Tháng 2",
+   "Tháng 3",
+   "Tháng 4",
+   "Tháng 5",
+   "Tháng 6",
+   "Tháng 7",
+   "Tháng 8",
+   "Tháng 9",
+   "Tháng 10",
+   "Tháng 11",
+   "Tháng 12"
+];
+
+Date.dayNames = [
+   "Chủ nhật",
+   "Thứ hai",
+   "Thứ ba",
+   "Thứ tư",
+   "Thứ năm",
+   "Thứ sáu",
+   "Thứ bảy"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "Đồng ý",
+      cancel : "Hủy bỏ",
+      yes    : "Có",
+      no     : "Không"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "d/m/Y");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "Hôm nay",
+      minText           : "Ngày này nhỏ hơn ngày nhỏ nhất",
+      maxText           : "Ngày này lớn hơn ngày lớn nhất",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames	: Date.monthNames,
+      dayNames		: Date.dayNames,
+      nextText          : 'Tháng sau (Control+Right)',
+      prevText          : 'Tháng trước (Control+Left)',
+      monthYearText     : 'Chọn một tháng (Control+Up/Down để thay đổi năm)',
+      todayTip          : "{0} (Spacebar - Phím trắng)",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "Trang",
+      afterPageText  : "of {0}",
+      firstText      : "Trang đầu",
+      prevText       : "Trang trước",
+      nextText       : "Trang sau",
+      lastText       : "Trang cuối",
+      refreshText    : "Tải lại",
+      displayMsg     : "Hiển thị {0} - {1} của {2}",
+      emptyMsg       : 'Không có dữ liệu để hiển thị'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "Chiều dài tối thiểu của ô này là {0}",
+      maxLengthText : "Chiều dài tối đa của ô này là {0}",
+      blankText     : "Ô này cần phải nhập giá trị",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "Giá trị nhỏ nhất của ô này là {0}",
+      maxText : "Giá trị lớn nhất của ô này là  {0}",
+      nanText : "{0} hông phải là một số hợp lệ"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "Vô hiệu",
+      disabledDatesText : "Vô hiệu",
+      minText           : "Ngày nhập trong ô này phải sau ngày {0}",
+      maxText           : "Ngày nhập trong ô này phải trước ngày {0}",
+      invalidText       : "{0} không phải là một ngày hợp lệ - phải có dạng {1}",
+      format            : "d/m/y"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "Đang tải...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : 'Giá trị của ô này phải là một địa chỉ email có dạng như "ten@abc.com"',
+      urlText      : 'Giá trị của ô này phải là một địa chỉ web(URL) hợp lệ, có dạng như "http:/'+'/www.example.com"',
+      alphaText    : 'Ô này chỉ được nhập các kí tự và gạch dưới(_)',
+      alphanumText : 'Ô này chỉ được nhập các kí tự, số và gạch dưới(_)'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "Tăng dần",
+      sortDescText : "Giảm dần",
+      lockText     : "Khóa cột",
+      unlockText   : "Bỏ khóa cột",
+      columnsText  : "Các cột"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "Tên",
+      valueText  : "Giá trị",
+      dateFormat : "j/m/Y"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "Kéo giữ chuột để thay đổi kích thước.",
+      collapsibleSplitTip : "Kéo giữ chuột để thay đổi kích thước. Nhấp đúp để ẩn đi."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_CN.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_CN.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_CN.js	(revision 625)
@@ -0,0 +1,174 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
+ * Simplified Chinese translation
+ * By DavidHu
+ * 09 April 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">加载中...</div>';
+
+if(Ext.View){
+   Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+   Ext.grid.GridPanel.prototype.ddText = "{0} 选择行";
+}
+
+if(Ext.TabPanelItem){
+   Ext.TabPanelItem.prototype.closeText = "关闭";
+}
+
+if(Ext.form.Field){
+   Ext.form.Field.prototype.invalidText = "输入值非法";
+}
+
+Date.monthNames = [
+   "一月",
+   "二月",
+   "三月",
+   "四月",
+   "五月",
+   "六月",
+   "七月",
+   "八月",
+   "九月",
+   "十月",
+   "十一月",
+   "十二月"
+];
+
+Date.dayNames = [
+   "日",
+   "一",
+   "二",
+   "三",
+   "四",
+   "五",
+   "六"
+];
+
+if(Ext.MessageBox){
+   Ext.MessageBox.buttonText = {
+      ok     : "确定",
+      cancel : "取消",
+      yes    : "是",
+      no     : "否"
+   };
+}
+
+if(Ext.util.Format){
+   Ext.util.Format.date = function(v, format){
+      if(!v) return "";
+      if(!(v instanceof Date)) v = new Date(Date.parse(v));
+      return v.dateFormat(format || "y年m月d日");
+   };
+}
+
+if(Ext.DatePicker){
+   Ext.apply(Ext.DatePicker.prototype, {
+      todayText         : "今天",
+      minText           : "日期在最小日期之前",
+      maxText           : "日期在最大日期之后",
+      disabledDaysText  : "",
+      disabledDatesText : "",
+      monthNames        : Date.monthNames,
+      dayNames          : Date.dayNames,
+      nextText          : '下月 (Control+Right)',
+      prevText          : '上月 (Control+Left)',
+      monthYearText     : '选择一个月 (Control+Up/Down 来改变年)',
+      todayTip          : "{0} (空格键选择)",
+      format            : "y年m月d日",
+      okText            : "确定",
+      cancelText        : "取消"
+   });
+}
+
+if(Ext.PagingToolbar){
+   Ext.apply(Ext.PagingToolbar.prototype, {
+      beforePageText : "页",
+      afterPageText  : "页共 {0} 页",
+      firstText      : "第一页",
+      prevText       : "前一页",
+      nextText       : "下一页",
+      lastText       : "最后页",
+      refreshText    : "刷新",
+      displayMsg     : "显示 {0} - {1}，共 {2} 条",
+      emptyMsg       : '没有数据需要显示'
+   });
+}
+
+if(Ext.form.TextField){
+   Ext.apply(Ext.form.TextField.prototype, {
+      minLengthText : "该输入项的最小长度是 {0}",
+      maxLengthText : "该输入项的最大长度是 {0}",
+      blankText     : "该输入项为必输项",
+      regexText     : "",
+      emptyText     : null
+   });
+}
+
+if(Ext.form.NumberField){
+   Ext.apply(Ext.form.NumberField.prototype, {
+      minText : "该输入项的最小值是 {0}",
+      maxText : "该输入项的最大值是 {0}",
+      nanText : "{0} 不是有效数值"
+   });
+}
+
+if(Ext.form.DateField){
+   Ext.apply(Ext.form.DateField.prototype, {
+      disabledDaysText  : "禁用",
+      disabledDatesText : "禁用",
+      minText           : "该输入项的日期必须在 {0} 之后",
+      maxText           : "该输入项的日期必须在 {0} 之前",
+      invalidText       : "{0} 是无效的日期 - 必须符合格式： {1}",
+      format            : "y年m月d日"
+   });
+}
+
+if(Ext.form.ComboBox){
+   Ext.apply(Ext.form.ComboBox.prototype, {
+      loadingText       : "加载...",
+      valueNotFoundText : undefined
+   });
+}
+
+if(Ext.form.VTypes){
+   Ext.apply(Ext.form.VTypes, {
+      emailText    : '该输入项必须是电子邮件地址，格式如： "user@example.com"',
+      urlText      : '该输入项必须是URL地址，格式如： "http:/'+'/www.example.com"',
+      alphaText    : '该输入项只能包含字符和_',
+      alphanumText : '该输入项只能包含字符,数字和_'
+   });
+}
+
+if(Ext.grid.GridView){
+   Ext.apply(Ext.grid.GridView.prototype, {
+      sortAscText  : "正序",
+      sortDescText : "逆序",
+      lockText     : "锁列",
+      unlockText   : "解锁列",
+      columnsText  : "列"
+   });
+}
+
+if(Ext.grid.PropertyColumnModel){
+   Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+      nameText   : "名称",
+      valueText  : "值",
+      dateFormat : "y年m月d日"
+   });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+   Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+      splitTip            : "拖动来改变尺寸.",
+      collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏."
+   });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_TW.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_TW.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/locale/ext-lang-zh_TW.js	(revision 625)
@@ -0,0 +1,178 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+﻿/*
+ * Traditional Chinese translation
+ * By hata1234
+ * 09 April 2007
+ */
+
+Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">讀取中...</div>';
+
+if(Ext.View){
+    Ext.View.prototype.emptyText = "";
+}
+
+if(Ext.grid.GridPanel){
+    Ext.grid.GridPanel.prototype.ddText = "選擇了 {0} 行";
+}
+
+if(Ext.TabPanelItem){
+    Ext.TabPanelItem.prototype.closeText = "關閉此標籤";
+}
+
+if(Ext.form.Field){
+    Ext.form.Field.prototype.invalidText = "數值不符合欄位規定";
+}
+
+if(Ext.LoadMask){
+    Ext.LoadMask.prototype.msg = "讀取中...";
+}
+
+Date.monthNames = [
+    "一月",
+    "二月",
+    "三月",
+    "四月",
+    "五月",
+    "六月",
+    "七月",
+    "八月",
+    "九月",
+    "十月",
+    "十一月",
+    "十二月"
+];
+
+Date.dayNames = [
+    "日",
+    "一",
+    "二",
+    "三",
+    "四",
+    "五",
+    "六"
+];
+
+if(Ext.MessageBox){
+    Ext.MessageBox.buttonText = {
+        ok : "確定",
+        cancel : "取消",
+        yes : "是",
+        no : "否"
+    };
+}
+
+if(Ext.util.Format){
+    Ext.util.Format.date = function(v, format){
+       if(!v) return "";
+       if(!(v instanceof Date)) v = new Date(Date.parse(v));
+       return v.dateFormat(format || "Y/m/d");
+    };
+}
+
+if(Ext.DatePicker){
+    Ext.apply(Ext.DatePicker.prototype, {
+       todayText         : "今天",
+       minText           : "日期必須大於最小容許日期",
+       maxText           : "日期必須小於最大容許日期",
+       disabledDaysText  : "",
+       disabledDatesText : "",
+       monthNames        : Date.monthNames,
+       dayNames          : Date.dayNames,
+       nextText          : "下個月 (Ctrl+右方向鍵)",
+       prevText          : "上個月 (Ctrl+左方向鍵)",
+       monthYearText     : "選擇月份 (Ctrl+上/下方向鍵選擇年份)",
+       todayTip          : "{0} (空白鍵)",
+       format            : "y/m/d",
+       okText            : "确定",
+       cancelText        : "取消"
+    });
+}
+
+if(Ext.PagingToolbar){
+    Ext.apply(Ext.PagingToolbar.prototype, {
+       beforePageText : "第",
+       afterPageText  : "頁，共{0}頁",
+       firstText      : "第一頁",
+       prevText       : "上一頁",
+       nextText       : "下一頁",
+       lastText       : "最後頁",
+       refreshText    : "重新整理",
+       displayMsg     : "顯示{0} - {1}筆,共{2}筆",
+       emptyMsg       : '沒有任何資料'
+    });
+}
+
+if(Ext.form.TextField){
+    Ext.apply(Ext.form.TextField.prototype, {
+       minLengthText : "此欄位最少要輸入 {0} 個字",
+       maxLengthText : "此欄位最多輸入 {0} 個字",
+       blankText     : "此欄位為必填",
+       regexText     : "",
+       emptyText     : null
+    });
+}
+
+if(Ext.form.NumberField){
+    Ext.apply(Ext.form.NumberField.prototype, {
+       minText : "此欄位之數值必須大於 {0}",
+       maxText : "此欄位之數值必須小於 {0}",
+       nanText : "{0} 不是合法的數字"
+    });
+}
+
+if(Ext.form.DateField){
+    Ext.apply(Ext.form.DateField.prototype, {
+       disabledDaysText  : "無法使用",
+       disabledDatesText : "無法使用",
+       minText           : "此欄位之日期必須在 {0} 之後",
+       maxText           : "此欄位之日期必須在 {0} 之前",
+       invalidText       : "{0} 不是正確的日期格式 - 必須像是 「 {1} 」 這樣的格式",
+       format            : "Y/m/d"
+    });
+}
+
+if(Ext.form.ComboBox){
+    Ext.apply(Ext.form.ComboBox.prototype, {
+       loadingText       : "讀取中 ...",
+       valueNotFoundText : undefined
+    });
+}
+
+if(Ext.form.VTypes){
+    Ext.apply(Ext.form.VTypes, {
+       emailText    : '此欄位必須輸入像 "user@example.com" 之E-Mail格式',
+       urlText      : '此欄位必須輸入像 "http:/'+'/www.example.com" 之網址格式',
+       alphaText    : '此欄位僅能輸入半形英文字母及底線( _ )符號',
+       alphanumText : '此欄位僅能輸入半形英文字母、數字及底線( _ )符號'
+    });
+}
+
+if(Ext.grid.GridView){
+    Ext.apply(Ext.grid.GridView.prototype, {
+       sortAscText  : "正向排序",
+       sortDescText : "反向排序",
+       lockText     : "鎖定欄位",
+       unlockText   : "解開欄位鎖定",
+       columnsText  : "欄位"
+    });
+}
+
+if(Ext.grid.PropertyColumnModel){
+    Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
+       nameText   : "名稱",
+       valueText  : "數值",
+       dateFormat : "Y/m/d"
+    });
+}
+
+if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){
+    Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
+       splitTip            : "拖曳縮放大小.",
+       collapsibleSplitTip : "拖曳縮放大小. 滑鼠雙擊隱藏."
+    });
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/state/CookieProvider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/state/CookieProvider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/state/CookieProvider.js	(revision 625)
@@ -0,0 +1,91 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
+/**
+ * @class Ext.state.CookieProvider
+ * @extends Ext.state.Provider
+ * The default Provider implementation which saves state via cookies.
+ * <br />Usage:
+ <pre><code>
+   var cp = new Ext.state.CookieProvider({
+       path: "/cgi-bin/",
+       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
+       domain: "extjs.com"
+   });
+   Ext.state.Manager.setProvider(cp);
+ </code></pre>
+ * @cfg {String} path The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
+ * @cfg {Date} expires The cookie expiration date (defaults to 7 days from now)
+ * @cfg {String} domain The domain to save the cookie for.  Note that you cannot specify a different domain than
+ * your page is on, but you can specify a sub-domain, or simply the domain itself like 'extjs.com' to include
+ * all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same
+ * domain the page is running on including the 'www' like 'www.extjs.com')
+ * @cfg {Boolean} secure True if the site is using SSL (defaults to false)
+ * @constructor
+ * Create a new CookieProvider
+ * @param {Object} config The configuration object
+ */
+Ext.state.CookieProvider = function(config){
+    Ext.state.CookieProvider.superclass.constructor.call(this);
+    this.path = "/";
+    this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days
+    this.domain = null;
+    this.secure = false;
+    Ext.apply(this, config);
+    this.state = this.readCookies();
+};
+
+Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, {
+    // private
+    set : function(name, value){
+        if(typeof value == "undefined" || value === null){
+            this.clear(name);
+            return;
+        }
+        this.setCookie(name, value);
+        Ext.state.CookieProvider.superclass.set.call(this, name, value);
+    },
+
+    // private
+    clear : function(name){
+        this.clearCookie(name);
+        Ext.state.CookieProvider.superclass.clear.call(this, name);
+    },
+
+    // private
+    readCookies : function(){
+        var cookies = {};
+        var c = document.cookie + ";";
+        var re = /\s?(.*?)=(.*?);/g;
+    	var matches;
+    	while((matches = re.exec(c)) != null){
+            var name = matches[1];
+            var value = matches[2];
+            if(name && name.substring(0,3) == "ys-"){
+                cookies[name.substr(3)] = this.decodeValue(value);
+            }
+        }
+        return cookies;
+    },
+
+    // private
+    setCookie : function(name, value){
+        document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
+           ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
+           ((this.path == null) ? "" : ("; path=" + this.path)) +
+           ((this.domain == null) ? "" : ("; domain=" + this.domain)) +
+           ((this.secure == true) ? "; secure" : "");
+    },
+
+    // private
+    clearCookie : function(name){
+        document.cookie = "ys-" + name + "=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" : "");
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/state/Provider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/state/Provider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/state/Provider.js	(revision 625)
@@ -0,0 +1,127 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.state.Provider
+ * Abstract base class for state provider implementations. This class provides methods
+ * for encoding and decoding <b>typed</b> variables including dates and defines the
+ * Provider interface.
+ */
+Ext.state.Provider = function(){
+    /**
+     * @event statechange
+     * Fires when a state change occurs.
+     * @param {Provider} this This state provider
+     * @param {String} key The state key which was changed
+     * @param {String} value The encoded value for the state
+     */
+    this.addEvents("statechange");
+    this.state = {};
+    Ext.state.Provider.superclass.constructor.call(this);
+};
+Ext.extend(Ext.state.Provider, Ext.util.Observable, {
+    /**
+     * Returns the current value for a key
+     * @param {String} name The key name
+     * @param {Mixed} defaultValue A default value to return if the key's value is not found
+     * @return {Mixed} The state data
+     */
+    get : function(name, defaultValue){
+        return typeof this.state[name] == "undefined" ?
+            defaultValue : this.state[name];
+    },
+
+    /**
+     * Clears a value from the state
+     * @param {String} name The key name
+     */
+    clear : function(name){
+        delete this.state[name];
+        this.fireEvent("statechange", this, name, null);
+    },
+
+    /**
+     * Sets the value for a key
+     * @param {String} name The key name
+     * @param {Mixed} value The value to set
+     */
+    set : function(name, value){
+        this.state[name] = value;
+        this.fireEvent("statechange", this, name, value);
+    },
+
+    /**
+     * Decodes a string previously encoded with {@link #encodeValue}.
+     * @param {String} value The value to decode
+     * @return {Mixed} The decoded value
+     */
+    decodeValue : function(cookie){
+        var re = /^(a|n|d|b|s|o)\:(.*)$/;
+        var matches = re.exec(unescape(cookie));
+        if(!matches || !matches[1]) return; // non state cookie
+        var type = matches[1];
+        var v = matches[2];
+        switch(type){
+            case "n":
+                return parseFloat(v);
+            case "d":
+                return new Date(Date.parse(v));
+            case "b":
+                return (v == "1");
+            case "a":
+                var all = [];
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    all.push(this.decodeValue(values[i]));
+                }
+                return all;
+           case "o":
+                var all = {};
+                var values = v.split("^");
+                for(var i = 0, len = values.length; i < len; i++){
+                    var kv = values[i].split("=");
+                    all[kv[0]] = this.decodeValue(kv[1]);
+                }
+                return all;
+           default:
+                return v;
+        }
+    },
+
+    /**
+     * Encodes a value including type information.  Decode with {@link #decodeValue}.
+     * @param {Mixed} value The value to encode
+     * @return {String} The encoded value
+     */
+    encodeValue : function(v){
+        var enc;
+        if(typeof v == "number"){
+            enc = "n:" + v;
+        }else if(typeof v == "boolean"){
+            enc = "b:" + (v ? "1" : "0");
+        }else if(Ext.isDate(v)){
+            enc = "d:" + v.toGMTString();
+        }else if(Ext.isArray(v)){
+            var flat = "";
+            for(var i = 0, len = v.length; i < len; i++){
+                flat += this.encodeValue(v[i]);
+                if(i != len-1) flat += "^";
+            }
+            enc = "a:" + flat;
+        }else if(typeof v == "object"){
+            var flat = "";
+            for(var key in v){
+                if(typeof v[key] != "function" && v[key] !== undefined){
+                    flat += key + "=" + this.encodeValue(v[key]) + "^";
+                }
+            }
+            enc = "o:" + flat.substring(0, flat.length-1);
+        }else{
+            enc = "s:" + v;
+        }
+        return escape(enc);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/state/StateManager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/state/StateManager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/state/StateManager.js	(revision 625)
@@ -0,0 +1,69 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.state.Manager
+ * This is the global state manager. By default all components that are "state aware" check this class
+ * for state information if you don't pass them a custom state provider. In order for this class
+ * to be useful, it must be initialized with a provider when your application initializes. Example usage:
+ <pre><code>
+// in your initialization function
+init : function(){
+   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+   var win = new Window(...);
+   win.restoreState();
+}
+ </code></pre>
+ * @singleton
+ */
+Ext.state.Manager = function(){
+    var provider = new Ext.state.Provider();
+
+    return {
+        /**
+         * Configures the default state provider for your application
+         * @param {Provider} stateProvider The state provider to set
+         */
+        setProvider : function(stateProvider){
+            provider = stateProvider;
+        },
+
+        /**
+         * Returns the current value for a key
+         * @param {String} name The key name
+         * @param {Mixed} defaultValue The default value to return if the key lookup does not match
+         * @return {Mixed} The state data
+         */
+        get : function(key, defaultValue){
+            return provider.get(key, defaultValue);
+        },
+
+        /**
+         * Sets the value for a key
+         * @param {String} name The key name
+         * @param {Mixed} value The state data
+         */
+         set : function(key, value){
+            provider.set(key, value);
+        },
+
+        /**
+         * Clears a value from the state
+         * @param {String} name The key name
+         */
+        clear : function(key){
+            provider.clear(key);
+        },
+
+        /**
+         * Gets the currently configured state provider
+         * @return {Provider} The state provider
+         */
+        getProvider : function(){
+            return provider;
+        }
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/CSS.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/CSS.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/CSS.js	(revision 625)
@@ -0,0 +1,161 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.CSS
+ * Utility class for manipulating CSS rules
+ * @singleton
+ */
+Ext.util.CSS = function(){
+	var rules = null;
+   	var doc = document;
+
+    var camelRe = /(-[a-z])/gi;
+    var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); };
+
+   return {
+   /**
+    * Creates a stylesheet from a text blob of rules.
+    * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.
+    * @param {String} cssText The text containing the css rules
+    * @param {String} id An id to add to the stylesheet for later removal
+    * @return {StyleSheet}
+    */
+   createStyleSheet : function(cssText, id){
+       var ss;
+       var head = doc.getElementsByTagName("head")[0];
+       var rules = doc.createElement("style");
+       rules.setAttribute("type", "text/css");
+       if(id){
+           rules.setAttribute("id", id);
+       }
+       if(Ext.isIE){
+           head.appendChild(rules);
+           ss = rules.styleSheet;
+           ss.cssText = cssText;
+       }else{
+           try{
+                rules.appendChild(doc.createTextNode(cssText));
+           }catch(e){
+               rules.cssText = cssText;
+           }
+           head.appendChild(rules);
+           ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
+       }
+       this.cacheStyleSheet(ss);
+       return ss;
+   },
+
+   /**
+    * Removes a style or link tag by id
+    * @param {String} id The id of the tag
+    */
+   removeStyleSheet : function(id){
+       var existing = doc.getElementById(id);
+       if(existing){
+           existing.parentNode.removeChild(existing);
+       }
+   },
+
+   /**
+    * Dynamically swaps an existing stylesheet reference for a new one
+    * @param {String} id The id of an existing link tag to remove
+    * @param {String} url The href of the new stylesheet to include
+    */
+   swapStyleSheet : function(id, url){
+       this.removeStyleSheet(id);
+       var ss = doc.createElement("link");
+       ss.setAttribute("rel", "stylesheet");
+       ss.setAttribute("type", "text/css");
+       ss.setAttribute("id", id);
+       ss.setAttribute("href", url);
+       doc.getElementsByTagName("head")[0].appendChild(ss);
+   },
+   
+   /**
+    * Refresh the rule cache if you have dynamically added stylesheets
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   refreshCache : function(){
+       return this.getRules(true);
+   },
+
+   // private
+   cacheStyleSheet : function(ss){
+       if(!rules){
+           rules = {};
+       }
+       try{// try catch for cross domain access issue
+           var ssRules = ss.cssRules || ss.rules;
+           for(var j = ssRules.length-1; j >= 0; --j){
+               rules[ssRules[j].selectorText] = ssRules[j];
+           }
+       }catch(e){}
+   },
+   
+   /**
+    * Gets all css rules for the document
+    * @param {Boolean} refreshCache true to refresh the internal cache
+    * @return {Object} An object (hash) of rules indexed by selector
+    */
+   getRules : function(refreshCache){
+   		if(rules === null || refreshCache){
+   			rules = {};
+   			var ds = doc.styleSheets;
+   			for(var i =0, len = ds.length; i < len; i++){
+   			    try{
+    		        this.cacheStyleSheet(ds[i]);
+    		    }catch(e){} 
+	        }
+   		}
+   		return rules;
+   	},
+   	
+   	/**
+    * Gets an an individual CSS rule by selector(s)
+    * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned.
+    * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically
+    * @return {CSSRule} The CSS rule or null if one is not found
+    */
+   getRule : function(selector, refreshCache){
+   		var rs = this.getRules(refreshCache);
+   		if(!Ext.isArray(selector)){
+   		    return rs[selector];
+   		}
+   		for(var i = 0; i < selector.length; i++){
+			if(rs[selector[i]]){
+				return rs[selector[i]];
+			}
+		}
+		return null;
+   	},
+   	
+   	
+   	/**
+    * Updates a rule property
+    * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+    * @param {String} property The css property
+    * @param {String} value The new value for the property
+    * @return {Boolean} true If a rule was found and updated
+    */
+   updateRule : function(selector, property, value){
+   		if(!Ext.isArray(selector)){
+   			var rule = this.getRule(selector);
+   			if(rule){
+   				rule.style[property.replace(camelRe, camelFn)] = value;
+   				return true;
+   			}
+   		}else{
+   			for(var i = 0; i < selector.length; i++){
+   				if(this.updateRule(selector[i], property, value)){
+   					return true;
+   				}
+   			}
+   		}
+   		return false;
+   	}
+   };	
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/ClickRepeater.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/ClickRepeater.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/ClickRepeater.js	(revision 625)
@@ -0,0 +1,200 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ @class Ext.util.ClickRepeater
+ @extends Ext.util.Observable
+
+ A wrapper class which can be applied to any element. Fires a "click" event while the
+ mouse is pressed. The interval between firings may be specified in the config but
+ defaults to 20 milliseconds.
+
+ Optionally, a CSS class may be applied to the element during the time it is pressed.
+
+ @cfg {Mixed} el The element to act as a button.
+ @cfg {Number} delay The initial delay before the repeating event begins firing.
+ Similar to an autorepeat key delay.
+ @cfg {Number} interval The interval between firings of the "click" event. Default 20 ms.
+ @cfg {String} pressClass A CSS class name to be applied to the element while pressed.
+ @cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate.
+           "interval" and "delay" are ignored.
+ @cfg {Boolean} preventDefault True to prevent the default click event
+ @cfg {Boolean} stopDefault True to stop the default click event
+
+ @history
+    2007-02-02 jvs Original code contributed by Nige "Animal" White
+    2007-02-02 jvs Renamed to ClickRepeater
+    2007-02-03 jvs Modifications for FF Mac and Safari
+
+ @constructor
+ @param {Mixed} el The element to listen on
+ @param {Object} config
+ */
+Ext.util.ClickRepeater = function(el, config)
+{
+    this.el = Ext.get(el);
+    this.el.unselectable();
+
+    Ext.apply(this, config);
+
+    this.addEvents(
+    /**
+     * @event mousedown
+     * Fires when the mouse button is depressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mousedown",
+    /**
+     * @event click
+     * Fires on a specified interval during the time the element is pressed.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "click",
+    /**
+     * @event mouseup
+     * Fires when the mouse key is released.
+     * @param {Ext.util.ClickRepeater} this
+     */
+        "mouseup"
+    );
+
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+
+    // allow inline handler
+    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,
+
+    /**
+     * Enables the repeater and allows events to fire.
+     */
+    enable: function(){
+        if(this.disabled){
+            this.el.on('mousedown', this.handleMouseDown, this);
+            if(this.preventDefault || this.stopDefault){
+                this.el.on('click', this.eventOptions, this);
+            }
+        }
+        this.disabled = false;
+    },
+    
+    /**
+     * Disables the repeater and stops events from firing.
+     */
+    disable: function(/* private */ force){
+        if(force || !this.disabled){
+            clearTimeout(this.timer);
+            if(this.pressClass){
+                this.el.removeClass(this.pressClass);
+            }
+            Ext.getDoc().un('mouseup', this.handleMouseUp, this);
+            this.el.removeAllListeners();
+        }
+        this.disabled = true;
+    },
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled: function(disabled){
+        this[disabled ? 'disable' : 'enable']();    
+    },
+    
+    eventOptions: function(e){
+        if(this.preventDefault){
+            e.preventDefault();
+        }
+        if(this.stopDefault){
+            e.stopEvent();
+        }       
+    },
+    
+    // private
+    destroy : function() {
+        this.disable(true);
+        Ext.destroy(this.el);
+        this.purgeListeners();
+    },
+    
+    // private
+    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);
+
+//      Do not honor delay or interval if acceleration wanted.
+        if (this.accelerate) {
+            this.delay = 400;
+	    }
+        this.timer = this.click.defer(this.delay || this.interval, this);
+    },
+
+    // private
+    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 (t, b, c, d) {
+        return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+    },
+
+    // private
+    handleMouseOut : function(){
+        clearTimeout(this.timer);
+        if(this.pressClass){
+            this.el.removeClass(this.pressClass);
+        }
+        this.el.on("mouseover", this.handleMouseReturn, this);
+    },
+
+    // private
+    handleMouseReturn : function(){
+        this.el.un("mouseover", this.handleMouseReturn, this);
+        if(this.pressClass){
+            this.el.addClass(this.pressClass);
+        }
+        this.click();
+    },
+
+    // private
+    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);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/Cookies.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/Cookies.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/Cookies.js	(revision 625)
@@ -0,0 +1,96 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.Cookies
+ * Utility class for managing and interacting with cookies.
+ * @singleton
+ */
+Ext.util.Cookies = {
+    /**
+     * Create a cookie with the specified name and value. Additional settings
+     * for the cookie may be optionally specified (for example: expiration,
+     * access restriction, SSL).
+     * @param {Object} name
+     * @param {Object} value
+     * @param {Object} expires (Optional) Specify an expiration date the
+     * cookie is to persist until.  Note that the specified Date object will
+     * be converted to Greenwich Mean Time (GMT). 
+     * @param {String} path (Optional) Setting a path on the cookie restricts
+     * access to pages that match that path. Defaults to all pages (<tt>'/'</tt>). 
+     * @param {String} domain (Optional) Setting a domain restricts access to
+     * pages on a given domain (typically used to allow cookie access across
+     * subdomains). For example, "extjs.com" will create a cookie that can be
+     * accessed from any subdomain of extjs.com, including www.extjs.com,
+     * support.extjs.com, etc.
+     * @param {Boolean} secure (Optional) Specify true to indicate that the cookie
+     * should only be accessible via SSL on a page using the HTTPS protocol.
+     * Defaults to <tt>false</tt>. Note that this will only work if the page
+     * calling this code uses the HTTPS protocol, otherwise the cookie will be
+     * created with default options.
+     */
+    set : function(name, value){
+        var argv = arguments;
+        var argc = arguments.length;
+        var expires = (argc > 2) ? argv[2] : null;
+        var path = (argc > 3) ? argv[3] : '/';
+        var domain = (argc > 4) ? argv[4] : null;
+        var secure = (argc > 5) ? argv[5] : false;
+        document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : "");
+    },
+
+    /**
+     * Retrieves cookies that are accessible by the current page. If a cookie
+     * does not exist, <code>get()</code> returns <tt>null</tt>.  The following
+     * example retrieves the cookie called "valid" and stores the String value
+     * in the variable <tt>validStatus</tt>.
+     * <pre><code>
+     * var validStatus = Ext.util.Cookies.get("valid");
+     * </code></pre>
+     * @param {Object} name The name of the cookie to get
+     * @return {Mixed} Returns the cookie value for the specified name;
+     * null if the cookie name does not exist.
+     */
+    get : function(name){
+        var arg = name + "=";
+        var alen = arg.length;
+        var clen = document.cookie.length;
+        var i = 0;
+        var j = 0;
+        while(i < clen){
+            j = i + alen;
+            if(document.cookie.substring(i, j) == arg){
+                return Ext.util.Cookies.getCookieVal(j);
+            }
+            i = document.cookie.indexOf(" ", i) + 1;
+            if(i === 0){
+                break;
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Removes a cookie with the provided name from the browser
+     * if found.
+     * @param {Object} name The name of the cookie to remove
+     */
+    clear : function(name){
+        if(Ext.util.Cookies.get(name)){
+            document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
+        }
+    },
+    /**
+     * @private
+     */
+    getCookieVal : function(offset){
+        var endstr = document.cookie.indexOf(";", offset);
+        if(endstr == -1){
+            endstr = document.cookie.length;
+        }
+        return unescape(document.cookie.substring(offset, endstr));
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/Date.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/Date.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/Date.js	(revision 625)
@@ -0,0 +1,1317 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Date
+ *
+ * The date parsing and formatting syntax contains a subset of
+ * <a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are
+ * supported will provide results equivalent to their PHP versions.
+ *
+ * The following is a list of all currently supported formats:
+ * <pre>
+Format  Description                                                               Example returned values
+------  -----------------------------------------------------------------------   -----------------------
+  d     Day of the month, 2 digits with leading zeros                             01 to 31
+  D     A short textual representation of the day of the week                     Mon to Sun
+  j     Day of the month without leading zeros                                    1 to 31
+  l     A full textual representation of the day of the week                      Sunday to Saturday
+  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
+  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
+  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
+  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
+  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
+  F     A full textual representation of a month, such as January or March        January to December
+  m     Numeric representation of a month, with leading zeros                     01 to 12
+  M     A short textual representation of a month                                 Jan to Dec
+  n     Numeric representation of a month, without leading zeros                  1 to 12
+  t     Number of days in the given month                                         28 to 31
+  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
+  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
+        belongs to the previous or next year, that year is used instead)
+  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
+  y     A two digit representation of a year                                      Examples: 99 or 03
+  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
+  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
+  g     12-hour format of an hour without leading zeros                           1 to 12
+  G     24-hour format of an hour without leading zeros                           0 to 23
+  h     12-hour format of an hour with leading zeros                              01 to 12
+  H     24-hour format of an hour with leading zeros                              00 to 23
+  i     Minutes, with leading zeros                                               00 to 59
+  s     Seconds, with leading zeros                                               00 to 59
+  u     Decimal fraction of a second                                              Examples:
+        (minimum 1 digit, arbitrary number of digits allowed)                     001 (i.e. 0.001s) or
+                                                                                  100 (i.e. 0.100s) or
+                                                                                  999 (i.e. 0.999s) or
+                                                                                  999876543210 (i.e. 0.999876543210s)
+  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
+  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
+  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
+  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
+  c     ISO 8601 date
+        Notes:                                                                    Examples:
+        1) If unspecified, the month / day defaults to the current month / day,   1991 or
+           the time defaults to midnight, while the timezone defaults to the      1992-10 or
+           browser's timezone. If a time is specified, it must include both hours 1993-09-20 or
+           and minutes. The "T" delimiter, seconds, milliseconds and timezone     1994-08-19T16:20+01:00 or
+           are optional.                                                          1995-07-18T17:21:28-02:00 or
+        2) The decimal fraction of a second, if specified, must contain at        1996-06-17T18:22:29.98765+03:00 or
+           least 1 digit (there is no limit to the maximum number                 1997-05-16T19:23:30,12345-0400 or
+           of digits allowed), and may be delimited by either a '.' or a ','      1998-04-15T20:24:31.2468Z or
+        Refer to the examples on the right for the various levels of              1999-03-14T20:24:32Z or
+        date-time granularity which are supported, or see                         2000-02-13T21:25:33
+        http://www.w3.org/TR/NOTE-datetime for more info.                         2001-01-12 22:26:34
+  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
+  M$    Microsoft AJAX serialized dates                                           \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
+                                                                                  \/Date(1238606590509+0800)\/
+</pre>
+ *
+ * Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
+ * <pre><code>
+// Sample date:
+// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
+
+var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
+document.write(dt.format('Y-m-d'));                           // 2007-01-10
+document.write(dt.format('F j, Y, g:i a'));                   // January 10, 2007, 3:05 pm
+document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
+</code></pre>
+ *
+ * Here are some standard date/time patterns that you might find helpful.  They
+ * are not part of the source of Date.js, but to use them you can simply copy this
+ * block of code into any script that is included after Date.js and they will also become
+ * globally available on the Date object.  Feel free to add or remove patterns as needed in your code.
+ * <pre><code>
+Date.patterns = {
+    ISO8601Long:"Y-m-d H:i:s",
+    ISO8601Short:"Y-m-d",
+    ShortDate: "n/j/Y",
+    LongDate: "l, F d, Y",
+    FullDateTime: "l, F d, Y g:i:s A",
+    MonthDay: "F d",
+    ShortTime: "g:i A",
+    LongTime: "g:i:s A",
+    SortableDateTime: "Y-m-d\\TH:i:s",
+    UniversalSortableDateTime: "Y-m-d H:i:sO",
+    YearMonth: "F, Y"
+};
+</code></pre>
+ *
+ * Example usage:
+ * <pre><code>
+var dt = new Date();
+document.write(dt.format(Date.patterns.ShortDate));
+</code></pre>
+ * <p>Developer-written, custom formats may be used by supplying both a formatting and a parsing function
+ * which perform to specialized requirements. The functions are stored in {@link #parseFunctions} and {@link #formatFunctions}.</p>
+ */
+
+/*
+ * Most of the date-formatting functions below are the excellent work of Baron Schwartz.
+ * (see http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/)
+ * They generate precompiled functions from format patterns instead of parsing and
+ * processing each pattern every time a date is formatted. These functions are available
+ * on every Date object.
+ */
+
+(function() {
+
+/**
+ * Global flag which determines if strict date parsing should be used.
+ * Strict date parsing will not roll-over invalid dates, which is the
+ * default behaviour of javascript Date objects.
+ * (see {@link #parseDate} for more information)
+ * Defaults to <tt>false</tt>.
+ * @static
+ * @type Boolean
+*/
+Date.useStrict = false;
+
+
+// create private copy of Ext's String.format() method
+// - to remove unnecessary dependency
+// - to resolve namespace conflict with M$-Ajax's implementation
+function xf(format) {
+    var args = Array.prototype.slice.call(arguments, 1);
+    return format.replace(/\{(\d+)\}/g, function(m, i) {
+        return args[i];
+    });
+}
+
+
+// private
+Date.formatCodeToRegex = function(character, currentGroup) {
+    // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below)
+    var p = Date.parseCodes[character];
+
+    if (p) {
+      p = typeof p == 'function'? p() : p;
+      Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
+    }
+
+    return p? Ext.applyIf({
+      c: p.c? xf(p.c, currentGroup || "{0}") : p.c
+    }, p) : {
+        g:0,
+        c:null,
+        s:Ext.escapeRe(character) // treat unrecognised characters as literals
+    }
+}
+
+// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
+var $f = Date.formatCodeToRegex;
+
+Ext.apply(Date, {
+    /**
+     * <p>An object hash in which each property is a date parsing function. The property name is the
+     * format string which that function parses.</p>
+     * <p>This object is automatically populated with date parsing functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom parsing functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #parseDate}.<p>
+     * <p>Example:</p><pre><code>
+Date.parseFunctions['x-date-format'] = myDateParser;
+</code></pre>
+     * <p>A parsing function should return a Date object, and is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : String<div class="sub-desc">The date string to parse.</div></li>
+     * <li><code>strict</code> : Boolean<div class="sub-desc">True to validate date strings while parsing
+     * (i.e. prevent javascript Date "rollover") (The default must be false).
+     * Invalid date strings should return null when parsed.</div></li>
+     * </ul></div></p>
+     * <p>To enable Dates to also be <i>formatted</i> according to that format, a corresponding
+     * formatting function must be placed into the {@link #formatFunctions} property.
+     * @property parseFunctions
+     * @static
+     * @type Object
+     */
+    parseFunctions: {
+        "M$": function(input, strict) {
+            // note: the timezone offset is ignored since the M$ Ajax server sends
+            // a UTC milliseconds-since-Unix-epoch value (negative values are allowed)
+            var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/');
+            var r = (input || '').match(re);
+            return r? new Date(((r[1] || '') + r[2]) * 1) : null;
+        }
+    },
+    parseRegexes: [],
+
+    /**
+     * <p>An object hash in which each property is a date formatting function. The property name is the
+     * format string which corresponds to the produced formatted date string.</p>
+     * <p>This object is automatically populated with date formatting functions as
+     * date formats are requested for Ext standard formatting strings.</p>
+     * <p>Custom formatting functions may be inserted into this object, keyed by a name which from then on
+     * may be used as a format string to {@link #format}. Example:</p><pre><code>
+Date.formatFunctions['x-date-format'] = myDateFormatter;
+</code></pre>
+     * <p>A formatting function should return a string repesentation of the passed Date object:<div class="mdetail-params"><ul>
+     * <li><code>date</code> : Date<div class="sub-desc">The Date to format.</div></li>
+     * </ul></div></p>
+     * <p>To enable date strings to also be <i>parsed</i> according to that format, a corresponding
+     * parsing function must be placed into the {@link #parseFunctions} property.
+     * @property formatFunctions
+     * @static
+     * @type Object
+     */
+    formatFunctions: {
+        "M$": function() {
+            // UTC milliseconds since Unix epoch (M$-AJAX serialized date format (MRSF))
+            return '\\/Date(' + this.getTime() + ')\\/';
+        }
+    },
+
+    y2kYear : 50,
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MILLI : "ms",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    SECOND : "s",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MINUTE : "mi",
+
+    /** Date interval constant
+     * @static
+     * @type String
+     */
+    HOUR : "h",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    DAY : "d",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    MONTH : "mo",
+
+    /**
+     * Date interval constant
+     * @static
+     * @type String
+     */
+    YEAR : "y",
+
+    /**
+     * <p>An object hash containing default date values used during date parsing.</p>
+     * <p>The following properties are available:<div class="mdetail-params"><ul>
+     * <li><code>y</code> : Number<div class="sub-desc">The default year value. (defaults to undefined)</div></li>
+     * <li><code>m</code> : Number<div class="sub-desc">The default 1-based month value. (defaults to undefined)</div></li>
+     * <li><code>d</code> : Number<div class="sub-desc">The default day value. (defaults to undefined)</div></li>
+     * <li><code>h</code> : Number<div class="sub-desc">The default hour value. (defaults to undefined)</div></li>
+     * <li><code>i</code> : Number<div class="sub-desc">The default minute value. (defaults to undefined)</div></li>
+     * <li><code>s</code> : Number<div class="sub-desc">The default second value. (defaults to undefined)</div></li>
+     * <li><code>ms</code> : Number<div class="sub-desc">The default millisecond value. (defaults to undefined)</div></li>
+     * </ul></div></p>
+     * <p>Override these properties to customize the default date values used by the {@link #parseDate} method.</p>
+     * <p><b>Note: In countries which experience Daylight Saving Time (i.e. DST), the <tt>h</tt>, <tt>i</tt>, <tt>s</tt>
+     * and <tt>ms</tt> properties may coincide with the exact time in which DST takes effect.
+     * It is the responsiblity of the developer to account for this.</b></p>
+     * Example Usage:
+     * <pre><code>
+// set default day value to the first day of the month
+Date.defaults.d = 1;
+
+// parse a February date string containing only year and month values.
+// setting the default day value to 1 prevents weird date rollover issues
+// when attempting to parse the following date string on, for example, March 31st 2009.
+Date.parseDate('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
+</code></pre>
+     * @property defaults
+     * @static
+     * @type Object
+     */
+    defaults: {},
+
+    /**
+     * An array of textual day names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.dayNames = [
+    'SundayInYourLang',
+    'MondayInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    dayNames : [
+        "Sunday",
+        "Monday",
+        "Tuesday",
+        "Wednesday",
+        "Thursday",
+        "Friday",
+        "Saturday"
+    ],
+
+    /**
+     * An array of textual month names.
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNames = [
+    'JanInYourLang',
+    'FebInYourLang',
+    ...
+];
+</code></pre>
+     * @type Array
+     * @static
+     */
+    monthNames : [
+        "January",
+        "February",
+        "March",
+        "April",
+        "May",
+        "June",
+        "July",
+        "August",
+        "September",
+        "October",
+        "November",
+        "December"
+    ],
+
+    /**
+     * An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive).
+     * Override these values for international dates.
+     * Example:
+     * <pre><code>
+Date.monthNumbers = {
+    'ShortJanNameInYourLang':0,
+    'ShortFebNameInYourLang':1,
+    ...
+};
+</code></pre>
+     * @type Object
+     * @static
+     */
+    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
+    },
+
+    /**
+     * Get the short month name for the given month number.
+     * Override this function for international dates.
+     * @param {Number} month A zero-based javascript month number.
+     * @return {String} The short month name.
+     * @static
+     */
+    getShortMonthName : function(month) {
+        return Date.monthNames[month].substring(0, 3);
+    },
+
+    /**
+     * Get the short day name for the given day number.
+     * Override this function for international dates.
+     * @param {Number} day A zero-based javascript day number.
+     * @return {String} The short day name.
+     * @static
+     */
+    getShortDayName : function(day) {
+        return Date.dayNames[day].substring(0, 3);
+    },
+
+    /**
+     * Get the zero-based javascript month number for the given short/full month name.
+     * Override this function for international dates.
+     * @param {String} name The short/full month name.
+     * @return {Number} The zero-based javascript month number.
+     * @static
+     */
+    getMonthNumber : function(name) {
+        // handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive)
+        return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
+    },
+
+    /**
+     * The base format-code to formatting-function hashmap used by the {@link #format} method.
+     * Formatting functions are strings (or functions which return strings) which
+     * will return the appropriate value when evaluated in the context of the Date object
+     * from which the {@link #format} method is called.
+     * Add to / override these mappings for custom date formatting.
+     * Note: Date.format() treats characters as literals if an appropriate mapping cannot be found.
+     * Example:
+     * <pre><code>
+Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')";
+(new Date()).format("X"); // returns the current day of the month
+</code></pre>
+     * @type Object
+     * @static
+     */
+    formatCodes : {
+        d: "String.leftPad(this.getDate(), 2, '0')",
+        D: "Date.getShortDayName(this.getDay())", // get localised short day name
+        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())", // get localised short month name
+        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() { // ISO-8601 -- GMT format
+            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)); // treat T as a character literal
+            }
+            return code.join(" + ");
+        },
+        /*
+        c: function() { // ISO-8601 -- UTC format
+            return [
+              "this.getUTCFullYear()", "'-'",
+              "String.leftPad(this.getUTCMonth() + 1, 2, '0')", "'-'",
+              "String.leftPad(this.getUTCDate(), 2, '0')",
+              "'T'",
+              "String.leftPad(this.getUTCHours(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCMinutes(), 2, '0')", "':'",
+              "String.leftPad(this.getUTCSeconds(), 2, '0')",
+              "'Z'"
+            ].join(" + ");
+        },
+        */
+
+        U: "Math.round(this.getTime() / 1000)"
+    },
+
+    /**
+     * Checks if the passed Date parameters will cause a javascript Date "rollover".
+     * @param {Number} year 4-digit year
+     * @param {Number} month 1-based month-of-year
+     * @param {Number} day Day of month
+     * @param {Number} hour (optional) Hour
+     * @param {Number} minute (optional) Minute
+     * @param {Number} second (optional) Second
+     * @param {Number} millisecond (optional) Millisecond
+     * @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise.
+     * @static
+     */
+    isValid : function(y, m, d, h, i, s, ms) {
+        // setup defaults
+        h = h || 0;
+        i = i || 0;
+        s = s || 0;
+        ms = ms || 0;
+
+        var dt = new Date(y, m - 1, d, h, i, s, ms);
+
+        return y == dt.getFullYear() &&
+            m == dt.getMonth() + 1 &&
+            d == dt.getDate() &&
+            h == dt.getHours() &&
+            i == dt.getMinutes() &&
+            s == dt.getSeconds() &&
+            ms == dt.getMilliseconds();
+    },
+
+    /**
+     * Parses the passed string using the specified date format.
+     * Note that this function expects normal calendar dates, meaning that months are 1-based (i.e. 1 = January).
+     * The {@link #defaults} hash will be used for any date value (i.e. year, month, day, hour, minute, second or millisecond)
+     * which cannot be found in the passed string. If a corresponding default date value has not been specified in the {@link #defaults} hash,
+     * the current date's year, month, day or DST-adjusted zero-hour time value will be used instead.
+     * Keep in mind that the input date string must precisely match the specified format string
+     * in order for the parse operation to be successful (failed parse operations return a null value).
+     * <p>Example:</p><pre><code>
+//dt = Fri May 25 2007 (current date)
+var dt = new Date();
+
+//dt = Thu May 25 2006 (today&#39;s month/day in 2006)
+dt = Date.parseDate("2006", "Y");
+
+//dt = Sun Jan 15 2006 (all date parts specified)
+dt = Date.parseDate("2006-01-15", "Y-m-d");
+
+//dt = Sun Jan 15 2006 15:20:01
+dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d g:i:s A");
+
+// attempt to parse Sun Feb 29 2006 03:20:01 in strict mode
+dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
+</code></pre>
+     * @param {String} input The raw date string.
+     * @param {String} format The expected date string format.
+     * @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover")
+                        (defaults to false). Invalid date strings will return null when parsed.
+     * @return {Date} The parsed Date.
+     * @static
+     */
+    parseDate : function(input, format, strict) {
+        var p = Date.parseFunctions;
+        if (p[format] == null) {
+            Date.createParser(format);
+        }
+        return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict);
+    },
+
+    // private
+    getFormatCode : function(character) {
+        var f = Date.formatCodes[character];
+
+        if (f) {
+          f = typeof f == 'function'? f() : f;
+          Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
+        }
+
+        // note: unknown characters are treated as literals
+        return f || ("'" + String.escape(character) + "'");
+    },
+
+    // private
+    createFormat : function(format) {
+        var code = [],
+            special = false,
+            ch = '';
+
+        for (var i = 0; i < format.length; ++i) {
+            ch = format.charAt(i);
+            if (!special && ch == "\\") {
+                special = true;
+            } else if (special) {
+                special = false;
+                code.push("'" + String.escape(ch) + "'");
+            } else {
+                code.push(Date.getFormatCode(ch))
+            }
+        }
+        Date.formatFunctions[format] = new Function("return " + code.join('+'));
+    },
+
+    // private
+    createParser : function() {
+        var code = [
+            "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
+                "def = Date.defaults,",
+                "results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings
+
+            "if(results){",
+                "{1}",
+
+                "if(u != null){", // i.e. unix time is defined
+                    "v = new Date(u * 1000);", // give top priority to UNIX time
+                "}else{",
+                    // create Date object representing midnight of the current day;
+                    // this will provide us with our date defaults
+                    // (note: clearTime() handles Daylight Saving Time automatically)
+                    "dt = (new Date()).clearTime();",
+
+                    // date calculations (note: these calculations create a dependency on Ext.num())
+                    "y = y >= 0? y : Ext.num(def.y, dt.getFullYear());",
+                    "m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());",
+                    "d = d >= 0? d : Ext.num(def.d, dt.getDate());",
+
+                    // time calculations (note: these calculations create a dependency on Ext.num())
+                    "h  = h || Ext.num(def.h, dt.getHours());",
+                    "i  = i || Ext.num(def.i, dt.getMinutes());",
+                    "s  = s || Ext.num(def.s, dt.getSeconds());",
+                    "ms = ms || Ext.num(def.ms, dt.getMilliseconds());",
+
+                    "if(z >= 0 && y >= 0){",
+                        // both the year and zero-based day of year are defined and >= 0.
+                        // these 2 values alone provide sufficient info to create a full date object
+
+                        // create Date object representing January 1st for the given year
+                        "v = new Date(y, 0, 1, h, i, s, ms);",
+
+                        // then add day of year, checking for Date "rollover" if necessary
+                        "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);",
+                    "}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", // check for Date "rollover"
+                        "v = null;", // invalid date, so return null
+                    "}else{",
+                        // plain old Date object
+                        "v = new Date(y, m, d, h, i, s, ms);",
+                    "}",
+                "}",
+            "}",
+
+            "if(v){",
+                // favour UTC offset over GMT offset
+                "if(zz != null){",
+                    // reset to UTC, then add offset
+                    "v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);",
+                "}else if(o){",
+                    // reset to GMT, then add offset
+                    "v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));",
+                "}",
+            "}",
+
+            "return v;"
+        ].join('\n');
+
+        return function(format) {
+            var regexNum = Date.parseRegexes.length,
+                currentGroup = 1,
+                calc = [],
+                regex = [],
+                special = false,
+                ch = "";
+
+            for (var i = 0; i < format.length; ++i) {
+                ch = format.charAt(i);
+                if (!special && ch == "\\") {
+                    special = true;
+                } else if (special) {
+                    special = false;
+                    regex.push(String.escape(ch));
+                } else {
+                    var obj = $f(ch, currentGroup);
+                    currentGroup += obj.g;
+                    regex.push(obj.s);
+                    if (obj.g && obj.c) {
+                        calc.push(obj.c);
+                    }
+                }
+            }
+
+            Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", "i");
+            Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join('')));
+        }
+    }(),
+
+    // private
+    parseCodes : {
+        /*
+         * Notes:
+         * g = {Number} calculation group (0 or 1. only group 1 contributes to date calculations.)
+         * c = {String} calculation method (required for group 1. null for group 0. {0} = currentGroup - position in regex result array)
+         * s = {String} regex pattern. all matches are stored in results[], and are accessible by the calculation mapped to 'c'
+         */
+        d: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // day of month with leading zeroes (01 - 31)
+        },
+        j: {
+            g:1,
+            c:"d = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // day of month without leading zeroes (1 - 31)
+        },
+        D: function() {
+            for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get localised short day names
+            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]" // ISO-8601 day number (1 (monday) - 7 (sunday))
+        },
+        S: {
+            g:0,
+            c:null,
+            s:"(?:st|nd|rd|th)"
+        },
+        w: {
+            g:0,
+            c:null,
+            s:"[0-6]" // javascript day number (0 (sunday) - 6 (saturday))
+        },
+        z: {
+            g:1,
+            c:"z = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,3})" // day of the year (0 - 364 (365 in leap years))
+        },
+        W: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // ISO-8601 week number (with leading zero)
+        },
+        F: function() {
+            return {
+                g:1,
+                c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number
+                s:"(" + Date.monthNames.join("|") + ")"
+            }
+        },
+        M: function() {
+            for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names
+            return Ext.applyIf({
+                s:"(" + a.join("|") + ")"
+            }, $f("F"));
+        },
+        m: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{2})" // month number with leading zeros (01 - 12)
+        },
+        n: {
+            g:1,
+            c:"m = parseInt(results[{0}], 10) - 1;\n",
+            s:"(\\d{1,2})" // month number without leading zeros (1 - 12)
+        },
+        t: {
+            g:0,
+            c:null,
+            s:"(?:\\d{2})" // no. of days in the month (28 - 31)
+        },
+        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})" // 4-digit year
+        },
+        y: {
+            g:1,
+            c:"var ty = parseInt(results[{0}], 10);\n"
+                + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year
+            s:"(\\d{1,2})"
+        },
+        a: {
+            g:1,
+            c:"if (results[{0}] == 'am') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(am|pm)"
+        },
+        A: {
+            g:1,
+            c:"if (results[{0}] == 'AM') {\n"
+                + "if (h == 12) { h = 0; }\n"
+                + "} else { if (h < 12) { h += 12; }}",
+            s:"(AM|PM)"
+        },
+        g: function() {
+            return $f("G");
+        },
+        G: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{1,2})" // 24-hr format of an hour without leading zeroes (0 - 23)
+        },
+        h: function() {
+            return $f("H");
+        },
+        H: {
+            g:1,
+            c:"h = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" //  24-hr format of an hour with leading zeroes (00 - 23)
+        },
+        i: {
+            g:1,
+            c:"i = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // minutes with leading zeros (00 - 59)
+        },
+        s: {
+            g:1,
+            c:"s = parseInt(results[{0}], 10);\n",
+            s:"(\\d{2})" // seconds with leading zeros (00 - 59)
+        },
+        u: {
+            g:1,
+            c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
+            s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+        },
+        O: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(3,5) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{4})" // GMT offset in hrs and mins
+        },
+        P: {
+            g:1,
+            c:[
+                "o = results[{0}];",
+                "var sn = o.substring(0,1),", // get + / - sign
+                    "hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
+                    "mn = o.substring(4,6) % 60;", // get minutes
+                "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
+            ].join("\n"),
+            s: "([+\-]\\d{2}:\\d{2})" // GMT offset in hrs and mins (with colon separator)
+        },
+        T: {
+            g:0,
+            c:null,
+            s:"[A-Z]{1,4}" // timezone abbrev. may be between 1 - 4 chars
+        },
+        Z: {
+            g:1,
+            c:"zz = results[{0}] * 1;\n" // -43200 <= UTC offset <= 50400
+                  + "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",
+            s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset
+        },
+        c: function() {
+            var calc = [],
+                arr = [
+                    $f("Y", 1), // year
+                    $f("m", 2), // month
+                    $f("d", 3), // day
+                    $f("h", 4), // hour
+                    $f("i", 5), // minute
+                    $f("s", 6), // second
+                    {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
+                    {c:[ // allow either "Z" (i.e. UTC) or "-0530" or "+08:00" (i.e. UTC offset) timezone delimiters. assumes local timezone if no timezone is specified
+                        "if(results[8]) {", // timezone specified
+                            "if(results[8] == 'Z'){",
+                                "zz = 0;", // UTC
+                            "}else if (results[8].indexOf(':') > -1){",
+                                $f("P", 8).c, // timezone offset with colon separator
+                            "}else{",
+                                $f("O", 8).c, // timezone offset without colon separator
+                            "}",
+                        "}"
+                    ].join('\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, // year (required)
+                    "(?:", "-", arr[1].s, // month (optional)
+                        "(?:", "-", arr[2].s, // day (optional)
+                            "(?:",
+                                "(?:T| )?", // time delimiter -- either a "T" or a single blank space
+                                arr[3].s, ":", arr[4].s,  // hour AND minute, delimited by a single colon (optional). MUST be preceded by either a "T" or a single blank space
+                                "(?::", arr[5].s, ")?", // seconds (optional)
+                                "(?:(?:\\.|,)(\\d+))?", // decimal fraction of a second (e.g. ",12345" or ".98765") (optional)
+                                "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", // "Z" (UTC) or "-0530" (UTC offset without colon delimiter) or "+08:00" (UTC offset with colon delimiter) (optional)
+                            ")?",
+                        ")?",
+                    ")?"
+                ].join("")
+            }
+        },
+        U: {
+            g:1,
+            c:"u = parseInt(results[{0}], 10);\n",
+            s:"(-?\\d+)" // leading minus sign indicates seconds before UNIX epoch
+        }
+    }
+});
+
+}());
+
+Ext.apply(Date.prototype, {
+    // private
+    dateFormat : function(format) {
+        if (Date.formatFunctions[format] == null) {
+            Date.createFormat(format);
+        }
+        return Date.formatFunctions[format].call(this);
+    },
+
+    /**
+     * Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
+     *
+     * Note: The date string returned by the javascript Date object's toString() method varies
+     * between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
+     * For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
+     * getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
+     * (which may or may not be present), failing which it proceeds to get the timezone abbreviation
+     * from the GMT offset portion of the date string.
+     * @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).
+     */
+    getTimezone : function() {
+        // the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale:
+        //
+        // Opera  : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot
+        // Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF)
+        // FF     : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone
+        // IE     : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev
+        // IE     : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev
+        //
+        // this crazy regex attempts to guess the correct timezone abbreviation despite these differences.
+        // step 1: (?:\((.*)\) -- find timezone in parentheses
+        // step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string
+        // step 3: remove all non uppercase characters found in step 1 and 2
+        return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "");
+    },
+
+    /**
+     * Get the offset from GMT of the current date (equivalent to the format specifier 'O').
+     * @param {Boolean} colon (optional) true to separate the hours and minutes with a colon (defaults to false).
+     * @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600').
+     */
+    getGMTOffset : function(colon) {
+        return (this.getTimezoneOffset() > 0 ? "-" : "+")
+            + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0")
+            + (colon ? ":" : "")
+            + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0");
+    },
+
+    /**
+     * Get the numeric day number of the year, adjusted for leap year.
+     * @return {Number} 0 to 364 (365 in leap years).
+     */
+    getDayOfYear: function() {
+        var i = 0,
+            num = 0,
+            d = this.clone(),
+            m = this.getMonth();
+
+        for (i = 0, d.setMonth(0); i < m; d.setMonth(++i)) {
+            num += d.getDaysInMonth();
+        }
+        return num + this.getDate() - 1;
+    },
+
+    /**
+     * Get the numeric ISO-8601 week number of the year.
+     * (equivalent to the format specifier 'W', but without a leading zero).
+     * @return {Number} 1 to 53
+     */
+    getWeekOfYear : function() {
+        // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
+        var ms1d = 864e5, // milliseconds in a day
+            ms7d = 7 * ms1d; // milliseconds in a week
+
+        return function() { // return a closure so constants get calculated only once
+            var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number
+                AWN = Math.floor(DC3 / 7), // an Absolute Week Number
+                Wyr = new Date(AWN * ms7d).getUTCFullYear();
+
+            return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
+        }
+    }(),
+
+    /**
+     * Checks if the current date falls within a leap year.
+     * @return {Boolean} True if the current date falls within a leap year, false otherwise.
+     */
+    isLeapYear : function() {
+        var year = this.getFullYear();
+        return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
+    },
+
+    /**
+     * Get the first day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getFirstDayOfMonth : function() {
+        var day = (this.getDay() - (this.getDate() - 1)) % 7;
+        return (day < 0) ? (day + 7) : day;
+    },
+
+    /**
+     * Get the last day of the current month, adjusted for leap year.  The returned value
+     * is the numeric day index within the week (0-6) which can be used in conjunction with
+     * the {@link #monthNames} array to retrieve the textual day name.
+     * Example:
+     * <pre><code>
+var dt = new Date('1/10/2007');
+document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
+</code></pre>
+     * @return {Number} The day number (0-6).
+     */
+    getLastDayOfMonth : function() {
+        return this.getLastDateOfMonth().getDay();
+    },
+
+
+    /**
+     * Get the date of the first day of the month in which this date resides.
+     * @return {Date}
+     */
+    getFirstDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), 1);
+    },
+
+    /**
+     * Get the date of the last day of the month in which this date resides.
+     * @return {Date}
+     */
+    getLastDateOfMonth : function() {
+        return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth());
+    },
+
+    /**
+     * Get the number of days in the current month, adjusted for leap year.
+     * @return {Number} The number of days in the month.
+     */
+    getDaysInMonth: function() {
+        var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+
+        return function() { // return a closure for efficiency
+            var m = this.getMonth();
+
+            return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m];
+        }
+    }(),
+
+    /**
+     * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
+     * @return {String} 'st, 'nd', 'rd' or 'th'.
+     */
+    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";
+        }
+    },
+
+    /**
+     * Creates and returns a new Date instance with the exact same date value as the called instance.
+     * Dates are copied and passed by reference, so if a copied date variable is modified later, the original
+     * variable will also be changed.  When the intention is to create a new variable that will not
+     * modify the original instance, you should create a clone.
+     *
+     * Example of correctly cloning a date:
+     * <pre><code>
+//wrong way:
+var orig = new Date('10/1/2006');
+var copy = orig;
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 05 2006'!
+
+//correct way:
+var orig = new Date('10/1/2006');
+var copy = orig.clone();
+copy.setDate(5);
+document.write(orig);  //returns 'Thu Oct 01 2006'
+</code></pre>
+     * @return {Date} The new Date instance.
+     */
+    clone : function() {
+        return new Date(this.getTime());
+    },
+
+    /**
+     * Checks if the current date is affected by Daylight Saving Time (DST).
+     * @return {Boolean} True if the current date is affected by DST.
+     */
+    isDST : function() {
+        // adapted from http://extjs.com/forum/showthread.php?p=247172#post247172
+        // courtesy of @geoffrey.mcgill
+        return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset();
+    },
+
+    /**
+     * Attempts to clear all time information from this Date by setting the time to midnight of the same day,
+     * automatically adjusting for Daylight Saving Time (DST) where applicable.
+     * (note: DST timezone information for the browser's host operating system is assumed to be up-to-date)
+     * @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false).
+     * @return {Date} this or the clone.
+     */
+    clearTime : function(clone) {
+        if (clone) {
+            return this.clone().clearTime();
+        }
+
+        // get current date before clearing time
+        var d = this.getDate();
+
+        // clear time
+        this.setHours(0);
+        this.setMinutes(0);
+        this.setSeconds(0);
+        this.setMilliseconds(0);
+
+        if (this.getDate() != d) { // account for DST (i.e. day of month changed when setting hour = 0)
+            // note: DST adjustments are assumed to occur in multiples of 1 hour (this is almost always the case)
+            // refer to http://www.timeanddate.com/time/aboutdst.html for the (rare) exceptions to this rule
+
+            // increment hour until cloned date == current date
+            for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr));
+
+            this.setDate(d);
+            this.setHours(c.getHours());
+        }
+
+        return this;
+    },
+
+    /**
+     * Provides a convenient method for performing basic date arithmetic. This method
+     * does not modify the Date instance being called - it creates and returns
+     * a new Date instance containing the resulting date value.
+     *
+     * Examples:
+     * <pre><code>
+// Basic usage:
+var dt = new Date('10/29/2006').add(Date.DAY, 5);
+document.write(dt); //returns 'Fri Nov 03 2006 00:00:00'
+
+// Negative values will be subtracted:
+var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
+document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
+
+// You can even chain several calls together in one line:
+var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
+document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
+</code></pre>
+     *
+     * @param {String} interval A valid date interval enum value.
+     * @param {Number} value The amount to add to the current date.
+     * @return {Date} The new Date instance.
+     */
+    add : function(interval, value) {
+        var d = this.clone();
+        if (!interval || value === 0) return d;
+
+        switch(interval.toLowerCase()) {
+            case Date.MILLI:
+                d.setMilliseconds(this.getMilliseconds() + value);
+                break;
+            case Date.SECOND:
+                d.setSeconds(this.getSeconds() + value);
+                break;
+            case Date.MINUTE:
+                d.setMinutes(this.getMinutes() + value);
+                break;
+            case Date.HOUR:
+                d.setHours(this.getHours() + value);
+                break;
+            case Date.DAY:
+                d.setDate(this.getDate() + value);
+                break;
+            case Date.MONTH:
+                var day = this.getDate();
+                if (day > 28) {
+                    day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate());
+                }
+                d.setDate(day);
+                d.setMonth(this.getMonth() + value);
+                break;
+            case Date.YEAR:
+                d.setFullYear(this.getFullYear() + value);
+                break;
+        }
+        return d;
+    },
+
+    /**
+     * Checks if this date falls on or between the given start and end dates.
+     * @param {Date} start Start date
+     * @param {Date} end End date
+     * @return {Boolean} true if this date falls on or between the given start and end dates.
+     */
+    between : function(start, end) {
+        var t = this.getTime();
+        return start.getTime() <= t && t <= end.getTime();
+    }
+});
+
+
+/**
+ * Formats a date given the supplied format string.
+ * @param {String} format The format string.
+ * @return {String} The formatted date.
+ * @method format
+ */
+Date.prototype.format = Date.prototype.dateFormat;
+
+
+// private
+if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) {
+    Ext.apply(Date.prototype, {
+        _xMonth : Date.prototype.setMonth,
+        _xDate  : Date.prototype.setDate,
+
+        // Bug in Safari 1.3, 2.0 (WebKit build < 420)
+        // Date.setMonth does not work consistently if iMonth is not 0-11
+        setMonth : function(num) {
+            if (num <= -1) {
+                var n = Math.ceil(-num),
+                    back_year = Math.ceil(n / 12),
+                    month = (n % 12) ? 12 - n % 12 : 0;
+
+                this.setFullYear(this.getFullYear() - back_year);
+
+                return this._xMonth(month);
+            } else {
+                return this._xMonth(num);
+            }
+        },
+
+        // Bug in setDate() method (resolved in WebKit build 419.3, so to be safe we target Webkit builds < 420)
+        // The parameter for Date.setDate() is converted to a signed byte integer in Safari
+        // http://brianary.blogspot.com/2006/03/safari-date-bug.html
+        setDate : function(d) {
+            // use setTime() to workaround setDate() bug
+            // subtract current day of month in milliseconds, then add desired day of month in milliseconds
+            return this.setTime(this.getTime() - (this.getDate() - d) * 864e5);
+        }
+    });
+}
+
+
+
+/* Some basic Date tests... (requires Firebug)
+
+Date.parseDate('', 'c'); // call Date.parseDate() once to force computation of regex string so we can console.log() it
+console.log('Insane Regex for "c" format: %o', Date.parseCodes.c.s); // view the insane regex for the "c" format specifier
+
+// standard tests
+console.group('Standard Date.parseDate() Tests');
+    console.log('Date.parseDate("2009-01-05T11:38:56", "c")               = %o', Date.parseDate("2009-01-05T11:38:56", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-02-04T12:37:55.001000", "c")        = %o', Date.parseDate("2009-02-04T12:37:55.001000", "c")); // assumes browser's timezone setting
+    console.log('Date.parseDate("2009-03-03T13:36:54,101000Z", "c")       = %o', Date.parseDate("2009-03-03T13:36:54,101000Z", "c")); // UTC
+    console.log('Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")   = %o', Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")); // GMT-0530
+    console.log('Date.parseDate("2009-05-01T15:34:52,9876000+08:00", "c") = %o', Date.parseDate("2009-05-01T15:34:52,987600+08:00", "c")); // GMT+08:00
+console.groupEnd();
+
+// ISO-8601 format as specified in http://www.w3.org/TR/NOTE-datetime
+// -- accepts ALL 6 levels of date-time granularity
+console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime)');
+    console.log('Date.parseDate("1997", "c")                              = %o', Date.parseDate("1997", "c")); // YYYY (e.g. 1997)
+    console.log('Date.parseDate("1997-07", "c")                           = %o', Date.parseDate("1997-07", "c")); // YYYY-MM (e.g. 1997-07)
+    console.log('Date.parseDate("1997-07-16", "c")                        = %o', Date.parseDate("1997-07-16", "c")); // YYYY-MM-DD (e.g. 1997-07-16)
+    console.log('Date.parseDate("1997-07-16T19:20+01:00", "c")            = %o', Date.parseDate("1997-07-16T19:20+01:00", "c")); // YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30+01:00", "c")         = %o', Date.parseDate("1997-07-16T19:20:30+01:00", "c")); // YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)
+    console.log('Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")); // YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")      = %o', Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")); // YYYY-MM-DD hh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
+    console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value
+console.groupEnd();
+
+//*/
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/Format.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/Format.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/Format.js	(revision 625)
@@ -0,0 +1,356 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.Format
+ * Reusable data formatting functions
+ * @singleton
+ */
+Ext.util.Format = function(){
+    var trimRe = /^\s+|\s+$/g;
+    return {
+        /**
+         * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
+         * @param {String} value The string to truncate
+         * @param {Number} length The maximum length to allow before truncating
+         * @param {Boolean} word True to try to find a common work break
+         * @return {String} The converted text
+         */
+        ellipsis : function(value, len, word){
+            if(value && value.length > len){
+                if(word){
+                    var vs = value.substr(0, len - 2);
+                    var index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?'));
+                    if(index == -1 || index < (len - 15)){
+                        return value.substr(0, len - 3) + "...";
+                    }else{
+                        return vs.substr(0, index) + "...";
+                    }
+                } else{
+                    return value.substr(0, len - 3) + "...";
+                }
+            }
+            return value;
+        },
+
+        /**
+         * Checks a reference and converts it to empty string if it is undefined
+         * @param {Mixed} value Reference to check
+         * @return {Mixed} Empty string if converted, otherwise the original value
+         */
+        undef : function(value){
+            return value !== undefined ? value : "";
+        },
+
+        /**
+         * Checks a reference and converts it to the default value if it's empty
+         * @param {Mixed} value Reference to check
+         * @param {String} defaultValue The value to insert of it's undefined (defaults to "")
+         * @return {String}
+         */
+        defaultValue : function(value, defaultValue){
+            return value !== undefined && value !== '' ? value : defaultValue;
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
+         * @param {String} value The string to encode
+         * @return {String} The encoded text
+         */
+        htmlEncode : function(value){
+            return !value ? value : String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
+        },
+
+        /**
+         * Convert certain characters (&, <, >, and ') from their HTML character equivalents.
+         * @param {String} value The string to decode
+         * @return {String} The decoded text
+         */
+        htmlDecode : function(value){
+            return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
+        },
+
+        /**
+         * Trims any whitespace from either side of a string
+         * @param {String} value The text to trim
+         * @return {String} The trimmed text
+         */
+        trim : function(value){
+            return String(value).replace(trimRe, "");
+        },
+
+        /**
+         * Returns a substring from within an original string
+         * @param {String} value The original text
+         * @param {Number} start The start index of the substring
+         * @param {Number} length The length of the substring
+         * @return {String} The substring
+         */
+        substr : function(value, start, length){
+            return String(value).substr(start, length);
+        },
+
+        /**
+         * Converts a string to all lower case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        lowercase : function(value){
+            return String(value).toLowerCase();
+        },
+
+        /**
+         * Converts a string to all upper case letters
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        uppercase : function(value){
+            return String(value).toUpperCase();
+        },
+
+        /**
+         * Converts the first character only of a string to upper case
+         * @param {String} value The text to convert
+         * @return {String} The converted text
+         */
+        capitalize : function(value){
+            return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase();
+        },
+
+        // private
+        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);
+            }
+        },
+
+        /**
+         * Format a number as US currency
+         * @param {Number/String} value The numeric value to format
+         * @return {String} The formatted currency string
+         */
+        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;
+        },
+
+        /**
+         * Parse a value into a formatted date using the specified format pattern.
+         * @param {String/Date} value The value to format (Strings must conform to the format expected by the javascript Date object's <a href="http://www.w3schools.com/jsref/jsref_parse.asp">parse()</a> method)
+         * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y')
+         * @return {String} The formatted date string
+         */
+        date : function(v, format){
+            if(!v){
+                return "";
+            }
+            if(!Ext.isDate(v)){
+                v = new Date(Date.parse(v));
+            }
+            return v.dateFormat(format || "m/d/Y");
+        },
+
+        /**
+         * Returns a date rendering function that can be reused to apply a date format multiple times efficiently
+         * @param {String} format Any valid date format string
+         * @return {Function} The date formatting function
+         */
+        dateRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.date(v, format);
+            };
+        },
+
+        // private
+        stripTagsRE : /<\/?[^>]+>/gi,
+        
+        /**
+         * Strips all HTML tags
+         * @param {Mixed} value The text from which to strip tags
+         * @return {String} The stripped text
+         */
+        stripTags : function(v){
+            return !v ? v : String(v).replace(this.stripTagsRE, "");
+        },
+
+        stripScriptsRe : /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
+
+        /**
+         * Strips all script tags
+         * @param {Mixed} value The text from which to strip script tags
+         * @return {String} The stripped text
+         */
+        stripScripts : function(v){
+            return !v ? v : String(v).replace(this.stripScriptsRe, "");
+        },
+
+        /**
+         * Simple format for a file size (xxx bytes, xxx KB, xxx MB)
+         * @param {Number/String} size The numeric value to format
+         * @return {String} The formatted file size
+         */
+        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";
+            }
+        },
+
+        /**
+         * It does simple math for use in a template, for example:<pre><code>
+         * var tpl = new Ext.Template('{value} * 10 = {value:math("* 10")}');
+         * </code></pre>
+         * @return {Function} A function that operates on the passed value.
+         */
+        math : function(){
+            var fns = {};
+            return function(v, a){
+                if(!fns[a]){
+                    fns[a] = new Function('v', 'return v ' + a + ';');
+                }
+                return fns[a](v);
+            }
+        }(),
+
+        /**
+         * Rounds the passed number to the required decimal precision.
+         * @param {Number/String} value The numeric value to round.
+         * @param {Number} precision The number of decimal places to which to round the first parameter's value.
+         * @return {Number} The rounded value.
+         */
+        round : function(value, precision) {
+            var result = Number(value);
+            if (typeof precision == 'number') {
+                precision = Math.pow(10, precision);
+                result = Math.round(value * precision) / precision;
+            }
+            return result;
+        },
+
+        /**
+         * Formats the number according to the format string.
+         * <div style="margin-left:40px">examples (123456.789):
+         * <div style="margin-left:10px">
+         * 0 - (123456) show only digits, no precision<br>
+         * 0.00 - (123456.78) show only digits, 2 precision<br>
+         * 0.0000 - (123456.7890) show only digits, 4 precision<br>
+         * 0,000 - (123,456) show comma and digits, no precision<br>
+         * 0,000.00 - (123,456.78) show comma and digits, 2 precision<br>
+         * 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br>
+         * To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.
+         * For example: 0.000,00/i
+         * </div></div>
+         * @param {Number} v The number to format.
+         * @param {String} format The way you would like to format this text.
+         * @return {String} The formatted number.
+         */
+        number: function(v, format) {
+            if(!format){
+		        return v;
+		    }
+		    v = Ext.num(v, NaN);
+            if (isNaN(v)){
+                return '';
+            }
+		    var comma = ',',
+		        dec = '.',
+		        i18n = false,
+		        neg = v < 0;
+		
+		    v = Math.abs(v);
+		    if(format.substr(format.length - 2) == '/i'){
+		        format = format.substr(0, format.length - 2);
+		        i18n = true;
+		        comma = '.';
+		        dec = ',';
+		    }
+		
+		    var hasComma = format.indexOf(comma) != -1, 
+		        psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec);
+		
+		    if(1 < psplit.length){
+		        v = v.toFixed(psplit[1].length);
+		    }else if(2 < psplit.length){
+		        throw ('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format);
+		    }else{
+		        v = v.toFixed(0);
+		    }
+		
+		    var fnum = v.toString();
+		    if(hasComma){
+		        psplit = fnum.split('.');
+		
+		        var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), n = cnum.length % 3 || 3;
+		
+		        for(var i = 0; i < j; i += n){
+		            if(i != 0){
+		                n = 3;
+		            }
+		            parr[parr.length] = cnum.substr(i, n);
+		            m -= 1;
+		        }
+		        fnum = parr.join(comma);
+		        if(psplit[1]){
+		            fnum += dec + psplit[1];
+		        }
+		    }
+		
+		    return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum);
+        },
+
+        /**
+         * Returns a number rendering function that can be reused to apply a number format multiple times efficiently
+         * @param {String} format Any valid number format string for {@link #number}
+         * @return {Function} The number formatting function
+         */
+        numberRenderer : function(format){
+            return function(v){
+                return Ext.util.Format.number(v, format);
+            };
+        },
+
+        /**
+         * Selectively do a plural form of a word based on a numeric value. For example, in a template,
+         * {commentCount:plural("Comment")}  would result in "1 Comment" if commentCount was 1 or would be "x Comments"
+         * if the value is 0 or greater than 1.
+         * @param {Number} value The value to compare against
+         * @param {String} singular The singular form of the word
+         * @param {String} plural (optional) The plural form of the word (defaults to the singular with an "s")
+         */
+        plural : function(v, s, p){
+            return v +' ' + (v == 1 ? s : (p ? p : s+'s'));
+        },
+        
+        /**
+         * Converts newline characters to the HTML tag &lt;br/>
+         * @param {String} The string value to format.
+         * @return {String} The string with embedded &lt;br/> tags in place of newlines.
+         */
+        nl2br : function(v){
+            return v === undefined || v === null ? '' : v.replace(/\n/g, '<br/>');
+        }
+    }
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/History.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/History.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/History.js	(revision 625)
@@ -0,0 +1,203 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.History
+ * @extends Ext.util.Observable
+ * History management component that allows you to register arbitrary tokens that signify application
+ * history state on navigation actions.  You can then handle the history {@link #change} event in order
+ * to reset your application UI to the appropriate state when the user navigates forward or backward through
+ * the browser history stack.
+ * @singleton
+ */
+Ext.History = (function () {
+    var iframe, hiddenField;
+    var ready = false;
+    var currentToken;
+
+    function getHash() {
+        var href = top.location.href, i = href.indexOf("#");
+        return i >= 0 ? href.substr(i + 1) : null;
+    }
+
+    function doSave() {
+        hiddenField.value = currentToken;
+    }
+
+    function handleStateChange(token) {
+        currentToken = token;
+        Ext.History.fireEvent('change', token);
+    }
+
+    function updateIFrame (token) {
+        var html = ['<html><body><div id="state">',token,'</div></body></html>'].join('');
+        try {
+            var doc = iframe.contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    function checkIFrame() {
+        if (!iframe.contentWindow || !iframe.contentWindow.document) {
+            setTimeout(checkIFrame, 10);
+            return;
+        }
+
+        var doc = iframe.contentWindow.document;
+        var elem = doc.getElementById("state");
+        var token = elem ? elem.innerText : null;
+
+        var hash = getHash();
+
+        setInterval(function () {
+
+            doc = iframe.contentWindow.document;
+            elem = doc.getElementById("state");
+
+            var newtoken = elem ? elem.innerText : null;
+
+            var newHash = getHash();
+
+            if (newtoken !== token) {
+                token = newtoken;
+                handleStateChange(token);
+                top.location.hash = token;
+                hash = token;
+                doSave();
+            } else if (newHash !== hash) {
+                hash = newHash;
+                updateIFrame(newHash);
+            }
+
+        }, 50);
+
+        ready = true;
+
+        Ext.History.fireEvent('ready', Ext.History);
+    }
+
+    function startUp() {
+        currentToken = hiddenField.value ? hiddenField.value : getHash();
+
+        if (Ext.isIE) {
+            checkIFrame();
+        } else {
+            var hash = getHash();
+            setInterval(function () {
+                var newHash = getHash();
+                if (newHash !== hash) {
+                    hash = newHash;
+                    handleStateChange(hash);
+                    doSave();
+                }
+            }, 50);
+            ready = true;
+            Ext.History.fireEvent('ready', Ext.History);
+        }
+    }
+
+    return {
+        /**
+         * The id of the hidden field required for storing the current history token.
+         * @type String
+         * @property
+         */
+        fieldId: 'x-history-field',
+        /**
+         * The id of the iframe required by IE to manage the history stack.
+         * @type String
+         * @property
+         */
+        iframeId: 'x-history-frame',
+        
+        events:{},
+
+        /**
+         * Initialize the global History instance.
+         * @param {Boolean} onReady (optional) A callback function that will be called once the history
+         * component is fully initialized.
+         * @param {Object} scope (optional) The callback scope
+         */
+        init: function (onReady, scope) {
+            if(ready) {
+                Ext.callback(onReady, scope, [this]);
+                return;
+            }
+            if(!Ext.isReady){
+                Ext.onReady(function(){
+                    Ext.History.init(onReady, scope);
+                });
+                return;
+            }
+            hiddenField = Ext.getDom(Ext.History.fieldId);
+            if (Ext.isIE) {
+                iframe = Ext.getDom(Ext.History.iframeId);
+            }
+            this.addEvents('ready', 'change');
+            if(onReady){
+                this.on('ready', onReady, scope, {single:true});
+            }
+            startUp();
+        },
+
+        /**
+         * Add a new token to the history stack. This can be any arbitrary value, although it would
+         * commonly be the concatenation of a component id and another id marking the specifc history
+         * state of that component.  Example usage:
+         * <pre><code>
+// Handle tab changes on a TabPanel
+tabPanel.on('tabchange', function(tabPanel, tab){
+    Ext.History.add(tabPanel.id + ':' + tab.id);
+});
+</code></pre>
+         * @param {String} token The value that defines a particular application-specific history state
+         * @param {Boolean} preventDuplicates When true, if the passed token matches the current token
+         * it will not save a new history step. Set to false if the same state can be saved more than once
+         * at the same history stack location (defaults to true).
+         */
+        add: function (token, preventDup) {
+            if(preventDup !== false){
+                if(this.getToken() == token){
+                    return true;
+                }
+            }
+            if (Ext.isIE) {
+                return updateIFrame(token);
+            } else {
+                top.location.hash = token;
+                return true;
+            }
+        },
+
+        /**
+         * Programmatically steps back one step in browser history (equivalent to the user pressing the Back button).
+         */
+        back: function(){
+            history.go(-1);
+        },
+
+        /**
+         * Programmatically steps forward one step in browser history (equivalent to the user pressing the Forward button).
+         */
+        forward: function(){
+            history.go(1);
+        },
+
+        /**
+         * Retrieves the currently-active history token.
+         * @return {String} The token
+         */
+        getToken: function() {
+            return ready ? currentToken : getHash();
+        }
+    };
+})();
+Ext.apply(Ext.History, new Ext.util.Observable());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyMap.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyMap.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyMap.js	(revision 625)
@@ -0,0 +1,242 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.KeyMap
+ * Handles mapping keys to actions for an element. One key map can be used for multiple actions.
+ * The constructor accepts the same config object as defined by {@link #addBinding}.
+ * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key
+ * combination it will call the function with this signature (if the match is a multi-key
+ * combination the callback will still be called only once): (String key, Ext.EventObject e)
+ * A KeyMap can also handle a string representation of keys.<br />
+ * Usage:
+ <pre><code>
+// map one key by key code
+var map = new Ext.KeyMap("my-element", {
+    key: 13, // or Ext.EventObject.ENTER
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to one action by string
+var map = new Ext.KeyMap("my-element", {
+    key: "a\r\n\t",
+    fn: myHandler,
+    scope: myObject
+});
+
+// map multiple keys to multiple actions by strings and array of codes
+var map = new Ext.KeyMap("my-element", [
+    {
+        key: [10,13],
+        fn: function(){ alert("Return was pressed"); }
+    }, {
+        key: "abc",
+        fn: function(){ alert('a, b or c was pressed'); }
+    }, {
+        key: "\t",
+        ctrl:true,
+        shift:true,
+        fn: function(){ alert('Control + shift + tab was pressed.'); }
+    }
+]);
+</code></pre>
+ * <b>Note: A KeyMap starts enabled</b>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config (see {@link #addBinding})
+ * @param {String} eventName (optional) The event to bind to (defaults to "keydown")
+ */
+Ext.KeyMap = function(el, config, eventName){
+    this.el  = Ext.get(el);
+    this.eventName = eventName || "keydown";
+    this.bindings = [];
+    if(config){
+        this.addBinding(config);
+    }
+    this.enable();
+};
+
+Ext.KeyMap.prototype = {
+    /**
+     * True to stop the event from bubbling and prevent the default browser action if the
+     * key was handled by the KeyMap (defaults to false)
+     * @type Boolean
+     */
+    stopEvent : false,
+
+    /**
+     * Add a new binding to this KeyMap. The following config object properties are supported:
+     * <pre>
+Property    Type             Description
+----------  ---------------  ----------------------------------------------------------------------
+key         String/Array     A single keycode or an array of keycodes to handle
+shift       Boolean          True to handle key only when shift is pressed, False to handle the key only when shift is not pressed (defaults to undefined)
+ctrl        Boolean          True to handle key only when ctrl is pressed, False to handle the key only when ctrl is not pressed (defaults to undefined)
+alt         Boolean          True to handle key only when alt is pressed, False to handle the key only when alt is not pressed (defaults to undefined)
+handler     Function         The function to call when KeyMap finds the expected key combination
+fn          Function         Alias of handler (for backwards-compatibility)
+scope       Object           The scope of the callback function
+stopEvent   Boolean          True to stop the event from bubbling and prevent the default browser action if the key was handled by the KeyMap (defaults to false)
+</pre>
+     *
+     * Usage:
+     * <pre><code>
+// Create a KeyMap
+var map = new Ext.KeyMap(document, {
+    key: Ext.EventObject.ENTER,
+    fn: handleKey,
+    scope: this
+});
+
+//Add a new binding to the existing KeyMap later
+map.addBinding({
+    key: 'abc',
+    shift: true,
+    fn: handleKey,
+    scope: this
+});
+</code></pre>
+     * @param {Object/Array} config A single KeyMap config or an array of configs
+     */
+	addBinding : function(config){
+        if(Ext.isArray(config)){
+            Ext.each(config, function(c){
+                this.addBinding(c);
+            }, this);
+            return;
+        }
+        var keyCode = config.key,
+            fn = config.fn || config.handler,
+            scope = config.scope;
+
+	if (config.stopEvent) {
+	    this.stopEvent = config.stopEvent;    
+	}	
+
+        if(typeof keyCode == "string"){
+            var ks = [];
+            var keyString = keyCode.toUpperCase();
+            for(var j = 0, len = keyString.length; j < len; j++){
+                ks.push(keyString.charCodeAt(j));
+            }
+            keyCode = ks;
+        }
+        var keyArray = Ext.isArray(keyCode);
+        
+        var handler = function(e){
+            if(this.checkModifiers(config, e)){
+                var k = e.getKey();
+                if(keyArray){
+                    for(var i = 0, len = keyCode.length; i < len; i++){
+                        if(keyCode[i] == k){
+                          if(this.stopEvent){
+                              e.stopEvent();
+                          }
+                          fn.call(scope || window, k, e);
+                          return;
+                        }
+                    }
+                }else{
+                    if(k == keyCode){
+                        if(this.stopEvent){
+                           e.stopEvent();
+                        }
+                        fn.call(scope || window, k, e);
+                    }
+                }
+            }
+        };
+        this.bindings.push(handler);
+	},
+    
+    // private
+    checkModifiers: function(config, e){
+        var val, key, keys = ['shift', 'ctrl', 'alt'];
+        for (var i = 0, len = keys.length; i < len; ++i){
+            key = keys[i];
+            val = config[key];
+            if(!(val === undefined || (val === e[key + 'Key']))){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Shorthand for adding a single key listener
+     * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the
+     * following options:
+     * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function
+     */
+    on : function(key, fn, scope){
+        var keyCode, shift, ctrl, alt;
+        if(typeof key == "object" && !Ext.isArray(key)){
+            keyCode = key.key;
+            shift = key.shift;
+            ctrl = key.ctrl;
+            alt = key.alt;
+        }else{
+            keyCode = key;
+        }
+        this.addBinding({
+            key: keyCode,
+            shift: shift,
+            ctrl: ctrl,
+            alt: alt,
+            fn: fn,
+            scope: scope
+        });
+    },
+
+    // private
+    handleKeyDown : function(e){
+	    if(this.enabled){ //just in case
+    	    var b = this.bindings;
+    	    for(var i = 0, len = b.length; i < len; i++){
+    	        b[i].call(this, e);
+    	    }
+	    }
+	},
+
+	/**
+	 * Returns true if this KeyMap is enabled
+	 * @return {Boolean}
+	 */
+	isEnabled : function(){
+	    return this.enabled;
+	},
+
+	/**
+	 * Enables this KeyMap
+	 */
+	enable: function(){
+		if(!this.enabled){
+		    this.el.on(this.eventName, this.handleKeyDown, this);
+		    this.enabled = true;
+		}
+	},
+
+	/**
+	 * Disable this KeyMap
+	 */
+	disable: function(){
+		if(this.enabled){
+		    this.el.removeListener(this.eventName, this.handleKeyDown, this);
+		    this.enabled = false;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyNav.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyNav.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/KeyNav.js	(revision 625)
@@ -0,0 +1,161 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.KeyNav
+ * <p>Provides a convenient wrapper for normalized keyboard navigation.  KeyNav allows you to bind
+ * navigation keys to function calls that will get called when the keys are pressed, providing an easy
+ * way to implement custom navigation schemes for any UI component.</p>
+ * <p>The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc,
+ * pageUp, pageDown, del, home, end.  Usage:</p>
+ <pre><code>
+var nav = new Ext.KeyNav("my-element", {
+    "left" : function(e){
+        this.moveLeft(e.ctrlKey);
+    },
+    "right" : function(e){
+        this.moveRight(e.ctrlKey);
+    },
+    "enter" : function(e){
+        this.save();
+    },
+    scope : this
+});
+</code></pre>
+ * @constructor
+ * @param {Mixed} el The element to bind to
+ * @param {Object} config The config
+ */
+Ext.KeyNav = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(!this.disabled){
+        this.disabled = true;
+        this.enable();
+    }
+};
+
+Ext.KeyNav.prototype = {
+    /**
+     * @cfg {Boolean} disabled
+     * True to disable this KeyNav instance (defaults to false)
+     */
+    disabled : false,
+    /**
+     * @cfg {String} defaultEventAction
+     * The method to call on the {@link Ext.EventObject} after this KeyNav intercepts a key.  Valid values are
+     * {@link Ext.EventObject#stopEvent}, {@link Ext.EventObject#preventDefault} and
+     * {@link Ext.EventObject#stopPropagation} (defaults to 'stopEvent')
+     */
+    defaultEventAction: "stopEvent",
+    /**
+     * @cfg {Boolean} forceKeyDown
+     * Handle the keydown event instead of keypress (defaults to false).  KeyNav automatically does this for IE since
+     * IE does not propagate special keys on keypress, but setting this to true will force other browsers to also
+     * handle keydown instead of keypress.
+     */
+    forceKeyDown : false,
+
+    // private
+    prepareEvent : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(Ext.isSafari2 && h && k >= 37 && k <= 40){
+            e.stopEvent();
+        }
+    },
+
+    // private
+    relay : function(e){
+        var k = e.getKey();
+        var h = this.keyToHandler[k];
+        if(h && this[h]){
+            if(this.doRelay(e, this[h], h) !== true){
+                e[this.defaultEventAction]();
+            }
+        }
+    },
+
+    // private
+    doRelay : function(e, h, hname){
+        return h.call(this.scope || this, e);
+    },
+
+    // possible handlers
+    enter : false,
+    left : false,
+    right : false,
+    up : false,
+    down : false,
+    tab : false,
+    esc : false,
+    pageUp : false,
+    pageDown : false,
+    del : false,
+    home : false,
+    end : false,
+
+    // quick lookup hash
+    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 this KeyNav
+	 */
+	enable: function(){
+		if(this.disabled){
+            // ie won't do special keys on keypress, no one else will repeat keys with keydown
+            // the EventObject will normalize Safari automatically
+            if(this.isKeydown()){
+                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 this KeyNav
+	 */
+	disable: function(){
+		if(!this.disabled){
+		    if(this.isKeydown()){
+                this.el.un("keydown", this.relay, this);
+            }else{
+                this.el.un("keydown", this.prepareEvent, this);
+                this.el.un("keypress", this.relay, this);
+            }
+		    this.disabled = true;
+		}
+	},
+    
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     */
+    setDisabled : function(disabled){
+        this[disabled ? "disable" : "enable"]();
+    },
+    
+    // private
+    isKeydown: function(){
+        return this.forceKeyDown || Ext.EventManager.useKeydown;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/MixedCollection.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/MixedCollection.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/MixedCollection.js	(revision 625)
@@ -0,0 +1,576 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.MixedCollection
+ * @extends Ext.util.Observable
+ * A Collection class that maintains both numeric indexes and keys and exposes events.
+ * @constructor
+ * @param {Boolean} allowFunctions True if the addAll function should add function references to the
+ * collection (defaults to false)
+ * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection
+ * and return the key value for that item.  This is used when available to look up the key on items that
+ * were passed without an explicit key parameter to a MixedCollection method.  Passing this parameter is
+ * equivalent to providing an implementation for the {@link #getKey} method.
+ */
+Ext.util.MixedCollection = function(allowFunctions, keyFn){
+    this.items = [];
+    this.map = {};
+    this.keys = [];
+    this.length = 0;
+    this.addEvents(
+        /**
+         * @event clear
+         * Fires when the collection is cleared.
+         */
+        "clear",
+        /**
+         * @event add
+         * Fires when an item is added to the collection.
+         * @param {Number} index The index at which the item was added.
+         * @param {Object} o The item added.
+         * @param {String} key The key associated with the added item.
+         */
+        "add",
+        /**
+         * @event replace
+         * Fires when an item is replaced in the collection.
+         * @param {String} key he key associated with the new added.
+         * @param {Object} old The item being replaced.
+         * @param {Object} new The new item.
+         */
+        "replace",
+        /**
+         * @event remove
+         * Fires when an item is removed from the collection.
+         * @param {Object} o The item being removed.
+         * @param {String} key (optional) The key associated with the removed item.
+         */
+        "remove",
+        "sort"
+    );
+    this.allowFunctions = allowFunctions === true;
+    if(keyFn){
+        this.getKey = keyFn;
+    }
+    Ext.util.MixedCollection.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
+    allowFunctions : false,
+
+/**
+ * Adds an item to the collection. Fires the {@link #add} event when complete.
+ * @param {String} key <p>The key to associate with the item, or the new item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
+ * this parameter.</p>
+ * @param {Object} o The item to add.
+ * @return {Object} The item added.
+ */
+    add: function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        if(typeof key != 'undefined' && key !== null){
+            var old = this.map[key];
+            if(typeof old != 'undefined'){
+                return this.replace(key, o);
+            }
+            this.map[key] = o;
+        }
+        this.length++;
+        this.items.push(o);
+        this.keys.push(key);
+        this.fireEvent('add', this.length-1, o, key);
+        return o;
+    },
+
+/**
+  * MixedCollection has a generic way to fetch keys if you implement getKey.  The default implementation
+  * simply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementation
+  * to return a different value as in the following examples:
+<pre><code>
+// normal way
+var mc = new Ext.util.MixedCollection();
+mc.add(someEl.dom.id, someEl);
+mc.add(otherEl.dom.id, otherEl);
+//and so on
+
+// using getKey
+var mc = new Ext.util.MixedCollection();
+mc.getKey = function(el){
+   return el.dom.id;
+};
+mc.add(someEl);
+mc.add(otherEl);
+
+// or via the constructor
+var mc = new Ext.util.MixedCollection(false, function(el){
+   return el.dom.id;
+});
+mc.add(someEl);
+mc.add(otherEl);
+</code></pre>
+ * @param {Object} item The item for which to find the key.
+ * @return {Object} The key for the passed item.
+ */
+    getKey : function(o){
+         return o.id;
+    },
+
+/**
+ * Replaces an item in the collection. Fires the {@link #replace} event when complete.
+ * @param {String} key <p>The key associated with the item to replace, or the replacement item.</p>
+ * <p>If you supplied a {@link #getKey} implementation for this MixedCollection, or if the key
+ * of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
+ * will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
+ * with one having the same key value, then just pass the replacement item in this parameter.</p>
+ * @param o {Object} o (optional) If the first parameter passed was a key, the item to associate
+ * with that key.
+ * @return {Object}  The new item.
+ */
+    replace : function(key, o){
+        if(arguments.length == 1){
+            o = arguments[0];
+            key = this.getKey(o);
+        }
+        var old = this.map[key];
+        if(typeof key == "undefined" || key === null || typeof old == "undefined"){
+             return this.add(key, o);
+        }
+        var index = this.indexOfKey(key);
+        this.items[index] = o;
+        this.map[key] = o;
+        this.fireEvent("replace", key, old, o);
+        return o;
+    },
+
+/**
+ * Adds all elements of an Array or an Object to the collection.
+ * @param {Object/Array} objs An Object containing properties which will be added to the collection, or
+ * an Array of values, each of which are added to the collection.
+ */
+    addAll : function(objs){
+        if(arguments.length > 1 || Ext.isArray(objs)){
+            var args = arguments.length > 1 ? arguments : objs;
+            for(var i = 0, len = args.length; i < len; i++){
+                this.add(args[i]);
+            }
+        }else{
+            for(var key in objs){
+                if(this.allowFunctions || typeof objs[key] != "function"){
+                    this.add(key, objs[key]);
+                }
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every item in the collection, passing the following arguments:
+ * <div class="mdetail-params"><ul>
+ * <li><b>item</b> : Mixed<p class="sub-desc">The collection item</p></li>
+ * <li><b>index</b> : Number<p class="sub-desc">The item's index</p></li>
+ * <li><b>length</b> : Number<p class="sub-desc">The total number of items in the collection</p></li>
+ * </ul></div>
+ * The function should return a boolean value. Returning false from the function will stop the iteration.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    each : function(fn, scope){
+        var items = [].concat(this.items); // each safe for removal
+        for(var i = 0, len = items.length; i < len; i++){
+            if(fn.call(scope || items[i], items[i], i, len) === false){
+                break;
+            }
+        }
+    },
+
+/**
+ * Executes the specified function once for every key in the collection, passing each
+ * key, and its associated item as the first two parameters.
+ * @param {Function} fn The function to execute for each item.
+ * @param {Object} scope (optional) The scope in which to execute the function.
+ */
+    eachKey : function(fn, scope){
+        for(var i = 0, len = this.keys.length; i < len; i++){
+            fn.call(scope || window, this.keys[i], this.items[i], i, len);
+        }
+    },
+
+    /**
+     * Returns the first item in the collection which elicits a true return value from the
+     * passed selection function.
+     * @param {Function} fn The selection function to execute for each item.
+     * @param {Object} scope (optional) The scope in which to execute the function.
+     * @return {Object} The first item in the collection which returned true from the selection function.
+     */
+    find : function(fn, scope){
+        for(var i = 0, len = this.items.length; i < len; i++){
+            if(fn.call(scope || window, this.items[i], this.keys[i])){
+                return this.items[i];
+            }
+        }
+        return null;
+    },
+
+/**
+ * Inserts an item at the specified index in the collection. Fires the {@link #add} event when complete.
+ * @param {Number} index The index to insert the item at.
+ * @param {String} key The key to associate with the new item, or the item itself.
+ * @param {Object} o (optional) If the second parameter was a key, the new item.
+ * @return {Object} The item inserted.
+ */
+    insert : function(index, key, o){
+        if(arguments.length == 2){
+            o = arguments[1];
+            key = this.getKey(o);
+        }
+        if(this.containsKey(key)){
+            this.suspendEvents();
+            this.removeKey(key);
+            this.resumeEvents();
+        }
+        if(index >= this.length){
+            return this.add(key, o);
+        }
+        this.length++;
+        this.items.splice(index, 0, o);
+        if(typeof key != "undefined" && key !== null){
+            this.map[key] = o;
+        }
+        this.keys.splice(index, 0, key);
+        this.fireEvent("add", index, o, key);
+        return o;
+    },
+
+/**
+ * Remove an item from the collection.
+ * @param {Object} o The item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    remove : function(o){
+        return this.removeAt(this.indexOf(o));
+    },
+
+/**
+ * Remove an item from a specified index in the collection. Fires the {@link #remove} event when complete.
+ * @param {Number} index The index within the collection of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeAt : function(index){
+        if(index < this.length && index >= 0){
+            this.length--;
+            var o = this.items[index];
+            this.items.splice(index, 1);
+            var key = this.keys[index];
+            if(typeof key != "undefined"){
+                delete this.map[key];
+            }
+            this.keys.splice(index, 1);
+            this.fireEvent("remove", o, key);
+            return o;
+        }
+        return false;
+    },
+
+/**
+ * Removed an item associated with the passed key fom the collection.
+ * @param {String} key The key of the item to remove.
+ * @return {Object} The item removed or false if no item was removed.
+ */
+    removeKey : function(key){
+        return this.removeAt(this.indexOfKey(key));
+    },
+
+/**
+ * Returns the number of items in the collection.
+ * @return {Number} the number of items in the collection.
+ */
+    getCount : function(){
+        return this.length;
+    },
+
+/**
+ * Returns index within the collection of the passed Object.
+ * @param {Object} o The item to find the index of.
+ * @return {Number} index of the item. Returns -1 if not found.
+ */
+    indexOf : function(o){
+        return this.items.indexOf(o);
+    },
+
+/**
+ * Returns index within the collection of the passed key.
+ * @param {String} key The key to find the index of.
+ * @return {Number} index of the key.
+ */
+    indexOfKey : function(key){
+        return this.keys.indexOf(key);
+    },
+
+/**
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+    item : function(key){
+        var mk = this.map[key],
+            item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined;
+        return !Ext.isFunction(item) || this.allowFunctions ? item : null; // for prototype!
+    },
+
+/**
+ * Returns the item at the specified index.
+ * @param {Number} index The index of the item.
+ * @return {Object} The item at the specified index.
+ */
+    itemAt : function(index){
+        return this.items[index];
+    },
+
+/**
+ * Returns the item associated with the passed key.
+ * @param {String/Number} key The key of the item.
+ * @return {Object} The item associated with the passed key.
+ */
+    key : function(key){
+        return this.map[key];
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as an item.
+ * @param {Object} o  The Object to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as an item.
+ */
+    contains : function(o){
+        return this.indexOf(o) != -1;
+    },
+
+/**
+ * Returns true if the collection contains the passed Object as a key.
+ * @param {String} key The key to look for in the collection.
+ * @return {Boolean} True if the collection contains the Object as a key.
+ */
+    containsKey : function(key){
+        return typeof this.map[key] != "undefined";
+    },
+
+/**
+ * Removes all items from the collection.  Fires the {@link #clear} event when complete.
+ */
+    clear : function(){
+        this.length = 0;
+        this.items = [];
+        this.keys = [];
+        this.map = {};
+        this.fireEvent("clear");
+    },
+
+/**
+ * Returns the first item in the collection.
+ * @return {Object} the first item in the collection..
+ */
+    first : function(){
+        return this.items[0];
+    },
+
+/**
+ * Returns the last item in the collection.
+ * @return {Object} the last item in the collection..
+ */
+    last : function(){
+        return this.items[this.length-1];
+    },
+
+    // private
+    _sort : function(property, dir, fn){
+        var i,
+            len,
+            dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1,
+            c = [], k = this.keys, items = this.items;
+            
+        fn = fn || function(a, b){
+            return a-b;
+        };
+        for(i = 0, len = items.length; i < len; i++){
+            c[c.length] = {key: k[i], value: items[i], index: i};
+        }
+        c.sort(function(a, b){
+            var v = fn(a[property], b[property]) * dsc;
+            if(v === 0){
+                v = (a.index < b.index ? -1 : 1);
+            }
+            return v;
+        });
+        for(i = 0, len = c.length; i < len; i++){
+            items[i] = c[i].value;
+            k[i] = c[i].key;
+        }
+        this.fireEvent("sort", this);
+    },
+
+    /**
+     * Sorts this collection with the passed comparison function
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) comparison function
+     */
+    sort : function(dir, fn){
+        this._sort("value", dir, fn);
+    },
+
+    /**
+     * Sorts this collection by keys
+     * @param {String} direction (optional) "ASC" or "DESC"
+     * @param {Function} fn (optional) a comparison function (defaults to case insensitive string)
+     */
+    keySort : function(dir, fn){
+        this._sort("key", dir, fn || function(a, b){
+            var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase();
+            return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
+        });
+    },
+
+    /**
+     * Returns a range of items in this collection
+     * @param {Number} startIndex (optional) defaults to 0
+     * @param {Number} endIndex (optional) default to the last item
+     * @return {Array} An array of items
+     */
+    getRange : function(start, end){
+        var items = this.items;
+        if(items.length < 1){
+            return [];
+        }
+        start = start || 0;
+        end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1);
+        var i, r = [];
+        if(start <= end){
+            for(i = start; i <= end; i++) {
+                r[r.length] = items[i];
+            }
+        }else{
+            for(i = start; i >= end; i--) {
+                r[r.length] = items[i];
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Filter the <i>objects</i> in this collection by a specific property.
+     * Returns a new collection that has been filtered.
+     * @param {String} property A property on your objects
+     * @param {String/RegExp} value Either string that the property values
+     * should start with or a RegExp to test against the property
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison (defaults to False).
+     * @return {MixedCollection} The new filtered collection
+     */
+    filter : function(property, value, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return this.clone();
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.filterBy(function(o){
+            return o && value.test(o[property]);
+        });
+    },
+
+    /**
+     * Filter by a function. Returns a <i>new</i> collection that has been filtered.
+     * The passed function will be called with each object in the collection.
+     * If the function returns true, the value is included otherwise it is filtered.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key)
+     * @param {Object} scope (optional) The scope of the function (defaults to this)
+     * @return {MixedCollection} The new filtered collection
+     */
+    filterBy : function(fn, scope){
+        var r = new Ext.util.MixedCollection();
+        r.getKey = this.getKey;
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                r.add(k[i], it[i]);
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Finds the index of the first matching object in this collection by a specific property/value.
+     * @param {String} property The name of a property on your objects.
+     * @param {String/RegExp} value A string that the property values
+     * should start with or a RegExp to test against the property.
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning.
+     * @param {Boolean} caseSensitive (optional) True for case sensitive comparison.
+     * @return {Number} The matched index or -1
+     */
+    findIndex : function(property, value, start, anyMatch, caseSensitive){
+        if(Ext.isEmpty(value, false)){
+            return -1;
+        }
+        value = this.createValueMatcher(value, anyMatch, caseSensitive);
+        return this.findIndexBy(function(o){
+            return o && value.test(o[property]);
+        }, null, start);
+    },
+
+    /**
+     * Find the index of the first matching object in this collection by a function.
+     * If the function returns <i>true</i> it is considered a match.
+     * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key).
+     * @param {Object} scope (optional) The scope of the function (defaults to this).
+     * @param {Number} start (optional) The index to start searching at (defaults to 0).
+     * @return {Number} The matched index or -1
+     */
+    findIndexBy : function(fn, scope, start){
+        var k = this.keys, it = this.items;
+        for(var i = (start||0), len = it.length; i < len; i++){
+            if(fn.call(scope||this, it[i], k[i])){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    // private
+    createValueMatcher : function(value, anyMatch, caseSensitive){
+        if(!value.exec){ // not a regex
+            value = String(value);
+            value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i');
+        }
+        return value;
+    },
+
+    /**
+     * Creates a shallow copy of this collection
+     * @return {MixedCollection}
+     */
+    clone : function(){
+        var r = new Ext.util.MixedCollection();
+        var k = this.keys, it = this.items;
+        for(var i = 0, len = it.length; i < len; i++){
+            r.add(k[i], it[i]);
+        }
+        r.getKey = this.getKey;
+        return r;
+    }
+});
+/**
+ * This method calls {@link #item item()}.
+ * Returns the item associated with the passed key OR index. Key has priority over index.  This is the equivalent
+ * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}.
+ * @param {String/Number} key The key or index of the item.
+ * @return {Object} If the item is found, returns the item.  If the item was not found, returns <tt>undefined</tt>.
+ * If an item was found, but is a Class, returns <tt>null</tt>.
+ */
+Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/Observable-more.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/Observable-more.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/Observable-more.js	(revision 625)
@@ -0,0 +1,178 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.Observable
+ */
+Ext.apply(Ext.util.Observable.prototype, function(){    
+    // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?)
+    // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+    // private
+    function getMethodEvent(method){
+        var e = (this.methodEvents = this.methodEvents ||
+        {})[method], returnValue, v, cancel, obj = this;
+        
+        if (!e) {
+            this.methodEvents[method] = e = {};
+            e.originalFn = this[method];
+            e.methodName = method;
+            e.before = [];
+            e.after = [];
+            
+            var makeCall = function(fn, scope, args){
+                if (!Ext.isEmpty(v = fn.apply(scope || obj, args))) {
+                    if (Ext.isObject(v)) {
+                        returnValue = !Ext.isEmpty(v.returnValue) ? v.returnValue : v;
+                        cancel = !!v.cancel;
+                    }
+                    else 
+                        if (v === false) {
+                            cancel = true;
+                        }
+                        else {
+                            returnValue = v;
+                        }
+                }
+            };
+            
+            this[method] = function(){
+                var args = Ext.toArray(arguments);
+                returnValue = v = undefined;
+                cancel = false;
+                
+                Ext.each(e.before, function(b){
+                    makeCall(b.fn, b.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                
+                if (!Ext.isEmpty(v = e.originalFn.apply(obj, args))) {
+                    returnValue = v;
+                }
+                Ext.each(e.after, function(a){
+                    makeCall(a.fn, a.scope, args);
+                    if (cancel) {
+                        return returnValue;
+                    }
+                });
+                return returnValue;
+            };
+        }
+        return e;
+    }
+    
+    return {
+        // these are considered experimental
+        // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
+        // adds an "interceptor" called before the original method
+        beforeMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).before.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        // adds a "sequence" called after the original method
+        afterMethod: function(method, fn, scope){
+            getMethodEvent.call(this, method).after.push({
+                fn: fn,
+                scope: scope
+            });
+        },
+        
+        removeMethodListener: function(method, fn, scope){
+            var e = getMethodEvent.call(this, method), found = false;
+            Ext.each(e.before, function(b, i, arr){
+                if (b.fn == fn && b.scope == scope) {
+                    arr.splice(i, 1);
+                    found = true;
+                    return false;
+                }
+            });
+            if (!found) {
+                Ext.each(e.after, function(a, i, arr){
+                    if (a.fn == fn && a.scope == scope) {
+                        arr.splice(i, 1);
+                        return false;
+                    }
+                });
+            }
+        },
+        
+        /**
+         * Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.
+         * @param {Object} o The Observable whose events this object is to relay.
+         * @param {Array} events Array of event names to relay.
+         */
+        relayEvents: function(o, events){
+            var me = this;
+            function createHandler(ename){
+                return function(){
+                    return me.fireEvent.apply(me, [ename].concat(Ext.toArray(arguments)));
+                };
+            }
+            Ext.each(events, function(ename){
+                me.events[ename] = me.events[ename] || true;
+                o.on(ename, createHandler(ename), me);
+            });
+        },
+        
+        /**
+         * Used to enable bubbling of events
+         * @param {Object} events
+         */
+        enableBubble: function(events){
+            var me = this;
+            events = Ext.isArray(events) ? events : Ext.toArray(arguments);
+            Ext.each(events, function(ename){
+                ename = ename.toLowerCase();
+                var ce = me.events[ename] || true;
+                if (typeof ce == "boolean") {
+                    ce = new Ext.util.Event(me, ename);
+                    me.events[ename] = ce;
+                }
+                ce.bubble = true;
+            });
+        }
+    };
+}());
+
+
+/**
+ * Starts capture on the specified Observable. All events will be passed
+ * to the supplied function with the event name + standard signature of the event
+ * <b>before</b> the event is fired. If the supplied function returns false,
+ * the event will not fire.
+ * @param {Observable} o The Observable to capture
+ * @param {Function} fn The function to call
+ * @param {Object} scope (optional) The scope (this object) for the fn
+ * @static
+ */
+Ext.util.Observable.capture = function(o, fn, scope){
+    o.fireEvent = o.fireEvent.createInterceptor(fn, scope);
+};
+
+
+/**
+ * Sets observability on the passed class constructor.<p>
+ * <p>This makes any event fired on any instance of the passed class also fire a single event through
+ * the <i>class</i> allowing for central handling of events on many instances at once.</p>
+ * <p>Usage:</p><pre><code>
+Ext.util.Observable.observeClass(Ext.data.Connection);
+Ext.data.Connection.on('beforerequest', function(con, options) {
+    console.log("Ajax request made to " + options.url);
+});</code></pre>
+ * @param {Function} c The class constructor to make observable.
+ * @static
+ */
+Ext.util.Observable.observeClass = function(c){
+    Ext.apply(c, new Ext.util.Observable());
+    c.prototype.fireEvent = function(){
+        return (c.fireEvent.apply(c, arguments) !== false) &&
+        (Ext.util.Observable.prototype.fireEvent.apply(this, arguments) !== false);
+    };
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/TextMetrics.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/TextMetrics.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/TextMetrics.js	(revision 625)
@@ -0,0 +1,131 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.TextMetrics
+ * Provides precise pixel measurements for blocks of text so that you can determine exactly how high and
+ * wide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and
+ * should not contain any HTML, otherwise it may not be measured correctly.
+ * @singleton
+ */
+Ext.util.TextMetrics = function(){
+    var shared;
+    return {
+        /**
+         * Measures the size of the specified text
+         * @param {String/HTMLElement} el The element, dom node or id from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String} text The text to measure
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        measure : function(el, text, fixedWidth){
+            if(!shared){
+                shared = Ext.util.TextMetrics.Instance(el, fixedWidth);
+            }
+            shared.bind(el);
+            shared.setFixedWidth(fixedWidth || 'auto');
+            return shared.getSize(text);
+        },
+
+        /**
+         * Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces
+         * the overhead of multiple calls to initialize the style properties on each measurement.
+         * @param {String/HTMLElement} el The element, dom node or id that the instance will be bound to
+         * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width
+         * in order to accurately measure the text height
+         * @return {Ext.util.TextMetrics.Instance} instance The new instance
+         */
+        createInstance : function(el, fixedWidth){
+            return Ext.util.TextMetrics.Instance(el, fixedWidth);
+        }
+    };
+}();
+
+Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
+    var ml = new Ext.Element(document.createElement('div'));
+    document.body.appendChild(ml.dom);
+    ml.position('absolute');
+    ml.setLeftTop(-1000, -1000);
+    ml.hide();
+
+    if(fixedWidth){
+        ml.setWidth(fixedWidth);
+    }
+
+    var instance = {
+        /**
+         * Returns the size of the specified text based on the internal element's style and width properties
+         * @param {String} text The text to measure
+         * @return {Object} An object containing the text's size {width: (width), height: (height)}
+         */
+        getSize : function(text){
+            ml.update(text);
+            var s = ml.getSize();
+            ml.update('');
+            return s;
+        },
+
+        /**
+         * Binds this TextMetrics instance to an element from which to copy existing CSS styles
+         * that can affect the size of the rendered text
+         * @param {String/HTMLElement} el The element, dom node or id
+         */
+        bind : function(el){
+            ml.setStyle(
+                Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing')
+            );
+        },
+
+        /**
+         * Sets a fixed width on the internal measurement element.  If the text will be multiline, you have
+         * to set a fixed width in order to accurately measure the text height.
+         * @param {Number} width The width to set on the element
+         */
+        setFixedWidth : function(width){
+            ml.setWidth(width);
+        },
+
+        /**
+         * Returns the measured width of the specified text
+         * @param {String} text The text to measure
+         * @return {Number} width The width in pixels
+         */
+        getWidth : function(text){
+            ml.dom.style.width = 'auto';
+            return this.getSize(text).width;
+        },
+
+        /**
+         * Returns the measured height of the specified text.  For multiline text, be sure to call
+         * {@link #setFixedWidth} if necessary.
+         * @param {String} text The text to measure
+         * @return {Number} height The height in pixels
+         */
+        getHeight : function(text){
+            return this.getSize(text).height;
+        }
+    };
+
+    instance.bind(bindTo);
+
+    return instance;
+};
+
+Ext.Element.addMethods({
+    /**
+     * Returns the width in pixels of the passed text, or the width of the text in this Element.
+     * @param {String} text The text to measure. Defaults to the innerHTML of the element.
+     * @param {Number} min (Optional) The minumum value to return.
+     * @param {Number} max (Optional) The maximum value to return.
+     * @return {Number} The text width in pixels.
+     * @member Ext.Element getTextWidth
+     */
+    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);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/UpdateManager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/UpdateManager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/UpdateManager.js	(revision 625)
@@ -0,0 +1,536 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Updater
+ * @extends Ext.util.Observable
+ * Provides AJAX-style update capabilities for Element objects.  Updater can be used to {@link #update}
+ * an {@link Ext.Element} once, or you can use {@link #startAutoRefresh} to set up an auto-updating
+ * {@link Ext.Element Element} on a specific interval.<br><br>
+ * Usage:<br>
+ * <pre><code>
+ * var el = Ext.get("foo"); // Get Ext.Element object
+ * var mgr = el.getUpdater();
+ * mgr.update({
+        url: "http://myserver.com/index.php",
+        params: {
+            param1: "foo",
+            param2: "bar"
+        }
+ * });
+ * ...
+ * mgr.formUpdate("myFormId", "http://myserver.com/index.php");
+ * <br>
+ * // or directly (returns the same Updater instance)
+ * var mgr = new Ext.Updater("myElementId");
+ * mgr.startAutoRefresh(60, "http://myserver.com/index.php");
+ * mgr.on("update", myFcnNeedsToKnow);
+ * <br>
+ * // short handed call directly from the element object
+ * Ext.get("foo").load({
+        url: "bar.php",
+        scripts: true,
+        params: "param1=foo&amp;param2=bar",
+        text: "Loading Foo..."
+ * });
+ * </code></pre>
+ * @constructor
+ * Create new Updater directly.
+ * @param {Mixed} el The element to update
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already
+ * has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).
+ */
+Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, 
+function() {
+	var BEFOREUPDATE = "beforeupdate",
+		UPDATE = "update",
+		FAILURE = "failure";
+		
+	// private
+    function processSuccess(response){	    
+	    var me = this;
+        me.transaction = null;
+        if (response.argument.form && response.argument.reset) {
+            try { // put in try/catch since some older FF releases had problems with this
+                response.argument.form.reset();
+            } catch(e){}
+        }
+        if (me.loadScripts) {
+            me.renderer.render(me.el, response, me,
+               updateComplete.createDelegate(me, [response]));
+        } else {
+            me.renderer.render(me.el, response, me);
+            updateComplete.call(me, response);
+        }
+    }
+    
+    // private
+    function updateComplete(response, type, success){
+        this.fireEvent(type || UPDATE, this.el, response);
+        if(Ext.isFunction(response.argument.callback)){
+            response.argument.callback.call(response.argument.scope, this.el, Ext.isEmpty(success) ? true : false, response, response.argument.options);
+        }
+    }
+
+    // private
+    function processFailure(response){	            
+        updateComplete.call(this, response, FAILURE, !!(this.transaction = null));
+    }
+	    
+	return {
+	    constructor: function(el, forceNew){
+		    var me = this;
+	        el = Ext.get(el);
+	        if(!forceNew && el.updateManager){
+	            return el.updateManager;
+	        }
+	        /**
+	         * The Element object
+	         * @type Ext.Element
+	         */
+	        me.el = el;
+	        /**
+	         * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.
+	         * @type String
+	         */
+	        me.defaultUrl = null;
+	
+	        me.addEvents(
+	            /**
+	             * @event beforeupdate
+	             * Fired before an update is made, return false from your handler and the update is cancelled.
+	             * @param {Ext.Element} el
+	             * @param {String/Object/Function} url
+	             * @param {String/Object} params
+	             */
+	            BEFOREUPDATE,
+	            /**
+	             * @event update
+	             * Fired after successful update is made.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            UPDATE,
+	            /**
+	             * @event failure
+	             * Fired on update failure.
+	             * @param {Ext.Element} el
+	             * @param {Object} oResponseObject The response Object
+	             */
+	            FAILURE
+	        );
+	
+	        Ext.apply(me, Ext.Updater.defaults);
+	        /**
+	         * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}).
+	         * @property sslBlankUrl
+	         * @type String
+	         */
+	        /**
+	         * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}).
+	         * @property disableCaching
+	         * @type Boolean
+	         */
+	        /**
+	         * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}).
+	         * @property indicatorText
+	         * @type String
+	         */
+	        /**
+	         * Whether to show indicatorText when loading (defaults to {@link Ext.Updater.defaults#showLoadIndicator}).
+	         * @property showLoadIndicator
+	         * @type String
+	         */
+	        /**
+	         * Timeout for requests or form posts in seconds (defaults to {@link Ext.Updater.defaults#timeout}).
+	         * @property timeout
+	         * @type Number
+	         */
+	        /**
+	         * True to process scripts in the output (defaults to {@link Ext.Updater.defaults#loadScripts}).
+	         * @property loadScripts
+	         * @type Boolean
+	         */
+	
+	        /**
+	         * Transaction object of the current executing transaction, or null if there is no active transaction.
+	         */
+	        me.transaction = null;
+	        /**
+	         * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.refreshDelegate = me.refresh.createDelegate(me);
+	        /**
+	         * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.updateDelegate = me.update.createDelegate(me);
+	        /**
+	         * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
+	         * @type Function
+	         */
+	        me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me);	
+	        
+			/**
+			 * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}).
+			 */
+	        me.renderer = me.renderer || me.getDefaultRenderer();
+	        
+	        Ext.Updater.superclass.constructor.call(me);
+	    },
+        
+		/**
+	     * Sets the content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @param {Object} renderer The object implementing the render() method
+	     */
+	    setRenderer : function(renderer){
+	        this.renderer = renderer;
+	    },	
+        
+	    /**
+	     * Returns the current content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details.
+	     * @return {Object}
+	     */
+	    getRenderer : function(){
+	       return this.renderer;
+	    },
+
+	    /**
+	     * This is an overrideable method which returns a reference to a default
+	     * renderer class if none is specified when creating the Ext.Updater.
+	     * Defaults to {@link Ext.Updater.BasicRenderer}
+	     */
+	    getDefaultRenderer: function() {
+	        return new Ext.Updater.BasicRenderer();
+	    },
+                
+	    /**
+	     * Sets the default URL used for updates.
+	     * @param {String/Function} defaultUrl The url or a function to call to get the url
+	     */
+	    setDefaultUrl : function(defaultUrl){
+	        this.defaultUrl = defaultUrl;
+	    },
+        
+	    /**
+	     * Get the Element this Updater is bound to
+	     * @return {Ext.Element} The element
+	     */
+	    getEl : function(){
+	        return this.el;
+	    },
+	
+		/**
+	     * Performs an <b>asynchronous</b> request, updating this element with the response.
+	     * If params are specified it uses POST, otherwise it uses GET.<br><br>
+	     * <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element
+	     * will not have been fully updated when the function returns. To post-process the returned
+	     * data, use the callback option, or an <b><tt>update</tt></b> event handler.
+	     * @param {Object} options A config object containing any of the following options:<ul>
+	     * <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which
+	     * <i>returns</i> the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).</p></li>
+	     * <li>method : <b>String</b><p class="sub-desc">The HTTP method to
+	     * use. Defaults to POST if the <tt>params</tt> argument is present, otherwise GET.</p></li>
+	     * <li>params : <b>String/Object/Function</b><p class="sub-desc">The
+	     * parameters to pass to the server (defaults to none). These may be specified as a url-encoded
+	     * string, or as an object containing properties which represent parameters,
+	     * or as a function, which returns such an object.</p></li>
+	     * <li>scripts : <b>Boolean</b><p class="sub-desc">If <tt>true</tt>
+	     * any &lt;script&gt; tags embedded in the response text will be extracted
+	     * and executed (defaults to {@link Ext.Updater.defaults#loadScripts}). If this option is specified,
+	     * the callback will be called <i>after</i> the execution of the scripts.</p></li>
+	     * <li>callback : <b>Function</b><p class="sub-desc">A function to
+	     * be called when the response from the server arrives. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
+	     * <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
+	     * </p></li>
+	     * <li>scope : <b>Object</b><p class="sub-desc">The scope in which
+	     * to execute the callback (The callback's <tt>this</tt> reference.) If the
+	     * <tt>params</tt> argument is a function, this scope is used for that function also.</p></li>
+	     * <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes
+	     * the default URL for this Updater object, and will be subsequently used in {@link #refresh}
+	     * calls.  To bypass this behavior, pass <tt>discardUrl:true</tt> (defaults to false).</p></li>
+	     * <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before
+	     * timing out (defaults to {@link Ext.Updater.defaults#timeout}).</p></li>
+	     * <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the
+	     * {@link Ext.Updater.defaults#indicatorText} div (defaults to 'Loading...').  To replace the entire div, not
+	     * just the text, override {@link Ext.Updater.defaults#indicatorText} directly.</p></li>
+	     * <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
+	     * requests, this option causes an extra, auto-generated parameter to be appended to the request
+	     * to defeat caching (defaults to {@link Ext.Updater.defaults#disableCaching}).</p></li></ul>
+	     * <p>
+	     * For example:
+	<pre><code>
+	um.update({
+	    url: "your-url.php",
+	    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+	    callback: yourFunction,
+	    scope: yourObject, //(optional scope)
+	    discardUrl: true,
+	    nocache: true,
+	    text: "Loading...",
+	    timeout: 60,
+	    scripts: false // Save time by avoiding RegExp execution.
+	});
+	</code></pre>
+	     */
+	    update : function(url, params, callback, discardUrl){
+		    var me = this,
+		    	cfg, 
+		    	callerScope;
+		    	
+	        if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){	            
+	            if(Ext.isObject(url)){ // must be config object
+	                cfg = url;
+	                url = cfg.url;
+	                params = params || cfg.params;
+	                callback = callback || cfg.callback;
+	                discardUrl = discardUrl || cfg.discardUrl;
+	                callerScope = cfg.scope;	                
+	                if(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;};
+	                if(!Ext.isEmpty(cfg.text)){me.indicatorText = '<div class="loading-indicator">'+cfg.text+"</div>";};
+	                if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;};
+	                if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;};
+	            }
+	            me.showLoading();
+	
+	            if(!discardUrl){
+	                me.defaultUrl = url;
+	            }
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	
+	            var o = Ext.apply({}, {
+	                url : url,
+	                params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                callback: undefined,
+	                timeout: (me.timeout*1000),
+	                disableCaching: me.disableCaching,
+	                argument: {
+	                    "options": cfg,
+	                    "url": url,
+	                    "form": null,
+	                    "callback": callback,
+	                    "scope": callerScope || window,
+	                    "params": params
+	                }
+	            }, cfg);
+	
+	            me.transaction = Ext.Ajax.request(o);
+	        }
+	    },	    	
+
+		/**
+	     * <p>Performs an async form post, updating this element with the response. If the form has the attribute
+	     * enctype="<a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>", it assumes it's a file upload.
+	     * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.</p>
+	     * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
+	     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+	     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+	     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+	     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+	     * but removed after the return data has been gathered.</p>
+	     * <p>Be aware that file upload packets, sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>
+	     * and some server technologies (notably JEE) may require some custom processing in order to
+	     * retrieve parameter names and parameter values from the packet content.</p>
+	     * @param {String/HTMLElement} form The form Id or form element
+	     * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used.
+	     * @param {Boolean} reset (optional) Whether to try to reset the form after the update
+	     * @param {Function} callback (optional) Callback when transaction is complete. The following
+	     * parameters are passed:<ul>
+	     * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
+	     * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
+	     * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul>
+	     */
+	    formUpdate : function(form, url, reset, callback){
+		    var me = this;
+	        if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){
+	            if(Ext.isFunction(url)){
+	                url = url.call(me);
+	            }
+	            form = Ext.getDom(form)
+	            me.transaction = Ext.Ajax.request({
+	                form: form,
+	                url:url,
+	                success: processSuccess,
+	                failure: processFailure,
+	                scope: me,
+	                timeout: (me.timeout*1000),
+	                argument: {
+	                    "url": url,
+	                    "form": form,
+	                    "callback": callback,
+	                    "reset": reset
+	                }
+	            });
+	            me.showLoading.defer(1, me);
+	        }
+	    },
+                	
+	    /**
+	     * Set this element to auto refresh.  Can be canceled by calling {@link #stopAutoRefresh}.
+	     * @param {Number} interval How often to update (in seconds).
+	     * @param {String/Object/Function} url (optional) The url for this request, a config object in the same format
+	     * supported by {@link #load}, or a function to call to get the url (defaults to the last used url).  Note that while
+	     * the url used in a load call can be reused by this method, other load config options will not be reused and must be
+	     * sepcified as part of a config object passed as this paramter if needed.
+	     * @param {String/Object} params (optional) The parameters to pass as either a url encoded string
+	     * "&param1=1&param2=2" or as an object {param1: 1, param2: 2}
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval
+	     */
+	    startAutoRefresh : function(interval, url, params, callback, refreshNow){
+		    var me = this;
+	        if(refreshNow){
+	            me.update(url || me.defaultUrl, params, callback, true);
+	        }
+	        if(me.autoRefreshProcId){
+	            clearInterval(me.autoRefreshProcId);
+	        }
+	        me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000);
+	    },
+	
+	    /**
+	     * Stop auto refresh on this element.
+	     */
+	    stopAutoRefresh : function(){
+	        if(this.autoRefreshProcId){
+	            clearInterval(this.autoRefreshProcId);
+	            delete this.autoRefreshProcId;
+	        }
+	    },
+	
+	    /**
+	     * Returns true if the Updater is currently set to auto refresh its content (see {@link #startAutoRefresh}), otherwise false.
+	     */
+	    isAutoRefreshing : function(){
+	       return !!this.autoRefreshProcId;
+	    },
+	
+	    /**
+	     * Display the element's "loading" state. By default, the element is updated with {@link #indicatorText}. This
+	     * method may be overridden to perform a custom action while this Updater is actively updating its contents.
+	     */
+	    showLoading : function(){
+	        if(this.showLoadIndicator){
+            	this.el.dom.innerHTML = this.indicatorText;
+	        }
+	    },
+	
+	    /**
+	     * Aborts the currently executing transaction, if any.
+	     */
+	    abort : function(){
+	        if(this.transaction){
+	            Ext.Ajax.abort(this.transaction);
+	        }
+	    },
+	
+	    /**
+	     * Returns true if an update is in progress, otherwise false.
+	     * @return {Boolean}
+	     */
+	    isUpdating : function(){        
+	    	return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false;        
+	    },
+	    
+	    /**
+	     * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
+	     * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
+	     */
+	    refresh : function(callback){
+	        if(this.defaultUrl){
+	        	this.update(this.defaultUrl, null, callback, true);
+	    	}
+	    }
+    }
+}());
+
+/**
+ * @class Ext.Updater.defaults
+ * The defaults collection enables customizing the default properties of Updater
+ */
+Ext.Updater.defaults = {
+   /**
+     * Timeout for requests or form posts in seconds (defaults to 30 seconds).
+     * @type Number
+     */
+    timeout : 30,    
+    /**
+     * True to append a unique parameter to GET requests to disable caching (defaults to false).
+     * @type Boolean
+     */
+    disableCaching : false,
+    /**
+     * Whether or not to show {@link #indicatorText} during loading (defaults to true).
+     * @type Boolean
+     */
+    showLoadIndicator : true,
+    /**
+     * Text for loading indicator (defaults to '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').
+     * @type String
+     */
+    indicatorText : '<div class="loading-indicator">Loading...</div>',
+     /**
+     * True to process scripts by default (defaults to false).
+     * @type Boolean
+     */
+    loadScripts : false,
+    /**
+    * Blank page URL to use with SSL file uploads (defaults to {@link Ext#SSL_SECURE_URL} if set, or "javascript:false").
+    * @type String
+    */
+    sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false")      
+};
+
+
+/**
+ * Static convenience method. <b>This method is deprecated in favor of el.load({url:'foo.php', ...})</b>.
+ * Usage:
+ * <pre><code>Ext.Updater.updateElement("my-div", "stuff.php");</code></pre>
+ * @param {Mixed} el The element to update
+ * @param {String} url The url
+ * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs
+ * @param {Object} options (optional) A config object with any of the Updater properties you want to set - for
+ * example: {disableCaching:true, indicatorText: "Loading data..."}
+ * @static
+ * @deprecated
+ * @member Ext.Updater
+ */
+Ext.Updater.updateElement = function(el, url, params, options){
+    var um = Ext.get(el).getUpdater();
+    Ext.apply(um, options);
+    um.update(url, params, options ? options.callback : null);
+};
+
+/**
+ * @class Ext.Updater.BasicRenderer
+ * Default Content renderer. Updates the elements innerHTML with the responseText.
+ */
+Ext.Updater.BasicRenderer = function(){};
+
+Ext.Updater.BasicRenderer.prototype = {
+    /**
+     * This is called when the transaction is completed and it's time to update the element - The BasicRenderer
+     * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing),
+     * create an object with a "render(el, response)" method and pass it to setRenderer on the Updater.
+     * @param {Ext.Element} el The element being rendered
+     * @param {Object} response The XMLHttpRequest object
+     * @param {Updater} updateManager The calling update manager
+     * @param {Function} callback A callback that will need to be called if loadScripts is true on the Updater
+     */
+     render : function(el, response, updateManager, callback){	     
+        el.update(response.responseText, updateManager.loadScripts, callback);
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/XTemplate.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/XTemplate.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/XTemplate.js	(revision 625)
@@ -0,0 +1,379 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.XTemplate
+ * @extends Ext.Template
+ * <p>A template class that supports advanced functionality like autofilling arrays, conditional processing with
+ * basic comparison operators, sub-templates, basic math function support, special built-in template variables,
+ * inline code execution and more.  XTemplate also provides the templating mechanism built into {@link Ext.DataView}.</p>
+ * <p>XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are
+ * supported in the templates that can be created.  The following examples demonstrate all of the supported features.
+ * This is the data object used for reference in each code example:</p>
+ * <pre><code>
+var data = {
+    name: 'Jack Slocum',
+    title: 'Lead Developer',
+    company: 'Ext JS, LLC',
+    email: 'jack@extjs.com',
+    address: '4 Red Bulls Drive',
+    city: 'Cleveland',
+    state: 'Ohio',
+    zip: '44102',
+    drinks: ['Red Bull', 'Coffee', 'Water'],
+    kids: [{
+        name: 'Sara Grace',
+        age:3
+    },{
+        name: 'Zachary',
+        age:2
+    },{
+        name: 'John James',
+        age:0
+    }]
+};
+ * </code></pre>
+ * <p><b>Auto filling of arrays</b><br/>The <tt>tpl</tt> tag and the <tt>for</tt> operator are used
+ * to process the provided data object. If <tt>for="."</tt> is specified, the data object provided
+ * is examined. If the variable in <tt>for</tt> is an array, it will auto-fill, repeating the template
+ * block inside the <tt>tpl</tt> tag for each item in the array:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Kids: ',
+    '&lt;tpl for=".">',
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data.kids); // pass the kids property of the data object
+ * </code></pre>
+ * <p><b>Scope switching</b><br/>The <tt>for</tt> property can be leveraged to access specified members
+ * of the provided data object to populate the template:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Title: {title}&lt;/p>',
+    '&lt;p>Company: {company}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl <b>for="kids"</b>>', // interrogate the kids property within the data
+        '&lt;p>{name}&lt;/p>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+ * </code></pre>
+ * <p><b>Access to parent object from within sub-template scope</b><br/>When processing a sub-template, for example while
+ * looping through a child array, you can access the parent object's members via the <tt>parent</tt> object:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Array item index and basic math support</b> <br/>While processing an array, the special variable <tt>{#}</tt>
+ * will provide the current array index + 1 (starts at 1, not 0). Templates also support the basic math operators
+ * + - * and / that can be applied directly on numeric data values:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{#}: {name}&lt;/p>',  // <-- Auto-number each item
+            '&lt;p>In 5 Years: {age+5}&lt;/p>',  // <-- Basic math
+            '&lt;p>Dad: {parent.name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Auto-rendering of flat arrays</b> <br/>Flat arrays that contain values (and not objects) can be auto-rendered
+ * using the special <tt>{.}</tt> variable inside a loop.  This variable will represent the value of
+ * the array at the current index:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>{name}\'s favorite beverages:&lt;/p>',
+    '&lt;tpl for="drinks">',
+       '&lt;div> - {.}&lt;/div>',
+    '&lt;/tpl>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Basic conditional logic</b> <br/>Using the <tt>tpl</tt> tag and the <tt>if</tt>
+ * operator you can provide conditional checks for deciding whether or not to render specific parts of the template.
+ * Note that there is no <tt>else</tt> operator &mdash; if needed, you should use two opposite <tt>if</tt> statements.
+ * Properly-encoded attributes are required as seen in the following example:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="age &amp;gt; 1">',  // <-- Note that the &gt; is encoded
+            '&lt;p>{name}&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Ability to execute arbitrary inline code</b> <br/>In an XTemplate, anything between {[ ... ]}  is considered
+ * code to be executed in the scope of the template. There are some special variables available in that code:
+ * <ul>
+ * <li><b><tt>values</tt></b>: The values in the current scope. If you are using scope changing sub-templates, you
+ * can change what <tt>values</tt> is.</li>
+ * <li><b><tt>parent</tt></b>: The scope (values) of the ancestor template.</li>
+ * <li><b><tt>xindex</tt></b>: If you are in a looping template, the index of the loop you are in (1-based).</li>
+ * <li><b><tt>xcount</tt></b>: If you are in a looping template, the total length of the array you are looping.</li>
+ * <li><b><tt>fm</tt></b>: An alias for <tt>Ext.util.Format</tt>.</li>
+ * </ul>
+ * This example demonstrates basic row striping using an inline code block and the <tt>xindex</tt> variable:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Company: {[values.company.toUpperCase() + ", " + values.title]}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+       '&lt;div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
+        '{name}',
+        '&lt;/div>',
+    '&lt;/tpl>&lt;/p>'
+);
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * <p><b>Template member functions</b> <br/>One or more member functions can be defined directly on the config
+ * object passed into the XTemplate constructor for more complex processing:</p>
+ * <pre><code>
+var tpl = new Ext.XTemplate(
+    '&lt;p>Name: {name}&lt;/p>',
+    '&lt;p>Kids: ',
+    '&lt;tpl for="kids">',
+        '&lt;tpl if="this.isGirl(name)">',
+            '&lt;p>Girl: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isGirl(name) == false">',
+            '&lt;p>Boy: {name} - {age}&lt;/p>',
+        '&lt;/tpl>',
+        '&lt;tpl if="this.isBaby(age)">',
+            '&lt;p>{name} is a baby!&lt;/p>',
+        '&lt;/tpl>',
+    '&lt;/tpl>&lt;/p>', {
+     isGirl: function(name){
+         return name == 'Sara Grace';
+     },
+     isBaby: function(age){
+        return age < 1;
+     }
+});
+tpl.overwrite(panel.body, data);
+</code></pre>
+ * @constructor
+ * @param {String/Array/Object} parts The HTML fragment or an array of fragments to join(""), or multiple arguments
+ * to join("") that can also include a config object
+ */
+Ext.XTemplate = function(){
+    Ext.XTemplate.superclass.constructor.apply(this, arguments);
+
+    var me = this,
+    	s = me.html,
+    	re = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,
+    	nameRe = /^<tpl\b[^>]*?for="(.*?)"/,
+    	ifRe = /^<tpl\b[^>]*?if="(.*?)"/,
+    	execRe = /^<tpl\b[^>]*?exec="(.*?)"/,
+    	m,
+    	id = 0,
+    	tpls = [],
+    	VALUES = 'values',
+    	PARENT = 'parent',
+    	XINDEX = 'xindex',
+    	XCOUNT = 'xcount',
+    	RETURN = 'return ',
+    	WITHVALUES = 'with(values){ ';
+
+    s = ['<tpl>', s, '</tpl>'].join('');
+
+    while((m = s.match(re))){
+       	var m2 = m[0].match(nameRe),
+			m3 = m[0].match(ifRe),
+       		m4 = m[0].match(execRe),
+       		exp = null,
+       		fn = null,
+       		exec = null,
+       		name = m2 && m2[1] ? m2[1] : '';
+
+       if (m3) {
+           exp = m3 && m3[1] ? m3[1] : null;
+           if(exp){
+               fn = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES + RETURN +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if (m4) {
+           exp = m4 && m4[1] ? m4[1] : null;
+           if(exp){
+               exec = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES +(Ext.util.Format.htmlDecode(exp))+'; }');
+           }
+       }
+       if(name){
+           switch(name){
+               case '.': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + VALUES + '; }'); break;
+               case '..': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + PARENT + '; }'); break;
+               default: name = new Function(VALUES, PARENT, WITHVALUES + RETURN + name + '; }');
+           }
+       }
+       tpls.push({
+            id: id,
+            target: name,
+            exec: exec,
+            test: fn,
+            body: m[1]||''
+        });
+       s = s.replace(m[0], '{xtpl'+ id + '}');
+       ++id;
+    }
+	Ext.each(tpls, function(t) {
+        me.compileTpl(t);
+    });
+    me.master = tpls[tpls.length-1];
+    me.tpls = tpls;
+};
+Ext.extend(Ext.XTemplate, Ext.Template, {
+    // private
+    re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,
+    // private
+    codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g,
+
+    // private
+    applySubTemplate : function(id, values, parent, xindex, xcount){
+        var me = this,
+        	len,
+        	t = me.tpls[id],
+        	vs,
+        	buf = [];
+        if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) ||
+            (t.exec && t.exec.call(me, values, parent, xindex, xcount))) {
+            return '';
+        }
+        vs = t.target ? t.target.call(me, values, parent) : values;
+        len = vs.length;
+        parent = t.target ? values : parent;
+        if(t.target && Ext.isArray(vs)){
+	        Ext.each(vs, function(v, i) {
+                buf[buf.length] = t.compiled.call(me, v, parent, i+1, len);
+            });
+            return buf.join('');
+        }
+        return t.compiled.call(me, vs, parent, xindex, xcount);
+    },
+
+    // private
+    compileTpl : function(tpl){
+        var fm = Ext.util.Format,
+       		useF = this.disableFormats !== true,
+            sep = Ext.isGecko ? "+" : ",",
+            body;
+
+        function fn(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+"'";
+        }
+
+        function codeFn(m, code){
+            return "'"+ sep +'('+code+')'+sep+"'";
+        }
+
+        // branched to use + in gecko and [].join() in others
+        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;
+    },
+
+    /**
+     * Returns an HTML fragment of this template with the specified values applied.
+     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+     * @return {String} The HTML fragment
+     */
+    applyTemplate : function(values){
+        return this.master.compiled.call(this, values, {}, 1, 1);
+    },
+
+    /**
+     * Compile the template to a function for optimized performance.  Recommended if the template will be used frequently.
+     * @return {Function} The compiled function
+     */
+    compile : function(){return this;}
+
+    /**
+     * @property re
+     * @hide
+     */
+    /**
+     * @property disableFormats
+     * @hide
+     */
+    /**
+     * @method set
+     * @hide
+     */
+
+});
+/**
+ * Alias for {@link #applyTemplate}
+ * Returns an HTML fragment of this template with the specified values applied.
+ * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
+ * @return {String} The HTML fragment
+ * @member Ext.XTemplate
+ * @method apply
+ */
+Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate;
+
+/**
+ * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+ * @param {String/HTMLElement} el A DOM element or its id
+ * @return {Ext.Template} The created template
+ * @static
+ */
+Ext.XTemplate.from = function(el){
+    el = Ext.getDom(el);
+    return new Ext.XTemplate(el.value || el.innerHTML);
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/DelayedTask.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/DelayedTask.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/DelayedTask.js	(revision 625)
@@ -0,0 +1,68 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.DelayedTask
+ * <p> The DelayedTask class provides a convenient way to "buffer" the execution of a method,
+ * performing setTimeout where a new timeout cancels the old timeout. When called, the
+ * task will wait the specified time period before executing. If durng that time period,
+ * the task is called again, the original call will be cancelled. This continues so that
+ * the function is only called a single time for each iteration.</p>
+ * <p>This method is especially useful for things like detecting whether a user has finished
+ * typing in a text field. An example would be performing validation on a keypress. You can
+ * use this class to buffer the keypress events for a certain number of milliseconds, and
+ * perform only if they stop for that amount of time.  Usage:</p><pre><code>
+var task = new Ext.util.DelayedTask(function(){
+    alert(Ext.getDom('myInputField').value.length);
+});
+// Wait 500ms before calling our function. If the user presses another key 
+// during that 500ms, it will be cancelled and we'll wait another 500ms.
+Ext.get('myInputField').on('keypress', function(){
+    task.{@link #delay}(500); 
+});
+ * </code></pre> 
+ * <p>Note that we are using a DelayedTask here to illustrate a point. The configuration
+ * option <tt>buffer</tt> for {@link Ext.util.Observable#addListener addListener/on} will
+ * also setup a delayed task for you to buffer events.</p> 
+ * @constructor The parameters to this constructor serve as defaults and are not required.
+ * @param {Function} fn (optional) The default function to timeout
+ * @param {Object} scope (optional) The default scope of that timeout
+ * @param {Array} args (optional) The default Array of arguments
+ */
+Ext.util.DelayedTask = function(fn, scope, args){
+    var me = this,
+    	id,    	
+    	call = function(){
+    		clearInterval(id);
+	        id = null;
+	        fn.apply(scope, args || []);
+	    };
+	    
+    /**
+     * Cancels any pending timeout and queues a new one
+     * @param {Number} delay The milliseconds to delay
+     * @param {Function} newFn (optional) Overrides function passed to constructor
+     * @param {Object} newScope (optional) Overrides scope passed to constructor
+     * @param {Array} newArgs (optional) Overrides args passed to constructor
+     */
+    me.delay = function(delay, newFn, newScope, newArgs){
+        me.cancel();
+        fn = newFn || fn;
+        scope = newScope || scope;
+        args = newArgs || args;
+        id = setInterval(call, delay);
+    };
+
+    /**
+     * Cancel the last queued timeout
+     */
+    me.cancel = function(){
+        if(id){
+            clearInterval(id);
+            id = null;
+        }
+    };
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/JSON.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/JSON.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/JSON.js	(revision 625)
@@ -0,0 +1,174 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.JSON
+ * Modified version of Douglas Crockford"s json.js that doesn"t
+ * mess with the Object prototype
+ * http://www.json.org/js.html
+ * @singleton
+ */
+Ext.util.JSON = new (function(){
+    var useHasOwn = !!{}.hasOwnProperty,
+        isNative = function() {
+            var useNative = null;
+
+            return function() {
+                if (useNative === null) {
+                    useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]';
+                }
+        
+                return useNative;
+            };
+        }(),
+        pad = function(n) {
+            return n < 10 ? "0" + n : n;
+        },
+        doDecode = function(json){
+            return eval("(" + json + ')');    
+        },
+        doEncode = function(o){
+            if(typeof o == "undefined" || o === null){
+                return "null";
+            }else if(Ext.isArray(o)){
+                return encodeArray(o);
+            }else if(Object.prototype.toString.apply(o) === '[object Date]'){
+                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(doEncode(i), ":",
+                                    v === null ? "null" : doEncode(v));
+                            b = true;
+                        }
+                    }
+                }
+                a.push("}");
+                return a.join("");
+            }    
+        },
+        m = {
+            "\b": '\\b',
+            "\t": '\\t',
+            "\n": '\\n',
+            "\f": '\\f',
+            "\r": '\\r',
+            '"' : '\\"',
+            "\\": '\\\\'
+        },
+        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 + '"';
+        },
+        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()) + '"';
+    };
+
+    /**
+     * Encodes an Object, Array or other value
+     * @param {Mixed} o The variable to encode
+     * @return {String} The JSON string
+     */
+    this.encode = function() {
+        var ec;
+        return function(o) {
+            if (!ec) {
+                // setup encoding function on first access
+                ec = isNative() ? JSON.stringify : doEncode;
+            }
+            return ec(o);
+        };
+    }();
+
+
+    /**
+     * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.
+     * @param {String} json The JSON string
+     * @return {Object} The resulting object
+     */
+    this.decode = function() {
+        var dc;
+        return function(json) {
+            if (!dc) {
+                // setup decoding function on first access
+                dc = isNative() ? JSON.parse : doDecode;
+            }
+            return dc(json);
+        };
+    }();
+
+})();
+/**
+ * Shorthand for {@link Ext.util.JSON#encode}
+ * @param {Mixed} o The variable to encode
+ * @return {String} The JSON string
+ * @member Ext
+ * @method encode
+ */
+Ext.encode = Ext.util.JSON.encode;
+/**
+ * Shorthand for {@link Ext.util.JSON#decode}
+ * @param {String} json The JSON string
+ * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid.
+ * @return {Object} The resulting object
+ * @member Ext
+ * @method decode
+ */
+Ext.decode = Ext.util.JSON.decode;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/Observable.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/Observable.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/Observable.js	(revision 625)
@@ -0,0 +1,483 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
+
+var EXTUTIL = Ext.util,
+    TOARRAY = Ext.toArray,
+    EACH = Ext.each,
+    ISOBJECT = Ext.isObject,
+    TRUE = true,
+    FALSE = false;
+/**
+ * @class Ext.util.Observable
+ * Base class that provides a common interface for publishing events. Subclasses are expected to
+ * to have a property "events" with all the events defined, and, optionally, a property "listeners"
+ * with configured listeners defined.<br>
+ * For example:
+ * <pre><code>
+Employee = Ext.extend(Ext.util.Observable, {
+    constructor: function(config){
+        this.name = config.name;
+        this.addEvents({
+            "fired" : true,
+            "quit" : true
+        });
+
+        // Copy configured listeners into *this* object so that the base class&#39;s
+        // constructor will add them.
+        this.listeners = config.listeners;
+
+        // Call our superclass constructor to complete construction process.
+        Employee.superclass.constructor.call(config)
+    }
+});
+</code></pre>
+ * This could then be used like this:<pre><code>
+var newEmployee = new Employee({
+    name: employeeName,
+    listeners: {
+        quit: function() {
+            // By default, "this" will be the object that fired the event.
+            alert(this.name + " has quit!");
+        }
+    }
+});
+</code></pre>
+ */
+EXTUTIL.Observable = function(){
+    /**
+     * @cfg {Object} listeners (optional) <p>A config object containing one or more event handlers to be added to this
+     * object during initialization.  This should be a valid listeners config object as specified in the
+     * {@link #addListener} example for attaching multiple handlers at once.</p>
+     * <br><p><b><u>DOM events from ExtJs {@link Ext.Component Components}</u></b></p>
+     * <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
+     * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s
+     * <b><code>{@link Ext.DataView#click click}</code></b> event passing the node clicked on. To access DOM
+     * events directly from a Component's HTMLElement, listeners must be added to the <i>{@link Ext.Component#getEl Element}</i> after the Component
+     * has been rendered. A plugin can simplify this step:<pre><code>
+// Plugin is configured with a listeners config object.
+// The Component is appended to the argument list of all handler functions.
+Ext.DomObserver = Ext.extend(Object, {
+    constructor: function(config) {
+        this.listeners = config.listeners ? config.listeners : config;
+    },
+
+    // Component passes itself into plugin&#39;s init method
+    init: function(c) {
+        var p, l = this.listeners;
+        for (p in l) {
+            if (Ext.isFunction(l[p])) {
+                l[p] = this.createHandler(l[p], c);
+            } else {
+                l[p].fn = this.createHandler(l[p].fn, c);
+            }
+        }
+
+        // Add the listeners to the Element immediately following the render call
+        c.render = c.render.{@link Function#createSequence createSequence}(function() {
+            var e = c.getEl();
+            if (e) {
+                e.on(l);
+            }
+        });
+    },
+
+    createHandler: function(fn, c) {
+        return function(e) {
+            fn.call(this, e, c);
+        };
+    }
+});
+
+var combo = new Ext.form.ComboBox({
+
+    // Collapse combo when its element is clicked on
+    plugins: [ new Ext.DomObserver({
+        click: function(evt, comp) {
+            comp.collapse();
+        }
+    })],
+    store: myStore,
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all'
+});
+     * </code></pre></p>
+     */
+    var me = this, e = me.events;
+    if(me.listeners){
+        me.on(me.listeners);
+        delete me.listeners;
+    }
+    me.events = e || {};
+};
+
+EXTUTIL.Observable.prototype = function(){
+    var filterOptRe = /^(?:scope|delay|buffer|single)$/, toLower = function(s){
+        return s.toLowerCase();
+    };
+
+    return {
+        /**
+         * <p>Fires the specified event with the passed parameters (minus the event name).</p>
+         * <p>An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget})
+         * by calling {@link #enableBubble}.</p>
+         * @param {String} eventName The name of the event to fire.
+         * @param {Object...} args Variable number of parameters are passed to handlers.
+         * @return {Boolean} returns false if any of the handlers return false otherwise it returns true.
+         */
+
+        fireEvent : function(){
+            var a = TOARRAY(arguments),
+                ename = toLower(a[0]),
+                me = this,
+                ret = TRUE,
+                ce = me.events[ename],
+                q,
+                c;
+            if (me.eventsSuspended === TRUE) {
+                if (q = me.suspendedEventsQueue) {
+                    q.push(a);
+                }
+            }
+            else if(ISOBJECT(ce) && ce.bubble){
+                if(ce.fire.apply(ce, a.slice(1)) === FALSE) {
+                    return FALSE;
+                }
+                c = me.getBubbleTarget && me.getBubbleTarget();
+                if(c && c.enableBubble) {
+                    c.enableBubble(ename);
+                    return c.fireEvent.apply(c, a);
+                }
+            }
+            else {
+                if (ISOBJECT(ce)) {
+                    a.shift();
+                    ret = ce.fire.apply(ce, a);
+                }
+            }
+            return ret;
+        },
+
+        /**
+         * Appends an event handler to this object.
+         * @param {String}   eventName The name of the event to listen for.
+         * @param {Function} handler The method the event invokes.
+         * @param {Object}   scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b>
+         * @param {Object}   options (optional) An object containing handler configuration.
+         * properties. This may contain any of the following properties:<ul>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+         * <b>If omitted, defaults to the object which fired the event.</b></div></li>
+         * <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+         * <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+         * <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+         * by the specified number of milliseconds. If the event fires again within that time, the original
+         * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+         * <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
+         * if the event was bubbled up from a child Observable.</div></li>
+         * </ul><br>
+         * <p>
+         * <b>Combining Options</b><br>
+         * Using the options argument, it is possible to combine different types of listeners:<br>
+         * <br>
+         * A delayed, one-time listener.
+         * <pre><code>
+myDataView.on('click', this.onClick, this, {
+    single: true,
+    delay: 100
+});</code></pre>
+         * <p>
+         * <b>Attaching multiple handlers in 1 call</b><br>
+         * The method also allows for a single argument to be passed which is a config object containing properties
+         * which specify multiple handlers.
+         * <p>
+         * <pre><code>
+myGridPanel.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * <pre><code>
+myGridPanel.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+     scope: this
+});</code></pre>
+         */
+        addListener : function(eventName, fn, scope, o){
+            var me = this,
+                e,
+                oe,
+                isF,
+            ce;
+            if (ISOBJECT(eventName)) {
+                o = eventName;
+                for (e in o){
+                    oe = o[e];
+                    if (!filterOptRe.test(e)) {
+                        me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o);
+                    }
+                }
+            } else {
+                eventName = toLower(eventName);
+                ce = me.events[eventName] || TRUE;
+                if (typeof ce == "boolean") {
+                    me.events[eventName] = ce = new EXTUTIL.Event(me, eventName);
+                }
+                ce.addListener(fn, scope, ISOBJECT(o) ? o : {});
+            }
+        },
+
+        /**
+         * Removes an event handler.
+         * @param {String}   eventName The type of event the handler was associated with.
+         * @param {Function} handler   The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+         * @param {Object}   scope     (optional) The scope originally specified for the handler.
+         */
+        removeListener : function(eventName, fn, scope){
+            var ce = this.events[toLower(eventName)];
+            if (ISOBJECT(ce)) {
+                ce.removeListener(fn, scope);
+            }
+        },
+
+        /**
+         * Removes all listeners for this object
+         */
+        purgeListeners : function(){
+            var events = this.events,
+                evt,
+                key;
+            for(key in events){
+                evt = events[key];
+                if(ISOBJECT(evt)){
+                    evt.clearListeners();
+                }
+            }
+        },
+
+        /**
+         * Used to define events on this Observable
+         * @param {Object} object The object with the events defined
+         */
+        addEvents : function(o){
+            var me = this;
+            me.events = me.events || {};
+            if (typeof o == 'string') {
+                EACH(arguments, function(a) {
+                    me.events[a] = me.events[a] || TRUE;
+                });
+            } else {
+                Ext.applyIf(me.events, o);
+            }
+        },
+
+        /**
+         * Checks to see if this object has any listeners for a specified event
+         * @param {String} eventName The name of the event to check for
+         * @return {Boolean} True if the event is being listened for, else false
+         */
+        hasListener : function(eventName){
+            var e = this.events[eventName];
+            return ISOBJECT(e) && e.listeners.length > 0;
+        },
+
+        /**
+         * Suspend the firing of all events. (see {@link #resumeEvents})
+         * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired
+         * after the {@link #resumeEvents} call instead of discarding all suspended events;
+         */
+        suspendEvents : function(queueSuspended){
+            this.eventsSuspended = TRUE;
+            if (queueSuspended){
+                this.suspendedEventsQueue = [];
+            }
+        },
+
+        /**
+         * Resume firing events. (see {@link #suspendEvents})
+         * If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
+         * events fired during event suspension will be sent to any listeners now.
+         */
+        resumeEvents : function(){
+            var me = this;
+            me.eventsSuspended = !delete me.suspendedEventQueue;
+            EACH(me.suspendedEventsQueue, function(e) {
+                me.fireEvent.apply(me, e);
+            });
+        }
+    }
+}();
+
+var OBSERVABLE = EXTUTIL.Observable.prototype;
+/**
+ * Appends an event handler to this object (shorthand for {@link #addListener}.)
+ * @param {String}   eventName     The type of event to listen for
+ * @param {Function} handler       The method the event invokes
+ * @param {Object}   scope         (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+ * <b>If omitted, defaults to the object which fired the event.</b>
+ * @param {Object}   options       (optional) An object containing handler configuration.
+ * @method
+ */
+OBSERVABLE.on = OBSERVABLE.addListener;
+/**
+ * Removes an event handler (shorthand for {@link #removeListener}.)
+ * @param {String}   eventName     The type of event the handler was associated with.
+ * @param {Function} handler       The handler to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
+ * @param {Object}   scope         (optional) The scope originally specified for the handler.
+ * @method
+ */
+OBSERVABLE.un = OBSERVABLE.removeListener;
+
+/**
+ * Removes <b>all</b> added captures from the Observable.
+ * @param {Observable} o The Observable to release
+ * @static
+ */
+EXTUTIL.Observable.releaseCapture = function(o){
+    o.fireEvent = OBSERVABLE.fireEvent;
+};
+
+function createTargeted(h, o, scope){
+    return function(){
+        if(o.target == arguments[0]){
+            h.apply(scope, TOARRAY(arguments));
+        }
+    };
+};
+
+function createBuffered(h, o, scope){
+    var task = new EXTUTIL.DelayedTask();
+    return function(){
+        task.delay(o.buffer, h, scope, TOARRAY(arguments));
+    };
+}
+
+function createSingle(h, e, fn, scope){
+    return function(){
+        e.removeListener(fn, scope);
+        return h.apply(scope, arguments);
+    };
+}
+
+function createDelayed(h, o, scope){
+    return function(){
+        var args = TOARRAY(arguments);
+        (function(){
+            h.apply(scope, args);
+        }).defer(o.delay || 10);
+    };
+};
+
+EXTUTIL.Event = function(obj, name){
+    this.name = name;
+    this.obj = obj;
+    this.listeners = [];
+};
+
+EXTUTIL.Event.prototype = {
+    addListener : function(fn, scope, options){
+        var me = this,
+            l;
+        scope = scope || me.obj;
+        if(!me.isListening(fn, scope)){
+            l = me.createListener(fn, scope, options);
+            if(me.firing){ // if we are currently firing this event, don't disturb the listener loop
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.push(l);
+        }
+    },
+
+    createListener: function(fn, scope, o){
+        o = o || {}, scope = scope || this.obj;
+        var l = {
+            fn: fn,
+            scope: scope,
+            options: o
+        }, h = fn;
+        if(o.target){
+            h = createTargeted(h, o, scope);
+        }
+        if(o.delay){
+            h = createDelayed(h, o, scope);
+        }
+        if(o.single){
+            h = createSingle(h, this, fn, scope);
+        }
+        if(o.buffer){
+            h = createBuffered(h, o, scope);
+        }
+        l.fireFn = h;
+        return l;
+    },
+
+    findListener : function(fn, scope){
+        var s, ret = -1;
+        EACH(this.listeners, function(l, i) {
+            s = l.scope;
+            if(l.fn == fn && (s == scope || s == this.obj)){
+                ret = i;
+                return FALSE;
+            }
+        },
+        this);
+        return ret;
+    },
+
+    isListening : function(fn, scope){
+        return this.findListener(fn, scope) != -1;
+    },
+
+    removeListener : function(fn, scope){
+        var index,
+            me = this,
+            ret = FALSE;
+        if((index = me.findListener(fn, scope)) != -1){
+            if (me.firing) {
+                me.listeners = me.listeners.slice(0);
+            }
+            me.listeners.splice(index, 1);
+            ret = TRUE;
+        }
+        return ret;
+    },
+
+    clearListeners : function(){
+        this.listeners = [];
+    },
+
+    fire : function(){
+        var me = this,
+            args = TOARRAY(arguments),
+            ret = TRUE;
+
+        EACH(me.listeners, function(l) {
+            me.firing = TRUE;
+            if (l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) {
+                return ret = me.firing = FALSE;
+            }
+        });
+        me.firing = FALSE;
+        return ret;
+    }
+};
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/TaskMgr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/TaskMgr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/util/core/TaskMgr.js	(revision 625)
@@ -0,0 +1,174 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.util.TaskRunner
+ * Provides the ability to execute one or more arbitrary tasks in a multithreaded
+ * manner.  Generally, you can use the singleton {@link Ext.TaskMgr} instead, but
+ * if needed, you can create separate instances of TaskRunner.  Any number of
+ * separate tasks can be started at any time and will run independently of each
+ * other. Example usage:
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * </code></pre>
+ * Also see {@link Ext.util.DelayedTask}. 
+ * 
+ * @constructor
+ * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance
+ * (defaults to 10)
+ */
+Ext.util.TaskRunner = function(interval){
+    interval = interval || 10;
+    var tasks = [], 
+    	removeQueue = [],
+    	id = 0,
+    	running = false,
+
+    	// private
+    	stopThread = function(){
+	        running = false;
+	        clearInterval(id);
+	        id = 0;
+	    },
+
+    	// private
+    	startThread = function(){
+	        if(!running){
+	            running = true;
+	            id = setInterval(runTasks, interval);
+	        }
+	    },
+
+    	// private
+    	removeTask = function(t){
+	        removeQueue.push(t);
+	        if(t.onStop){
+	            t.onStop.apply(t.scope || t);
+	        }
+	    },
+	    
+    	// private
+    	runTasks = function(){
+	    	var rqLen = removeQueue.length,
+	    		now = new Date().getTime();	    			    		
+	    
+	        if(rqLen > 0){
+	            for(var i = 0; i < rqLen; i++){
+	                tasks.remove(removeQueue[i]);
+	            }
+	            removeQueue = [];
+	            if(tasks.length < 1){
+	                stopThread();
+	                return;
+	            }
+	        }	        
+	        for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){
+	            t = tasks[i];
+	            itime = now - t.taskRunTime;
+	            if(t.interval <= itime){
+	                rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]);
+	                t.taskRunTime = now;
+	                if(rt === false || t.taskRunCount === t.repeat){
+	                    removeTask(t);
+	                    return;
+	                }
+	            }
+	            if(t.duration && t.duration <= (now - t.taskStartTime)){
+	                removeTask(t);
+	            }
+	        }
+	    };
+
+    /**
+     * Starts a new task.
+     * @method start
+     * @param {Object} task A config object that supports the following properties:<ul>
+     * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
+     * function will be called at each interval and passed the <code>args</code> argument if specified.  If a
+     * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+     * <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
+     * should be executed.</div></li>
+     * <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
+     * specified by <code>run</code>.</div></li>
+     * <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
+     * <code>run</code> function. Defaults to the task config object.</div></li>
+     * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+     * the task before stopping automatically (defaults to indefinite).</div></li>
+     * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+     * stopping automatically (defaults to indefinite).</div></li>
+     * </ul>
+     * @return {Object} The task
+     */
+    this.start = function(task){
+        tasks.push(task);
+        task.taskStartTime = new Date().getTime();
+        task.taskRunTime = 0;
+        task.taskRunCount = 0;
+        startThread();
+        return task;
+    };
+
+    /**
+     * Stops an existing running task.
+     * @method stop
+     * @param {Object} task The task to stop
+     * @return {Object} The task
+     */
+    this.stop = function(task){
+        removeTask(task);
+        return task;
+    };
+
+    /**
+     * Stops all tasks that are currently running.
+     * @method stopAll
+     */
+    this.stopAll = function(){
+        stopThread();
+        for(var i = 0, len = tasks.length; i < len; i++){
+            if(tasks[i].onStop){
+                tasks[i].onStop();
+            }
+        }
+        tasks = [];
+        removeQueue = [];
+    };
+};
+
+/**
+ * @class Ext.TaskMgr
+ * @extends Ext.util.TaskRunner
+ * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks.  See
+ * {@link Ext.util.TaskRunner} for supported methods and task config properties.
+ * <pre><code>
+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+</code></pre>
+ * @singleton
+ */
+Ext.TaskMgr = new Ext.util.TaskRunner();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Action.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Action.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Action.js	(revision 625)
@@ -0,0 +1,252 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Action
+ * <p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
+ * can be usefully shared among multiple components.  Actions let you share handlers, configuration options and UI
+ * updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button}
+ * and {@link Ext.menu.Menu} components).</p>
+ * <p>Aside from supporting the config object interface, any component that needs to use Actions must also support
+ * the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),
+ * setDisabled(boolean), setVisible(boolean) and setHandler(function).</p>
+ * Example usage:<br>
+ * <pre><code>
+// Define the shared action.  Each component below will have the same
+// display text and icon, and will display the same message on click.
+var action = new Ext.Action({
+    {@link #text}: 'Do something',
+    {@link #handler}: function(){
+        Ext.Msg.alert('Click', 'You did something.');
+    },
+    {@link #iconCls}: 'do-something',
+    {@link #itemId}: 'myAction'
+});
+
+var panel = new Ext.Panel({
+    title: 'Actions',
+    width: 500,
+    height: 300,
+    tbar: [
+        // Add the action directly to a toolbar as a menu button
+        action,
+        {
+            text: 'Action Menu',
+            // Add the action to a menu as a text item
+            menu: [action]
+        }
+    ],
+    items: [
+        // Add the action to the panel body as a standard button
+        new Ext.Button(action)
+    ],
+    renderTo: Ext.getBody()
+});
+
+// Change the text for all components using the action
+action.setText('Something else');
+
+// Reference an action through a container using the itemId
+var btn = panel.getComponent('myAction');
+var aRef = btn.baseAction;
+aRef.setText('New text');
+</code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.Action = function(config){
+    this.initialConfig = config;
+    this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
+    this.items = [];
+}
+
+Ext.Action.prototype = {
+    /**
+     * @cfg {String} text The text to set for all components using this action (defaults to '').
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon for
+     * all components using this action (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'do-something'
+
+// css class that specifies background image to be used as the icon image:
+.do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} disabled True to disable all components using this action, false to enable them (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} hidden True to hide all components using this action, false to show them (defaults to false).
+     */
+    /**
+     * @cfg {Function} handler The function that will be invoked by each component tied to this action
+     * when the component's primary event is triggered (defaults to undefined).
+     */
+    /**
+     * @cfg {String} itemId
+     * See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.
+     */
+    /**
+     * @cfg {Object} scope The scope in which the {@link #handler} function will execute.
+     */
+
+    // private
+    isAction : true,
+
+    /**
+     * Sets the text to be displayed by all components using this action.
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.initialConfig.text = text;
+        this.callEach('setText', [text]);
+    },
+
+    /**
+     * Gets the text currently displayed by all components using this action.
+     */
+    getText : function(){
+        return this.initialConfig.text;
+    },
+
+    /**
+     * Sets the icon CSS class for all components using this action.  The class should supply
+     * a background image that will be used as the icon image.
+     * @param {String} cls The CSS class supplying the icon image
+     */
+    setIconClass : function(cls){
+        this.initialConfig.iconCls = cls;
+        this.callEach('setIconClass', [cls]);
+    },
+
+    /**
+     * Gets the icon CSS class currently used by all components using this action.
+     */
+    getIconClass : function(){
+        return this.initialConfig.iconCls;
+    },
+
+    /**
+     * Sets the disabled state of all components using this action.  Shortcut method
+     * for {@link #enable} and {@link #disable}.
+     * @param {Boolean} disabled True to disable the component, false to enable it
+     */
+    setDisabled : function(v){
+        this.initialConfig.disabled = v;
+        this.callEach('setDisabled', [v]);
+    },
+
+    /**
+     * Enables all components using this action.
+     */
+    enable : function(){
+        this.setDisabled(false);
+    },
+
+    /**
+     * Disables all components using this action.
+     */
+    disable : function(){
+        this.setDisabled(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently disabled, else returns false.  
+     */
+    isDisabled : function(){
+        return this.initialConfig.disabled;
+    },
+
+    /**
+     * Sets the hidden state of all components using this action.  Shortcut method
+     * for <code>{@link #hide}</code> and <code>{@link #show}</code>.
+     * @param {Boolean} hidden True to hide the component, false to show it
+     */
+    setHidden : function(v){
+        this.initialConfig.hidden = v;
+        this.callEach('setVisible', [!v]);
+    },
+
+    /**
+     * Shows all components using this action.
+     */
+    show : function(){
+        this.setHidden(false);
+    },
+
+    /**
+     * Hides all components using this action.
+     */
+    hide : function(){
+        this.setHidden(true);
+    },
+
+    /**
+     * Returns true if the components using this action are currently hidden, else returns false.  
+     */
+    isHidden : function(){
+        return this.initialConfig.hidden;
+    },
+
+    /**
+     * Sets the function that will be called by each component using this action when its primary event is triggered.
+     * @param {Function} fn The function that will be invoked by the action's components.  The function
+     * will be called with no arguments.
+     * @param {Object} scope The scope in which the function will execute
+     */
+    setHandler : function(fn, scope){
+        this.initialConfig.handler = fn;
+        this.initialConfig.scope = scope;
+        this.callEach('setHandler', [fn, scope]);
+    },
+
+    /**
+     * Executes the specified function once for each component currently tied to this action.  The function passed
+     * in should accept a single argument that will be an object that supports the basic Action config/method interface.
+     * @param {Function} fn The function to execute for each component
+     * @param {Object} scope The scope in which the function will execute
+     */
+    each : function(fn, scope){
+        Ext.each(this.items, fn, scope);
+    },
+
+    // private
+    callEach : function(fnName, args){
+        var cs = this.items;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i][fnName].apply(cs[i], args);
+        }
+    },
+
+    // private
+    addComponent : function(comp){
+        this.items.push(comp);
+        comp.on('destroy', this.removeComponent, this);
+    },
+
+    // private
+    removeComponent : function(comp){
+        this.items.remove(comp);
+    },
+
+    /**
+     * Executes this action manually using the handler function specified in the original config object
+     * or the handler function set with <code>{@link #setHandler}</code>.  Any arguments passed to this
+     * function will be passed on to the handler function.
+     * @param {Mixed} arg1 (optional) Variable number of arguments passed to the handler function
+     * @param {Mixed} arg2 (optional)
+     * @param {Mixed} etc... (optional)
+     */
+    execute : function(){
+        this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/BoxComponent.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/BoxComponent.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/BoxComponent.js	(revision 625)
@@ -0,0 +1,519 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.BoxComponent
+ * @extends Ext.Component
+ * <p>Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.</p>
+ * <p>BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly
+ * within the Component rendering model.</p>
+ * <p>A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing
+ * element, or one that is created to your specifications at render time. Usually, to participate in layouts,
+ * a Component will need to be a <b>Box</b>Component in order to have its width and height managed.</p>
+ * <p>To use a pre-existing element as a BoxComponent, configure it so that you preset the <b>el</b> property to the
+ * element to reference:<pre><code>
+var pageHeader = new Ext.BoxComponent({
+    el: 'my-header-div'
+});</code></pre>
+ * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.</p>
+ * <p>To create a BoxComponent based around a HTML element to be created at render time, use the
+ * {@link Ext.Component#autoEl autoEl} config option which takes the form of a
+ * {@link Ext.DomHelper DomHelper} specification:<pre><code>
+var myImage = new Ext.BoxComponent({
+    autoEl: {
+        tag: 'img',
+        src: '/images/my-image.jpg'
+    }
+});</code></pre></p>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options.
+ * @xtype box
+ */
+Ext.BoxComponent = Ext.extend(Ext.Component, {
+
+    // Configs below are used for all Components when rendered by BorderLayout.
+    /**
+     * @cfg {String} region <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * layout manager (e.g. specifying <tt>layout:'border'</tt>).</p><br>
+     * <p>See {@link Ext.layout.BorderLayout} also.</p>
+     */
+    // margins config is used when a BoxComponent is rendered by BorderLayout or BoxLayout.
+    /**
+     * @cfg {Object} margins <p><b>Note</b>: this config is only used when this BoxComponent is rendered
+     * by a Container which has been configured to use the <b>{@link Ext.layout.BorderLayout BorderLayout}</b>
+     * or one of the two <b>{@link Ext.layout.BoxLayout BoxLayout} subclasses.</b></p>
+     * <p>An object containing margins to apply to this BoxComponent in the
+     * format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Number} x
+     * The local x (left) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} y
+     * The local y (top) coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageX
+     * The page level x coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} pageY
+     * The page level y coordinate for this component if contained within a positioning container.
+     */
+    /**
+     * @cfg {Number} height
+     * The height of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Number} width
+     * The width of this component in pixels (defaults to auto).
+     * <b>Note</b> to express this dimension as a percentage or offset see {@link Ext.Component#anchor}.
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <p>True to use height:'auto', false to use fixed height (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components inherit this config option, not all will
+     * function as expected with a height of 'auto'. Setting autoHeight:true means that the
+     * browser will manage height based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the height, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the height might
+     * result in elements needing to be synchronized with the new height. Example:</p><pre><code>
+var w = new Ext.Window({
+    title: 'Window',
+    width: 600,
+    autoHeight: true,
+    items: {
+        title: 'Collapse Me',
+        height: 400,
+        collapsible: true,
+        border: false,
+        listeners: {
+            beforecollapse: function() {
+                w.el.shadow.hide();
+            },
+            beforeexpand: function() {
+                w.el.shadow.hide();
+            },
+            collapse: function() {
+                w.syncShadow();
+            },
+            expand: function() {
+                w.syncShadow();
+            }
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * <p>True to use width:'auto', false to use fixed width (or allow it to be managed by its parent
+     * Container's {@link Ext.Container#layout layout manager}. Defaults to false.</p>
+     * <p><b>Note</b>: Although many components  inherit this config option, not all will
+     * function as expected with a width of 'auto'. Setting autoWidth:true means that the
+     * browser will manage width based on the element's contents, and that Ext will not manage it at all.</p>
+     * <p>If the <i>browser</i> is managing the width, be aware that resizes performed by the browser in response
+     * to changes within the structure of the Component cannot be detected. Therefore changes to the width might
+     * result in elements needing to be synchronized with the new width. For example, where the target element is:</p><pre><code>
+&lt;div id='grid-container' style='margin-left:25%;width:50%'>&lt;/div>
+</code></pre>
+     * A Panel rendered into that target element must listen for browser window resize in order to relay its
+      * child items when the browser changes its width:<pre><code>
+var myPanel = new Ext.Panel({
+    renderTo: 'grid-container',
+    monitorResize: true, // relay on browser resize
+    title: 'Panel',
+    height: 400,
+    autoWidth: true,
+    layout: 'hbox',
+    layoutConfig: {
+        align: 'stretch'
+    },
+    defaults: {
+        flex: 1
+    },
+    items: [{
+        title: 'Box 1',
+    }, {
+        title: 'Box 2'
+    }, {
+        title: 'Box 3'
+    }],
+});
+</code></pre>
+     */
+
+    /* // private internal config
+     * {Boolean} deferHeight
+     * True to defer height calculations to an external component, false to allow this component to set its own
+     * height (defaults to false).
+     */
+
+    // private
+    initComponent : function(){
+        Ext.BoxComponent.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event resize
+             * Fires after the component is resized.
+             * @param {Ext.Component} this
+             * @param {Number} adjWidth The box-adjusted width that was set
+             * @param {Number} adjHeight The box-adjusted height that was set
+             * @param {Number} rawWidth The width that was originally specified
+             * @param {Number} rawHeight The height that was originally specified
+             */
+            'resize',
+            /**
+             * @event move
+             * Fires after the component is moved.
+             * @param {Ext.Component} this
+             * @param {Number} x The new x position
+             * @param {Number} y The new y position
+             */
+            'move'
+        );
+    },
+
+    // private, set in afterRender to signify that the component has been rendered
+    boxReady : false,
+    // private, used to defer height settings to subclasses
+    deferHeight: false,
+
+    /**
+     * Sets the width and height of this BoxComponent. This method fires the {@link #resize} event. This method can accept
+     * either width and height as separate arguments, or you can pass a size object like <code>{width:10, height:20}</code>.
+     * @param {Mixed} width The new width to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * <li>A size object in the format <code>{width: widthValue, height: heightValue}</code>.</li>
+     * <li><code>undefined</code> to leave the width unchanged.</li>
+     * </ul></div>
+     * @param {Mixed} height The new height to set (not required if a size object is passed as the first arg).
+     * This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style. Animation may <b>not</b> be used.</li>
+     * <li><code>undefined</code> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setSize : function(w, h){
+        // support for standard size objects
+        if(typeof w == 'object'){
+            h = w.height;
+            w = w.width;
+        }
+        // not rendered
+        if(!this.boxReady){
+            this.width = w;
+            this.height = h;
+            return this;
+        }
+
+        // prevent recalcs when not needed
+        if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
+            return this;
+        }
+        this.lastSize = {width: w, height: h};
+        var adj = this.adjustSize(w, h);
+        var aw = adj.width, ah = adj.height;
+        if(aw !== undefined || ah !== undefined){ // this code is nasty but performs better with floaters
+            var rz = this.getResizeEl();
+            if(!this.deferHeight && aw !== undefined && ah !== undefined){
+                rz.setSize(aw, ah);
+            }else if(!this.deferHeight && ah !== undefined){
+                rz.setHeight(ah);
+            }else if(aw !== undefined){
+                rz.setWidth(aw);
+            }
+            this.onResize(aw, ah, w, h);
+            this.fireEvent('resize', this, aw, ah, w, h);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the width of the component.  This method fires the {@link #resize} event.
+     * @param {Number} width The new width to setThis may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS width style.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setWidth : function(width){
+        return this.setSize(width);
+    },
+
+    /**
+     * Sets the height of the component.  This method fires the {@link #resize} event.
+     * @param {Number} height The new height to set. This may be one of:<div class="mdetail-params"><ul>
+     * <li>A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).</li>
+     * <li>A String used to set the CSS height style.</li>
+     * <li><i>undefined</i> to leave the height unchanged.</li>
+     * </ul></div>
+     * @return {Ext.BoxComponent} this
+     */
+    setHeight : function(height){
+        return this.setSize(undefined, height);
+    },
+
+    /**
+     * Gets the current size of the component's underlying element.
+     * @return {Object} An object containing the element's size {width: (element width), height: (element height)}
+     */
+    getSize : function(){
+        return this.getResizeEl().getSize();
+    },
+
+    /**
+     * Gets the current width of the component's underlying element.
+     * @return {Number}
+     */
+    getWidth : function(){
+        return this.getResizeEl().getWidth();
+    },
+
+    /**
+     * Gets the current height of the component's underlying element.
+     * @return {Number}
+     */
+    getHeight : function(){
+        return this.getResizeEl().getHeight();
+    },
+
+    /**
+     * Gets the current size of the component's underlying element, including space taken by its margins.
+     * @return {Object} An object containing the element's size {width: (element width + left/right margins), height: (element height + top/bottom margins)}
+     */
+    getOuterSize : function(){
+        var el = this.getResizeEl();
+        return {width: el.getWidth() + el.getMargins('lr'),
+                height: el.getHeight() + el.getMargins('tb')};
+    },
+
+    /**
+     * Gets the current XY position of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Array} The XY position of the element (e.g., [100, 200])
+     */
+    getPosition : function(local){
+        var el = this.getPositionEl();
+        if(local === true){
+            return [el.getLeft(true), el.getTop(true)];
+        }
+        return this.xy || el.getXY();
+    },
+
+    /**
+     * Gets the current box measurements of the component's underlying element.
+     * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false)
+     * @return {Object} box An object in the format {x, y, width, height}
+     */
+    getBox : function(local){
+        var pos = this.getPosition(local);
+        var s = this.getSize();
+        s.x = pos[0];
+        s.y = pos[1];
+        return s;
+    },
+
+    /**
+     * Sets the current box measurements of the component's underlying element.
+     * @param {Object} box An object in the format {x, y, width, height}
+     * @return {Ext.BoxComponent} this
+     */
+    updateBox : function(box){
+        this.setSize(box.width, box.height);
+        this.setPagePosition(box.x, box.y);
+        return this;
+    },
+
+    /**
+     * <p>Returns the outermost Element of this Component which defines the Components overall size.</p>
+     * <p><i>Usually</i> this will return the same Element as <code>{@link #getEl}</code>,
+     * but in some cases, a Component may have some more wrapping Elements around its main
+     * active Element.</p>
+     * <p>An example is a ComboBox. It is encased in a <i>wrapping</i> Element which
+     * contains both the <code>&lt;input></code> Element (which is what would be returned
+     * by its <code>{@link #getEl}</code> method, <i>and</i> the trigger button Element.
+     * This Element is returned as the <code>resizeEl</code>.
+     */
+    getResizeEl : function(){
+        return this.resizeEl || this.el;
+    },
+
+    // protected
+    getPositionEl : function(){
+        return this.positionEl || this.el;
+    },
+
+    /**
+     * Sets the left and top of the component.  To set the page XY position instead, use {@link #setPagePosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} left The new left
+     * @param {Number} top The new top
+     * @return {Ext.BoxComponent} this
+     */
+    setPosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.x = x;
+        this.y = y;
+        if(!this.boxReady){
+            return this;
+        }
+        var adj = this.adjustPosition(x, y);
+        var ax = adj.x, ay = adj.y;
+
+        var el = this.getPositionEl();
+        if(ax !== undefined || ay !== undefined){
+            if(ax !== undefined && ay !== undefined){
+                el.setLeftTop(ax, ay);
+            }else if(ax !== undefined){
+                el.setLeft(ax);
+            }else if(ay !== undefined){
+                el.setTop(ay);
+            }
+            this.onPosition(ax, ay);
+            this.fireEvent('move', this, ax, ay);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the page XY position of the component.  To set the left and top instead, use {@link #setPosition}.
+     * This method fires the {@link #move} event.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     * @return {Ext.BoxComponent} this
+     */
+    setPagePosition : function(x, y){
+        if(x && typeof x[1] == 'number'){
+            y = x[1];
+            x = x[0];
+        }
+        this.pageX = x;
+        this.pageY = y;
+        if(!this.boxReady){
+            return;
+        }
+        if(x === undefined || y === undefined){ // cannot translate undefined points
+            return;
+        }
+        var p = this.getPositionEl().translatePoints(x, y);
+        this.setPosition(p.left, p.top);
+        return this;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.BoxComponent.superclass.onRender.call(this, ct, position);
+        if(this.resizeEl){
+            this.resizeEl = Ext.get(this.resizeEl);
+        }
+        if(this.positionEl){
+            this.positionEl = Ext.get(this.positionEl);
+        }
+    },
+
+    // private
+    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);
+        }
+    },
+
+    /**
+     * Force the component's size to recalculate based on the underlying element's current height and width.
+     * @return {Ext.BoxComponent} this
+     */
+    syncSize : function(){
+        delete this.lastSize;
+        this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight());
+        return this;
+    },
+
+    /* // protected
+     * Called after the component is resized, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a resize occurs.
+     * @param {Number} adjWidth The box-adjusted width that was set
+     * @param {Number} adjHeight The box-adjusted height that was set
+     * @param {Number} rawWidth The width that was originally specified
+     * @param {Number} rawHeight The height that was originally specified
+     */
+    onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
+
+    },
+
+    /* // protected
+     * Called after the component is moved, this method is empty by default but can be implemented by any
+     * subclass that needs to perform custom logic after a move occurs.
+     * @param {Number} x The new x position
+     * @param {Number} y The new y position
+     */
+    onPosition : function(x, y){
+
+    },
+
+    // private
+    adjustSize : function(w, h){
+        if(this.autoWidth){
+            w = 'auto';
+        }
+        if(this.autoHeight){
+            h = 'auto';
+        }
+        return {width : w, height: h};
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        return {x : x, y: y};
+    }
+});
+Ext.reg('box', Ext.BoxComponent);
+
+
+/**
+ * @class Ext.Spacer
+ * @extends Ext.BoxComponent
+ * <p>Used to provide a sizable space in a layout.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.Spacer = Ext.extend(Ext.BoxComponent, {
+    autoEl:'div'
+});
+Ext.reg('spacer', Ext.Spacer);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Button.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Button.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Button.js	(revision 625)
@@ -0,0 +1,762 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Button
+ * @extends Ext.BoxComponent
+ * Simple Button class
+ * @cfg {String} text The button text to be used as innerHTML (html tags are accepted)
+ * @cfg {String} icon The path to an image to display in the button (the image will be set as the background-image
+ * CSS property of the button by default, so if you want a mixed icon/text button, set cls:'x-btn-text-icon')
+ * @cfg {Function} handler A function called when the button is clicked (can be used instead of click event).
+ * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+ * <li><code>b</code> : Button<div class="sub-desc">This Button.</div></li>
+ * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+ * </ul></div>
+ * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the handler is executed. Defaults to this Button.
+ * @cfg {Number} minWidth The minimum width for this button (used to give a set of buttons a common width).
+ * See also {@link Ext.Panel}.<tt>{@link Ext.Panel#minButtonWidth minButtonWidth}</tt>.
+ * @cfg {String/Object} tooltip The tooltip for the button - can be a string to be used as innerHTML (html tags are accepted) or QuickTips config object
+ * @cfg {Boolean} hidden True to start hidden (defaults to false)
+ * @cfg {Boolean} disabled True to start disabled (defaults to false)
+ * @cfg {Boolean} pressed True to start pressed (only if enableToggle = true)
+ * @cfg {String} toggleGroup The group this toggle button is a member of (only 1 per group can be pressed)
+ * @cfg {Boolean/Object} repeat True to repeat fire the click event while the mouse is down. This can also be
+ * a {@link Ext.util.ClickRepeater ClickRepeater} config object (defaults to false).
+ * @constructor
+ * Create a new button
+ * @param {Object} config The config object
+ * @xtype button
+ */
+Ext.Button = Ext.extend(Ext.BoxComponent, {
+    /**
+     * Read-only. True if this button is hidden
+     * @type Boolean
+     */
+    hidden : false,
+    /**
+     * Read-only. True if this button is disabled
+     * @type Boolean
+     */
+    disabled : false,
+    /**
+     * Read-only. True if this button is pressed (only if enableToggle = true)
+     * @type Boolean
+     */
+    pressed : false,
+    /**
+     * The Button's owner {@link Ext.Panel} (defaults to undefined, and is set automatically when
+     * the Button is added to a container).  Read-only.
+     * @type Ext.Panel
+     * @property ownerCt
+     */
+
+    /**
+     * @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined)
+     */
+
+    /**
+     * @cfg {Boolean} allowDepress
+     * False to not allow a pressed Button to be depressed (defaults to undefined). Only valid when {@link #enableToggle} is true.
+     */
+
+    /**
+     * @cfg {Boolean} enableToggle
+     * True to enable pressed/not pressed toggling (defaults to false)
+     */
+    enableToggle: false,
+    /**
+     * @cfg {Function} toggleHandler
+     * Function called when a Button with {@link #enableToggle} set to true is clicked. Two arguments are passed:<ul class="mdetail-params">
+     * <li><b>button</b> : Ext.Button<div class="sub-desc">this Button object</div></li>
+     * <li><b>state</b> : Boolean<div class="sub-desc">The next state if the Button, true means pressed.</div></li>
+     * </ul>
+     */
+    /**
+     * @cfg {Mixed} menu
+     * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined).
+     */
+    /**
+     * @cfg {String} menuAlign
+     * The position to align the menu to (see {@link Ext.Element#alignTo} for more details, defaults to 'tl-bl?').
+     */
+    menuAlign : 'tl-bl?',
+
+    /**
+     * @cfg {String} overflowText If used in a {@link Ext.Toolbar Toolbar}, the
+     * text to be used if this item is shown in the overflow menu. See also
+     * {@link Ext.Toolbar.Item}.<code>{@link Ext.Toolbar.Item#overflowText overflowText}</code>.
+     */
+    /**
+     * @cfg {String} iconCls
+     * A css class which sets a background image to be used as the icon for this button
+     */
+    /**
+     * @cfg {String} type
+     * submit, reset or button - defaults to 'button'
+     */
+    type : 'button',
+
+    // private
+    menuClassTarget: 'tr:nth(2)',
+
+    /**
+     * @cfg {String} clickEvent
+     * The type of event to map to the button's event handler (defaults to 'click')
+     */
+    clickEvent : 'click',
+
+    /**
+     * @cfg {Boolean} handleMouseEvents
+     * False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
+     */
+    handleMouseEvents : true,
+
+    /**
+     * @cfg {String} tooltipType
+     * The type of tooltip to use. Either 'qtip' (default) for QuickTips or 'title' for title attribute.
+     */
+    tooltipType : 'qtip',
+
+    /**
+     * @cfg {String} buttonSelector
+     * <p>(Optional) A {@link Ext.DomQuery DomQuery} selector which is used to extract the active, clickable element from the
+     * DOM structure created.</p>
+     * <p>When a custom {@link #template} is used, you  must ensure that this selector results in the selection of
+     * a focussable element.</p>
+     * <p>Defaults to <b><tt>"button:first-child"</tt></b>.</p>
+     */
+    buttonSelector : 'button:first-child',
+
+    /**
+     * @cfg {String} scale
+     * <p>(Optional) The size of the Button. Three values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'small'<div class="sub-desc">Results in the button element being 16px high.</div></li>
+     * <li>'medium'<div class="sub-desc">Results in the button element being 24px high.</div></li>
+     * <li>'large'<div class="sub-desc">Results in the button element being 32px high.</div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'small'</tt></b>.</p>
+     */
+    scale: 'small',
+
+    /**
+     * @cfg {String} iconAlign
+     * <p>(Optional) The side of the Button box to render the icon. Four values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'top'<div class="sub-desc"></div></li>
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * <li>'left'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'left'</tt></b>.</p>
+     */
+    iconAlign : 'left',
+
+    /**
+     * @cfg {String} arrowAlign
+     * <p>(Optional) The side of the Button box to render the arrow if the button has an associated {@link #menu}.
+     * Two values are allowed:</p>
+     * <ul class="mdetail-params">
+     * <li>'right'<div class="sub-desc"></div></li>
+     * <li>'bottom'<div class="sub-desc"></div></li>
+     * </ul>
+     * <p>Defaults to <b><tt>'right'</tt></b>.</p>
+     */
+    arrowAlign : 'right',
+
+    /**
+     * @cfg {Ext.Template} template (Optional)
+     * <p>A {@link Ext.Template Template} used to create the Button's DOM structure.</p>
+     * Instances, or subclasses which need a different DOM structure may provide a different
+     * template layout in conjunction with an implementation of {@link #getTemplateArgs}.
+     * @type Ext.Template
+     * @property template
+     */
+    /**
+     * @cfg {String} cls
+     * A CSS class string to apply to the button's main element.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object associated with this Button when configured with the {@link #menu} config option.
+     */
+
+    initComponent : function(){
+        Ext.Button.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this button is clicked
+             * @param {Button} this
+             * @param {EventObject} e The click event
+             */
+            'click',
+            /**
+             * @event toggle
+             * Fires when the 'pressed' state of this button changes (only if enableToggle = true)
+             * @param {Button} this
+             * @param {Boolean} pressed
+             */
+            'toggle',
+            /**
+             * @event mouseover
+             * Fires when the mouse hovers over the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits the button
+             * @param {Button} this
+             * @param {Event} e The event object
+             */
+            'mouseout',
+            /**
+             * @event menushow
+             * If this button has a menu, this event fires when it is shown
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menushow',
+            /**
+             * @event menuhide
+             * If this button has a menu, this event fires when it is hidden
+             * @param {Button} this
+             * @param {Menu} menu
+             */
+            'menuhide',
+            /**
+             * @event menutriggerover
+             * If this button has a menu, this event fires when the mouse enters the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerover',
+            /**
+             * @event menutriggerout
+             * If this button has a menu, this event fires when the mouse leaves the menu triggering element
+             * @param {Button} this
+             * @param {Menu} menu
+             * @param {EventObject} e
+             */
+            'menutriggerout'
+        );
+        if(this.menu){
+            this.menu = Ext.menu.MenuMgr.get(this.menu);
+        }
+        if(Ext.isString(this.toggleGroup)){
+            this.enableToggle = true;
+        }
+    },
+
+/**
+  * <p>This method returns an object which provides substitution parameters for the {@link #template Template} used
+  * to create this Button's DOM structure.</p>
+  * <p>Instances or subclasses which use a different Template to create a different DOM structure may need to provide their
+  * own implementation of this method.</p>
+  * <p>The default implementation which provides data for the default {@link #template} returns an Array containing the
+  * following items:</p><div class="mdetail-params"><ul>
+  * <li>The Button's {@link #text}</li>
+  * <li>The &lt;button&gt;'s {@link #type}</li>
+  * <li>The {@link iconCls} applied to the &lt;button&gt; {@link #btnEl element}</li>
+  * <li>The {@link #cls} applied to the Button's main {@link #getEl Element}</li>
+  * <li>A CSS class name controlling the Button's {@link #scale} and {@link #iconAlign icon alignment}</li>
+  * <li>A CSS class name which applies an arrow to the Button if configured with a {@link #menu}</li>
+  * </ul></div>
+  * @return {Object} Substitution data for a Template.
+ */
+    getTemplateArgs : function(){
+        var cls = (this.cls || '');
+        cls += (this.iconCls || this.icon) ? (this.text ? ' x-btn-text-icon' : ' x-btn-icon') : ' x-btn-noicon';
+        if(this.pressed){
+            cls += ' x-btn-pressed';
+        }
+        return [this.text || '&#160;', this.type, this.iconCls || '', cls, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass()];
+    },
+
+    // protected
+    getMenuClass : function(){
+        return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.template){
+            if(!Ext.Button.buttonTemplate){
+                // hideous table template
+                Ext.Button.buttonTemplate = new Ext.Template(
+                    '<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">',
+                    '<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>',
+                    '<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',
+                    "</tbody></table>");
+                Ext.Button.buttonTemplate.compile();
+            }
+            this.template = Ext.Button.buttonTemplate;
+        }
+
+        var btn, targs = this.getTemplateArgs();
+
+        if(position){
+            btn = this.template.insertBefore(position, targs, true);
+        }else{
+            btn = this.template.append(ct, targs, true);
+        }
+        /**
+         * An {@link Ext.Element Element} encapsulating the Button's clickable element. By default,
+         * this references a <tt>&lt;button&gt;</tt> element. Read only.
+         * @type Ext.Element
+         * @property btnEl
+         */
+        this.btnEl = btn.child(this.buttonSelector);
+        this.mon(this.btnEl, {
+            scope: this,
+            focus: this.onFocus,
+            blur: this.onBlur
+        });
+
+        this.initButtonEl(btn, this.btnEl);
+
+        Ext.ButtonToggleMgr.register(this);
+    },
+
+    // private
+    initButtonEl : function(btn, btnEl){
+        this.el = btn;
+
+        if(this.id){
+            this.el.dom.id = this.el.id = this.id;
+        }
+        if(this.icon){
+            btnEl.setStyle('background-image', 'url(' +this.icon +')');
+        }
+        if(this.tabIndex !== undefined){
+            btnEl.dom.tabIndex = this.tabIndex;
+        }
+        if(this.tooltip){
+            this.setTooltip(this.tooltip, true);
+        }
+
+        if(this.handleMouseEvents){
+            this.mon(btn, {
+                scope: this,
+                mouseover: this.onMouseOver,
+                mousedown: this.onMouseDown
+            });
+            
+            // new functionality for monitoring on the document level
+            //this.mon(btn, 'mouseout', this.onMouseOut, this);
+        }
+
+        if(this.menu){
+            this.mon(this.menu, {
+                scope: this,
+                show: this.onMenuShow,
+                hide: this.onMenuHide
+            });
+        }
+
+        if(this.repeat){
+            var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {});
+            this.mon(repeater, 'click', this.onClick, this);
+        }
+        
+        this.mon(btn, this.clickEvent, this.onClick, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Button.superclass.afterRender.call(this);
+        this.doAutoWidth();
+    },
+
+    /**
+     * Sets the CSS class that provides a background image to use as the button's icon.  This method also changes
+     * the value of the {@link iconCls} config internally.
+     * @param {String} cls The CSS class providing the icon image
+     * @return {Ext.Button} this
+     */
+    setIconClass : function(cls){
+        if(this.el){
+            this.btnEl.replaceClass(this.iconCls, cls);
+        }
+        this.iconCls = cls;
+        return this;
+    },
+
+    /**
+     * Sets the tooltip for this Button.
+     * @param {String/Object} tooltip. This may be:<div class="mdesc-details"><ul>
+     * <li><b>String</b> : A string to be used as innerHTML (html tags are accepted) to show in a tooltip</li>
+     * <li><b>Object</b> : A configuration object for {@link Ext.QuickTips#register}.</li>
+     * </ul></div>
+     * @return {Ext.Button} this
+     */
+    setTooltip : function(tooltip, /* private */ initial){
+        if(this.rendered){
+            if(!initial){
+                this.clearTip();
+            }
+            if(Ext.isObject(tooltip)){
+                Ext.QuickTips.register(Ext.apply({
+                      target: this.btnEl.id
+                }, tooltip));
+                this.tooltip = tooltip;
+            }else{
+                this.btnEl.dom[this.tooltipType] = tooltip;
+            }
+        }else{
+            this.tooltip = tooltip;
+        }
+        return this;
+    },
+    
+    // private
+    clearTip: function(){
+        if(Ext.isObject(this.tooltip)){
+            Ext.QuickTips.unregister(this.btnEl);
+        }
+    },
+    
+    // private
+    beforeDestroy: function(){
+        if(this.rendered){
+            this.clearTip();
+        }
+        Ext.destroy(this.menu, this.repeater);
+    },
+
+    // private
+    onDestroy : function(){
+        var doc = Ext.getDoc();
+        doc.un('mouseover', this.monitorMouseOver, this);
+        doc.un('mouseup', this.onMouseUp, this);
+        if(this.rendered){
+            Ext.ButtonToggleMgr.unregister(this);
+        }
+    },
+
+    // private
+    doAutoWidth : function(){
+        if(this.el && this.text && this.width === undefined){
+            this.el.setWidth('auto');
+            if(Ext.isIE7 && Ext.isStrict){
+                var ib = this.btnEl;
+                if(ib && ib.getWidth() > 20){
+                    ib.clip();
+                    ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr'));
+                }
+            }
+            if(this.minWidth){
+                if(this.el.getWidth() < this.minWidth){
+                    this.el.setWidth(this.minWidth);
+                }
+            }
+        }
+    },
+
+    /**
+     * Assigns this Button's click handler
+     * @param {Function} handler The function to call when the button is clicked
+     * @param {Object} scope (optional) Scope for the function passed in
+     * @return {Ext.Button} this
+     */
+    setHandler : function(handler, scope){
+        this.handler = handler;
+        this.scope = scope;
+        return this;
+    },
+
+    /**
+     * Sets this Button's text
+     * @param {String} text The button text
+     * @return {Ext.Button} this
+     */
+    setText : function(text){
+        this.text = text;
+        if(this.el){
+            this.el.child('td.x-btn-mc ' + this.buttonSelector).update(text);
+        }
+        this.doAutoWidth();
+        return this;
+    },
+
+    /**
+     * Gets the text for this Button
+     * @return {String} The button text
+     */
+    getText : function(){
+        return this.text;
+    },
+
+    /**
+     * If a state it passed, it becomes the pressed state otherwise the current state is toggled.
+     * @param {Boolean} state (optional) Force a particular state
+     * @param {Boolean} supressEvent (optional) True to stop events being fired when calling this method.
+     * @return {Ext.Button} this
+     */
+    toggle : function(state, suppressEvent){
+        state = state === undefined ? !this.pressed : !!state;
+        if(state != this.pressed){
+            this.el[state ? 'addClass' : 'removeClass']('x-btn-pressed');
+            this.pressed = state;
+            if(!suppressEvent){
+                this.fireEvent('toggle', this, state);
+                if(this.toggleHandler){
+                    this.toggleHandler.call(this.scope || this, this, state);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Focus the button
+     */
+    focus : function(){
+        this.btnEl.focus();
+    },
+
+    // private
+    onDisable : function(){
+        this.onDisableChange(true);
+    },
+
+    // private
+    onEnable : function(){
+        this.onDisableChange(false);
+    },
+    
+    onDisableChange : function(disabled){
+        if(this.el){
+            if(!Ext.isIE6 || !this.text){
+                this.el[disabled ? 'addClass' : 'removeClass'](this.disabledClass);
+            }
+            this.el.dom.disabled = disabled;
+        }
+        this.disabled = disabled;
+    },
+
+    /**
+     * Show this button's menu (if it has one)
+     */
+    showMenu : function(){
+        if(this.rendered && this.menu){
+            if(this.tooltip){
+                Ext.QuickTips.getQuickTip().cancelShow(this.btnEl);
+            }
+            this.menu.show(this.el, this.menuAlign);
+        }
+        return this;
+    },
+
+    /**
+     * Hide this button's menu (if it has one)
+     */
+    hideMenu : function(){
+        if(this.menu){
+            this.menu.hide();
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the button has a menu and it is visible
+     * @return {Boolean}
+     */
+    hasVisibleMenu : function(){
+        return this.menu && this.menu.isVisible();
+    },
+
+    // private
+    onClick : function(e){
+        if(e){
+            e.preventDefault();
+        }
+        if(e.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, e);
+            if(this.handler){
+                //this.el.removeClass('x-btn-over');
+                this.handler.call(this.scope || this, this, e);
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && !internal;
+    },
+
+    // private
+    onMouseOver : function(e){
+        if(!this.disabled){
+            var internal = e.within(this.el,  true);
+            if(!internal){
+                this.el.addClass('x-btn-over');
+                if(!this.monitoringMouseOver){
+                    Ext.getDoc().on('mouseover', this.monitorMouseOver, this);
+                    this.monitoringMouseOver = true;
+                }
+                this.fireEvent('mouseover', this, e);
+            }
+            if(this.isMenuTriggerOver(e, internal)){
+                this.fireEvent('menutriggerover', this, this.menu, e);
+            }
+        }
+    },
+
+    // private
+    monitorMouseOver : function(e){
+        if(e.target != this.el.dom && !e.within(this.el)){
+            if(this.monitoringMouseOver){
+                Ext.getDoc().un('mouseover', this.monitorMouseOver, this);
+                this.monitoringMouseOver = false;
+            }
+            this.onMouseOut(e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        var internal = e.within(this.el) && e.target != this.el.dom;
+        this.el.removeClass('x-btn-over');
+        this.fireEvent('mouseout', this, e);
+        if(this.isMenuTriggerOut(e, internal)){
+            this.fireEvent('menutriggerout', this, this.menu, e);
+        }
+    },
+    // private
+    onFocus : function(e){
+        if(!this.disabled){
+            this.el.addClass('x-btn-focus');
+        }
+    },
+    // private
+    onBlur : function(e){
+        this.el.removeClass('x-btn-focus');
+    },
+
+    // private
+    getClickEl : function(e, isUp){
+       return this.el;
+    },
+
+    // private
+    onMouseDown : function(e){
+        if(!this.disabled && e.button === 0){
+            this.getClickEl(e).addClass('x-btn-click');
+            Ext.getDoc().on('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMouseUp : function(e){
+        if(e.button === 0){
+            this.getClickEl(e, true).removeClass('x-btn-click');
+            Ext.getDoc().un('mouseup', this.onMouseUp, this);
+        }
+    },
+    // private
+    onMenuShow : function(e){
+        this.ignoreNextClick = 0;
+        this.el.addClass('x-btn-menu-active');
+        this.fireEvent('menushow', this, this.menu);
+    },
+    // private
+    onMenuHide : function(e){
+        this.el.removeClass('x-btn-menu-active');
+        this.ignoreNextClick = this.restoreClick.defer(250, this);
+        this.fireEvent('menuhide', this, this.menu);
+    },
+
+    // private
+    restoreClick : function(){
+        this.ignoreNextClick = 0;
+    }
+
+
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('button', Ext.Button);
+
+// Private utility class used by Button
+Ext.ButtonToggleMgr = function(){
+   var groups = {};
+
+   function toggleGroup(btn, state){
+       if(state){
+           var g = groups[btn.toggleGroup];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != btn){
+                   g[i].toggle(false);
+               }
+           }
+       }
+   }
+
+   return {
+       register : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(!g){
+               g = groups[btn.toggleGroup] = [];
+           }
+           g.push(btn);
+           btn.on('toggle', toggleGroup);
+       },
+
+       unregister : function(btn){
+           if(!btn.toggleGroup){
+               return;
+           }
+           var g = groups[btn.toggleGroup];
+           if(g){
+               g.remove(btn);
+               btn.un('toggle', toggleGroup);
+           }
+       },
+
+       /**
+        * Gets the pressed button in the passed group or null
+        * @param {String} group
+        * @return Button
+        */
+       getPressed : function(group){
+           var g = groups[group];
+           if(g){
+               for(var i = 0, len = g.length; i < len; i++){
+                   if(g[i].pressed === true){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ButtonGroup.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ButtonGroup.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ButtonGroup.js	(revision 625)
@@ -0,0 +1,103 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ButtonGroup
+ * @extends Ext.Panel
+ * Container for a group of buttons. Example usage:
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Panel with Button Group',
+    width: 300,
+    height:200,
+    renderTo: document.body,
+    html: 'whatever',
+    tbar: [{
+        xtype: 'buttongroup',
+        {@link #columns}: 3,
+        title: 'Clipboard',
+        items: [{
+            text: 'Paste',
+            scale: 'large',
+            rowspan: 3, iconCls: 'add',
+            iconAlign: 'top',
+            cls: 'x-btn-as-arrow'
+        },{
+            xtype:'splitbutton',
+            text: 'Menu Button',
+            scale: 'large',
+            rowspan: 3,
+            iconCls: 'add',
+            iconAlign: 'top',
+            arrowAlign:'bottom',
+            menu: [{text: 'Menu Item 1'}]
+        },{
+            xtype:'splitbutton', text: 'Cut', iconCls: 'add16', menu: [{text: 'Cut Menu Item'}]
+        },{
+            text: 'Copy', iconCls: 'add16'
+        },{
+            text: 'Format', iconCls: 'add16'
+        }]
+    }]
+});
+ * </code></pre>
+ * @xtype buttongroup
+ */
+Ext.ButtonGroup = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} columns The <tt>columns</tt> configuration property passed to the
+     * {@link #layout configured layout manager}. See {@link Ext.layout.TableLayout#columns}.
+     */
+    /**
+     * @cfg {String} baseCls  Defaults to <tt>'x-btn-group'</tt>.  See {@link Ext.Panel#baseCls}.
+     */
+    baseCls: 'x-btn-group',
+    /**
+     * @cfg {String} layout  Defaults to <tt>'table'</tt>.  See {@link Ext.Container#layout}.
+     */
+    layout:'table',
+    defaultType: 'button',
+    /**
+     * @cfg {Boolean} frame  Defaults to <tt>true</tt>.  See {@link Ext.Panel#frame}.
+     */
+    frame: true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+
+    initComponent : function(){
+        this.layoutConfig = this.layoutConfig || {};
+        Ext.applyIf(this.layoutConfig, {
+            columns : this.columns
+        });
+        if(!this.title){
+            this.addClass('x-btn-group-notitle');
+        }
+        this.on('afterlayout', this.onAfterLayout, this);
+        Ext.ButtonGroup.superclass.initComponent.call(this);
+    },
+
+    applyDefaults : function(c){
+        c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c);
+        var d = this.internalDefaults;
+        if(c.events){
+            Ext.applyIf(c.initialConfig, d);
+            Ext.apply(c, d);
+        }else{
+            Ext.applyIf(c, d);
+        }
+        return c;
+    },
+
+    onAfterLayout : function(){
+        var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth;
+        this.body.setWidth(bodyWidth);
+        this.el.setWidth(bodyWidth + this.getFrameWidth());
+    }
+    /**
+     * @cfg {Array} tools  @hide
+     */
+});
+
+Ext.reg('buttongroup', Ext.ButtonGroup);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ColorPalette.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ColorPalette.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ColorPalette.js	(revision 625)
@@ -0,0 +1,148 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ColorPalette
+ * @extends Ext.Component
+ * Simple color palette class for choosing colors.  The palette can be rendered to any container.<br />
+ * Here's an example of typical usage:
+ * <pre><code>
+var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
+cp.render('my-div');
+
+cp.on('select', function(palette, selColor){
+    // do something with selColor
+});
+</code></pre>
+ * @constructor
+ * Create a new ColorPalette
+ * @param {Object} config The config object
+ * @xtype colorpalette
+ */
+Ext.ColorPalette = function(config){
+    Ext.ColorPalette.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+	     * @event select
+	     * Fires when a color is selected
+	     * @param {ColorPalette} this
+	     * @param {String} color The 6-digit color hex code (without the # symbol)
+	     */
+        'select'
+    );
+
+    if(this.handler){
+        this.on("select", this.handler, this.scope, true);
+    }
+};
+Ext.extend(Ext.ColorPalette, Ext.Component, {
+	/**
+	 * @cfg {String} tpl An existing XTemplate instance to be used in place of the default template for rendering the component.
+	 */
+    /**
+     * @cfg {String} itemCls
+     * The CSS class to apply to the containing element (defaults to "x-color-palette")
+     */
+    itemCls : "x-color-palette",
+    /**
+     * @cfg {String} value
+     * The initial color to highlight (should be a valid 6-digit color hex code without the # symbol).  Note that
+     * the hex codes are case-sensitive.
+     */
+    value : null,
+    clickEvent:'click',
+    // private
+    ctype: "Ext.ColorPalette",
+
+    /**
+     * @cfg {Boolean} allowReselect If set to true then reselecting a color that is already selected fires the {@link #select} event
+     */
+    allowReselect : false,
+
+    /**
+     * <p>An array of 6-digit color hex code strings (without the # symbol).  This array can contain any number
+     * of colors, and each hex code should be unique.  The width of the palette is controlled via CSS by adjusting
+     * the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number
+     * of colors with the width setting until the box is symmetrical.</p>
+     * <p>You can override individual colors if needed:</p>
+     * <pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors[0] = "FF0000";  // change the first box to red
+</code></pre>
+
+Or you can provide a custom array of your own for complete control:
+<pre><code>
+var cp = new Ext.ColorPalette();
+cp.colors = ["000000", "993300", "333300"];
+</code></pre>
+     * @type Array
+     */
+    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"
+    ],
+
+    // private
+    onRender : function(container, position){
+        var t = 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 el = document.createElement("div");
+        el.id = this.getId();
+        el.className = this.itemCls;
+        t.overwrite(el, this.colors);
+        container.dom.insertBefore(el, position);
+        this.el = Ext.get(el);
+        this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'});
+        if(this.clickEvent != 'click'){
+        	this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true});
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ColorPalette.superclass.afterRender.call(this);
+        if(this.value){
+            var s = this.value;
+            this.value = null;
+            this.select(s);
+        }
+    },
+
+    // private
+    handleClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
+            this.select(c.toUpperCase());
+        }
+    },
+
+    /**
+     * Selects the specified color in the palette (fires the {@link #select} event)
+     * @param {String} color A valid 6-digit color hex code (# will be stripped if included)
+     */
+    select : function(color){
+        color = color.replace("#", "");
+        if(color != this.value || this.allowReselect){
+            var el = this.el;
+            if(this.value){
+                el.child("a.color-"+this.value).removeClass("x-color-palette-sel");
+            }
+            el.child("a.color-"+color).addClass("x-color-palette-sel");
+            this.value = color;
+            this.fireEvent("select", this, color);
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+Ext.reg('colorpalette', Ext.ColorPalette);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Component.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Component.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Component.js	(revision 625)
@@ -0,0 +1,1540 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Component
+ * @extends Ext.util.Observable
+ * <p>Base class for all Ext components.  All subclasses of Component may participate in the automated
+ * Ext component lifecycle of creation, rendering and destruction which is provided by the {@link Ext.Container Container} class.
+ * Components may be added to a Container through the {@link Ext.Container#items items} config option at the time the Container is created,
+ * or they may be added dynamically via the {@link Ext.Container#add add} method.</p>
+ * <p>The Component base class has built-in support for basic hide/show and enable/disable behavior.</p>
+ * <p>All Components are registered with the {@link Ext.ComponentMgr} on construction so that they can be referenced at any time via
+ * {@link Ext#getCmp}, passing the {@link #id}.</p>
+ * <p>All user-developed visual widgets that are required to participate in automated lifecycle and size management should subclass Component (or
+ * {@link Ext.BoxComponent} if managed box model handling is required, ie height and width management).</p>
+ * <p>See the <a href="http://extjs.com/learn/Tutorial:Creating_new_UI_controls">Creating new UI controls</a> tutorial for details on how
+ * and to either extend or augment ExtJs base classes to create custom Components.</p>
+ * <p>Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the
+ * xtype like {@link #getXType} and {@link #isXType}. This is the list of all valid xtypes:</p>
+ * <pre>
+xtype            Class
+-------------    ------------------
+box              {@link Ext.BoxComponent}
+button           {@link Ext.Button}
+buttongroup      {@link Ext.ButtonGroup}
+colorpalette     {@link Ext.ColorPalette}
+component        {@link Ext.Component}
+container        {@link Ext.Container}
+cycle            {@link Ext.CycleButton}
+dataview         {@link Ext.DataView}
+datepicker       {@link Ext.DatePicker}
+editor           {@link Ext.Editor}
+editorgrid       {@link Ext.grid.EditorGridPanel}
+flash            {@link Ext.FlashComponent}
+grid             {@link Ext.grid.GridPanel}
+listview         {@link Ext.ListView}
+panel            {@link Ext.Panel}
+progress         {@link Ext.ProgressBar}
+propertygrid     {@link Ext.grid.PropertyGrid}
+slider           {@link Ext.Slider}
+spacer           {@link Ext.Spacer}
+splitbutton      {@link Ext.SplitButton}
+tabpanel         {@link Ext.TabPanel}
+treepanel        {@link Ext.tree.TreePanel}
+viewport         {@link Ext.ViewPort}
+window           {@link Ext.Window}
+
+Toolbar components
+---------------------------------------
+paging           {@link Ext.PagingToolbar}
+toolbar          {@link Ext.Toolbar}
+tbbutton         {@link Ext.Toolbar.Button}        (deprecated; use button)
+tbfill           {@link Ext.Toolbar.Fill}
+tbitem           {@link Ext.Toolbar.Item}
+tbseparator      {@link Ext.Toolbar.Separator}
+tbspacer         {@link Ext.Toolbar.Spacer}
+tbsplit          {@link Ext.Toolbar.SplitButton}   (deprecated; use splitbutton)
+tbtext           {@link Ext.Toolbar.TextItem}
+
+Menu components
+---------------------------------------
+menu             {@link Ext.menu.Menu}
+colormenu        {@link Ext.menu.ColorMenu}
+datemenu         {@link Ext.menu.DateMenu}
+menubaseitem     {@link Ext.menu.BaseItem}
+menucheckitem    {@link Ext.menu.CheckItem}
+menuitem         {@link Ext.menu.Item}
+menuseparator    {@link Ext.menu.Separator}
+menutextitem     {@link Ext.menu.TextItem}
+
+Form components
+---------------------------------------
+form             {@link Ext.FormPanel}
+checkbox         {@link Ext.form.Checkbox}
+checkboxgroup    {@link Ext.form.CheckboxGroup}
+combo            {@link Ext.form.ComboBox}
+datefield        {@link Ext.form.DateField}
+displayfield     {@link Ext.form.DisplayField}
+field            {@link Ext.form.Field}
+fieldset         {@link Ext.form.FieldSet}
+hidden           {@link Ext.form.Hidden}
+htmleditor       {@link Ext.form.HtmlEditor}
+label            {@link Ext.form.Label}
+numberfield      {@link Ext.form.NumberField}
+radio            {@link Ext.form.Radio}
+radiogroup       {@link Ext.form.RadioGroup}
+textarea         {@link Ext.form.TextArea}
+textfield        {@link Ext.form.TextField}
+timefield        {@link Ext.form.TimeField}
+trigger          {@link Ext.form.TriggerField}
+
+Chart components
+---------------------------------------
+chart            {@link Ext.chart.Chart}
+barchart         {@link Ext.chart.BarChart}
+cartesianchart   {@link Ext.chart.CartesianChart}
+columnchart      {@link Ext.chart.ColumnChart}
+linechart        {@link Ext.chart.LineChart}
+piechart         {@link Ext.chart.PieChart}
+
+Store xtypes
+---------------------------------------
+arraystore       {@link Ext.data.ArrayStore}
+directstore      {@link Ext.data.DirectStore}
+groupingstore    {@link Ext.data.GroupingStore}
+jsonstore        {@link Ext.data.JsonStore}
+simplestore      {@link Ext.data.SimpleStore}      (deprecated; use arraystore)
+store            {@link Ext.data.Store}
+xmlstore         {@link Ext.data.XmlStore}
+</pre>
+ * @constructor
+ * @param {Ext.Element/String/Object} config The configuration options may be specified as either:
+ * <div class="mdetail-params"><ul>
+ * <li><b>an element</b> :
+ * <p class="sub-desc">it is set as the internal element and its id used as the component id</p></li>
+ * <li><b>a string</b> :
+ * <p class="sub-desc">it is assumed to be the id of an existing element and is used as the component id</p></li>
+ * <li><b>anything else</b> :
+ * <p class="sub-desc">it is assumed to be a standard config object and is applied to the component</p></li>
+ * </ul></div>
+ */
+Ext.Component = function(config){
+    config = config || {};
+    if(config.initialConfig){
+        if(config.isAction){           // actions
+            this.baseAction = config;
+        }
+        config = config.initialConfig; // component cloning / action set up
+    }else if(config.tagName || config.dom || Ext.isString(config)){ // element object
+        config = {applyTo: config, id: config.id || config};
+    }
+
+    /**
+     * This Component's initial configuration specification. Read-only.
+     * @type Object
+     * @property initialConfig
+     */
+    this.initialConfig = config;
+
+    Ext.apply(this, config);
+    this.addEvents(
+        /**
+         * @event disable
+         * Fires after the component is disabled.
+         * @param {Ext.Component} this
+         */
+        'disable',
+        /**
+         * @event enable
+         * Fires after the component is enabled.
+         * @param {Ext.Component} this
+         */
+        'enable',
+        /**
+         * @event beforeshow
+         * Fires before the component is shown by calling the {@link #show} method.
+         * Return false from an event handler to stop the show.
+         * @param {Ext.Component} this
+         */
+        'beforeshow',
+        /**
+         * @event show
+         * Fires after the component is shown when calling the {@link #show} method.
+         * @param {Ext.Component} this
+         */
+        'show',
+        /**
+         * @event beforehide
+         * Fires before the component is hidden by calling the {@link #hide} method.
+         * Return false from an event handler to stop the hide.
+         * @param {Ext.Component} this
+         */
+        'beforehide',
+        /**
+         * @event hide
+         * Fires after the component is hidden.
+         * Fires after the component is hidden when calling the {@link #hide} method.
+         * @param {Ext.Component} this
+         */
+        'hide',
+        /**
+         * @event beforerender
+         * Fires before the component is {@link #rendered}. Return false from an
+         * event handler to stop the {@link #render}.
+         * @param {Ext.Component} this
+         */
+        'beforerender',
+        /**
+         * @event render
+         * Fires after the component markup is {@link #rendered}.
+         * @param {Ext.Component} this
+         */
+        'render',
+        /**
+         * @event afterrender
+         * <p>Fires after the component rendering is finished.</p>
+         * <p>The afterrender event is fired after this Component has been {@link #rendered}, been postprocesed
+         * by any afterRender method defined for the Component, and, if {@link #stateful}, after state
+         * has been restored.</p>
+         * @param {Ext.Component} this
+         */
+        'afterrender',
+        /**
+         * @event beforedestroy
+         * Fires before the component is {@link #destroy}ed. Return false from an event handler to stop the {@link #destroy}.
+         * @param {Ext.Component} this
+         */
+        'beforedestroy',
+        /**
+         * @event destroy
+         * Fires after the component is {@link #destroy}ed.
+         * @param {Ext.Component} this
+         */
+        'destroy',
+        /**
+         * @event beforestaterestore
+         * Fires before the state of the component is restored. Return false from an event handler to stop the restore.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. If this
+         * event is not vetoed, then the state object is passed to <b><tt>applyState</tt></b>. By default,
+         * that simply copies property values into this Component. The method maybe overriden to
+         * provide custom state restoration.
+         */
+        'beforestaterestore',
+        /**
+         * @event staterestore
+         * Fires after the state of the component is restored.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values returned from the StateProvider. This is passed
+         * to <b><tt>applyState</tt></b>. By default, that simply copies property values into this
+         * Component. The method maybe overriden to provide custom state restoration.
+         */
+        'staterestore',
+        /**
+         * @event beforestatesave
+         * Fires before the state of the component is saved to the configured state provider. Return false to stop the save.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        'beforestatesave',
+        /**
+         * @event statesave
+         * Fires after the state of the component is saved to the configured state provider.
+         * @param {Ext.Component} this
+         * @param {Object} state The hash of state values. This is determined by calling
+         * <b><tt>getState()</tt></b> on the Component. This method must be provided by the
+         * developer to return whetever representation of state is required, by default, Ext.Component
+         * has a null implementation.
+         */
+        '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 i = 0, len = this.plugins.length; i < len; i++){
+                this.plugins[i] = this.initPlugin(this.plugins[i]);
+            }
+        }else{
+            this.plugins = this.initPlugin(this.plugins);
+        }
+    }
+
+    if(this.stateful !== false){
+        this.initState(config);
+    }
+
+    if(this.applyTo){
+        this.applyToMarkup(this.applyTo);
+        delete this.applyTo;
+    }else if(this.renderTo){
+        this.render(this.renderTo);
+        delete this.renderTo;
+    }
+};
+
+// private
+Ext.Component.AUTO_ID = 1000;
+
+Ext.extend(Ext.Component, Ext.util.Observable, {
+	// Configs below are used for all Components when rendered by FormLayout.
+    /**
+     * @cfg {String} fieldLabel <p>The label text to display next to this Component (defaults to '').</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
+     * has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout manager (e.g.
+     * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>).</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelStyle <p>A CSS style specification string to apply directly to this field's
+     * label.  Defaults to the container's labelStyle value if set (e.g.,
+     * <tt>{@link Ext.layout.FormLayout#labelStyle}</tt> , or '').</p>
+     * <br><p><b>Note</b>: see the note for <code>{@link #clearCls}</code>.</p><br>
+     * <p>Also see <code>{@link #hideLabel}</code> and
+     * <code>{@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</code></p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Name',
+        labelStyle: 'font-weight:bold;'
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} labelSeparator <p>The separator to display after the text of each
+     * <tt>{@link #fieldLabel}</tt>.  This property may be configured at various levels.
+     * The order of precedence is:
+     * <div class="mdetail-params"><ul>
+     * <li>field / component level</li>
+     * <li>container level</li>
+     * <li>{@link Ext.layout.FormLayout#labelSeparator layout level} (defaults to colon <tt>':'</tt>)</li>
+     * </ul></div>
+     * To display no separator for this field's label specify empty string ''.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * <p>Also see <tt>{@link #hideLabel}</tt> and
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}.</p>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    layoutConfig: {
+        labelSeparator: '~'   // layout config has lowest priority (defaults to ':')
+    },
+    {@link Ext.layout.FormLayout#labelSeparator labelSeparator}: '>>',     // config at container level
+    items: [{
+        xtype: 'textfield',
+        fieldLabel: 'Field 1',
+        labelSeparator: '...' // field/component level config supersedes others
+    },{
+        xtype: 'textfield',
+        fieldLabel: 'Field 2' // labelSeparator will be '='
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideLabel <p><tt>true</tt> to completely hide the label element
+     * ({@link #fieldLabel label} and {@link #labelSeparator separator}). Defaults to <tt>false</tt>.
+     * By default, even if you do not specify a <tt>{@link #fieldLabel}</tt> the space will still be
+     * reserved so that the field will line up with other fields that do have labels.
+     * Setting this to <tt>true</tt> will cause the field to not reserve that space.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #clearCls}</tt>.</p><br>
+     * Example use:<pre><code>
+new Ext.FormPanel({
+    height: 100,
+    renderTo: Ext.getBody(),
+    items: [{
+        xtype: 'textfield'
+        hideLabel: true
+    }]
+});
+</code></pre>
+     */
+    /**
+     * @cfg {String} clearCls <p>The CSS class used to to apply to the special clearing div rendered
+     * directly after each form field wrapper to provide field clearing (defaults to
+     * <tt>'x-form-clear-left'</tt>).</p>
+     * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container
+     * which has been configured to use the <b>{@link Ext.layout.FormLayout FormLayout}</b> layout
+     * manager (e.g. {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) and either a
+     * <tt>{@link #fieldLabel}</tt> is specified or <tt>isFormField=true</tt> is specified.</p><br>
+     * <p>See {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} also.</p>
+     */
+    /**
+     * @cfg {String} itemCls <p>An additional CSS class to apply to the div wrapping the form item
+     * element of this field.  If supplied, <tt>itemCls</tt> at the <b>field</b> level will override
+     * the default <tt>itemCls</tt> supplied at the <b>container</b> level. The value specified for
+     * <tt>itemCls</tt> will be added to the default class (<tt>'x-form-item'</tt>).</p>
+     * <p>Since it is applied to the item wrapper (see
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl}), it allows
+     * you to write standard CSS rules that can apply to the field, the label (if specified), or
+     * any other element within the markup for the field.</p>
+     * <br><p><b>Note</b>: see the note for <tt>{@link #fieldLabel}</tt>.</p><br>
+     * Example use:<pre><code>
+// Apply a style to the field's label:
+&lt;style>
+    .required .x-form-item-label {font-weight:bold;color:red;}
+&lt;/style>
+
+new Ext.FormPanel({
+	height: 100,
+	renderTo: Ext.getBody(),
+	items: [{
+		xtype: 'textfield',
+		fieldLabel: 'Name',
+		itemCls: 'required' //this label will be styled
+	},{
+		xtype: 'textfield',
+		fieldLabel: 'Favorite Color'
+	}]
+});
+</code></pre>
+     */
+
+	// Configs below are used for all Components when rendered by AnchorLayout.
+    /**
+     * @cfg {String} anchor <p><b>Note</b>: this config is only used when this Component is rendered
+     * by a Container which has been configured to use an <b>{@link Ext.layout.AnchorLayout AnchorLayout}</b>
+     * based layout manager, for example:<div class="mdetail-params"><ul>
+     * <li>{@link Ext.form.FormPanel}</li>
+     * <li>specifying <code>layout: 'anchor' // or 'form', or 'absolute'</code></li>
+     * </ul></div></p>
+     * <p>See {@link Ext.layout.AnchorLayout}.{@link Ext.layout.AnchorLayout#anchor anchor} also.</p>
+     */
+
+    /**
+     * @cfg {String} id
+     * <p>The <b>unique</b> id of this component (defaults to an {@link #getId auto-assigned id}).
+     * You should assign an id if you need to be able to access the component later and you do
+     * not have an object reference available (e.g., using {@link Ext}.{@link Ext#getCmp getCmp}).</p>
+     * <p>Note that this id will also be used as the element id for the containing HTML element
+     * that is rendered to the page for this component. This allows you to write id-based CSS
+     * rules to style the specific instance of this component uniquely, and also to select
+     * sub-elements using this component's id as the parent.</p>
+     * <p><b>Note</b>: to avoid complications imposed by a unique <tt>id</tt> also see
+     * <code>{@link #itemId}</code> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <code>{@link #ownerCt}</code>.</p>
+     */
+    /**
+     * @cfg {String} itemId
+     * <p>An <tt>itemId</tt> can be used as an alternative way to get a reference to a component
+     * when no object reference is available.  Instead of using an <code>{@link #id}</code> with
+     * {@link Ext}.{@link Ext#getCmp getCmp}, use <code>itemId</code> with
+     * {@link Ext.Container}.{@link Ext.Container#getComponent getComponent} which will retrieve
+     * <code>itemId</code>'s or <tt>{@link #id}</tt>'s. Since <code>itemId</code>'s are an index to the
+     * container's internal MixedCollection, the <code>itemId</code> is scoped locally to the container --
+     * avoiding potential conflicts with {@link Ext.ComponentMgr} which requires a <b>unique</b>
+     * <code>{@link #id}</code>.</p>
+     * <pre><code>
+var c = new Ext.Panel({ //
+    {@link Ext.BoxComponent#height height}: 300,
+    {@link #renderTo}: document.body,
+    {@link Ext.Container#layout layout}: 'auto',
+    {@link Ext.Container#items items}: [
+        {
+            itemId: 'p1',
+            {@link Ext.Panel#title title}: 'Panel 1',
+            {@link Ext.BoxComponent#height height}: 150
+        },
+        {
+            itemId: 'p2',
+            {@link Ext.Panel#title title}: 'Panel 2',
+            {@link Ext.BoxComponent#height height}: 150
+        }
+    ]
+})
+p1 = c.{@link Ext.Container#getComponent getComponent}('p1'); // not the same as {@link Ext#getCmp Ext.getCmp()}
+p2 = p1.{@link #ownerCt}.{@link Ext.Container#getComponent getComponent}('p2'); // reference via a sibling
+     * </code></pre>
+     * <p>Also see <tt>{@link #id}</tt> and <code>{@link #ref}</code>.</p>
+     * <p><b>Note</b>: to access the container of an item see <tt>{@link #ownerCt}</tt>.</p>
+     */
+    /**
+     * @cfg {String} xtype
+     * The registered <tt>xtype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a child item of a Container is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>xtype</tt> will be looked up at render time up to determine what
+     * type of child Component to create.<br><br>
+     * The predefined xtypes are listed {@link Ext.Component here}.
+     * <br><br>
+     * If you subclass Components to create your own Components, you may register
+     * them using {@link Ext.ComponentMgr#registerType} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} ptype
+     * The registered <tt>ptype</tt> to create. This config option is not used when passing
+     * a config object into a constructor. This config option is used only when
+     * lazy instantiation is being used, and a Plugin is being
+     * specified not as a fully instantiated Component, but as a <i>Component config
+     * object</i>. The <tt>ptype</tt> will be looked up at render time up to determine what
+     * type of Plugin to create.<br><br>
+     * If you create your own Plugins, you may register them using
+     * {@link Ext.ComponentMgr#registerPlugin} in order to be able to
+     * take advantage of lazy instantiation and rendering.
+     */
+    /**
+     * @cfg {String} cls
+     * An optional extra CSS class that will be added to this component's Element (defaults to '').  This can be
+     * useful for adding customized styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} overCls
+     * An optional extra CSS class that will be added to this component's Element when the mouse moves
+     * over the Element, and removed when the mouse moves out. (defaults to '').  This can be
+     * useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules.
+     */
+    /**
+     * @cfg {String} style
+     * A custom style specification to be applied to this component's Element.  Should be a valid argument to
+     * {@link Ext.Element#applyStyles}.
+     * <pre><code>
+new Ext.Panel({
+    title: 'Some Title',
+    renderTo: Ext.getBody(),
+    width: 400, height: 300,
+    layout: 'form',
+    items: [{
+        xtype: 'textarea',
+        style: {
+            width: '95%',
+            marginBottom: '10px'
+        }
+    },
+        new Ext.Button({
+            text: 'Send',
+            minWidth: '100',
+            style: {
+                marginBottom: '10px'
+            }
+        })
+    ]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {String} ctCls
+     * <p>An optional extra CSS class that will be added to this component's container. This can be useful for
+     * adding customized styles to the container or any of its children using standard CSS rules.  See
+     * {@link Ext.layout.ContainerLayout}.{@link Ext.layout.ContainerLayout#extraCls extraCls} also.</p>
+     * <p><b>Note</b>: <tt>ctCls</tt> defaults to <tt>''</tt> except for the following class
+     * which assigns a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-layout-ct'</tt></li>
+     * </ul></div>
+     * To configure the above Class with an extra CSS class append to the default.  For example,
+     * for BoxLayout (Hbox and Vbox):<pre><code>
+     * ctCls: 'x-box-layout-ct custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this component disabled (default is false).
+     */
+    disabled : false,
+    /**
+     * @cfg {Boolean} hidden
+     * Render this component hidden (default is false). If <tt>true</tt>, the
+     * {@link #hide} method will be called internally.
+     */
+    hidden : false,
+    /**
+     * @cfg {Object/Array} plugins
+     * An object or array of objects that will provide custom functionality for this component.  The only
+     * requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.
+     * When a component is created, if any plugins are available, the component will call the init method on each
+     * plugin, passing a reference to itself.  Each plugin can then call methods or respond to events on the
+     * component as needed to provide its functionality.
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>Specify the id of the element, a DOM element or an existing Element corresponding to a DIV
+     * that is already present in the document that specifies some structural markup for this
+     * component.</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">When <tt>applyTo</tt> is used, constituent parts of the component can also be specified
+     * by id or CSS class name within the main element, and the component being created may attempt
+     * to create its subcomponents from that markup if applicable.</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * <div class="sub-desc">If applyTo is specified, any value passed for {@link #renderTo} will be ignored and the target
+     * element's parent node will automatically be used as the component's container.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Mixed} renderTo
+     * <p>Specify the id of the element, a DOM element or an existing Element that this component
+     * will be rendered into.</p><div><ul>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">Do <u>not</u> use this option if the Component is to be a child item of
+     * a {@link Ext.Container Container}. It is the responsibility of the
+     * {@link Ext.Container Container}'s {@link Ext.Container#layout layout manager}
+     * to render and manage its child items.</div>
+     * <div class="sub-desc">When using this config, a call to render() is not required.</div>
+     * </ul></li>
+     * </ul></div>
+     * <p>See <tt>{@link #render}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} stateful
+     * <p>A flag which causes the Component to attempt to restore the state of
+     * internal properties from a saved state on startup. The component must have
+     * either a <code>{@link #stateId}</code> or <code>{@link #id}</code> assigned
+     * for state to be managed. Auto-generated ids are not guaranteed to be stable
+     * across page loads and cannot be relied upon to save and restore the same
+     * state for a component.<p>
+     * <p>For state saving to work, the state manager's provider must have been
+     * set to an implementation of {@link Ext.state.Provider} which overrides the
+     * {@link Ext.state.Provider#set set} and {@link Ext.state.Provider#get get}
+     * methods to save and recall name/value pairs. A built-in implementation,
+     * {@link Ext.state.CookieProvider} is available.</p>
+     * <p>To set the state provider for the current page:</p>
+     * <pre><code>
+Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
+    expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
+}));
+     * </code></pre>
+     * <p>A stateful Component attempts to save state when one of the events
+     * listed in the <code>{@link #stateEvents}</code> configuration fires.</p>
+     * <p>To save state, a stateful Component first serializes its state by
+     * calling <b><code>getState</code></b>. By default, this function does
+     * nothing. The developer must provide an implementation which returns an
+     * object hash which represents the Component's restorable state.</p>
+     * <p>The value yielded by getState is passed to {@link Ext.state.Manager#set}
+     * which uses the configured {@link Ext.state.Provider} to save the object
+     * keyed by the Component's <code>{@link stateId}</code>, or, if that is not
+     * specified, its <code>{@link #id}</code>.</p>
+     * <p>During construction, a stateful Component attempts to <i>restore</i>
+     * its state by calling {@link Ext.state.Manager#get} passing the
+     * <code>{@link #stateId}</code>, or, if that is not specified, the
+     * <code>{@link #id}</code>.</p>
+     * <p>The resulting object is passed to <b><code>applyState</code></b>.
+     * The default implementation of <code>applyState</code> simply copies
+     * properties into the object, but a developer may override this to support
+     * more behaviour.</p>
+     * <p>You can perform extra processing on state save and restore by attaching
+     * handlers to the {@link #beforestaterestore}, {@link #staterestore},
+     * {@link #beforestatesave} and {@link #statesave} events.</p>
+     */
+    /**
+     * @cfg {String} stateId
+     * The unique id for this component to use for state management purposes
+     * (defaults to the component id if one was set, otherwise null if the
+     * component is using a generated id).
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Array} stateEvents
+     * <p>An array of events that, when fired, should trigger this component to
+     * save its state (defaults to none). <code>stateEvents</code> may be any type
+     * of event supported by this component, including browser or custom events
+     * (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See <code>{@link #stateful}</code> for an explanation of saving and
+     * restoring Component state.</p>
+     */
+    /**
+     * @cfg {Mixed} autoEl
+     * <p>A tag name or {@link Ext.DomHelper DomHelper} spec used to create the {@link #getEl Element} which will
+     * encapsulate this Component.</p>
+     * <p>You do not normally need to specify this. For the base classes {@link Ext.Component}, {@link Ext.BoxComponent},
+     * and {@link Ext.Container}, this defaults to <b><tt>'div'</tt></b>. The more complex Ext classes use a more complex
+     * DOM structure created by their own onRender methods.</p>
+     * <p>This is intended to allow the developer to create application-specific utility Components encapsulated by
+     * different DOM elements. Example usage:</p><pre><code>
+{
+    xtype: 'box',
+    autoEl: {
+        tag: 'img',
+        src: 'http://www.example.com/example.jpg'
+    }
+}, {
+    xtype: 'box',
+    autoEl: {
+        tag: 'blockquote',
+        html: 'autoEl is cool!'
+    }
+}, {
+    xtype: 'container',
+    autoEl: 'ul',
+    cls: 'ux-unordered-list',
+    items: {
+        xtype: 'box',
+        autoEl: 'li',
+        html: 'First list item'
+    }
+}
+</code></pre>
+     */
+    autoEl : 'div',
+
+    /**
+     * @cfg {String} disabledClass
+     * CSS class added to the component when it is disabled (defaults to 'x-item-disabled').
+     */
+    disabledClass : 'x-item-disabled',
+    /**
+     * @cfg {Boolean} allowDomMove
+     * Whether the component can move the Dom node when rendering (defaults to true).
+     */
+    allowDomMove : true,
+    /**
+     * @cfg {Boolean} autoShow
+     * True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
+     * them on render (defaults to false).
+     */
+    autoShow : false,
+    /**
+     * @cfg {String} hideMode
+     * <p>How this component should be hidden. Supported values are <tt>'visibility'</tt>
+     * (css visibility), <tt>'offsets'</tt> (negative offset position) and <tt>'display'</tt>
+     * (css display).</p>
+     * <br><p><b>Note</b>: the default of <tt>'display'</tt> is generally preferred
+     * since items are automatically laid out when they are first shown (no sizing
+     * is done while hidden).</p>
+     */
+    hideMode : 'display',
+    /**
+     * @cfg {Boolean} hideParent
+     * True to hide and show the component's container when hide/show is called on the component, false to hide
+     * and show the component itself (defaults to false).  For example, this can be used as a shortcut for a hide
+     * button on a window by setting hide:true on the button when adding it to its parent container.
+     */
+    hideParent : false,
+    /**
+     * <p>The {@link Ext.Element} which encapsulates this Component. Read-only.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the <code>{@link #autoEl}</code> config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link Ext.util.Observable#listeners listeners}
+     * config for a suggestion, or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * <p>See also <tt>{@link #getEl getEl}</p>
+     * @type Ext.Element
+     * @property el
+     */
+    /**
+     * The component's owner {@link Ext.Container} (defaults to undefined, and is set automatically when
+     * the component is added to a container).  Read-only.
+     * <p><b>Note</b>: to access items within the container see <tt>{@link #itemId}</tt>.</p>
+     * @type Ext.Container
+     * @property ownerCt
+     */
+    /**
+     * True if this component is hidden. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component is disabled. Read-only.
+     * @type Boolean
+     * @property
+     */
+    /**
+     * True if this component has been rendered. Read-only.
+     * @type Boolean
+     * @property
+     */
+    rendered : false,
+
+    // private
+    ctype : 'Ext.Component',
+
+    // private
+    actionMode : 'el',
+
+    // private
+    getActionEl : function(){
+        return this[this.actionMode];
+    },
+
+    initPlugin : function(p){
+        if(p.ptype && !Ext.isFunction(p.init)){
+            p = Ext.ComponentMgr.createPlugin(p);
+        }else if(Ext.isString(p)){
+            p = Ext.ComponentMgr.createPlugin({
+                ptype: p
+            });
+        }
+        p.init(this);
+        return p;
+    },
+
+    /* // protected
+     * Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default).
+     * <pre><code>
+// Traditional constructor:
+Ext.Foo = function(config){
+    // call superclass constructor:
+    Ext.Foo.superclass.constructor.call(this, config);
+
+    this.addEvents({
+        // add events
+    });
+};
+Ext.extend(Ext.Foo, Ext.Bar, {
+   // class body
+}
+
+// initComponent replaces the constructor:
+Ext.Foo = Ext.extend(Ext.Bar, {
+    initComponent : function(){
+        // call superclass initComponent
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents({
+            // add events
+        });
+    }
+}
+</code></pre>
+     */
+    initComponent : Ext.emptyFn,
+
+    /**
+     * <p>Render this Component into the passed HTML element.</p>
+     * <p><b>If you are using a {@link Ext.Container Container} object to house this Component, then
+     * do not use the render method.</b></p>
+     * <p>A Container's child Components are rendered by that Container's
+     * {@link Ext.Container#layout layout} manager when the Container is first rendered.</p>
+     * <p>Certain layout managers allow dynamic addition of child components. Those that do
+     * include {@link Ext.layout.CardLayout}, {@link Ext.layout.AnchorLayout},
+     * {@link Ext.layout.FormLayout}, {@link Ext.layout.TableLayout}.</p>
+     * <p>If the Container is already rendered when a new child Component is added, you may need to call
+     * the Container's {@link Ext.Container#doLayout doLayout} to refresh the view which causes any
+     * unrendered child Components to be rendered. This is required so that you can add multiple
+     * child components if needed while only refreshing the layout once.</p>
+     * <p>When creating complex UIs, it is important to remember that sizing and positioning
+     * of child items is the responsibility of the Container's {@link Ext.Container#layout layout} manager.
+     * If you expect child items to be sized in response to user interactions, you must
+     * configure the Container with a layout manager which creates and manages the type of layout you
+     * have in mind.</p>
+     * <p><b>Omitting the Container's {@link Ext.Container#layout layout} config means that a basic
+     * layout manager is used which does nothing but render child components sequentially into the
+     * Container. No sizing or positioning will be performed in this situation.</b></p>
+     * @param {Element/HTMLElement/String} container (optional) The element this Component should be
+     * rendered into. If it is being created from existing markup, this should be omitted.
+     * @param {String/Number} position (optional) The element ID or DOM node index within the container <b>before</b>
+     * which this component will be inserted (defaults to appending to the end of the container)
+     */
+    render : function(container, position){
+        if(!this.rendered && this.fireEvent('beforerender', this) !== false){
+            if(!container && this.el){
+                this.el = Ext.get(this.el);
+                container = this.el.dom.parentNode;
+                this.allowDomMove = false;
+            }
+            this.container = Ext.get(container);
+            if(this.ctCls){
+                this.container.addClass(this.ctCls);
+            }
+            this.rendered = true;
+            if(position !== undefined){
+                if(Ext.isNumber(position)){
+                    position = this.container.dom.childNodes[position];
+                }else{
+                    position = Ext.getDom(position);
+                }
+            }
+            this.onRender(this.container, position || 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;
+            }
+            if(this.overCls){
+                this.el.addClassOnOver(this.overCls);
+            }
+            this.fireEvent('render', this);
+            this.afterRender(this.container);
+            if(this.hidden){
+                // call this so we don't fire initial hide events.
+                this.doHide();
+            }
+            if(this.disabled){
+                // pass silent so the event doesn't fire the first time.
+                this.disable(true);
+            }
+
+            if(this.stateful !== false){
+                this.initStateEvents();
+            }
+            this.initRef();
+            this.fireEvent('afterrender', this);
+        }
+        return this;
+    },
+
+    initRef : function(){
+        /**
+         * @cfg {String} ref
+         * <p>A path specification, relative to the Component's {@link #ownerCt} specifying into which
+         * ancestor Container to place a named reference to this Component.</p>
+         * <p>The ancestor axis can be traversed by using '/' characters in the path.
+         * For example, to put a reference to a Toolbar Button into <i>the Panel which owns the Toolbar</i>:</p><pre><code>
+var myGrid = new Ext.grid.EditorGridPanel({
+    title: 'My EditorGridPanel',
+    store: myStore,
+    colModel: myColModel,
+    tbar: [{
+        text: 'Save',
+        handler: saveChanges,
+        disabled: true,
+        ref: '../saveButton'
+    }],
+    listeners: {
+        afteredit: function() {
+//          The button reference is in the GridPanel
+            myGrid.saveButton.enable();
+        }
+    }
+});
+</code></pre>
+         * <p>In the code above, if the ref had been <code>'saveButton'</code> the reference would
+         * have been placed into the Toolbar. Each '/' in the ref moves up one level from the
+         * Component's {@link #ownerCt}.</p>
+         */
+        if(this.ref){
+            var levels = this.ref.split('/');
+            var last = levels.length, i = 0;
+            var t = this;
+            while(i < last){
+                if(t.ownerCt){
+                    t = t.ownerCt;
+                }
+                i++;
+            }
+            t[levels[--i]] = this;
+        }
+    },
+
+    // private
+    initState : function(config){
+        if(Ext.state.Manager){
+            var id = this.getStateId();
+            if(id){
+                var state = Ext.state.Manager.get(id);
+                if(state){
+                    if(this.fireEvent('beforestaterestore', this, state) !== false){
+                        this.applyState(state);
+                        this.fireEvent('staterestore', this, state);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getStateId : function(){
+        return this.stateId || ((this.id.indexOf('ext-comp-') == 0 || this.id.indexOf('ext-gen') == 0) ? null : this.id);
+    },
+
+    // private
+    initStateEvents : function(){
+        if(this.stateEvents){
+            for(var i = 0, e; e = this.stateEvents[i]; i++){
+                this.on(e, this.saveState, this, {delay:100});
+            }
+        }
+    },
+
+    // private
+    applyState : function(state, config){
+        if(state){
+            Ext.apply(this, state);
+        }
+    },
+
+    // private
+    getState : function(){
+        return null;
+    },
+
+    // private
+    saveState : function(){
+        if(Ext.state.Manager && this.stateful !== false){
+            var id = this.getStateId();
+            if(id){
+                var state = this.getState();
+                if(this.fireEvent('beforestatesave', this, state) !== false){
+                    Ext.state.Manager.set(id, state);
+                    this.fireEvent('statesave', this, state);
+                }
+            }
+        }
+    },
+
+    /**
+     * Apply this component to existing markup that is valid. With this function, no call to render() is required.
+     * @param {String/HTMLElement} el
+     */
+    applyToMarkup : function(el){
+        this.allowDomMove = false;
+        this.el = Ext.get(el);
+        this.render(this.el.dom.parentNode);
+    },
+
+    /**
+     * Adds a CSS class to the component's underlying element.
+     * @param {string} cls The CSS class name to add
+     * @return {Ext.Component} this
+     */
+    addClass : function(cls){
+        if(this.el){
+            this.el.addClass(cls);
+        }else{
+            this.cls = this.cls ? this.cls + ' ' + cls : cls;
+        }
+        return this;
+    },
+
+    /**
+     * Removes a CSS class from the component's underlying element.
+     * @param {string} cls The CSS class name to remove
+     * @return {Ext.Component} this
+     */
+    removeClass : function(cls){
+        if(this.el){
+            this.el.removeClass(cls);
+        }else if(this.cls){
+            this.cls = this.cls.split(' ').remove(cls).join(' ');
+        }
+        return this;
+    },
+
+    // private
+    // default function is not really useful
+    onRender : function(ct, position){
+        if(!this.el && this.autoEl){
+            if(Ext.isString(this.autoEl)){
+                this.el = document.createElement(this.autoEl);
+            }else{
+                var div = document.createElement('div');
+                Ext.DomHelper.overwrite(div, this.autoEl);
+                this.el = div.firstChild;
+            }
+            if (!this.el.id) {
+                this.el.id = this.getId();
+            }
+        }
+        if(this.el){
+            this.el = Ext.get(this.el);
+            if(this.allowDomMove !== false){
+                ct.dom.insertBefore(this.el.dom, position);
+            }
+        }
+    },
+
+    // private
+    getAutoCreate : function(){
+        var cfg = Ext.isObject(this.autoCreate) ?
+                      this.autoCreate : Ext.apply({}, this.defaultAutoCreate);
+        if(this.id && !cfg.id){
+            cfg.id = this.id;
+        }
+        return cfg;
+    },
+
+    // private
+    afterRender : Ext.emptyFn,
+
+    /**
+     * Destroys this component by purging any event listeners, removing the component's element from the DOM,
+     * removing the component from its {@link Ext.Container} (if applicable) and unregistering it from
+     * {@link Ext.ComponentMgr}.  Destruction is generally handled automatically by the framework and this method
+     * should usually not need to be called directly.
+     *
+     */
+    destroy : function(){
+        if(this.fireEvent('beforedestroy', this) !== false){
+            this.beforeDestroy();
+            if(this.rendered){
+                this.el.removeAllListeners();
+                this.el.remove();
+                if(this.actionMode == 'container' || this.removeMode == 'container'){
+                    this.container.remove();
+                }
+            }
+            this.onDestroy();
+            Ext.ComponentMgr.unregister(this);
+            this.fireEvent('destroy', this);
+            this.purgeListeners();
+        }
+    },
+
+    // private
+    beforeDestroy : Ext.emptyFn,
+
+    // private
+    onDestroy  : Ext.emptyFn,
+
+    /**
+     * <p>Returns the {@link Ext.Element} which encapsulates this Component.</p>
+     * <p>This will <i>usually</i> be a &lt;DIV> element created by the class's onRender method, but
+     * that may be overridden using the {@link #autoEl} config.</p>
+     * <br><p><b>Note</b>: this element will not be available until this Component has been rendered.</p><br>
+     * <p>To add listeners for <b>DOM events</b> to this Component (as opposed to listeners
+     * for this Component's own Observable events), see the {@link #listeners} config for a suggestion,
+     * or use a render listener directly:</p><pre><code>
+new Ext.Panel({
+    title: 'The Clickable Panel',
+    listeners: {
+        render: function(p) {
+            // Append the Panel to the click handler&#39;s argument list.
+            p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));
+        },
+        single: true  // Remove the listener after first invocation
+    }
+});
+</code></pre>
+     * @return {Ext.Element} The Element which encapsulates this Component.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the <code>id</code> of this component or automatically generates and
+     * returns an <code>id</code> if an <code>id</code> is not defined yet:<pre><code>
+     * 'ext-comp-' + (++Ext.Component.AUTO_ID)
+     * </code></pre>
+     * @return {String} id
+     */
+    getId : function(){
+        return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID));
+    },
+
+    /**
+     * Returns the <code>{@link #itemId}</code> of this component.  If an
+     * <code>{@link #itemId}</code> was not assigned through configuration the
+     * <code>id</code> is returned using <code>{@link #getId}</code>.
+     * @return {String}
+     */
+    getItemId : function(){
+        return this.itemId || this.getId();
+    },
+
+    /**
+     * Try to focus this component.
+     * @param {Boolean} selectText (optional) If applicable, true to also select the text in this component
+     * @param {Boolean/Number} delay (optional) Delay the focus this number of milliseconds (true for 10 milliseconds)
+     * @return {Ext.Component} this
+     */
+    focus : function(selectText, delay){
+        if(delay){
+            this.focus.defer(Ext.isNumber(delay) ? delay : 10, this, [selectText, false]);
+            return;
+        }
+        if(this.rendered){
+            this.el.focus();
+            if(selectText === true){
+                this.el.dom.select();
+            }
+        }
+        return this;
+    },
+
+    // private
+    blur : function(){
+        if(this.rendered){
+            this.el.blur();
+        }
+        return this;
+    },
+
+    /**
+     * Disable this component and fire the 'disable' event.
+     * @return {Ext.Component} this
+     */
+    disable : function(/* private */ silent){
+        if(this.rendered){
+            this.onDisable();
+        }
+        this.disabled = true;
+        if(silent !== true){
+            this.fireEvent('disable', this);
+        }
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        this.getActionEl().addClass(this.disabledClass);
+        this.el.dom.disabled = true;
+    },
+
+    /**
+     * Enable this component and fire the 'enable' event.
+     * @return {Ext.Component} this
+     */
+    enable : function(){
+        if(this.rendered){
+            this.onEnable();
+        }
+        this.disabled = false;
+        this.fireEvent('enable', this);
+        return this;
+    },
+
+    // private
+    onEnable : function(){
+        this.getActionEl().removeClass(this.disabledClass);
+        this.el.dom.disabled = false;
+    },
+
+    /**
+     * Convenience function for setting disabled/enabled by boolean.
+     * @param {Boolean} disabled
+     * @return {Ext.Component} this
+     */
+    setDisabled : function(disabled){
+        return this[disabled ? 'disable' : 'enable']();
+    },
+
+    /**
+     * Show this component.  Listen to the '{@link #beforeshow}' event and return
+     * <tt>false</tt> to cancel showing the component.  Fires the '{@link #show}'
+     * event after showing the component.
+     * @return {Ext.Component} this
+     */
+    show : function(){
+        if(this.fireEvent('beforeshow', this) !== false){
+            this.hidden = false;
+            if(this.autoRender){
+                this.render(Ext.isBoolean(this.autoRender) ? Ext.getBody() : this.autoRender);
+            }
+            if(this.rendered){
+                this.onShow();
+            }
+            this.fireEvent('show', this);
+        }
+        return this;
+    },
+
+    // private
+    onShow : function(){
+        this.getVisibiltyEl().removeClass('x-hide-' + this.hideMode);
+    },
+
+    /**
+     * Hide this component.  Listen to the '{@link #beforehide}' event and return
+     * <tt>false</tt> to cancel hiding the component.  Fires the '{@link #hide}'
+     * event after hiding the component. Note this method is called internally if
+     * the component is configured to be <code>{@link #hidden}</code>.
+     * @return {Ext.Component} this
+     */
+    hide : function(){
+        if(this.fireEvent('beforehide', this) !== false){
+            this.doHide();
+            this.fireEvent('hide', this);
+        }
+        return this;
+    },
+
+    // private
+    doHide: function(){
+        this.hidden = true;
+        if(this.rendered){
+            this.onHide();
+        }
+    },
+
+    // private
+    onHide : function(){
+        this.getVisibiltyEl().addClass('x-hide-' + this.hideMode);
+    },
+
+    // private
+    getVisibiltyEl : function(){
+        return this.hideParent ? this.container : this.getActionEl();
+    },
+
+    /**
+     * Convenience function to hide or show this component by boolean.
+     * @param {Boolean} visible True to show, false to hide
+     * @return {Ext.Component} this
+     */
+    setVisible : function(visible){
+        return this[visible ? 'show' : 'hide']();
+    },
+
+    /**
+     * Returns true if this component is visible.
+     * @return {Boolean} True if this component is visible, false otherwise.
+     */
+    isVisible : function(){
+        return this.rendered && this.getVisibiltyEl().isVisible();
+    },
+
+    /**
+     * Clone the current component using the original config values passed into this instance by default.
+     * @param {Object} overrides A new config containing any properties to override in the cloned version.
+     * An id property can be passed on this object, otherwise one will be generated to avoid duplicates.
+     * @return {Ext.Component} clone The cloned copy of this component
+     */
+    cloneConfig : function(overrides){
+        overrides = overrides || {};
+        var id = overrides.id || Ext.id();
+        var cfg = Ext.applyIf(overrides, this.initialConfig);
+        cfg.id = id; // prevent dup id
+        return new this.constructor(cfg);
+    },
+
+    /**
+     * Gets the xtype for this component as registered with {@link Ext.ComponentMgr}. For a list of all
+     * available xtypes, see the {@link Ext.Component} header. Example usage:
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXType());  // alerts 'textfield'
+</code></pre>
+     * @return {String} The xtype
+     */
+    getXType : function(){
+        return this.constructor.xtype;
+    },
+
+    /**
+     * <p>Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
+     * from the xtype (default) or whether it is directly of the xtype specified (shallow = true).</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>For a list of all available xtypes, see the {@link Ext.Component} header.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+var isText = t.isXType('textfield');        // true
+var isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
+</code></pre>
+     * @param {String} xtype The xtype to check for this Component
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Boolean} True if this component descends from the specified xtype, false otherwise.
+     */
+    isXType : function(xtype, shallow){
+        //assume a string by default
+        if (Ext.isFunction(xtype)){
+            xtype = xtype.xtype; //handle being passed the class, e.g. Ext.Component
+        }else if (Ext.isObject(xtype)){
+            xtype = xtype.constructor.xtype; //handle being passed an instance
+        }
+
+        return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype;
+    },
+
+    /**
+     * <p>Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all
+     * available xtypes, see the {@link Ext.Component} header.</p>
+     * <p><b>If using your own subclasses, be aware that a Component must register its own xtype
+     * to participate in determination of inherited xtypes.</b></p>
+     * <p>Example usage:</p>
+     * <pre><code>
+var t = new Ext.form.TextField();
+alert(t.getXTypes());  // alerts 'component/box/field/textfield'
+</code></pre>
+     * @return {String} The xtype hierarchy string
+     */
+    getXTypes : function(){
+        var tc = this.constructor;
+        if(!tc.xtypes){
+            var c = [], sc = this;
+            while(sc && sc.constructor.xtype){
+                c.unshift(sc.constructor.xtype);
+                sc = sc.constructor.superclass;
+            }
+            tc.xtypeChain = c;
+            tc.xtypes = c.join('/');
+        }
+        return tc.xtypes;
+    },
+
+    /**
+     * Find a container above this component at any level by a custom function. If the passed function returns
+     * true, the container will be returned.
+     * @param {Function} fn The custom function to call with the arguments (container, this component).
+     * @return {Ext.Container} The first Container for which the custom function returns true
+     */
+    findParentBy : function(fn) {
+        for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt);
+        return p || null;
+    },
+
+    /**
+     * Find a container above this component at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @return {Ext.Container} The first Container which matches the given xtype or class
+     */
+    findParentByType : function(xtype) {
+        return Ext.isFunction(xtype) ?
+            this.findParentBy(function(p){
+                return p.constructor === xtype;
+            }) :
+            this.findParentBy(function(p){
+                return p.constructor.xtype === xtype;
+            });
+    },
+
+    getDomPositionEl : function(){
+        return this.getPositionEl ? this.getPositionEl() : this.getEl();
+    },
+
+    // private
+    purgeListeners : function(){
+        Ext.Component.superclass.purgeListeners.call(this);
+        if(this.mons){
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+    },
+
+    // private
+    clearMons : function(){
+        Ext.each(this.mons, function(m){
+            m.item.un(m.ename, m.fn, m.scope);
+        }, this);
+        this.mons = [];
+    },
+
+    // internal function for auto removal of assigned event handlers on destruction
+    mon : function(item, ename, fn, scope, opt){
+        if(!this.mons){
+            this.mons = [];
+            this.on('beforedestroy', this.clearMons, this, {single: true});
+        }
+
+        if(Ext.isObject(ename)){
+        	var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
+
+            var o = ename;
+            for(var e in o){
+                if(propRe.test(e)){
+                    continue;
+                }
+                if(Ext.isFunction(o[e])){
+                    // shared options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e], o.scope, o);
+                }else{
+                    // individual options
+			        this.mons.push({
+			            item: item, ename: e, fn: o[e], scope: o.scope
+			        });
+			        item.on(e, o[e]);
+                }
+            }
+            return;
+        }
+
+
+        this.mons.push({
+            item: item, ename: ename, fn: fn, scope: scope
+        });
+        item.on(ename, fn, scope, opt);
+    },
+
+    // protected, opposite of mon
+    mun : function(item, ename, fn, scope){
+        var found, mon;
+        for(var i = 0, len = this.mons.length; i < len; ++i){
+            mon = this.mons[i];
+            if(item === mon.item && ename == mon.ename && fn === mon.fn && scope === mon.scope){
+                this.mons.splice(i, 1);
+                item.un(ename, fn, scope);
+                found = true;
+                break;
+            }
+        }
+        return found;
+    },
+
+    /**
+     * Returns the next component in the owning container
+     * @return Ext.Component
+     */
+    nextSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index != -1 && index+1 < this.ownerCt.items.getCount()){
+                return this.ownerCt.items.itemAt(index+1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Returns the previous component in the owning container
+     * @return Ext.Component
+     */
+    previousSibling : function(){
+        if(this.ownerCt){
+            var index = this.ownerCt.items.indexOf(this);
+            if(index > 0){
+                return this.ownerCt.items.itemAt(index-1);
+            }
+        }
+        return null;
+    },
+
+    /**
+     * Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy.
+     * @return {Ext.Container} the Container which owns this Component.
+     */
+    getBubbleTarget : function(){
+        return this.ownerCt;
+    }
+});
+
+Ext.reg('component', Ext.Component);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ComponentMgr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ComponentMgr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ComponentMgr.js	(revision 625)
@@ -0,0 +1,159 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ComponentMgr
+ * <p>Provides a registry of all Components (instances of {@link Ext.Component} or any subclass
+ * thereof) on a page so that they can be easily accessed by {@link Ext.Component component}
+ * {@link Ext.Component#id id} (see {@link #get}, or the convenience method {@link Ext#getCmp Ext.getCmp}).</p>
+ * <p>This object also provides a registry of available Component <i>classes</i>
+ * indexed by a mnemonic code known as the Component's {@link Ext.Component#xtype xtype}.
+ * The <tt>{@link Ext.Component#xtype xtype}</tt> provides a way to avoid instantiating child Components
+ * when creating a full, nested config object for a complete Ext page.</p>
+ * <p>A child Component may be specified simply as a <i>config object</i>
+ * as long as the correct <tt>{@link Ext.Component#xtype xtype}</tt> is specified so that if and when the Component
+ * needs rendering, the correct type can be looked up for lazy instantiation.</p>
+ * <p>For a list of all available <tt>{@link Ext.Component#xtype xtypes}</tt>, see {@link Ext.Component}.</p>
+ * @singleton
+ */
+Ext.ComponentMgr = function(){
+    var all = new Ext.util.MixedCollection();
+    var types = {};
+    var ptypes = {};
+
+    return {
+        /**
+         * Registers a component.
+         * @param {Ext.Component} c The component
+         */
+        register : function(c){
+            all.add(c);
+        },
+
+        /**
+         * Unregisters a component.
+         * @param {Ext.Component} c The component
+         */
+        unregister : function(c){
+            all.remove(c);
+        },
+
+        /**
+         * Returns a component by {@link Ext.Component#id id}.
+         * For additional details see {@link Ext.util.MixedCollection#get}.
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @return Ext.Component The Component, <tt>undefined</tt> if not found, or <tt>null</tt> if a
+         * Class was found.
+         */
+        get : function(id){
+            return all.get(id);
+        },
+
+        /**
+         * Registers a function that will be called when a specified component is added to ComponentMgr
+         * @param {String} id The component {@link Ext.Component#id id}
+         * @param {Function} fn The callback function
+         * @param {Object} scope The scope of the callback
+         */
+        onAvailable : function(id, fn, scope){
+            all.on("add", function(index, o){
+                if(o.id == id){
+                    fn.call(scope || o, o);
+                    all.un("add", fn, scope);
+                }
+            });
+        },
+
+        /**
+         * The MixedCollection used internally for the component cache. An example usage may be subscribing to
+         * events on the MixedCollection to monitor addition or removal.  Read-only.
+         * @type {MixedCollection}
+         */
+        all : all,
+        
+        /**
+         * Checks if a Component type is registered.
+         * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up
+         * @return {Boolean} Whether the type is registered.
+         */
+        isRegistered : function(xtype){
+            return types[xtype] !== undefined;    
+        },
+
+        /**
+         * <p>Registers a new Component constructor, keyed by a new
+         * {@link Ext.Component#xtype}.</p>
+         * <p>Use this method (or its alias {@link Ext#reg Ext.reg}) to register new
+         * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying
+         * child Components.
+         * see {@link Ext.Container#items}</p>
+         * @param {String} xtype The mnemonic string by which the Component class may be looked up.
+         * @param {Constructor} cls The new Component class.
+         */
+        registerType : function(xtype, cls){
+            types[xtype] = cls;
+            cls.xtype = xtype;
+        },
+
+        /**
+         * Creates a new Component from the specified config object using the
+         * config object's {@link Ext.component#xtype xtype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Component you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Component type if
+         * the config object does not contain a <tt>xtype</tt>. (Optional if the config contains a <tt>xtype</tt>).
+         * @return {Ext.Component} The newly instantiated Component.
+         */
+        create : function(config, defaultType){
+            return config.render ? config : new types[config.xtype || defaultType](config);
+        },
+
+        /**
+         * <p>Registers a new Plugin constructor, keyed by a new
+         * {@link Ext.Component#ptype}.</p>
+         * <p>Use this method (or its alias {@link Ext#preg Ext.preg}) to register new
+         * plugins for {@link Ext.Component}s so that lazy instantiation may be used when specifying
+         * Plugins.</p>
+         * @param {String} ptype The mnemonic string by which the Plugin class may be looked up.
+         * @param {Constructor} cls The new Plugin class.
+         */
+        registerPlugin : function(ptype, cls){
+            ptypes[ptype] = cls;
+            cls.ptype = ptype;
+        },
+
+        /**
+         * Creates a new Plugin from the specified config object using the
+         * config object's {@link Ext.component#ptype ptype} to determine the class to instantiate.
+         * @param {Object} config A configuration object for the Plugin you wish to create.
+         * @param {Constructor} defaultType The constructor to provide the default Plugin type if
+         * the config object does not contain a <tt>ptype</tt>. (Optional if the config contains a <tt>ptype</tt>).
+         * @return {Ext.Component} The newly instantiated Plugin.
+         */
+        createPlugin : function(config, defaultType){
+            return new ptypes[config.ptype || defaultType](config);
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerType}
+ * @param {String} xtype The {@link Ext.component#xtype mnemonic string} by which the Component class
+ * may be looked up.
+ * @param {Constructor} cls The new Component class.
+ * @member Ext
+ * @method reg
+ */
+Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down
+/**
+ * Shorthand for {@link Ext.ComponentMgr#registerPlugin}
+ * @param {String} ptype The {@link Ext.component#ptype mnemonic string} by which the Plugin class
+ * may be looked up.
+ * @param {Constructor} cls The new Plugin class.
+ * @member Ext
+ * @method preg
+ */
+Ext.preg = Ext.ComponentMgr.registerPlugin;
+Ext.create = Ext.ComponentMgr.create;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Container.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Container.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Container.js	(revision 625)
@@ -0,0 +1,894 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Container
+ * @extends Ext.BoxComponent
+ * <p>Base class for any {@link Ext.BoxComponent} that may contain other Components. Containers handle the
+ * basic behavior of containing items, namely adding, inserting and removing items.</p>
+ *
+ * <p>The most commonly used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}.
+ * If you do not need the capabilities offered by the aforementioned classes you can create a lightweight
+ * Container to be encapsulated by an HTML element to your specifications by using the
+ * <tt><b>{@link Ext.Component#autoEl autoEl}</b></tt> config option. This is a useful technique when creating
+ * embedded {@link Ext.layout.ColumnLayout column} layouts inside {@link Ext.form.FormPanel FormPanels}
+ * for example.</p>
+ *
+ * <p>The code below illustrates both how to explicitly create a Container, and how to implicitly
+ * create one using the <b><tt>'container'</tt></b> xtype:<pre><code>
+// explicitly create a Container
+var embeddedColumns = new Ext.Container({
+    autoEl: 'div',  // This is the default
+    layout: 'column',
+    defaults: {
+        // implicitly create Container by specifying xtype
+        xtype: 'container',
+        autoEl: 'div', // This is the default.
+        layout: 'form',
+        columnWidth: 0.5,
+        style: {
+            padding: '10px'
+        }
+    },
+//  The two items below will be Ext.Containers, each encapsulated by a &lt;DIV> element.
+    items: [{
+        items: {
+            xtype: 'datefield',
+            name: 'startDate',
+            fieldLabel: 'Start date'
+        }
+    }, {
+        items: {
+            xtype: 'datefield',
+            name: 'endDate',
+            fieldLabel: 'End date'
+        }
+    }]
+});</code></pre></p>
+ *
+ * <p><u><b>Layout</b></u></p>
+ * <p>Container classes delegate the rendering of child Components to a layout
+ * manager class which must be configured into the Container using the
+ * <code><b>{@link #layout}</b></code> configuration property.</p>
+ * <p>When either specifying child <code>{@link #items}</code> of a Container,
+ * or dynamically {@link #add adding} Components to a Container, remember to
+ * consider how you wish the Container to arrange those child elements, and
+ * whether those child elements need to be sized using one of Ext's built-in
+ * <b><code>{@link #layout}</code></b> schemes. By default, Containers use the
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme which only
+ * renders child components, appending them one after the other inside the
+ * Container, and <b>does not apply any sizing</b> at all.</p>
+ * <p>A common mistake is when a developer neglects to specify a
+ * <b><code>{@link #layout}</code></b> (e.g. widgets like GridPanels or
+ * TreePanels are added to Containers for which no <tt><b>{@link #layout}</b></tt>
+ * has been specified). If a Container is left to use the default
+ * {@link Ext.layout.ContainerLayout ContainerLayout} scheme, none of its
+ * child components will be resized, or changed in any way when the Container
+ * is resized.</p>
+ * <p>Certain layout managers allow dynamic addition of child components.
+ * Those that do include {@link Ext.layout.CardLayout},
+ * {@link Ext.layout.AnchorLayout}, {@link Ext.layout.FormLayout}, and
+ * {@link Ext.layout.TableLayout}. For example:<pre><code>
+//  Create the GridPanel.
+var myNewGrid = new Ext.grid.GridPanel({
+    store: myStore,
+    columns: myColumnModel,
+    title: 'Results', // the title becomes the title of the tab
+});
+
+myTabPanel.add(myNewGrid); // {@link Ext.TabPanel} implicitly uses {@link Ext.layout.CardLayout CardLayout}
+myTabPanel.{@link Ext.TabPanel#setActiveTab setActiveTab}(myNewGrid);
+ * </code></pre></p>
+ * <p>The example above adds a newly created GridPanel to a TabPanel. Note that
+ * a TabPanel uses {@link Ext.layout.CardLayout} as its layout manager which
+ * means all its child items are sized to {@link Ext.layout.FitLayout fit}
+ * exactly into its client area.
+ * <p><b><u>Overnesting is a common problem</u></b>.
+ * An example of overnesting occurs when a GridPanel is added to a TabPanel
+ * by wrapping the GridPanel <i>inside</i> a wrapping Panel (that has no
+ * <tt><b>{@link #layout}</b></tt> specified) and then add that wrapping Panel
+ * to the TabPanel. The point to realize is that a GridPanel <b>is</b> a
+ * Component which can be added directly to a Container. If the wrapping Panel
+ * has no <tt><b>{@link #layout}</b></tt> configuration, then the overnested
+ * GridPanel will not be sized as expected.<p>
+</code></pre>
+ *
+ * <p><u><b>Adding via remote configuration</b></u></p>
+ *
+ * <p>A server side script can be used to add Components which are generated dynamically on the server.
+ * An example of adding a GridPanel to a TabPanel where the GridPanel is generated by the server
+ * based on certain parameters:
+ * </p><pre><code>
+// execute an Ajax request to invoke server side script:
+Ext.Ajax.request({
+    url: 'gen-invoice-grid.php',
+    // send additional parameters to instruct server script
+    params: {
+        startDate: Ext.getCmp('start-date').getValue(),
+        endDate: Ext.getCmp('end-date').getValue()
+    },
+    // process the response object to add it to the TabPanel:
+    success: function(xhr) {
+        var newComponent = eval(xhr.responseText); // see discussion below
+        myTabPanel.add(newComponent); // add the component to the TabPanel
+        myTabPanel.setActiveTab(newComponent);
+    },
+    failure: function() {
+        Ext.Msg.alert("Grid create failed", "Server communication failure");
+    }
+});
+</code></pre>
+ * <p>The server script needs to return an executable Javascript statement which, when processed
+ * using <tt>eval()</tt>, will return either a config object with an {@link Ext.Component#xtype xtype},
+ * or an instantiated Component. The server might return this for example:</p><pre><code>
+(function() {
+    function formatDate(value){
+        return value ? value.dateFormat('M d, Y') : '';
+    };
+
+    var store = new Ext.data.Store({
+        url: 'get-invoice-data.php',
+        baseParams: {
+            startDate: '01/01/2008',
+            endDate: '01/31/2008'
+        },
+        reader: new Ext.data.JsonReader({
+            record: 'transaction',
+            idProperty: 'id',
+            totalRecords: 'total'
+        }, [
+           'customer',
+           'invNo',
+           {name: 'date', type: 'date', dateFormat: 'm/d/Y'},
+           {name: 'value', type: 'float'}
+        ])
+    });
+
+    var grid = new Ext.grid.GridPanel({
+        title: 'Invoice Report',
+        bbar: new Ext.PagingToolbar(store),
+        store: store,
+        columns: [
+            {header: "Customer", width: 250, dataIndex: 'customer', sortable: true},
+            {header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},
+            {header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},
+            {header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}
+        ],
+    });
+    store.load();
+    return grid;  // return instantiated component
+})();
+</code></pre>
+ * <p>When the above code fragment is passed through the <tt>eval</tt> function in the success handler
+ * of the Ajax request, the code is executed by the Javascript processor, and the anonymous function
+ * runs, and returns the instantiated grid component.</p>
+ * <p>Note: since the code above is <i>generated</i> by a server script, the <tt>baseParams</tt> for
+ * the Store, the metadata to allow generation of the Record layout, and the ColumnModel
+ * can all be generated into the code since these are all known on the server.</p>
+ *
+ * @xtype container
+ */
+Ext.Container = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {Boolean} monitorResize
+     * True to automatically monitor window resize events to handle anything that is sensitive to the current size
+     * of the viewport.  This value is typically managed by the chosen <code>{@link #layout}</code> and should not need
+     * to be set manually.
+     */
+    /**
+     * @cfg {String/Object} layout
+     * When creating complex UIs, it is important to remember that sizing and
+     * positioning of child items is the responsibility of the Container's
+     * layout manager. If you expect child items to be sized in response to
+     * user interactions, <b>you must specify a layout manager</b> which
+     * creates and manages the type of layout you have in mind.  For example:<pre><code>
+new Ext.Window({
+    width:300, height: 300,
+    layout: 'fit', // explicitly set layout manager: override the default (layout:'auto')
+    items: [{
+        title: 'Panel inside a Window'
+    }]
+}).show();
+     * </code></pre>
+     * <p>Omitting the {@link #layout} config means that the
+     * {@link Ext.layout.ContainerLayout default layout manager} will be used which does
+     * nothing but render child components sequentially into the Container (no sizing or
+     * positioning will be performed in this situation).</p>
+     * <p>The layout manager class for this container may be specified as either as an
+     * Object or as a String:</p>
+     * <div><ul class="mdetail-params">
+     *
+     * <li><u>Specify as an Object</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: {
+    type: 'vbox',
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     *
+     * <li><tt><b>type</b></tt></li>
+     * <br/><p>The layout type to be used for this container.  If not specified,
+     * a default {@link Ext.layout.ContainerLayout} will be created and used.</p>
+     * <br/><p>Valid layout <tt>type</tt> values are:</p>
+     * <div class="sub-desc"><ul class="mdetail-params">
+     * <li><tt><b>{@link Ext.layout.AbsoluteLayout absolute}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AccordionLayout accordion}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.AnchorLayout anchor}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ContainerLayout auto}</b></tt> &nbsp;&nbsp;&nbsp; <b>Default</b></li>
+     * <li><tt><b>{@link Ext.layout.BorderLayout border}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.CardLayout card}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ColumnLayout column}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FitLayout fit}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.FormLayout form}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.HBoxLayout hbox}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.MenuLayout menu}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.TableLayout table}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.ToolbarLayout toolbar}</b></tt></li>
+     * <li><tt><b>{@link Ext.layout.VBoxLayout vbox}</b></tt></li>
+     * </ul></div>
+     *
+     * <li>Layout specific configuration properties</li>
+     * <br/><p>Additional layout specific configuration properties may also be
+     * specified. For complete details regarding the valid config options for
+     * each layout type, see the layout class corresponding to the <tt>type</tt>
+     * specified.</p>
+     *
+     * </ul></div>
+     *
+     * <li><u>Specify as a String</u></li>
+     * <div><ul class="mdetail-params">
+     * <li>Example usage:</li>
+<pre><code>
+layout: 'vbox',
+layoutConfig: {
+    padding: '5',
+    align: 'left'
+}
+</code></pre>
+     * <li><tt><b>layout</b></tt></li>
+     * <br/><p>The layout <tt>type</tt> to be used for this container (see list
+     * of valid layout type values above).</p><br/>
+     * <li><tt><b>{@link #layoutConfig}</b></tt></li>
+     * <br/><p>Additional layout specific configuration properties. For complete
+     * details regarding the valid config options for each layout type, see the
+     * layout class corresponding to the <tt>layout</tt> specified.</p>
+     * </ul></div></ul></div>
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * This is a config object containing properties specific to the chosen
+     * <b><code>{@link #layout}</code></b> if <b><code>{@link #layout}</code></b>
+     * has been specified as a <i>string</i>.</p>
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer
+     * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers
+     * with a large quantity of sub-components for which frequent layout calls would be expensive.
+     */
+    bufferResize: 100,
+    
+    /**
+     * @cfg {String/Number} activeItem
+     * A string component id or the numeric index of the component that should be initially activated within the
+     * container's layout on render.  For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first
+     * item in the container's collection).  activeItem only applies to layout styles that can display
+     * items one at a time (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout} and
+     * {@link Ext.layout.FitLayout}).  Related to {@link Ext.layout.ContainerLayout#activeItem}.
+     */
+    /**
+     * @cfg {Object/Array} items
+     * <pre><b>** IMPORTANT</b>: be sure to specify a <b><code>{@link #layout}</code> ! **</b></pre>
+     * <p>A single item, or an array of child Components to be added to this container,
+     * for example:</p>
+     * <pre><code>
+// specifying a single item
+items: {...},
+layout: 'fit',    // specify a layout!
+
+// specifying multiple items
+items: [{...}, {...}],
+layout: 'anchor', // specify a layout!
+     * </code></pre>
+     * <p>Each item may be:</p>
+     * <div><ul class="mdetail-params">
+     * <li>any type of object based on {@link Ext.Component}</li>
+     * <li>a fully instanciated object or</li>
+     * <li>an object literal that:</li>
+     * <div><ul class="mdetail-params">
+     * <li>has a specified <code>{@link Ext.Component#xtype xtype}</code></li>
+     * <li>the {@link Ext.Component#xtype} specified is associated with the Component
+     * desired and should be chosen from one of the available xtypes as listed
+     * in {@link Ext.Component}.</li>
+     * <li>If an <code>{@link Ext.Component#xtype xtype}</code> is not explicitly
+     * specified, the {@link #defaultType} for that Container is used.</li>
+     * <li>will be "lazily instanciated", avoiding the overhead of constructing a fully
+     * instanciated Component object</li>
+     * </ul></div></ul></div>
+     * <p><b>Notes</b>:</p>
+     * <div><ul class="mdetail-params">
+     * <li>Ext uses lazy rendering. Child Components will only be rendered
+     * should it become necessary. Items are automatically laid out when they are first
+     * shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.</li>
+     * <li>Do not specify <code>{@link Ext.Panel#contentEl contentEl}</code>/
+     * <code>{@link Ext.Panel#html html}</code> with <code>items</code>.</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} defaults
+     * <p>A config object that will be applied to all components added to this container either via the {@link #items}
+     * config or via the {@link #add} or {@link #insert} methods.  The <tt>defaults</tt> config can contain any
+     * number of name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the container.  For example, to automatically apply padding to the body of each of a set of
+     * contained {@link Ext.Panel} items, you could pass: <tt>defaults: {bodyStyle:'padding:15px'}</tt>.</p><br/>
+     * <p><b>Note</b>: <tt>defaults</tt> will not be applied to config objects if the option is already specified.
+     * For example:</p><pre><code>
+defaults: {               // defaults are applied to items, not the container
+    autoScroll:true
+},
+items: [
+    {
+        xtype: 'panel',   // defaults <b>do not</b> have precedence over
+        id: 'panel1',     // options in config objects, so the defaults
+        autoScroll: false // will not be applied here, panel1 will be autoScroll:false
+    },
+    new Ext.Panel({       // defaults <b>do</b> have precedence over options
+        id: 'panel2',     // options in components, so the defaults
+        autoScroll: false // will be applied here, panel2 will be autoScroll:true.
+    })
+]
+     * </code></pre>
+     */
+
+
+    /** @cfg {Boolean} autoDestroy
+     * If true the container will automatically destroy any contained component that is removed from it, else
+     * destruction must be handled manually (defaults to true).
+     */
+    autoDestroy : true,
+
+    /** @cfg {Boolean} forceLayout
+     * If true the container will force a layout initially even if hidden or collapsed. This option
+     * is useful for forcing forms to render in collapsed or hidden containers. (defaults to false).
+     */
+    forceLayout: false,
+
+    /** @cfg {Boolean} hideBorders
+     * True to hide the borders of each contained component, false to defer to the component's existing
+     * border settings (defaults to false).
+     */
+    /** @cfg {String} defaultType
+     * <p>The default {@link Ext.Component xtype} of child Components to create in this Container when
+     * a child item is specified as a raw configuration object, rather than as an instantiated Component.</p>
+     * <p>Defaults to <tt>'panel'</tt>, except {@link Ext.menu.Menu} which defaults to <tt>'menuitem'</tt>,
+     * and {@link Ext.Toolbar} and {@link Ext.ButtonGroup} which default to <tt>'button'</tt>.</p>
+     */
+    defaultType : 'panel',
+
+    // private
+    initComponent : function(){
+        Ext.Container.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event afterlayout
+             * Fires when the components in this container are arranged by the associated layout manager.
+             * @param {Ext.Container} this
+             * @param {ContainerLayout} layout The ContainerLayout implementation for this container
+             */
+            'afterlayout',
+            /**
+             * @event beforeadd
+             * Fires before any {@link Ext.Component} is added or inserted into the container.
+             * A handler can return false to cancel the add.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being added
+             * @param {Number} index The index at which the component will be added to the container's items collection
+             */
+            'beforeadd',
+            /**
+             * @event beforeremove
+             * Fires before any {@link Ext.Component} is removed from the container.  A handler can return
+             * false to cancel the remove.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component being removed
+             */
+            'beforeremove',
+            /**
+             * @event add
+             * @bubbles
+             * Fires after any {@link Ext.Component} is added or inserted into the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was added
+             * @param {Number} index The index at which the component was added to the container's items collection
+             */
+            'add',
+            /**
+             * @event remove
+             * @bubbles
+             * Fires after any {@link Ext.Component} is removed from the container.
+             * @param {Ext.Container} this
+             * @param {Ext.Component} component The component that was removed
+             */
+            'remove'
+        );
+
+		this.enableBubble('add', 'remove');
+
+        /**
+         * The collection of components in this container as a {@link Ext.util.MixedCollection}
+         * @type MixedCollection
+         * @property items
+         */
+        var items = this.items;
+        if(items){
+            delete this.items;
+            if(Ext.isArray(items) && items.length > 0){
+                this.add.apply(this, items);
+            }else{
+                this.add(items);
+            }
+        }
+    },
+
+    // private
+    initItems : function(){
+        if(!this.items){
+            this.items = new Ext.util.MixedCollection(false, this.getComponentId);
+            this.getLayout(); // initialize the layout
+        }
+    },
+
+    // private
+    setLayout : function(layout){
+        if(this.layout && this.layout != layout){
+            this.layout.setContainer(null);
+        }
+        this.initItems();
+        this.layout = layout;
+        layout.setContainer(this);
+    },
+
+    // private
+    render : function(){
+        Ext.Container.superclass.render.apply(this, arguments);
+        if(this.layout){
+            if(Ext.isObject(this.layout) && !this.layout.layout){
+                this.layoutConfig = this.layout;
+                this.layout = this.layoutConfig.type;
+            }
+            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 item = this.activeItem;
+                delete this.activeItem;
+                this.layout.setActiveItem(item);
+            }
+        }
+        if(!this.ownerCt){
+            // force a layout if no ownerCt is set
+            this.doLayout(false, true);
+        }
+        if(this.monitorResize === true){
+            Ext.EventManager.onWindowResize(this.doLayout, this, [false]);
+        }
+    },
+
+    /**
+     * <p>Returns the Element to be used to contain the child Components of this Container.</p>
+     * <p>An implementation is provided which returns the Container's {@link #getEl Element}, but
+     * if there is a more complex structure to a Container, this may be overridden to return
+     * the element into which the {@link #layout layout} renders child Components.</p>
+     * @return {Ext.Element} The Element to render child Components into.
+     */
+    getLayoutTarget : function(){
+        return this.el;
+    },
+
+    // private - used as the key lookup function for the items collection
+    getComponentId : function(comp){
+        return comp.getItemId();
+    },
+
+    /**
+     * <p>Adds {@link Ext.Component Component}(s) to this Container.</p>
+     * <br><p><b>Description</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>Fires the {@link #beforeadd} event before adding</li>
+     * <li>The Container's {@link #defaults default config values} will be applied
+     * accordingly (see <code>{@link #defaults}</code> for details).</li>
+     * <li>Fires the {@link #add} event after the component has been added.</li>
+     * </ul></div>
+     * <br><p><b>Notes</b></u> :
+     * <div><ul class="mdetail-params">
+     * <li>If the Container is <i>already rendered</i> when <tt>add</tt>
+     * is called, you may need to call {@link #doLayout} to refresh the view which causes
+     * any unrendered child Components to be rendered. This is required so that you can
+     * <tt>add</tt> multiple child components if needed while only refreshing the layout
+     * once. For example:<pre><code>
+var tb = new {@link Ext.Toolbar}();
+tb.render(document.body);  // toolbar is rendered
+tb.add({text:'Button 1'}); // add multiple items ({@link #defaultType} for {@link Ext.Toolbar Toolbar} is 'button')
+tb.add({text:'Button 2'});
+tb.{@link #doLayout}();             // refresh the layout
+     * </code></pre></li>
+     * <li><i>Warning:</i> Containers directly managed by the BorderLayout layout manager
+     * may not be removed or added.  See the Notes for {@link Ext.layout.BorderLayout BorderLayout}
+     * for more details.</li>
+     * </ul></div>
+     * @param {Object/Array} component
+     * <p>Either a single component or an Array of components to add.  See
+     * <code>{@link #items}</code> for additional information.</p>
+     * @param {Object} (Optional) component_2
+     * @param {Object} (Optional) component_n
+     * @return {Ext.Component} component The Component (or config object) that was added.
+     */
+    add : function(comp){
+        this.initItems();
+        var args = arguments.length > 1;
+        if(args || Ext.isArray(comp)){
+            Ext.each(args ? arguments : comp, function(c){
+                this.add(c);
+            }, this);
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+        var pos = this.items.length;
+        if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){
+            this.items.add(c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, pos);
+        }
+        return c;
+    },
+
+    /**
+     * Inserts a Component into this Container at a specified index. Fires the
+     * {@link #beforeadd} event before inserting, then fires the {@link #add} event after the
+     * Component has been inserted.
+     * @param {Number} index The index at which the Component will be inserted
+     * into the Container's items collection
+     * @param {Ext.Component} component The child Component to insert.<br><br>
+     * Ext uses lazy rendering, and will only render the inserted Component should
+     * it become necessary.<br><br>
+     * A Component config object may be passed in order to avoid the overhead of
+     * constructing a real Component object if lazy rendering might mean that the
+     * inserted Component will not be rendered immediately. To take advantage of
+     * this 'lazy instantiation', set the {@link Ext.Component#xtype} config
+     * property to the registered type of the Component wanted.<br><br>
+     * For a list of all available xtypes, see {@link Ext.Component}.
+     * @return {Ext.Component} component The Component (or config object) that was
+     * inserted with the Container's default config values applied.
+     */
+    insert : function(index, comp){
+        this.initItems();
+        var a = arguments, len = a.length;
+        if(len > 2){
+            for(var i = len-1; i >= 1; --i) {
+                this.insert(index, a[i]);
+            }
+            return;
+        }
+        var c = this.lookupComponent(this.applyDefaults(comp));
+
+        if(c.ownerCt == this && this.items.indexOf(c) < index){
+            --index;
+        }
+
+        if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){
+            this.items.insert(index, c);
+            c.ownerCt = this;
+            this.fireEvent('add', this, c, index);
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(this.defaults){
+            if(typeof c == 'string'){
+                c = Ext.ComponentMgr.get(c);
+                Ext.apply(c, this.defaults);
+            }else if(!c.events){
+                Ext.applyIf(c, this.defaults);
+            }else{
+                Ext.apply(c, this.defaults);
+            }
+        }
+        return c;
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        if(item.ownerCt){
+            item.ownerCt.remove(item, false);
+        }
+        if(this.hideBorders === true){
+            item.border = (item.border === true);
+        }
+    },
+
+    /**
+     * Removes a component from this container.  Fires the {@link #beforeremove} event before removing, then fires
+     * the {@link #remove} event after the component has been removed.
+     * @param {Component/String} component The component reference or id to remove.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Ext.Component} component The Component that was removed.
+     */
+    remove : function(comp, autoDestroy){
+        this.initItems();
+        var c = this.getComponent(comp);
+        if(c && this.fireEvent('beforeremove', this, c) !== false){
+            this.items.remove(c);
+            delete c.ownerCt;
+            if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){
+                c.destroy();
+            }
+            if(this.layout && this.layout.activeItem == c){
+                delete this.layout.activeItem;
+            }
+            this.fireEvent('remove', this, c);
+        }
+        return c;
+    },
+
+    /**
+     * Removes all components from this container.
+     * @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
+     * Defaults to the value of this Container's {@link #autoDestroy} config.
+     * @return {Array} Array of the destroyed components
+     */
+    removeAll: function(autoDestroy){
+        this.initItems();
+        var item, rem = [], items = [];
+        this.items.each(function(i){
+            rem.push(i);
+        });
+        for (var i = 0, len = rem.length; i < len; ++i){
+            item = rem[i];
+            this.remove(item, autoDestroy);
+            if(item.ownerCt !== this){
+                items.push(item);
+            }
+        }
+        return items;
+    },
+
+    /**
+     * Examines this container's <code>{@link #items}</code> <b>property</b>
+     * and gets a direct child component of this container.
+     * @param {String/Number} comp This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link #items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     * @return Ext.Component The component (if found).
+     */
+    getComponent : function(comp){
+        if(Ext.isObject(comp)){
+            return comp;
+        }
+        return this.items.get(comp);
+    },
+
+    // private
+    lookupComponent : function(comp){
+        if(typeof comp == 'string'){
+            return Ext.ComponentMgr.get(comp);
+        }else if(!comp.events){
+            return this.createComponent(comp);
+        }
+        return comp;
+    },
+
+    // private
+    createComponent : function(config){
+        return Ext.create(config, this.defaultType);
+    },
+
+    /**
+     * Force this container's layout to be recalculated. A call to this function is required after adding a new component
+     * to an already rendered container, or possibly after changing sizing/position properties of child components.
+     * @param {Boolean} shallow (optional) True to only calc the layout of this component, and let child components auto
+     * calc layouts as required (defaults to false, which calls doLayout recursively for each subcontainer)
+     * @param {Boolean} force (optional) True to force a layout to occur, even if the item is hidden.
+     * @return {Ext.Container} this
+     */
+    doLayout: function(shallow, force){
+        var rendered = this.rendered,
+            forceLayout = this.forceLayout;
+
+        if(!this.isVisible() || this.collapsed){
+            this.deferLayout = this.deferLayout || !shallow;
+            if(!(force || forceLayout)){
+                return;
+            }
+            shallow = shallow && !this.deferLayout;
+        } else {
+            delete this.deferLayout;
+        }
+        if(rendered && this.layout){
+            this.layout.layout();
+        }
+        if(shallow !== true && this.items){
+            var cs = this.items.items;
+            for(var i = 0, len = cs.length; i < len; i++){
+                var c = cs[i];
+                if(c.doLayout){
+                    c.forceLayout = forceLayout;
+                    c.doLayout();
+                }
+            }
+        }
+        if(rendered){
+            this.onLayout(shallow, force);
+        }
+        delete this.forceLayout;
+    },
+
+    //private
+    onLayout : Ext.emptyFn,
+
+    onShow : function(){
+        Ext.Container.superclass.onShow.call(this);
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+    },
+
+    /**
+     * Returns the layout currently in use by the container.  If the container does not currently have a layout
+     * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout.
+     * @return {ContainerLayout} layout The container's layout
+     */
+    getLayout : function(){
+        if(!this.layout){
+            var layout = new Ext.layout.ContainerLayout(this.layoutConfig);
+            this.setLayout(layout);
+        }
+        return this.layout;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.items){
+            Ext.destroy.apply(Ext, this.items.items);
+        }
+        if(this.monitorResize){
+            Ext.EventManager.removeResizeListener(this.doLayout, this);
+        }
+        Ext.destroy(this.layout);
+        Ext.Container.superclass.beforeDestroy.call(this);
+    },
+
+    /**
+     * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the bubble is stopped.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current node)
+     * @param {Array} args (optional) The args to call the function with (default to passing the current component)
+     * @return {Ext.Container} this
+     */
+    bubble : function(fn, scope, args){
+        var p = this;
+        while(p){
+            if(fn.apply(scope || p, args || [p]) === false){
+                break;
+            }
+            p = p.ownerCt;
+        }
+        return this;
+    },
+
+    /**
+     * Cascades down the component/container heirarchy from this component (called first), calling the specified function with
+     * each component. The scope (<i>this</i>) of
+     * function call will be the scope provided or the current component. The arguments to the function
+     * will be the args provided or the current component. If the function returns false at any point,
+     * the cascade is stopped on that branch.
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional) The scope of the function (defaults to current component)
+     * @param {Array} args (optional) The args to call the function with (defaults to passing the current component)
+     * @return {Ext.Container} this
+     */
+    cascade : function(fn, scope, args){
+        if(fn.apply(scope || this, args || [this]) !== false){
+            if(this.items){
+                var cs = this.items.items;
+                for(var i = 0, len = cs.length; i < len; i++){
+                    if(cs[i].cascade){
+                        cs[i].cascade(fn, scope, args);
+                    }else{
+                        fn.apply(scope || cs[i], args || [cs[i]]);
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Find a component under this container at any level by id
+     * @param {String} id
+     * @return Ext.Component
+     */
+    findById : function(id){
+        var m, ct = this;
+        this.cascade(function(c){
+            if(ct != c && c.id === id){
+                m = c;
+                return false;
+            }
+        });
+        return m || null;
+    },
+
+    /**
+     * Find a component under this container at any level by xtype or class
+     * @param {String/Class} xtype The xtype string for a component, or the class of the component directly
+     * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is
+     * the default), or true to check whether this Component is directly of the specified xtype.
+     * @return {Array} Array of Ext.Components
+     */
+    findByType : function(xtype, shallow){
+        return this.findBy(function(c){
+            return c.isXType(xtype, shallow);
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by property
+     * @param {String} prop
+     * @param {String} value
+     * @return {Array} Array of Ext.Components
+     */
+    find : function(prop, value){
+        return this.findBy(function(c){
+            return c[prop] === value;
+        });
+    },
+
+    /**
+     * Find a component under this container at any level by a custom function. If the passed function returns
+     * true, the component will be included in the results. The passed function is called with the arguments (component, this container).
+     * @param {Function} fn The function to call
+     * @param {Object} scope (optional)
+     * @return {Array} Array of Ext.Components
+     */
+    findBy : function(fn, scope){
+        var m = [], ct = this;
+        this.cascade(function(c){
+            if(ct != c && fn.call(scope || c, c, ct) === true){
+                m.push(c);
+            }
+        });
+        return m;
+    },
+
+    /**
+     * Get a component contained by this container (alias for items.get(key))
+     * @param {String/Number} key The index or id of the component
+     * @return {Ext.Component} Ext.Component
+     */
+    get : function(key){
+        return this.items.get(key);
+    }
+});
+
+Ext.Container.LAYOUTS = {};
+Ext.reg('container', Ext.Container);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/CycleButton.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/CycleButton.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/CycleButton.js	(revision 625)
@@ -0,0 +1,188 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.CycleButton
+ * @extends Ext.SplitButton
+ * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements.  The button automatically
+ * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's
+ * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the
+ * button displays the dropdown menu just like a normal SplitButton.  Example usage:
+ * <pre><code>
+var btn = new Ext.CycleButton({
+    showText: true,
+    prependText: 'View as ',
+    items: [{
+        text:'text only',
+        iconCls:'view-text',
+        checked:true
+    },{
+        text:'HTML',
+        iconCls:'view-html'
+    }],
+    changeHandler:function(btn, item){
+        Ext.Msg.alert('Change View', item.text);
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new split button
+ * @param {Object} config The config object
+ * @xtype cycle
+ */
+Ext.CycleButton = Ext.extend(Ext.SplitButton, {
+    /**
+     * @cfg {Array} items An array of {@link Ext.menu.CheckItem} <b>config</b> objects to be used when creating the
+     * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'})
+     */
+    /**
+     * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false)
+     */
+    /**
+     * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the
+     * button's text (only applies when showText = true, defaults to '')
+     */
+    /**
+     * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu
+     * item in the button's menu has changed.  If this callback is not supplied, the SplitButton will instead
+     * fire the {@link #change} event on active item change.  The changeHandler function will be called with the
+     * following argument list: (SplitButton this, Ext.menu.CheckItem item)
+     */
+    /**
+     * @cfg {String} forceIcon A css class which sets an image to be used as the static icon for this button.  This
+     * icon will always be displayed regardless of which item is selected in the dropdown list.  This overrides the 
+     * default behavior of changing the button's icon to match the selected item's icon on change.
+     */
+    /**
+     * @property menu
+     * @type Menu
+     * The {@link Ext.menu.Menu Menu} object used to display the {@link Ext.menu.CheckItem CheckItems} representing the available choices.
+     */
+
+    // private
+    getItemText : function(item){
+        if(item && this.showText === true){
+            var text = '';
+            if(this.prependText){
+                text += this.prependText;
+            }
+            text += item.text;
+            return text;
+        }
+        return undefined;
+    },
+
+    /**
+     * Sets the button's active menu item.
+     * @param {Ext.menu.CheckItem} item The item to activate
+     * @param {Boolean} suppressEvent True to prevent the button's change event from firing (defaults to false)
+     */
+    setActiveItem : function(item, suppressEvent){
+        if(typeof item != 'object'){
+            item = this.menu.items.get(item);
+        }
+        if(item){
+            if(!this.rendered){
+                this.text = this.getItemText(item);
+                this.iconCls = item.iconCls;
+            }else{
+                var t = this.getItemText(item);
+                if(t){
+                    this.setText(t);
+                }
+                this.setIconClass(item.iconCls);
+            }
+            this.activeItem = item;
+            if(!item.checked){
+                item.setChecked(true, true);
+            }
+            if(this.forceIcon){
+                this.setIconClass(this.forceIcon);
+            }
+            if(!suppressEvent){
+                this.fireEvent('change', this, item);
+            }
+        }
+    },
+
+    /**
+     * Gets the currently active menu item.
+     * @return {Ext.menu.CheckItem} The active item
+     */
+    getActiveItem : function(){
+        return this.activeItem;
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the button's active menu item has changed.  Note that if a {@link #changeHandler} function
+             * is set on this CycleButton, it will be called instead on active item change and this change event will
+             * not be fired.
+             * @param {Ext.CycleButton} this
+             * @param {Ext.menu.CheckItem} item The menu item that was selected
+             */
+            "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 checked;
+        for(var i = 0, len = this.itemCount; i < len; i++){
+            var item = this.items[i];
+            item.group = item.group || this.id;
+            item.itemIndex = i;
+            item.checkHandler = this.checkHandler;
+            item.scope = this;
+            item.checked = item.checked || false;
+            this.menu.items.push(item);
+            if(item.checked){
+                checked = item;
+            }
+        }
+        this.setActiveItem(checked, true);
+        Ext.CycleButton.superclass.initComponent.call(this);
+
+        this.on('click', this.toggleSelected, this);
+    },
+
+    // private
+    checkHandler : function(item, pressed){
+        if(pressed){
+            this.setActiveItem(item);
+        }
+    },
+
+    /**
+     * This is normally called internally on button click, but can be called externally to advance the button's
+     * active item programmatically to the next one in the menu.  If the current item is the last one in the menu
+     * the active item will be set to the first item in the menu.
+     */
+    toggleSelected : function(){
+        this.menu.render();
+        
+        var nextIdx, checkItem;
+        for (var i = 1; i < this.itemCount; i++) {
+            nextIdx = (this.activeItem.itemIndex + i) % this.itemCount;
+            // check the potential item
+            checkItem = this.menu.items.itemAt(nextIdx);
+            // if its not disabled then check it.
+            if (!checkItem.disabled) {
+                checkItem.setChecked(true);
+                break;
+            }
+        }
+    }
+});
+Ext.reg('cycle', Ext.CycleButton);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DataView.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DataView.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DataView.js	(revision 625)
@@ -0,0 +1,749 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DataView
+ * @extends Ext.BoxComponent
+ * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate}
+ * as its internal templating mechanism, and is bound to an {@link Ext.data.Store}
+ * so that as the data in the store changes the view is automatically updated to reflect the changes.  The view also
+ * provides built-in behavior for many common events that can occur for its contained items including click, doubleclick,
+ * mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an {@link #itemSelector}
+ * config must be provided for the DataView to determine what nodes it will be working with.</b>
+ *
+ * <p>The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.</p>
+ * <pre><code>
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var tpl = new Ext.XTemplate(
+    '&lt;tpl for="."&gt;',
+        '&lt;div class="thumb-wrap" id="{name}"&gt;',
+        '&lt;div class="thumb"&gt;&lt;img src="{url}" title="{name}"&gt;&lt;/div&gt;',
+        '&lt;span class="x-editable"&gt;{shortName}&lt;/span&gt;&lt;/div&gt;',
+    '&lt;/tpl&gt;',
+    '&lt;div class="x-clear"&gt;&lt;/div&gt;'
+);
+
+var panel = new Ext.Panel({
+    id:'images-view',
+    frame:true,
+    width:535,
+    autoHeight:true,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple DataView',
+
+    items: new Ext.DataView({
+        store: store,
+        tpl: tpl,
+        autoHeight:true,
+        multiSelect: true,
+        overClass:'x-view-over',
+        itemSelector:'div.thumb-wrap',
+        emptyText: 'No images to display'
+    })
+});
+panel.render(document.body);
+</code></pre>
+ * @constructor
+ * Create a new DataView
+ * @param {Object} config The config object
+ * @xtype dataview
+ */
+Ext.DataView = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String/Array} tpl
+     * The HTML fragment or an array of fragments that will make up the template used by this DataView.  This should
+     * be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
+     */
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} to bind this DataView to.
+     */
+    /**
+     * @cfg {String} itemSelector
+     * <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or 
+     * <tt>span:first-child</tt>) that will be used to determine what nodes this DataView will be
+     * working with.
+     */
+    /**
+     * @cfg {Boolean} multiSelect
+     * True to allow selection of more than one item at a time, false to allow selection of only a single item
+     * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false).
+     */
+    /**
+     * @cfg {Boolean} singleSelect
+     * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
+     * Note that if {@link #multiSelect} = true, this value will be ignored.
+     */
+    /**
+     * @cfg {Boolean} simpleSelect
+     * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
+     * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
+     */
+    /**
+     * @cfg {String} overClass
+     * A CSS class to apply to each item in the view on mouseover (defaults to undefined).
+     */
+    /**
+     * @cfg {String} loadingText
+     * A string to display during data load operations (defaults to undefined).  If specified, this text will be
+     * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
+     * contents will continue to display normally until the new data is loaded and the contents are replaced.
+     */
+    /**
+     * @cfg {String} selectedClass
+     * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
+     */
+    selectedClass : "x-view-selected",
+    /**
+     * @cfg {String} emptyText
+     * The text to display in the view when there is no data to display (defaults to '').
+     */
+    emptyText : "",
+
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
+     */
+    deferEmptyText: true,
+    /**
+     * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
+     */
+    trackOver: false,
+
+    //private
+    last: false,
+
+    // private
+    initComponent : function(){
+        Ext.DataView.superclass.initComponent.call(this);
+        if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){
+            this.tpl = new Ext.XTemplate(this.tpl);
+        }
+
+        this.addEvents(
+            /**
+             * @event beforeclick
+             * Fires before a click is processed. Returns false to cancel the default action.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "beforeclick",
+            /**
+             * @event click
+             * Fires when a template node is clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "click",
+            /**
+             * @event mouseenter
+             * Fires when the mouse enters a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseenter",
+            /**
+             * @event mouseleave
+             * Fires when the mouse leaves a template node. trackOver:true or an overCls must be set to enable this event.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "mouseleave",
+            /**
+             * @event containerclick
+             * Fires when a click occurs and it is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containerclick",
+            /**
+             * @event dblclick
+             * Fires when a template node is double clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "dblclick",
+            /**
+             * @event contextmenu
+             * Fires when a template node is right clicked.
+             * @param {Ext.DataView} this
+             * @param {Number} index The index of the target node
+             * @param {HTMLElement} node The target node
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "contextmenu",
+            /**
+             * @event containercontextmenu
+             * Fires when a right click occurs that is not on a template node.
+             * @param {Ext.DataView} this
+             * @param {Ext.EventObject} e The raw event object
+             */
+            "containercontextmenu",
+            /**
+             * @event selectionchange
+             * Fires when the selected nodes change.
+             * @param {Ext.DataView} this
+             * @param {Array} selections Array of the selected nodes
+             */
+            "selectionchange",
+
+            /**
+             * @event beforeselect
+             * Fires before a selection is made. If any handlers return false, the selection is cancelled.
+             * @param {Ext.DataView} this
+             * @param {HTMLElement} node The node to be selected
+             * @param {Array} selections Array of currently selected nodes
+             */
+            "beforeselect"
+        );
+
+        this.store = Ext.StoreMgr.lookup(this.store);
+        this.all = new Ext.CompositeElementLite();
+        this.selected = new Ext.CompositeElementLite();
+    },
+
+    // private
+    afterRender : function(){
+        Ext.DataView.superclass.afterRender.call(this);
+
+		this.mon(this.getTemplateTarget(), {
+            "click": this.onClick,
+            "dblclick": this.onDblClick,
+            "contextmenu": this.onContextMenu,
+            scope:this
+        });
+
+        if(this.overClass || this.trackOver){
+            this.mon(this.getTemplateTarget(), {
+                "mouseover": this.onMouseOver,
+                "mouseout": this.onMouseOut,
+                scope:this
+            });
+        }
+
+        if(this.store){
+            this.bindStore(this.store, true);
+        }
+    },
+
+    /**
+     * Refreshes the view by reloading the data from the store and re-rendering the template.
+     */
+    refresh : function(){
+        this.clearSelections(false, true);
+        var el = this.getTemplateTarget();
+        el.update("");
+        var records = this.store.getRange();
+        if(records.length < 1){
+            if(!this.deferEmptyText || this.hasSkippedEmptyText){
+                el.update(this.emptyText);
+            }
+            this.all.clear();
+        }else{
+            this.tpl.overwrite(el, this.collectData(records, 0));
+            this.all.fill(Ext.query(this.itemSelector, el.dom));
+            this.updateIndexes(0);
+        }
+        this.hasSkippedEmptyText = true;
+    },
+
+    getTemplateTarget: function(){
+        return this.el;
+    },
+
+    /**
+     * Function which can be overridden to provide custom formatting for each Record that is used by this
+     * DataView's {@link #tpl template} to render each node.
+     * @param {Array/Object} data The raw data object that was used to create the Record.
+     * @param {Number} recordIndex the index number of the Record being prepared for rendering.
+     * @param {Record} record The Record being prepared for rendering.
+     * @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method.
+     * (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
+     */
+    prepareData : function(data){
+        return data;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * DataView's {@link #tpl template} to render the whole DataView.</p>
+     * <p>This is usually an Array of data objects, each element of which is processed by an
+     * {@link Ext.XTemplate XTemplate} which uses <tt>'&lt;tpl for="."&gt;'</tt> to iterate over its supplied
+     * data object as an Array. However, <i>named</i> properties may be placed into the data object to
+     * provide non-repeating data such as headings, totals etc.</p>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Array} An Array of data objects to be processed by a repeating XTemplate. May also
+     * contain <i>named</i> properties.
+     */
+    collectData : function(records, startIndex){
+        var r = [];
+        for(var i = 0, len = records.length; i < len; i++){
+            r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]);
+        }
+        return r;
+    },
+
+    // private
+    bufferRender : function(records){
+        var div = document.createElement('div');
+        this.tpl.overwrite(div, this.collectData(records));
+        return Ext.query(this.itemSelector, div);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        var index = this.store.indexOf(record);
+        var sel = this.isSelected(index);
+        var original = this.all.elements[index];
+        var node = this.bufferRender([record], index)[0];
+
+        this.all.replaceElement(index, node, true);
+        if(sel){
+            this.selected.replaceElement(original, node);
+            this.all.item(index).addClass(this.selectedClass);
+        }
+        this.updateIndexes(index, index);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        if(this.all.getCount() === 0){
+            this.refresh();
+            return;
+        }
+        var nodes = this.bufferRender(records, index), n, a = this.all.elements;
+        if(index < this.all.getCount()){
+            n = this.all.item(index).insertSibling(nodes, 'before', true);
+            a.splice.apply(a, [index, 0].concat(nodes));
+        }else{
+            n = this.all.last().insertSibling(nodes, 'after', true);
+            a.push.apply(a, nodes);
+        }
+        this.updateIndexes(index);
+    },
+
+    // private
+    onRemove : function(ds, record, index){
+        this.deselect(index);
+        this.all.removeElement(index, true);
+        this.updateIndexes(index);
+        if (this.store.getCount() === 0){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Refreshes an individual node's data from the store.
+     * @param {Number} index The item's data index in the store
+     */
+    refreshNode : function(index){
+        this.onUpdate(this.store, this.store.getAt(index));
+    },
+
+    // private
+    updateIndexes : function(startIndex, endIndex){
+        var ns = this.all.elements;
+        startIndex = startIndex || 0;
+        endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1));
+        for(var i = startIndex; i <= endIndex; i++){
+            ns[i].viewIndex = i;
+        }
+    },
+    
+    /**
+     * Returns the store associated with this DataView.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Changes the data store bound to this view and refreshes it.
+     * @param {Store} store The store to bind to this view
+     */
+    bindStore : function(store, initial){
+        if(!initial && 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(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                datachanged: this.refresh,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store){
+            this.refresh();
+        }
+    },
+
+    /**
+     * Returns the template node the passed child belongs to, or null if it doesn't belong to one.
+     * @param {HTMLElement} node
+     * @return {HTMLElement} The template node
+     */
+    findItemFromChild : function(node){
+        return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget());
+    },
+
+    // private
+    onClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            var index = this.indexOf(item);
+            if(this.onItemClick(item, index, e) !== false){
+                this.fireEvent("click", this, index, item, e);
+            }
+        }else{
+            if(this.fireEvent("containerclick", this, e) !== false){
+                this.onContainerClick(e);
+            }
+        }
+    },
+
+    onContainerClick : function(e){
+        this.clearSelections();
+    },
+
+    // private
+    onContextMenu : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("contextmenu", this, this.indexOf(item), item, e);
+        }else{
+            this.fireEvent("containercontextmenu", this, e);
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item){
+            this.fireEvent("dblclick", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOver : function(e){
+        var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
+        if(item && item !== this.lastItem){
+            this.lastItem = item;
+            Ext.fly(item).addClass(this.overClass);
+            this.fireEvent("mouseenter", this, this.indexOf(item), item, e);
+        }
+    },
+
+    // private
+    onMouseOut : function(e){
+        if(this.lastItem){
+            if(!e.within(this.lastItem, true, true)){
+                Ext.fly(this.lastItem).removeClass(this.overClass);
+                this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, e);
+                delete this.lastItem;
+            }
+        }
+    },
+
+    // private
+    onItemClick : function(item, index, e){
+        if(this.fireEvent("beforeclick", this, index, item, e) === false){
+            return false;
+        }
+        if(this.multiSelect){
+            this.doMultiSelection(item, index, e);
+            e.preventDefault();
+        }else if(this.singleSelect){
+            this.doSingleSelection(item, index, e);
+            e.preventDefault();
+        }
+        return true;
+    },
+
+    // private
+    doSingleSelection : function(item, index, e){
+        if(e.ctrlKey && this.isSelected(index)){
+            this.deselect(index);
+        }else{
+            this.select(index, false);
+        }
+    },
+
+    // private
+    doMultiSelection : function(item, index, e){
+        if(e.shiftKey && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, index, e.ctrlKey);
+            this.last = last; // reset the last
+        }else{
+            if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){
+                this.deselect(index);
+            }else{
+                this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect);
+            }
+        }
+    },
+
+    /**
+     * Gets the number of selected nodes.
+     * @return {Number} The node count
+     */
+    getSelectionCount : function(){
+        return this.selected.getCount();
+    },
+
+    /**
+     * Gets the currently selected nodes.
+     * @return {Array} An array of HTMLElements
+     */
+    getSelectedNodes : function(){
+        return this.selected.elements;
+    },
+
+    /**
+     * Gets the indexes of the selected nodes.
+     * @return {Array} An array of numeric indexes
+     */
+    getSelectedIndexes : function(){
+        var indexes = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            indexes.push(s[i].viewIndex);
+        }
+        return indexes;
+    },
+
+    /**
+     * Gets an array of the selected records
+     * @return {Array} An array of {@link Ext.data.Record} objects
+     */
+    getSelectedRecords : function(){
+        var r = [], s = this.selected.elements;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets an array of the records from an array of nodes
+     * @param {Array} nodes The nodes to evaluate
+     * @return {Array} records The {@link Ext.data.Record} objects
+     */
+    getRecords : function(nodes){
+        var r = [], s = nodes;
+        for(var i = 0, len = s.length; i < len; i++){
+            r[r.length] = this.store.getAt(s[i].viewIndex);
+        }
+        return r;
+    },
+
+    /**
+     * Gets a record from a node
+     * @param {HTMLElement} node The node to evaluate
+     * @return {Record} record The {@link Ext.data.Record} object
+     */
+    getRecord : function(node){
+        return this.store.getAt(node.viewIndex);
+    },
+
+    /**
+     * Clears all selections.
+     * @param {Boolean} suppressEvent (optional) True to skip firing of the selectionchange event
+     */
+    clearSelections : function(suppressEvent, skipUpdate){
+        if((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0){
+            if(!skipUpdate){
+                this.selected.removeClass(this.selectedClass);
+            }
+            this.selected.clear();
+            this.last = false;
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        }
+    },
+
+    /**
+     * Returns true if the passed node is selected, else false.
+     * @param {HTMLElement/Number} node The node or node index to check
+     * @return {Boolean} True if selected, else false
+     */
+    isSelected : function(node){
+        return this.selected.contains(this.getNode(node));
+    },
+
+    /**
+     * Deselects a node.
+     * @param {HTMLElement/Number} node The node to deselect
+     */
+    deselect : function(node){
+        if(this.isSelected(node)){
+            node = this.getNode(node);
+            this.selected.removeElement(node);
+            if(this.last == node.viewIndex){
+                this.last = false;
+            }
+            Ext.fly(node).removeClass(this.selectedClass);
+            this.fireEvent("selectionchange", this, this.selected.elements);
+        }
+    },
+
+    /**
+     * Selects a set of nodes.
+     * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node,
+     * id of a template node or an array of any of those to select
+     * @param {Boolean} keepExisting (optional) true to keep existing selections
+     * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent
+     */
+    select : function(nodeInfo, keepExisting, suppressEvent){
+        if(Ext.isArray(nodeInfo)){
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            for(var i = 0, len = nodeInfo.length; i < len; i++){
+                this.select(nodeInfo[i], true, true);
+            }
+            if(!suppressEvent){
+                this.fireEvent("selectionchange", this, this.selected.elements);
+            }
+        } else{
+            var node = this.getNode(nodeInfo);
+            if(!keepExisting){
+                this.clearSelections(true);
+            }
+            if(node && !this.isSelected(node)){
+                if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){
+                    Ext.fly(node).addClass(this.selectedClass);
+                    this.selected.add(node);
+                    this.last = node.viewIndex;
+                    if(!suppressEvent){
+                        this.fireEvent("selectionchange", this, this.selected.elements);
+                    }
+                }
+            }
+        }
+    },
+
+    /**
+     * Selects a range of nodes. All nodes between start and end are selected.
+     * @param {Number} start The index of the first node in the range
+     * @param {Number} end The index of the last node in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(start, end, keepExisting){
+        if(!keepExisting){
+            this.clearSelections(true);
+        }
+        this.select(this.getNodes(start, end), true);
+    },
+
+    /**
+     * Gets a template node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {HTMLElement} The node or null if it wasn't found
+     */
+    getNode : function(nodeInfo){
+        if(Ext.isString(nodeInfo)){
+            return document.getElementById(nodeInfo);
+        }else if(Ext.isNumber(nodeInfo)){
+            return this.all.elements[nodeInfo];
+        }
+        return nodeInfo;
+    },
+
+    /**
+     * Gets a range nodes.
+     * @param {Number} start (optional) The index of the first node in the range
+     * @param {Number} end (optional) The index of the last node in the range
+     * @return {Array} An array of nodes
+     */
+    getNodes : function(start, end){
+        var ns = this.all.elements;
+        start = start || 0;
+        end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end;
+        var nodes = [], i;
+        if(start <= end){
+            for(i = start; i <= end && ns[i]; i++){
+                nodes.push(ns[i]);
+            }
+        } else{
+            for(i = start; i >= end && ns[i]; i--){
+                nodes.push(ns[i]);
+            }
+        }
+        return nodes;
+    },
+
+    /**
+     * Finds the index of the passed node.
+     * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node
+     * @return {Number} The index of the node or -1
+     */
+    indexOf : function(node){
+        node = this.getNode(node);
+        if(Ext.isNumber(node.viewIndex)){
+            return node.viewIndex;
+        }
+        return this.all.indexOf(node);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(this.loadingText){
+            this.clearSelections(false, true);
+            this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+'</div>');
+            this.all.clear();
+        }
+    },
+
+    onDestroy : function(){
+        Ext.DataView.superclass.onDestroy.call(this);
+        this.bindStore(null);
+    }
+});
+
+/**
+ * Changes the data store bound to this view and refreshes it. (deprecated in favor of bindStore)
+ * @param {Store} store The store to bind to this view
+ */
+Ext.DataView.prototype.setStore = Ext.DataView.prototype.bindStore;
+
+Ext.reg('dataview', Ext.DataView);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DatePicker.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DatePicker.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/DatePicker.js	(revision 625)
@@ -0,0 +1,771 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.DatePicker
+ * @extends Ext.Component
+ * Simple date picker class.
+ * @constructor
+ * Create a new DatePicker
+ * @param {Object} config The config object
+ * @xtype datepicker
+ */
+Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} todayText
+     * The text to display on the button that selects the current date (defaults to <tt>'Today'</tt>)
+     */
+    todayText : 'Today',
+    /**
+     * @cfg {String} okText
+     * The text to display on the ok button (defaults to <tt>'&#160;OK&#160;'</tt> to give the user extra clicking room)
+     */
+    okText : '&#160;OK&#160;',
+    /**
+     * @cfg {String} cancelText
+     * The text to display on the cancel button (defaults to <tt>'Cancel'</tt>)
+     */
+    cancelText : 'Cancel',
+    /**
+     * @cfg {String} todayTip
+     * The tooltip to display for the button that selects the current date (defaults to <tt>'{current date} (Spacebar)'</tt>)
+     */
+    todayTip : '{0} (Spacebar)',
+    /**
+     * @cfg {String} minText
+     * The error text to display if the minDate validation fails (defaults to <tt>'This date is before the minimum date'</tt>)
+     */
+    minText : 'This date is before the minimum date',
+    /**
+     * @cfg {String} maxText
+     * The error text to display if the maxDate validation fails (defaults to <tt>'This date is after the maximum date'</tt>)
+     */
+    maxText : 'This date is after the maximum date',
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/y'</tt>).
+     */
+    format : 'm/d/y',
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : 'Disabled',
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : 'Disabled',
+    /**
+     * @cfg {Array} monthNames
+     * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
+     */
+    monthNames : Date.monthNames,
+    /**
+     * @cfg {Array} dayNames
+     * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
+     */
+    dayNames : Date.dayNames,
+    /**
+     * @cfg {String} nextText
+     * The next month navigation button tooltip (defaults to <tt>'Next Month (Control+Right)'</tt>)
+     */
+    nextText : 'Next Month (Control+Right)',
+    /**
+     * @cfg {String} prevText
+     * The previous month navigation button tooltip (defaults to <tt>'Previous Month (Control+Left)'</tt>)
+     */
+    prevText : 'Previous Month (Control+Left)',
+    /**
+     * @cfg {String} monthYearText
+     * The header month selector tooltip (defaults to <tt>'Choose a month (Control+Up/Down to move years)'</tt>)
+     */
+    monthYearText : 'Choose a month (Control+Up/Down to move years)',
+    /**
+     * @cfg {Number} startDay
+     * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
+     */
+    startDay : 0,
+    /**
+     * @cfg {Boolean} showToday
+     * False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
+     * that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date} minDate
+     * Minimum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Date} maxDate
+     * Maximum allowable date (JavaScript date object, defaults to null)
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
+     */
+    /**
+     * @cfg {RegExp} disabledDatesRE
+     * JavaScript regular expression used to disable a pattern of dates (defaults to null).  The {@link #disabledDates}
+     * config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
+     * disabledDates value.
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:
+     * <ul>
+     * <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
+     * <li>['03/08', '09/16'] would disable those days for every year</li>
+     * <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
+     * <li>['03/../2006'] would disable every day in March 2006</li>
+     * <li>['^03'] would disable every day in every March</li>
+     * </ul>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
+     * escape the dot when restricting dates. For example: ['03\\.08\\.03'].
+     */
+
+    // private
+    initComponent : function(){
+        Ext.DatePicker.superclass.initComponent.call(this);
+
+        this.value = this.value ?
+                 this.value.clearTime() : new Date().clearTime();
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected
+             * @param {DatePicker} this
+             * @param {Date} date The selected date
+             */
+            'select'
+        );
+
+        if(this.handler){
+            this.on('select', this.handler,  this.scope || this);
+        }
+
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(!this.disabledDatesRE && this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1,
+                re = '(?:';
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array/RegExp} disabledDates An array of date strings (see the {@link #disabledDates} config
+     * for details on supported values), or a JavaScript regular expression used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        if(Ext.isArray(dd)){
+            this.disabledDates = dd;
+            this.disabledDatesRE = null;
+        }else{
+            this.disabledDatesRE = dd;
+        }
+        this.initDisabledDays();
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the {@link #disabledDays} config
+     * for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #minDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinDate : function(dt){
+        this.minDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Replaces any existing {@link #maxDate} with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxDate : function(dt){
+        this.maxDate = dt;
+        this.update(this.value, true);
+    },
+
+    /**
+     * Sets the value of the date field
+     * @param {Date} value The date to set
+     */
+    setValue : function(value){
+        var old = this.value;
+        this.value = value.clearTime(true);
+        if(this.el){
+            this.update(this.value);
+        }
+    },
+
+    /**
+     * Gets the current selected value of the date field
+     * @return {Date} The selected date
+     */
+    getValue : function(){
+        return this.value;
+    },
+
+    // private
+    focus : function(){
+        if(this.el){
+            this.update(this.activeDate);
+        }
+    },
+    
+    // private
+    onEnable: function(initial){
+        Ext.DatePicker.superclass.onEnable.call(this);    
+        this.doDisabled(false);
+        this.update(initial ? this.value : this.activeDate);
+        if(Ext.isIE){
+            this.el.repaint();
+        }
+        
+    },
+    
+    // private
+    onDisable: function(){
+        Ext.DatePicker.superclass.onDisable.call(this);   
+        this.doDisabled(true);
+        if(Ext.isIE && !Ext.isIE8){
+            /* Really strange problem in IE6/7, when disabled, have to explicitly
+             * repaint each of the nodes to get them to display correctly, simply
+             * calling repaint on the main element doesn't appear to be enough.
+             */
+             Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){
+                 Ext.fly(el).repaint();
+             });
+        }
+    },
+    
+    // private
+    doDisabled: function(disabled){
+        this.keyNav.setDisabled(disabled);
+        this.prevRepeater.setDisabled(disabled);
+        this.nextRepeater.setDisabled(disabled);
+        if(this.showToday){
+            this.todayKeyListener.setDisabled(disabled);
+            this.todayBtn.setDisabled(disabled);
+        }
+    },
+
+    // private
+    onRender : function(container, position){
+        var m = [
+             '<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>'],
+                dn = this.dayNames,
+                i;
+        for(i = 0; i < 7; i++){
+            var d = this.startDay+i;
+            if(d > 6){
+                d = d-7;
+            }
+            m.push('<th><span>', dn[d].substr(0,1), '</span></th>');
+        }
+        m[m.length] = '</tr></thead><tbody><tr>';
+        for(i = 0; i < 42; i++) {
+            if(i % 7 === 0 && i !== 0){
+                m[m.length] = '</tr><tr>';
+            }
+            m[m.length] = '<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';
+        }
+        m.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 el = document.createElement('div');
+        el.className = 'x-date-picker';
+        el.innerHTML = m.join('');
+
+        container.dom.insertBefore(el, position);
+
+        this.el = Ext.get(el);
+        this.eventEl = Ext.get(el.firstChild);
+
+        this.prevRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-left a'), {
+            handler: this.showPrevMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.nextRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-right a'), {
+            handler: this.showNextMonth,
+            scope: this,
+            preventDefault:true,
+            stopDefault:true
+        });
+
+        this.monthPicker = this.el.down('div.x-date-mp');
+        this.monthPicker.enableDisplayMode('block');
+
+        this.keyNav = new Ext.KeyNav(this.eventEl, {
+            'left' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevMonth();
+                }else{
+                    this.update(this.activeDate.add('d', -1));    
+                }
+            },
+
+            'right' : function(e){
+                if(e.ctrlKey){
+                    this.showNextMonth();
+                }else{
+                    this.update(this.activeDate.add('d', 1));    
+                }
+            },
+
+            'up' : function(e){
+                if(e.ctrlKey){
+                    this.showNextYear();
+                }else{
+                    this.update(this.activeDate.add('d', -7));
+                }
+            },
+
+            'down' : function(e){
+                if(e.ctrlKey){
+                    this.showPrevYear();
+                }else{
+                    this.update(this.activeDate.add('d', 7));
+                }
+            },
+
+            'pageUp' : function(e){
+                this.showNextMonth();
+            },
+
+            'pageDown' : function(e){
+                this.showPrevMonth();
+            },
+
+            'enter' : function(e){
+                e.stopPropagation();
+                return true;
+            },
+
+            scope : this
+        });
+
+        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.el.child('em').addClass('x-btn-arrow');
+
+        if(this.showToday){
+            this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday,  this);
+            var today = (new Date()).dateFormat(this.format);
+            this.todayBtn = new Ext.Button({
+                renderTo: this.el.child('td.x-date-bottom', true),
+                text: String.format(this.todayText, today),
+                tooltip: String.format(this.todayTip, today),
+                handler: this.selectToday,
+                scope: this
+            });
+        }
+        this.mon(this.eventEl, 'mousewheel', this.handleMouseWheel, this);
+        this.mon(this.eventEl, 'click', this.handleDateClick,  this, {delegate: 'a.x-date-date'});
+        this.mon(this.mbtn, 'click', this.showMonthPicker, this);
+        this.onEnable(true);
+    },
+
+    // private
+    createMonthPicker : function(){
+        if(!this.monthPicker.dom.firstChild){
+            var buf = ['<table border="0" cellspacing="0">'];
+            for(var i = 0; i < 6; i++){
+                buf.push(
+                    '<tr><td class="x-date-mp-month"><a href="#">', Date.getShortMonthName(i), '</a></td>',
+                    '<td class="x-date-mp-month x-date-mp-sep"><a href="#">', Date.getShortMonthName(i + 6), '</a></td>',
+                    i === 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>'
+                );
+            }
+            buf.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(buf.join(''));
+
+            this.mon(this.monthPicker, 'click', this.onMonthClick, this);
+            this.mon(this.monthPicker, '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(m, a, i){
+                i += 1;
+                if((i%2) === 0){
+                    m.dom.xmonth = 5 + Math.round(i * 0.5);
+                }else{
+                    m.dom.xmonth = Math.round((i-1) * 0.5);
+                }
+            });
+        }
+    },
+
+    // private
+    showMonthPicker : function(){
+        if(!this.disabled){
+            this.createMonthPicker();
+            var size = this.el.getSize();
+            this.monthPicker.setSize(size);
+            this.monthPicker.child('table').setSize(size);
+
+            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});
+        }
+    },
+
+    // private
+    updateMPYear : function(y){
+        this.mpyear = y;
+        var ys = this.mpYears.elements;
+        for(var i = 1; i <= 10; i++){
+            var td = ys[i-1], y2;
+            if((i%2) === 0){
+                y2 = y + Math.round(i * 0.5);
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }else{
+                y2 = y - (5-Math.round(i * 0.5));
+                td.firstChild.innerHTML = y2;
+                td.xyear = y2;
+            }
+            this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        }
+    },
+
+    // private
+    updateMPMonth : function(sm){
+        this.mpMonths.each(function(m, a, i){
+            m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel');
+        });
+    },
+
+    // private
+    selectMPMonth : function(m){
+
+    },
+
+    // private
+    onMonthClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if(el.is('button.x-date-mp-cancel')){
+            this.hideMonthPicker();
+        }
+        else if(el.is('button.x-date-mp-ok')){
+            var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate());
+            if(d.getMonth() != this.mpSelMonth){
+                // 'fix' the JS rolling date conversion if needed
+                d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth();
+            }
+            this.update(d);
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-month', 2))){
+            this.mpMonths.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelMonth = pn.dom.xmonth;
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.mpYears.removeClass('x-date-mp-sel');
+            pn.addClass('x-date-mp-sel');
+            this.mpSelYear = pn.dom.xyear;
+        }
+        else if(el.is('a.x-date-mp-prev')){
+            this.updateMPYear(this.mpyear-10);
+        }
+        else if(el.is('a.x-date-mp-next')){
+            this.updateMPYear(this.mpyear+10);
+        }
+    },
+
+    // private
+    onMonthDblClick : function(e, t){
+        e.stopEvent();
+        var el = new Ext.Element(t), pn;
+        if((pn = el.up('td.x-date-mp-month', 2))){
+            this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+        else if((pn = el.up('td.x-date-mp-year', 2))){
+            this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate()));
+            this.hideMonthPicker();
+        }
+    },
+
+    // private
+    hideMonthPicker : function(disableAnim){
+        if(this.monthPicker){
+            if(disableAnim === true){
+                this.monthPicker.hide();
+            }else{
+                this.monthPicker.slideOut('t', {duration:0.2});
+            }
+        }
+    },
+
+    // private
+    showPrevMonth : function(e){
+        this.update(this.activeDate.add('mo', -1));
+    },
+
+    // private
+    showNextMonth : function(e){
+        this.update(this.activeDate.add('mo', 1));
+    },
+
+    // private
+    showPrevYear : function(){
+        this.update(this.activeDate.add('y', -1));
+    },
+
+    // private
+    showNextYear : function(){
+        this.update(this.activeDate.add('y', 1));
+    },
+
+    // private
+    handleMouseWheel : function(e){
+        e.stopEvent();
+        if(!this.disabled){
+            var delta = e.getWheelDelta();
+            if(delta > 0){
+                this.showPrevMonth();
+            } else if(delta < 0){
+                this.showNextMonth();
+            }
+        }
+    },
+
+    // private
+    handleDateClick : function(e, t){
+        e.stopEvent();
+        if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){
+            this.setValue(new Date(t.dateValue));
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    selectToday : function(){
+        if(this.todayBtn && !this.todayBtn.disabled){
+            this.setValue(new Date().clearTime());
+            this.fireEvent('select', this, this.value);
+        }
+    },
+
+    // private
+    update : function(date, forceRefresh){
+        var vd = this.activeDate, vis = this.isVisible();
+        this.activeDate = date;
+        if(!forceRefresh && vd && this.el){
+            var t = date.getTime();
+            if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){
+                this.cells.removeClass('x-date-selected');
+                this.cells.each(function(c){
+                   if(c.dom.firstChild.dateValue == t){
+                       c.addClass('x-date-selected');
+                       if(vis){
+                           Ext.fly(c.dom.firstChild).focus(50);
+                       }
+                       return false;
+                   }
+                });
+                return;
+            }
+        }
+        var days = date.getDaysInMonth();
+        var firstOfMonth = date.getFirstDateOfMonth();
+        var startingPos = firstOfMonth.getDay()-this.startDay;
+
+        if(startingPos <= this.startDay){
+            startingPos += 7;
+        }
+
+        var pm = date.add('mo', -1);
+        var prevStart = pm.getDaysInMonth()-startingPos;
+
+        var cells = this.cells.elements;
+        var textEls = this.textNodes;
+        days += startingPos;
+
+        // convert everything to numbers so it's fast
+        var day = 86400000;
+        var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime();
+        var today = new Date().clearTime().getTime();
+        var sel = date.clearTime().getTime();
+        var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY;
+        var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY;
+        var ddMatch = this.disabledDatesRE;
+        var ddText = this.disabledDatesText;
+        var ddays = this.disabledDays ? this.disabledDays.join('') : false;
+        var ddaysText = this.disabledDaysText;
+        var format = this.format;
+
+        if(this.showToday){
+            var td = new Date().clearTime();
+            var disable = (td < min || td > max ||
+                (ddMatch && format && ddMatch.test(td.dateFormat(format))) ||
+                (ddays && ddays.indexOf(td.getDay()) != -1));
+
+            if(!this.disabled){
+                this.todayBtn.setDisabled(disable);
+                this.todayKeyListener[disable ? 'disable' : 'enable']();
+            }
+        }
+
+        var setCellClass = function(cal, cell){
+            cell.title = '';
+            var t = d.getTime();
+            cell.firstChild.dateValue = t;
+            if(t == today){
+                cell.className += ' x-date-today';
+                cell.title = cal.todayText;
+            }
+            if(t == sel){
+                cell.className += ' x-date-selected';
+                if(vis){
+                    Ext.fly(cell.firstChild).focus(50);
+                }
+            }
+            // disabling
+            if(t < min) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.minText;
+                return;
+            }
+            if(t > max) {
+                cell.className = ' x-date-disabled';
+                cell.title = cal.maxText;
+                return;
+            }
+            if(ddays){
+                if(ddays.indexOf(d.getDay()) != -1){
+                    cell.title = ddaysText;
+                    cell.className = ' x-date-disabled';
+                }
+            }
+            if(ddMatch && format){
+                var fvalue = d.dateFormat(format);
+                if(ddMatch.test(fvalue)){
+                    cell.title = ddText.replace('%0', fvalue);
+                    cell.className = ' x-date-disabled';
+                }
+            }
+        };
+
+        var i = 0;
+        for(; i < startingPos; i++) {
+            textEls[i].innerHTML = (++prevStart);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-prevday';
+            setCellClass(this, cells[i]);
+        }
+        for(; i < days; i++){
+            var intDay = i - startingPos + 1;
+            textEls[i].innerHTML = (intDay);
+            d.setDate(d.getDate()+1);
+            cells[i].className = 'x-date-active';
+            setCellClass(this, cells[i]);
+        }
+        var extraDays = 0;
+        for(; i < 42; i++) {
+             textEls[i].innerHTML = (++extraDays);
+             d.setDate(d.getDate()+1);
+             cells[i].className = 'x-date-nextday';
+             setCellClass(this, cells[i]);
+        }
+
+        this.mbtn.setText(this.monthNames[date.getMonth()] + ' ' + date.getFullYear());
+
+        if(!this.internalRender){
+            var main = this.el.dom.firstChild;
+            var w = main.offsetWidth;
+            this.el.setWidth(w + this.el.getBorderWidth('lr'));
+            Ext.fly(main).setWidth(w);
+            this.internalRender = true;
+            // opera does not respect the auto grow header center column
+            // then, after it gets a width opera refuses to recalculate
+            // without a second pass
+            if(Ext.isOpera && !this.secondPass){
+                main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px';
+                this.secondPass = true;
+                this.update.defer(10, this, [date]);
+            }
+        }
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.rendered){
+            this.keyNav.disable();
+            this.keyNav = null;
+            Ext.destroy(
+                this.leftClickRpt,
+                this.rightClickRpt,
+                this.monthPicker,
+                this.eventEl,
+                this.mbtn,
+                this.todayBtn
+            );
+        }
+    }
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+Ext.reg('datepicker', Ext.DatePicker);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Editor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Editor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Editor.js	(revision 625)
@@ -0,0 +1,385 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Editor
+ * @extends Ext.Component
+ * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
+ * @constructor
+ * Create a new Editor
+ * @param {Object} config The config object
+ * @xtype editor
+ */
+Ext.Editor = function(field, config){
+    if(field.field){
+        this.field = Ext.create(field.field, 'textfield');
+        config = Ext.apply({}, field); // copy so we don't disturb original config
+        delete config.field;
+    }else{
+        this.field = field;
+    }
+    Ext.Editor.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.Editor, Ext.Component, {
+    /**
+    * @cfg {Ext.form.Field} field
+    * The Field object (or descendant) or config object for field
+    */
+    /**
+     * @cfg {Boolean} allowBlur
+     * True to {@link #completeEdit complete the editing process} if in edit mode when the
+     * field is blurred. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean/String} autoSize
+     * True for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only,
+     * or "height" to adopt the height only (defaults to false)
+     */
+    /**
+     * @cfg {Boolean} revertInvalid
+     * True to automatically revert the field value and cancel the edit when the user completes an edit and the field
+     * validation fails (defaults to true)
+     */
+    /**
+     * @cfg {Boolean} ignoreNoChange
+     * True to skip the edit completion process (no save, no events fired) if the user completes an edit and
+     * the value has not changed (defaults to false).  Applies only to string values - edits for other data types
+     * will never be ignored.
+     */
+    /**
+     * @cfg {Boolean} hideEl
+     * False to keep the bound element visible while the editor is displayed (defaults to true)
+     */
+    /**
+     * @cfg {Mixed} value
+     * The data value of the underlying field (defaults to "")
+     */
+    value : "",
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?").
+     */
+    alignment: "c-c?",
+    /**
+     * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "frame")
+     */
+    shadow : "frame",
+    /**
+     * @cfg {Boolean} constrain True to constrain the editor to the viewport
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true)
+     */
+    swallowKeys : true,
+    /**
+     * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed (defaults to false)
+     */
+    completeOnEnter : false,
+    /**
+     * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed (defaults to false)
+     */
+    cancelOnEsc : false,
+    /**
+     * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false)
+     */
+    updateEl : false,
+
+    initComponent : function(){
+        Ext.Editor.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforestartedit
+             * Fires when editing is initiated, but before the value changes.  Editing can be canceled by returning
+             * false from the handler of this event.
+             * @param {Editor} this
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The field value being set
+             */
+            "beforestartedit",
+            /**
+             * @event startedit
+             * Fires when this editor is displayed
+             * @param {Ext.Element} boundEl The underlying element bound to this editor
+             * @param {Mixed} value The starting field value
+             */
+            "startedit",
+            /**
+             * @event beforecomplete
+             * Fires after a change has been made to the field, but before the change is reflected in the underlying
+             * field.  Saving the change to the field can be canceled by returning false from the handler of this event.
+             * Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this
+             * event will not fire since no edit actually occurred.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "beforecomplete",
+            /**
+             * @event complete
+             * Fires after editing is complete and any changed value has been written to the underlying field.
+             * @param {Editor} this
+             * @param {Mixed} value The current field value
+             * @param {Mixed} startValue The original field value
+             */
+            "complete",
+            /**
+             * @event canceledit
+             * Fires after editing has been canceled and the editor's value has been reset.
+             * @param {Editor} this
+             * @param {Mixed} value The user-entered field value that was discarded
+             * @param {Mixed} startValue The original field value that was set back into the editor after cancel
+             */
+            "canceledit",
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.  You can check
+             * {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            "specialkey"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.el = new Ext.Layer({
+            shadow: this.shadow,
+            cls: "x-editor",
+            parentEl : ct,
+            shim : this.shim,
+            shadowOffset: this.shadowOffset || 4,
+            id: this.id,
+            constrain: this.constrain
+        });
+        if(this.zIndex){
+            this.el.setZIndex(this.zIndex);
+        }
+        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.mon(this.field, "specialkey", this.onSpecialKey, this);
+        if(this.swallowKeys){
+            this.field.el.swallowEvent(['keydown','keypress']);
+        }
+        this.field.show();
+        this.mon(this.field, "blur", this.onBlur, this);
+        if(this.field.grow){
+        	this.mon(this.field, "autosize", this.el.sync,  this.el, {delay:1});
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var key = e.getKey();
+        if(this.completeOnEnter && key == e.ENTER){
+            e.stopEvent();
+            this.completeEdit();
+        }else if(this.cancelOnEsc && key == e.ESC){
+            this.cancelEdit();
+        }else{
+            this.fireEvent('specialkey', field, e);
+        }
+        if(this.field.triggerBlur && (key == e.ENTER || key == e.ESC || key == e.TAB)){
+            this.field.triggerBlur();
+        }
+    },
+
+    /**
+     * Starts the editing process and shows the editor.
+     * @param {Mixed} el The element to edit
+     * @param {String} value (optional) A value to initialize the editor with. If a value is not provided, it defaults
+      * to the innerHTML of el.
+     */
+    startEdit : function(el, value){
+        if(this.editing){
+            this.completeEdit();
+        }
+        this.boundEl = Ext.get(el);
+        var v = value !== undefined ? value : this.boundEl.dom.innerHTML;
+        if(!this.rendered){
+            this.render(this.parentEl || document.body);
+        }
+        if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){
+            return;
+        }
+        this.startValue = v;
+        this.field.setValue(v);
+        this.doAutoSize();
+        this.el.alignTo(this.boundEl, this.alignment);
+        this.editing = true;
+        this.show();
+    },
+
+    // private
+    doAutoSize : function(){
+        if(this.autoSize){
+            var sz = this.boundEl.getSize();
+            switch(this.autoSize){
+                case "width":
+                    this.setSize(sz.width,  "");
+                break;
+                case "height":
+                    this.setSize("",  sz.height);
+                break;
+                default:
+                    this.setSize(sz.width,  sz.height);
+            }
+        }
+    },
+
+    /**
+     * Sets the height and width of this editor.
+     * @param {Number} width The new width
+     * @param {Number} height The new height
+     */
+    setSize : function(w, h){
+        delete this.field.lastSize;
+        this.field.setSize(w, h);
+        if(this.el){
+            if(Ext.isGecko2 || Ext.isOpera){
+                // prevent layer scrollbars
+                this.el.setSize(w, h);
+            }
+            this.el.sync();
+        }
+    },
+
+    /**
+     * Realigns the editor to the bound field based on the current alignment config value.
+     */
+    realign : function(){
+        this.el.alignTo(this.boundEl, this.alignment);
+    },
+
+    /**
+     * Ends the editing process, persists the changed value to the underlying field, and hides the editor.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after edit (defaults to false)
+     */
+    completeEdit : function(remainVisible){
+        if(!this.editing){
+            return;
+        }
+        var v = this.getValue();
+        if(!this.field.isValid()){
+            if(this.revertInvalid !== false){
+                this.cancelEdit(remainVisible);
+            }
+            return;
+        }
+        if(String(v) === String(this.startValue) && this.ignoreNoChange){
+            this.hideEdit(remainVisible);
+            return;
+        }
+        if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){
+            v = this.getValue();
+            if(this.updateEl && this.boundEl){
+                this.boundEl.update(v);
+            }
+            this.hideEdit(remainVisible);
+            this.fireEvent("complete", this, v, this.startValue);
+        }
+    },
+
+    // private
+    onShow : function(){
+        this.el.show();
+        if(this.hideEl !== false){
+            this.boundEl.hide();
+        }
+        this.field.show();
+        if(Ext.isIE && !this.fixIEFocus){ // IE has problems with focusing the first time
+            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();
+        }
+    },
+
+    /**
+     * Cancels the editing process and hides the editor without persisting any changes.  The field value will be
+     * reverted to the original starting value.
+     * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after
+     * cancel (defaults to false)
+     */
+    cancelEdit : function(remainVisible){
+        if(this.editing){
+            var v = this.getValue();
+            this.setValue(this.startValue);
+            this.hideEdit(remainVisible);
+            this.fireEvent("canceledit", this, v, this.startValue);
+        }
+    },
+    
+    // private
+    hideEdit: function(remainVisible){
+        if(remainVisible !== true){
+            this.editing = false;
+            this.hide();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        if(this.allowBlur !== true && this.editing){
+            this.completeEdit();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    /**
+     * Sets the data value of the editor
+     * @param {Mixed} value Any valid value supported by the underlying field
+     */
+    setValue : function(v){
+        this.field.setValue(v);
+    },
+
+    /**
+     * Gets the data value of the editor
+     * @return {Mixed} The data value
+     */
+    getValue : function(){
+        return this.field.getValue();
+    },
+
+    beforeDestroy : function(){
+        Ext.destroy(this.field);
+        this.field = null;
+    }
+});
+Ext.reg('editor', Ext.Editor);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Layer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Layer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Layer.js	(revision 625)
@@ -0,0 +1,466 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Layer
+ * @extends Ext.Element
+ * An extended {@link Ext.Element} object that supports a shadow and shim, constrain to viewport and
+ * automatic maintaining of shadow/shim positions.
+ * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true)
+ * @cfg {String/Boolean} shadow True to automatically create an {@link Ext.Shadow}, or a string indicating the
+ * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false)
+ * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: 'div', cls: 'x-layer'}).
+ * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true)
+ * @cfg {String} cls CSS class to add to the element
+ * @cfg {Number} zindex Starting z-index (defaults to 11000)
+ * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 4)
+ * @cfg {Boolean} useDisplay
+ * Defaults to use css offsets to hide the Layer. Specify <tt>true</tt>
+ * to use css style <tt>'display:none;'</tt> to hide the Layer.
+ * @constructor
+ * @param {Object} config An object with config options.
+ * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it.
+ */
+(function(){
+Ext.Layer = function(config, existingEl){
+    config = config || {};
+    var dh = Ext.DomHelper;
+    var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body;
+    if(existingEl){
+        this.dom = Ext.getDom(existingEl);
+    }
+    if(!this.dom){
+        var o = config.dh || {tag: 'div', cls: 'x-layer'};
+        this.dom = dh.append(pel, o);
+    }
+    if(config.cls){
+        this.addClass(config.cls);
+    }
+    this.constrain = config.constrain !== false;
+    this.setVisibilityMode(Ext.Element.VISIBILITY);
+    if(config.id){
+        this.id = this.dom.id = config.id;
+    }else{
+        this.id = Ext.id(this.dom);
+    }
+    this.zindex = config.zindex || this.getZIndex();
+    this.position('absolute', this.zindex);
+    if(config.shadow){
+        this.shadowOffset = config.shadowOffset || 4;
+        this.shadow = new Ext.Shadow({
+            offset : this.shadowOffset,
+            mode : config.shadow
+        });
+    }else{
+        this.shadowOffset = 0;
+    }
+    this.useShim = config.shim !== false && Ext.useShims;
+    this.useDisplay = config.useDisplay;
+    this.hide();
+};
+
+var supr = Ext.Element.prototype;
+
+// shims are shared among layer to keep from having 100 iframes
+var shims = [];
+
+Ext.extend(Ext.Layer, Ext.Element, {
+
+    getZIndex : function(){
+        return this.zindex || parseInt((this.getShim() || this).getStyle('z-index'), 10) || 11000;
+    },
+
+    getShim : function(){
+        if(!this.useShim){
+            return null;
+        }
+        if(this.shim){
+            return this.shim;
+        }
+        var shim = shims.shift();
+        if(!shim){
+            shim = this.createShim();
+            shim.enableDisplayMode('block');
+            shim.dom.style.display = 'none';
+            shim.dom.style.visibility = 'visible';
+        }
+        var pn = this.dom.parentNode;
+        if(shim.dom.parentNode != pn){
+            pn.insertBefore(shim.dom, this.dom);
+        }
+        shim.setStyle('z-index', this.getZIndex()-2);
+        this.shim = shim;
+        return shim;
+    },
+
+    hideShim : function(){
+        if(this.shim){
+            this.shim.setDisplayed(false);
+            shims.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(show){
+        if(this.shadow){
+            this.shadowDisabled = false;
+            this.shadowOffset = this.lastShadowOffset;
+            delete this.lastShadowOffset;
+            if(show){
+                this.sync(true);
+            }
+        }
+    },
+
+    // private
+    // this code can execute repeatedly in milliseconds (i.e. during a drag) so
+    // code size was sacrificed for effeciency (e.g. no getBox/setBox, no XY calls)
+    sync : function(doShow){
+        var sw = this.shadow;
+        if(!this.updating && this.isVisible() && (sw || this.useShim)){
+            var sh = this.getShim();
+
+            var w = this.getWidth(),
+                h = this.getHeight();
+
+            var l = this.getLeft(true),
+                t = this.getTop(true);
+
+            if(sw && !this.shadowDisabled){
+                if(doShow && !sw.isVisible()){
+                    sw.show(this);
+                }else{
+                    sw.realign(l, t, w, h);
+                }
+                if(sh){
+                    if(doShow){
+                       sh.show();
+                    }
+                    // fit the shim behind the shadow, so it is shimmed too
+                    var a = sw.adjusts, s = sh.dom.style;
+                    s.left = (Math.min(l, l+a.l))+'px';
+                    s.top = (Math.min(t, t+a.t))+'px';
+                    s.width = (w+a.w)+'px';
+                    s.height = (h+a.h)+'px';
+                }
+            }else if(sh){
+                if(doShow){
+                   sh.show();
+                }
+                sh.setSize(w, h);
+                sh.setLeftTop(l, t);
+            }
+
+        }
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    beginUpdate : function(){
+        this.updating = true;
+    },
+
+    // private
+    endUpdate : function(){
+        this.updating = false;
+        this.sync(true);
+    },
+
+    // private
+    hideUnders : function(negOffset){
+        if(this.shadow){
+            this.shadow.hide();
+        }
+        this.hideShim();
+    },
+
+    // private
+    constrainXY : function(){
+        if(this.constrain){
+            var vw = Ext.lib.Dom.getViewWidth(),
+                vh = Ext.lib.Dom.getViewHeight();
+            var s = Ext.getDoc().getScroll();
+
+            var xy = this.getXY();
+            var x = xy[0], y = xy[1];
+            var so = this.shadowOffset;
+            var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so;
+            // only move it if it needs it
+            var moved = false;
+            // first validate right/bottom
+            if((x + w) > vw+s.left){
+                x = vw - w - so;
+                moved = true;
+            }
+            if((y + h) > vh+s.top){
+                y = vh - h - so;
+                moved = true;
+            }
+            // then make sure top/left isn't negative
+            if(x < s.left){
+                x = s.left;
+                moved = true;
+            }
+            if(y < s.top){
+                y = s.top;
+                moved = true;
+            }
+            if(moved){
+                if(this.avoidY){
+                    var ay = this.avoidY;
+                    if(y <= ay && (y+h) >= ay){
+                        y = ay-h-5;
+                    }
+                }
+                xy = [x, y];
+                this.storeXY(xy);
+                supr.setXY.call(this, xy);
+                this.sync();
+            }
+        }
+        return this;
+    },
+
+    isVisible : function(){
+        return this.visible;
+    },
+
+    // private
+    showAction : function(){
+        this.visible = true; // track visibility to prevent getStyle calls
+        if(this.useDisplay === true){
+            this.setDisplayed('');
+        }else if(this.lastXY){
+            supr.setXY.call(this, this.lastXY);
+        }else if(this.lastLT){
+            supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]);
+        }
+    },
+
+    // private
+    hideAction : function(){
+        this.visible = false;
+        if(this.useDisplay === true){
+            this.setDisplayed(false);
+        }else{
+            this.setLeftTop(-10000,-10000);
+        }
+    },
+
+    // overridden Element method
+    setVisible : function(v, a, d, c, e){
+        if(v){
+            this.showAction();
+        }
+        if(a && v){
+            var cb = function(){
+                this.sync(true);
+                if(c){
+                    c();
+                }
+            }.createDelegate(this);
+            supr.setVisible.call(this, true, true, d, cb, e);
+        }else{
+            if(!v){
+                this.hideUnders(true);
+            }
+            var cb = c;
+            if(a){
+                cb = function(){
+                    this.hideAction();
+                    if(c){
+                        c();
+                    }
+                }.createDelegate(this);
+            }
+            supr.setVisible.call(this, v, a, d, cb, e);
+            if(v){
+                this.sync(true);
+            }else if(!a){
+                this.hideAction();
+            }
+        }
+        return this;
+    },
+
+    storeXY : function(xy){
+        delete this.lastLT;
+        this.lastXY = xy;
+    },
+
+    storeLeftTop : function(left, top){
+        delete this.lastXY;
+        this.lastLT = [left, top];
+    },
+
+    // private
+    beforeFx : function(){
+        this.beforeAction();
+        return Ext.Layer.superclass.beforeFx.apply(this, arguments);
+    },
+
+    // private
+    afterFx : function(){
+        Ext.Layer.superclass.afterFx.apply(this, arguments);
+        this.sync(this.isVisible());
+    },
+
+    // private
+    beforeAction : function(){
+        if(!this.updating && this.shadow){
+            this.shadow.hide();
+        }
+    },
+
+    // overridden Element method
+    setLeft : function(left){
+        this.storeLeftTop(left, this.getTop(true));
+        supr.setLeft.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setTop : function(top){
+        this.storeLeftTop(this.getLeft(true), top);
+        supr.setTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setLeftTop : function(left, top){
+        this.storeLeftTop(left, top);
+        supr.setLeftTop.apply(this, arguments);
+        this.sync();
+        return this;
+    },
+
+    setXY : function(xy, a, d, c, e){
+        this.fixDisplay();
+        this.beforeAction();
+        this.storeXY(xy);
+        var cb = this.createCB(c);
+        supr.setXY.call(this, xy, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // private
+    createCB : function(c){
+        var el = this;
+        return function(){
+            el.constrainXY();
+            el.sync(true);
+            if(c){
+                c();
+            }
+        };
+    },
+
+    // overridden Element method
+    setX : function(x, a, d, c, e){
+        this.setXY([x, this.getY()], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setY : function(y, a, d, c, e){
+        this.setXY([this.getX(), y], a, d, c, e);
+        return this;
+    },
+
+    // overridden Element method
+    setSize : function(w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setSize.call(this, w, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setWidth : function(w, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setWidth.call(this, w, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setHeight : function(h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        supr.setHeight.call(this, h, a, d, cb, e);
+        if(!a){
+            cb();
+        }
+        return this;
+    },
+
+    // overridden Element method
+    setBounds : function(x, y, w, h, a, d, c, e){
+        this.beforeAction();
+        var cb = this.createCB(c);
+        if(!a){
+            this.storeXY([x, y]);
+            supr.setXY.call(this, [x, y]);
+            supr.setSize.call(this, w, h, a, d, cb, e);
+            cb();
+        }else{
+            supr.setBounds.call(this, x, y, w, h, a, d, cb, e);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically
+     * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow
+     * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index).
+     * @param {Number} zindex The new z-index to set
+     * @return {this} The Layer
+     */
+    setZIndex : function(zindex){
+        this.zindex = zindex;
+        this.setStyle('z-index', zindex + 2);
+        if(this.shadow){
+            this.shadow.setZIndex(zindex + 1);
+        }
+        if(this.shim){
+            this.shim.setStyle('z-index', zindex);
+        }
+        return this;
+    }
+});
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/LoadMask.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/LoadMask.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/LoadMask.js	(revision 625)
@@ -0,0 +1,123 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.LoadMask
+ * A simple utility class for generically masking elements while loading data.  If the {@link #store}
+ * config option is specified, the masking will be automatically synchronized with the store's loading
+ * process and the mask element will be cached for reuse.  For all other elements, this mask will replace the
+ * element's Updater load indicator and will be destroyed after the initial load.
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic mask:
+var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
+myMask.show();
+</code></pre>
+ * @constructor
+ * Create a new LoadMask
+ * @param {Mixed} el The element or DOM node, or its id
+ * @param {Object} config The config object
+ */
+Ext.LoadMask = function(el, config){
+    this.el = Ext.get(el);
+    Ext.apply(this, config);
+    if(this.store){
+        this.store.on('beforeload', this.onBeforeLoad, this);
+        this.store.on('load', this.onLoad, this);
+        this.store.on('exception', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, false);
+    }else{
+        var um = this.el.getUpdater();
+        um.showLoadIndicator = false; // disable the default indicator
+        um.on('beforeupdate', this.onBeforeLoad, this);
+        um.on('update', this.onLoad, this);
+        um.on('failure', this.onLoad, this);
+        this.removeMask = Ext.value(this.removeMask, true);
+    }
+};
+
+Ext.LoadMask.prototype = {
+    /**
+     * @cfg {Ext.data.Store} store
+     * Optional Store to which the mask is bound. The mask is displayed when a load request is issued, and
+     * hidden on either load sucess, or load fail.
+     */
+    /**
+     * @cfg {Boolean} removeMask
+     * True to create a single-use mask that is automatically destroyed after loading (useful for page loads),
+     * False to persist the mask element reference for multiple uses (e.g., for paged data widgets).  Defaults to false.
+     */
+    /**
+     * @cfg {String} msg
+     * The text to display in a centered loading message box (defaults to 'Loading...')
+     */
+    msg : 'Loading...',
+    /**
+     * @cfg {String} msgCls
+     * The CSS class to apply to the loading message element (defaults to "x-mask-loading")
+     */
+    msgCls : 'x-mask-loading',
+
+    /**
+     * Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false)
+     * @type Boolean
+     */
+    disabled: false,
+
+    /**
+     * Disables the mask to prevent it from being displayed
+     */
+    disable : function(){
+       this.disabled = true;
+    },
+
+    /**
+     * Enables the mask so that it can be displayed
+     */
+    enable : function(){
+        this.disabled = false;
+    },
+
+    // private
+    onLoad : function(){
+        this.el.unmask(this.removeMask);
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.disabled){
+            this.el.mask(this.msg, this.msgCls);
+        }
+    },
+
+    /**
+     * Show this LoadMask over the configured Element.
+     */
+    show: function(){
+        this.onBeforeLoad();
+    },
+
+    /**
+     * Hide this LoadMask.
+     */
+    hide: function(){
+        this.onLoad();
+    },
+
+    // private
+    destroy : function(){
+        if(this.store){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoad, this);
+        }else{
+            var um = this.el.getUpdater();
+            um.un('beforeupdate', this.onBeforeLoad, this);
+            um.un('update', this.onLoad, this);
+            um.un('failure', this.onLoad, this);
+        }
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/MessageBox.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/MessageBox.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/MessageBox.js	(revision 625)
@@ -0,0 +1,626 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.MessageBox
+ * <p>Utility class for generating different styles of message boxes.  The alias Ext.Msg can also be used.<p/>
+ * <p>Note that the MessageBox is asynchronous.  Unlike a regular JavaScript <code>alert</code> (which will halt
+ * browser execution), showing a MessageBox will not cause the code to stop.  For this reason, if you have code
+ * that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function
+ * (see the <code>function</code> parameter for {@link #show} for more details).</p>
+ * <p>Example usage:</p>
+ *<pre><code>
+// Basic alert:
+Ext.Msg.alert('Status', 'Changes saved successfully.');
+
+// Prompt for user data and process the result using a callback:
+Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
+    if (btn == 'ok'){
+        // process text value and close...
+    }
+});
+
+// Show a dialog using config options:
+Ext.Msg.show({
+   title:'Save Changes?',
+   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
+   buttons: Ext.Msg.YESNOCANCEL,
+   fn: processResult,
+   animEl: 'elId',
+   icon: Ext.MessageBox.QUESTION
+});
+</code></pre>
+ * @singleton
+ */
+Ext.MessageBox = function(){
+    var dlg, opt, mask, waitTimer;
+    var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl;
+    var buttons, activeTextEl, bwidth, iconCls = '';
+
+    // private
+    var handleButton = function(button){
+        if(dlg.isVisible()){
+            dlg.hide();
+            handleHide();
+            Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value, opt], 1);
+        }
+    };
+
+    // private
+    var handleHide = function(){
+        if(opt && opt.cls){
+            dlg.el.removeClass(opt.cls);
+        }
+        progressBar.reset();
+    };
+
+    // private
+    var handleEsc = function(d, k, e){
+        if(opt && opt.closable !== false){
+            dlg.hide();
+            handleHide();
+        }
+        if(e){
+            e.stopEvent();
+        }
+    };
+
+    // private
+    var updateButtons = function(b){
+        var width = 0;
+        if(!b){
+            buttons["ok"].hide();
+            buttons["cancel"].hide();
+            buttons["yes"].hide();
+            buttons["no"].hide();
+            return width;
+        }
+        dlg.footer.dom.style.display = '';
+        for(var k in buttons){
+            if(typeof buttons[k] != "function"){
+                if(b[k]){
+                    buttons[k].show();
+                    buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]);
+                    width += buttons[k].el.getWidth()+15;
+                }else{
+                    buttons[k].hide();
+                }
+            }
+        }
+        return width;
+    };
+
+    return {
+        /**
+         * Returns a reference to the underlying {@link Ext.Window} element
+         * @return {Ext.Window} The window
+         */
+        getDialog : function(titleText){
+           if(!dlg){
+                dlg = new Ext.Window({
+                    autoCreate : true,
+                    title:titleText,
+                    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(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){
+                            handleButton("no");
+                        }else{
+                            handleButton("cancel");
+                        }
+                    }
+                });
+                buttons = {};
+                var bt = this.buttonText;
+                //TODO: refactor this block into a buttons config to pass into the Window constructor
+                buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok"));
+                buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes"));
+                buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no"));
+                buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel"));
+                buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets';
+                dlg.render(document.body);
+                dlg.getEl().addClass('x-window-dlg');
+                mask = dlg.mask;
+                bodyEl = dlg.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>'
+                });
+                iconEl = Ext.get(bodyEl.dom.firstChild);
+                var contentEl = bodyEl.dom.childNodes[1];
+                msgEl = Ext.get(contentEl.firstChild);
+                textboxEl = Ext.get(contentEl.childNodes[2].firstChild);
+                textboxEl.enableDisplayMode();
+                textboxEl.addKeyListener([10,13], function(){
+                    if(dlg.isVisible() && opt && opt.buttons){
+                        if(opt.buttons.ok){
+                            handleButton("ok");
+                        }else if(opt.buttons.yes){
+                            handleButton("yes");
+                        }
+                    }
+                });
+                textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]);
+                textareaEl.enableDisplayMode();
+                progressBar = new Ext.ProgressBar({
+                    renderTo:bodyEl
+                });
+               bodyEl.createChild({cls:'x-clear'});
+            }
+            return dlg;
+        },
+
+        /**
+         * Updates the message box body text
+         * @param {String} text (optional) Replaces the message box element's innerHTML with the specified string (defaults to
+         * the XHTML-compliant non-breaking space character '&amp;#160;')
+         * @return {Ext.MessageBox} this
+         */
+        updateText : function(text){
+            if(!dlg.isVisible() && !opt.width){
+                dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows
+            }
+            msgEl.update(text || '&#160;');
+
+            var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0;
+            var mw = msgEl.getWidth() + msgEl.getMargins('lr');
+            var fw = dlg.getFrameWidth('lr');
+            var bw = dlg.body.getFrameWidth('lr');
+            if (Ext.isIE && iw > 0){
+                //3 pixels get subtracted in the icon CSS for an IE margin issue,
+                //so we have to add it back here for the overall width to be consistent
+                iw += 3;
+            }
+            var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth),
+                        Math.max(opt.minWidth || this.minWidth, bwidth || 0));
+
+            if(opt.prompt === true){
+                activeTextEl.setWidth(w-iw-fw-bw);
+            }
+            if(opt.progress === true || opt.wait === true){
+                progressBar.setSize(w-iw-fw-bw);
+            }
+            if(Ext.isIE && w == bwidth){
+                w += 4; //Add offset when the content width is smaller than the buttons.    
+            }
+            dlg.setSize(w, 'auto').center();
+            return this;
+        },
+
+        /**
+         * Updates a progress-style message box's text and progress bar. Only relevant on message boxes
+         * initiated via {@link Ext.MessageBox#progress} or {@link Ext.MessageBox#wait},
+         * or by calling {@link Ext.MessageBox#show} with progress: true.
+         * @param {Number} value Any number between 0 and 1 (e.g., .5, defaults to 0)
+         * @param {String} progressText The progress text to display inside the progress bar (defaults to '')
+         * @param {String} msg The message box's body text is replaced with the specified string (defaults to undefined
+         * so that any existing body text will not get overwritten by default unless a new value is passed in)
+         * @return {Ext.MessageBox} this
+         */
+        updateProgress : function(value, progressText, msg){
+            progressBar.updateProgress(value, progressText);
+            if(msg){
+                this.updateText(msg);
+            }
+            return this;
+        },
+
+        /**
+         * Returns true if the message box is currently displayed
+         * @return {Boolean} True if the message box is visible, else false
+         */
+        isVisible : function(){
+            return dlg && dlg.isVisible();
+        },
+
+        /**
+         * Hides the message box if it is displayed
+         * @return {Ext.MessageBox} this
+         */
+        hide : function(){
+            var proxy = dlg ? dlg.activeGhost : null;
+            if(this.isVisible() || proxy){
+                dlg.hide();
+                handleHide();
+                if (proxy){
+                    // unghost is a private function, but i saw no better solution
+                    // to fix the locking problem when dragging while it closes
+                    dlg.unghost(false, false);
+                } 
+            }
+            return this;
+        },
+
+        /**
+         * Displays a new message box, or reinitializes an existing message box, based on the config options
+         * passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,
+         * although those calls are basic shortcuts and do not support all of the config options allowed here.
+         * @param {Object} config The following config options are supported: <ul>
+         * <li><b>animEl</b> : String/Element<div class="sub-desc">An id or Element from which the message box should animate as it
+         * opens and closes (defaults to undefined)</div></li>
+         * <li><b>buttons</b> : Object/Boolean<div class="sub-desc">A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
+         * cancel:'Bar'}), or false to not show any buttons (defaults to false)</div></li>
+         * <li><b>closable</b> : Boolean<div class="sub-desc">False to hide the top-right close button (defaults to true). Note that
+         * progress and wait dialogs will ignore this property and always hide the close button as they can only
+         * be closed programmatically.</div></li>
+         * <li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>
+         * <li><b>defaultTextHeight</b> : Number<div class="sub-desc">The default height in pixels of the message box's multiline textarea
+         * if displayed (defaults to 75)</div></li>
+         * <li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either
+         * by clicking on the configured buttons, or on the dialog close button, or by pressing
+         * the return button to enter input.
+         * <p>Progress and wait dialogs will ignore this option since they do not respond to user
+         * actions and can only be closed programmatically, so any required function should be called
+         * by the same code after it closes the dialog. Parameters passed:<ul>
+         * <li><b>buttonId</b> : String<div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul>
+         * <li><tt>ok</tt></li>
+         * <li><tt>yes</tt></li>
+         * <li><tt>no</tt></li>
+         * <li><tt>cancel</tt></li>
+         * </ul></div></div></li>
+         * <li><b>text</b> : String<div class="sub-desc">Value of the input field if either <tt><a href="#show-option-prompt" ext:member="show-option-prompt" ext:cls="Ext.MessageBox">prompt</a></tt>
+         * or <tt><a href="#show-option-multiline" ext:member="show-option-multiline" ext:cls="Ext.MessageBox">multiline</a></tt> is true</div></li>
+         * <li><b>opt</b> : Object<div class="sub-desc">The config object passed to show.</div></li>
+         * </ul></p></div></li>
+         * <li><b>scope</b> : Object<div class="sub-desc">The scope of the callback function</div></li>
+         * <li><b>icon</b> : String<div class="sub-desc">A CSS class that provides a background image to be used as the body icon for the
+         * dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')</div></li>
+         * <li><b>iconCls</b> : String<div class="sub-desc">The standard {@link Ext.Window#iconCls} to
+         * add an optional header icon (defaults to '')</div></li>
+         * <li><b>maxWidth</b> : Number<div class="sub-desc">The maximum width in pixels of the message box (defaults to 600)</div></li>
+         * <li><b>minWidth</b> : Number<div class="sub-desc">The minimum width in pixels of the message box (defaults to 100)</div></li>
+         * <li><b>modal</b> : Boolean<div class="sub-desc">False to allow user interaction with the page while the message box is
+         * displayed (defaults to true)</div></li>
+         * <li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the
+         * XHTML-compliant non-breaking space character '&amp;#160;')</div></li>
+         * <li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">
+         * True to prompt the user to enter multi-line text (defaults to false)</div></li>
+         * <li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>
+         * <li><a id="show-option-prompt"></a><b>prompt</b> : Boolean<div class="sub-desc">True to prompt the user to enter single-line text (defaults to false)</div></li>
+         * <li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>
+         * <li><b>title</b> : String<div class="sub-desc">The title text</div></li>
+         * <li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>
+         * <li><b>wait</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>
+         * <li><b>waitConfig</b> : Object<div class="sub-desc">A {@link Ext.ProgressBar#waitConfig} object (applies only if wait = true)</div></li>
+         * <li><b>width</b> : Number<div class="sub-desc">The width of the dialog in pixels</div></li>
+         * </ul>
+         * Example usage:
+         * <pre><code>
+Ext.Msg.show({
+   title: 'Address',
+   msg: 'Please enter your address:',
+   width: 300,
+   buttons: Ext.MessageBox.OKCANCEL,
+   multiline: true,
+   fn: saveAddress,
+   animEl: 'addAddressBtn',
+   icon: Ext.MessageBox.INFO
+});
+</code></pre>
+         * @return {Ext.MessageBox} this
+         */
+        show : function(options){
+            if(this.isVisible()){
+                this.hide();
+            }
+            opt = options;
+            var d = this.getDialog(opt.title || "&#160;");
+
+            d.setTitle(opt.title || "&#160;");
+            var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true);
+            d.tools.close.setDisplayed(allowClose);
+            activeTextEl = textboxEl;
+            opt.prompt = opt.prompt || (opt.multiline ? true : false);
+            if(opt.prompt){
+                if(opt.multiline){
+                    textboxEl.hide();
+                    textareaEl.show();
+                    textareaEl.setHeight(typeof opt.multiline == "number" ?
+                        opt.multiline : this.defaultTextHeight);
+                    activeTextEl = textareaEl;
+                }else{
+                    textboxEl.show();
+                    textareaEl.hide();
+                }
+            }else{
+                textboxEl.hide();
+                textareaEl.hide();
+            }
+            activeTextEl.dom.value = opt.value || "";
+            if(opt.prompt){
+                d.focusEl = activeTextEl;
+            }else{
+                var bs = opt.buttons;
+                var db = null;
+                if(bs && bs.ok){
+                    db = buttons["ok"];
+                }else if(bs && bs.yes){
+                    db = buttons["yes"];
+                }
+                if (db){
+                    d.focusEl = db;
+                }
+            }
+            if(opt.iconCls){
+              d.setIconClass(opt.iconCls);
+            }
+            this.setIcon(opt.icon);
+            if(opt.cls){
+                d.el.addClass(opt.cls);
+            }
+            d.proxyDrag = opt.proxyDrag === true;
+            d.modal = opt.modal !== false;
+            d.mask = opt.modal !== false ? mask : false;
+            
+            d.on('show', function(){
+                //workaround for window internally enabling keymap in afterShow
+                d.keyMap.setDisabled(allowClose !== true);
+                d.doLayout();
+                this.setIcon(opt.icon);
+                bwidth = updateButtons(opt.buttons);
+                progressBar.setVisible(opt.progress === true || opt.wait === true);
+                this.updateProgress(0, opt.progressText);
+                this.updateText(opt.msg);
+                if(opt.wait === true){
+                    progressBar.wait(opt.waitConfig);
+                }
+
+            }, this, {single:true});
+            if(!d.isVisible()){
+                // force it to the end of the z-index stack so it gets a cursor in FF
+                document.body.appendChild(dlg.el.dom);
+                d.setAnimateTarget(opt.animEl);
+                d.show(opt.animEl);
+            }
+            return this;
+        },
+
+        /**
+         * Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default
+         * styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')
+         * to clear any existing icon.  The following built-in icon classes are supported, but you can also pass
+         * in a custom class name:
+         * <pre>
+Ext.MessageBox.INFO
+Ext.MessageBox.WARNING
+Ext.MessageBox.QUESTION
+Ext.MessageBox.ERROR
+         *</pre>
+         * @param {String} icon A CSS classname specifying the icon's background image url, or empty string to clear the icon
+         * @return {Ext.MessageBox} this
+         */
+        setIcon : function(icon){
+            if(icon && icon != ''){
+                iconEl.removeClass('x-hidden');
+                iconEl.replaceClass(iconCls, icon);
+                bodyEl.addClass('x-dlg-icon');
+                iconCls = icon;
+            }else{
+                iconEl.replaceClass(iconCls, 'x-hidden');
+                bodyEl.removeClass('x-dlg-icon');
+                iconCls = '';
+            }
+            return this;
+        },
+
+        /**
+         * Displays a message box with a progress bar.  This message box has no buttons and is not closeable by
+         * the user.  You are responsible for updating the progress bar as needed via {@link Ext.MessageBox#updateProgress}
+         * and closing the message box when the process is complete.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {String} progressText (optional) The text to display inside the progress bar (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        progress : function(title, msg, progressText){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                progress:true,
+                closable:false,
+                minWidth: this.minProgressWidth,
+                progressText: progressText
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user
+         * interaction while waiting for a long-running process to complete that does not have defined intervals.
+         * You are responsible for closing the message box when the process is complete.
+         * @param {String} msg The message box body text
+         * @param {String} title (optional) The title bar text
+         * @param {Object} config (optional) A {@link Ext.ProgressBar#waitConfig} object
+         * @return {Ext.MessageBox} this
+         */
+        wait : function(msg, title, config){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: false,
+                closable:false,
+                wait:true,
+                modal:true,
+                minWidth: this.minProgressWidth,
+                waitConfig: config
+            });
+            return this;
+        },
+
+        /**
+         * Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).
+         * If a callback function is passed it will be called after the user clicks the button, and the
+         * id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        alert : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OK,
+                fn: fn,
+                scope : scope
+            });
+            return this;
+        },
+
+        /**
+         * Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).
+         * If a callback function is passed it will be called after the user clicks either button,
+         * and the id of the button that was clicked will be passed as the only parameter to the callback
+         * (could also be the top-right close button).
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @return {Ext.MessageBox} this
+         */
+        confirm : function(title, msg, fn, scope){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.YESNO,
+                fn: fn,
+                scope : scope,
+                icon: this.QUESTION
+            });
+            return this;
+        },
+
+        /**
+         * Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).
+         * The prompt can be a single-line or multi-line textbox.  If a callback function is passed it will be called after the user
+         * clicks either button, and the id of the button that was clicked (could also be the top-right
+         * close button) and the text that was entered will be passed as the two parameters to the callback.
+         * @param {String} title The title bar text
+         * @param {String} msg The message box body text
+         * @param {Function} fn (optional) The callback function invoked after the message box is closed
+         * @param {Object} scope (optional) The scope of the callback function
+         * @param {Boolean/Number} multiline (optional) True to create a multiline textbox using the defaultTextHeight
+         * property, or the height in pixels to create the textbox (defaults to false / single-line)
+         * @param {String} value (optional) Default value of the text input element (defaults to '')
+         * @return {Ext.MessageBox} this
+         */
+        prompt : function(title, msg, fn, scope, multiline, value){
+            this.show({
+                title : title,
+                msg : msg,
+                buttons: this.OKCANCEL,
+                fn: fn,
+                minWidth:250,
+                scope : scope,
+                prompt:true,
+                multiline: multiline,
+                value: value
+            });
+            return this;
+        },
+
+        /**
+         * Button config that displays a single OK button
+         * @type Object
+         */
+        OK : {ok:true},
+        /**
+         * Button config that displays a single Cancel button
+         * @type Object
+         */
+        CANCEL : {cancel:true},
+        /**
+         * Button config that displays OK and Cancel buttons
+         * @type Object
+         */
+        OKCANCEL : {ok:true, cancel:true},
+        /**
+         * Button config that displays Yes and No buttons
+         * @type Object
+         */
+        YESNO : {yes:true, no:true},
+        /**
+         * Button config that displays Yes, No and Cancel buttons
+         * @type Object
+         */
+        YESNOCANCEL : {yes:true, no:true, cancel:true},
+        /**
+         * The CSS class that provides the INFO icon image
+         * @type String
+         */
+        INFO : 'ext-mb-info',
+        /**
+         * The CSS class that provides the WARNING icon image
+         * @type String
+         */
+        WARNING : 'ext-mb-warning',
+        /**
+         * The CSS class that provides the QUESTION icon image
+         * @type String
+         */
+        QUESTION : 'ext-mb-question',
+        /**
+         * The CSS class that provides the ERROR icon image
+         * @type String
+         */
+        ERROR : 'ext-mb-error',
+
+        /**
+         * The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)
+         * @type Number
+         */
+        defaultTextHeight : 75,
+        /**
+         * The maximum width in pixels of the message box (defaults to 600)
+         * @type Number
+         */
+        maxWidth : 600,
+        /**
+         * The minimum width in pixels of the message box (defaults to 110)
+         * @type Number
+         */
+        minWidth : 110,
+        /**
+         * The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful
+         * for setting a different minimum width than text-only dialogs may need (defaults to 250)
+         * @type Number
+         */
+        minProgressWidth : 250,
+        /**
+         * An object containing the default button text strings that can be overriden for localized language support.
+         * Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific
+         * resource file for handling language support across the framework.
+         * Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french
+         * @type Object
+         */
+        buttonText : {
+            ok : "OK",
+            cancel : "Cancel",
+            yes : "Yes",
+            no : "No"
+        }
+    };
+}();
+
+/**
+ * Shorthand for {@link Ext.MessageBox}
+ */
+Ext.Msg = Ext.MessageBox;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PagingToolbar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PagingToolbar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PagingToolbar.js	(revision 625)
@@ -0,0 +1,502 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.PagingToolbar
+ * @extends Ext.Toolbar
+ * <p>As the amount of records increases, the time required for the browser to render
+ * them increases. Paging is used to reduce the amount of data exchanged with the client.
+ * Note: if there are more records/rows than can be viewed in the available screen area, vertical
+ * scrollbars will be added.</p>
+ * <p>Paging is typically handled on the server side (see exception below). The client sends
+ * parameters to the server side, which the server needs to interpret and then respond with the
+ * approprate data.</p>
+ * <p><b>Ext.PagingToolbar</b> is a specialized toolbar that is bound to a {@link Ext.data.Store}
+ * and provides automatic paging control. This Component {@link Ext.data.Store#load load}s blocks
+ * of data into the <tt>{@link #store}</tt> by passing {@link Ext.data.Store#paramNames paramNames} used for
+ * paging criteria.</p>
+ * <p>PagingToolbar is typically used as one of the Grid's toolbars:</p>
+ * <pre><code>
+Ext.QuickTips.init(); // to display button quicktips
+
+var myStore = new Ext.data.Store({
+    ...
+});
+
+var myPageSize = 25;  // server script should only send back 25 items
+
+var grid = new Ext.grid.GridPanel({
+    ...
+    store: myStore,
+    bbar: new Ext.PagingToolbar({
+        {@link #store}: myStore,       // grid and PagingToolbar using same store
+        {@link #displayInfo}: true,
+        {@link #pageSize}: myPageSize,
+        {@link #prependButtons}: true,
+        items: [
+            'text 1'
+        ]
+    })
+});
+ * </code></pre>
+ *
+ * <p>To use paging, pass the paging requirements to the server when the store is first loaded.</p>
+ * <pre><code>
+store.load({
+    params: {
+        start: 0,          // specify params for the first page load if using paging
+        limit: myPageSize,
+        foo:   'bar'
+    }
+});
+ * </code></pre>
+ * <p><u>Paging with Local Data</u></p>
+ * <p>Paging can also be accomplished with local data using extensions:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><a href="http://extjs.com/forum/showthread.php?t=57386">Ext.ux.data.PagingStore</a></li>
+ * <li>Paging Memory Proxy (examples/ux/PagingMemoryProxy.js)</li>
+ * </ul></div>
+ * @constructor
+ * Create a new PagingToolbar
+ * @param {Object} config The config object
+ * @xtype paging
+ */
+(function() {
+
+var T = Ext.Toolbar;
+
+Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
+    /**
+     * @cfg {Ext.data.Store} store
+     * The {@link Ext.data.Store} the paging toolbar should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} displayInfo
+     * <tt>true</tt> to display the displayMsg (defaults to <tt>false</tt>)
+     */
+    /**
+     * @cfg {Number} pageSize
+     * The number of records to display per page (defaults to <tt>20</tt>)
+     */
+    pageSize : 20,
+    /**
+     * @cfg {Boolean} prependButtons
+     * <tt>true</tt> to insert any configured <tt>items</tt> <i>before</i> the paging buttons.
+     * Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} displayMsg
+     * The paging status message to display (defaults to <tt>'Displaying {0} - {1} of {2}'</tt>).
+     * Note that this string is formatted using the braced numbers <tt>{0}-{2}</tt> as tokens
+     * that are replaced by the values for start, end and total respectively. These tokens should
+     * be preserved when overriding this string if showing those values is desired.
+     */
+    displayMsg : 'Displaying {0} - {1} of {2}',
+    /**
+     * @cfg {String} emptyMsg
+     * The message to display when no records are found (defaults to 'No data to display')
+     */
+    emptyMsg : 'No data to display',
+    /**
+     * @cfg {String} beforePageText
+     * The text displayed before the input item (defaults to <tt>'Page'</tt>).
+     */
+    beforePageText : 'Page',
+    /**
+     * @cfg {String} afterPageText
+     * Customizable piece of the default paging text (defaults to <tt>'of {0}'</tt>). Note that
+     * this string is formatted using <tt>{0}</tt> as a token that is replaced by the number of
+     * total pages. This token should be preserved when overriding this string if showing the
+     * total page count is desired.
+     */
+    afterPageText : 'of {0}',
+    /**
+     * @cfg {String} firstText
+     * The quicktip text displayed for the first page button (defaults to <tt>'First Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    firstText : 'First Page',
+    /**
+     * @cfg {String} prevText
+     * The quicktip text displayed for the previous page button (defaults to <tt>'Previous Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    prevText : 'Previous Page',
+    /**
+     * @cfg {String} nextText
+     * The quicktip text displayed for the next page button (defaults to <tt>'Next Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    nextText : 'Next Page',
+    /**
+     * @cfg {String} lastText
+     * The quicktip text displayed for the last page button (defaults to <tt>'Last Page'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    lastText : 'Last Page',
+    /**
+     * @cfg {String} refreshText
+     * The quicktip text displayed for the Refresh button (defaults to <tt>'Refresh'</tt>).
+     * <b>Note</b>: quick tips must be initialized for the quicktip to show.
+     */
+    refreshText : 'Refresh',
+
+    /**
+     * @deprecated
+     * <b>The defaults for these should be set in the data store.</b>
+     * Object mapping of parameter names used for load calls, initially set to:
+     * <pre>{start: 'start', limit: 'limit'}</pre>
+     */
+
+    /**
+     * The number of records to display per page.  See also <tt>{@link #cursor}</tt>.
+     * @type Number
+     * @property pageSize
+     */
+
+    /**
+     * Indicator for the record position.  This property might be used to get the active page
+     * number for example:<pre><code>
+     * // t is reference to the paging toolbar instance
+     * var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
+     * </code></pre>
+     * @type Number
+     * @property cursor
+     */
+
+    initComponent : function(){
+        var pagingItems = [this.first = new T.Button({
+            tooltip: this.firstText,
+            overflowText: this.firstText,
+            iconCls: 'x-tbar-page-first',
+            disabled: true,
+            handler: this.moveFirst,
+            scope: this
+        }), this.prev = new T.Button({
+            tooltip: this.prevText,
+            overflowText: this.prevText,
+            iconCls: 'x-tbar-page-prev',
+            disabled: true,
+            handler: this.movePrevious,
+            scope: this
+        }), '-', this.beforePageText,
+        this.inputItem = new Ext.form.NumberField({
+            cls: 'x-tbar-page-number',
+            allowDecimals: false,
+            allowNegative: false,
+            enableKeyEvents: true,
+            selectOnFocus: true,
+            listeners: {
+                scope: this,
+                keydown: this.onPagingKeyDown,
+                blur: this.onPagingBlur
+            }
+        }), this.afterTextItem = new T.TextItem({
+            text: String.format(this.afterPageText, 1)
+        }), '-', this.next = new T.Button({
+            tooltip: this.nextText,
+            overflowText: this.nextText,
+            iconCls: 'x-tbar-page-next',
+            disabled: true,
+            handler: this.moveNext,
+            scope: this
+        }), this.last = new T.Button({
+            tooltip: this.lastText,
+            overflowText: this.lastText,
+            iconCls: 'x-tbar-page-last',
+            disabled: true,
+            handler: this.moveLast,
+            scope: this
+        }), '-', this.refresh = new T.Button({
+            tooltip: this.refreshText,
+            overflowText: this.refreshText,
+            iconCls: 'x-tbar-loading',
+            handler: this.refresh,
+            scope: this
+        })];
+
+
+        var userItems = this.items || this.buttons || [];
+        if (this.prependButtons) {
+            this.items = userItems.concat(pagingItems);
+        }else{
+            this.items = pagingItems.concat(userItems);
+        }
+        delete this.buttons;
+        if(this.displayInfo){
+            this.items.push('->');
+            this.items.push(this.displayItem = new T.TextItem({}));
+        }
+        Ext.PagingToolbar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event change
+             * Fires after the active page has been changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} pageData An object that has these properties:<ul>
+             * <li><code>total</code> : Number <div class="sub-desc">The total number of records in the dataset as
+             * returned by the server</div></li>
+             * <li><code>activePage</code> : Number <div class="sub-desc">The current page number</div></li>
+             * <li><code>pages</code> : Number <div class="sub-desc">The total number of pages (calculated from
+             * the total number of records in the dataset as returned by the server and the current {@link #pageSize})</div></li>
+             * </ul>
+             */
+            'change',
+            /**
+             * @event beforechange
+             * Fires just before the active page is changed.
+             * Return false to prevent the active page from being changed.
+             * @param {Ext.PagingToolbar} this
+             * @param {Object} params An object hash of the parameters which the PagingToolbar will send when
+             * loading the required page. This will contain:<ul>
+             * <li><code>start</code> : Number <div class="sub-desc">The starting row number for the next page of records to
+             * be retrieved from the server</div></li>
+             * <li><code>limit</code> : Number <div class="sub-desc">The number of records to be retrieved from the server</div></li>
+             * </ul>
+             * <p>(note: the names of the <b>start</b> and <b>limit</b> properties are determined
+             * by the store's {@link Ext.data.Store#paramNames paramNames} property.)</p>
+             * <p>Parameters may be added as required in the event handler.</p>
+             */
+            'beforechange'
+        );
+        this.on('afterlayout', this.onFirstLayout, this, {single: true});
+        this.cursor = 0;
+        this.bindStore(this.store);
+    },
+
+    // private
+    onFirstLayout : function(){
+        if(this.dsLoaded){
+            this.onLoad.apply(this, this.dsLoaded);
+        }
+    },
+
+    // private
+    updateInfo : function(){
+        if(this.displayItem){
+            var count = this.store.getCount();
+            var msg = count == 0 ?
+                this.emptyMsg :
+                String.format(
+                    this.displayMsg,
+                    this.cursor+1, this.cursor+count, this.store.getTotalCount()
+                );
+            this.displayItem.setText(msg);
+        }
+    },
+
+    // private
+    onLoad : function(store, r, o){
+        if(!this.rendered){
+            this.dsLoaded = [store, r, o];
+            return;
+        }
+        var p = this.getParams();
+        this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0;
+        var d = this.getPageData(), ap = d.activePage, ps = d.pages;
+
+        this.afterTextItem.setText(String.format(this.afterPageText, d.pages));
+        this.inputItem.setValue(ap);
+        this.first.setDisabled(ap == 1);
+        this.prev.setDisabled(ap == 1);
+        this.next.setDisabled(ap == ps);
+        this.last.setDisabled(ap == ps);
+        this.refresh.enable();
+        this.updateInfo();
+        this.fireEvent('change', this, d);
+    },
+
+    // private
+    getPageData : function(){
+        var total = this.store.getTotalCount();
+        return {
+            total : total,
+            activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize),
+            pages :  total < this.pageSize ? 1 : Math.ceil(total/this.pageSize)
+        };
+    },
+
+    /**
+     * Change the active page
+     * @param {Integer} page The page to display
+     */
+    changePage : function(page){
+        this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount()));
+    },
+
+    // private
+    onLoadError : function(){
+        if(!this.rendered){
+            return;
+        }
+        this.refresh.enable();
+    },
+
+    // private
+    readPage : function(d){
+        var v = this.inputItem.getValue(), pageNum;
+        if (!v || isNaN(pageNum = parseInt(v, 10))) {
+            this.inputItem.setValue(d.activePage);
+            return false;
+        }
+        return pageNum;
+    },
+
+    onPagingFocus : function(){
+        this.inputItem.select();
+    },
+
+    //private
+    onPagingBlur : function(e){
+        this.inputItem.setValue(this.getPageData().activePage);
+    },
+
+    // private
+    onPagingKeyDown : function(field, e){
+        var k = e.getKey(), d = this.getPageData(), pageNum;
+        if (k == e.RETURN) {
+            e.stopEvent();
+            pageNum = this.readPage(d);
+            if(pageNum !== false){
+                pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1;
+                this.doLoad(pageNum * this.pageSize);
+            }
+        }else if (k == e.HOME || k == e.END){
+            e.stopEvent();
+            pageNum = k == e.HOME ? 1 : d.pages;
+            field.setValue(pageNum);
+        }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){
+            e.stopEvent();
+            if((pageNum = this.readPage(d))){
+                var increment = e.shiftKey ? 10 : 1;
+                if(k == e.DOWN || k == e.PAGEDOWN){
+                    increment *= -1;
+                }
+                pageNum += increment;
+                if(pageNum >= 1 & pageNum <= d.pages){
+                    field.setValue(pageNum);
+                }
+            }
+        }
+    },
+
+    // private
+    getParams : function(){
+        //retain backwards compat, allow params on the toolbar itself, if they exist.
+        return this.paramNames || this.store.paramNames;
+    },
+
+    // private
+    beforeLoad : function(){
+        if(this.rendered && this.refresh){
+            this.refresh.disable();
+        }
+    },
+
+    // private
+    doLoad : function(start){
+        var o = {}, pn = this.getParams();
+        o[pn.start] = start;
+        o[pn.limit] = this.pageSize;
+        if(this.fireEvent('beforechange', this, o) !== false){
+            this.store.load({params:o});
+        }
+    },
+
+    /**
+     * Move to the first page, has the same effect as clicking the 'first' button.
+     */
+    moveFirst : function(){
+        this.doLoad(0);
+    },
+
+    /**
+     * Move to the previous page, has the same effect as clicking the 'previous' button.
+     */
+    movePrevious : function(){
+        this.doLoad(Math.max(0, this.cursor-this.pageSize));
+    },
+
+    /**
+     * Move to the next page, has the same effect as clicking the 'next' button.
+     */
+    moveNext : function(){
+        this.doLoad(this.cursor+this.pageSize);
+    },
+
+    /**
+     * Move to the last page, has the same effect as clicking the 'last' button.
+     */
+    moveLast : function(){
+        var total = this.store.getTotalCount(),
+            extra = total % this.pageSize;
+
+        this.doLoad(extra ? (total - extra) : total - this.pageSize);
+    },
+
+    /**
+     * Refresh the current page, has the same effect as clicking the 'refresh' button.
+     */
+    refresh : function(){
+        this.doLoad(this.cursor);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store}
+     * @param {Store} store The store to bind to this toolbar
+     * @param {Boolean} initial (Optional) true to not remove listeners
+     */
+    bindStore : function(store, initial){
+        var doLoad;
+        if(!initial && this.store){
+            this.store.un('beforeload', this.beforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.onLoadError, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                beforeload: this.beforeLoad,
+                load: this.onLoad,
+                exception: this.onLoadError
+            });
+            doLoad = store.getCount() > 0;
+        }
+        this.store = store;
+        if(doLoad){
+            this.onLoad(store, null, {});
+        }
+    },
+
+    /**
+     * Unbinds the paging toolbar from the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to unbind
+     */
+    unbind : function(store){
+        this.bindStore(null);
+    },
+
+    /**
+     * Binds the paging toolbar to the specified {@link Ext.data.Store} <b>(deprecated)</b>
+     * @param {Ext.data.Store} store The data store to bind
+     */
+    bind : function(store){
+        this.bindStore(store);
+    },
+
+    // private
+    onDestroy : function(){
+        this.bindStore(null);
+        Ext.PagingToolbar.superclass.onDestroy.call(this);
+    }
+});
+
+})();
+Ext.reg('paging', Ext.PagingToolbar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Panel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Panel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Panel.js	(revision 625)
@@ -0,0 +1,1772 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Panel
+ * @extends Ext.Container
+ * <p>Panel is a container that has specific functionality and structural components that make
+ * it the perfect building block for application-oriented user interfaces.</p>
+ * <p>Panels are, by virtue of their inheritance from {@link Ext.Container}, capable
+ * of being configured with a {@link Ext.Container#layout layout}, and containing child Components.</p>
+ * <p>When either specifying child {@link Ext.Component#items items} of a Panel, or dynamically {@link Ext.Container#add adding} Components
+ * to a Panel, remember to consider how you wish the Panel to arrange those child elements, and whether
+ * those child elements need to be sized using one of Ext's built-in <tt><b>{@link Ext.Container#layout layout}</b></tt> schemes. By
+ * default, Panels use the {@link Ext.layout.ContainerLayout ContainerLayout} scheme. This simply renders
+ * child components, appending them one after the other inside the Container, and <b>does not apply any sizing</b>
+ * at all.</p>
+ * <p>A Panel may also contain {@link #bbar bottom} and {@link #tbar top} toolbars, along with separate
+ * {@link #header}, {@link #footer} and {@link #body} sections (see {@link #frame} for additional
+ * information).</p>
+ * <p>Panel also provides built-in {@link #collapsible expandable and collapsible behavior}, along with
+ * a variety of {@link #tools prebuilt tool buttons} that can be wired up to provide other customized
+ * behavior.  Panels can be easily dropped into any {@link Ext.Container Container} or layout, and the
+ * layout and rendering pipeline is {@link Ext.Container#add completely managed by the framework}.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype panel
+ */
+Ext.Panel = Ext.extend(Ext.Container, {
+    /**
+     * The Panel's header {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the {@link #title} and {@link #tools}</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property header
+     */
+    /**
+     * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content.
+     * The content may be specified in the {@link #html} config, or it may be loaded using the
+     * {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only.
+     * <p>If this is used to load visible HTML elements in either way, then
+     * the Panel may not be used as a Layout for hosting nested Panels.</p>
+     * <p>If this Panel is intended to be used as the host of a Layout (See {@link #layout}
+     * then the body Element must not be loaded or changed - it is under the control
+     * of the Panel's Layout.
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property body
+     */
+    /**
+     * The Panel's bwrap {@link Ext.Element Element} used to contain other Panel elements
+     * (tbar, body, bbar, footer). See {@link #bodyCfg}. Read-only.
+     * @type Ext.Element
+     * @property bwrap
+     */
+    /**
+     * True if this panel is collapsed. Read-only.
+     * @type Boolean
+     * @property collapsed
+     */
+    /**
+     * @cfg {Object} bodyCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object may be specified for any
+     * Panel Element.</p>
+     * <p>By default, the Default element in the table below will be used for the html markup to
+     * create a child element with the commensurate Default class name (<tt>baseCls</tt> will be
+     * replaced by <tt>{@link #baseCls}</tt>):</p>
+     * <pre>
+     * Panel      Default  Default             Custom      Additional       Additional
+     * Element    element  class               element     class            style
+     * ========   ==========================   =========   ==============   ===========
+     * {@link #header}     div      {@link #baseCls}+'-header'   {@link #headerCfg}   headerCssClass   headerStyle
+     * {@link #bwrap}      div      {@link #baseCls}+'-bwrap'     {@link #bwrapCfg}    bwrapCssClass    bwrapStyle
+     * + tbar     div      {@link #baseCls}+'-tbar'       {@link #tbarCfg}     tbarCssClass     tbarStyle
+     * + {@link #body}     div      {@link #baseCls}+'-body'       {@link #bodyCfg}     {@link #bodyCssClass}     {@link #bodyStyle}
+     * + bbar     div      {@link #baseCls}+'-bbar'       {@link #bbarCfg}     bbarCssClass     bbarStyle
+     * + {@link #footer}   div      {@link #baseCls}+'-footer'   {@link #footerCfg}   footerCssClass   footerStyle
+     * </pre>
+     * <p>Configuring a Custom element may be used, for example, to force the {@link #body} Element
+     * to use a different form of markup than is created by default. An example of this might be
+     * to {@link Ext.Element#createChild create a child} Panel containing a custom content, such as
+     * a header, or forcing centering of all Panel content by having the body be a &lt;center&gt;
+     * element:</p>
+     * <pre><code>
+new Ext.Panel({
+    title: 'Message Title',
+    renderTo: Ext.getBody(),
+    width: 200, height: 130,
+    <b>bodyCfg</b>: {
+        tag: 'center',
+        cls: 'x-panel-body',  // Default class not applied if Custom element specified
+        html: 'Message'
+    },
+    footerCfg: {
+        tag: 'h2',
+        cls: 'x-panel-footer'        // same as the Default class
+        html: 'footer html'
+    },
+    footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass}
+    footerStyle:    'background-color:red' // see {@link #bodyStyle}
+});
+     * </code></pre>
+     * <p>The example above also explicitly creates a <tt>{@link #footer}</tt> with custom markup and
+     * styling applied.</p>
+     */
+    /**
+     * @cfg {Object} headerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #header} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bwrapCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bwrap} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} tbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #tbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} bbarCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #bbar} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Object} footerCfg
+     * <p>A {@link Ext.DomHelper DomHelper} element specification object specifying the element structure
+     * of this Panel's {@link #footer} Element.  See <tt>{@link #bodyCfg}</tt> also.</p>
+     */
+    /**
+     * @cfg {Boolean} closable
+     * Panels themselves do not directly support being closed, but some Panel subclasses do (like
+     * {@link Ext.Window}) or a Panel Class within an {@link Ext.TabPanel}.  Specify <tt>true</tt>
+     * to enable closing in such situations. Defaults to <tt>false</tt>.
+     */
+    /**
+     * The Panel's footer {@link Ext.Element Element}. Read-only.
+     * <p>This Element is used to house the Panel's <tt>{@link #buttons}</tt> or <tt>{@link #fbar}</tt>.</p>
+     * <br><p><b>Note</b>: see the Note for <tt>{@link Ext.Component#el el} also.</p>
+     * @type Ext.Element
+     * @property footer
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * <p>The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in
+     * the document that specifies some panel-specific structural markup.  When <tt>applyTo</tt> is used,
+     * constituent parts of the panel can be specified by CSS class name within the main element, and the panel
+     * will automatically create those components from that markup. Any required components not specified in the
+     * markup will be autogenerated if necessary.</p>
+     * <p>The following class names are supported (baseCls will be replaced by {@link #baseCls}):</p>
+     * <ul><li>baseCls + '-header'</li>
+     * <li>baseCls + '-header-text'</li>
+     * <li>baseCls + '-bwrap'</li>
+     * <li>baseCls + '-tbar'</li>
+     * <li>baseCls + '-body'</li>
+     * <li>baseCls + '-bbar'</li>
+     * <li>baseCls + '-footer'</li></ul>
+     * <p>Using this config, a call to render() is not required.  If applyTo is specified, any value passed for
+     * {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the
+     * panel's container.</p>
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * <p>The top toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the top toolbar after render, use {@link #getTopToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not</b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Object/Array} bbar
+     * <p>The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of
+     * buttons/button configs to be added to the toolbar.  Note that this is not available as a property after render.
+     * To access the bottom toolbar after render, use {@link #getBottomToolbar}.</p>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /** @cfg {Object/Array} fbar
+     * <p>A {@link Ext.Toolbar Toolbar} object, a Toolbar config, or an array of
+     * {@link Ext.Button Button}s/{@link Ext.Button Button} configs, describing a {@link Ext.Toolbar Toolbar} to be rendered into this Panel's footer element.</p>
+     * <p>After render, the <code>fbar</code> property will be an {@link Ext.Toolbar Toolbar} instance.</p>
+     * <p>If <tt>{@link #buttons}</tt> are specified, they will supersede the <tt>fbar</tt> configuration property.</p>
+     * The Panel's <tt>{@link #buttonAlign}</tt> configuration affects the layout of these items, for example:
+     * <pre><code>
+var w = new Ext.Window({
+    height: 250,
+    width: 500,
+    bbar: new Ext.Toolbar({
+        items: [{
+            text: 'bbar Left'
+        },'->',{
+            text: 'bbar Right'
+        }]
+    }),
+    {@link #buttonAlign}: 'left', // anything but 'center' or 'right' and you can use "-", and "->"
+                                  // to control the alignment of fbar items
+    fbar: [{
+        text: 'fbar Left'
+    },'->',{
+        text: 'fbar Right'
+    }]
+}).show();
+     * </code></pre>
+     * <p><b>Note:</b> Although a Toolbar may contain Field components, these will <b>not<b> be updated by a load
+     * of an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and
+     * so are not scanned to collect form items. However, the values <b>will</b> be submitted because form
+     * submission parameters are collected from the DOM tree.</p>
+     */
+    /**
+     * @cfg {Boolean} header
+     * <tt>true</tt> to create the Panel's header element explicitly, <tt>false</tt> to skip creating
+     * it.  If a <tt>{@link #title}</tt> is set the header will be created automatically, otherwise it will not.
+     * If a <tt>{@link #title}</tt> is set but <tt>header</tt> is explicitly set to <tt>false</tt>, the header
+     * will not be rendered.
+     */
+    /**
+     * @cfg {Boolean} footer
+     * <tt>true</tt> to create the footer element explicitly, false to skip creating it. The footer
+     * will be created automatically if <tt>{@link #buttons}</tt> or a <tt>{@link #fbar}</tt> have
+     * been configured.  See <tt>{@link #bodyCfg}</tt> for an example.
+     */
+    /**
+     * @cfg {String} title
+     * The title text to be used as innerHTML (html tags are accepted) to display in the panel
+     * <tt>{@link #header}</tt> (defaults to ''). When a <tt>title</tt> is specified the
+     * <tt>{@link #header}</tt> element will automatically be created and displayed unless
+     * {@link #header} is explicitly set to <tt>false</tt>.  If you do not want to specify a
+     * <tt>title</tt> at config time, but you may want one later, you must either specify a non-empty
+     * <tt>title</tt> (a blank space ' ' will do) or <tt>header:true</tt> so that the container
+     * element will get created.
+     */
+    /**
+     * @cfg {Array} buttons
+     * <tt>buttons</tt> will be used as <tt>{@link Ext.Container#items items}</tt> for the toolbar in
+     * the footer (<tt>{@link #fbar}</tt>). Typically the value of this configuration property will be
+     * an array of {@link Ext.Button}s or {@link Ext.Button} configuration objects.
+     * If an item is configured with <tt>minWidth</tt> or the Panel is configured with <tt>minButtonWidth</tt>,
+     * that width will be applied to the item.
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * A valid url spec according to the Updater {@link Ext.Updater#update} method.
+     * If autoLoad is not null, the panel will attempt to load its contents
+     * immediately upon render.<p>
+     * The URL will become the default URL for this panel's {@link #body} element,
+     * so it may be {@link Ext.Element#refresh refresh}ed at any time.</p>
+     */
+    /**
+     * @cfg {Boolean} frame
+     * <tt>false</tt> by default to render with plain 1px square borders. <tt>true</tt> to render with
+     * 9 elements, complete with custom rounded corners (also see {@link Ext.Element#boxWrap}).
+     * <p>The template generated for each condition is depicted below:</p><pre><code>
+     *
+// frame = false
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+
+    &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:false)&lt;/span>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+    &lt;/div>
+&lt;/div>
+
+// frame = true (create 9 elements)
+&lt;div id="developer-specified-id-goes-here" class="x-panel">
+    &lt;div class="x-panel-tl">&lt;div class="x-panel-tr">&lt;div class="x-panel-tc">
+        &lt;div class="x-panel-header">&lt;span class="x-panel-header-text">Title: (frame:true)&lt;/span>&lt;/div>
+    &lt;/div>&lt;/div>&lt;/div>
+
+    &lt;div class="x-panel-bwrap">
+        &lt;div class="x-panel-ml">&lt;div class="x-panel-mr">&lt;div class="x-panel-mc">
+            &lt;div class="x-panel-body">&lt;p>html value goes here&lt;/p>&lt;/div>
+        &lt;/div>&lt;/div>&lt;/div>
+
+        &lt;div class="x-panel-bl">&lt;div class="x-panel-br">&lt;div class="x-panel-bc"/>
+        &lt;/div>&lt;/div>&lt;/div>
+&lt;/div>
+     * </code></pre>
+     */
+    /**
+     * @cfg {Boolean} border
+     * True to display the borders of the panel's body element, false to hide them (defaults to true).  By default,
+     * the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false.
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * True to display an interior border on the body element of the panel, false to hide it (defaults to true).
+     * This only applies when {@link #border} == true.  If border == true and bodyBorder == false, the border will display
+     * as a 1px wide inset border, giving the entire body element an inset appearance.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyCssClass
+     * Additional css class selector to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#addClass} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String/Object/Function} bodyStyle
+     * Custom CSS styles to be applied to the {@link #body} element in the format expected by
+     * {@link Ext.Element#applyStyles} (defaults to null). See {@link #bodyCfg}.
+     */
+    /**
+     * @cfg {String} iconCls
+     * The CSS class selector that specifies a background image to be used as the header icon (defaults to '').
+     * <p>An example of specifying a custom icon class would be something like:
+     * </p><pre><code>
+// specify the property in the config for the class:
+     ...
+     iconCls: 'my-icon'
+
+// css class that specifies background image to be used as the icon image:
+.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into
+     * the header tool button area, false to keep the panel statically sized with no button (defaults to false).
+     */
+    /**
+     * @cfg {Array} tools
+     * An array of tool button configs to be added to the header tool area. When rendered, each tool is
+     * stored as an {@link Ext.Element Element} referenced by a public property called <tt><b></b>tools.<i>&lt;tool-type&gt;</i></tt>
+     * <p>Each tool config may contain the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc"><b>Required.</b> The type
+     * of tool to create. By default, this assigns a CSS class of the form <tt>x-tool-<i>&lt;tool-type&gt;</i></tt> to the
+     * resulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below.
+     * The developer may implement custom tools by supplying alternate CSS rules and background images:
+     * <ul>
+     * <div class="x-tool x-tool-toggle" style="float:left; margin-right:5;"> </div><div><tt> toggle</tt> (Created by default when {@link #collapsible} is <tt>true</tt>)</div>
+     * <div class="x-tool x-tool-close" style="float:left; margin-right:5;"> </div><div><tt> close</tt></div>
+     * <div class="x-tool x-tool-minimize" style="float:left; margin-right:5;"> </div><div><tt> minimize</tt></div>
+     * <div class="x-tool x-tool-maximize" style="float:left; margin-right:5;"> </div><div><tt> maximize</tt></div>
+     * <div class="x-tool x-tool-restore" style="float:left; margin-right:5;"> </div><div><tt> restore</tt></div>
+     * <div class="x-tool x-tool-gear" style="float:left; margin-right:5;"> </div><div><tt> gear</tt></div>
+     * <div class="x-tool x-tool-pin" style="float:left; margin-right:5;"> </div><div><tt> pin</tt></div>
+     * <div class="x-tool x-tool-unpin" style="float:left; margin-right:5;"> </div><div><tt> unpin</tt></div>
+     * <div class="x-tool x-tool-right" style="float:left; margin-right:5;"> </div><div><tt> right</tt></div>
+     * <div class="x-tool x-tool-left" style="float:left; margin-right:5;"> </div><div><tt> left</tt></div>
+     * <div class="x-tool x-tool-up" style="float:left; margin-right:5;"> </div><div><tt> up</tt></div>
+     * <div class="x-tool x-tool-down" style="float:left; margin-right:5;"> </div><div><tt> down</tt></div>
+     * <div class="x-tool x-tool-refresh" style="float:left; margin-right:5;"> </div><div><tt> refresh</tt></div>
+     * <div class="x-tool x-tool-minus" style="float:left; margin-right:5;"> </div><div><tt> minus</tt></div>
+     * <div class="x-tool x-tool-plus" style="float:left; margin-right:5;"> </div><div><tt> plus</tt></div>
+     * <div class="x-tool x-tool-help" style="float:left; margin-right:5;"> </div><div><tt> help</tt></div>
+     * <div class="x-tool x-tool-search" style="float:left; margin-right:5;"> </div><div><tt> search</tt></div>
+     * <div class="x-tool x-tool-save" style="float:left; margin-right:5;"> </div><div><tt> save</tt></div>
+     * <div class="x-tool x-tool-print" style="float:left; margin-right:5;"> </div><div><tt> print</tt></div>
+     * </ul></div></li>
+     * <li><b>handler</b> : Function<div class="sub-desc"><b>Required.</b> The function to
+     * call when clicked. Arguments passed are:<ul>
+     * <li><b>event</b> : Ext.EventObject<div class="sub-desc">The click event.</div></li>
+     * <li><b>toolEl</b> : Ext.Element<div class="sub-desc">The tool Element.</div></li>
+     * <li><b>panel</b> : Ext.Panel<div class="sub-desc">The host Panel</div></li>
+     * <li><b>tc</b> : Ext.Panel<div class="sub-desc">The tool configuration object</div></li>
+     * </ul></div></li>
+     * <li><b>stopEvent</b> : Boolean<div class="sub-desc">Defaults to true. Specify as false to allow click event to propagate.</div></li>
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the handler.</div></li>
+     * <li><b>qtip</b> : String/Object<div class="sub-desc">A tip string, or
+     * a config argument to {@link Ext.QuickTip#register}</div></li>
+     * <li><b>hidden</b> : Boolean<div class="sub-desc">True to initially render hidden.</div></li>
+     * <li><b>on</b> : Object<div class="sub-desc">A listener config object specifiying
+     * event listeners in the format of an argument to {@link #addListener}</div></li>
+     * </ul></div>
+     * <p>Note that, apart from the toggle tool which is provided when a panel is collapsible, these
+     * tools only provide the visual button. Any required functionality must be provided by adding
+     * handlers that implement the necessary behavior.</p>
+     * <p>Example usage:</p>
+     * <pre><code>
+tools:[{
+    id:'refresh',
+    qtip: 'Refresh form Data',
+    // hidden:true,
+    handler: function(event, toolEl, panel){
+        // refresh logic
+    }
+},
+{
+    id:'help',
+    qtip: 'Get Help',
+    handler: function(event, toolEl, panel){
+        // whatever
+    }
+}]
+</code></pre>
+     * <p>For the custom id of <tt>'help'</tt> define two relevant css classes with a link to
+     * a 15x15 image:</p>
+     * <pre><code>
+.x-tool-help {background-image: url(images/help.png);}
+.x-tool-help-over {background-image: url(images/help_over.png);}
+// if using an image sprite:
+.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}
+.x-tool-help-over {background-position:-15px 0;}
+</code></pre>
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * <p>A Template used to create {@link #tools} in the {@link #header} Element. Defaults to:</p><pre><code>
+new Ext.Template('&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>')</code></pre>
+     * <p>This may may be overridden to provide a custom DOM structure for tools based upon a more
+     * complex XTemplate. The template's data is a single tool configuration object (Not the entire Array)
+     * as specified in {@link #tools}.  In the following example an &lt;a> tag is used to provide a
+     * visual indication when hovering over the tool:</p><pre><code>
+var win = new Ext.Window({
+    tools: [{
+        id: 'download',
+        href: '/MyPdfDoc.pdf'
+    }],
+    toolTemplate: new Ext.XTemplate(
+        '&lt;tpl if="id==\'download\'">',
+            '&lt;a class="x-tool x-tool-pdf" href="{href}">&lt;/a>',
+        '&lt;/tpl>',
+        '&lt;tpl if="id!=\'download\'">',
+            '&lt;div class="x-tool x-tool-{id}">&amp;#160;&lt;/div>',
+        '&lt;/tpl>'
+    ),
+    width:500,
+    height:300,
+    closeAction:'hide'
+});</code></pre>
+     * <p>Note that the CSS class "x-tool-pdf" should have an associated style rule which provides an
+     * appropriate background image, something like:</p>
+    <pre><code>
+    a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * <tt>true</tt> to hide the expand/collapse toggle button when <code>{@link #collapsible} == true</code>,
+     * <tt>false</tt> to display it (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * <tt>true</tt> to allow expanding and collapsing the panel (when <tt>{@link #collapsible} = true</tt>)
+     * by clicking anywhere in the header bar, <tt>false</tt>) to allow it only by clicking to tool button
+     * (defaults to <tt>false</tt>)). If this panel is a child item of a border layout also see the
+     * {@link Ext.layout.BorderLayout.Region BorderLayout.Region}
+     * <tt>{@link Ext.layout.BorderLayout.Region#floatable floatable}</tt> config option.
+     */
+    /**
+     * @cfg {Boolean} autoScroll
+     * <tt>true</tt> to use overflow:'auto' on the panel's body element and show scroll bars automatically when
+     * necessary, <tt>false</tt> to clip any overflowing content (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {Mixed} floating
+     * <p>This property is used to configure the underlying {@link Ext.Layer}. Acceptable values for this
+     * configuration property are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>false</tt></b> : <b>Default.</b><div class="sub-desc">Display the panel inline where it is
+     * rendered.</div></li>
+     * <li><b><tt>true</tt></b> : <div class="sub-desc">Float the panel (absolute position it with automatic
+     * shimming and shadow).<ul>
+     * <div class="sub-desc">Setting floating to true will create an Ext.Layer for this panel and display the
+     * panel at negative offsets so that it is hidden.</div>
+     * <div class="sub-desc">Since the panel will be absolute positioned, the position must be set explicitly
+     * <i>after</i> render (e.g., <tt>myPanel.setPosition(100,100);</tt>).</div>
+     * <div class="sub-desc"><b>Note</b>: when floating a panel you should always assign a fixed width,
+     * otherwise it will be auto width and will expand to fill to the right edge of the viewport.</div>
+     * </ul></div></li>
+     * <li><b><tt>{@link Ext.Layer object}</tt></b> : <div class="sub-desc">The specified object will be used
+     * as the configuration object for the {@link Ext.Layer} that will be created.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * <tt>true</tt> (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the
+     * panel, <tt>false</tt> to display no shadow (defaults to <tt>'sides'</tt>).  Note that this option
+     * only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * The number of pixels to offset the shadow if displayed (defaults to <tt>4</tt>). Note that this
+     * option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} shim
+     * <tt>false</tt> to disable the iframe shim in browsers which need one (defaults to <tt>true</tt>).
+     * Note that this option only applies when <tt>{@link #floating} = true</tt>.
+     */
+    /**
+     * @cfg {String/Object} html
+     * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use as the panel's body
+     * content (defaults to ''). The HTML content is added by the Panel's {@link #afterRender} method,
+     * and so the document will not contain this HTML at the time the {@link #render} event is fired.
+     * This content is inserted into the body <i>before</i> any configured {@link #contentEl} is appended.
+     */
+    /**
+     * @cfg {String} contentEl
+     * <p>Specify the <tt>id</tt> of an existing HTML node to use as the panel's body content
+     * (defaults to '').</p><div><ul>
+     * <li><b>Description</b> : <ul>
+     * <div class="sub-desc">This config option is used to take an existing HTML element and place it in the body
+     * of a new panel (it simply moves the specified DOM element into the body element of the Panel
+     * <i>when the Panel is rendered</i> to use as the content (it is not going to be the
+     * actual panel itself).</div>
+     * </ul></li>
+     * <li><b>Notes</b> : <ul>
+     * <div class="sub-desc">The specified HTML Element is appended to the Panel's {@link #body} Element by the
+     * Panel's {@link #afterRender} method <i>after any configured {@link #html HTML} has
+     * been inserted</i>, and so the document will not contain this HTML at the time the
+     * {@link #render} event is fired.</div>
+     * <div class="sub-desc">The specified HTML element used will not participate in any layout scheme that the
+     * Panel may use. It's just HTML. Layouts operate on child items.</div>
+     * <div class="sub-desc">Add either the <tt>x-hidden</tt> or the <tt>x-hide-display</tt> CSS class to
+     * prevent a brief flicker of the content before it is rendered to the panel.</div>
+     * </ul></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object/Array} keys
+     * A {@link Ext.KeyMap} config object (in the format expected by {@link Ext.KeyMap#addBinding}
+     * used to assign custom key handling to this panel (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean/Object} draggable
+     * <p><tt>true</tt> to enable dragging of this Panel (defaults to <tt>false</tt>).</p>
+     * <p>For custom drag/drop implementations, an <b>Ext.Panel.DD</b> config could also be passed
+     * in this config instead of <tt>true</tt>. Ext.Panel.DD is an internal, undocumented class which
+     * moves a proxy Element around in place of the Panel's element, but provides no other behaviour
+     * during dragging or on drop. It is a subclass of {@link Ext.dd.DragSource}, so behaviour may be
+     * added by implementing the interface methods of {@link Ext.dd.DragDrop} e.g.:
+     * <pre><code>
+new Ext.Panel({
+    title: 'Drag me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    draggable: {
+//      Config option of Ext.Panel.DD class.
+//      It&#39;s a floating Panel, so do not show a placeholder proxy in the original position.
+        insertProxy: false,
+
+//      Called for each mousemove event while dragging the DD object.
+        onDrag : function(e){
+//          Record the x,y position of the drag proxy so that we can
+//          position the Panel at end of drag.
+            var pel = this.proxy.getEl();
+            this.x = pel.getLeft(true);
+            this.y = pel.getTop(true);
+
+//          Keep the Shadow aligned if there is one.
+            var s = this.panel.getEl().shadow;
+            if (s) {
+                s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
+            }
+        },
+
+//      Called on the mouseup event.
+        endDrag : function(e){
+            this.panel.setPosition(this.x, this.y);
+        }
+    }
+}).show();
+</code></pre>
+     */
+    /**
+     * @cfg {String} tabTip
+     * A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over
+     * the tab of a Ext.Panel which is an item of a {@link Ext.TabPanel}. {@link Ext.QuickTips}.init()
+     * must be called in order for the tips to render.
+     */
+    /**
+     * @cfg {Boolean} disabled
+     * Render this panel disabled (default is <tt>false</tt>). An important note when using the disabled
+     * config on panels is that IE will often fail to initialize the disabled mask element correectly if
+     * the panel's layout has not yet completed by the time the Panel is disabled during the render process.
+     * If you experience this issue, you may need to instead use the {@link #afterlayout} event to initialize
+     * the disabled state:
+     * <pre><code>
+new Ext.Panel({
+    ...
+    listeners: {
+        'afterlayout': {
+            fn: function(p){
+                p.disable();
+            },
+            single: true // important, as many layouts can occur
+        }
+    }
+});
+</code></pre>
+     */
+    /**
+     * @cfg {Boolean} autoHeight
+     * <tt>true</tt> to use height:'auto', <tt>false</tt> to use fixed height (defaults to <tt>false</tt>).
+     * <b>Note</b>: Setting <tt>autoHeight:true</tt> means that the browser will manage the panel's height
+     * based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
+     * manages dimensions (<tt>fit</tt>, <tt>border</tt>, etc.) then setting <tt>autoHeight:true</tt>
+     * can cause issues with scrolling and will not generally work as expected since the panel will take
+     * on the height of its contents rather than the height required by the Ext layout.
+     */
+
+
+    /**
+     * @cfg {String} baseCls
+     * The base CSS class to apply to this panel's element (defaults to <tt>'x-panel'</tt>).
+     * <p>Another option available by default is to specify <tt>'x-plain'</tt> which strips all styling
+     * except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     * See <tt>{@link #unstyled}</tt> also.</p>
+     */
+    baseCls : 'x-panel',
+    /**
+     * @cfg {String} collapsedCls
+     * A CSS class to add to the panel's element after it has been collapsed (defaults to
+     * <tt>'x-panel-collapsed'</tt>).
+     */
+    collapsedCls : 'x-panel-collapsed',
+    /**
+     * @cfg {Boolean} maskDisabled
+     * <tt>true</tt> to mask the panel when it is {@link #disabled}, <tt>false</tt> to not mask it (defaults
+     * to <tt>true</tt>).  Either way, the panel will always tell its contained elements to disable themselves
+     * when it is disabled, but masking the panel can provide an additional visual cue that the panel is
+     * disabled.
+     */
+    maskDisabled : true,
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>true</tt> if the {@link Ext.Fx} class is available, otherwise <tt>false</tt>).
+     */
+    animCollapse : Ext.enableFx,
+    /**
+     * @cfg {Boolean} headerAsText
+     * <tt>true</tt> to display the panel <tt>{@link #title}</tt> in the <tt>{@link #header}</tt>,
+     * <tt>false</tt> to hide it (defaults to <tt>true</tt>).
+     */
+    headerAsText : true,
+    /**
+     * @cfg {String} buttonAlign
+     * The alignment of any {@link #buttons} added to this panel.  Valid values are <tt>'right'</tt>,
+     * <tt>'left'</tt> and <tt>'center'</tt> (defaults to <tt>'right'</tt>).
+     */
+    buttonAlign : 'right',
+    /**
+     * @cfg {Boolean} collapsed
+     * <tt>true</tt> to render the panel collapsed, <tt>false</tt> to render it expanded (defaults to
+     * <tt>false</tt>).
+     */
+    collapsed : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * <tt>true</tt> to make sure the collapse/expand toggle button always renders first (to the left of)
+     * any other tools in the panel's title bar, <tt>false</tt> to render it last (defaults to <tt>true</tt>).
+     */
+    collapseFirst : true,
+    /**
+     * @cfg {Number} minButtonWidth
+     * Minimum width in pixels of all {@link #buttons} in this panel (defaults to <tt>75</tt>)
+     */
+    minButtonWidth : 75,
+    /**
+     * @cfg {Boolean} unstyled
+     * Overrides the <tt>{@link #baseCls}</tt> setting to <tt>{@link #baseCls} = 'x-plain'</tt> which renders
+     * the panel unstyled except for required attributes for Ext layouts to function (e.g. overflow:hidden).
+     */
+    /**
+     * @cfg {String} elements
+     * A comma-delimited list of panel elements to initialize when the panel is rendered.  Normally, this list will be
+     * generated automatically based on the items added to the panel at config time, but sometimes it might be useful to
+     * make sure a structural element is rendered even if not specified at config time (for example, you may want
+     * to add a button or toolbar dynamically after the panel has been rendered).  Adding those elements to this
+     * list will allocate the required placeholders in the panel when it is rendered.  Valid values are<div class="mdetail-params"><ul>
+     * <li><tt>header</tt></li>
+     * <li><tt>tbar</tt> (top bar)</li>
+     * <li><tt>body</tt></li>
+     * <li><tt>bbar</tt> (bottom bar)</li>
+     * <li><tt>footer</tt></li>
+     * </ul></div>
+     * Defaults to '<tt>body</tt>'.
+     */
+    elements : 'body',
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * Defaults to <tt>false</tt>.  When set to <tt>true</tt>, an extra css class <tt>'x-panel-normal'</tt>
+     * will be added to the panel's element, effectively applying css styles suggested by the W3C
+     * (see http://www.w3.org/TR/CSS21/sample.html) to the Panel's <b>body</b> element (not the header,
+     * footer, etc.).
+     */
+    preventBodyReset : false,
+
+    // protected - these could be used to customize the behavior of the window,
+    // but changing them would not be useful without further mofifications and
+    // could lead to unexpected or undesirable results.
+    toolTarget : 'header',
+    collapseEl : 'bwrap',
+    slideAnchor : 't',
+    disabledClass : '',
+
+    // private, notify box this class will handle heights
+    deferHeight : true,
+    // private
+    expandDefaults: {
+        duration : 0.25
+    },
+    // private
+    collapseDefaults : {
+        duration : 0.25
+    },
+
+    // private
+    initComponent : function(){
+        Ext.Panel.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event bodyresize
+             * Fires after the Panel has been resized.
+             * @param {Ext.Panel} p the Panel which has been resized.
+             * @param {Number} width The Panel's new width.
+             * @param {Number} height The Panel's new height.
+             */
+            'bodyresize',
+            /**
+             * @event titlechange
+             * Fires after the Panel title has been {@link #title set} or {@link #setTitle changed}.
+             * @param {Ext.Panel} p the Panel which has had its title changed.
+             * @param {String} The new title.
+             */
+            'titlechange',
+            /**
+             * @event iconchange
+             * Fires after the Panel icon class has been {@link #iconCls set} or {@link #setIconClass changed}.
+             * @param {Ext.Panel} p the Panel which has had its {@link #iconCls icon class} changed.
+             * @param {String} The new icon class.
+             * @param {String} The old icon class.
+             */
+            'iconchange',
+            /**
+             * @event collapse
+             * Fires after the Panel has been collapsed.
+             * @param {Ext.Panel} p the Panel that has been collapsed.
+             */
+            'collapse',
+            /**
+             * @event expand
+             * Fires after the Panel has been expanded.
+             * @param {Ext.Panel} p The Panel that has been expanded.
+             */
+            'expand',
+            /**
+             * @event beforecollapse
+             * Fires before the Panel is collapsed.  A handler can return false to cancel the collapse.
+             * @param {Ext.Panel} p the Panel being collapsed.
+             * @param {Boolean} animate True if the collapse is animated, else false.
+             */
+            'beforecollapse',
+            /**
+             * @event beforeexpand
+             * Fires before the Panel is expanded.  A handler can return false to cancel the expand.
+             * @param {Ext.Panel} p The Panel being expanded.
+             * @param {Boolean} animate True if the expand is animated, else false.
+             */
+            'beforeexpand',
+            /**
+             * @event beforeclose
+             * Fires before the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.  This event only
+             * applies to such subclasses.
+             * A handler can return false to cancel the close.
+             * @param {Ext.Panel} p The Panel being closed.
+             */
+            'beforeclose',
+            /**
+             * @event close
+             * Fires after the Panel is closed.  Note that Panels do not directly support being closed, but some
+             * Panel subclasses do (like {@link Ext.Window}) or a Panel within a Ext.TabPanel.
+             * @param {Ext.Panel} p The Panel that has been closed.
+             */
+            'close',
+            /**
+             * @event activate
+             * Fires after the Panel has been visually activated.
+             * Note that Panels do not directly support being activated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been activated.
+             */
+            'activate',
+            /**
+             * @event deactivate
+             * Fires after the Panel has been visually deactivated.
+             * Note that Panels do not directly support being deactivated, but some Panel subclasses
+             * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the
+             * activate and deactivate events under the control of the TabPanel.
+             * @param {Ext.Panel} p The Panel that has been deactivated.
+             */
+            'deactivate'
+        );
+
+        if(this.unstyled){
+            this.baseCls = 'x-plain';
+        }
+
+        // shortcuts
+        if(this.tbar){
+            this.elements += ',tbar';
+            if(Ext.isObject(this.tbar)){
+                this.topToolbar = this.tbar;
+            }
+            delete this.tbar;
+        }
+        if(this.bbar){
+            this.elements += ',bbar';
+            if(Ext.isObject(this.bbar)){
+                this.bottomToolbar = this.bbar;
+            }
+            delete this.bbar;
+        }
+
+        if(this.header === true){
+            this.elements += ',header';
+            delete this.header;
+        }else if(this.headerCfg || (this.title && this.header !== false)){
+            this.elements += ',header';
+        }
+
+        if(this.footerCfg || this.footer === true){
+            this.elements += ',footer';
+            delete this.footer;
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+            var btns = this.buttons;
+            /**
+             * This Panel's Array of buttons as created from the <tt>{@link #buttons}</tt>
+             * config property. Read only.
+             * @type Array
+             * @property buttons
+             */
+            this.buttons = [];
+            for(var i = 0, len = btns.length; i < len; i++) {
+                if(btns[i].render){ // button instance
+                    this.buttons.push(btns[i]);
+                }else if(btns[i].xtype){
+                    this.buttons.push(Ext.create(btns[i], 'button'));
+                }else{
+                    this.addButton(btns[i]);
+                }
+            }
+        }
+        if(this.fbar){
+            this.elements += ',footer';
+        }
+        if(this.autoLoad){
+            this.on('render', this.doAutoLoad, this, {delay:10});
+        }
+    },
+
+    // private
+    createElement : function(name, pnode){
+        if(this[name]){
+            pnode.appendChild(this[name].dom);
+            return;
+        }
+
+        if(name === 'bwrap' || this.elements.indexOf(name) != -1){
+            if(this[name+'Cfg']){
+                this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']);
+            }else{
+                var el = document.createElement('div');
+                el.className = this[name+'Cls'];
+                this[name] = Ext.get(pnode.appendChild(el));
+            }
+            if(this[name+'CssClass']){
+                this[name].addClass(this[name+'CssClass']);
+            }
+            if(this[name+'Style']){
+                this[name].applyStyles(this[name+'Style']);
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Panel.superclass.onRender.call(this, ct, position);
+        this.createClasses();
+
+        var el = this.el,
+            d = el.dom,
+            bw;
+        el.addClass(this.baseCls);
+        if(d.firstChild){ // existing markup
+            this.header = el.down('.'+this.headerCls);
+            this.bwrap = el.down('.'+this.bwrapCls);
+            var cp = this.bwrap ? this.bwrap : el;
+            this.tbar = cp.down('.'+this.tbarCls);
+            this.body = cp.down('.'+this.bodyCls);
+            this.bbar = cp.down('.'+this.bbarCls);
+            this.footer = cp.down('.'+this.footerCls);
+            this.fromMarkup = true;
+        }
+        if (this.preventBodyReset === true) {
+            el.addClass('x-panel-reset');
+        }
+        if(this.cls){
+            el.addClass(this.cls);
+        }
+
+        if(this.buttons){
+            this.elements += ',footer';
+        }
+
+        // This block allows for maximum flexibility and performance when using existing markup
+
+        // framing requires special markup
+        if(this.frame){
+            el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls));
+
+            this.createElement('header', d.firstChild.firstChild.firstChild);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            var ml = d.childNodes[1], bl = d.childNodes[2];
+            bw.appendChild(ml);
+            bw.appendChild(bl);
+
+            var mc = bw.firstChild.firstChild.firstChild;
+            this.createElement('tbar', mc);
+            this.createElement('body', mc);
+            this.createElement('bbar', mc);
+            this.createElement('footer', bw.lastChild.firstChild.firstChild);
+
+            if(!this.footer){
+                this.bwrap.dom.lastChild.className += ' x-panel-nofooter';
+            }
+        }else{
+            this.createElement('header', d);
+            this.createElement('bwrap', d);
+
+            // append the mid and bottom frame to the bwrap
+            bw = this.bwrap.dom;
+            this.createElement('tbar', bw);
+            this.createElement('body', bw);
+            this.createElement('bbar', bw);
+            this.createElement('footer', bw);
+
+            if(!this.header){
+                this.body.addClass(this.bodyCls + '-noheader');
+                if(this.tbar){
+                    this.tbar.addClass(this.tbarCls + '-noheader');
+                }
+            }
+        }
+
+        if(this.padding !== undefined) {
+            this.body.setStyle('padding', this.body.addUnits(this.padding));
+        }
+
+        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');
+        }
+
+        this.bwrap.enableDisplayMode('block');
+
+        if(this.header){
+            this.header.unselectable();
+
+            // for tools, we need to wrap any existing header markup
+            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.mon(this.header, 'click', this.toggleCollapse, this);
+                this.header.setStyle('cursor', 'pointer');
+            }
+        }
+        if(this.tools){
+            var ts = this.tools;
+            this.tools = {};
+            this.addTool.apply(this, ts);
+        }else{
+            this.tools = {};
+        }
+
+        if(this.buttons && this.buttons.length > 0){
+            this.fbar = new Ext.Toolbar({
+                items: this.buttons,
+                toolbarCls: 'x-panel-fbar'
+            });
+        }
+        this.toolbars = [];
+        if(this.fbar){
+            this.fbar = Ext.create(this.fbar, 'toolbar');
+            this.fbar.enableOverflow = false;
+            if(this.fbar.items){
+                this.fbar.items.each(function(c){
+                    c.minWidth = c.minWidth || this.minButtonWidth;
+                }, this);
+            }
+            this.fbar.toolbarCls = 'x-panel-fbar';
+
+            var bct = this.footer.createChild({cls: 'x-panel-btns x-panel-btns-'+this.buttonAlign});
+            this.fbar.ownerCt = this;
+            this.fbar.render(bct);
+            bct.createChild({cls:'x-clear'});
+            this.toolbars.push(this.fbar);
+        }
+
+        if(this.tbar && this.topToolbar){
+            if(Ext.isArray(this.topToolbar)){
+                this.topToolbar = new Ext.Toolbar(this.topToolbar);
+            }else if(!this.topToolbar.events){
+                this.topToolbar = Ext.create(this.topToolbar, 'toolbar');
+            }
+            this.topToolbar.ownerCt = this;
+            this.topToolbar.render(this.tbar);
+            this.toolbars.push(this.topToolbar);
+        }
+        if(this.bbar && this.bottomToolbar){
+            if(Ext.isArray(this.bottomToolbar)){
+                this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar);
+            }else if(!this.bottomToolbar.events){
+                this.bottomToolbar = Ext.create(this.bottomToolbar, 'toolbar');
+            }
+            this.bottomToolbar.ownerCt = this;
+            this.bottomToolbar.render(this.bbar);
+            this.toolbars.push(this.bottomToolbar);
+        }
+        Ext.each(this.toolbars, function(tb){
+            tb.on({
+                scope: this,
+                afterlayout: this.syncHeight,
+                remove: this.syncHeight
+            });
+        }, this);
+    },
+
+    /**
+     * Sets the CSS class that provides the icon image for this panel.  This method will replace any existing
+     * icon class if one has already been set and fire the {@link #iconchange} event after completion.
+     * @param {String} cls The new CSS class name
+     */
+    setIconClass : function(cls){
+        var old = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered && this.header){
+            if(this.frame){
+                this.header.addClass('x-panel-icon');
+                this.header.replaceClass(old, this.iconCls);
+            }else{
+                var hd = this.header.dom;
+                var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null;
+                if(img){
+                    Ext.fly(img).replaceClass(old, this.iconCls);
+                }else{
+                    Ext.DomHelper.insertBefore(hd.firstChild, {
+                        tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls
+                    });
+                 }
+            }
+        }
+        this.fireEvent('iconchange', this, cls, old);
+    },
+
+    // private
+    makeFloating : function(cfg){
+        this.floating = true;
+        this.el = new Ext.Layer(
+            Ext.isObject(cfg) ? cfg : {
+                shadow: this.shadow !== undefined ? this.shadow : 'sides',
+                shadowOffset: this.shadowOffset,
+                constrain:false,
+                shim: this.shim === false ? false : undefined
+            }, this.el
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the top (<tt>{@link #tbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getTopToolbar : function(){
+        return this.topToolbar;
+    },
+
+    /**
+     * Returns the {@link Ext.Toolbar toolbar} from the bottom (<tt>{@link #bbar}</tt>) section of the panel.
+     * @return {Ext.Toolbar} The toolbar
+     */
+    getBottomToolbar : function(){
+        return this.bottomToolbar;
+    },
+
+    /**
+     * Adds a button to this panel.  Note that this method must be called prior to rendering.  The preferred
+     * approach is to add buttons via the {@link #buttons} config.
+     * @param {String/Object} config A valid {@link Ext.Button} config.  A string will become the text for a default
+     * button config, an object will be treated as a button config object.
+     * @param {Function} handler The function to be called on button {@link Ext.Button#click}
+     * @param {Object} scope The scope to use for the button handler function
+     * @return {Ext.Button} The button that was added
+     */
+    addButton : function(config, handler, scope){
+        var bc = {
+            handler: handler,
+            scope: scope,
+            minWidth: this.minButtonWidth,
+            hideParent:true
+        };
+        if(typeof config == "string"){
+            bc.text = config;
+        }else{
+            Ext.apply(bc, config);
+        }
+        var btn = new Ext.Button(bc);
+        if(!this.buttons){
+            this.buttons = [];
+        }
+        this.buttons.push(btn);
+        return btn;
+    },
+
+    // private
+    addTool : function(){
+        if(!this[this.toolTarget]) { // no where to render tools!
+            return;
+        }
+        if(!this.toolTemplate){
+            // initialize the global tool template on first use
+            var tt = new Ext.Template(
+                 '<div class="x-tool x-tool-{id}">&#160;</div>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.Panel.prototype.toolTemplate = tt;
+        }
+        for(var i = 0, a = arguments, len = a.length; i < len; i++) {
+            var tc = a[i];
+            if(!this.tools[tc.id]){
+                var overCls = 'x-tool-'+tc.id+'-over';
+                var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), tc, true);
+                this.tools[tc.id] = t;
+                t.enableDisplayMode('block');
+                this.mon(t, 'click',  this.createToolHandler(t, tc, overCls, this));
+                if(tc.on){
+                    this.mon(t, tc.on);
+                }
+                if(tc.hidden){
+                    t.hide();
+                }
+                if(tc.qtip){
+                    if(Ext.isObject(tc.qtip)){
+                        Ext.QuickTips.register(Ext.apply({
+                              target: t.id
+                        }, tc.qtip));
+                    } else {
+                        t.dom.qtip = tc.qtip;
+                    }
+                }
+                t.addClassOnOver(overCls);
+            }
+        }
+    },
+
+    onLayout : function(){
+        if(this.toolbars.length > 0){
+            this.duringLayout = true;
+            Ext.each(this.toolbars, function(tb){
+                tb.doLayout();
+            });
+            delete this.duringLayout;
+            this.syncHeight();
+        }
+    },
+
+    syncHeight : function(){
+        if(!(this.autoHeight || this.duringLayout)){
+            var last = this.lastSize;
+            if(last && !Ext.isEmpty(last.height)){
+                var old = last.height, h = this.el.getHeight();
+                if(old != 'auto' && old != h){
+                    var bd = this.body, bdh = bd.getHeight();
+                    h = Math.max(bdh + old - h, 0);
+                    if(bdh > 0 && bdh != h){
+                        bd.setHeight(h);
+                        if(Ext.isIE && h <= 0){
+                            return;
+                        }
+                        var sz = bd.getSize();
+                        this.fireEvent('bodyresize', sz.width, sz.height);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.floating){
+            return this.el.show();
+        }
+        Ext.Panel.superclass.onShow.call(this);
+    },
+
+    // private
+    onHide : function(){
+        if(this.floating){
+            return this.el.hide();
+        }
+        Ext.Panel.superclass.onHide.call(this);
+    },
+
+    // private
+    createToolHandler : function(t, tc, overCls, panel){
+        return function(e){
+            t.removeClass(overCls);
+            if(tc.stopEvent !== false){
+                e.stopEvent();
+            }
+            if(tc.handler){
+                tc.handler.call(tc.scope || t, e, t, panel, tc);
+            }
+        };
+    },
+
+    // private
+    afterRender : function(){
+        if(this.floating && !this.hidden){
+            this.el.show();
+        }
+        if(this.title){
+            this.setTitle(this.title);
+        }
+        this.setAutoScroll();
+        if(this.html){
+            this.body.update(Ext.isObject(this.html) ?
+                             Ext.DomHelper.markup(this.html) :
+                             this.html);
+            delete this.html;
+        }
+        if(this.contentEl){
+            var ce = Ext.getDom(this.contentEl);
+            Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']);
+            this.body.dom.appendChild(ce);
+        }
+        if(this.collapsed){
+            this.collapsed = false;
+            this.collapse(false);
+        }
+        Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last
+        this.initEvents();
+    },
+
+    // private
+    setAutoScroll : function(){
+        if(this.rendered && this.autoScroll){
+            var el = this.body || this.el;
+            if(el){
+                el.setOverflow('auto');
+            }
+        }
+    },
+
+    // private
+    getKeyMap : function(){
+        if(!this.keyMap){
+            this.keyMap = new Ext.KeyMap(this.el, this.keys);
+        }
+        return this.keyMap;
+    },
+
+    // private
+    initEvents : function(){
+        if(this.keys){
+            this.getKeyMap();
+        }
+        if(this.draggable){
+            this.initDraggable();
+        }
+    },
+
+    // private
+    initDraggable : function(){
+        /**
+         * <p>If this Panel is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DragSource} which handles dragging the Panel.</p>
+         * The developer must provide implementations of the abstract methods of {@link Ext.dd.DragSource}
+         * in order to supply behaviour for each stage of the drag/drop process. See {@link #draggable}.
+         * @type Ext.dd.DragSource.
+         * @property dd
+         */
+        this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+    },
+
+    // private
+    beforeEffect : function(){
+        if(this.floating){
+            this.el.beforeAction();
+        }
+        this.el.addClass('x-panel-animated');
+    },
+
+    // private
+    afterEffect : function(){
+        this.syncShadow();
+        this.el.removeClass('x-panel-animated');
+    },
+
+    // private - wraps up an animation param with internal callbacks
+    createEffect : function(a, cb, scope){
+        var o = {
+            scope:scope,
+            block:true
+        };
+        if(a === true){
+            o.callback = cb;
+            return o;
+        }else if(!a.callback){
+            o.callback = cb;
+        }else { // wrap it up
+            o.callback = function(){
+                cb.call(scope);
+                Ext.callback(a.callback, a.scope);
+            };
+        }
+        return Ext.applyIf(o, a);
+    },
+
+    /**
+     * Collapses the panel body so that it becomes hidden.  Fires the {@link #beforecollapse} event which will
+     * cancel the collapse action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    collapse : function(animate){
+        if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.beforeEffect();
+        this.onCollapse(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideOut(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this),
+                        this.collapseDefaults));
+        }else{
+            this[this.collapseEl].hide();
+            this.afterCollapse();
+        }
+    },
+
+    // private
+    afterCollapse : function(){
+        this.collapsed = true;
+        this.el.addClass(this.collapsedCls);
+        this.afterEffect();
+        this.fireEvent('collapse', this);
+    },
+
+    /**
+     * Expands the panel body so that it becomes visible.  Fires the {@link #beforeexpand} event which will
+     * cancel the expand action if it returns false.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    expand : function(animate){
+        if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){
+            return;
+        }
+        var doAnim = animate === true || (animate !== false && this.animCollapse);
+        this.el.removeClass(this.collapsedCls);
+        this.beforeEffect();
+        this.onExpand(doAnim, animate);
+        return this;
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(doAnim){
+            this[this.collapseEl].slideIn(this.slideAnchor,
+                    Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
+                        this.expandDefaults));
+        }else{
+            this[this.collapseEl].show();
+            this.afterExpand();
+        }
+    },
+
+    // private
+    afterExpand : function(){
+        this.collapsed = false;
+        this.afterEffect();
+        if(this.deferLayout !== undefined){
+            this.doLayout(true);
+        }
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel.
+     * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the
+     * {@link #animCollapse} panel config)
+     * @return {Ext.Panel} this
+     */
+    toggleCollapse : function(animate){
+        this[this.collapsed ? 'expand' : 'collapse'](animate);
+        return this;
+    },
+
+    // private
+    onDisable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.mask();
+        }
+        Ext.Panel.superclass.onDisable.call(this);
+    },
+
+    // private
+    onEnable : function(){
+        if(this.rendered && this.maskDisabled){
+            this.el.unmask();
+        }
+        Ext.Panel.superclass.onEnable.call(this);
+    },
+
+    // private
+    onResize : function(w, h){
+        if(w !== undefined || h !== undefined){
+            if(!this.collapsed){
+                if(typeof w == 'number'){
+                    w = this.adjustBodyWidth(w - this.getFrameWidth());
+                    if(this.tbar){
+                        this.tbar.setWidth(w);
+                        if(this.topToolbar){
+                            this.topToolbar.setSize(w);
+                        }
+                    }
+                    if(this.bbar){
+                        this.bbar.setWidth(w);
+                        if(this.bottomToolbar){
+                            this.bottomToolbar.setSize(w);
+                        }
+                    }
+                    if(this.fbar){
+                        var f = this.fbar,
+                            fWidth = 1,
+                            strict = Ext.isStrict;
+                        if(this.buttonAlign == 'left'){
+                           fWidth = w - f.container.getFrameWidth('lr');
+                        }else{
+                            //center/right alignment off in webkit
+                            if(Ext.isIE || Ext.isWebKit){
+                                //center alignment ok on webkit.
+                                //right broken in both, center on IE
+                                if(!(this.buttonAlign == 'center' && Ext.isWebKit) && (!strict || (!Ext.isIE8 && strict))){
+                                    (function(){
+                                        f.setWidth(f.getEl().child('.x-toolbar-ct').getWidth());
+                                    }).defer(1);
+                                }else{
+                                    fWidth = 'auto';
+                                }
+                            }else{
+                                fWidth = 'auto';
+                            }
+                        }
+                        f.setWidth(fWidth);
+                    }
+                    this.body.setWidth(w);
+                }else if(w == 'auto'){
+                    this.body.setWidth(w);
+                }
+
+                if(typeof h == 'number'){
+                    h = Math.max(0, this.adjustBodyHeight(h - this.getFrameHeight()));
+                    this.body.setHeight(h);
+                }else if(h == 'auto'){
+                    this.body.setHeight(h);
+                }
+
+                if(this.disabled && this.el._mask){
+                    this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
+                }
+            }else{
+                this.queuedBodySize = {width: w, height: h};
+                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, w, h);
+        }
+        this.syncShadow();
+    },
+
+    // private
+    adjustBodyHeight : function(h){
+        return h;
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        return w;
+    },
+
+    // private
+    onPosition : function(){
+        this.syncShadow();
+    },
+
+    /**
+     * Returns the width in pixels of the framing elements of this panel (not including the body width).  To
+     * retrieve the body width see {@link #getInnerWidth}.
+     * @return {Number} The frame width
+     */
+    getFrameWidth : function(){
+        var w = this.el.getFrameWidth('lr')+this.bwrap.getFrameWidth('lr');
+
+        if(this.frame){
+            var l = this.bwrap.dom.firstChild;
+            w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r'));
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            w += Ext.fly(mc).getFrameWidth('lr');
+        }
+        return w;
+    },
+
+    /**
+     * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and
+     * header and footer elements, but not including the body height).  To retrieve the body height see {@link #getInnerHeight}.
+     * @return {Number} The frame height
+     */
+    getFrameHeight : function(){
+        var h  = this.el.getFrameWidth('tb')+this.bwrap.getFrameWidth('tb');
+        h += (this.tbar ? this.tbar.getHeight() : 0) +
+             (this.bbar ? this.bbar.getHeight() : 0);
+
+        if(this.frame){
+            var hd = this.el.dom.firstChild;
+            var ft = this.bwrap.dom.lastChild;
+            h += (hd.offsetHeight + ft.offsetHeight);
+            var mc = this.bwrap.dom.firstChild.firstChild.firstChild;
+            h += Ext.fly(mc).getFrameWidth('tb');
+        }else{
+            h += (this.header ? this.header.getHeight() : 0) +
+                (this.footer ? this.footer.getHeight() : 0);
+        }
+        return h;
+    },
+
+    /**
+     * Returns the width in pixels of the body element (not including the width of any framing elements).
+     * For the frame width see {@link #getFrameWidth}.
+     * @return {Number} The body width
+     */
+    getInnerWidth : function(){
+        return this.getSize().width - this.getFrameWidth();
+    },
+
+    /**
+     * Returns the height in pixels of the body element (not including the height of any framing elements).
+     * For the frame height see {@link #getFrameHeight}.
+     * @return {Number} The body height
+     */
+    getInnerHeight : function(){
+        return this.getSize().height - this.getFrameHeight();
+    },
+
+    // private
+    syncShadow : function(){
+        if(this.floating){
+            this.el.sync(true);
+        }
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.body;
+    },
+
+    /**
+     * <p>Sets the title text for the panel and optionally the {@link #iconCls icon class}.</p>
+     * <p>In order to be able to set the title, a header element must have been created
+     * for the Panel. This is triggered either by configuring the Panel with a non-blank <tt>{@link #title}</tt>,
+     * or configuring it with <tt><b>{@link #header}: true</b></tt>.</p>
+     * @param {String} title The title text to set
+     * @param {String} iconCls (optional) {@link #iconCls iconCls} A user-defined CSS class that provides the icon image for this panel
+     */
+    setTitle : function(title, iconCls){
+        this.title = title;
+        if(this.header && this.headerAsText){
+            this.header.child('span').update(title);
+        }
+        if(iconCls){
+            this.setIconClass(iconCls);
+        }
+        this.fireEvent('titlechange', this, title);
+        return this;
+    },
+
+    /**
+     * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body.
+     * @return {Ext.Updater} The Updater
+     */
+    getUpdater : function(){
+        return this.body.getUpdater();
+    },
+
+     /**
+     * Loads this content panel immediately with content returned from an XHR call.
+     * @param {Object/String/Function} config A config object containing any of the following options:
+<pre><code>
+panel.load({
+    url: "your-url.php",
+    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+    callback: yourFunction,
+    scope: yourObject, // optional scope for the callback
+    discardUrl: false,
+    nocache: false,
+    text: "Loading...",
+    timeout: 30,
+    scripts: false
+});
+</code></pre>
+     * The only required property is url. The optional properties nocache, text and scripts
+     * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their
+     * associated property on this panel Updater instance.
+     * @return {Ext.Panel} this
+     */
+    load : function(){
+        var um = this.body.getUpdater();
+        um.update.apply(um, arguments);
+        return this;
+    },
+
+    // private
+    beforeDestroy : function(){
+        if(this.header){
+            this.header.removeAllListeners();
+            if(this.headerAsText){
+                Ext.Element.uncache(this.header.child('span'));
+            }
+        }
+        Ext.Element.uncache(
+            this.header,
+            this.tbar,
+            this.bbar,
+            this.footer,
+            this.body,
+            this.bwrap
+        );
+        if(this.tools){
+            for(var k in this.tools){
+                Ext.destroy(this.tools[k]);
+            }
+        }
+        if(this.buttons){
+            for(var b in this.buttons){
+                Ext.destroy(this.buttons[b]);
+            }
+        }
+        Ext.destroy(this.toolbars);
+        Ext.Panel.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    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';
+    },
+
+    // private
+    createGhost : function(cls, useShim, appendTo){
+        var el = document.createElement('div');
+        el.className = 'x-panel-ghost ' + (cls ? cls : '');
+        if(this.header){
+            el.appendChild(this.el.dom.firstChild.cloneNode(true));
+        }
+        Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight());
+        el.style.width = this.el.dom.offsetWidth + 'px';;
+        if(!appendTo){
+            this.container.dom.appendChild(el);
+        }else{
+            Ext.getDom(appendTo).appendChild(el);
+        }
+        if(useShim !== false && this.el.useShim !== false){
+            var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el);
+            layer.show();
+            return layer;
+        }else{
+            return new Ext.Element(el);
+        }
+    },
+
+    // private
+    doAutoLoad : function(){
+        var u = this.body.getUpdater();
+        if(this.renderer){
+            u.setRenderer(this.renderer);
+        }
+        u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad});
+    },
+
+    /**
+     * Retrieve a tool by id.
+     * @param {String} id
+     * @return {Object} tool
+     */
+    getTool : function(id) {
+        return this.tools[id];
+    }
+
+/**
+ * @cfg {String} autoEl @hide
+ */
+});
+Ext.reg('panel', Ext.Panel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PanelDD.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PanelDD.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/PanelDD.js	(revision 625)
@@ -0,0 +1,154 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.dd.PanelProxy
+ * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally
+ * for the Panel's drag drop implementation, and should never need to be created directly.
+ * @constructor
+ * @param panel The {@link Ext.Panel} to proxy for
+ * @param config Configuration options
+ */
+Ext.dd.PanelProxy = function(panel, config){
+    this.panel = panel;
+    this.id = this.panel.id +'-ddproxy';
+    Ext.apply(this, config);
+};
+
+Ext.dd.PanelProxy.prototype = {
+    /**
+     * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel,
+     * false to drag with no proxy (defaults to true).
+     */
+    insertProxy : true,
+
+    // private overrides
+    setStatus : Ext.emptyFn,
+    reset : Ext.emptyFn,
+    update : Ext.emptyFn,
+    stop : Ext.emptyFn,
+    sync: Ext.emptyFn,
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getEl : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's ghost element
+     * @return {Element} The proxy's ghost element
+     */
+    getGhost : function(){
+        return this.ghost;
+    },
+
+    /**
+     * Gets the proxy's element
+     * @return {Element} The proxy's element
+     */
+    getProxy : function(){
+        return this.proxy;
+    },
+
+    /**
+     * Hides the 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;
+        }
+    },
+
+    /**
+     * Shows the proxy
+     */
+    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';
+        }
+    },
+
+    // private
+    repair : function(xy, callback, scope){
+        this.hide();
+        if(typeof callback == "function"){
+            callback.call(scope || this);
+        }
+    },
+
+    /**
+     * Moves the proxy to a different position in the DOM.  This is typically called while dragging the Panel
+     * to keep the proxy sync'd to the Panel's location.
+     * @param {HTMLElement} parentNode The proxy's parent DOM node
+     * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults
+     * to the parent's last child if not specified)
+     */
+    moveProxy : function(parentNode, before){
+        if(this.proxy){
+            parentNode.insertBefore(this.proxy.dom, before);
+        }
+    }
+};
+
+// private - DD implementation for Panels
+Ext.Panel.DD = function(panel, cfg){
+    this.panel = panel;
+    this.dragData = {panel: panel};
+    this.proxy = new Ext.dd.PanelProxy(panel, cfg);
+    Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg);
+    var h = panel.header;
+    if(h){
+        this.setHandleElId(h.id);
+    }
+    (h ? h : 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(x, y) {
+        this.proxy.show();
+    },
+    b4MouseDown: function(e) {
+        var x = e.getPageX();
+        var y = e.getPageY();
+        this.autoOffset(x, y);
+    },
+    onInitDrag : function(x, y){
+        this.onStartDrag(x, y);
+        return true;
+    },
+    createFrame : Ext.emptyFn,
+    getDragEl : function(e){
+        return this.proxy.ghost.dom;
+    },
+    endDrag : function(e){
+        this.proxy.hide();
+        this.panel.saveState();
+    },
+
+    autoOffset : function(x, y) {
+        x -= this.startPageX;
+        y -= this.startPageY;
+        this.setDelta(x, y);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ProgressBar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ProgressBar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/ProgressBar.js	(revision 625)
@@ -0,0 +1,289 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ProgressBar
+ * @extends Ext.BoxComponent
+ * <p>An updateable progress bar component.  The progress bar supports two different modes: manual and automatic.</p>
+ * <p>In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the
+ * progress bar as needed from your own code.  This method is most appropriate when you want to show progress
+ * throughout an operation that has predictable points of interest at which you can update the control.</p>
+ * <p>In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it
+ * once the operation is complete.  You can optionally have the progress bar wait for a specific amount of time
+ * and then clear itself.  Automatic mode is most appropriate for timed operations or asynchronous operations in
+ * which you have no need for indicating intermediate progress.</p>
+ * @cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+ * @cfg {String} text The progress bar text (defaults to '')
+ * @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress
+ * bar's internal text element)
+ * @cfg {String} id The progress bar element's id (defaults to an auto-generated id)
+ * @xtype progress
+ */
+Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
+   /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
+    */
+    baseCls : 'x-progress',
+    
+    /**
+    * @cfg {Boolean} animate
+    * True to animate the progress bar during transitions (defaults to false)
+    */
+    animate : false,
+
+    // private
+    waitTimer : null,
+
+    // private
+    initComponent : function(){
+        Ext.ProgressBar.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event update
+             * Fires after each update interval
+             * @param {Ext.ProgressBar} this
+             * @param {Number} The current progress value
+             * @param {String} The current progress text
+             */
+            "update"
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        var tpl = new Ext.Template(
+            '<div class="{cls}-wrap">',
+                '<div class="{cls}-inner">',
+                    '<div class="{cls}-bar">',
+                        '<div class="{cls}-text">',
+                            '<div>&#160;</div>',
+                        '</div>',
+                    '</div>',
+                    '<div class="{cls}-text {cls}-text-back">',
+                        '<div>&#160;</div>',
+                    '</div>',
+                '</div>',
+            '</div>'
+        );
+
+        this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true)
+        	: tpl.append(ct, {cls: this.baseCls}, true);
+		        
+        if(this.id){
+            this.el.dom.id = this.id;
+        }
+        var inner = this.el.dom.firstChild;
+        this.progressBar = Ext.get(inner.firstChild);
+
+        if(this.textEl){
+            //use an external text el
+            this.textEl = Ext.get(this.textEl);
+            delete this.textTopEl;
+        }else{
+            //setup our internal layered text els
+            this.textTopEl = Ext.get(this.progressBar.dom.firstChild);
+            var textBackEl = Ext.get(inner.childNodes[1]);
+            this.textTopEl.setStyle("z-index", 99).addClass('x-hidden');
+            this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]);
+            this.textEl.setWidth(inner.offsetWidth);
+        }
+        this.progressBar.setHeight(inner.offsetHeight);
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.ProgressBar.superclass.afterRender.call(this);
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }else{
+            this.updateText(this.text);
+        }
+    },
+
+    /**
+     * Updates the progress bar value, and optionally its text.  If the text argument is not specified,
+     * any existing text value will be unchanged.  To blank out existing text, pass ''.  Note that even
+     * if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for
+     * determining when the progress is complete and calling {@link #reset} to clear and/or hide the control.
+     * @param {Float} value (optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0)
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @param {Boolean} animate (optional) Whether to animate the transition of the progress bar. If this value is
+     * not specified, the default for the class is used (default to false)
+     * @return {Ext.ProgressBar} this
+     */
+    updateProgress : function(value, text, animate){
+        this.value = value || 0;
+        if(text){
+            this.updateText(text);
+        }
+        if(this.rendered){
+            var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);
+            this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
+            if(this.textTopEl){
+                //textTopEl should be the same width as the bar so overflow will clip as the bar moves
+                this.textTopEl.removeClass('x-hidden').setWidth(w);
+            }
+        }
+        this.fireEvent('update', this, value, text);
+        return this;
+    },
+
+    /**
+     * Initiates an auto-updating progress bar.  A duration can be specified, in which case the progress
+     * bar will automatically reset after a fixed amount of time and optionally call a callback function
+     * if specified.  If no duration is passed in, then the progress bar will run indefinitely and must
+     * be manually cleared by calling {@link #reset}.  The wait method accepts a config object with
+     * the following properties:
+     * <pre>
+Property   Type          Description
+---------- ------------  ----------------------------------------------------------------------
+duration   Number        The length of time in milliseconds that the progress bar should
+                         run before resetting itself (defaults to undefined, in which case it
+                         will run indefinitely until reset is called)
+interval   Number        The length of time in milliseconds between each progress update
+                         (defaults to 1000 ms)
+animate    Boolean       Whether to animate the transition of the progress bar. If this value is
+                         not specified, the default for the class is used.                                                   
+increment  Number        The number of progress update segments to display within the progress
+                         bar (defaults to 10).  If the bar reaches the end and is still
+                         updating, it will automatically wrap back to the beginning.
+text       String        Optional text to display in the progress bar element (defaults to '').
+fn         Function      A callback function to execute after the progress bar finishes auto-
+                         updating.  The function will be called with no arguments.  This function
+                         will be ignored if duration is not specified since in that case the
+                         progress bar can only be stopped programmatically, so any required function
+                         should be called by the same code after it resets the progress bar.
+scope      Object        The scope that is passed to the callback function (only applies when
+                         duration and fn are both passed).
+</pre>
+         *
+         * Example usage:
+         * <pre><code>
+var p = new Ext.ProgressBar({
+   renderTo: 'my-el'
+});
+
+//Wait for 5 seconds, then update the status el (progress bar will auto-reset)
+p.wait({
+   interval: 100, //bar will move fast!
+   duration: 5000,
+   increment: 15,
+   text: 'Updating...',
+   scope: this,
+   fn: function(){
+      Ext.fly('status').update('Done!');
+   }
+});
+
+//Or update indefinitely until some async action completes, then reset manually
+p.wait();
+myAction.on('complete', function(){
+    p.reset();
+    Ext.fly('status').update('Done!');
+});
+</code></pre>
+     * @param {Object} config (optional) Configuration options
+     * @return {Ext.ProgressBar} this
+     */
+    wait : function(o){
+        if(!this.waitTimer){
+            var scope = this;
+            o = o || {};
+            this.updateText(o.text);
+            this.waitTimer = Ext.TaskMgr.start({
+                run: function(i){
+                    var inc = o.increment || 10;
+                    this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);
+                },
+                interval: o.interval || 1000,
+                duration: o.duration,
+                onStop: function(){
+                    if(o.fn){
+                        o.fn.apply(o.scope || this);
+                    }
+                    this.reset();
+                },
+                scope: scope
+            });
+        }
+        return this;
+    },
+
+    /**
+     * Returns true if the progress bar is currently in a {@link #wait} operation
+     * @return {Boolean} True if waiting, else false
+     */
+    isWaiting : function(){
+        return this.waitTimer !== null;
+    },
+
+    /**
+     * Updates the progress bar text.  If specified, textEl will be updated, otherwise the progress
+     * bar itself will display the updated text.
+     * @param {String} text (optional) The string to display in the progress text element (defaults to '')
+     * @return {Ext.ProgressBar} this
+     */
+    updateText : function(text){
+        this.text = text || '&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+        }
+        return this;
+    },
+    
+    /**
+     * Synchronizes the inner bar width to the proper proportion of the total componet width based
+     * on the current progress {@link #value}.  This will be called automatically when the ProgressBar
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the ProgressBar if necessary.
+     */
+    syncProgressBar : function(){
+        if(this.value){
+            this.updateProgress(this.value, this.text);
+        }
+        return this;
+    },
+
+    /**
+     * Sets the size of the progress bar.
+     * @param {Number} width The new width in pixels
+     * @param {Number} height The new height in pixels
+     * @return {Ext.ProgressBar} this
+     */
+    setSize : function(w, h){
+        Ext.ProgressBar.superclass.setSize.call(this, w, h);
+        if(this.textTopEl){
+            var inner = this.el.dom.firstChild;
+            this.textEl.setSize(inner.offsetWidth, inner.offsetHeight);
+        }
+        this.syncProgressBar();
+        return this;
+    },
+
+    /**
+     * Resets the progress bar value to 0 and text to empty string.  If hide = true, the progress
+     * bar will also be hidden (using the {@link #hideMode} property internally).
+     * @param {Boolean} hide (optional) True to hide the progress bar (defaults to false)
+     * @return {Ext.ProgressBar} this
+     */
+    reset : function(hide){
+        this.updateProgress(0);
+        if(this.textTopEl){
+            this.textTopEl.addClass('x-hidden');
+        }
+        if(this.waitTimer){
+            this.waitTimer.onStop = null; //prevent recursion
+            Ext.TaskMgr.stop(this.waitTimer);
+            this.waitTimer = null;
+        }
+        if(hide === true){
+            this.hide();
+        }
+        return this;
+    }
+});
+Ext.reg('progress', Ext.ProgressBar);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Resizable.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Resizable.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Resizable.js	(revision 625)
@@ -0,0 +1,760 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Resizable
+ * @extends Ext.util.Observable
+ * <p>Applies drag handles to an element to make it resizable. The drag handles are inserted into the element 
+ * and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap
+ * the textarea in a div and set 'resizeChild' to true (or to the id of the element), <b>or</b> set wrap:true in your config and
+ * the element will be wrapped for you automatically.</p>
+ * <p>Here is the list of valid resize handles:</p>
+ * <pre>
+Value   Description
+------  -------------------
+ 'n'     north
+ 's'     south
+ 'e'     east
+ 'w'     west
+ 'nw'    northwest
+ 'sw'    southwest
+ 'se'    southeast
+ 'ne'    northeast
+ 'all'   all
+</pre>
+ * <p>Here's an example showing the creation of a typical Resizable:</p>
+ * <pre><code>
+var resizer = new Ext.Resizable('element-id', {
+    handles: 'all',
+    minWidth: 200,
+    minHeight: 100,
+    maxWidth: 500,
+    maxHeight: 400,
+    pinned: true
+});
+resizer.on('resize', myHandler);
+</code></pre>
+ * <p>To hide a particular handle, set its display to none in CSS, or through script:<br>
+ * resizer.east.setDisplayed(false);</p>
+ * @constructor
+ * Create a new resizable component
+ * @param {Mixed} el The id or element to resize
+ * @param {Object} config configuration options
+  */
+Ext.Resizable = function(el, config){
+    this.el = Ext.get(el);
+    
+    if(config && config.wrap){
+        config.resizeChild = this.el;
+        this.el = this.el.wrap(typeof config.wrap == 'object' ? config.wrap : {cls:'xresizable-wrap'});
+        this.el.id = this.el.dom.id = config.resizeChild.id + '-rzwrap';
+        this.el.setStyle('overflow', 'hidden');
+        this.el.setPositioning(config.resizeChild.getPositioning());
+        config.resizeChild.clearPositioning();
+        if(!config.width || !config.height){
+            var csize = config.resizeChild.getSize();
+            this.el.setSize(csize.width, csize.height);
+        }
+        if(config.pinned && !config.adjustments){
+            config.adjustments = 'auto';
+        }
+    }
+
+    /**
+     * The proxy Element that is resized in place of the real Element during the resize operation.
+     * This may be queried using {@link Ext.Element#getBox} to provide the new area to resize to.
+     * Read only.
+     * @type Ext.Element.
+     * @property proxy
+     */
+    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, config);
+    
+    if(this.pinned){
+        this.disableTrackOver = true;
+        this.el.addClass('x-resizable-pinned');
+    }
+    // if the element isn't positioned, make it relative
+    var position = this.el.getStyle('position');
+    if(position != 'absolute' && position != 'fixed'){
+        this.el.setStyle('position', 'relative');
+    }
+    if(!this.handles){ // no handles passed, must be legacy style
+        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 hs = this.handles.split(/\s*?[,;]\s*?| /);
+    var ps = Ext.Resizable.positions;
+    for(var i = 0, len = hs.length; i < len; i++){
+        if(hs[i] && ps[hs[i]]){
+            var pos = ps[hs[i]];
+            this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent);
+        }
+    }
+    // legacy
+    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 rc = this.resizeChild;
+        var hw = this.west, he = this.east, hn = this.north, hs = this.south;
+        if(rc && (hw || hn)){
+            rc.position('relative');
+            rc.setLeft(hw ? hw.el.getWidth() : 0);
+            rc.setTop(hn ? hn.el.getHeight() : 0);
+        }
+        this.adjustments = [
+            (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0),
+            (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.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(
+        /**
+         * @event beforeresize
+         * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize.
+         * @param {Ext.Resizable} this
+         * @param {Ext.EventObject} e The mousedown event
+         */
+        'beforeresize',
+        /**
+         * @event resize
+         * Fired after a resize.
+         * @param {Ext.Resizable} this
+         * @param {Number} width The new width
+         * @param {Number} height The new height
+         * @param {Ext.EventObject} e The mouseup event
+         */
+        '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, {
+
+    /**
+     * @cfg {Array/String} adjustments String 'auto' or an array [width, height] with values to be <b>added</b> to the
+     * resize operation's new size (defaults to <tt>[0, 0]</tt>)
+     */
+    adjustments : [0, 0],
+    /**
+     * @cfg {Boolean} animate True to animate the resize (not compatible with dynamic sizing, defaults to false)
+     */
+    animate : false,
+    /**
+     * @cfg {Mixed} constrainTo Constrain the resize to a particular element
+     */
+    /**
+     * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only applied at config time. (defaults to false)
+     */
+    disableTrackOver : false,
+    /**
+     * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to false)
+     */
+    draggable: false,
+    /**
+     * @cfg {Number} duration Animation duration if animate = true (defaults to 0.35)
+     */
+    duration : 0.35,
+    /**
+     * @cfg {Boolean} dynamic True to resize the element while dragging instead of using a proxy (defaults to false)
+     */
+    dynamic : false,
+    /**
+     * @cfg {String} easing Animation easing if animate = true (defaults to <tt>'easingOutStrong'</tt>)
+     */
+    easing : 'easeOutStrong',
+    /**
+     * @cfg {Boolean} enabled False to disable resizing (defaults to true)
+     */
+    enabled : true,
+    /**
+     * @property enabled Writable. False if resizing is disabled.
+     * @type Boolean 
+     */
+    /**
+     * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined).
+     * Specify either <tt>'all'</tt> or any of <tt>'n s e w ne nw se sw'</tt>.
+     */
+    handles : false,
+    /**
+     * @cfg {Boolean} multiDirectional <b>Deprecated</b>.  Deprecated style of adding multi-direction resize handles.
+     */
+    multiDirectional : false,
+    /**
+     * @cfg {Number} height The height of the element in pixels (defaults to null)
+     */
+    height : null,
+    /**
+     * @cfg {Number} width The width of the element in pixels (defaults to null)
+     */
+    width : null,
+    /**
+     * @cfg {Number} heightIncrement The increment to snap the height resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    heightIncrement : 0,
+    /**
+     * @cfg {Number} widthIncrement The increment to snap the width resize in pixels
+     * (only applies if <code>{@link #dynamic}==true</code>). Defaults to <tt>0</tt>.
+     */
+    widthIncrement : 0,
+    /**
+     * @cfg {Number} minHeight The minimum height for the element (defaults to 5)
+     */
+    minHeight : 5,
+    /**
+     * @cfg {Number} minWidth The minimum width for the element (defaults to 5)
+     */
+    minWidth : 5,
+    /**
+     * @cfg {Number} maxHeight The maximum height for the element (defaults to 10000)
+     */
+    maxHeight : 10000,
+    /**
+     * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000)
+     */
+    maxWidth : 10000,
+    /**
+     * @cfg {Number} minX The minimum x for the element (defaults to 0)
+     */
+    minX: 0,
+    /**
+     * @cfg {Number} minY The minimum x for the element (defaults to 0)
+     */
+    minY: 0,
+    /**
+     * @cfg {Boolean} pinned True to ensure that the resize handles are always visible, false to display them only when the
+     * user mouses over the resizable borders. This is only applied at config time. (defaults to false)
+     */
+    pinned : false,
+    /**
+     * @cfg {Boolean} preserveRatio True to preserve the original ratio between height
+     * and width during resize (defaults to false)
+     */
+    preserveRatio : false,
+    /**
+     * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) 
+     */ 
+    resizeChild : false,
+    /**
+     * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false)
+     */
+    transparent: false,
+    /**
+     * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a particular region
+     */
+    /**
+     * @cfg {Boolean} wrap True to wrap an element with a div if needed (required for textareas and images, defaults to false)
+     * in favor of the handles config option (defaults to false)
+     */
+
+    
+    /**
+     * Perform a manual resize and fires the 'resize' event.
+     * @param {Number} width
+     * @param {Number} height
+     */
+    resizeTo : function(width, height){
+        this.el.setSize(width, height);
+        this.updateChildSize();
+        this.fireEvent('resize', this, width, height, null);
+    },
+
+    // private
+    startSizing : function(e, handle){
+        this.fireEvent('beforeresize', this, e);
+        if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler
+
+            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({
+                    scope: this,
+                    mousemove: this.onMouseMove,
+                    mouseup: this.onMouseUp
+                });
+            }
+            this.overlay.setStyle('cursor', handle.el.getStyle('cursor'));
+
+            this.resizing = true;
+            this.startBox = this.el.getBox();
+            this.startPoint = e.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 ct = Ext.get(this.constrainTo);
+                this.resizeRegion = ct.getRegion().adjust(
+                    ct.getFrameWidth('t'),
+                    ct.getFrameWidth('l'),
+                    -ct.getFrameWidth('b'),
+                    -ct.getFrameWidth('r')
+                );
+            }
+
+            this.proxy.setStyle('visibility', 'hidden'); // workaround display none
+            this.proxy.show();
+            this.proxy.setBox(this.startBox);
+            if(!this.dynamic){
+                this.proxy.setStyle('visibility', 'visible');
+            }
+        }
+    },
+
+    // private
+    onMouseDown : function(handle, e){
+        if(this.enabled){
+            e.stopEvent();
+            this.activeHandle = handle;
+            this.startSizing(e, handle);
+        }          
+    },
+
+    // private
+    onMouseUp : function(e){
+        this.activeHandle = null;
+        var size = this.resizeElement();
+        this.resizing = false;
+        this.handleOut();
+        this.overlay.hide();
+        this.proxy.hide();
+        this.fireEvent('resize', this, size.width, size.height, e);
+    },
+
+    // private
+    updateChildSize : function(){
+        if(this.resizeChild){
+            var el = this.el;
+            var child = this.resizeChild;
+            var adj = this.adjustments;
+            if(el.dom.offsetWidth){
+                var b = el.getSize(true);
+                child.setSize(b.width+adj[0], b.height+adj[1]);
+            }
+            // Second call here for IE
+            // The first call enables instant resizing and
+            // the second call corrects scroll bars if they
+            // exist
+            if(Ext.isIE){
+                setTimeout(function(){
+                    if(el.dom.offsetWidth){
+                        var b = el.getSize(true);
+                        child.setSize(b.width+adj[0], b.height+adj[1]);
+                    }
+                }, 10);
+            }
+        }
+    },
+
+    // private
+    snap : function(value, inc, min){
+        if(!inc || !value){
+            return value;
+        }
+        var newValue = value;
+        var m = value % inc;
+        if(m > 0){
+            if(m > (inc/2)){
+                newValue = value + (inc-m);
+            }else{
+                newValue = value - m;
+            }
+        }
+        return Math.max(min, newValue);
+    },
+
+    /**
+     * <p>Performs resizing of the associated Element. This method is called internally by this
+     * class, and should not be called by user code.</p>
+     * <p>If a Resizable is being used to resize an Element which encapsulates a more complex UI
+     * component such as a Panel, this method may be overridden by specifying an implementation
+     * as a config option to provide appropriate behaviour at the end of the resize operation on
+     * mouseup, for example resizing the Panel, and relaying the Panel's content.</p>
+     * <p>The new area to be resized to is available by examining the state of the {@link #proxy}
+     * Element. Example:
+<pre><code>
+new Ext.Panel({
+    title: 'Resize me',
+    x: 100,
+    y: 100,
+    renderTo: Ext.getBody(),
+    floating: true,
+    frame: true,
+    width: 400,
+    height: 200,
+    listeners: {
+        render: function(p) {
+            new Ext.Resizable(p.getEl(), {
+                handles: 'all',
+                pinned: true,
+                transparent: true,
+                resizeElement: function() {
+                    var box = this.proxy.getBox();
+                    p.updateBox(box);
+                    if (p.layout) {
+                        p.doLayout();
+                    }
+                    return box;
+                }
+           });
+       }
+    }
+}).show();
+</code></pre>
+     */
+    resizeElement : function(){
+        var box = this.proxy.getBox();
+        if(this.updateBox){
+            this.el.setBox(box, false, this.animate, this.duration, null, this.easing);
+        }else{
+            this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing);
+        }
+        this.updateChildSize();
+        if(!this.dynamic){
+            this.proxy.hide();
+        }
+        return box;
+    },
+
+    // private
+    constrain : function(v, diff, m, mx){
+        if(v - diff < m){
+            diff = v - m;    
+        }else if(v - diff > mx){
+            diff = v - mx; 
+        }
+        return diff;                
+    },
+
+    // private
+    onMouseMove : function(e){
+        if(this.enabled && this.activeHandle){
+            try{// try catch so if something goes wrong the user doesn't get hung
+
+            if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) {
+                return;
+            }
+
+            //var curXY = this.startPoint;
+            var curSize = this.curSize || this.startBox,
+                x = this.startBox.x, y = this.startBox.y,
+                ox = x, 
+                oy = y,
+                w = curSize.width, 
+                h = curSize.height,
+                ow = w, 
+                oh = h,
+                mw = this.minWidth, 
+                mh = this.minHeight,
+                mxw = this.maxWidth, 
+                mxh = this.maxHeight,
+                wi = this.widthIncrement,
+                hi = this.heightIncrement,
+                eventXY = e.getXY(),
+                diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])),
+                diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])),
+                pos = this.activeHandle.position,
+                tw,
+                th;
+            
+            switch(pos){
+                case 'east':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    break;
+                case 'south':
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'southeast':
+                    w += diffX; 
+                    h += diffY;
+                    w = Math.min(Math.max(mw, w), mxw);
+                    h = Math.min(Math.max(mh, h), mxh);
+                    break;
+                case 'north':
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'west':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+                case 'northeast':
+                    w += diffX; 
+                    w = Math.min(Math.max(mw, w), mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    break;
+                case 'northwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    diffY = this.constrain(h, diffY, mh, mxh);
+                    y += diffY;
+                    h -= diffY;
+                    x += diffX;
+                    w -= diffX;
+                    break;
+               case 'southwest':
+                    diffX = this.constrain(w, diffX, mw, mxw);
+                    h += diffY;
+                    h = Math.min(Math.max(mh, h), mxh);
+                    x += diffX;
+                    w -= diffX;
+                    break;
+            }
+            
+            var sw = this.snap(w, wi, mw);
+            var sh = this.snap(h, hi, mh);
+            if(sw != w || sh != h){
+                switch(pos){
+                    case 'northeast':
+                        y -= sh - h;
+                    break;
+                    case 'north':
+                        y -= sh - h;
+                        break;
+                    case 'southwest':
+                        x -= sw - w;
+                    break;
+                    case 'west':
+                        x -= sw - w;
+                        break;
+                    case 'northwest':
+                        x -= sw - w;
+                        y -= sh - h;
+                    break;
+                }
+                w = sw;
+                h = sh;
+            }
+            
+            if(this.preserveRatio){
+                switch(pos){
+                    case 'southeast':
+                    case 'east':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                       break;
+                    case 'south':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        break;
+                    case 'northeast':
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                    break;
+                    case 'north':
+                        tw = w;
+                        w = ow * (h/oh);
+                        w = Math.min(Math.max(mw, w), mxw);
+                        h = oh * (w/ow);
+                        x += (tw - w) / 2;
+                        break;
+                    case 'southwest':
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                        break;
+                    case 'west':
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        y += (th - h) / 2;
+                        tw = w;
+                        w = ow * (h/oh);
+                        x += tw - w;
+                       break;
+                    case 'northwest':
+                        tw = w;
+                        th = h;
+                        h = oh * (w/ow);
+                        h = Math.min(Math.max(mh, h), mxh);
+                        w = ow * (h/oh);
+                        y += th - h;
+                        x += tw - w;
+                        break;
+                        
+                }
+            }
+            this.proxy.setBounds(x, y, w, h);
+            if(this.dynamic){
+                this.resizeElement();
+            }
+            }catch(ex){}
+        }
+    },
+
+    // private
+    handleOver : function(){
+        if(this.enabled){
+            this.el.addClass('x-resizable-over');
+        }
+    },
+
+    // private
+    handleOut : function(){
+        if(!this.resizing){
+            this.el.removeClass('x-resizable-over');
+        }
+    },
+    
+    /**
+     * Returns the element this component is bound to.
+     * @return {Ext.Element}
+     */
+    getEl : function(){
+        return this.el;
+    },
+    
+    /**
+     * Returns the resizeChild element (or null).
+     * @return {Ext.Element}
+     */
+    getResizeChild : function(){
+        return this.resizeChild;
+    },
+    
+    /**
+     * Destroys this resizable. If the element was wrapped and 
+     * removeEl is not true then the element remains.
+     * @param {Boolean} removeEl (optional) true to remove the element from the DOM
+     */
+    destroy : function(removeEl){
+        Ext.destroy(this.dd, this.overlay, this.proxy);
+        this.overlay = null;
+        this.proxy = null;
+        
+        var ps = Ext.Resizable.positions;
+        for(var k in ps){
+            if(typeof ps[k] != 'function' && this[ps[k]]){
+                this[ps[k]].destroy();
+            }
+        }
+        if(removeEl){
+            this.el.update('');
+            Ext.destroy(this.el);
+            this.el = null;
+        }
+        this.purgeListeners();
+    },
+
+    syncHandleHeight : function(){
+        var h = this.el.getHeight(true);
+        if(this.west){
+            this.west.el.setHeight(h);
+        }
+        if(this.east){
+            this.east.el.setHeight(h);
+        }
+    }
+});
+
+// private
+// hash to map config positions to true positions
+Ext.Resizable.positions = {
+    n: 'north', s: 'south', e: 'east', w: 'west', se: 'southeast', sw: 'southwest', nw: 'northwest', ne: 'northeast'
+};
+
+// private
+Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){
+    if(!this.tpl){
+        // only initialize the template if resizable is used
+        var tpl = Ext.DomHelper.createTemplate(
+            {tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'}
+        );
+        tpl.compile();
+        Ext.Resizable.Handle.prototype.tpl = tpl;
+    }
+    this.position = pos;
+    this.rz = rz;
+    this.el = this.tpl.append(rz.el.dom, [this.position], true);
+    this.el.unselectable();
+    if(transparent){
+        this.el.setOpacity(0);
+    }
+    this.el.on('mousedown', this.onMouseDown, this);
+    if(!disableTrackOver){
+        this.el.on({
+            scope: this,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+    }
+};
+
+// private
+Ext.Resizable.Handle.prototype = {
+    // private
+    afterResize : function(rz){
+        // do nothing    
+    },
+    // private
+    onMouseDown : function(e){
+        this.rz.onMouseDown(this, e);
+    },
+    // private
+    onMouseOver : function(e){
+        this.rz.handleOver(this, e);
+    },
+    // private
+    onMouseOut : function(e){
+        this.rz.handleOut(this, e);
+    },
+    // private
+    destroy : function(){
+        Ext.destroy(this.el);
+        this.el = null;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Shadow.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Shadow.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Shadow.js	(revision 625)
@@ -0,0 +1,192 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Shadow
+ * Simple class that can provide a shadow effect for any element.  Note that the element MUST be absolutely positioned,
+ * and the shadow does not provide any shimming.  This should be used only in simple cases -- for more advanced
+ * functionality that can also provide the same shadow effect, see the {@link Ext.Layer} class.
+ * @constructor
+ * Create a new Shadow
+ * @param {Object} config The config object
+ */
+Ext.Shadow = function(config){
+    Ext.apply(this, config);
+    if(typeof this.mode != "string"){
+        this.mode = this.defaultMode;
+    }
+    var o = this.offset, a = {h: 0};
+    var rad = Math.floor(this.offset/2);
+    switch(this.mode.toLowerCase()){ // all this hideous nonsense calculates the various offsets for shadows
+        case "drop":
+            a.w = 0;
+            a.l = a.t = o;
+            a.t -= 1;
+            if(Ext.isIE){
+                a.l -= this.offset + rad;
+                a.t -= this.offset + rad;
+                a.w -= rad;
+                a.h -= rad;
+                a.t += 1;
+            }
+        break;
+        case "sides":
+            a.w = (o*2);
+            a.l = -o;
+            a.t = o-1;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= this.offset + rad;
+                a.l += 1;
+                a.w -= (this.offset - rad)*2;
+                a.w -= rad + 1;
+                a.h -= 1;
+            }
+        break;
+        case "frame":
+            a.w = a.h = (o*2);
+            a.l = a.t = -o;
+            a.t += 1;
+            a.h -= 2;
+            if(Ext.isIE){
+                a.l -= (this.offset - rad);
+                a.t -= (this.offset - rad);
+                a.l += 1;
+                a.w -= (this.offset + rad + 1);
+                a.h -= (this.offset + rad);
+                a.h += 1;
+            }
+        break;
+    };
+
+    this.adjusts = a;
+};
+
+Ext.Shadow.prototype = {
+    /**
+     * @cfg {String} mode
+     * The shadow display mode.  Supports the following options:<div class="mdetail-params"><ul>
+     * <li><b><tt>sides</tt></b> : Shadow displays on both sides and bottom only</li>
+     * <li><b><tt>frame</tt></b> : Shadow displays equally on all four sides</li>
+     * <li><b><tt>drop</tt></b> : Traditional bottom-right drop shadow</li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {String} offset
+     * The number of pixels to offset the shadow from the element (defaults to <tt>4</tt>)
+     */
+    offset: 4,
+
+    // private
+    defaultMode: "drop",
+
+    /**
+     * Displays the shadow under the target element
+     * @param {Mixed} targetEl The id or element under which the shadow should display
+     */
+    show : function(target){
+        target = Ext.get(target);
+        if(!this.el){
+            this.el = Ext.Shadow.Pool.pull();
+            if(this.el.dom.nextSibling != target.dom){
+                this.el.insertBefore(target);
+            }
+        }
+        this.el.setStyle("z-index", this.zIndex || parseInt(target.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(
+            target.getLeft(true),
+            target.getTop(true),
+            target.getWidth(),
+            target.getHeight()
+        );
+        this.el.dom.style.display = "block";
+    },
+
+    /**
+     * Returns true if the shadow is visible, else false
+     */
+    isVisible : function(){
+        return this.el ? true : false;  
+    },
+
+    /**
+     * Direct alignment when values are already available. Show must be called at least once before
+     * calling this method to ensure it is initialized.
+     * @param {Number} left The target element left position
+     * @param {Number} top The target element top position
+     * @param {Number} width The target element width
+     * @param {Number} height The target element height
+     */
+    realign : function(l, t, w, h){
+        if(!this.el){
+            return;
+        }
+        var a = this.adjusts, d = this.el.dom, s = d.style;
+        var iea = 0;
+        s.left = (l+a.l)+"px";
+        s.top = (t+a.t)+"px";
+        var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px";
+        if(s.width != sws || s.height != shs){
+            s.width = sws;
+            s.height = shs;
+            if(!Ext.isIE){
+                var cn = d.childNodes;
+                var sww = Math.max(0, (sw-12))+"px";
+                cn[0].childNodes[1].style.width = sww;
+                cn[1].childNodes[1].style.width = sww;
+                cn[2].childNodes[1].style.width = sww;
+                cn[1].style.height = Math.max(0, (sh-12))+"px";
+            }
+        }
+    },
+
+    /**
+     * Hides this shadow
+     */
+    hide : function(){
+        if(this.el){
+            this.el.dom.style.display = "none";
+            Ext.Shadow.Pool.push(this.el);
+            delete this.el;
+        }
+    },
+
+    /**
+     * Adjust the z-index of this shadow
+     * @param {Number} zindex The new z-index
+     */
+    setZIndex : function(z){
+        this.zIndex = z;
+        if(this.el){
+            this.el.setStyle("z-index", z);
+        }
+    }
+};
+
+// Private utility class that manages the internal Shadow cache
+Ext.Shadow.Pool = function(){
+    var p = [];
+    var markup = 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 sh = p.shift();
+            if(!sh){
+                sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup));
+                sh.autoBoxAdjust = false;
+            }
+            return sh;
+        },
+
+        push : function(sh){
+            p.push(sh);
+        }
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Slider.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Slider.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Slider.js	(revision 625)
@@ -0,0 +1,426 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Slider
+ * @extends Ext.BoxComponent
+ * Slider which supports vertical or horizontal orientation, keyboard adjustments,
+ * configurable snapping, axis clicking and animation. Can be added as an item to
+ * any container. Example usage:
+<pre><code>
+new Ext.Slider({
+    renderTo: Ext.getBody(),
+    width: 200,
+    value: 50,
+    increment: 10,
+    minValue: 0,
+    maxValue: 100
+});
+</code></pre>
+ */
+Ext.Slider = Ext.extend(Ext.BoxComponent, {
+	/**
+	 * @cfg {Number} value The value to initialize the slider with. Defaults to minValue.
+	 */
+	/**
+	 * @cfg {Boolean} vertical Orient the Slider vertically rather than horizontally, defaults to false.
+	 */
+    vertical: false,
+	/**
+	 * @cfg {Number} minValue The minimum value for the Slider. Defaults to 0.
+	 */
+    minValue: 0,
+	/**
+	 * @cfg {Number} maxValue The maximum value for the Slider. Defaults to 100.
+	 */
+    maxValue: 100,
+    /**
+     * @cfg {Number/Boolean} decimalPrecision.
+     * <p>The number of decimal places to which to round the Slider's value. Defaults to 0.</p>
+     * <p>To disable rounding, configure as <tt><b>false</b></tt>.</p>
+     */
+    decimalPrecision: 0,
+	/**
+	 * @cfg {Number} keyIncrement How many units to change the Slider when adjusting with keyboard navigation. Defaults to 1. If the increment config is larger, it will be used instead.
+	 */
+    keyIncrement: 1,
+	/**
+	 * @cfg {Number} increment How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping'.
+	 */
+    increment: 0,
+	// private
+    clickRange: [5,15],
+	/**
+	 * @cfg {Boolean} clickToChange Determines whether or not clicking on the Slider axis will change the slider. Defaults to true
+	 */
+    clickToChange : true,
+	/**
+	 * @cfg {Boolean} animate Turn on or off animation. Defaults to true
+	 */
+    animate: true,
+
+    /**
+     * True while the thumb is in a drag operation
+     * @type boolean
+     */
+    dragging: false,
+
+    // private override
+    initComponent : function(){
+        if(!Ext.isDefined(this.value)){
+            this.value = this.minValue;
+        }
+        Ext.Slider.superclass.initComponent.call(this);
+        this.keyIncrement = Math.max(this.increment, this.keyIncrement);
+        this.addEvents(
+            /**
+             * @event beforechange
+             * Fires before the slider value is changed. By returning false from an event handler,
+             * you can cancel the event and prevent the slider from changing.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider is being changed to.
+			 * @param {Number} oldValue The old value which the slider was previously.
+             */
+			'beforechange',
+			/**
+			 * @event change
+			 * Fires when the slider value is changed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'change',
+			/**
+			 * @event changecomplete
+			 * Fires when the slider value is changed by the user and any drag operations have completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Number} newValue The new value which the slider has been changed to.
+			 */
+			'changecomplete',
+			/**
+			 * @event dragstart
+             * Fires after a drag operation has started.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragstart',
+			/**
+			 * @event drag
+             * Fires continuously during the drag operation while the mouse is moving.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'drag',
+			/**
+			 * @event dragend
+             * Fires after the drag operation has completed.
+			 * @param {Ext.Slider} slider The slider
+			 * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker
+			 */
+			'dragend'
+		);
+
+        if(this.vertical){
+            Ext.apply(this, Ext.Slider.Vertical);
+        }
+    },
+
+	// private override
+    onRender : function(){
+        this.autoEl = {
+            cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'),
+            cn:{cls:'x-slider-end',cn:{cls:'x-slider-inner',cn:[{cls:'x-slider-thumb'},{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}]}}
+        };
+        Ext.Slider.superclass.onRender.apply(this, arguments);
+        this.endEl = this.el.first();
+        this.innerEl = this.endEl.first();
+        this.thumb = this.innerEl.first();
+        this.halfThumb = (this.vertical ? this.thumb.getHeight() : this.thumb.getWidth())/2;
+        this.focusEl = this.thumb.next();
+        this.initEvents();
+    },
+
+	// private override
+    initEvents : function(){
+        this.thumb.addClassOnOver('x-slider-thumb-over');
+        this.mon(this.el, {
+            scope: this,
+            mousedown: this.onMouseDown,
+            keydown: this.onKeyDown
+        });
+
+        this.focusEl.swallowEvent("click", true);
+
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeDragStart.createDelegate(this),
+            onStart: this.onDragStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onDragEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(this.thumb);
+        this.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+	// private override
+    onMouseDown : function(e){
+        if(this.disabled) {return;}
+        if(this.clickToChange && e.target != this.thumb.dom){
+            var local = this.innerEl.translatePoints(e.getXY());
+            this.onClickChange(local);
+        }
+        this.focus();
+    },
+
+	// private
+    onClickChange : function(local){
+        if(local.top > this.clickRange[0] && local.top < this.clickRange[1]){
+            this.setValue(Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true);
+        }
+    },
+
+	// private
+    onKeyDown : function(e){
+        if(this.disabled){e.preventDefault();return;}
+        var k = e.getKey();
+        switch(k){
+            case e.UP:
+            case e.RIGHT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.maxValue, undefined, true);
+                }else{
+                    this.setValue(this.value+this.keyIncrement, undefined, true);
+                }
+            break;
+            case e.DOWN:
+            case e.LEFT:
+                e.stopEvent();
+                if(e.ctrlKey){
+                    this.setValue(this.minValue, undefined, true);
+                }else{
+                    this.setValue(this.value-this.keyIncrement, undefined, true);
+                }
+            break;
+            default:
+                e.preventDefault();
+        }
+    },
+
+	// private
+    doSnap : function(value){
+        if(!this.increment || this.increment == 1 || !value) {
+            return value;
+        }
+        var newValue = value, inc = this.increment;
+        var m = value % inc;
+        if(m != 0){
+            newValue -= m;
+            if(m * 2 > inc){
+                newValue += inc;
+            }else if(m * 2 < -inc){
+                newValue -= inc;
+            }
+        }
+        return newValue.constrain(this.minValue,  this.maxValue);
+    },
+
+	// private
+    afterRender : function(){
+        Ext.Slider.superclass.afterRender.apply(this, arguments);
+        if(this.value !== undefined){
+            var v = this.normalizeValue(this.value);
+            if(v !== this.value){
+                delete this.value;
+                this.setValue(v, false);
+            }else{
+                this.moveThumb(this.translateValue(v), false);
+            }
+        }
+    },
+
+	// private
+    getRatio : function(){
+        var w = this.innerEl.getWidth();
+        var v = this.maxValue - this.minValue;
+        return v == 0 ? w : (w/v);
+    },
+
+	// private
+    normalizeValue : function(v){
+        v = this.doSnap(v);
+        v = Ext.util.Format.round(v, this.decimalPrecision);
+        v = v.constrain(this.minValue, this.maxValue);
+        return v;
+    },
+
+	/**
+	 * Programmatically sets the value of the Slider. Ensures that the value is constrained within
+	 * the minValue and maxValue.
+	 * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue)
+	 * @param {Boolean} animate Turn on or off animation, defaults to true
+	 */
+    setValue : function(v, animate, changeComplete){
+        v = this.normalizeValue(v);
+        if(v !== this.value && this.fireEvent('beforechange', this, v, this.value) !== false){
+            this.value = v;
+            this.moveThumb(this.translateValue(v), animate !== false);
+            this.fireEvent('change', this, v);
+            if(changeComplete){
+                this.fireEvent('changecomplete', this, v);
+            }
+        }
+    },
+
+	// private
+    translateValue : function(v){
+        var ratio = this.getRatio();
+        return (v * ratio)-(this.minValue * ratio)-this.halfThumb;
+    },
+
+	reverseValue : function(pos){
+        var ratio = this.getRatio();
+        return (pos+this.halfThumb+(this.minValue * ratio))/ratio;
+    },
+
+	// private
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setLeft(v);
+        }else{
+            this.thumb.shift({left: v, stopFx: true, duration:.35});
+        }
+    },
+
+	// private
+    focus : function(){
+        this.focusEl.focus(10);
+    },
+
+	// private
+    onBeforeDragStart : function(e){
+        return !this.disabled;
+    },
+
+	// private
+    onDragStart: function(e){
+        this.thumb.addClass('x-slider-thumb-drag');
+        this.dragging = true;
+        this.dragStartValue = this.value;
+        this.fireEvent('dragstart', this, e);
+    },
+
+	// private
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        this.setValue(Ext.util.Format.round(this.reverseValue(pos.left), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+	// private
+    onDragEnd: function(e){
+        this.thumb.removeClass('x-slider-thumb-drag');
+        this.dragging = false;
+        this.fireEvent('dragend', this, e);
+        if(this.dragStartValue != this.value){
+            this.fireEvent('changecomplete', this, this.value);
+        }
+    },
+
+	// private
+    onResize : function(w, h){
+        this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r')));
+        this.syncThumb();
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.Slider.superclass.onDisable.call(this);
+        this.thumb.addClass(this.disabledClass);
+        if(Ext.isIE){
+            //IE breaks when using overflow visible and opacity other than 1.
+            //Create a place holder for the thumb and display it.
+            var xy = this.thumb.getXY();
+            this.thumb.hide();
+            this.innerEl.addClass(this.disabledClass).dom.disabled = true;
+            if (!this.thumbHolder){
+                this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass});    
+            }
+            this.thumbHolder.show().setXY(xy);
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.Slider.superclass.onEnable.call(this);
+        this.thumb.removeClass(this.disabledClass);
+        if(Ext.isIE){
+            this.innerEl.removeClass(this.disabledClass).dom.disabled = false;
+            if (this.thumbHolder){
+                this.thumbHolder.hide();
+            }
+            this.thumb.show();
+            this.syncThumb();
+        }
+    },
+    
+    /**
+     * Synchronizes the thumb position to the proper proportion of the total component width based
+     * on the current slider {@link #value}.  This will be called automatically when the Slider
+     * is resized by a layout, but if it is rendered auto width, this method can be called from
+     * another resize handler to sync the Slider if necessary.
+     */
+    syncThumb : function(){
+        if(this.rendered){
+            this.moveThumb(this.translateValue(this.value));
+        }
+    },
+
+	/**
+	 * Returns the current value of the slider
+	 * @return {Number} The current value of the slider
+	 */
+    getValue : function(){
+        return this.value;
+    }
+});
+Ext.reg('slider', Ext.Slider);
+
+// private class to support vertical sliders
+Ext.Slider.Vertical = {
+    onResize : function(w, h){
+        this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b')));
+        this.syncThumb();
+    },
+
+    getRatio : function(){
+        var h = this.innerEl.getHeight();
+        var v = this.maxValue - this.minValue;
+        return h/v;
+    },
+
+    moveThumb: function(v, animate){
+        if(!animate || this.animate === false){
+            this.thumb.setBottom(v);
+        }else{
+            this.thumb.shift({bottom: v, stopFx: true, duration:.35});
+        }
+    },
+
+    onDrag: function(e){
+        var pos = this.innerEl.translatePoints(this.tracker.getXY());
+        var bottom = this.innerEl.getHeight()-pos.top;
+        this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), false);
+        this.fireEvent('drag', this, e);
+    },
+
+    onClickChange : function(local){
+        if(local.left > this.clickRange[0] && local.left < this.clickRange[1]){
+            var bottom = this.innerEl.getHeight()-local.top;
+            this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), undefined, true);
+        }
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitBar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitBar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitBar.js	(revision 625)
@@ -0,0 +1,436 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.SplitBar
+ * @extends Ext.util.Observable
+ * Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized).
+ * <br><br>
+ * Usage:
+ * <pre><code>
+var split = new Ext.SplitBar("elementToDrag", "elementToSize",
+                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
+split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
+split.minSize = 100;
+split.maxSize = 600;
+split.animate = true;
+split.on('moved', splitterMoved);
+</code></pre>
+ * @constructor
+ * Create a new SplitBar
+ * @param {Mixed} dragElement The element to be dragged and act as the SplitBar.
+ * @param {Mixed} resizingElement The element to be resized based on where the SplitBar element is dragged
+ * @param {Number} orientation (optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+ * @param {Number} placement (optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or  
+                        Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial
+                        position of the SplitBar).
+ */
+Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
+    
+    /** @private */
+    this.el = Ext.get(dragElement, true);
+    this.el.dom.unselectable = "on";
+    /** @private */
+    this.resizingEl = Ext.get(resizingElement, true);
+
+    /**
+     * @private
+     * The orientation of the split. Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)
+     * Note: If this is changed after creating the SplitBar, the placement property must be manually updated
+     * @type Number
+     */
+    this.orientation = orientation || Ext.SplitBar.HORIZONTAL;
+    
+    /**
+     * The increment, in pixels by which to move this SplitBar. When <i>undefined</i>, the SplitBar moves smoothly.
+     * @type Number
+     * @property tickSize
+     */
+    /**
+     * The minimum size of the resizing element. (Defaults to 0)
+     * @type Number
+     */
+    this.minSize = 0;
+    
+    /**
+     * The maximum size of the resizing element. (Defaults to 2000)
+     * @type Number
+     */
+    this.maxSize = 2000;
+    
+    /**
+     * Whether to animate the transition to the new size
+     * @type Boolean
+     */
+    this.animate = false;
+    
+    /**
+     * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
+     * @type Boolean
+     */
+    this.useShim = false;
+    
+    /** @private */
+    this.shim = null;
+    
+    if(!existingProxy){
+        /** @private */
+        this.proxy = Ext.SplitBar.createProxy(this.orientation);
+    }else{
+        this.proxy = Ext.get(existingProxy).dom;
+    }
+    /** @private */
+    this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id});
+    
+    /** @private */
+    this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
+    
+    /** @private */
+    this.dragSpecs = {};
+    
+    /**
+     * @private The adapter to use to positon and resize elements
+     */
+    this.adapter = new Ext.SplitBar.BasicLayoutAdapter();
+    this.adapter.init(this);
+    
+    if(this.orientation == Ext.SplitBar.HORIZONTAL){
+        /** @private */
+        this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
+        this.el.addClass("x-splitbar-h");
+    }else{
+        /** @private */
+        this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
+        this.el.addClass("x-splitbar-v");
+    }
+    
+    this.addEvents(
+        /**
+         * @event resize
+         * Fires when the splitter is moved (alias for {@link #moved})
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "resize",
+        /**
+         * @event moved
+         * Fires when the splitter is moved
+         * @param {Ext.SplitBar} this
+         * @param {Number} newSize the new width or height
+         */
+        "moved",
+        /**
+         * @event beforeresize
+         * Fires before the splitter is dragged
+         * @param {Ext.SplitBar} this
+         */
+        "beforeresize",
+
+        "beforeapply"
+    );
+
+    Ext.SplitBar.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.SplitBar, Ext.util.Observable, {
+    onStartProxyDrag : function(x, y){
+        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 size = this.adapter.getElementSize(this);
+        this.activeMinSize = this.getMinimumSize();
+        this.activeMaxSize = this.getMaximumSize();
+        var c1 = size - this.activeMinSize;
+        var c2 = Math.max(this.activeMaxSize - size, 0);
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(
+                this.placement == Ext.SplitBar.LEFT ? c1 : c2, 
+                this.placement == Ext.SplitBar.LEFT ? c2 : c1,
+                this.tickSize
+            );
+            this.dd.setYConstraint(0, 0);
+        }else{
+            this.dd.resetConstraints();
+            this.dd.setXConstraint(0, 0);
+            this.dd.setYConstraint(
+                this.placement == Ext.SplitBar.TOP ? c1 : c2, 
+                this.placement == Ext.SplitBar.TOP ? c2 : c1,
+                this.tickSize
+            );
+         }
+        this.dragSpecs.startSize = size;
+        this.dragSpecs.startPoint = [x, y];
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y);
+    },
+    
+    /** 
+     * @private Called after the drag operation by the DDProxy
+     */
+    onEndProxyDrag : function(e){
+        Ext.get(this.proxy).setDisplayed(false);
+        var endPoint = Ext.lib.Event.getXY(e);
+        if(this.overlay){
+            Ext.destroy(this.overlay);
+            delete this.overlay;
+        }
+        var newSize;
+        if(this.orientation == Ext.SplitBar.HORIZONTAL){
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.LEFT ?
+                    endPoint[0] - this.dragSpecs.startPoint[0] :
+                    this.dragSpecs.startPoint[0] - endPoint[0]
+                );
+        }else{
+            newSize = this.dragSpecs.startSize + 
+                (this.placement == Ext.SplitBar.TOP ?
+                    endPoint[1] - this.dragSpecs.startPoint[1] :
+                    this.dragSpecs.startPoint[1] - endPoint[1]
+                );
+        }
+        newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize);
+        if(newSize != this.dragSpecs.startSize){
+            if(this.fireEvent('beforeapply', this, newSize) !== false){
+                this.adapter.setElementSize(this, newSize);
+                this.fireEvent("moved", this, newSize);
+                this.fireEvent("resize", this, newSize);
+            }
+        }
+    },
+    
+    /**
+     * Get the adapter this SplitBar uses
+     * @return The adapter object
+     */
+    getAdapter : function(){
+        return this.adapter;
+    },
+    
+    /**
+     * Set the adapter this SplitBar uses
+     * @param {Object} adapter A SplitBar adapter object
+     */
+    setAdapter : function(adapter){
+        this.adapter = adapter;
+        this.adapter.init(this);
+    },
+    
+    /**
+     * Gets the minimum size for the resizing element
+     * @return {Number} The minimum size
+     */
+    getMinimumSize : function(){
+        return this.minSize;
+    },
+    
+    /**
+     * Sets the minimum size for the resizing element
+     * @param {Number} minSize The minimum size
+     */
+    setMinimumSize : function(minSize){
+        this.minSize = minSize;
+    },
+    
+    /**
+     * Gets the maximum size for the resizing element
+     * @return {Number} The maximum size
+     */
+    getMaximumSize : function(){
+        return this.maxSize;
+    },
+    
+    /**
+     * Sets the maximum size for the resizing element
+     * @param {Number} maxSize The maximum size
+     */
+    setMaximumSize : function(maxSize){
+        this.maxSize = maxSize;
+    },
+    
+    /**
+     * Sets the initialize size for the resizing element
+     * @param {Number} size The initial size
+     */
+    setCurrentSize : function(size){
+        var oldAnimate = this.animate;
+        this.animate = false;
+        this.adapter.setElementSize(this, size);
+        this.animate = oldAnimate;
+    },
+    
+    /**
+     * Destroy this splitbar. 
+     * @param {Boolean} removeEl True to remove the element
+     */
+    destroy : function(removeEl){
+		Ext.destroy(this.shim, Ext.get(this.proxy));
+        this.dd.unreg();
+        if(removeEl){
+            this.el.remove();
+        }
+		this.purgeListeners();
+    }
+});
+
+/**
+ * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color.
+ */
+Ext.SplitBar.createProxy = function(dir){
+    var proxy = new Ext.Element(document.createElement("div"));
+    proxy.unselectable();
+    var cls = 'x-splitbar-proxy';
+    proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v'));
+    document.body.appendChild(proxy.dom);
+    return proxy.dom;
+};
+
+/** 
+ * @class Ext.SplitBar.BasicLayoutAdapter
+ * Default Adapter. It assumes the splitter and resizing element are not positioned
+ * elements and only gets/sets the width of the element. Generally used for table based layouts.
+ */
+Ext.SplitBar.BasicLayoutAdapter = function(){
+};
+
+Ext.SplitBar.BasicLayoutAdapter.prototype = {
+    // do nothing for now
+    init : function(s){
+    
+    },
+    /**
+     * Called before drag operations to get the current size of the resizing element. 
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     */
+     getElementSize : function(s){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            return s.resizingEl.getWidth();
+        }else{
+            return s.resizingEl.getHeight();
+        }
+    },
+    
+    /**
+     * Called after drag operations to set the size of the resizing element.
+     * @param {Ext.SplitBar} s The SplitBar using this adapter
+     * @param {Number} newSize The new size to set
+     * @param {Function} onComplete A function to be invoked when resizing is complete
+     */
+    setElementSize : function(s, newSize, onComplete){
+        if(s.orientation == Ext.SplitBar.HORIZONTAL){
+            if(!s.animate){
+                s.resizingEl.setWidth(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }else{
+            
+            if(!s.animate){
+                s.resizingEl.setHeight(newSize);
+                if(onComplete){
+                    onComplete(s, newSize);
+                }
+            }else{
+                s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut');
+            }
+        }
+    }
+};
+
+/** 
+ *@class Ext.SplitBar.AbsoluteLayoutAdapter
+ * @extends Ext.SplitBar.BasicLayoutAdapter
+ * Adapter that  moves the splitter element to align with the resized sizing element. 
+ * Used with an absolute positioned SplitBar.
+ * @param {Mixed} container The container that wraps around the absolute positioned content. If it's
+ * document.body, make sure you assign an id to the body element.
+ */
+Ext.SplitBar.AbsoluteLayoutAdapter = function(container){
+    this.basic = new Ext.SplitBar.BasicLayoutAdapter();
+    this.container = Ext.get(container);
+};
+
+Ext.SplitBar.AbsoluteLayoutAdapter.prototype = {
+    init : function(s){
+        this.basic.init(s);
+    },
+    
+    getElementSize : function(s){
+        return this.basic.getElementSize(s);
+    },
+    
+    setElementSize : function(s, newSize, onComplete){
+        this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s]));
+    },
+    
+    moveSplitter : function(s){
+        var yes = Ext.SplitBar;
+        switch(s.placement){
+            case yes.LEFT:
+                s.el.setX(s.resizingEl.getRight());
+                break;
+            case yes.RIGHT:
+                s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px");
+                break;
+            case yes.TOP:
+                s.el.setY(s.resizingEl.getBottom());
+                break;
+            case yes.BOTTOM:
+                s.el.setY(s.resizingEl.getTop() - s.el.getHeight());
+                break;
+        }
+    }
+};
+
+/**
+ * Orientation constant - Create a vertical SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.VERTICAL = 1;
+
+/**
+ * Orientation constant - Create a horizontal SplitBar
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.HORIZONTAL = 2;
+
+/**
+ * Placement constant - The resizing element is to the left of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.LEFT = 1;
+
+/**
+ * Placement constant - The resizing element is to the right of the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.RIGHT = 2;
+
+/**
+ * Placement constant - The resizing element is positioned above the splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.TOP = 3;
+
+/**
+ * Placement constant - The resizing element is positioned under splitter element
+ * @static
+ * @type Number
+ */
+Ext.SplitBar.BOTTOM = 4;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitButton.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitButton.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/SplitButton.js	(revision 625)
@@ -0,0 +1,124 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.SplitButton
+ * @extends Ext.Button
+ * A split button that provides a built-in dropdown arrow that can fire an event separately from the default
+ * click event of the button.  Typically this would be used to display a dropdown menu that provides additional
+ * options to the primary button action, but any custom handler can provide the arrowclick implementation.  Example usage:
+ * <pre><code>
+// display a dropdown menu:
+new Ext.SplitButton({
+	renderTo: 'button-ct', // the container id
+   	text: 'Options',
+   	handler: optionsHandler, // handle a click on the button itself
+   	menu: new Ext.menu.Menu({
+        items: [
+        	// these items will render as dropdown menu items when the arrow is clicked:
+	        {text: 'Item 1', handler: item1Handler},
+	        {text: 'Item 2', handler: item2Handler}
+        ]
+   	})
+});
+
+// Instead of showing a menu, you provide any type of custom
+// functionality you want when the dropdown arrow is clicked:
+new Ext.SplitButton({
+	renderTo: 'button-ct',
+   	text: 'Options',
+   	handler: optionsHandler,
+   	arrowHandler: myCustomHandler
+});
+</code></pre>
+ * @cfg {Function} arrowHandler A function called when the arrow button is clicked (can be used instead of click event)
+ * @cfg {String} arrowTooltip The title attribute of the arrow
+ * @constructor
+ * Create a new menu button
+ * @param {Object} config The config object
+ * @xtype splitbutton
+ */
+Ext.SplitButton = Ext.extend(Ext.Button, {
+	// private
+    arrowSelector : 'em',
+    split: true,
+
+    // private
+    initComponent : function(){
+        Ext.SplitButton.superclass.initComponent.call(this);
+        /**
+         * @event arrowclick
+         * Fires when this button's arrow is clicked
+         * @param {MenuButton} this
+         * @param {EventObject} e The click event
+         */
+        this.addEvents("arrowclick");
+    },
+
+    // private
+    onRender : function(){
+        Ext.SplitButton.superclass.onRender.apply(this, arguments);
+        if(this.arrowTooltip){
+            this.el.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip;
+        }
+    },
+
+    /**
+     * Sets this button's arrow click handler.
+     * @param {Function} handler The function to call when the arrow is clicked
+     * @param {Object} scope (optional) Scope for the function passed above
+     */
+    setArrowHandler : function(handler, scope){
+        this.arrowHandler = handler;
+        this.scope = scope;
+    },
+
+    getMenuClass : function(){
+        return 'x-btn-split' + (this.arrowAlign == 'bottom' ? '-bottom' : '');
+    },
+
+    isClickOnArrow : function(e){
+        return this.arrowAlign != 'bottom' ?
+               e.getPageX() > this.el.child(this.buttonSelector).getRegion().right :
+               e.getPageY() > this.el.child(this.buttonSelector).getRegion().bottom;
+    },
+
+    // private
+    onClick : function(e, t){
+        e.preventDefault();
+        if(!this.disabled){
+            if(this.isClickOnArrow(e)){
+                if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){
+                    this.showMenu();
+                }
+                this.fireEvent("arrowclick", this, e);
+                if(this.arrowHandler){
+                    this.arrowHandler.call(this.scope || this, this, e);
+                }
+            }else{
+                if(this.enableToggle){
+                    this.toggle();
+                }
+                this.fireEvent("click", this, e);
+                if(this.handler){
+                    this.handler.call(this.scope || this, this, e);
+                }
+            }
+        }
+    },
+
+    // private
+    isMenuTriggerOver : function(e){
+        return this.menu && e.target.tagName == 'em';
+    },
+
+    // private
+    isMenuTriggerOut : function(e, internal){
+        return this.menu && e.target.tagName != 'em';
+    }
+});
+
+Ext.reg('splitbutton', Ext.SplitButton);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/TabPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/TabPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/TabPanel.js	(revision 625)
@@ -0,0 +1,1100 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.TabPanel
+ * <p>A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel}
+ * for layout purposes, but also have special support for containing child Components
+ * (<tt>{@link Ext.Container#items items}</tt>) that are managed using a
+ * {@link Ext.layout.CardLayout CardLayout layout manager}, and displayed as separate tabs.</p>
+ *
+ * <b>Note:</b> By default, a tab's close tool <i>destroys</i> the child tab Component
+ * and all its descendants. This makes the child tab Component, and all its descendants <b>unusable</b>. To enable
+ * re-use of a tab, configure the TabPanel with <b><code>{@link #autoDestroy autoDestroy: false}</code></b>.
+ *
+ * <p><b><u>TabPanel header/footer elements</u></b></p>
+ * <p>TabPanels use their {@link Ext.Panel#header header} or {@link Ext.Panel#footer footer} element
+ * (depending on the {@link #tabPosition} configuration) to accommodate the tab selector buttons.
+ * This means that a TabPanel will not display any configured title, and will not display any
+ * configured header {@link Ext.Panel#tools tools}.</p>
+ * <p>To display a header, embed the TabPanel in a {@link Ext.Panel Panel} which uses
+ * <b><tt>{@link Ext.Container#layout layout:'fit'}</tt></b>.</p>
+ *
+ * <p><b><u>Tab Events</u></b></p>
+ * <p>There is no actual tab class &mdash; each tab is simply a {@link Ext.BoxComponent Component}
+ * such as a {@link Ext.Panel Panel}. However, when rendered in a TabPanel, each child Component
+ * can fire additional events that only exist for tabs and are not available from other Components.
+ * These events are:</p>
+ * <div><ul class="mdetail-params">
+ * <li><tt><b>{@link Ext.Panel#activate activate}</b></tt> : Fires when this Component becomes
+ * the active tab.</li>
+ * <li><tt><b>{@link Ext.Panel#deactivate deactivate}</b></tt> : Fires when the Component that
+ * was the active tab becomes deactivated.</li>
+ * </ul></div>
+ * <p><b><u>Creating TabPanels from Code</u></b></p>
+ * <p>TabPanels can be created and rendered completely in code, as in this example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: Ext.getBody(),
+    activeTab: 0,
+    items: [{
+        title: 'Tab 1',
+        html: 'A simple tab'
+    },{
+        title: 'Tab 2',
+        html: 'Another one'
+    }]
+});
+</code></pre>
+ * <p><b><u>Creating TabPanels from Existing Markup</u></b></p>
+ * <p>TabPanels can also be rendered from pre-existing markup in a couple of ways.</p>
+ * <div><ul class="mdetail-params">
+ *
+ * <li>Pre-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A container div with one or more nested tab divs with class <tt>'x-tab'</tt> can be rendered entirely
+ * from existing markup (See the {@link #autoTabs} example).</p>
+ * </div>
+ *
+ * <li>Un-Structured Markup</li>
+ * <div class="sub-desc">
+ * <p>A TabPanel can also be rendered from markup that is not strictly structured by simply specifying by id
+ * which elements should be the container and the tabs. Using this method tab content can be pulled from different
+ * elements within the page by id regardless of page structure. For example:</p>
+ * <pre><code>
+var tabs = new Ext.TabPanel({
+    renderTo: 'my-tabs',
+    activeTab: 0,
+    items:[
+        {contentEl:'tab1', title:'Tab 1'},
+        {contentEl:'tab2', title:'Tab 2'}
+    ]
+});
+
+// Note that the tabs do not have to be nested within the container (although they can be)
+&lt;div id="my-tabs">&lt;/div>
+&lt;div id="tab1" class="x-hide-display">A simple tab&lt;/div>
+&lt;div id="tab2" class="x-hide-display">Another one&lt;/div>
+</code></pre>
+ * Note that the tab divs in this example contain the class <tt>'x-hide-display'</tt> so that they can be rendered
+ * deferred without displaying outside the tabs. You could alternately set <tt>{@link #deferredRender} = false </tt>
+ * to render all content tabs on page load.
+ * </div>
+ *
+ * </ul></div>
+ *
+ * @extends Ext.Panel
+ * @constructor
+ * @param {Object} config The configuration options
+ * @xtype tabpanel
+ */
+Ext.TabPanel = Ext.extend(Ext.Panel,  {
+    /**
+     * @cfg {Boolean} layoutOnTabChange
+     * Set to true to force a layout of the active tab when the tab is changed. Defaults to false.
+     * See {@link Ext.layout.CardLayout}.<code>{@link Ext.layout.CardLayout#layoutOnCardChange layoutOnCardChange}</code>.
+     */
+    /**
+     * @cfg {String} tabCls <b>This config option is used on <u>child Components</u> of ths TabPanel.</b> A CSS
+     * class name applied to the tab strip item representing the child Component, allowing special
+     * styling to be applied.
+     */
+    /**
+     * @cfg {Boolean} monitorResize True to automatically monitor window resize events and rerender the layout on
+     * browser resize (defaults to true).
+     */
+    monitorResize : true,
+    /**
+     * @cfg {Boolean} deferredRender
+     * <p><tt>true</tt> by default to defer the rendering of child <tt>{@link Ext.Container#items items}</tt>
+     * to the browsers DOM until a tab is activated. <tt>false</tt> will render all contained
+     * <tt>{@link Ext.Container#items items}</tt> as soon as the {@link Ext.layout.CardLayout layout}
+     * is rendered. If there is a significant amount of content or a lot of heavy controls being
+     * rendered into panels that are not displayed by default, setting this to <tt>true</tt> might
+     * improve performance.</p>
+     * <br><p>The <tt>deferredRender</tt> property is internally passed to the layout manager for
+     * TabPanels ({@link Ext.layout.CardLayout}) as its {@link Ext.layout.CardLayout#deferredRender}
+     * configuration value.</p>
+     * <br><p><b>Note</b>: leaving <tt>deferredRender</tt> as <tt>true</tt> means that the content
+     * within an unactivated tab will not be available. For example, this means that if the TabPanel
+     * is within a {@link Ext.form.FormPanel form}, then until a tab is activated, any Fields within
+     * unactivated tabs will not be rendered, and will therefore not be submitted and will not be
+     * available to either {@link Ext.form.BasicForm#getValues getValues} or
+     * {@link Ext.form.BasicForm#setValues setValues}.</p>
+     */
+    deferredRender : true,
+    /**
+     * @cfg {Number} tabWidth The initial width in pixels of each new tab (defaults to 120).
+     */
+    tabWidth : 120,
+    /**
+     * @cfg {Number} minTabWidth The minimum width in pixels for each tab when {@link #resizeTabs} = true (defaults to 30).
+     */
+    minTabWidth : 30,
+    /**
+     * @cfg {Boolean} resizeTabs True to automatically resize each tab so that the tabs will completely fill the
+     * tab strip (defaults to false).  Setting this to true may cause specific widths that might be set per tab to
+     * be overridden in order to fit them all into view (although {@link #minTabWidth} will always be honored).
+     */
+    resizeTabs : false,
+    /**
+     * @cfg {Boolean} enableTabScroll True to enable scrolling to tabs that may be invisible due to overflowing the
+     * overall TabPanel width. Only available with tabPosition:'top' (defaults to false).
+     */
+    enableTabScroll : false,
+    /**
+     * @cfg {Number} scrollIncrement The number of pixels to scroll each time a tab scroll button is pressed
+     * (defaults to <tt>100</tt>, or if <tt>{@link #resizeTabs} = true</tt>, the calculated tab width).  Only
+     * applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    scrollIncrement : 0,
+    /**
+     * @cfg {Number} scrollRepeatInterval Number of milliseconds between each scroll while a tab scroll button is
+     * continuously pressed (defaults to <tt>400</tt>).
+     */
+    scrollRepeatInterval : 400,
+    /**
+     * @cfg {Float} scrollDuration The number of milliseconds that each scroll animation should last (defaults
+     * to <tt>.35</tt>). Only applies when <tt>{@link #animScroll} = true</tt>.
+     */
+    scrollDuration : 0.35,
+    /**
+     * @cfg {Boolean} animScroll True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults
+     * to <tt>true</tt>).  Only applies when <tt>{@link #enableTabScroll} = true</tt>.
+     */
+    animScroll : true,
+    /**
+     * @cfg {String} tabPosition The position where the tab strip should be rendered (defaults to <tt>'top'</tt>).
+     * The only other supported value is <tt>'bottom'</tt>.  <b>Note</b>: tab scrolling is only supported for
+     * <tt>tabPosition: 'top'</tt>.
+     */
+    tabPosition : 'top',
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the panel (defaults to <tt>'x-tab-panel'</tt>).
+     */
+    baseCls : 'x-tab-panel',
+    /**
+     * @cfg {Boolean} autoTabs
+     * <p><tt>true</tt> to query the DOM for any divs with a class of 'x-tab' to be automatically converted
+     * to tabs and added to this panel (defaults to <tt>false</tt>).  Note that the query will be executed within
+     * the scope of the container element only (so that multiple tab panels from markup can be supported via this
+     * method).</p>
+     * <p>This method is only possible when the markup is structured correctly as a container with nested divs
+     * containing the class <tt>'x-tab'</tt>. To create TabPanels without these limitations, or to pull tab content
+     * from other elements on the page, see the example at the top of the class for generating tabs from markup.</p>
+     * <p>There are a couple of things to note when using this method:<ul>
+     * <li>When using the <tt>autoTabs</tt> config (as opposed to passing individual tab configs in the TabPanel's
+     * {@link #items} collection), you must use <tt>{@link #applyTo}</tt> to correctly use the specified <tt>id</tt>
+     * as the tab container. The <tt>autoTabs</tt> method <em>replaces</em> existing content with the TabPanel
+     * components.</li>
+     * <li>Make sure that you set <tt>{@link #deferredRender}: false</tt> so that the content elements for each
+     * tab will be rendered into the TabPanel immediately upon page load, otherwise they will not be transformed
+     * until each tab is activated and will be visible outside the TabPanel.</li>
+     * </ul>Example usage:</p>
+     * <pre><code>
+var tabs = new Ext.TabPanel({
+    applyTo: 'my-tabs',
+    activeTab: 0,
+    deferredRender: false,
+    autoTabs: true
+});
+
+// This markup will be converted to a TabPanel from the code above
+&lt;div id="my-tabs">
+    &lt;div class="x-tab" title="Tab 1">A simple tab&lt;/div>
+    &lt;div class="x-tab" title="Tab 2">Another one&lt;/div>
+&lt;/div>
+</code></pre>
+     */
+    autoTabs : false,
+    /**
+     * @cfg {String} autoTabSelector The CSS selector used to search for tabs in existing markup when
+     * <tt>{@link #autoTabs} = true</tt> (defaults to <tt>'div.x-tab'</tt>).  This can be any valid selector
+     * supported by {@link Ext.DomQuery#select}. Note that the query will be executed within the scope of this
+     * tab panel only (so that multiple tab panels from markup can be supported on a page).
+     */
+    autoTabSelector : 'div.x-tab',
+    /**
+     * @cfg {String/Number} activeTab A string id or the numeric index of the tab that should be initially
+     * activated on render (defaults to none).
+     */
+    activeTab : null,
+    /**
+     * @cfg {Number} tabMargin The number of pixels of space to calculate into the sizing and scrolling of
+     * tabs. If you change the margin in CSS, you will need to update this value so calculations are correct
+     * with either <tt>{@link #resizeTabs}</tt> or scrolling tabs. (defaults to <tt>2</tt>)
+     */
+    tabMargin : 2,
+    /**
+     * @cfg {Boolean} plain </tt>true</tt> to render the tab strip without a background container image
+     * (defaults to <tt>false</tt>).
+     */
+    plain : false,
+    /**
+     * @cfg {Number} wheelIncrement For scrolling tabs, the number of pixels to increment on mouse wheel
+     * scrolling (defaults to <tt>20</tt>).
+     */
+    wheelIncrement : 20,
+
+    /*
+     * This is a protected property used when concatenating tab ids to the TabPanel id for internal uniqueness.
+     * It does not generally need to be changed, but can be if external code also uses an id scheme that can
+     * potentially clash with this one.
+     */
+    idDelimiter : '__',
+
+    // private
+    itemCls : 'x-tab-item',
+
+    // private config overrides
+    elements : 'body',
+    headerAsText : false,
+    frame : false,
+    hideBorders :true,
+
+    // private
+    initComponent : function(){
+        this.frame = false;
+        Ext.TabPanel.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event beforetabchange
+             * Fires before the active tab changes. Handlers can <tt>return false</tt> to cancel the tab change.
+             * @param {TabPanel} this
+             * @param {Panel} newTab The tab being activated
+             * @param {Panel} currentTab The current active tab
+             */
+            'beforetabchange',
+            /**
+             * @event tabchange
+             * Fires after the active tab has changed.
+             * @param {TabPanel} this
+             * @param {Panel} tab The new active tab
+             */
+            'tabchange',
+            /**
+             * @event contextmenu
+             * Relays the contextmenu event from a tab selector element in the tab strip.
+             * @param {TabPanel} this
+             * @param {Panel} tab The target tab
+             * @param {EventObject} e
+             */
+            'contextmenu'
+        );
+        /**
+         * @cfg {Object} layoutConfig
+         * TabPanel implicitly uses {@link Ext.layout.CardLayout} as its layout manager.
+         * <code>layoutConfig</code> may be used to configure this layout manager.
+         * <code>{@link #deferredRender}</code> and <code>{@link #layoutOnTabChange}</code>
+         * configured on the TabPanel will be applied as configs to the layout manager.
+         */
+        this.setLayout(new Ext.layout.CardLayout(Ext.apply({
+            layoutOnCardChange: this.layoutOnTabChange,
+            deferredRender: this.deferredRender
+        }, this.layoutConfig)));
+
+        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();
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.TabPanel.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            var pos = this.tabPosition == 'top' ? 'header' : 'footer';
+            this[pos].addClass('x-tab-panel-'+pos+'-plain');
+        }
+
+        var st = this[this.stripTarget];
+
+        this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{
+            tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}});
+
+        var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null);
+        this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl);
+        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);
+
+        /**
+         * @cfg {Template/XTemplate} itemTpl <p>(Optional) A {@link Ext.Template Template} or
+         * {@link Ext.XTemplate XTemplate} which may be provided to process the data object returned from
+         * <tt>{@link #getTemplateArgs}</tt> to produce a clickable selector element in the tab strip.</p>
+         * <p>The main element created should be a <tt>&lt;li></tt> element. In order for a click event on
+         * a selector element to be connected to its item, it must take its <i>id</i> from the TabPanel's
+         * native <tt>{@link #getTemplateArgs}</tt>.</p>
+         * <p>The child element which contains the title text must be marked by the CSS class
+         * <tt>x-tab-strip-inner</tt>.</p>
+         * <p>To enable closability, the created element should contain an element marked by the CSS class
+         * <tt>x-tab-strip-close</tt>.</p>
+         * <p>If a custom <tt>itemTpl</tt> is supplied, it is the developer's responsibility to create CSS
+         * style rules to create the desired appearance.</p>
+         * Below is an example of how to create customized tab selector items:<pre><code>
+new Ext.TabPanel({
+    renderTo: document.body,
+    minTabWidth: 115,
+    tabWidth: 135,
+    enableTabScroll: true,
+    width: 600,
+    height: 250,
+    defaults: {autoScroll:true},
+    itemTpl: new Ext.XTemplate(
+    '&lt;li class="{cls}" id="{id}" style="overflow:hidden">',
+         '&lt;tpl if="closable">',
+            '&lt;a class="x-tab-strip-close" onclick="return false;">&lt;/a>',
+         '&lt;/tpl>',
+         '&lt;a class="x-tab-right" href="#" onclick="return false;" style="padding-left:6px">',
+            '&lt;em class="x-tab-left">',
+                '&lt;span class="x-tab-strip-inner">',
+                    '&lt;img src="{src}" style="float:left;margin:3px 3px 0 0">',
+                    '&lt;span style="margin-left:20px" class="x-tab-strip-text {iconCls}">{text} {extra}&lt;/span>',
+                '&lt;/span>',
+            '&lt;/em>',
+        '&lt;/a>',
+    '&lt;/li>'
+    ),
+    getTemplateArgs: function(item) {
+//      Call the native method to collect the base data. Like the ID!
+        var result = Ext.TabPanel.prototype.getTemplateArgs.call(this, item);
+
+//      Add stuff used in our template
+        return Ext.apply(result, {
+            closable: item.closable,
+            src: item.iconSrc,
+            extra: item.extraText || ''
+        });
+    },
+    items: [{
+        title: 'New Tab 1',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 1',
+        closable: true
+    }, {
+        title: 'New Tab 2',
+        iconSrc: '../shared/icons/fam/grid.png',
+        html: 'Tab Body 2',
+        extraText: 'Extra stuff in the tab button'
+    }]
+});
+</code></pre>
+         */
+        if(!this.itemTpl){
+            var tt = 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>'
+            );
+            tt.disableFormats = true;
+            tt.compile();
+            Ext.TabPanel.prototype.itemTpl = tt;
+        }
+
+        this.items.each(this.initTab, this);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.TabPanel.superclass.afterRender.call(this);
+        if(this.autoTabs){
+            this.readTabs(false);
+        }
+        if(this.activeTab !== undefined){
+            var item = Ext.isObject(this.activeTab) ? this.activeTab : this.items.get(this.activeTab);
+            delete this.activeTab;
+            this.setActiveTab(item);
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.TabPanel.superclass.initEvents.call(this);
+        this.on('add', this.onAdd, this, {target: this});
+        this.on('remove', this.onRemove, this, {target: this});
+
+        this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
+        this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this);
+        if(this.enableTabScroll){
+            this.mon(this.strip, 'mousewheel', this.onWheel, this);
+        }
+    },
+
+    // private
+    findTargets : function(e){
+        var item = null;
+        var itemEl = e.getTarget('li', this.strip);
+        if(itemEl){
+            item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]);
+            if(item.disabled){
+                return {
+                    close : null,
+                    item : null,
+                    el : null
+                };
+            }
+        }
+        return {
+            close : e.getTarget('.x-tab-strip-close', this.strip),
+            item : item,
+            el : itemEl
+        };
+    },
+
+    // private
+    onStripMouseDown : function(e){
+        if(e.button !== 0){
+            return;
+        }
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.close){
+            if (t.item.fireEvent('beforeclose', t.item) !== false) {
+                t.item.fireEvent('close', t.item);
+                this.remove(t.item);
+            }
+            return;
+        }
+        if(t.item && t.item != this.activeTab){
+            this.setActiveTab(t.item);
+        }
+    },
+
+    // private
+    onStripContextMenu : function(e){
+        e.preventDefault();
+        var t = this.findTargets(e);
+        if(t.item){
+            this.fireEvent('contextmenu', this, t.item, e);
+        }
+    },
+
+    /**
+     * True to scan the markup in this tab panel for <tt>{@link #autoTabs}</tt> using the
+     * <tt>{@link #autoTabSelector}</tt>
+     * @param {Boolean} removeExisting True to remove existing tabs
+     */
+    readTabs : function(removeExisting){
+        if(removeExisting === true){
+            this.items.each(function(item){
+                this.remove(item);
+            }, this);
+        }
+        var tabs = this.el.query(this.autoTabSelector);
+        for(var i = 0, len = tabs.length; i < len; i++){
+            var tab = tabs[i];
+            var title = tab.getAttribute('title');
+            tab.removeAttribute('title');
+            this.add({
+                title: title,
+                contentEl: tab
+            });
+        }
+    },
+
+    // private
+    initTab : function(item, index){
+        var before = this.strip.dom.childNodes[index];
+        var p = this.getTemplateArgs(item);
+        var el = before ?
+                 this.itemTpl.insertBefore(before, p) :
+                 this.itemTpl.append(this.strip, p);
+
+        Ext.fly(el).addClassOnOver('x-tab-strip-over');
+
+        if(item.tabTip){
+            Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip;
+        }
+        item.tabEl = el;
+
+        item.on('disable', this.onItemDisabled, this);
+        item.on('enable', this.onItemEnabled, this);
+        item.on('titlechange', this.onItemTitleChanged, this);
+        item.on('iconchange', this.onItemIconChanged, this);
+        item.on('beforeshow', this.onBeforeShowItem, this);
+    },
+
+    /**
+     * <p>Provides template arguments for rendering a tab selector item in the tab strip.</p>
+     * <p>This method returns an object hash containing properties used by the TabPanel's <tt>{@link #itemTpl}</tt>
+     * to create a formatted, clickable tab selector element. The properties which must be returned
+     * are:</p><div class="mdetail-params"><ul>
+     * <li><b>id</b> : String<div class="sub-desc">A unique identifier which links to the item</div></li>
+     * <li><b>text</b> : String<div class="sub-desc">The text to display</div></li>
+     * <li><b>cls</b> : String<div class="sub-desc">The CSS class name</div></li>
+     * <li><b>iconCls</b> : String<div class="sub-desc">A CSS class to provide appearance for an icon.</div></li>
+     * </ul></div>
+     * @param {BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip.
+     * @return {Object} An object hash containing the properties required to render the selector element.
+     */
+    getTemplateArgs : function(item) {
+        var cls = item.closable ? 'x-tab-strip-closable' : '';
+        if(item.disabled){
+            cls += ' x-item-disabled';
+        }
+        if(item.iconCls){
+            cls += ' x-tab-with-icon';
+        }
+        if(item.tabCls){
+            cls += ' ' + item.tabCls;
+        }
+
+        return {
+            id: this.id + this.idDelimiter + item.getItemId(),
+            text: item.title,
+            cls: cls,
+            iconCls: item.iconCls || ''
+        };
+    },
+
+    // private
+    onAdd : function(tp, item, index){
+        this.initTab(item, index);
+        if(this.items.getCount() == 1){
+            this.syncSize();
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeAdd : function(item){
+        var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
+        if(existing){
+            this.setActiveTab(item);
+            return false;
+        }
+        Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
+        var es = item.elements;
+        item.elements = es ? es.replace(',header', '') : es;
+        item.border = (item.border === true);
+    },
+
+    // private
+    onRemove : function(tp, item){
+        Ext.destroy(Ext.get(this.getTabEl(item)));
+        this.stack.remove(item);
+        item.un('disable', this.onItemDisabled, this);
+        item.un('enable', this.onItemEnabled, this);
+        item.un('titlechange', this.onItemTitleChanged, this);
+        item.un('iconchange', this.onItemIconChanged, this);
+        item.un('beforeshow', this.onBeforeShowItem, this);
+        if(item == this.activeTab){
+            var next = this.stack.next();
+            if(next){
+                this.setActiveTab(next);
+            }else if(this.items.getCount() > 0){
+                this.setActiveTab(0);
+            }else{
+                this.activeTab = null;
+            }
+        }
+        this.delegateUpdates();
+    },
+
+    // private
+    onBeforeShowItem : function(item){
+        if(item != this.activeTab){
+            this.setActiveTab(item);
+            return false;
+        }
+    },
+
+    // private
+    onItemDisabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).addClass('x-item-disabled');
+        }
+        this.stack.remove(item);
+    },
+
+    // private
+    onItemEnabled : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).removeClass('x-item-disabled');
+        }
+    },
+
+    // private
+    onItemTitleChanged : function(item){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title;
+        }
+    },
+
+    //private
+    onItemIconChanged : function(item, iconCls, oldCls){
+        var el = this.getTabEl(item);
+        if(el){
+            Ext.fly(el).child('span.x-tab-strip-text').replaceClass(oldCls, iconCls);
+        }
+    },
+
+    /**
+     * Gets the DOM element for the tab strip item which activates the child panel with the specified
+     * ID. Access this to change the visual treatment of the item, for example by changing the CSS class name.
+     * @param {Panel/Number/String} tab The tab component, or the tab's index, or the tabs id or itemId.
+     * @return {HTMLElement} The DOM node
+     */
+    getTabEl : function(item){
+        return document.getElementById(this.id + this.idDelimiter + this.getComponent(item).getItemId());
+    },
+
+    // private
+    onResize : function(){
+        Ext.TabPanel.superclass.onResize.apply(this, arguments);
+        this.delegateUpdates();
+    },
+
+    /**
+     * Suspends any internal calculations or scrolling while doing a bulk operation. See {@link #endUpdate}
+     */
+    beginUpdate : function(){
+        this.suspendUpdates = true;
+    },
+
+    /**
+     * Resumes calculations and scrolling at the end of a bulk operation. See {@link #beginUpdate}
+     */
+    endUpdate : function(){
+        this.suspendUpdates = false;
+        this.delegateUpdates();
+    },
+
+    /**
+     * Hides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    hideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = 'none';
+            this.delegateUpdates();
+        }
+        this.stack.remove(item);
+    },
+
+    /**
+     * Unhides the tab strip item for the passed tab
+     * @param {Number/String/Panel} item The tab index, id or item
+     */
+    unhideTabStripItem : function(item){
+        item = this.getComponent(item);
+        var el = this.getTabEl(item);
+        if(el){
+            el.style.display = '';
+            this.delegateUpdates();
+        }
+    },
+
+    // private
+    delegateUpdates : function(){
+        if(this.suspendUpdates){
+            return;
+        }
+        if(this.resizeTabs && this.rendered){
+            this.autoSizeTabs();
+        }
+        if(this.enableTabScroll && this.rendered){
+            this.autoScrollTabs();
+        }
+    },
+
+    // private
+    autoSizeTabs : function(){
+        var count = this.items.length;
+        var ce = this.tabPosition != 'bottom' ? 'header' : 'footer';
+        var ow = this[ce].dom.offsetWidth;
+        var aw = this[ce].dom.clientWidth;
+
+        if(!this.resizeTabs || count < 1 || !aw){ // !aw for display:none
+            return;
+        }
+
+        var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); // -4 for float errors in IE
+        this.lastTabWidth = each;
+        var lis = this.strip.query("li:not([className^=x-tab-edge])");
+        for(var i = 0, len = lis.length; i < len; i++) {
+            var li = lis[i];
+            var inner = Ext.fly(li).child('.x-tab-strip-inner', true);
+            var tw = li.offsetWidth;
+            var iw = inner.offsetWidth;
+            inner.style.width = (each - (tw-iw)) + 'px';
+        }
+    },
+
+    // private
+    adjustBodyWidth : function(w){
+        if(this.header){
+            this.header.setWidth(w);
+        }
+        if(this.footer){
+            this.footer.setWidth(w);
+        }
+        return w;
+    },
+
+    /**
+     * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which
+     * can <tt>return false</tt> to cancel the tab change.
+     * @param {String/Number} item
+     * The id or tab Panel to activate. This parameter may be any of the following:
+     * <div><ul class="mdetail-params">
+     * <li>a <b><tt>String</tt></b> : representing the <code>{@link Ext.Component#itemId itemId}</code>
+     * or <code>{@link Ext.Component#id id}</code> of the child component </li>
+     * <li>a <b><tt>Number</tt></b> : representing the position of the child component
+     * within the <code>{@link Ext.Container#items items}</code> <b>property</b></li>
+     * </ul></div>
+     * <p>For additional information see {@link Ext.util.MixedCollection#get}.
+     */
+    setActiveTab : function(item){
+        item = this.getComponent(item);
+        if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
+            return;
+        }
+        if(!this.rendered){
+            this.activeTab = item;
+            return;
+        }
+        if(this.activeTab != item){
+            if(this.activeTab){
+                var oldEl = this.getTabEl(this.activeTab);
+                if(oldEl){
+                    Ext.fly(oldEl).removeClass('x-tab-strip-active');
+                }
+                this.activeTab.fireEvent('deactivate', this.activeTab);
+            }
+            var el = this.getTabEl(item);
+            Ext.fly(el).addClass('x-tab-strip-active');
+            this.activeTab = item;
+            this.stack.add(item);
+
+            this.layout.setActiveItem(item);
+            if(this.scrolling){
+                this.scrollToTab(item, this.animScroll);
+            }
+
+            item.fireEvent('activate', item);
+            this.fireEvent('tabchange', this, item);
+        }
+    },
+
+    /**
+     * Gets the currently active tab.
+     * @return {Panel} The active tab
+     */
+    getActiveTab : function(){
+        return this.activeTab || null;
+    },
+
+    /**
+     * Gets the specified tab by id.
+     * @param {String} id The tab id
+     * @return {Panel} The tab
+     */
+    getItem : function(item){
+        return this.getComponent(item);
+    },
+
+    // private
+    autoScrollTabs : function(){
+        this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
+        var count = this.items.length;
+        var ow = this.pos.dom.offsetWidth;
+        var tw = this.pos.dom.clientWidth;
+
+        var wrap = this.stripWrap;
+        var wd = wrap.dom;
+        var cw = wd.offsetWidth;
+        var pos = this.getScrollPos();
+        var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos;
+
+        if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues
+            return;
+        }
+        if(l <= tw){
+            wd.scrollLeft = 0;
+            wrap.setWidth(tw);
+            if(this.scrolling){
+                this.scrolling = false;
+                this.pos.removeClass('x-tab-scrolling');
+                this.scrollLeft.hide();
+                this.scrollRight.hide();
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '';
+                    wd.style.marginRight = '';
+                }
+            }
+        }else{
+            if(!this.scrolling){
+                this.pos.addClass('x-tab-scrolling');
+                // See here: http://extjs.com/forum/showthread.php?t=49308&highlight=isSafari
+                if(Ext.isAir || Ext.isWebKit){
+                    wd.style.marginLeft = '18px';
+                    wd.style.marginRight = '18px';
+                }
+            }
+            tw -= wrap.getMargins('lr');
+            wrap.setWidth(tw > 20 ? tw : 20);
+            if(!this.scrolling){
+                if(!this.scrollLeft){
+                    this.createScrollers();
+                }else{
+                    this.scrollLeft.show();
+                    this.scrollRight.show();
+                }
+            }
+            this.scrolling = true;
+            if(pos > (l-tw)){ // ensure it stays within bounds
+                wd.scrollLeft = l-tw;
+            }else{ // otherwise, make sure the active tab is still visible
+                this.scrollToTab(this.activeTab, false);
+            }
+            this.updateScrollButtons();
+        }
+    },
+
+    // private
+    createScrollers : function(){
+        this.pos.addClass('x-tab-scrolling-' + this.tabPosition);
+        var h = this.stripWrap.dom.offsetHeight;
+
+        // left
+        var sl = this.pos.insertFirst({
+            cls:'x-tab-scroller-left'
+        });
+        sl.setHeight(h);
+        sl.addClassOnOver('x-tab-scroller-left-over');
+        this.leftRepeater = new Ext.util.ClickRepeater(sl, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollLeft,
+            scope: this
+        });
+        this.scrollLeft = sl;
+
+        // right
+        var sr = this.pos.insertFirst({
+            cls:'x-tab-scroller-right'
+        });
+        sr.setHeight(h);
+        sr.addClassOnOver('x-tab-scroller-right-over');
+        this.rightRepeater = new Ext.util.ClickRepeater(sr, {
+            interval : this.scrollRepeatInterval,
+            handler: this.onScrollRight,
+            scope: this
+        });
+        this.scrollRight = sr;
+    },
+
+    // private
+    getScrollWidth : function(){
+        return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos();
+    },
+
+    // private
+    getScrollPos : function(){
+        return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0;
+    },
+
+    // private
+    getScrollArea : function(){
+        return parseInt(this.stripWrap.dom.clientWidth, 10) || 0;
+    },
+
+    // private
+    getScrollAnim : function(){
+        return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this};
+    },
+
+    // private
+    getScrollIncrement : function(){
+        return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100);
+    },
+
+    /**
+     * Scrolls to a particular tab if tab scrolling is enabled
+     * @param {Panel} item The item to scroll to
+     * @param {Boolean} animate True to enable animations
+     */
+
+    scrollToTab : function(item, animate){
+        if(!item){ return; }
+        var el = this.getTabEl(item);
+        var pos = this.getScrollPos(), area = this.getScrollArea();
+        var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos;
+        var right = left + el.offsetWidth;
+        if(left < pos){
+            this.scrollTo(left, animate);
+        }else if(right > (pos + area)){
+            this.scrollTo(right - area, animate);
+        }
+    },
+
+    // private
+    scrollTo : function(pos, animate){
+        this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false);
+        if(!animate){
+            this.updateScrollButtons();
+        }
+    },
+
+    onWheel : function(e){
+        var d = e.getWheelDelta()*this.wheelIncrement*-1;
+        e.stopEvent();
+
+        var pos = this.getScrollPos();
+        var newpos = pos + d;
+        var sw = this.getScrollWidth()-this.getScrollArea();
+
+        var s = Math.max(0, Math.min(sw, newpos));
+        if(s != pos){
+            this.scrollTo(s, false);
+        }
+    },
+
+    // private
+    onScrollRight : function(){
+        var sw = this.getScrollWidth()-this.getScrollArea();
+        var pos = this.getScrollPos();
+        var s = Math.min(sw, pos + this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    onScrollLeft : function(){
+        var pos = this.getScrollPos();
+        var s = Math.max(0, pos - this.getScrollIncrement());
+        if(s != pos){
+            this.scrollTo(s, this.animScroll);
+        }
+    },
+
+    // private
+    updateScrollButtons : function(){
+        var pos = this.getScrollPos();
+        this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled');
+        this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('x-tab-scroller-right-disabled');
+    },
+
+    // private
+    beforeDestroy : function() {
+        if(this.items){
+            this.items.each(function(item){
+                if(item && item.tabEl){
+                    Ext.get(item.tabEl).removeAllListeners();
+                    item.tabEl = null;
+                }
+            }, this);
+        }
+        if(this.strip){
+            this.strip.removeAllListeners();
+        }
+        Ext.TabPanel.superclass.beforeDestroy.apply(this);
+    }
+
+    /**
+     * @cfg {Boolean} collapsible
+     * @hide
+     */
+    /**
+     * @cfg {String} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property title
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Array} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapsed
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+});
+Ext.reg('tabpanel', Ext.TabPanel);
+
+/**
+ * See {@link #setActiveTab}. Sets the specified tab as the active tab. This method fires
+ * the {@link #beforetabchange} event which can <tt>return false</tt> to cancel the tab change.
+ * @param {String/Panel} tab The id or tab Panel to activate
+ * @method activate
+ */
+Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab;
+
+// private utility class used by TabPanel
+Ext.TabPanel.AccessStack = function(){
+    var items = [];
+    return {
+        add : function(item){
+            items.push(item);
+            if(items.length > 10){
+                items.shift();
+            }
+        },
+
+        remove : function(item){
+            var s = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                if(items[i] != item){
+                    s.push(items[i]);
+                }
+            }
+            items = s;
+        },
+
+        next : function(){
+            return items.pop();
+        }
+    };
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Toolbar.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Toolbar.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Toolbar.js	(revision 625)
@@ -0,0 +1,781 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.ToolbarLayout
+ * @extends Ext.layout.ContainerLayout
+ * Layout manager implicitly used by Ext.Toolbar.
+ */
+Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize : true,
+    triggerWidth : 18,
+    lastOverflow : false,
+
+    noItemsMenuText : '<div class="x-toolbar-no-items">(None)</div>',
+    // private
+    onLayout : function(ct, target){
+        if(!this.leftTr){
+            target.addClass('x-toolbar-layout-ct');
+            target.insertHtml('beforeEnd',
+                 '<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');
+            this.leftTr = target.child('tr.x-toolbar-left-row', true);
+            this.rightTr = target.child('tr.x-toolbar-right-row', true);
+            this.extrasTr = target.child('tr.x-toolbar-extras-row', true);
+        }
+        var side = this.leftTr;
+        var pos = 0;
+
+        var items = ct.items.items;
+        for(var i = 0, len = items.length, c; i < len; i++, pos++) {
+            c = items[i];
+            if(c.isFill){
+                side = this.rightTr;
+                pos = -1;
+            }else if(!c.rendered){
+                c.render(this.insertCell(c, side, pos));
+            }else{
+                if(!c.xtbHidden && !this.isValidParent(c, side.childNodes[pos])){
+                    var td = this.insertCell(c, side, pos);
+                    td.appendChild(c.getDomPositionEl().dom);
+                    c.container = Ext.get(td);
+                }
+            }
+        }
+        //strip extra empty cells
+        this.cleanup(this.leftTr);
+        this.cleanup(this.rightTr);
+        this.cleanup(this.extrasTr);
+        this.fitToSize(target);
+    },
+
+    cleanup : function(row){
+        var cn = row.childNodes;
+        for(var i = cn.length-1, c; i >= 0 && (c = cn[i]); i--){
+            if(!c.firstChild){
+                row.removeChild(c);
+            }
+        }
+    },
+
+    insertCell : function(c, side, pos){
+        var td = document.createElement('td');
+        td.className='x-toolbar-cell';
+        side.insertBefore(td, side.childNodes[pos]||null);
+        return td;
+    },
+
+    hideItem : function(item){
+        var h = (this.hiddens = this.hiddens || []);
+        h.push(item);
+        item.xtbHidden = true;
+        item.xtbWidth = item.getDomPositionEl().dom.parentNode.offsetWidth;
+        item.hide();
+    },
+
+    unhideItem : function(item){
+        item.show();
+        item.xtbHidden = false;
+        this.hiddens.remove(item);
+        if(this.hiddens.length < 1){
+            delete this.hiddens;
+        }
+    },
+
+    getItemWidth : function(c){
+        return c.hidden ? (c.xtbWidth || 0) : c.getDomPositionEl().dom.parentNode.offsetWidth;
+    },
+
+    fitToSize : function(t){
+        if(this.container.enableOverflow === false){
+            return;
+        }
+        var w = t.dom.clientWidth;
+        var lw = this.lastWidth || 0;
+        this.lastWidth = w;
+        var iw = t.dom.firstChild.offsetWidth;
+
+        var clipWidth = w - this.triggerWidth;
+        var hideIndex = -1;
+
+        if(iw > w || (this.hiddens && w >= lw)){
+            var i, items = this.container.items.items, len = items.length, c;
+            var loopWidth = 0;
+            for(i = 0; i < len; i++) {
+                c = items[i];
+                if(!c.isFill){
+                    loopWidth += this.getItemWidth(c);
+                    if(loopWidth > clipWidth){
+                        if(!c.xtbHidden){
+                            this.hideItem(c);
+                        }
+                    }else{
+                        if(c.xtbHidden){
+                            this.unhideItem(c);
+                        }
+                    }
+                }
+            }
+        }
+        if(this.hiddens){
+            this.initMore();
+            if(!this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, true);
+                this.lastOverflow = true;
+            }
+        }else if(this.more){
+            this.clearMenu();
+            this.more.destroy();
+            delete this.more;
+            if(this.lastOverflow){
+                this.container.fireEvent('overflowchange', this.container, false);
+                this.lastOverflow = false;
+            }
+        }
+    },
+
+    createMenuConfig : function(c, hideOnClick){
+        var cfg = Ext.apply({}, c.initialConfig),
+            group = c.toggleGroup;
+
+        Ext.apply(cfg, {
+            text: c.overflowText || c.text,
+            iconCls: c.iconCls,
+            icon: c.icon,
+            itemId: c.itemId,
+            disabled: c.disabled,
+            handler: c.handler,
+            scope: c.scope,
+            menu: c.menu,
+            hideOnClick: hideOnClick
+        });
+        if(group || c.enableToggle){
+            Ext.apply(cfg, {
+                group: group,
+                checked: c.pressed,
+                listeners: {
+                    checkchange: function(item, checked){
+                        c.toggle(checked);
+                    }
+                }
+            });
+        }
+        delete cfg.xtype;
+        delete cfg.id;
+        return cfg;
+    },
+
+    // private
+    addComponentToMenu : function(m, c){
+        if(c instanceof Ext.Toolbar.Separator){
+            m.add('-');
+        }else if(Ext.isFunction(c.isXType)){
+            if(c.isXType('splitbutton')){
+                m.add(this.createMenuConfig(c, true));
+            }else if(c.isXType('button')){
+                m.add(this.createMenuConfig(c, !c.menu));
+            }else if(c.isXType('buttongroup')){
+                c.items.each(function(item){
+                     this.addComponentToMenu(m, item);
+                }, this);
+            }
+        }
+    },
+
+    clearMenu : function(){
+        var m = this.moreMenu;
+        if(m && m.items){
+            this.moreMenu.items.each(function(item){
+                delete item.menu;
+            });
+        }
+    },
+
+    // private
+    beforeMoreShow : function(m){
+        var h = this.container.items.items,
+            len = h.length,
+            c,
+            prev,
+            needsSep = function(group, item){
+                return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator);
+            };
+
+        this.clearMenu();
+        m.removeAll();
+        for(var i = 0; i < len; i++){
+            c = h[i];
+            if(c.xtbHidden){
+                if(prev && (needsSep(c, prev) || needsSep(prev, c))){
+                    m.add('-');
+                }
+                this.addComponentToMenu(m, c);
+                prev = c;
+            }
+        }
+        // put something so the menu isn't empty
+        // if no compatible items found
+        if(m.items.length < 1){
+            m.add(this.noItemsMenuText);
+        }
+    },
+
+    initMore : function(){
+        if(!this.more){
+            this.moreMenu = new Ext.menu.Menu({
+                listeners: {
+                    beforeshow: this.beforeMoreShow,
+                    scope: this
+                }
+            });
+            this.more = new Ext.Button({
+                iconCls: 'x-toolbar-more-icon',
+                cls: 'x-toolbar-more',
+                menu: this.moreMenu
+            });
+            var td = this.insertCell(this.more, this.extrasTr, 100);
+            this.more.render(td);
+        }
+    },
+
+    destroy : function(){
+        Ext.destroy(this.more, this.moreMenu);
+        Ext.layout.ToolbarLayout.superclass.destroy.call(this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
+
+/**
+ * @class Ext.Toolbar
+ * @extends Ext.Container
+ * <p>Basic Toolbar class. Although the <tt>{@link Ext.Container#defaultType defaultType}</tt> for Toolbar
+ * is <tt>{@link Ext.Button button}</tt>, Toolbar elements (child items for the Toolbar container) may
+ * be virtually any type of Component. Toolbar elements can be created explicitly via their constructors,
+ * or implicitly via their xtypes, and can be <tt>{@link #add}</tt>ed dynamically.</p>
+ * <p>Some items have shortcut strings for creation:</p>
+ * <pre>
+<u>Shortcut</u>  <u>xtype</u>          <u>Class</u>                  <u>Description</u>
+'->'      'tbfill'       {@link Ext.Toolbar.Fill}       begin using the right-justified button container
+'-'       'tbseparator'  {@link Ext.Toolbar.Separator}  add a vertical separator bar between toolbar items
+' '       'tbspacer'     {@link Ext.Toolbar.Spacer}     add horiztonal space between elements
+ * </pre>
+ *
+ * Example usage of various elements:
+ * <pre><code>
+var tb = new Ext.Toolbar({
+    renderTo: document.body,
+    width: 600,
+    height: 100,
+    items: [
+        {
+            // xtype: 'button', // default for Toolbars, same as 'tbbutton'
+            text: 'Button'
+        },
+        {
+            xtype: 'splitbutton', // same as 'tbsplitbutton'
+            text: 'Split Button'
+        },
+        // begin using the right-justified button container
+        '->', // same as {xtype: 'tbfill'}, // Ext.Toolbar.Fill
+        {
+            xtype: 'textfield',
+            name: 'field1',
+            emptyText: 'enter search term'
+        },
+        // add a vertical separator bar between toolbar items
+        '-', // same as {xtype: 'tbseparator'} to create Ext.Toolbar.Separator
+        'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.Toolbar.TextItem
+        {xtype: 'tbspacer'},// same as ' ' to create Ext.Toolbar.Spacer
+        'text 2',
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'text 3'
+    ]
+});
+ * </code></pre>
+ * Example adding a ComboBox within a menu of a button:
+ * <pre><code>
+// ComboBox creation
+var combo = new Ext.form.ComboBox({
+    store: new Ext.data.ArrayStore({
+        autoDestroy: true,
+        fields: ['initials', 'fullname'],
+        data : [
+            ['FF', 'Fred Flintstone'],
+            ['BR', 'Barney Rubble']
+        ]
+    }),
+    displayField: 'fullname',
+    typeAhead: true,
+    mode: 'local',
+    forceSelection: true,
+    triggerAction: 'all',
+    emptyText: 'Select a name...',
+    selectOnFocus: true,
+    width: 135,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon' //use iconCls if placing within menu to shift to right side of menu
+});
+
+// put ComboBox in a Menu
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+
+// add a Button with the menu
+tb.add({
+        text:'Button w/ Menu',
+        menu: menu  // assign menu by instance
+    });
+tb.doLayout();
+ * </code></pre>
+ * @constructor
+ * Creates a new Toolbar
+ * @param {Object/Array} config A config object or an array of buttons to <tt>{@link #add}</tt>
+ * @xtype toolbar
+ */
+Ext.Toolbar = function(config){
+    if(Ext.isArray(config)){
+        config = {items: config, layout: 'toolbar'};
+    } else {
+        config = Ext.apply({
+            layout: 'toolbar'
+        }, config);
+        if(config.buttons) {
+            config.items = config.buttons;
+        }
+    }
+    Ext.Toolbar.superclass.constructor.call(this, config);
+};
+
+(function(){
+
+var T = Ext.Toolbar;
+
+Ext.extend(T, Ext.Container, {
+
+    defaultType: 'button',
+
+    trackMenus : true,
+    internalDefaults: {removeMode: 'container', hideParent: true},
+    toolbarCls: 'x-toolbar',
+
+    initComponent : function(){
+        T.superclass.initComponent.call(this);
+
+        /**
+         * @event overflowchange
+         * Fires after the overflow state has changed.
+         * @param {Object} c The Container
+         * @param {Boolean} lastOverflow overflow state
+         */
+        this.addEvents('overflowchange');
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            if(!this.autoCreate){
+                this.autoCreate = {
+                    cls: this.toolbarCls + ' x-small-editor'
+                };
+            }
+            this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position);
+        }
+    },
+
+    /**
+     * Adds element(s) to the toolbar -- this function takes a variable number of
+     * arguments of mixed type and adds them to the toolbar.
+     * @param {Mixed} arg1 The following types of arguments are all valid:<br />
+     * <ul>
+     * <li>{@link Ext.Button} config: A valid button config object (equivalent to {@link #addButton})</li>
+     * <li>HtmlElement: Any standard HTML element (equivalent to {@link #addElement})</li>
+     * <li>Field: Any form field (equivalent to {@link #addField})</li>
+     * <li>Item: Any subclass of {@link Ext.Toolbar.Item} (equivalent to {@link #addItem})</li>
+     * <li>String: Any generic string (gets wrapped in a {@link Ext.Toolbar.TextItem}, equivalent to {@link #addText}).
+     * Note that there are a few special strings that are treated differently as explained next.</li>
+     * <li>'-': Creates a separator element (equivalent to {@link #addSeparator})</li>
+     * <li>' ': Creates a spacer element (equivalent to {@link #addSpacer})</li>
+     * <li>'->': Creates a fill element (equivalent to {@link #addFill})</li>
+     * </ul>
+     * @param {Mixed} arg2
+     * @param {Mixed} etc.
+     * @method add
+     */
+
+    // private
+    lookupComponent : function(c){
+        if(Ext.isString(c)){
+            if(c == '-'){
+                c = new T.Separator();
+            }else if(c == ' '){
+                c = new T.Spacer();
+            }else if(c == '->'){
+                c = new T.Fill();
+            }else{
+                c = new T.TextItem(c);
+            }
+            this.applyDefaults(c);
+        }else{
+            if(c.isFormField || c.render){ // some kind of form field, some kind of Toolbar.Item
+                c = this.constructItem(c);
+            }else if(c.tag){ // DomHelper spec
+                c = new T.Item({autoEl: c});
+            }else if(c.tagName){ // element
+                c = new T.Item({el:c});
+            }else if(Ext.isObject(c)){ // must be button config?
+                c = c.xtype ? this.constructItem(c) : this.constructButton(c);
+            }
+        }
+        return c;
+    },
+
+    // private
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.Toolbar.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(c.events){
+                Ext.applyIf(c.initialConfig, d);
+                Ext.apply(c, d);
+            }else{
+                Ext.applyIf(c, d);
+            }
+        }
+        return c;
+    },
+
+    // private
+    constructItem : function(item, type){
+        return Ext.create(item, type || this.defaultType);
+    },
+
+    /**
+     * Adds a separator
+     * @return {Ext.Toolbar.Item} The separator {@link Ext.Toolbar.Item item}
+     */
+    addSeparator : function(){
+        return this.add(new T.Separator());
+    },
+
+    /**
+     * Adds a spacer element
+     * @return {Ext.Toolbar.Spacer} The spacer item
+     */
+    addSpacer : function(){
+        return this.add(new T.Spacer());
+    },
+
+    /**
+     * Forces subsequent additions into the float:right toolbar
+     */
+    addFill : function(){
+        this.add(new T.Fill());
+    },
+
+    /**
+     * Adds any standard HTML element to the toolbar
+     * @param {Mixed} el The element or id of the element to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addElement : function(el){
+        return this.addItem(new T.Item({el:el}));
+    },
+
+    /**
+     * Adds any Toolbar.Item or subclass
+     * @param {Ext.Toolbar.Item} item
+     * @return {Ext.Toolbar.Item} The item
+     */
+    addItem : function(item){
+        return Ext.Toolbar.superclass.add.apply(this, arguments);
+    },
+
+    /**
+     * Adds a button (or buttons). See {@link Ext.Button} for more info on the config.
+     * @param {Object/Array} config A button config or array of configs
+     * @return {Ext.Button/Array}
+     */
+    addButton : function(config){
+        if(Ext.isArray(config)){
+            var buttons = [];
+            for(var i = 0, len = config.length; i < len; i++) {
+                buttons.push(this.addButton(config[i]));
+            }
+            return buttons;
+        }
+        return this.add(this.constructButton(config));
+    },
+
+    /**
+     * Adds text to the toolbar
+     * @param {String} text The text to add
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addText : function(text){
+        return this.addItem(new T.TextItem(text));
+    },
+
+    /**
+     * Adds a new element to the toolbar from the passed {@link Ext.DomHelper} config
+     * @param {Object} config
+     * @return {Ext.Toolbar.Item} The element's item
+     */
+    addDom : function(config){
+        return this.add(new T.Item({autoEl: config}));
+    },
+
+    /**
+     * Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
+     * been rendered yet. For a field that has already been rendered, use {@link #addElement}.
+     * @param {Ext.form.Field} field
+     * @return {Ext.Toolbar.Item}
+     */
+    addField : function(field){
+        return this.add(field);
+    },
+
+    /**
+     * Inserts any {@link Ext.Toolbar.Item}/{@link Ext.Button} at the specified index.
+     * @param {Number} index The index where the item is to be inserted
+     * @param {Object/Ext.Toolbar.Item/Ext.Button/Array} item The button, or button config object to be
+     * inserted, or an array of buttons/configs.
+     * @return {Ext.Button/Item}
+     */
+    insertButton : function(index, item){
+        if(Ext.isArray(item)){
+            var buttons = [];
+            for(var i = 0, len = item.length; i < len; i++) {
+               buttons.push(this.insertButton(index + i, item[i]));
+            }
+            return buttons;
+        }
+        return Ext.Toolbar.superclass.insert.call(this, index, item);
+    },
+
+    // private
+    initMenuTracking : function(item){
+        if(this.trackMenus && item.menu){
+            this.mon(item, {
+                'menutriggerover' : this.onButtonTriggerOver,
+                'menushow' : this.onButtonMenuShow,
+                'menuhide' : this.onButtonMenuHide,
+                scope: this
+            });
+        }
+    },
+
+    // private
+    constructButton : function(item){
+        var b = item.events ? item : this.constructItem(item, item.split ? 'splitbutton' : this.defaultType);
+        this.initMenuTracking(b);
+        return b;
+    },
+
+    // private
+    onDisable : function(){
+        this.items.each(function(item){
+             if(item.disable){
+                 item.disable();
+             }
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.items.each(function(item){
+             if(item.enable){
+                 item.enable();
+             }
+        });
+    },
+
+    // private
+    onButtonTriggerOver : function(btn){
+        if(this.activeMenuBtn && this.activeMenuBtn != btn){
+            this.activeMenuBtn.hideMenu();
+            btn.showMenu();
+            this.activeMenuBtn = btn;
+        }
+    },
+
+    // private
+    onButtonMenuShow : function(btn){
+        this.activeMenuBtn = btn;
+    },
+
+    // private
+    onButtonMenuHide : function(btn){
+        delete this.activeMenuBtn;
+    }
+});
+Ext.reg('toolbar', Ext.Toolbar);
+
+/**
+ * @class Ext.Toolbar.Item
+ * @extends Ext.BoxComponent
+ * The base class that other non-interacting Toolbar Item classes should extend in order to
+ * get some basic common toolbar item functionality.
+ * @constructor
+ * Creates a new Item
+ * @param {HTMLElement} el
+ * @xtype tbitem
+ */
+T.Item = Ext.extend(Ext.BoxComponent, {
+    hideParent: true, //  Hiding a Toolbar.Item hides its containing TD
+    enable:Ext.emptyFn,
+    disable:Ext.emptyFn,
+    focus:Ext.emptyFn
+    /**
+     * @cfg {String} overflowText Text to be used for the menu if the item is overflowed.
+     */
+});
+Ext.reg('tbitem', T.Item);
+
+/**
+ * @class Ext.Toolbar.Separator
+ * @extends Ext.Toolbar.Item
+ * A simple class that adds a vertical separator bar between toolbar items
+ * (css class:<tt>'xtb-sep'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbseparator'}, // or '-'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Separator
+ * @xtype tbseparator
+ */
+T.Separator = Ext.extend(T.Item, {
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position);
+    }
+});
+Ext.reg('tbseparator', T.Separator);
+
+/**
+ * @class Ext.Toolbar.Spacer
+ * @extends Ext.Toolbar.Item
+ * A simple element that adds extra horizontal space between items in a toolbar.
+ * By default a 2px wide space is added via css specification:<pre><code>
+.x-toolbar .xtb-spacer {
+    width:2px;
+}
+ * </code></pre>
+ * <p>Example usage:</p>
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbspacer'}, // or ' '
+        'Item 2',
+        // space width is also configurable via javascript
+        {xtype: 'tbspacer', width: 50}, // add a 50px space
+        'Item 3'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Spacer
+ * @xtype tbspacer
+ */
+T.Spacer = Ext.extend(T.Item, {
+    /**
+     * @cfg {Number} width
+     * The width of the spacer in pixels (defaults to 2px via css style <tt>.x-toolbar .xtb-spacer</tt>).
+     */
+
+    onRender : function(ct, position){
+        this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position);
+    }
+});
+Ext.reg('tbspacer', T.Spacer);
+
+/**
+ * @class Ext.Toolbar.Fill
+ * @extends Ext.Toolbar.Spacer
+ * A non-rendering placeholder item which instructs the Toolbar's Layout to begin using
+ * the right-justified button container.
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        'Item 1',
+        {xtype: 'tbfill'}, // or '->'
+        'Item 2'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new Fill
+ * @xtype tbfill
+ */
+T.Fill = Ext.extend(T.Item, {
+    // private
+    render : Ext.emptyFn,
+    isFill : true
+});
+Ext.reg('tbfill', T.Fill);
+
+/**
+ * @class Ext.Toolbar.TextItem
+ * @extends Ext.Toolbar.Item
+ * A simple class that renders text directly into a toolbar
+ * (with css class:<tt>'xtb-text'</tt>). Example usage:
+ * <pre><code>
+new Ext.Panel({
+    tbar : [
+        {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
+    ]
+});
+</code></pre>
+ * @constructor
+ * Creates a new TextItem
+ * @param {String/Object} text A text string, or a config object containing a <tt>text</tt> property
+ * @xtype tbtext
+ */
+T.TextItem = Ext.extend(T.Item, {
+    constructor: function(config){
+        if (Ext.isString(config)) {
+            config = { autoEl: {cls: 'xtb-text', html: config }};
+        } else {
+            config.autoEl = {cls: 'xtb-text', html: config.text || ''};
+        }
+        T.TextItem.superclass.constructor.call(this, config);
+    },
+    /**
+     * Updates this item's text, setting the text to be used as innerHTML.
+     * @param {String} t The text to display (html accepted).
+     */
+    setText : function(t) {
+        if (this.rendered) {
+            this.el.dom.innerHTML = t;
+        } else {
+            this.autoEl.html = t;
+        }
+    }
+});
+Ext.reg('tbtext', T.TextItem);
+
+// backwards compat
+T.Button = Ext.extend(Ext.Button, {});
+T.SplitButton = Ext.extend(Ext.SplitButton, {});
+Ext.reg('tbbutton', T.Button);
+Ext.reg('tbsplit', T.SplitButton);
+
+})();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Viewport.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Viewport.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Viewport.js	(revision 625)
@@ -0,0 +1,124 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Viewport
+ * @extends Ext.Container
+ * <p>A specialized container representing the viewable application area (the browser viewport).</p>
+ * <p>The Viewport renders itself to the document body, and automatically sizes itself to the size of
+ * the browser viewport and manages window resizing. There may only be one Viewport created
+ * in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s
+ * added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add}
+ * method of any of its child Panels may themselves have a layout.</p>
+ * <p>The Viewport does not provide scrolling, so child Panels within the Viewport should provide
+ * for scrolling if needed using the {@link #autoScroll} config.</p>
+ * <p>An example showing a classic application border layout:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'north',
+        html: '&lt;h1 class="x-panel-header">Page Title&lt;/h1>',
+        autoHeight: true,
+        border: false,
+        margins: '0 0 5 0'
+    }, {
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        width: 200
+        // the west region might typically utilize a {@link Ext.tree.TreePanel TreePanel} or a Panel with {@link Ext.layout.AccordionLayout Accordion layout} 
+    }, {
+        region: 'south',
+        title: 'Title for Panel',
+        collapsible: true,
+        html: 'Information goes here',
+        split: true,
+        height: 100,
+        minHeight: 100
+    }, {
+        region: 'east',
+        title: 'Title for the Grid Panel',
+        collapsible: true,
+        split: true,
+        width: 200,
+        xtype: 'grid',
+        // remaining grid configuration not shown ...
+        // notice that the GridPanel is added directly as the region
+        // it is not "overnested" inside another Panel
+    }, {
+        region: 'center',
+        xtype: 'tabpanel', // TabPanel itself has no title
+        items: {
+            title: 'Default Tab',
+            html: 'The first tab\'s content. Others may be added dynamically'
+        }
+    }]
+});
+</code></pre>
+ * @constructor
+ * Create a new Viewport
+ * @param {Object} config The config object
+ * @xtype viewport
+ */
+Ext.Viewport = Ext.extend(Ext.Container, {
+	/*
+	 * Privatize config options which, if used, would interfere with the
+	 * correct operation of the Viewport as the sole manager of the
+	 * layout of the document body.
+	 */
+    /**
+     * @cfg {Mixed} applyTo @hide
+	 */
+    /**
+     * @cfg {Boolean} allowDomMove @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Mixed} renderTo @hide
+	 */
+    /**
+     * @cfg {Boolean} hideParent @hide
+	 */
+    /**
+     * @cfg {Number} height @hide
+	 */
+    /**
+     * @cfg {Number} width @hide
+	 */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} autoWidth @hide
+	 */
+    /**
+     * @cfg {Boolean} deferHeight @hide
+	 */
+    /**
+     * @cfg {Boolean} monitorResize @hide
+	 */
+    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(w, h){
+        this.fireEvent('resize', this, w, h, w, h);
+    }
+});
+Ext.reg('viewport', Ext.Viewport);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Window.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Window.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/Window.js	(revision 625)
@@ -0,0 +1,941 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Window
+ * @extends Ext.Panel
+ * <p>A specialized panel intended for use as an application window.  Windows are floated, {@link #resizable}, and
+ * {@link #draggable} by default.  Windows can be {@link #maximizable maximized} to fill the viewport,
+ * restored to their prior size, and can be {@link #minimize}d.</p>
+ * <p>Windows can also be linked to a {@link Ext.WindowGroup} or managed by the {@link Ext.WindowMgr} to provide 
+ * grouping, activation, to front, to back and other application-specific behavior.</p>
+ * <p>By default, Windows will be rendered to document.body. To {@link #constrain} a Window to another element
+ * specify {@link Ext.Component#renderTo renderTo}.</p>
+ * <p><b>Note:</b> By default, the <code>{@link #closable close}</code> header tool <i>destroys</i> the Window resulting in
+ * destruction of any child Components. This makes the Window object, and all its descendants <b>unusable</b>. To enable
+ * re-use of a Window, use <b><code>{@link #closeAction closeAction: 'hide'}</code></b>.</p>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype window
+ */
+Ext.Window = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Number} x
+     * The X position of the left edge of the window on initial showing. Defaults to centering the Window within
+     * the width of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Number} y
+     * The Y position of the top edge of the window on initial showing. Defaults to centering the Window within
+     * the height of the Window's container {@link Ext.Element Element) (The Element that the Window is rendered to).
+     */
+    /**
+     * @cfg {Boolean} modal
+     * True to make the window modal and mask everything behind it when displayed, false to display it without
+     * restricting access to other UI elements (defaults to false).
+     */
+    /**
+     * @cfg {String/Element} animateTarget
+     * Id or element from which the window should animate while opening (defaults to null with no animation).
+     */
+    /**
+     * @cfg {String} resizeHandles
+     * A valid {@link Ext.Resizable} handles config string (defaults to 'all').  Only applies when resizable = true.
+     */
+    /**
+     * @cfg {Ext.WindowGroup} manager
+     * A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}).
+     */
+    /**
+    * @cfg {String/Number/Button} defaultButton
+    * The id / index of a button or a button instance to focus when this window received the focus.
+    */
+    /**
+    * @cfg {Function} onEsc
+    * Allows override of the built-in processing for the escape key. Default action
+    * is to close the Window (performing whatever action is specified in {@link #closeAction}.
+    * To prevent the Window closing when the escape key is pressed, specify this as
+    * Ext.emptyFn (See {@link Ext#emptyFn}).
+    */
+    /**
+     * @cfg {Boolean} collapsed
+     * True to render the window collapsed, false to render it expanded (defaults to false). Note that if 
+     * {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window 
+     * will always be expanded when shown.
+     */
+    /**
+     * @cfg {Boolean} maximized
+     * True to initially display the window in a maximized state. (Defaults to false).
+     */
+    
+    /**
+    * @cfg {String} baseCls
+    * The base CSS class to apply to this panel's element (defaults to 'x-window').
+    */
+    baseCls : 'x-window',
+    /**
+     * @cfg {Boolean} resizable
+     * True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
+     */
+    resizable : true,
+    /**
+     * @cfg {Boolean} draggable
+     * True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true).  Note
+     * that by default the window will be centered in the viewport, so if dragging is disabled the window may need
+     * to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).
+     */
+    draggable : true,
+    /**
+     * @cfg {Boolean} closable
+     * <p>True to display the 'close' tool button and allow the user to close the window, false to
+     * hide the button and disallow closing the window (defaults to true).</p>
+     * <p>By default, when close is requested by either clicking the close button in the header
+     * or pressing ESC when the Window has focus, the {@link #close} method will be called. This
+     * will <i>{@link Ext.Component#destroy destroy}</i> the Window and its content meaning that
+     * it may not be reused.</p>
+     * <p>To make closing a Window <i>hide</i> the Window so that it may be reused, set
+     * {@link #closeAction} to 'hide'.
+     */
+    closable : true,
+    /**
+     * @cfg {String} closeAction
+     * <p>The action to take when the close header tool is clicked:
+     * <div class="mdetail-params"><ul>
+     * <li><b><code>'{@link #close}'</code></b> : <b>Default</b><div class="sub-desc">
+     * {@link #close remove} the window from the DOM and {@link Ext.Component#destroy destroy}
+     * it and all descendant Components. The window will <b>not</b> be available to be
+     * redisplayed via the {@link #show} method.
+     * </div></li>
+     * <li><b><code>'{@link #hide}'</code></b> : <div class="sub-desc">
+     * {@link #hide} the window by setting visibility to hidden and applying negative offsets.
+     * The window will be available to be redisplayed via the {@link #show} method.
+     * </div></li>
+     * </ul></div>
+     * <p><b>Note:</b> This setting does not affect the {@link #close} method
+     * which will always {@link Ext.Component#destroy destroy} the window. To
+     * programatically <i>hide</i> a window, call {@link #hide}.</p>
+     */
+    closeAction : 'close',
+    /**
+     * @cfg {Boolean} constrain
+     * True to constrain the window within its containing element, false to allow it to fall outside of its
+     * containing element. By default the window will be rendered to document.body.  To render and constrain the 
+     * window within another element specify {@link #renderTo}.
+     * (defaults to false).  Optionally the header only can be constrained using {@link #constrainHeader}.
+     */
+    constrain : false,
+    /**
+     * @cfg {Boolean} constrainHeader
+     * True to constrain the window header within its containing element (allowing the window body to fall outside 
+     * of its containing element) or false to allow the header to fall outside its containing element (defaults to 
+     * false). Optionally the entire window can be constrained using {@link #constrain}.
+     */
+    constrainHeader : false,
+    /**
+     * @cfg {Boolean} plain
+     * True to render the window body with a transparent background so that it will blend into the framing
+     * elements, false to add a lighter background color to visually highlight the body element and separate it
+     * more distinctly from the surrounding frame (defaults to false).
+     */
+    plain : false,
+    /**
+     * @cfg {Boolean} minimizable
+     * True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button
+     * and disallow minimizing the window (defaults to false).  Note that this button provides no implementation --
+     * the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a
+     * custom minimize behavior implemented for this option to be useful.
+     */
+    minimizable : false,
+    /**
+     * @cfg {Boolean} maximizable
+     * True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button
+     * and disallow maximizing the window (defaults to false).  Note that when a window is maximized, the tool button
+     * will automatically change to a 'restore' button with the appropriate behavior already built-in that will
+     * restore the window to its previous size.
+     */
+    maximizable : false,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum height in pixels allowed for this window (defaults to 100).  Only applies when resizable = true.
+     */
+    minHeight : 100,
+    /**
+     * @cfg {Number} minWidth
+     * The minimum width in pixels allowed for this window (defaults to 200).  Only applies when resizable = true.
+     */
+    minWidth : 200,
+    /**
+     * @cfg {Boolean} expandOnShow
+     * True to always expand the window when it is displayed, false to keep it in its current state (which may be
+     * {@link #collapsed}) when displayed (defaults to true).
+     */
+    expandOnShow : true,
+
+    // inherited docs, same default
+    collapsible : false,
+
+    /**
+     * @cfg {Boolean} initHidden
+     * True to hide the window until show() is explicitly called (defaults to true).
+     */
+    initHidden : true,
+    /**
+    * @cfg {Boolean} monitorResize @hide
+    * This is automatically managed based on the value of constrain and constrainToHeader
+    */
+    monitorResize : true,
+
+    // The following configs are set to provide the basic functionality of a window.
+    // Changing them would require additional code to handle correctly and should
+    // usually only be done in subclasses that can provide custom behavior.  Changing them
+    // may have unexpected or undesirable results.
+    /** @cfg {String} elements @hide */
+    elements : 'header,body',
+    /** @cfg {Boolean} frame @hide */
+    frame : true,
+    /** @cfg {Boolean} floating @hide */
+    floating : true,
+
+    // private
+    initComponent : function(){
+        Ext.Window.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event activate
+             * Fires after the window has been visually activated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event deactivate
+             * Fires after the window has been visually deactivated via {@link setActive}.
+             * @param {Ext.Window} this
+             */
+            /**
+             * @event resize
+             * Fires after the window has been resized.
+             * @param {Ext.Window} this
+             * @param {Number} width The window's new width
+             * @param {Number} height The window's new height
+             */
+            'resize',
+            /**
+             * @event maximize
+             * Fires after the window has been maximized.
+             * @param {Ext.Window} this
+             */
+            'maximize',
+            /**
+             * @event minimize
+             * Fires after the window has been minimized.
+             * @param {Ext.Window} this
+             */
+            'minimize',
+            /**
+             * @event restore
+             * Fires after the window has been restored to its original size after being maximized.
+             * @param {Ext.Window} this
+             */
+            'restore'
+        );
+        if(this.initHidden === false){
+            this.show();
+        }else{
+            this.hidden = true;
+        }
+    },
+
+    // private
+    getState : function(){
+        return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true));
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.Window.superclass.onRender.call(this, ct, position);
+
+        if(this.plain){
+            this.el.addClass('x-window-plain');
+        }
+
+        // this element allows the Window to be focused for keyboard events
+        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();
+            this.mon(this.mask, 'click', this.focus, this);
+        }
+        this.initTools();
+    },
+
+    // private
+    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.mon(this.resizer, 'beforeresize', this.beforeResize, this);
+        }
+
+        if(this.draggable){
+            this.header.addClass('x-window-draggable');
+        }
+        this.mon(this.el, 'mousedown', this.toFront, this);
+        this.manager = this.manager || Ext.WindowMgr;
+        this.manager.register(this);
+        if(this.maximized){
+            this.maximized = false;
+            this.maximize();
+        }
+        if(this.closable){
+            var km = this.getKeyMap();
+            km.on(27, this.onEsc, this);
+            km.disable();
+        }
+    },
+
+    initDraggable : function(){
+        /**
+         * If this Window is configured {@link #draggable}, this property will contain
+         * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element.
+         * @type Ext.dd.DD
+         * @property dd
+         */
+        this.dd = new Ext.Window.DD(this);
+    },
+
+   // private
+    onEsc : function(){
+        this[this.closeAction]();
+    },
+
+    // private
+    beforeDestroy : function(){
+        if (this.rendered){
+            this.hide();
+          if(this.doAnchor){
+                Ext.EventManager.removeResizeListener(this.doAnchor, this);
+              Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+            }
+            Ext.destroy(
+                this.focusEl,
+                this.resizer,
+                this.dd,
+                this.proxy,
+                this.mask
+            );
+        }
+        Ext.Window.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.manager){
+            this.manager.unregister(this);
+        }
+        Ext.Window.superclass.onDestroy.call(this);
+    },
+
+    // private
+    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.mon(this.header, 'dblclick', this.toggleMaximize, this);
+        }
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction].createDelegate(this, [])
+            });
+        }
+    },
+
+    // private
+    resizerAction : function(){
+        var box = this.proxy.getBox();
+        this.proxy.hide();
+        this.window.handleResize(box);
+        return box;
+    },
+
+    // private
+    beforeResize : function(){
+        this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); // 40 is a magic minimum content size?
+        this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40);
+        this.resizeBox = this.el.getBox();
+    },
+
+    // private
+    updateHandles : function(){
+        if(Ext.isIE && this.resizer){
+            this.resizer.syncHandleHeight();
+            this.el.repaint();
+        }
+    },
+
+    // private
+    handleResize : function(box){
+        var rz = this.resizeBox;
+        if(rz.x != box.x || rz.y != box.y){
+            this.updateBox(box);
+        }else{
+            this.setSize(box);
+        }
+        this.focus();
+        this.updateHandles();
+        this.saveState();
+        this.doLayout();
+        this.fireEvent('resize', this, box.width, box.height);
+    },
+
+    /**
+     * Focuses the window.  If a defaultButton is set, it will receive focus, otherwise the
+     * window itself will receive focus.
+     */
+    focus : function(){
+        var f = this.focusEl, db = this.defaultButton, t = typeof db;
+        if(t != 'undefined'){
+            if(t == 'number' && this.fbar){
+                f = this.fbar.items.get(db);
+            }else if(t == 'string'){
+                f = Ext.getCmp(db);
+            }else{
+                f = db;
+            }
+        }
+        f = f || this.focusEl;
+        f.focus.defer(10, f);
+    },
+
+    /**
+     * Sets the target element from which the window should animate while opening.
+     * @param {String/Element} el The target element or id
+     */
+    setAnimateTarget : function(el){
+        el = Ext.get(el);
+        this.animateTarget = el;
+    },
+
+    // private
+    beforeShow : function(){
+        delete this.el.lastXY;
+        delete this.el.lastLT;
+        if(this.x === undefined || this.y === undefined){
+            var xy = this.el.getAlignToXY(this.container, 'c-c');
+            var pos = this.el.translatePoints(xy[0], xy[1]);
+            this.x = this.x === undefined? pos.left : this.x;
+            this.y = this.y === undefined? pos.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();
+        }
+    },
+
+    /**
+     * Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
+     * @param {String/Element} animateTarget (optional) The target element or id from which the window should
+     * animate while opening (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is displayed
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    show : function(animateTarget, cb, scope){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        if(this.hidden === false){
+            this.toFront();
+            return this;
+        }
+        if(this.fireEvent('beforeshow', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('show', cb, scope, {single:true});
+        }
+        this.hidden = false;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        this.beforeShow();
+        if(this.animateTarget){
+            this.animShow();
+        }else{
+            this.afterShow();
+        }
+        return this;
+    },
+
+    // private
+    afterShow : function(isAnim){
+        this.proxy.hide();
+        this.el.setStyle('display', 'block');
+        this.el.show();
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+            this.cascade(this.setAutoScroll);
+        }
+
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.onWindowResize(this.onWindowResize, this);
+        }
+        this.doConstrain();
+        this.doLayout();
+        if(this.keyMap){
+            this.keyMap.enable();
+        }
+        this.toFront();
+        this.updateHandles();
+        if(isAnim && (Ext.isIE || Ext.isWebKit)){
+            var sz = this.getSize();
+            this.onResize(sz.width, sz.height);
+        }
+        this.fireEvent('show', this);
+    },
+
+    // private
+    animShow : function(){
+        this.proxy.show();
+        this.proxy.setBox(this.animateTarget.getBox());
+        this.proxy.setOpacity(0);
+        var b = this.getBox(false);
+        b.callback = this.afterShow.createDelegate(this, [true], false);
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.opacity = 0.5;
+        b.block = true;
+        this.el.setStyle('display', 'none');
+        this.proxy.shift(b);
+    },
+
+    /**
+     * Hides the window, setting it to invisible and applying negative offsets.
+     * @param {String/Element} animateTarget (optional) The target element or id to which the window should
+     * animate while hiding (defaults to null with no animation)
+     * @param {Function} callback (optional) A callback function to call after the window is hidden
+     * @param {Object} scope (optional) The scope in which to execute the callback
+     * @return {Ext.Window} this
+     */
+    hide : function(animateTarget, cb, scope){
+        if(this.hidden || this.fireEvent('beforehide', this) === false){
+            return this;
+        }
+        if(cb){
+            this.on('hide', cb, scope, {single:true});
+        }
+        this.hidden = true;
+        if(animateTarget !== undefined){
+            this.setAnimateTarget(animateTarget);
+        }
+        if(this.modal){
+            this.mask.hide();
+            Ext.getBody().removeClass('x-body-masked');
+        }
+        if(this.animateTarget){
+            this.animHide();
+        }else{
+            this.el.hide();
+            this.afterHide();
+        }
+        return this;
+    },
+
+    // private
+    afterHide : function(){
+        this.proxy.hide();
+        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
+            Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        }
+        if(this.keyMap){
+            this.keyMap.disable();
+        }
+        this.fireEvent('hide', this);
+    },
+
+    // private
+    animHide : function(){
+        this.proxy.setOpacity(0.5);
+        this.proxy.show();
+        var tb = this.getBox(false);
+        this.proxy.setBox(tb);
+        this.el.hide();
+        var b = this.animateTarget.getBox();
+        b.callback = this.afterHide;
+        b.scope = this;
+        b.duration = 0.25;
+        b.easing = 'easeNone';
+        b.block = true;
+        b.opacity = 0;
+        this.proxy.shift(b);
+    },
+
+    // private
+    onWindowResize : function(){
+        if(this.maximized){
+            this.fitContainer();
+        }
+        if(this.modal){
+            this.mask.setSize('100%', '100%');
+            var force = this.mask.dom.offsetHeight;
+            this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
+        }
+        this.doConstrain();
+    },
+
+    // private
+    doConstrain : function(){
+        if(this.constrain || this.constrainHeader){
+            var offsets;
+            if(this.constrain){
+                offsets = {
+                    right:this.el.shadowOffset,
+                    left:this.el.shadowOffset,
+                    bottom:this.el.shadowOffset
+                };
+            }else {
+                var s = this.getSize();
+                offsets = {
+                    right:-(s.width - 100),
+                    bottom:-(s.height - 25)
+                };
+            }
+
+            var xy = this.el.getConstrainToXY(this.container, true, offsets);
+            if(xy){
+                this.setPosition(xy[0], xy[1]);
+            }
+        }
+    },
+
+    // private - used for dragging
+    ghost : function(cls){
+        var ghost = this.createGhost(cls);
+        var box = this.getBox(true);
+        ghost.setLeftTop(box.x, box.y);
+        ghost.setWidth(box.width);
+        this.el.hide();
+        this.activeGhost = ghost;
+        return ghost;
+    },
+
+    // private
+    unghost : function(show, matchPosition){
+        if(!this.activeGhost) {
+            return;
+        }
+        if(show !== false){
+            this.el.show();
+            this.focus();
+            if(Ext.isMac && Ext.isGecko){ // work around stupid FF 2.0/Mac scroll bar bug
+                this.cascade(this.setAutoScroll);
+            }
+        }
+        if(matchPosition !== false){
+            this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true));
+        }
+        this.activeGhost.hide();
+        this.activeGhost.remove();
+        delete this.activeGhost;
+    },
+
+    /**
+     * Placeholder method for minimizing the window.  By default, this method simply fires the {@link #minimize} event
+     * since the behavior of minimizing a window is application-specific.  To implement custom minimize behavior,
+     * either the minimize event can be handled or this method can be overridden.
+     * @return {Ext.Window} this
+     */
+    minimize : function(){
+        this.fireEvent('minimize', this);
+        return this;
+    },
+
+    /**
+     * <p>Closes the Window, removes it from the DOM, {@link Ext.Component#destroy destroy}s
+     * the Window object and all its descendant Components. The {@link Ext.Panel#beforeclose beforeclose}
+     * event is fired before the close happens and will cancel the close action if it returns false.<p>
+     * <p><b>Note:</b> This method is not affected by the {@link #closeAction} setting which
+     * only affects the action triggered when clicking the {@link #closable 'close' tool in the header}.
+     * To hide the Window without destroying it, call {@link #hide}.</p>
+     */
+    close : function(){
+        if(this.fireEvent('beforeclose', this) !== false){
+            this.hide(null, function(){
+                this.fireEvent('close', this);
+                this.destroy();
+            }, this);
+        }
+    },
+
+    /**
+     * Fits the window within its current container and automatically replaces
+     * the {@link #maximizable 'maximize' tool button} with the 'restore' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * Restores a {@link #maximizable maximized}  window back to its original
+     * size and position prior to being maximized and also replaces
+     * the 'restore' tool button with the 'maximize' tool button.
+     * Also see {@link #toggleMaximize}.
+     * @return {Ext.Window} 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);
+        }
+        return this;
+    },
+
+    /**
+     * A shortcut method for toggling between {@link #maximize} and {@link #restore} based on the current maximized
+     * state of the window.
+     * @return {Ext.Window} this
+     */
+    toggleMaximize : function(){
+        return this[this.maximized ? 'restore' : 'maximize']();
+    },
+
+    // private
+    fitContainer : function(){
+        var vs = this.container.getViewSize();
+        this.setSize(vs.width, vs.height);
+    },
+
+    // private
+    // z-index is managed by the WindowManager and may be overwritten at any time
+    setZIndex : function(index){
+        if(this.modal){
+            this.mask.setStyle('z-index', index);
+        }
+        this.el.setZIndex(++index);
+        index += 5;
+
+        if(this.resizer){
+            this.resizer.proxy.setStyle('z-index', ++index);
+        }
+
+        this.lastZIndex = index;
+    },
+
+    /**
+     * Aligns the window to the specified element
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details).
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @return {Ext.Window} this
+     */
+    alignTo : function(element, position, offsets){
+        var xy = this.el.getAlignToXY(element, position, offsets);
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    },
+
+    /**
+     * Anchors this window to another element and realigns it when the window is resized or scrolled.
+     * @param {Mixed} element The element to align to.
+     * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details)
+     * @param {Array} offsets (optional) Offset the positioning by [x, y]
+     * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter
+     * is a number, it is used as the buffer delay (defaults to 50ms).
+     * @return {Ext.Window} this
+     */
+    anchorTo : function(el, alignment, offsets, monitorScroll){
+      if(this.doAnchor){
+          Ext.EventManager.removeResizeListener(this.doAnchor, this);
+          Ext.EventManager.un(window, 'scroll', this.doAnchor, this);
+      }
+      this.doAnchor = function(){
+          this.alignTo(el, alignment, offsets);
+      };
+      Ext.EventManager.onWindowResize(this.doAnchor, this);
+      
+      var tm = typeof monitorScroll;
+      if(tm != 'undefined'){
+          Ext.EventManager.on(window, 'scroll', this.doAnchor, this,
+              {buffer: tm == 'number' ? monitorScroll : 50});
+      }
+      this.doAnchor();
+      return this;
+    },
+
+    /**
+     * Brings this window to the front of any other visible windows
+     * @param {Boolean} e (optional) Specify <tt>false</tt> to prevent the window from being focused.
+     * @return {Ext.Window} this
+     */
+    toFront : function(e){
+        if(this.manager.bringToFront(this)){
+            if(!e || !e.getTarget().focus){
+                this.focus();
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Makes this the active window by showing its shadow, or deactivates it by hiding its shadow.  This method also
+     * fires the {@link #activate} or {@link #deactivate} event depending on which action occurred.
+     * @param {Boolean} active True to activate the window, false to deactivate it (defaults to false)
+     */
+    setActive : function(active){
+        if(active){
+            if(!this.maximized){
+                this.el.enableShadow(true);
+            }
+            this.fireEvent('activate', this);
+        }else{
+            this.el.disableShadow();
+            this.fireEvent('deactivate', this);
+        }
+    },
+
+    /**
+     * Sends this window to the back of (lower z-index than) any other visible windows
+     * @return {Ext.Window} this
+     */
+    toBack : function(){
+        this.manager.sendToBack(this);
+        return this;
+    },
+
+    /**
+     * Centers this window in the viewport
+     * @return {Ext.Window} this
+     */
+    center : function(){
+        var xy = this.el.getAlignToXY(this.container, 'c-c');
+        this.setPagePosition(xy[0], xy[1]);
+        return this;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     **/
+});
+Ext.reg('window', Ext.Window);
+
+// private - custom Window DD implementation
+Ext.Window.DD = function(win){
+    this.win = win;
+    Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id);
+    this.setHandleElId(win.header.id);
+    this.scroll = false;
+};
+
+Ext.extend(Ext.Window.DD, Ext.dd.DD, {
+    moveOnly:true,
+    headerOffsets:[100, 25],
+    startDrag : function(){
+        var w = this.win;
+        this.proxy = w.ghost();
+        if(w.constrain !== false){
+            var so = w.el.shadowOffset;
+            this.constrainTo(w.container, {right: so, left: so, bottom: so});
+        }else if(w.constrainHeader !== false){
+            var s = this.proxy.getSize();
+            this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])});
+        }
+    },
+    b4Drag : Ext.emptyFn,
+
+    onDrag : function(e){
+        this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY());
+    },
+
+    endDrag : function(e){
+        this.win.unghost();
+        this.win.saveState();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/WindowManager.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/WindowManager.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/WindowManager.js	(revision 625)
@@ -0,0 +1,187 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.WindowGroup
+ * An object that represents a group of {@link Ext.Window} instances and provides z-order management
+ * and window activation behavior.
+ * @constructor
+ */
+Ext.WindowGroup = function(){
+    var list = {};
+    var accessList = [];
+    var front = null;
+
+    // private
+    var sortWindows = function(d1, d2){
+        return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1;
+    };
+
+    // private
+    var orderWindows = function(){
+        var a = accessList, len = a.length;
+        if(len > 0){
+            a.sort(sortWindows);
+            var seed = a[0].manager.zseed;
+            for(var i = 0; i < len; i++){
+                var win = a[i];
+                if(win && !win.hidden){
+                    win.setZIndex(seed + (i*10));
+                }
+            }
+        }
+        activateLast();
+    };
+
+    // private
+    var setActiveWin = function(win){
+        if(win != front){
+            if(front){
+                front.setActive(false);
+            }
+            front = win;
+            if(win){
+                win.setActive(true);
+            }
+        }
+    };
+
+    // private
+    var activateLast = function(){
+        for(var i = accessList.length-1; i >=0; --i) {
+            if(!accessList[i].hidden){
+                setActiveWin(accessList[i]);
+                return;
+            }
+        }
+        // none to activate
+        setActiveWin(null);
+    };
+
+    return {
+        /**
+         * The starting z-index for windows (defaults to 9000)
+         * @type Number The z-index value
+         */
+        zseed : 9000,
+
+        // private
+        register : function(win){
+            list[win.id] = win;
+            accessList.push(win);
+            win.on('hide', activateLast);
+        },
+
+        // private
+        unregister : function(win){
+            delete list[win.id];
+            win.un('hide', activateLast);
+            accessList.remove(win);
+        },
+
+        /**
+         * Gets a registered window by id.
+         * @param {String/Object} id The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window}
+         */
+        get : function(id){
+            return typeof id == "object" ? id : list[id];
+        },
+
+        /**
+         * Brings the specified window to the front of any other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Boolean} True if the dialog was brought to the front, else false
+         * if it was already in front
+         */
+        bringToFront : function(win){
+            win = this.get(win);
+            if(win != front){
+                win._lastAccess = new Date().getTime();
+                orderWindows();
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Sends the specified window to the back of other active windows.
+         * @param {String/Object} win The id of the window or a {@link Ext.Window} instance
+         * @return {Ext.Window} The window
+         */
+        sendToBack : function(win){
+            win = this.get(win);
+            win._lastAccess = -(new Date().getTime());
+            orderWindows();
+            return win;
+        },
+
+        /**
+         * Hides all windows in the group.
+         */
+        hideAll : function(){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function" && list[id].isVisible()){
+                    list[id].hide();
+                }
+            }
+        },
+
+        /**
+         * Gets the currently-active window in the group.
+         * @return {Ext.Window} The active window
+         */
+        getActive : function(){
+            return front;
+        },
+
+        /**
+         * Returns zero or more windows in the group using the custom search function passed to this method.
+         * The function should accept a single {@link Ext.Window} reference as its only argument and should
+         * return true if the window matches the search criteria, otherwise it should return false.
+         * @param {Function} fn The search function
+         * @param {Object} scope (optional) The scope in which to execute the function (defaults to the window
+         * that gets passed to the function if not specified)
+         * @return {Array} An array of zero or more matching windows
+         */
+        getBy : function(fn, scope){
+            var r = [];
+            for(var i = accessList.length-1; i >=0; --i) {
+                var win = accessList[i];
+                if(fn.call(scope||win, win) !== false){
+                    r.push(win);
+                }
+            }
+            return r;
+        },
+
+        /**
+         * Executes the specified function once for every window in the group, passing each
+         * window as the only parameter. Returning false from the function will stop the iteration.
+         * @param {Function} fn The function to execute for each item
+         * @param {Object} scope (optional) The scope in which to execute the function
+         */
+        each : function(fn, scope){
+            for(var id in list){
+                if(list[id] && typeof list[id] != "function"){
+                    if(fn.call(scope || list[id], list[id]) === false){
+                        return;
+                    }
+                }
+            }
+        }
+    };
+};
+
+
+/**
+ * @class Ext.WindowMgr
+ * @extends Ext.WindowGroup
+ * The default global window group that is available automatically.  To have more than one group of windows
+ * with separate z-order stacks, create additional instances of {@link Ext.WindowGroup} as needed.
+ * @singleton
+ */
+Ext.WindowMgr = new Ext.WindowGroup();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/Chart.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/Chart.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/Chart.js	(revision 625)
@@ -0,0 +1,721 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.chart.Chart
+ * @extends Ext.FlashComponent
+ * The Ext.chart package provides the capability to visualize data with flash based charting.
+ * Each chart binds directly to an Ext.data.Store enabling automatic updates of the chart.
+ * @constructor
+ * @xtype chart
+ */
+ 
+ Ext.chart.Chart = Ext.extend(Ext.FlashComponent, {
+    refreshBuffer: 100,
+
+    /**
+     * @cfg {Object} chartStyle
+     * Sets styles for this chart. Contains a number of default values. Modifying this property will override
+     * the base styles on the chart.
+     */
+    chartStyle: {
+        padding: 10,
+        animationEnabled: true,
+        font: {
+            name: 'Tahoma',
+            color: 0x444444,
+            size: 11
+        },
+        dataTip: {
+            padding: 5,
+            border: {
+                color: 0x99bbe8,
+                size:1
+            },
+            background: {
+                color: 0xDAE7F6,
+                alpha: .9
+            },
+            font: {
+                name: 'Tahoma',
+                color: 0x15428B,
+                size: 10,
+                bold: true
+            }
+        }
+    },
+    
+    /**
+     * @cfg {String} url
+     * The url to load the chart from. This defaults to Ext.chart.Chart.CHART_URL, which should
+     * be modified to point to the local charts resource.
+     */
+    
+    /**
+     * @cfg {Object} extraStyle
+     * Contains extra styles that will be added or overwritten to the default chartStyle. Defaults to <tt>null</tt>.
+     */
+    extraStyle: null,
+    
+    /**
+     * @cfg {Boolean} disableCaching
+     * True to add a "cache buster" to the end of the chart url. Defaults to true for Opera and IE.
+     */
+    disableCaching: Ext.isIE || Ext.isOpera,
+    disableCacheParam: '_dc',
+
+    initComponent : function(){
+        Ext.chart.Chart.superclass.initComponent.call(this);
+        if(!this.url){
+            this.url = Ext.chart.Chart.CHART_URL;
+        }
+        if(this.disableCaching){
+            this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime()));
+        }
+        this.addEvents(
+            'itemmouseover',
+            'itemmouseout',
+            'itemclick',
+            'itemdoubleclick',
+            'itemdragstart',
+            'itemdrag',
+            'itemdragend'
+        );
+        this.store = Ext.StoreMgr.lookup(this.store);
+    },
+
+    /**
+     * Sets a single style value on the Chart instance.
+     *
+     * @param name {String} Name of the Chart style value to change.
+     * @param value {Object} New value to pass to the Chart style.
+     */
+     setStyle: function(name, value){
+         this.swf.setStyle(name, Ext.encode(value));
+     },
+
+    /**
+     * Resets all styles on the Chart instance.
+     *
+     * @param styles {Object} Initializer for all Chart styles.
+     */
+    setStyles: function(styles){
+        this.swf.setStyles(Ext.encode(styles));
+    },
+
+    /**
+     * Sets the styles on all series in the Chart.
+     *
+     * @param styles {Array} Initializer for all Chart series styles.
+     */
+    setSeriesStyles: function(styles){
+        var s = [];
+        Ext.each(styles, function(style){
+            s.push(Ext.encode(style));
+        });
+        this.swf.setSeriesStyles(s);
+    },
+
+    setCategoryNames : function(names){
+        this.swf.setCategoryNames(names);
+    },
+
+    setTipRenderer : function(fn){
+        var chart = this;
+        this.tipFnName = this.createFnProxy(function(item, index, series){
+            var record = chart.store.getAt(index);
+            return fn(chart, record, index, series);
+        }, this.tipFnName);
+        this.swf.setDataTipFunction(this.tipFnName);
+    },
+
+    setSeries : function(series){
+        this.series = series;
+        this.refresh();
+    },
+
+    /**
+     * Changes the data store bound to this chart and refreshes it.
+     * @param {Store} store The store to bind to this chart
+     */
+    bindStore : function(store, initial){
+        if(!initial && this.store){
+            this.store.un("datachanged", this.refresh, this);
+            this.store.un("add", this.delayRefresh, this);
+            this.store.un("remove", this.delayRefresh, this);
+            this.store.un("update", this.delayRefresh, this);
+            this.store.un("clear", this.refresh, this);
+            if(store !== this.store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+        }
+        if(store){
+            store = Ext.StoreMgr.lookup(store);
+            store.on({
+                scope: this,
+                datachanged: this.refresh,
+                add: this.delayRefresh,
+                remove: this.delayRefresh,
+                update: this.delayRefresh,
+                clear: this.refresh
+            });
+        }
+        this.store = store;
+        if(store && !initial){
+            this.refresh();
+        }
+    },
+
+    onSwfReady : function(isReset){
+        Ext.chart.Chart.superclass.onSwfReady.call(this, isReset);
+        this.swf.setType(this.type);
+
+        if(this.chartStyle){
+            this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle));
+        }
+
+        if(this.categoryNames){
+            this.setCategoryNames(this.categoryNames);
+        }
+
+        if(this.tipRenderer){
+            this.setTipRenderer(this.tipRenderer);
+        }
+        if(!isReset){
+            this.bindStore(this.store, true);
+        }
+        this.refresh.defer(10, this);
+    },
+
+    delayRefresh : function(){
+        if(!this.refreshTask){
+            this.refreshTask = new Ext.util.DelayedTask(this.refresh, this);
+        }
+        this.refreshTask.delay(this.refreshBuffer);
+    },
+
+    refresh : function(){
+        var styleChanged = false;
+        // convert the store data into something YUI charts can understand
+        var data = [], rs = this.store.data.items;
+        for(var j = 0, len = rs.length; j < len; j++){
+            data[j] = rs[j].data;
+        }
+        //make a copy of the series definitions so that we aren't
+        //editing them directly.
+        var dataProvider = [];
+        var seriesCount = 0;
+        var currentSeries = null;
+        var i = 0;
+        if(this.series){
+            seriesCount = this.series.length;
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = this.series[i];
+                var clonedSeries = {};
+                for(var prop in currentSeries){
+                    if(prop == "style" && currentSeries.style !== null){
+                        clonedSeries.style = Ext.encode(currentSeries.style);
+                        styleChanged = true;
+                        //we don't want to modify the styles again next time
+                        //so null out the style property.
+                        // this causes issues
+                        // currentSeries.style = null;
+                    } else{
+                        clonedSeries[prop] = currentSeries[prop];
+                    }
+                }
+                dataProvider.push(clonedSeries);
+            }
+        }
+
+        if(seriesCount > 0){
+            for(i = 0; i < seriesCount; i++){
+                currentSeries = dataProvider[i];
+                if(!currentSeries.type){
+                    currentSeries.type = this.type;
+                }
+                currentSeries.dataProvider = data;
+            }
+        } else{
+            dataProvider.push({type: this.type, dataProvider: data});
+        }
+        this.swf.setDataProvider(dataProvider);
+    },
+
+    createFnProxy : function(fn, old){
+        if(old){
+            delete window[old];
+        }
+        var fnName = "extFnProxy" + (++Ext.chart.Chart.PROXY_FN_ID);
+        window[fnName] = fn;
+        return fnName;
+    },
+    
+    onDestroy: function(){
+        Ext.chart.Chart.superclass.onDestroy.call(this);
+        delete window[this.tipFnName];
+    }
+});
+Ext.reg('chart', Ext.chart.Chart);
+Ext.chart.Chart.PROXY_FN_ID = 0;
+
+/**
+ * Sets the url to load the chart from. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf';
+
+/**
+ * @class Ext.chart.PieChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype piechart
+ */
+Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, {
+    type: 'pie',
+
+    onSwfReady : function(isReset){
+        Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset);
+
+        this.setDataField(this.dataField);
+        this.setCategoryField(this.categoryField);
+    },
+
+    setDataField : function(field){
+        this.dataField = field;
+        this.swf.setDataField(field);
+    },
+
+    setCategoryField : function(field){
+        this.categoryField = field;
+        this.swf.setCategoryField(field);
+    }
+});
+Ext.reg('piechart', Ext.chart.PieChart);
+
+/**
+ * @class Ext.chart.CartesianChart
+ * @extends Ext.chart.Chart
+ * @constructor
+ * @xtype cartesianchart
+ */
+Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, {
+    onSwfReady : function(isReset){
+        Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset);
+
+        if(this.xField){
+            this.setXField(this.xField);
+        }
+        if(this.yField){
+            this.setYField(this.yField);
+        }
+        if(this.xAxis){
+            this.setXAxis(this.xAxis);
+        }
+        if(this.yAxis){
+            this.setYAxis(this.yAxis);
+        }
+    },
+
+    setXField : function(value){
+        this.xField = value;
+        this.swf.setHorizontalField(value);
+    },
+
+    setYField : function(value){
+        this.yField = value;
+        this.swf.setVerticalField(value);
+    },
+
+    setXAxis : function(value){
+        this.xAxis = this.createAxis('xAxis', value);
+        this.swf.setHorizontalAxis(this.xAxis);
+    },
+
+    setYAxis : function(value){
+        this.yAxis = this.createAxis('yAxis', value);
+        this.swf.setVerticalAxis(this.yAxis);
+    },
+
+    createAxis : function(axis, value){
+        var o = Ext.apply({}, value), oldFn = null;
+        if(this[axis]){
+            oldFn = this[axis].labelFunction;
+        }
+        if(o.labelRenderer){
+            var fn = o.labelRenderer;
+            o.labelFunction = this.createFnProxy(function(v){
+                return fn(v);
+            }, oldFn);
+            delete o.labelRenderer;
+        }
+        return o;
+    }
+});
+Ext.reg('cartesianchart', Ext.chart.CartesianChart);
+
+/**
+ * @class Ext.chart.LineChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype linechart
+ */
+Ext.chart.LineChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'line'
+});
+Ext.reg('linechart', Ext.chart.LineChart);
+
+/**
+ * @class Ext.chart.ColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype columnchart
+ */
+Ext.chart.ColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'column'
+});
+Ext.reg('columnchart', Ext.chart.ColumnChart);
+
+/**
+ * @class Ext.chart.StackedColumnChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedcolumnchart
+ */
+Ext.chart.StackedColumnChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackcolumn'
+});
+Ext.reg('stackedcolumnchart', Ext.chart.StackedColumnChart);
+
+/**
+ * @class Ext.chart.BarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype barchart
+ */
+Ext.chart.BarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'bar'
+});
+Ext.reg('barchart', Ext.chart.BarChart);
+
+/**
+ * @class Ext.chart.StackedBarChart
+ * @extends Ext.chart.CartesianChart
+ * @constructor
+ * @xtype stackedbarchart
+ */
+Ext.chart.StackedBarChart = Ext.extend(Ext.chart.CartesianChart, {
+    type: 'stackbar'
+});
+Ext.reg('stackedbarchart', Ext.chart.StackedBarChart);
+
+
+
+/**
+ * @class Ext.chart.Axis
+ * Defines a CartesianChart's vertical or horizontal axis.
+ * @constructor
+ */
+Ext.chart.Axis = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.chart.Axis.prototype =
+{
+    /**
+     * The type of axis.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The direction in which the axis is drawn. May be "horizontal" or "vertical".
+     *
+     * @property orientation
+     * @type String
+     */
+    orientation: "horizontal",
+
+    /**
+     * If true, the items on the axis will be drawn in opposite direction.
+     *
+     * @property reverse
+     * @type Boolean
+     */
+    reverse: false,
+
+    /**
+     * A string reference to the globally-accessible function that may be called to
+     * determine each of the label values for this axis.
+     *
+     * @property labelFunction
+     * @type String
+     */
+    labelFunction: null,
+
+    /**
+     * If true, labels that overlap previously drawn labels on the axis will be hidden.
+     *
+     * @property hideOverlappingLabels
+     * @type Boolean
+     */
+    hideOverlappingLabels: true
+};
+
+/**
+ * @class Ext.chart.NumericAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in numeric values.
+ * @constructor
+ */
+Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, {
+    type: "numeric",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Number
+     */
+    minimum: NaN,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: NaN,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property minorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true,
+
+    /**
+     * If true, and the bounds are calculated automatically, either the minimum or
+     * maximum will be set to zero.
+     *
+     * @property alwaysShowZero
+     * @type Boolean
+     */
+    alwaysShowZero: true,
+
+    /**
+     * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
+     *
+     * @property scale
+     * @type String
+     */
+    scale: "linear"
+});
+
+/**
+ * @class Ext.chart.TimeAxis
+ * @extends Ext.chart.Axis
+ * A type of axis whose units are measured in time-based values.
+ * @constructor
+ */
+Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, {
+    type: "time",
+
+    /**
+     * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+     * will be calculated automatically.
+     *
+     * @property minimum
+     * @type Date
+     */
+    minimum: null,
+
+    /**
+     * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+     * will be calculated automatically.
+     *
+     * @property maximum
+     * @type Number
+     */
+    maximum: null,
+
+    /**
+     * The spacing between major intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    majorUnit: NaN,
+
+    /**
+     * The time unit used by the majorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    majorTimeUnit: null,
+
+    /**
+     * The spacing between minor intervals on this axis.
+     *
+     * @property majorUnit
+     * @type Number
+     */
+    minorUnit: NaN,
+
+    /**
+     * The time unit used by the minorUnit.
+     *
+     * @property majorTimeUnit
+     * @type String
+     */
+    minorTimeUnit: null,
+
+    /**
+     * If true, the labels, ticks, gridlines, and other objects will snap to
+     * the nearest major or minor unit. If false, their position will be based
+     * on the minimum value.
+     *
+     * @property snapToUnits
+     * @type Boolean
+     */
+    snapToUnits: true
+});
+
+/**
+ * @class Ext.chart.CategoryAxis
+ * @extends Ext.chart.Axis
+ * A type of axis that displays items in categories.
+ * @constructor
+ */
+Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, {
+    type: "category",
+
+    /**
+     * A list of category names to display along this axis.
+     *
+     * @property categoryNames
+     * @type Array
+     */
+    categoryNames: null
+});
+
+/**
+ * @class Ext.chart.Series
+ * Series class for the charts widget.
+ * @constructor
+ */
+Ext.chart.Series = function(config) { Ext.apply(this, config); };
+
+Ext.chart.Series.prototype =
+{
+    /**
+     * The type of series.
+     *
+     * @property type
+     * @type String
+     */
+    type: null,
+
+    /**
+     * The human-readable name of the series.
+     *
+     * @property displayName
+     * @type String
+     */
+    displayName: null
+};
+
+/**
+ * @class Ext.chart.CartesianSeries
+ * @extends Ext.chart.Series
+ * CartesianSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, {
+    /**
+     * The field used to access the x-axis value from the items from the data source.
+     *
+     * @property xField
+     * @type String
+     */
+    xField: null,
+
+    /**
+     * The field used to access the y-axis value from the items from the data source.
+     *
+     * @property yField
+     * @type String
+     */
+    yField: null
+});
+
+/**
+ * @class Ext.chart.ColumnSeries
+ * @extends Ext.chart.CartesianSeries
+ * ColumnSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.ColumnSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "column"
+});
+
+/**
+ * @class Ext.chart.LineSeries
+ * @extends Ext.chart.CartesianSeries
+ * LineSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.LineSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "line"
+});
+
+/**
+ * @class Ext.chart.BarSeries
+ * @extends Ext.chart.CartesianSeries
+ * BarSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.BarSeries = Ext.extend(Ext.chart.CartesianSeries, {
+    type: "bar"
+});
+
+
+/**
+ * @class Ext.chart.PieSeries
+ * @extends Ext.chart.Series
+ * PieSeries class for the charts widget.
+ * @constructor
+ */
+Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, {
+    type: "pie",
+    dataField: null,
+    categoryField: null
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/EventProxy.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/EventProxy.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/EventProxy.js	(revision 625)
@@ -0,0 +1,20 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.FlashProxy
+ * @singleton
+ */
+Ext.FlashEventProxy = {
+    onEvent : function(id, e){
+        var fp = Ext.getCmp(id);
+        if(fp){
+            fp.onFlashEvent(e);
+        }else{
+            arguments.callee.defer(10, this, [id, e]);
+        }
+    }
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/FlashComponent.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/FlashComponent.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/FlashComponent.js	(revision 625)
@@ -0,0 +1,117 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.FlashComponent
+ * @extends Ext.BoxComponent
+ * @constructor
+ * @xtype flash
+ */
+Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} flashVersion
+     * Indicates the version the flash content was published for. Defaults to <tt>'9.0.45'</tt>.
+     */
+    flashVersion : '9.0.45',
+
+    /**
+     * @cfg {String} backgroundColor
+     * The background color of the chart. Defaults to <tt>'#ffffff'</tt>.
+     */
+    backgroundColor: '#ffffff',
+
+    /**
+     * @cfg {String} wmode
+     * The wmode of the flash object. This can be used to control layering. Defaults to <tt>'opaque'</tt>.
+     */
+    wmode: 'opaque',
+
+    /**
+     * @cfg {String} url
+     * The URL of the chart to include. Defaults to <tt>undefined</tt>.
+     */
+    url: undefined,
+    swfId : undefined,
+    swfWidth: '100%',
+    swfHeight: '100%',
+
+    /**
+     * @cfg {Boolean} expressInstall
+     * True to prompt the user to install flash if not installed. Note that this uses
+     * Ext.FlashComponent.EXPRESS_INSTALL_URL, which should be set to the local resource. Defaults to <tt>false</tt>.
+     */
+    expressInstall: false,
+
+    initComponent : function(){
+        Ext.FlashComponent.superclass.initComponent.call(this);
+
+        this.addEvents('initialize');
+    },
+
+    onRender : function(){
+        Ext.FlashComponent.superclass.onRender.apply(this, arguments);
+
+        var params = {
+            allowScriptAccess: 'always',
+            bgcolor: this.backgroundColor,
+            wmode: this.wmode
+        }, vars = {
+            allowedDomain: document.location.hostname,
+            elementID: this.getId(),
+            eventHandler: 'Ext.FlashEventProxy.onEvent'
+        };
+
+        new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
+            this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
+
+        this.swf = Ext.getDom(this.id);
+        this.el = Ext.get(this.swf);
+    },
+
+    getSwfId : function(){
+        return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID));
+    },
+
+    getId : function(){
+        return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID));
+    },
+
+    onFlashEvent : function(e){
+        switch(e.type){
+            case "swfReady":
+                this.initSwf();
+                return;
+            case "log":
+                return;
+        }
+        e.component = this;
+        this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e);
+    },
+
+    initSwf : function(){
+        this.onSwfReady(!!this.isInitialized);
+        this.isInitialized = true;
+        this.fireEvent('initialize', this);
+    },
+
+    beforeDestroy: function(){
+        if(this.rendered){
+            swfobject.removeSWF(this.swf.id);
+        }
+        Ext.FlashComponent.superclass.beforeDestroy.call(this);
+    },
+
+    onSwfReady : Ext.emptyFn
+});
+
+/**
+ * Sets the url for installing flash if it doesn't exist. This should be set to a local resource.
+ * @static
+ * @type String
+ */
+Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';
+
+Ext.reg('flash', Ext.FlashComponent);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/swfobject.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/swfobject.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/chart/swfobject.js	(revision 625)
@@ -0,0 +1,783 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+
+var swfobject = function() {
+    
+    var UNDEF = "undefined",
+        OBJECT = "object",
+        SHOCKWAVE_FLASH = "Shockwave Flash",
+        SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+        FLASH_MIME_TYPE = "application/x-shockwave-flash",
+        EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+        ON_READY_STATE_CHANGE = "onreadystatechange",
+        
+        win = window,
+        doc = document,
+        nav = navigator,
+        
+        plugin = false,
+        domLoadFnArr = [main],
+        regObjArr = [],
+        objIdArr = [],
+        listenersArr = [],
+        storedAltContent,
+        storedAltContentId,
+        storedCallbackFn,
+        storedCallbackObj,
+        isDomLoaded = false,
+        isExpressInstallActive = false,
+        dynamicStylesheet,
+        dynamicStylesheetMedia,
+        autoHideShow = true,
+    
+    /* Centralized function for browser feature detection
+        - User agent string detection is only used when no good alternative is possible
+        - Is executed directly for optimal performance
+    */  
+    ua = function() {
+        var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+            u = nav.userAgent.toLowerCase(),
+            p = nav.platform.toLowerCase(),
+            windows = p ? /win/.test(p) : /win/.test(u),
+            mac = p ? /mac/.test(p) : /mac/.test(u),
+            webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+            ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+            playerVersion = [0,0,0],
+            d = null;
+        if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+            d = nav.plugins[SHOCKWAVE_FLASH].description;
+            if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+                plugin = true;
+                ie = false; // cascaded feature detection for Internet Explorer
+                d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+                playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+                playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+                playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+            }
+        }
+        else if (typeof win.ActiveXObject != UNDEF) {
+            try {
+                var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+                if (a) { // a will return null when ActiveX is disabled
+                    d = a.GetVariable("$version");
+                    if (d) {
+                        ie = true; // cascaded feature detection for Internet Explorer
+                        d = d.split(" ")[1].split(",");
+                        playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+            }
+            catch(e) {}
+        }
+        return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+    }(),
+    
+    /* Cross-browser onDomLoad
+        - Will fire an event as soon as the DOM of a web page is loaded
+        - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+        - Regular onload serves as fallback
+    */ 
+    onDomLoad = function() {
+        if (!ua.w3) { return; }
+        if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically 
+            callDomLoadFunctions();
+        }
+        if (!isDomLoaded) {
+            if (typeof doc.addEventListener != UNDEF) {
+                doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+            }       
+            if (ua.ie && ua.win) {
+                doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+                    if (doc.readyState == "complete") {
+                        doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+                        callDomLoadFunctions();
+                    }
+                });
+                if (win == top) { // if not inside an iframe
+                    (function(){
+                        if (isDomLoaded) { return; }
+                        try {
+                            doc.documentElement.doScroll("left");
+                        }
+                        catch(e) {
+                            setTimeout(arguments.callee, 0);
+                            return;
+                        }
+                        callDomLoadFunctions();
+                    })();
+                }
+            }
+            if (ua.wk) {
+                (function(){
+                    if (isDomLoaded) { return; }
+                    if (!/loaded|complete/.test(doc.readyState)) {
+                        setTimeout(arguments.callee, 0);
+                        return;
+                    }
+                    callDomLoadFunctions();
+                })();
+            }
+            addLoadEvent(callDomLoadFunctions);
+        }
+    }();
+    
+    function callDomLoadFunctions() {
+        if (isDomLoaded) { return; }
+        try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+            var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+            t.parentNode.removeChild(t);
+        }
+        catch (e) { return; }
+        isDomLoaded = true;
+        var dl = domLoadFnArr.length;
+        for (var i = 0; i < dl; i++) {
+            domLoadFnArr[i]();
+        }
+    }
+    
+    function addDomLoadEvent(fn) {
+        if (isDomLoaded) {
+            fn();
+        }
+        else { 
+            domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+        }
+    }
+    
+    /* Cross-browser onload
+        - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+        - Will fire an event as soon as a web page including all of its assets are loaded 
+     */
+    function addLoadEvent(fn) {
+        if (typeof win.addEventListener != UNDEF) {
+            win.addEventListener("load", fn, false);
+        }
+        else if (typeof doc.addEventListener != UNDEF) {
+            doc.addEventListener("load", fn, false);
+        }
+        else if (typeof win.attachEvent != UNDEF) {
+            addListener(win, "onload", fn);
+        }
+        else if (typeof win.onload == "function") {
+            var fnOld = win.onload;
+            win.onload = function() {
+                fnOld();
+                fn();
+            };
+        }
+        else {
+            win.onload = fn;
+        }
+    }
+    
+    /* Main function
+        - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+    */
+    function main() { 
+        if (plugin) {
+            testPlayerVersion();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Detect the Flash Player version for non-Internet Explorer browsers
+        - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+          a. Both release and build numbers can be detected
+          b. Avoid wrong descriptions by corrupt installers provided by Adobe
+          c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+        - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+    */
+    function testPlayerVersion() {
+        var b = doc.getElementsByTagName("body")[0];
+        var o = createElement(OBJECT);
+        o.setAttribute("type", FLASH_MIME_TYPE);
+        var t = b.appendChild(o);
+        if (t) {
+            var counter = 0;
+            (function(){
+                if (typeof t.GetVariable != UNDEF) {
+                    var d = t.GetVariable("$version");
+                    if (d) {
+                        d = d.split(" ")[1].split(",");
+                        ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+                    }
+                }
+                else if (counter < 10) {
+                    counter++;
+                    setTimeout(arguments.callee, 10);
+                    return;
+                }
+                b.removeChild(o);
+                t = null;
+                matchVersions();
+            })();
+        }
+        else {
+            matchVersions();
+        }
+    }
+    
+    /* Perform Flash Player and SWF version matching; static publishing only
+    */
+    function matchVersions() {
+        var rl = regObjArr.length;
+        if (rl > 0) {
+            for (var i = 0; i < rl; i++) { // for each registered object element
+                var id = regObjArr[i].id;
+                var cb = regObjArr[i].callbackFn;
+                var cbObj = {success:false, id:id};
+                if (ua.pv[0] > 0) {
+                    var obj = getElementById(id);
+                    if (obj) {
+                        if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+                            setVisibility(id, true);
+                            if (cb) {
+                                cbObj.success = true;
+                                cbObj.ref = getObjectById(id);
+                                cb(cbObj);
+                            }
+                        }
+                        else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+                            var att = {};
+                            att.data = regObjArr[i].expressInstall;
+                            att.width = obj.getAttribute("width") || "0";
+                            att.height = obj.getAttribute("height") || "0";
+                            if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+                            if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+                            // parse HTML object param element's name-value pairs
+                            var par = {};
+                            var p = obj.getElementsByTagName("param");
+                            var pl = p.length;
+                            for (var j = 0; j < pl; j++) {
+                                if (p[j].getAttribute("name").toLowerCase() != "movie") {
+                                    par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+                                }
+                            }
+                            showExpressInstall(att, par, id, cb);
+                        }
+                        else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+                            displayAltContent(obj);
+                            if (cb) { cb(cbObj); }
+                        }
+                    }
+                }
+                else {  // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+                    setVisibility(id, true);
+                    if (cb) {
+                        var o = getObjectById(id); // test whether there is an HTML object element or not
+                        if (o && typeof o.SetVariable != UNDEF) { 
+                            cbObj.success = true;
+                            cbObj.ref = o;
+                        }
+                        cb(cbObj);
+                    }
+                }
+            }
+        }
+    }
+    
+    function getObjectById(objectIdStr) {
+        var r = null;
+        var o = getElementById(objectIdStr);
+        if (o && o.nodeName == "OBJECT") {
+            if (typeof o.SetVariable != UNDEF) {
+                r = o;
+            }
+            else {
+                var n = o.getElementsByTagName(OBJECT)[0];
+                if (n) {
+                    r = n;
+                }
+            }
+        }
+        return r;
+    }
+    
+    /* Requirements for Adobe Express Install
+        - only one instance can be active at a time
+        - fp 6.0.65 or higher
+        - Win/Mac OS only
+        - no Webkit engines older than version 312
+    */
+    function canExpressInstall() {
+        return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+    }
+    
+    /* Show the Adobe Express Install dialog
+        - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+    */
+    function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+        isExpressInstallActive = true;
+        storedCallbackFn = callbackFn || null;
+        storedCallbackObj = {success:false, id:replaceElemIdStr};
+        var obj = getElementById(replaceElemIdStr);
+        if (obj) {
+            if (obj.nodeName == "OBJECT") { // static publishing
+                storedAltContent = abstractAltContent(obj);
+                storedAltContentId = null;
+            }
+            else { // dynamic publishing
+                storedAltContent = obj;
+                storedAltContentId = replaceElemIdStr;
+            }
+            att.id = EXPRESS_INSTALL_ID;
+            if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+            if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+            doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+            var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+                fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+            if (typeof par.flashvars != UNDEF) {
+                par.flashvars += "&" + fv;
+            }
+            else {
+                par.flashvars = fv;
+            }
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            if (ua.ie && ua.win && obj.readyState != 4) {
+                var newObj = createElement("div");
+                replaceElemIdStr += "SWFObjectNew";
+                newObj.setAttribute("id", replaceElemIdStr);
+                obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        obj.parentNode.removeChild(obj);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            createSWF(att, par, replaceElemIdStr);
+        }
+    }
+    
+    /* Functions to abstract and display alternative content
+    */
+    function displayAltContent(obj) {
+        if (ua.ie && ua.win && obj.readyState != 4) {
+            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+            var el = createElement("div");
+            obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+            el.parentNode.replaceChild(abstractAltContent(obj), el);
+            obj.style.display = "none";
+            (function(){
+                if (obj.readyState == 4) {
+                    obj.parentNode.removeChild(obj);
+                }
+                else {
+                    setTimeout(arguments.callee, 10);
+                }
+            })();
+        }
+        else {
+            obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+        }
+    } 
+
+    function abstractAltContent(obj) {
+        var ac = createElement("div");
+        if (ua.win && ua.ie) {
+            ac.innerHTML = obj.innerHTML;
+        }
+        else {
+            var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+            if (nestedObj) {
+                var c = nestedObj.childNodes;
+                if (c) {
+                    var cl = c.length;
+                    for (var i = 0; i < cl; i++) {
+                        if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+                            ac.appendChild(c[i].cloneNode(true));
+                        }
+                    }
+                }
+            }
+        }
+        return ac;
+    }
+    
+    /* Cross-browser dynamic SWF creation
+    */
+    function createSWF(attObj, parObj, id) {
+        var r, el = getElementById(id);
+        if (ua.wk && ua.wk < 312) { return r; }
+        if (el) {
+            if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+                attObj.id = id;
+            }
+            if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+                var att = "";
+                for (var i in attObj) {
+                    if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+                        if (i.toLowerCase() == "data") {
+                            parObj.movie = attObj[i];
+                        }
+                        else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            att += ' class="' + attObj[i] + '"';
+                        }
+                        else if (i.toLowerCase() != "classid") {
+                            att += ' ' + i + '="' + attObj[i] + '"';
+                        }
+                    }
+                }
+                var par = "";
+                for (var j in parObj) {
+                    if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+                        par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+                    }
+                }
+                el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+                objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+                r = getElementById(attObj.id);  
+            }
+            else { // well-behaving browsers
+                var o = createElement(OBJECT);
+                o.setAttribute("type", FLASH_MIME_TYPE);
+                for (var m in attObj) {
+                    if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+                        if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+                            o.setAttribute("class", attObj[m]);
+                        }
+                        else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+                            o.setAttribute(m, attObj[m]);
+                        }
+                    }
+                }
+                for (var n in parObj) {
+                    if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+                        createObjParam(o, n, parObj[n]);
+                    }
+                }
+                el.parentNode.replaceChild(o, el);
+                r = o;
+            }
+        }
+        return r;
+    }
+    
+    function createObjParam(el, pName, pValue) {
+        var p = createElement("param");
+        p.setAttribute("name", pName);  
+        p.setAttribute("value", pValue);
+        el.appendChild(p);
+    }
+    
+    /* Cross-browser SWF removal
+        - Especially needed to safely and completely remove a SWF in Internet Explorer
+    */
+    function removeSWF(id) {
+        var obj = getElementById(id);
+        if (obj && obj.nodeName == "OBJECT") {
+            if (ua.ie && ua.win) {
+                obj.style.display = "none";
+                (function(){
+                    if (obj.readyState == 4) {
+                        removeObjectInIE(id);
+                    }
+                    else {
+                        setTimeout(arguments.callee, 10);
+                    }
+                })();
+            }
+            else {
+                obj.parentNode.removeChild(obj);
+            }
+        }
+    }
+    
+    function removeObjectInIE(id) {
+        var obj = getElementById(id);
+        if (obj) {
+            for (var i in obj) {
+                if (typeof obj[i] == "function") {
+                    obj[i] = null;
+                }
+            }
+            obj.parentNode.removeChild(obj);
+        }
+    }
+    
+    /* Functions to optimize JavaScript compression
+    */
+    function getElementById(id) {
+        var el = null;
+        try {
+            el = doc.getElementById(id);
+        }
+        catch (e) {}
+        return el;
+    }
+    
+    function createElement(el) {
+        return doc.createElement(el);
+    }
+    
+    /* Updated attachEvent function for Internet Explorer
+        - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+    */  
+    function addListener(target, eventType, fn) {
+        target.attachEvent(eventType, fn);
+        listenersArr[listenersArr.length] = [target, eventType, fn];
+    }
+    
+    /* Flash Player and SWF content version matching
+    */
+    function hasPlayerVersion(rv) {
+        var pv = ua.pv, v = rv.split(".");
+        v[0] = parseInt(v[0], 10);
+        v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+        v[2] = parseInt(v[2], 10) || 0;
+        return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+    }
+    
+    /* Cross-browser dynamic CSS creation
+        - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+    */  
+    function createCSS(sel, decl, media, newStyle) {
+        if (ua.ie && ua.mac) { return; }
+        var h = doc.getElementsByTagName("head")[0];
+        if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+        var m = (media && typeof media == "string") ? media : "screen";
+        if (newStyle) {
+            dynamicStylesheet = null;
+            dynamicStylesheetMedia = null;
+        }
+        if (!dynamicStylesheet || dynamicStylesheetMedia != m) { 
+            // create dynamic stylesheet + get a global reference to it
+            var s = createElement("style");
+            s.setAttribute("type", "text/css");
+            s.setAttribute("media", m);
+            dynamicStylesheet = h.appendChild(s);
+            if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+                dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+            }
+            dynamicStylesheetMedia = m;
+        }
+        // add style rule
+        if (ua.ie && ua.win) {
+            if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+                dynamicStylesheet.addRule(sel, decl);
+            }
+        }
+        else {
+            if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+                dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+            }
+        }
+    }
+    
+    function setVisibility(id, isVisible) {
+        if (!autoHideShow) { return; }
+        var v = isVisible ? "visible" : "hidden";
+        if (isDomLoaded && getElementById(id)) {
+            getElementById(id).style.visibility = v;
+        }
+        else {
+            createCSS("#" + id, "visibility:" + v);
+        }
+    }
+
+    /* Filter to avoid XSS attacks
+    */
+    function urlEncodeIfNecessary(s) {
+        var regex = /[\\\"<>\.;]/;
+        var hasBadChars = regex.exec(s) != null;
+        return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+    }
+    
+    /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+    */
+    var cleanup = function() {
+        if (ua.ie && ua.win) {
+            window.attachEvent("onunload", function() {
+                // remove listeners to avoid memory leaks
+                var ll = listenersArr.length;
+                for (var i = 0; i < ll; i++) {
+                    listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+                }
+                // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+                var il = objIdArr.length;
+                for (var j = 0; j < il; j++) {
+                    removeSWF(objIdArr[j]);
+                }
+                // cleanup library's main closures to avoid memory leaks
+                for (var k in ua) {
+                    ua[k] = null;
+                }
+                ua = null;
+                for (var l in swfobject) {
+                    swfobject[l] = null;
+                }
+                swfobject = null;
+            });
+        }
+    }();
+    
+    return {
+        /* Public API
+            - Reference: http://code.google.com/p/swfobject/wiki/documentation
+        */ 
+        registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+            if (ua.w3 && objectIdStr && swfVersionStr) {
+                var regObj = {};
+                regObj.id = objectIdStr;
+                regObj.swfVersion = swfVersionStr;
+                regObj.expressInstall = xiSwfUrlStr;
+                regObj.callbackFn = callbackFn;
+                regObjArr[regObjArr.length] = regObj;
+                setVisibility(objectIdStr, false);
+            }
+            else if (callbackFn) {
+                callbackFn({success:false, id:objectIdStr});
+            }
+        },
+        
+        getObjectById: function(objectIdStr) {
+            if (ua.w3) {
+                return getObjectById(objectIdStr);
+            }
+        },
+        
+        embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+            var callbackObj = {success:false, id:replaceElemIdStr};
+            if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+                setVisibility(replaceElemIdStr, false);
+                addDomLoadEvent(function() {
+                    widthStr += ""; // auto-convert to string
+                    heightStr += "";
+                    var att = {};
+                    if (attObj && typeof attObj === OBJECT) {
+                        for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+                            att[i] = attObj[i];
+                        }
+                    }
+                    att.data = swfUrlStr;
+                    att.width = widthStr;
+                    att.height = heightStr;
+                    var par = {}; 
+                    if (parObj && typeof parObj === OBJECT) {
+                        for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+                            par[j] = parObj[j];
+                        }
+                    }
+                    if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+                        for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+                            if (typeof par.flashvars != UNDEF) {
+                                par.flashvars += "&" + k + "=" + flashvarsObj[k];
+                            }
+                            else {
+                                par.flashvars = k + "=" + flashvarsObj[k];
+                            }
+                        }
+                    }
+                    if (hasPlayerVersion(swfVersionStr)) { // create SWF
+                        var obj = createSWF(att, par, replaceElemIdStr);
+                        if (att.id == replaceElemIdStr) {
+                            setVisibility(replaceElemIdStr, true);
+                        }
+                        callbackObj.success = true;
+                        callbackObj.ref = obj;
+                    }
+                    else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+                        att.data = xiSwfUrlStr;
+                        showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+                        return;
+                    }
+                    else { // show alternative content
+                        setVisibility(replaceElemIdStr, true);
+                    }
+                    if (callbackFn) { callbackFn(callbackObj); }
+                });
+            }
+            else if (callbackFn) { callbackFn(callbackObj); }
+        },
+        
+        switchOffAutoHideShow: function() {
+            autoHideShow = false;
+        },
+        
+        ua: ua,
+        
+        getFlashPlayerVersion: function() {
+            return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+        },
+        
+        hasFlashPlayerVersion: hasPlayerVersion,
+        
+        createSWF: function(attObj, parObj, replaceElemIdStr) {
+            if (ua.w3) {
+                return createSWF(attObj, parObj, replaceElemIdStr);
+            }
+            else {
+                return undefined;
+            }
+        },
+        
+        showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+            if (ua.w3 && canExpressInstall()) {
+                showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+            }
+        },
+        
+        removeSWF: function(objElemIdStr) {
+            if (ua.w3) {
+                removeSWF(objElemIdStr);
+            }
+        },
+        
+        createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+            if (ua.w3) {
+                createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+            }
+        },
+        
+        addDomLoadEvent: addDomLoadEvent,
+        
+        addLoadEvent: addLoadEvent,
+        
+        getQueryParamValue: function(param) {
+            var q = doc.location.search || doc.location.hash;
+            if (q) {
+                if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+                if (param == null) {
+                    return urlEncodeIfNecessary(q);
+                }
+                var pairs = q.split("&");
+                for (var i = 0; i < pairs.length; i++) {
+                    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+                        return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+                    }
+                }
+            }
+            return "";
+        },
+        
+        // For internal usage only
+        expressInstallCallback: function() {
+            if (isExpressInstallActive) {
+                var obj = getElementById(EXPRESS_INSTALL_ID);
+                if (obj && storedAltContent) {
+                    obj.parentNode.replaceChild(storedAltContent, obj);
+                    if (storedAltContentId) {
+                        setVisibility(storedAltContentId, true);
+                        if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+                    }
+                    if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+                }
+                isExpressInstallActive = false;
+            } 
+        }
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Action.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Action.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Action.js	(revision 625)
@@ -0,0 +1,626 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Action
+ * <p>The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * the Form needs to perform an action such as submit or load. The Configuration options
+ * listed for this class are set through the Form's action methods: {@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}</p>
+ * <p>The instance of Action which performed the action is passed to the success
+ * and failure callbacks of the Form's action methods ({@link Ext.form.BasicForm#submit submit},
+ * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}),
+ * and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and
+ * {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers.</p>
+ */
+Ext.form.Action = function(form, options){
+    this.form = form;
+    this.options = options || {};
+};
+
+/**
+ * Failure type returned when client side validation of the Form fails
+ * thus aborting a submit action. Client side validation is performed unless
+ * {@link #clientValidation} is explicitly set to <tt>false</tt>.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CLIENT_INVALID = 'client';
+/**
+ * <p>Failure type returned when server side processing fails and the {@link #result}'s
+ * <tt style="font-weight:bold">success</tt> property is set to <tt>false</tt>.</p>
+ * <p>In the case of a form submission, field-specific error messages may be returned in the
+ * {@link #result}'s <tt style="font-weight:bold">errors</tt> property.</p>
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.SERVER_INVALID = 'server';
+/**
+ * Failure type returned when a communication error happens when attempting
+ * to send a request to the remote server. The {@link #response} may be examined to
+ * provide further information.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.CONNECT_FAILURE = 'connect';
+/**
+ * Failure type returned when the response's <tt style="font-weight:bold">success</tt>
+ * property is set to <tt>false</tt>, or no field values are returned in the response's
+ * <tt style="font-weight:bold">data</tt> property.
+ * @type {String}
+ * @static
+ */
+Ext.form.Action.LOAD_FAILURE = 'load';
+
+Ext.form.Action.prototype = {
+/**
+ * @cfg {String} url The URL that the Action is to invoke.
+ */
+/**
+ * @cfg {Boolean} reset When set to <tt><b>true</b></tt>, causes the Form to be
+ * {@link Ext.form.BasicForm.reset reset} on Action success. If specified, this happens
+ * <b>before</b> the {@link #success} callback is called and before the Form's
+ * {@link Ext.form.BasicForm.actioncomplete actioncomplete} event fires.
+ */
+/**
+ * @cfg {String} method The HTTP method to use to access the requested URL. Defaults to the
+ * {@link Ext.form.BasicForm}'s method, or if that is not specified, the underlying DOM form's method.
+ */
+/**
+ * @cfg {Mixed} params <p>Extra parameter values to pass. These are added to the Form's
+ * {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form's
+ * input fields.</p>
+ * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+ */
+/**
+ * @cfg {Number} timeout The number of seconds to wait for a server response before
+ * failing with the {@link #failureType} as {@link #Action.CONNECT_FAILURE}. If not specified,
+ * defaults to the configured <tt>{@link Ext.form.BasicForm#timeout timeout}</tt> of the
+ * {@link Ext.form.BasicForm form}.
+ */
+/**
+ * @cfg {Function} success The function to call when a valid success return packet is recieved.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Function} failure The function to call when a failure packet was recieved, or when an
+ * error ocurred in the Ajax communication.
+ * The function is passed the following parameters:<ul class="mdetail-params">
+ * <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+ * <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax
+ * error ocurred, the failure type will be in {@link #failureType}. The {@link #result}
+ * property of this object may be examined to perform custom postprocessing.</div></li>
+ * </ul>
+ */
+/**
+ * @cfg {Object} scope The scope in which to call the callback functions (The <tt>this</tt> reference
+ * for the callback functions).
+ */
+/**
+ * @cfg {String} waitMsg The message to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+/**
+ * @cfg {String} waitTitle The title to be displayed by a call to {@link Ext.MessageBox#wait}
+ * during the time the action is being processed.
+ */
+
+/**
+ * The type of action this Action instance performs.
+ * Currently only "submit" and "load" are supported.
+ * @type {String}
+ */
+    type : 'default',
+/**
+ * The type of failure detected will be one of these: {@link #CLIENT_INVALID},
+ * {@link #SERVER_INVALID}, {@link #CONNECT_FAILURE}, or {@link #LOAD_FAILURE}.  Usage:
+ * <pre><code>
+var fp = new Ext.form.FormPanel({
+...
+buttons: [{
+    text: 'Save',
+    formBind: true,
+    handler: function(){
+        if(fp.getForm().isValid()){
+            fp.getForm().submit({
+                url: 'form-submit.php',
+                waitMsg: 'Submitting your data...',
+                success: function(form, action){
+                    // server responded with success = true
+                    var result = action.{@link #result};
+                },
+                failure: function(form, action){
+                    if (action.{@link #failureType} === Ext.form.Action.{@link #CONNECT_FAILURE}) {
+                        Ext.Msg.alert('Error',
+                            'Status:'+action.{@link #response}.status+': '+
+                            action.{@link #response}.statusText);
+                    }
+                    if (action.failureType === Ext.form.Action.{@link #SERVER_INVALID}){
+                        // server responded with success = false
+                        Ext.Msg.alert('Invalid', action.{@link #result}.errormsg);
+                    }
+                }
+            });
+        }
+    }
+},{
+    text: 'Reset',
+    handler: function(){
+        fp.getForm().reset();
+    }
+}]
+ * </code></pre>
+ * @property failureType
+ * @type {String}
+ */
+ /**
+ * The XMLHttpRequest object used to perform the action.
+ * @property response
+ * @type {Object}
+ */
+ /**
+ * The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
+ * other, action-specific properties.
+ * @property result
+ * @type {Object}
+ */
+
+    // interface method
+    run : function(options){
+
+    },
+
+    // interface method
+    success : function(response){
+
+    },
+
+    // interface method
+    handleResponse : function(response){
+
+    },
+
+    // default connection failure
+    failure : function(response){
+        this.response = response;
+        this.failureType = Ext.form.Action.CONNECT_FAILURE;
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    // shared code among all Actions to validate that there was a response
+    // with either responseText or responseXml
+    processResponse : function(response){
+        this.response = response;
+        if(!response.responseText && !response.responseXML){
+            return true;
+        }
+        this.result = this.handleResponse(response);
+        return this.result;
+    },
+
+    // utility functions used internally
+    getUrl : function(appendParams){
+        var url = this.options.url || this.form.url || this.form.el.dom.action;
+        if(appendParams){
+            var p = this.getParams();
+            if(p){
+                url = Ext.urlAppend(url, p);
+            }
+        }
+        return url;
+    },
+
+    // private
+    getMethod : function(){
+        return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase();
+    },
+
+    // private
+    getParams : function(){
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        if(p){
+            if(typeof p == "object"){
+                p = Ext.urlEncode(Ext.applyIf(p, bp));
+            }else if(typeof p == 'string' && bp){
+                p += '&' + Ext.urlEncode(bp);
+            }
+        }else if(bp){
+            p = Ext.urlEncode(bp);
+        }
+        return p;
+    },
+
+    // private
+    createCallback : function(opts){
+        var opts = opts || {};
+        return {
+            success: this.success,
+            failure: this.failure,
+            scope: this,
+            timeout: (opts.timeout*1000) || (this.form.timeout*1000),
+            upload: this.form.fileUpload ? this.success : undefined
+        };
+    }
+};
+
+/**
+ * @class Ext.form.Action.Submit
+ * @extends Ext.form.Action
+ * <p>A class which handles submission of data from {@link Ext.form.BasicForm Form}s
+ * and processes the returned response.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#submit submit}ting.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet may contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean
+ * <div class="sub-desc">The <code>success</code> property is required.</div></li>
+ * <li><b><code>errors</code></b> property : Object
+ * <div class="sub-desc"><div class="sub-desc">The <code>errors</code> property,
+ * which is optional, contains error messages for invalid fields.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so a typical response
+ * packet may look like this:</p><pre><code>
+{
+    success: false,
+    errors: {
+        clientCode: "Client not found",
+        portOfLoading: "This field must not be null"
+    }
+}</code></pre>
+ * <p>Other data may be placed into the response for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ * <p>Alternatively, if an {@link #errorReader} is specified as an {@link Ext.data.XmlReader XmlReader}:</p><pre><code>
+    errorReader: new Ext.data.XmlReader({
+            record : 'field',
+            success: '@success'
+        }, [
+            'id', 'msg'
+        ]
+    )
+</code></pre>
+ * <p>then the results may be sent back in XML format:</p><pre><code>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;message success="false"&gt;
+&lt;errors&gt;
+    &lt;field&gt;
+        &lt;id&gt;clientCode&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Code not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+    &lt;field&gt;
+        &lt;id&gt;portOfLoading&lt;/id&gt;
+        &lt;msg&gt;&lt;![CDATA[Port not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;
+    &lt;/field&gt;
+&lt;/errors&gt;
+&lt;/message&gt;
+</code></pre>
+ * <p>Other elements may be placed into the response XML for processing by the {@link Ext.form.BasicForm}'s callback
+ * or event handler methods. The XML document is available in the {@link #errorReader}'s {@link Ext.data.XmlReader#xmlData xmlData} property.</p>
+ */
+Ext.form.Action.Submit = function(form, options){
+    Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
+};
+
+Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
+    /**
+     * @cfg {Ext.data.DataReader} errorReader <p><b>Optional. JSON is interpreted with
+     * no need for an errorReader.</b></p>
+     * <p>A Reader which reads a single record from the returned data. The DataReader's
+     * <b>success</b> property specifies how submission success is determined. The Record's
+     * data provides the error messages to apply to any invalid form Fields.</p>
+     */
+    /**
+     * @cfg {boolean} clientValidation Determines whether a Form's fields are validated
+     * in a final call to {@link Ext.form.BasicForm#isValid isValid} prior to submission.
+     * Pass <tt>false</tt> in the Form's submit options to prevent this. If not defined, pre-submission field validation
+     * is performed.
+     */
+    type : 'submit',
+
+    // private
+    run : function(){
+        var o = this.options;
+        var method = this.getMethod();
+        var isGet = method == 'GET';
+        if(o.clientValidation === false || this.form.isValid()){
+            Ext.Ajax.request(Ext.apply(this.createCallback(o), {
+                form:this.form.el.dom,
+                url:this.getUrl(isGet),
+                method: method,
+                headers: o.headers,
+                params:!isGet ? this.getParams() : null,
+                isUpload: this.form.fileUpload
+            }));
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || result.success){
+            this.form.afterAction(this, true);
+            return;
+        }
+        if(result.errors){
+            this.form.markInvalid(result.errors);
+            this.failureType = Ext.form.Action.SERVER_INVALID;
+        }
+        this.form.afterAction(this, false);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.errorReader){
+            var rs = this.form.errorReader.read(response);
+            var errors = [];
+            if(rs.records){
+                for(var i = 0, len = rs.records.length; i < len; i++) {
+                    var r = rs.records[i];
+                    errors[i] = r.data;
+                }
+            }
+            if(errors.length < 1){
+                errors = null;
+            }
+            return {
+                success : rs.success,
+                errors : errors
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+/**
+ * @class Ext.form.Action.Load
+ * @extends Ext.form.Action
+ * <p>A class which handles loading of data from a server into the Fields of an {@link Ext.form.BasicForm}.</p>
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
+ * {@link Ext.form.BasicForm#load load}ing.</p>
+ * <p><u><b>Response Packet Criteria</b></u></p>
+ * <p>A response packet <b>must</b> contain:
+ * <div class="mdetail-params"><ul>
+ * <li><b><code>success</code></b> property : Boolean</li>
+ * <li><b><code>data</code></b> property : Object</li>
+ * <div class="sub-desc">The <code>data</code> property contains the values of Fields to load.
+ * The individual value object for each Field is passed to the Field's
+ * {@link Ext.form.Field#setValue setValue} method.</div></li>
+ * </ul></div>
+ * <p><u><b>JSON Packets</b></u></p>
+ * <p>By default, response packets are assumed to be JSON, so for the following form load call:<pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    title: 'Client and routing info',
+    items: [{
+        fieldLabel: 'Client',
+        name: 'clientName'
+    }, {
+        fieldLabel: 'Port of loading',
+        name: 'portOfLoading'
+    }, {
+        fieldLabel: 'Port of discharge',
+        name: 'portOfDischarge'
+    }]
+});
+myFormPanel.{@link Ext.form.FormPanel#getForm getForm}().{@link Ext.form.BasicForm#load load}({
+    url: '/getRoutingInfo.php',
+    params: {
+        consignmentRef: myConsignmentRef
+    },
+    failure: function(form, action() {
+        Ext.Msg.alert("Load failed", action.result.errorMessage);
+    }
+});
+</code></pre>
+ * a <b>success response</b> packet may look like this:</p><pre><code>
+{
+    success: true,
+    data: {
+        clientName: "Fred. Olsen Lines",
+        portOfLoading: "FXT",
+        portOfDischarge: "OSL"
+    }
+}</code></pre>
+ * while a <b>failure response</b> packet may look like this:</p><pre><code>
+{
+    success: false,
+    errorMessage: "Consignment reference not found"
+}</code></pre>
+ * <p>Other data may be placed into the response for processing the {@link Ext.form.BasicForm Form}'s
+ * callback or event handler methods. The object decoded from this JSON is available in the
+ * {@link Ext.form.Action#result result} property.</p>
+ */
+Ext.form.Action.Load = function(form, options){
+    Ext.form.Action.Load.superclass.constructor.call(this, form, options);
+    this.reader = this.form.reader;
+};
+
+Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
+    // private
+    type : 'load',
+
+    // private
+    run : function(){
+        Ext.Ajax.request(Ext.apply(
+                this.createCallback(this.options), {
+                    method:this.getMethod(),
+                    url:this.getUrl(false),
+                    headers: this.options.headers,
+                    params:this.getParams()
+        }));
+    },
+
+    // private
+    success : function(response){
+        var result = this.processResponse(response);
+        if(result === true || !result.success || !result.data){
+            this.failureType = Ext.form.Action.LOAD_FAILURE;
+            this.form.afterAction(this, false);
+            return;
+        }
+        this.form.clearInvalid();
+        this.form.setValues(result.data);
+        this.form.afterAction(this, true);
+    },
+
+    // private
+    handleResponse : function(response){
+        if(this.form.reader){
+            var rs = this.form.reader.read(response);
+            var data = rs.records && rs.records[0] ? rs.records[0].data : null;
+            return {
+                success : rs.success,
+                data : data
+            };
+        }
+        return Ext.decode(response.responseText);
+    }
+});
+
+
+
+/**
+ * @class Ext.form.Action.DirectLoad
+ * @extends Ext.form.Action.Load
+ * Provides Ext.direct support for loading form data. This example illustrates usage
+ * of Ext.Direct to load a submit a form through Ext.Direct.
+ * <pre><code>
+var myFormPanel = new Ext.form.FormPanel({
+    // configs for FormPanel
+    title: 'Basic Information',
+    border: false,
+    padding: 10,
+    buttons:[{
+        text: 'Submit',
+        handler: function(){
+            basicInfo.getForm().submit({
+                params: {
+                    uid: 5
+                }
+            });
+        }
+    }],
+    
+    // configs apply to child items
+    defaults: {anchor: '100%'},
+    defaultType: 'textfield',
+    items: [
+        // form fields go here
+    ],
+    
+    // configs for BasicForm
+    api: {
+        load: Profile.getBasicInfo,
+        // The server-side must mark the submit handler as a 'formHandler'
+        submit: Profile.updateBasicInfo
+    },    
+    paramOrder: ['uid']
+});
+
+// load the form
+myFormPanel.getForm().load({
+    params: {
+        uid: 5
+    }
+});
+ * </code></pre>
+ */
+Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, {
+    constructor: function(form, opts) {        
+        Ext.form.Action.DirectLoad.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directload',
+    
+    run : function(){
+        var args = this.getParams();
+        args.push(this.success, this);                
+        this.form.api.load.apply(window, args);
+    },
+    
+    getParams: function() {
+        var buf = [], o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        var paramOrder = this.form.paramOrder;
+        if(paramOrder){
+            for(var i = 0, len = paramOrder.length; i < len; i++){
+                buf.push(o[paramOrder[i]]);
+            }
+        }else if(this.form.paramsAsHash){
+            buf.push(o);
+        }
+        return buf;
+    },
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+/**
+ * @class Ext.form.Action.DirectSubmit
+ * @extends Ext.form.Action.Submit
+ * Provides Ext.direct support for submitting form data.
+ * See {@link Ext.form.Action.DirectLoad}.
+ */
+Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, {
+    constructor: function(form, opts) {
+        Ext.form.Action.DirectSubmit.superclass.constructor.call(this, form, opts);
+    },
+    type: 'directsubmit',
+    // override of Submit
+    run : function(){
+        var o = this.options;
+        if(o.clientValidation === false || this.form.isValid()){
+            // tag on any additional params to be posted in the
+            // form scope
+            this.success.params = this.getParams();
+            this.form.api.submit(this.form.el.dom, this.success, this);
+        }else if (o.clientValidation !== false){ // client validation failed
+            this.failureType = Ext.form.Action.CLIENT_INVALID;
+            this.form.afterAction(this, false);
+        }
+    },
+    
+    getParams: function() {
+        var o = {};
+        var bp = this.form.baseParams;
+        var p = this.options.params;
+        Ext.apply(o, p, bp);
+        return o;
+    },    
+    // Direct actions have already been processed and therefore
+    // we can directly set the result; Direct Actions do not have
+    // a this.response property.
+    processResponse: function(result) {
+        this.result = result;
+        return result;          
+    }
+});
+
+
+Ext.form.Action.ACTION_TYPES = {
+    'load' : Ext.form.Action.Load,
+    'submit' : Ext.form.Action.Submit,
+    'directload': Ext.form.Action.DirectLoad,
+    'directsubmit': Ext.form.Action.DirectSubmit
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/BasicForm.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/BasicForm.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/BasicForm.js	(revision 625)
@@ -0,0 +1,735 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.BasicForm
+ * @extends Ext.util.Observable
+ * <p>Encapsulates the DOM &lt;form> element at the heart of the {@link Ext.form.FormPanel FormPanel} class, and provides
+ * input field management, validation, submission, and form loading services.</p>
+ * <p>By default, Ext Forms are submitted through Ajax, using an instance of {@link Ext.form.Action.Submit}.
+ * To enable normal browser submission of an Ext Form, use the {@link #standardSubmit} config option.</p>
+ * <p><b><u>File Uploads</u></b></p>
+ * <p>{@link #fileUpload File uploads} are not performed using Ajax submission, that
+ * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
+ * manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
+ * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+ * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+ * but removed after the return data has been gathered.</p>
+ * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+ * server is using JSON to send the return object, then the
+ * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+ * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+ * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+ * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+ * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+ * is created containing a <tt>responseText</tt> property in order to conform to the
+ * requirements of event handlers and callbacks.</p>
+ * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+ * and some server technologies (notably JEE) may require some custom processing in order to
+ * retrieve parameter names and parameter values from the packet content.</p>
+ * @constructor
+ * @param {Mixed} el The form element or its id
+ * @param {Object} config Configuration options
+ */
+Ext.form.BasicForm = function(el, config){
+    Ext.apply(this, config);
+    if(Ext.isString(this.paramOrder)){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+    /*
+     * @property items
+     * A {@link Ext.util.MixedCollection MixedCollection) containing all the Ext.form.Fields in this form.
+     * @type MixedCollection
+     */
+    this.items = new Ext.util.MixedCollection(false, function(o){
+        return o.itemId || o.id || (o.id = Ext.id());
+    });
+    this.addEvents(
+        /**
+         * @event beforeaction
+         * Fires before any action is performed. Return false to cancel the action.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} to be performed
+         */
+        'beforeaction',
+        /**
+         * @event actionfailed
+         * Fires when an action fails.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that failed
+         */
+        'actionfailed',
+        /**
+         * @event actioncomplete
+         * Fires when an action is completed.
+         * @param {Form} this
+         * @param {Action} action The {@link Ext.form.Action} that completed
+         */
+        'actioncomplete'
+    );
+
+    if(el){
+        this.initEl(el);
+    }
+    Ext.form.BasicForm.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.form.BasicForm, Ext.util.Observable, {
+    /**
+     * @cfg {String} method
+     * The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
+     */
+    /**
+     * @cfg {DataReader} reader
+     * An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read
+     * data when executing 'load' actions. This is optional as there is built-in
+     * support for processing JSON.  For additional information on using an XMLReader
+     * see the example provided in examples/form/xml-form.html.
+     */
+    /**
+     * @cfg {DataReader} errorReader
+     * <p>An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to
+     * read field error messages returned from 'submit' actions. This is optional
+     * as there is built-in support for processing JSON.</p>
+     * <p>The Records which provide messages for the invalid Fields must use the
+     * Field name (or id) as the Record ID, and must contain a field called 'msg'
+     * which contains the error message.</p>
+     * <p>The errorReader does not have to be a full-blown implementation of a
+     * DataReader. It simply needs to implement a <tt>read(xhr)</tt> function
+     * which returns an Array of Records in an object with the following
+     * structure:</p><pre><code>
+{
+    records: recordArray
+}
+</code></pre>
+     */
+    /**
+     * @cfg {String} url
+     * The URL to use for form actions if one isn't supplied in the
+     * <code>{@link #doAction doAction} options</code>.
+     */
+    /**
+     * @cfg {Boolean} fileUpload
+     * Set to true if this form is a file upload.
+     * <p>File uploads are not performed using normal 'Ajax' techniques, that is they are <b>not</b>
+     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
+     * DOM <tt>&lt;form></tt> element temporarily modified to have its
+     * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
+     * to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
+     * but removed after the return data has been gathered.</p>
+     * <p>The server response is parsed by the browser to create the document for the IFRAME. If the
+     * server is using JSON to send the return object, then the
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
+     * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
+     * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
+     * "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
+     * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object
+     * is created containing a <tt>responseText</tt> property in order to conform to the
+     * requirements of event handlers and callbacks.</p>
+     * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
+     * and some server technologies (notably JEE) may require some custom processing in order to
+     * retrieve parameter names and parameter values from the packet content.</p>
+     */
+    /**
+     * @cfg {Object} baseParams
+     * <p>Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
+     */
+    /**
+     * @cfg {Number} timeout Timeout for form actions in seconds (default is 30 seconds).
+     */
+    timeout: 30,
+
+    /**
+     * @cfg {Object} api (Optional) If specified load and submit actions will be handled
+     * with {@link Ext.form.Action.DirectLoad} and {@link Ext.form.Action.DirectSubmit}.
+     * Methods which have been imported by Ext.Direct can be specified here to load and submit
+     * forms.
+     * Such as the following:<pre><code>
+api: {
+    load: App.ss.MyProfile.load,
+    submit: App.ss.MyProfile.submit
+}
+</code></pre>
+     * <p>Load actions can use <code>{@link #paramOrder}</code> or <code>{@link #paramsAsHash}</code>
+     * to customize how the load method is invoked.
+     * Submit actions will always use a standard form submit. The formHandler configuration must
+     * be set on the associated server-side method which has been imported by Ext.Direct</p>
+     */
+
+    /**
+     * @cfg {Array/String} paramOrder <p>A list of params to be executed server side.
+     * Defaults to <tt>undefined</tt>. Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration.</p>
+     * <br><p>Specify the params in the order in which they must be executed on the
+     * server-side as either (1) an Array of String values, or (2) a String of params
+     * delimited by either whitespace, comma, or pipe. For example,
+     * any of the following would be acceptable:</p><pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used for the <code>{@link #api}</code>
+     * <code>load</code> configuration. Send parameters as a collection of named
+     * arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+
+    // private
+    activeAction : null,
+
+    /**
+     * @cfg {Boolean} trackResetOnLoad If set to <tt>true</tt>, {@link #reset}() resets to the last loaded
+     * or {@link #setValues}() data instead of when the form was first created.  Defaults to <tt>false</tt>.
+     */
+    trackResetOnLoad : false,
+
+    /**
+     * @cfg {Boolean} standardSubmit If set to true, standard HTML form submits are used instead of XHR (Ajax) style
+     * form submissions. (defaults to false)<br>
+     * <p><b>Note:</b> When using standardSubmit, the options to {@link #submit} are ignored because Ext's
+     * Ajax infrastracture is bypassed. To pass extra parameters (baseParams and params), you will need to
+     * create hidden fields within the form.</p>
+     * <p>The url config option is also bypassed, so set the action as well:</p>
+     * <pre><code>
+PANEL.getForm().getEl().dom.action = 'URL'
+     * </code></pre>
+     * An example encapsulating the above:
+     * <pre><code>
+new Ext.FormPanel({
+    standardSubmit: true,
+    baseParams: {
+        foo: 'bar'
+    },
+    url: 'myProcess.php',
+    items: [{
+        xtype: 'textfield',
+        name: 'userName'
+    }],
+    buttons: [{
+        text: 'Save',
+        handler: function(){
+            var O = this.ownerCt;
+            if (O.getForm().isValid()) {
+                if (O.url)
+                    O.getForm().getEl().dom.action = O.url;
+                if (O.baseParams) {
+                    for (i in O.baseParams) {
+                        O.add({
+                            xtype: 'hidden',
+                            name: i,
+                            value: O.baseParams[i]
+                        })
+                    }
+                    O.doLayout();
+                }
+                O.getForm().submit();
+            }
+        }
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
+     * element by passing it or its id or mask the form itself by passing in true.
+     * @type Mixed
+     * @property waitMsgTarget
+     */
+
+    // private
+    initEl : function(el){
+        this.el = Ext.get(el);
+        this.id = this.el.id || Ext.id();
+        if(!this.standardSubmit){
+            this.el.on('submit', this.onSubmit, this);
+        }
+        this.el.addClass('x-form');
+    },
+
+    /**
+     * Get the HTML form Element
+     * @return Ext.Element
+     */
+    getEl: function(){
+        return this.el;
+    },
+
+    // private
+    onSubmit : function(e){
+        e.stopEvent();
+    },
+
+    // private
+    destroy: function() {
+        this.items.each(function(f){
+            Ext.destroy(f);
+        });
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+        this.purgeListeners();
+    },
+
+    /**
+     * Returns true if client-side validation on the form is successful.
+     * @return Boolean
+     */
+    isValid : function(){
+        var valid = true;
+        this.items.each(function(f){
+           if(!f.validate()){
+               valid = false;
+           }
+        });
+        return valid;
+    },
+
+    /**
+     * <p>Returns true if any fields in this form have changed from their original values.</p>
+     * <p>Note that if this BasicForm was configured with {@link #trackResetOnLoad} then the
+     * Fields' <i>original values</i> are updated when the values are loaded by {@link #setValues}
+     * or {@link #loadRecord}.</p>
+     * @return Boolean
+     */
+    isDirty : function(){
+        var dirty = false;
+        this.items.each(function(f){
+           if(f.isDirty()){
+               dirty = true;
+               return false;
+           }
+        });
+        return dirty;
+    },
+
+    /**
+     * Performs a predefined action ({@link Ext.form.Action.Submit} or
+     * {@link Ext.form.Action.Load}) or a custom extension of {@link Ext.form.Action}
+     * to perform application-specific processing.
+     * @param {String/Object} actionName The name of the predefined action type,
+     * or instance of {@link Ext.form.Action} to perform.
+     * @param {Object} options (optional) The options to pass to the {@link Ext.form.Action}.
+     * All of the config options listed below are supported by both the
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * actions unless otherwise noted (custom actions could also accept
+     * other config options):<ul>
+     *
+     * <li><b>url</b> : String<div class="sub-desc">The url for the action (defaults
+     * to the form's {@link #url}.)</div></li>
+     *
+     * <li><b>method</b> : String<div class="sub-desc">The form method to use (defaults
+     * to the form's method, or POST if not defined)</div></li>
+     *
+     * <li><b>params</b> : String/Object<div class="sub-desc"><p>The params to pass
+     * (defaults to the form's baseParams, or none if not defined)</p>
+     * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
+     *
+     * <li><b>headers</b> : Object<div class="sub-desc">Request headers to set for the action
+     * (defaults to the form's default headers)</div></li>
+     *
+     * <li><b>success</b> : Function<div class="sub-desc">The callback that will
+     * be invoked after a successful response (see top of
+     * {@link Ext.form.Action.Submit submit} and {@link Ext.form.Action.Load load}
+     * for a description of what constitutes a successful response).
+     * The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>failure</b> : Function<div class="sub-desc">The callback that will be invoked after a
+     * failed transaction attempt. The function is passed the following parameters:<ul>
+     * <li><tt>form</tt> : The {@link Ext.form.BasicForm} that requested the action.</li>
+     * <li><tt>action</tt> : The {@link Ext.form.Action Action} object which performed the operation.
+     * <div class="sub-desc">The action object contains these properties of interest:<ul>
+     * <li><tt>{@link Ext.form.Action#failureType failureType}</tt></li>
+     * <li><tt>{@link Ext.form.Action#response response}</tt></li>
+     * <li><tt>{@link Ext.form.Action#result result}</tt> : interrogate for custom postprocessing</li>
+     * <li><tt>{@link Ext.form.Action#type type}</tt></li>
+     * </ul></div></li></ul></div></li>
+     *
+     * <li><b>scope</b> : Object<div class="sub-desc">The scope in which to call the
+     * callback functions (The <tt>this</tt> reference for the callback functions).</div></li>
+     *
+     * <li><b>clientValidation</b> : Boolean<div class="sub-desc">Submit Action only.
+     * Determines whether a Form's fields are validated in a final call to
+     * {@link Ext.form.BasicForm#isValid isValid} prior to submission. Set to <tt>false</tt>
+     * to prevent this. If undefined, pre-submission field validation is performed.</div></li></ul>
+     *
+     * @return {BasicForm} this
+     */
+    doAction : function(action, options){
+        if(Ext.isString(action)){
+            action = new Ext.form.Action.ACTION_TYPES[action](this, options);
+        }
+        if(this.fireEvent('beforeaction', this, action) !== false){
+            this.beforeAction(action);
+            action.run.defer(100, action);
+        }
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Submit submit action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details).<br>
+     * <p><b>Note:</b> this is ignored when using the {@link #standardSubmit} option.</p>
+     * <p>The following code:</p><pre><code>
+myFormPanel.getForm().submit({
+    clientValidation: true,
+    url: 'updateConsignment.php',
+    params: {
+        newStatus: 'delivered'
+    },
+    success: function(form, action) {
+       Ext.Msg.alert('Success', action.result.msg);
+    },
+    failure: function(form, action) {
+        switch (action.failureType) {
+            case Ext.form.Action.CLIENT_INVALID:
+                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
+                break;
+            case Ext.form.Action.CONNECT_FAILURE:
+                Ext.Msg.alert('Failure', 'Ajax communication failed');
+                break;
+            case Ext.form.Action.SERVER_INVALID:
+               Ext.Msg.alert('Failure', action.result.msg);
+       }
+    }
+});
+</code></pre>
+     * would process the following server response for a successful submission:<pre><code>
+{
+    "success":true, // note this is Boolean, not string
+    "msg":"Consignment updated"
+}
+</code></pre>
+     * and the following server response for a failed submission:<pre><code>
+{
+    "success":false, // note this is Boolean, not string
+    "msg":"You do not have permission to perform this operation"
+}
+</code></pre>
+     * @return {BasicForm} this
+     */
+    submit : function(options){
+        if(this.standardSubmit){
+            var v = this.isValid();
+            if(v){
+                this.el.dom.submit();
+            }
+            return v;
+        }
+        var submitAction = String.format('{0}submit', this.api ? 'direct' : '');
+        this.doAction(submitAction, options);
+        return this;
+    },
+
+    /**
+     * Shortcut to {@link #doAction do} a {@link Ext.form.Action.Load load action}.
+     * @param {Object} options The options to pass to the action (see {@link #doAction} for details)
+     * @return {BasicForm} this
+     */
+    load : function(options){
+        var loadAction = String.format('{0}load', this.api ? 'direct' : '');
+        this.doAction(loadAction, options);
+        return this;
+    },
+
+    /**
+     * Persists the values in this form into the passed {@link Ext.data.Record} object in a beginEdit/endEdit block.
+     * @param {Record} record The record to edit
+     * @return {BasicForm} this
+     */
+    updateRecord : function(record){
+        record.beginEdit();
+        var fs = record.fields;
+        fs.each(function(f){
+            var field = this.findField(f.name);
+            if(field){
+                record.set(f.name, field.getValue());
+            }
+        }, this);
+        record.endEdit();
+        return this;
+    },
+
+    /**
+     * Loads an {@link Ext.data.Record} into this form by calling {@link #setValues} with the
+     * {@link Ext.data.Record#data record data}.
+     * See also {@link #trackResetOnLoad}.
+     * @param {Record} record The record to load
+     * @return {BasicForm} this
+     */
+    loadRecord : function(record){
+        this.setValues(record.data);
+        return this;
+    },
+
+    // private
+    beforeAction : function(action){
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.mask(o.waitMsg, 'x-mask-loading');
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget = Ext.get(this.waitMsgTarget);
+                this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading');
+            }else{
+                Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...');
+            }
+        }
+    },
+
+    // private
+    afterAction : function(action, success){
+        this.activeAction = null;
+        var o = action.options;
+        if(o.waitMsg){
+            if(this.waitMsgTarget === true){
+                this.el.unmask();
+            }else if(this.waitMsgTarget){
+                this.waitMsgTarget.unmask();
+            }else{
+                Ext.MessageBox.updateProgress(1);
+                Ext.MessageBox.hide();
+            }
+        }
+        if(success){
+            if(o.reset){
+                this.reset();
+            }
+            Ext.callback(o.success, o.scope, [this, action]);
+            this.fireEvent('actioncomplete', this, action);
+        }else{
+            Ext.callback(o.failure, o.scope, [this, action]);
+            this.fireEvent('actionfailed', this, action);
+        }
+    },
+
+    /**
+     * Find a {@link Ext.form.Field} in this form.
+     * @param {String} id The value to search for (specify either a {@link Ext.Component#id id},
+     * {@link Ext.grid.Column#dataIndex dataIndex}, {@link Ext.form.Field#getName name or hiddenName}).
+     * @return Field
+     */
+    findField : function(id){
+        var field = this.items.get(id);
+        if(!Ext.isObject(field)){
+            this.items.each(function(f){
+                if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){
+                    field = f;
+                    return false;
+                }
+            });
+        }
+        return field || null;
+    },
+
+
+    /**
+     * Mark fields in this form invalid in bulk.
+     * @param {Array/Object} errors Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}
+     * @return {BasicForm} this
+     */
+    markInvalid : function(errors){
+        if(Ext.isArray(errors)){
+            for(var i = 0, len = errors.length; i < len; i++){
+                var fieldError = errors[i];
+                var f = this.findField(fieldError.id);
+                if(f){
+                    f.markInvalid(fieldError.msg);
+                }
+            }
+        }else{
+            var field, id;
+            for(id in errors){
+                if(!Ext.isFunction(errors[id]) && (field = this.findField(id))){
+                    field.markInvalid(errors[id]);
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * Set values for fields in this form in bulk.
+     * @param {Array/Object} values Either an array in the form:<pre><code>
+[{id:'clientName', value:'Fred. Olsen Lines'},
+ {id:'portOfLoading', value:'FXT'},
+ {id:'portOfDischarge', value:'OSL'} ]</code></pre>
+     * or an object hash of the form:<pre><code>
+{
+    clientName: 'Fred. Olsen Lines',
+    portOfLoading: 'FXT',
+    portOfDischarge: 'OSL'
+}</code></pre>
+     * @return {BasicForm} this
+     */
+    setValues : function(values){
+        if(Ext.isArray(values)){ // array of objects
+            for(var i = 0, len = values.length; i < len; i++){
+                var v = values[i];
+                var f = this.findField(v.id);
+                if(f){
+                    f.setValue(v.value);
+                    if(this.trackResetOnLoad){
+                        f.originalValue = f.getValue();
+                    }
+                }
+            }
+        }else{ // object hash
+            var field, id;
+            for(id in values){
+                if(!Ext.isFunction(values[id]) && (field = this.findField(id))){
+                    field.setValue(values[id]);
+                    if(this.trackResetOnLoad){
+                        field.originalValue = field.getValue();
+                    }
+                }
+            }
+        }
+        return this;
+    },
+
+    /**
+     * <p>Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
+     * If multiple fields exist with the same name they are returned as an array.</p>
+     * <p><b>Note:</b> The values are collected from all enabled HTML input elements within the form, <u>not</u> from
+     * the Ext Field objects. This means that all returned values are Strings (or Arrays of Strings) and that the
+     * value can potentially be the emptyText of a field.</p>
+     * @param {Boolean} asString (optional) Pass true to return the values as a string. (defaults to false, returning an Object)
+     * @return {String/Object}
+     */
+    getValues : function(asString){
+        var fs = Ext.lib.Ajax.serializeForm(this.el.dom);
+        if(asString === true){
+            return fs;
+        }
+        return Ext.urlDecode(fs);
+    },
+
+    getFieldValues : function(){
+        var o = {};
+        this.items.each(function(f){
+           o[f.getName()] = f.getValue();
+        });
+        return o;
+    },
+
+    /**
+     * Clears all invalid messages in this form.
+     * @return {BasicForm} this
+     */
+    clearInvalid : function(){
+        this.items.each(function(f){
+           f.clearInvalid();
+        });
+        return this;
+    },
+
+    /**
+     * Resets this form.
+     * @return {BasicForm} this
+     */
+    reset : function(){
+        this.items.each(function(f){
+            f.reset();
+        });
+        return this;
+    },
+
+    /**
+     * Add Ext.form Components to this form's Collection. This does not result in rendering of
+     * the passed Component, it just enables the form to validate Fields, and distribute values to
+     * Fields.
+     * <p><b>You will not usually call this function. In order to be rendered, a Field must be added
+     * to a {@link Ext.Container Container}, usually an {@link Ext.form.FormPanel FormPanel}.
+     * The FormPanel to which the field is added takes care of adding the Field to the BasicForm's
+     * collection.</b></p>
+     * @param {Field} field1
+     * @param {Field} field2 (optional)
+     * @param {Field} etc (optional)
+     * @return {BasicForm} this
+     */
+    add : function(){
+        this.items.addAll(Array.prototype.slice.call(arguments, 0));
+        return this;
+    },
+
+
+    /**
+     * Removes a field from the items collection (does NOT remove its markup).
+     * @param {Field} field
+     * @return {BasicForm} this
+     */
+    remove : function(field){
+        this.items.remove(field);
+        return this;
+    },
+
+    /**
+     * Iterates through the {@link Ext.form.Field Field}s which have been {@link #add add}ed to this BasicForm,
+     * checks them for an id attribute, and calls {@link Ext.form.Field#applyToMarkup} on the existing dom element with that id.
+     * @return {BasicForm} this
+     */
+    render : function(){
+        this.items.each(function(f){
+            if(f.isFormField && !f.rendered && document.getElementById(f.id)){ // if the element exists
+                f.applyToMarkup(f.id);
+            }
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#apply} for all fields in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyToFields : function(o){
+        this.items.each(function(f){
+           Ext.apply(f, o);
+        });
+        return this;
+    },
+
+    /**
+     * Calls {@link Ext#applyIf} for all field in this form with the passed object.
+     * @param {Object} values
+     * @return {BasicForm} this
+     */
+    applyIfToFields : function(o){
+        this.items.each(function(f){
+           Ext.applyIf(f, o);
+        });
+        return this;
+    },
+
+    callFieldMethod : function(fnName, args){
+        args = args || [];
+        this.items.each(function(f){
+            if(Ext.isFunction(f[fnName])){
+                f[fnName].apply(f, args);
+            }
+        });
+        return this;
+    }
+});
+
+// back compat
+Ext.BasicForm = Ext.form.BasicForm;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Checkbox.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Checkbox.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Checkbox.js	(revision 625)
@@ -0,0 +1,177 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Checkbox
+ * @extends Ext.form.Field
+ * Single checkbox field.  Can be used as a direct replacement for traditional checkbox fields.
+ * @constructor
+ * Creates a new Checkbox
+ * @param {Object} config Configuration options
+ * @xtype checkbox
+ */
+Ext.form.Checkbox = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined)
+     */
+    focusClass : undefined,
+    /**
+     * @cfg {String} fieldClass The default CSS class for the checkbox (defaults to 'x-form-field')
+     */
+    fieldClass : 'x-form-field',
+    /**
+     * @cfg {Boolean} checked <tt>true</tt> if the checkbox should render initially checked (defaults to <tt>false</tt>)
+     */
+    checked : false,
+    /**
+     * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
+     * {tag: 'input', type: 'checkbox', autocomplete: 'off'})
+     */
+    defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'},
+    /**
+     * @cfg {String} boxLabel The text that appears beside the checkbox
+     */
+    /**
+     * @cfg {String} inputValue The value that should go into the generated input element's value attribute
+     */
+    /**
+     * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of 
+     * handling the check event). The handler is passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>checkbox</b> : Ext.form.Checkbox<div class="sub-desc">The Checkbox being toggled.</div></li>
+     * <li><b>checked</b> : Boolean<div class="sub-desc">The new checked state of the checkbox.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope An object to use as the scope ('this' reference) of the {@link #handler} function
+     * (defaults to this Checkbox).
+     */
+
+    // private
+    actionMode : 'wrap',
+    
+	// private
+    initComponent : function(){
+        Ext.form.Checkbox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event check
+             * Fires when the checkbox is checked or unchecked.
+             * @param {Ext.form.Checkbox} this This checkbox
+             * @param {Boolean} checked The new checked value
+             */
+            'check'
+        );
+    },
+
+    // private
+    onResize : function(){
+        Ext.form.Checkbox.superclass.onResize.apply(this, arguments);
+        if(!this.boxLabel && !this.fieldLabel){
+            this.el.alignTo(this.wrap, 'c-c');
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.Checkbox.superclass.initEvents.call(this);
+        this.mon(this.el, 'click', this.onClick, this);
+        this.mon(this.el, 'change', this.onClick, this);
+    },
+
+	// private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * @hide
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking.
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        this.wrap = this.el.wrap({cls: 'x-form-check-wrap'});
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        }
+        if(this.checked){
+            this.setValue(true);
+        }else{
+            this.checked = this.el.dom.checked;
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.destroy(this.wrap);
+        Ext.form.Checkbox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    initValue : function() {
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Returns the checked state of the checkbox.
+     * @return {Boolean} True if checked, else false
+     */
+    getValue : function(){
+        if(this.rendered){
+            return this.el.dom.checked;
+        }
+        return false;
+    },
+
+	// private
+    onClick : function(){
+        if(this.el.dom.checked != this.checked){
+            this.setValue(this.el.dom.checked);
+        }
+    },
+
+    /**
+     * Sets the checked state of the checkbox, fires the 'check' event, and calls a
+     * <code>{@link #handler}</code> (if configured).
+     * @param {Boolean/String} checked The following values will check the checkbox:
+     * <code>true, 'true', '1', or 'on'</code>. Any other value will uncheck the checkbox.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var checked = this.checked ;
+        this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on');
+        if(this.rendered){
+            this.el.dom.checked = this.checked;
+            this.el.dom.defaultChecked = this.checked;
+        }
+        if(checked != this.checked){
+            this.fireEvent('check', this, this.checked);
+            if(this.handler){
+                this.handler.call(this.scope || this, this, this.checked);
+            }
+        }
+        return this;
+    }
+});
+Ext.reg('checkbox', Ext.form.Checkbox);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/CheckboxGroup.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/CheckboxGroup.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/CheckboxGroup.js	(revision 625)
@@ -0,0 +1,419 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.CheckboxGroup
+ * @extends Ext.form.Field
+ * <p>A grouping container for {@link Ext.form.Checkbox} controls.</p>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var myCheckboxGroup = new Ext.form.CheckboxGroup({
+    id:'myGroup',
+    xtype: 'checkboxgroup',
+    fieldLabel: 'Single Column',
+    itemCls: 'x-check-group-alt',
+    // Put all controls in a single column with width 100%
+    columns: 1,
+    items: [
+        {boxLabel: 'Item 1', name: 'cb-col-1'},
+        {boxLabel: 'Item 2', name: 'cb-col-2', checked: true},
+        {boxLabel: 'Item 3', name: 'cb-col-3'}
+    ]
+});
+ * </code></pre>
+ * @constructor
+ * Creates a new CheckboxGroup
+ * @param {Object} config Configuration options
+ * @xtype checkboxgroup
+ */
+Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Array} items An Array of {@link Ext.form.Checkbox Checkbox}es or Checkbox config objects
+     * to arrange in the group.
+     */
+    /**
+     * @cfg {String/Number/Array} columns Specifies the number of columns to use when displaying grouped
+     * checkbox/radio controls using automatic layout.  This config can take several types of values:
+     * <ul><li><b>'auto'</b> : <p class="sub-desc">The controls will be rendered one per column on one row and the width
+     * of each column will be evenly distributed based on the width of the overall field container. This is the default.</p></li>
+     * <li><b>Number</b> : <p class="sub-desc">If you specific a number (e.g., 3) that number of columns will be 
+     * created and the contained controls will be automatically distributed based on the value of {@link #vertical}.</p></li>
+     * <li><b>Array</b> : Object<p class="sub-desc">You can also specify an array of column widths, mixing integer
+     * (fixed width) and float (percentage width) values as needed (e.g., [100, .25, .75]). Any integer values will
+     * be rendered first, then any float values will be calculated as a percentage of the remaining space. Float
+     * values do not have to add up to 1 (100%) although if you want the controls to take up the entire field
+     * container you should do so.</p></li></ul>
+     */
+    columns : 'auto',
+    /**
+     * @cfg {Boolean} vertical True to distribute contained controls across columns, completely filling each column 
+     * top to bottom before starting on the next column.  The number of controls in each column will be automatically
+     * calculated to keep columns as even as possible.  The default value is false, so that controls will be added
+     * to columns one at a time, completely filling each row left to right before starting on the next row.
+     */
+    vertical : false,
+    /**
+     * @cfg {Boolean} allowBlank False to validate that at least one item in the group is checked (defaults to true).
+     * If no items are selected at validation time, {@link @blankText} will be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails (defaults to "You must 
+     * select at least one item in this group")
+     */
+    blankText : "You must select at least one item in this group",
+    
+    // private
+    defaultType : 'checkbox',
+    
+    // private
+    groupCls : 'x-form-check-group',
+    
+    // private
+    initComponent: function(){
+        this.addEvents(
+            /**
+             * @event change
+             * Fires when the state of a child checkbox changes.
+             * @param {Ext.form.CheckboxGroup} this
+             * @param {Array} checked An array containing the checked boxes.
+             */
+            'change'
+        );   
+        Ext.form.CheckboxGroup.superclass.initComponent.call(this);
+    },
+    
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var panelCfg = {
+                cls: this.groupCls,
+                layout: 'column',
+                border: false,
+                renderTo: ct
+            };
+            var colCfg = {
+                defaultType: this.defaultType,
+                layout: 'form',
+                border: false,
+                defaults: {
+                    hideLabel: true,
+                    anchor: '100%'
+                }
+            };
+            
+            if(this.items[0].items){
+                
+                // The container has standard ColumnLayout configs, so pass them in directly
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: this.items.length},
+                    defaults: this.defaults,
+                    items: this.items
+                });
+                for(var i=0, len=this.items.length; i<len; i++){
+                    Ext.applyIf(this.items[i], colCfg);
+                }
+                
+            }else{
+                
+                // The container has field item configs, so we have to generate the column
+                // panels first then move the items into the columns as needed.
+                
+                var numCols, cols = [];
+                
+                if(typeof this.columns == 'string'){ // 'auto' so create a col per item
+                    this.columns = this.items.length;
+                }
+                if(!Ext.isArray(this.columns)){
+                    var cs = [];
+                    for(var i=0; i<this.columns; i++){
+                        cs.push((100/this.columns)*.01); // distribute by even %
+                    }
+                    this.columns = cs;
+                }
+                
+                numCols = this.columns.length;
+                
+                // Generate the column configs with the correct width setting
+                for(var i=0; i<numCols; i++){
+                    var cc = Ext.apply({items:[]}, colCfg);
+                    cc[this.columns[i] <= 1 ? 'columnWidth' : 'width'] = this.columns[i];
+                    if(this.defaults){
+                        cc.defaults = Ext.apply(cc.defaults || {}, this.defaults)
+                    }
+                    cols.push(cc);
+                };
+                
+                // Distribute the original items into the columns
+                if(this.vertical){
+                    var rows = Math.ceil(this.items.length / numCols), ri = 0;
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        if(i>0 && i%rows==0){
+                            ri++;
+                        }
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ri].items.push(this.items[i]);
+                    };
+                }else{
+                    for(var i=0, len=this.items.length; i<len; i++){
+                        var ci = i % numCols;
+                        if(this.items[i].fieldLabel){
+                            this.items[i].hideLabel = false;
+                        }
+                        cols[ci].items.push(this.items[i]);
+                    };
+                }
+                
+                Ext.apply(panelCfg, {
+                    layoutConfig: {columns: numCols},
+                    items: cols
+                });
+            }
+            
+            this.panel = new Ext.Panel(panelCfg);
+            this.panel.ownerCt = this;
+            this.el = this.panel.getEl();
+            
+            if(this.forId && this.itemCls){
+                var l = this.el.up(this.itemCls).child('label', true);
+                if(l){
+                    l.setAttribute('htmlFor', this.forId);
+                }
+            }
+            
+            var fields = this.panel.findBy(function(c){
+                return c.isFormField;
+            }, this);
+            
+            this.items = new Ext.util.MixedCollection();
+            this.items.addAll(fields);
+        }
+        Ext.form.CheckboxGroup.superclass.onRender.call(this, ct, position);
+    },
+    
+    afterRender : function(){
+        Ext.form.CheckboxGroup.superclass.afterRender.call(this);
+        if(this.values){
+            this.setValue.apply(this, this.values);
+            delete this.values;
+        }
+        this.eachItem(function(item){
+            item.on('check', this.fireChecked, this);
+            item.inGroup = true;
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        //ugly method required to layout hidden items
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    fireChecked: function(){
+        var arr = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                arr.push(item);
+            }
+        });
+        this.fireEvent('change', this, arr);
+    },
+    
+    // private
+    validateValue : function(value){
+        if(!this.allowBlank){
+            var blank = true;
+            this.eachItem(function(f){
+                if(f.checked){
+                    return (blank = false);
+                }
+            });
+            if(blank){
+                this.markInvalid(this.blankText);
+                return false;
+            }
+        }
+        return true;
+    },
+    
+    // private
+    onDisable : function(){
+        this.eachItem(function(item){
+            item.disable();
+        });
+    },
+
+    // private
+    onEnable : function(){
+        this.eachItem(function(item){
+            item.enable();
+        });
+    },
+    
+    // private
+    doLayout: function(){
+        if(this.rendered){
+            this.panel.forceLayout = this.ownerCt.forceLayout;
+            this.panel.doLayout();
+        }
+    },
+    
+    // private
+    onResize : function(w, h){
+        this.panel.setSize(w, h);
+        this.panel.doLayout();
+    },
+    
+    // inherit docs from Field
+    reset : function(){
+        Ext.form.CheckboxGroup.superclass.reset.call(this);
+        this.eachItem(function(c){
+            if(c.reset){
+                c.reset();
+            }
+        });
+    },
+    
+    /**
+     * {@link Ext.form.Checkbox#setValue Set the value(s)} of an item or items
+     * in the group. Examples illustrating how this method may be called:
+     * <pre><code>
+// call with name and value
+myCheckboxGroup.setValue('cb-col-1', true);
+// call with an array of boolean values 
+myCheckboxGroup.setValue([true, false, false]);
+// call with an object literal specifying item:value pairs
+myCheckboxGroup.setValue({
+    'cb-col-2': false,
+    'cb-col-3': true
+});
+// use comma separated string to set items with name to true (checked)
+myCheckboxGroup.setValue('cb-col-1,cb-col-3');
+     * </code></pre>
+     * See {@link Ext.form.Checkbox#setValue} for additional information.
+     * @param {Mixed} id The checkbox to check, or as described by example shown.
+     * @param {Boolean} value (optional) The value to set the item.
+     * @return {Ext.form.CheckboxGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length == 1){
+                if(Ext.isArray(id)){
+                    //an array of boolean values
+                    Ext.each(id, function(val, idx){
+                        var item = this.items.itemAt(idx);
+                        if(item){
+                            item.setValue(val);
+                        }
+                    }, this);
+                }else if(Ext.isObject(id)){
+                    //set of name/value pairs
+                    for(var i in id){
+                        var f = this.getBox(i);
+                        if(f){
+                            f.setValue(id[i]);
+                        }
+                    }
+                }else{
+                    this.setValueForItem(id);
+                }
+            }else{
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                }
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    onDestroy: function(){
+        Ext.destroy(this.panel);
+        Ext.form.CheckboxGroup.superclass.onDestroy.call(this);
+
+    },
+    
+    setValueForItem : function(val){
+        val = String(val).split(',');
+        this.eachItem(function(item){
+            if(val.indexOf(item.inputValue)> -1){
+                item.setValue(true);
+            }
+        });
+    },
+    
+    // private
+    getBox : function(id){
+        var box = null;
+        this.eachItem(function(f){
+            if(id == f || f.dataIndex == id || f.id == id || f.getName() == id){
+                box = f;
+                return false;
+            }
+        });
+        return box;
+    },
+    
+    /**
+     * Gets an array of the selected {@link Ext.form.Checkbox} in the group.
+     * @return {Array} An array of the selected checkboxes.
+     */
+    getValue : function(){
+        var out = [];
+        this.eachItem(function(item){
+            if(item.checked){
+                out.push(item);
+            }
+        });
+        return out;
+    },
+    
+    // private
+    eachItem: function(fn){
+        if(this.items && this.items.each){
+            this.items.each(fn, this);
+        }
+    },
+    
+    /**
+     * @cfg {String} name
+     * @hide
+     */
+    /**
+     * @method initValue
+     * @hide
+     */
+    initValue : Ext.emptyFn,
+    /**
+     * @method getValue
+     * @hide
+     */
+    getValue : Ext.emptyFn,
+    /**
+     * @method getRawValue
+     * @hide
+     */
+    getRawValue : Ext.emptyFn,
+    
+    /**
+     * @method setRawValue
+     * @hide
+     */
+    setRawValue : Ext.emptyFn
+    
+});
+
+Ext.reg('checkboxgroup', Ext.form.CheckboxGroup);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Combo.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Combo.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Combo.js	(revision 625)
@@ -0,0 +1,1232 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.ComboBox
+ * @extends Ext.form.TriggerField
+ * <p>A combobox control with support for autocomplete, remote-loading, paging and many other features.</p>
+ * <p>A ComboBox works in a similar manner to a traditional HTML &lt;select> field. The difference is
+ * that to submit the {@link #valueField}, you must specify a {@link #hiddenName} to create a hidden input
+ * field to hold the value of the valueField. The <i>{@link #displayField}</i> is shown in the text field
+ * which is named according to the {@link #name}.</p>
+ * <p><b><u>Events</u></b></p>
+ * <p>To do something when something in ComboBox is selected, configure the select event:<pre><code>
+var cb = new Ext.form.ComboBox({
+    // all of your config options
+    listeners:{
+         scope: yourScope,
+         'select': yourFunction
+    }
+});
+
+// Alternatively, you can assign events after the object is created:
+var cb = new Ext.form.ComboBox(yourOptions);
+cb.on('select', yourFunction, yourScope);
+ * </code></pre></p>
+ *
+ * <p><b><u>ComboBox in Grid</u></b></p>
+ * <p>If using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a {@link Ext.grid.Column#renderer renderer}
+ * will be needed to show the displayField when the editor is not active.  Set up the renderer manually, or implement
+ * a reusable render, for example:<pre><code>
+// create reusable renderer
+Ext.util.Format.comboRenderer = function(combo){
+    return function(value){
+        var record = combo.findRecord(combo.{@link #valueField}, value);
+        return record ? record.get(combo.{@link #displayField}) : combo.{@link #valueNotFoundText};
+    }
+}
+
+// create the combo instance
+var combo = new Ext.form.ComboBox({
+    {@link #typeAhead}: true,
+    {@link #triggerAction}: 'all',
+    {@link #lazyRender}:true,
+    {@link #mode}: 'local',
+    {@link #store}: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]
+    }),
+    {@link #valueField}: 'myId',
+    {@link #displayField}: 'displayText'
+});
+
+// snippet of column model used within grid
+var cm = new Ext.grid.ColumnModel([{
+       ...
+    },{
+       header: "Some Header",
+       dataIndex: 'whatever',
+       width: 130,
+       editor: combo, // specify reference to combo instance
+       renderer: Ext.util.Format.comboRenderer(combo) // pass combo instance to reusable renderer
+    },
+    ...
+]);
+ * </code></pre></p>
+ *
+ * <p><b><u>Filtering</u></b></p>
+ * <p>A ComboBox {@link #doQuery uses filtering itself}, for information about filtering the ComboBox
+ * store manually see <tt>{@link #lastQuery}</tt>.</p>
+ * @constructor
+ * Create a new ComboBox.
+ * @param {Object} config Configuration options
+ * @xtype combo
+ */
+Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} transform The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox.
+     * Note that if you specify this and the combo is going to be in an {@link Ext.form.BasicForm} or
+     * {@link Ext.form.FormPanel}, you must also set <tt>{@link #lazyRender} = true</tt>.
+     */
+    /**
+     * @cfg {Boolean} lazyRender <tt>true</tt> to prevent the ComboBox from rendering until requested
+     * (should always be used when rendering into an {@link Ext.Editor} (e.g. {@link Ext.grid.EditorGridPanel Grids}),
+     * defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or <tt>true</tt> for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "24", autocomplete: "off"}</code></pre>
+     */
+    /**
+     * @cfg {Ext.data.Store/Array} store The data source to which this combo is bound (defaults to <tt>undefined</tt>).
+     * Acceptable values for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
+     * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
+     * <div class="mdetail-params"><ul>
+     * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
+     * A 1-dimensional array will automatically be expanded (each array item will be the combo
+     * {@link #valueField value} and {@link #displayField text})</div></li>
+     * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
+     * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
+     * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
+     * </div></li></ul></div></li></ul></div>
+     * <p>See also <tt>{@link #mode}</tt>.</p>
+     */
+    /**
+     * @cfg {String} title If supplied, a header element is created containing this text and added into the top of
+     * the dropdown list (defaults to undefined, with no header element)
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"},
+    /**
+     * @cfg {Number} listWidth The width (used as a parameter to {@link Ext.Element#setWidth}) of the dropdown
+     * list (defaults to the width of the ComboBox field).  See also <tt>{@link #minListWidth}
+     */
+    /**
+     * @cfg {String} displayField The underlying {@link Ext.data.Field#name data field name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'text'</tt> if
+     * {@link #transform transforming a select} a select).
+     * <p>See also <tt>{@link #valueField}</tt>.</p>
+     * <p><b>Note</b>: if using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a
+     * {@link Ext.grid.Column#renderer renderer} will be needed to show the displayField when the editor is not
+     * active.</p>
+     */
+    /**
+     * @cfg {String} valueField The underlying {@link Ext.data.Field#name data value name} to bind to this
+     * ComboBox (defaults to undefined if <tt>{@link #mode} = 'remote'</tt> or <tt>'value'</tt> if
+     * {@link #transform transforming a select}).
+     * <p><b>Note</b>: use of a <tt>valueField</tt> requires the user to make a selection in order for a value to be
+     * mapped.  See also <tt>{@link #hiddenName}</tt>, <tt>{@link #hiddenValue}</tt>, and <tt>{@link #displayField}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the
+     * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically
+     * post during a form submission.  See also {@link #valueField}.
+     * <p><b>Note</b>: the hidden field's id will also default to this name if {@link #hiddenId} is not specified.
+     * The ComboBox {@link Ext.Component#id id} and the <tt>{@link #hiddenId}</tt> <b>should be different</b>, since
+     * no two DOM nodes should share the same id.  So, if the ComboBox <tt>{@link Ext.form.Field#name name}</tt> and
+     * <tt>hiddenName</tt> are the same, you should specify a unique <tt>{@link #hiddenId}</tt>.</p>
+     */
+    /**
+     * @cfg {String} hiddenId If <tt>{@link #hiddenName}</tt> is specified, <tt>hiddenId</tt> can also be provided
+     * to give the hidden field a unique id (defaults to the <tt>{@link #hiddenName}</tt>).  The <tt>hiddenId</tt>
+     * and combo {@link Ext.Component#id id} should be different, since no two DOM
+     * nodes should share the same id.
+     */
+    /**
+     * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is
+     * specified to contain the selected {@link #valueField}, from the Store. Defaults to the configured
+     * <tt>{@link Ext.form.Field#value value}</tt>.
+     */
+    /**
+     * @cfg {String} listClass The CSS class to add to the predefined <tt>'x-combo-list'</tt> class
+     * applied the dropdown list element (defaults to '').
+     */
+    listClass : '',
+    /**
+     * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list
+     * (defaults to <tt>'x-combo-selected'</tt>)
+     */
+    selectedClass : 'x-combo-selected',
+    /**
+     * @cfg {String} listEmptyText The empty text to display in the data view if no items are found.
+     * (defaults to '')
+     */
+    listEmptyText: '',
+    /**
+     * @cfg {String} triggerClass An additional CSS class used to style the trigger button.  The trigger will always
+     * get the class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-arrow-trigger'</tt> which displays a downward arrow icon).
+     */
+    triggerClass : 'x-form-arrow-trigger',
+    /**
+     * @cfg {Boolean/String} shadow <tt>true</tt> or <tt>"sides"</tt> for the default effect, <tt>"frame"</tt> for
+     * 4-way shadow, and <tt>"drop"</tt> for bottom-right
+     */
+    shadow : 'sides',
+    /**
+     * @cfg {String} listAlign A valid anchor position value. See <tt>{@link Ext.Element#alignTo}</tt> for details
+     * on supported anchor positions (defaults to <tt>'tl-bl?'</tt>)
+     */
+    listAlign : 'tl-bl?',
+    /**
+     * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown
+     * (defaults to <tt>300</tt>)
+     */
+    maxHeight : 300,
+    /**
+     * @cfg {Number} minHeight The minimum height in pixels of the dropdown list when the list is constrained by its
+     * distance to the viewport edges (defaults to <tt>90</tt>)
+     */
+    minHeight : 90,
+    /**
+     * @cfg {String} triggerAction The action to execute when the trigger is clicked.
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'query'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">{@link #doQuery run the query} using the {@link Ext.form.Field#getRawValue raw value}.</p></li>
+     * <li><b><tt>'all'</tt></b> :
+     * <p class="sub-desc">{@link #doQuery run the query} specified by the <tt>{@link #allQuery}</tt> config option</p></li>
+     * </ul></div>
+     * <p>See also <code>{@link #queryParam}</code>.</p>
+     */
+    triggerAction : 'query',
+    /**
+     * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and
+     * {@link #typeAhead} activate (defaults to <tt>4</tt> if <tt>{@link #mode} = 'remote'</tt> or <tt>0</tt> if
+     * <tt>{@link #mode} = 'local'</tt>, does not apply if
+     * <tt>{@link Ext.form.TriggerField#editable editable} = false</tt>).
+     */
+    minChars : 4,
+    /**
+     * @cfg {Boolean} typeAhead <tt>true</tt> to populate and autoselect the remainder of the text being
+     * typed after a configurable delay ({@link #typeAheadDelay}) if it matches a known value (defaults
+     * to <tt>false</tt>)
+     */
+    typeAhead : false,
+    /**
+     * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and
+     * sending the query to filter the dropdown list (defaults to <tt>500</tt> if <tt>{@link #mode} = 'remote'</tt>
+     * or <tt>10</tt> if <tt>{@link #mode} = 'local'</tt>)
+     */
+    queryDelay : 500,
+    /**
+     * @cfg {Number} pageSize If greater than <tt>0</tt>, a {@link Ext.PagingToolbar} is displayed in the
+     * footer of the dropdown list and the {@link #doQuery filter queries} will execute with page start and
+     * {@link Ext.PagingToolbar#pageSize limit} parameters. Only applies when <tt>{@link #mode} = 'remote'</tt>
+     * (defaults to <tt>0</tt>).
+     */
+    pageSize : 0,
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to select any existing text in the field immediately on focus.
+     * Only applies when <tt>{@link Ext.form.TriggerField#editable editable} = true</tt> (defaults to
+     * <tt>false</tt>).
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} queryParam Name of the query ({@link Ext.data.Store#baseParam baseParam} name for the store)
+     * as it will be passed on the querystring (defaults to <tt>'query'</tt>)
+     */
+    queryParam : 'query',
+    /**
+     * @cfg {String} loadingText The text to display in the dropdown list while data is loading.  Only applies
+     * when <tt>{@link #mode} = 'remote'</tt> (defaults to <tt>'Loading...'</tt>)
+     */
+    loadingText : 'Loading...',
+    /**
+     * @cfg {Boolean} resizable <tt>true</tt> to add a resize handle to the bottom of the dropdown list
+     * (creates an {@link Ext.Resizable} with 'se' {@link Ext.Resizable#pinned pinned} handles).
+     * Defaults to <tt>false</tt>.
+     */
+    resizable : false,
+    /**
+     * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if
+     * <tt>{@link #resizable} = true</tt> (defaults to <tt>8</tt>)
+     */
+    handleHeight : 8,
+    /**
+     * @cfg {String} allQuery The text query to send to the server to return all records for the list
+     * with no filtering (defaults to '')
+     */
+    allQuery: '',
+    /**
+     * @cfg {String} mode Acceptable values are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>'remote'</tt></b> : <b>Default</b>
+     * <p class="sub-desc">Automatically loads the <tt>{@link #store}</tt> the <b>first</b> time the trigger
+     * is clicked. If you do not want the store to be automatically loaded the first time the trigger is
+     * clicked, set to <tt>'local'</tt> and manually load the store.  To force a requery of the store
+     * <b>every</b> time the trigger is clicked see <tt>{@link #lastQuery}</tt>.</p></li>
+     * <li><b><tt>'local'</tt></b> :
+     * <p class="sub-desc">ComboBox loads local data</p>
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    renderTo: document.body,
+    mode: 'local',
+    store: new Ext.data.ArrayStore({
+        id: 0,
+        fields: [
+            'myId',  // numeric value is the key
+            'displayText'
+        ],
+        data: [[1, 'item1'], [2, 'item2']]  // data is local
+    }),
+    valueField: 'myId',
+    displayField: 'displayText',
+    triggerAction: 'all'
+});
+     * </code></pre></li>
+     * </ul></div>
+     */
+    mode: 'remote',
+    /**
+     * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to <tt>70</tt>, will
+     * be ignored if <tt>{@link #listWidth}</tt> has a higher value)
+     */
+    minListWidth : 70,
+    /**
+     * @cfg {Boolean} forceSelection <tt>true</tt> to restrict the selected value to one of the values in the list,
+     * <tt>false</tt> to allow the user to set arbitrary text into the field (defaults to <tt>false</tt>)
+     */
+    forceSelection : false,
+    /**
+     * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed
+     * if <tt>{@link #typeAhead} = true</tt> (defaults to <tt>250</tt>)
+     */
+    typeAheadDelay : 250,
+    /**
+     * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in
+     * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined). If this
+     * default text is used, it means there is no value set and no validation will occur on this field.
+     */
+
+    /**
+     * @cfg {Boolean} lazyInit <tt>true</tt> to not initialize the list for this combo until the field is focused
+     * (defaults to <tt>true</tt>)
+     */
+    lazyInit : true,
+
+    /**
+     * The value of the match string used to filter the store. Delete this property to force a requery.
+     * Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'remote',
+    ...
+    listeners: {
+        // delete the previous query in the beforequery event or set
+        // combo.lastQuery = null (this will reload the store the next time it expands)
+        beforequery: function(qe){
+            delete qe.combo.lastQuery;
+        }
+    }
+});
+     * </code></pre>
+     * To make sure the filter in the store is not cleared the first time the ComboBox trigger is used
+     * configure the combo with <tt>lastQuery=''</tt>. Example use:
+     * <pre><code>
+var combo = new Ext.form.ComboBox({
+    ...
+    mode: 'local',
+    triggerAction: 'all',
+    lastQuery: ''
+});
+     * </code></pre>
+     * @property lastQuery
+     * @type String
+     */
+
+    // private
+    initComponent : function(){
+        Ext.form.ComboBox.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event expand
+             * Fires when the dropdown list is expanded
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'expand',
+            /**
+             * @event collapse
+             * Fires when the dropdown list is collapsed
+             * @param {Ext.form.ComboBox} combo This combo box
+             */
+            'collapse',
+            /**
+             * @event beforeselect
+             * Fires before a list item is selected. Return false to cancel the selection.
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'beforeselect',
+            /**
+             * @event select
+             * Fires when a list item is selected
+             * @param {Ext.form.ComboBox} combo This combo box
+             * @param {Ext.data.Record} record The data record returned from the underlying store
+             * @param {Number} index The index of the selected item in the dropdown list
+             */
+            'select',
+            /**
+             * @event beforequery
+             * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's
+             * cancel property to true.
+             * @param {Object} queryEvent An object that has these properties:<ul>
+             * <li><code>combo</code> : Ext.form.ComboBox <div class="sub-desc">This combo box</div></li>
+             * <li><code>query</code> : String <div class="sub-desc">The query</div></li>
+             * <li><code>forceAll</code> : Boolean <div class="sub-desc">True to force "all" query</div></li>
+             * <li><code>cancel</code> : Boolean <div class="sub-desc">Set to true to cancel the query</div></li>
+             * </ul>
+             */
+            'beforequery'
+        );
+        if(this.transform){
+            var s = Ext.getDom(this.transform);
+            if(!this.hiddenName){
+                this.hiddenName = s.name;
+            }
+            if(!this.store){
+                this.mode = 'local';
+                var d = [], opts = s.options;
+                for(var i = 0, len = opts.length;i < len; i++){
+                    var o = opts[i],
+                        value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text;
+                    if(o.selected && Ext.isEmpty(this.value, true)) {
+                        this.value = value;
+                    }
+                    d.push([value, o.text]);
+                }
+                this.store = new Ext.data.ArrayStore({
+                    'id': 0,
+                    fields: ['value', 'text'],
+                    data : d,
+                    autoDestroy: true
+                });
+                this.valueField = 'value';
+                this.displayField = 'text';
+            }
+            s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference
+            if(!this.lazyRender){
+                this.target = true;
+                this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate);
+                this.render(this.el.parentNode, s);
+                Ext.removeNode(s); // remove it
+            }else{
+                Ext.removeNode(s); // remove it
+            }
+        }
+        //auto-configure store from local array data
+        else if(this.store){
+            this.store = Ext.StoreMgr.lookup(this.store);
+            if(this.store.autoCreated){
+                this.displayField = this.valueField = 'field1';
+                if(!this.store.expandData){
+                    this.displayField = 'field2';
+                }
+                this.mode = 'local';
+            }
+        }
+
+        this.selectedIndex = -1;
+        if(this.mode == 'local'){
+            if(!Ext.isDefined(this.initialConfig.queryDelay)){
+                this.queryDelay = 10;
+            }
+            if(!Ext.isDefined(this.initialConfig.minChars)){
+                this.minChars = 0;
+            }
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.ComboBox.superclass.onRender.call(this, ct, position);
+        if(this.hiddenName){
+            this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName,
+                    id: (this.hiddenId||this.hiddenName)}, 'before', true);
+
+            // prevent input submission
+            this.el.dom.removeAttribute('name');
+        }
+        if(Ext.isGecko){
+            this.el.dom.setAttribute('autocomplete', 'off');
+        }
+
+        if(!this.lazyInit){
+            this.initList();
+        }else{
+            this.on('focus', this.initList, this, {single: true});
+        }
+    },
+
+    // private
+    initValue : function(){
+        Ext.form.ComboBox.superclass.initValue.call(this);
+        if(this.hiddenField){
+            this.hiddenField.value =
+                Ext.isDefined(this.hiddenValue) ? this.hiddenValue :
+                Ext.isDefined(this.value) ? this.value : '';
+        }
+    },
+
+    // private
+    initList : function(){
+        if(!this.list){
+            var cls = 'x-combo-list';
+
+            this.list = new Ext.Layer({
+                parentEl: this.getListParent(),
+                shadow: this.shadow,
+                cls: [cls, this.listClass].join(' '),
+                constrain:false
+            });
+
+            var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth);
+            this.list.setSize(lw, 0);
+            this.list.swallowEvent('mousewheel');
+            this.assetHeight = 0;
+            if(this.syncFont !== false){
+                this.list.setStyle('font-size', this.el.getStyle('font-size'));
+            }
+            if(this.title){
+                this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
+                this.assetHeight += this.header.getHeight();
+            }
+
+            this.innerList = this.list.createChild({cls:cls+'-inner'});
+            this.mon(this.innerList, 'mouseover', this.onViewOver, this);
+            this.mon(this.innerList, 'mousemove', this.onViewMove, this);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+
+            if(this.pageSize){
+                this.footer = this.list.createChild({cls:cls+'-ft'});
+                this.pageTb = new Ext.PagingToolbar({
+                    store: this.store,
+                    pageSize: this.pageSize,
+                    renderTo:this.footer
+                });
+                this.assetHeight += this.footer.getHeight();
+            }
+
+            if(!this.tpl){
+                /**
+                * @cfg {String/Ext.XTemplate} tpl <p>The template string, or {@link Ext.XTemplate} instance to
+                * use to display each item in the dropdown list. The dropdown list is displayed in a
+                * DataView. See {@link #view}.</p>
+                * <p>The default template string is:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div class="x-combo-list-item">{' + this.displayField + '}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>Override the default value to create custom UI layouts for items in the list.
+                * For example:</p><pre><code>
+                  '&lt;tpl for=".">&lt;div ext:qtip="{state}. {nick}" class="x-combo-list-item">{state}&lt;/div>&lt;/tpl>'
+                * </code></pre>
+                * <p>The template <b>must</b> contain one or more substitution parameters using field
+                * names from the Combo's</b> {@link #store Store}. In the example above an
+                * <pre>ext:qtip</pre> attribute is added to display other fields from the Store.</p>
+                * <p>To preserve the default visual look of list items, add the CSS class name
+                * <pre>x-combo-list-item</pre> to the template's container element.</p>
+                * <p>Also see {@link #itemSelector} for additional details.</p>
+                */
+                this.tpl = '<tpl for="."><div class="'+cls+'-item">{' + this.displayField + '}</div></tpl>';
+                /**
+                 * @cfg {String} itemSelector
+                 * <p>A simple CSS selector (e.g. div.some-class or span:first-child) that will be
+                 * used to determine what nodes the {@link #view Ext.DataView} which handles the dropdown
+                 * display will be working with.</p>
+                 * <p><b>Note</b>: this setting is <b>required</b> if a custom XTemplate has been
+                 * specified in {@link #tpl} which assigns a class other than <pre>'x-combo-list-item'</pre>
+                 * to dropdown list items</b>
+                 */
+            }
+
+            /**
+            * The {@link Ext.DataView DataView} used to display the ComboBox's options.
+            * @type Ext.DataView
+            */
+            this.view = new Ext.DataView({
+                applyTo: this.innerList,
+                tpl: this.tpl,
+                singleSelect: true,
+                selectedClass: this.selectedClass,
+                itemSelector: this.itemSelector || '.' + cls + '-item',
+                emptyText: this.listEmptyText
+            });
+
+            this.mon(this.view, 'click', this.onViewClick, this);
+
+            this.bindStore(this.store, true);
+
+            if(this.resizable){
+                this.resizer = new Ext.Resizable(this.list,  {
+                   pinned:true, handles:'se'
+                });
+                this.mon(this.resizer, 'resize', function(r, w, h){
+                    this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight;
+                    this.listWidth = w;
+                    this.innerList.setWidth(w - this.list.getFrameWidth('lr'));
+                    this.restrictHeight();
+                }, this);
+
+                this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px');
+            }
+        }
+    },
+
+    /**
+     * <p>Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.</p>
+     * A custom implementation may be provided as a configuration option if the floating list needs to be rendered
+     * to a different Element. An example might be rendering the list inside a Menu so that clicking
+     * the list does not hide the Menu:<pre><code>
+var store = new Ext.data.ArrayStore({
+    autoDestroy: true,
+    fields: ['initials', 'fullname'],
+    data : [
+        ['FF', 'Fred Flintstone'],
+        ['BR', 'Barney Rubble']
+    ]
+});
+
+var combo = new Ext.form.ComboBox({
+    store: store,
+    displayField: 'fullname',
+    emptyText: 'Select a name...',
+    forceSelection: true,
+    getListParent: function() {
+        return this.el.up('.x-menu');
+    },
+    iconCls: 'no-icon', //use iconCls if placing within menu to shift to right side of menu
+    mode: 'local',
+    selectOnFocus: true,
+    triggerAction: 'all',
+    typeAhead: true,
+    width: 135
+});
+
+var menu = new Ext.menu.Menu({
+    id: 'mainMenu',
+    items: [
+        combo // A Field in a Menu
+    ]
+});
+</code></pre>
+     */
+    getListParent : function() {
+        return document.body;
+    },
+
+    /**
+     * Returns the store associated with this combo.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    // private
+    bindStore : function(store, initial){
+        if(this.store && !initial){
+            this.store.un('beforeload', this.onBeforeLoad, this);
+            this.store.un('load', this.onLoad, this);
+            this.store.un('exception', this.collapse, this);
+            if(this.store !== store && this.store.autoDestroy){
+                this.store.destroy();
+            }
+            if(!store){
+                this.store = null;
+                if(this.view){
+                    this.view.bindStore(null);
+                }
+            }
+        }
+        if(store){
+            if(!initial) {
+                this.lastQuery = null;
+                if(this.pageTb) {
+                    this.pageTb.bindStore(store);
+                }
+            }
+
+            this.store = Ext.StoreMgr.lookup(store);
+            this.store.on({
+                scope: this,
+                beforeload: this.onBeforeLoad,
+                load: this.onLoad,
+                exception: this.collapse
+            });
+
+            if(this.view){
+                this.view.bindStore(store);
+            }
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.ComboBox.superclass.initEvents.call(this);
+
+        this.keyNav = new Ext.KeyNav(this.el, {
+            "up" : function(e){
+                this.inKeyMode = true;
+                this.selectPrev();
+            },
+
+            "down" : function(e){
+                if(!this.isExpanded()){
+                    this.onTriggerClick();
+                }else{
+                    this.inKeyMode = true;
+                    this.selectNext();
+                }
+            },
+
+            "enter" : function(e){
+                this.onViewClick();
+                this.delayedCheck = true;
+                this.unsetDelayCheck.defer(10, this);
+            },
+
+            "esc" : function(e){
+                this.collapse();
+            },
+
+            "tab" : function(e){
+                this.onViewClick(false);
+                return true;
+            },
+
+            scope : this,
+
+            doRelay : function(foo, bar, hname){
+                if(hname == 'down' || this.scope.isExpanded()){
+                   return Ext.KeyNav.prototype.doRelay.apply(this, arguments);
+                }
+                return true;
+            },
+
+            forceKeyDown : true
+        });
+        this.queryDelay = Math.max(this.queryDelay || 10,
+                this.mode == 'local' ? 10 : 250);
+        this.dqTask = new Ext.util.DelayedTask(this.initQuery, this);
+        if(this.typeAhead){
+            this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this);
+        }
+        if(this.editable !== false && !this.enableKeyEvents){
+            this.mon(this.el, 'keyup', this.onKeyUp, this);
+        }
+    },
+
+    // private
+    onDestroy : function(){
+        if (this.dqTask){
+            this.dqTask.cancel();
+            this.dqTask = null;
+        }
+        this.bindStore(null);
+        Ext.destroy(
+            this.resizer,
+            this.view,
+            this.pageTb,
+            this.list
+        );
+        Ext.form.ComboBox.superclass.onDestroy.call(this);
+    },
+
+    // private
+    unsetDelayCheck : function(){
+        delete this.delayedCheck;
+    },
+
+    // private
+    fireKey : function(e){
+        var fn = function(ev){
+            if (ev.isNavKeyPress() && !this.isExpanded() && !this.delayedCheck) {
+                this.fireEvent("specialkey", this, ev);
+            }
+        };
+        //For some reason I can't track down, the events fire in a different order in webkit.
+        //Need a slight delay here
+        if(this.inEditor && Ext.isWebKit && e.getKey() == e.TAB){
+            fn.defer(10, this, [new Ext.EventObjectImpl(e)]);
+        }else{
+            fn.call(this, e);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.ComboBox.superclass.onResize.apply(this, arguments);
+        if(this.list && !Ext.isDefined(this.listWidth)){
+            var lw = Math.max(w, this.minListWidth);
+            this.list.setWidth(lw);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.form.ComboBox.superclass.onEnable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = false;
+        }
+    },
+
+    // private
+    onDisable : function(){
+        Ext.form.ComboBox.superclass.onDisable.apply(this, arguments);
+        if(this.hiddenField){
+            this.hiddenField.disabled = true;
+        }
+    },
+
+    // private
+    onBeforeLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        this.innerList.update(this.loadingText ?
+               '<div class="loading-indicator">'+this.loadingText+'</div>' : '');
+        this.restrictHeight();
+        this.selectedIndex = -1;
+    },
+
+    // private
+    onLoad : function(){
+        if(!this.hasFocus){
+            return;
+        }
+        if(this.store.getCount() > 0){
+            this.expand();
+            this.restrictHeight();
+            if(this.lastQuery == this.allQuery){
+                if(this.editable){
+                    this.el.dom.select();
+                }
+                if(!this.selectByValue(this.value, true)){
+                    this.select(0, true);
+                }
+            }else{
+                this.selectNext();
+                if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){
+                    this.taTask.delay(this.typeAheadDelay);
+                }
+            }
+        }else{
+            this.onEmptyResults();
+        }
+        //this.el.focus();
+    },
+
+    // private
+    onTypeAhead : function(){
+        if(this.store.getCount() > 0){
+            var r = this.store.getAt(0);
+            var newValue = r.data[this.displayField];
+            var len = newValue.length;
+            var selStart = this.getRawValue().length;
+            if(selStart != len){
+                this.setRawValue(newValue);
+                this.selectText(selStart, newValue.length);
+            }
+        }
+    },
+
+    // private
+    onSelect : function(record, index){
+        if(this.fireEvent('beforeselect', this, record, index) !== false){
+            this.setValue(record.data[this.valueField || this.displayField]);
+            this.collapse();
+            this.fireEvent('select', this, record, index);
+        }
+    },
+
+    // inherit docs
+    getName: function(){
+        var hf = this.hiddenField;
+        return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this);
+    },
+
+    /**
+     * Returns the currently selected field value or empty string if no value is set.
+     * @return {String} value The selected value
+     */
+    getValue : function(){
+        if(this.valueField){
+            return Ext.isDefined(this.value) ? this.value : '';
+        }else{
+            return Ext.form.ComboBox.superclass.getValue.call(this);
+        }
+    },
+
+    /**
+     * Clears any text/value currently set in the field
+     */
+    clearValue : function(){
+        if(this.hiddenField){
+            this.hiddenField.value = '';
+        }
+        this.setRawValue('');
+        this.lastSelectionText = '';
+        this.applyEmptyText();
+        this.value = '';
+    },
+
+    /**
+     * Sets the specified value into the field.  If the value finds a match, the corresponding record text
+     * will be displayed in the field.  If the value does not match the data value of an existing item,
+     * and the valueNotFoundText config option is defined, it will be displayed as the default field text.
+     * Otherwise the field will be blank (although the value will still be set).
+     * @param {String} value The value to match
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        var text = v;
+        if(this.valueField){
+            var r = this.findRecord(this.valueField, v);
+            if(r){
+                text = r.data[this.displayField];
+            }else if(Ext.isDefined(this.valueNotFoundText)){
+                text = this.valueNotFoundText;
+            }
+        }
+        this.lastSelectionText = text;
+        if(this.hiddenField){
+            this.hiddenField.value = v;
+        }
+        Ext.form.ComboBox.superclass.setValue.call(this, text);
+        this.value = v;
+        return this;
+    },
+
+    // private
+    findRecord : function(prop, value){
+        var record;
+        if(this.store.getCount() > 0){
+            this.store.each(function(r){
+                if(r.data[prop] == value){
+                    record = r;
+                    return false;
+                }
+            });
+        }
+        return record;
+    },
+
+    // private
+    onViewMove : function(e, t){
+        this.inKeyMode = false;
+    },
+
+    // private
+    onViewOver : function(e, t){
+        if(this.inKeyMode){ // prevent key nav and mouse over conflicts
+            return;
+        }
+        var item = this.view.findItemFromChild(t);
+        if(item){
+            var index = this.view.indexOf(item);
+            this.select(index, false);
+        }
+    },
+
+    // private
+    onViewClick : function(doFocus){
+        var index = this.view.getSelectedIndexes()[0];
+        var r = this.store.getAt(index);
+        if(r){
+            this.onSelect(r, index);
+        }
+        if(doFocus !== false){
+            this.el.focus();
+        }
+    },
+
+    // private
+    restrictHeight : function(){
+        this.innerList.dom.style.height = '';
+        var inner = this.innerList.dom;
+        var pad = this.list.getFrameWidth('tb')+(this.resizable?this.handleHeight:0)+this.assetHeight;
+        var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight);
+        var ha = this.getPosition()[1]-Ext.getBody().getScroll().top;
+        var hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height;
+        var space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5;
+        h = Math.min(h, space, this.maxHeight);
+
+        this.innerList.setHeight(h);
+        this.list.beginUpdate();
+        this.list.setHeight(h+pad);
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.endUpdate();
+    },
+
+    // private
+    onEmptyResults : function(){
+        this.collapse();
+    },
+
+    /**
+     * Returns true if the dropdown list is expanded, else false.
+     */
+    isExpanded : function(){
+        return this.list && this.list.isVisible();
+    },
+
+    /**
+     * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {String} value The data value of the item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     * @return {Boolean} True if the value matched an item in the list, else false
+     */
+    selectByValue : function(v, scrollIntoView){
+        if(!Ext.isEmpty(v, true)){
+            var r = this.findRecord(this.valueField || this.displayField, v);
+            if(r){
+                this.select(this.store.indexOf(r), scrollIntoView);
+                return true;
+            }
+        }
+        return false;
+    },
+
+    /**
+     * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire.
+     * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
+     * @param {Number} index The zero-based index of the list item to select
+     * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
+     * selected item if it is not currently in view (defaults to true)
+     */
+    select : function(index, scrollIntoView){
+        this.selectedIndex = index;
+        this.view.select(index);
+        if(scrollIntoView !== false){
+            var el = this.view.getNode(index);
+            if(el){
+                this.innerList.scrollChildIntoView(el, false);
+            }
+        }
+    },
+
+    // private
+    selectNext : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex < ct-1){
+                this.select(this.selectedIndex+1);
+            }
+        }
+    },
+
+    // private
+    selectPrev : function(){
+        var ct = this.store.getCount();
+        if(ct > 0){
+            if(this.selectedIndex == -1){
+                this.select(0);
+            }else if(this.selectedIndex !== 0){
+                this.select(this.selectedIndex-1);
+            }
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        var k = e.getKey();
+        if(this.editable !== false && (k == e.BACKSPACE || !e.isSpecialKey())){
+            this.lastKey = k;
+            this.dqTask.delay(this.queryDelay);
+        }
+        Ext.form.ComboBox.superclass.onKeyUp.call(this, e);
+    },
+
+    // private
+    validateBlur : function(){
+        return !this.list || !this.list.isVisible();
+    },
+
+    // private
+    initQuery : function(){
+        this.doQuery(this.getRawValue());
+    },
+
+    // private
+    beforeBlur : function(){
+        var val = this.getRawValue();
+        if(this.forceSelection){
+            if(val.length > 0 && val != this.emptyText){
+               this.el.dom.value = Ext.isDefined(this.lastSelectionText) ? this.lastSelectionText : '';
+                this.applyEmptyText();
+            }else{
+                this.clearValue();
+            }
+        }else{
+            var rec = this.findRecord(this.displayField, val);
+            if(rec){
+                val = rec.get(this.valueField || this.displayField);
+            }
+            this.setValue(val);
+        }
+    },
+
+    /**
+     * Execute a query to filter the dropdown list.  Fires the {@link #beforequery} event prior to performing the
+     * query allowing the query action to be canceled if needed.
+     * @param {String} query The SQL query to execute
+     * @param {Boolean} forceAll <tt>true</tt> to force the query to execute even if there are currently fewer
+     * characters in the field than the minimum specified by the <tt>{@link #minChars}</tt> config option.  It
+     * also clears any filter previously saved in the current store (defaults to <tt>false</tt>)
+     */
+    doQuery : function(q, forceAll){
+        q = Ext.isEmpty(q) ? '' : q;
+        var qe = {
+            query: q,
+            forceAll: forceAll,
+            combo: this,
+            cancel:false
+        };
+        if(this.fireEvent('beforequery', qe)===false || qe.cancel){
+            return false;
+        }
+        q = qe.query;
+        forceAll = qe.forceAll;
+        if(forceAll === true || (q.length >= this.minChars)){
+            if(this.lastQuery !== q){
+                this.lastQuery = q;
+                if(this.mode == 'local'){
+                    this.selectedIndex = -1;
+                    if(forceAll){
+                        this.store.clearFilter();
+                    }else{
+                        this.store.filter(this.displayField, q);
+                    }
+                    this.onLoad();
+                }else{
+                    this.store.baseParams[this.queryParam] = q;
+                    this.store.load({
+                        params: this.getParams(q)
+                    });
+                    this.expand();
+                }
+            }else{
+                this.selectedIndex = -1;
+                this.onLoad();
+            }
+        }
+    },
+
+    // private
+    getParams : function(q){
+        var p = {};
+        //p[this.queryParam] = q;
+        if(this.pageSize){
+            p.start = 0;
+            p.limit = this.pageSize;
+        }
+        return p;
+    },
+
+    /**
+     * Hides the dropdown list if it is currently expanded. Fires the {@link #collapse} event on completion.
+     */
+    collapse : function(){
+        if(!this.isExpanded()){
+            return;
+        }
+        this.list.hide();
+        Ext.getDoc().un('mousewheel', this.collapseIf, this);
+        Ext.getDoc().un('mousedown', this.collapseIf, this);
+        this.fireEvent('collapse', this);
+    },
+
+    // private
+    collapseIf : function(e){
+        if(!e.within(this.wrap) && !e.within(this.list)){
+            this.collapse();
+        }
+    },
+
+    /**
+     * Expands the dropdown list if it is currently hidden. Fires the {@link #expand} event on completion.
+     */
+    expand : function(){
+        if(this.isExpanded() || !this.hasFocus){
+            return;
+        }
+        this.list.alignTo(this.wrap, this.listAlign);
+        this.list.show();
+        if(Ext.isGecko2){
+            this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac
+        }
+        Ext.getDoc().on({
+            scope: this,
+            mousewheel: this.collapseIf,
+            mousedown: this.collapseIf
+        });
+        this.fireEvent('expand', this);
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.isExpanded()){
+            this.collapse();
+            this.el.focus();
+        }else {
+            this.onFocus({});
+            if(this.triggerAction == 'all') {
+                this.doQuery(this.allQuery, true);
+            } else {
+                this.doQuery(this.getRawValue());
+            }
+            this.el.focus();
+        }
+    }
+
+    /**
+     * @hide
+     * @method autoSize
+     */
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+
+});
+Ext.reg('combo', Ext.form.ComboBox);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DateField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DateField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DateField.js	(revision 625)
@@ -0,0 +1,389 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.DateField
+ * @extends Ext.form.TriggerField
+ * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation.
+ * @constructor
+ * Create a new DateField
+ * @param {Object} config
+ * @xtype datefield
+ */
+Ext.form.DateField = Ext.extend(Ext.form.TriggerField,  {
+    /**
+     * @cfg {String} format
+     * The default date format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : "m/d/Y",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "<tt>|</tt>" to try when parsing a user input value and it
+     * does not match the defined format (defaults to
+     * <tt>'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'</tt>).
+     */
+    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",
+    /**
+     * @cfg {String} disabledDaysText
+     * The tooltip to display when the date falls on a disabled day (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDaysText : "Disabled",
+    /**
+     * @cfg {String} disabledDatesText
+     * The tooltip text to display when the date falls on a disabled date (defaults to <tt>'Disabled'</tt>)
+     */
+    disabledDatesText : "Disabled",
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before <tt>{@link #minValue}</tt> (defaults to
+     * <tt>'The date in this field must be after {minValue}'</tt>).
+     */
+    minText : "The date in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the date in the cell is after <tt>{@link #maxValue}</tt> (defaults to
+     * <tt>'The date in this field must be before {maxValue}'</tt>).
+     */
+    maxText : "The date in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the date in the field is invalid (defaults to
+     * <tt>'{value} is not a valid date - it must be in the format {format}'</tt>).
+     */
+    invalidText : "{0} is not a valid date - it must be in the format {1}",
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> and <tt>triggerClass</tt> will be <b>appended</b> if specified
+     * (defaults to <tt>'x-form-date-trigger'</tt> which displays a calendar icon).
+     */
+    triggerClass : 'x-form-date-trigger',
+    /**
+     * @cfg {Boolean} showToday
+     * <tt>false</tt> to hide the footer area of the DatePicker containing the Today button and disable
+     * the keyboard handler for spacebar that selects the current date (defaults to <tt>true</tt>).
+     */
+    showToday : true,
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed date. Can be either a Javascript date object or a string date in a
+     * valid format (defaults to null).
+     */
+    /**
+     * @cfg {Array} disabledDays
+     * An array of days to disable, 0 based (defaults to null). Some examples:<pre><code>
+// disable Sunday and Saturday:
+disabledDays:  [0, 6]
+// disable weekdays:
+disabledDays: [1,2,3,4,5]
+     * </code></pre>
+     */
+    /**
+     * @cfg {Array} disabledDates
+     * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular
+     * expression so they are very powerful. Some examples:<pre><code>
+// disable these exact dates:
+disabledDates: ["03/08/2003", "09/16/2003"]
+// disable these days for every year:
+disabledDates: ["03/08", "09/16"]
+// only match the beginning (useful if you are using short years):
+disabledDates: ["^03/08"]
+// disable every day in March 2006:
+disabledDates: ["03/../2006"]
+// disable every day in every March:
+disabledDates: ["^03"]
+     * </code></pre>
+     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
+     * In order to support regular expressions, if you are using a {@link #format date format} that has "." in
+     * it, you will have to escape the dot when restricting dates. For example: <tt>["03\\.08\\.03"]</tt>.
+     */
+    /**
+     * @cfg {String/Object} autoCreate
+     * A {@link Ext.DomHelper DomHelper element specification object}, or <tt>true</tt> for the default element
+     * specification object:<pre><code>
+     * autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
+     * </code></pre>
+     */
+
+    // private
+    defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"},
+
+    initComponent : function(){
+        Ext.form.DateField.superclass.initComponent.call(this);
+
+        this.addEvents(
+            /**
+             * @event select
+             * Fires when a date is selected via the date picker.
+             * @param {Ext.form.DateField} this
+             * @param {Date} date The date that was selected
+             */
+            'select'
+        );
+
+        if(Ext.isString(this.minValue)){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(Ext.isString(this.maxValue)){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+        this.disabledDatesRE = null;
+        this.initDisabledDays();
+    },
+
+    // private
+    initDisabledDays : function(){
+        if(this.disabledDates){
+            var dd = this.disabledDates,
+                len = dd.length - 1, 
+                re = "(?:";
+                
+            Ext.each(dd, function(d, i){
+                re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
+                if(i != len){
+                    re += '|';
+                }
+            }, this);
+            this.disabledDatesRE = new RegExp(re + ')');
+        }
+    },
+
+    /**
+     * Replaces any existing disabled dates with new values and refreshes the DatePicker.
+     * @param {Array} disabledDates An array of date strings (see the <tt>{@link #disabledDates}</tt> config
+     * for details on supported values) used to disable a pattern of dates.
+     */
+    setDisabledDates : function(dd){
+        this.disabledDates = dd;
+        this.initDisabledDays();
+        if(this.menu){
+            this.menu.picker.setDisabledDates(this.disabledDatesRE);
+        }
+    },
+
+    /**
+     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.
+     * @param {Array} disabledDays An array of disabled day indexes. See the <tt>{@link #disabledDays}</tt>
+     * config for details on supported values.
+     */
+    setDisabledDays : function(dd){
+        this.disabledDays = dd;
+        if(this.menu){
+            this.menu.picker.setDisabledDays(dd);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #minValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The minimum date that can be selected
+     */
+    setMinValue : function(dt){
+        this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMinDate(this.minValue);
+        }
+    },
+
+    /**
+     * Replaces any existing <tt>{@link #maxValue}</tt> with the new value and refreshes the DatePicker.
+     * @param {Date} value The maximum date that can be selected
+     */
+    setMaxValue : function(dt){
+        this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
+        if(this.menu){
+            this.menu.picker.setMaxDate(this.maxValue);
+        }
+    },
+
+    // private
+    validateValue : function(value){
+        value = this.formatDate(value);
+        if(!Ext.form.DateField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        var svalue = value;
+        value = this.parseDate(value);
+        if(!value){
+            this.markInvalid(String.format(this.invalidText, svalue, this.format));
+            return false;
+        }
+        var time = value.getTime();
+        if(this.minValue && time < this.minValue.getTime()){
+            this.markInvalid(String.format(this.minText, this.formatDate(this.minValue)));
+            return false;
+        }
+        if(this.maxValue && time > this.maxValue.getTime()){
+            this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue)));
+            return false;
+        }
+        if(this.disabledDays){
+            var day = value.getDay();
+            for(var i = 0; i < this.disabledDays.length; i++) {
+                if(day === this.disabledDays[i]){
+                    this.markInvalid(this.disabledDaysText);
+                    return false;
+                }
+            }
+        }
+        var fvalue = this.formatDate(value);
+        if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){
+            this.markInvalid(String.format(this.disabledDatesText, fvalue));
+            return false;
+        }
+        return true;
+    },
+
+    // private
+    // Provides logic to override the default TriggerField.validateBlur which just returns true
+    validateBlur : function(){
+        return !this.menu || !this.menu.isVisible();
+    },
+
+    /**
+     * Returns the current date value of the date field.
+     * @return {Date} The date value
+     */
+    getValue : function(){
+        return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || "";
+    },
+
+    /**
+     * Sets the value of the date field.  You can pass a date object or any string that can be
+     * parsed into a valid date, using <tt>{@link #format}</tt> as the date format, according
+     * to the same rules as {@link Date#parseDate} (the default format used is <tt>"m/d/Y"</tt>).
+     * <br />Usage:
+     * <pre><code>
+//All of these calls set the same date value (May 4, 2006)
+
+//Pass a date object:
+var dt = new Date('5/4/2006');
+dateField.setValue(dt);
+
+//Pass a date string (default format):
+dateField.setValue('05/04/2006');
+
+//Pass a date string (custom format):
+dateField.format = 'Y-m-d';
+dateField.setValue('2006-05-04');
+</code></pre>
+     * @param {String/Date} date The date or valid date string
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(date){
+        return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date)));
+    },
+
+    // private
+    parseDate : function(value){
+        if(!value || Ext.isDate(value)){
+            return value;
+        }
+        var v = Date.parseDate(value, this.format);
+        if(!v && this.altFormats){
+            if(!this.altFormatsArray){
+                this.altFormatsArray = this.altFormats.split("|");
+            }
+            for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){
+                v = Date.parseDate(value, this.altFormatsArray[i]);
+            }
+        }
+        return v;
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.menu);
+        Ext.form.DateField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    formatDate : function(date){
+        return Ext.isDate(date) ? date.dateFormat(this.format) : date;
+    },
+
+    /**
+     * @method onTriggerClick
+     * @hide
+     */
+    // private
+    // Implements the default empty TriggerField.onTriggerClick function to display the DatePicker
+    onTriggerClick : function(){
+        if(this.disabled){
+            return;
+        }
+        if(this.menu == null){
+            this.menu = new Ext.menu.DateMenu({
+                hideOnClick: false
+            });
+        }
+        this.onFocus();
+        Ext.apply(this.menu.picker,  {
+            minDate : this.minValue,
+            maxDate : this.maxValue,
+            disabledDatesRE : this.disabledDatesRE,
+            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.picker.setValue(this.getValue() || new Date());
+        this.menu.show(this.el, "tl-bl?");
+        this.menuEvents('on');
+    },
+    
+    //private
+    menuEvents: function(method){
+        this.menu[method]('select', this.onSelect, this);
+        this.menu[method]('hide', this.onMenuHide, this);
+        this.menu[method]('show', this.onFocus, this);
+    },
+    
+    onSelect: function(m, d){
+        this.setValue(d);
+        this.fireEvent('select', this, d);
+        this.menu.hide();
+    },
+    
+    onMenuHide: function(){
+        this.focus(false, 60);
+        this.menuEvents('un');
+    },
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v);
+        }
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('datefield', Ext.form.DateField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DisplayField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DisplayField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/DisplayField.js	(revision 625)
@@ -0,0 +1,98 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.DisplayField
+ * @extends Ext.form.Field
+ * A display-only text field which is not validated and not submitted.
+ * @constructor
+ * Creates a new DisplayField.
+ * @param {Object} config Configuration options
+ * @xtype displayfield
+ */
+Ext.form.DisplayField = Ext.extend(Ext.form.Field,  {
+    validationEvent : false,
+    validateOnBlur : false,
+    defaultAutoCreate : {tag: "div"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to <tt>"x-form-display-field"</tt>)
+     */
+    fieldClass : "x-form-display-field",
+    /**
+     * @cfg {Boolean} htmlEncode <tt>false</tt> to skip HTML-encoding the text when rendering it (defaults to
+     * <tt>false</tt>). This might be useful if you want to include tags in the field's innerHTML rather than
+     * rendering them as string literals per the default logic.
+     */
+    htmlEncode: false,
+
+    // private
+    initEvents : Ext.emptyFn,
+
+    isValid : function(){
+        return true;
+    },
+
+    validate : function(){
+        return true;
+    },
+
+    getRawValue : function(){
+        var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlDecode(v);
+        }
+        return v;
+    },
+
+    getValue : function(){
+        return this.getRawValue();
+    },
+    
+    getName: function() {
+        return this.name;
+    },
+
+    setRawValue : function(v){
+        if(this.htmlEncode){
+            v = Ext.util.Format.htmlEncode(v);
+        }
+        return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v);
+    },
+
+    setValue : function(v){
+        this.setRawValue(v);
+        return this;
+    }
+    /** 
+     * @cfg {String} inputType 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} disabled 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} readOnly 
+     * @hide
+     */
+    /** 
+     * @cfg {Boolean} validateOnBlur 
+     * @hide
+     */
+    /** 
+     * @cfg {Number} validationDelay 
+     * @hide
+     */
+    /** 
+     * @cfg {String/Boolean} validationEvent 
+     * @hide
+     */
+});
+
+Ext.reg('displayfield', Ext.form.DisplayField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Field.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Field.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Field.js	(revision 625)
@@ -0,0 +1,640 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Field
+ * @extends Ext.BoxComponent
+ * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
+ * @constructor
+ * Creates a new Field
+ * @param {Object} config Configuration options
+ * @xtype field
+ */
+Ext.form.Field = Ext.extend(Ext.BoxComponent,  {
+    /**
+     * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password, file (defaults
+     * to "text"). The types "file" and "password" must be used to render those field types currently -- there are
+     * no separate Ext components for those. Note that if you use <tt>inputType:'file'</tt>, {@link #emptyText}
+     * is not supported and should be avoided.
+     */
+    /**
+     * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered,
+     * not those which are built via applyTo (defaults to undefined).
+     */
+    /**
+     * @cfg {Mixed} value A value to initialize this field with (defaults to undefined).
+     */
+    /**
+     * @cfg {String} name The field's HTML name attribute (defaults to "").
+     * <b>Note</b>: this property must be set if this field is to be automatically included with
+     * {@link Ext.form.BasicForm#submit form submit()}.
+     */
+    /**
+     * @cfg {String} cls A custom CSS class to apply to the field's underlying element (defaults to "").
+     */
+
+    /**
+     * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
+     */
+    invalidClass : "x-form-invalid",
+    /**
+     * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided
+     * (defaults to "The value in this field is invalid")
+     */
+    invalidText : "The value in this field is invalid",
+    /**
+     * @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to "x-form-focus")
+     */
+    focusClass : "x-form-focus",
+    /**
+     * @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable
+      automatic validation (defaults to "keyup").
+     */
+    validationEvent : "keyup",
+    /**
+     * @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true).
+     */
+    validateOnBlur : true,
+    /**
+     * @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation
+     * is initiated (defaults to 250)
+     */
+    validationDelay : 250,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "20", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "off"},
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field")
+     */
+    fieldClass : "x-form-field",
+    /**
+     * @cfg {String} msgTarget The location where error text should display.  Should be one of the following values
+     * (defaults to 'qtip'):
+     *<pre>
+Value         Description
+-----------   ----------------------------------------------------------------------
+qtip          Display a quick tip when the user hovers over the field
+title         Display a default browser title attribute popup
+under         Add a block div beneath the field containing the error text
+side          Add an error icon to the right of the field with a popup on hover
+[element id]  Add the error text directly to the innerHTML of the specified element
+</pre>
+     */
+    msgTarget : 'qtip',
+    /**
+     * @cfg {String} msgFx <b>Experimental</b> The effect used when displaying a validation message under the field
+     * (defaults to 'normal').
+     */
+    msgFx : 'normal',
+    /**
+     * @cfg {Boolean} readOnly <tt>true</tt> to mark the field as readOnly in HTML
+     * (defaults to <tt>false</tt>).
+     * <br><p><b>Note</b>: this only sets the element's readOnly DOM attribute.
+     * Setting <code>readOnly=true</code>, for example, will not disable triggering a
+     * ComboBox or DateField; it gives you the option of forcing the user to choose
+     * via the trigger without typing in the text box. To hide the trigger use
+     * <code>{@link Ext.form.TriggerField#hideTrigger hideTrigger}</code>.</p>
+     */
+    readOnly : false,
+    /**
+     * @cfg {Boolean} disabled True to disable the field (defaults to false).
+     * <p>Be aware that conformant with the <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.12.1">HTML specification</a>,
+     * disabled Fields will not be {@link Ext.form.BasicForm#submit submitted}.</p>
+     */
+    disabled : false,
+
+    // private
+    isFormField : true,
+
+    // private
+    hasFocus : false,
+
+    // private
+    initComponent : function(){
+        Ext.form.Field.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event focus
+             * Fires when this field receives input focus.
+             * @param {Ext.form.Field} this
+             */
+            'focus',
+            /**
+             * @event blur
+             * Fires when this field loses input focus.
+             * @param {Ext.form.Field} this
+             */
+            'blur',
+            /**
+             * @event specialkey
+             * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.
+             * To handle other keys see {@link Ext.Panel#keys} or {@link Ext.KeyMap}.
+             * You can check {@link Ext.EventObject#getKey} to determine which key was pressed.
+             * For example: <pre><code>
+var form = new Ext.form.FormPanel({
+    ...
+    items: [{
+            fieldLabel: 'Field 1',
+            name: 'field1',
+            allowBlank: false
+        },{
+            fieldLabel: 'Field 2',
+            name: 'field2',
+            listeners: {
+                specialkey: function(field, e){
+                    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
+                    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
+                    if (e.{@link Ext.EventObject#getKey getKey()} == e.ENTER) {
+                        var form = field.ownerCt.getForm();
+                        form.submit();
+                    }
+                }
+            }
+        }
+    ],
+    ...
+});
+             * </code></pre>
+             * @param {Ext.form.Field} this
+             * @param {Ext.EventObject} e The event object
+             */
+            'specialkey',
+            /**
+             * @event change
+             * Fires just before the field blurs if the field value has changed.
+             * @param {Ext.form.Field} this
+             * @param {Mixed} newValue The new value
+             * @param {Mixed} oldValue The original value
+             */
+            'change',
+            /**
+             * @event invalid
+             * Fires after the field has been marked as invalid.
+             * @param {Ext.form.Field} this
+             * @param {String} msg The validation message
+             */
+            'invalid',
+            /**
+             * @event valid
+             * Fires after the field has been validated with no errors.
+             * @param {Ext.form.Field} this
+             */
+            'valid'
+        );
+    },
+
+    /**
+     * Returns the {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}
+     * attribute of the field if available.
+     * @return {String} name The field {@link Ext.form.Field#name name} or {@link Ext.form.ComboBox#hiddenName hiddenName}  
+     */
+    getName: function(){
+        return this.rendered && this.el.dom.name ? this.el.dom.name : this.name || this.id || '';
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            var cfg = this.getAutoCreate();
+
+            if(!cfg.name){
+                cfg.name = this.name || this.id;
+            }
+            if(this.inputType){
+                cfg.type = this.inputType;
+            }
+            this.autoEl = cfg;
+        }
+        Ext.form.Field.superclass.onRender.call(this, ct, position);
+        
+        var type = this.el.dom.type;
+        if(type){
+            if(type == 'password'){
+                type = 'text';
+            }
+            this.el.addClass('x-form-'+type);
+        }
+        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]);
+    },
+
+    // private
+    getItemCt : function(){
+        return this.el.up('.x-form-item', 4);
+    },
+
+    // private
+    initValue : function(){
+        if(this.value !== undefined){
+            this.setValue(this.value);
+        }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){
+            this.setValue(this.el.dom.value);
+        }
+        /**
+         * The original value of the field as configured in the {@link #value} configuration, or
+         * as loaded by the last form load operation if the form's {@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+         * setting is <code>true</code>.
+         * @type mixed
+         * @property originalValue
+         */
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * <p>Returns true if the value of this Field has been changed from its original value.
+     * Will return false if the field is disabled or has not been rendered yet.</p>
+     * <p>Note that if the owning {@link Ext.form.BasicForm form} was configured with
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     * then the <i>original value</i> is updated when the values are loaded by
+     * {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#setValues setValues}.</p>
+     * @return {Boolean} True if this field has been changed from its original value (and
+     * is not disabled), false otherwise.
+     */
+    isDirty : function() {
+        if(this.disabled || !this.rendered) {
+            return false;
+        }
+        return String(this.getValue()) !== String(this.originalValue);
+    },
+
+    // private
+    afterRender : function(){
+        Ext.form.Field.superclass.afterRender.call(this);
+        this.initEvents();
+        this.initValue();
+    },
+
+    // private
+    fireKey : function(e){
+        if(e.isSpecialKey()){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    /**
+     * Resets the current field value to the originally loaded value and clears any validation messages.
+     * See {@link Ext.form.BasicForm}.{@link Ext.form.BasicForm#trackResetOnLoad trackResetOnLoad}
+     */
+    reset : function(){
+        this.setValue(this.originalValue);
+        this.clearInvalid();
+    },
+
+    // private
+    initEvents : function(){
+        this.mon(this.el, Ext.EventManager.useKeydown ? "keydown" : "keypress", this.fireKey,  this);
+        this.mon(this.el, 'focus', this.onFocus, this);
+
+        // fix weird FF/Win editor issue when changing OS window focus
+        var o = this.inEditor && Ext.isWindows && Ext.isGecko ? {buffer:10} : null;
+        this.mon(this.el, 'blur', this.onBlur, this, o);
+    },
+
+    // private
+    onFocus : function(){
+        if(this.focusClass){
+            this.el.addClass(this.focusClass);
+        }
+        if(!this.hasFocus){
+            this.hasFocus = true;
+            this.startValue = this.getValue();
+            this.fireEvent("focus", this);
+        }
+    },
+
+    // private
+    beforeBlur : Ext.emptyFn,
+
+    // private
+    onBlur : function(){
+        this.beforeBlur();
+        if(this.focusClass){
+            this.el.removeClass(this.focusClass);
+        }
+        this.hasFocus = false;
+        if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){
+            this.validate();
+        }
+        var v = this.getValue();
+        if(String(v) !== String(this.startValue)){
+            this.fireEvent('change', this, v, this.startValue);
+        }
+        this.fireEvent("blur", this);
+    },
+
+    /**
+     * Returns whether or not the field value is currently valid
+     * @param {Boolean} preventMark True to disable marking the field invalid
+     * @return {Boolean} True if the value is valid, else false
+     */
+    isValid : function(preventMark){
+        if(this.disabled){
+            return true;
+        }
+        var restore = this.preventMark;
+        this.preventMark = preventMark === true;
+        var v = this.validateValue(this.processValue(this.getRawValue()));
+        this.preventMark = restore;
+        return v;
+    },
+
+    /**
+     * Validates the field value
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validate : function(){
+        if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){
+            this.clearInvalid();
+            return true;
+        }
+        return false;
+    },
+
+    // protected - should be overridden by subclasses if necessary to prepare raw values for validation
+    processValue : function(value){
+        return value;
+    },
+
+    // private
+    // Subclasses should provide the validation implementation by overriding this
+    validateValue : function(value){
+        return true;
+    },
+
+    /**
+     * Mark this field as invalid, using {@link #msgTarget} to determine how to display the error and
+     * applying {@link #invalidClass} to the field's element.
+     * @param {String} msg (optional) The validation message (defaults to {@link #invalidText})
+     */
+    markInvalid : function(msg){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        msg = msg || this.invalidText;
+
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.mark(this, msg);
+        }else if(this.msgTarget){
+            this.el.addClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = msg;
+                t.style.display = this.msgDisplay;
+            }
+        }
+        this.fireEvent('invalid', this, msg);
+    },
+
+    /**
+     * Clear any invalid styles/messages for this field
+     */
+    clearInvalid : function(){
+        if(!this.rendered || this.preventMark){ // not rendered
+            return;
+        }
+        this.el.removeClass(this.invalidClass);
+        var mt = this.getMessageHandler();
+        if(mt){
+            mt.clear(this);
+        }else if(this.msgTarget){
+            this.el.removeClass(this.invalidClass);
+            var t = Ext.getDom(this.msgTarget);
+            if(t){
+                t.innerHTML = '';
+                t.style.display = 'none';
+            }
+        }
+        this.fireEvent('valid', this);
+    },
+
+    // private
+    getMessageHandler : function(){
+        return Ext.form.MessageTargets[this.msgTarget];
+    },
+
+    // private
+    getErrorCt : function(){
+        return this.el.findParent('.x-form-element', 5, true) || // use form element wrap if available
+            this.el.findParent('.x-form-field-wrap', 5, true);   // else direct field wrap
+    },
+
+    // private
+    alignErrorIcon : function(){
+        this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]);
+    },
+
+    /**
+     * Returns the raw data value which may or may not be a valid, defined value.  To return a normalized value see {@link #getValue}.
+     * @return {Mixed} value The field value
+     */
+    getRawValue : function(){
+        var v = this.rendered ? this.el.getValue() : Ext.value(this.value, '');
+        if(v === this.emptyText){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Returns the normalized data value (undefined or emptyText will be returned as '').  To return the raw value see {@link #getRawValue}.
+     * @return {Mixed} value The field value
+     */
+    getValue : function(){
+        if(!this.rendered) {
+            return this.value;
+        }
+        var v = this.el.getValue();
+        if(v === this.emptyText || v === undefined){
+            v = '';
+        }
+        return v;
+    },
+
+    /**
+     * Sets the underlying DOM field's value directly, bypassing validation.  To set the value with validation see {@link #setValue}.
+     * @param {Mixed} value The value to set
+     * @return {Mixed} value The field value that is set
+     */
+    setRawValue : function(v){
+        return (this.el.dom.value = (Ext.isEmpty(v) ? '' : v));
+    },
+
+    /**
+     * Sets a data value into the field and validates it.  To set the value directly without validation see {@link #setRawValue}.
+     * @param {Mixed} value The value to set
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+        this.value = v;
+        if(this.rendered){
+            this.el.dom.value = (Ext.isEmpty(v) ? '' : v);
+            this.validate();
+        }
+        return this;
+    },
+
+    // private, does not work for all fields
+    append : function(v){
+         this.setValue([this.getValue(), v].join(''));
+    },
+
+    // private
+    adjustSize : function(w, h){
+        var s = Ext.form.Field.superclass.adjustSize.call(this, w, h);
+        s.width = this.adjustWidth(this.el.dom.tagName, s.width);
+        if(this.offsetCt){
+            var ct = this.getItemCt();
+            s.width -= ct.getFrameWidth('lr');
+            s.height -= ct.getFrameWidth('tb');
+        }
+        return s;
+    },
+
+    // private
+    adjustWidth : function(tag, w){
+        if(typeof w == 'number' && (Ext.isIE && (Ext.isIE6 || !Ext.isStrict)) && /input|textarea/i.test(tag) && !this.inEditor){
+            return w - 3;
+        }
+        return w;
+    }
+
+    /**
+     * @cfg {Boolean} autoWidth @hide
+     */
+    /**
+     * @cfg {Boolean} autoHeight @hide
+     */
+
+    /**
+     * @cfg {String} autoEl @hide
+     */
+});
+
+
+Ext.form.MessageTargets = {
+    'qtip' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.qtip = msg;
+            field.el.dom.qclass = 'x-form-invalid-tip';
+            if(Ext.QuickTips){ // fix for floating editors interacting with DND
+                Ext.QuickTips.enable();
+            }
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            field.el.dom.qtip = '';
+        }
+    },
+    'title' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            field.el.dom.title = msg;
+        },
+        clear: function(field){
+            field.el.dom.title = '';
+        }
+    },
+    'under' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorEl){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorEl = elp.createChild({cls:'x-form-invalid-msg'});
+                field.errorEl.setWidth(elp.getWidth(true)-20);
+            }
+            field.errorEl.update(msg);
+            Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorEl){
+                Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    },
+    'side' : {
+        mark: function(field, msg){
+            field.el.addClass(field.invalidClass);
+            if(!field.errorIcon){
+                var elp = field.getErrorCt();
+                if(!elp){ // field has no container el
+                    field.el.dom.title = msg;
+                    return;
+                }
+                field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
+            }
+            field.alignErrorIcon();
+            field.errorIcon.dom.qtip = msg;
+            field.errorIcon.dom.qclass = 'x-form-invalid-tip';
+            field.errorIcon.show();
+            field.on('resize', field.alignErrorIcon, field);
+        },
+        clear: function(field){
+            field.el.removeClass(field.invalidClass);
+            if(field.errorIcon){
+                field.errorIcon.dom.qtip = '';
+                field.errorIcon.hide();
+                field.un('resize', field.alignErrorIcon, field);
+            }else{
+                field.el.dom.title = '';
+            }
+        }
+    }
+};
+
+// anything other than normal should be considered experimental
+Ext.form.Field.msgFx = {
+    normal : {
+        show: function(msgEl, f){
+            msgEl.setDisplayed('block');
+        },
+
+        hide : function(msgEl, f){
+            msgEl.setDisplayed(false).update('');
+        }
+    },
+
+    slide : {
+        show: function(msgEl, f){
+            msgEl.slideIn('t', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('t', {stopFx:true,useDisplay:true});
+        }
+    },
+
+    slideRight : {
+        show: function(msgEl, f){
+            msgEl.fixDisplay();
+            msgEl.alignTo(f.el, 'tl-tr');
+            msgEl.slideIn('l', {stopFx:true});
+        },
+
+        hide : function(msgEl, f){
+            msgEl.slideOut('l', {stopFx:true,useDisplay:true});
+        }
+    }
+};
+Ext.reg('field', Ext.form.Field);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/FieldSet.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/FieldSet.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/FieldSet.js	(revision 625)
@@ -0,0 +1,305 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.FieldSet
+ * @extends Ext.Panel
+ * Standard container used for grouping items within a {@link Ext.form.FormPanel form}.
+ * <pre><code>
+var form = new Ext.FormPanel({
+    title: 'Simple Form with FieldSets',
+    labelWidth: 75, // label settings here cascade unless overridden
+    url: 'save-form.php',
+    frame:true,
+    bodyStyle:'padding:5px 5px 0',
+    width: 700,
+    renderTo: document.body,
+    layout:'column', // arrange items in columns
+    defaults: {      // defaults applied to items
+        layout: 'form',
+        border: false,
+        bodyStyle: 'padding:4px'
+    },
+    items: [{
+        // Fieldset in Column 1
+        xtype:'fieldset',
+        columnWidth: 0.5,
+        title: 'Fieldset 1',
+        collapsible: true,
+        autoHeight:true,
+        defaults: {
+            anchor: '-20' // leave room for error icon
+        },
+        defaultType: 'textfield',
+        items :[{
+                fieldLabel: 'Field 1'
+            }, {
+                fieldLabel: 'Field 2'
+            }, {
+                fieldLabel: 'Field 3'
+            }
+        ]
+    },{
+        // Fieldset in Column 2 - Panel inside
+        xtype:'fieldset',
+        title: 'Show Panel', // title, header, or checkboxToggle creates fieldset header
+        autoHeight:true,
+        columnWidth: 0.5,
+        checkboxToggle: true,
+        collapsed: true, // fieldset initially collapsed
+        layout:'anchor',
+        items :[{
+            xtype: 'panel',
+            anchor: '100%',
+            title: 'Panel inside a fieldset',
+            frame: true,
+            height: 100
+        }]
+    }]
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype fieldset
+ */
+Ext.form.FieldSet = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Mixed} checkboxToggle <tt>true</tt> to render a checkbox into the fieldset frame just
+     * in front of the legend to expand/collapse the fieldset when the checkbox is toggled. (defaults
+     * to <tt>false</tt>).
+     * <p>A {@link Ext.DomHelper DomHelper} element spec may also be specified to create the checkbox.
+     * If <tt>true</tt> is specified, the default DomHelper config object used to create the element
+     * is:</p><pre><code>
+     * {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}
+     * </code></pre>   
+     */
+    /**
+     * @cfg {String} checkboxName The name to assign to the fieldset's checkbox if <tt>{@link #checkboxToggle} = true</tt>
+     * (defaults to <tt>'[checkbox id]-checkbox'</tt>).
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <tt>true</tt> to make the fieldset collapsible and have the expand/collapse toggle button automatically
+     * rendered into the legend element, <tt>false</tt> to keep the fieldset statically sized with no collapse
+     * button (defaults to <tt>false</tt>). Another option is to configure <tt>{@link #checkboxToggle}</tt>.
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels. This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the <tt>x-form-item</tt> of fields (see 
+     * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} for details).
+     * This property cascades to child containers.
+     */
+    /**
+     * @cfg {String} baseCls The base CSS class applied to the fieldset (defaults to <tt>'x-fieldset'</tt>).
+     */
+    baseCls : 'x-fieldset',
+    /**
+     * @cfg {String} layout The {@link Ext.Container#layout} to use inside the fieldset (defaults to <tt>'form'</tt>).
+     */
+    layout : 'form',
+    /**
+     * @cfg {Boolean} animCollapse
+     * <tt>true</tt> to animate the transition when the panel is collapsed, <tt>false</tt> to skip the
+     * animation (defaults to <tt>false</tt>).
+     */
+    animCollapse : false,
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('fieldset');
+            this.el.id = this.id;
+            if (this.title || this.header || this.checkboxToggle) {
+                this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header';
+            }
+        }
+
+        Ext.form.FieldSet.superclass.onRender.call(this, ct, position);
+
+        if(this.checkboxToggle){
+            var o = typeof this.checkboxToggle == 'object' ?
+                    this.checkboxToggle :
+                    {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'};
+            this.checkbox = this.header.insertFirst(o);
+            this.checkbox.dom.checked = !this.collapsed;
+            this.mon(this.checkbox, 'click', this.onCheckClick, this);
+        }
+    },
+
+    // private
+    onCollapse : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = false;
+        }
+        Ext.form.FieldSet.superclass.onCollapse.call(this, doAnim, animArg);
+
+    },
+
+    // private
+    onExpand : function(doAnim, animArg){
+        if(this.checkbox){
+            this.checkbox.dom.checked = true;
+        }
+        Ext.form.FieldSet.superclass.onExpand.call(this, doAnim, animArg);
+    },
+
+    /**
+     * This function is called by the fieldset's checkbox when it is toggled (only applies when
+     * checkboxToggle = true).  This method should never be called externally, but can be
+     * overridden to provide custom behavior when the checkbox is toggled if needed.
+     */
+    onCheckClick : function(){
+        this[this.checkbox.dom.checked ? 'expand' : 'collapse']();
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} applyTo
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} bodyBorder
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} border
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} collapseFirst
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {String} disabledClass
+     * @hide
+     */
+    /**
+     * @cfg {String} elements
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} floating
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} footer
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} frame
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} header
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} headerAsText
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * @hide
+     */
+    /**
+     * @cfg {String} iconCls
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/String} shadow
+     * @hide
+     */
+    /**
+     * @cfg {Number} shadowOffset
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} shim
+     * @hide
+     */
+    /**
+     * @cfg {Object/Array} tbar
+     * @hide
+     */
+    /**
+     * @cfg {String} tabTip
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} titleCollapse
+     * @hide
+     */
+    /**
+     * @cfg {Array} tools
+     * @hide
+     */
+    /**
+     * @cfg {Ext.Template/Ext.XTemplate} toolTemplate
+     * @hide
+     */
+    /**
+     * @cfg {String} xtype
+     * @hide
+     */
+    /**
+     * @property header
+     * @hide
+     */
+    /**
+     * @property footer
+     * @hide
+     */
+    /**
+     * @method focus
+     * @hide
+     */
+    /**
+     * @method getBottomToolbar
+     * @hide
+     */
+    /**
+     * @method getTopToolbar
+     * @hide
+     */
+    /**
+     * @method setIconClass
+     * @hide
+     */
+    /**
+     * @event activate
+     * @hide
+     */
+    /**
+     * @event beforeclose
+     * @hide
+     */
+    /**
+     * @event bodyresize
+     * @hide
+     */
+    /**
+     * @event close
+     * @hide
+     */
+    /**
+     * @event deactivate
+     * @hide
+     */
+});
+Ext.reg('fieldset', Ext.form.FieldSet);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Form.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Form.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Form.js	(revision 625)
@@ -0,0 +1,335 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.FormPanel
+ * @extends Ext.Panel
+ * <p>Standard form container.</p>
+ * 
+ * <p><b><u>Layout</u></b></p>
+ * <p>By default, FormPanel is configured with <tt>layout:'form'</tt> to use an {@link Ext.layout.FormLayout}
+ * layout manager, which styles and renders fields and labels correctly. When nesting additional Containers
+ * within a FormPanel, you should ensure that any descendant Containers which host input Fields use the
+ * {@link Ext.layout.FormLayout} layout manager.</p>
+ * 
+ * <p><b><u>BasicForm</u></b></p>
+ * <p>Although <b>not listed</b> as configuration options of FormPanel, the FormPanel class accepts all
+ * of the config options required to configure its internal {@link Ext.form.BasicForm} for:
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.BasicForm#fileUpload file uploads}</li>
+ * <li>functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form</li>
+ * </ul></div>
+ *  
+ * <p><b>Note</b>: If subclassing FormPanel, any configuration options for the BasicForm must be applied to
+ * the <tt><b>initialConfig</b></tt> property of the FormPanel. Applying {@link Ext.form.BasicForm BasicForm}
+ * configuration settings to <b><tt>this</tt></b> will <b>not</b> affect the BasicForm's configuration.</p>
+ * 
+ * <p><b><u>Form Validation</u></b></p>
+ * <p>For information on form validation see the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>{@link Ext.form.TextField}</li>
+ * <li>{@link Ext.form.VTypes}</li>
+ * <li>{@link Ext.form.BasicForm#doAction BasicForm.doAction <b>clientValidation</b> notes}</li>
+ * <li><tt>{@link Ext.form.FormPanel#monitorValid monitorValid}</tt></li>
+ * </ul></div>
+ * 
+ * <p><b><u>Form Submission</u></b></p>
+ * <p>By default, Ext Forms are submitted through Ajax, using {@link Ext.form.Action}. To enable normal browser
+ * submission of the {@link Ext.form.BasicForm BasicForm} contained in this FormPanel, see the
+ * <tt><b>{@link Ext.form.BasicForm#standardSubmit standardSubmit}</b></tt> option.</p>
+ * 
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype form
+ */
+Ext.FormPanel = Ext.extend(Ext.Panel, {
+	/**
+	 * @cfg {String} formId (optional) The id of the FORM tag (defaults to an auto-generated id).
+	 */
+    /**
+     * @cfg {Boolean} hideLabels
+     * <p><tt>true</tt> to hide field labels by default (sets <tt>display:none</tt>). Defaults to
+     * <tt>false</tt>.</p>
+     * <p>Also see {@link Ext.Component}.<tt>{@link Ext.Component#hideLabel hideLabel}</tt>.
+     */
+    /**
+     * @cfg {Number} labelPad
+     * The default padding in pixels for field labels (defaults to <tt>5</tt>). <tt>labelPad</tt> only
+     * applies if <tt>{@link #labelWidth}</tt> is also specified, otherwise it will be ignored.
+     */
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.Component}.<tt>{@link Ext.Component#labelSeparator labelSeparator}</tt>
+     */
+    /**
+     * @cfg {Number} labelWidth The width of labels in pixels. This property cascades to child containers
+     * and can be overridden on any child container (e.g., a fieldset can specify a different <tt>labelWidth</tt>
+     * for its fields) (defaults to <tt>100</tt>).
+     */
+    /**
+     * @cfg {String} itemCls A css class to apply to the x-form-item of fields. This property cascades to child containers.
+     */
+    /**
+     * @cfg {Array} buttons
+     * An array of {@link Ext.Button}s or {@link Ext.Button} configs used to add buttons to the footer of this FormPanel.<br>
+     * <p>Buttons in the footer of a FormPanel may be configured with the option <tt>formBind: true</tt>. This causes
+     * the form's {@link #monitorValid valid state monitor task} to enable/disable those Buttons depending on
+     * the form's valid/invalid state.</p>
+     */
+
+
+    /**
+     * @cfg {Number} minButtonWidth Minimum width of all buttons in pixels (defaults to <tt>75</tt>).
+     */
+    minButtonWidth : 75,
+
+    /**
+     * @cfg {String} labelAlign The label alignment value used for the <tt>text-align</tt> specification
+     * for the <b>container</b>. Valid values are <tt>"left</tt>", <tt>"top"</tt> or <tt>"right"</tt>
+     * (defaults to <tt>"left"</tt>). This property cascades to child <b>containers</b> and can be
+     * overridden on any child <b>container</b> (e.g., a fieldset can specify a different <tt>labelAlign</tt>
+     * for its fields).
+     */
+    labelAlign : 'left',
+
+    /**
+     * @cfg {Boolean} monitorValid If <tt>true</tt>, the form monitors its valid state <b>client-side</b> and
+     * regularly fires the {@link #clientvalidation} event passing that state.<br>
+     * <p>When monitoring valid state, the FormPanel enables/disables any of its configured
+     * {@link #buttons} which have been configured with <code>formBind: true</code> depending
+     * on whether the {@link Ext.form.BasicForm#isValid form is valid} or not. Defaults to <tt>false</tt></p>
+     */
+    monitorValid : false,
+
+    /**
+     * @cfg {Number} monitorPoll The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
+     */
+    monitorPoll : 200,
+
+    /**
+     * @cfg {String} layout Defaults to <tt>'form'</tt>.  Normally this configuration property should not be altered. 
+     * For additional details see {@link Ext.layout.FormLayout} and {@link Ext.Container#layout Ext.Container.layout}.
+     */
+    layout : 'form',
+
+    // private
+    initComponent : function(){
+        this.form = this.createForm();
+        Ext.FormPanel.superclass.initComponent.call(this);
+
+        this.bodyCfg = {
+            tag: 'form',
+            cls: this.baseCls + '-body',
+            method : this.method || 'POST',
+            id : this.formId || Ext.id()
+        };
+        if(this.fileUpload) {
+            this.bodyCfg.enctype = 'multipart/form-data';
+        }
+        this.initItems();
+        
+        this.addEvents(
+            /**
+             * @event clientvalidation
+             * If the monitorValid config option is true, this event fires repetitively to notify of valid state
+             * @param {Ext.form.FormPanel} this
+             * @param {Boolean} valid true if the form has passed client-side validation
+             */
+            'clientvalidation'
+        );
+
+        this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']);
+    },
+
+    // private
+    createForm : function(){
+        var config = Ext.applyIf({listeners: {}}, this.initialConfig);
+        return new Ext.form.BasicForm(null, config);
+    },
+
+    // private
+    initFields : function(){
+        var f = this.form;
+        var formPanel = this;
+        var fn = function(c){
+            if(formPanel.isField(c)){
+                f.add(c);
+            }if(c.isFieldWrap){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                f.add(c.field);
+            }else if(c.doLayout && c != formPanel){
+                Ext.applyIf(c, {
+                    labelAlign: c.ownerCt.labelAlign,
+                    labelWidth: c.ownerCt.labelWidth,
+                    itemCls: c.ownerCt.itemCls
+                });
+                //each check required for check/radio groups.
+                if(c.items && c.items.each){
+                    c.items.each(fn, this);
+                }
+            }
+        };
+        this.items.each(fn, this);
+    },
+
+    // private
+    getLayoutTarget : function(){
+        return this.form.el;
+    },
+
+    /**
+     * Provides access to the {@link Ext.form.BasicForm Form} which this Panel contains.
+     * @return {Ext.form.BasicForm} The {@link Ext.form.BasicForm Form} which this Panel contains.
+     */
+    getForm : function(){
+        return this.form;
+    },
+
+    // private
+    onRender : function(ct, position){
+        this.initFields();
+        Ext.FormPanel.superclass.onRender.call(this, ct, position);
+        this.form.initEl(this.body);
+    },
+    
+    // private
+    beforeDestroy : function(){
+        this.stopMonitoring();
+        Ext.FormPanel.superclass.beforeDestroy.call(this);
+        /*
+         * Clear the items here to prevent them being destroyed again.
+         * Don't move this behaviour to BasicForm because it can be used
+         * on it's own.
+         */
+        this.form.items.clear();
+        Ext.destroy(this.form);
+    },
+
+	// Determine if a Component is usable as a form Field.
+    isField : function(c) {
+        return !!c.setValue && !!c.getValue && !!c.markInvalid && !!c.clearInvalid;
+    },
+
+    // private
+    initEvents : function(){
+        Ext.FormPanel.superclass.initEvents.call(this);
+        this.on('remove', this.onRemove, this);
+        this.on('add', this.onAdd, this);
+        if(this.monitorValid){ // initialize after render
+            this.startMonitoring();
+        }
+    },
+    
+    // private
+    onAdd : function(ct, c) {
+		// If a single form Field, add it
+        if (this.isField(c)) {
+            this.form.add(c);
+		// If a Container, add any Fields it might contain
+        } else if (c.findBy) {
+            Ext.applyIf(c, {
+                labelAlign: c.ownerCt.labelAlign,
+                labelWidth: c.ownerCt.labelWidth,
+                itemCls: c.ownerCt.itemCls
+            });
+            this.form.add.apply(this.form, c.findBy(this.isField));
+        }
+    },
+	
+    // private
+    onRemove : function(ct, c) {
+		// If a single form Field, remove it
+        if (this.isField(c)) {
+            Ext.destroy(c.container.up('.x-form-item'));
+        	this.form.remove(c);
+		// If a Container, remove any Fields it might contain
+        } else if (c.findByType) {
+            Ext.each(c.findBy(this.isField), this.form.remove, this.form);
+        }
+    },
+
+    /**
+     * Starts monitoring of the valid state of this form. Usually this is done by passing the config
+     * option "monitorValid"
+     */
+    startMonitoring : function(){
+        if(!this.validTask){
+            this.validTask = new Ext.util.TaskRunner();
+            this.validTask.start({
+                run : this.bindHandler,
+                interval : this.monitorPoll || 200,
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Stops monitoring of the valid state of this form
+     */
+    stopMonitoring : function(){
+        if(this.validTask){
+            this.validTask.stopAll();
+            this.validTask = null;
+        }
+    },
+
+    /**
+     * This is a proxy for the underlying BasicForm's {@link Ext.form.BasicForm#load} call.
+     * @param {Object} options The options to pass to the action (see {@link Ext.form.BasicForm#doAction} for details)
+     */
+    load : function(){
+        this.form.load.apply(this.form, arguments);  
+    },
+
+    // private
+    onDisable : function(){
+        Ext.FormPanel.superclass.onDisable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.disable();
+            });
+        }
+    },
+
+    // private
+    onEnable : function(){
+        Ext.FormPanel.superclass.onEnable.call(this);
+        if(this.form){
+            this.form.items.each(function(){
+                 this.enable();
+            });
+        }
+    },
+
+    // private
+    bindHandler : function(){
+        var valid = true;
+        this.form.items.each(function(f){
+            if(!f.isValid(true)){
+                valid = false;
+                return false;
+            }
+        });
+        if(this.fbar){
+            var fitems = this.fbar.items.items;
+            for(var i = 0, len = fitems.length; i < len; i++){
+                var btn = fitems[i];
+                if(btn.formBind === true && btn.disabled === valid){
+                    btn.setDisabled(!valid);
+                }
+            }
+        }
+        this.fireEvent('clientvalidation', this, valid);
+    }
+});
+Ext.reg('form', Ext.FormPanel);
+
+Ext.form.FormPanel = Ext.FormPanel;
+
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Hidden.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Hidden.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Hidden.js	(revision 625)
@@ -0,0 +1,39 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Hidden
+ * @extends Ext.form.Field
+ * A basic hidden field for storing hidden values in forms that need to be passed in the form submit.
+ * @constructor
+ * Create a new Hidden field.
+ * @param {Object} config Configuration options
+ * @xtype hidden
+ */
+Ext.form.Hidden = Ext.extend(Ext.form.Field, {
+    // private
+    inputType : 'hidden',
+
+    // private
+    onRender : function(){
+        Ext.form.Hidden.superclass.onRender.apply(this, arguments);
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    // These are all private overrides
+    setSize : Ext.emptyFn,
+    setWidth : Ext.emptyFn,
+    setHeight : Ext.emptyFn,
+    setPosition : Ext.emptyFn,
+    setPagePosition : Ext.emptyFn,
+    markInvalid : Ext.emptyFn,
+    clearInvalid : Ext.emptyFn
+});
+Ext.reg('hidden', Ext.form.Hidden);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/HtmlEditor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/HtmlEditor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/HtmlEditor.js	(revision 625)
@@ -0,0 +1,1179 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.HtmlEditor
+ * @extends Ext.form.Field
+ * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be 
+ * automatically hidden when needed.  These are noted in the config options where appropriate.
+ * <br><br>The editor's toolbar buttons have tooltips defined in the {@link #buttonTips} property, but they are not 
+ * enabled by default unless the global {@link Ext.QuickTips} singleton is {@link Ext.QuickTips#init initialized}.
+ * <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
+ * supported by this editor.</b>
+ * <br><br>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
+ * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
+ * <br><br>Example usage:
+ * <pre><code>
+// Simple example rendered with default options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.form.HtmlEditor({
+    renderTo: Ext.getBody(),
+    width: 800,
+    height: 300
+});
+
+// Passed via xtype into a container and with custom options:
+Ext.QuickTips.init();  // enable tooltips
+new Ext.Panel({
+    title: 'HTML Editor',
+    renderTo: Ext.getBody(),
+    width: 600,
+    height: 300,
+    frame: true,
+    layout: 'fit',
+    items: {
+        xtype: 'htmleditor',
+        enableColors: false,
+        enableAlignments: false
+    }
+});
+</code></pre>
+ * @constructor
+ * Create a new HtmlEditor
+ * @param {Object} config
+ * @xtype htmleditor
+ */
+
+Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
+    /**
+     * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true)
+     */
+    enableFormat : true,
+    /**
+     * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true)
+     */
+    enableFontSize : true,
+    /**
+     * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true)
+     */
+    enableColors : true,
+    /**
+     * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true)
+     */
+    enableAlignments : true,
+    /**
+     * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
+     */
+    enableLists : true,
+    /**
+     * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true)
+     */
+    enableSourceEdit : true,
+    /**
+     * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true)
+     */
+    enableLinks : true,
+    /**
+     * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true)
+     */
+    enableFont : true,
+    /**
+     * @cfg {String} createLinkText The default text for the create link prompt
+     */
+    createLinkText : 'Please enter the URL for the link:',
+    /**
+     * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /)
+     */
+    defaultLinkValue : 'http:/'+'/',
+    /**
+     * @cfg {Array} fontFamilies An array of available font families
+     */
+    fontFamilies : [
+        'Arial',
+        'Courier New',
+        'Tahoma',
+        'Times New Roman',
+        'Verdana'
+    ],
+    defaultFont: 'tahoma',
+    /**
+     * @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to &#8203; (Zero-width space), &nbsp; (Non-breaking space) in Opera and IE6).
+     */
+    defaultValue: (Ext.isOpera || Ext.isIE6) ? '&nbsp;' : '&#8203;',
+
+    // private properties
+    actionMode: 'wrap',
+    validationEvent : false,
+    deferHeight: true,
+    initialized : false,
+    activated : false,
+    sourceEditMode : false,
+    onFocus : Ext.emptyFn,
+    iframePad:3,
+    hideMode:'offsets',
+    defaultAutoCreate : {
+        tag: "textarea",
+        style:"width:500px;height:300px;",
+        autocomplete: "off"
+    },
+
+    // private
+    initComponent : function(){
+        this.addEvents(
+            /**
+             * @event initialize
+             * Fires when the editor is fully initialized (including the iframe)
+             * @param {HtmlEditor} this
+             */
+            'initialize',
+            /**
+             * @event activate
+             * Fires when the editor is first receives the focus. Any insertion must wait
+             * until after this event.
+             * @param {HtmlEditor} this
+             */
+            'activate',
+             /**
+             * @event beforesync
+             * Fires before the textarea is updated with content from the editor iframe. Return false
+             * to cancel the sync.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforesync',
+             /**
+             * @event beforepush
+             * Fires before the iframe editor is updated with content from the textarea. Return false
+             * to cancel the push.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'beforepush',
+             /**
+             * @event sync
+             * Fires when the textarea is updated with content from the editor iframe.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'sync',
+             /**
+             * @event push
+             * Fires when the iframe editor is updated with content from the textarea.
+             * @param {HtmlEditor} this
+             * @param {String} html
+             */
+            'push',
+             /**
+             * @event editmodechange
+             * Fires when the editor switches edit modes
+             * @param {HtmlEditor} this
+             * @param {Boolean} sourceEdit True if source edit, false if standard editing.
+             */
+            'editmodechange'
+        )
+    },
+
+    // private
+    createFontOptions : function(){
+        var buf = [], fs = this.fontFamilies, ff, lc;
+        for(var i = 0, len = fs.length; i< len; i++){
+            ff = fs[i];
+            lc = ff.toLowerCase();
+            buf.push(
+                '<option value="',lc,'" style="font-family:',ff,';"',
+                    (this.defaultFont == lc ? ' selected="true">' : '>'),
+                    ff,
+                '</option>'
+            );
+        }
+        return buf.join('');
+    },
+    
+    /*
+     * Protected method that will not generally be called directly. It
+     * is called when the editor creates its toolbar. Override this method if you need to
+     * add custom toolbar buttons.
+     * @param {HtmlEditor} editor
+     */
+    createToolbar : function(editor){
+        
+        var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
+        
+        function btn(id, toggle, handler){
+            return {
+                itemId : id,
+                cls : 'x-btn-icon',
+                iconCls: 'x-edit-'+id,
+                enableToggle:toggle !== false,
+                scope: editor,
+                handler:handler||editor.relayBtnCmd,
+                clickEvent:'mousedown',
+                tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
+                overflowText: editor.buttonTips[id].title || undefined,
+                tabIndex:-1
+            };
+        }
+
+        // build the toolbar
+        var tb = new Ext.Toolbar({
+            renderTo:this.wrap.dom.firstChild
+        });
+
+        // stop form submits
+        this.mon(tb.el, 'click', function(e){
+            e.preventDefault();
+        });
+
+        if(this.enableFont && !Ext.isSafari2){
+            this.fontSelect = tb.el.createChild({
+                tag:'select',
+                cls:'x-font-select',
+                html: this.createFontOptions()
+            });
+            this.mon(this.fontSelect, 'change', function(){
+                var font = this.fontSelect.dom.value;
+                this.relayCmd('fontname', font);
+                this.deferFocus();
+            }, this);
+
+            tb.add(
+                this.fontSelect.dom,
+                '-'
+            );
+        }
+
+        if(this.enableFormat){
+            tb.add(
+                btn('bold'),
+                btn('italic'),
+                btn('underline')
+            );
+        }
+
+        if(this.enableFontSize){
+            tb.add(
+                '-',
+                btn('increasefontsize', false, this.adjustFont),
+                btn('decreasefontsize', false, this.adjustFont)
+            );
+        }
+
+        if(this.enableColors){
+            tb.add(
+                '-', {
+                    itemId:'forecolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-forecolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        allowReselect: true,
+                        focus: Ext.emptyFn,
+                        value:'000000',
+                        plain:true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                this.deferFocus();
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }, {
+                    itemId:'backcolor',
+                    cls:'x-btn-icon',
+                    iconCls: 'x-edit-backcolor',
+                    clickEvent:'mousedown',
+                    tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
+                    tabIndex:-1,
+                    menu : new Ext.menu.ColorMenu({
+                        focus: Ext.emptyFn,
+                        value:'FFFFFF',
+                        plain:true,
+                        allowReselect: true,
+                        listeners: {
+                            scope: this,
+                            select: function(cp, color){
+                                if(Ext.isGecko){
+                                    this.execCmd('useCSS', false);
+                                    this.execCmd('hilitecolor', color);
+                                    this.execCmd('useCSS', true);
+                                    this.deferFocus();
+                                }else{
+                                    this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
+                                    this.deferFocus();
+                                }
+                            }
+                        },
+                        clickEvent:'mousedown'
+                    })
+                }
+            );
+        }
+
+        if(this.enableAlignments){
+            tb.add(
+                '-',
+                btn('justifyleft'),
+                btn('justifycenter'),
+                btn('justifyright')
+            );
+        }
+
+        if(!Ext.isSafari2){
+            if(this.enableLinks){
+                tb.add(
+                    '-',
+                    btn('createlink', false, this.createLink)
+                );
+            }
+
+            if(this.enableLists){
+                tb.add(
+                    '-',
+                    btn('insertorderedlist'),
+                    btn('insertunorderedlist')
+                );
+            }
+            if(this.enableSourceEdit){
+                tb.add(
+                    '-',
+                    btn('sourceedit', true, function(btn){
+                        this.toggleSourceEdit(!this.sourceEditMode);
+                    })
+                );
+            }
+        }
+
+        this.tb = tb;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. It
+     * is called when the editor initializes the iframe with HTML contents. Override this method if you
+     * want to change the initialization markup of the iframe (e.g. to add stylesheets).
+     */
+    getDocMarkup : function(){
+        return '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';
+    },
+
+    // private
+    getEditorBody : function(){
+        return this.doc.body || this.doc.documentElement;
+    },
+
+    // private
+    getDoc : function(){
+        return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document);
+    },
+
+    // private
+    getWin : function(){
+        return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name];
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
+        this.el.dom.style.border = '0 none';
+        this.el.dom.setAttribute('tabIndex', -1);
+        this.el.addClass('x-hidden');
+        if(Ext.isIE){ // fix IE 1px bogus margin
+            this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')
+        }
+        this.wrap = this.el.wrap({
+            cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'}
+        });
+
+        this.createToolbar(this);
+
+        this.disableItems(true);
+        // is this needed?
+        // this.tb.doLayout();
+
+        this.createIFrame();
+
+        if(!this.width){
+            var sz = this.el.getSize();
+            this.setSize(sz.width, this.height || sz.height);
+        }
+    },
+
+    createIFrame: function(){
+        var iframe = document.createElement('iframe');
+        iframe.name = Ext.id();
+        iframe.frameBorder = '0';
+        iframe.src = Ext.isIE ? Ext.SSL_SECURE_URL : "javascript:;";
+        this.wrap.dom.appendChild(iframe);
+
+        this.iframe = iframe;
+
+        this.monitorTask = Ext.TaskMgr.start({
+            run: this.checkDesignMode,
+            scope: this,
+            interval:100
+        });
+    },
+
+    initFrame : function(){
+        Ext.TaskMgr.stop(this.monitorTask);
+        this.doc = this.getDoc();
+        this.win = this.getWin();
+
+        this.doc.open();
+        this.doc.write(this.getDocMarkup());
+        this.doc.close();
+
+        var task = { // must defer to wait for browser to be ready
+            run : function(){
+                if(this.doc.body || this.doc.readyState == 'complete'){
+                    Ext.TaskMgr.stop(task);
+                    this.doc.designMode="on";
+                    this.initEditor.defer(10, this);
+                }
+            },
+            interval : 10,
+            duration:10000,
+            scope: this
+        };
+        Ext.TaskMgr.start(task);
+    },
+
+
+    checkDesignMode : function(){
+        if(this.wrap && this.wrap.dom.offsetWidth){
+            var doc = this.getDoc();
+            if(!doc){
+                return;
+            }
+            if(!doc.editorInitialized || String(doc.designMode).toLowerCase() != 'on'){
+                this.initFrame();
+            }
+        }
+    },
+    
+    disableItems: function(disabled){
+        if(this.fontSelect){
+            this.fontSelect.dom.disabled = disabled;
+        }
+        this.tb.items.each(function(item){
+            if(item.itemId != 'sourceedit'){
+                item.setDisabled(disabled);
+            }
+        });
+    },
+
+    // private
+    onResize : function(w, h){
+        Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
+        if(this.el && this.iframe){
+            if(typeof w == 'number'){
+                var aw = w - this.wrap.getFrameWidth('lr');
+                this.el.setWidth(this.adjustWidth('textarea', aw));
+                this.tb.setWidth(aw);
+                this.iframe.style.width = Math.max(aw, 0) + 'px';
+            }
+            if(typeof h == 'number'){
+                var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight();
+                this.el.setHeight(this.adjustWidth('textarea', ah));
+                this.iframe.style.height = Math.max(ah, 0) + 'px';
+                if(this.doc){
+                    this.getEditorBody().style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px';
+                }
+            }
+        }
+    },
+
+    /**
+     * Toggles the editor between standard and source edit mode.
+     * @param {Boolean} sourceEdit (optional) True for source edit, false for standard
+     */
+    toggleSourceEdit : function(sourceEditMode){
+        if(sourceEditMode === undefined){
+            sourceEditMode = !this.sourceEditMode;
+        }
+        this.sourceEditMode = sourceEditMode === true;
+        var btn = this.tb.items.get('sourceedit');
+        if(btn.pressed !== this.sourceEditMode){
+            btn.toggle(this.sourceEditMode);
+            if(!btn.xtbHidden){
+                return;
+            }
+        }
+        if(this.sourceEditMode){
+            this.disableItems(true);
+            this.syncValue();
+            this.iframe.className = 'x-hidden';
+            this.el.removeClass('x-hidden');
+            this.el.dom.removeAttribute('tabIndex');
+            this.el.focus();
+        }else{
+            if(this.initialized){
+                this.disableItems(false);
+            }
+            this.pushValue();
+            this.iframe.className = '';
+            this.el.addClass('x-hidden');
+            this.el.dom.setAttribute('tabIndex', -1);
+            this.deferFocus();
+        }
+        var lastSize = this.lastSize;
+        if(lastSize){
+            delete this.lastSize;
+            this.setSize(lastSize);
+        }
+        this.fireEvent('editmodechange', this, this.sourceEditMode);
+    },
+
+    // private used internally
+    createLink : function(){
+        var url = prompt(this.createLinkText, this.defaultLinkValue);
+        if(url && url != 'http:/'+'/'){
+            this.relayCmd('createlink', url);
+        }
+    },
+
+    // private (for BoxComponent)
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private (for BoxComponent)
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private (for BoxComponent)
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    initEvents : function(){
+        this.originalValue = this.getValue();
+    },
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    // docs inherit from Field
+    setValue : function(v){
+        Ext.form.HtmlEditor.superclass.setValue.call(this, v);
+        this.pushValue();
+        return this;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. If you need/want
+     * custom HTML cleanup, this is the method you should override.
+     * @param {String} html The HTML to be cleaned
+     * @return {String} The cleaned HTML
+     */
+    cleanHtml : function(html){
+        html = String(html);
+        if(html.length > 5){
+            if(Ext.isWebKit){ // strip safari nonsense
+                html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
+            }
+        }
+        if(html == this.defaultValue){
+            html = '';
+        }
+        return html;
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Syncs the contents
+     * of the editor iframe with the textarea.
+     */
+    syncValue : function(){
+        if(this.initialized){
+            var bd = this.getEditorBody();
+            var html = bd.innerHTML;
+            if(Ext.isWebKit){
+                var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
+                var m = bs.match(/text-align:(.*?);/i);
+                if(m && m[1]){
+                    html = '<div style="'+m[0]+'">' + html + '</div>';
+                }
+            }
+            html = this.cleanHtml(html);
+            if(this.fireEvent('beforesync', this, html) !== false){
+                this.el.dom.value = html;
+                this.fireEvent('sync', this, html);
+            }
+        }
+    },
+    
+    //docs inherit from Field
+    getValue : function() {
+        this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
+        return Ext.form.HtmlEditor.superclass.getValue.call(this);
+    },
+
+    /**
+     * Protected method that will not generally be called directly. Pushes the value of the textarea
+     * into the iframe editor.
+     */
+    pushValue : function(){
+        if(this.initialized){
+            var v = this.el.dom.value;
+            if(!this.activated && v.length < 1){
+                v = this.defaultValue;
+            }
+            if(this.fireEvent('beforepush', this, v) !== false){
+                this.getEditorBody().innerHTML = v;
+                if(Ext.isGecko){
+                    // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
+                    var d = this.doc,
+                        mode = d.designMode.toLowerCase();
+                    
+                    d.designMode = mode.toggle('on', 'off');
+                    d.designMode = mode;
+                }
+                this.fireEvent('push', this, v);
+            }
+        }
+    },
+
+    // private
+    deferFocus : function(){
+        this.focus.defer(10, this);
+    },
+
+    // docs inherit from Field
+    focus : function(){
+        if(this.win && !this.sourceEditMode){
+            this.win.focus();
+        }else{
+            this.el.focus();
+        }
+    },
+
+    // private
+    initEditor : function(){
+        //Destroying the component during/before initEditor can cause issues.
+        try{
+            var dbody = this.getEditorBody();
+            var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat');
+            ss['background-attachment'] = 'fixed'; // w3c
+            dbody.bgProperties = 'fixed'; // ie
+
+            Ext.DomHelper.applyStyles(dbody, ss);
+
+            if(this.doc){
+                try{
+                    Ext.EventManager.removeAll(this.doc);
+                }catch(e){}
+            }
+
+            this.doc = this.getDoc();
+
+            Ext.EventManager.on(this.doc, {
+                'mousedown': this.onEditorEvent,
+                'dblclick': this.onEditorEvent,
+                'click': this.onEditorEvent,
+                'keyup': this.onEditorEvent,
+                buffer:100,
+                scope: this
+            });
+
+            if(Ext.isGecko){
+                Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this);
+            }
+            if(Ext.isIE || Ext.isWebKit || Ext.isOpera){
+                Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this);
+            }
+            this.initialized = true;
+            this.fireEvent('initialize', this);
+            this.doc.editorInitialized = true;
+            this.pushValue();
+        }catch(e){}
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.monitorTask){
+            Ext.TaskMgr.stop(this.monitorTask);
+        }
+        if(this.rendered){
+            Ext.destroy(this.tb);
+            if(this.wrap){
+                this.wrap.dom.innerHTML = '';
+                this.wrap.remove();
+            }
+        }
+        if(this.el){
+            this.el.removeAllListeners();
+            this.el.remove();
+        }
+ 
+        if(this.doc){
+            try{
+                Ext.EventManager.removeAll(this.doc);
+                for (var prop in this.doc){
+                   delete this.doc[prop];
+                }
+            }catch(e){}
+        }
+        this.purgeListeners();
+    },
+
+    // private
+    onFirstFocus : function(){
+        this.activated = true;
+        this.disableItems(false);
+        if(Ext.isGecko){ // prevent silly gecko errors
+            this.win.focus();
+            var s = this.win.getSelection();
+            if(!s.focusNode || s.focusNode.nodeType != 3){
+                var r = s.getRangeAt(0);
+                r.selectNodeContents(this.getEditorBody());
+                r.collapse(true);
+                this.deferFocus();
+            }
+            try{
+                this.execCmd('useCSS', true);
+                this.execCmd('styleWithCSS', false);
+            }catch(e){}
+        }
+        this.fireEvent('activate', this);
+    },
+
+    // private
+    adjustFont: function(btn){
+        var adjust = btn.itemId == 'increasefontsize' ? 1 : -1;
+
+        var v = parseInt(this.doc.queryCommandValue('FontSize') || 2, 10);
+        if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
+            // Safari 3 values
+            // 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
+            if(v <= 10){
+                v = 1 + adjust;
+            }else if(v <= 13){
+                v = 2 + adjust;
+            }else if(v <= 16){
+                v = 3 + adjust;
+            }else if(v <= 18){
+                v = 4 + adjust;
+            }else if(v <= 24){
+                v = 5 + adjust;
+            }else {
+                v = 6 + adjust;
+            }
+            v = v.constrain(1, 6);
+        }else{
+            if(Ext.isSafari){ // safari
+                adjust *= 2;
+            }
+            v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
+        }
+        this.execCmd('FontSize', v);
+    },
+
+    // private
+    onEditorEvent : function(e){
+        this.updateToolbar();
+    },
+
+
+    /**
+     * Protected method that will not generally be called directly. It triggers
+     * a toolbar update by reading the markup state of the current selection in the editor.
+     */
+    updateToolbar: function(){
+
+        if(!this.activated){
+            this.onFirstFocus();
+            return;
+        }
+
+        var btns = this.tb.items.map, doc = this.doc;
+
+        if(this.enableFont && !Ext.isSafari2){
+            var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
+            if(name != this.fontSelect.dom.value){
+                this.fontSelect.dom.value = name;
+            }
+        }
+        if(this.enableFormat){
+            btns.bold.toggle(doc.queryCommandState('bold'));
+            btns.italic.toggle(doc.queryCommandState('italic'));
+            btns.underline.toggle(doc.queryCommandState('underline'));
+        }
+        if(this.enableAlignments){
+            btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
+            btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
+            btns.justifyright.toggle(doc.queryCommandState('justifyright'));
+        }
+        if(!Ext.isSafari2 && this.enableLists){
+            btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
+            btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
+        }
+        
+        Ext.menu.MenuMgr.hideAll();
+
+        this.syncValue();
+    },
+
+    // private
+    relayBtnCmd : function(btn){
+        this.relayCmd(btn.itemId);
+    },
+
+    /**
+     * Executes a Midas editor command on the editor document and performs necessary focus and
+     * toolbar updates. <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    relayCmd : function(cmd, value){
+        (function(){
+            this.focus();
+            this.execCmd(cmd, value);
+            this.updateToolbar();
+        }).defer(10, this);
+    },
+
+    /**
+     * Executes a Midas editor command directly on the editor document.
+     * For visual commands, you should use {@link #relayCmd} instead.
+     * <b>This should only be called after the editor is initialized.</b>
+     * @param {String} cmd The Midas command
+     * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
+     */
+    execCmd : function(cmd, value){
+        this.doc.execCommand(cmd, false, value === undefined ? null : value);
+        this.syncValue();
+    },
+
+    // private
+    applyCommand : function(e){
+        if(e.ctrlKey){
+            var c = e.getCharCode(), cmd;
+            if(c > 0){
+                c = String.fromCharCode(c);
+                switch(c){
+                    case 'b':
+                        cmd = 'bold';
+                    break;
+                    case 'i':
+                        cmd = 'italic';
+                    break;
+                    case 'u':
+                        cmd = 'underline';
+                    break;
+                }
+                if(cmd){
+                    this.win.focus();
+                    this.execCmd(cmd);
+                    this.deferFocus();
+                    e.preventDefault();
+                }
+            }
+        }
+    },
+
+    /**
+     * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
+     * to insert text.
+     * @param {String} text
+     */
+    insertAtCursor : function(text){
+        if(!this.activated){
+            return;
+        }
+        if(Ext.isIE){
+            this.win.focus();
+            var r = this.doc.selection.createRange();
+            if(r){
+                r.collapse(true);
+                r.pasteHTML(text);
+                this.syncValue();
+                this.deferFocus();
+            }
+        }else if(Ext.isGecko || Ext.isOpera){
+            this.win.focus();
+            this.execCmd('InsertHTML', text);
+            this.deferFocus();
+        }else if(Ext.isWebKit){
+            this.execCmd('InsertText', text);
+            this.deferFocus();
+        }
+    },
+
+    // private
+    fixKeys : function(){ // load time branching for fastest keydown performance
+        if(Ext.isIE){
+            return function(e){
+                var k = e.getKey(), r;
+                if(k == e.TAB){
+                    e.stopEvent();
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        r.collapse(true);
+                        r.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
+                        this.deferFocus();
+                    }
+                }else if(k == e.ENTER){
+                    r = this.doc.selection.createRange();
+                    if(r){
+                        var target = r.parentElement();
+                        if(!target || target.tagName.toLowerCase() != 'li'){
+                            e.stopEvent();
+                            r.pasteHTML('<br />');
+                            r.collapse(false);
+                            r.select();
+                        }
+                    }
+                }
+            };
+        }else if(Ext.isOpera){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.win.focus();
+                    this.execCmd('InsertHTML','&nbsp;&nbsp;&nbsp;&nbsp;');
+                    this.deferFocus();
+                }
+            };
+        }else if(Ext.isWebKit){
+            return function(e){
+                var k = e.getKey();
+                if(k == e.TAB){
+                    e.stopEvent();
+                    this.execCmd('InsertText','\t');
+                    this.deferFocus();
+                }
+             };
+        }
+    }(),
+
+    /**
+     * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>
+     * @return {Ext.Toolbar}
+     */
+    getToolbar : function(){
+        return this.tb;
+    },
+
+    /**
+     * Object collection of toolbar tooltips for the buttons in the editor. The key
+     * is the command id associated with that button and the value is a valid QuickTips object.
+     * For example:
+<pre><code>
+{
+    bold : {
+        title: 'Bold (Ctrl+B)',
+        text: 'Make the selected text bold.',
+        cls: 'x-html-editor-tip'
+    },
+    italic : {
+        title: 'Italic (Ctrl+I)',
+        text: 'Make the selected text italic.',
+        cls: 'x-html-editor-tip'
+    },
+    ...
+</code></pre>
+    * @type Object
+     */
+    buttonTips : {
+        bold : {
+            title: 'Bold (Ctrl+B)',
+            text: 'Make the selected text bold.',
+            cls: 'x-html-editor-tip'
+        },
+        italic : {
+            title: 'Italic (Ctrl+I)',
+            text: 'Make the selected text italic.',
+            cls: 'x-html-editor-tip'
+        },
+        underline : {
+            title: 'Underline (Ctrl+U)',
+            text: 'Underline the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        increasefontsize : {
+            title: 'Grow Text',
+            text: 'Increase the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        decreasefontsize : {
+            title: 'Shrink Text',
+            text: 'Decrease the font size.',
+            cls: 'x-html-editor-tip'
+        },
+        backcolor : {
+            title: 'Text Highlight Color',
+            text: 'Change the background color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        forecolor : {
+            title: 'Font Color',
+            text: 'Change the color of the selected text.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyleft : {
+            title: 'Align Text Left',
+            text: 'Align text to the left.',
+            cls: 'x-html-editor-tip'
+        },
+        justifycenter : {
+            title: 'Center Text',
+            text: 'Center text in the editor.',
+            cls: 'x-html-editor-tip'
+        },
+        justifyright : {
+            title: 'Align Text Right',
+            text: 'Align text to the right.',
+            cls: 'x-html-editor-tip'
+        },
+        insertunorderedlist : {
+            title: 'Bullet List',
+            text: 'Start a bulleted list.',
+            cls: 'x-html-editor-tip'
+        },
+        insertorderedlist : {
+            title: 'Numbered List',
+            text: 'Start a numbered list.',
+            cls: 'x-html-editor-tip'
+        },
+        createlink : {
+            title: 'Hyperlink',
+            text: 'Make the selected text a hyperlink.',
+            cls: 'x-html-editor-tip'
+        },
+        sourceedit : {
+            title: 'Source Edit',
+            text: 'Switch to source editing mode.',
+            cls: 'x-html-editor-tip'
+        }
+    }
+
+    // hide stuff that is not compatible
+    /**
+     * @event blur
+     * @hide
+     */
+    /**
+     * @event change
+     * @hide
+     */
+    /**
+     * @event focus
+     * @hide
+     */
+    /**
+     * @event specialkey
+     * @hide
+     */
+    /**
+     * @cfg {String} fieldClass @hide
+     */
+    /**
+     * @cfg {String} focusClass @hide
+     */
+    /**
+     * @cfg {String} autoCreate @hide
+     */
+    /**
+     * @cfg {String} inputType @hide
+     */
+    /**
+     * @cfg {String} invalidClass @hide
+     */
+    /**
+     * @cfg {String} invalidText @hide
+     */
+    /**
+     * @cfg {String} msgFx @hide
+     */
+    /**
+     * @cfg {String} validateOnBlur @hide
+     */
+    /**
+     * @cfg {Boolean} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} applyTo @hide
+     */
+    /**
+     * @cfg {String} autoHeight  @hide
+     */
+    /**
+     * @cfg {String} autoWidth  @hide
+     */
+    /**
+     * @cfg {String} cls  @hide
+     */
+    /**
+     * @cfg {String} disabled  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} msgTarget  @hide
+     */
+    /**
+     * @cfg {String} readOnly  @hide
+     */
+    /**
+     * @cfg {String} style  @hide
+     */
+    /**
+     * @cfg {String} validationDelay  @hide
+     */
+    /**
+     * @cfg {String} validationEvent  @hide
+     */
+    /**
+     * @cfg {String} tabIndex  @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method validate
+     * @hide
+     */
+    /**
+     * @event valid
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+    /**
+     * @cfg keys
+     * @hide
+     */
+});
+Ext.reg('htmleditor', Ext.form.HtmlEditor);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Label.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Label.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Label.js	(revision 625)
@@ -0,0 +1,64 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Label
+ * @extends Ext.BoxComponent
+ * Basic Label field.
+ * @constructor
+ * Creates a new Label
+ * @param {Ext.Element/String/Object} config The configuration options.  If an element is passed, it is set as the internal
+ * element and its id used as the component id.  If a string is passed, it is assumed to be the id of an existing element
+ * and is used as the component id.  Otherwise, it is assumed to be a standard config object and is applied to the component.
+ * @xtype label
+ */
+Ext.form.Label = Ext.extend(Ext.BoxComponent, {
+    /**
+     * @cfg {String} text The plain text to display within the label (defaults to ''). If you need to include HTML
+     * tags within the label's innerHTML, use the {@link #html} config instead.
+     */
+    /**
+     * @cfg {String} forId The id of the input element to which this label will be bound via the standard HTML 'for'
+     * attribute. If not specified, the attribute will not be added to the label.
+     */
+    /**
+     * @cfg {String} html An HTML fragment that will be used as the label's innerHTML (defaults to '').
+     * Note that if {@link #text} is specified it will take precedence and this value will be ignored.
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.el = document.createElement('label');
+            this.el.id = this.getId();
+            this.el.innerHTML = this.text ? Ext.util.Format.htmlEncode(this.text) : (this.html || '');
+            if(this.forId){
+                this.el.setAttribute('for', this.forId);
+            }
+        }
+        Ext.form.Label.superclass.onRender.call(this, ct, position);
+    },
+
+    /**
+     * Updates the label's innerHTML with the specified string.
+     * @param {String} text The new label text
+     * @param {Boolean} encode (optional) False to skip HTML-encoding the text when rendering it
+     * to the label (defaults to true which encodes the value). This might be useful if you want to include
+     * tags in the label's innerHTML rather than rendering them as string literals per the default logic.
+     * @return {Label} this
+     */
+    setText : function(t, encode){
+        var e = encode === false;
+        this[!e ? 'text' : 'html'] = t;
+        delete this[e ? 'text' : 'html'];
+        if(this.rendered){
+            this.el.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t;
+        }
+        return this;
+    }
+});
+
+Ext.reg('label', Ext.form.Label);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/NumberField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/NumberField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/NumberField.js	(revision 625)
@@ -0,0 +1,139 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.NumberField
+ * @extends Ext.form.TextField
+ * Numeric text field that provides automatic keystroke filtering and numeric validation.
+ * @constructor
+ * Creates a new NumberField
+ * @param {Object} config Configuration options
+ * @xtype numberfield
+ */
+Ext.form.NumberField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {RegExp} stripCharsRe @hide
+     */
+    /**
+     * @cfg {RegExp} maskRe @hide
+     */
+    /**
+     * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field")
+     */
+    fieldClass: "x-form-field x-form-num-field",
+    /**
+     * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true)
+     */
+    allowDecimals : true,
+    /**
+     * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.')
+     */
+    decimalSeparator : ".",
+    /**
+     * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2)
+     */
+    decimalPrecision : 2,
+    /**
+     * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true)
+     */
+    allowNegative : true,
+    /**
+     * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
+     */
+    minValue : Number.NEGATIVE_INFINITY,
+    /**
+     * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE)
+     */
+    maxValue : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}")
+     */
+    minText : "The minimum value for this field is {0}",
+    /**
+     * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}")
+     */
+    maxText : "The maximum value for this field is {0}",
+    /**
+     * @cfg {String} nanText Error text to display if the value is not a valid number.  For example, this can happen
+     * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number")
+     */
+    nanText : "{0} is not a valid number",
+    /**
+     * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789').
+     */
+    baseChars : "0123456789",
+
+    // private
+    initEvents : function(){
+        var allowed = this.baseChars + '';
+        if (this.allowDecimals) {
+            allowed += this.decimalSeparator;
+        }
+        if (this.allowNegative) {
+            allowed += '-';
+        }
+        this.maskRe = new RegExp('[' + Ext.escapeRe(allowed) + ']');
+        Ext.form.NumberField.superclass.initEvents.call(this);
+    },
+
+    // private
+    validateValue : function(value){
+        if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){
+            return false;
+        }
+        if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
+             return true;
+        }
+        value = String(value).replace(this.decimalSeparator, ".");
+        if(isNaN(value)){
+            this.markInvalid(String.format(this.nanText, value));
+            return false;
+        }
+        var num = this.parseValue(value);
+        if(num < this.minValue){
+            this.markInvalid(String.format(this.minText, this.minValue));
+            return false;
+        }
+        if(num > 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(v){
+    	v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, "."));
+        v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator);
+        return Ext.form.NumberField.superclass.setValue.call(this, v);
+    },
+
+    // private
+    parseValue : function(value){
+        value = parseFloat(String(value).replace(this.decimalSeparator, "."));
+        return isNaN(value) ? '' : value;
+    },
+
+    // private
+    fixPrecision : function(value){
+        var nan = isNaN(value);
+        if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
+           return nan ? '' : value;
+        }
+        return parseFloat(parseFloat(value).toFixed(this.decimalPrecision));
+    },
+
+    beforeBlur : function(){
+        var v = this.parseValue(this.getRawValue());
+        if(!Ext.isEmpty(v)){
+            this.setValue(this.fixPrecision(v));
+        }
+    }
+});
+Ext.reg('numberfield', Ext.form.NumberField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Radio.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Radio.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/Radio.js	(revision 625)
@@ -0,0 +1,81 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.Radio
+ * @extends Ext.form.Checkbox
+ * Single radio field.  Same as Checkbox, but provided as a convenience for automatically setting the input type.
+ * Radio grouping is handled automatically by the browser if you give each radio in a group the same name.
+ * @constructor
+ * Creates a new Radio
+ * @param {Object} config Configuration options
+ * @xtype radio
+ */
+Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
+    inputType: 'radio',
+
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    markInvalid : Ext.emptyFn,
+    /**
+     * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
+     * @method
+     */
+    clearInvalid : Ext.emptyFn,
+
+    /**
+     * If this radio is part of a group, it will return the selected value
+     * @return {String}
+     */
+    getGroupValue : function(){
+    	var p = this.el.up('form') || Ext.getBody();
+        var c = p.child('input[name='+this.el.dom.name+']:checked', true);
+        return c ? c.value : null;
+    },
+
+    // private
+    onClick : function(){
+    	if(this.el.dom.checked != this.checked){
+			var els = this.getCheckEl().select('input[name=' + this.el.dom.name + ']');
+			els.each(function(el){
+				if(el.dom.id == this.id){
+					this.setValue(true);
+				}else{
+					Ext.getCmp(el.dom.id).setValue(false);
+				}
+			}, this);
+		}
+    },
+
+    /**
+     * Sets either the checked/unchecked status of this Radio, or, if a string value
+     * is passed, checks a sibling Radio of the same name whose value is the value specified.
+     * @param value {String/Boolean} Checked value, or the value of the sibling radio button to check.
+     * @return {Ext.form.Field} this
+     */
+    setValue : function(v){
+    	if (typeof v == 'boolean') {
+            Ext.form.Radio.superclass.setValue.call(this, v);
+        } else {
+            var r = this.getCheckEl().child('input[name=' + this.el.dom.name + '][value=' + v + ']', true);
+            if(r){
+                Ext.getCmp(r.id).setValue(true);
+            }
+        }
+        return this;
+    },
+    
+    // private
+    getCheckEl: function(){
+        if(this.inGroup){
+            return this.el.up('.x-form-radio-group')
+        }
+        return this.el.up('form') || Ext.getBody();
+    }
+});
+Ext.reg('radio', Ext.form.Radio);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/RadioGroup.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/RadioGroup.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/RadioGroup.js	(revision 625)
@@ -0,0 +1,116 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.RadioGroup
+ * @extends Ext.form.CheckboxGroup
+ * A grouping container for {@link Ext.form.Radio} controls.
+ * @constructor
+ * Creates a new RadioGroup
+ * @param {Object} config Configuration options
+ * @xtype radiogroup
+ */
+Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
+    /**
+     * @cfg {Boolean} allowBlank True to allow every item in the group to be blank (defaults to true).
+     * If allowBlank = false and no items are selected at validation time, {@link @blankText} will
+     * be used as the error text.
+     */
+    allowBlank : true,
+    /**
+     * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails
+     * (defaults to 'You must select one item in this group')
+     */
+    blankText : 'You must select one item in this group',
+    
+    // private
+    defaultType : 'radio',
+    
+    // private
+    groupCls : 'x-form-radio-group',
+    
+    /**
+     * @event change
+     * Fires when the state of a child radio changes.
+     * @param {Ext.form.RadioGroup} this
+     * @param {Ext.form.Radio} checked The checked radio
+     */
+    
+    /**
+     * Gets the selected {@link Ext.form.Radio} in the group, if it exists.
+     * @return {Ext.form.Radio} The selected radio.
+     */
+    getValue : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        return out;
+    },
+    
+    /**
+     * Sets the checked radio in the group.
+     * @param {String/Ext.form.Radio} id The radio to check.
+     * @param {Boolean} value The value to set the radio.
+     * @return {Ext.form.RadioGroup} this
+     */
+    setValue : function(id, value){
+        if(this.rendered){
+            if(arguments.length > 1){
+                var f = this.getBox(id);
+                if(f){
+                    f.setValue(value);
+                    if(f.checked){
+                        this.eachItem(function(item){
+                            if (item !== f){
+                                item.setValue(false);
+                            }
+                        });
+                    }
+                }
+            }else{
+                this.setValueForItem(id);
+            }
+        }else{
+            this.values = arguments;
+        }
+        return this;
+    },
+    
+    // private
+    fireChecked : function(){
+        if(!this.checkTask){
+            this.checkTask = new Ext.util.DelayedTask(this.bufferChecked, this);
+        }
+        this.checkTask.delay(10);
+    },
+    
+    // private
+    bufferChecked : function(){
+        var out = null;
+        this.eachItem(function(item){
+            if(item.checked){
+                out = item;
+                return false;
+            }
+        });
+        this.fireEvent('change', this, out);
+    },
+    
+    onDestroy : function(){
+        if(this.checkTask){
+            this.checkTask.cancel();
+            this.checkTask = null;
+        }
+        Ext.form.RadioGroup.superclass.onDestroy.call(this);
+    }
+
+});
+
+Ext.reg('radiogroup', Ext.form.RadioGroup);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextArea.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextArea.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextArea.js	(revision 625)
@@ -0,0 +1,117 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.TextArea
+ * @extends Ext.form.TextField
+ * Multiline text field.  Can be used as a direct replacement for traditional textarea fields, plus adds
+ * support for auto-sizing.
+ * @constructor
+ * Creates a new TextArea
+ * @param {Object} config Configuration options
+ * @xtype textarea
+ */
+Ext.form.TextArea = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {Number} growMin The minimum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>60</tt>)
+     */
+    growMin : 60,
+    /**
+     * @cfg {Number} growMax The maximum height to allow when <tt>{@link Ext.form.TextField#grow grow}=true</tt>
+     * (defaults to <tt>1000</tt>)
+     */
+    growMax: 1000,
+    growAppend : '&#160;\n&#160;',
+    growPad : Ext.isWebKit ? -6 : 0,
+
+    enterIsSpecial : false,
+
+    /**
+     * @cfg {Boolean} preventScrollbars <tt>true</tt> to prevent scrollbars from appearing regardless of how much text is
+     * in the field (equivalent to setting overflow: hidden, defaults to <tt>false</tt>)
+     */
+    preventScrollbars: false,
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "textarea", style: "width:100px;height:60px;", autocomplete: "off"}</code></pre>
+     */
+
+    // private
+    onRender : function(ct, position){
+        if(!this.el){
+            this.defaultAutoCreate = {
+                tag: "textarea",
+                style:"width:100px;height:60px;",
+                autocomplete: "off"
+            };
+        }
+        Ext.form.TextArea.superclass.onRender.call(this, ct, position);
+        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(){
+        Ext.destroy(this.textSizeEl);
+        Ext.form.TextArea.superclass.onDestroy.call(this);
+    },
+
+    fireKey : function(e){
+        if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){
+            this.fireEvent("specialkey", this, e);
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        if(!e.isNavKeyPress() || e.getKey() == e.ENTER){
+            this.autoSize();
+        }
+        Ext.form.TextArea.superclass.onKeyUp.call(this, e);
+    },
+
+    /**
+     * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed.
+     * This only takes effect if grow = true, and fires the {@link #autosize} event if the height changes.
+     */
+    autoSize: function(){
+        if(!this.grow || !this.textSizeEl){
+            return;
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var ts = this.textSizeEl;
+        ts.innerHTML = '';
+        ts.appendChild(document.createTextNode(v));
+        v = ts.innerHTML;
+        Ext.fly(ts).setWidth(this.el.getWidth());
+        if(v.length < 1){
+            v = "&#160;&#160;";
+        }else{
+            v += this.growAppend;
+            if(Ext.isIE){
+                v = v.replace(/\n/g, '<br />');
+            }
+        }
+        ts.innerHTML = v;
+        var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin) + this.growPad);
+        if(h != this.lastHeight){
+            this.lastHeight = h;
+            this.el.setHeight(h);
+            this.fireEvent("autosize", this, h);
+        }
+    }
+});
+Ext.reg('textarea', Ext.form.TextArea);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TextField.js	(revision 625)
@@ -0,0 +1,491 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.TextField
+ * @extends Ext.form.Field
+ * <p>Basic text field.  Can be used as a direct replacement for traditional text inputs,
+ * or as the base class for more sophisticated input controls (like {@link Ext.form.TextArea}
+ * and {@link Ext.form.ComboBox}).</p>
+ * <p><b><u>Validation</u></b></p>
+ * <p>Field validation is processed in a particular order.  If validation fails at any particular
+ * step the validation routine halts.</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>1. Field specific validator</b>
+ * <div class="sub-desc">
+ * <p>If a field is configured with a <code>{@link Ext.form.TextField#validator validator}</code> function,
+ * it will be passed the current field value.  The <code>{@link Ext.form.TextField#validator validator}</code>
+ * function is expected to return boolean <tt>true</tt> if the value is valid or return a string to
+ * represent the invalid message if invalid.</p>
+ * </div></li>
+ * <li><b>2. Built in Validation</b>
+ * <div class="sub-desc">
+ * <p>Basic validation is affected with the following configuration properties:</p>
+ * <pre>
+ * <u>Validation</u>    <u>Invalid Message</u>
+ * <code>{@link Ext.form.TextField#allowBlank allowBlank}    {@link Ext.form.TextField#emptyText emptyText}</code>
+ * <code>{@link Ext.form.TextField#minLength minLength}     {@link Ext.form.TextField#minLengthText minLengthText}</code>
+ * <code>{@link Ext.form.TextField#maxLength maxLength}     {@link Ext.form.TextField#maxLengthText maxLengthText}</code>
+ * </pre>
+ * </div></li>
+ * <li><b>3. Preconfigured Validation Types (VTypes)</b>
+ * <div class="sub-desc">
+ * <p>Using VTypes offers a convenient way to reuse validation. If a field is configured with a
+ * <code>{@link Ext.form.TextField#vtype vtype}</code>, the corresponding {@link Ext.form.VTypes VTypes}
+ * validation function will be used for validation.  If invalid, either the field's
+ * <code>{@link Ext.form.TextField#vtypeText vtypeText}</code> or the VTypes vtype Text property will be
+ * used for the invalid message.  Keystrokes on the field will be filtered according to the VTypes
+ * vtype Mask property.</p>
+ * </div></li>
+ * <li><b>4. Field specific regex test</b>
+ * <div class="sub-desc">
+ * <p>Each field may also specify a <code>{@link Ext.form.TextField#regex regex}</code> test.
+ * The invalid message for this test is configured with
+ * <code>{@link Ext.form.TextField#regexText regexText}</code>.</p>
+ * </div></li>
+ * <li><b>Alter Validation Behavior</b>
+ * <div class="sub-desc">
+ * <p>Validation behavior for each field can be configured:</p><ul>
+ * <li><code>{@link Ext.form.TextField#invalidText invalidText}</code> : the default validation message to
+ * show if any validation step above does not provide a message when invalid</li>
+ * <li><code>{@link Ext.form.TextField#maskRe maskRe}</code> : filter out keystrokes before any validation occurs</li>
+ * <li><code>{@link Ext.form.TextField#stripCharsRe stripCharsRe}</code> : filter characters after being typed in,
+ * but before being validated</li>
+ * <li><code>{@link Ext.form.Field#invalidClass invalidClass}</code> : alternate style when invalid</li>
+ * <li><code>{@link Ext.form.Field#validateOnBlur validateOnBlur}</code>,
+ * <code>{@link Ext.form.Field#validationDelay validationDelay}</code>, and
+ * <code>{@link Ext.form.Field#validationEvent validationEvent}</code> : modify how/when validation is triggered</li>
+ * </ul>
+ * </div></li>
+ * </ul></div>
+ * @constructor
+ * Creates a new TextField
+ * @param {Object} config Configuration options
+ * @xtype textfield
+ */
+Ext.form.TextField = Ext.extend(Ext.form.Field,  {
+    /**
+     * @cfg {String} vtypeText A custom error message to display in place of the default message provided
+     * for the <b><code>{@link #vtype}</code></b> currently set for this field (defaults to <tt>''</tt>).  <b>Note</b>:
+     * only applies if <b><code>{@link #vtype}</code></b> is set, else ignored.
+     */
+    /**
+     * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
+     * before validation (defaults to <tt>null</tt>).
+     */
+    /**
+     * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
+     * (defaults to <tt>false</tt>)
+     */
+    grow : false,
+    /**
+     * @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>30</tt>)
+     */
+    growMin : 30,
+    /**
+     * @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
+     * to <tt>800</tt>)
+     */
+    growMax : 800,
+    /**
+     * @cfg {String} vtype A validation type name as defined in {@link Ext.form.VTypes} (defaults to <tt>null</tt>)
+     */
+    vtype : null,
+    /**
+     * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
+     * not match (defaults to <tt>null</tt>)
+     */
+    maskRe : null,
+    /**
+     * @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
+     * to <tt>false</tt>)
+     */
+    disableKeyFilter : false,
+    /**
+     * @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
+     * <tt>true</tt>)
+     */
+    allowBlank : true,
+    /**
+     * @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
+     */
+    minLength : 0,
+    /**
+     * @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE).
+     * This behavior is intended to provide instant feedback to the user by improving usability to allow pasting
+     * and editing or overtyping and back tracking. To restrict the maximum number of characters that can be
+     * entered into the field use <tt><b>{@link Ext.form.Field#autoCreate autoCreate}</b></tt> to add
+     * any attributes you want to a field, for example:<pre><code>
+var myField = new Ext.form.NumberField({
+    id: 'mobile',
+    anchor:'90%',
+    fieldLabel: 'Mobile',
+    maxLength: 16, // for validation
+    autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '10'}
+});
+</code></pre>
+     */
+    maxLength : Number.MAX_VALUE,
+    /**
+     * @cfg {String} minLengthText Error text to display if the <b><tt>{@link #minLength minimum length}</tt></b>
+     * validation fails (defaults to <tt>'The minimum length for this field is {minLength}'</tt>)
+     */
+    minLengthText : 'The minimum length for this field is {0}',
+    /**
+     * @cfg {String} maxLengthText Error text to display if the <b><tt>{@link #maxLength maximum length}</tt></b>
+     * validation fails (defaults to <tt>'The maximum length for this field is {maxLength}'</tt>)
+     */
+    maxLengthText : 'The maximum length for this field is {0}',
+    /**
+     * @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
+     * receives input focus (defaults to <tt>false</tt>)
+     */
+    selectOnFocus : false,
+    /**
+     * @cfg {String} blankText The error text to display if the <b><tt>{@link #allowBlank}</tt></b> validation
+     * fails (defaults to <tt>'This field is required'</tt>)
+     */
+    blankText : 'This field is required',
+    /**
+     * @cfg {Function} validator A custom validation function to be called during field validation
+     * (defaults to <tt>null</tt>). If specified, this function will be called first, allowing the
+     * developer to override the default validation process. This function will be passed the current
+     * field value and expected to return boolean <tt>true</tt> if the value is valid or a string
+     * error message if invalid.
+     */
+    validator : null,
+    /**
+     * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation
+     * (defaults to <tt>null</tt>). If the test fails, the field will be marked invalid using
+     * <b><tt>{@link #regexText}</tt></b>.
+     */
+    regex : null,
+    /**
+     * @cfg {String} regexText The error text to display if <b><tt>{@link #regex}</tt></b> is used and the
+     * test fails during validation (defaults to <tt>''</tt>)
+     */
+    regexText : '',
+    /**
+     * @cfg {String} emptyText The default text to place into an empty field (defaults to <tt>null</tt>).
+     * <b>Note</b>: that this value will be submitted to the server if this field is enabled and configured
+     * with a {@link #name}.
+     */
+    emptyText : null,
+    /**
+     * @cfg {String} emptyClass The CSS class to apply to an empty field to style the <b><tt>{@link #emptyText}</tt></b>
+     * (defaults to <tt>'x-form-empty-field'</tt>).  This class is automatically added and removed as needed
+     * depending on the current field value.
+     */
+    emptyClass : 'x-form-empty-field',
+
+    /**
+     * @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input
+     * field (defaults to <tt>false</tt>)
+     */
+
+    initComponent : function(){
+        Ext.form.TextField.superclass.initComponent.call(this);
+        this.addEvents(
+            /**
+             * @event autosize
+             * Fires when the <tt><b>{@link #autoSize}</b></tt> function is triggered. The field may or
+             * may not have actually changed size according to the default logic, but this event provides
+             * a hook for the developer to apply additional logic at runtime to resize the field if needed.
+             * @param {Ext.form.Field} this This text field
+             * @param {Number} width The new field width
+             */
+            'autosize',
+
+            /**
+             * @event keydown
+             * Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+            /**
+             * @event keyup
+             * Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keyup',
+            /**
+             * @event keypress
+             * Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
+             * is set to true.
+             * @param {Ext.form.TextField} this This text field
+             * @param {Ext.EventObject} e
+             */
+            'keypress'
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.form.TextField.superclass.initEvents.call(this);
+        if(this.validationEvent == 'keyup'){
+            this.validationTask = new Ext.util.DelayedTask(this.validate, this);
+            this.mon(this.el, 'keyup', this.filterValidation, this);
+        }
+        else if(this.validationEvent !== false){
+        	this.mon(this.el, this.validationEvent, this.validate, this, {buffer: this.validationDelay});
+        }
+        if(this.selectOnFocus || this.emptyText){
+            this.on('focus', this.preFocus, this);
+            
+            this.mon(this.el, 'mousedown', function(){
+                if(!this.hasFocus){
+                    this.el.on('mouseup', function(e){
+                        e.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.mon(this.el, 'keypress', this.filterKeys, this);
+        }
+        if(this.grow){
+        	this.mon(this.el, 'keyup', this.onKeyUpBuffered, this, {buffer: 50});
+			this.mon(this.el, 'click', this.autoSize, this);
+        }
+        if(this.enableKeyEvents){
+        	this.mon(this.el, 'keyup', this.onKeyUp, this);
+        	this.mon(this.el, 'keydown', this.onKeyDown, this);
+        	this.mon(this.el, 'keypress', this.onKeyPress, this);
+        }
+    },
+
+    processValue : function(value){
+        if(this.stripCharsRe){
+            var newValue = value.replace(this.stripCharsRe, '');
+            if(newValue !== value){
+                this.setRawValue(newValue);
+                return newValue;
+            }
+        }
+        return value;
+    },
+
+    filterValidation : function(e){
+        if(!e.isNavKeyPress()){
+            this.validationTask.delay(this.validationDelay);
+        }
+    },
+    
+    //private
+    onDisable: function(){
+        Ext.form.TextField.superclass.onDisable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = 'on';
+        }
+    },
+    
+    //private
+    onEnable: function(){
+        Ext.form.TextField.superclass.onEnable.call(this);
+        if(Ext.isIE){
+            this.el.dom.unselectable = '';
+        }
+    },
+
+    // private
+    onKeyUpBuffered : function(e){
+        if(!e.isNavKeyPress()){
+            this.autoSize();
+        }
+    },
+
+    // private
+    onKeyUp : function(e){
+        this.fireEvent('keyup', this, e);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', this, e);
+    },
+
+    // private
+    onKeyPress : function(e){
+        this.fireEvent('keypress', this, e);
+    },
+
+    /**
+     * Resets the current field value to the originally-loaded value and clears any validation messages.
+     * Also adds <tt><b>{@link #emptyText}</b></tt> and <tt><b>{@link #emptyClass}</b></tt> if the
+     * original value was blank.
+     */
+    reset : function(){
+        Ext.form.TextField.superclass.reset.call(this);
+        this.applyEmptyText();
+    },
+
+    applyEmptyText : function(){
+        if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){
+            this.setRawValue(this.emptyText);
+            this.el.addClass(this.emptyClass);
+        }
+    },
+
+    // private
+    preFocus : function(){
+        var el = this.el;
+        if(this.emptyText){
+            if(el.dom.value == this.emptyText){
+                this.setRawValue('');
+            }
+            el.removeClass(this.emptyClass);
+        }
+        if(this.selectOnFocus){
+            (function(){
+                el.dom.select();
+            }).defer(this.inEditor && Ext.isIE ? 50 : 0);    
+        }
+    },
+
+    // private
+    postBlur : function(){
+        this.applyEmptyText();
+    },
+
+    // private
+    filterKeys : function(e){
+        // special keys don't generate charCodes, so leave them alone
+        if(e.ctrlKey || e.isSpecialKey()){
+            return;
+        }
+        
+        if(!this.maskRe.test(String.fromCharCode(e.getCharCode()))){
+            e.stopEvent();
+        }
+    },
+
+    setValue : function(v){
+        if(this.emptyText && this.el && !Ext.isEmpty(v)){
+            this.el.removeClass(this.emptyClass);
+        }
+        Ext.form.TextField.superclass.setValue.apply(this, arguments);
+        this.applyEmptyText();
+        this.autoSize();
+        return this;
+    },
+
+    /**
+     * Validates a value according to the field's validation rules and marks the field as invalid
+     * if the validation fails
+     * @param {Mixed} value The value to validate
+     * @return {Boolean} True if the value is valid, else false
+     */
+    validateValue : function(value){
+        if(Ext.isFunction(this.validator)){
+            var msg = this.validator(value);
+            if(msg !== true){
+                this.markInvalid(msg);
+                return false;
+            }
+        }
+        if(value.length < 1 || value === this.emptyText){ // if it's blank
+             if(this.allowBlank){
+                 this.clearInvalid();
+                 return true;
+             }else{
+                 this.markInvalid(this.blankText);
+                 return false;
+             }
+        }
+        if(value.length < this.minLength){
+            this.markInvalid(String.format(this.minLengthText, this.minLength));
+            return false;
+        }
+        if(value.length > this.maxLength){
+            this.markInvalid(String.format(this.maxLengthText, this.maxLength));
+            return false;
+        }	
+        if(this.vtype){
+            var vt = Ext.form.VTypes;
+            if(!vt[this.vtype](value, this)){
+                this.markInvalid(this.vtypeText || vt[this.vtype +'Text']);
+                return false;
+            }
+        }
+        if(this.regex && !this.regex.test(value)){
+            this.markInvalid(this.regexText);
+            return false;
+        }
+        return true;
+    },
+
+    /**
+     * Selects text in this field
+     * @param {Number} start (optional) The index where the selection should start (defaults to 0)
+     * @param {Number} end (optional) The index where the selection should end (defaults to the text length)
+     */
+    selectText : function(start, end){
+        var v = this.getRawValue();
+        var doFocus = false;
+        if(v.length > 0){
+            start = start === undefined ? 0 : start;
+            end = end === undefined ? v.length : end;
+            var d = this.el.dom;
+            if(d.setSelectionRange){
+                d.setSelectionRange(start, end);
+            }else if(d.createTextRange){
+                var range = d.createTextRange();
+                range.moveStart('character', start);
+                range.moveEnd('character', end-v.length);
+                range.select();
+            }
+            doFocus = Ext.isGecko || Ext.isOpera;
+        }else{
+            doFocus = true;
+        }
+        if(doFocus){
+            this.focus();
+        }
+    },
+
+    /**
+     * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed.
+     * This only takes effect if <tt><b>{@link #grow}</b> = true</tt>, and fires the {@link #autosize} event.
+     */
+    autoSize : function(){
+        if(!this.grow || !this.rendered){
+            return;
+        }
+        if(!this.metrics){
+            this.metrics = Ext.util.TextMetrics.createInstance(this.el);
+        }
+        var el = this.el;
+        var v = el.dom.value;
+        var d = document.createElement('div');
+        d.appendChild(document.createTextNode(v));
+        v = d.innerHTML;
+        d = null;
+        Ext.removeNode(d);
+        v += '&#160;';
+        var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + /* add extra padding */ 10, this.growMin));
+        this.el.setWidth(w);
+        this.fireEvent('autosize', this, w);
+    },
+	
+	onDestroy: function(){
+		if(this.validationTask){
+			this.validationTask.cancel();
+			this.validationTask = null;
+		}
+		Ext.form.TextField.superclass.onDestroy.call(this);
+	}
+});
+Ext.reg('textfield', Ext.form.TextField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TimeField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TimeField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TimeField.js	(revision 625)
@@ -0,0 +1,146 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.TimeField
+ * @extends Ext.form.ComboBox
+ * Provides a time input field with a time dropdown and automatic time validation.  Example usage:
+ * <pre><code>
+new Ext.form.TimeField({
+    minValue: '9:00 AM',
+    maxValue: '6:00 PM',
+    increment: 30
+});
+</code></pre>
+ * @constructor
+ * Create a new TimeField
+ * @param {Object} config
+ * @xtype timefield
+ */
+Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
+    /**
+     * @cfg {Date/String} minValue
+     * The minimum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    minValue : null,
+    /**
+     * @cfg {Date/String} maxValue
+     * The maximum allowed time. Can be either a Javascript date object with a valid time value or a string 
+     * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to null).
+     */
+    maxValue : null,
+    /**
+     * @cfg {String} minText
+     * The error text to display when the date in the cell is before minValue (defaults to
+     * 'The time in this field must be equal to or after {0}').
+     */
+    minText : "The time in this field must be equal to or after {0}",
+    /**
+     * @cfg {String} maxText
+     * The error text to display when the time is after maxValue (defaults to
+     * 'The time in this field must be equal to or before {0}').
+     */
+    maxText : "The time in this field must be equal to or before {0}",
+    /**
+     * @cfg {String} invalidText
+     * The error text to display when the time in the field is invalid (defaults to
+     * '{value} is not a valid time').
+     */
+    invalidText : "{0} is not a valid time",
+    /**
+     * @cfg {String} format
+     * The default time format string which can be overriden for localization support.  The format must be
+     * valid according to {@link Date#parseDate} (defaults to 'g:i A', e.g., '3:15 PM').  For 24-hour time
+     * format try 'H:i' instead.
+     */
+    format : "g:i A",
+    /**
+     * @cfg {String} altFormats
+     * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
+     * format (defaults to 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H').
+     */
+    altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",
+    /**
+     * @cfg {Number} increment
+     * The number of minutes between each time value in the list (defaults to 15).
+     */
+    increment: 15,
+
+    // private override
+    mode: 'local',
+    // private override
+    triggerAction: 'all',
+    // private override
+    typeAhead: false,
+    
+    // private - This is the date to use when generating time values in the absence of either minValue
+    // or maxValue.  Using the current date causes DST issues on DST boundary dates, so this is an 
+    // arbitrary "safe" date that can be any date aside from DST boundary dates.
+    initDate: '1/1/2008',
+
+    // private
+    initComponent : function(){
+        if(typeof this.minValue == "string"){
+            this.minValue = this.parseDate(this.minValue);
+        }
+        if(typeof this.maxValue == "string"){
+            this.maxValue = this.parseDate(this.maxValue);
+        }
+
+        if(!this.store){
+            var min = this.parseDate(this.minValue) || new Date(this.initDate).clearTime();
+            var max = this.parseDate(this.maxValue) || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1);
+            var times = [];
+            while(min <= max){
+                times.push(min.dateFormat(this.format));
+                min = min.add('mi', this.increment);
+            }
+            this.store = times;
+        }
+        Ext.form.TimeField.superclass.initComponent.call(this);
+    },
+
+    // inherited docs
+    getValue : function(){
+        var v = Ext.form.TimeField.superclass.getValue.call(this);
+        return this.formatDate(this.parseDate(v)) || '';
+    },
+
+    // inherited docs
+    setValue : function(value){
+        return Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value)));
+    },
+
+    // private overrides
+    validateValue : Ext.form.DateField.prototype.validateValue,
+    parseDate : Ext.form.DateField.prototype.parseDate,
+    formatDate : Ext.form.DateField.prototype.formatDate,
+
+    // private
+    beforeBlur : function(){
+        var v = this.parseDate(this.getRawValue());
+        if(v){
+            this.setValue(v.dateFormat(this.format));
+        }
+        Ext.form.TimeField.superclass.beforeBlur.call(this);
+    }
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+    /**
+     * @hide
+     * @method autoSize
+     */
+});
+Ext.reg('timefield', Ext.form.TimeField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TriggerField.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TriggerField.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/TriggerField.js	(revision 625)
@@ -0,0 +1,328 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.TriggerField
+ * @extends Ext.form.TextField
+ * Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default).
+ * The trigger has no default action, so you must assign a function to implement the trigger click handler by
+ * overriding {@link #onTriggerClick}. You can create a TriggerField directly, as it renders exactly like a combobox
+ * for which you can provide a custom implementation.  For example:
+ * <pre><code>
+var trigger = new Ext.form.TriggerField();
+trigger.onTriggerClick = myTriggerFn;
+trigger.applyToMarkup('my-field');
+</code></pre>
+ *
+ * However, in general you will most likely want to use TriggerField as the base class for a reusable component.
+ * {@link Ext.form.DateField} and {@link Ext.form.ComboBox} are perfect examples of this.
+ * 
+ * @constructor
+ * Create a new TriggerField.
+ * @param {Object} config Configuration options (valid {@Ext.form.TextField} config options will also be applied
+ * to the base TextField)
+ * @xtype trigger
+ */
+Ext.form.TriggerField = Ext.extend(Ext.form.TextField,  {
+    /**
+     * @cfg {String} triggerClass
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the
+     * trigger element for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to act as the trigger button for a TriggerField.</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing, positioning
+     * and appearance of the trigger.  Defaults to:</p>
+     * <pre><code>{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}</code></pre>
+     */
+    /**
+     * @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
+     * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
+     * See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details.  Defaults to:</p>
+     * <pre><code>{tag: "input", type: "text", size: "16", autocomplete: "off"}</code></pre>
+     */
+    defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"},
+    /**
+     * @cfg {Boolean} hideTrigger <tt>true</tt> to hide the trigger element and display only the base
+     * text field (defaults to <tt>false</tt>)
+     */
+    hideTrigger:false,
+    /**
+     * @cfg {Boolean} editable <tt>false</tt> to prevent the user from typing text directly into the field,
+     * the field will only respond to a click on the trigger to set the value. (defaults to <tt>true</tt>)
+     */
+    editable: true,
+    /**
+     * @cfg {String} wrapFocusClass The class added to the to the wrap of the trigger element. Defaults to
+     * <tt>x-trigger-wrap-focus</tt>.
+     */
+    wrapFocusClass: 'x-trigger-wrap-focus',
+    /**
+     * @hide 
+     * @method autoSize
+     */
+    autoSize: Ext.emptyFn,
+    // private
+    monitorTab : true,
+    // private
+    deferHeight : true,
+    // private
+    mimicing : false,
+    
+    actionMode: 'wrap',
+
+    // private
+    onResize : function(w, h){
+        Ext.form.TriggerField.superclass.onResize.call(this, w, h);
+        if(typeof w == 'number'){
+            this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth()));
+        }
+        this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
+    },
+
+    // private
+    adjustSize : Ext.BoxComponent.prototype.adjustSize,
+
+    // private
+    getResizeEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    getPositionEl : function(){
+        return this.wrap;
+    },
+
+    // private
+    alignErrorIcon : function(){
+        if(this.wrap){
+            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
+        }
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.form.TriggerField.superclass.onRender.call(this, ct, position);
+
+        this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-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());
+        }
+        if(!this.editable){
+            this.editable = true;
+            this.setEditable(false);
+        }
+    },
+
+    afterRender : function(){
+        Ext.form.TriggerField.superclass.afterRender.call(this);
+    },
+
+    // private
+    initTrigger : function(){
+    	this.mon(this.trigger, 'click', this.onTriggerClick, this, {preventDefault:true});
+        this.trigger.addClassOnOver('x-form-trigger-over');
+        this.trigger.addClassOnClick('x-form-trigger-click');
+    },
+
+    // private
+    onDestroy : function(){
+		Ext.destroy(this.trigger, this.wrap);
+        if (this.mimicing){
+            Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        }
+        Ext.form.TriggerField.superclass.onDestroy.call(this);
+    },
+
+    // private
+    onFocus : function(){
+        Ext.form.TriggerField.superclass.onFocus.call(this);
+        if(!this.mimicing){
+            this.wrap.addClass(this.wrapFocusClass);
+            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);
+            }
+        }
+    },
+
+    // private
+    checkTab : function(e){
+        if(e.getKey() == e.TAB){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    onBlur : function(){
+        // do nothing
+    },
+
+    // private
+    mimicBlur : function(e){
+        if(!this.wrap.contains(e.target) && this.validateBlur(e)){
+            this.triggerBlur();
+        }
+    },
+
+    // private
+    triggerBlur : function(){
+        this.mimicing = false;
+        Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+        if(this.monitorTab && this.el){
+            this.el.un("keydown", this.checkTab, this);
+        }
+        Ext.form.TriggerField.superclass.onBlur.call(this);
+        if(this.wrap){
+            this.wrap.removeClass(this.wrapFocusClass);
+        }
+    },
+
+    beforeBlur : Ext.emptyFn, 
+    
+    /**
+     * Allow or prevent the user from directly editing the field text.  If false is passed,
+     * the user will only be able to modify the field using the trigger.  This method
+     * is the runtime equivalent of setting the 'editable' config option at config time.
+     * @param {Boolean} value True to allow the user to directly edit the field text
+     */
+    setEditable : function(value){
+        if(value == this.editable){
+            return;
+        }
+        this.editable = value;
+        if(!value){
+            this.el.addClass('x-trigger-noedit').on('click', this.onTriggerClick, this).dom.setAttribute('readOnly', true);
+        }else{
+            this.el.removeClass('x-trigger-noedit').un('click', this.onTriggerClick,  this).dom.removeAttribute('readOnly');
+        }
+    },
+
+    // private
+    // This should be overriden by any subclass that needs to check whether or not the field can be blurred.
+    validateBlur : function(e){
+        return true;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function.  See Ext.form.ComboBox and Ext.form.DateField for
+     * sample implementations.
+     * @method
+     * @param {EventObject} e
+     */
+    onTriggerClick : Ext.emptyFn
+
+    /**
+     * @cfg {Boolean} grow @hide
+     */
+    /**
+     * @cfg {Number} growMin @hide
+     */
+    /**
+     * @cfg {Number} growMax @hide
+     */
+});
+
+/**
+ * @class Ext.form.TwinTriggerField
+ * @extends Ext.form.TriggerField
+ * TwinTriggerField is not a public class to be used directly.  It is meant as an abstract base class
+ * to be extended by an implementing class.  For an example of implementing this class, see the custom
+ * SearchField implementation here:
+ * <a href="http://extjs.com/deploy/ext/examples/form/custom.html">http://extjs.com/deploy/ext/examples/form/custom.html</a>
+ */
+Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
+    /**
+     * @cfg {Mixed} triggerConfig
+     * <p>A {@link Ext.DomHelper DomHelper} config object specifying the structure of the trigger elements
+     * for this Field. (Optional).</p>
+     * <p>Specify this when you need a customized element to contain the two trigger elements for this Field.
+     * Each trigger element must be marked by the CSS class <tt>x-form-trigger</tt> (also see
+     * <tt>{@link #trigger1Class}</tt> and <tt>{@link #trigger2Class}</tt>).</p>
+     * <p>Note that when using this option, it is the developer's responsibility to ensure correct sizing,
+     * positioning and appearance of the triggers.</p>
+     */
+    /**
+     * @cfg {String} trigger1Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+    /**
+     * @cfg {String} trigger2Class
+     * An additional CSS class used to style the trigger button.  The trigger will always get the
+     * class <tt>'x-form-trigger'</tt> by default and <tt>triggerClass</tt> will be <b>appended</b> if specified.
+     */
+
+    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(index){
+        return this.triggers[index];
+    },
+
+    initTrigger : function(){
+        var ts = this.trigger.select('.x-form-trigger', true);
+        this.wrap.setStyle('overflow', 'hidden');
+        var triggerField = this;
+        ts.each(function(t, all, index){
+            t.hide = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = 'none';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            t.show = function(){
+                var w = triggerField.wrap.getWidth();
+                this.dom.style.display = '';
+                triggerField.el.setWidth(w-triggerField.trigger.getWidth());
+            };
+            var triggerIndex = 'Trigger'+(index+1);
+
+            if(this['hide'+triggerIndex]){
+                t.dom.style.display = 'none';
+            }
+            this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true});
+            t.addClassOnOver('x-form-trigger-over');
+            t.addClassOnClick('x-form-trigger-click');
+        }, this);
+        this.triggers = ts.elements;
+    },
+
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger1Click : Ext.emptyFn,
+    /**
+     * The function that should handle the trigger's click event.  This method does nothing by default
+     * until overridden by an implementing function. See {@link Ext.form.TriggerField#onTriggerClick}
+     * for additional information.  
+     * @method
+     * @param {EventObject} e
+     */
+    onTrigger2Click : Ext.emptyFn
+});
+Ext.reg('trigger', Ext.form.TriggerField);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/VTypes.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/VTypes.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/form/VTypes.js	(revision 625)
@@ -0,0 +1,135 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.form.VTypes
+ * <p>This is a singleton object which contains a set of commonly used field validation functions.
+ * The validations provided are basic and intended to be easily customizable and extended.</p>
+ * <p>To add custom VTypes specify the <code>{@link Ext.form.TextField#vtype vtype}</code> validation
+ * test function, and optionally specify any corresponding error text to display and any keystroke
+ * filtering mask to apply. For example:</p>
+ * <pre><code>
+// custom Vtype for vtype:'time'
+var timeTest = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
+Ext.apply(Ext.form.VTypes, {
+    //  vtype validation function
+    time: function(val, field) {
+        return timeTest.test(val);
+    },
+    // vtype Text property: The error text to display when the validation function returns false
+    timeText: 'Not a valid time.  Must be in the format "12:34 PM".',
+    // vtype Mask property: The keystroke filter mask
+    timeMask: /[\d\s:amp]/i
+});
+ * </code></pre>
+ * Another example: 
+ * <pre><code>
+// custom Vtype for vtype:'IPAddress'
+Ext.apply(Ext.form.VTypes, {
+    IPAddress:  function(v) {
+        return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
+    },
+    IPAddressText: 'Must be a numeric IP address',
+    IPAddressMask: /[\d\.]/i
+});
+ * </code></pre>
+ * @singleton
+ */
+Ext.form.VTypes = function(){
+    // closure these in so they are only created once.
+    var alpha = /^[a-zA-Z_]+$/;
+    var alphanum = /^[a-zA-Z0-9_]+$/;
+    var email = /^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;
+    var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+
+    // All these messages and functions are configurable
+    return {
+        /**
+         * The function used to validate email addresses.  Note that this is a very basic validation -- complete
+         * validation per the email RFC specifications is very complex and beyond the scope of this class, although
+         * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
+         * section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> 
+         * for additional information.  This implementation is intended to validate the following emails:<tt>
+         * 'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'
+         * </tt>.
+         * @param {String} value The email address
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'email' : function(v){
+            return email.test(v);
+        },
+        /**
+         * The error text to display when the email validation function returns false.  Defaults to:
+         * <tt>'This field should be an e-mail address in the format "user@example.com"'</tt>
+         * @type String
+         */
+        'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
+        /**
+         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for 
+         * information about more complex email validation. Defaults to:
+         * <tt>/[a-z0-9_\.\-@]/i</tt>
+         * @type RegExp
+         */
+        'emailMask' : /[a-z0-9_\.\-@]/i,
+
+        /**
+         * The function used to validate URLs
+         * @param {String} value The URL
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'url' : function(v){
+            return url.test(v);
+        },
+        /**
+         * The error text to display when the url validation function returns false.  Defaults to:
+         * <tt>'This field should be a URL in the format "http:/'+'/www.example.com"'</tt>
+         * @type String
+         */
+        'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"',
+        
+        /**
+         * The function used to validate alpha values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alpha' : function(v){
+            return alpha.test(v);
+        },
+        /**
+         * The error text to display when the alpha validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters and _'</tt>
+         * @type String
+         */
+        'alphaText' : 'This field should only contain letters and _',
+        /**
+         * The keystroke filter mask to be applied on alpha input.  Defaults to:
+         * <tt>/[a-z_]/i</tt>
+         * @type RegExp
+         */
+        'alphaMask' : /[a-z_]/i,
+
+        /**
+         * The function used to validate alphanumeric values
+         * @param {String} value The value
+         * @return {Boolean} true if the RegExp test passed, and false if not.
+         */
+        'alphanum' : function(v){
+            return alphanum.test(v);
+        },
+        /**
+         * The error text to display when the alphanumeric validation function returns false.  Defaults to:
+         * <tt>'This field should only contain letters, numbers and _'</tt>
+         * @type String
+         */
+        'alphanumText' : 'This field should only contain letters, numbers and _',
+        /**
+         * The keystroke filter mask to be applied on alphanumeric input.  Defaults to:
+         * <tt>/[a-z0-9_]/i</tt>
+         * @type RegExp
+         */
+        'alphanumMask' : /[a-z0-9_]/i
+    };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/AbstractSelectionModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/AbstractSelectionModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/AbstractSelectionModel.js	(revision 625)
@@ -0,0 +1,57 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.AbstractSelectionModel
+ * @extends Ext.util.Observable
+ * Abstract base class for grid SelectionModels.  It provides the interface that should be
+ * implemented by descendant classes.  This class should not be directly instantiated.
+ * @constructor
+ */
+Ext.grid.AbstractSelectionModel = function(){
+    this.locked = false;
+    Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable,  {
+    /**
+     * The GridPanel for which this SelectionModel is handling selection. Read-only.
+     * @type Object
+     * @property grid
+     */
+
+    /** @ignore Called by the grid automatically. Do not call directly. */
+    init : function(grid){
+        this.grid = grid;
+        this.initEvents();
+    },
+
+    /**
+     * Locks the selections.
+     */
+    lock : function(){
+        this.locked = true;
+    },
+
+    /**
+     * Unlocks the selections.
+     */
+    unlock : function(){
+        this.locked = false;
+    },
+
+    /**
+     * Returns true if the selections are locked.
+     * @return {Boolean}
+     */
+    isLocked : function(){
+        return this.locked;
+    },
+    
+    destroy: function(){
+        this.purgeListeners();
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CellSelectionModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CellSelectionModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CellSelectionModel.js	(revision 625)
@@ -0,0 +1,262 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.CellSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * This class provides the basic implementation for <i>single</i> <b>cell</b> selection in a grid.
+ * The object stored as the selection contains the following properties:
+ * <div class="mdetail-params"><ul>
+ * <li><b>cell</b> : see {@link #getSelectedCell} 
+ * <li><b>record</b> : Ext.data.record The {@link Ext.data.Record Record}
+ * which provides the data for the row containing the selection</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The object containing the configuration of this model.
+ */
+Ext.grid.CellSelectionModel = function(config){
+    Ext.apply(this, config);
+
+    this.selection = null;
+
+    this.addEvents(
+        /**
+	     * @event beforecellselect
+	     * Fires before a cell is selected, return false to cancel the selection.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "beforecellselect",
+        /**
+	     * @event cellselect
+	     * Fires when a cell is selected.
+	     * @param {SelectionModel} this
+	     * @param {Number} rowIndex The selected row index
+	     * @param {Number} colIndex The selected cell index
+	     */
+	    "cellselect",
+        /**
+	     * @event selectionchange
+	     * Fires when the active selection changes.
+	     * @param {SelectionModel} this
+	     * @param {Object} selection null for no selection or an object with two properties
+         * <div class="mdetail-params"><ul>
+         * <li><b>cell</b> : see {@link #getSelectedCell} 
+         * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record Record}
+         * which provides the data for the row containing the selection</p></li>
+         * </ul></div>
+	     */
+	    "selectionchange"
+    );
+
+    Ext.grid.CellSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel,  {
+
+    /** @ignore */
+    initEvents : function(){
+        this.grid.on("cellmousedown", this.handleMouseDown, this);
+        this.grid.getGridEl().on(Ext.EventManager.useKeydown ? "keydown" : "keypress", this.handleKeyDown, this);
+        var view = this.grid.view;
+        view.on("refresh", this.onViewChange, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("beforerowremoved", this.clearSelections, this);
+        view.on("beforerowsinserted", this.clearSelections, this);
+        if(this.grid.isEditor){
+            this.grid.on("beforeedit", this.beforeEdit,  this);
+        }
+    },
+
+	//private
+    beforeEdit : function(e){
+        this.select(e.row, e.column, false, true, e.record);
+    },
+
+	//private
+    onRowUpdated : function(v, index, r){
+        if(this.selection && this.selection.record == r){
+            v.onCellSelect(index, this.selection.cell[1]);
+        }
+    },
+
+	//private
+    onViewChange : function(){
+        this.clearSelections(true);
+    },
+
+	/**
+     * Returns an array containing the row and column indexes of the currently selected cell
+     * (e.g., [0, 0]), or null if none selected. The array has elements:
+     * <div class="mdetail-params"><ul>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The index of the selected row</p></li>
+     * <li><b>cellIndex</b> : Number<p class="sub-desc">The index of the selected cell. 
+     * Due to possible column reordering, the cellIndex should <b>not</b> be used as an
+     * index into the Record's data. Instead, use the cellIndex to determine the <i>name</i>
+     * of the selected cell and use the field name to retrieve the data value from the record:<pre><code>
+// get name
+var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
+// get data value based on name
+var data = record.get(fieldName);
+     * </code></pre></p></li>
+     * </ul></div>
+     * @return {Array} An array containing the row and column indexes of the selected cell, or null if none selected.
+	 */
+    getSelectedCell : function(){
+        return this.selection ? this.selection.cell : null;
+    },
+
+    /**
+     * If anything is selected, clears all selections and fires the selectionchange event.
+     * @param {Boolean} preventNotify <tt>true</tt> to prevent the gridview from
+     * being notified about the change.
+     */
+    clearSelections : function(preventNotify){
+        var s = this.selection;
+        if(s){
+            if(preventNotify !== true){
+                this.grid.view.onCellDeselect(s.cell[0], s.cell[1]);
+            }
+            this.selection = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selection ? true : false;
+    },
+
+    /** @ignore */
+    handleMouseDown : function(g, row, cell, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        this.select(row, cell);
+    },
+
+    /**
+     * Selects a cell.  Before selecting a cell, fires the
+     * {@link #beforecellselect} event.  If this check is satisfied the cell
+     * will be selected and followed up by  firing the {@link #cellselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} rowIndex The index of the row to select
+     * @param {Number} colIndex The index of the column to select
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     * @param {Boolean} preventFocus (optional) Whether to prevent the cell at
+     * the specified rowIndex / colIndex from being focused.
+     * @param {Ext.data.Record} r (optional) The record to select
+     */
+    select : function(rowIndex, colIndex, preventViewNotify, preventFocus, /*internal*/ r){
+        if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){
+            this.clearSelections();
+            r = r || this.grid.store.getAt(rowIndex);
+            this.selection = {
+                record : r,
+                cell : [rowIndex, colIndex]
+            };
+            if(!preventViewNotify){
+                var v = this.grid.getView();
+                v.onCellSelect(rowIndex, colIndex);
+                if(preventFocus !== true){
+                    v.focusCell(rowIndex, colIndex);
+                }
+            }
+            this.fireEvent("cellselect", this, rowIndex, colIndex);
+            this.fireEvent("selectionchange", this, this.selection);
+        }
+    },
+
+	//private
+    isSelectable : function(rowIndex, colIndex, cm){
+        return !cm.isHidden(colIndex);
+    },
+
+    /** @ignore */
+    handleKeyDown : function(e){
+        if(!e.isNavKeyPress()){
+            return;
+        }
+        var g = this.grid, s = this.selection;
+        if(!s){
+            e.stopEvent();
+            var cell = g.walkCells(0, 0, 1, this.isSelectable,  this);
+            if(cell){
+                this.select(cell[0], cell[1]);
+            }
+            return;
+        }
+        var sm = this;
+        var walk = function(row, col, step){
+            return g.walkCells(row, col, step, sm.isSelectable,  sm);
+        };
+        var k = e.getKey(), r = s.cell[0], c = s.cell[1];
+        var newCell;
+
+        switch(k){
+             case e.TAB:
+                 if(e.shiftKey){
+                     newCell = walk(r, c-1, -1);
+                 }else{
+                     newCell = walk(r, c+1, 1);
+                 }
+             break;
+             case e.DOWN:
+                 newCell = walk(r+1, c, 1);
+             break;
+             case e.UP:
+                 newCell = walk(r-1, c, -1);
+             break;
+             case e.RIGHT:
+                 newCell = walk(r, c+1, 1);
+             break;
+             case e.LEFT:
+                 newCell = walk(r, c-1, -1);
+             break;
+             case e.ENTER:
+                 if(g.isEditor && !g.editing){
+                    g.startEditing(r, c);
+                    e.stopEvent();
+                    return;
+                }
+             break;
+        }
+        if(newCell){
+            this.select(newCell[0], newCell[1]);
+            e.stopEvent();
+        }
+    },
+
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        if(k == e.TAB){
+            if(e.shiftKey){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+            e.stopEvent();
+        }else if(k == e.ENTER){
+            ed.completeEdit();
+            e.stopEvent();
+        }else if(k == e.ESC){
+        	e.stopEvent();
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CheckboxSelectionModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CheckboxSelectionModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/CheckboxSelectionModel.js	(revision 625)
@@ -0,0 +1,103 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.CheckboxSelectionModel
+ * @extends Ext.grid.RowSelectionModel
+ * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows.
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
+
+    /**
+     * @cfg {Boolean} checkOnly <tt>true</tt> if rows can only be selected by clicking on the
+     * checkbox column (defaults to <tt>false</tt>).
+     */
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the
+     * checkbox column.  Defaults to:<pre><code>
+     * '&lt;div class="x-grid3-hd-checker">&#38;#160;&lt;/div>'</tt>
+     * </code></pre>
+     * The default CSS class of <tt>'x-grid3-hd-checker'</tt> displays a checkbox in the header
+     * and provides support for automatic check all/none behavior on header click. This string
+     * can be replaced by any valid HTML fragment, including a simple text string (e.g.,
+     * <tt>'Select Rows'</tt>), but the automatic check all/none behavior will only work if the
+     * <tt>'x-grid3-hd-checker'</tt> class is supplied.
+     */
+    header: '<div class="x-grid3-hd-checker">&#160;</div>',
+    /**
+     * @cfg {Number} width The default width in pixels of the checkbox column (defaults to <tt>20</tt>).
+     */
+    width: 20,
+    /**
+     * @cfg {Boolean} sortable <tt>true</tt> if the checkbox column is sortable (defaults to
+     * <tt>false</tt>).
+     */
+    sortable: false,
+
+    // private
+    menuDisabled:true,
+    fixed:true,
+    dataIndex: '',
+    id: 'checker',
+
+    constructor: function(){
+        Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments);
+
+        if(this.checkOnly){
+            this.handleMouseDown = Ext.emptyFn;
+        }
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
+        this.grid.on('render', function(){
+            var view = this.grid.getView();
+            view.mainBody.on('mousedown', this.onMouseDown, this);
+            Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this);
+
+        }, this);
+    },
+
+    // private
+    onMouseDown : function(e, t){
+        if(e.button === 0 && t.className == 'x-grid3-row-checker'){ // Only fire if left-click
+            e.stopEvent();
+            var row = e.getTarget('.x-grid3-row');
+            if(row){
+                var index = row.rowIndex;
+                if(this.isSelected(index)){
+                    this.deselectRow(index);
+                }else{
+                    this.selectRow(index, true);
+                }
+            }
+        }
+    },
+
+    // private
+    onHdMouseDown : function(e, t){
+        if(t.className == 'x-grid3-hd-checker'){
+            e.stopEvent();
+            var hd = Ext.fly(t.parentNode);
+            var isChecked = hd.hasClass('x-grid3-hd-checker-on');
+            if(isChecked){
+                hd.removeClass('x-grid3-hd-checker-on');
+                this.clearSelections();
+            }else{
+                hd.addClass('x-grid3-hd-checker-on');
+                this.selectAll();
+            }
+        }
+    },
+
+    // private
+    renderer : function(v, p, record){
+        return '<div class="x-grid3-row-checker">&#160;</div>';
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/Column.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/Column.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/Column.js	(revision 625)
@@ -0,0 +1,406 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.Column
+ * <p>This class encapsulates column configuration data to be used in the initialization of a
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>While subclasses are provided to render data in different ways, this class renders a passed
+ * data field unchanged and is usually used for textual columns.</p>
+ */
+Ext.grid.Column = function(config){
+    Ext.apply(this, config);
+
+    if(typeof this.renderer == 'string'){
+        this.renderer = Ext.util.Format[this.renderer];
+    } else if(Ext.isObject(this.renderer)){
+        this.scope = this.renderer.scope;
+        this.renderer = this.renderer.fn;
+    }
+    this.renderer = this.renderer.createDelegate(this.scope || config);
+
+    if(this.id === undefined){
+        this.id = ++Ext.grid.Column.AUTO_ID;
+    }
+    if(this.editor){
+        this.editor = Ext.create(this.editor, 'textfield');
+    }
+};
+
+Ext.grid.Column.AUTO_ID = 0;
+
+Ext.grid.Column.prototype = {
+    /**
+     * @cfg {Boolean} editable Optional. Defaults to <tt>true</tt>, enabling the configured
+     * <tt>{@link #editor}</tt>.  Set to <tt>false</tt> to initially disable editing on this column.
+     * The initial configuration may be dynamically altered using
+     * {@link Ext.grid.ColumnModel}.{@link Ext.grid.ColumnModel#setEditable setEditable()}.
+     */
+    /**
+     * @cfg {String} id Optional. A name which identifies this column (defaults to the column's initial
+     * ordinal position.) The <tt>id</tt> is used to create a CSS <b>class</b> name which is applied to all
+     * table cells (including headers) in that column (in this context the <tt>id</tt> does not need to be
+     * unique). The class name takes the form of <pre>x-grid3-td-<b>id</b></pre>
+     * Header cells will also receive this class name, but will also have the class <pre>x-grid3-hd</pre>
+     * So, to target header cells, use CSS selectors such as:<pre>.x-grid3-hd-row .x-grid3-td-<b>id</b></pre>
+     * The {@link Ext.grid.GridPanel#autoExpandColumn} grid config option references the column via this
+     * unique identifier.
+     */
+    /**
+     * @cfg {String} header Optional. The header text to be used as innerHTML
+     * (html tags are accepted) to display in the Grid view.  <b>Note</b>: to
+     * have a clickable header with no text displayed use <tt>'&#160;'</tt>.
+     */
+    /**
+     * @cfg {Boolean} groupable Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to disable the header menu item to group by the column selected. Defaults to <tt>true</tt>,
+     * which enables the header menu group option.  Set to <tt>false</tt> to disable (but still show) the
+     * group option in the header menu for the column. See also <code>{@link #groupName}</code>.
+     */
+    /**
+     * @cfg {String} groupName Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text with which to prefix the group field value in the group header line.
+     * See also {@link #groupRenderer} and
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#showGroupName showGroupName}.
+     */
+    /**
+     * @cfg {Function} groupRenderer <p>Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the function used to format the grouping field value for display in the group
+     * {@link #groupName header}.  If a <tt><b>groupRenderer</b></tt> is not specified, the configured
+     * <tt><b>{@link #renderer}</b></tt> will be called; if a <tt><b>{@link #renderer}</b></tt> is also not specified
+     * the new value of the group field will be used.</p>
+     * <p>The called function (either the <tt><b>groupRenderer</b></tt> or <tt><b>{@link #renderer}</b></tt>) will be
+     * passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>v</b> : Object<p class="sub-desc">The new value of the group field.</p></li>
+     * <li><b>unused</b> : undefined<p class="sub-desc">Unused parameter.</p></li>
+     * <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">The column index of the group field.</p></li>
+     * <li><b>ds</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
+     * </ul></div></p>
+     * <p>The function should return a string value.</p>
+     */
+    /**
+     * @cfg {String} emptyGroupText Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option
+     * may be used to specify the text to display when there is an empty group value. Defaults to the
+     * {@link Ext.grid.GroupingView}.{@link Ext.grid.GroupingView#emptyGroupText emptyGroupText}.
+     */
+    /**
+     * @cfg {String} dataIndex <p><b>Required</b>. The name of the field in the
+     * grid's {@link Ext.data.Store}'s {@link Ext.data.Record} definition from
+     * which to draw the column's value.</p>
+     */
+    /**
+     * @cfg {Number} width
+     * Optional. The initial width in pixels of the column.
+     * The width of each column can also be affected if any of the following are configured:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#forceFit forceFit}</tt>
+     * <div class="sub-desc">
+     * <p>By specifying <tt>forceFit:true</tt>, {@link #fixed non-fixed width} columns will be
+     * re-proportioned (based on the relative initial widths) to fill the width of the grid so
+     * that no horizontal scrollbar is shown.</p>
+     * </div></li>
+     * <li>{@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#autoFill autoFill}</tt></li>
+     * <li>{@link Ext.grid.GridPanel}.<tt>{@link Ext.grid.GridPanel#minColumnWidth minColumnWidth}</tt></li>
+     * <br><p><b>Note</b>: when the width of each column is determined, a space on the right side
+     * is reserved for the vertical scrollbar.  The
+     * {@link Ext.grid.GridView}.<tt>{@link Ext.grid.GridView#scrollOffset scrollOffset}</tt>
+     * can be modified to reduce or eliminate the reserved offset.</p>
+     */
+    /**
+     * @cfg {Boolean} sortable Optional. <tt>true</tt> if sorting is to be allowed on this column.
+     * Defaults to the value of the {@link #defaultSortable} property.
+     * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}.
+     */
+    /**
+     * @cfg {Boolean} fixed Optional. <tt>true</tt> if the column width cannot be changed.  Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} resizable Optional. <tt>false</tt> to disable column resizing. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} menuDisabled Optional. <tt>true</tt> to disable the column menu. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {Boolean} hidden Optional. <tt>true</tt> to hide the column. Defaults to <tt>false</tt>.
+     */
+    /**
+     * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip.  If Quicktips
+     * are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the
+     * header's HTML title attribute. Defaults to ''.
+     */
+    /**
+     * @cfg {Mixed} renderer
+     * <p>For an alternative to specifying a renderer see <code>{@link #xtype}</code></p>
+     * <p>Optional. A renderer is an 'interceptor' method which can be used transform data (value,
+     * appearance, etc.) before it is rendered). This may be specified in either of three ways:
+     * <div class="mdetail-params"><ul>
+     * <li>A renderer function used to return HTML markup for a cell given the cell's data value.</li>
+     * <li>A string which references a property name of the {@link Ext.util.Format} class which
+     * provides a renderer function.</li>
+     * <li>An object specifying both the renderer function, and its execution scope (<tt><b>this</b></tt>
+     * reference) e.g.:<pre style="margin-left:1.2em"><code>
+{
+    fn: this.gridRenderer,
+    scope: this
+}
+</code></pre></li></ul></div>
+     * If not specified, the default renderer uses the raw data value.</p>
+     * <p>For information about the renderer function (passed parameters, etc.), see
+     * {@link Ext.grid.ColumnModel#setRenderer}. An example of specifying renderer function inline:</p><pre><code>
+var companyColumn = {
+   header: 'Company Name',
+   dataIndex: 'company',
+   renderer: function(value, metaData, record, rowIndex, colIndex, store) {
+      // provide the logic depending on business rules
+      // name of your own choosing to manipulate the cell depending upon
+      // the data in the underlying Record object.
+      if (value == 'whatever') {
+          //metaData.css : String : A CSS class name to add to the TD element of the cell.
+          //metaData.attr : String : An html attribute definition string to apply to
+          //                         the data container element within the table
+          //                         cell (e.g. 'style="color:red;"').
+          metaData.css = 'name-of-css-class-you-will-define';
+      }
+      return value;
+   }
+}
+     * </code></pre>
+     * See also {@link #scope}.
+     */
+    /**
+     * @cfg {String} xtype Optional. A String which references a predefined {@link Ext.grid.Column} subclass
+     * type which is preconfigured with an appropriate <code>{@link #renderer}</code> to be easily
+     * configured into a ColumnModel. The predefined {@link Ext.grid.Column} subclass types are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>gridcolumn</tt></b> : {@link Ext.grid.Column} (<b>Default</b>)<p class="sub-desc"></p></li>
+     * <li><b><tt>booleancolumn</tt></b> : {@link Ext.grid.BooleanColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>numbercolumn</tt></b> : {@link Ext.grid.NumberColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>datecolumn</tt></b> : {@link Ext.grid.DateColumn}<p class="sub-desc"></p></li>
+     * <li><b><tt>templatecolumn</tt></b> : {@link Ext.grid.TemplateColumn}<p class="sub-desc"></p></li>
+     * </ul></div>
+     * <p>Configuration properties for the specified <code>xtype</code> may be specified with
+     * the Column configuration properties, for example:</p>
+     * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    columns: [{
+        header: 'Last Updated',
+        dataIndex: 'lastChange',
+        width: 85,
+        sortable: true,
+        //renderer: Ext.util.Format.dateRenderer('m/d/Y'),
+        xtype: 'datecolumn', // use xtype instead of renderer
+        format: 'M/d/Y' // configuration property for {@link Ext.grid.DateColumn}
+    }, {
+        ...
+    }]
+});
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} scope Optional. The scope (<tt><b>this</b></tt> reference) in which to execute the
+     * renderer.  Defaults to the Column configuration object.
+     */
+    /**
+     * @cfg {String} align Optional. Set the CSS text-align property of the column.  Defaults to undefined.
+     */
+    /**
+     * @cfg {String} css Optional. An inline style definition string which is applied to all table cells in the column
+     * (excluding headers). Defaults to undefined.
+     */
+    /**
+     * @cfg {Boolean} hideable Optional. Specify as <tt>false</tt> to prevent the user from hiding this column
+     * (defaults to true).  To disallow column hiding globally for all columns in the grid, use
+     * {@link Ext.grid.GridPanel#enableColumnHide} instead.
+     */
+    /**
+     * @cfg {Ext.form.Field} editor Optional. The {@link Ext.form.Field} to use when editing values in this column
+     * if editing is supported by the grid. See <tt>{@link #editable}</tt> also.
+     */
+
+    // private. Used by ColumnModel to avoid reprocessing
+    isColumn : true,
+    /**
+     * Optional. A function which returns displayable data when passed the following parameters:
+     * <div class="mdetail-params"><ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container
+     * element <i>within</i> the table cell (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was
+     * extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record
+     * was extracted.</p></li>
+     * </ul></div>
+     * @property renderer
+     * @type Function
+     */
+    renderer : function(value){
+        if(typeof value == 'string' && value.length < 1){
+            return '&#160;';
+        }
+        return value;
+    },
+
+    // private
+    getEditor: function(rowIndex){
+        return this.editable !== false ? this.editor : null;
+    },
+
+    /**
+     * Returns the {@link Ext.Editor editor} defined for this column that was created to wrap the {@link Ext.form.Field Field}
+     * used to edit the cell.
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor}
+     */
+    getCellEditor: function(rowIndex){
+        var editor = this.getEditor(rowIndex);
+        if(editor){
+            if(!editor.startEdit){
+                if(!editor.gridEditor){
+                    editor.gridEditor = new Ext.grid.GridEditor(editor);
+                }
+                return editor.gridEditor;
+            }else if(editor.startEdit){
+                return editor;
+            }
+        }
+        return null;
+    }
+};
+
+/**
+ * @class Ext.grid.BooleanColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders boolean data fields.  See the {@link Ext.grid.ColumnModel#xtype xtype}
+ * config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} trueText
+     * The string returned by the renderer when the column value is not falsey (defaults to <tt>'true'</tt>).
+     */
+    trueText: 'true',
+    /**
+     * @cfg {String} falseText
+     * The string returned by the renderer when the column value is falsey (but not undefined) (defaults to
+     * <tt>'false'</tt>).
+     */
+    falseText: 'false',
+    /**
+     * @cfg {String} undefinedText
+     * The string returned by the renderer when the column value is undefined (defaults to <tt>'&#160;'</tt>).
+     */
+    undefinedText: '&#160;',
+
+    constructor: function(cfg){
+        Ext.grid.BooleanColumn.superclass.constructor.call(this, cfg);
+        var t = this.trueText, f = this.falseText, u = this.undefinedText;
+        this.renderer = function(v){
+            if(v === undefined){
+                return u;
+            }
+            if(!v || v === 'false'){
+                return f;
+            }
+            return t;
+        };
+    }
+});
+
+/**
+ * @class Ext.grid.NumberColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a numeric data field according to a {@link #format} string.  See the
+ * {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more details.</p>
+ */
+Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Ext.util.Format#number} to format a numeric value for this Column
+     * (defaults to <tt>'0,000.00'</tt>).
+     */
+    format : '0,000.00',
+    constructor: function(cfg){
+        Ext.grid.NumberColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.numberRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.DateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a passed date according to the default locale, or a configured
+ * {@link #format}. See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel}
+ * for more details.</p>
+ */
+Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String} format
+     * A formatting string as used by {@link Date#format} to format a Date for this Column
+     * (defaults to <tt>'m/d/Y'</tt>).
+     */
+    format : 'm/d/Y',
+    constructor: function(cfg){
+        Ext.grid.DateColumn.superclass.constructor.call(this, cfg);
+        this.renderer = Ext.util.Format.dateRenderer(this.format);
+    }
+});
+
+/**
+ * @class Ext.grid.TemplateColumn
+ * @extends Ext.grid.Column
+ * <p>A Column definition class which renders a value by processing a {@link Ext.data.Record Record}'s
+ * {@link Ext.data.Record#data data} using a {@link #tpl configured} {@link Ext.XTemplate XTemplate}.
+ * See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more
+ * details.</p>
+ */
+Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
+    /**
+     * @cfg {String/XTemplate} tpl
+     * An {@link Ext.XTemplate XTemplate}, or an XTemplate <i>definition string</i> to use to process a
+     * {@link Ext.data.Record Record}'s {@link Ext.data.Record#data data} to produce a column's rendered value.
+     */
+    constructor: function(cfg){
+        Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);
+        var tpl = typeof Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);
+        this.renderer = function(value, p, r){
+            return tpl.apply(r.data);
+        };
+        this.tpl = tpl;
+    }
+});
+
+/*
+ * @property types
+ * @type Object
+ * @member Ext.grid.Column
+ * @static
+ * <p>An object containing predefined Column classes keyed by a mnemonic code which may be referenced
+ * by the {@link Ext.grid.ColumnModel#xtype xtype} config option of ColumnModel.</p>
+ * <p>This contains the following properties</p><div class="mdesc-details"><ul>
+ * <li>gridcolumn : <b>{@link Ext.grid.Column Column constructor}</b></li>
+ * <li>booleancolumn : <b>{@link Ext.grid.BooleanColumn BooleanColumn constructor}</b></li>
+ * <li>numbercolumn : <b>{@link Ext.grid.NumberColumn NumberColumn constructor}</b></li>
+ * <li>datecolumn : <b>{@link Ext.grid.DateColumn DateColumn constructor}</b></li>
+ * <li>templatecolumn : <b>{@link Ext.grid.TemplateColumn TemplateColumn constructor}</b></li>
+ * </ul></div>
+ */
+Ext.grid.Column.types = {
+    gridcolumn : Ext.grid.Column,
+    booleancolumn: Ext.grid.BooleanColumn,
+    numbercolumn: Ext.grid.NumberColumn,
+    datecolumn: Ext.grid.DateColumn,
+    templatecolumn: Ext.grid.TemplateColumn
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnDD.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnDD.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnDD.js	(revision 625)
@@ -0,0 +1,199 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd);
+    if(hd2){
+        this.setHandleElId(Ext.id(hd));
+        this.setOuterHandleElId(Ext.id(hd2));
+    }
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, {
+    maxDragWidth: 120,
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var h = this.view.findHeaderCell(t);
+        if(h){
+            return {ddel: h.firstChild, header:h};
+        }
+        return false;
+    },
+
+    onInitDrag : function(e){
+        this.view.headersDisabled = true;
+        var clone = this.dragData.ddel.cloneNode(true);
+        clone.id = Ext.id();
+        clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px";
+        this.proxy.update(clone);
+        return true;
+    },
+
+    afterValidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    afterInvalidDrop : function(){
+        var v = this.view;
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    }
+});
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.HeaderDropZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    // split the proxies so they don't interfere with mouse events
+    this.proxyTop = Ext.DomHelper.append(document.body, {
+        cls:"col-move-top", html:"&#160;"
+    }, true);
+    this.proxyBottom = Ext.DomHelper.append(document.body, {
+        cls:"col-move-bottom", html:"&#160;"
+    }, true);
+    this.proxyTop.hide = this.proxyBottom.hide = function(){
+        this.setLeftTop(-100,-100);
+        this.setStyle("visibility", "hidden");
+    };
+    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
+    // temporarily disabled
+    //Ext.dd.ScrollManager.register(this.view.scroller.dom);
+    Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);
+};
+Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, {
+    proxyOffsets : [-4, -9],
+    fly: Ext.Element.fly,
+
+    getTargetFromEvent : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var cindex = this.view.findCellIndex(t);
+        if(cindex !== false){
+            return this.view.getHeaderCell(cindex);
+        }
+    },
+
+    nextVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.nextSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.nextSibling;
+        }
+        return null;
+    },
+
+    prevVisible : function(h){
+        var v = this.view, cm = this.grid.colModel;
+        h = h.prevSibling;
+        while(h){
+            if(!cm.isHidden(v.getCellIndex(h))){
+                return h;
+            }
+            h = h.prevSibling;
+        }
+        return null;
+    },
+
+    positionIndicator : function(h, n, e){
+        var x = Ext.lib.Event.getPageX(e);
+        var r = Ext.lib.Dom.getRegion(n.firstChild);
+        var px, pt, py = r.top + this.proxyOffsets[1];
+        if((r.right - x) <= (r.right-r.left)/2){
+            px = r.right+this.view.borderWidth;
+            pt = "after";
+        }else{
+            px = r.left;
+            pt = "before";
+        }
+
+        if(this.grid.colModel.isFixed(this.view.getCellIndex(n))){
+            return false;
+        }
+
+        px +=  this.proxyOffsets[0];
+        this.proxyTop.setLeftTop(px, py);
+        this.proxyTop.show();
+        if(!this.bottomOffset){
+            this.bottomOffset = this.view.mainHd.getHeight();
+        }
+        this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset);
+        this.proxyBottom.show();
+        return pt;
+    },
+
+    onNodeEnter : function(n, dd, e, data){
+        if(data.header != n){
+            this.positionIndicator(data.header, n, e);
+        }
+    },
+
+    onNodeOver : function(n, dd, e, data){
+        var result = false;
+        if(data.header != n){
+            result = this.positionIndicator(data.header, n, e);
+        }
+        if(!result){
+            this.proxyTop.hide();
+            this.proxyBottom.hide();
+        }
+        return result ? this.dropAllowed : this.dropNotAllowed;
+    },
+
+    onNodeOut : function(n, dd, e, data){
+        this.proxyTop.hide();
+        this.proxyBottom.hide();
+    },
+
+    onNodeDrop : function(n, dd, e, data){
+        var h = data.header;
+        if(h != n){
+            var cm = this.grid.colModel;
+            var x = Ext.lib.Event.getPageX(e);
+            var r = Ext.lib.Dom.getRegion(n.firstChild);
+            var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before";
+            var oldIndex = this.view.getCellIndex(h);
+            var newIndex = this.view.getCellIndex(n);
+            if(pt == "after"){
+                newIndex++;
+            }
+            if(oldIndex < newIndex){
+                newIndex--;
+            }
+            cm.moveColumn(oldIndex, newIndex);
+            this.grid.fireEvent("columnmove", oldIndex, newIndex);
+            return true;
+        }
+        return false;
+    }
+});
+
+
+Ext.grid.GridView.ColumnDragZone = function(grid, hd){
+    Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);
+    this.proxy.el.addClass('x-grid3-col-dd');
+};
+
+Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, {
+    handleMouseDown : function(e){
+
+    },
+
+    callHandleMouseDown : function(e){
+        Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnModel.js	(revision 625)
@@ -0,0 +1,592 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.ColumnModel
+ * @extends Ext.util.Observable
+ * <p>After the data has been read into the client side cache (<b>{@link Ext.data.Store Store}</b>),
+ * the ColumnModel is used to configure how and what parts of that data will be displayed in the
+ * vertical slices (columns) of the grid. The Ext.grid.ColumnModel Class is the default implementation
+ * of a ColumnModel used by implentations of {@link Ext.grid.GridPanel GridPanel}.</p>
+ * <p>Data is mapped into the store's records and then indexed into the ColumnModel using the
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt>:</p>
+ * <pre><code>
+{data source} == mapping ==> {data store} == <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> ==> {ColumnModel}
+ * </code></pre>
+ * <p>Each {@link Ext.grid.Column Column} in the grid's ColumnModel is configured with a
+ * <tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt> to specify how the data within
+ * each record in the store is indexed into the ColumnModel.</p>
+ * <p>There are two ways to initialize the ColumnModel class:</p>
+ * <p><u>Initialization Method 1: an Array</u></p>
+<pre><code>
+ var colModel = new Ext.grid.ColumnModel([
+    { header: "Ticker", width: 60, sortable: true},
+    { header: "Company Name", width: 150, sortable: true, id: 'company'},
+    { header: "Market Cap.", width: 100, sortable: true},
+    { header: "$ Sales", width: 100, sortable: true, renderer: money},
+    { header: "Employees", width: 100, sortable: true, resizable: false}
+ ]);
+ </code></pre>
+ * <p>The ColumnModel may be initialized with an Array of {@link Ext.grid.Column} column configuration
+ * objects to define the initial layout / display of the columns in the Grid. The order of each
+ * {@link Ext.grid.Column} column configuration object within the specified Array defines the initial
+ * order of the column display.  A Column's display may be initially hidden using the
+ * <tt>{@link Ext.grid.Column#hidden hidden}</tt></b> config property (and then shown using the column
+ * header menu).  Field's that are not included in the ColumnModel will not be displayable at all.</p>
+ * <p>How each column in the grid correlates (maps) to the {@link Ext.data.Record} field in the
+ * {@link Ext.data.Store Store} the column draws its data from is configured through the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b>.  If the
+ * <b><tt>{@link Ext.grid.Column#dataIndex dataIndex}</tt></b> is not explicitly defined (as shown in the
+ * example above) it will use the column configuration's index in the Array as the index.</p>
+ * <p>See <b><tt>{@link Ext.grid.Column}</tt></b> for additional configuration options for each column.</p>
+ * <p><u>Initialization Method 2: an Object</u></p>
+ * <p>In order to use configuration options from <tt>Ext.grid.ColumnModel</tt>, an Object may be used to
+ * initialize the ColumnModel.  The column configuration Array will be specified in the <tt><b>{@link #columns}</b></tt>
+ * config property. The <tt><b>{@link #defaults}</b></tt> config property can be used to apply defaults
+ * for all columns, e.g.:</p><pre><code>
+ var colModel = new Ext.grid.ColumnModel({
+    columns: [
+        { header: "Ticker", width: 60, menuDisabled: false},
+        { header: "Company Name", width: 150, id: 'company'},
+        { header: "Market Cap."},
+        { header: "$ Sales", renderer: money},
+        { header: "Employees", resizable: false}
+    ],
+    defaults: {
+        sortable: true,
+        menuDisabled: true,
+        width: 100
+    },
+    listeners: {
+        {@link #hiddenchange}: function(cm, colIndex, hidden) {
+            saveConfig(colIndex, hidden);
+        }
+    }
+});
+ </code></pre>
+ * <p>In both examples above, the ability to apply a CSS class to all cells in a column (including the
+ * header) is demonstrated through the use of the <b><tt>{@link Ext.grid.Column#id id}</tt></b> config
+ * option. This column could be styled by including the following css:</p><pre><code>
+ //add this css *after* the core css is loaded
+.x-grid3-td-company {
+    color: red; // entire column will have red font
+}
+// modify the header row only, adding an icon to the column header
+.x-grid3-hd-company {
+    background: transparent
+        url(../../resources/images/icons/silk/building.png)
+        no-repeat 3px 3px ! important;
+        padding-left:20px;
+}
+ </code></pre>
+ * Note that the "Company Name" column could be specified as the
+ * <b><tt>{@link Ext.grid.GridPanel}.{@link Ext.grid.GridPanel#autoExpandColumn autoExpandColumn}</tt></b>.
+ * @constructor
+ * @param {Mixed} config Specify either an Array of {@link Ext.grid.Column} configuration objects or specify
+ * a configuration Object (see introductory section discussion utilizing Initialization Method 2 above).
+ */
+Ext.grid.ColumnModel = function(config){
+    /**
+     * An Array of {@link Ext.grid.Column Column definition} objects representing the configuration
+     * of this ColumnModel.  See {@link Ext.grid.Column} for the configuration properties that may
+     * be specified.
+     * @property config
+     * @type Array
+     */
+    if(config.columns){
+        Ext.apply(this, config);
+        this.setConfig(config.columns, true);
+    }else{
+        this.setConfig(config, true);
+    }
+    this.addEvents(
+        /**
+         * @event widthchange
+         * Fires when the width of a column is programmaticially changed using
+         * <code>{@link #setColumnWidth}</code>.
+         * Note internal resizing suppresses the event from firing. See also
+         * {@link Ext.grid.GridPanel}.<code>{@link #columnresize}</code>.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Number} newWidth The new width
+         */
+        "widthchange",
+        /**
+         * @event headerchange
+         * Fires when the text of a header changes.
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {String} newText The new header text
+         */
+        "headerchange",
+        /**
+         * @event hiddenchange
+         * Fires when a column is hidden or "unhidden".
+         * @param {ColumnModel} this
+         * @param {Number} columnIndex The column index
+         * @param {Boolean} hidden true if hidden, false otherwise
+         */
+        "hiddenchange",
+        /**
+         * @event columnmoved
+         * Fires when a column is moved.
+         * @param {ColumnModel} this
+         * @param {Number} oldIndex
+         * @param {Number} newIndex
+         */
+        "columnmoved",
+        /**
+         * @event configchange
+         * Fires when the configuration is changed
+         * @param {ColumnModel} this
+         */
+        "configchange"
+    );
+    Ext.grid.ColumnModel.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, {
+    /**
+     * @cfg {Number} defaultWidth (optional) The width of columns which have no <tt>{@link #width}</tt>
+     * specified (defaults to <tt>100</tt>).  This property shall preferably be configured through the
+     * <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultWidth: 100,
+    /**
+     * @cfg {Boolean} defaultSortable (optional) Default sortable of columns which have no
+     * sortable specified (defaults to <tt>false</tt>).  This property shall preferably be configured
+     * through the <tt><b>{@link #defaults}</b></tt> config property.
+     */
+    defaultSortable: false,
+    /**
+     * @cfg {Array} columns An Array of object literals.  The config options defined by
+     * <b>{@link Ext.grid.Column}</b> are the options which may appear in the object literal for each
+     * individual column definition.
+     */
+    /**
+     * @cfg {Object} defaults Object literal which will be used to apply {@link Ext.grid.Column}
+     * configuration options to all <tt><b>{@link #columns}</b></tt>.  Configuration options specified with
+     * individual {@link Ext.grid.Column column} configs will supersede these <tt><b>{@link #defaults}</b></tt>.
+     */
+
+    /**
+     * Returns the id of the column at the specified index.
+     * @param {Number} index The column index
+     * @return {String} the id
+     */
+    getColumnId : function(index){
+        return this.config[index].id;
+    },
+
+    getColumnAt : function(index){
+        return this.config[index];
+    },
+
+    /**
+     * <p>Reconfigures this column model according to the passed Array of column definition objects.
+     * For a description of the individual properties of a column definition object, see the
+     * <a href="#Ext.grid.ColumnModel-configs">Config Options</a>.</p>
+     * <p>Causes the {@link #configchange} event to be fired. A {@link Ext.grid.GridPanel GridPanel}
+     * using this ColumnModel will listen for this event and refresh its UI automatically.</p>
+     * @param {Array} config Array of Column definition objects.
+     * @param {Boolean} initial Specify <tt>true</tt> to bypass cleanup which deletes the <tt>totalWidth</tt>
+     * and destroys existing editors.
+     */
+    setConfig : function(config, initial){
+        var i, c, len;
+        if(!initial){ // cleanup
+            delete this.totalWidth;
+            for(i = 0, len = this.config.length; i < len; i++){
+                c = this.config[i];
+                if(c.editor){
+                    c.editor.destroy();
+                }
+            }
+        }
+
+        // backward compatibility
+        this.defaults = Ext.apply({
+            width: this.defaultWidth,
+            sortable: this.defaultSortable
+        }, this.defaults);
+
+        this.config = config;
+        this.lookup = {};
+        // if no id, create one
+        for(i = 0, len = config.length; i < len; i++){
+            c = Ext.applyIf(config[i], this.defaults);
+            if(!c.isColumn){
+                var cls = Ext.grid.Column.types[c.xtype || 'gridcolumn'];
+                c = new cls(c);
+                config[i] = c;
+            }
+            this.lookup[c.id] = c;
+        }
+        if(!initial){
+            this.fireEvent('configchange', this);
+        }
+    },
+
+    /**
+     * Returns the column for a specified id.
+     * @param {String} id The column id
+     * @return {Object} the column
+     */
+    getColumnById : function(id){
+        return this.lookup[id];
+    },
+
+    /**
+     * Returns the index for a specified column id.
+     * @param {String} id The column id
+     * @return {Number} the index, or -1 if not found
+     */
+    getIndexById : function(id){
+        for(var i = 0, len = this.config.length; i < len; i++){
+            if(this.config[i].id == id){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Moves a column from one position to another.
+     * @param {Number} oldIndex The index of the column to move.
+     * @param {Number} newIndex The position at which to reinsert the coolumn.
+     */
+    moveColumn : function(oldIndex, newIndex){
+        var c = this.config[oldIndex];
+        this.config.splice(oldIndex, 1);
+        this.config.splice(newIndex, 0, c);
+        this.dataMap = null;
+        this.fireEvent("columnmoved", this, oldIndex, newIndex);
+    },
+
+    /**
+     * Returns the number of columns.
+     * @param {Boolean} visibleOnly Optional. Pass as true to only include visible columns.
+     * @return {Number}
+     */
+    getColumnCount : function(visibleOnly){
+        if(visibleOnly === true){
+            var c = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(!this.isHidden(i)){
+                    c++;
+                }
+            }
+            return c;
+        }
+        return this.config.length;
+    },
+
+    /**
+     * Returns the column configs that return true by the passed function that is called
+     * with (columnConfig, index)
+<pre><code>
+// returns an array of column config objects for all hidden columns
+var columns = grid.getColumnModel().getColumnsBy(function(c){
+  return c.hidden;
+});
+</code></pre>
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Array} result
+     */
+    getColumnsBy : function(fn, scope){
+        var r = [];
+        for(var i = 0, len = this.config.length; i < len; i++){
+            var c = this.config[i];
+            if(fn.call(scope||this, c, i) === true){
+                r[r.length] = c;
+            }
+        }
+        return r;
+    },
+
+    /**
+     * Returns true if the specified column is sortable.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isSortable : function(col){
+        return this.config[col].sortable;
+    },
+
+    /**
+     * Returns true if the specified column menu is disabled.
+     * @param {Number} col The column index
+     * @return {Boolean}
+     */
+    isMenuDisabled : function(col){
+        return !!this.config[col].menuDisabled;
+    },
+
+    /**
+     * Returns the rendering (formatting) function defined for the column.
+     * @param {Number} col The column index.
+     * @return {Function} The function used to render the cell. See {@link #setRenderer}.
+     */
+    getRenderer : function(col){
+        if(!this.config[col].renderer){
+            return Ext.grid.ColumnModel.defaultRenderer;
+        }
+        return this.config[col].renderer;
+    },
+
+    /**
+     * Sets the rendering (formatting) function for a column.  See {@link Ext.util.Format} for some
+     * default formatting functions.
+     * @param {Number} col The column index
+     * @param {Function} fn The function to use to process the cell's raw data
+     * to return HTML markup for the grid view. The render function is called with
+     * the following parameters:<ul>
+     * <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
+     * <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
+     * <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
+     * <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container element <i>within</i> the table cell
+     * (e.g. 'style="color:red;"').</p></li></ul></p></li>
+     * <li><b>record</b> : Ext.data.record<p class="sub-desc">The {@link Ext.data.Record} from which the data was extracted.</p></li>
+     * <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
+     * <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
+     * <li><b>store</b> : Ext.data.Store<p class="sub-desc">The {@link Ext.data.Store} object from which the Record was extracted.</p></li></ul>
+     */
+    setRenderer : function(col, fn){
+        this.config[col].renderer = fn;
+    },
+
+    /**
+     * Returns the width for the specified column.
+     * @param {Number} col The column index
+     * @return {Number}
+     */
+    getColumnWidth : function(col){
+        return this.config[col].width;
+    },
+
+    /**
+     * Sets the width for a column.
+     * @param {Number} col The column index
+     * @param {Number} width The new width
+     * @param {Boolean} suppressEvent True to suppress firing the <code>{@link #widthchange}</code>
+     * event. Defaults to false.
+     */
+    setColumnWidth : function(col, width, suppressEvent){
+        this.config[col].width = width;
+        this.totalWidth = null;
+        if(!suppressEvent){
+             this.fireEvent("widthchange", this, col, width);
+        }
+    },
+
+    /**
+     * Returns the total width of all columns.
+     * @param {Boolean} includeHidden True to include hidden column widths
+     * @return {Number}
+     */
+    getTotalWidth : function(includeHidden){
+        if(!this.totalWidth){
+            this.totalWidth = 0;
+            for(var i = 0, len = this.config.length; i < len; i++){
+                if(includeHidden || !this.isHidden(i)){
+                    this.totalWidth += this.getColumnWidth(i);
+                }
+            }
+        }
+        return this.totalWidth;
+    },
+
+    /**
+     * Returns the header for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnHeader : function(col){
+        return this.config[col].header;
+    },
+
+    /**
+     * Sets the header for a column.
+     * @param {Number} col The column index
+     * @param {String} header The new header
+     */
+    setColumnHeader : function(col, header){
+        this.config[col].header = header;
+        this.fireEvent("headerchange", this, col, header);
+    },
+
+    /**
+     * Returns the tooltip for the specified column.
+     * @param {Number} col The column index
+     * @return {String}
+     */
+    getColumnTooltip : function(col){
+            return this.config[col].tooltip;
+    },
+    /**
+     * Sets the tooltip for a column.
+     * @param {Number} col The column index
+     * @param {String} tooltip The new tooltip
+     */
+    setColumnTooltip : function(col, tooltip){
+            this.config[col].tooltip = tooltip;
+    },
+
+    /**
+     * Returns the dataIndex for the specified column.
+<pre><code>
+// Get field name for the column
+var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
+</code></pre>
+     * @param {Number} col The column index
+     * @return {String} The column's dataIndex
+     */
+    getDataIndex : function(col){
+        return this.config[col].dataIndex;
+    },
+
+    /**
+     * Sets the dataIndex for a column.
+     * @param {Number} col The column index
+     * @param {String} dataIndex The new dataIndex
+     */
+    setDataIndex : function(col, dataIndex){
+        this.config[col].dataIndex = dataIndex;
+    },
+
+    /**
+     * Finds the index of the first matching column for the given dataIndex.
+     * @param {String} col The dataIndex to find
+     * @return {Number} The column index, or -1 if no match was found
+     */
+    findColumnIndex : function(dataIndex){
+        var c = this.config;
+        for(var i = 0, len = c.length; i < len; i++){
+            if(c[i].dataIndex == dataIndex){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * Returns true if the cell is editable.
+<pre><code>
+var store = new Ext.data.Store({...});
+var colModel = new Ext.grid.ColumnModel({
+  columns: [...],
+  isCellEditable: function(col, row) {
+    var record = store.getAt(row);
+    if (record.get('readonly')) { // replace with your condition
+      return false;
+    }
+    return Ext.grid.ColumnModel.prototype.isCellEditable.call(this, col, row);
+  }
+});
+var grid = new Ext.grid.GridPanel({
+  store: store,
+  colModel: colModel,
+  ...
+});
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Boolean}
+     */
+    isCellEditable : function(colIndex, rowIndex){
+        return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false;
+    },
+
+    /**
+     * Returns the editor defined for the cell/column.
+     * @param {Number} colIndex The column index
+     * @param {Number} rowIndex The row index
+     * @return {Ext.Editor} The {@link Ext.Editor Editor} that was created to wrap
+     * the {@link Ext.form.Field Field} used to edit the cell.
+     */
+    getCellEditor : function(colIndex, rowIndex){
+        return this.config[colIndex].getCellEditor(rowIndex);
+    },
+
+    /**
+     * Sets if a column is editable.
+     * @param {Number} col The column index
+     * @param {Boolean} editable True if the column is editable
+     */
+    setEditable : function(col, editable){
+        this.config[col].editable = editable;
+    },
+
+
+    /**
+     * Returns true if the column is hidden.
+     * @param {Number} colIndex The column index
+     * @return {Boolean}
+     */
+    isHidden : function(colIndex){
+        return this.config[colIndex].hidden;
+    },
+
+
+    /**
+     * Returns true if the column width cannot be changed
+     */
+    isFixed : function(colIndex){
+        return this.config[colIndex].fixed;
+    },
+
+    /**
+     * Returns true if the column can be resized
+     * @return {Boolean}
+     */
+    isResizable : function(colIndex){
+        return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true;
+    },
+    /**
+     * Sets if a column is hidden.
+<pre><code>
+myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
+</code></pre>
+     * @param {Number} colIndex The column index
+     * @param {Boolean} hidden True if the column is hidden
+     */
+    setHidden : function(colIndex, hidden){
+        var c = this.config[colIndex];
+        if(c.hidden !== hidden){
+            c.hidden = hidden;
+            this.totalWidth = null;
+            this.fireEvent("hiddenchange", this, colIndex, hidden);
+        }
+    },
+
+    /**
+     * Sets the editor for a column and destroys the prior editor.
+     * @param {Number} col The column index
+     * @param {Object} editor The editor object
+     */
+    setEditor : function(col, editor){
+        Ext.destroy(this.config[col].editor);
+        this.config[col].editor = editor;
+    },
+
+    /**
+     * Destroys this column model by purging any event listeners, and removing any editors.
+     */
+    destroy : function(){
+        for(var i = 0, c = this.config, len = c.length; i < len; i++){
+            Ext.destroy(c[i].editor);
+        }
+        this.purgeListeners();
+    }
+});
+
+// private
+Ext.grid.ColumnModel.defaultRenderer = function(value){
+    if(typeof value == "string" && value.length < 1){
+        return "&#160;";
+    }
+    return value;
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnSplitDD.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnSplitDD.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/ColumnSplitDD.js	(revision 625)
@@ -0,0 +1,62 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.SplitDragZone = function(grid, hd, hd2){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.setHandleElId(Ext.id(hd));
+    this.setOuterHandleElId(Ext.id(hd2));
+    this.scroll = false;
+};
+Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, {
+    fly: Ext.Element.fly,
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        this.proxy.setHeight(this.view.mainWrap.getHeight());
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var ev = Ext.EventObject.setEvent(e);
+        var t = this.fly(ev.getTarget());
+        if(t.hasClass("x-grid-split")){
+            this.cellIndex = this.view.getCellIndex(t.dom);
+            this.split = t.dom;
+            this.cm = this.grid.colModel;
+            if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.view.headersDisabled = false;
+        var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e));
+        var diff = endX - this.startPos;
+        this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/EditorGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/EditorGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/EditorGrid.js	(revision 625)
@@ -0,0 +1,291 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.EditorGridPanel
+ * @extends Ext.grid.GridPanel
+ * <p>This class extends the {@link Ext.grid.GridPanel GridPanel Class} to provide cell editing
+ * on selected {@link Ext.grid.Column columns}. The editable columns are specified by providing
+ * an {@link Ext.grid.ColumnModel#editor editor} in the {@link Ext.grid.Column column configuration}.</p>
+ * <p>Editability of columns may be controlled programatically by inserting an implementation
+ * of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into the
+ * {@link Ext.grid.ColumnModel ColumnModel}.</p>
+ * <p>Editing is performed on the value of the <i>field</i> specified by the column's
+ * <tt>{@link Ext.grid.ColumnModel#dataIndex dataIndex}</tt> in the backing {@link Ext.data.Store Store}
+ * (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display
+ * transformed data, this must be accounted for).</p>
+ * <p>If a value-to-description mapping is used to render a column, then a {@link Ext.form.Field#ComboBox ComboBox}
+ * which uses the same {@link Ext.form.Field#valueField value}-to-{@link Ext.form.Field#displayFieldField description}
+ * mapping would be an appropriate editor.</p>
+ * If there is a more complex mismatch between the visible data in the grid, and the editable data in
+ * the {@link Edt.data.Store Store}, then code to transform the data both before and after editing can be
+ * injected using the {@link #beforeedit} and {@link #afteredit} events.
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype editorgrid
+ */
+Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
+    /**
+     * @cfg {Number} clicksToEdit
+     * <p>The number of clicks on a cell required to display the cell's editor (defaults to 2).</p>
+     * <p>Setting this option to 'auto' means that mousedown <i>on the selected cell</i> starts
+     * editing that cell.</p>
+     */
+    clicksToEdit: 2,
+    
+    /**
+    * @cfg {Boolean} forceValidation
+    * True to force validation even if the value is unmodified (defaults to false)
+    */
+    forceValidation: false,
+
+    // private
+    isEditor : true,
+    // private
+    detectEdit: false,
+
+	/**
+	 * @cfg {Boolean} autoEncode
+	 * True to automatically HTML encode and decode values pre and post edit (defaults to false)
+	 */
+	autoEncode : false,
+
+	/**
+	 * @cfg {Boolean} trackMouseOver @hide
+	 */
+    // private
+    trackMouseOver: false, // causes very odd FF errors
+
+    // private
+    initComponent : function(){
+        Ext.grid.EditorGridPanel.superclass.initComponent.call(this);
+
+        if(!this.selModel){
+            /**
+             * @cfg {Object} selModel Any subclass of AbstractSelectionModel that will provide the selection model for
+             * the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified).
+             */
+            this.selModel = new Ext.grid.CellSelectionModel();
+        }
+
+        this.activeEditor = null;
+
+	    this.addEvents(
+            /**
+             * @event beforeedit
+             * Fires before cell editing is triggered. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value for the field being edited.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "beforeedit",
+            /**
+             * @event afteredit
+             * Fires after a cell is edited. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * </ul>
+             *
+             * <pre><code> 
+grid.on('afteredit', afterEdit, this );
+
+function afterEdit(e) {
+    // execute an XHR to send/commit data to the server, in callback do (if successful):
+    e.record.commit();
+}; 
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "afteredit",
+            /**
+             * @event validateedit
+             * Fires after a cell is edited, but before the value is set in the record. Return false
+             * to cancel the change. The edit event object has the following properties <br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>grid - This grid</li>
+             * <li>record - The record being edited</li>
+             * <li>field - The field name being edited</li>
+             * <li>value - The value being set</li>
+             * <li>originalValue - The original value for the field, before the edit.</li>
+             * <li>row - The grid row index</li>
+             * <li>column - The grid column index</li>
+             * <li>cancel - Set this to true to cancel the edit or return false from your handler.</li>
+             * </ul>
+             * Usage example showing how to remove the red triangle (dirty record indicator) from some
+             * records (not all).  By observing the grid's validateedit event, it can be cancelled if
+             * the edit occurs on a targeted row (for example) and then setting the field's new value
+             * in the Record directly:
+             * <pre><code> 
+grid.on('validateedit', function(e) {
+  var myTargetRow = 6;
+ 
+  if (e.row == myTargetRow) {
+    e.cancel = true;
+    e.record.data[e.field] = e.value;
+  }
+});
+             * </code></pre>
+             * @param {Object} e An edit event (see above for description)
+             */
+            "validateedit"
+        );
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.EditorGridPanel.superclass.initEvents.call(this);
+
+        this.on("bodyscroll", this.stopEditing, this, [true]);
+        this.on("columnresize", this.stopEditing, this, [true]);
+
+        if(this.clicksToEdit == 1){
+            this.on("cellclick", this.onCellDblClick, this);
+        }else {
+            if(this.clicksToEdit == 'auto' && this.view.mainBody){
+                this.view.mainBody.on("mousedown", this.onAutoEditClick, this);
+            }
+            this.on("celldblclick", this.onCellDblClick, this);
+        }
+    },
+
+    // private
+    onCellDblClick : function(g, row, col){
+        this.startEditing(row, col);
+    },
+
+    // private
+    onAutoEditClick : function(e, t){
+        if(e.button !== 0){
+            return;
+        }
+        var row = this.view.findRowIndex(t);
+        var col = this.view.findCellIndex(t);
+        if(row !== false && col !== false){
+            this.stopEditing();
+            if(this.selModel.getSelectedCell){ // cell sm
+                var sc = this.selModel.getSelectedCell();
+                if(sc && sc[0] === row && sc[1] === col){
+                    this.startEditing(row, col);
+                }
+            }else{
+                if(this.selModel.isSelected(row)){
+                    this.startEditing(row, col);
+                }
+            }
+        }
+    },
+
+    // private
+    onEditComplete : function(ed, value, startValue){
+        this.editing = false;
+        this.activeEditor = null;
+        ed.un("specialkey", this.selModel.onEditorKey, this.selModel);
+		var r = ed.record;
+        var field = this.colModel.getDataIndex(ed.col);
+        value = this.postEditValue(value, startValue, r, field);
+        if(this.forceValidation === true || String(value) !== String(startValue)){
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                originalValue: startValue,
+                value: value,
+                row: ed.row,
+                column: ed.col,
+                cancel:false
+            };
+            if(this.fireEvent("validateedit", e) !== false && !e.cancel && String(value) !== String(startValue)){
+                r.set(field, e.value);
+                delete e.cancel;
+                this.fireEvent("afteredit", e);
+            }
+        }
+        this.view.focusCell(ed.row, ed.col);
+    },
+
+    /**
+     * Starts editing the specified for the specified row/column
+     * @param {Number} rowIndex
+     * @param {Number} colIndex
+     */
+    startEditing : function(row, col){
+        this.stopEditing();
+        if(this.colModel.isCellEditable(col, row)){
+            this.view.ensureVisible(row, col, true);
+            var r = this.store.getAt(row);
+            var field = this.colModel.getDataIndex(col);
+            var e = {
+                grid: this,
+                record: r,
+                field: field,
+                value: r.data[field],
+                row: row,
+                column: col,
+                cancel:false
+            };
+            if(this.fireEvent("beforeedit", e) !== false && !e.cancel){
+                this.editing = true;
+                var ed = this.colModel.getCellEditor(col, row);
+                if(!ed){
+                    return;
+                }
+                if(!ed.rendered){
+                    ed.render(this.view.getEditorParent(ed));
+                }
+                (function(){ // complex but required for focus issues in safari, ie and opera
+                    ed.row = row;
+                    ed.col = col;
+                    ed.record = r;
+                    ed.on("complete", this.onEditComplete, this, {single: true});
+                    ed.on("specialkey", this.selModel.onEditorKey, this.selModel);
+                    /**
+                     * The currently active editor or null
+                      * @type Ext.Editor
+                     */
+                    this.activeEditor = ed;
+                    var v = this.preEditValue(r, field);
+                    ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v);
+                }).defer(50, this);
+            }
+        }
+    },
+
+    // private
+    preEditValue : function(r, field){
+        var value = r.data[field];
+        return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value;
+    },
+
+    // private
+	postEditValue : function(value, originalValue, r, field){
+		return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value;
+	},
+
+    /**
+     * Stops any active editing
+     * @param {Boolean} cancel (optional) True to cancel any changes
+     */
+    stopEditing : function(cancel){
+        if(this.activeEditor){
+            this.activeEditor[cancel === true ? 'cancelEdit' : 'completeEdit']();
+        }
+        this.activeEditor = null;
+    }
+});
+Ext.reg('editorgrid', Ext.grid.EditorGridPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridDD.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridDD.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridDD.js	(revision 625)
@@ -0,0 +1,95 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GridDragZone
+ * @extends Ext.dd.DragZone
+ * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations of two of the
+ * template methods of DragZone to enable dragging of the selected rows of a GridPanel.</p>
+ * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's template method implementations of
+ * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+ * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}</p> are able
+ * to process the {@link #getDragData data} which is provided.
+ */
+Ext.grid.GridDragZone = function(grid, config){
+    this.view = grid.getView();
+    Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config);
+    this.scroll = false;
+    this.grid = grid;
+    this.ddel = document.createElement('div');
+    this.ddel.className = 'x-grid-dd-wrap';
+};
+
+Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
+    ddGroup : "GridDD",
+
+    /**
+     * <p>The provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.</p>
+     * <p>This data is available for processing in the {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} methods of a cooperating {@link Ext.dd.DropZone DropZone}.</p>
+     * <p>The data object contains the following properties:<ul>
+     * <li><b>grid</b> : Ext.Grid.GridPanel<div class="sub-desc">The GridPanel from which the data is being dragged.</div></li>
+     * <li><b>ddel</b> : htmlElement<div class="sub-desc">An htmlElement which provides the "picture" of the data being dragged.</div></li>
+     * <li><b>rowIndex</b> : Number<div class="sub-desc">The index of the row which receieved the mousedown gesture which triggered the drag.</div></li>
+     * <li><b>selections</b> : Array<div class="sub-desc">An Array of the selected Records which are being dragged from the GridPanel.</div></li>
+     * </ul></p>
+     */
+    getDragData : function(e){
+        var t = Ext.lib.Event.getTarget(e);
+        var rowIndex = this.view.findRowIndex(t);
+        if(rowIndex !== false){
+            var sm = this.grid.selModel;
+            if(!sm.isSelected(rowIndex) || e.hasModifier()){
+                sm.handleMouseDown(this.grid, rowIndex, e);
+            }
+            return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()};
+        }
+        return false;
+    },
+
+    /**
+     * <p>The provided implementation of the onInitDrag method. Sets the <tt>innerHTML</tt> of the drag proxy which provides the "picture"
+     * of the data being dragged.</p>
+     * <p>The <tt>innerHTML</tt> data is found by calling the owning GridPanel's {@link Ext.grid.GridPanel#getDragDropText getDragDropText}.</p>
+     */
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.ddel.innerHTML = this.grid.getDragDropText();
+        this.proxy.update(this.ddel);
+        // fire start drag?
+    },
+
+    /**
+     * An empty immplementation. Implement this to provide behaviour after a repair of an invalid drop. An implementation might highlight
+     * the selected rows to show that they have not been dragged.
+     */
+    afterRepair : function(){
+        this.dragging = false;
+    },
+
+    /**
+     * <p>An empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.</p>
+     * <p>Called before a repair of an invalid drop to get the XY to animate to.</p>
+     * @param {EventObject} e The mouse up event
+     * @return {Array} The xy location (e.g. [100, 200])
+     */
+    getRepairXY : function(e, data){
+        return false;
+    },
+
+    onEndDrag : function(data, e){
+        // fire end drag?
+    },
+
+    onValidDrop : function(dd, e, id){
+        // fire drag drop?
+        this.hideProxy();
+    },
+
+    beforeInvalidDrop : function(e, id){
+
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridEditor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridEditor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridEditor.js	(revision 625)
@@ -0,0 +1,21 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridEditor = function(field, config){
+    Ext.grid.GridEditor.superclass.constructor.call(this, field, config);
+    field.monitorTab = false;
+};
+
+Ext.extend(Ext.grid.GridEditor, Ext.Editor, {
+    alignment: "tl-tl",
+    autoSize: "width",
+    hideEl : false,
+    cls: "x-small-editor x-grid-editor",
+    shim:false,
+    shadow:false
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridPanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridPanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridPanel.js	(revision 625)
@@ -0,0 +1,952 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GridPanel
+ * @extends Ext.Panel
+ * <p>This class represents the primary interface of a component based grid control to represent data
+ * in a tabular format of rows and columns. The GridPanel is composed of the following:</p>
+ * <div class="mdetail-params"><ul>
+ * <li><b>{@link Ext.data.Store Store}</b> : The Model holding the data records (rows)
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.ColumnModel Column model}</b> : Column makeup
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.GridView View}</b> : Encapsulates the user interface 
+ * <div class="sub-desc"></div></li>
+ * <li><b>{@link Ext.grid.AbstractSelectionModel selection model}</b> : Selection behavior 
+ * <div class="sub-desc"></div></li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    {@link #store}: new (@link Ext.data.Store}({
+        {@link Ext.data.Store#autoDestroy autoDestroy}: true,
+        {@link Ext.data.Store#reader reader}: reader,
+        {@link Ext.data.Store#data data}: xg.dummyData
+    }),
+    {@link #columns}: [
+        {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'},
+        {header: 'Price', width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+        {header: 'Change', width: 120, sortable: true, dataIndex: 'change'},
+        {header: '% Change', width: 120, sortable: true, dataIndex: 'pctChange'},
+        // instead of specifying renderer: Ext.util.Format.dateRenderer('m/d/Y') use xtype
+        {header: 'Last Updated', width: 135, sortable: true, dataIndex: 'lastChange', xtype: 'datecolumn', format: 'M d, Y'}
+    ],
+    {@link #viewConfig}: {
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+
+//      Return CSS class to apply to rows depending upon data values
+        {@link Ext.grid.GridView#getRowClass getRowClass}: function(record, index) {
+            var c = record.{@link Ext.data.Record#get get}('change');
+            if (c < 0) {
+                return 'price-fall';
+            } else if (c > 0) {
+                return 'price-rise';
+            }
+        }
+    },
+    {@link #sm}: new Ext.grid.RowSelectionModel({singleSelect:true}),
+    width: 600,
+    height: 300,
+    frame: true,
+    title: 'Framed with Row Selection and Horizontal Scrolling',
+    iconCls: 'icon-grid'
+});
+ * </code></pre>
+ * <p><b><u>Notes:</u></b></p>
+ * <div class="mdetail-params"><ul>
+ * <li>Although this class inherits many configuration options from base classes, some of them
+ * (such as autoScroll, autoWidth, layout, items, etc) are not used by this class, and will
+ * have no effect.</li>
+ * <li>A grid <b>requires</b> a width in which to scroll its columns, and a height in which to
+ * scroll its rows. These dimensions can either be set explicitly through the
+ * <tt>{@link Ext.BoxComponent#height height}</tt> and <tt>{@link Ext.BoxComponent#width width}</tt>
+ * configuration options or implicitly set by using the grid as a child item of a
+ * {@link Ext.Container Container} which will have a {@link Ext.Container#layout layout manager}
+ * provide the sizing of its child items (for example the Container of the Grid may specify
+ * <tt>{@link Ext.Container#layout layout}:'fit'</tt>).</li>
+ * <li>To access the data in a Grid, it is necessary to use the data model encapsulated
+ * by the {@link #store Store}. See the {@link #cellclick} event for more details.</li>
+ * </ul></div>
+ * @constructor
+ * @param {Object} config The config object
+ * @xtype grid
+ */
+Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {String} autoExpandColumn
+     * <p>The <tt>{@link Ext.grid.Column#id id}</tt> of a {@link Ext.grid.Column column} in
+     * this grid that should expand to fill unused space. This value specified here can not
+     * be <tt>0</tt>.</p>
+     * <br><p><b>Note</b>: If the Grid's {@link Ext.grid.GridView view} is configured with
+     * <tt>{@link Ext.grid.GridView#forceFit forceFit}=true</tt> the <tt>autoExpandColumn</tt>
+     * is ignored. See {@link Ext.grid.Column}.<tt>{@link Ext.grid.Column#width width}</tt>
+     * for additional details.</p>
+     * <p>See <tt>{@link #autoExpandMax}</tt> and <tt>{@link #autoExpandMin}</tt> also.</p>
+     */
+    autoExpandColumn : false,
+    /**
+     * @cfg {Number} autoExpandMax The maximum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>1000</tt>.
+     */
+    autoExpandMax : 1000,
+    /**
+     * @cfg {Number} autoExpandMin The minimum width the <tt>{@link #autoExpandColumn}</tt>
+     * can have (if enabled). Defaults to <tt>50</tt>.
+     */
+    autoExpandMin : 50,
+    /**
+     * @cfg {Boolean} columnLines <tt>true</tt> to add css for column separation lines.
+     * Default is <tt>false</tt>.
+     */
+    columnLines : false,
+    /**
+     * @cfg {Object} cm Shorthand for <tt>{@link #colModel}</tt>.
+     */
+    /**
+     * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required).
+     */
+    /**
+     * @cfg {Array} columns An array of {@link Ext.grid.Column columns} to auto create a
+     * {@link Ext.grid.ColumnModel}.  The ColumnModel may be explicitly created via the
+     * <tt>{@link #colModel}</tt> configuration property.
+     */
+    /**
+     * @cfg {String} ddGroup The DD group this GridPanel belongs to. Defaults to <tt>'GridDD'</tt> if not specified.
+     */
+    /**
+     * @cfg {String} ddText
+     * Configures the text in the drag proxy.  Defaults to:
+     * <pre><code>
+     * ddText : '{0} selected row{1}'
+     * </code></pre>
+     * <tt>{0}</tt> is replaced with the number of selected rows.
+     */
+    ddText : '{0} selected row{1}',
+    /**
+     * @cfg {Boolean} deferRowRender <P>Defaults to <tt>true</tt> to enable deferred row rendering.</p>
+     * <p>This allows the GridPanel to be initially rendered empty, with the expensive update of the row
+     * structure deferred so that layouts with GridPanels appear more quickly.</p>
+     */
+    deferRowRender : true,
+    /**
+     * @cfg {Boolean} disableSelection <p><tt>true</tt> to disable selections in the grid. Defaults to <tt>false</tt>.</p>
+     * <p>Ignored if a {@link #selModel SelectionModel} is specified.</p>
+     */
+    /**
+     * @cfg {Boolean} enableColumnResize <tt>false</tt> to turn off column resizing for the whole grid. Defaults to <tt>true</tt>.
+     */
+    /**
+     * @cfg {Boolean} enableColumnHide Defaults to <tt>true</tt> to enable hiding of columns with the header context menu.
+     */
+    enableColumnHide : true,
+    /**
+     * @cfg {Boolean} enableColumnMove Defaults to <tt>true</tt> to enable drag and drop reorder of columns. <tt>false</tt>
+     * to turn off column reordering via drag drop.
+     */
+    enableColumnMove : true,
+    /**
+     * @cfg {Boolean} enableDragDrop <p>Enables dragging of the selected rows of the GridPanel. Defaults to <tt>false</tt>.</p>
+     * <p>Setting this to <b><tt>true</tt></b> causes this GridPanel's {@link #getView GridView} to
+     * create an instance of {@link Ext.grid.GridDragZone}. <b>Note</b>: this is available only <b>after</b>
+     * the Grid has been rendered as the GridView's <tt>{@link Ext.grid.GridView#dragZone dragZone}</tt>
+     * property.</p>
+     * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of
+     * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
+     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} are able
+     * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.</p>
+     */
+    enableDragDrop : false,
+    /**
+     * @cfg {Boolean} enableHdMenu Defaults to <tt>true</tt> to enable the drop down button for menu in the headers.
+     */
+    enableHdMenu : true,
+    /**
+     * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to <code>false</code>.
+     */
+    /**
+     * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while
+     * loading. Defaults to <code>false</code>.
+     */
+    loadMask : false,
+    /**
+     * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if <tt>autoHeight</tt> is not on.
+     */
+    /**
+     * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to <tt>25</tt>.
+     */
+    minColumnWidth : 25,
+    /**
+     * @cfg {Object} sm Shorthand for <tt>{@link #selModel}</tt>.
+     */
+    /**
+     * @cfg {Object} selModel Any subclass of {@link Ext.grid.AbstractSelectionModel} that will provide
+     * the selection model for the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified).
+     */
+    /**
+     * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required).
+     */
+    /**
+     * @cfg {Boolean} stripeRows <tt>true</tt> to stripe the rows. Default is <tt>false</tt>.
+     * <p>This causes the CSS class <tt><b>x-grid3-row-alt</b></tt> to be added to alternate rows of
+     * the grid. A default CSS rule is provided which sets a background colour, but you can override this
+     * with a rule which either overrides the <b>background-color</b> style using the '!important'
+     * modifier, or which uses a CSS selector of higher specificity.</p>
+     */
+    stripeRows : false,
+    /**
+     * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is <tt>true</tt>
+     * for GridPanel, but <tt>false</tt> for EditorGridPanel.
+     */
+    trackMouseOver : true,
+    /**
+     * @cfg {Array} stateEvents
+     * An array of events that, when fired, should trigger this component to save its state.
+     * Defaults to:<pre><code>
+     * stateEvents: ['columnmove', 'columnresize', 'sortchange']
+     * </code></pre>
+     * <p>These can be any types of events supported by this component, including browser or
+     * custom events (e.g., <tt>['click', 'customerchange']</tt>).</p>
+     * <p>See {@link Ext.Component#stateful} for an explanation of saving and restoring
+     * Component state.</p>
+     */
+    stateEvents : ['columnmove', 'columnresize', 'sortchange'],
+    /**
+     * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set
+     * before a call to {@link Ext.Component#render render()}.
+     */
+    view : null,
+    /**
+     * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view.  Any of
+     * the config options available for {@link Ext.grid.GridView} can be specified here. This option
+     * is ignored if <tt>{@link #view}</tt> is specified.
+     */
+
+    // private
+    rendered : false,
+    // private
+    viewReady : false,
+
+    // private
+    initComponent : function(){
+        Ext.grid.GridPanel.superclass.initComponent.call(this);
+
+        if(this.columnLines){
+            this.cls = (this.cls || '') + ' x-grid-with-col-lines';
+        }
+        // override any provided value since it isn't valid
+        // and is causing too many bug reports ;)
+        this.autoScroll = false;
+        this.autoWidth = false;
+
+        if(Ext.isArray(this.columns)){
+            this.colModel = new Ext.grid.ColumnModel(this.columns);
+            delete this.columns;
+        }
+
+        // check and correct shorthanded configs
+        if(this.ds){
+            this.store = this.ds;
+            delete this.ds;
+        }
+        if(this.cm){
+            this.colModel = this.cm;
+            delete this.cm;
+        }
+        if(this.sm){
+            this.selModel = this.sm;
+            delete this.sm;
+        }
+        this.store = Ext.StoreMgr.lookup(this.store);
+
+        this.addEvents(
+            // raw events
+            /**
+             * @event click
+             * The raw click event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event dblclick
+             * The raw dblclick event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'dblclick',
+            /**
+             * @event contextmenu
+             * The raw contextmenu event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'contextmenu',
+            /**
+             * @event mousedown
+             * The raw mousedown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mousedown',
+            /**
+             * @event mouseup
+             * The raw mouseup event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseup',
+            /**
+             * @event mouseover
+             * The raw mouseover event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * The raw mouseout event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'mouseout',
+            /**
+             * @event keypress
+             * The raw keypress event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keypress',
+            /**
+             * @event keydown
+             * The raw keydown event for the entire grid.
+             * @param {Ext.EventObject} e
+             */
+            'keydown',
+
+            // custom events
+            /**
+             * @event cellmousedown
+             * Fires before a cell is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellmousedown',
+            /**
+             * @event rowmousedown
+             * Fires before a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowmousedown',
+            /**
+             * @event headermousedown
+             * Fires before a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headermousedown',
+
+            /**
+             * @event cellclick
+             * Fires when a cell is clicked.
+             * The data for the cell is drawn from the {@link Ext.data.Record Record}
+             * for this row. To access the data in the listener function use the
+             * following technique:
+             * <pre><code>
+function(grid, rowIndex, columnIndex, e) {
+    var record = grid.getStore().getAt(rowIndex);  // Get the Record
+    var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
+    var data = record.get(fieldName);
+}
+</code></pre>
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellclick',
+            /**
+             * @event celldblclick
+             * Fires when a cell is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'celldblclick',
+            /**
+             * @event rowclick
+             * Fires when a row is clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowclick',
+            /**
+             * @event rowdblclick
+             * Fires when a row is double clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowdblclick',
+            /**
+             * @event headerclick
+             * Fires when a header is clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerclick',
+            /**
+             * @event headerdblclick
+             * Fires when a header cell is double clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headerdblclick',
+            /**
+             * @event rowcontextmenu
+             * Fires when a row is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Ext.EventObject} e
+             */
+            'rowcontextmenu',
+            /**
+             * @event cellcontextmenu
+             * Fires when a cell is right clicked
+             * @param {Grid} this
+             * @param {Number} rowIndex
+             * @param {Number} cellIndex
+             * @param {Ext.EventObject} e
+             */
+            'cellcontextmenu',
+            /**
+             * @event headercontextmenu
+             * Fires when a header is right clicked
+             * @param {Grid} this
+             * @param {Number} columnIndex
+             * @param {Ext.EventObject} e
+             */
+            'headercontextmenu',
+            /**
+             * @event bodyscroll
+             * Fires when the body element is scrolled
+             * @param {Number} scrollLeft
+             * @param {Number} scrollTop
+             */
+            'bodyscroll',
+            /**
+             * @event columnresize
+             * Fires when the user resizes a column
+             * @param {Number} columnIndex
+             * @param {Number} newSize
+             */
+            'columnresize',
+            /**
+             * @event columnmove
+             * Fires when the user moves a column
+             * @param {Number} oldIndex
+             * @param {Number} newIndex
+             */
+            'columnmove',
+            /**
+             * @event sortchange
+             * Fires when the grid's store sort changes
+             * @param {Grid} this
+             * @param {Object} sortInfo An object with the keys field and direction
+             */
+            'sortchange',
+            /**
+             * @event reconfigure
+             * Fires when the grid is reconfigured with a new store and/or column model.
+             * @param {Grid} this
+             * @param {Ext.data.Store} store The new store
+             * @param {Ext.grid.ColumnModel} colModel The new column model
+             */
+            'reconfigure'
+        );
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);
+
+        var c = this.body;
+
+        this.el.addClass('x-grid-panel');
+
+        var view = this.getView();
+        view.init(this);
+
+        this.mon(c, {
+            mousedown: this.onMouseDown,
+            click: this.onClick,
+            dblclick: this.onDblClick,
+            contextmenu: this.onContextMenu,
+            keydown: this.onKeyDown,
+            scope: this
+        });
+
+        this.relayEvents(c, ['mousedown','mouseup','mouseover','mouseout','keypress']);
+
+        this.getSelectionModel().init(this);
+        this.view.render();
+    },
+
+    // private
+    initEvents : function(){
+        Ext.grid.GridPanel.superclass.initEvents.call(this);
+
+        if(this.loadMask){
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({store:this.store}, this.loadMask));
+        }
+    },
+
+    initStateEvents : function(){
+        Ext.grid.GridPanel.superclass.initStateEvents.call(this);
+        this.mon(this.colModel, 'hiddenchange', this.saveState, this, {delay: 100});
+    },
+
+    applyState : function(state){
+        var cm = this.colModel;
+        var cs = state.columns;
+        if(cs){
+            for(var i = 0, len = cs.length; i < len; i++){
+                var s = cs[i];
+                var c = cm.getColumnById(s.id);
+                if(c){
+                    c.hidden = s.hidden;
+                    c.width = s.width;
+                    var oldIndex = cm.getIndexById(s.id);
+                    if(oldIndex != i){
+                        cm.moveColumn(oldIndex, i);
+                    }
+                }
+            }
+        }
+        if(state.sort && this.store){
+            this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction);
+        }
+        delete state.columns;
+        delete state.sort;
+        Ext.grid.GridPanel.superclass.applyState.call(this, state);
+    },
+
+    getState : function(){
+        var o = {columns: []};
+        for(var i = 0, c; (c = this.colModel.config[i]); i++){
+            o.columns[i] = {
+                id: c.id,
+                width: c.width
+            };
+            if(c.hidden){
+                o.columns[i].hidden = true;
+            }
+        }
+        if(this.store){
+            var ss = this.store.getSortState();
+            if(ss){
+                o.sort = ss;
+            }
+        }
+        return o;
+    },
+
+    // private
+    afterRender : function(){
+        Ext.grid.GridPanel.superclass.afterRender.call(this);
+        this.view.layout();
+        if(this.deferRowRender){
+            this.view.afterRender.defer(10, this.view);
+        }else{
+            this.view.afterRender();
+        }
+        this.viewReady = true;
+    },
+
+    /**
+     * <p>Reconfigures the grid to use a different Store and Column Model
+     * and fires the 'reconfigure' event. The View will be bound to the new
+     * objects and refreshed.</p>
+     * <p>Be aware that upon reconfiguring a GridPanel, certain existing settings <i>may</i> become
+     * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the
+     * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound
+     * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring
+     * with the new data.</p>
+     * @param {Ext.data.Store} store The new {@link Ext.data.Store} object
+     * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object
+     */
+    reconfigure : function(store, colModel){
+        if(this.loadMask){
+            this.loadMask.destroy();
+            this.loadMask = new Ext.LoadMask(this.bwrap,
+                    Ext.apply({}, {store:store}, this.initialConfig.loadMask));
+        }
+        this.view.initData(store, colModel);
+        this.store = store;
+        this.colModel = colModel;
+        if(this.rendered){
+            this.view.refresh(true);
+        }
+        this.fireEvent('reconfigure', this, store, colModel);
+    },
+
+    // private
+    onKeyDown : function(e){
+        this.fireEvent('keydown', e);
+    },
+
+    // private
+    onDestroy : function(){
+        if(this.rendered){
+            var c = this.body;
+            c.removeAllListeners();
+            c.update('');
+            Ext.destroy(this.view, this.loadMask);
+        }else if(this.store && this.store.autoDestroy){
+            this.store.destroy();
+        }
+        Ext.destroy(this.colModel, this.selModel);
+        this.store = this.selModel = this.colModel = this.view = this.loadMask = null;
+        Ext.grid.GridPanel.superclass.onDestroy.call(this);
+    },
+
+    // private
+    processEvent : function(name, e){
+        this.fireEvent(name, e);
+        var t = e.getTarget();
+        var v = this.view;
+        var header = v.findHeaderIndex(t);
+        if(header !== false){
+            this.fireEvent('header' + name, this, header, e);
+        }else{
+            var row = v.findRowIndex(t);
+            var cell = v.findCellIndex(t);
+            if(row !== false){
+                this.fireEvent('row' + name, this, row, e);
+                if(cell !== false){
+                    this.fireEvent('cell' + name, this, row, cell, e);
+                }
+            }
+        }
+    },
+
+    // private
+    onClick : function(e){
+        this.processEvent('click', e);
+    },
+
+    // private
+    onMouseDown : function(e){
+        this.processEvent('mousedown', e);
+    },
+
+    // private
+    onContextMenu : function(e, t){
+        this.processEvent('contextmenu', e);
+    },
+
+    // private
+    onDblClick : function(e){
+        this.processEvent('dblclick', e);
+    },
+
+    // private
+    walkCells : function(row, col, step, fn, scope){
+        var cm = this.colModel, clen = cm.getColumnCount();
+        var ds = this.store, rlen = ds.getCount(), first = true;
+        if(step < 0){
+            if(col < 0){
+                row--;
+                first = false;
+            }
+            while(row >= 0){
+                if(!first){
+                    col = clen-1;
+                }
+                first = false;
+                while(col >= 0){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col--;
+                }
+                row--;
+            }
+        } else {
+            if(col >= clen){
+                row++;
+                first = false;
+            }
+            while(row < rlen){
+                if(!first){
+                    col = 0;
+                }
+                first = false;
+                while(col < clen){
+                    if(fn.call(scope || this, row, col, cm) === true){
+                        return [row, col];
+                    }
+                    col++;
+                }
+                row++;
+            }
+        }
+        return null;
+    },
+
+    // private
+    onResize : function(){
+        Ext.grid.GridPanel.superclass.onResize.apply(this, arguments);
+        if(this.viewReady){
+            this.view.layout();
+        }
+    },
+
+    /**
+     * Returns the grid's underlying element.
+     * @return {Element} The element
+     */
+    getGridEl : function(){
+        return this.body;
+    },
+
+    // private for compatibility, overridden by editor grid
+    stopEditing : Ext.emptyFn,
+
+    /**
+     * Returns the grid's selection model configured by the <code>{@link #selModel}</code>
+     * configuration option. If no selection model was configured, this will create
+     * and return a {@link Ext.grid.RowSelectionModel RowSelectionModel}.
+     * @return {SelectionModel}
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.grid.RowSelectionModel(
+                    this.disableSelection ? {selectRow: Ext.emptyFn} : null);
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Returns the grid's data store.
+     * @return {Ext.data.Store} The store
+     */
+    getStore : function(){
+        return this.store;
+    },
+
+    /**
+     * Returns the grid's ColumnModel.
+     * @return {Ext.grid.ColumnModel} The column model
+     */
+    getColumnModel : function(){
+        return this.colModel;
+    },
+
+    /**
+     * Returns the grid's GridView object.
+     * @return {Ext.grid.GridView} The grid view
+     */
+    getView : function(){
+        if(!this.view){
+            this.view = new Ext.grid.GridView(this.viewConfig);
+        }
+        return this.view;
+    },
+    /**
+     * Called to get grid's drag proxy text, by default returns this.ddText.
+     * @return {String} The text
+     */
+    getDragDropText : function(){
+        var count = this.selModel.getCount();
+        return String.format(this.ddText, count, count == 1 ? '' : 's');
+    }
+
+    /** 
+     * @cfg {String/Number} activeItem 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoDestroy 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object/String/Function} autoLoad 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} autoWidth 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean/Number} bufferResize 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} defaultType 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} defaults 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} hideBorders 
+     * @hide 
+     */
+    /** 
+     * @cfg {Mixed} items 
+     * @hide 
+     */
+    /** 
+     * @cfg {String} layout 
+     * @hide 
+     */
+    /** 
+     * @cfg {Object} layoutConfig 
+     * @hide 
+     */
+    /** 
+     * @cfg {Boolean} monitorResize 
+     * @hide 
+     */
+    /** 
+     * @property items 
+     * @hide 
+     */
+    /** 
+     * @method add 
+     * @hide 
+     */
+    /** 
+     * @method cascade 
+     * @hide 
+     */
+    /** 
+     * @method doLayout 
+     * @hide 
+     */
+    /** 
+     * @method find 
+     * @hide 
+     */
+    /** 
+     * @method findBy 
+     * @hide 
+     */
+    /** 
+     * @method findById 
+     * @hide 
+     */
+    /** 
+     * @method findByType 
+     * @hide 
+     */
+    /** 
+     * @method getComponent 
+     * @hide 
+     */
+    /** 
+     * @method getLayout 
+     * @hide 
+     */
+    /** 
+     * @method getUpdater 
+     * @hide 
+     */
+    /** 
+     * @method insert 
+     * @hide 
+     */
+    /** 
+     * @method load 
+     * @hide 
+     */
+    /** 
+     * @method remove 
+     * @hide 
+     */
+    /** 
+     * @event add 
+     * @hide 
+     */
+    /** 
+     * @event afterLayout 
+     * @hide 
+     */
+    /** 
+     * @event beforeadd 
+     * @hide 
+     */
+    /** 
+     * @event beforeremove 
+     * @hide 
+     */
+    /** 
+     * @event remove 
+     * @hide 
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} autoScroll  @hide
+     */
+    /**
+     * @cfg {String} bodyBorder  @hide
+     */
+    /**
+     * @cfg {String} bodyStyle  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+Ext.reg('grid', Ext.grid.GridPanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridView.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridView.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GridView.js	(revision 625)
@@ -0,0 +1,1776 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GridView
+ * @extends Ext.util.Observable
+ * <p>This class encapsulates the user interface of an {@link Ext.grid.GridPanel}.
+ * Methods of this class may be used to access user interface elements to enable
+ * special display effects. Do not change the DOM structure of the user interface.</p>
+ * <p>This class does not provide ways to manipulate the underlying data. The data
+ * model of a Grid is held in an {@link Ext.data.Store}.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GridView = function(config){
+    Ext.apply(this, config);
+    // These events are only used internally by the grid components
+    this.addEvents(
+        /**
+         * @event beforerowremoved
+         * Internal UI Event. Fired before a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row to be removed.
+         * @param {Ext.data.Record} record The Record to be removed
+         */
+        "beforerowremoved",
+        /**
+         * @event beforerowsinserted
+         * Internal UI Event. Fired before rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first row to be inserted.
+         * @param {Number} lastRow The index of the last row to be inserted.
+         */
+        "beforerowsinserted",
+        /**
+         * @event beforerefresh
+         * Internal UI Event. Fired before the view is refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "beforerefresh",
+        /**
+         * @event rowremoved
+         * Internal UI Event. Fired after a row is removed.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} rowIndex The index of the row that was removed.
+         * @param {Ext.data.Record} record The Record that was removed
+         */
+        "rowremoved",
+        /**
+         * @event rowsinserted
+         * Internal UI Event. Fired after rows are inserted.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the first inserted.
+         * @param {Number} lastRow The index of the last row inserted.
+         */
+        "rowsinserted",
+        /**
+         * @event rowupdated
+         * Internal UI Event. Fired after a row has been updated.
+         * @param {Ext.grid.GridView} view
+         * @param {Number} firstRow The index of the row updated.
+         * @param {Ext.data.record} record The Record backing the row updated.
+         */
+        "rowupdated",
+        /**
+         * @event refresh
+         * Internal UI Event. Fired after the GridView's body has been refreshed.
+         * @param {Ext.grid.GridView} view
+         */
+        "refresh"
+    );
+    Ext.grid.GridView.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.GridView, Ext.util.Observable, {
+    /**
+     * Override this function to apply custom CSS classes to rows during rendering.  You can also supply custom
+     * parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
+     * parameter.  This function should return the CSS class name (or empty string '' for none) that will be added
+     * to the row's wrapping div.  To apply multiple class names, simply return them space-delimited within the string
+     * (e.g., 'my-class another-class'). Example usage:
+    <pre><code>
+viewConfig: {
+    forceFit: true,
+    showPreview: true, // custom property
+    enableRowBody: true, // required to create a second, full-width row to show expanded Record data
+    getRowClass: function(record, rowIndex, rp, ds){ // rp = rowParams
+        if(this.showPreview){
+            rp.body = '&lt;p>'+record.data.excerpt+'&lt;/p>';
+            return 'x-grid3-row-expanded';
+        }
+        return 'x-grid3-row-collapsed';
+    }
+},     
+    </code></pre>
+     * @param {Record} record The {@link Ext.data.Record} corresponding to the current row.
+     * @param {Number} index The row index.
+     * @param {Object} rowParams A config object that is passed to the row template during rendering that allows
+     * customization of various aspects of a grid row.
+     * <p>If {@link #enableRowBody} is configured <b><tt></tt>true</b>, then the following properties may be set
+     * by this function, and will be used to render a full-width expansion row below each grid row:</p>
+     * <ul>
+     * <li><code>body</code> : String <div class="sub-desc">An HTML fragment to be used as the expansion row's body content (defaults to '').</div></li>
+     * <li><code>bodyStyle</code> : String <div class="sub-desc">A CSS style specification that will be applied to the expansion row's &lt;tr> element. (defaults to '').</div></li>
+     * </ul>
+     * The following property will be passed in, and may be appended to:
+     * <ul>
+     * <li><code>tstyle</code> : String <div class="sub-desc">A CSS style specification that willl be applied to the &lt;table> element which encapsulates
+     * both the standard grid row, and any expansion row.</div></li>
+     * </ul>
+     * @param {Store} store The {@link Ext.data.Store} this grid is bound to
+     * @method getRowClass
+     * @return {String} a CSS class name to add to the row.
+     */
+    /**
+     * @cfg {Boolean} enableRowBody True to add a second TR element per row that can be used to provide a row body
+     * that spans beneath the data row.  Use the {@link #getRowClass} method's rowParams config to customize the row body.
+     */
+    /**
+     * @cfg {String} emptyText Default text (html tags are accepted) to display in the grid body when no rows
+     * are available (defaults to ''). This value will be used to update the <tt>{@link #mainBody}</tt>:
+    <pre><code>
+    this.mainBody.update('&lt;div class="x-grid-empty">' + this.emptyText + '&lt;/div>');
+    </code></pre>
+     */
+    /**
+     * @cfg {Boolean} headersDisabled True to disable the grid column headers (defaults to <tt>false</tt>). 
+     * Use the {@link Ext.grid.ColumnModel ColumnModel} <tt>{@link Ext.grid.ColumnModel#menuDisabled menuDisabled}</tt>
+     * config to disable the <i>menu</i> for individual columns.  While this config is true the
+     * following will be disabled:<div class="mdetail-params"><ul>
+     * <li>clicking on header to sort</li>
+     * <li>the trigger to reveal the menu.</li>
+     * </ul></div>
+     */
+    /**
+     * <p>A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations
+     * of the template methods of DragZone to enable dragging of the selected rows of a GridPanel.
+     * See {@link Ext.grid.GridDragZone} for details.</p>
+     * <p>This will <b>only</b> be present:<div class="mdetail-params"><ul>
+     * <li><i>if</i> the owning GridPanel was configured with {@link Ext.grid.GridPanel#enableDragDrop enableDragDrop}: <tt>true</tt>.</li>
+     * <li><i>after</i> the owning GridPanel has been rendered.</li>
+     * </ul></div>
+     * @property dragZone
+     * @type {Ext.grid.GridDragZone}
+     */
+    /**
+     * @cfg {Boolean} deferEmptyText True to defer <tt>{@link #emptyText}</tt> being applied until the store's
+     * first load (defaults to <tt>true</tt>).
+     */
+    deferEmptyText : true,
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the vertical scrollbar
+     * (defaults to <tt>19</tt> pixels).
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean} autoFill
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * when the grid is <b>initially rendered</b>.  The 
+     * {@link Ext.grid.Column#width initially configured width}</tt> of each column will be adjusted
+     * to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually
+     * or programmatically), the other columns in the grid will <b>not</b> be resized to fit the grid width.
+     * See <tt>{@link #forceFit}</tt> also.
+     */
+    autoFill : false,
+    /**
+     * @cfg {Boolean} forceFit
+     * Defaults to <tt>false</tt>.  Specify <tt>true</tt> to have the column widths re-proportioned
+     * at <b>all times</b>.  The {@link Ext.grid.Column#width initially configured width}</tt> of each
+     * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are
+     * later resized (manually or programmatically), the other columns in the grid <b>will</b> be resized
+     * to fit the grid width. See <tt>{@link #autoFill}</tt> also.
+     */
+    forceFit : false,
+    /**
+     * @cfg {Array} sortClasses The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+    /**
+     * @cfg {String} sortAscText The text displayed in the "Sort Ascending" menu item (defaults to <tt>"Sort Ascending"</tt>)
+     */
+    sortAscText : "Sort Ascending",
+    /**
+     * @cfg {String} sortDescText The text displayed in the "Sort Descending" menu item (defaults to <tt>"Sort Descending"</tt>)
+     */
+    sortDescText : "Sort Descending",
+    /**
+     * @cfg {String} columnsText The text displayed in the "Columns" menu item (defaults to <tt>"Columns"</tt>)
+     */
+    columnsText : "Columns",
+
+    /**
+     * @cfg {String} selectedRowClass The CSS class applied to a selected row (defaults to <tt>"x-grid3-row-selected"</tt>). An
+     * example overriding the default styling:
+    <pre><code>
+    .x-grid3-row-selected {background-color: yellow;}
+    </code></pre>
+     * Note that this only controls the row, and will not do anything for the text inside it.  To style inner
+     * facets (like text) use something like:
+    <pre><code>
+    .x-grid3-row-selected .x-grid3-cell-inner {
+        color: #FFCC00;
+    }
+    </code></pre>
+     * @type String
+     */
+    selectedRowClass : "x-grid3-row-selected",
+
+    // private
+    borderWidth : 2,
+    tdClass : 'x-grid3-cell',
+    hdCls : 'x-grid3-hd',
+    markDirty : true,
+
+    /**
+     * @cfg {Number} cellSelectorDepth The number of levels to search for cells in event delegation (defaults to <tt>4</tt>)
+     */
+    cellSelectorDepth : 4,
+    /**
+     * @cfg {Number} rowSelectorDepth The number of levels to search for rows in event delegation (defaults to <tt>10</tt>)
+     */
+    rowSelectorDepth : 10,
+
+    /**
+     * @cfg {String} cellSelector The selector used to find cells internally (defaults to <tt>'td.x-grid3-cell'</tt>)
+     */
+    cellSelector : 'td.x-grid3-cell',
+    /**
+     * @cfg {String} rowSelector The selector used to find rows internally (defaults to <tt>'div.x-grid3-row'</tt>)
+     */
+    rowSelector : 'div.x-grid3-row',
+    
+    // private
+    firstRowCls: 'x-grid3-row-first',
+    lastRowCls: 'x-grid3-row-last',
+    rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,
+
+    /* -------------------------------- UI Specific ----------------------------- */
+
+    // private
+    initTemplates : function(){
+        var ts = this.templates || {};
+        if(!ts.master){
+            ts.master = new Ext.Template(
+                    '<div class="x-grid3" hidefocus="true">',
+                        '<div class="x-grid3-viewport">',
+                            '<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>',
+                            '<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',
+                        '</div>',
+                        '<div class="x-grid3-resize-marker">&#160;</div>',
+                        '<div class="x-grid3-resize-proxy">&#160;</div>',
+                    '</div>'
+                    );
+        }
+
+        if(!ts.header){
+            ts.header = new Ext.Template(
+                    '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',
+                    '</table>'
+                    );
+        }
+
+        if(!ts.hcell){
+            ts.hcell = new Ext.Template(
+                    '<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">', this.grid.enableHdMenu ? '<a class="x-grid3-hd-btn" href="#"></a>' : '',
+                    '{value}<img class="x-grid3-sort-icon" src="', Ext.BLANK_IMAGE_URL, '" />',
+                    '</div></td>'
+                    );
+        }
+
+        if(!ts.body){
+            ts.body = new Ext.Template('{rows}');
+        }
+
+        if(!ts.row){
+            ts.row = new Ext.Template(
+                    '<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',
+                    '<tbody><tr>{cells}</tr>',
+                    (this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''),
+                    '</tbody></table></div>'
+                    );
+        }
+
+        if(!ts.cell){
+            ts.cell = new Ext.Template(
+                    '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>',
+                    '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',
+                    '</td>'
+                    );
+        }
+
+        for(var k in ts){
+            var t = ts[k];
+            if(t && typeof t.compile == 'function' && !t.compiled){
+                t.disableFormats = true;
+                t.compile();
+            }
+        }
+
+        this.templates = ts;
+        this.colRe = new RegExp("x-grid3-td-([^\\s]+)", "");
+    },
+
+    // private
+    fly : function(el){
+        if(!this._flyweight){
+            this._flyweight = new Ext.Element.Flyweight(document.body);
+        }
+        this._flyweight.dom = el;
+        return this._flyweight;
+    },
+
+    // private
+    getEditorParent : function(){
+        return this.scroller.dom;
+    },
+
+    // private
+    initElements : function(){
+        var E = Ext.Element;
+
+        var el = this.grid.getGridEl().dom.firstChild;
+        var cs = el.childNodes;
+
+        this.el = new E(el);
+
+        this.mainWrap = new E(cs[0]);
+        this.mainHd = new E(this.mainWrap.dom.firstChild);
+
+        if(this.grid.hideHeaders){
+            this.mainHd.setDisplayed(false);
+        }
+
+        this.innerHd = this.mainHd.dom.firstChild;
+        this.scroller = new E(this.mainWrap.dom.childNodes[1]);
+        if(this.forceFit){
+            this.scroller.setStyle('overflow-x', 'hidden');
+        }
+        /**
+         * <i>Read-only</i>. The GridView's body Element which encapsulates all rows in the Grid.
+         * This {@link Ext.Element Element} is only available after the GridPanel has been rendered.
+         * @type Ext.Element
+         * @property mainBody
+         */
+        this.mainBody = new E(this.scroller.dom.firstChild);
+
+        this.focusEl = new E(this.scroller.dom.childNodes[1]);
+        this.focusEl.swallowEvent("click", true);
+
+        this.resizeMarker = new E(cs[1]);
+        this.resizeProxy = new E(cs[2]);
+    },
+
+    // private
+    getRows : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // finder methods, used with delegation
+
+    // private
+    findCell : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid column which contains the passed element.</p>
+ * See also {@link #findRowIndex}
+ * @param {Element} el The target element
+ * @return The column index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findCellIndex : function(el, requiredCls){
+        var cell = this.findCell(el);
+        if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){
+            return this.getCellIndex(cell);
+        }
+        return false;
+    },
+
+    // private
+    getCellIndex : function(el){
+        if(el){
+            var m = el.className.match(this.colRe);
+            if(m && m[1]){
+                return this.cm.getIndexById(m[1]);
+            }
+        }
+        return false;
+    },
+
+    // private
+    findHeaderCell : function(el){
+        var cell = this.findCell(el);
+        return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null;
+    },
+
+    // private
+    findHeaderIndex : function(el){
+        return this.findCellIndex(el, this.hdCls);
+    },
+
+/**
+ * Return the HtmlElement representing the grid row which contains the passed element.
+ * @param {Element} el The target element
+ * @return The row element, or null if the target element is not within a row of this GridView.
+ */
+    findRow : function(el){
+        if(!el){
+            return false;
+        }
+        return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth);
+    },
+
+/**
+ * <p>Return the index of the grid row which contains the passed element.</p>
+ * See also {@link #findCellIndex}
+ * @param {Element} el The target element
+ * @return The row index, or <b>false</b> if the target element is not within a row of this GridView.
+ */
+    findRowIndex : function(el){
+        var r = this.findRow(el);
+        return r ? r.rowIndex : false;
+    },
+
+    // getter methods for fetching elements dynamically in the grid
+
+/**
+ * Return the <tt>&lt;div></tt> HtmlElement which represents a Grid row for the specified index.
+ * @param {Number} index The row index
+ * @return {HtmlElement} The div element.
+ */
+    getRow : function(row){
+        return this.getRows()[row];
+    },
+
+/**
+ * Returns the grid's <tt>&lt;td></tt> HtmlElement at the specified coordinates.
+ * @param {Number} row The row index in which to find the cell.
+ * @param {Number} col The column index of the cell.
+ * @return {HtmlElement} The td at the specified coordinates.
+ */
+    getCell : function(row, col){
+        return this.getRow(row).getElementsByTagName('td')[col];
+    },
+
+/**
+ * Return the <tt>&lt;td></tt> HtmlElement which represents the Grid's header cell for the specified column index.
+ * @param {Number} index The column index
+ * @return {HtmlElement} The td element.
+ */
+    getHeaderCell : function(index){
+      return this.mainHd.dom.getElementsByTagName('td')[index];
+    },
+
+    // manipulating elements
+
+    // private - use getRowClass to apply custom row classes
+    addRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).addClass(cls);
+        }
+    },
+
+    // private
+    removeRowClass : function(row, cls){
+        var r = this.getRow(row);
+        if(r){
+            this.fly(r).removeClass(cls);
+        }
+    },
+
+    // private
+    removeRow : function(row){
+        Ext.removeNode(this.getRow(row));
+        this.syncFocusEl(row);
+    },
+    
+    // private
+    removeRows : function(firstRow, lastRow){
+        var bd = this.mainBody.dom;
+        for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
+            Ext.removeNode(bd.childNodes[firstRow]);
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // scrolling stuff
+
+    // private
+    getScrollState : function(){
+        var sb = this.scroller.dom;
+        return {left: sb.scrollLeft, top: sb.scrollTop};
+    },
+
+    // private
+    restoreScroll : function(state){
+        var sb = this.scroller.dom;
+        sb.scrollLeft = state.left;
+        sb.scrollTop = state.top;
+    },
+
+    /**
+     * Scrolls the grid to the top
+     */
+    scrollToTop : function(){
+        this.scroller.dom.scrollTop = 0;
+        this.scroller.dom.scrollLeft = 0;
+    },
+
+    // private
+    syncScroll : function(){
+      this.syncHeaderScroll();
+      var mb = this.scroller.dom;
+        this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop);
+    },
+
+    // private
+    syncHeaderScroll : function(){
+        var mb = this.scroller.dom;
+        this.innerHd.scrollLeft = mb.scrollLeft;
+        this.innerHd.scrollLeft = mb.scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore)
+    },
+
+    // private
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.mainHd.select('td').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    // private
+    updateAllColumnWidths : function(){
+        var tw = this.getTotalWidth(),
+            clen = this.cm.getColumnCount(),
+            ws = [],
+            len,
+            i;
+        for(i = 0; i < clen; i++){
+            ws[i] = this.getColumnWidth(i);
+        }
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        for(i = 0; i < clen; i++){
+            var hd = this.getHeaderCell(i);
+            hd.style.width = ws[i];
+        }
+
+        var ns = this.getRows(), row, trow;
+        for(i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                trow = row.firstChild.rows[0];
+                for (var j = 0; j < clen; j++) {
+                   trow.childNodes[j].style.width = ws[j];
+                }
+            }
+        }
+
+        this.onAllColumnWidthsUpdated(ws, tw);
+    },
+
+    // private
+    updateColumnWidth : function(col, width){
+        var w = this.getColumnWidth(col);
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var hd = this.getHeaderCell(col);
+        hd.style.width = w;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.width = w;
+            }
+        }
+
+        this.onColumnWidthUpdated(col, w, tw);
+    },
+
+    // private
+    updateColumnHidden : function(col, hidden){
+        var tw = this.getTotalWidth();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = tw;
+        this.mainBody.dom.style.width = tw;
+        var display = hidden ? 'none' : '';
+
+        var hd = this.getHeaderCell(col);
+        hd.style.display = display;
+
+        var ns = this.getRows(), row;
+        for(var i = 0, len = ns.length; i < len; i++){
+            row = ns[i];
+            row.style.width = tw;
+            if(row.firstChild){
+                row.firstChild.style.width = tw;
+                row.firstChild.rows[0].childNodes[col].style.display = display;
+            }
+        }
+
+        this.onColumnHiddenUpdated(col, hidden, tw);
+        delete this.lastViewWidth; // force recalc
+        this.layout();
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
+        var tstyle = 'width:'+this.getTotalWidth()+';';
+        // buffers
+        var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r;
+        for(var j = 0, len = rs.length; j < len; j++){
+            r = rs[j]; cb = [];
+            var rowIndex = (j+startRow);
+            for(var i = 0; i < colCount; i++){
+                c = cs[i];
+                p.id = c.id;
+                p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+                p.attr = p.cellAttr = "";
+                p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
+                p.style = c.style;
+                if(Ext.isEmpty(p.value)){
+                    p.value = "&#160;";
+                }
+                if(this.markDirty && r.dirty && typeof r.modified[c.name] !== 'undefined'){
+                    p.css += ' x-grid3-dirty-cell';
+                }
+                cb[cb.length] = ct.apply(p);
+            }
+            var alt = [];
+            if(stripe && ((rowIndex+1) % 2 === 0)){
+                alt[0] = "x-grid3-row-alt";
+            }
+            if(r.dirty){
+                alt[1] = " x-grid3-dirty-row";
+            }
+            rp.cols = colCount;
+            if(this.getRowClass){
+                alt[2] = this.getRowClass(r, rowIndex, rp, ds);
+            }
+            rp.alt = alt.join(" ");
+            rp.cells = cb.join("");
+            buf[buf.length] =  rt.apply(rp);
+        }
+        return buf.join("");
+    },
+
+    // private
+    processRows : function(startRow, skipStripe){
+        if(!this.ds || this.ds.getCount() < 1){
+            return;
+        }
+        var rows = this.getRows();
+        skipStripe = skipStripe || !this.grid.stripeRows;
+        startRow = startRow || 0;
+        Ext.each(rows, function(row, idx){
+            row.rowIndex = idx;
+            row.className = row.className.replace(this.rowClsRe, ' ');
+            if (!skipStripe && (idx + 1) % 2 === 0) {
+                row.className += ' x-grid3-row-alt';
+            }
+        });
+        // add first/last-row classes
+        if(startRow === 0){
+            Ext.fly(rows[0]).addClass(this.firstRowCls);
+        }
+        Ext.fly(rows[rows.length - 1]).addClass(this.lastRowCls);
+    },
+
+    afterRender : function(){
+        if(!this.ds || !this.cm){
+            return;
+        }
+        this.mainBody.dom.innerHTML = this.renderRows() || '&#160;';
+        this.processRows(0, true);
+
+        if(this.deferEmptyText !== true){
+            this.applyEmptyText();
+        }
+    },
+
+    // private
+    renderUI : function(){
+
+        var header = this.renderHeaders();
+        var body = this.templates.body.apply({rows:'&#160;'});
+
+
+        var html = this.templates.master.apply({
+            body: body,
+            header: header,
+            ostyle: 'width:'+this.getOffsetWidth()+';',
+            bstyle: 'width:'+this.getTotalWidth()+';'
+        });
+
+        var g = this.grid;
+
+        g.getGridEl().dom.innerHTML = html;
+
+        this.initElements();
+
+        // get mousedowns early
+        Ext.fly(this.innerHd).on("click", this.handleHdDown, this);
+        this.mainHd.on({
+            scope: this,
+            mouseover: this.handleHdOver,
+            mouseout: this.handleHdOut,
+            mousemove: this.handleHdMove
+        });
+
+        this.scroller.on('scroll', this.syncScroll,  this);
+        if(g.enableColumnResize !== false){
+            this.splitZone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableColumnMove){
+            this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd);
+            this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom);
+        }
+
+        if(g.enableHdMenu !== false){
+            this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"});
+            this.hmenu.add(
+                {itemId:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"},
+                {itemId:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"}
+            );
+            if(g.enableColumnHide !== false){
+                this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"});
+                this.colMenu.on({
+                    scope: this,
+                    beforeshow: this.beforeColMenuShow,
+                    itemclick: this.handleHdMenuClick
+                });
+                this.hmenu.add('-', {
+                    itemId:"columns",
+                    hideOnClick: false,
+                    text: this.columnsText,
+                    menu: this.colMenu,
+                    iconCls: 'x-cols-icon'
+                });
+            }
+            this.hmenu.on("itemclick", this.handleHdMenuClick, this);
+        }
+
+        if(g.trackMouseOver){
+            this.mainBody.on({
+                scope: this,
+                mouseover: this.onRowOver,
+                mouseout: this.onRowOut
+            });
+        }
+
+        if(g.enableDragDrop || g.enableDrag){
+            this.dragZone = new Ext.grid.GridDragZone(g, {
+                ddGroup : g.ddGroup || 'GridDD'
+            });
+        }
+
+        this.updateHeaderSortState();
+
+    },
+
+    // private
+    layout : function(){
+        if(!this.mainBody){
+            return; // not rendered
+        }
+        var g = this.grid;
+        var c = g.getGridEl();
+        var csize = c.getSize(true);
+        var vw = csize.width;
+
+        if(!g.hideHeaders && (vw < 20 || csize.height < 20)){ // display: none?
+            return;
+        }
+        
+        if(g.autoHeight){
+            this.scroller.dom.style.overflow = 'visible';
+            if(Ext.isWebKit){
+                this.scroller.dom.style.position = 'static';
+            }
+        }else{
+            this.el.setSize(csize.width, csize.height);
+
+            var hdHeight = this.mainHd.getHeight();
+            var vh = csize.height - (hdHeight);
+
+            this.scroller.setSize(vw, vh);
+            if(this.innerHd){
+                this.innerHd.style.width = (vw)+'px';
+            }
+        }
+        if(this.forceFit){
+            if(this.lastViewWidth != vw){
+                this.fitColumns(false, false);
+                this.lastViewWidth = vw;
+            }
+        }else {
+            this.autoExpand();
+            this.syncHeaderScroll();
+        }
+        this.onLayout(vw, vh);
+    },
+
+    // template functions for subclasses and plugins
+    // these functions include precalculated values
+    onLayout : function(vw, vh){
+        // do nothing
+    },
+
+    onColumnWidthUpdated : function(col, w, tw){
+        //template method
+    },
+
+    onAllColumnWidthsUpdated : function(ws, tw){
+        //template method
+    },
+
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        // template method
+    },
+
+    updateColumnText : function(col, text){
+        // template method
+    },
+
+    afterMove : function(colIndex){
+        // template method
+    },
+
+    /* ----------------------------------- Core Specific -------------------------------------------*/
+    // private
+    init : function(grid){
+        this.grid = grid;
+
+        this.initTemplates();
+        this.initData(grid.store, grid.colModel);
+        this.initUI(grid);
+    },
+
+    // private
+    getColumnId : function(index){
+      return this.cm.getColumnId(index);
+    },
+    
+    // private 
+    getOffsetWidth : function() {
+        return (this.cm.getTotalWidth() + this.scrollOffset) + 'px';
+    },
+
+    // private
+    renderHeaders : function(){
+        var cm = this.cm, 
+            ts = this.templates,
+            ct = ts.hcell,
+            cb = [], 
+            p = {},
+            len = cm.getColumnCount(),
+            last = len - 1;
+            
+        for(var i = 0; i < len; i++){
+            p.id = cm.getColumnId(i);
+            p.value = cm.getColumnHeader(i) || "";
+            p.style = this.getColumnStyle(i, true);
+            p.tooltip = this.getColumnTooltip(i);
+            p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
+            if(cm.config[i].align == 'right'){
+                p.istyle = 'padding-right:16px';
+            } else {
+                delete p.istyle;
+            }
+            cb[cb.length] = ct.apply(p);
+        }
+        return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'});
+    },
+
+    // private
+    getColumnTooltip : function(i){
+        var tt = this.cm.getColumnTooltip(i);
+        if(tt){
+            if(Ext.QuickTips.isEnabled()){
+                return 'ext:qtip="'+tt+'"';
+            }else{
+                return 'title="'+tt+'"';
+            }
+        }
+        return "";
+    },
+
+    // private
+    beforeUpdate : function(){
+        this.grid.stopEditing(true);
+    },
+
+    // private
+    updateHeaders : function(){
+        this.innerHd.firstChild.innerHTML = this.renderHeaders();
+        this.innerHd.firstChild.style.width = this.getOffsetWidth();
+        this.innerHd.firstChild.firstChild.style.width = this.getTotalWidth();
+    },
+
+    /**
+     * Focuses the specified row.
+     * @param {Number} row The row index
+     */
+    focusRow : function(row){
+        this.focusCell(row, 0, false);
+    },
+
+    /**
+     * Focuses the specified cell.
+     * @param {Number} row The row index
+     * @param {Number} col The column index
+     */
+    focusCell : function(row, col, hscroll){
+        this.syncFocusEl(this.ensureVisible(row, col, hscroll));
+        if(Ext.isGecko){
+            this.focusEl.focus();
+        }else{
+            this.focusEl.focus.defer(1, this.focusEl);
+        }
+    },
+
+    resolveCell : function(row, col, hscroll){
+        if(typeof row != "number"){
+            row = row.rowIndex;
+        }
+        if(!this.ds){
+            return null;
+        }
+        if(row < 0 || row >= this.ds.getCount()){
+            return null;
+        }
+        col = (col !== undefined ? col : 0);
+
+        var rowEl = this.getRow(row),
+            cm = this.cm,
+            colCount = cm.getColumnCount(),
+            cellEl;
+        if(!(hscroll === false && col === 0)){
+            while(col < colCount && cm.isHidden(col)){
+                col++;
+            }
+            cellEl = this.getCell(row, col);
+        }
+
+        return {row: rowEl, cell: cellEl};
+    },
+
+    getResolvedXY : function(resolved){
+        if(!resolved){
+            return null;
+        }
+        var s = this.scroller.dom, c = resolved.cell, r = resolved.row;
+        return c ? Ext.fly(c).getXY() : [this.el.getX(), Ext.fly(r).getY()];
+    },
+
+    syncFocusEl : function(row, col, hscroll){
+        var xy = row;
+        if(!Ext.isArray(xy)){
+            row = Math.min(row, Math.max(0, this.getRows().length-1));
+            xy = this.getResolvedXY(this.resolveCell(row, col, hscroll));
+        }
+        this.focusEl.setXY(xy||this.scroller.getXY());
+    },
+
+    ensureVisible : function(row, col, hscroll){
+        var resolved = this.resolveCell(row, col, hscroll);
+        if(!resolved || !resolved.row){
+            return;
+        }
+
+        var rowEl = resolved.row, 
+            cellEl = resolved.cell,
+            c = this.scroller.dom,
+            ctop = 0,
+            p = rowEl, 
+            stop = this.el.dom;
+            
+        while(p && p != stop){
+            ctop += p.offsetTop;
+            p = p.offsetParent;
+        }
+        ctop -= this.mainHd.dom.offsetHeight;
+
+        var cbot = ctop + rowEl.offsetHeight,
+            ch = c.clientHeight,
+            sbot = stop + ch;
+            
+        stop = parseInt(c.scrollTop, 10);
+        
+
+        if(ctop < stop){
+          c.scrollTop = ctop;
+        }else if(cbot > sbot){
+            c.scrollTop = cbot-ch;
+        }
+
+        if(hscroll !== false){
+            var cleft = parseInt(cellEl.offsetLeft, 10);
+            var cright = cleft + cellEl.offsetWidth;
+
+            var sleft = parseInt(c.scrollLeft, 10);
+            var sright = sleft + c.clientWidth;
+            if(cleft < sleft){
+                c.scrollLeft = cleft;
+            }else if(cright > sright){
+                c.scrollLeft = cright-c.clientWidth;
+            }
+        }
+        return this.getResolvedXY(resolved);
+    },
+
+    // private
+    insertRows : function(dm, firstRow, lastRow, isUpdate){
+        var last = dm.getCount() - 1;
+        if(!isUpdate && firstRow === 0 && lastRow >= last){
+            this.refresh();
+        }else{
+            if(!isUpdate){
+                this.fireEvent("beforerowsinserted", this, firstRow, lastRow);
+            }
+            var html = this.renderRows(firstRow, lastRow),
+                before = this.getRow(firstRow);
+            if(before){
+                if(firstRow === 0){
+                    Ext.fly(this.getRow(0)).removeClass(this.firstRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeBegin', before, html);
+            }else{
+                var r = this.getRow(last - 1);
+                if(r){
+                    Ext.fly(r).removeClass(this.lastRowCls);
+                }
+                Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html);
+            }
+            if(!isUpdate){
+                this.fireEvent("rowsinserted", this, firstRow, lastRow);
+                this.processRows(firstRow);
+            }else if(firstRow === 0 || firstRow >= last){
+                //ensure first/last row is kept after an update.
+                Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls);
+            }
+        }
+        this.syncFocusEl(firstRow);
+    },
+
+    // private
+    deleteRows : function(dm, firstRow, lastRow){
+        if(dm.getRowCount()<1){
+            this.refresh();
+        }else{
+            this.fireEvent("beforerowsdeleted", this, firstRow, lastRow);
+
+            this.removeRows(firstRow, lastRow);
+
+            this.processRows(firstRow);
+            this.fireEvent("rowsdeleted", this, firstRow, lastRow);
+        }
+    },
+
+    // private
+    getColumnStyle : function(col, isHeader){
+        var style = !isHeader ? (this.cm.config[col].css || '') : '';
+        style += 'width:'+this.getColumnWidth(col)+';';
+        if(this.cm.isHidden(col)){
+            style += 'display:none;';
+        }
+        var align = this.cm.config[col].align;
+        if(align){
+            style += 'text-align:'+align+';';
+        }
+        return style;
+    },
+
+    // private
+    getColumnWidth : function(col){
+        var w = this.cm.getColumnWidth(col);
+        if(typeof w == 'number'){
+            return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px';
+        }
+        return w;
+    },
+
+    // private
+    getTotalWidth : function(){
+        return this.cm.getTotalWidth()+'px';
+    },
+
+    // private
+    fitColumns : function(preventRefresh, onlyExpand, omitColumn){
+        var cm = this.cm, i;
+        var tw = cm.getTotalWidth(false);
+        var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+
+        if(aw < 20){ // not initialized, so don't screw up the default widths
+            return;
+        }
+        var extra = aw - tw;
+
+        if(extra === 0){
+            return false;
+        }
+
+        var vc = cm.getColumnCount(true);
+        var ac = vc-(typeof omitColumn == 'number' ? 1 : 0);
+        if(ac === 0){
+            ac = 1;
+            omitColumn = undefined;
+        }
+        var colCount = cm.getColumnCount();
+        var cols = [];
+        var extraCol = 0;
+        var width = 0;
+        var w;
+        for (i = 0; i < colCount; i++){
+            if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){
+                w = cm.getColumnWidth(i);
+                cols.push(i);
+                extraCol = i;
+                cols.push(w);
+                width += w;
+            }
+        }
+        var frac = (aw - cm.getTotalWidth())/width;
+        while (cols.length){
+            w = cols.pop();
+            i = cols.pop();
+            cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true);
+        }
+
+        if((tw = cm.getTotalWidth(false)) > aw){
+            var adjustCol = ac != vc ? omitColumn : extraCol;
+             cm.setColumnWidth(adjustCol, Math.max(1,
+                     cm.getColumnWidth(adjustCol)- (tw-aw)), true);
+        }
+
+        if(preventRefresh !== true){
+            this.updateAllColumnWidths();
+        }
+
+
+        return true;
+    },
+
+    // private
+    autoExpand : function(preventUpdate){
+        var g = this.grid, cm = this.cm;
+        if(!this.userResized && g.autoExpandColumn){
+            var tw = cm.getTotalWidth(false);
+            var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset;
+            if(tw != aw){
+                var ci = cm.getIndexById(g.autoExpandColumn);
+                var currentWidth = cm.getColumnWidth(ci);
+                var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax);
+                if(cw != currentWidth){
+                    cm.setColumnWidth(ci, cw, true);
+                    if(preventUpdate !== true){
+                        this.updateColumnWidth(ci, cw);
+                    }
+                }
+            }
+        }
+    },
+
+    // private
+    getColumnData : function(){
+        // build a map for all the columns
+        var cs = [], cm = this.cm, colCount = cm.getColumnCount();
+        for(var i = 0; i < colCount; i++){
+            var name = cm.getDataIndex(i);
+            cs[i] = {
+                name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name),
+                renderer : cm.getRenderer(i),
+                id : cm.getColumnId(i),
+                style : this.getColumnStyle(i)
+            };
+        }
+        return cs;
+    },
+
+    // private
+    renderRows : function(startRow, endRow){
+        // pull in all the crap needed to render rows
+        var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows;
+        var colCount = cm.getColumnCount();
+
+        if(ds.getCount() < 1){
+            return "";
+        }
+
+        var cs = this.getColumnData();
+
+        startRow = startRow || 0;
+        endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow;
+
+        // records to render
+        var rs = ds.getRange(startRow, endRow);
+
+        return this.doRender(cs, rs, ds, startRow, colCount, stripe);
+    },
+
+    // private
+    renderBody : function(){
+        var markup = this.renderRows() || '&#160;';
+        return this.templates.body.apply({rows: markup});
+    },
+
+    // private
+    refreshRow : function(record){
+        var ds = this.ds, index;
+        if(typeof record == 'number'){
+            index = record;
+            record = ds.getAt(index);
+            if(!record){
+                return;
+            }
+        }else{
+            index = ds.indexOf(record);
+            if(index < 0){
+                return;
+            }
+        }
+        this.insertRows(ds, index, index, true);
+        this.getRow(index).rowIndex = index;
+        this.onRemove(ds, record, index+1, true);
+        this.fireEvent("rowupdated", this, index, record);
+    },
+
+    /**
+     * Refreshs the grid UI
+     * @param {Boolean} headersToo (optional) True to also refresh the headers
+     */
+    refresh : function(headersToo){
+        this.fireEvent("beforerefresh", this);
+        this.grid.stopEditing(true);
+
+        var result = this.renderBody();
+        this.mainBody.update(result).setWidth(this.getTotalWidth());
+        if(headersToo === true){
+            this.updateHeaders();
+            this.updateHeaderSortState();
+        }
+        this.processRows(0, true);
+        this.layout();
+        this.applyEmptyText();
+        this.fireEvent("refresh", this);
+    },
+
+    // private
+    applyEmptyText : function(){
+        if(this.emptyText && !this.hasRows()){
+            this.mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>');
+        }
+    },
+
+    // private
+    updateHeaderSortState : function(){
+        var state = this.ds.getSortState();
+        if(!state){
+            return;
+        }
+        if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){
+            this.grid.fireEvent('sortchange', this.grid, state);
+        }
+        this.sortState = state;
+        var sortColumn = this.cm.findColumnIndex(state.field);
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    // private
+    destroy : function(){
+        if(this.colMenu){
+            Ext.menu.MenuMgr.unregister(this.colMenu);
+            this.colMenu.destroy();
+            delete this.colMenu;
+        }
+        if(this.hmenu){
+            Ext.menu.MenuMgr.unregister(this.hmenu);
+            this.hmenu.destroy();
+            delete this.hmenu;
+        }
+        if(this.grid.enableColumnMove){
+            var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            if(dds){
+                for(var dd in dds){
+                    if(!dds[dd].config.isTarget && dds[dd].dragElId){
+                        var elid = dds[dd].dragElId;
+                        dds[dd].unreg();
+                        Ext.get(elid).remove();
+                    } else if(dds[dd].config.isTarget){
+                        dds[dd].proxyTop.remove();
+                        dds[dd].proxyBottom.remove();
+                        dds[dd].unreg();
+                    }
+                    if(Ext.dd.DDM.locationCache[dd]){
+                        delete Ext.dd.DDM.locationCache[dd];
+                    }
+                }
+                delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id];
+            }
+        }
+
+        if(this.dragZone){
+            this.dragZone.unreg();
+        }
+        
+        Ext.fly(this.innerHd).removeAllListeners();
+        Ext.removeNode(this.innerHd);
+        
+        Ext.destroy(this.resizeMarker, this.resizeProxy, this.focusEl, this.mainBody, 
+                    this.scroller, this.mainHd, this.mainWrap, this.dragZone, 
+                    this.splitZone, this.columnDrag, this.columnDrop);
+
+        this.initData(null, null);
+        Ext.EventManager.removeResizeListener(this.onWindowResize, this);
+        this.purgeListeners();
+    },
+
+    // private
+    onDenyColumnHide : function(){
+
+    },
+
+    // private
+    render : function(){
+        if(this.autoFill){
+            var ct = this.grid.ownerCt;
+            if (ct && ct.getLayout()){
+                ct.on('afterlayout', function(){ 
+                    this.fitColumns(true, true);
+                    this.updateHeaders(); 
+                }, this, {single: true}); 
+            }else{ 
+                this.fitColumns(true, true); 
+            }
+        }else if(this.forceFit){
+            this.fitColumns(true, false);
+        }else if(this.grid.autoExpandColumn){
+            this.autoExpand(true);
+        }
+
+        this.renderUI();
+    },
+
+    /* --------------------------------- Model Events and Handlers --------------------------------*/
+    // private
+    initData : function(ds, cm){
+        if(this.ds){
+            this.ds.un("load", this.onLoad, this);
+            this.ds.un("datachanged", this.onDataChange, this);
+            this.ds.un("add", this.onAdd, this);
+            this.ds.un("remove", this.onRemove, this);
+            this.ds.un("update", this.onUpdate, this);
+            this.ds.un("clear", this.onClear, this);
+            if(this.ds !== ds && this.ds.autoDestroy){
+                this.ds.destroy();
+            }
+        }
+        if(ds){
+            ds.on({
+                scope: this,
+                load: this.onLoad,
+                datachanged: this.onDataChange,
+                add: this.onAdd,
+                remove: this.onRemove,
+                update: this.onUpdate,
+                clear: this.onClear
+            });
+        }
+        this.ds = ds;
+
+        if(this.cm){
+            this.cm.un("configchange", this.onColConfigChange, this);
+            this.cm.un("widthchange", this.onColWidthChange, this);
+            this.cm.un("headerchange", this.onHeaderChange, this);
+            this.cm.un("hiddenchange", this.onHiddenChange, this);
+            this.cm.un("columnmoved", this.onColumnMove, this);
+        }
+        if(cm){
+            delete this.lastViewWidth;
+            cm.on({
+                scope: this,
+                configchange: this.onColConfigChange,
+                widthchange: this.onColWidthChange,
+                headerchange: this.onHeaderChange,
+                hiddenchange: this.onHiddenChange,
+                columnmoved: this.onColumnMove
+            });
+        }
+        this.cm = cm;
+    },
+
+    // private
+    onDataChange : function(){
+        this.refresh();
+        this.updateHeaderSortState();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onClear : function(){
+        this.refresh();
+        this.syncFocusEl(0);
+    },
+
+    // private
+    onUpdate : function(ds, record){
+        this.refreshRow(record);
+    },
+
+    // private
+    onAdd : function(ds, records, index){
+        this.insertRows(ds, index, index + (records.length-1));
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        if(isUpdate !== true){
+            this.fireEvent("beforerowremoved", this, index, record);
+        }
+        this.removeRow(index);
+        if(isUpdate !== true){
+            this.processRows(index);
+            this.applyEmptyText();
+            this.fireEvent("rowremoved", this, index, record);
+        }
+    },
+
+    // private
+    onLoad : function(){
+        this.scrollToTop();
+    },
+
+    // private
+    onColWidthChange : function(cm, col, width){
+        this.updateColumnWidth(col, width);
+    },
+
+    // private
+    onHeaderChange : function(cm, col, text){
+        this.updateHeaders();
+    },
+
+    // private
+    onHiddenChange : function(cm, col, hidden){
+        this.updateColumnHidden(col, hidden);
+    },
+
+    // private
+    onColumnMove : function(cm, oldIndex, newIndex){
+        this.indexMap = null;
+        var s = this.getScrollState();
+        this.refresh(true);
+        this.restoreScroll(s);
+        this.afterMove(newIndex);
+        this.grid.fireEvent('columnmove', oldIndex, newIndex);
+    },
+
+    // private
+    onColConfigChange : function(){
+        delete this.lastViewWidth;
+        this.indexMap = null;
+        this.refresh(true);
+    },
+
+    /* -------------------- UI Events and Handlers ------------------------------ */
+    // private
+    initUI : function(grid){
+        grid.on("headerclick", this.onHeaderClick, this);
+    },
+
+    // private
+    initEvents : function(){
+    },
+
+    // private
+    onHeaderClick : function(g, index){
+        if(this.headersDisabled || !this.cm.isSortable(index)){
+            return;
+        }
+        g.stopEditing(true);
+        g.store.sort(this.cm.getDataIndex(index));
+    },
+
+    // private
+    onRowOver : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false){
+            this.addRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    onRowOut : function(e, t){
+        var row;
+        if((row = this.findRowIndex(t)) !== false && !e.within(this.getRow(row), true)){
+            this.removeRowClass(row, "x-grid3-row-over");
+        }
+    },
+
+    // private
+    handleWheel : function(e){
+        e.stopPropagation();
+    },
+
+    // private
+    onRowSelect : function(row){
+        this.addRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onRowDeselect : function(row){
+        this.removeRowClass(row, this.selectedRowClass);
+    },
+
+    // private
+    onCellSelect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).addClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onCellDeselect : function(row, col){
+        var cell = this.getCell(row, col);
+        if(cell){
+            this.fly(cell).removeClass("x-grid3-cell-selected");
+        }
+    },
+
+    // private
+    onColumnSplitterMoved : function(i, w){
+        this.userResized = true;
+        var cm = this.grid.colModel;
+        cm.setColumnWidth(i, w, true);
+
+        if(this.forceFit){
+            this.fitColumns(true, false, i);
+            this.updateAllColumnWidths();
+        }else{
+            this.updateColumnWidth(i, w);
+            this.syncHeaderScroll();
+        }
+
+        this.grid.fireEvent("columnresize", i, w);
+    },
+
+    // private
+    handleHdMenuClick : function(item){
+        var index = this.hdCtxIndex;
+        var cm = this.cm, ds = this.ds;
+        switch(item.itemId){
+            case "asc":
+                ds.sort(cm.getDataIndex(index), "ASC");
+                break;
+            case "desc":
+                ds.sort(cm.getDataIndex(index), "DESC");
+                break;
+            default:
+                index = cm.getIndexById(item.itemId.substr(4));
+                if(index != -1){
+                    if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){
+                        this.onDenyColumnHide();
+                        return false;
+                    }
+                    cm.setHidden(index, item.checked);
+                }
+        }
+        return true;
+    },
+
+    // private
+    isHideableColumn : function(c){
+        return !c.hidden && !c.fixed;
+    },
+
+    // private
+    beforeColMenuShow : function(){
+        var cm = this.cm,  colCount = cm.getColumnCount();
+        this.colMenu.removeAll();
+        for(var i = 0; i < colCount; i++){
+            if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){
+                this.colMenu.add(new Ext.menu.CheckItem({
+                    itemId: "col-"+cm.getColumnId(i),
+                    text: cm.getColumnHeader(i),
+                    checked: !cm.isHidden(i),
+                    hideOnClick:false,
+                    disabled: cm.config[i].hideable === false
+                }));
+            }
+        }
+    },
+
+    // private
+    handleHdDown : function(e, t){
+        if(Ext.fly(t).hasClass('x-grid3-hd-btn')){
+            e.stopEvent();
+            var hd = this.findHeaderCell(t);
+            Ext.fly(hd).addClass('x-grid3-hd-menu-open');
+            var index = this.getCellIndex(hd);
+            this.hdCtxIndex = index;
+            var ms = this.hmenu.items, cm = this.cm;
+            ms.get("asc").setDisabled(!cm.isSortable(index));
+            ms.get("desc").setDisabled(!cm.isSortable(index));
+            this.hmenu.on("hide", function(){
+                Ext.fly(hd).removeClass('x-grid3-hd-menu-open');
+            }, this, {single:true});
+            this.hmenu.show(t, "tl-bl?");
+        }
+    },
+
+    // private
+    handleHdOver : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && !this.headersDisabled){
+            this.activeHd = hd;
+            this.activeHdIndex = this.getCellIndex(hd);
+            var fly = this.fly(hd);
+            this.activeHdRegion = fly.getRegion();
+            if(!this.cm.isMenuDisabled(this.activeHdIndex)){
+                fly.addClass("x-grid3-hd-over");
+                this.activeHdBtn = fly.child('.x-grid3-hd-btn');
+                if(this.activeHdBtn){
+                    this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
+                }
+            }
+        }
+    },
+
+    // private
+    handleHdMove : function(e, t){
+        if(this.activeHd && !this.headersDisabled){
+            var hw = this.splitHandleWidth || 5;
+            var r = this.activeHdRegion;
+            var x = e.getPageX();
+            var ss = this.activeHd.style;
+            if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported
+            }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){
+                ss.cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize';
+            }else{
+                ss.cursor = '';
+            }
+        }
+    },
+
+    // private
+    handleHdOut : function(e, t){
+        var hd = this.findHeaderCell(t);
+        if(hd && (!Ext.isIE || !e.within(hd, true))){
+            this.activeHd = null;
+            this.fly(hd).removeClass("x-grid3-hd-over");
+            hd.style.cursor = '';
+        }
+    },
+
+    // private
+    hasRows : function(){
+        var fc = this.mainBody.dom.firstChild;
+        return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty';
+    },
+
+    // back compat
+    bind : function(d, c){
+        this.initData(d, c);
+    }
+});
+
+
+// private
+// This is a support class used internally by the Grid components
+Ext.grid.GridView.SplitDragZone = function(grid, hd){
+    this.grid = grid;
+    this.view = grid.getView();
+    this.marker = this.view.resizeMarker;
+    this.proxy = this.view.resizeProxy;
+    Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd,
+        "gridSplitters" + this.grid.getGridEl().id, {
+        dragElId : Ext.id(this.proxy.dom), resizeFrame:false
+    });
+    this.scroll = false;
+    this.hw = this.view.splitHandleWidth || 5;
+};
+Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, {
+
+    b4StartDrag : function(x, y){
+        this.view.headersDisabled = true;
+        var h = this.view.mainWrap.getHeight();
+        this.marker.setHeight(h);
+        this.marker.show();
+        this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]);
+        this.proxy.setHeight(h);
+        var w = this.cm.getColumnWidth(this.cellIndex);
+        var minw = Math.max(w-this.grid.minColumnWidth, 0);
+        this.resetConstraints();
+        this.setXConstraint(minw, 1000);
+        this.setYConstraint(0, 0);
+        this.minX = x - minw;
+        this.maxX = x + 1000;
+        this.startPos = x;
+        Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y);
+    },
+
+
+    handleMouseDown : function(e){
+        var t = this.view.findHeaderCell(e.getTarget());
+        if(t){
+            var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1];
+            var exy = e.getXY(), ex = exy[0];
+            var w = t.offsetWidth, adjust = false;
+            if((ex - x) <= this.hw){
+                adjust = -1;
+            }else if((x+w) - ex <= this.hw){
+                adjust = 0;
+            }
+            if(adjust !== false){
+                this.cm = this.grid.colModel;
+                var ci = this.view.getCellIndex(t);
+                if(adjust == -1){
+                  if (ci + adjust < 0) {
+                    return;
+                  }
+                    while(this.cm.isHidden(ci+adjust)){
+                        --adjust;
+                        if(ci+adjust < 0){
+                            return;
+                        }
+                    }
+                }
+                this.cellIndex = ci+adjust;
+                this.split = t.dom;
+                if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){
+                    Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments);
+                }
+            }else if(this.view.columnDrag){
+                this.view.columnDrag.callHandleMouseDown(e);
+            }
+        }
+    },
+
+    endDrag : function(e){
+        this.marker.hide();
+        var v = this.view;
+        var endX = Math.max(this.minX, e.getPageX());
+        var diff = endX - this.startPos;
+        v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
+        setTimeout(function(){
+            v.headersDisabled = false;
+        }, 50);
+    },
+
+    autoOffset : function(){
+        this.setDelta(0,0);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GroupingView.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GroupingView.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/GroupingView.js	(revision 625)
@@ -0,0 +1,517 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.GroupingView
+ * @extends Ext.grid.GridView
+ * Adds the ability for single level grouping to the grid. A {@link Ext.data.GroupingStore GroupingStore}
+ * must be used to enable grouping.  Some grouping characteristics may also be configured at the
+ * {@link Ext.grid.Column Column level}<div class="mdetail-params"><ul>
+ * <li><code>{@link Ext.grid.Column#emptyGroupText emptyGroupText}</li>
+ * <li><code>{@link Ext.grid.Column#groupable groupable}</li>
+ * <li><code>{@link Ext.grid.Column#groupName groupName}</li>
+ * <li><code>{@link Ext.grid.Column#groupRender groupRender}</li>
+ * </ul></div>
+ * <p>Sample usage:</p>
+ * <pre><code>
+var grid = new Ext.grid.GridPanel({
+    // A groupingStore is required for a GroupingView
+    store: new {@link Ext.data.GroupingStore}({
+        autoDestroy: true,
+        reader: reader,
+        data: xg.dummyData,
+        sortInfo: {field: 'company', direction: 'ASC'},
+        {@link Ext.data.GroupingStore#groupOnSort groupOnSort}: true,
+        {@link Ext.data.GroupingStore#remoteGroup remoteGroup}: true,
+        {@link Ext.data.GroupingStore#groupField groupField}: 'industry'
+    }),
+    colModel: new {@link Ext.grid.ColumnModel}({
+        columns:[
+            {id:'company',header: 'Company', width: 60, dataIndex: 'company'},
+            // {@link Ext.grid.Column#groupable groupable}, {@link Ext.grid.Column#groupName groupName}, {@link Ext.grid.Column#groupRender groupRender} are also configurable at column level
+            {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price', {@link Ext.grid.Column#groupable groupable}: false},
+            {header: 'Change', dataIndex: 'change', renderer: Ext.util.Format.usMoney},
+            {header: 'Industry', dataIndex: 'industry'},
+            {header: 'Last Updated', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+        ],
+        defaults: {
+            sortable: true,
+            menuDisabled: false,
+            width: 20
+        }
+    }),
+
+    view: new Ext.grid.GroupingView({
+        {@link Ext.grid.GridView#forceFit forceFit}: true,
+        // custom grouping text template to display the number of items per group
+        {@link #groupTextTpl}: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+
+    frame:true,
+    width: 700,
+    height: 450,
+    collapsible: true,
+    animCollapse: false,
+    title: 'Grouping Example',
+    iconCls: 'icon-grid',
+    renderTo: document.body
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
+
+    /**
+     * @cfg {String} groupByText Text displayed in the grid header menu for grouping by a column
+     * (defaults to 'Group By This Field').
+     */
+    groupByText : 'Group By This Field',
+    /**
+     * @cfg {String} showGroupsText Text displayed in the grid header for enabling/disabling grouping
+     * (defaults to 'Show in Groups').
+     */
+    showGroupsText : 'Show in Groups',
+    /**
+     * @cfg {Boolean} hideGroupedColumn <tt>true</tt> to hide the column that is currently grouped (defaults to <tt>false</tt>)
+     */
+    hideGroupedColumn : false,
+    /**
+     * @cfg {Boolean} showGroupName If <tt>true</tt> will display a prefix plus a ': ' before the group field value
+     * in the group header line.  The prefix will consist of the <tt><b>{@link Ext.grid.Column#groupName groupName}</b></tt>
+     * (or the configured <tt><b>{@link Ext.grid.Column#header header}</b></tt> if not provided) configured in the
+     * {@link Ext.grid.Column} for each set of grouped rows (defaults to <tt>true</tt>).
+     */
+    showGroupName : true,
+    /**
+     * @cfg {Boolean} startCollapsed <tt>true</tt> to start all groups collapsed (defaults to <tt>false</tt>)
+     */
+    startCollapsed : false,
+    /**
+     * @cfg {Boolean} enableGrouping <tt>false</tt> to disable grouping functionality (defaults to <tt>true</tt>)
+     */
+    enableGrouping : true,
+    /**
+     * @cfg {Boolean} enableGroupingMenu <tt>true</tt> to enable the grouping control in the column menu (defaults to <tt>true</tt>)
+     */
+    enableGroupingMenu : true,
+    /**
+     * @cfg {Boolean} enableNoGroups <tt>true</tt> to allow the user to turn off grouping (defaults to <tt>true</tt>)
+     */
+    enableNoGroups : true,
+    /**
+     * @cfg {String} emptyGroupText The text to display when there is an empty group value (defaults to <tt>'(None)'</tt>).
+     * May also be specified per column, see {@link Ext.grid.Column}.{@link Ext.grid.Column#emptyGroupText emptyGroupText}.
+     */
+    emptyGroupText : '(None)',
+    /**
+     * @cfg {Boolean} ignoreAdd <tt>true</tt> to skip refreshing the view when new rows are added (defaults to <tt>false</tt>)
+     */
+    ignoreAdd : false,
+    /**
+     * @cfg {String} groupTextTpl The template used to render the group header (defaults to <tt>'{text}'</tt>).
+     * This is used to format an object which contains the following properties:
+     * <div class="mdetail-params"><ul>
+     * <li><b>group</b> : String<p class="sub-desc">The <i>rendered</i> value of the group field.
+     * By default this is the unchanged value of the group field. If a <tt><b>{@link Ext.grid.Column#groupRenderer groupRenderer}</b></tt>
+     * is specified, it is the result of a call to that function.</p></li>
+     * <li><b>gvalue</b> : Object<p class="sub-desc">The <i>raw</i> value of the group field.</p></li>
+     * <li><b>text</b> : String<p class="sub-desc">The configured header (as described in <tt>{@link #showGroupName})</tt>
+     * if <tt>{@link #showGroupName}</tt> is <tt>true</tt>) plus the <i>rendered</i> group field value.</p></li>
+     * <li><b>groupId</b> : String<p class="sub-desc">A unique, generated ID which is applied to the
+     * View Element which contains the group.</p></li>
+     * <li><b>startRow</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
+     * <li><b>rs</b> : Array<p class="sub-desc">Contains a single element: The Record providing the data
+     * for the row which caused group change.</p></li>
+     * <li><b>cls</b> : String<p class="sub-desc">The generated class name string to apply to the group header Element.</p></li>
+     * <li><b>style</b> : String<p class="sub-desc">The inline style rules to apply to the group header Element.</p></li>
+     * </ul></div></p>
+     * See {@link Ext.XTemplate} for information on how to format data using a template. Possible usage:<pre><code>
+var grid = new Ext.grid.GridPanel({
+    ...
+    view: new Ext.grid.GroupingView({
+        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
+    }),
+});
+     * </code></pre>
+     */
+    groupTextTpl : '{text}',
+    /**
+     * @cfg {Function} groupRenderer This property must be configured in the {@link Ext.grid.Column} for
+     * each column.
+     */
+
+    // private
+    gidSeed : 1000,
+
+    // private
+    initTemplates : function(){
+        Ext.grid.GroupingView.superclass.initTemplates.call(this);
+        this.state = {};
+
+        var sm = this.grid.getSelectionModel();
+        sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect',
+                this.onBeforeRowSelect, this);
+
+        if(!this.startGroup){
+            this.startGroup = new Ext.XTemplate(
+                '<div id="{groupId}" class="x-grid-group {cls}">',
+                    '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">', this.groupTextTpl ,'</div></div>',
+                    '<div id="{groupId}-bd" class="x-grid-group-body">'
+            );
+        }
+        this.startGroup.compile();
+        this.endGroup = '</div></div>';
+    },
+
+    // private
+    findGroup : function(el){
+        return Ext.fly(el).up('.x-grid-group', this.mainBody.dom);
+    },
+
+    // private
+    getGroups : function(){
+        return this.hasRows() ? this.mainBody.dom.childNodes : [];
+    },
+
+    // private
+    onAdd : function(){
+        if(this.enableGrouping && !this.ignoreAdd){
+            var ss = this.getScrollState();
+            this.refresh();
+            this.restoreScroll(ss);
+        }else if(!this.enableGrouping){
+            Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments);
+        }
+    },
+
+    // private
+    onRemove : function(ds, record, index, isUpdate){
+        Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments);
+        var g = document.getElementById(record._groupId);
+        if(g && g.childNodes[1].childNodes.length < 1){
+            Ext.removeNode(g);
+        }
+        this.applyEmptyText();
+    },
+
+    // private
+    refreshRow : function(record){
+        if(this.ds.getCount()==1){
+            this.refresh();
+        }else{
+            this.isUpdating = true;
+            Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
+            this.isUpdating = false;
+        }
+    },
+
+    // private
+    beforeMenuShow : function(){
+        var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false;
+        if((item = items.get('groupBy'))){
+            item.setDisabled(disabled);
+        }
+        if((item = items.get('showGroups'))){
+            item.setDisabled(disabled);
+		    item.setChecked(!!this.getGroupField(), true);
+        }
+    },
+
+    // private
+    renderUI : function(){
+        Ext.grid.GroupingView.superclass.renderUI.call(this);
+        this.mainBody.on('mousedown', this.interceptMouse, this);
+
+        if(this.enableGroupingMenu && this.hmenu){
+            this.hmenu.add('-',{
+                itemId:'groupBy',
+                text: this.groupByText,
+                handler: this.onGroupByClick,
+                scope: this,
+                iconCls:'x-group-by-icon'
+            });
+            if(this.enableNoGroups){
+                this.hmenu.add({
+                    itemId:'showGroups',
+                    text: this.showGroupsText,
+                    checked: true,
+                    checkHandler: this.onShowGroupsClick,
+                    scope: this
+                });
+            }
+            this.hmenu.on('beforeshow', this.beforeMenuShow, this);
+        }
+    },
+
+    // private
+    onGroupByClick : function(){
+        this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));
+        this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups
+    },
+
+    // private
+    onShowGroupsClick : function(mi, checked){
+        if(checked){
+            this.onGroupByClick();
+        }else{
+            this.grid.store.clearGrouping();
+        }
+    },
+
+    /**
+     * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed.
+     * @param {String} groupId The groupId assigned to the group (see getGroupId)
+     * @param {Boolean} expanded (optional)
+     */
+    toggleGroup : function(group, expanded){
+        this.grid.stopEditing(true);
+        group = Ext.getDom(group);
+        var gel = Ext.fly(group);
+        expanded = expanded !== undefined ?
+                expanded : gel.hasClass('x-grid-group-collapsed');
+
+        this.state[gel.dom.id] = expanded;
+        gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed');
+    },
+
+    /**
+     * Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed.
+     * @param {Boolean} expanded (optional)
+     */
+    toggleAllGroups : function(expanded){
+        var groups = this.getGroups();
+        for(var i = 0, len = groups.length; i < len; i++){
+            this.toggleGroup(groups[i], expanded);
+        }
+    },
+
+    /**
+     * Expands all grouped rows.
+     */
+    expandAllGroups : function(){
+        this.toggleAllGroups(true);
+    },
+
+    /**
+     * Collapses all grouped rows.
+     */
+    collapseAllGroups : function(){
+        this.toggleAllGroups(false);
+    },
+
+    // private
+    interceptMouse : function(e){
+        var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
+        if(hd){
+            e.stopEvent();
+            this.toggleGroup(hd.parentNode);
+        }
+    },
+
+    // private
+    getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){
+        var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v);
+        if(g === ''){
+            g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText;
+        }
+        return g;
+    },
+
+    // private
+    getGroupField : function(){
+        return this.grid.store.getGroupState();
+    },
+    
+    // private
+    afterRender : function(){
+        Ext.grid.GroupingView.superclass.afterRender.call(this);
+        if(this.grid.deferRowRender){
+            this.updateGroupWidths();
+        }
+    },
+
+    // private
+    renderRows : function(){
+        var groupField = this.getGroupField();
+        var eg = !!groupField;
+        // if they turned off grouping and the last grouped field is hidden
+        if(this.hideGroupedColumn) {
+            var colIndex = this.cm.findColumnIndex(groupField);
+            if(!eg && this.lastGroupField !== undefined) {
+                this.mainBody.update('');
+                this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false);
+                delete this.lastGroupField;
+            }else if (eg && this.lastGroupField === undefined) {
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) {
+                this.mainBody.update('');
+                var oldIndex = this.cm.findColumnIndex(this.lastGroupField);
+                this.cm.setHidden(oldIndex, false);
+                this.lastGroupField = groupField;
+                this.cm.setHidden(colIndex, true);
+            }
+        }
+        return Ext.grid.GroupingView.superclass.renderRows.apply(
+                    this, arguments);
+    },
+
+    // private
+    doRender : function(cs, rs, ds, startRow, colCount, stripe){
+        if(rs.length < 1){
+            return '';
+        }
+        var groupField = this.getGroupField(),
+            colIndex = this.cm.findColumnIndex(groupField),
+            g;
+
+        this.enableGrouping = !!groupField;
+
+        if(!this.enableGrouping || this.isUpdating){
+            return Ext.grid.GroupingView.superclass.doRender.apply(
+                    this, arguments);
+        }
+        var gstyle = 'width:'+this.getTotalWidth()+';';
+
+        var gidPrefix = this.grid.getGridEl().id;
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var prefix = this.showGroupName ?
+                     (cfg.groupName || cfg.header)+': ' : '';
+
+        var groups = [], curGroup, i, len, gid;
+        for(i = 0, len = rs.length; i < len; i++){
+            var rowIndex = startRow + i,
+                r = rs[i],
+                gvalue = r.data[groupField];
+                
+                g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds);
+            if(!curGroup || curGroup.group != g){
+                gid = gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(g);
+               	// if state is defined use it, however state is in terms of expanded
+				// so negate it, otherwise use the default.
+				var isCollapsed  = typeof this.state[gid] !== 'undefined' ? !this.state[gid] : this.startCollapsed;
+				var gcls = isCollapsed ? 'x-grid-group-collapsed' : '';	
+                curGroup = {
+                    group: g,
+                    gvalue: gvalue,
+                    text: prefix + g,
+                    groupId: gid,
+                    startRow: rowIndex,
+                    rs: [r],
+                    cls: gcls,
+                    style: gstyle
+                };
+                groups.push(curGroup);
+            }else{
+                curGroup.rs.push(r);
+            }
+            r._groupId = gid;
+        }
+
+        var buf = [];
+        for(i = 0, len = groups.length; i < len; i++){
+            g = groups[i];
+            this.doGroupStart(buf, g, cs, ds, colCount);
+            buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call(
+                    this, cs, g.rs, ds, g.startRow, colCount, stripe);
+
+            this.doGroupEnd(buf, g, cs, ds, colCount);
+        }
+        return buf.join('');
+    },
+
+    /**
+     * Dynamically tries to determine the groupId of a specific value
+     * @param {String} value
+     * @return {String} The group id
+     */
+    getGroupId : function(value){
+        var gidPrefix = this.grid.getGridEl().id;
+        var groupField = this.getGroupField();
+        var colIndex = this.cm.findColumnIndex(groupField);
+        var cfg = this.cm.config[colIndex];
+        var groupRenderer = cfg.groupRenderer || cfg.renderer;
+        var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds);
+        return gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(value);
+    },
+
+    // private
+    doGroupStart : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.startGroup.apply(g);
+    },
+
+    // private
+    doGroupEnd : function(buf, g, cs, ds, colCount){
+        buf[buf.length] = this.endGroup;
+    },
+
+    // private
+    getRows : function(){
+        if(!this.enableGrouping){
+            return Ext.grid.GroupingView.superclass.getRows.call(this);
+        }
+        var r = [];
+        var g, gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            g = gs[i].childNodes[1].childNodes;
+            for(var j = 0, jlen = g.length; j < jlen; j++){
+                r[r.length] = g[j];
+            }
+        }
+        return r;
+    },
+
+    // private
+    updateGroupWidths : function(){
+        if(!this.enableGrouping || !this.hasRows()){
+            return;
+        }
+        var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px';
+        var gs = this.getGroups();
+        for(var i = 0, len = gs.length; i < len; i++){
+            gs[i].firstChild.style.width = tw;
+        }
+    },
+
+    // private
+    onColumnWidthUpdated : function(col, w, tw){
+        Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onAllColumnWidthsUpdated : function(ws, tw){
+        Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onColumnHiddenUpdated : function(col, hidden, tw){
+        Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw);
+        this.updateGroupWidths();
+    },
+
+    // private
+    onLayout : function(){
+        this.updateGroupWidths();
+    },
+
+    // private
+    onBeforeRowSelect : function(sm, rowIndex){
+        if(!this.enableGrouping){
+            return;
+        }
+        var row = this.getRow(rowIndex);
+        if(row && !row.offsetParent){
+            var g = this.findGroup(row);
+            this.toggleGroup(g, true);
+        }
+    }
+});
+// private
+Ext.grid.GroupingView.GROUP_ID = 1000;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/PropertyGrid.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/PropertyGrid.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/PropertyGrid.js	(revision 625)
@@ -0,0 +1,370 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.PropertyRecord
+ * A specific {@link Ext.data.Record} type that represents a name/value pair and is made to work with the
+ * {@link Ext.grid.PropertyGrid}.  Typically, PropertyRecords do not need to be created directly as they can be
+ * created implicitly by simply using the appropriate data configs either via the {@link Ext.grid.PropertyGrid#source}
+ * config property or by calling {@link Ext.grid.PropertyGrid#setSource}.  However, if the need arises, these records
+ * can also be created explicitly as shwon below.  Example usage:
+ * <pre><code>
+var rec = new Ext.grid.PropertyRecord({
+    name: 'Birthday',
+    value: new Date(Date.parse('05/26/1972'))
+});
+// Add record to an already populated grid
+grid.store.addSorted(rec);
+</code></pre>
+ * @constructor
+ * @param {Object} config A data object in the format: {name: [name], value: [value]}.  The specified value's type
+ * will be read automatically by the grid to determine the type of editor to use when displaying it.
+ */
+Ext.grid.PropertyRecord = Ext.data.Record.create([
+    {name:'name',type:'string'}, 'value'
+]);
+
+/**
+ * @class Ext.grid.PropertyStore
+ * @extends Ext.util.Observable
+ * A custom wrapper for the {@link Ext.grid.PropertyGrid}'s {@link Ext.data.Store}. This class handles the mapping
+ * between the custom data source objects supported by the grid and the {@link Ext.grid.PropertyRecord} format
+ * required for compatibility with the underlying store. Generally this class should not need to be used directly --
+ * the grid's data should be accessed from the underlying store via the {@link #store} property.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyStore = function(grid, source){
+    this.grid = grid;
+    this.store = new Ext.data.Store({
+        recordType : Ext.grid.PropertyRecord
+    });
+    this.store.on('update', this.onUpdate,  this);
+    if(source){
+        this.setSource(source);
+    }
+    Ext.grid.PropertyStore.superclass.constructor.call(this);
+};
+Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, {
+    // protected - should only be called by the grid.  Use grid.setSource instead.
+    setSource : function(o){
+        this.source = o;
+        this.store.removeAll();
+        var data = [];
+        for(var k in o){
+            if(this.isEditableValue(o[k])){
+                data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k));
+            }
+        }
+        this.store.loadRecords({records: data}, {}, true);
+    },
+
+    // private
+    onUpdate : function(ds, record, type){
+        if(type == Ext.data.Record.EDIT){
+            var v = record.data.value;
+            var oldValue = record.modified.value;
+            if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){
+                this.source[record.id] = v;
+                record.commit();
+                this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue);
+            }else{
+                record.reject();
+            }
+        }
+    },
+
+    // private
+    getProperty : function(row){
+       return this.store.getAt(row);
+    },
+
+    // private
+    isEditableValue: function(val){
+        if(Ext.isDate(val)){
+            return true;
+        }
+        return !(Ext.isObject(val) || Ext.isFunction(val));
+    },
+
+    // private
+    setValue : function(prop, value){
+        this.source[prop] = value;
+        this.store.getById(prop).set('value', value);
+    },
+
+    // protected - should only be called by the grid.  Use grid.getSource instead.
+    getSource : function(){
+        return this.source;
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyColumnModel
+ * @extends Ext.grid.ColumnModel
+ * A custom column model for the {@link Ext.grid.PropertyGrid}.  Generally it should not need to be used directly.
+ * @constructor
+ * @param {Ext.grid.Grid} grid The grid this store will be bound to
+ * @param {Object} source The source data config object
+ */
+Ext.grid.PropertyColumnModel = function(grid, store){
+    var g = Ext.grid,
+        f = Ext.form;
+        
+    this.grid = grid;
+    g.PropertyColumnModel.superclass.constructor.call(this, [
+        {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true},
+        {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true}
+    ]);
+    this.store = store;
+
+    var bfield = new f.Field({
+        autoCreate: {tag: 'select', children: [
+            {tag: 'option', value: 'true', html: 'true'},
+            {tag: 'option', value: 'false', html: 'false'}
+        ]},
+        getValue : function(){
+            return this.el.value == 'true';
+        }
+    });
+    this.editors = {
+        'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})),
+        'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})),
+        'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})),
+        'boolean' : new g.GridEditor(bfield)
+    };
+    this.renderCellDelegate = this.renderCell.createDelegate(this);
+    this.renderPropDelegate = this.renderProp.createDelegate(this);
+};
+
+Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, {
+    // private - strings used for locale support
+    nameText : 'Name',
+    valueText : 'Value',
+    dateFormat : 'm/j/Y',
+
+    // private
+    renderDate : function(dateVal){
+        return dateVal.dateFormat(this.dateFormat);
+    },
+
+    // private
+    renderBool : function(bVal){
+        return bVal ? 'true' : 'false';
+    },
+
+    // private
+    isCellEditable : function(colIndex, rowIndex){
+        return colIndex == 1;
+    },
+
+    // private
+    getRenderer : function(col){
+        return col == 1 ?
+            this.renderCellDelegate : this.renderPropDelegate;
+    },
+
+    // private
+    renderProp : function(v){
+        return this.getPropertyName(v);
+    },
+
+    // private
+    renderCell : function(val){
+        var rv = val;
+        if(Ext.isDate(val)){
+            rv = this.renderDate(val);
+        }else if(typeof val == 'boolean'){
+            rv = this.renderBool(val);
+        }
+        return Ext.util.Format.htmlEncode(rv);
+    },
+
+    // private
+    getPropertyName : function(name){
+        var pn = this.grid.propertyNames;
+        return pn && pn[name] ? pn[name] : name;
+    },
+
+    // private
+    getCellEditor : function(colIndex, rowIndex){
+        var p = this.store.getProperty(rowIndex),
+            n = p.data.name, 
+            val = p.data.value;
+        if(this.grid.customEditors[n]){
+            return this.grid.customEditors[n];
+        }
+        if(Ext.isDate(val)){
+            return this.editors.date;
+        }else if(typeof val == 'number'){
+            return this.editors.number;
+        }else if(typeof val == 'boolean'){
+            return this.editors['boolean'];
+        }else{
+            return this.editors.string;
+        }
+    },
+
+    // inherit docs
+    destroy : function(){
+        Ext.grid.PropertyColumnModel.superclass.destroy.call(this);
+        for(var ed in this.editors){
+            Ext.destroy(ed);
+        }
+    }
+});
+
+/**
+ * @class Ext.grid.PropertyGrid
+ * @extends Ext.grid.EditorGridPanel
+ * A specialized grid implementation intended to mimic the traditional property grid as typically seen in
+ * development IDEs.  Each row in the grid represents a property of some object, and the data is stored
+ * as a set of name/value pairs in {@link Ext.grid.PropertyRecord}s.  Example usage:
+ * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    title: 'Properties Grid',
+    autoHeight: true,
+    width: 300,
+    renderTo: 'grid-ct',
+    source: {
+        "(name)": "My Object",
+        "Created": new Date(Date.parse('10/15/2006')),
+        "Available": false,
+        "Version": .01,
+        "Description": "A test object"
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {Object} config The grid config object
+ */
+Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
+    /**
+    * @cfg {Object} propertyNames An object containing property name/display name pairs.
+    * If specified, the display name will be shown in the name column instead of the property name.
+    */
+    /**
+    * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details).
+    */
+    /**
+    * @cfg {Object} customEditors An object containing name/value pairs of custom editor type definitions that allow
+    * the grid to support additional types of editable fields.  By default, the grid supports strongly-typed editing
+    * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and
+    * associated with a custom input control by specifying a custom editor.  The name of the editor
+    * type should correspond with the name of the property that will use the editor.  Example usage:
+    * <pre><code>
+var grid = new Ext.grid.PropertyGrid({
+    ...
+    customEditors: {
+        'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))
+    },
+    source: {
+        'Start Time': '10:00 AM'
+    }
+});
+</code></pre>
+    */
+
+    // private config overrides
+    enableColumnMove:false,
+    stripeRows:false,
+    trackMouseOver: false,
+    clicksToEdit:1,
+    enableHdMenu : false,
+    viewConfig : {
+        forceFit:true
+    },
+
+    // private
+    initComponent : function(){
+        this.customEditors = this.customEditors || {};
+        this.lastEditRow = null;
+        var store = new Ext.grid.PropertyStore(this);
+        this.propStore = store;
+        var cm = new Ext.grid.PropertyColumnModel(this, store);
+        store.store.sort('name', 'ASC');
+        this.addEvents(
+            /**
+             * @event beforepropertychange
+             * Fires before a property value changes.  Handlers can return false to cancel the property change
+             * (this will internally call {@link Ext.data.Record#reject} on the property's record).
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'beforepropertychange',
+            /**
+             * @event propertychange
+             * Fires after a property value has changed.
+             * @param {Object} source The source data object for the grid (corresponds to the same object passed in
+             * as the {@link #source} config property).
+             * @param {String} recordId The record's id in the data store
+             * @param {Mixed} value The current edited property value
+             * @param {Mixed} oldValue The original property value prior to editing
+             */
+            'propertychange'
+        );
+        this.cm = cm;
+        this.ds = store.store;
+        Ext.grid.PropertyGrid.superclass.initComponent.call(this);
+
+		this.mon(this.selModel, 'beforecellselect', function(sm, rowIndex, colIndex){
+            if(colIndex === 0){
+                this.startEditing.defer(200, this, [rowIndex, 1]);
+                return false;
+            }
+        }, this);
+    },
+
+    // private
+    onRender : function(){
+        Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments);
+
+        this.getGridEl().addClass('x-props-grid');
+    },
+
+    // private
+    afterRender: function(){
+        Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments);
+        if(this.source){
+            this.setSource(this.source);
+        }
+    },
+
+    /**
+     * Sets the source data object containing the property data.  The data object can contain one or more name/value
+     * pairs representing all of the properties of an object to display in the grid, and this data will automatically
+     * be loaded into the grid's {@link #store}.  The values should be supplied in the proper data type if needed,
+     * otherwise string type will be assumed.  If the grid already contains data, this method will replace any
+     * existing data.  See also the {@link #source} config value.  Example usage:
+     * <pre><code>
+grid.setSource({
+    "(name)": "My Object",
+    "Created": new Date(Date.parse('10/15/2006')),  // date type
+    "Available": false,  // boolean type
+    "Version": .01,      // decimal type
+    "Description": "A test object"
+});
+</code></pre>
+     * @param {Object} source The data object
+     */
+    setSource : function(source){
+        this.propStore.setSource(source);
+    },
+
+    /**
+     * Gets the source data object containing the property data.  See {@link #setSource} for details regarding the
+     * format of the data object.
+     * @return {Object} The data object
+     */
+    getSource : function(){
+        return this.propStore.getSource();
+    }
+});
+Ext.reg("propertygrid", Ext.grid.PropertyGrid);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowNumberer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowNumberer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowNumberer.js	(revision 625)
@@ -0,0 +1,61 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.RowNumberer
+ * This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides
+ * an automatic row numbering column.
+ * <br>Usage:<br>
+ <pre><code>
+ // This is a typical column config with the first column providing row numbers
+ var colModel = new Ext.grid.ColumnModel([
+    new Ext.grid.RowNumberer(),
+    {header: "Name", width: 80, sortable: true},
+    {header: "Code", width: 50, sortable: true},
+    {header: "Description", width: 200, sortable: true}
+ ]);
+ </code></pre>
+ * @constructor
+ * @param {Object} config The configuration options
+ */
+Ext.grid.RowNumberer = function(config){
+    Ext.apply(this, config);
+    if(this.rowspan){
+        this.renderer = this.renderer.createDelegate(this);
+    }
+};
+
+Ext.grid.RowNumberer.prototype = {
+    /**
+     * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row
+     * number column (defaults to '').
+     */
+    header: "",
+    /**
+     * @cfg {Number} width The default width in pixels of the row number column (defaults to 23).
+     */
+    width: 23,
+    /**
+     * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false).
+     * @hide
+     */
+    sortable: false,
+
+    // private
+    fixed:true,
+    menuDisabled:true,
+    dataIndex: '',
+    id: 'numberer',
+    rowspan: undefined,
+
+    // private
+    renderer : function(v, p, record, rowIndex){
+        if(this.rowspan){
+            p.cellAttr = 'rowspan="'+this.rowspan+'"';
+        }
+        return rowIndex+1;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowSelectionModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowSelectionModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/grid/RowSelectionModel.js	(revision 625)
@@ -0,0 +1,530 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.grid.RowSelectionModel
+ * @extends Ext.grid.AbstractSelectionModel
+ * The default SelectionModel used by {@link Ext.grid.GridPanel}.
+ * It supports multiple selections and keyboard selection/navigation. The objects stored
+ * as selections and returned by {@link #getSelected}, and {@link #getSelections} are
+ * the {@link Ext.data.Record Record}s which provide the data for the selected rows.
+ * @constructor
+ * @param {Object} config
+ */
+Ext.grid.RowSelectionModel = function(config){
+    Ext.apply(this, config);
+    this.selections = new Ext.util.MixedCollection(false, function(o){
+        return o.id;
+    });
+
+    this.last = false;
+    this.lastActive = false;
+
+    this.addEvents(
+        /**
+         * @event selectionchange
+         * Fires when the selection changes
+         * @param {SelectionModel} this
+         */
+        "selectionchange",
+        /**
+         * @event beforerowselect
+         * Fires before a row is selected, return false to cancel the selection.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The index to be selected
+         * @param {Boolean} keepExisting False if other selections will be cleared
+         * @param {Record} record The record to be selected
+         */
+        "beforerowselect",
+        /**
+         * @event rowselect
+         * Fires when a row is selected.
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex The selected index
+         * @param {Ext.data.Record} r The selected record
+         */
+        "rowselect",
+        /**
+         * @event rowdeselect
+         * Fires when a row is deselected.  To prevent deselection
+         * {@link Ext.grid.AbstractSelectionModel#lock lock the selections}. 
+         * @param {SelectionModel} this
+         * @param {Number} rowIndex
+         * @param {Record} record
+         */
+        "rowdeselect"
+    );
+
+    Ext.grid.RowSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel,  {
+    /**
+     * @cfg {Boolean} singleSelect
+     * <tt>true</tt> to allow selection of only one row at a time (defaults to <tt>false</tt>
+     * allowing multiple selections)
+     */
+    singleSelect : false,
+
+    /**
+     * @cfg {Boolean} moveEditorOnEnter
+     * <tt>false</tt> to turn off moving the editor to the next row down when the enter key is pressed
+     * or the next row up when shift + enter keys are pressed.
+     */
+    // private
+    initEvents : function(){
+
+        if(!this.grid.enableDragDrop && !this.grid.enableDrag){
+            this.grid.on("rowmousedown", this.handleMouseDown, this);
+        }else{ // allow click to work like normal
+            this.grid.on("rowclick", function(grid, rowIndex, e) {
+                if(e.button === 0 && !e.shiftKey && !e.ctrlKey) {
+                    this.selectRow(rowIndex, false);
+                    grid.view.focusRow(rowIndex);
+                }
+            }, this);
+        }
+
+        this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), {
+            "up" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectPrevious(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive-1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            "down" : function(e){
+                if(!e.shiftKey || this.singleSelect){
+                    this.selectNext(false);
+                }else if(this.last !== false && this.lastActive !== false){
+                    var last = this.last;
+                    this.selectRange(this.last,  this.lastActive+1);
+                    this.grid.getView().focusRow(this.lastActive);
+                    if(last !== false){
+                        this.last = last;
+                    }
+                }else{
+                    this.selectFirstRow();
+                }
+            },
+            scope: this
+        });
+
+        var view = this.grid.view;
+        view.on("refresh", this.onRefresh, this);
+        view.on("rowupdated", this.onRowUpdated, this);
+        view.on("rowremoved", this.onRemove, this);
+    },
+
+    // private
+    onRefresh : function(){
+        var ds = this.grid.store, index;
+        var s = this.getSelections();
+        this.clearSelections(true);
+        for(var i = 0, len = s.length; i < len; i++){
+            var r = s[i];
+            if((index = ds.indexOfId(r.id)) != -1){
+                this.selectRow(index, true);
+            }
+        }
+        if(s.length != this.selections.getCount()){
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    onRemove : function(v, index, r){
+        if(this.selections.remove(r) !== false){
+            this.fireEvent('selectionchange', this);
+        }
+    },
+
+    // private
+    onRowUpdated : function(v, index, r){
+        if(this.isSelected(r)){
+            v.onRowSelect(index);
+        }
+    },
+
+    /**
+     * Select records.
+     * @param {Array} records The records to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectRecords : function(records, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        var ds = this.grid.store;
+        for(var i = 0, len = records.length; i < len; i++){
+            this.selectRow(ds.indexOf(records[i]), true);
+        }
+    },
+
+    /**
+     * Gets the number of selected rows.
+     * @return {Number}
+     */
+    getCount : function(){
+        return this.selections.length;
+    },
+
+    /**
+     * Selects the first row in the grid.
+     */
+    selectFirstRow : function(){
+        this.selectRow(0);
+    },
+
+    /**
+     * Select the last row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     */
+    selectLastRow : function(keepExisting){
+        this.selectRow(this.grid.store.getCount() - 1, keepExisting);
+    },
+
+    /**
+     * Selects the row immediately following the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a next row, else <tt>false</tt>
+     */
+    selectNext : function(keepExisting){
+        if(this.hasNext()){
+            this.selectRow(this.last+1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Selects the row that precedes the last selected row.
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @return {Boolean} <tt>true</tt> if there is a previous row, else <tt>false</tt>
+     */
+    selectPrevious : function(keepExisting){
+        if(this.hasPrevious()){
+            this.selectRow(this.last-1, keepExisting);
+            this.grid.getView().focusRow(this.last);
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Returns true if there is a next record to select
+     * @return {Boolean}
+     */
+    hasNext : function(){
+        return this.last !== false && (this.last+1) < this.grid.store.getCount();
+    },
+
+    /**
+     * Returns true if there is a previous record to select
+     * @return {Boolean}
+     */
+    hasPrevious : function(){
+        return !!this.last;
+    },
+
+
+    /**
+     * Returns the selected records
+     * @return {Array} Array of selected records
+     */
+    getSelections : function(){
+        return [].concat(this.selections.items);
+    },
+
+    /**
+     * Returns the first selected record.
+     * @return {Record}
+     */
+    getSelected : function(){
+        return this.selections.itemAt(0);
+    },
+
+    /**
+     * Calls the passed function with each selection. If the function returns
+     * <tt>false</tt>, iteration is stopped and this function returns
+     * <tt>false</tt>. Otherwise it returns <tt>true</tt>.
+     * @param {Function} fn
+     * @param {Object} scope (optional)
+     * @return {Boolean} true if all selections were iterated
+     */
+    each : function(fn, scope){
+        var s = this.getSelections();
+        for(var i = 0, len = s.length; i < len; i++){
+            if(fn.call(scope || this, s[i], i) === false){
+                return false;
+            }
+        }
+        return true;
+    },
+
+    /**
+     * Clears all selections if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * @param {Boolean} fast (optional) <tt>true</tt> to bypass the
+     * conditional checks and events described in {@link #deselectRow}.
+     */
+    clearSelections : function(fast){
+        if(this.isLocked()){
+            return;
+        }
+        if(fast !== true){
+            var ds = this.grid.store;
+            var s = this.selections;
+            s.each(function(r){
+                this.deselectRow(ds.indexOfId(r.id));
+            }, this);
+            s.clear();
+        }else{
+            this.selections.clear();
+        }
+        this.last = false;
+    },
+
+
+    /**
+     * Selects all rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}. 
+     */
+    selectAll : function(){
+        if(this.isLocked()){
+            return;
+        }
+        this.selections.clear();
+        for(var i = 0, len = this.grid.store.getCount(); i < len; i++){
+            this.selectRow(i, true);
+        }
+    },
+
+    /**
+     * Returns <tt>true</tt> if there is a selection.
+     * @return {Boolean}
+     */
+    hasSelection : function(){
+        return this.selections.length > 0;
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified row is selected.
+     * @param {Number/Record} index The record or index of the record to check
+     * @return {Boolean}
+     */
+    isSelected : function(index){
+        var r = typeof index == "number" ? this.grid.store.getAt(index) : index;
+        return (r && this.selections.key(r.id) ? true : false);
+    },
+
+    /**
+     * Returns <tt>true</tt> if the specified record id is selected.
+     * @param {String} id The id of record to check
+     * @return {Boolean}
+     */
+    isIdSelected : function(id){
+        return (this.selections.key(id) ? true : false);
+    },
+
+    // private
+    handleMouseDown : function(g, rowIndex, e){
+        if(e.button !== 0 || this.isLocked()){
+            return;
+        }
+        var view = this.grid.getView();
+        if(e.shiftKey && !this.singleSelect && this.last !== false){
+            var last = this.last;
+            this.selectRange(last, rowIndex, e.ctrlKey);
+            this.last = last; // reset the last
+            view.focusRow(rowIndex);
+        }else{
+            var isSelected = this.isSelected(rowIndex);
+            if(e.ctrlKey && isSelected){
+                this.deselectRow(rowIndex);
+            }else if(!isSelected || this.getCount() > 1){
+                this.selectRow(rowIndex, e.ctrlKey || e.shiftKey);
+                view.focusRow(rowIndex);
+            }
+        }
+    },
+
+    /**
+     * Selects multiple rows.
+     * @param {Array} rows Array of the indexes of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep
+     * existing selections (defaults to <tt>false</tt>)
+     */
+    selectRows : function(rows, keepExisting){
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        for(var i = 0, len = rows.length; i < len; i++){
+            this.selectRow(rows[i], true);
+        }
+    },
+
+    /**
+     * Selects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.
+     * All rows in between startRow and endRow are also selected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     * @param {Boolean} keepExisting (optional) True to retain existing selections
+     */
+    selectRange : function(startRow, endRow, keepExisting){
+        var i;
+        if(this.isLocked()){
+            return;
+        }
+        if(!keepExisting){
+            this.clearSelections();
+        }
+        if(startRow <= endRow){
+            for(i = startRow; i <= endRow; i++){
+                this.selectRow(i, true);
+            }
+        }else{
+            for(i = startRow; i >= endRow; i--){
+                this.selectRow(i, true);
+            }
+        }
+    },
+
+    /**
+     * Deselects a range of rows if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is not locked}.  
+     * All rows in between startRow and endRow are also deselected.
+     * @param {Number} startRow The index of the first row in the range
+     * @param {Number} endRow The index of the last row in the range
+     */
+    deselectRange : function(startRow, endRow, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        for(var i = startRow; i <= endRow; i++){
+            this.deselectRow(i, preventViewNotify);
+        }
+    },
+
+    /**
+     * Selects a row.  Before selecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked} and fires the
+     * {@link #beforerowselect} event.  If these checks are satisfied the row
+     * will be selected and followed up by  firing the {@link #rowselect} and
+     * {@link #selectionchange} events.
+     * @param {Number} row The index of the row to select
+     * @param {Boolean} keepExisting (optional) <tt>true</tt> to keep existing selections
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    selectRow : function(index, keepExisting, preventViewNotify){
+        if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){
+            return;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){
+            if(!keepExisting || this.singleSelect){
+                this.clearSelections();
+            }
+            this.selections.add(r);
+            this.last = this.lastActive = index;
+            if(!preventViewNotify){
+                this.grid.getView().onRowSelect(index);
+            }
+            this.fireEvent("rowselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    /**
+     * Deselects a row.  Before deselecting a row, checks if the selection model
+     * {@link Ext.grid.AbstractSelectionModel#isLocked is locked}.
+     * If this check is satisfied the row will be deselected and followed up by
+     * firing the {@link #rowdeselect} and {@link #selectionchange} events.
+     * @param {Number} row The index of the row to deselect
+     * @param {Boolean} preventViewNotify (optional) Specify <tt>true</tt> to
+     * prevent notifying the view (disables updating the selected appearance)
+     */
+    deselectRow : function(index, preventViewNotify){
+        if(this.isLocked()){
+            return;
+        }
+        if(this.last == index){
+            this.last = false;
+        }
+        if(this.lastActive == index){
+            this.lastActive = false;
+        }
+        var r = this.grid.store.getAt(index);
+        if(r){
+            this.selections.remove(r);
+            if(!preventViewNotify){
+                this.grid.getView().onRowDeselect(index);
+            }
+            this.fireEvent("rowdeselect", this, index, r);
+            this.fireEvent("selectionchange", this);
+        }
+    },
+
+    // private
+    restoreLast : function(){
+        if(this._last){
+            this.last = this._last;
+        }
+    },
+
+    // private
+    acceptsNav : function(row, col, cm){
+        return !cm.isHidden(col) && cm.isCellEditable(col, row);
+    },
+
+    // private
+    onEditorKey : function(field, e){
+        var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+        var shift = e.shiftKey;
+        if(k == e.TAB){
+            e.stopEvent();
+            ed.completeEdit();
+            if(shift){
+                newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
+            }else{
+                newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+            }
+        }else if(k == e.ENTER){
+            e.stopEvent();
+            ed.completeEdit();
+            if(this.moveEditorOnEnter !== false){
+                if(shift){
+                    newCell = g.walkCells(ed.row - 1, ed.col, -1, this.acceptsNav, this);
+                }else{
+                    newCell = g.walkCells(ed.row + 1, ed.col, 1, this.acceptsNav, this);
+                }
+            }
+        }else if(k == e.ESC){
+            ed.cancelEdit();
+        }
+        if(newCell){
+            g.startEditing(newCell[0], newCell[1]);
+        }
+    },
+    
+    destroy: function(){
+        if(this.rowNav){
+            this.rowNav.disable();
+            this.rowNav = null;
+        }
+        Ext.grid.RowSelectionModel.superclass.destroy.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AbsoluteLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AbsoluteLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AbsoluteLayout.js	(revision 625)
@@ -0,0 +1,82 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.AbsoluteLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
+ * ability for x/y positioning using the standard x and y component config options.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var form = new Ext.form.FormPanel({
+    title: 'Absolute Layout',
+    layout:'absolute',
+    layoutConfig: {
+        // layout-specific configs go here
+        extraCls: 'x-abs-layout-item',
+    },
+    baseCls: 'x-plain',
+    url:'save-form.php',
+    defaultType: 'textfield',
+    items: [{
+        x: 0,
+        y: 5,
+        xtype:'label',
+        text: 'Send To:'
+    },{
+        x: 60,
+        y: 0,
+        name: 'to',
+        anchor:'100%'  // anchor width by percentage
+    },{
+        x: 0,
+        y: 35,
+        xtype:'label',
+        text: 'Subject:'
+    },{
+        x: 60,
+        y: 30,
+        name: 'subject',
+        anchor: '100%'  // anchor width by percentage
+    },{
+        x:0,
+        y: 60,
+        xtype: 'textarea',
+        name: 'msg',
+        anchor: '100% 100%'  // anchor width and height
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    extraCls: 'x-abs-layout-item',
+
+    onLayout : function(ct, target){
+        target.position();
+        this.paddingLeft = target.getPadding('l');
+        this.paddingTop = target.getPadding('t');
+
+        Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return  value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AccordionLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AccordionLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AccordionLayout.js	(revision 625)
@@ -0,0 +1,177 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.AccordionLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This is a layout that contains multiple panels in an expandable accordion style such that only
+ * <b>one panel can be open at any given time</b>.  Each panel has built-in support for expanding and collapsing.
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var accordion = new Ext.Panel({
+    title: 'Accordion Layout',
+    layout:'accordion',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle: 'padding:15px'
+    },
+    layoutConfig: {
+        // layout-specific configs go here
+        titleCollapse: false,
+        animate: true,
+        activeOnTop: true
+    },
+    items: [{
+        title: 'Panel 1',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 2',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    },{
+        title: 'Panel 3',
+        html: '&lt;p&gt;Panel content!&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} fill
+     * True to adjust the active item's height to fill the available space in the container, false to use the
+     * item's current height, or auto height if not explicitly set (defaults to true).
+     */
+    fill : true,
+    /**
+     * @cfg {Boolean} autoWidth
+     * True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).
+     * Note that some components, in particular the {@link Ext.grid.GridPanel grid}, will not function properly within
+     * layouts if they have auto width, so in such cases this config should be set to false.
+     */
+    autoWidth : true,
+    /**
+     * @cfg {Boolean} titleCollapse
+     * True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow
+     * expand/collapse only when the toggle tool button is clicked (defaults to true).  When set to false,
+     * {@link #hideCollapseTool} should be false also.
+     */
+    titleCollapse : true,
+    /**
+     * @cfg {Boolean} hideCollapseTool
+     * True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false).
+     * When set to true, {@link #titleCollapse} should be true also.
+     */
+    hideCollapseTool : false,
+    /**
+     * @cfg {Boolean} collapseFirst
+     * True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools
+     * in the contained panels' title bars, false to render it last (defaults to false).
+     */
+    collapseFirst : false,
+    /**
+     * @cfg {Boolean} animate
+     * True to slide the contained panels open and closed during expand/collapse using animation, false to open and
+     * close directly with no animation (defaults to false).  Note: to defer to the specific config setting of each
+     * contained panel for this property, set this to undefined at the layout level.
+     */
+    animate : false,
+    /**
+     * @cfg {Boolean} sequence
+     * <b>Experimental</b>. If animate is set to true, this will result in each animation running in sequence.
+     */
+    sequence : false,
+    /**
+     * @cfg {Boolean} activeOnTop
+     * True to swap the position of each panel as it is expanded so that it becomes the first item in the container,
+     * false to keep the panels in the rendered order. <b>This is NOT compatible with "animate:true"</b> (defaults to false).
+     */
+    activeOnTop : false,
+
+    renderItem : function(c){
+        if(this.animate === false){
+            c.animCollapse = false;
+        }
+        c.collapsible = true;
+        if(this.autoWidth){
+            c.autoWidth = true;
+        }
+        if(this.titleCollapse){
+            c.titleCollapse = true;
+        }
+        if(this.hideCollapseTool){
+            c.hideCollapseTool = true;
+        }
+        if(this.collapseFirst !== undefined){
+            c.collapseFirst = this.collapseFirst;
+        }
+        if(!this.activeItem && !c.collapsed){
+            this.activeItem = c;
+        }else if(this.activeItem && this.activeItem != c){
+            c.collapsed = true;
+        }
+        Ext.layout.AccordionLayout.superclass.renderItem.apply(this, arguments);
+        c.header.addClass('x-accordion-hd');
+        c.on('beforeexpand', this.beforeExpand, this);
+    },
+
+    // private
+    beforeExpand : function(p, anim){
+        var ai = this.activeItem;
+        if(ai){
+            if(this.sequence){
+                delete this.activeItem;
+                if (!ai.collapsed){
+                    ai.collapse({callback:function(){
+                        p.expand(anim || true);
+                    }, scope: this});
+                    return false;
+                }
+            }else{
+                ai.collapse(this.animate);
+            }
+        }
+        this.activeItem = p;
+        if(this.activeOnTop){
+            p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild);
+        }
+        this.layout();
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(this.fill && item){
+            var hh = 0;
+            this.container.items.each(function(p){
+                if(p != item){
+                    hh += p.header.getHeight();
+                }    
+            });
+            size.height -= hh;
+            item.setSize(size);
+        }
+    },
+
+    /**
+     * Sets the active (expanded) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(item.rendered && item.collapsed){
+                item.expand();
+            }else{
+                this.activeItem = item;
+            }
+        }
+
+    }
+});
+Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout;
+
+//backwards compat
+Ext.layout.Accordion = Ext.layout.AccordionLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AnchorLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AnchorLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/AnchorLayout.js	(revision 625)
@@ -0,0 +1,200 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.AnchorLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a layout that enables anchoring of contained elements relative to the container's dimensions.
+ * If the container is resized, all anchored items are automatically rerendered according to their
+ * <b><tt>{@link #anchor}</tt></b> rules.</p>
+ * <p>This class is intended to be extended or created via the layout:'anchor' {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>AnchorLayout does not have any direct config options (other than inherited ones). By default,
+ * AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the
+ * container using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>.
+ * If anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating
+ * anchor measurements based on it instead, allowing the container to be sized independently of the anchoring
+ * logic if necessary.  For example:</p>
+ * <pre><code>
+var viewport = new Ext.Viewport({
+    layout:'anchor',
+    anchorSize: {width:800, height:600},
+    items:[{
+        title:'Item 1',
+        html:'Content 1',
+        width:800,
+        anchor:'right 20%'
+    },{
+        title:'Item 2',
+        html:'Content 2',
+        width:300,
+        anchor:'50% 30%'
+    },{
+        title:'Item 3',
+        html:'Content 3',
+        width:600,
+        anchor:'-100 50%'
+    }]
+});
+ * </code></pre>
+ */
+Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {String} anchor
+     * <p>This configuation option is to be applied to <b>child <tt>items</tt></b> of a container managed by
+     * this layout (ie. configured with <tt>layout:'anchor'</tt>).</p><br/>
+     * 
+     * <p>This value is what tells the layout how an item should be anchored to the container. <tt>items</tt>
+     * added to an AnchorLayout accept an anchoring-specific config property of <b>anchor</b> which is a string
+     * containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').
+     * The following types of anchor values are supported:<div class="mdetail-params"><ul>
+     * 
+     * <li><b>Percentage</b> : Any value between 1 and 100, expressed as a percentage.<div class="sub-desc">
+     * The first anchor is the percentage width that the item should take up within the container, and the
+     * second is the percentage height.  For example:<pre><code>
+// two values specified
+anchor: '100% 50%' // render item complete width of the container and
+                   // 1/2 height of the container
+// one value specified
+anchor: '100%'     // the width value; the height will default to auto
+     * </code></pre></div></li>
+     * 
+     * <li><b>Offsets</b> : Any positive or negative integer value.<div class="sub-desc">
+     * This is a raw adjustment where the first anchor is the offset from the right edge of the container,
+     * and the second is the offset from the bottom edge. For example:<pre><code>
+// two values specified
+anchor: '-50 -100' // render item the complete width of the container
+                   // minus 50 pixels and
+                   // the complete height minus 100 pixels.
+// one value specified
+anchor: '-50'      // anchor value is assumed to be the right offset value
+                   // bottom offset will default to 0
+     * </code></pre></div></li>
+     * 
+     * <li><b>Sides</b> : Valid values are <tt>'right'</tt> (or <tt>'r'</tt>) and <tt>'bottom'</tt>
+     * (or <tt>'b'</tt>).<div class="sub-desc">
+     * Either the container must have a fixed size or an anchorSize config value defined at render time in
+     * order for these to have any effect.</div></li>
+     *
+     * <li><b>Mixed</b> : <div class="sub-desc">
+     * Anchor values can also be mixed as needed.  For example, to render the width offset from the container
+     * right edge by 50 pixels and 75% of the container's height use:
+     * <pre><code>
+anchor: '-50 75%' 
+     * </code></pre></div></li>
+     * 
+     * 
+     * </ul></div>
+     */
+    
+    // private
+    monitorResize:true,
+
+    // private
+    getAnchorViewSize : function(ct, target){
+        return target.dom == document.body ?
+                   target.getViewSize() : target.getStyleSize();
+    },
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target);
+
+        var size = this.getAnchorViewSize(ct, target);
+
+        var w = size.width, h = size.height;
+
+        if(w < 20 && h < 20){
+            return;
+        }
+
+        // find the container anchoring size
+        var aw, ah;
+        if(ct.anchorSize){
+            if(typeof ct.anchorSize == 'number'){
+                aw = ct.anchorSize;
+            }else{
+                aw = ct.anchorSize.width;
+                ah = ct.anchorSize.height;
+            }
+        }else{
+            aw = ct.initialConfig.width;
+            ah = ct.initialConfig.height;
+        }
+
+        var cs = ct.items.items, len = cs.length, i, c, a, cw, ch;
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.anchor){
+                a = c.anchorSpec;
+                if(!a){ // cache all anchor values
+                    var vs = c.anchor.split(' ');
+                    c.anchorSpec = a = {
+                        right: this.parseAnchor(vs[0], c.initialConfig.width, aw),
+                        bottom: this.parseAnchor(vs[1], c.initialConfig.height, ah)
+                    };
+                }
+                cw = a.right ? this.adjustWidthAnchor(a.right(w), c) : undefined;
+                ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h), c) : undefined;
+
+                if(cw || ch){
+                    c.setSize(cw || undefined, ch || undefined);
+                }
+            }
+        }
+    },
+
+    // private
+    parseAnchor : function(a, start, cstart){
+        if(a && a != 'none'){
+            var last;
+            if(/^(r|right|b|bottom)$/i.test(a)){   // standard anchor
+                var diff = cstart - start;
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return v - diff;
+                    }
+                }
+            }else if(a.indexOf('%') != -1){
+                var ratio = parseFloat(a.replace('%', ''))*.01;   // percentage
+                return function(v){
+                    if(v !== last){
+                        last = v;
+                        return Math.floor(v*ratio);
+                    }
+                }
+            }else{
+                a = parseInt(a, 10);
+                if(!isNaN(a)){                            // simple offset adjustment
+                    return function(v){
+                        if(v !== last){
+                            last = v;
+                            return v + a;
+                        }
+                    }
+                }
+            }
+        }
+        return false;
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value;
+    },
+
+    // private
+    adjustHeightAnchor : function(value, comp){
+        return value;
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BorderLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BorderLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BorderLayout.js	(revision 625)
@@ -0,0 +1,1108 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.BorderLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a multi-pane, application-oriented UI layout style that supports multiple
+ * nested panels, automatic {@link Ext.layout.BorderLayout.Region#split split} bars between
+ * {@link Ext.layout.BorderLayout.Region#BorderLayout.Region regions} and built-in
+ * {@link Ext.layout.BorderLayout.Region#collapsible expanding and collapsing} of regions.</p>
+ * <p>This class is intended to be extended or created via the <tt>layout:'border'</tt>
+ * {@link Ext.Container#layout} config, and should generally not need to be created directly
+ * via the new keyword.</p>
+ * <p>BorderLayout does not have any direct config options (other than inherited ones).
+ * All configuration options available for customizing the BorderLayout are at the
+ * {@link Ext.layout.BorderLayout.Region} and {@link Ext.layout.BorderLayout.SplitRegion}
+ * levels.</p>
+ * <p>Example usage:</p>
+ * <pre><code>
+var myBorderPanel = new Ext.Panel({
+    {@link Ext.Component#renderTo renderTo}: document.body,
+    {@link Ext.BoxComponent#width width}: 700,
+    {@link Ext.BoxComponent#height height}: 500,
+    {@link Ext.Panel#title title}: 'Border Layout',
+    {@link Ext.Container#layout layout}: 'border',
+    {@link Ext.Container#items items}: [{
+        {@link Ext.Panel#title title}: 'South Region is resizable',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'south',     // position for region
+        {@link Ext.BoxComponent#height height}: 100,
+        {@link Ext.layout.BorderLayout.Region#split split}: true,         // enable resizing
+        {@link Ext.SplitBar#minSize minSize}: 75,         // defaults to {@link Ext.layout.BorderLayout.Region#minHeight 50} 
+        {@link Ext.SplitBar#maxSize maxSize}: 150,
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '0 5 5 5'
+    },{
+        // xtype: 'panel' implied by default
+        {@link Ext.Panel#title title}: 'West Region is collapsible',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}:'west',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 0 0 5',
+        {@link Ext.BoxComponent#width width}: 200,
+        {@link Ext.layout.BorderLayout.Region#collapsible collapsible}: true,   // make collapsible
+        {@link Ext.layout.BorderLayout.Region#cmargins cmargins}: '5 5 0 5', // adjust top margin when collapsed
+        {@link Ext.Component#id id}: 'west-region-container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.Panel#unstyled unstyled}: true
+    },{
+        {@link Ext.Panel#title title}: 'Center Region',
+        {@link Ext.layout.BorderLayout.Region#BorderLayout.Region region}: 'center',     // center region is required, no width/height specified
+        {@link Ext.Component#xtype xtype}: 'container',
+        {@link Ext.Container#layout layout}: 'fit',
+        {@link Ext.layout.BorderLayout.Region#margins margins}: '5 5 0 0'
+    }]
+});
+</code></pre>
+ * <p><b><u>Notes</u></b>:</p><div class="mdetail-params"><ul>
+ * <li>Any container using the BorderLayout <b>must</b> have a child item with <tt>region:'center'</tt>.
+ * The child item in the center region will always be resized to fill the remaining space not used by
+ * the other regions in the layout.</li>
+ * <li>Any child items with a region of <tt>west</tt> or <tt>east</tt> must have <tt>width</tt> defined
+ * (an integer representing the number of pixels that the region should take up).</li>
+ * <li>Any child items with a region of <tt>north</tt> or <tt>south</tt> must have <tt>height</tt> defined.</li>
+ * <li>The regions of a BorderLayout are <b>fixed at render time</b> and thereafter, its child Components may not be removed or added</b>.  To add/remove
+ * Components within a BorderLayout, have them wrapped by an additional Container which is directly
+ * managed by the BorderLayout.  If the region is to be collapsible, the Container used directly
+ * by the BorderLayout manager should be a Panel.  In the following example a Container (an Ext.Panel)
+ * is added to the west region:
+ * <div style="margin-left:16px"><pre><code>
+wrc = {@link Ext#getCmp Ext.getCmp}('west-region-container');
+wrc.{@link Ext.Panel#removeAll removeAll}();
+wrc.{@link Ext.Container#add add}({
+    title: 'Added Panel',
+    html: 'Some content'
+});
+wrc.{@link Ext.Container#doLayout doLayout}();
+ * </code></pre></div>
+ * </li>
+ * <li> To reference a {@link Ext.layout.BorderLayout.Region Region}:
+ * <div style="margin-left:16px"><pre><code>
+wr = myBorderPanel.layout.west;
+ * </code></pre></div>
+ * </li>
+ * </ul></div>
+ */
+Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    // private
+    rendered : false,
+
+    // private
+    onLayout : function(ct, target){
+        var collapsed;
+        if(!this.rendered){
+            target.addClass('x-border-layout-ct');
+            var items = ct.items.items;
+            collapsed = [];
+            for(var i = 0, len = items.length; i < len; i++) {
+                var c = items[i];
+                var pos = c.region;
+                if(c.collapsed){
+                    collapsed.push(c);
+                }
+                c.collapsed = false;
+                if(!c.rendered){
+                    c.cls = c.cls ? c.cls +' x-border-panel' : 'x-border-panel';
+                    c.render(target, i);
+                }
+                this[pos] = pos != 'center' && c.split ?
+                    new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) :
+                    new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos);
+                this[pos].render(target, c);
+            }
+            this.rendered = true;
+        }
+
+        var size = target.getViewSize();
+        if(size.width < 20 || size.height < 20){ // display none?
+            if(collapsed){
+                this.restoreCollapsed = collapsed;
+            }
+            return;
+        }else if(this.restoreCollapsed){
+            collapsed = this.restoreCollapsed;
+            delete this.restoreCollapsed;
+        }
+
+        var w = size.width, h = size.height;
+        var centerW = w, centerH = h, centerY = 0, centerX = 0;
+
+        var n = this.north, s = this.south, west = this.west, e = this.east, c = this.center;
+        if(!c && Ext.layout.BorderLayout.WARN !== false){
+            throw 'No center region defined in BorderLayout ' + ct.id;
+        }
+
+        if(n && n.isVisible()){
+            var b = n.getSize();
+            var m = n.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            b.y = m.top;
+            centerY = b.height + b.y + m.bottom;
+            centerH -= centerY;
+            n.applyLayout(b);
+        }
+        if(s && s.isVisible()){
+            var b = s.getSize();
+            var m = s.getMargins();
+            b.width = w - (m.left+m.right);
+            b.x = m.left;
+            var totalHeight = (b.height + m.top + m.bottom);
+            b.y = h - totalHeight + m.top;
+            centerH -= totalHeight;
+            s.applyLayout(b);
+        }
+        if(west && west.isVisible()){
+            var b = west.getSize();
+            var m = west.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            b.x = m.left;
+            b.y = centerY + m.top;
+            var totalWidth = (b.width + m.left + m.right);
+            centerX += totalWidth;
+            centerW -= totalWidth;
+            west.applyLayout(b);
+        }
+        if(e && e.isVisible()){
+            var b = e.getSize();
+            var m = e.getMargins();
+            b.height = centerH - (m.top+m.bottom);
+            var totalWidth = (b.width + m.left + m.right);
+            b.x = w - totalWidth + m.left;
+            b.y = centerY + m.top;
+            centerW -= totalWidth;
+            e.applyLayout(b);
+        }
+        if(c){
+            var m = c.getMargins();
+            var centerBox = {
+                x: centerX + m.left,
+                y: centerY + m.top,
+                width: centerW - (m.left+m.right),
+                height: centerH - (m.top+m.bottom)
+            };
+            c.applyLayout(centerBox);
+        }
+        if(collapsed){
+            for(var i = 0, len = collapsed.length; i < len; i++){
+                collapsed[i].collapse(false);
+            }
+        }
+        if(Ext.isIE && Ext.isStrict){ // workaround IE strict repainting issue
+            target.repaint();
+        }
+    },
+
+    destroy: function() {
+        var r = ['north', 'south', 'east', 'west'];
+        for (var i = 0; i < r.length; i++) {
+            var region = this[r[i]];
+            if(region){
+                if(region.destroy){
+                    region.destroy();
+                }else if (region.split){
+                    region.split.destroy(true);
+                }
+            }
+        }
+        Ext.layout.BorderLayout.superclass.destroy.call(this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.BorderLayout.Region
+ * <p>This is a region of a {@link Ext.layout.BorderLayout BorderLayout} that acts as a subcontainer
+ * within the layout.  Each region has its own {@link Ext.layout.ContainerLayout layout} that is
+ * independent of other regions and the containing BorderLayout, and can be any of the
+ * {@link Ext.layout.ContainerLayout valid Ext layout types}.</p>
+ * <p>Region size is managed automatically and cannot be changed by the user -- for
+ * {@link #split resizable regions}, see {@link Ext.layout.BorderLayout.SplitRegion}.</p>
+ * @constructor
+ * Create a new Region.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: <tt>north</tt>, <tt>south</tt>,
+ * <tt>east</tt>, <tt>west</tt> and <tt>center</tt>.  Every {@link Ext.layout.BorderLayout BorderLayout}
+ * <b>must have a center region</b> for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.Region = function(layout, config, pos){
+    Ext.apply(this, config);
+    this.layout = layout;
+    this.position = pos;
+    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 || {},
+                pos == 'north' || pos == 'south' ? this.defaultNSCMargins : this.defaultEWCMargins);
+        }
+    }
+};
+
+Ext.layout.BorderLayout.Region.prototype = {
+    /**
+     * @cfg {Boolean} animFloat
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel that will close again once the user mouses out of that panel (or clicks out if
+     * <tt>{@link #autoHide} = false</tt>).  Setting <tt>{@link #animFloat} = false</tt> will
+     * prevent the open and close of these floated panels from being animated (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {Boolean} autoHide
+     * When a collapsed region's bar is clicked, the region's panel will be displayed as a floated
+     * panel.  If <tt>autoHide = true</tt>, the panel will automatically hide after the user mouses
+     * out of the panel.  If <tt>autoHide = false</tt>, the panel will continue to display until the
+     * user clicks outside of the panel (defaults to <tt>true</tt>).
+     */
+    /**
+     * @cfg {String} collapseMode
+     * <tt>collapseMode</tt> supports two configuration values:<div class="mdetail-params"><ul>
+     * <li><b><tt>undefined</tt></b> (default)<div class="sub-desc">By default, {@link #collapsible}
+     * regions are collapsed by clicking the expand/collapse tool button that renders into the region's
+     * title bar.</div></li>
+     * <li><b><tt>'mini'</tt></b><div class="sub-desc">Optionally, when <tt>collapseMode</tt> is set to
+     * <tt>'mini'</tt> the region's split bar will also display a small collapse button in the center of
+     * the bar. In <tt>'mini'</tt> mode the region will collapse to a thinner bar than in normal mode.
+     * </div></li>
+     * </ul></div></p>
+     * <p><b>Note</b>: if a collapsible region does not have a title bar, then set <tt>collapseMode =
+     * 'mini'</tt> and <tt>{@link #split} = true</tt> in order for the region to be {@link #collapsible}
+     * by the user as the expand/collapse tool button (that would go in the title bar) will not be rendered.</p>
+     * <p>See also <tt>{@link #cmargins}</tt>.</p>
+     */
+    /**
+     * @cfg {Object} margins
+     * An object containing margins to apply to the region when in the expanded state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values:</p>
+     * <p><div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></div></p>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    /**
+     * @cfg {Object} cmargins
+     * An object containing margins to apply to the region when in the collapsed state in the
+     * format:<pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>May also be a string containing space-separated, numeric margin values. The order of the
+     * sides associated with each value matches the way CSS processes margin values.</p>
+     * <p><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the first value and the
+     * right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left and right are set
+     * to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
+     * </ul></p>
+     */
+    /**
+     * @cfg {Boolean} collapsible
+     * <p><tt>true</tt> to allow the user to collapse this region (defaults to <tt>false</tt>).  If
+     * <tt>true</tt>, an expand/collapse tool button will automatically be rendered into the title
+     * bar of the region, otherwise the button will not be shown.</p>
+     * <p><b>Note</b>: that a title bar is required to display the collapse/expand toggle button -- if
+     * no <tt>title</tt> is specified for the region's panel, the region will only be collapsible if
+     * <tt>{@link #collapseMode} = 'mini'</tt> and <tt>{@link #split} = true</tt>.
+     */
+    collapsible : false,
+    /**
+     * @cfg {Boolean} split
+     * <p><tt>true</tt> to create a {@link Ext.layout.BorderLayout.SplitRegion SplitRegion} and 
+     * display a 5px wide {@link Ext.SplitBar} between this region and its neighbor, allowing the user to
+     * resize the regions dynamically.  Defaults to <tt>false</tt> creating a
+     * {@link Ext.layout.BorderLayout.Region Region}.</p><br>
+     * <p><b>Notes</b>:</p><div class="mdetail-params"><ul>
+     * <li>this configuration option is ignored if <tt>region='center'</tt></li> 
+     * <li>when <tt>split == true</tt>, it is common to specify a
+     * <tt>{@link Ext.SplitBar#minSize minSize}</tt> and <tt>{@link Ext.SplitBar#maxSize maxSize}</tt>
+     * for the {@link Ext.BoxComponent BoxComponent} representing the region. These are not native
+     * configs of {@link Ext.BoxComponent BoxComponent}, and are used only by this class.</li>
+     * <li>if <tt>{@link #collapseMode} = 'mini'</tt> requires <tt>split = true</tt> to reserve space
+     * for the collapse tool</tt></li> 
+     * </ul></div> 
+     */
+    split:false,
+    /**
+     * @cfg {Boolean} floatable
+     * <tt>true</tt> to allow clicking a collapsed region's bar to display the region's panel floated
+     * above the layout, <tt>false</tt> to force the user to fully expand a collapsed region by
+     * clicking the expand button to see it again (defaults to <tt>true</tt>).
+     */
+    floatable: true,
+    /**
+     * @cfg {Number} minWidth
+     * <p>The minimum allowable width in pixels for this region (defaults to <tt>50</tt>).
+     * <tt>maxWidth</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minWidth</tt> / <tt>maxWidth</tt>.</p>
+     */
+    minWidth:50,
+    /**
+     * @cfg {Number} minHeight
+     * The minimum allowable height in pixels for this region (defaults to <tt>50</tt>)
+     * <tt>maxHeight</tt> may also be specified.</p><br>
+     * <p><b>Note</b>: setting the <tt>{@link Ext.SplitBar#minSize minSize}</tt> / 
+     * <tt>{@link Ext.SplitBar#maxSize maxSize}</tt> supersedes any specified 
+     * <tt>minHeight</tt> / <tt>maxHeight</tt>.</p>
+     */
+    minHeight:50,
+
+    // private
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    // private
+    defaultNSCMargins : {left:5,top:5,right:5,bottom:5},
+    // private
+    defaultEWCMargins : {left:5,top:0,right:5,bottom:0},
+    floatingZIndex: 100,
+
+    /**
+     * True if this region is collapsed. Read-only.
+     * @type Boolean
+     * @property
+     */
+    isCollapsed : false,
+
+    /**
+     * This region's panel.  Read-only.
+     * @type Ext.Panel
+     * @property panel
+     */
+    /**
+     * This region's layout.  Read-only.
+     * @type Layout
+     * @property layout
+     */
+    /**
+     * This region's layout position (north, south, east, west or center).  Read-only.
+     * @type String
+     * @property position
+     */
+
+    // private
+    render : function(ct, p){
+        this.panel = p;
+        p.el.enableDisplayMode();
+        this.targetEl = ct;
+        this.el = p.el;
+
+        var gs = p.getState, ps = this.position;
+        p.getState = function(){
+            return Ext.apply(gs.call(p) || {}, this.state);
+        }.createDelegate(this);
+
+        if(ps != 'center'){
+            p.allowQueuedExpand = false;
+            p.on({
+                beforecollapse: this.beforeCollapse,
+                collapse: this.onCollapse,
+                beforeexpand: this.beforeExpand,
+                expand: this.onExpand,
+                hide: this.onHide,
+                show: this.onShow,
+                scope: this
+            });
+            if(this.collapsible || this.floatable){
+                p.collapseEl = 'el';
+                p.slideAnchor = this.getSlideAnchor();
+            }
+            if(p.tools && p.tools.toggle){
+                p.tools.toggle.addClass('x-tool-collapse-'+ps);
+                p.tools.toggle.addClassOnOver('x-tool-collapse-'+ps+'-over');
+            }
+        }
+    },
+
+    // private
+    getCollapsedEl : function(){
+        if(!this.collapsedEl){
+            if(!this.toolTemplate){
+                var tt = new Ext.Template(
+                     '<div class="x-tool x-tool-{id}">&#160;</div>'
+                );
+                tt.disableFormats = true;
+                tt.compile();
+                Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt;
+            }
+            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 {
+                if(this.collapsible !== false && !this.hideCollapseTool) {
+                    var t = this.toolTemplate.append(
+                            this.collapsedEl.dom,
+                            {id:'expand-'+this.position}, true);
+                    t.addClassOnOver('x-tool-expand-'+this.position+'-over');
+                    t.on('click', this.onExpandClick, this, {stopEvent:true});
+                }
+                if(this.floatable !== false || this.titleCollapse){
+                   this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
+                   this.collapsedEl.on("click", this[this.floatable ? 'collapseClick' : 'onExpandClick'], this);
+                }
+            }
+        }
+        return this.collapsedEl;
+    },
+
+    // private
+    onExpandClick : function(e){
+        if(this.isSlid){
+            this.afterSlideIn();
+            this.panel.expand(false);
+        }else{
+            this.panel.expand();
+        }
+    },
+
+    // private
+    onCollapseClick : function(e){
+        this.panel.collapse();
+    },
+
+    // private
+    beforeCollapse : function(p, animate){
+        this.lastAnim = animate;
+        if(this.splitEl){
+            this.splitEl.hide();
+        }
+        this.getCollapsedEl().show();
+        this.panel.el.setStyle('z-index', 100);
+        this.isCollapsed = true;
+        this.layout.layout();
+    },
+
+    // private
+    onCollapse : function(animate){
+        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:.2});
+        }
+        this.state.collapsed = true;
+        this.panel.saveState();
+    },
+
+    // private
+    beforeExpand : function(animate){
+        var c = this.getCollapsedEl();
+        this.el.show();
+        if(this.position == 'east' || this.position == 'west'){
+            this.panel.setSize(undefined, c.getHeight());
+        }else{
+            this.panel.setSize(c.getWidth(), undefined);
+        }
+        c.hide();
+        c.dom.style.visibility = 'hidden';
+        this.panel.el.setStyle('z-index', this.floatingZIndex);
+    },
+
+    // private
+    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();
+    },
+
+    // private
+    collapseClick : function(e){
+        if(this.isSlid){
+           e.stopPropagation();
+           this.slideIn();
+        }else{
+           e.stopPropagation();
+           this.slideOut();
+        }
+    },
+
+    // private
+    onHide : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().hide();
+        }else if(this.splitEl){
+            this.splitEl.hide();
+        }
+    },
+
+    // private
+    onShow : function(){
+        if(this.isCollapsed){
+            this.getCollapsedEl().show();
+        }else if(this.splitEl){
+            this.splitEl.show();
+        }
+    },
+
+    /**
+     * True if this region is currently visible, else false.
+     * @return {Boolean}
+     */
+    isVisible : function(){
+        return !this.panel.hidden;
+    },
+
+    /**
+     * Returns the current margins for this region.  If the region is collapsed, the
+     * {@link #cmargins} (collapsed margins) value will be returned, otherwise the
+     * {@link #margins} value will be returned.
+     * @return {Object} An object containing the element's margins: <tt>{left: (left
+     * margin), top: (top margin), right: (right margin), bottom: (bottom margin)}</tt>
+     */
+    getMargins : function(){
+        return this.isCollapsed && this.cmargins ? this.cmargins : this.margins;
+    },
+
+    /**
+     * Returns the current size of this region.  If the region is collapsed, the size of the
+     * collapsedEl will be returned, otherwise the size of the region's panel will be returned.
+     * @return {Object} An object containing the element's size: <tt>{width: (element width),
+     * height: (element height)}</tt>
+     */
+    getSize : function(){
+        return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize();
+    },
+
+    /**
+     * Sets the specified panel as the container element for this region.
+     * @param {Ext.Panel} panel The new panel
+     */
+    setPanel : function(panel){
+        this.panel = panel;
+    },
+
+    /**
+     * Returns the minimum allowable width for this region.
+     * @return {Number} The minimum width
+     */
+    getMinWidth: function(){
+        return this.minWidth;
+    },
+
+    /**
+     * Returns the minimum allowable height for this region.
+     * @return {Number} The minimum height
+     */
+    getMinHeight: function(){
+        return this.minHeight;
+    },
+
+    // private
+    applyLayoutCollapsed : function(box){
+        var ce = this.getCollapsedEl();
+        ce.setLeftTop(box.x, box.y);
+        ce.setSize(box.width, box.height);
+    },
+
+    // private
+    applyLayout : function(box){
+        if(this.isCollapsed){
+            this.applyLayoutCollapsed(box);
+        }else{
+            this.panel.setPosition(box.x, box.y);
+            this.panel.setSize(box.width, box.height);
+        }
+    },
+
+    // private
+    beforeSlide: function(){
+        this.panel.beforeEffect();
+    },
+
+    // private
+    afterSlide : function(){
+        this.panel.afterEffect();
+    },
+
+    // private
+    initAutoHide : function(){
+        if(this.autoHide !== false){
+            if(!this.autoHideHd){
+                var st = new Ext.util.DelayedTask(this.slideIn, this);
+                this.autoHideHd = {
+                    "mouseout": function(e){
+                        if(!e.within(this.el, true)){
+                            st.delay(500);
+                        }
+                    },
+                    "mouseover" : function(e){
+                        st.cancel();
+                    },
+                    scope : this
+                };
+            }
+            this.el.on(this.autoHideHd);
+        }
+    },
+
+    // private
+    clearAutoHide : function(){
+        if(this.autoHide !== false){
+            this.el.un("mouseout", this.autoHideHd.mouseout);
+            this.el.un("mouseover", this.autoHideHd.mouseover);
+        }
+    },
+
+    // private
+    clearMonitor : function(){
+        Ext.getDoc().un("click", this.slideInIf, this);
+    },
+
+    /**
+     * If this Region is {@link #floatable}, this method slides this Region into full visibility <i>over the top
+     * of the center Region</i> where it floats until either {@link #slideIn} is called, or other regions of the layout
+     * are clicked, or the mouse exits the Region.
+     */
+    slideOut : function(){
+        if(this.isSlid || this.el.hasActiveFx()){
+            return;
+        }
+        this.isSlid = true;
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.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", this.floatingZIndex+2);
+        this.panel.el.replaceClass('x-panel-collapsed', 'x-panel-floating');
+        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);
+        }
+    },
+
+    // private
+    afterSlideIn : function(){
+        this.clearAutoHide();
+        this.isSlid = false;
+        this.clearMonitor();
+        this.el.setStyle("z-index", "");
+        this.panel.el.replaceClass('x-panel-floating', 'x-panel-collapsed');
+        this.el.dom.style.left = this.restoreLT[0];
+        this.el.dom.style.top = this.restoreLT[1];
+
+        var ts = this.panel.tools;
+        if(ts && ts.toggle){
+            ts.toggle.show();
+        }
+    },
+
+    /**
+     * If this Region is {@link #floatable}, and this Region has been slid into floating visibility, then this method slides
+     * this region back into its collapsed state.
+     */
+    slideIn : function(cb){
+        if(!this.isSlid || this.el.hasActiveFx()){
+            Ext.callback(cb);
+            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(cb);
+                },
+                scope: this,
+                block: true
+            });
+        }else{
+            this.el.hide();
+            this.afterSlideIn();
+        }
+    },
+
+    // private
+    slideInIf : function(e){
+        if(!e.within(this.el)){
+            this.slideIn();
+        }
+    },
+
+    // private
+    anchors : {
+        "west" : "left",
+        "east" : "right",
+        "north" : "top",
+        "south" : "bottom"
+    },
+
+    // private
+    sanchors : {
+        "west" : "l",
+        "east" : "r",
+        "north" : "t",
+        "south" : "b"
+    },
+
+    // private
+    canchors : {
+        "west" : "tl-tr",
+        "east" : "tr-tl",
+        "north" : "tl-bl",
+        "south" : "bl-tl"
+    },
+
+    // private
+    getAnchor : function(){
+        return this.anchors[this.position];
+    },
+
+    // private
+    getCollapseAnchor : function(){
+        return this.canchors[this.position];
+    },
+
+    // private
+    getSlideAnchor : function(){
+        return this.sanchors[this.position];
+    },
+
+    // private
+    getAlignAdj : function(){
+        var cm = 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;
+        }
+    },
+
+    // private
+    getExpandAdj : function(){
+        var c = this.collapsedEl, cm = this.cmargins;
+        switch(this.position){
+            case "west":
+                return [-(cm.right+c.getWidth()+cm.left), 0];
+            break;
+            case "east":
+                return [cm.right+c.getWidth()+cm.left, 0];
+            break;
+            case "north":
+                return [0, -(cm.top+cm.bottom+c.getHeight())];
+            break;
+            case "south":
+                return [0, cm.top+cm.bottom+c.getHeight()];
+            break;
+        }
+    }
+};
+
+/**
+ * @class Ext.layout.BorderLayout.SplitRegion
+ * @extends Ext.layout.BorderLayout.Region
+ * <p>This is a specialized type of {@link Ext.layout.BorderLayout.Region BorderLayout region} that
+ * has a built-in {@link Ext.SplitBar} for user resizing of regions.  The movement of the split bar
+ * is configurable to move either {@link #tickSize smooth or incrementally}.</p>
+ * @constructor
+ * Create a new SplitRegion.
+ * @param {Layout} layout The {@link Ext.layout.BorderLayout BorderLayout} instance that is managing this Region.
+ * @param {Object} config The configuration options
+ * @param {String} position The region position.  Valid values are: north, south, east, west and center.  Every
+ * BorderLayout must have a center region for the primary content -- all other regions are optional.
+ */
+Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){
+    Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos);
+    // prevent switch
+    this.applyLayout = this.applyFns[pos];
+};
+
+Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, {
+    /**
+     * @cfg {Number} tickSize
+     * The increment, in pixels by which to move this Region's {@link Ext.SplitBar SplitBar}.
+     * By default, the {@link Ext.SplitBar SplitBar} moves smoothly.
+     */
+    /**
+     * @cfg {String} splitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible non-collapsible} region's split bar
+     * (defaults to <tt>"Drag to resize."</tt>).  Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    splitTip : "Drag to resize.",
+    /**
+     * @cfg {String} collapsibleSplitTip
+     * The tooltip to display when the user hovers over a
+     * {@link Ext.layout.BorderLayout.Region#collapsible collapsible} region's split bar
+     * (defaults to "Drag to resize. Double click to hide."). Only applies if
+     * <tt>{@link #useSplitTips} = true</tt>.
+     */
+    collapsibleSplitTip : "Drag to resize. Double click to hide.",
+    /**
+     * @cfg {Boolean} useSplitTips
+     * <tt>true</tt> to display a tooltip when the user hovers over a region's split bar
+     * (defaults to <tt>false</tt>).  The tooltip text will be the value of either
+     * <tt>{@link #splitTip}</tt> or <tt>{@link #collapsibleSplitTip}</tt> as appropriate.
+     */
+    useSplitTips : false,
+
+    // private
+    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'
+        }
+    },
+
+    // private
+    applyFns : {
+        west : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            this.panel.setPosition(box.x, box.y);
+            var sw = sd.offsetWidth;
+            s.left = (box.x+box.width-sw)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        east : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sw = sd.offsetWidth;
+            this.panel.setPosition(box.x+sw, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.height = Math.max(0, box.height)+'px';
+            this.panel.setSize(box.width-sw, box.height);
+        },
+        north : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y);
+            s.left = (box.x)+'px';
+            s.top = (box.y+box.height-sh)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        },
+        south : function(box){
+            if(this.isCollapsed){
+                return this.applyLayoutCollapsed(box);
+            }
+            var sd = this.splitEl.dom, s = sd.style;
+            var sh = sd.offsetHeight;
+            this.panel.setPosition(box.x, box.y+sh);
+            s.left = (box.x)+'px';
+            s.top = (box.y)+'px';
+            s.width = Math.max(0, box.width)+'px';
+            this.panel.setSize(box.width, box.height-sh);
+        }
+    },
+
+    // private
+    render : function(ct, p){
+        Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p);
+
+        var ps = this.position;
+
+        this.splitEl = ct.createChild({
+            cls: "x-layout-split x-layout-split-"+ps, html: "&#160;",
+            id: this.panel.id + '-xsplit'
+        });
+
+        if(this.collapseMode == 'mini'){
+            this.miniSplitEl = this.splitEl.createChild({
+                cls: "x-layout-mini x-layout-mini-"+ps, html: "&#160;"
+            });
+            this.miniSplitEl.addClassOnOver('x-layout-mini-over');
+            this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true});
+        }
+
+        var s = this.splitSettings[ps];
+
+        this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation);
+        this.split.tickSize = this.tickSize;
+        this.split.placement = s.placement;
+        this.split.getMaximumSize = this[s.maxFn].createDelegate(this);
+        this.split.minSize = this.minSize || this[s.minProp];
+        this.split.on("beforeapply", this.onSplitMove, this);
+        this.split.useShim = this.useShim === true;
+        this.maxSize = this.maxSize || this[s.maxProp];
+
+        if(p.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);
+        }
+    },
+
+    //docs inherit from superclass
+    getSize : function(){
+        if(this.isCollapsed){
+            return this.collapsedEl.getSize();
+        }
+        var s = this.panel.getSize();
+        if(this.position == 'north' || this.position == 'south'){
+            s.height += this.splitEl.dom.offsetHeight;
+        }else{
+            s.width += this.splitEl.dom.offsetWidth;
+        }
+        return s;
+    },
+
+    // private
+    getHMaxSize : function(){
+         var cmax = this.maxSize || 10000;
+         var center = this.layout.center;
+         return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth());
+    },
+
+    // private
+    getVMaxSize : function(){
+        var cmax = this.maxSize || 10000;
+        var center = this.layout.center;
+        return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight());
+    },
+
+    // private
+    onSplitMove : function(split, newSize){
+        var s = this.panel.getSize();
+        this.lastSplitSize = newSize;
+        if(this.position == 'north' || this.position == 'south'){
+            this.panel.setSize(s.width, newSize);
+            this.state.height = newSize;
+        }else{
+            this.panel.setSize(newSize, s.height);
+            this.state.width = newSize;
+        }
+        this.layout.layout();
+        this.panel.saveState();
+        return false;
+    },
+
+    /**
+     * Returns a reference to the split bar in use by this region.
+     * @return {Ext.SplitBar} The split bar
+     */
+    getSplitBar : function(){
+        return this.split;
+    },
+
+    // inherit docs
+    destroy : function() {
+        Ext.destroy(
+            this.miniSplitEl,
+            this.split,
+            this.splitEl
+        );
+    }
+});
+
+Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BoxLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BoxLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/BoxLayout.js	(revision 625)
@@ -0,0 +1,417 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.BoxLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.</p>
+ */
+Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Object} defaultMargins
+     * <p>If the individual contained items do not have a <tt>margins</tt>
+     * property specified, the default margins from this property will be
+     * applied to each item.</p>
+     * <br><p>This property may be specified as an object containing margins
+     * to apply in the format:</p><pre><code>
+{
+    top: (top margin),
+    right: (right margin),
+    bottom: (bottom margin),
+    left: (left margin)
+}</code></pre>
+     * <p>This property may also be specified as a string containing
+     * space-separated, numeric margin values. The order of the sides associated
+     * with each value matches the way CSS processes margin values:</p>
+     * <div class="mdetail-params"><ul>
+     * <li>If there is only one value, it applies to all sides.</li>
+     * <li>If there are two values, the top and bottom borders are set to the
+     * first value and the right and left are set to the second.</li>
+     * <li>If there are three values, the top is set to the first value, the left
+     * and right are set to the second, and the bottom is set to the third.</li>
+     * <li>If there are four values, they apply to the top, right, bottom, and
+     * left, respectively.</li>
+     * </ul></div>
+     * <p>Defaults to:</p><pre><code>
+     * {top:0, right:0, bottom:0, left:0}
+     * </code></pre>
+     */
+    defaultMargins : {left:0,top:0,right:0,bottom:0},
+    /**
+     * @cfg {String} padding
+     * Defaults to <tt>'0'</tt>. Sets the padding to be applied to all child items managed by this
+     * container's layout. 
+     */
+    padding : '0',
+    // documented in subclasses
+    pack : 'start',
+
+    // private
+    monitorResize : true,
+    scrollOffset : 0,
+    extraCls : 'x-box-item',
+    ctCls : 'x-box-layout-ct',
+    innerCls : 'x-box-inner',
+
+    // private
+    isValidParent : function(c, target){
+        return c.getEl().dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm;
+
+        if(!this.innerCt){
+            target.addClass(this.ctCls);
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:this.innerCls});
+            this.padding = this.parseMargins(this.padding); 
+        }
+        this.renderAll(ct, this.innerCt);
+    },
+
+    // private
+    renderItem : function(c){
+        if(typeof c.margins == 'string'){
+            c.margins = this.parseMargins(c.margins);
+        }else if(!c.margins){
+            c.margins = this.defaultMargins;
+        }
+        Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments);
+    },
+
+    getTargetSize : function(target){
+        return (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getStyleSize() : target.getViewSize();
+    },
+    
+    getItems: function(ct){
+        var items = [];
+        ct.items.each(function(c){
+            if(c.isVisible()){
+                items.push(c);
+            }
+        });
+        return items;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+/**
+ * @class Ext.layout.VBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items vertically
+ */
+Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>left</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned horizontally
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are aligned horizontally at the
+     * <b>mid-width</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched horizontally to fill
+     * the width of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched horizontally to
+     * the size of the largest item.</div></li>
+     * </ul></div>
+     */
+    align : 'left', // left, center, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>top</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-height</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>bottom</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>vertically</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.VBoxLayout.superclass.onLayout.call(this, ct, target);
+                    
+        
+        var cs = this.getItems(ct), cm, ch, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchWidth = w - (this.padding.left + this.padding.right),
+            extraHeight = 0,
+            maxWidth = 0,
+            totalFlex = 0,
+            flexHeight = 0,
+            usedHeight = 0;
+            
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            ch = c.getHeight();
+            margin = cm.top + cm.bottom;
+            extraHeight += ch + margin;
+            flexHeight += margin + (c.flex ? 0 : ch);
+            maxWidth = Math.max(maxWidth, c.getWidth() + cm.left + cm.right);
+        });
+        extraHeight = h - extraHeight - this.padding.top - this.padding.bottom;
+        
+        var innerCtWidth = maxWidth + this.padding.left + this.padding.right;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'left':
+                this.innerCt.setSize(innerCtWidth, h);
+                break;
+            case 'center':
+                this.innerCt.setSize(w = Math.max(w, innerCtWidth), h);
+                break;
+        }
+
+        var availHeight = Math.max(0, h - this.padding.top - this.padding.bottom - flexHeight),
+            leftOver = availHeight,
+            heights = [],
+            restore = [],
+            idx = 0,
+            availableWidth = Math.max(0, w - this.padding.left - this.padding.right);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                ch = Math.floor(availHeight * (c.flex / totalFlex));
+                leftOver -= ch;
+                heights.push(ch);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            t += extraHeight ? extraHeight / 2 : 0;
+        }else if(this.pack == 'end'){
+            t += extraHeight;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            t += cm.top;
+            c.setPosition(l + cm.left, t);
+            if(isStart && c.flex){
+                ch = Math.max(0, heights[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getWidth());
+                }
+                c.setSize(availableWidth, ch);
+            }else{
+                ch = c.getHeight();
+            }
+            t += ch + cm.bottom;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setWidth((stretchWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setWidth((maxWidth - (cm.left + cm.right)).constrain(
+                    c.minWidth || 0, c.maxWidth || 1000000));
+            }else{
+                if(this.align == 'center'){
+                    var diff = availableWidth - (c.getWidth() + cm.left + cm.right);
+                    if(diff > 0){
+                        c.setPosition(l + cm.left + (diff/2), c.y);
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setWidth(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout;
+
+/**
+ * @class Ext.layout.HBoxLayout
+ * @extends Ext.layout.BoxLayout
+ * A layout that arranges items horizontally
+ */
+Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
+    /**
+     * @cfg {String} align
+     * Controls how the child items of the container are aligned. Acceptable configuration values for this
+     * property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>top</tt></b> : <b>Default</b><div class="sub-desc">child items are aligned vertically
+     * at the <b>left</b> side of the container</div></li>
+     * <li><b><tt>middle</tt></b> : <div class="sub-desc">child items are aligned vertically at the
+     * <b>mid-height</b> of the container</div></li>
+     * <li><b><tt>stretch</tt></b> : <div class="sub-desc">child items are stretched vertically to fill
+     * the height of the container</div></li>
+     * <li><b><tt>stretchmax</tt></b> : <div class="sub-desc">child items are stretched vertically to
+     * the size of the largest item.</div></li>
+     */
+    align : 'top', // top, middle, stretch, strechmax
+    /**
+     * @cfg {String} pack
+     * Controls how the child items of the container are packed together. Acceptable configuration values
+     * for this property are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>start</tt></b> : <b>Default</b><div class="sub-desc">child items are packed together at
+     * <b>left</b> side of container</div></li>
+     * <li><b><tt>center</tt></b> : <div class="sub-desc">child items are packed together at
+     * <b>mid-width</b> of container</div></li>
+     * <li><b><tt>end</tt></b> : <div class="sub-desc">child items are packed together at <b>right</b>
+     * side of container</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Number} flex
+     * This configuation option is to be applied to <b>child <tt>items</tt></b> of the container managed
+     * by this layout. Each child item with a <tt>flex</tt> property will be flexed <b>horizontally</b>
+     * according to each item's <b>relative</b> <tt>flex</tt> value compared to the sum of all items with
+     * a <tt>flex</tt> value specified.  Any child items that have either a <tt>flex = 0</tt> or
+     * <tt>flex = undefined</tt> will not be 'flexed' (the initial size will not be changed).
+     */
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.HBoxLayout.superclass.onLayout.call(this, ct, target);
+        
+        var cs = this.getItems(ct), cm, cw, margin,
+            size = this.getTargetSize(target),
+            w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            l = this.padding.left, t = this.padding.top,
+            isStart = this.pack == 'start',
+            isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1,
+            stretchHeight = h - (this.padding.top + this.padding.bottom),
+            extraWidth = 0,
+            maxHeight = 0,
+            totalFlex = 0,
+            flexWidth = 0,
+            usedWidth = 0;
+        
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            totalFlex += c.flex || 0;
+            cw = c.getWidth();
+            margin = cm.left + cm.right;
+            extraWidth += cw + margin;
+            flexWidth += margin + (c.flex ? 0 : cw);
+            maxHeight = Math.max(maxHeight, c.getHeight() + cm.top + cm.bottom);
+        });
+        extraWidth = w - extraWidth - this.padding.left - this.padding.right;
+        
+        var innerCtHeight = maxHeight + this.padding.top + this.padding.bottom;
+        switch(this.align){
+            case 'stretch':
+                this.innerCt.setSize(w, h);
+                break;
+            case 'stretchmax':
+            case 'top':
+                this.innerCt.setSize(w, innerCtHeight);
+                break;
+            case 'middle':
+                this.innerCt.setSize(w, h = Math.max(h, innerCtHeight));
+                break;
+        }
+        
+
+        var availWidth = Math.max(0, w - this.padding.left - this.padding.right - flexWidth),
+            leftOver = availWidth,
+            widths = [],
+            restore = [],
+            idx = 0,
+            availableHeight = Math.max(0, h - this.padding.top - this.padding.bottom);
+            
+
+        Ext.each(cs, function(c){
+            if(isStart && c.flex){
+                cw = Math.floor(availWidth * (c.flex / totalFlex));
+                leftOver -= cw;
+                widths.push(cw);
+            }
+        }); 
+        
+        if(this.pack == 'center'){
+            l += extraWidth ? extraWidth / 2 : 0;
+        }else if(this.pack == 'end'){
+            l += extraWidth;
+        }
+        Ext.each(cs, function(c){
+            cm = c.margins;
+            l += cm.left;
+            c.setPosition(l, t + cm.top);
+            if(isStart && c.flex){
+                cw = Math.max(0, widths[idx++] + (leftOver-- > 0 ? 1 : 0));
+                if(isRestore){
+                    restore.push(c.getHeight());
+                }
+                c.setSize(cw, availableHeight);
+            }else{
+                cw = c.getWidth();
+            }
+            l += cw + cm.right;
+        });
+        
+        idx = 0;
+        Ext.each(cs, function(c){
+            var cm = c.margins;
+            if(this.align == 'stretch'){
+                c.setHeight((stretchHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else if(this.align == 'stretchmax'){
+                c.setHeight((maxHeight - (cm.top + cm.bottom)).constrain(
+                    c.minHeight || 0, c.maxHeight || 1000000));
+            }else{
+                if(this.align == 'middle'){
+                    var diff = availableHeight - (c.getHeight() + cm.top + cm.bottom);
+                    if(diff > 0){
+                        c.setPosition(c.x, t + cm.top + (diff/2));
+                    }
+                }
+                if(isStart && c.flex){
+                    c.setHeight(restore[idx++]);
+                }
+            }
+        }, this);
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/CardLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/CardLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/CardLayout.js	(revision 625)
@@ -0,0 +1,127 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.CardLayout
+ * @extends Ext.layout.FitLayout
+ * <p>This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be
+ * visible at any given time.  This layout style is most commonly used for wizards, tab implementations, etc.
+ * This class is intended to be extended or created via the layout:'card' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>The CardLayout's focal method is {@link #setActiveItem}.  Since only one panel is displayed at a time,
+ * the only way to move from one Component to the next is by calling setActiveItem, passing the id or index of
+ * the next panel to display.  The layout itself does not provide a user interface for handling this navigation,
+ * so that functionality must be provided by the developer.</p>
+ * <p>In the following example, a simplistic wizard setup is demonstrated.  A button bar is added
+ * to the footer of the containing panel to provide navigation buttons.  The buttons will be handled by a
+ * common navigation routine -- for this example, the implementation of that routine has been ommitted since
+ * it can be any type of custom logic.  Note that other uses of a CardLayout (like a tab control) would require a
+ * completely different implementation.  For serious implementations, a better approach would be to extend
+ * CardLayout to provide the custom functionality needed.  Example usage:</p>
+ * <pre><code>
+var navHandler = function(direction){
+    // This routine could contain business logic required to manage the navigation steps.
+    // It would call setActiveItem as needed, manage navigation button state, handle any
+    // branching logic that might be required, handle alternate actions like cancellation
+    // or finalization, etc.  A complete wizard implementation could get pretty
+    // sophisticated depending on the complexity required, and should probably be
+    // done as a subclass of CardLayout in a real-world implementation.
+};
+
+var card = new Ext.Panel({
+    title: 'Example Wizard',
+    layout:'card',
+    activeItem: 0, // make sure the active item is set on the container config!
+    bodyStyle: 'padding:15px',
+    defaults: {
+        // applied to each contained panel
+        border:false
+    },
+    // just an example of one possible navigation scheme, using buttons
+    bbar: [
+        {
+            id: 'move-prev',
+            text: 'Back',
+            handler: navHandler.createDelegate(this, [-1]),
+            disabled: true
+        },
+        '->', // greedy spacer so that the buttons are aligned to each side
+        {
+            id: 'move-next',
+            text: 'Next',
+            handler: navHandler.createDelegate(this, [1])
+        }
+    ],
+    // the panels (or "cards") within the layout
+    items: [{
+        id: 'card-0',
+        html: '&lt;h1&gt;Welcome to the Wizard!&lt;/h1&gt;&lt;p&gt;Step 1 of 3&lt;/p&gt;'
+    },{
+        id: 'card-1',
+        html: '&lt;p&gt;Step 2 of 3&lt;/p&gt;'
+    },{
+        id: 'card-2',
+        html: '&lt;h1&gt;Congratulations!&lt;/h1&gt;&lt;p&gt;Step 3 of 3 - Complete&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
+    /**
+     * @cfg {Boolean} deferredRender
+     * True to render each contained item at the time it becomes active, false to render all contained items
+     * as soon as the layout is rendered (defaults to false).  If there is a significant amount of content or
+     * a lot of heavy controls being rendered into panels that are not displayed by default, setting this to
+     * true might improve performance.
+     */
+    deferredRender : false,
+    
+    /**
+     * @cfg {Boolean} layoutOnCardChange
+     * True to force a layout of the active item when the active card is changed. Defaults to false.
+     */
+    layoutOnCardChange : false,
+
+    /**
+     * @cfg {Boolean} renderHidden @hide
+     */
+    // private
+    renderHidden : true,
+    
+    constructor: function(config){
+        Ext.layout.CardLayout.superclass.constructor.call(this, config);
+        this.forceLayout = (this.deferredRender === false);
+    },
+
+    /**
+     * Sets the active (visible) item in the layout.
+     * @param {String/Number} item The string component id or numeric index of the item to activate
+     */
+    setActiveItem : function(item){
+        item = this.container.getComponent(item);
+        if(this.activeItem != item){
+            if(this.activeItem){
+                this.activeItem.hide();
+            }
+            this.activeItem = item;
+            item.show();
+            this.container.doLayout();
+            if(this.layoutOnCardChange && item.doLayout){
+                item.doLayout();
+            }
+        }
+    },
+
+    // private
+    renderAll : function(ct, target){
+        if(this.deferredRender){
+            this.renderItem(this.activeItem, undefined, target);
+        }else{
+            Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target);
+        }
+    }
+});
+Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ColumnLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ColumnLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ColumnLayout.js	(revision 625)
@@ -0,0 +1,130 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.ColumnLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is the layout style of choice for creating structural layouts in a multi-column format where the width of
+ * each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content.
+ * This class is intended to be extended or created via the layout:'column' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>ColumnLayout does not have any direct config options (other than inherited ones), but it does support a
+ * specific config property of <b><tt>columnWidth</tt></b> that can be included in the config of any panel added to it.  The
+ * layout will use the columnWidth (if present) or width of each panel during layout to determine how to size each panel.
+ * If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).</p>
+ * <p>The width property is always evaluated as pixels, and must be a number greater than or equal to 1.
+ * The columnWidth property is always evaluated as a percentage, and must be a decimal value greater than 0 and
+ * less than 1 (e.g., .25).</p>
+ * <p>The basic rules for specifying column widths are pretty simple.  The logic makes two passes through the
+ * set of contained panels.  During the first layout pass, all panels that either have a fixed width or none
+ * specified (auto) are skipped, but their widths are subtracted from the overall container width.  During the second
+ * pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on
+ * the total <b>remaining</b> container width.  In other words, percentage width panels are designed to fill the space
+ * left over by all the fixed-width and/or auto-width panels.  Because of this, while you can specify any number of columns
+ * with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your
+ * layout may not render as expected.  Example usage:</p>
+ * <pre><code>
+// All columns are percentages -- they must add up to 1
+var p = new Ext.Panel({
+    title: 'Column Layout - Percentage Only',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        columnWidth: .25 
+    },{
+        title: 'Column 2',
+        columnWidth: .6
+    },{
+        title: 'Column 3',
+        columnWidth: .15
+    }]
+});
+
+// Mix of width and columnWidth -- all columnWidth values must add up
+// to 1. The first column will take up exactly 120px, and the last two
+// columns will fill the remaining container width.
+var p = new Ext.Panel({
+    title: 'Column Layout - Mixed',
+    layout:'column',
+    items: [{
+        title: 'Column 1',
+        width: 120
+    },{
+        title: 'Column 2',
+        columnWidth: .8
+    },{
+        title: 'Column 3',
+        columnWidth: .2
+    }]
+});
+</code></pre>
+ */
+Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+    
+    extraCls: 'x-column',
+
+    scrollOffset : 0,
+
+    // private
+    isValidParent : function(c, target){
+        return (c.getPositionEl ? c.getPositionEl() : c.getEl()).dom.parentNode == this.innerCt.dom;
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.innerCt){
+            target.addClass('x-column-layout-ct');
+
+            // the innerCt prevents wrapping and shuffling while
+            // the container is resizing
+            this.innerCt = target.createChild({cls:'x-column-inner'});
+            this.innerCt.createChild({cls:'x-clear'});
+        }
+        this.renderAll(ct, this.innerCt);
+
+        var size = Ext.isIE && target.dom != Ext.getBody().dom ? target.getStyleSize() : target.getViewSize();
+
+        if(size.width < 1 && size.height < 1){ // display none?
+            return;
+        }
+
+        var w = size.width - target.getPadding('lr') - this.scrollOffset,
+            h = size.height - target.getPadding('tb'),
+            pw = w;
+
+        this.innerCt.setWidth(w);
+        
+        // some columns can be percentages while others are fixed
+        // so we need to make 2 passes
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(!c.columnWidth){
+                pw -= (c.getSize().width + c.getEl().getMargins('lr'));
+            }
+        }
+
+        pw = pw < 0 ? 0 : pw;
+
+        for(i = 0; i < len; i++){
+            c = cs[i];
+            if(c.columnWidth){
+                c.setSize(Math.floor(c.columnWidth*pw) - c.getEl().getMargins('lr'));
+            }
+        }
+    }
+    
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ContainerLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ContainerLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/ContainerLayout.js	(revision 625)
@@ -0,0 +1,215 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.ContainerLayout
+ * <p>The ContainerLayout class is the default layout manager delegated by {@link Ext.Container} to
+ * render any child Components when no <tt>{@link Ext.Container#layout layout}</tt> is configured into
+ * a {@link Ext.Container Container}. ContainerLayout provides the basic foundation for all other layout
+ * classes in Ext. It simply renders all child Components into the Container, performing no sizing or
+ * positioning services. To utilize a layout that provides sizing and positioning of child Components,
+ * specify an appropriate <tt>{@link Ext.Container#layout layout}</tt>.</p>
+ * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
+ * configuration property.  See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ */
+Ext.layout.ContainerLayout = function(config){
+    Ext.apply(this, config);
+};
+
+Ext.layout.ContainerLayout.prototype = {
+    /**
+     * @cfg {String} extraCls
+     * <p>An optional extra CSS class that will be added to the container. This can be useful for adding
+     * customized styles to the container or any of its children using standard CSS rules. See
+     * {@link Ext.Component}.{@link Ext.Component#ctCls ctCls} also.</p>
+     * <p><b>Note</b>: <tt>extraCls</tt> defaults to <tt>''</tt> except for the following classes
+     * which assign a value by default:
+     * <div class="mdetail-params"><ul>
+     * <li>{@link Ext.layout.AbsoluteLayout Absolute Layout} : <tt>'x-abs-layout-item'</tt></li>
+     * <li>{@link Ext.layout.Box Box Layout} : <tt>'x-box-item'</tt></li>
+     * <li>{@link Ext.layout.ColumnLayout Column Layout} : <tt>'x-column'</tt></li>
+     * </ul></div>
+     * To configure the above Classes with an extra CSS class append to the default.  For example,
+     * for ColumnLayout:<pre><code>
+     * extraCls: 'x-column custom-class'
+     * </code></pre>
+     * </p>
+     */
+    /**
+     * @cfg {Boolean} renderHidden
+     * True to hide each contained item on render (defaults to false).
+     */
+
+    /**
+     * A reference to the {@link Ext.Component} that is active.  For example, <pre><code>
+     * if(myPanel.layout.activeItem.id == 'item-1') { ... }
+     * </code></pre>
+     * <tt>activeItem</tt> only applies to layout styles that can display items one at a time
+     * (like {@link Ext.layout.AccordionLayout}, {@link Ext.layout.CardLayout}
+     * and {@link Ext.layout.FitLayout}).  Read-only.  Related to {@link Ext.Container#activeItem}.
+     * @type {Ext.Component}
+     * @property activeItem
+     */
+
+    // private
+    monitorResize:false,
+    // private
+    activeItem : null,
+
+    // private
+    layout : function(){
+        var target = this.container.getLayoutTarget();
+        this.onLayout(this.container, target);
+        this.container.fireEvent('afterlayout', this.container, this);
+    },
+
+    // private
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+    },
+
+    // private
+    isValidParent : function(c, target){
+		return target && c.getDomPositionEl().dom.parentNode == (target.dom || target);
+    },
+
+    // private
+    renderAll : function(ct, target){
+        var items = ct.items.items;
+        for(var i = 0, len = items.length; i < len; i++) {
+            var c = items[i];
+            if(c && (!c.rendered || !this.isValidParent(c, target))){
+                this.renderItem(c, i, target);
+            }
+        }
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(target, position);
+            this.configureItem(c, position);
+        }else if(c && !this.isValidParent(c, target)){
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getDomPositionEl().dom, position || null);
+            c.container = target;
+            this.configureItem(c, position);
+        }
+    },
+    
+    // private
+    configureItem: function(c, position){
+        if(this.extraCls){
+            var t = c.getPositionEl ? c.getPositionEl() : c;
+            t.addClass(this.extraCls);
+        }
+        if (this.renderHidden && c != this.activeItem) {
+            c.hide();
+        }
+        if(c.doLayout){
+            c.doLayout(false, this.forceLayout);
+        }
+    },
+
+    // private
+    onResize: function(){
+        if(this.container.collapsed){
+            return;
+        }
+        var b = this.container.bufferResize;
+        if(b){
+            if(!this.resizeTask){
+                this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this);
+                this.resizeBuffer = typeof b == 'number' ? b : 100;
+            }
+            this.resizeTask.delay(this.resizeBuffer);
+        }else{
+            this.runLayout();
+        }
+    },
+    
+    // private
+    runLayout: function(){
+        this.layout();
+        this.container.onLayout();
+    },
+
+    // private
+    setContainer : function(ct){
+        if(this.monitorResize && ct != this.container){
+            if(this.container){
+                this.container.un('resize', this.onResize, this);
+                this.container.un('bodyresize', this.onResize, this);
+            }
+            if(ct){
+                ct.on({
+                    scope: this,
+                    resize: this.onResize,
+                    bodyresize: this.onResize
+                });
+            }
+        }
+        this.container = ct;
+    },
+
+    // private
+    parseMargins : function(v){
+        if(typeof v == 'number'){
+            v = v.toString();
+        }
+        var ms = v.split(' ');
+        var len = ms.length;
+        if(len == 1){
+            ms[1] = ms[0];
+            ms[2] = ms[0];
+            ms[3] = ms[0];
+        }
+        if(len == 2){
+            ms[2] = ms[0];
+            ms[3] = ms[1];
+        }
+        if(len == 3){
+            ms[3] = ms[1];
+        }
+        return {
+            top:parseInt(ms[0], 10) || 0,
+            right:parseInt(ms[1], 10) || 0,
+            bottom:parseInt(ms[2], 10) || 0,
+            left:parseInt(ms[3], 10) || 0
+        };
+    },
+
+    /**
+     * The {@link Template Ext.Template} used by Field rendering layout classes (such as
+     * {@link Ext.layout.FormLayout}) to create the DOM structure of a fully wrapped,
+     * labeled and styled form Field. A default Template is supplied, but this may be
+     * overriden to create custom field structures. The template processes values returned from
+     * {@link Ext.layout.FormLayout#getTemplateArgs}.
+     * @property fieldTpl
+     * @type Ext.Template
+     */
+    fieldTpl: (function() {
+        var t = new Ext.Template(
+            '<div class="x-form-item {itemCls}" tabIndex="-1">',
+                '<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
+                '<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">',
+                '</div><div class="{clearCls}"></div>',
+            '</div>'
+        );
+        t.disableFormats = true;
+        return t.compile();
+    })(),
+	
+    /*
+     * Destroys this layout. This is a template method that is empty by default, but should be implemented
+     * by subclasses that require explicit destruction to purge event handlers or remove DOM nodes.
+     * @protected
+     */
+    destroy : Ext.emptyFn
+};
+Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FitLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FitLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FitLayout.js	(revision 625)
@@ -0,0 +1,48 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.FitLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This is a base class for layouts that contain <b>a single item</b> that automatically expands to fill the layout's
+ * container.  This class is intended to be extended or created via the <tt>layout:'fit'</tt> {@link Ext.Container#layout}
+ * config, and should generally not need to be created directly via the new keyword.</p>
+ * <p>FitLayout does not have any direct config options (other than inherited ones).  To fit a panel to a container
+ * using FitLayout, simply set layout:'fit' on the container and add a single panel to it.  If the container has
+ * multiple panels, only the first one will be displayed.  Example usage:</p>
+ * <pre><code>
+var p = new Ext.Panel({
+    title: 'Fit Layout',
+    layout:'fit',
+    items: {
+        title: 'Inner Panel',
+        html: '&lt;p&gt;This is the inner panel content&lt;/p&gt;',
+        border: false
+    }
+});
+</code></pre>
+ */
+Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    // private
+    monitorResize:true,
+
+    // private
+    onLayout : function(ct, target){
+        Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target);
+        if(!this.container.collapsed){
+            var sz = (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getViewSize() : target.getStyleSize();
+            this.setItemSize(this.activeItem || ct.items.itemAt(0), sz);
+        }
+    },
+
+    // private
+    setItemSize : function(item, size){
+        if(item && size.height > 0){ // display none?
+            item.setSize(size);
+        }
+    }
+});
+Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FormLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FormLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/FormLayout.js	(revision 625)
@@ -0,0 +1,266 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.FormLayout
+ * @extends Ext.layout.AnchorLayout
+ * <p>This layout manager is specifically designed for rendering and managing child Components of
+ * {@link Ext.form.FormPanel forms}. It is responsible for rendering the labels of
+ * {@link Ext.form.Field Field}s.</p>
+ *
+ * <p>This layout manager is used when a Container is configured with the <tt>layout:'form'</tt>
+ * {@link Ext.Container#layout layout} config option, and should generally not need to be created directly
+ * via the new keyword. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
+ *
+ * <p>In an application, it will usually be preferrable to use a {@link Ext.form.FormPanel FormPanel}
+ * (which is configured with FormLayout as its layout class by default) since it also provides built-in
+ * functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form.</p>
+ *
+ * <p>A {@link Ext.Container Container} <i>using</i> the FormLayout layout manager (e.g.
+ * {@link Ext.form.FormPanel} or specifying <tt>layout:'form'</tt>) can also accept the following
+ * layout-specific config properties:<div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.form.FormPanel#hideLabels hideLabels}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelAlign labelAlign}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelPad labelPad}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.form.FormPanel#labelWidth labelWidth}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component (including Fields) managed by FormLayout accepts the following as a config option:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#anchor anchor}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Any Component managed by FormLayout may be rendered as a form field (with an associated label) by
+ * configuring it with a non-null <b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b>. Components configured
+ * in this way may be configured with the following options which affect the way the FormLayout renders them:
+ * <div class="mdetail-params"><ul>
+ * <li><b><tt>{@link Ext.Component#clearCls clearCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#fieldLabel fieldLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#hideLabel hideLabel}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#itemCls itemCls}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelSeparator labelSeparator}</tt></b></li>
+ * <li><b><tt>{@link Ext.Component#labelStyle labelStyle}</tt></b></li>
+ * </ul></div></p>
+ *
+ * <p>Example usage:</p>
+ * <pre><code>
+// Required if showing validation messages
+Ext.QuickTips.init();
+
+// While you can create a basic Panel with layout:'form', practically
+// you should usually use a FormPanel to also get its form functionality
+// since it already creates a FormLayout internally.
+var form = new Ext.form.FormPanel({
+    title: 'Form Layout',
+    bodyStyle: 'padding:15px',
+    width: 350,
+    defaultType: 'textfield',
+    defaults: {
+        // applied to each contained item
+        width: 230,
+        msgTarget: 'side'
+    },
+    items: [{
+            fieldLabel: 'First Name',
+            name: 'first',
+            allowBlank: false,
+            {@link Ext.Component#labelSeparator labelSeparator}: ':' // override labelSeparator layout config
+        },{
+            fieldLabel: 'Last Name',
+            name: 'last'
+        },{
+            fieldLabel: 'Email',
+            name: 'email',
+            vtype:'email'
+        }, {
+            xtype: 'textarea',
+            hideLabel: true,     // override hideLabels layout config
+            name: 'msg',
+            anchor: '100% -53'
+        }
+    ],
+    buttons: [
+        {text: 'Save'},
+        {text: 'Cancel'}
+    ],
+    layoutConfig: {
+        {@link #labelSeparator}: '~' // superseded by assignment below
+    },
+    // config options applicable to container when layout='form':
+    hideLabels: false,
+    labelAlign: 'left',   // or 'right' or 'top'
+    {@link Ext.form.FormPanel#labelSeparator labelSeparator}: '>>', // takes precedence over layoutConfig value
+    labelWidth: 65,       // defaults to 100
+    labelPad: 8           // defaults to 5, must specify labelWidth to be honored
+});
+</code></pre>
+ */
+Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
+
+    /**
+     * @cfg {String} labelSeparator
+     * See {@link Ext.form.FormPanel}.{@link Ext.form.FormPanel#labelSeparator labelSeparator}.  Configuration
+     * of this property at the <b>container</b> level takes precedence.
+     */
+    labelSeparator : ':',
+
+    /**
+     * Read only. The CSS style specification string added to field labels in this layout if not
+     * otherwise {@link Ext.Component#labelStyle specified by each contained field}.
+     * @type String
+     * @property labelStyle
+     */
+
+    // private
+    setContainer : function(ct){
+        Ext.layout.FormLayout.superclass.setContainer.call(this, ct);
+        if(ct.labelAlign){
+            ct.addClass('x-form-label-'+ct.labelAlign);
+        }
+
+        if(ct.hideLabels){
+            this.labelStyle = "display:none";
+            this.elementStyle = "padding-left:0;";
+            this.labelAdjust = 0;
+        }else{
+            this.labelSeparator = ct.labelSeparator || this.labelSeparator;
+            ct.labelWidth = ct.labelWidth || 100;
+            if(typeof ct.labelWidth == 'number'){
+                var pad = (typeof ct.labelPad == 'number' ? ct.labelPad : 5);
+                this.labelAdjust = ct.labelWidth+pad;
+                this.labelStyle = "width:"+ct.labelWidth+"px;";
+                this.elementStyle = "padding-left:"+(ct.labelWidth+pad)+'px';
+            }
+            if(ct.labelAlign == 'top'){
+                this.labelStyle = "width:auto;";
+                this.labelAdjust = 0;
+                this.elementStyle = "padding-left:0;";
+            }
+        }
+    },
+
+    //private
+    getLabelStyle: function(s){
+        var ls = '', items = [this.labelStyle, s];
+        for (var i = 0, len = items.length; i < len; ++i){
+            if (items[i]){
+                ls += items[i];
+                if (ls.substr(-1, 1) != ';'){
+                    ls += ';'
+                }
+            }
+        }
+        return ls;
+    },
+
+    /**
+     * @cfg {Ext.Template} fieldTpl
+     * A {@link Ext.Template#compile compile}d {@link Ext.Template} for rendering
+     * the fully wrapped, labeled and styled form Field. Defaults to:</p><pre><code>
+new Ext.Template(
+    &#39;&lt;div class="x-form-item {itemCls}" tabIndex="-1">&#39;,
+        &#39;&lt;&#108;abel for="{id}" style="{labelStyle}" class="x-form-item-&#108;abel">{&#108;abel}{labelSeparator}&lt;/&#108;abel>&#39;,
+        &#39;&lt;div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">&#39;,
+        &#39;&lt;/div>&lt;div class="{clearCls}">&lt;/div>&#39;,
+    '&lt;/div>'
+);
+</code></pre>
+     * <p>This may be specified to produce a different DOM structure when rendering form Fields.</p>
+     * <p>A description of the properties within the template follows:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * <p>Also see <tt>{@link #getTemplateArgs}</tt></p>
+     */
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
+            var args = this.getTemplateArgs(c);
+            if(typeof position == 'number'){
+                position = target.dom.childNodes[position] || null;
+            }
+            if(position){
+                this.fieldTpl.insertBefore(position, args);
+            }else{
+                this.fieldTpl.append(target, args);
+            }
+            c.render('x-form-el-'+c.id);
+        }else {
+            Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments);
+        }
+    },
+
+    /**
+     * <p>Provides template arguments for rendering the fully wrapped, labeled and styled form Field.</p>
+     * <p>This method returns an object hash containing properties used by the layout's {@link #fieldTpl}
+     * to create a correctly wrapped, labeled and styled form Field. This may be overriden to
+     * create custom layouts. The properties which must be returned are:</p><div class="mdetail-params"><ul>
+     * <li><b><tt>itemCls</tt></b> : String<div class="sub-desc">The CSS class applied to the outermost div wrapper
+     * that contains this field label and field element (the default class is <tt>'x-form-item'</tt> and <tt>itemCls</tt>
+     * will be added to that). If supplied, <tt>itemCls</tt> at the field level will override the default <tt>itemCls</tt>
+     * supplied at the container level.</div></li>
+     * <li><b><tt>id</tt></b> : String<div class="sub-desc">The id of the Field</div></li>
+     * <li><b><tt>{@link #labelStyle}</tt></b> : String<div class="sub-desc">
+     * A CSS style specification string to add to the field label for this field (defaults to <tt>''</tt> or the
+     * {@link #labelStyle layout's value for <tt>labelStyle</tt>}).</div></li>
+     * <li><b><tt>label</tt></b> : String<div class="sub-desc">The text to display as the label for this
+     * field (defaults to <tt>''</tt>)</div></li>
+     * <li><b><tt>{@link #labelSeparator}</tt></b> : String<div class="sub-desc">The separator to display after
+     * the text of the label for this field (defaults to a colon <tt>':'</tt> or the
+     * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.</div></li>
+     * <li><b><tt>elementStyle</tt></b> : String<div class="sub-desc">The styles text for the input element's wrapper.</div></li>
+     * <li><b><tt>clearCls</tt></b> : String<div class="sub-desc">The CSS class to apply to the special clearing div
+     * rendered directly after each form field wrapper (defaults to <tt>'x-form-clear-left'</tt>)</div></li>
+     * </ul></div>
+     * @param field The {@link Field Ext.form.Field} being rendered.
+     * @return An object hash containing the properties required to render the Field.
+     */
+    getTemplateArgs: function(field) {
+        var noLabelSep = !field.fieldLabel || field.hideLabel;
+        return {
+            id: field.id,
+            label: field.fieldLabel,
+            labelStyle: field.labelStyle||this.labelStyle||'',
+            elementStyle: this.elementStyle||'',
+            labelSeparator: noLabelSep ? '' : (typeof field.labelSeparator == 'undefined' ? this.labelSeparator : field.labelSeparator),
+            itemCls: (field.itemCls||this.container.itemCls||'') + (field.hideLabel ? ' x-hide-label' : ''),
+            clearCls: field.clearCls || 'x-form-clear-left'
+        };
+    },
+
+    // private
+    adjustWidthAnchor : function(value, comp){
+        return value - (comp.isFormField || comp.fieldLabel  ? (comp.hideLabel ? 0 : this.labelAdjust) : 0);
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/TableLayout.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/TableLayout.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/layout/TableLayout.js	(revision 625)
@@ -0,0 +1,194 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.TableLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>This layout allows you to easily render content into an HTML table.  The total number of columns can be
+ * specified, and rowspan and colspan can be used to create complex layouts within the table.
+ * This class is intended to be extended or created via the layout:'table' {@link Ext.Container#layout} config,
+ * and should generally not need to be created directly via the new keyword.</p>
+ * <p>Note that when creating a layout via config, the layout-specific config properties must be passed in via
+ * the {@link Ext.Container#layoutConfig} object which will then be applied internally to the layout.  In the
+ * case of TableLayout, the only valid layout config property is {@link #columns}.  However, the items added to a
+ * TableLayout can supply the following table-specific config properties:</p>
+ * <ul>
+ * <li><b>rowspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>colspan</b> Applied to the table cell containing the item.</li>
+ * <li><b>cellId</b> An id applied to the table cell containing the item.</li>
+ * <li><b>cellCls</b> A CSS class name added to the table cell containing the item.</li>
+ * </ul>
+ * <p>The basic concept of building up a TableLayout is conceptually very similar to building up a standard
+ * HTML table.  You simply add each panel (or "cell") that you want to include along with any span attributes
+ * specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts.
+ * Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the
+ * total column count in the layoutConfig and start adding panels in their natural order from left to right,
+ * top to bottom.  The layout will automatically figure out, based on the column count, rowspans and colspans,
+ * how to position each panel within the table.  Just like with HTML tables, your rowspans and colspans must add
+ * up correctly in your overall layout or you'll end up with missing and/or extra cells!  Example usage:</p>
+ * <pre><code>
+// This code will generate a layout table that is 3 columns by 2 rows
+// with some spanning included.  The basic layout will be:
+// +--------+-----------------+
+// |   A    |   B             |
+// |        |--------+--------|
+// |        |   C    |   D    |
+// +--------+--------+--------+
+var table = new Ext.Panel({
+    title: 'Table Layout',
+    layout:'table',
+    defaults: {
+        // applied to each contained panel
+        bodyStyle:'padding:20px'
+    },
+    layoutConfig: {
+        // The total column count must be specified here
+        columns: 3
+    },
+    items: [{
+        html: '&lt;p&gt;Cell A content&lt;/p&gt;',
+        rowspan: 2
+    },{
+        html: '&lt;p&gt;Cell B content&lt;/p&gt;',
+        colspan: 2
+    },{
+        html: '&lt;p&gt;Cell C content&lt;/p&gt;',
+        cellCls: 'highlight'
+    },{
+        html: '&lt;p&gt;Cell D content&lt;/p&gt;'
+    }]
+});
+</code></pre>
+ */
+Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    /**
+     * @cfg {Number} columns
+     * The total number of columns to create in the table for this layout.  If not specified, all Components added to
+     * this layout will be rendered into a single row using one column per Component.
+     */
+
+    // private
+    monitorResize:false,
+
+    /**
+     * @cfg {Object} tableAttrs
+     * <p>An object containing properties which are added to the {@link Ext.DomHelper DomHelper} specification
+     * used to create the layout's <tt>&lt;table&gt;</tt> element. Example:</p><pre><code>
+{
+    xtype: 'panel',
+    layout: 'table',
+    layoutConfig: {
+        tableAttrs: {
+        	style: {
+        		width: '100%'
+        	}
+        },
+        columns: 3
+    }
+}</code></pre>
+     */
+    tableAttrs:null,
+    
+    // private
+    setContainer : function(ct){
+        Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
+
+        this.currentRow = 0;
+        this.currentColumn = 0;
+        this.cells = [];
+    },
+
+    // private
+    onLayout : function(ct, target){
+        var cs = ct.items.items, len = cs.length, c, i;
+
+        if(!this.table){
+            target.addClass('x-table-layout-ct');
+
+            this.table = target.createChild(
+                Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
+        }
+        this.renderAll(ct, target);
+    },
+
+    // private
+    getRow : function(index){
+        var row = this.table.tBodies[0].childNodes[index];
+        if(!row){
+            row = document.createElement('tr');
+            this.table.tBodies[0].appendChild(row);
+        }
+        return row;
+    },
+
+    // private
+    getNextCell : function(c){
+        var cell = this.getNextNonSpan(this.currentColumn, this.currentRow);
+        var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1];
+        for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){
+            if(!this.cells[rowIndex]){
+                this.cells[rowIndex] = [];
+            }
+            for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){
+                this.cells[rowIndex][colIndex] = true;
+            }
+        }
+        var td = document.createElement('td');
+        if(c.cellId){
+            td.id = c.cellId;
+        }
+        var cls = 'x-table-layout-cell';
+        if(c.cellCls){
+            cls += ' ' + c.cellCls;
+        }
+        td.className = cls;
+        if(c.colspan){
+            td.colSpan = c.colspan;
+        }
+        if(c.rowspan){
+            td.rowSpan = c.rowspan;
+        }
+        this.getRow(curRow).appendChild(td);
+        return td;
+    },
+    
+    // private
+    getNextNonSpan: function(colIndex, rowIndex){
+        var cols = this.columns;
+        while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) {
+            if(cols && colIndex >= cols){
+                rowIndex++;
+                colIndex = 0;
+            }else{
+                colIndex++;
+            }
+        }
+        return [colIndex, rowIndex];
+    },
+
+    // private
+    renderItem : function(c, position, target){
+        if(c && !c.rendered){
+            c.render(this.getNextCell(c));
+            if(this.extraCls){
+                var t = c.getPositionEl ? c.getPositionEl() : c;
+                t.addClass(this.extraCls);
+            }
+        }
+    },
+
+    // private
+    isValidParent : function(c, target){
+        return true;
+    }
+
+    /**
+     * @property activeItem
+     * @hide
+     */
+});
+
+Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ColumnResizer.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ColumnResizer.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ColumnResizer.js	(revision 625)
@@ -0,0 +1,123 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ListView.ColumnResizer
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.ColumnResizer = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Number} minPct The minimum percentage to allot for any column (defaults to <tt>.05</tt>)
+     */
+    minPct: .05,
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.ColumnResizer.superclass.constructor.call(this);
+    },
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'mousemove', this.handleHdMove, this);
+        this.tracker = new Ext.dd.DragTracker({
+            onBeforeStart: this.onBeforeStart.createDelegate(this),
+            onStart: this.onStart.createDelegate(this),
+            onDrag: this.onDrag.createDelegate(this),
+            onEnd: this.onEnd.createDelegate(this),
+            tolerance: 3,
+            autoStart: 300
+        });
+        this.tracker.initEl(view.innerHd);
+        view.on('beforedestroy', this.tracker.destroy, this.tracker);
+    },
+
+    handleHdMove : function(e, t){
+        var hw = 5;
+        var x = e.getPageX();
+        var hd = e.getTarget('em', 3, true);
+        if(hd){
+            var r = hd.getRegion();
+            var ss = hd.dom.style;
+            var pn = hd.dom.parentNode;
+
+            if(x - r.left <= hw && pn != pn.parentNode.firstChild){
+                this.activeHd = Ext.get(pn.previousSibling.firstChild);
+				ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize';
+            } else if(r.right - x <= hw && pn != pn.parentNode.lastChild.previousSibling){
+                this.activeHd = hd;
+				ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
+            } else{
+                delete this.activeHd;
+                ss.cursor = '';
+            }
+        }
+    },
+
+    onBeforeStart : function(e){
+        this.dragHd = this.activeHd;
+        return !!this.dragHd;
+    },
+
+    onStart: function(e){
+        this.view.disableHeaders = true;
+        this.proxy = this.view.el.createChild({cls:'x-list-resizer'});
+        this.proxy.setHeight(this.view.el.getHeight());
+
+        var x = this.tracker.getXY()[0];
+        var w = this.view.innerHd.getWidth();
+
+        this.hdX = this.dragHd.getX();
+        this.hdIndex = this.view.findHeaderIndex(this.dragHd);
+
+        this.proxy.setX(this.hdX);
+        this.proxy.setWidth(x-this.hdX);
+
+        this.minWidth = w*this.minPct;
+        this.maxWidth = w - (this.minWidth*(this.view.columns.length-1-this.hdIndex));
+    },
+
+    onDrag: function(e){
+        var cursorX = this.tracker.getXY()[0];
+        this.proxy.setWidth((cursorX-this.hdX).constrain(this.minWidth, this.maxWidth));
+    },
+
+    onEnd: function(e){
+        var nw = this.proxy.getWidth();
+        this.proxy.remove();
+
+        var index = this.hdIndex;
+        var vw = this.view, cs = vw.columns, len = cs.length;
+        var w = this.view.innerHd.getWidth(), minPct = this.minPct * 100;
+
+        var pct = Math.ceil((nw*100) / w);
+        var diff = cs[index].width - pct;
+        var each = Math.floor(diff / (len-1-index));
+        var mod = diff - (each * (len-1-index));
+
+        for(var i = index+1; i < len; i++){
+            var cw = cs[i].width + each;
+            var ncw = Math.max(minPct, cw);
+            if(cw != ncw){
+                mod += cw - ncw;
+            }
+            cs[i].width = ncw;
+        }
+        cs[index].width = pct;
+        cs[index+1].width += mod;
+        delete this.dragHd;
+        this.view.setHdWidths();
+        this.view.refresh();
+        setTimeout(function(){
+            vw.disableHeaders = false;
+        }, 100);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ListView.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ListView.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/ListView.js	(revision 625)
@@ -0,0 +1,357 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ListView
+ * @extends Ext.DataView
+ * <p>Ext.ListView is a fast and light-weight implentation of a
+ * {@link Ext.grid.GridPanel Grid} like view with the following characteristics:</p>
+ * <div class="mdetail-params"><ul>
+ * <li>resizable columns</li>
+ * <li>selectable</li>
+ * <li>column widths are initially proportioned by percentage based on the container
+ * width and number of columns</li>
+ * <li>uses templates to render the data in any required format</li>
+ * <li>no horizontal scrolling</li>
+ * <li>no editing</li>
+ * </ul></div>
+ * <p>Example usage:</p>
+ * <pre><code>
+// consume JSON of this form:
+{
+   "images":[
+      {
+         "name":"dance_fever.jpg",
+         "size":2067,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/dance_fever.jpg"
+      },
+      {
+         "name":"zack_sink.jpg",
+         "size":2303,
+         "lastmod":1236974993000,
+         "url":"images\/thumbs\/zack_sink.jpg"
+      }
+   ]
+} 
+var store = new Ext.data.JsonStore({
+    url: 'get-images.php',
+    root: 'images',
+    fields: [
+        'name', 'url',
+        {name:'size', type: 'float'},
+        {name:'lastmod', type:'date', dateFormat:'timestamp'}
+    ]
+});
+store.load();
+
+var listView = new Ext.ListView({
+    store: store,
+    multiSelect: true,
+    emptyText: 'No images to display',
+    reserveScrollOffset: true,
+    columns: [{
+        header: 'File',
+        width: .5,
+        dataIndex: 'name'
+    },{
+        header: 'Last Modified',
+        width: .35, 
+        dataIndex: 'lastmod',
+        tpl: '{lastmod:date("m-d h:i a")}'
+    },{
+        header: 'Size',
+        dataIndex: 'size',
+        tpl: '{size:fileSize}', // format using Ext.util.Format.fileSize()
+        align: 'right'
+    }]
+});
+
+// put it in a Panel so it looks pretty
+var panel = new Ext.Panel({
+    id:'images-view',
+    width:425,
+    height:250,
+    collapsible:true,
+    layout:'fit',
+    title:'Simple ListView <i>(0 items selected)</i>',
+    items: listView
+});
+panel.render(document.body);
+
+// little bit of feedback
+listView.on('selectionchange', function(view, nodes){
+    var l = nodes.length;
+    var s = l != 1 ? 's' : '';
+    panel.setTitle('Simple ListView <i>('+l+' item'+s+' selected)</i>');
+});
+ * </code></pre>
+ * @constructor
+ * @param {Object} config
+ * @xtype listview
+ */
+Ext.ListView = Ext.extend(Ext.DataView, {
+    /**
+     * Set this property to <tt>true</tt> to disable the header click handler disabling sort
+     * (defaults to <tt>false</tt>).
+     * @type Boolean
+     * @property disableHeaders
+     */
+    /**
+     * @cfg {Boolean} hideHeaders
+     * <tt>true</tt> to hide the {@link #internalTpl header row} (defaults to <tt>false</tt> so
+     * the {@link #internalTpl header row} will be shown).
+     */
+    /**
+     * @cfg {String} itemSelector
+     * Defaults to <tt>'dl'</tt> to work with the preconfigured <b><tt>{@link Ext.DataView#tpl tpl}</tt></b>.
+     * This setting specifies the CSS selector (e.g. <tt>div.some-class</tt> or <tt>span:first-child</tt>)
+     * that will be used to determine what nodes the ListView will be working with.   
+     */
+    itemSelector: 'dl',
+    /**
+     * @cfg {String} selectedClass The CSS class applied to a selected row (defaults to
+     * <tt>'x-list-selected'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-selected {background-color: yellow;}
+    </code></pre>
+     * @type String
+     */
+    selectedClass:'x-list-selected',
+    /**
+     * @cfg {String} overClass The CSS class applied when over a row (defaults to
+     * <tt>'x-list-over'</tt>). An example overriding the default styling:
+    <pre><code>
+    .x-list-over {background-color: orange;}
+    </code></pre>
+     * @type String
+     */
+    overClass:'x-list-over',
+    /**
+     * @cfg {Boolean} reserveScrollOffset
+     * By default will defer accounting for the configured <b><tt>{@link #scrollOffset}</tt></b>
+     * for 10 milliseconds.  Specify <tt>true</tt> to account for the configured
+     * <b><tt>{@link #scrollOffset}</tt></b> immediately.
+     */
+    /**
+     * @cfg {Number} scrollOffset The amount of space to reserve for the scrollbar (defaults to
+     * <tt>19</tt> pixels)
+     */
+    scrollOffset : 19,
+    /**
+     * @cfg {Boolean/Object} columnResize
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.ColumnResizer}
+     * to enable the columns to be resizable (defaults to <tt>true</tt>).
+     */
+    columnResize: true,
+    /**
+     * @cfg {Array} columns An array of column configuration objects, for example:
+     * <pre><code>
+{
+    align: 'right',
+    dataIndex: 'size',
+    header: 'Size',
+    tpl: '{size:fileSize}',
+    width: .35
+}
+     * </code></pre> 
+     * Acceptable properties for each column configuration object are:
+     * <div class="mdetail-params"><ul>
+     * <li><b><tt>align</tt></b> : String<div class="sub-desc">Set the CSS text-align property
+     * of the column. Defaults to <tt>'left'</tt>.</div></li>
+     * <li><b><tt>dataIndex</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#dataIndex dataIndex} for details.</div></li>
+     * <li><b><tt>header</tt></b> : String<div class="sub-desc">See {@link Ext.grid.Column}.
+     * {@link Ext.grid.Column#header header} for details.</div></li>
+     * <li><b><tt>tpl</tt></b> : String<div class="sub-desc">Specify a string to pass as the
+     * configuration string for {@link Ext.XTemplate}.  By default an {@link Ext.XTemplate}
+     * will be implicitly created using the <tt>dataIndex</tt>.</div></li>
+     * <li><b><tt>width</tt></b> : Number<div class="sub-desc">Percentage of the container width
+     * this column should be allocated.  Columns that have no width specified will be
+     * allocated with an equal percentage to fill 100% of the container width.  To easily take
+     * advantage of the full container width, leave the width of at least one column undefined.
+     * Note that if you do not want to take up the full width of the container, the width of
+     * every column needs to be explicitly defined.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Boolean/Object} columnSort
+     * Specify <tt>true</tt> or specify a configuration object for {@link Ext.ListView.Sorter}
+     * to enable the columns to be sortable (defaults to <tt>true</tt>).
+     */
+    columnSort: true,
+    /**
+     * @cfg {String/Array} internalTpl
+     * The template to be used for the header row.  See {@link #tpl} for more details.
+     */
+
+    initComponent : function(){
+        if(this.columnResize){
+            this.colResizer = new Ext.ListView.ColumnResizer(this.colResizer);
+            this.colResizer.init(this);
+        }
+        if(this.columnSort){
+            this.colSorter = new Ext.ListView.Sorter(this.columnSort);
+            this.colSorter.init(this);
+        }
+        if(!this.internalTpl){
+            this.internalTpl = new Ext.XTemplate(
+                '<div class="x-list-header"><div class="x-list-header-inner">',
+                    '<tpl for="columns">',
+                    '<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id, '-xlhd-{#}">',
+                        '{header}',
+                    '</em></div>',
+                    '</tpl>',
+                    '<div class="x-clear"></div>',
+                '</div></div>',
+                '<div class="x-list-body"><div class="x-list-body-inner">',
+                '</div></div>'
+            );
+        }
+        if(!this.tpl){
+            this.tpl = new Ext.XTemplate(
+                '<tpl for="rows">',
+                    '<dl>',
+                        '<tpl for="parent.columns">',
+                        '<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',
+                            '{[values.tpl.apply(parent)]}',
+                        '</em></dt>',
+                        '</tpl>',
+                        '<div class="x-clear"></div>',
+                    '</dl>',
+                '</tpl>'
+            );
+        };
+        var cs = this.columns, allocatedWidth = 0, colsWithWidth = 0, len = cs.length;
+        for(var i = 0; i < len; i++){
+            var c = cs[i];
+            if(!c.tpl){
+                c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}');
+            }else if(Ext.isString(c.tpl)){
+                c.tpl = new Ext.XTemplate(c.tpl);
+            }
+            c.align = c.align || 'left';
+            if(Ext.isNumber(c.width)){
+                c.width *= 100;
+                allocatedWidth += c.width;
+                colsWithWidth++;
+            }
+        }
+        // auto calculate missing column widths
+        if(colsWithWidth < len){
+            var remaining = len - colsWithWidth;
+            if(allocatedWidth < 100){
+                var perCol = ((100-allocatedWidth) / remaining);
+                for(var j = 0; j < len; j++){
+                    var c = cs[j];
+                    if(!Ext.isNumber(c.width)){
+                        c.width = perCol;
+                    }
+                }
+            }
+        }
+        Ext.ListView.superclass.initComponent.call(this);
+    },
+
+    onRender : function(){
+        Ext.ListView.superclass.onRender.apply(this, arguments);
+
+        this.internalTpl.overwrite(this.el, {columns: this.columns});
+        
+        this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild);
+        this.innerHd = Ext.get(this.el.dom.firstChild.firstChild);
+
+        if(this.hideHeaders){
+            this.el.dom.firstChild.style.display = 'none';
+        }
+    },
+
+    getTemplateTarget : function(){
+        return this.innerBody;
+    },
+
+    /**
+     * <p>Function which can be overridden which returns the data object passed to this
+     * view's {@link #tpl template} to render the whole ListView. The returned object 
+     * shall contain the following properties:</p>
+     * <div class="mdetail-params"><ul>
+     * <li><b>columns</b> : String<div class="sub-desc">See <tt>{@link #columns}</tt></div></li>
+     * <li><b>rows</b> : String<div class="sub-desc">See
+     * <tt>{@link Ext.DataView}.{@link Ext.DataView#collectData collectData}</div></li>
+     * </ul></div>
+     * @param {Array} records An Array of {@link Ext.data.Record}s to be rendered into the DataView.
+     * @param {Number} startIndex the index number of the Record being prepared for rendering.
+     * @return {Object} A data object containing properties to be processed by a repeating
+     * XTemplate as described above.
+     */
+    collectData : function(){
+        var rs = Ext.ListView.superclass.collectData.apply(this, arguments);
+        return {
+            columns: this.columns,
+            rows: rs
+        }
+    },
+
+    verifyInternalSize : function(){
+        if(this.lastSize){
+            this.onResize(this.lastSize.width, this.lastSize.height);
+        }
+    },
+
+    // private
+    onResize : function(w, h){
+        var bd = this.innerBody.dom;
+        var hd = this.innerHd.dom
+        if(!bd){
+            return;
+        }
+        var bdp = bd.parentNode;
+        if(Ext.isNumber(w)){
+            var sw = w - this.scrollOffset;
+            if(this.reserveScrollOffset || ((bdp.offsetWidth - bdp.clientWidth) > 10)){
+                bd.style.width = sw + 'px';
+                hd.style.width = sw + 'px';
+            }else{
+                bd.style.width = w + 'px';
+                hd.style.width = w + 'px';
+                setTimeout(function(){
+                    if((bdp.offsetWidth - bdp.clientWidth) > 10){
+                        bd.style.width = sw + 'px';
+                        hd.style.width = sw + 'px';
+                    }
+                }, 10);
+            }
+        }
+        if(Ext.isNumber(h == 'number')){
+            bdp.style.height = (h - hd.parentNode.offsetHeight) + 'px';
+        }
+    },
+
+    updateIndexes : function(){
+        Ext.ListView.superclass.updateIndexes.apply(this, arguments);
+        this.verifyInternalSize();
+    },
+
+    findHeaderIndex : function(hd){
+        hd = hd.dom || hd;
+        var pn = hd.parentNode, cs = pn.parentNode.childNodes;
+        for(var i = 0, c; c = cs[i]; i++){
+            if(c == pn){
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    setHdWidths : function(){
+        var els = this.innerHd.dom.getElementsByTagName('div');
+        for(var i = 0, cs = this.columns, len = cs.length; i < len; i++){
+            els[i].style.width = cs[i].width + '%';
+        }
+    }
+});
+
+Ext.reg('listview', Ext.ListView);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/Sorter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/Sorter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/list/Sorter.js	(revision 625)
@@ -0,0 +1,70 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ListView.Sorter
+ * @extends Ext.util.Observable
+ * <p>Supporting Class for Ext.ListView.</p>
+ * @constructor
+ * @param {Object} config
+ */
+Ext.ListView.Sorter = Ext.extend(Ext.util.Observable, {
+    /**
+     * @cfg {Array} sortClasses
+     * The CSS classes applied to a header when it is sorted. (defaults to <tt>["sort-asc", "sort-desc"]</tt>)
+     */
+    sortClasses : ["sort-asc", "sort-desc"],
+
+    constructor: function(config){
+        Ext.apply(this, config);
+        Ext.ListView.Sorter.superclass.constructor.call(this);
+    },
+
+    init : function(listView){
+        this.view = listView;
+        listView.on('render', this.initEvents, this);
+    },
+
+    initEvents : function(view){
+        view.mon(view.innerHd, 'click', this.onHdClick, this);
+        view.innerHd.setStyle('cursor', 'pointer');
+        view.mon(view.store, 'datachanged', this.updateSortState, this);
+        this.updateSortState.defer(10, this, [view.store]);
+    },
+
+    updateSortState : function(store){
+        var state = store.getSortState();
+        if(!state){
+            return;
+        }
+        this.sortState = state;
+        var cs = this.view.columns, sortColumn = -1;
+        for(var i = 0, len = cs.length; i < len; i++){
+            if(cs[i].dataIndex == state.field){
+                sortColumn = i;
+                break;
+            }
+        }
+        if(sortColumn != -1){
+            var sortDir = state.direction;
+            this.updateSortIcon(sortColumn, sortDir);
+        }
+    },
+
+    updateSortIcon : function(col, dir){
+        var sc = this.sortClasses;
+        var hds = this.view.innerHd.select('em').removeClass(sc);
+        hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]);
+    },
+
+    onHdClick : function(e){
+        var hd = e.getTarget('em', 3);
+        if(hd && !this.view.disableHeaders){
+            var index = this.view.findHeaderIndex(hd);
+            this.view.store.sort(this.view.columns[index].dataIndex);
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/BaseItem.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/BaseItem.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/BaseItem.js	(revision 625)
@@ -0,0 +1,160 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.BaseItem
+ * @extends Ext.Component
+ * The base class for all items that render into menus.  BaseItem provides default rendering, activated state
+ * management and base configuration options shared by all menu components.
+ * @constructor
+ * Creates a new BaseItem
+ * @param {Object} config Configuration options
+ * @xtype menubaseitem
+ */
+Ext.menu.BaseItem = function(config){
+    Ext.menu.BaseItem.superclass.constructor.call(this, config);
+
+    this.addEvents(
+        /**
+         * @event click
+         * Fires when this item is clicked
+         * @param {Ext.menu.BaseItem} this
+         * @param {Ext.EventObject} e
+         */
+        'click',
+        /**
+         * @event activate
+         * Fires when this item is activated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'activate',
+        /**
+         * @event deactivate
+         * Fires when this item is deactivated
+         * @param {Ext.menu.BaseItem} this
+         */
+        'deactivate'
+    );
+
+    if(this.handler){
+        this.on("click", this.handler, this.scope);
+    }
+};
+
+Ext.extend(Ext.menu.BaseItem, Ext.Component, {
+    /**
+     * @property parentMenu
+     * @type Ext.menu.Menu
+     * The parent Menu of this Item.
+     */
+    /**
+     * @cfg {Function} handler
+     * A function that will handle the click event of this menu item (optional).
+     * The handler is passed the following parameters:<div class="mdetail-params"><ul>
+     * <li><code>b</code> : Item<div class="sub-desc">This menu Item.</div></li>
+     * <li><code>e</code> : EventObject<div class="sub-desc">The click event.</div></li>
+     * </ul></div>
+     */
+    /**
+     * @cfg {Object} scope
+     * The scope (<tt><b>this</b></tt> reference) in which the handler function will be called.
+     */
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to false)
+     */
+    canActivate : false,
+    /**
+     * @cfg {String} activeClass The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
+     */
+    activeClass : "x-menu-item-active",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to true)
+     */
+    hideOnClick : true,
+    /**
+     * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100)
+     */
+    clickHideDelay : 1,
+
+    // private
+    ctype : "Ext.menu.BaseItem",
+
+    // private
+    actionMode : "container",
+
+    // private
+    onRender : function(container, position){
+        Ext.menu.BaseItem.superclass.onRender.apply(this, arguments);
+        if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){
+            this.parentMenu = this.ownerCt;
+        }else{
+            this.container.addClass('x-menu-list-item');
+            this.mon(this.el, 'click', this.onClick, this);
+            this.mon(this.el, 'mouseenter', this.activate, this);
+            this.mon(this.el, 'mouseleave', this.deactivate, this);
+        }
+    },
+
+    /**
+     * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler}
+     * config property).  If an existing handler is already registered, it will be unregistered for you.
+     * @param {Function} handler The function that should be called on click
+     * @param {Object} scope The scope that should be passed to the handler
+     */
+    setHandler : function(handler, scope){
+        if(this.handler){
+            this.un("click", this.handler, this.scope);
+        }
+        this.on("click", this.handler = handler, this.scope = scope);
+    },
+
+    // private
+    onClick : function(e){
+        if(!this.disabled && this.fireEvent("click", this, e) !== false
+                && (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){
+            this.handleClick(e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    activate : function(){
+        if(this.disabled){
+            return false;
+        }
+        var li = this.container;
+        li.addClass(this.activeClass);
+        this.region = li.getRegion().adjust(2, 2, -2, -2);
+        this.fireEvent("activate", this);
+        return true;
+    },
+
+    // private
+    deactivate : function(){
+        this.container.removeClass(this.activeClass);
+        this.fireEvent("deactivate", this);
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        return !this.region || !this.region.contains(e.getPoint());
+    },
+
+    // private
+    handleClick : function(e){
+        if(this.hideOnClick){
+            this.parentMenu.hide.defer(this.clickHideDelay, this.parentMenu, [true]);
+        }
+    },
+
+    // private. Do nothing
+    expandMenu : Ext.emptyFn,
+
+    // private. Do nothing
+    hideMenu : Ext.emptyFn
+});
+Ext.reg('menubaseitem', Ext.menu.BaseItem);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/CheckItem.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/CheckItem.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/CheckItem.js	(revision 625)
@@ -0,0 +1,114 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.CheckItem
+ * @extends Ext.menu.Item
+ * Adds a menu item that contains a checkbox by default, but can also be part of a radio group.
+ * @constructor
+ * Creates a new CheckItem
+ * @param {Object} config Configuration options
+ * @xtype menucheckitem
+ */
+Ext.menu.CheckItem = function(config){
+    Ext.menu.CheckItem.superclass.constructor.call(this, config);
+    this.addEvents(
+        /**
+         * @event beforecheckchange
+         * Fires before the checked value is set, providing an opportunity to cancel if needed
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The new checked value that will be set
+         */
+        "beforecheckchange" ,
+        /**
+         * @event checkchange
+         * Fires after the checked value has been set
+         * @param {Ext.menu.CheckItem} this
+         * @param {Boolean} checked The checked value that was set
+         */
+        "checkchange"
+    );
+    /**
+     * A function that handles the checkchange event.  The function is undefined by default, but if an implementation
+     * is provided, it will be called automatically when the checkchange event fires.
+     * @param {Ext.menu.CheckItem} this
+     * @param {Boolean} checked The checked value that was set
+     * @method checkHandler
+     */
+    if(this.checkHandler){
+        this.on('checkchange', this.checkHandler, this.scope);
+    }
+    Ext.menu.MenuMgr.registerCheckable(this);
+};
+Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, {
+    /**
+     * @cfg {String} group
+     * All check items with the same group name will automatically be grouped into a single-select
+     * radio button group (defaults to '')
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item")
+     */
+    itemCls : "x-menu-item x-menu-check-item",
+    /**
+     * @cfg {String} groupClass The default CSS class to use for radio group check items (defaults to "x-menu-group-item")
+     */
+    groupClass : "x-menu-group-item",
+
+    /**
+     * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false).  Note that
+     * if this checkbox is part of a radio group (group = true) only the last item in the group that is
+     * initialized with checked = true will be rendered as checked.
+     */
+    checked: false,
+
+    // private
+    ctype: "Ext.menu.CheckItem",
+
+    // private
+    onRender : function(c){
+        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);
+        }
+    },
+
+    // private
+    destroy : function(){
+        Ext.menu.MenuMgr.unregisterCheckable(this);
+        Ext.menu.CheckItem.superclass.destroy.apply(this, arguments);
+    },
+
+    /**
+     * Set the checked state of this item
+     * @param {Boolean} checked The new checked value
+     * @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false)
+     */
+    setChecked : function(state, suppressEvent){
+        if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){
+            if(this.container){
+                this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked");
+            }
+            this.checked = state;
+            if(suppressEvent !== true){
+                this.fireEvent("checkchange", this, state);
+            }
+        }
+    },
+
+    // private
+    handleClick : function(e){
+       if(!this.disabled && !(this.checked && this.group)){// disable unselect on radio item
+           this.setChecked(!this.checked);
+       }
+       Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments);
+    }
+});
+Ext.reg('menucheckitem', Ext.menu.CheckItem);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/ColorMenu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/ColorMenu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/ColorMenu.js	(revision 625)
@@ -0,0 +1,72 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.ColorMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.ColorPalette} Component.
+ * @xtype colormenu
+ */
+ Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a color is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property palette
+     * @type ColorPalette
+     * The {@link Ext.ColorPalette} instance for this ColorMenu
+     */
+    
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+    
+    initComponent: function(){
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.palette = new Ext.ColorPalette(this.initialConfig)
+        });
+        this.palette.purgeListeners();
+        Ext.menu.ColorMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.palette, ['select']);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this)
+        }
+    },
+
+    menuHide: function(){
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    }
+});
+Ext.reg('colormenu', Ext.menu.ColorMenu);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/DateMenu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/DateMenu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/DateMenu.js	(revision 625)
@@ -0,0 +1,90 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.DateMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.DatePicker} Component.
+ * @xtype datemenu
+ */
+ Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {
+    /** 
+     * @cfg {Boolean} enableScrolling
+     * @hide 
+     */
+    enableScrolling: false,
+    
+    /** 
+     * @cfg {Boolean} hideOnClick
+     * False to continue showing the menu after a date is selected, defaults to true.
+     */
+    hideOnClick: true,
+    
+    /** 
+     * @cfg {Number} maxHeight
+     * @hide 
+     */
+    /** 
+     * @cfg {Number} scrollIncrement
+     * @hide 
+     */
+    /**
+     * @property picker
+     * @type DatePicker
+     * The {@link Ext.DatePicker} instance for this DateMenu
+     */
+    cls: 'x-date-menu',
+    
+    /**
+     * @event click
+     * @hide
+     */
+    
+    /**
+     * @event itemclick
+     * @hide
+     */
+
+    initComponent: function(){
+        this.on('beforeshow', this.onBeforeShow, this);
+        if(this.strict = (Ext.isIE7 && Ext.isStrict)){
+            this.on('show', this.onShow, this, {single: true, delay: 20});
+        }
+        Ext.apply(this, {
+            plain: true,
+            showSeparator: false,
+            items: this.picker = new Ext.DatePicker(Ext.apply({
+                internalRender: this.strict || !Ext.isIE,
+                ctCls: 'x-menu-date-item'
+            }, this.initialConfig))
+        });
+        this.picker.purgeListeners();
+        Ext.menu.DateMenu.superclass.initComponent.call(this);
+        this.relayEvents(this.picker, ["select"]);
+        this.on('select', this.menuHide, this);
+        if(this.handler){
+            this.on('select', this.handler, this.scope || this);
+        }
+    },
+
+    menuHide: function() {
+        if(this.hideOnClick){
+            this.hide(true);
+        }
+    },
+
+    onBeforeShow: function(){
+        if(this.picker){
+            this.picker.hideMonthPicker(true);
+        }
+    },
+
+    onShow: function(){
+        var el = this.picker.getEl();
+        el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode
+    }
+ });
+ Ext.reg('datemenu', Ext.menu.DateMenu);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Item.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Item.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Item.js	(revision 625)
@@ -0,0 +1,211 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.Item
+ * @extends Ext.menu.BaseItem
+ * A base class for all menu items that require menu-related functionality (like sub-menus) and are not static
+ * display items.  Item extends the base functionality of {@link Ext.menu.BaseItem} by adding menu-specific
+ * activation and click handling.
+ * @constructor
+ * Creates a new Item
+ * @param {Object} config Configuration options
+ * @xtype menuitem
+ */
+Ext.menu.Item = function(config){
+    Ext.menu.Item.superclass.constructor.call(this, config);
+    if(this.menu){
+        this.menu = Ext.menu.MenuMgr.get(this.menu);
+    }
+};
+Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, {
+    /**
+     * @property menu
+     * @type Ext.menu.Menu
+     * The submenu associated with this Item if one was configured.
+     */
+    /**
+     * @cfg {Mixed} menu (optional) Either an instance of {@link Ext.menu.Menu} or the config object for an
+     * {@link Ext.menu.Menu} which acts as the submenu when this item is activated.
+     */
+    /**
+     * @cfg {String} icon The path to an icon to display in this item (defaults to Ext.BLANK_IMAGE_URL).  If
+     * icon is specified {@link #iconCls} should not be.
+     */
+    /**
+     * @cfg {String} iconCls A CSS class that specifies a background image that will be used as the icon for
+     * this item (defaults to '').  If iconCls is specified {@link #icon} should not be.
+     */
+    /**
+     * @cfg {String} text The text to display in this item (defaults to '').
+     */
+    /**
+     * @cfg {String} href The href attribute to use for the underlying anchor link (defaults to '#').
+     */
+    /**
+     * @cfg {String} hrefTarget The target attribute to use for the underlying anchor link (defaults to '').
+     */
+    /**
+     * @cfg {String} itemCls The default CSS class to use for menu items (defaults to 'x-menu-item')
+     */
+    itemCls : 'x-menu-item',
+    /**
+     * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to true)
+     */
+    canActivate : true,
+    /**
+     * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200)
+     */
+    showDelay: 200,
+    // doc'd in BaseItem
+    hideDelay: 200,
+
+    // private
+    ctype: 'Ext.menu.Item',
+
+    // private
+    onRender : function(container, position){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
+                '<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"',
+                    '<tpl if="hrefTarget">',
+                        ' target="{hrefTarget}"',
+                    '</tpl>',
+                 '>',
+                     '<img src="{icon}" class="x-menu-item-icon {iconCls}"/>',
+                     '<span class="x-menu-item-text">{text}</span>',
+                 '</a>'
+             );
+        }
+        var a = this.getTemplateArgs();
+        this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true);
+        this.iconEl = this.el.child('img.x-menu-item-icon');
+        this.textEl = this.el.child('.x-menu-item-text');
+        Ext.menu.Item.superclass.onRender.call(this, container, position);
+    },
+
+    getTemplateArgs: function() {
+        return {
+            id: this.id,
+            cls: this.itemCls + (this.menu ?  ' x-menu-item-arrow' : '') + (this.cls ?  ' ' + this.cls : ''),
+            href: this.href || '#',
+            hrefTarget: this.hrefTarget,
+            icon: this.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: this.iconCls || '',
+            text: this.itemText||this.text||'&#160;'
+        };
+    },
+
+    /**
+     * Sets the text to display in this menu item
+     * @param {String} text The text to display
+     */
+    setText : function(text){
+        this.text = text||'&#160;';
+        if(this.rendered){
+            this.textEl.update(this.text);
+            this.parentMenu.layout.doAutoSize();
+        }
+    },
+
+    /**
+     * Sets the CSS class to apply to the item's icon element
+     * @param {String} cls The CSS class to apply
+     */
+    setIconClass : function(cls){
+        var oldCls = this.iconCls;
+        this.iconCls = cls;
+        if(this.rendered){
+            this.iconEl.replaceClass(oldCls, this.iconCls);
+        }
+    },
+    
+    //private
+    beforeDestroy: function(){
+        if (this.menu){
+            this.menu.destroy();
+        }
+        Ext.menu.Item.superclass.beforeDestroy.call(this);
+    },
+
+    // private
+    handleClick : function(e){
+        if(!this.href){ // if no link defined, stop the event automatically
+            e.stopEvent();
+        }
+        Ext.menu.Item.superclass.handleClick.apply(this, arguments);
+    },
+
+    // private
+    activate : function(autoExpand){
+        if(Ext.menu.Item.superclass.activate.apply(this, arguments)){
+            this.focus();
+            if(autoExpand){
+                this.expandMenu();
+            }
+        }
+        return true;
+    },
+
+    // private
+    shouldDeactivate : function(e){
+        if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){
+            if(this.menu && this.menu.isVisible()){
+                return !this.menu.getEl().getRegion().contains(e.getPoint());
+            }
+            return true;
+        }
+        return false;
+    },
+
+    // private
+    deactivate : function(){
+        Ext.menu.Item.superclass.deactivate.apply(this, arguments);
+        this.hideMenu();
+    },
+
+    // private
+    expandMenu : function(autoActivate){
+        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, [autoActivate]);
+            }else if (this.menu.isVisible() && autoActivate){
+                this.menu.tryActivate(0, 1);
+            }
+        }
+    },
+
+    // private
+    deferExpand : function(autoActivate){
+        delete this.showTimer;
+        this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu);
+        if(autoActivate){
+            this.menu.tryActivate(0, 1);
+        }
+    },
+
+    // private
+    hideMenu : function(){
+        clearTimeout(this.showTimer);
+        delete this.showTimer;
+        if(!this.hideTimer && this.menu && this.menu.isVisible()){
+            this.hideTimer = this.deferHide.defer(this.hideDelay, this);
+        }
+    },
+
+    // private
+    deferHide : function(){
+        delete this.hideTimer;
+        if(this.menu.over){
+            this.parentMenu.setActiveItem(this, false);
+        }else{
+            this.menu.hide();
+        }
+    }
+});
+Ext.reg('menuitem', Ext.menu.Item);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Menu.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Menu.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Menu.js	(revision 625)
@@ -0,0 +1,733 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.layout.MenuLayout
+ * @extends Ext.layout.ContainerLayout
+ * <p>Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.</p>
+ */
+ Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, {
+    monitorResize: true,
+
+    setContainer : function(ct){
+        this.monitorResize = !ct.floating;
+        Ext.layout.MenuLayout.superclass.setContainer.call(this, ct);
+    },
+
+    renderItem : function(c, position, target){
+        if (!this.itemTpl) {
+            this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate(
+                '<li id="{itemId}" class="{itemCls}">',
+                    '<tpl if="needsIcon">',
+                        '<img src="{icon}" class="{iconCls}"/>',
+                    '</tpl>',
+                '</li>'
+            );
+        }
+
+        if(c && !c.rendered){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            var a = this.getItemArgs(c);
+
+//          The Component's positionEl is the <li> it is rendered into
+            c.render(c.positionEl = position ?
+                this.itemTpl.insertBefore(position, a, true) :
+                this.itemTpl.append(target, a, true));
+
+//          Link the containing <li> to the item.
+            c.positionEl.menuItemId = c.itemId || c.id;
+
+//          If rendering a regular Component, and it needs an icon,
+//          move the Component rightwards.
+            if (!a.isMenuItem && a.needsIcon) {
+                c.positionEl.addClass('x-menu-list-item-indent');
+            }
+        }else if(c && !this.isValidParent(c, target)){
+            if(Ext.isNumber(position)){
+                position = target.dom.childNodes[position];
+            }
+            target.dom.insertBefore(c.getActionEl().dom, position || null);
+        }
+    },
+
+    getItemArgs: function(c) {
+        var isMenuItem = c instanceof Ext.menu.Item;
+        return {
+            isMenuItem: isMenuItem,
+            needsIcon: !isMenuItem && (c.icon || c.iconCls),
+            icon: c.icon || Ext.BLANK_IMAGE_URL,
+            iconCls: 'x-menu-item-icon ' + (c.iconCls || ''),
+            itemId: 'x-menu-el-' + c.id,
+            itemCls: 'x-menu-list-item ' + (this.extraCls || '')
+        };
+    },
+
+//  Valid if the Component is in a <li> which is part of our target <ul>
+    isValidParent: function(c, target) {
+        return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target);
+    },
+
+    onLayout : function(ct, target){
+        this.renderAll(ct, target);
+        this.doAutoSize();
+    },
+
+    doAutoSize : function(){
+        var ct = this.container, w = ct.width;
+        if(ct.floating){
+            if(w){
+                ct.setWidth(w);
+            }else if(Ext.isIE){
+                ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8) ? 'auto' : ct.minWidth);
+                var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc
+                ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr'));
+            }
+        }
+    }
+});
+Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
+
+/**
+ * @class Ext.menu.Menu
+ * @extends Ext.Container
+ * <p>A menu object.  This is the container to which you may add menu items.  Menu can also serve as a base class
+ * when you want a specialized menu based off of another component (like {@link Ext.menu.DateMenu} for example).</p>
+ * <p>Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Component}s.</p>
+ * <p>To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items}
+ * specify <tt>iconCls: 'no-icon'</tt>.  This reserves a space for an icon, and indents the Component in line
+ * with the other menu items.  See {@link Ext.form.ComboBox}.{@link Ext.form.ComboBox#getListParent getListParent}
+ * for an example.</p>
+ * <p>By default, Menus are absolutely positioned, floating Components. By configuring a Menu with
+ * <b><tt>{@link #floating}:false</tt></b>, a Menu may be used as child of a Container.</p>
+ *
+ * @xtype menu
+ */
+Ext.menu.Menu = Ext.extend(Ext.Container, {
+    /**
+     * @cfg {Object} defaults
+     * A config object that will be applied to all items added to this container either via the {@link #items}
+     * config or via the {@link #add} method.  The defaults config can contain any number of
+     * name/value property pairs to be added to each item, and should be valid for the types of items
+     * being added to the menu.
+     */
+    /**
+     * @cfg {Mixed} items
+     * An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items},
+     * or general {@link Ext.Component Component}s.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120)
+     */
+    minWidth : 120,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides")
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of
+     * this menu (defaults to "tl-tr?")
+     */
+    subMenuAlign : "tl-tr?",
+    /**
+     * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu
+     * relative to its element of origin (defaults to "tl-bl?")
+     */
+    defaultAlign : "tl-bl?",
+    /**
+     * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false)
+     */
+    allowOtherMenus : false,
+    /**
+     * @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays
+     * a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false).
+     */
+    ignoreParentClicks : false,
+    /**
+     * @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true).
+     */
+    enableScrolling: true,
+    /**
+     * @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null).
+     */
+    maxHeight: null,
+    /**
+     * @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24).
+     */
+    scrollIncrement: 24,
+    /**
+     * @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true).
+     */
+    showSeparator: true,
+    /**
+     * @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to
+     * change the default Menu popup position after aligning according to the {@link #defaultAlign}
+     * configuration. Defaults to <tt>[0, 0]</tt>.
+     */
+    defaultOffsets : [0, 0],
+
+
+    /**
+     * @cfg {Boolean} floating
+     * May be specified as false to create a Menu which may be used as a child item of another Container
+     * instead of a free-floating {@link Ext.Layer Layer}. (defaults to true).
+     */
+    floating: true,         // Render as a Layer by default
+
+    // private
+    hidden: true,
+    layout: 'menu',
+    hideMode: 'offsets',    // Important for laying out Components
+    scrollerHeight: 8,
+    autoLayout: true,       // Provided for backwards compat
+    defaultType: 'menuitem',
+
+    initComponent: function(){
+        if(Ext.isArray(this.initialConfig)){
+            Ext.apply(this, {items:this.initialConfig});
+        }
+        this.addEvents(
+            /**
+             * @event click
+             * Fires when this menu is clicked (or when the enter key is pressed while it is active)
+             * @param {Ext.menu.Menu} this
+            * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'click',
+            /**
+             * @event mouseover
+             * Fires when the mouse is hovering over this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseover',
+            /**
+             * @event mouseout
+             * Fires when the mouse exits this menu
+             * @param {Ext.menu.Menu} this
+             * @param {Ext.EventObject} e
+             * @param {Ext.menu.Item} menuItem The menu item that was clicked
+             */
+            'mouseout',
+            /**
+             * @event itemclick
+             * Fires when a menu item contained in this menu is clicked
+             * @param {Ext.menu.BaseItem} baseItem The BaseItem that was clicked
+             * @param {Ext.EventObject} e
+             */
+            'itemclick'
+        );
+        Ext.menu.MenuMgr.register(this);
+        if(this.floating){
+            Ext.EventManager.onWindowResize(this.hide, this);
+        }else{
+            if(this.initialConfig.hidden !== false){
+                this.hidden = false;
+            }
+            this.internalDefaults = {hideOnClick: false};
+        }
+        Ext.menu.Menu.superclass.initComponent.call(this);
+        if(this.autoLayout){
+            this.on({
+                add: this.doLayout,
+                remove: this.doLayout,
+                scope: this
+            });
+        }
+    },
+
+    //private
+    getLayoutTarget : function() {
+        return this.ul;
+    },
+
+    // private
+    onRender : function(ct, position){
+        if(!ct){
+            ct = Ext.getBody();
+        }
+
+        var dh = {
+            id: this.getId(),
+            cls: 'x-menu ' + ((this.floating) ? 'x-menu-floating x-layer ' : '') + (this.cls || '') + (this.plain ? ' x-menu-plain' : '') + (this.showSeparator ? '' : ' x-menu-nosep'),
+            style: this.style,
+            cn: [
+                {tag: 'a', cls: 'x-menu-focus', href: '#', onclick: 'return false;', tabIndex: '-1'},
+                {tag: 'ul', cls: 'x-menu-list'}
+            ]
+        };
+        if(this.floating){
+            this.el = new Ext.Layer({
+                shadow: this.shadow,
+                dh: dh,
+                constrain: false,
+                parentEl: ct,
+                zindex:15000
+            });
+        }else{
+            this.el = ct.createChild(dh);
+        }
+        Ext.menu.Menu.superclass.onRender.call(this, ct, position);
+
+        if(!this.keyNav){
+            this.keyNav = new Ext.menu.MenuNav(this);
+        }
+        // generic focus element
+        this.focusEl = this.el.child('a.x-menu-focus');
+        this.ul = this.el.child('ul.x-menu-list');
+        this.mon(this.ul, {
+            scope: this,
+            click: this.onClick,
+            mouseover: this.onMouseOver,
+            mouseout: this.onMouseOut
+        });
+        if(this.enableScrolling){
+            this.mon(this.el, {
+                scope: this,
+                delegate: '.x-menu-scroller',
+                click: this.onScroll,
+                mouseover: this.deactivateActive
+            });
+        }
+    },
+
+    // private
+    findTargetItem : function(e){
+        var t = e.getTarget(".x-menu-list-item", this.ul, true);
+        if(t && t.menuItemId){
+            return this.items.get(t.menuItemId);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.isFormField){
+                this.setActiveItem(t);
+            }else{
+                if(t.menu && this.ignoreParentClicks){
+                    t.expandMenu();
+                    e.preventDefault();
+                }else if(t.onClick){
+                    t.onClick(e);
+                    this.fireEvent("click", this, t, e);
+                }
+            }
+        }
+    },
+
+    // private
+    setActiveItem : function(item, autoExpand){
+        if(item != this.activeItem){
+            this.deactivateActive();
+            if((this.activeItem = item).isFormField){
+                item.focus();
+            }else{
+                item.activate(autoExpand);
+            }
+        }else if(autoExpand){
+            item.expandMenu();
+        }
+    },
+
+    deactivateActive: function(){
+        var a = this.activeItem;
+        if(a){
+            if(a.isFormField){
+                //Fields cannot deactivate, but Combos must collapse
+                if(a.collapse){
+                    a.collapse();
+                }
+            }else{
+                a.deactivate();
+            }
+            delete this.activeItem;
+        }
+    },
+
+    // private
+    tryActivate : function(start, step){
+        var items = this.items;
+        for(var i = start, len = items.length; i >= 0 && i < len; i+= step){
+            var item = items.get(i);
+            if(!item.disabled && (item.canActivate || item.isFormField)){
+                this.setActiveItem(item, false);
+                return item;
+            }
+        }
+        return false;
+    },
+
+    // private
+    onMouseOver : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t.canActivate && !t.disabled){
+                this.setActiveItem(t, true);
+            }
+        }
+        this.over = true;
+        this.fireEvent("mouseover", this, e, t);
+    },
+
+    // private
+    onMouseOut : function(e){
+        var t = this.findTargetItem(e);
+        if(t){
+            if(t == this.activeItem && t.shouldDeactivate && t.shouldDeactivate(e)){
+                this.activeItem.deactivate();
+                delete this.activeItem;
+            }
+        }
+        this.over = false;
+        this.fireEvent("mouseout", this, e, t);
+    },
+
+    // private
+    onScroll: function(e, t){
+        if(e){
+            e.stopEvent();
+        }
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        ul.scrollTop += this.scrollIncrement * (top ? -1 : 1);
+        if(top ? ul.scrollTop <= 0 : ul.scrollTop + this.activeMax >= ul.scrollHeight){
+           this.onScrollerOut(null, t);
+        }
+    },
+
+    // private
+    onScrollerIn: function(e, t){
+        var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
+        if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){
+            Ext.fly(t).addClass(['x-menu-item-active', 'x-menu-scroller-active']);
+        }
+    },
+
+    // private
+    onScrollerOut: function(e, t){
+        Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']);
+    },
+
+    /**
+     * Displays this menu relative to another element
+     * @param {Mixed} element The element to align to
+     * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to
+     * the element (defaults to this.defaultAlign)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    show : function(el, pos, parentMenu){
+        if(this.floating){
+            this.parentMenu = parentMenu;
+            if(!this.el){
+                this.render();
+                this.doLayout(false, true);
+            }
+            if(this.fireEvent('beforeshow', this) !== false){
+                this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign, this.defaultOffsets), parentMenu, false);
+            }
+        }else{
+            Ext.menu.Menu.superclass.show.call(this);
+        }
+    },
+
+    /**
+     * Displays this menu at a specific xy position
+     * @param {Array} xyPosition Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)
+     * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
+     */
+    showAt : function(xy, parentMenu, /* private: */_e){
+        this.parentMenu = parentMenu;
+        if(!this.el){
+            this.render();
+        }
+        this.el.setXY(xy);
+        if(this.enableScrolling){
+            this.constrainScroll(xy[1]);
+        }
+        this.el.show();
+        Ext.menu.Menu.superclass.onShow.call(this);
+        if(Ext.isIE){
+            this.layout.doAutoSize();
+            if(!Ext.isIE8){
+                this.el.repaint();
+            }
+        }
+        this.hidden = false;
+        this.focus();
+        this.fireEvent("show", this);
+    },
+
+    constrainScroll: function(y){
+        var max, full = this.ul.setHeight('auto').getHeight();
+        if(this.floating){
+            max = this.maxHeight ? this.maxHeight : Ext.fly(this.el.dom.parentNode).getViewSize().height - y;
+        }else{
+            max = this.getHeight();
+        }
+        if(full > max && max > 0){
+            this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0);
+            this.ul.setHeight(this.activeMax);
+            this.createScrollers();
+            this.el.select('.x-menu-scroller').setDisplayed('');
+        }else{
+            this.ul.setHeight(full);
+            this.el.select('.x-menu-scroller').setDisplayed('none');
+        }
+        this.ul.dom.scrollTop = 0;
+    },
+
+    createScrollers: function(){
+        if(!this.scroller){
+            this.scroller = {
+                pos: 0,
+                top: this.el.insertFirst({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-top',
+                    html: '&#160;'
+                }),
+                bottom: this.el.createChild({
+                    tag: 'div',
+                    cls: 'x-menu-scroller x-menu-scroller-bottom',
+                    html: '&#160;'
+                })
+            };
+            this.scroller.top.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.topRepeater = new Ext.util.ClickRepeater(this.scroller.top, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.top], false)
+                }
+            });
+            this.scroller.bottom.hover(this.onScrollerIn, this.onScrollerOut, this);
+            this.scroller.bottomRepeater = new Ext.util.ClickRepeater(this.scroller.bottom, {
+                listeners: {
+                    click: this.onScroll.createDelegate(this, [null, this.scroller.bottom], false)
+                }
+            });
+        }
+    },
+
+    onLayout: function(){
+        if(this.isVisible()){
+            if(this.enableScrolling){
+                this.constrainScroll(this.el.getTop());
+            }
+            if(this.floating){
+                this.el.sync();
+            }
+        }
+    },
+
+    focus : function(){
+        if(!this.hidden){
+            this.doFocus.defer(50, this);
+        }
+    },
+
+    doFocus : function(){
+        if(!this.hidden){
+            this.focusEl.focus();
+        }
+    },
+
+    /**
+     * Hides this menu and optionally all parent menus
+     * @param {Boolean} deep (optional) True to hide all parent menus recursively, if any (defaults to false)
+     */
+    hide : function(deep){
+        this.deepHide = deep;
+        Ext.menu.Menu.superclass.hide.call(this);
+        delete this.deepHide;
+    },
+
+    // private
+    onHide: function(){
+        Ext.menu.Menu.superclass.onHide.call(this);
+        this.deactivateActive();
+        if(this.el && this.floating){
+            this.el.hide();
+        }
+        if(this.deepHide === true && this.parentMenu){
+            this.parentMenu.hide(true);
+        }
+    },
+
+    // private
+    lookupComponent: function(c){
+         if(Ext.isString(c)){
+            c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c);
+             this.applyDefaults(c);
+         }else{
+            if(Ext.isObject(c)){
+                c = this.getMenuItem(c);
+            }else if(c.tagName || c.el){ // element. Wrap it.
+                c = new Ext.BoxComponent({
+                    el: c
+                });
+            }
+         }
+         return c;
+    },
+
+    applyDefaults : function(c){
+        if(!Ext.isString(c)){
+            c = Ext.menu.Menu.superclass.applyDefaults.call(this, c);
+            var d = this.internalDefaults;
+            if(d){
+                if(c.events){
+                    Ext.applyIf(c.initialConfig, d);
+                    Ext.apply(c, d);
+                }else{
+                    Ext.applyIf(c, d);
+                }
+            }
+        }
+        return c;
+    },
+
+    // private
+    getMenuItem: function(config){
+       if(!config.isXType){
+            if(!config.xtype && Ext.isBoolean(config.checked)){
+                return new Ext.menu.CheckItem(config)
+            }
+            return Ext.create(config, this.defaultType);
+        }
+        return config;
+    },
+
+    /**
+     * Adds a separator bar to the menu
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addSeparator : function(){
+        return this.add(new Ext.menu.Separator());
+    },
+
+    /**
+     * Adds an {@link Ext.Element} object to the menu
+     * @param {Mixed} el The element or DOM node to add, or its id
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addElement : function(el){
+        return this.add(new Ext.menu.BaseItem(el));
+    },
+
+    /**
+     * Adds an existing object based on {@link Ext.menu.BaseItem} to the menu
+     * @param {Ext.menu.Item} item The menu item to add
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addItem : function(item){
+        return this.add(item);
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.Item} based an the supplied config object and adds it to the menu
+     * @param {Object} config A MenuItem config object
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addMenuItem : function(config){
+        return this.add(this.getMenuItem(config));
+    },
+
+    /**
+     * Creates a new {@link Ext.menu.TextItem} with the supplied text and adds it to the menu
+     * @param {String} text The text to display in the menu item
+     * @return {Ext.menu.Item} The menu item that was added
+     */
+    addText : function(text){
+        return this.add(new Ext.menu.TextItem(text));
+    },
+
+    //private
+    onDestroy : function(){
+        Ext.menu.Menu.superclass.onDestroy.call(this);
+        Ext.menu.MenuMgr.unregister(this);
+        Ext.EventManager.removeResizeListener(this.hide, this);
+        if(this.keyNav) {
+            this.keyNav.disable();
+        }
+        var s = this.scroller;
+        if(s){
+            Ext.destroy(s.topRepeater, s.bottomRepeater, s.top, s.bottom);
+        }
+    }
+});
+
+Ext.reg('menu', Ext.menu.Menu);
+
+// MenuNav is a private utility class used internally by the Menu
+Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){
+    function up(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){
+            m.tryActivate(m.items.length-1, -1);
+        }
+    }
+    function down(e, m){
+        if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){
+            m.tryActivate(0, 1);
+        }
+    }
+    return {
+        constructor: function(menu){
+            Ext.menu.MenuNav.superclass.constructor.call(this, menu.el);
+            this.scope = this.menu = menu;
+        },
+
+        doRelay : function(e, h){
+            var k = e.getKey();
+//          Keystrokes within a form Field (e.g.: down in a Combo) do not navigate. Allow only TAB
+            if (this.menu.activeItem && this.menu.activeItem.isFormField && k != e.TAB) {
+                return false;
+            }
+            if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){
+                this.menu.tryActivate(0, 1);
+                return false;
+            }
+            return h.call(this.scope || this, e, this.menu);
+        },
+
+        tab: function(e, m) {
+            e.stopEvent();
+            if (e.shiftKey) {
+                up(e, m);
+            } else {
+                down(e, m);
+            }
+        },
+
+        up : up,
+
+        down : down,
+
+        right : function(e, m){
+            if(m.activeItem){
+                m.activeItem.expandMenu(true);
+            }
+        },
+
+        left : function(e, m){
+            m.hide();
+            if(m.parentMenu && m.parentMenu.activeItem){
+                m.parentMenu.activeItem.activate();
+            }
+        },
+
+        enter : function(e, m){
+            if(m.activeItem){
+                e.stopPropagation();
+                m.activeItem.onClick(e);
+                m.fireEvent("click", this, m.activeItem);
+                return true;
+            }
+        }
+    };
+}());
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/MenuMgr.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/MenuMgr.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/MenuMgr.js	(revision 625)
@@ -0,0 +1,211 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.MenuMgr
+ * Provides a common registry of all menu items on a page so that they can be easily accessed by id.
+ * @singleton
+ */
+Ext.menu.MenuMgr = function(){
+   var menus, active, groups = {}, attached = false, lastShow = new Date();
+
+   // private - called when first menu is created
+   function init(){
+       menus = {};
+       active = new Ext.util.MixedCollection();
+       Ext.getDoc().addKeyListener(27, function(){
+           if(active.length > 0){
+               hideAll();
+           }
+       });
+   }
+
+   // private
+   function hideAll(){
+       if(active && active.length > 0){
+           var c = active.clone();
+           c.each(function(m){
+               m.hide();
+           });
+       }
+   }
+
+   // private
+   function onHide(m){
+       active.remove(m);
+       if(active.length < 1){
+           Ext.getDoc().un("mousedown", onMouseDown);
+           attached = false;
+       }
+   }
+
+   // private
+   function onShow(m){
+       var last = active.last();
+       lastShow = new Date();
+       active.add(m);
+       if(!attached){
+           Ext.getDoc().on("mousedown", onMouseDown);
+           attached = true;
+       }
+       if(m.parentMenu){
+          m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3);
+          m.parentMenu.activeChild = m;
+       }else if(last && last.isVisible()){
+          m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3);
+       }
+   }
+
+   // private
+   function onBeforeHide(m){
+       if(m.activeChild){
+           m.activeChild.hide();
+       }
+       if(m.autoHideTimer){
+           clearTimeout(m.autoHideTimer);
+           delete m.autoHideTimer;
+       }
+   }
+
+   // private
+   function onBeforeShow(m){
+       var pm = m.parentMenu;
+       if(!pm && !m.allowOtherMenus){
+           hideAll();
+       }else if(pm && pm.activeChild){
+           pm.activeChild.hide();
+       }
+   }
+
+   // private
+   function onMouseDown(e){
+       if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
+           hideAll();
+       }
+   }
+
+   // private
+   function onBeforeCheck(mi, state){
+       if(state){
+           var g = groups[mi.group];
+           for(var i = 0, l = g.length; i < l; i++){
+               if(g[i] != mi){
+                   g[i].setChecked(false);
+               }
+           }
+       }
+   }
+
+   return {
+
+       /**
+        * Hides all menus that are currently visible
+        */
+       hideAll : function(){
+            hideAll();  
+       },
+
+       // private
+       register : function(menu){
+           if(!menus){
+               init();
+           }
+           menus[menu.id] = menu;
+           menu.on("beforehide", onBeforeHide);
+           menu.on("hide", onHide);
+           menu.on("beforeshow", onBeforeShow);
+           menu.on("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menu);
+               menu.on("checkchange", onCheck);
+           }
+       },
+
+        /**
+         * Returns a {@link Ext.menu.Menu} object
+         * @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will
+         * be used to generate and return a new Menu instance.
+         * @return {Ext.menu.Menu} The specified menu, or null if none are found
+         */
+       get : function(menu){
+           if(typeof menu == "string"){ // menu id
+               if(!menus){  // not initialized, no menus to return
+                   return null;
+               }
+               return menus[menu];
+           }else if(menu.events){  // menu instance
+               return menu;
+           }else if(typeof menu.length == 'number'){ // array of menu items?
+               return new Ext.menu.Menu({items:menu});
+           }else{ // otherwise, must be a config
+               return Ext.create(menu, 'menu');
+           }
+       },
+
+       // private
+       unregister : function(menu){
+           delete menus[menu.id];
+           menu.un("beforehide", onBeforeHide);
+           menu.un("hide", onHide);
+           menu.un("beforeshow", onBeforeShow);
+           menu.un("show", onShow);
+           var g = menu.group;
+           if(g && menu.events["checkchange"]){
+               groups[g].remove(menu);
+               menu.un("checkchange", onCheck);
+           }
+       },
+
+       // private
+       registerCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               if(!groups[g]){
+                   groups[g] = [];
+               }
+               groups[g].push(menuItem);
+               menuItem.on("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       // private
+       unregisterCheckable : function(menuItem){
+           var g = menuItem.group;
+           if(g){
+               groups[g].remove(menuItem);
+               menuItem.un("beforecheckchange", onBeforeCheck);
+           }
+       },
+
+       getCheckedItem : function(groupId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].checked){
+                       return g[i];
+                   }
+               }
+           }
+           return null;
+       },
+
+       setCheckedItem : function(groupId, itemId){
+           var g = groups[groupId];
+           if(g){
+               for(var i = 0, l = g.length; i < l; i++){
+                   if(g[i].id == itemId){
+                       g[i].setChecked(true);
+                   }
+               }
+           }
+           return null;
+       }
+   };
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Separator.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Separator.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/Separator.js	(revision 625)
@@ -0,0 +1,46 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.Separator
+ * @extends Ext.menu.BaseItem
+ * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
+ * add one of these by using "-" in you call to add() or in your items config rather than creating one directly.
+ * @constructor
+ * @param {Object} config Configuration options
+ * @xtype menuseparator
+ */
+Ext.menu.Separator = function(config){
+    Ext.menu.Separator.superclass.constructor.call(this, config);
+};
+
+Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep")
+     */
+    itemCls : "x-menu-sep",
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    
+    /** 
+     * @cfg {String} activeClass
+     * @hide 
+     */
+    activeClass: '',
+
+    // private
+    onRender : function(li){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = "&#160;";
+        this.el = s;
+        li.addClass("x-menu-sep-li");
+        Ext.menu.Separator.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menuseparator', Ext.menu.Separator);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/TextItem.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/TextItem.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/menu/TextItem.js	(revision 625)
@@ -0,0 +1,46 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.menu.TextItem
+ * @extends Ext.menu.BaseItem
+ * Adds a static text string to a menu, usually used as either a heading or group separator.
+ * @constructor
+ * Creates a new TextItem
+ * @param {Object/String} config If config is a string, it is used as the text to display, otherwise it
+ * is applied as a config object (and should contain a <tt>text</tt> property).
+ * @xtype menutextitem
+ */
+Ext.menu.TextItem = function(cfg){
+    if(typeof cfg == 'string'){
+        cfg = {text: cfg}
+    }
+    Ext.menu.TextItem.superclass.constructor.call(this, cfg);
+};
+
+Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, {
+    /**
+     * @cfg {String} text The text to display for this item (defaults to '')
+     */
+    /**
+     * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
+     */
+    hideOnClick : false,
+    /**
+     * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text")
+     */
+    itemCls : "x-menu-text",
+
+    // private
+    onRender : function(){
+        var s = document.createElement("span");
+        s.className = this.itemCls;
+        s.innerHTML = this.text;
+        this.el = s;
+        Ext.menu.TextItem.superclass.onRender.apply(this, arguments);
+    }
+});
+Ext.reg('menutextitem', Ext.menu.TextItem);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTip.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTip.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTip.js	(revision 625)
@@ -0,0 +1,207 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.QuickTip
+ * @extends Ext.ToolTip
+ * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global
+ * {@link Ext.QuickTips} instance.  See the QuickTips class header for additional usage details and examples.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.QuickTip = Ext.extend(Ext.ToolTip, {
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document).
+     */
+    /**
+     * @cfg {Boolean} interceptTitles True to automatically use the element's DOM title value if available (defaults to false).
+     */
+    interceptTitles : false,
+
+    // private
+    tagConfig : {
+        namespace : "ext",
+        attribute : "qtip",
+        width : "qwidth",
+        target : "target",
+        title : "qtitle",
+        hide : "hide",
+        cls : "qclass",
+        align : "qalign",
+        anchor : "anchor"
+    },
+
+    // private
+    initComponent : function(){
+        this.target = this.target || Ext.getDoc();
+        this.targets = this.targets || {};
+        Ext.QuickTip.superclass.initComponent.call(this);
+    },
+
+    /**
+     * Configures a new quick tip instance and assigns it to a target element.  The following config values are
+     * supported (for example usage, see the {@link Ext.QuickTips} class header):
+     * <div class="mdetail-params"><ul>
+     * <li>autoHide</li>
+     * <li>cls</li>
+     * <li>dismissDelay (overrides the singleton value)</li>
+     * <li>target (required)</li>
+     * <li>text (required)</li>
+     * <li>title</li>
+     * <li>width</li></ul></div>
+     * @param {Object} config The config object
+     */
+    register : function(config){
+        var cs = Ext.isArray(config) ? config : arguments;
+        for(var i = 0, len = cs.length; i < len; i++){
+            var c = cs[i];
+            var target = c.target;
+            if(target){
+                if(Ext.isArray(target)){
+                    for(var j = 0, jlen = target.length; j < jlen; j++){
+                        this.targets[Ext.id(target[j])] = c;
+                    }
+                } else{
+                    this.targets[Ext.id(target)] = c;
+                }
+            }
+        }
+    },
+
+    /**
+     * Removes this quick tip from its element and destroys it.
+     * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+     */
+    unregister : function(el){
+        delete this.targets[Ext.id(el)];
+    },
+    
+    /**
+     * Hides a visible tip or cancels an impending show for a particular element.
+     * @param {String/HTMLElement/Element} el The element that is the target of the tip.
+     */
+    cancelShow: function(el){
+        var at = this.activeTarget;
+        el = Ext.get(el).dom;
+        if(this.isVisible()){
+            if(at && at.el == el){
+                this.hide();
+            }
+        }else if(at && at.el == el){
+            this.clearTimer('show');
+        }
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled){
+            return;
+        }
+        this.targetXY = e.getXY();
+        var t = e.getTarget();
+        if(!t || t.nodeType !== 1 || t == document || t == document.body){
+            return;
+        }
+        if(this.activeTarget && t == this.activeTarget.el){
+            this.clearTimer('hide');
+            this.show();
+            return;
+        }
+        if(t && this.targets[t.id]){
+            this.activeTarget = this.targets[t.id];
+            this.activeTarget.el = t;
+            this.anchor = this.activeTarget.anchor;
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+            return;
+        }
+        
+        var ttp, et = Ext.fly(t), cfg = this.tagConfig;
+        var ns = cfg.namespace;
+        if(this.interceptTitles && t.title){
+            ttp = t.title;
+            t.qtip = ttp;
+            t.removeAttribute("title");
+            e.preventDefault();
+        } else{
+            ttp = t.qtip || et.getAttribute(cfg.attribute, ns);
+        }
+        if(ttp){
+            var autoHide = et.getAttribute(cfg.hide, ns);
+            this.activeTarget = {
+                el: t,
+                text: ttp,
+                width: et.getAttribute(cfg.width, ns),
+                autoHide: autoHide != "user" && autoHide !== 'false',
+                title: et.getAttribute(cfg.title, ns),
+                cls: et.getAttribute(cfg.cls, ns),
+                align: et.getAttribute(cfg.align, ns)
+                
+            };
+            this.anchor = et.getAttribute(cfg.anchor, ns);
+            if(this.anchor){
+                this.anchorTarget = t;
+            }
+            this.delayShow();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        var t = this.activeTarget;
+        if(t){
+            if(!this.rendered){
+                this.render(Ext.getBody());
+                this.activeTarget = t;
+            }
+            if(t.width){
+                this.setWidth(t.width);
+                this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth()));
+                this.measureWidth = false;
+            } else{
+                this.measureWidth = true;
+            }
+            this.setTitle(t.title || '');
+            this.body.update(t.text);
+            this.autoHide = t.autoHide;
+            this.dismissDelay = t.dismissDelay || this.dismissDelay;
+            if(this.lastCls){
+                this.el.removeClass(this.lastCls);
+                delete this.lastCls;
+            }
+            if(t.cls){
+                this.el.addClass(t.cls);
+                this.lastCls = t.cls;
+            }
+            if(this.anchor){
+                this.constrainPosition = false;
+            }else if(t.align){ // TODO: this doesn't seem to work consistently
+                xy = this.el.getAlignToXY(t.el, t.align);
+                this.constrainPosition = false;
+            }else{
+                this.constrainPosition = true;
+            }
+        }
+        Ext.QuickTip.superclass.showAt.call(this, xy);
+    },
+
+    // inherit docs
+    hide: function(){
+        delete this.activeTarget;
+        Ext.QuickTip.superclass.hide.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTips.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTips.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/QuickTips.js	(revision 625)
@@ -0,0 +1,159 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.QuickTips
+ * <p>Provides attractive and customizable tooltips for any element. The QuickTips
+ * singleton is used to configure and manage tooltips globally for multiple elements
+ * in a generic manner.  To create individual tooltips with maximum customizability,
+ * you should consider either {@link Ext.Tip} or {@link Ext.ToolTip}.</p>
+ * <p>Quicktips can be configured via tag attributes directly in markup, or by
+ * registering quick tips programmatically via the {@link #register} method.</p>
+ * <p>The singleton's instance of {@link Ext.QuickTip} is available via
+ * {@link #getQuickTip}, and supports all the methods, and all the all the
+ * configuration properties of Ext.QuickTip. These settings will apply to all
+ * tooltips shown by the singleton.</p>
+ * <p>Below is the summary of the configuration properties which can be used.
+ * For detailed descriptions see {@link #getQuickTip}</p>
+ * <p><b>QuickTips singleton configs (all are optional)</b></p>
+ * <div class="mdetail-params"><ul><li>dismissDelay</li>
+ * <li>hideDelay</li>
+ * <li>maxWidth</li>
+ * <li>minWidth</li>
+ * <li>showDelay</li>
+ * <li>trackMouse</li></ul></div>
+ * <p><b>Target element configs (optional unless otherwise noted)</b></p>
+ * <div class="mdetail-params"><ul><li>autoHide</li>
+ * <li>cls</li>
+ * <li>dismissDelay (overrides singleton value)</li>
+ * <li>target (required)</li>
+ * <li>text (required)</li>
+ * <li>title</li>
+ * <li>width</li></ul></div>
+ * <p>Here is an example showing how some of these config options could be used:</p>
+ * <pre><code>
+// Init the singleton.  Any tag-based quick tips will start working.
+Ext.QuickTips.init();
+
+// Apply a set of config properties to the singleton
+Ext.apply(Ext.QuickTips.getQuickTip(), {
+    maxWidth: 200,
+    minWidth: 100,
+    showDelay: 50,
+    trackMouse: true
+});
+
+// Manually register a quick tip for a specific element
+Ext.QuickTips.register({
+    target: 'my-div',
+    title: 'My Tooltip',
+    text: 'This tooltip was added in code',
+    width: 100,
+    dismissDelay: 20
+});
+</code></pre>
+ * <p>To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with
+ * the <b>ext:</b> namespace.  The HTML element itself is automatically set as the quick tip target. Here is the summary
+ * of supported attributes (optional unless otherwise noted):</p>
+ * <ul><li><b>hide</b>: Specifying "user" is equivalent to setting autoHide = false.  Any other value will be the
+ * same as autoHide = true.</li>
+ * <li><b>qclass</b>: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).</li>
+ * <li><b>qtip (required)</b>: The quick tip text (equivalent to the 'text' target element config).</li>
+ * <li><b>qtitle</b>: The quick tip title (equivalent to the 'title' target element config).</li>
+ * <li><b>qwidth</b>: The quick tip width (equivalent to the 'width' target element config).</li></ul>
+ * <p>Here is an example of configuring an HTML element to display a tooltip from markup:</p>
+ * <pre><code>
+// Add a quick tip to an HTML button
+&lt;input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
+     ext:qtip="This is a quick tip from markup!">&lt;/input>
+</code></pre>
+ * @singleton
+ */
+Ext.QuickTips = function(){
+    var tip, locks = [];
+    return {
+        /**
+         * Initialize the global QuickTips instance and prepare any quick tips.
+         * @param {Boolean} autoRender True to render the QuickTips container immediately to preload images. (Defaults to true) 
+         */
+        init : function(autoRender){
+            if(!tip){
+                if(!Ext.isReady){
+                    Ext.onReady(function(){
+                        Ext.QuickTips.init(autoRender);
+                    });
+                    return;
+                }
+                tip = new Ext.QuickTip({elements:'header,body'});
+                if(autoRender !== false){
+                    tip.render(Ext.getBody());
+                }
+            }
+        },
+
+        /**
+         * Enable quick tips globally.
+         */
+        enable : function(){
+            if(tip){
+                locks.pop();
+                if(locks.length < 1){
+                    tip.enable();
+                }
+            }
+        },
+
+        /**
+         * Disable quick tips globally.
+         */
+        disable : function(){
+            if(tip){
+                tip.disable();
+            }
+            locks.push(1);
+        },
+
+        /**
+         * Returns true if quick tips are enabled, else false.
+         * @return {Boolean}
+         */
+        isEnabled : function(){
+            return tip !== undefined && !tip.disabled;
+        },
+
+        /**
+         * Gets the global QuickTips instance.
+         */
+        getQuickTip : function(){
+            return tip;
+        },
+
+        /**
+         * Configures a new quick tip instance and assigns it to a target element.  See
+         * {@link Ext.QuickTip#register} for details.
+         * @param {Object} config The config object
+         */
+        register : function(){
+            tip.register.apply(tip, arguments);
+        },
+
+        /**
+         * Removes any registered quick tip from the target element and destroys it.
+         * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed.
+         */
+        unregister : function(){
+            tip.unregister.apply(tip, arguments);
+        },
+
+        /**
+         * Alias of {@link #register}.
+         * @param {Object} config The config object
+         */
+        tips :function(){
+            tip.register.apply(tip, arguments);
+        }
+    }
+}();
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/Tip.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/Tip.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/Tip.js	(revision 625)
@@ -0,0 +1,157 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.Tip
+ * @extends Ext.Panel
+ * This is the base class for {@link Ext.QuickTip} and {@link Ext.Tooltip} that provides the basic layout and
+ * positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned
+ * tips that are displayed programmatically, or it can be extended to provide custom tip implementations.
+ * @constructor
+ * Create a new Tip
+ * @param {Object} config The configuration options
+ */
+Ext.Tip = Ext.extend(Ext.Panel, {
+    /**
+     * @cfg {Boolean} closable True to render a close tool button into the tooltip header (defaults to false).
+     */
+    /**
+     * @cfg {Number} width
+     * Width in pixels of the tip (defaults to auto).  Width will be ignored if it exceeds the bounds of
+     * {@link #minWidth} or {@link #maxWidth}.  The maximum supported value is 500.
+     */
+    /**
+     * @cfg {Number} minWidth The minimum width of the tip in pixels (defaults to 40).
+     */
+    minWidth : 40,
+    /**
+     * @cfg {Number} maxWidth The maximum width of the tip in pixels (defaults to 300).  The maximum supported value is 500.
+     */
+    maxWidth : 300,
+    /**
+     * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop"
+     * for bottom-right shadow (defaults to "sides").
+     */
+    shadow : "sides",
+    /**
+     * @cfg {String} defaultAlign <b>Experimental</b>. The default {@link Ext.Element#alignTo} anchor position value
+     * for this tip relative to its element of origin (defaults to "tl-bl?").
+     */
+    defaultAlign : "tl-bl?",
+    autoRender: true,
+    quickShowInterval : 250,
+
+    // private panel overrides
+    frame:true,
+    hidden:true,
+    baseCls: 'x-tip',
+    floating:{shadow:true,shim:true,useDisplay:true,constrain:false},
+    autoHeight:true,
+
+    closeAction: 'hide',
+
+    // private
+    initComponent : function(){
+        Ext.Tip.superclass.initComponent.call(this);
+        if(this.closable && !this.title){
+            this.elements += ',header';
+        }
+    },
+
+    // private
+    afterRender : function(){
+        Ext.Tip.superclass.afterRender.call(this);
+        if(this.closable){
+            this.addTool({
+                id: 'close',
+                handler: this[this.closeAction],
+                scope: this
+            });
+        }
+    },
+
+    /**
+     * Shows this tip at the specified XY position.  Example usage:
+     * <pre><code>
+// Show the tip at x:50 and y:100
+tip.showAt([50,100]);
+</code></pre>
+     * @param {Array} xy An array containing the x and y coordinates
+     */
+    showAt : function(xy){
+        Ext.Tip.superclass.show.call(this);
+        if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){
+            this.doAutoWidth();
+        }
+        if(this.constrainPosition){
+            xy = this.el.adjustForConstraints(xy);
+        }
+        this.setPagePosition(xy[0], xy[1]);
+    },
+
+    // protected
+    doAutoWidth : function(){
+        var bw = this.body.getTextWidth();
+        if(this.title){
+            bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));
+        }
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");
+        this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
+        
+        // IE7 repaint bug on initial show
+        if(Ext.isIE7 && !this.repainted){
+            this.el.repaint();
+            this.repainted = true;
+        }
+    },
+
+    /**
+     * <b>Experimental</b>. Shows this tip at a position relative to another element using a standard {@link Ext.Element#alignTo}
+     * anchor position value.  Example usage:
+     * <pre><code>
+// Show the tip at the default position ('tl-br?')
+tip.showBy('my-el');
+
+// Show the tip's top-left corner anchored to the element's top-right corner
+tip.showBy('my-el', 'tl-tr');
+</code></pre>
+     * @param {Mixed} el An HTMLElement, Ext.Element or string id of the target element to align to
+     * @param {String} position (optional) A valid {@link Ext.Element#alignTo} anchor position (defaults to 'tl-br?' or
+     * {@link #defaultAlign} if specified).
+     */
+    showBy : function(el, pos){
+        if(!this.rendered){
+            this.render(Ext.getBody());
+        }
+        this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign));
+    },
+
+    initDraggable : function(){
+        this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable);
+        this.header.addClass('x-tip-draggable');
+    }
+});
+
+// private - custom Tip DD implementation
+Ext.Tip.DD = function(tip, config){
+    Ext.apply(this, config);
+    this.tip = tip;
+    Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id);
+    this.setHandleElId(tip.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(e){
+        this.tip.el.enableShadow(true);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/ToolTip.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/ToolTip.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tips/ToolTip.js	(revision 625)
@@ -0,0 +1,492 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.ToolTip
+ * @extends Ext.Tip
+ * A standard tooltip implementation for providing additional information when hovering over a target element.
+ * @constructor
+ * Create a new Tooltip
+ * @param {Object} config The configuration options
+ */
+Ext.ToolTip = Ext.extend(Ext.Tip, {
+    /**
+     * When a Tooltip is configured with the {@link #delegate} option to cause selected child elements of the {@link #target}
+     * Element to each trigger a seperate show event, this property is set to the DOM element which triggered the show.
+     * @type DOMElement
+     * @property triggerElement
+     */
+    /**
+     * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to monitor for mouseover events to trigger
+     * showing this ToolTip.
+     */
+    /**
+     * @cfg {Boolean} autoHide True to automatically hide the tooltip after the mouse exits the target element
+     * or after the {@link #dismissDelay} has expired if set (defaults to true).  If {@link closable} = true a close
+     * tool button will be rendered into the tooltip header.
+     */
+    /**
+     * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays after the mouse enters the
+     * target element (defaults to 500)
+     */
+    showDelay: 500,
+    /**
+     * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the target element but before the
+     * tooltip actually hides (defaults to 200).  Set to 0 for the tooltip to hide immediately.
+     */
+    hideDelay: 200,
+    /**
+     * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip automatically hides (defaults to 5000).
+     * To disable automatic hiding, set dismissDelay = 0.
+     */
+    dismissDelay: 5000,
+    /**
+     * @cfg {Array} mouseOffset An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
+     */
+    /**
+     * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
+     */
+    trackMouse : false,
+    /**
+     * @cfg {Boolean} anchorToTarget True to anchor the tooltip to the target element, false to
+     * anchor it relative to the mouse coordinates (defaults to true).  When anchorToTarget is
+     * true, use {@link #defaultAlign} to control tooltip alignment to the target element.  When
+     * anchorToTarget is false, use {@link #anchorPosition} instead to control alignment.
+     */
+    anchorToTarget: true,
+    /**
+     * @cfg {Number} anchorOffset A numeric pixel value used to offset the default position of the
+     * anchor arrow (defaults to 0).  When the anchor position is on the top or bottom of the tooltip,
+     * anchorOffset will be used as a horizontal offset.  Likewise, when the anchor position is on the
+     * left or right side, anchorOffset will be used as a vertical offset.
+     */
+    anchorOffset: 0,
+    /**
+     * @cfg {String} delegate <p>Optional. A {@link Ext.DomQuery DomQuery} selector which allows selection of individual elements
+     * within the {@link #target} element to trigger showing and hiding the ToolTip as the mouse moves within the target.</p>
+     * <p>When specified, the child element of the target which caused a show event is placed into the {@link #triggerElement} property
+     * before the ToolTip is shown.</p>
+     * <p>This may be useful when a Component has regular, repeating elements in it, each of which need a Tooltip which contains
+     * information specific to that element. For example:</p><pre><code>
+var myGrid = new Ext.grid.gridPanel(gridConfig);
+myGrid.on('render', function(grid) {
+    var store = grid.getStore();  // Capture the Store.
+    var view = grid.getView();    // Capture the GridView.
+    myGrid.tip = new Ext.ToolTip({
+        target: view.mainBody,    // The overall target element.
+        delegate: '.x-grid3-row', // Each grid row causes its own seperate show and hide.
+        trackMouse: true,         // Moving within the row should not hide the tip.
+        renderTo: document.body,  // Render immediately so that tip.body can be referenced prior to the first show.
+        listeners: {              // Change content dynamically depending on which element triggered the show.
+            beforeshow: function updateTipBody(tip) {
+                var rowIndex = view.findRowIndex(tip.triggerElement);
+                tip.body.dom.innerHTML = "Over Record ID " + store.getAt(rowIndex).id;
+            }
+        }
+    });
+});</code></pre>
+     */
+
+    // private
+    targetCounter: 0,
+
+    constrainPosition: false,
+
+    // private
+    initComponent: function(){
+        Ext.ToolTip.superclass.initComponent.call(this);
+        this.lastActive = new Date();
+        this.initTarget(this.target);
+        this.origAnchor = this.anchor;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.ToolTip.superclass.onRender.call(this, ct, position);
+        this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition();
+        this.anchorEl = this.el.createChild({
+            cls: 'x-tip-anchor ' + this.anchorCls
+        });
+    },
+
+    // private
+    afterRender : function(){
+        Ext.ToolTip.superclass.afterRender.call(this);
+        this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1);
+    },
+
+    /**
+     * Binds this ToolTip to the specified element. The tooltip will be displayed when the mouse moves over the element.
+     * @param {Mixed} t The Element, HtmlElement, or ID of an element to bind to
+     */
+    initTarget : function(target){
+        var t;
+        if((t = Ext.get(target))){
+            if(this.target){
+                this.target = Ext.get(this.target);
+                this.target.un('mouseover', this.onTargetOver, this);
+                this.target.un('mouseout', this.onTargetOut, this);
+                this.target.un('mousemove', this.onMouseMove, this);
+            }
+            this.mon(t, {
+                mouseover: this.onTargetOver,
+                mouseout: this.onTargetOut,
+                mousemove: this.onMouseMove,
+                scope: this
+            });
+            this.target = t;
+        }
+        if(this.anchor){
+            this.anchorTarget = this.target;
+        }
+    },
+
+    // private
+    onMouseMove : function(e){
+        var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true;
+        if (t) {
+            this.targetXY = e.getXY();
+            if (t === this.triggerElement) {
+                if(!this.hidden && this.trackMouse){
+                    this.setPagePosition(this.getTargetXY());
+                }
+            } else {
+                this.hide();
+                this.lastActive = new Date(0);
+                this.onTargetOver(e);
+            }
+        } else if (!this.closable && this.isVisible()) {
+            this.hide();
+        }
+    },
+
+    // private
+    getTargetXY : function(){
+        if(this.anchor){
+            this.targetCounter++;
+            var offsets = this.getOffsets();
+            var xy = (this.anchorToTarget && !this.trackMouse) ?
+                this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) :
+                this.targetXY;
+
+            var dw = Ext.lib.Dom.getViewWidth()-5;
+            var dh = Ext.lib.Dom.getViewHeight()-5;
+            var scrollX = (document.documentElement.scrollLeft || document.body.scrollLeft || 0)+5;
+            var scrollY = (document.documentElement.scrollTop || document.body.scrollTop || 0)+5;
+
+            var axy = [xy[0] + offsets[0], xy[1] + offsets[1]];
+            var sz = this.getSize();
+            this.anchorEl.removeClass(this.anchorCls);
+
+            if(this.targetCounter < 2){
+                if(axy[0] < scrollX){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'l-r';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'left';
+                    return this.getTargetXY();
+                }
+                if(axy[0]+sz.width > dw){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'r-l';
+                        if(this.mouseOffset){this.mouseOffset[0] *= -1;}
+                    }
+                    this.anchor = 'right';
+                    return this.getTargetXY();
+                }
+                if(axy[1] < scrollY){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 't-b';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'top';
+                    return this.getTargetXY();
+                }
+                if(axy[1]+sz.height > dh){
+                    if(this.anchorToTarget){
+                        this.defaultAlign = 'b-t';
+                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
+                    }
+                    this.anchor = 'bottom';
+                    return this.getTargetXY();
+                }
+            }
+
+            this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition();
+            this.anchorEl.addClass(this.anchorCls);
+            this.targetCounter = 0;
+            return axy;
+        }else{
+            var mouseOffset = this.getMouseOffset();
+            return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]];
+        }
+    },
+
+    getMouseOffset : function(){
+        var offset = this.anchor ? [0,0] : [15,18];
+        if(this.mouseOffset){
+            offset[0] += this.mouseOffset[0];
+            offset[1] += this.mouseOffset[1];
+        }
+        return offset;
+    },
+
+    // private
+    getAnchorPosition : function(){
+        if(this.anchor){
+            this.tipAnchor = this.anchor.charAt(0);
+        }else{
+            var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);
+            if(!m){
+               throw "AnchorTip.defaultAlign is invalid";
+            }
+            this.tipAnchor = m[1].charAt(0);
+        }
+
+        switch(this.tipAnchor){
+            case 't': return 'top';
+            case 'b': return 'bottom';
+            case 'r': return 'right';
+        }
+        return 'left';
+    },
+
+    // private
+    getAnchorAlign : function(){
+        switch(this.anchor){
+            case 'top'  : return 'tl-bl';
+            case 'left' : return 'tl-tr';
+            case 'right': return 'tr-tl';
+            default     : return 'bl-tl';
+        }
+    },
+
+    // private
+    getOffsets: function(){
+        var offsets, ap = this.getAnchorPosition().charAt(0);
+        if(this.anchorToTarget && !this.trackMouse){
+            switch(ap){
+                case 't':
+                    offsets = [0, 9];
+                    break;
+                case 'b':
+                    offsets = [0, -13];
+                    break;
+                case 'r':
+                    offsets = [-13, 0];
+                    break;
+                default:
+                    offsets = [9, 0];
+                    break;
+            }
+        }else{
+            switch(ap){
+                case 't':
+                    offsets = [-15-this.anchorOffset, 30];
+                    break;
+                case 'b':
+                    offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight];
+                    break;
+                case 'r':
+                    offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset];
+                    break;
+                default:
+                    offsets = [25, -13-this.anchorOffset];
+                    break;
+            }
+        }
+        var mouseOffset = this.getMouseOffset();
+        offsets[0] += mouseOffset[0];
+        offsets[1] += mouseOffset[1];
+
+        return offsets;
+    },
+
+    // private
+    onTargetOver : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        var t = e.getTarget(this.delegate);
+        if (t) {
+            this.triggerElement = t;
+            this.clearTimer('hide');
+            this.targetXY = e.getXY();
+            this.delayShow();
+        }
+    },
+
+    // private
+    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();
+        }
+    },
+
+    // private
+    onTargetOut : function(e){
+        if(this.disabled || e.within(this.target.dom, true)){
+            return;
+        }
+        this.clearTimer('show');
+        if(this.autoHide !== false){
+            this.delayHide();
+        }
+    },
+
+    // private
+    delayHide : function(){
+        if(!this.hidden && !this.hideTimer){
+            this.hideTimer = this.hide.defer(this.hideDelay, this);
+        }
+    },
+
+    /**
+     * Hides this tooltip if visible.
+     */
+    hide: function(){
+        this.clearTimer('dismiss');
+        this.lastActive = new Date();
+        if(this.anchorEl){
+            this.anchorEl.hide();
+        }
+        Ext.ToolTip.superclass.hide.call(this);
+        delete this.triggerElement;
+    },
+
+    /**
+     * Shows this tooltip at the current event target XY position.
+     */
+    show : function(){
+        if(this.anchor){
+            // pre-show it off screen so that the el will have dimensions
+            // for positioning calcs when getting xy next
+            this.showAt([-1000,-1000]);
+            this.origConstrainPosition = this.constrainPosition;
+            this.constrainPosition = false;
+            this.anchor = this.origAnchor;
+        }
+        this.showAt(this.getTargetXY());
+
+        if(this.anchor){
+            this.syncAnchor();
+            this.anchorEl.show();
+            this.constrainPosition = this.origConstrainPosition;
+        }else{
+            this.anchorEl.hide();
+        }
+    },
+
+    // inherit docs
+    showAt : function(xy){
+        this.lastActive = new Date();
+        this.clearTimers();
+        Ext.ToolTip.superclass.showAt.call(this, xy);
+        if(this.dismissDelay && this.autoHide !== false){
+            this.dismissTimer = this.hide.defer(this.dismissDelay, this);
+        }
+    },
+
+    // private
+    syncAnchor : function(){
+        var anchorPos, targetPos, offset;
+        switch(this.tipAnchor.charAt(0)){
+            case 't':
+                anchorPos = 'b';
+                targetPos = 'tl';
+                offset = [20+this.anchorOffset, 2];
+                break;
+            case 'r':
+                anchorPos = 'l';
+                targetPos = 'tr';
+                offset = [-2, 11+this.anchorOffset];
+                break;
+            case 'b':
+                anchorPos = 't';
+                targetPos = 'bl';
+                offset = [20+this.anchorOffset, -2];
+                break;
+            default:
+                anchorPos = 'r';
+                targetPos = 'tl';
+                offset = [2, 11+this.anchorOffset];
+                break;
+        }
+        this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset);
+    },
+
+    // private
+    setPagePosition : function(x, y){
+        Ext.ToolTip.superclass.setPagePosition.call(this, x, y);
+        if(this.anchor){
+            this.syncAnchor();
+        }
+    },
+
+    // private
+    clearTimer : function(name){
+        name = name + 'Timer';
+        clearTimeout(this[name]);
+        delete this[name];
+    },
+
+    // private
+    clearTimers : function(){
+        this.clearTimer('show');
+        this.clearTimer('dismiss');
+        this.clearTimer('hide');
+    },
+
+    // private
+    onShow : function(){
+        Ext.ToolTip.superclass.onShow.call(this);
+        Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onHide : function(){
+        Ext.ToolTip.superclass.onHide.call(this);
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+    },
+
+    // private
+    onDocMouseDown : function(e){
+        if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){
+            this.disable();
+            this.enable.defer(100, this);
+        }
+    },
+
+    // private
+    onDisable : function(){
+        this.clearTimers();
+        this.hide();
+    },
+
+    // private
+    adjustPosition : function(x, y){
+        if(this.contstrainPosition){
+            var ay = this.targetXY[1], h = this.getSize().height;
+            if(y <= ay && (y+h) >= ay){
+                y = ay-h-5;
+            }
+        }
+        return {x : x, y: y};
+    },
+
+    // private
+    onDestroy : function(){
+        Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
+        Ext.ToolTip.superclass.onDestroy.call(this);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/AsyncTreeNode.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/AsyncTreeNode.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/AsyncTreeNode.js	(revision 625)
@@ -0,0 +1,114 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.AsyncTreeNode
+ * @extends Ext.tree.TreeNode
+ * @cfg {TreeLoader} loader A TreeLoader to be used by this node (defaults to the loader defined on the tree)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node 
+ */
+ Ext.tree.AsyncTreeNode = function(config){
+    this.loaded = config && config.loaded === true;
+    this.loading = false;
+    Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments);
+    /**
+    * @event beforeload
+    * Fires before this node is loaded, return false to cancel
+    * @param {Node} this This node
+    */
+    this.addEvents('beforeload', 'load');
+    /**
+    * @event load
+    * Fires when this node is loaded
+    * @param {Node} this This node
+    */
+    /**
+     * The loader used by this node (defaults to using the tree's defined loader)
+     * @type TreeLoader
+     * @property loader
+     */
+};
+Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
+    expand : function(deep, anim, callback, scope){
+        if(this.loading){ // if an async load is already running, waiting til it's done
+            var timer;
+            var f = function(){
+                if(!this.loading){ // done loading
+                    clearInterval(timer);
+                    this.expand(deep, anim, callback, scope);
+                }
+            }.createDelegate(this);
+            timer = setInterval(f, 200);
+            return;
+        }
+        if(!this.loaded){
+            if(this.fireEvent("beforeload", this) === false){
+                return;
+            }
+            this.loading = true;
+            this.ui.beforeLoad(this);
+            var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader();
+            if(loader){
+                loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback, scope]), this);
+                return;
+            }
+        }
+        Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node is currently loading
+     * @return {Boolean}
+     */
+    isLoading : function(){
+        return this.loading;  
+    },
+    
+    loadComplete : function(deep, anim, callback, scope){
+        this.loading = false;
+        this.loaded = true;
+        this.ui.afterLoad(this);
+        this.fireEvent("load", this);
+        this.expand(deep, anim, callback, scope);
+    },
+    
+    /**
+     * Returns true if this node has been loaded
+     * @return {Boolean}
+     */
+    isLoaded : function(){
+        return this.loaded;
+    },
+    
+    hasChildNodes : function(){
+        if(!this.isLeaf() && !this.loaded){
+            return true;
+        }else{
+            return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this);
+        }
+    },
+
+    /**
+     * Trigger a reload for this node
+     * @param {Function} callback
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    reload : function(callback, scope){
+        this.collapse(false, false);
+        while(this.firstChild){
+            this.removeChild(this.firstChild).destroy();
+        }
+        this.childrenRendered = false;
+        this.loaded = false;
+        if(this.isHiddenRoot()){
+            this.expanded = false;
+        }
+        this.expand(false, false, callback, scope);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDragZone.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDragZone.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDragZone.js	(revision 625)
@@ -0,0 +1,82 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeDragZone
+ * @extends Ext.dd.DragZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dragging
+ * @param {Object} config
+ */
+if(Ext.dd.DragZone){
+Ext.tree.TreeDragZone = function(tree, config){
+    Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config);
+    /**
+    * The TreePanel for this drag zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+};
+
+Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    // private
+    onBeforeDrag : function(data, e){
+        var n = data.node;
+        return n && n.draggable && !n.disabled;
+    },
+
+    // private
+    onInitDrag : function(e){
+        var data = this.dragData;
+        this.tree.getSelectionModel().select(data.node);
+        this.tree.eventModel.disable();
+        this.proxy.update("");
+        data.node.ui.appendDDGhost(this.proxy.ghost.dom);
+        this.tree.fireEvent("startdrag", this.tree, data.node, e);
+    },
+
+    // private
+    getRepairXY : function(e, data){
+        return data.node.ui.getDDRepairXY();
+    },
+
+    // private
+    onEndDrag : function(data, e){
+        this.tree.eventModel.enable.defer(100, this.tree.eventModel);
+        this.tree.fireEvent("enddrag", this.tree, data.node, e);
+    },
+
+    // private
+    onValidDrop : function(dd, e, id){
+        this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e);
+        this.hideProxy();
+    },
+
+    // private
+    beforeInvalidDrop : function(e, id){
+        // this scrolls the original position back into view
+        var sm = this.tree.getSelectionModel();
+        sm.clearSelections();
+        sm.select(this.dragData.node);
+    },
+    
+    // private
+    afterRepair : function(){
+        if (Ext.enableFx && this.tree.hlDrop) {
+            Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
+        }
+        this.dragging = false;
+    }
+});
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDropZone.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDropZone.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeDropZone.js	(revision 625)
@@ -0,0 +1,321 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeDropZone
+ * @extends Ext.dd.DropZone
+ * @constructor
+ * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dropping
+ * @param {Object} config
+ */
+if(Ext.dd.DropZone){
+    
+Ext.tree.TreeDropZone = function(tree, config){
+    /**
+     * @cfg {Boolean} allowParentInsert
+     * Allow inserting a dragged node between an expanded parent node and its first child that will become a
+     * sibling of the parent when dropped (defaults to false)
+     */
+    this.allowParentInsert = config.allowParentInsert || false;
+    /**
+     * @cfg {String} allowContainerDrop
+     * True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)
+     */
+    this.allowContainerDrop = config.allowContainerDrop || false;
+    /**
+     * @cfg {String} appendOnly
+     * True if the tree should only allow append drops (use for trees which are sorted, defaults to false)
+     */
+    this.appendOnly = config.appendOnly || false;
+
+    Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config);
+    /**
+    * The TreePanel for this drop zone
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.tree = tree;
+    /**
+    * Arbitrary data that can be associated with this tree and will be included in the event object that gets
+    * passed to any nodedragover event handler (defaults to {})
+    * @type Ext.tree.TreePanel
+    * @property
+    */
+    this.dragOverData = {};
+    // private
+    this.lastInsertClass = "x-tree-no-status";
+};
+
+Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
+    /**
+     * @cfg {String} ddGroup
+     * A named drag drop group to which this object belongs.  If a group is specified, then this object will only
+     * interact with other drag drop objects in the same group (defaults to 'TreeDD').
+     */
+    ddGroup : "TreeDD",
+
+    /**
+     * @cfg {String} expandDelay
+     * The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node
+     * over the target (defaults to 1000)
+     */
+    expandDelay : 1000,
+
+    // private
+    expandNode : function(node){
+        if(node.hasChildNodes() && !node.isExpanded()){
+            node.expand(false, null, this.triggerCacheRefresh.createDelegate(this));
+        }
+    },
+
+    // private
+    queueExpand : function(node){
+        this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]);
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+            this.expandProcId = false;
+        }
+    },
+
+    // private
+    isValidDropPoint : function(n, pt, dd, e, data){
+        if(!n || !data){ return false; }
+        var targetNode = n.node;
+        var dropNode = data.node;
+        // default drop rules
+        if(!(targetNode && targetNode.isTarget && pt)){
+            return false;
+        }
+        if(pt == "append" && targetNode.allowChildren === false){
+            return false;
+        }
+        if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){
+            return false;
+        }
+        if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){
+            return false;
+        }
+        // reuse the object
+        var overEvent = this.dragOverData;
+        overEvent.tree = this.tree;
+        overEvent.target = targetNode;
+        overEvent.data = data;
+        overEvent.point = pt;
+        overEvent.source = dd;
+        overEvent.rawEvent = e;
+        overEvent.dropNode = dropNode;
+        overEvent.cancel = false;  
+        var result = this.tree.fireEvent("nodedragover", overEvent);
+        return overEvent.cancel === false && result !== false;
+    },
+
+    // private
+    getDropPoint : function(e, n, dd){
+        var tn = n.node;
+        if(tn.isRoot){
+            return tn.allowChildren !== false ? "append" : false; // always append for root
+        }
+        var dragEl = n.ddel;
+        var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight;
+        var y = Ext.lib.Event.getPageY(e);
+        var noAppend = tn.allowChildren === false || tn.isLeaf();
+        if(this.appendOnly || tn.parentNode.allowChildren === false){
+            return noAppend ? false : "append";
+        }
+        var noBelow = false;
+        if(!this.allowParentInsert){
+            noBelow = tn.hasChildNodes() && tn.isExpanded();
+        }
+        var q = (b - t) / (noAppend ? 2 : 3);
+        if(y >= t && y < (t + q)){
+            return "above";
+        }else if(!noBelow && (noAppend || y >= b-q && y <= b)){
+            return "below";
+        }else{
+            return "append";
+        }
+    },
+
+    // private
+    onNodeEnter : function(n, dd, e, data){
+        this.cancelExpand();
+    },
+    
+    onContainerOver : function(dd, e, data) {
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            return this.dropAllowed;
+        }
+        return this.dropNotAllowed;
+    },
+
+    // private
+    onNodeOver : function(n, dd, e, data){
+        var pt = this.getDropPoint(e, n, dd);
+        var node = n.node;
+        
+        // auto node expand check
+        if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){
+            this.queueExpand(node);
+        }else if(pt != "append"){
+            this.cancelExpand();
+        }
+        
+        // set the insert point style on the target node
+        var returnCls = this.dropNotAllowed;
+        if(this.isValidDropPoint(n, pt, dd, e, data)){
+           if(pt){
+               var el = n.ddel;
+               var cls;
+               if(pt == "above"){
+                   returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-above";
+               }else if(pt == "below"){
+                   returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between";
+                   cls = "x-tree-drag-insert-below";
+               }else{
+                   returnCls = "x-tree-drop-ok-append";
+                   cls = "x-tree-drag-append";
+               }
+               if(this.lastInsertClass != cls){
+                   Ext.fly(el).replaceClass(this.lastInsertClass, cls);
+                   this.lastInsertClass = cls;
+               }
+           }
+       }
+       return returnCls;
+    },
+
+    // private
+    onNodeOut : function(n, dd, e, data){
+        this.cancelExpand();
+        this.removeDropIndicators(n);
+    },
+
+    // private
+    onNodeDrop : function(n, dd, e, data){
+        var point = this.getDropPoint(e, n, dd);
+        var targetNode = n.node;
+        targetNode.ui.startDrop();
+        if(!this.isValidDropPoint(n, point, dd, e, data)){
+            targetNode.ui.endDrop();
+            return false;
+        }
+        // first try to find the drop node
+        var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null);
+        return this.processDrop(targetNode, data, point, dd, e, dropNode);
+    },
+    
+    onContainerDrop : function(dd, e, data){
+        if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
+            var targetNode = this.tree.getRootNode();       
+            targetNode.ui.startDrop();
+            var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null);
+            return this.processDrop(targetNode, data, 'append', dd, e, dropNode);
+        }
+        return false;
+    },
+    
+    // private
+    processDrop: function(target, data, point, dd, e, dropNode){
+        var dropEvent = {
+            tree : this.tree,
+            target: target,
+            data: data,
+            point: point,
+            source: dd,
+            rawEvent: e,
+            dropNode: dropNode,
+            cancel: !dropNode,
+            dropStatus: false
+        };
+        var retval = this.tree.fireEvent("beforenodedrop", dropEvent);
+        if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){
+            target.ui.endDrop();
+            return dropEvent.dropStatus;
+        }
+    
+        target = dropEvent.target;
+        if(point == 'append' && !target.isExpanded()){
+            target.expand(false, null, function(){
+                this.completeDrop(dropEvent);
+            }.createDelegate(this));
+        }else{
+            this.completeDrop(dropEvent);
+        }
+        return true;
+    },
+
+    // private
+    completeDrop : function(de){
+        var ns = de.dropNode, p = de.point, t = de.target;
+        if(!Ext.isArray(ns)){
+            ns = [ns];
+        }
+        var n;
+        for(var i = 0, len = ns.length; i < len; i++){
+            n = ns[i];
+            if(p == "above"){
+                t.parentNode.insertBefore(n, t);
+            }else if(p == "below"){
+                t.parentNode.insertBefore(n, t.nextSibling);
+            }else{
+                t.appendChild(n);
+            }
+        }
+        n.ui.focus();
+        if(Ext.enableFx && this.tree.hlDrop){
+            n.ui.highlight();
+        }
+        t.ui.endDrop();
+        this.tree.fireEvent("nodedrop", de);
+    },
+
+    // private
+    afterNodeMoved : function(dd, data, e, targetNode, dropNode){
+        if(Ext.enableFx && this.tree.hlDrop){
+            dropNode.ui.focus();
+            dropNode.ui.highlight();
+        }
+        this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e);
+    },
+
+    // private
+    getTree : function(){
+        return this.tree;
+    },
+
+    // private
+    removeDropIndicators : function(n){
+        if(n && n.ddel){
+            var el = n.ddel;
+            Ext.fly(el).removeClass([
+                    "x-tree-drag-insert-above",
+                    "x-tree-drag-insert-below",
+                    "x-tree-drag-append"]);
+            this.lastInsertClass = "_noclass";
+        }
+    },
+
+    // private
+    beforeDragDrop : function(target, e, id){
+        this.cancelExpand();
+        return true;
+    },
+
+    // private
+    afterRepair : function(data){
+        if(data && Ext.enableFx){
+            data.node.ui.highlight();
+        }
+        this.hideProxy();
+    }    
+});
+
+}
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEditor.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEditor.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEditor.js	(revision 625)
@@ -0,0 +1,160 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeEditor
+ * @extends Ext.Editor
+ * Provides editor functionality for inline tree node editing.  Any valid {@link Ext.form.Field} subclass can be used
+ * as the editor field.
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} fieldConfig (optional) Either a prebuilt {@link Ext.form.Field} instance or a Field config object
+ * that will be applied to the default field instance (defaults to a {@link Ext.form.TextField}).
+ * @param {Object} config (optional) A TreeEditor config object
+ */
+Ext.tree.TreeEditor = function(tree, fc, config){
+    fc = fc || {};
+    var field = fc.events ? fc : new Ext.form.TextField(fc);
+    Ext.tree.TreeEditor.superclass.constructor.call(this, field, config);
+
+    this.tree = tree;
+
+    if(!tree.rendered){
+        tree.on('render', this.initEditor, this);
+    }else{
+        this.initEditor(tree);
+    }
+};
+
+Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
+    /**
+     * @cfg {String} alignment
+     * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "l-l").
+     */
+    alignment: "l-l",
+    // inherit
+    autoSize: false,
+    /**
+     * @cfg {Boolean} hideEl
+     * True to hide the bound element while the editor is displayed (defaults to false)
+     */
+    hideEl : false,
+    /**
+     * @cfg {String} cls
+     * CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")
+     */
+    cls: "x-small-editor x-tree-editor",
+    /**
+     * @cfg {Boolean} shim
+     * True to shim the editor if selects/iframes could be displayed beneath it (defaults to false)
+     */
+    shim:false,
+    // inherit
+    shadow:"frame",
+    /**
+     * @cfg {Number} maxWidth
+     * The maximum width in pixels of the editor field (defaults to 250).  Note that if the maxWidth would exceed
+     * the containing tree element's size, it will be automatically limited for you to the container width, taking
+     * scroll and client offsets into account prior to each edit.
+     */
+    maxWidth: 250,
+    /**
+     * @cfg {Number} editDelay The number of milliseconds between clicks to register a double-click that will trigger
+     * editing on the current node (defaults to 350).  If two clicks occur on the same node within this time span,
+     * the editor for the node will display, otherwise it will be processed as a regular click.
+     */
+    editDelay : 350,
+
+    initEditor : function(tree){
+        tree.on('beforeclick', this.beforeNodeClick, this);
+        tree.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);
+    },
+
+    // private
+    fitToTree : function(ed, el){
+        var td = this.tree.getTreeEl().dom, nd = el.dom;
+        if(td.scrollLeft >  nd.offsetLeft){ // ensure the node left point is visible
+            td.scrollLeft = nd.offsetLeft;
+        }
+        var w = Math.min(
+                this.maxWidth,
+                (td.clientWidth > 20 ? td.clientWidth : td.offsetWidth) - Math.max(0, nd.offsetLeft-td.scrollLeft) - /*cushion*/5);
+        this.setSize(w, '');
+    },
+
+    /**
+     * Edit the text of the passed {@link Ext.tree.TreeNode TreeNode}.
+     * @param node {Ext.tree.TreeNode} The TreeNode to edit. The TreeNode must be {@link Ext.tree.TreeNode#editable editable}.
+     */
+    triggerEdit : function(node, defer){
+        this.completeEdit();
+		if(node.attributes.editable !== false){
+           /**
+            * The {@link Ext.tree.TreeNode TreeNode} this editor is bound to. Read-only.
+            * @type Ext.tree.TreeNode
+            * @property editNode
+            */
+			this.editNode = node;
+            if(this.tree.autoScroll){
+                Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
+            }
+            var value = node.text || '';
+            if (!Ext.isGecko && Ext.isEmpty(node.text)){
+                node.setText('&#160;');
+            }
+            this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]);
+            return false;
+        }
+    },
+
+    // private
+    bindScroll : function(){
+        this.tree.getTreeEl().on('scroll', this.cancelEdit, this);
+    },
+
+    // private
+    beforeNodeClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+        if(this.tree.getSelectionModel().isSelected(node)){
+            e.stopEvent();
+            return this.triggerEdit(node);
+        }
+    },
+
+    onNodeDblClick : function(node, e){
+        clearTimeout(this.autoEditTimer);
+    },
+
+    // private
+    updateNode : function(ed, value){
+        this.tree.getTreeEl().un('scroll', this.cancelEdit, this);
+        this.editNode.setText(value);
+    },
+
+    // private
+    onHide : function(){
+        Ext.tree.TreeEditor.superclass.onHide.call(this);
+        if(this.editNode){
+            this.editNode.ui.focus.defer(50, this.editNode.ui);
+        }
+    },
+
+    // private
+    onSpecialKey : function(field, e){
+        var k = e.getKey();
+        if(k == e.ESC){
+            e.stopEvent();
+            this.cancelEdit();
+        }else if(k == e.ENTER && !e.hasModifier()){
+            e.stopEvent();
+            this.completeEdit();
+        }
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEventModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEventModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeEventModel.js	(revision 625)
@@ -0,0 +1,169 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.tree.TreeEventModel = function(tree){
+    this.tree = tree;
+    this.tree.on('render', this.initEvents, this);
+}
+
+Ext.tree.TreeEventModel.prototype = {
+    initEvents : function(){
+        var el = this.tree.getTreeEl();
+        el.on('click', this.delegateClick, this);
+        if(this.tree.trackMouseOver !== false){
+            this.tree.innerCt.on('mouseover', this.delegateOver, this);
+            this.tree.innerCt.on('mouseout', this.delegateOut, this);
+        }
+        el.on('dblclick', this.delegateDblClick, this);
+        el.on('contextmenu', this.delegateContextMenu, this);
+    },
+
+    getNode : function(e){
+        var t;
+        if(t = e.getTarget('.x-tree-node-el', 10)){
+            var id = Ext.fly(t, '_treeEvents').getAttribute('tree-node-id', 'ext');
+            if(id){
+                return this.tree.getNodeById(id);
+            }
+        }
+        return null;
+    },
+
+    getNodeTarget : function(e){
+        var t = e.getTarget('.x-tree-node-icon', 1);
+        if(!t){
+            t = e.getTarget('.x-tree-node-el', 6);
+        }
+        return t;
+    },
+
+    delegateOut : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            var n = this.getNode(e);
+            this.onIconOut(e, n);
+            if(n == this.lastEcOver){
+                delete this.lastEcOver;
+            }
+        }
+        if((t = this.getNodeTarget(e)) && !e.within(t, true)){
+            this.onNodeOut(e, this.getNode(e));
+        }
+    },
+
+    delegateOver : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+        if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF
+            Ext.getBody().on('mouseover', this.trackExit, this);
+            this.trackingDoc = true;
+        }
+        if(this.lastEcOver){ // prevent hung highlight
+            this.onIconOut(e, this.lastEcOver);
+            delete this.lastEcOver;
+        }
+        if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.lastEcOver = this.getNode(e);
+            this.onIconOver(e, this.lastEcOver);
+        }
+        if(t = this.getNodeTarget(e)){
+            this.onNodeOver(e, this.getNode(e));
+        }
+    },
+
+    trackExit : function(e){
+        if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){
+            this.onNodeOut(e, this.lastOverNode);
+            delete this.lastOverNode;
+            Ext.getBody().un('mouseover', this.trackExit, this);
+            this.trackingDoc = false;
+        }
+    },
+
+    delegateClick : function(e, t){
+        if(!this.beforeEvent(e)){
+            return;
+        }
+
+        if(e.getTarget('input[type=checkbox]', 1)){
+            this.onCheckboxClick(e, this.getNode(e));
+        }
+        else if(e.getTarget('.x-tree-ec-icon', 1)){
+            this.onIconClick(e, this.getNode(e));
+        }
+        else if(this.getNodeTarget(e)){
+            this.onNodeClick(e, this.getNode(e));
+        }
+    },
+
+    delegateDblClick : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeDblClick(e, this.getNode(e));
+        }
+    },
+
+    delegateContextMenu : function(e, t){
+        if(this.beforeEvent(e) && this.getNodeTarget(e)){
+            this.onNodeContextMenu(e, this.getNode(e));
+        }
+    },
+
+    onNodeClick : function(e, node){
+        node.ui.onClick(e);
+    },
+
+    onNodeOver : function(e, node){
+        this.lastOverNode = node;
+        node.ui.onOver(e);
+    },
+
+    onNodeOut : function(e, node){
+        node.ui.onOut(e);
+    },
+
+    onIconOver : function(e, node){
+        node.ui.addClass('x-tree-ec-over');
+    },
+
+    onIconOut : function(e, node){
+        node.ui.removeClass('x-tree-ec-over');
+    },
+
+    onIconClick : function(e, node){
+        node.ui.ecClick(e);
+    },
+
+    onCheckboxClick : function(e, node){
+        node.ui.onCheckChange(e);
+    },
+
+    onNodeDblClick : function(e, node){
+        node.ui.onDblClick(e);
+    },
+
+    onNodeContextMenu : function(e, node){
+        node.ui.onContextMenu(e);
+    },
+
+    beforeEvent : function(e){
+        if(this.disabled){
+            e.stopEvent();
+            return false;
+        }
+        return true;
+    },
+
+    disable: function(){
+        this.disabled = true;
+    },
+
+    enable: function(){
+        this.disabled = false;
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeFilter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeFilter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeFilter.js	(revision 625)
@@ -0,0 +1,114 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeFilter
+ * Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes
+ * @param {TreePanel} tree
+ * @param {Object} config (optional)
+ */
+Ext.tree.TreeFilter = function(tree, config){
+    this.tree = tree;
+    this.filtered = {};
+    Ext.apply(this, config);
+};
+
+Ext.tree.TreeFilter.prototype = {
+    clearBlank:false,
+    reverse:false,
+    autoClear:false,
+    remove:false,
+
+     /**
+     * Filter the data by a specific attribute.
+     * @param {String/RegExp} value Either string that the attribute value
+     * should start with or a RegExp to test against the attribute
+     * @param {String} attr (optional) The attribute passed in your node's attributes collection. Defaults to "text".
+     * @param {TreeNode} startNode (optional) The node to start the filter at.
+     */
+    filter : function(value, attr, startNode){
+        attr = attr || "text";
+        var f;
+        if(typeof value == "string"){
+            var vlen = value.length;
+            // auto clear empty filter
+            if(vlen == 0 && this.clearBlank){
+                this.clear();
+                return;
+            }
+            value = value.toLowerCase();
+            f = function(n){
+                return n.attributes[attr].substr(0, vlen).toLowerCase() == value;
+            };
+        }else if(value.exec){ // regex?
+            f = function(n){
+                return value.test(n.attributes[attr]);
+            };
+        }else{
+            throw 'Illegal filter type, must be string or regex';
+        }
+        this.filterBy(f, null, startNode);
+	},
+
+    /**
+     * Filter by a function. The passed function will be called with each
+     * node in the tree (or from the startNode). If the function returns true, the node is kept
+     * otherwise it is filtered. If a node is filtered, its children are also filtered.
+     * @param {Function} fn The filter function
+     * @param {Object} scope (optional) The scope of the function (defaults to the current node)
+     */
+    filterBy : function(fn, scope, startNode){
+        startNode = startNode || this.tree.root;
+        if(this.autoClear){
+            this.clear();
+        }
+        var af = this.filtered, rv = this.reverse;
+        var f = function(n){
+            if(n == startNode){
+                return true;
+            }
+            if(af[n.id]){
+                return false;
+            }
+            var m = fn.call(scope || n, n);
+            if(!m || rv){
+                af[n.id] = n;
+                n.ui.hide();
+                return false;
+            }
+            return true;
+        };
+        startNode.cascade(f);
+        if(this.remove){
+           for(var id in af){
+               if(typeof id != "function"){
+                   var n = af[id];
+                   if(n && n.parentNode){
+                       n.parentNode.removeChild(n);
+                   }
+               }
+           }
+        }
+    },
+
+    /**
+     * Clears the current filter. Note: with the "remove" option
+     * set a filter cannot be cleared.
+     */
+    clear : function(){
+        var t = this.tree;
+        var af = this.filtered;
+        for(var id in af){
+            if(typeof id != "function"){
+                var n = af[id];
+                if(n){
+                    n.ui.show();
+                }
+            }
+        }
+        this.filtered = {};
+    }
+};
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeLoader.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeLoader.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeLoader.js	(revision 625)
@@ -0,0 +1,342 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeLoader
+ * @extends Ext.util.Observable
+ * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child
+ * nodes from a specified URL. The response must be a JavaScript Array definition
+ * whose elements are node definition objects. e.g.:
+ * <pre><code>
+    [{
+        id: 1,
+        text: 'A leaf Node',
+        leaf: true
+    },{
+        id: 2,
+        text: 'A folder Node',
+        children: [{
+            id: 3,
+            text: 'A child Node',
+            leaf: true
+        }]
+   }]
+</code></pre>
+ * <br><br>
+ * A server request is sent, and child nodes are loaded only when a node is expanded.
+ * The loading node's id is passed to the server under the parameter name "node" to
+ * enable the server to produce the correct child nodes.
+ * <br><br>
+ * To pass extra parameters, an event handler may be attached to the "beforeload"
+ * event, and the parameters specified in the TreeLoader's baseParams property:
+ * <pre><code>
+    myTreeLoader.on("beforeload", function(treeLoader, node) {
+        this.baseParams.category = node.attributes.category;
+    }, this);
+</code></pre>
+ * This would pass an HTTP parameter called "category" to the server containing
+ * the value of the Node's "category" attribute.
+ * @constructor
+ * Creates a new Treeloader.
+ * @param {Object} config A config object containing config properties.
+ */
+Ext.tree.TreeLoader = function(config){
+    this.baseParams = {};
+    Ext.apply(this, config);
+
+    this.addEvents(
+        /**
+         * @event beforeload
+         * Fires before a network request is made to retrieve the Json text which specifies a node's children.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} callback The callback function specified in the {@link #load} call.
+         */
+        "beforeload",
+        /**
+         * @event load
+         * Fires when the node has been successfuly loaded.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "load",
+        /**
+         * @event loadexception
+         * Fires if the network request failed.
+         * @param {Object} This TreeLoader object.
+         * @param {Object} node The {@link Ext.tree.TreeNode} object being loaded.
+         * @param {Object} response The response object containing the data from the server.
+         */
+        "loadexception"
+    );
+    Ext.tree.TreeLoader.superclass.constructor.call(this);
+    if(typeof this.paramOrder == 'string'){
+        this.paramOrder = this.paramOrder.split(/[\s,|]/);
+    }
+};
+
+Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
+    /**
+    * @cfg {String} dataUrl The URL from which to request a Json string which
+    * specifies an array of node definition objects representing the child nodes
+    * to be loaded.
+    */
+    /**
+     * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+     */
+    /**
+     * @cfg {String} url Equivalent to {@link #dataUrl}.
+     */
+    /**
+     * @cfg {Boolean} preloadChildren If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.
+     */
+    /**
+    * @cfg {Object} baseParams (optional) An object containing properties which
+    * specify HTTP parameters to be passed to each request for child nodes.
+    */
+    /**
+    * @cfg {Object} baseAttrs (optional) An object containing attributes to be added to all nodes
+    * created by this loader. If the attributes sent by the server have an attribute in this object,
+    * they take priority.
+    */
+    /**
+    * @cfg {Object} uiProviders (optional) An object containing properties which
+    * specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional
+    * <i>uiProvider</i> attribute of a returned child node is a string rather
+    * than a reference to a TreeNodeUI implementation, then that string value
+    * is used as a property name in the uiProviders object.
+    */
+    uiProviders : {},
+
+    /**
+    * @cfg {Boolean} clearOnLoad (optional) Default to true. Remove previously existing
+    * child nodes before loading.
+    */
+    clearOnLoad : true,
+
+    /**
+     * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. Only used when using directFn.
+     * A list of params to be executed
+     * server side.  Specify the params in the order in which they must be executed on the server-side
+     * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
+     * comma, or pipe. For example,
+     * any of the following would be acceptable:<pre><code>
+paramOrder: ['param1','param2','param3']
+paramOrder: 'param1 param2 param3'
+paramOrder: 'param1,param2,param3'
+paramOrder: 'param1|param2|param'
+     </code></pre>
+     */
+    paramOrder: undefined,
+
+    /**
+     * @cfg {Boolean} paramsAsHash Only used when using directFn.
+     * Send parameters as a collection of named arguments (defaults to <tt>false</tt>). Providing a
+     * <tt>{@link #paramOrder}</tt> nullifies this configuration.
+     */
+    paramsAsHash: false,
+
+    /**
+     * @cfg {Function} directFn
+     * Function to call when executing a request.
+     */
+    directFn : undefined,
+
+    /**
+     * Load an {@link Ext.tree.TreeNode} from the URL specified in the constructor.
+     * This is called automatically when a node is expanded, but may be used to reload
+     * a node (or append new children if the {@link #clearOnLoad} option is false.)
+     * @param {Ext.tree.TreeNode} node
+     * @param {Function} callback
+     * @param (Object) scope
+     */
+    load : function(node, callback, scope){
+        if(this.clearOnLoad){
+            while(node.firstChild){
+                node.removeChild(node.firstChild);
+            }
+        }
+        if(this.doPreload(node)){ // preloaded json children
+            this.runCallback(callback, scope || node, []);
+        }else if(this.directFn || this.dataUrl || this.url){
+            this.requestData(node, callback, scope || node);
+        }
+    },
+
+    doPreload : function(node){
+        if(node.attributes.children){
+            if(node.childNodes.length < 1){ // preloaded?
+                var cs = node.attributes.children;
+                node.beginUpdate();
+                for(var i = 0, len = cs.length; i < len; i++){
+                    var cn = node.appendChild(this.createNode(cs[i]));
+                    if(this.preloadChildren){
+                        this.doPreload(cn);
+                    }
+                }
+                node.endUpdate();
+            }
+            return true;
+        }
+        return false;
+    },
+
+    getParams: function(node){
+        var buf = [], bp = this.baseParams;
+        if(this.directFn){
+            buf.push(node.id);
+            if(bp){
+                if(this.paramOrder){
+                    for(var i = 0, len = this.paramOrder.length; i < len; i++){
+                        buf.push(bp[this.paramOrder[i]]);
+                    }
+                }else if(this.paramsAsHash){
+                    buf.push(bp);
+                }
+            }
+            return buf;
+        }else{
+            for(var key in bp){
+                if(!Ext.isFunction(bp[key])){
+                    buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&");
+                }
+            }
+            buf.push("node=", encodeURIComponent(node.id));
+            return buf.join("");
+        }
+    },
+
+    requestData : function(node, callback, scope){
+        if(this.fireEvent("beforeload", this, node, callback) !== false){
+            if(this.directFn){
+                var args = this.getParams(node);
+                args.push(this.processDirectResponse.createDelegate(this, [{callback: callback, node: node, scope: scope}], true));
+                this.directFn.apply(window, args);
+            }else{
+                this.transId = Ext.Ajax.request({
+                    method:this.requestMethod,
+                    url: this.dataUrl||this.url,
+                    success: this.handleResponse,
+                    failure: this.handleFailure,
+                    scope: this,
+                    argument: {callback: callback, node: node, scope: scope},
+                    params: this.getParams(node)
+                });
+            }
+        }else{
+            // if the load is cancelled, make sure we notify
+            // the node that we are done
+            this.runCallback(callback, scope || node, []);
+        }
+    },
+
+    processDirectResponse: function(result, response, args){
+        if(response.status){
+            this.handleResponse({
+                responseData: Ext.isArray(result) ? result : null,
+                responseText: result,
+                argument: args
+            });
+        }else{
+            this.handleFailure({
+                argument: args
+            });
+        }
+    },
+
+    // private
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isLoading : function(){
+        return !!this.transId;
+    },
+
+    abort : function(){
+        if(this.isLoading()){
+            Ext.Ajax.abort(this.transId);
+        }
+    },
+
+    /**
+    * <p>Override this function for custom TreeNode node implementation, or to
+    * modify the attributes at creation time.</p>
+    * Example:<pre><code>
+new Ext.tree.TreePanel({
+    ...
+    new Ext.tree.TreeLoader({
+        url: 'dataUrl',
+        createNode: function(attr) {
+//          Allow consolidation consignments to have
+//          consignments dropped into them.
+            if (attr.isConsolidation) {
+                attr.iconCls = 'x-consol',
+                attr.allowDrop = true;
+            }
+            return Ext.tree.TreeLoader.prototype.call(this, attr);
+        }
+    }),
+    ...
+});
+</code></pre>
+    * @param attr {Object} The attributes from which to create the new node.
+    */
+    createNode : function(attr){
+        // apply baseAttrs, nice idea Corey!
+        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, scope){
+        var json = response.responseText;
+        try {
+            var o = response.responseData || Ext.decode(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();
+            this.runCallback(callback, scope || node, [node]);
+        }catch(e){
+            this.handleFailure(response);
+        }
+    },
+
+    handleResponse : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.processResponse(response, a.node, a.callback, a.scope);
+        this.fireEvent("load", this, a.node, response);
+    },
+
+    handleFailure : function(response){
+        this.transId = false;
+        var a = response.argument;
+        this.fireEvent("loadexception", this, a.node, response);
+        this.runCallback(a.callback, a.scope || a.node, [a.node]);
+    }
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNode.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNode.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNode.js	(revision 625)
@@ -0,0 +1,546 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeNode
+ * @extends Ext.data.Node
+ * @cfg {String} text The text for this node
+ * @cfg {Boolean} expanded true to start the node expanded
+ * @cfg {Boolean} allowDrag False to make this node undraggable if {@link #draggable} = true (defaults to true)
+ * @cfg {Boolean} allowDrop False if this node cannot have child nodes dropped on it (defaults to true)
+ * @cfg {Boolean} disabled true to start the node disabled
+ * @cfg {String} icon The path to an icon for the node. The preferred way to do this
+ * is to use the cls or iconCls attributes and add the icon via a CSS background image.
+ * @cfg {String} cls A css class to be added to the node
+ * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images
+ * @cfg {String} href URL of the link used for the node (defaults to #)
+ * @cfg {String} hrefTarget target frame for the link
+ * @cfg {Boolean} hidden True to render hidden. (Defaults to false).
+ * @cfg {String} qtip An Ext QuickTip for the node
+ * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty
+ * @cfg {String} qtipCfg An Ext QuickTip config for the node (used instead of qtip)
+ * @cfg {Boolean} singleClickExpand True for single click expand on this node
+ * @cfg {Function} uiProvider A UI <b>class</b> to use for this node (defaults to Ext.tree.TreeNodeUI)
+ * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox
+ * (defaults to undefined with no checkbox rendered)
+ * @cfg {Boolean} draggable True to make this node draggable (defaults to false)
+ * @cfg {Boolean} isTarget False to not allow this node to act as a drop target (defaults to true)
+ * @cfg {Boolean} allowChildren False to not allow this node to have child nodes (defaults to true)
+ * @cfg {Boolean} editable False to not allow this node to be edited by an (@link Ext.tree.TreeEditor} (defaults to true)
+ * @constructor
+ * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node
+ */
+Ext.tree.TreeNode = function(attributes){
+    attributes = attributes || {};
+    if(typeof attributes == "string"){
+        attributes = {text: attributes};
+    }
+    this.childrenRendered = false;
+    this.rendered = false;
+    Ext.tree.TreeNode.superclass.constructor.call(this, attributes);
+    this.expanded = attributes.expanded === true;
+    this.isTarget = attributes.isTarget !== false;
+    this.draggable = attributes.draggable !== false && attributes.allowDrag !== false;
+    this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false;
+
+    /**
+     * Read-only. The text for this node. To change it use setText().
+     * @type String
+     */
+    this.text = attributes.text;
+    /**
+     * True if this node is disabled.
+     * @type Boolean
+     */
+    this.disabled = attributes.disabled === true;
+    /**
+     * True if this node is hidden.
+     * @type Boolean
+     */
+    this.hidden = attributes.hidden === true;
+
+    this.addEvents(
+        /**
+        * @event textchange
+        * Fires when the text for this node is changed
+        * @param {Node} this This node
+        * @param {String} text The new text
+        * @param {String} oldText The old text
+        */
+        "textchange",
+        /**
+        * @event beforeexpand
+        * Fires before this node is expanded, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforeexpand",
+        /**
+        * @event beforecollapse
+        * Fires before this node is collapsed, return false to cancel.
+        * @param {Node} this This node
+        * @param {Boolean} deep
+        * @param {Boolean} anim
+        */
+        "beforecollapse",
+        /**
+        * @event expand
+        * Fires when this node is expanded
+        * @param {Node} this This node
+        */
+        "expand",
+        /**
+        * @event disabledchange
+        * Fires when the disabled status of this node changes
+        * @param {Node} this This node
+        * @param {Boolean} disabled
+        */
+        "disabledchange",
+        /**
+        * @event collapse
+        * Fires when this node is collapsed
+        * @param {Node} this This node
+        */
+        "collapse",
+        /**
+        * @event beforeclick
+        * Fires before click processing. Return false to cancel the default action.
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "beforeclick",
+        /**
+        * @event click
+        * Fires when this node is clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "click",
+        /**
+        * @event checkchange
+        * Fires when a node with a checkbox's checked property changes
+        * @param {Node} this This node
+        * @param {Boolean} checked
+        */
+        "checkchange",
+        /**
+        * @event dblclick
+        * Fires when this node is double clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "dblclick",
+        /**
+        * @event contextmenu
+        * Fires when this node is right clicked
+        * @param {Node} this This node
+        * @param {Ext.EventObject} e The event object
+        */
+        "contextmenu",
+        /**
+        * @event beforechildrenrendered
+        * Fires right before the child nodes for this node are rendered
+        * @param {Node} this This node
+        */
+        "beforechildrenrendered"
+    );
+
+    var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;
+
+    /**
+     * Read-only. The UI for this node
+     * @type TreeNodeUI
+     */
+    this.ui = new uiClass(this);
+};
+Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
+    preventHScroll: true,
+    /**
+     * Returns true if this node is expanded
+     * @return {Boolean}
+     */
+    isExpanded : function(){
+        return this.expanded;
+    },
+
+/**
+ * Returns the UI object for this node.
+ * @return {TreeNodeUI} The object which is providing the user interface for this tree
+ * node. Unless otherwise specified in the {@link #uiProvider}, this will be an instance
+ * of {@link Ext.tree.TreeNodeUI}
+ */
+    getUI : function(){
+        return this.ui;
+    },
+
+    getLoader : function(){
+        var owner;
+        return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : new Ext.tree.TreeLoader());
+    },
+
+    // private override
+    setFirstChild : function(node){
+        var of = this.firstChild;
+        Ext.tree.TreeNode.superclass.setFirstChild.call(this, node);
+        if(this.childrenRendered && of && node != of){
+            of.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // private override
+    setLastChild : function(node){
+        var ol = this.lastChild;
+        Ext.tree.TreeNode.superclass.setLastChild.call(this, node);
+        if(this.childrenRendered && ol && node != ol){
+            ol.renderIndent(true, true);
+        }
+        if(this.rendered){
+            this.renderIndent(true, true);
+        }
+    },
+
+    // these methods are overridden to provide lazy rendering support
+    // private override
+    appendChild : function(n){
+        if(!n.render && !Ext.isArray(n)){
+            n = this.getLoader().createNode(n);
+        }
+        var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n);
+        if(node && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return node;
+    },
+
+    // private override
+    removeChild : function(node){
+        this.ownerTree.getSelectionModel().unselect(node);
+        Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments);
+        // if it's been rendered remove dom node
+        if(this.childrenRendered){
+            node.ui.remove();
+        }
+        if(this.childNodes.length < 1){
+            this.collapse(false, false);
+        }else{
+            this.ui.updateExpandIcon();
+        }
+        if(!this.firstChild && !this.isHiddenRoot()) {
+            this.childrenRendered = false;
+        }
+        return node;
+    },
+
+    // private override
+    insertBefore : function(node, refNode){
+        if(!node.render){ 
+            node = this.getLoader().createNode(node);
+        }
+        var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode);
+        if(newNode && refNode && this.childrenRendered){
+            node.render();
+        }
+        this.ui.updateExpandIcon();
+        return newNode;
+    },
+
+    /**
+     * Sets the text for this node
+     * @param {String} text
+     */
+    setText : function(text){
+        var oldText = this.text;
+        this.text = text;
+        this.attributes.text = text;
+        if(this.rendered){ // event without subscribing
+            this.ui.onTextChange(this, text, oldText);
+        }
+        this.fireEvent("textchange", this, text, oldText);
+    },
+
+    /**
+     * Triggers selection of this node
+     */
+    select : function(){
+        this.getOwnerTree().getSelectionModel().select(this);
+    },
+
+    /**
+     * Triggers deselection of this node
+     */
+    unselect : function(){
+        this.getOwnerTree().getSelectionModel().unselect(this);
+    },
+
+    /**
+     * Returns true if this node is selected
+     * @return {Boolean}
+     */
+    isSelected : function(){
+        return this.getOwnerTree().getSelectionModel().isSelected(this);
+    },
+
+    /**
+     * Expand this node.
+     * @param {Boolean} deep (optional) True to expand all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    expand : function(deep, anim, callback, scope){
+        if(!this.expanded){
+            if(this.fireEvent("beforeexpand", this, deep, anim) === false){
+                return;
+            }
+            if(!this.childrenRendered){
+                this.renderChildren();
+            }
+            this.expanded = true;
+            if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animExpand(function(){
+                    this.fireEvent("expand", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.expandChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.expand();
+                this.fireEvent("expand", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else{
+           this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            this.expandChildNodes(true);
+        }
+    },
+    
+    runCallback: function(cb, scope, args){
+        if(Ext.isFunction(cb)){
+            cb.apply(scope, args);
+        }
+    },
+
+    isHiddenRoot : function(){
+        return this.isRoot && !this.getOwnerTree().rootVisible;
+    },
+
+    /**
+     * Collapse this node.
+     * @param {Boolean} deep (optional) True to collapse all children as well
+     * @param {Boolean} anim (optional) false to cancel the default animation
+     * @param {Function} callback (optional) A callback to be called when
+     * expanding this node completes (does not wait for deep expand to complete).
+     * Called with 1 parameter, this node.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    collapse : function(deep, anim, callback, scope){
+        if(this.expanded && !this.isHiddenRoot()){
+            if(this.fireEvent("beforecollapse", this, deep, anim) === false){
+                return;
+            }
+            this.expanded = false;
+            if((this.getOwnerTree().animate && anim !== false) || anim){
+                this.ui.animCollapse(function(){
+                    this.fireEvent("collapse", this);
+                    this.runCallback(callback, scope || this, [this]);
+                    if(deep === true){
+                        this.collapseChildNodes(true);
+                    }
+                }.createDelegate(this));
+                return;
+            }else{
+                this.ui.collapse();
+                this.fireEvent("collapse", this);
+                this.runCallback(callback, scope || this, [this]);
+            }
+        }else if(!this.expanded){
+            this.runCallback(callback, scope || this, [this]);
+        }
+        if(deep === true){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++) {
+            	cs[i].collapse(true, false);
+            }
+        }
+    },
+
+    // private
+    delayedExpand : function(delay){
+        if(!this.expandProcId){
+            this.expandProcId = this.expand.defer(delay, this);
+        }
+    },
+
+    // private
+    cancelExpand : function(){
+        if(this.expandProcId){
+            clearTimeout(this.expandProcId);
+        }
+        this.expandProcId = false;
+    },
+
+    /**
+     * Toggles expanded/collapsed state of the node
+     */
+    toggle : function(){
+        if(this.expanded){
+            this.collapse();
+        }else{
+            this.expand();
+        }
+    },
+
+    /**
+     * Ensures all parent nodes are expanded, and if necessary, scrolls
+     * the node into view.
+     * @param {Function} callback (optional) A function to call when the node has been made visible.
+     * @param {Object} scope (optional) The scope in which to execute the callback.
+     */
+    ensureVisible : function(callback, scope){
+        var tree = this.getOwnerTree();
+        tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){
+            var node = tree.getNodeById(this.id);  // Somehow if we don't do this, we lose changes that happened to node in the meantime
+            tree.getTreeEl().scrollChildIntoView(node.ui.anchor);
+            this.runCallback(callback, scope || this, [this]);
+        }.createDelegate(this));
+    },
+
+    /**
+     * Expand all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes
+     */
+    expandChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].expand(deep);
+        }
+    },
+
+    /**
+     * Collapse all child nodes
+     * @param {Boolean} deep (optional) true if the child nodes should also collapse their child nodes
+     */
+    collapseChildNodes : function(deep){
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++) {
+        	cs[i].collapse(deep);
+        }
+    },
+
+    /**
+     * Disables this node
+     */
+    disable : function(){
+        this.disabled = true;
+        this.unselect();
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, true);
+        }
+        this.fireEvent("disabledchange", this, true);
+    },
+
+    /**
+     * Enables this node
+     */
+    enable : function(){
+        this.disabled = false;
+        if(this.rendered && this.ui.onDisableChange){ // event without subscribing
+            this.ui.onDisableChange(this, false);
+        }
+        this.fireEvent("disabledchange", this, false);
+    },
+
+    // private
+    renderChildren : function(suppressEvent){
+        if(suppressEvent !== false){
+            this.fireEvent("beforechildrenrendered", this);
+        }
+        var cs = this.childNodes;
+        for(var i = 0, len = cs.length; i < len; i++){
+            cs[i].render(true);
+        }
+        this.childrenRendered = true;
+    },
+
+    // private
+    sort : function(fn, scope){
+        Ext.tree.TreeNode.superclass.sort.apply(this, arguments);
+        if(this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].render(true);
+            }
+        }
+    },
+
+    // private
+    render : function(bulkRender){
+        this.ui.render(bulkRender);
+        if(!this.rendered){
+            // make sure it is registered
+            this.getOwnerTree().registerNode(this);
+            this.rendered = true;
+            if(this.expanded){
+                this.expanded = false;
+                this.expand(false, false);
+            }
+        }
+    },
+
+    // private
+    renderIndent : function(deep, refresh){
+        if(refresh){
+            this.ui.childIndent = null;
+        }
+        this.ui.renderIndent();
+        if(deep === true && this.childrenRendered){
+            var cs = this.childNodes;
+            for(var i = 0, len = cs.length; i < len; i++){
+                cs[i].renderIndent(true, refresh);
+            }
+        }
+    },
+
+    beginUpdate : function(){
+        this.childrenRendered = false;
+    },
+
+    endUpdate : function(){
+        if(this.expanded && this.rendered){
+            this.renderChildren();
+        }
+    },
+
+    destroy : function(){
+        if(this.childNodes){
+            for(var i = 0,l = this.childNodes.length; i < l; i++){
+                this.childNodes[i].destroy();
+            }
+            this.childNodes = null;
+        }
+        if(this.ui.destroy){
+            this.ui.destroy();
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        this.ui.onIdChange(id);
+    }
+});
+
+Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNodeUI.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNodeUI.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeNodeUI.js	(revision 625)
@@ -0,0 +1,633 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeNodeUI
+ * This class provides the default UI implementation for Ext TreeNodes.
+ * The TreeNode UI implementation is separate from the
+ * tree implementation, and allows customizing of the appearance of
+ * tree nodes.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ * <p>
+ * This class provides access to the user interface components of an Ext TreeNode, through
+ * {@link Ext.tree.TreeNode#getUI}
+ */
+Ext.tree.TreeNodeUI = function(node){
+    this.node = node;
+    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 = {
+    // private
+    removeChild : function(node){
+        if(this.rendered){
+            this.ctNode.removeChild(node.ui.getEl());
+        } 
+    },
+
+    // private
+    beforeLoad : function(){
+         this.addClass("x-tree-node-loading");
+    },
+
+    // private
+    afterLoad : function(){
+         this.removeClass("x-tree-node-loading");
+    },
+
+    // private
+    onTextChange : function(node, text, oldText){
+        if(this.rendered){
+            this.textNode.innerHTML = text;
+        }
+    },
+
+    // private
+    onDisableChange : function(node, state){
+        this.disabled = state;
+		if (this.checkbox) {
+			this.checkbox.disabled = state;
+		}        
+        if(state){
+            this.addClass("x-tree-node-disabled");
+        }else{
+            this.removeClass("x-tree-node-disabled");
+        } 
+    },
+
+    // private
+    onSelectedChange : function(state){
+        if(state){
+            this.focus();
+            this.addClass("x-tree-selected");
+        }else{
+            //this.blur();
+            this.removeClass("x-tree-selected");
+        }
+    },
+
+    // private
+    onMove : function(tree, node, oldParent, newParent, index, refNode){
+        this.childIndent = null;
+        if(this.rendered){
+            var targetNode = newParent.ui.getContainer();
+            if(!targetNode){//target not rendered
+                this.holder = document.createElement("div");
+                this.holder.appendChild(this.wrap);
+                return;
+            }
+            var insertBefore = refNode ? refNode.ui.getEl() : null;
+            if(insertBefore){
+                targetNode.insertBefore(this.wrap, insertBefore);
+            }else{
+                targetNode.appendChild(this.wrap);
+            }
+            this.node.renderIndent(true, oldParent != newParent);
+        }
+    },
+
+/**
+ * Adds one or more CSS classes to the node's UI element.
+ * Duplicate classes are automatically filtered out.
+ * @param {String/Array} className The CSS class to add, or an array of classes
+ */
+    addClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).addClass(cls);
+        }
+    },
+
+/**
+ * Removes one or more CSS classes from the node's UI element.
+ * @param {String/Array} className The CSS class to remove, or an array of classes
+ */
+    removeClass : function(cls){
+        if(this.elNode){
+            Ext.fly(this.elNode).removeClass(cls);  
+        }
+    },
+
+    // private
+    remove : function(){
+        if(this.rendered){
+            this.holder = document.createElement("div");
+            this.holder.appendChild(this.wrap);
+        }  
+    },
+
+    // private
+    fireEvent : function(){
+        return this.node.fireEvent.apply(this.node, arguments);  
+    },
+
+    // private
+    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 ot = this.node.getOwnerTree();
+        var dd = ot.enableDD || ot.enableDrag || ot.enableDrop;
+        if(dd && (!this.node.isRoot || ot.rootVisible)){
+            Ext.dd.Registry.register(this.elNode, {
+                node: this.node,
+                handles: this.getDDHandles(),
+                isHandle: false
+            });
+        }
+    },
+
+    // private
+    getDDHandles : function(){
+        return [this.iconNode, this.textNode, this.elNode];
+    },
+
+/**
+ * Hides this node.
+ */
+    hide : function(){
+        this.node.hidden = true;
+        if(this.wrap){
+            this.wrap.style.display = "none";
+        }
+    },
+
+/**
+ * Shows this node.
+ */
+    show : function(){
+        this.node.hidden = false;
+        if(this.wrap){
+            this.wrap.style.display = "";
+        } 
+    },
+
+    // private
+    onContextMenu : function(e){
+        if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) {
+            e.preventDefault();
+            this.focus();
+            this.fireEvent("contextmenu", this.node, e);
+        }
+    },
+
+    // private
+    onClick : function(e){
+        if(this.dropping){
+            e.stopEvent();
+            return;
+        }
+        if(this.fireEvent("beforeclick", this.node, e) !== false){
+            var a = e.getTarget('a');
+            if(!this.disabled && this.node.attributes.href && a){
+                this.fireEvent("click", this.node, e);
+                return;
+            }else if(a && e.ctrlKey){
+                e.stopEvent();
+            }
+            e.preventDefault();
+            if(this.disabled){
+                return;
+            }
+
+            if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){
+                this.node.toggle();
+            }
+
+            this.fireEvent("click", this.node, e);
+        }else{
+            e.stopEvent();
+        }
+    },
+
+    // private
+    onDblClick : function(e){
+        e.preventDefault();
+        if(this.disabled){
+            return;
+        }
+        if(this.checkbox){
+            this.toggleCheck();
+        }
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+        this.fireEvent("dblclick", this.node, e);
+    },
+
+    onOver : function(e){
+        this.addClass('x-tree-node-over');
+    },
+
+    onOut : function(e){
+        this.removeClass('x-tree-node-over');
+    },
+
+    // private
+    onCheckChange : function(){
+        var checked = this.checkbox.checked;
+		// fix for IE6
+		this.checkbox.defaultChecked = checked;		
+        this.node.attributes.checked = checked;
+        this.fireEvent('checkchange', this.node, checked);
+    },
+
+    // private
+    ecClick : function(e){
+        if(!this.animating && this.node.isExpandable()){
+            this.node.toggle();
+        }
+    },
+
+    // private
+    startDrop : function(){
+        this.dropping = true;
+    },
+    
+    // delayed drop so the click event doesn't get fired on a drop
+    endDrop : function(){ 
+       setTimeout(function(){
+           this.dropping = false;
+       }.createDelegate(this), 50); 
+    },
+
+    // private
+    expand : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "";
+    },
+
+    // private
+    focus : function(){
+        if(!this.node.preventHScroll){
+            try{this.anchor.focus();
+            }catch(e){}
+        }else{
+            try{
+                var noscroll = this.node.getOwnerTree().getTreeEl().dom;
+                var l = noscroll.scrollLeft;
+                this.anchor.focus();
+                noscroll.scrollLeft = l;
+            }catch(e){}
+        }
+    },
+
+/**
+ * Sets the checked status of the tree node to the passed value, or, if no value was passed,
+ * toggles the checked status. If the node was rendered with no checkbox, this has no effect.
+ * @param {Boolean} (optional) The new checked status.
+ */
+    toggleCheck : function(value){
+        var cb = this.checkbox;
+        if(cb){
+            cb.checked = (value === undefined ? !cb.checked : value);
+            this.onCheckChange();
+        }
+    },
+
+    // private
+    blur : function(){
+        try{
+            this.anchor.blur();
+        }catch(e){} 
+    },
+
+    // private
+    animExpand : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.stopFx();
+        if(!this.node.isExpandable()){
+            this.updateExpandIcon();
+            this.ctNode.style.display = "";
+            Ext.callback(callback);
+            return;
+        }
+        this.animating = true;
+        this.updateExpandIcon();
+        
+        ct.slideIn('t', {
+           callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    highlight : function(){
+        var tree = this.node.getOwnerTree();
+        Ext.fly(this.wrap).highlight(
+            tree.hlColor || "C3DAF9",
+            {endColor: tree.hlBaseColor}
+        );
+    },
+
+    // private
+    collapse : function(){
+        this.updateExpandIcon();
+        this.ctNode.style.display = "none";
+    },
+
+    // private
+    animCollapse : function(callback){
+        var ct = Ext.get(this.ctNode);
+        ct.enableDisplayMode('block');
+        ct.stopFx();
+
+        this.animating = true;
+        this.updateExpandIcon();
+
+        ct.slideOut('t', {
+            callback : function(){
+               this.animating = false;
+               Ext.callback(callback);
+            },
+            scope: this,
+            duration: this.node.ownerTree.duration || .25
+        });
+    },
+
+    // private
+    getContainer : function(){
+        return this.ctNode;  
+    },
+
+    // private
+    getEl : function(){
+        return this.wrap;  
+    },
+
+    // private
+    appendDDGhost : function(ghostNode){
+        ghostNode.appendChild(this.elNode.cloneNode(true));
+    },
+
+    // private
+    getDDRepairXY : function(){
+        return Ext.lib.Dom.getXY(this.iconNode);
+    },
+
+    // private
+    onRender : function(){
+        this.render();    
+    },
+
+    // private
+    render : function(bulkRender){
+        var n = this.node, a = n.attributes;
+        var targetNode = n.parentNode ? 
+              n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom;
+        
+        if(!this.rendered){
+            this.rendered = true;
+
+            this.renderElements(n, a, targetNode, bulkRender);
+
+            if(a.qtip){
+               if(this.textNode.setAttributeNS){
+                   this.textNode.setAttributeNS("ext", "qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttributeNS("ext", "qtitle", a.qtipTitle);
+                   }
+               }else{
+                   this.textNode.setAttribute("ext:qtip", a.qtip);
+                   if(a.qtipTitle){
+                       this.textNode.setAttribute("ext:qtitle", a.qtipTitle);
+                   }
+               } 
+            }else if(a.qtipCfg){
+                a.qtipCfg.target = Ext.id(this.textNode);
+                Ext.QuickTips.register(a.qtipCfg);
+            }
+            this.initEvents();
+            if(!this.node.expanded){
+                this.updateExpandIcon(true);
+            }
+        }else{
+            if(bulkRender === true) {
+                targetNode.appendChild(this.wrap);
+            }
+        }
+    },
+
+    // private
+    renderElements : function(n, a, targetNode, bulkRender){
+        // add some indent caching, this helps performance when rendering a large tree
+        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
+
+        var cb = typeof a.checked == 'boolean';
+
+        var href = a.href ? a.href : Ext.isGecko ? "" : "#";
+        var buf = ['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.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="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
+            cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '',
+            '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',
+             a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>",
+            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
+            "</li>"].join('');
+
+        var nel;
+        if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){
+            this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf);
+        }else{
+            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf);
+        }
+        
+        this.elNode = this.wrap.childNodes[0];
+        this.ctNode = this.wrap.childNodes[1];
+        var cs = this.elNode.childNodes;
+        this.indentNode = cs[0];
+        this.ecNode = cs[1];
+        this.iconNode = cs[2];
+        var index = 3;
+        if(cb){
+            this.checkbox = cs[3];
+			// fix for IE6
+			this.checkbox.defaultChecked = this.checkbox.checked;						
+            index++;
+        }
+        this.anchor = cs[index];
+        this.textNode = cs[index].firstChild;
+    },
+
+/**
+ * Returns the &lt;a> element that provides focus for the node's UI.
+ * @return {HtmlElement} The DOM anchor element.
+ */
+    getAnchor : function(){
+        return this.anchor;
+    },
+    
+/**
+ * Returns the text node.
+ * @return {HtmlNode} The DOM text node.
+ */
+    getTextEl : function(){
+        return this.textNode;
+    },
+    
+/**
+ * Returns the icon &lt;img> element.
+ * @return {HtmlElement} The DOM image element.
+ */
+    getIconEl : function(){
+        return this.iconNode;
+    },
+
+/**
+ * Returns the checked status of the node. If the node was rendered with no
+ * checkbox, it returns false.
+ * @return {Boolean} The checked flag.
+ */
+    isChecked : function(){
+        return this.checkbox ? this.checkbox.checked : false; 
+    },
+
+    // private
+    updateExpandIcon : function(){
+        if(this.rendered){
+            var n = this.node, c1, c2;
+            var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
+            var hasChild = n.hasChildNodes();
+            if(hasChild || n.attributes.expandable){
+                if(n.expanded){
+                    cls += "-minus";
+                    c1 = "x-tree-node-collapsed";
+                    c2 = "x-tree-node-expanded";
+                }else{
+                    cls += "-plus";
+                    c1 = "x-tree-node-expanded";
+                    c2 = "x-tree-node-collapsed";
+                }
+                if(this.wasLeaf){
+                    this.removeClass("x-tree-node-leaf");
+                    this.wasLeaf = false;
+                }
+                if(this.c1 != c1 || this.c2 != c2){
+                    Ext.fly(this.elNode).replaceClass(c1, c2);
+                    this.c1 = c1; this.c2 = c2;
+                }
+            }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 ecc = "x-tree-ec-icon "+cls;
+            if(this.ecc != ecc){
+                this.ecNode.className = ecc;
+                this.ecc = ecc;
+            }
+        }
+    },
+    
+    // private
+    onIdChange: function(id){
+        if(this.rendered){
+            this.elNode.setAttribute('ext:tree-node-id', id);
+        }
+    },
+
+    // private
+    getChildIndent : function(){
+        if(!this.childIndent){
+            var buf = [];
+            var p = this.node;
+            while(p){
+                if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){
+                    if(!p.isLast()) {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />');
+                    } else {
+                        buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />');
+                    }
+                }
+                p = p.parentNode;
+            }
+            this.childIndent = buf.join("");
+        }
+        return this.childIndent;
+    },
+
+    // private
+    renderIndent : function(){
+        if(this.rendered){
+            var indent = "";
+            var p = this.node.parentNode;
+            if(p){
+                indent = p.ui.getChildIndent();
+            }
+            if(this.indentMarkup != indent){ // don't rerender if not required
+                this.indentNode.innerHTML = indent;
+                this.indentMarkup = indent;
+            }
+            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;
+        
+        if (this.holder){
+             delete this.wrap;
+             Ext.removeNode(this.holder);
+             delete this.holder;
+        }else{
+            Ext.removeNode(this.wrap);
+            delete this.wrap;
+        }
+    }
+};
+
+/**
+ * @class Ext.tree.RootTreeNodeUI
+ * This class provides the default UI implementation for <b>root</b> Ext TreeNodes.
+ * The RootTreeNode UI implementation allows customizing the appearance of the root tree node.<br>
+ * <p>
+ * If you are customizing the Tree's user interface, you
+ * may need to extend this class, but you should never need to instantiate this class.<br>
+ */
+Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
+    // private
+    render : function(){
+        if(!this.rendered){
+            var targetNode = this.node.ownerTree.innerCt.dom;
+            this.node.expanded = true;
+            targetNode.innerHTML = '<div class="x-tree-root-node"></div>';
+            this.wrap = this.ctNode = targetNode.firstChild;
+        }
+    },
+    collapse : Ext.emptyFn,
+    expand : Ext.emptyFn
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreePanel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreePanel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreePanel.js	(revision 625)
@@ -0,0 +1,918 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreePanel
+ * @extends Ext.Panel
+ * <p>The TreePanel provides tree-structured UI representation of tree-structured data.</p>
+ * <p>{@link Ext.tree.TreeNode TreeNode}s added to the TreePanel may each contain metadata
+ * used by your application in their {@link Ext.tree.TreeNode#attributes attributes} property.</p>
+ * <p><b>A TreePanel must have a {@link #root} node before it is rendered.</b> This may either be
+ * specified using the {@link #root} config option, or using the {@link #setRootNode} method.
+ * <p>An example of tree rendered to an existing div:</p><pre><code>
+var tree = new Ext.tree.TreePanel({
+    renderTo: 'tree-div',
+    useArrows: true,
+    autoScroll: true,
+    animate: true,
+    enableDD: true,
+    containerScroll: true,
+    border: false,
+    // auto create TreeLoader
+    dataUrl: 'get-nodes.php',
+
+    root: {
+        nodeType: 'async',
+        text: 'Ext JS',
+        draggable: false,
+        id: 'source'
+    }
+});
+
+tree.getRootNode().expand();
+ * </code></pre>
+ * <p>The example above would work with a data packet similar to this:</p><pre><code>
+[{
+    "text": "adapter",
+    "id": "source\/adapter",
+    "cls": "folder"
+}, {
+    "text": "dd",
+    "id": "source\/dd",
+    "cls": "folder"
+}, {
+    "text": "debug.js",
+    "id": "source\/debug.js",
+    "leaf": true,
+    "cls": "file"
+}]
+ * </code></pre>
+ * <p>An example of tree within a Viewport:</p><pre><code>
+new Ext.Viewport({
+    layout: 'border',
+    items: [{
+        region: 'west',
+        collapsible: true,
+        title: 'Navigation',
+        xtype: 'treepanel',
+        width: 200,
+        autoScroll: true,
+        split: true,
+        loader: new Ext.tree.TreeLoader(),
+        root: new Ext.tree.AsyncTreeNode({
+            expanded: true,
+            children: [{
+                text: 'Menu Option 1',
+                leaf: true
+            }, {
+                text: 'Menu Option 2',
+                leaf: true
+            }, {
+                text: 'Menu Option 3',
+                leaf: true
+            }]
+        }),
+        rootVisible: false,
+        listeners: {
+            click: function(n) {
+                Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
+            }
+        }
+    }, {
+        region: 'center',
+        xtype: 'tabpanel',
+        // remaining code not shown ...
+    }]
+});
+</code></pre>
+ *
+ * @cfg {Ext.tree.TreeNode} root The root node for the tree.
+ * @cfg {Boolean} rootVisible <tt>false</tt> to hide the root node (defaults to <tt>true</tt>)
+ * @cfg {Boolean} lines <tt>false</tt> to disable tree lines (defaults to <tt>true</tt>)
+ * @cfg {Boolean} enableDD <tt>true</tt> to enable drag and drop
+ * @cfg {Boolean} enableDrag <tt>true</tt> to enable just drag
+ * @cfg {Boolean} enableDrop <tt>true</tt> to enable just drop
+ * @cfg {Object} dragConfig Custom config to pass to the {@link Ext.tree.TreeDragZone} instance
+ * @cfg {Object} dropConfig Custom config to pass to the {@link Ext.tree.TreeDropZone} instance
+ * @cfg {String} ddGroup The DD group this TreePanel belongs to
+ * @cfg {Boolean} ddAppendOnly <tt>true</tt> if the tree should only allow append drops (use for trees which are sorted)
+ * @cfg {Boolean} ddScroll <tt>true</tt> to enable body scrolling
+ * @cfg {Boolean} containerScroll <tt>true</tt> to register this container with ScrollManager
+ * @cfg {Boolean} hlDrop <tt>false</tt> to disable node highlight on drop (defaults to the value of {@link Ext#enableFx})
+ * @cfg {String} hlColor The color of the node highlight (defaults to <tt>'C3DAF9'</tt>)
+ * @cfg {Boolean} animate <tt>true</tt> to enable animated expand/collapse (defaults to the value of {@link Ext#enableFx})
+ * @cfg {Boolean} singleExpand <tt>true</tt> if only 1 node per branch may be expanded
+ * @cfg {Object} selModel A tree selection model to use with this TreePanel (defaults to an {@link Ext.tree.DefaultSelectionModel})
+ * @cfg {Boolean} trackMouseOver <tt>false</tt> to disable mouse over highlighting
+ * @cfg {Ext.tree.TreeLoader} loader A {@link Ext.tree.TreeLoader} for use with this TreePanel
+ * @cfg {String} pathSeparator The token used to separate sub-paths in path strings (defaults to <tt>'/'</tt>)
+ * @cfg {Boolean} useArrows <tt>true</tt> to use Vista-style arrows in the tree (defaults to <tt>false</tt>)
+ * @cfg {String} requestMethod The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).
+ *
+ * @constructor
+ * @param {Object} config
+ * @xtype treepanel
+ */
+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);
+        }
+
+        // initialize the loader
+        var l = this.loader;
+        if(!l){
+            l = new Ext.tree.TreeLoader({
+                dataUrl: this.dataUrl,
+                requestMethod: this.requestMethod
+            });
+        }else if(typeof l == 'object' && !l.load){
+            l = new Ext.tree.TreeLoader(l);
+        }
+        this.loader = l;
+
+        this.nodeHash = {};
+
+        /**
+        * The root node of this tree.
+        * @type Ext.tree.TreeNode
+        * @property root
+        */
+        if(this.root){
+            var r = this.root;
+            delete this.root;
+            this.setRootNode(r);
+        }
+
+
+        this.addEvents(
+
+            /**
+            * @event append
+            * Fires when a new child node is appended to a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The newly appended node
+            * @param {Number} index The index of the newly appended node
+            */
+           "append",
+           /**
+            * @event remove
+            * Fires when a child node is removed from a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node removed
+            */
+           "remove",
+           /**
+            * @event movenode
+            * Fires when a node is moved to a new location in the tree
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node moved
+            * @param {Node} oldParent The old parent of this node
+            * @param {Node} newParent The new parent of this node
+            * @param {Number} index The index it was moved to
+            */
+           "movenode",
+           /**
+            * @event insert
+            * Fires when a new child node is inserted in a node in this tree.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node inserted
+            * @param {Node} refNode The child node the node was inserted before
+            */
+           "insert",
+           /**
+            * @event beforeappend
+            * Fires before a new child is appended to a node in this tree, return false to cancel the append.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be appended
+            */
+           "beforeappend",
+           /**
+            * @event beforeremove
+            * Fires before a child is removed from a node in this tree, return false to cancel the remove.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be removed
+            */
+           "beforeremove",
+           /**
+            * @event beforemovenode
+            * Fires before a node is moved to a new location in the tree. Return false to cancel the move.
+            * @param {Tree} tree The owner tree
+            * @param {Node} node The node being moved
+            * @param {Node} oldParent The parent of the node
+            * @param {Node} newParent The new parent the node is moving to
+            * @param {Number} index The index it is being moved to
+            */
+           "beforemovenode",
+           /**
+            * @event beforeinsert
+            * Fires before a new child is inserted in a node in this tree, return false to cancel the insert.
+            * @param {Tree} tree The owner tree
+            * @param {Node} parent The parent node
+            * @param {Node} node The child node to be inserted
+            * @param {Node} refNode The child node the node is being inserted before
+            */
+            "beforeinsert",
+
+            /**
+            * @event beforeload
+            * Fires before a node is loaded, return false to cancel
+            * @param {Node} node The node being loaded
+            */
+            "beforeload",
+            /**
+            * @event load
+            * Fires when a node is loaded
+            * @param {Node} node The node that was loaded
+            */
+            "load",
+            /**
+            * @event textchange
+            * Fires when the text for a node is changed
+            * @param {Node} node The node
+            * @param {String} text The new text
+            * @param {String} oldText The old text
+            */
+            "textchange",
+            /**
+            * @event beforeexpandnode
+            * Fires before a node is expanded, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforeexpandnode",
+            /**
+            * @event beforecollapsenode
+            * Fires before a node is collapsed, return false to cancel.
+            * @param {Node} node The node
+            * @param {Boolean} deep
+            * @param {Boolean} anim
+            */
+            "beforecollapsenode",
+            /**
+            * @event expandnode
+            * Fires when a node is expanded
+            * @param {Node} node The node
+            */
+            "expandnode",
+            /**
+            * @event disabledchange
+            * Fires when the disabled status of a node changes
+            * @param {Node} node The node
+            * @param {Boolean} disabled
+            */
+            "disabledchange",
+            /**
+            * @event collapsenode
+            * Fires when a node is collapsed
+            * @param {Node} node The node
+            */
+            "collapsenode",
+            /**
+            * @event beforeclick
+            * Fires before click processing on a node. Return false to cancel the default action.
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "beforeclick",
+            /**
+            * @event click
+            * Fires when a node is clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "click",
+            /**
+            * @event checkchange
+            * Fires when a node with a checkbox's checked property changes
+            * @param {Node} this This node
+            * @param {Boolean} checked
+            */
+            "checkchange",
+            /**
+            * @event dblclick
+            * Fires when a node is double clicked
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "dblclick",
+            /**
+            * @event contextmenu
+            * Fires when a node is right clicked. To display a context menu in response to this
+            * event, first create a Menu object (see {@link Ext.menu.Menu} for details), then add
+            * a handler for this event:<pre><code>
+new Ext.tree.TreePanel({
+    title: 'My TreePanel',
+    root: new Ext.tree.AsyncTreeNode({
+        text: 'The Root',
+        children: [
+            { text: 'Child node 1', leaf: true },
+            { text: 'Child node 2', leaf: true }
+        ]
+    }),
+    contextMenu: new Ext.menu.Menu({
+        items: [{
+            id: 'delete-node',
+            text: 'Delete Node'
+        }],
+        listeners: {
+            itemclick: function(item) {
+                switch (item.id) {
+                    case 'delete-node':
+                        var n = item.parentMenu.contextNode;
+                        if (n.parentNode) {
+                            n.remove();
+                        }
+                        break;
+                }
+            }
+        }
+    }),
+    listeners: {
+        contextmenu: function(node, e) {
+//          Register the context node with the menu so that a Menu Item's handler function can access
+//          it via its {@link Ext.menu.BaseItem#parentMenu parentMenu} property.
+            node.select();
+            var c = node.getOwnerTree().contextMenu;
+            c.contextNode = node;
+            c.showAt(e.getXY());
+        }
+    }
+});
+</code></pre>
+            * @param {Node} node The node
+            * @param {Ext.EventObject} e The event object
+            */
+            "contextmenu",
+            /**
+            * @event beforechildrenrendered
+            * Fires right before the child nodes for a node are rendered
+            * @param {Node} node The node
+            */
+            "beforechildrenrendered",
+           /**
+             * @event startdrag
+             * Fires when a node starts being dragged
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "startdrag",
+            /**
+             * @event enddrag
+             * Fires when a drag operation is complete
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {event} e The raw browser event
+             */
+            "enddrag",
+            /**
+             * @event dragdrop
+             * Fires when a dragged node is dropped on a valid DD target
+             * @param {Ext.tree.TreePanel} this
+             * @param {Ext.tree.TreeNode} node
+             * @param {DD} dd The dd it was dropped on
+             * @param {event} e The raw browser event
+             */
+            "dragdrop",
+            /**
+             * @event beforenodedrop
+             * Fires when a DD object is dropped on a node in this tree for preprocessing. Return false to cancel the drop. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source <b>OR</b> you can supply node(s)
+             * to be inserted by setting them on this object.</li>
+             * <li>cancel - Set this to true to cancel the drop.</li>
+             * <li>dropStatus - If the default drop action is cancelled but the drop is valid, setting this to true
+             * will prevent the animated "repair" from appearing.</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "beforenodedrop",
+            /**
+             * @event nodedrop
+             * Fires after a DD object is dropped on a node in this tree. The dropEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Dropped node(s).</li>
+             * </ul>
+             * @param {Object} dropEvent
+             */
+            "nodedrop",
+             /**
+             * @event nodedragover
+             * Fires when a tree node is being targeted for a drag drop, return false to signal drop not allowed. The dragOverEvent
+             * passed to handlers has the following properties:<br />
+             * <ul style="padding:5px;padding-left:16px;">
+             * <li>tree - The TreePanel</li>
+             * <li>target - The node being targeted for the drop</li>
+             * <li>data - The drag data from the drag source</li>
+             * <li>point - The point of the drop - append, above or below</li>
+             * <li>source - The drag source</li>
+             * <li>rawEvent - Raw mouse event</li>
+             * <li>dropNode - Drop node(s) provided by the source.</li>
+             * <li>cancel - Set this to true to signal drop not allowed.</li>
+             * </ul>
+             * @param {Object} dragOverEvent
+             */
+            "nodedragover"
+        );
+        if(this.singleExpand){
+            this.on("beforeexpandnode", this.restrictExpand, this);
+        }
+    },
+
+    // private
+    proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){
+        if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){
+            ename = ename+'node';
+        }
+        // args inline for performance while bubbling events
+        return this.fireEvent(ename, a1, a2, a3, a4, a5, a6);
+    },
+
+
+    /**
+     * Returns this root node for this tree
+     * @return {Node}
+     */
+    getRootNode : function(){
+        return this.root;
+    },
+
+    /**
+     * Sets the root node for this tree. If the TreePanel has already rendered a root node, the
+     * previous root node (and all of its descendants) are destroyed before the new root node is rendered.
+     * @param {Node} node
+     * @return {Node}
+     */
+    setRootNode : function(node){
+        Ext.destroy(this.root);
+        if(!node.render){ // attributes passed
+            node = this.loader.createNode(node);
+        }
+        this.root = node;
+        node.ownerTree = this;
+        node.isRoot = true;
+        this.registerNode(node);
+        if(!this.rootVisible){
+            var uiP = node.attributes.uiProvider;
+            node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node);
+        }
+        if (this.innerCt) {
+            this.innerCt.update('');
+            this.afterRender();
+        }
+        return node;
+    },
+
+    /**
+     * Gets a node in this tree by its id
+     * @param {String} id
+     * @return {Node}
+     */
+    getNodeById : function(id){
+        return this.nodeHash[id];
+    },
+
+    // private
+    registerNode : function(node){
+        this.nodeHash[node.id] = node;
+    },
+
+    // private
+    unregisterNode : function(node){
+        delete this.nodeHash[node.id];
+    },
+
+    // private
+    toString : function(){
+        return "[Tree"+(this.id?" "+this.id:"")+"]";
+    },
+
+    // private
+    restrictExpand : function(node){
+        var p = node.parentNode;
+        if(p){
+            if(p.expandedChild && p.expandedChild.parentNode == p){
+                p.expandedChild.collapse();
+            }
+            p.expandedChild = node;
+        }
+    },
+
+    /**
+     * Retrieve an array of checked nodes, or an array of a specific attribute of checked nodes (e.g. "id")
+     * @param {String} attribute (optional) Defaults to null (return the actual nodes)
+     * @param {TreeNode} startNode (optional) The node to start from, defaults to the root
+     * @return {Array}
+     */
+    getChecked : function(a, startNode){
+        startNode = startNode || this.root;
+        var r = [];
+        var f = function(){
+            if(this.attributes.checked){
+                r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a]));
+            }
+        };
+        startNode.cascade(f);
+        return r;
+    },
+
+    /**
+     * Returns the container element for this TreePanel.
+     * @return {Element} The container element for this TreePanel.
+     */
+    getEl : function(){
+        return this.el;
+    },
+
+    /**
+     * Returns the default {@link Ext.tree.TreeLoader} for this TreePanel.
+     * @return {Ext.tree.TreeLoader} The TreeLoader for this TreePanel.
+     */
+    getLoader : function(){
+        return this.loader;
+    },
+
+    /**
+     * Expand all nodes
+     */
+    expandAll : function(){
+        this.root.expand(true);
+    },
+
+    /**
+     * Collapse all nodes
+     */
+    collapseAll : function(){
+        this.root.collapse(true);
+    },
+
+    /**
+     * Returns the selection model used by this TreePanel.
+     * @return {TreeSelectionModel} The selection model used by this TreePanel
+     */
+    getSelectionModel : function(){
+        if(!this.selModel){
+            this.selModel = new Ext.tree.DefaultSelectionModel();
+        }
+        return this.selModel;
+    },
+
+    /**
+     * Expands a specified path in this TreePanel. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the expand is complete. The callback will be called with
+     * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded.
+     */
+    expandPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var curNode = this.root;
+        if(curNode.attributes[attr] != keys[1]){ // invalid root
+            if(callback){
+                callback(false, null);
+            }
+            return;
+        }
+        var index = 1;
+        var f = function(){
+            if(++index == keys.length){
+                if(callback){
+                    callback(true, curNode);
+                }
+                return;
+            }
+            var c = curNode.findChild(attr, keys[index]);
+            if(!c){
+                if(callback){
+                    callback(false, curNode);
+                }
+                return;
+            }
+            curNode = c;
+            c.expand(false, false, f);
+        };
+        curNode.expand(false, false, f);
+    },
+
+    /**
+     * Selects the node in this tree at the specified path. A path can be retrieved from a node with {@link Ext.data.Node#getPath}
+     * @param {String} path
+     * @param {String} attr (optional) The attribute used in the path (see {@link Ext.data.Node#getPath} for more info)
+     * @param {Function} callback (optional) The callback to call when the selection is complete. The callback will be called with
+     * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node.
+     */
+    selectPath : function(path, attr, callback){
+        attr = attr || "id";
+        var keys = path.split(this.pathSeparator);
+        var v = keys.pop();
+        if(keys.length > 0){
+            var f = function(success, node){
+                if(success && node){
+                    var n = node.findChild(attr, v);
+                    if(n){
+                        n.select();
+                        if(callback){
+                            callback(true, n);
+                        }
+                    }else if(callback){
+                        callback(false, n);
+                    }
+                }else{
+                    if(callback){
+                        callback(false, n);
+                    }
+                }
+            };
+            this.expandPath(keys.join(this.pathSeparator), attr, f);
+        }else{
+            this.root.select();
+            if(callback){
+                callback(true, this.root);
+            }
+        }
+    },
+
+    /**
+     * Returns the underlying Element for this tree
+     * @return {Ext.Element} The Element
+     */
+    getTreeEl : function(){
+        return this.body;
+    },
+
+    // private
+    onRender : function(ct, position){
+        Ext.tree.TreePanel.superclass.onRender.call(this, ct, position);
+        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")});
+    },
+
+    // private
+    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){
+           /**
+            * The dropZone used by this tree if drop is enabled (see {@link #enableDD} or {@link #enableDrop})
+            * @property dropZone
+            * @type Ext.tree.TreeDropZone
+            */
+             this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || {
+               ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true
+           });
+        }
+        if((this.enableDD || this.enableDrag) && !this.dragZone){
+           /**
+            * The dragZone used by this tree if drag is enabled (see {@link #enableDD} or {@link #enableDrag})
+            * @property dragZone
+            * @type Ext.tree.TreeDragZone
+            */
+            this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || {
+               ddGroup: this.ddGroup || "TreeDD",
+               scroll: this.ddScroll
+           });
+        }
+        this.getSelectionModel().init(this);
+    },
+
+    // private
+    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);
+    }
+
+    /**
+     * @cfg {String/Number} activeItem
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoDestroy
+     * @hide
+     */
+    /**
+     * @cfg {Object/String/Function} autoLoad
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} autoWidth
+     * @hide
+     */
+    /**
+     * @cfg {Boolean/Number} bufferResize
+     * @hide
+     */
+    /**
+     * @cfg {String} defaultType
+     * @hide
+     */
+    /**
+     * @cfg {Object} defaults
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} hideBorders
+     * @hide
+     */
+    /**
+     * @cfg {Mixed} items
+     * @hide
+     */
+    /**
+     * @cfg {String} layout
+     * @hide
+     */
+    /**
+     * @cfg {Object} layoutConfig
+     * @hide
+     */
+    /**
+     * @cfg {Boolean} monitorResize
+     * @hide
+     */
+    /**
+     * @property items
+     * @hide
+     */
+    /**
+     * @method cascade
+     * @hide
+     */
+    /**
+     * @method doLayout
+     * @hide
+     */
+    /**
+     * @method find
+     * @hide
+     */
+    /**
+     * @method findBy
+     * @hide
+     */
+    /**
+     * @method findById
+     * @hide
+     */
+    /**
+     * @method findByType
+     * @hide
+     */
+    /**
+     * @method getComponent
+     * @hide
+     */
+    /**
+     * @method getLayout
+     * @hide
+     */
+    /**
+     * @method getUpdater
+     * @hide
+     */
+    /**
+     * @method insert
+     * @hide
+     */
+    /**
+     * @method load
+     * @hide
+     */
+    /**
+     * @method remove
+     * @hide
+     */
+    /**
+     * @event add
+     * @hide
+     */
+    /**
+     * @method removeAll
+     * @hide
+     */
+    /**
+     * @event afterLayout
+     * @hide
+     */
+    /**
+     * @event beforeadd
+     * @hide
+     */
+    /**
+     * @event beforeremove
+     * @hide
+     */
+    /**
+     * @event remove
+     * @hide
+     */
+
+
+
+    /**
+     * @cfg {String} allowDomMove  @hide
+     */
+    /**
+     * @cfg {String} autoEl @hide
+     */
+    /**
+     * @cfg {String} applyTo  @hide
+     */
+    /**
+     * @cfg {String} contentEl  @hide
+     */
+    /**
+     * @cfg {String} disabledClass  @hide
+     */
+    /**
+     * @cfg {String} elements  @hide
+     */
+    /**
+     * @cfg {String} html  @hide
+     */
+    /**
+     * @cfg {Boolean} preventBodyReset
+     * @hide
+     */
+    /**
+     * @property disabled
+     * @hide
+     */
+    /**
+     * @method applyToMarkup
+     * @hide
+     */
+    /**
+     * @method enable
+     * @hide
+     */
+    /**
+     * @method disable
+     * @hide
+     */
+    /**
+     * @method setDisabled
+     * @hide
+     */
+});
+
+Ext.tree.TreePanel.nodeTypes = {};
+
+Ext.reg('treepanel', Ext.tree.TreePanel);
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSelectionModel.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSelectionModel.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSelectionModel.js	(revision 625)
@@ -0,0 +1,315 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.DefaultSelectionModel
+ * @extends Ext.util.Observable
+ * The default single selection for a TreePanel.
+ */
+Ext.tree.DefaultSelectionModel = function(config){
+   this.selNode = null;
+   
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected node changes
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        */
+       "selectionchange",
+
+       /**
+        * @event beforeselect
+        * Fires before the selected node changes, return false to cancel the change
+        * @param {DefaultSelectionModel} this
+        * @param {TreeNode} node the new selection
+        * @param {TreeNode} node the old selection
+        */
+       "beforeselect"
+   );
+
+    Ext.apply(this, config);
+    Ext.tree.DefaultSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        this.select(node);
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @return {TreeNode} The selected node
+     */
+    select : function(node){
+        var last = this.selNode;
+        if(node == last){
+            node.ui.onSelectedChange(true);
+        }else if(this.fireEvent('beforeselect', this, node, last) !== false){
+            if(last){
+                last.ui.onSelectedChange(false);
+            }
+            this.selNode = node;
+            node.ui.onSelectedChange(true);
+            this.fireEvent("selectionchange", this, node, last);
+        }
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selNode == node){
+            this.clearSelections();
+        }    
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(){
+        var n = this.selNode;
+        if(n){
+            n.ui.onSelectedChange(false);
+            this.selNode = null;
+            this.fireEvent("selectionchange", this, null);
+        }
+        return n;
+    },
+    
+    /**
+     * Get the selected node
+     * @return {TreeNode} The selected node
+     */
+    getSelectedNode : function(){
+        return this.selNode;    
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selNode == node;  
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectPrevious : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        var ps = s.previousSibling;
+        if(ps){
+            if(!ps.isExpanded() || ps.childNodes.length < 1){
+                return this.select(ps);
+            } else{
+                var lc = ps.lastChild;
+                while(lc && lc.isExpanded() && lc.childNodes.length > 0){
+                    lc = lc.lastChild;
+                }
+                return this.select(lc);
+            }
+        } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){
+            return this.select(s.parentNode);
+        }
+        return null;
+    },
+
+    /**
+     * Selects the node above the selected node in the tree, intelligently walking the nodes
+     * @return TreeNode The new selection
+     */
+    selectNext : function(){
+        var s = this.selNode || this.lastSelNode;
+        if(!s){
+            return null;
+        }
+        if(s.firstChild && s.isExpanded()){
+             return this.select(s.firstChild);
+         }else if(s.nextSibling){
+             return this.select(s.nextSibling);
+         }else if(s.parentNode){
+            var newS = null;
+            s.parentNode.bubble(function(){
+                if(this.nextSibling){
+                    newS = this.getOwnerTree().selModel.select(this.nextSibling);
+                    return false;
+                }
+            });
+            return newS;
+         }
+        return null;
+    },
+
+    onKeyDown : function(e){
+        var s = this.selNode || this.lastSelNode;
+        // undesirable, but required
+        var sm = this;
+        if(!s){
+            return;
+        }
+        var k = e.getKey();
+        switch(k){
+             case e.DOWN:
+                 e.stopEvent();
+                 this.selectNext();
+             break;
+             case e.UP:
+                 e.stopEvent();
+                 this.selectPrevious();
+             break;
+             case e.RIGHT:
+                 e.preventDefault();
+                 if(s.hasChildNodes()){
+                     if(!s.isExpanded()){
+                         s.expand();
+                     }else if(s.firstChild){
+                         this.select(s.firstChild, e);
+                     }
+                 }
+             break;
+             case e.LEFT:
+                 e.preventDefault();
+                 if(s.hasChildNodes() && s.isExpanded()){
+                     s.collapse();
+                 }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){
+                     this.select(s.parentNode, e);
+                 }
+             break;
+        };
+    }
+});
+
+/**
+ * @class Ext.tree.MultiSelectionModel
+ * @extends Ext.util.Observable
+ * Multi selection for a TreePanel.
+ */
+Ext.tree.MultiSelectionModel = function(config){
+   this.selNodes = [];
+   this.selMap = {};
+   this.addEvents(
+       /**
+        * @event selectionchange
+        * Fires when the selected nodes change
+        * @param {MultiSelectionModel} this
+        * @param {Array} nodes Array of the selected nodes
+        */
+       "selectionchange"
+   );
+    Ext.apply(this, config);
+    Ext.tree.MultiSelectionModel.superclass.constructor.call(this);
+};
+
+Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, {
+    init : function(tree){
+        this.tree = tree;
+        tree.getTreeEl().on("keydown", this.onKeyDown, this);
+        tree.on("click", this.onNodeClick, this);
+    },
+    
+    onNodeClick : function(node, e){
+        if(e.ctrlKey && this.isSelected(node)){
+            this.unselect(node);
+        }else{
+            this.select(node, e, e.ctrlKey);
+        }
+    },
+    
+    /**
+     * Select a node.
+     * @param {TreeNode} node The node to select
+     * @param {EventObject} e (optional) An event associated with the selection
+     * @param {Boolean} keepExisting True to retain existing selections
+     * @return {TreeNode} The selected node
+     */
+    select : function(node, e, keepExisting){
+        if(keepExisting !== true){
+            this.clearSelections(true);
+        }
+        if(this.isSelected(node)){
+            this.lastSelNode = node;
+            return node;
+        }
+        this.selNodes.push(node);
+        this.selMap[node.id] = node;
+        this.lastSelNode = node;
+        node.ui.onSelectedChange(true);
+        this.fireEvent("selectionchange", this, this.selNodes);
+        return node;
+    },
+    
+    /**
+     * Deselect a node.
+     * @param {TreeNode} node The node to unselect
+     */
+    unselect : function(node){
+        if(this.selMap[node.id]){
+            node.ui.onSelectedChange(false);
+            var sn = this.selNodes;
+            var index = sn.indexOf(node);
+            if(index != -1){
+                this.selNodes.splice(index, 1);
+            }
+            delete this.selMap[node.id];
+            this.fireEvent("selectionchange", this, this.selNodes);
+        }
+    },
+    
+    /**
+     * Clear all selections
+     */
+    clearSelections : function(suppressEvent){
+        var sn = this.selNodes;
+        if(sn.length > 0){
+            for(var i = 0, len = sn.length; i < len; i++){
+                sn[i].ui.onSelectedChange(false);
+            }
+            this.selNodes = [];
+            this.selMap = {};
+            if(suppressEvent !== true){
+                this.fireEvent("selectionchange", this, this.selNodes);
+            }
+        }
+    },
+    
+    /**
+     * Returns true if the node is selected
+     * @param {TreeNode} node The node to check
+     * @return {Boolean}
+     */
+    isSelected : function(node){
+        return this.selMap[node.id] ? true : false;  
+    },
+    
+    /**
+     * Returns an array of the selected nodes
+     * @return {Array}
+     */
+    getSelectedNodes : function(){
+        return this.selNodes;    
+    },
+
+    onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown,
+
+    selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext,
+
+    selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious
+});
Index: trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSorter.js
===================================================================
--- trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSorter.js	(revision 625)
+++ trunk/web/addons/job_monarch/lib/extjs-30/src/widgets/tree/TreeSorter.js	(revision 625)
@@ -0,0 +1,106 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
+ * @class Ext.tree.TreeSorter
+ * Provides sorting of nodes in a {@link Ext.tree.TreePanel}.  The TreeSorter automatically monitors events on the 
+ * associated TreePanel that might affect the tree's sort order (beforechildrenrendered, append, insert and textchange).
+ * Example usage:<br />
+ * <pre><code>
+new Ext.tree.TreeSorter(myTree, {
+    folderSort: true,
+    dir: "desc",
+    sortType: function(node) {
+        // sort by a custom, typed attribute:
+        return parseInt(node.id, 10);
+    }
+});
+</code></pre>
+ * @constructor
+ * @param {TreePanel} tree
+ * @param {Object} config
+ */
+Ext.tree.TreeSorter = function(tree, config){
+    /**
+     * @cfg {Boolean} folderSort True to sort leaf nodes under non-leaf nodes (defaults to false)
+     */
+    /** 
+     * @cfg {String} property The named attribute on the node to sort by (defaults to "text").  Note that this 
+     * property is only used if no {@link #sortType} function is specified, otherwise it is ignored.
+     */
+    /** 
+     * @cfg {String} dir The direction to sort ("asc" or "desc," case-insensitive, defaults to "asc")
+     */
+    /** 
+     * @cfg {String} leafAttr The attribute used to determine leaf nodes when {@link #folderSort} = true (defaults to "leaf")
+     */
+    /** 
+     * @cfg {Boolean} caseSensitive true for case-sensitive sort (defaults to false)
+     */
+    /** 
+     * @cfg {Function} sortType A custom "casting" function used to convert node values before sorting.  The function
+     * will be called with a single parameter (the {@link Ext.tree.TreeNode} being evaluated) and is expected to return
+     * the node's sort value cast to the specific data type required for sorting.  This could be used, for example, when
+     * a node's text (or other attribute) should be sorted as a date or numeric value.  See the class description for 
+     * example usage.  Note that if a sortType is specified, any {@link #property} config will be ignored.
+     */
+    
+    Ext.apply(this, config);
+    tree.on("beforechildrenrendered", this.doSort, this);
+    tree.on("append", this.updateSort, this);
+    tree.on("insert", this.updateSort, this);
+    tree.on("textchange", this.updateSortParent, this);
+    
+    var dsc = this.dir && this.dir.toLowerCase() == "desc";
+    var p = this.property || "text";
+    var sortType = this.sortType;
+    var fs = this.folderSort;
+    var cs = this.caseSensitive === true;
+    var leafAttr = this.leafAttr || 'leaf';
+
+    this.sortFn = function(n1, n2){
+        if(fs){
+            if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){
+                return 1;
+            }
+            if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){
+                return -1;
+            }
+        }
+    	var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
+    	var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
+    	if(v1 < v2){
+			return dsc ? +1 : -1;
+		}else if(v1 > v2){
+			return dsc ? -1 : +1;
+        }else{
+	    	return 0;
+        }
+    };
+};
+
+Ext.tree.TreeSorter.prototype = {
+    doSort : function(node){
+        node.sort(this.sortFn);
+    },
+    
+    compareNodes : function(n1, n2){
+        return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1);
+    },
+    
+    updateSort : function(tree, node){
+        if(node.childrenRendered){
+            this.doSort.defer(1, this, [node]);
+        }
+    },
+    
+    updateSortParent : function(node){
+		var p = node.parentNode;
+		if(p && p.childrenRendered){
+            this.doSort.defer(1, this, [p]);
+        }
+    }
+};
